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

添加首页统计报表

parent 7e8a8bf8
...@@ -118,33 +118,19 @@ ...@@ -118,33 +118,19 @@
<el-table :data="companyPatentsList" :row-class-name="rowCompanyPatentsIndex" @selection-change="handleCompanyPatentsSelectionChange" ref="companyPatents"> <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 type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/> <el-table-column label="序号" align="center" prop="index" width="50"/>
<!-- <el-table-column label="标签名称" prop="labelName">--> <el-table-column label="知识产权类型" prop="intellectPropertyType">
<!-- <template slot-scope="scope">--> <template slot-scope="scope">
<!-- <el-input v-model="scope.row.labelName" placeholder="请选择标签名称" />--> <el-input v-model="scope.row.intellectPropertyType" placeholder="请输入知识产权类型" />
<!-- </template>--> </template>
<!-- </el-table-column>--> </el-table-column>
<el-table-column label="标签名称" prop="labelId"> <el-table-column label="知识产权数量" prop="labelId">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.labelId" placeholder="请选择标签名称" > <el-input-number v-model="scope.row.intellectPropertyNum" size="small" placeholder='请输入知识产权数量' ></el-input-number>
<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="请选择标签名称" />-->
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="公司名称" prop="companyName">
<template slot-scope="scope">
<el-input v-model="scope.row.companyName" placeholder="请输入公司名称" />
</template>
</el-table-column>-->
<el-table-column label="备注" prop="remark"> <el-table-column label="备注" prop="remark">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="请输入备注" /> <el-input v-model="scope.row.remark" placeholder="请输入备注" />
...@@ -310,9 +296,9 @@ ...@@ -310,9 +296,9 @@
/** 公司专利添加按钮操作 */ /** 公司专利添加按钮操作 */
handleAddCompanyPatents() { handleAddCompanyPatents() {
let obj = {}; let obj = {};
obj.labelId = ""; obj.companyId = "";
obj.labelName = ""; obj.intellectPropertyType = "";
obj.companyName = ""; obj.intellectPropertyNum = 1;
obj.remark = ""; obj.remark = "";
obj.createUserId = ""; obj.createUserId = "";
obj.createTime = ""; obj.createTime = "";
......
...@@ -3,11 +3,15 @@ package com.mortals.xhx.module.company.web; ...@@ -3,11 +3,15 @@ package com.mortals.xhx.module.company.web;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum; 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.model.vo.HomeStatInfo;
import com.mortals.xhx.module.company.service.CompanyLabelsService; 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.model.LabelsQuery;
import com.mortals.xhx.module.labels.service.LabelsService; import com.mortals.xhx.module.labels.service.LabelsService;
import org.checkerframework.checker.units.qual.A; import org.checkerframework.checker.units.qual.A;
...@@ -56,6 +60,9 @@ public class CompanyController extends BaseCRUDJsonBodyMappingController<Company ...@@ -56,6 +60,9 @@ public class CompanyController extends BaseCRUDJsonBodyMappingController<Company
@Autowired @Autowired
private LabelsService labelsService; private LabelsService labelsService;
@Autowired
private CompanyPatentService companyPatentService;
public CompanyController() { public CompanyController() {
super.setModuleDesc("公司"); super.setModuleDesc("公司");
...@@ -67,12 +74,21 @@ public class CompanyController extends BaseCRUDJsonBodyMappingController<Company ...@@ -67,12 +74,21 @@ public class CompanyController extends BaseCRUDJsonBodyMappingController<Company
this.addDict(model, "softNum", paramService.getParamBySecondOrganize("Company", "softNum")); this.addDict(model, "softNum", paramService.getParamBySecondOrganize("Company", "softNum"));
this.addDict(model, "patentNum", paramService.getParamBySecondOrganize("Company", "patentNum")); 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); 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