Commit 90328030 authored by Administrator's avatar Administrator

Merge remote-tracking branch 'origin/V20231129-中建一局二公司' into V20231129-中建一局二公司

parents feadfe4d ffde0bf7
package com.dsk.monitor.domain.vo;
import lombok.Data;
import java.util.List;
/**
* @ClassName UpdateMonitorCompanyVo
* @Description 监控更新
* @Author lc
* @Date 2024/05/14 11:05
* @Version
*/
@Data
public class UpdateMonitorCompanyVo {
/**
* 新增加企业id
*/
private List<Integer> addList;
/**
* 被删除企业id
*/
private List<Integer> dropList;
private String systemCode = "zjyj";
}
package com.dsk.monitor.job;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil;
import com.dsk.common.core.domain.R;
import com.dsk.common.helper.LoginHelper;
import com.dsk.common.utils.redis.RedisUtils;
import com.dsk.cscec.mapper.DCustomerMapper;
import com.dsk.monitor.domain.vo.PushMonitorCompanyAddVo;
import com.dsk.monitor.domain.vo.UpdateMonitorCompanyVo;
import com.dsk.search.service.BusinessOpportunityRadarService;
import com.dsk.system.utils.DskOpenApiUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author lc
* @date 2024/5/13 17:40
*/
@Component
@Slf4j
public class MonitorScheduledTask {
@Resource
private DCustomerMapper customerMapper;
@Autowired
private BusinessOpportunityRadarService opportunityRadarService;
@Resource
private DskOpenApiUtil dskOpenApiUtil;
/**
* 每天3点更新已监控企业
*/
// @Scheduled(cron = "0 0 0/2 * * ?")
@Scheduled(cron = "0 0 3 * * ?")
public void updateMonitorCompany(){
// 中建服务 查找当前供应商名单 传到监控服务
//获取所有供应商企业名称
List<String> list = customerMapper.allSearchCompanyNameList();
List<Integer> newList = new ArrayList<>();
for (String companyName : list) {
//循环匹配 得到能关联上的企业id
Map<String, Object> map = opportunityRadarService.enterpriseByName(companyName);
if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
Integer companyId = MapUtil.getInt(data, "jskEid");
newList.add(companyId);
}
}
//如果没有上一次的企业id数据则直接返回
if (!RedisUtils.hasKey("monitorCompanyList")){
RedisUtils.setCacheList("monitorCompanyList",newList);
//设置过期时间两天
RedisUtils.expire("monitorCompanyList",172800);
log.info("redis没有上一次供应商数据 无需进行更新!");
return;
}
List<Integer> oldList = new ArrayList<>();
oldList = RedisUtils.getCacheList("monitorCompanyList");
RedisUtils.setCacheList("monitorCompanyList",newList);
//设置过期时间两天
RedisUtils.expire("monitorCompanyList",172800);
List<Integer> oldListCopy = oldList;
//被删除的
oldList.removeAll(newList);
//新旧list完全相同 无需更新
if (oldList.size()==0 && oldListCopy.size()==newList.size()){
log.info("供应商数据没有变化 无需更新监控!");
return;
}
//新增加的
newList.removeAll(oldListCopy);
UpdateMonitorCompanyVo updateVo = new UpdateMonitorCompanyVo();
updateVo.setAddList(newList);
updateVo.setDropList(oldList);
updateVo.setSystemCode("ZJYJ");
log.info("中建一局用户更新默认监控企业!");
dskOpenApiUtil.requestBody("/operate/monitor/company/zjyj/updateDefaultCompany", BeanUtil.beanToMap(updateVo, false, false));
}
}
...@@ -354,14 +354,14 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -354,14 +354,14 @@ public class MonitorServiceImpl implements MonitorService {
} }
} }
PushMonitorCompanyAddVo addVo = new PushMonitorCompanyAddVo(); PushMonitorCompanyAddVo addVo = new PushMonitorCompanyAddVo();
addVo.setSystemCode("ZJYJ");
addVo.setCid(idList); addVo.setCid(idList);
Long userId = LoginHelper.getUserId(); Long userId = LoginHelper.getUserId();
if (ObjectUtil.isNotEmpty(userId)) { if (ObjectUtil.isNotEmpty(userId)) {
addVo.setUserId(userId); addVo.setUserId(userId);
} }
log.info("中建一局用户添加默认监控企业!"); log.info("中建一局用户添加默认监控企业!");
dskOpenApiUtil.requestBody("/operate/monitor/company/zjyj/addDefaultCompany", BeanUtil.beanToMap(addVo, false, false)); Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/monitor/company/zjyj/addDefaultCompany", BeanUtil.beanToMap(addVo, false, false));
return R.ok("正在导入中 请稍后"); return BeanUtil.toBean(map, R.class);
} }
} }
import request from "@/utils/request";
// 行政许可分页列表
export function selectChinaXzxkPage(data) {
return request({
url: '/enterpriseCredit/selectChinaXzxkPage',
method: 'post',
data: data
})
}
// 行政处罚信息分页
export function selectChinaXzcfPage(data) {
return request({
url: '/enterpriseCredit/selectChinaXzcfPage',
method: 'post',
data: data
})
}
// 信用中国-诚实守信
export function selectChinaNsxydjPage(data) {
return request({
url: '/enterpriseCredit/selectChinaNsxydjPage',
method: 'post',
data: data
})
}
// 信用中国-严重失信主体名单
export function selectChinaYzsxztmdPage(data) {
return request({
url: '/enterpriseCredit/selectChinaYzsxztmdPage',
method: 'post',
data: data
})
}
// 信用中国-经营异常
export function selectChinaJyycPage(data) {
return request({
url: '/enterpriseCredit/selectChinaJyycPage',
method: 'post',
data: data
})
}
import request from "@/utils/request";
// 资质分页列表
export function certPage(data) {
return request({
url: '/enterprise/certPage',
method: 'post',
data: data
})
}
import request from '@/utils/request'; import request from '@/utils/request';
//供应商风险动态统计 //供应商风险动态统计
export function statistics() { export function statistics(param) {
return request({ return request({
url: '/customer/dynamicRisk/statistics', url: '/customer/dynamicRisk/statistics',
data: param,
method: 'POST', method: 'POST',
}); });
} }
//供应商总台账 //供应商基本情况
export function customerAll(param) { export function queryBasicInfo() {
return request({ return request({
url: '/customer/all/searchList', url: '/customerInfo/queryBasicInfo',
data:param, method: 'get',
method: 'POSt',
}); });
} }
//涉诉限用禁用名单名单 //供应商风险类型分布
export function getSupplierLimitedList(param) { export function riskType(param) {
return request({ return request({
url: '/fSupplierLimited/getSupplierLimitedList', url: '/customer/risk/type',
params: param, data: param,
method: 'get', method: 'POST',
});
}
//供应商风险趋势
export function riskChange(param) {
return request({
url: '/customer/risk/change',
data: param,
method: 'POST',
}); });
} }
//供应商总台账
export function searchList(param) {
return request({
url: '/customer/all/searchList',
data:param,
method: 'POST',
});
}
import Vue from 'vue';
export const EventBus = new Vue();
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
</div> </div>
</div> </div>
<div class="label-item"> <div class="label-item">
<span class="color">建筑业企业资质 31</span> <span @click="handleColor(item.qualificationParamNameCn)" v-for="item in statisticList" :class="{'color':stateColor == item.qualificationParamNameCn}">{{item.qualificationParamNameCn ? item.qualificationParamNameCn : item.qualificationParamName}} {{item.qualificationMount}}</span>
<span>工程设计资质 31</span>
</div> </div>
<div class="table-item"> <div class="table-item">
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<el-table <el-table
v-if="!isSkeleton" v-if="!isSkeleton"
element-loading-text="Loading" element-loading-text="Loading"
...@@ -21,60 +21,46 @@ ...@@ -21,60 +21,46 @@
highlight-current-row highlight-current-row
> >
<el-table-column label="序号" width="60" align="left" type="index"></el-table-column> <el-table-column label="序号" width="60" align="left" type="index"></el-table-column>
<el-table-column label="资质编号" width="150" prop="code"></el-table-column> <el-table-column label="资质编号" width="150" prop="certificateNo"></el-table-column>
<el-table-column label="资质名称" min-width="200" prop="expenseName"></el-table-column> <el-table-column label="资质名称" min-width="200" prop="certName"></el-table-column>
<el-table-column label="发证日期" width="150" prop="date"></el-table-column> <el-table-column label="发证日期" width="150" prop="issueDate"></el-table-column>
<el-table-column label="有效期" width="150" prop="time"></el-table-column> <el-table-column label="有效期" width="150" prop="validityDate"></el-table-column>
<el-table-column label="发证机关" min-width="200" prop="fzjg"></el-table-column> <el-table-column label="发证机关" min-width="200" prop="authority"></el-table-column>
</el-table> </el-table>
<div class="pagination-box" v-if="show_page && tableDataTotal>queryParams.pageSize">
<el-pagination background :current-page="queryParams.pageNum" :page-size="queryParams.pageSize" :total="tableDataTotal" layout="prev, pager, next, jumper" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import skeleton from '../component/skeleton'; import skeleton from '../component/skeleton';
import { statistic } from '@/api/detail/party-a/index';
import { certPage } from '@/api/detail/party-a/qualification';
export default { export default {
name: "qualification", name: "qualification",
components: { components: {
skeleton, skeleton,
}, },
props: ['companyId'],
data() { data() {
return { return {
tableData:[ tableData:[],
{ isSkeleton:true,
code:'D123456489', statisticList:[],
expenseName:'冶金工程施工总承包一级', queryParams:{
date:'2020-08-01', pageNum:1,
time:'2020-08-01', pageSize:10
fzjg:'住房和城乡建设部', },
}, stateColor:'',
{ tableDataTotal: null,
code:'D123456489', show_page:true,
expenseName:'冶金工程施工总承包二级', MaxPage:500,
date:'2020-08-01',
time:'2020-08-01',
fzjg:'住房和城乡建设部',
},
{
code:'D123456489',
expenseName:'冶金工程施工总承包san级',
date:'2020-08-01',
time:'2020-08-01',
fzjg:'住房和城乡建设部',
},
{
code:'D323156489',
expenseName:'冶金工程施工总承包san级',
date:'2020-08-01',
time:'2020-08-01',
fzjg:'住房和城乡建设部',
},
],
isSkeleton:false,
} }
}, },
created() { created() {
this.getStatistic()
}, },
//计算集 //计算集
computed: { computed: {
...@@ -82,8 +68,63 @@ ...@@ -82,8 +68,63 @@
}, },
//方法集 //方法集
methods: { methods: {
handleSearch(){ async getStatistic() {
let params = {
...this.queryParams,
companyId: this.companyId,
category:''
};
let res = await statistic(params);
if (res.code == 200) {
// this.statisticList = res.data.newQualification;
let arr=[]
for(let i=0; i<res.data.newQualification.length; i++){
if(res.data.newQualification[i].qualificationMount !=0){
arr.push(res.data.newQualification[i])
}
}
this.statisticList = arr;
this.stateColor=this.statisticList[0].qualificationParamNameCn;
this.getCertPage()
}
},
async getCertPage(){
this.isSkeleton = true
let params = {
...this.queryParams,
companyId: this.companyId,
category:this.stateColor
};
let res = await certPage(params);
if (res.code == 200) {
this.tableData=res.rows;
this.isSkeleton = false
}
},
handleColor(value){
this.stateColor=value;
this.getCertPage()
},
// 重置页数
handleSizeChange(val) {
this.queryParams.pageNum = 1
this.queryParams.pageSize = val
this.querySubmit()
},
// 跳转指定页数
handleCurrentChange(val) {
if(this.MaxPage<val){
this.show_page = false
this.$nextTick(() => {
this.queryParams.pageNum = 1
this.$message.warning(`对不起,最多只能访问${this.MaxPage}页`)
this.show_page = true
})
}else {
this.queryParams.pageNum = val
this.getCertPage()
window.scrollTo(0, 0);
}
}, },
flitterData(arr) { flitterData(arr) {
let spanOneArr = [] let spanOneArr = []
...@@ -136,6 +177,8 @@ ...@@ -136,6 +177,8 @@
font-size: 14px; font-size: 14px;
margin-right: 8px; margin-right: 8px;
padding: 0 12px; padding: 0 12px;
margin-bottom: 8px;
cursor: pointer;
} }
.color{ .color{
background: rgba(0, 129, 255, 0.1); background: rgba(0, 129, 255, 0.1);
...@@ -144,7 +187,7 @@ ...@@ -144,7 +187,7 @@
} }
} }
.table-item{ .table-item{
padding: 16px; padding:8px 16px 16px 16px;
} }
} }
</style> </style>
...@@ -257,6 +257,7 @@ ...@@ -257,6 +257,7 @@
this.qyVisible=false; this.qyVisible=false;
this.companyName='' this.companyName=''
this.dataList=[] this.dataList=[]
this.cid=[]
}, },
handleAdd(){ handleAdd(){
let data={ let data={
...@@ -267,6 +268,7 @@ ...@@ -267,6 +268,7 @@
this.qyVisible=false; this.qyVisible=false;
this.companyName='' this.companyName=''
this.dataList=[] this.dataList=[]
this.cid=[]
this.$message.success("新增成功"); this.$message.success("新增成功");
this.querySubmit() this.querySubmit()
}) })
...@@ -456,7 +458,8 @@ ...@@ -456,7 +458,8 @@
} }
::v-deep .el-date-editor{ ::v-deep .el-date-editor{
position: absolute; position: absolute;
left: 602px; /*left: 602px;*/
right: -350px;
top: -7px top: -7px
} }
} }
......
...@@ -27,6 +27,16 @@ ...@@ -27,6 +27,16 @@
</el-checkbox-group> </el-checkbox-group>
</el-select> </el-select>
</div> </div>
<div class="select-popper">
<span :class="{ color_text: jyfx.length }">经营风险{{jyfx.length > 0 ? jyfx.length:''}}<i class="el-icon-caret-bottom"></i></span>
<el-select ref="tenderTypeSelect" v-model="jyfx" class="select-multiple" collapse-tags multiple placeholder="请选择">
<el-checkbox-group v-model="jyfx">
<el-option v-for="(i,index) in selectList1" :key="index" :label="i.dimensionName" @change="handleSelect2" :value="i.dimensionName">
<el-checkbox style="width: 100%;" :label="i.dimensionName" @change="changeJyfx(i)">{{i.dimensionName}}</el-checkbox>
</el-option>
</el-checkbox-group>
</el-select>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -98,6 +108,7 @@ ...@@ -98,6 +108,7 @@
arr:[], arr:[],
sffx:[], sffx:[],
gsfx:[], gsfx:[],
jyfx:[],
checkFx: true, checkFx: true,
checkJkwd: true, checkJkwd: true,
queryParams:{ queryParams:{
...@@ -166,11 +177,21 @@ ...@@ -166,11 +177,21 @@
this.gsfx.splice(this.gsfx.indexOf(val.dimensionName), 1) this.gsfx.splice(this.gsfx.indexOf(val.dimensionName), 1)
} }
}, },
changeJyfx(val) {
if (this.jyfx.indexOf(val.dimensionName) == -1) {
this.jyfx.push(val.dimensionName)
} else {
this.jyfx.splice(this.jyfx.indexOf(val.dimensionName), 1)
}
},
handleSelect(val) { handleSelect(val) {
}, },
handleSelect1(val) { handleSelect1(val) {
},
handleSelect2(val) {
}, },
// 开始时间改变 // 开始时间改变
startChangeTime(value){ startChangeTime(value){
...@@ -187,18 +208,44 @@ ...@@ -187,18 +208,44 @@
receiveMode:Number(this.queryParams.receiveMode), receiveMode:Number(this.queryParams.receiveMode),
phones:this.queryParams.phones, phones:this.queryParams.phones,
} }
if(this.sffx.length > 0 && this.gsfx.length > 0){ let sffx = this.sffx
params.riskType='司法风险,工商风险' if(sffx.indexOf('不限')>-1){
params.dimension=this.sffx.join()+','+this.gsfx.join() sffx = []
} }
if(this.sffx.length > 0 && this.gsfx.length === 0){ let gsfx = this.gsfx
params.riskType='司法风险' if(gsfx.indexOf('不限')>-1){
params.dimension=this.sffx.join() gsfx = []
} }
if(this.sffx.length === 0 && this.gsfx.length > 0){ let jyfx = this.jyfx
params.riskType='工商风险' if(jyfx.indexOf('不限')>-1){
params.dimension=this.gsfx.join() jyfx = []
} }
let arr=[
...sffx,
...gsfx,
...jyfx,
]
if(arr.length > 0){
params.condition.dimension=arr
}else {
delete params.condition.dimension
}
// if(this.sffx.length > 0 && this.gsfx.length > 0 && this.jyfx.length > 0){
// params.riskType='司法风险,工商风险,经营风险'
// params.dimension=this.sffx.join()+','+this.gsfx.join()
// }
// if(this.sffx.length > 0 && this.gsfx.length === 0){
// params.riskType='司法风险'
// params.dimension=this.sffx.join()
// }
// if(this.sffx.length === 0 && this.gsfx.length > 0){
// params.riskType='工商风险'
// params.dimension=this.gsfx.join()
// }
if(this.startTime){ if(this.startTime){
params.timePeriodStart=this.startTime params.timePeriodStart=this.startTime
} }
......
...@@ -756,7 +756,8 @@ ...@@ -756,7 +756,8 @@
} }
::v-deep .el-date-editor{ ::v-deep .el-date-editor{
position: absolute; position: absolute;
left: 602px; /*left: 602px;*/
right: -368px;
top: -7px top: -7px
} }
::v-deep .el-select{ ::v-deep .el-select{
......
...@@ -755,7 +755,7 @@ ...@@ -755,7 +755,7 @@
} }
::v-deep .el-date-editor{ ::v-deep .el-date-editor{
position: absolute; position: absolute;
left: 602px; right: -368px;
top: -7px top: -7px
} }
::v-deep .el-select{ ::v-deep .el-select{
......
...@@ -741,7 +741,7 @@ ...@@ -741,7 +741,7 @@
} }
::v-deep .el-date-editor{ ::v-deep .el-date-editor{
position: absolute; position: absolute;
left: 602px; right: -368px;
top: -7px top: -7px
} }
::v-deep .el-select{ ::v-deep .el-select{
......
...@@ -130,7 +130,9 @@ ...@@ -130,7 +130,9 @@
width="150" width="150"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span style="cursor: pointer;color:#0081FF;" @click="handleDetail(scope.row)">查看详情</span> <!--<span style="cursor: pointer;color:#0081FF;" @click="handleDetail(scope.row)">查看详情</span>-->
<span v-if="scope.row.hasdetail" style="cursor: pointer;color:#0081FF;" @click="handleDetail(scope.row)">查看详情</span>
<span v-else="scope.row.hasdetail" @click="handleDetail(scope.row)">查看详情</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -834,7 +836,8 @@ ...@@ -834,7 +836,8 @@
} }
::v-deep .el-date-editor{ ::v-deep .el-date-editor{
position: absolute; position: absolute;
left: 602px; /*left: 602px;*/
right: -368px;
top: -7px top: -7px
} }
::v-deep .el-select{ ::v-deep .el-select{
......
...@@ -7,16 +7,16 @@ ...@@ -7,16 +7,16 @@
<!--</el-select>--> <!--</el-select>-->
<!--</div>--> <!--</div>-->
<div class="directCost-cont"> <div class="directCost-cont">
<div class="left"> <!--<div class="left">-->
<div class="left-side-menu"> <!--<div class="left-side-menu">-->
<project-side-menu :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" v-model="defaultActive" @select="handleSelect"> <!--<project-side-menu :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" v-model="defaultActive" @select="handleSelect">-->
<template :slot="`${menuDetails.menuName}-${menuDetails.menuLevel}`"> <!--<template :slot="`${menuDetails.menuName}-${menuDetails.menuLevel}`">-->
<img src="@/assets/images/projectCostLedger/icon_cost_detail_1.svg" alt=""> <!--<img src="@/assets/images/projectCostLedger/icon_cost_detail_1.svg" alt="">-->
<div class="project-sub-menu-title-text">{{menuDetails.menuName}}</div> <!--<div class="project-sub-menu-title-text">{{menuDetails.menuName}}</div>-->
</template> <!--</template>-->
</project-side-menu> <!--</project-side-menu>-->
</div> <!--</div>-->
</div> <!--</div>-->
<div class="right-table" ref="rightTable"> <div class="right-table" ref="rightTable">
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton> <skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<div class="table-item"> <div class="table-item">
...@@ -137,6 +137,7 @@ ...@@ -137,6 +137,7 @@
import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu"; import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu";
import { getCbDirectExpenseMenuTreeApi,getCbDirectExpenseList,cbDirectExpenseAdd,cbDirectExpenseDelete } from "@/api/projectCostLedger"; import { getCbDirectExpenseMenuTreeApi,getCbDirectExpenseList,cbDirectExpenseAdd,cbDirectExpenseDelete } from "@/api/projectCostLedger";
import skeleton from '../../../../component/skeleton' import skeleton from '../../../../component/skeleton'
import { EventBus } from '@/utils/eventBus.js';
export default { export default {
name: "directCost", name: "directCost",
props: { props: {
...@@ -224,7 +225,10 @@ export default { ...@@ -224,7 +225,10 @@ export default {
} }
}, },
created() { created() {
EventBus.$on('valueChanged', (newValue) => {
console.log(newValue,"|||||")
this.getCbDirectExpenseList(newValue)
});
}, },
mounted() { mounted() {
...@@ -254,6 +258,7 @@ export default { ...@@ -254,6 +258,7 @@ export default {
} }
}, },
async getCbDirectExpenseList(params) { async getCbDirectExpenseList(params) {
this.isSkeleton=true
try { try {
const result = await getCbDirectExpenseList(params); const result = await getCbDirectExpenseList(params);
if (result.code == 200) { if (result.code == 200) {
...@@ -385,7 +390,8 @@ export default { ...@@ -385,7 +390,8 @@ export default {
} }
} }
.right-table{ .right-table{
width: calc(100% - 220px); /*width: calc(100% - 220px);*/
width: 100%;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
padding: 16px; padding: 16px;
......
...@@ -3,7 +3,20 @@ ...@@ -3,7 +3,20 @@
<div class="project-cost-ledger-detail-header-inner"> <div class="project-cost-ledger-detail-header-inner">
<project-bread-crumb :current="current" :breadCrumbTree="breadCrumbTree" @breadCrumbTrigger="breadCrumbTrigger"></project-bread-crumb> <project-bread-crumb :current="current" :breadCrumbTree="breadCrumbTree" @breadCrumbTrigger="breadCrumbTrigger"></project-bread-crumb>
<!-- 项目名称 --> <!-- 项目名称 -->
<div class="project-detail-header-name">{{comDetailInfo.projectName ? comDetailInfo.projectName : "-"}}</div> <div class="project-detail-header-name">
<div class="name">
{{comDetailInfo.projectName ? comDetailInfo.projectName : "-"}}
<i :class="state ?'el-icon-arrow-up':'el-icon-arrow-down'" @click="handleDown" v-if="current === 'directCost'" style="cursor: pointer;"></i>
<div class="down-list" v-if="state">
<project-side-menu :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" v-model="defaultActive" @select="handleSelect">
<template :slot="`${menuDetails.menuName}-${menuDetails.menuLevel}`">
<img src="@/assets/images/projectCostLedger/icon_cost_detail_1.svg" alt="">
<div class="project-sub-menu-title-text">{{menuDetails.menuName}}</div>
</template>
</project-side-menu>
</div>
</div>
</div>
<!-- 项目信息 --> <!-- 项目信息 -->
<div class="project-detail-plate"> <div class="project-detail-plate">
<div class="detail-plate-item project-code"> <div class="detail-plate-item project-code">
...@@ -25,6 +38,9 @@ ...@@ -25,6 +38,9 @@
</template> </template>
<script> <script>
import ProjectBreadCrumb from "@/views/projectCostLedger/detail/components/ProjectBreadCrumb"; import ProjectBreadCrumb from "@/views/projectCostLedger/detail/components/ProjectBreadCrumb";
import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu";
import { getCbDirectExpenseMenuTreeApi} from "@/api/projectCostLedger";
import { EventBus } from '@/utils/eventBus.js';
export default { export default {
name: "projectDetailHeader", name: "projectDetailHeader",
props: { props: {
...@@ -36,19 +52,36 @@ export default { ...@@ -36,19 +52,36 @@ export default {
} }
}, },
components: { components: {
ProjectBreadCrumb ProjectBreadCrumb,ProjectSideMenu
}, },
watch: { watch: {
detailInfo: { detailInfo: {
handler(newValue) { handler(newValue) {
this.comDetailInfo = newValue ? newValue : {}; this.comDetailInfo = newValue ? newValue : {};
} }
},
current:{
handler(newValue) {
if(newValue === 'directCost'){
// this.getCbDirectExpenseMenuTree(this.comDetailInfo.projectId)
}
}
} }
}, },
data() { data() {
return { return {
isShowProjectCode: ["basicEngineeringInformation", "directCost", "feedSummary", "cost"], isShowProjectCode: ["basicEngineeringInformation", "directCost", "feedSummary", "cost"],
comDetailInfo: this.detailInfo ? this.detailInfo : {} comDetailInfo: this.detailInfo ? this.detailInfo : {},
defaultActive: "",
menuTreeList: [],
menuDetails:{},
menuOptions: {
nodeName: "menuName",
nodeValue: "menuId",
children : "childrenList"
},
menuId:'',
state:false,
}; };
}, },
//可访问data属性 //可访问data属性
...@@ -62,11 +95,50 @@ export default { ...@@ -62,11 +95,50 @@ export default {
//方法集 //方法集
methods: { methods: {
breadCrumbTrigger(item) { breadCrumbTrigger(item) {
console.log(item);
if (item.path == "root") { if (item.path == "root") {
this.$router.push("/projectCostLedger/list"); this.$router.push("/projectCostLedger/list");
} }
} },
async getCbDirectExpenseMenuTree(params) {
try {
const result = await getCbDirectExpenseMenuTreeApi(params);
if (result.code == 200) {
const _tempArray = result.data;
this.menuDetails=_tempArray
this.menuTreeList.push(_tempArray);
const defaultCurrent = this.findMenuNode(this.menuTreeList, "宝安中学(集团)初中部改扩建工程施工总承包-加固修缮工程");
if (defaultCurrent) {
this.defaultActive = defaultCurrent.menuId;
this.menuId = defaultCurrent.menuId;
}
// this.getCbDirectExpenseList(defaultCurrent.menuId)
}
} catch (error) {
}
},
handleDown(){
this.state=!this.state;
if(this.menuTreeList.length === 0){
this.getCbDirectExpenseMenuTree(this.comDetailInfo.projectId)
}
},
handleSelect(menuPath, menuPathArray){
this.defaultActive=menuPath;
this.menuId=menuPath
this.state=false;
EventBus.$emit('valueChanged', menuPath);
// this.getCbDirectExpenseList(menuPath)
},
findMenuNode(tree, nodeName) {
for (const item of tree) {
if (item.menuName == nodeName && !item?.childrenList?.length) return item;
if (item.childrenList instanceof Array) {
const result = this.findMenuNode(item.childrenList, nodeName);
if (result) return result;
}
}
},
}, },
} }
</script> </script>
...@@ -74,7 +146,7 @@ export default { ...@@ -74,7 +146,7 @@ export default {
.project-cost-ledger-detail-header { .project-cost-ledger-detail-header {
width: 100%; width: 100%;
height: 118px; height: 118px;
overflow: hidden; /*overflow: hidden;*/
background: #fff; background: #fff;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
...@@ -90,7 +162,7 @@ export default { ...@@ -90,7 +162,7 @@ export default {
line-height: 16px; line-height: 16px;
margin-top: 16px; margin-top: 16px;
width: 100%; width: 100%;
overflow: hidden; /*overflow: hidden;*/
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
font-family: Source Han Sans, Source Han Sans; font-family: Source Han Sans, Source Han Sans;
...@@ -98,6 +170,20 @@ export default { ...@@ -98,6 +170,20 @@ export default {
color: #232323; color: #232323;
font-weight: bold; font-weight: bold;
} }
.name{
position: relative;
display: inline-block;
}
.down-list{
min-width: 500px;
min-height: 200px;
position: absolute;
right: -40px;
z-index: 99;
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08),0px 2px 6px 0px rgba(0, 0, 0, 0.06),0px 4px 8px 2px rgba(0, 0, 0, 0.04);
top:30px;
background: #ffffff;
}
.project-detail-plate { .project-detail-plate {
display: flex; display: flex;
......
...@@ -518,7 +518,7 @@ ...@@ -518,7 +518,7 @@
}, },
//模糊查询 //模糊查询
inputProjectName(){ inputProjectName(){
if(!this.queryParam.projectName){ if(this.queryParam.projectName.length === 0){
this.projectNameList=[] this.projectNameList=[]
return return
} }
......
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