Commit 3ef31373 authored by 赵啸非's avatar 赵啸非

添加首页统计报表

parent 7e8a8bf8
......@@ -118,33 +118,19 @@
<el-table :data="companyPatentsList" :row-class-name="rowCompanyPatentsIndex" @selection-change="handleCompanyPatentsSelectionChange" ref="companyPatents">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
<!-- <el-table-column label="标签名称" prop="labelName">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.labelName" placeholder="请选择标签名称" />-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="标签名称" prop="labelId">
<el-table-column label="知识产权类型" prop="intellectPropertyType">
<template slot-scope="scope">
<el-select v-model="scope.row.labelId" placeholder="请选择标签名称" >
<el-option
v-for="($label, $value) in dict.labels"
:key="$value"
:label="$label"
:value="$value"
></el-option>
</el-select>
<!-- <el-input v-model="scope.row.labelName" placeholder="请选择标签名称" />-->
<el-input v-model="scope.row.intellectPropertyType" placeholder="请输入知识产权类型" />
</template>
</el-table-column>
<!-- <el-table-column label="公司名称" prop="companyName">
<el-table-column label="知识产权数量" prop="labelId">
<template slot-scope="scope">
<el-input v-model="scope.row.companyName" placeholder="请输入公司名称" />
<el-input-number v-model="scope.row.intellectPropertyNum" size="small" placeholder='请输入知识产权数量' ></el-input-number>
</template>
</el-table-column>-->
</el-table-column>
<el-table-column label="备注" prop="remark">
<template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="请输入备注" />
......@@ -310,9 +296,9 @@
/** 公司专利添加按钮操作 */
handleAddCompanyPatents() {
let obj = {};
obj.labelId = "";
obj.labelName = "";
obj.companyName = "";
obj.companyId = "";
obj.intellectPropertyType = "";
obj.intellectPropertyNum = 1;
obj.remark = "";
obj.createUserId = "";
obj.createTime = "";
......
......@@ -3,11 +3,15 @@ package com.mortals.xhx.module.company.web;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.company.model.CompanyPatentEntity;
import com.mortals.xhx.module.company.model.CompanyPatentQuery;
import com.mortals.xhx.module.company.model.vo.HomeStatInfo;
import com.mortals.xhx.module.company.service.CompanyLabelsService;
import com.mortals.xhx.module.company.service.CompanyPatentService;
import com.mortals.xhx.module.labels.model.LabelsQuery;
import com.mortals.xhx.module.labels.service.LabelsService;
import org.checkerframework.checker.units.qual.A;
......@@ -56,6 +60,9 @@ public class CompanyController extends BaseCRUDJsonBodyMappingController<Company
@Autowired
private LabelsService labelsService;
@Autowired
private CompanyPatentService companyPatentService;
public CompanyController() {
super.setModuleDesc("公司");
......@@ -67,12 +74,21 @@ public class CompanyController extends BaseCRUDJsonBodyMappingController<Company
this.addDict(model, "softNum", paramService.getParamBySecondOrganize("Company", "softNum"));
this.addDict(model, "patentNum", paramService.getParamBySecondOrganize("Company", "patentNum"));
this.addDict(model, "labels", labelsService.find(new LabelsQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(),y->y.getLabelName(),(o,n)->n)));
this.addDict(model, "labels", labelsService.find(new LabelsQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getLabelName(), (o, n) -> n)));
super.init(model, context);
}
@Override
protected int editAfter(Long id, Map<String, Object> model, CompanyEntity entity, Context context) throws AppException {
List<CompanyPatentEntity> companyPatentEntities = companyPatentService.find(new CompanyPatentQuery().companyId(entity.getId()));
entity.setCompanyPatentsList(companyPatentEntities);
return super.editAfter(id, model, entity, context);
}
/**
* 首页统计
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment