Commit cf8d5b0e authored by tianhongyang's avatar tianhongyang

企业详情左侧菜单map 映射

parent 0f6b84d0
...@@ -311,7 +311,6 @@ li { ...@@ -311,7 +311,6 @@ li {
.table-item { .table-item {
width: 100%; width: 100%;
height: 100%;
.el-table { .el-table {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -836,15 +836,55 @@ export function generateDirectSubtreeAndRemove(targetIds, tree, idKey = "id") { ...@@ -836,15 +836,55 @@ export function generateDirectSubtreeAndRemove(targetIds, tree, idKey = "id") {
return result ? JSON.parse(JSON.stringify({ ...result, children: result.children[0]?.children || [] })) : null; return result ? JSON.parse(JSON.stringify({ ...result, children: result.children[0]?.children || [] })) : null;
} }
// 甲方详情左侧菜单映射 // 甲方详情左侧菜单映射 key 服务器返回字段 value 菜单 pathName
export const detailSideBar = new Map([ export const detailSideBar = new Map([
// 企业速览 // 企业概要 股东信息
["holderinfo", "ownershipStructure"], ["ownershipStructure", "holderinfo"],
// 高管信息 // 企业概要 高管信息
["execuinfo", "leadingMember"], ["leadingMember", "execuinfo"],
// 对外投资 // 企业概要 对外投资
["overseas", "outboundInvestment"], ["outboundInvestment", "overseas"],
// 分支机构 // 企业概要 分支机构
["branch", "branch"], ["branch", "branch"],
// 项目商机 重点项目
["importantBusiness", "majorProject"],
// 项目商机 土地交易 城投分析 城投拿地
["landInfo", ["landtransaction", "landAcquisition"]],
// 拟建项目
["busProposedProjectV1", "proposed"],
// 专项债项目
["specialDebt", "bond"],
// 招标计划
["bidPlan", "biddingplan"],
// 招标公告
["biddingAnnouncement", "announcement"],
// 标讯Pro
["proBiddingAnnouncement", "tencent"],
// 行政许可
["adminLicensing", "administrative"],
// 业务往来 客户
["customerV1", "custom"],
// 业务往来 供应商
["supplierV1", "supplier"],
// 业务往来 招标代理
["coopBiddingAgency", "bidagency"],
// 业务往来 历史发包
["historySend", "hiscontract"],
// 开标记录
["tenderRecordV1", "bidrecords"],
// 风险信息 行政处罚
["adminSanction", "punish"],
// 风险信息 经营异常
["abnormalOperation", "businessAnomaly"],
// 风险信息 被执行人
["dishonestExecutee", "ifThePerson"],
// 风险信息 失信被执行人
["dishonestExecutor", "dishonesty"],
// 风险信息 裁判文书
["adjudicativeDoc", "judgment"],
// 风险信息 法院公告
["courtAnnouncement", "courtNotice"],
// 风险信息 开庭公告
["openAnnouncement", "openacourtsessionNotice"]
]) ])
...@@ -96,21 +96,21 @@ export default { ...@@ -96,21 +96,21 @@ export default {
// 列表表头 // 列表表头
formColum: [ formColum: [
{ label: '序号', prop: "staticSerialNumber", type: "index", lock: true, fixed: false, uid: v4() }, { label: '序号', prop: "staticSerialNumber", type: "index", lock: true, fixed: false, uid: v4() },
{ label: '咨询机构名称', prop: 'advisoryBodyName', width: "198px", lock: true, fixed: false, slot: true, uid: v4(), showOverflowTooltip: true }, { label: '项目列表', prop: 'projectName', width: "222px", lock: true, fixed: false, slot: true, uid: v4(), showOverflowTooltip: true },
{ label: '最近一次合作时间', prop: 'lastCooperateTime', width: "201px", uid: v4() }, { label: '合同编码', prop: 'projectCode', width: "123px", uid: v4() },
{ label: '经营状态', prop: 'businessStatus', width: "74px", uid: v4() }, { label: '省市', prop: 'provinceName', width: "102px", uid: v4() },
{ label: '法定代表人', prop: 'corporatePerson', width: "86px", uid: v4() }, { label: '项目承接类型', prop: 'isinvestproject', width: "102px", uid: v4() },
{ label: '注册资本', prop: 'regCapital', width: "107px", uid: v4() }, { label: '工程基础大类', prop: 'projectType1', width: "98px", uid: v4() },
{ label: '注册地区', prop: 'regArea', width: "149px", uid: v4() }, { label: '工程类别明细', prop: 'projectType', width: "98px", uid: v4() },
{ label: '成立日期', prop: 'registeredDate', width: "97px", uid: v4() }, { label: '项目负责人姓名', prop: 'projectLeader', width: "110px", uid: v4() },
{ label: '经营范围', prop: 'businessScope', width: "417px", uid: v4() }, { label: '项目负责人专业', prop: 'projectLeaderMajor', width: "110px", uid: v4() },
{ label: '合作项目数量', prop: 'cooperateProjectCount', width: "98px", uid: v4(), slot: true }, { label: '项目负责人联系电话', prop: 'projectLeaderPhone', width: "134px", uid: v4() },
], ],
queryParams: { queryParams: {
pageSize: 20, pageSize: 20,
pageNum: 1, pageNum: 1,
// 咨询机构ID // 咨询机构ID
advisoryBodyId: "", advisoryBodyCid: "",
}, },
tableDataList: [], tableDataList: [],
total: 0, total: 0,
...@@ -164,8 +164,8 @@ export default { ...@@ -164,8 +164,8 @@ export default {
methods: { methods: {
async init() { async init() {
try { try {
// if (!this.$routes?.params?.advisoryBodyId) return this.$message.error("缺少咨询机构Id"); if (!this.$routes?.params?.advisoryBodyCid) return this.$message.error("缺少咨询机构Id");
// this.queryParams.advisoryBodyId = !this.$routes?.params?.advisoryBodyId; this.queryParams.advisoryBodyCid = !this.$routes?.params?.advisoryBodyCid;
await this.getList(this.queryParams); await this.getList(this.queryParams);
} catch (error) { } catch (error) {
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
</template> </template>
<!-- 合作项目数量 --> <!-- 合作项目数量 -->
<template slot="cooperateProjectCount" slot-scope="{data,row}"> <template slot="cooperateProjectCount" slot-scope="{data,row}">
<div v-if="row.cooperateProjectCount" class="no-line-feed ">{{row.cooperateProjectCount}}</div> <div v-if="row.cooperateProjectCount" class="no-line-feed" @click="toCooperateDetail(row)">{{row.cooperateProjectCount}}
</div>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</table-list-com> </table-list-com>
...@@ -125,6 +126,10 @@ export default { ...@@ -125,6 +126,10 @@ export default {
} }
}, },
toCooperateDetail(row) {
if (!row.advisoryBodyCid) return this.$message.warning("缺少咨询机构id");
this.$tab.openPage(`${row.advisoryBodyName}合作明细`, `/consultingOrgManagement/detailsOfCooperation/${row.advisoryBodyCid}`);
},
// 创建最终查询条件 // 创建最终查询条件
mergeCondition() { mergeCondition() {
const _queryParams = JSON.parse(JSON.stringify(this.queryParams)); const _queryParams = JSON.parse(JSON.stringify(this.queryParams));
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<script> <script>
import { financial } from '@/api/detail/party-a/financial'; import { financial } from '@/api/detail/party-a/financial';
import { detailSideBar } from "@/utils";
export default { export default {
name: 'Sidebar', name: 'Sidebar',
props: { props: {
...@@ -60,23 +61,23 @@ export default { ...@@ -60,23 +61,23 @@ export default {
title: '企业概要', pathName: '', children: [ title: '企业概要', pathName: '', children: [
{ title: '企业速览', pathName: 'overview' }, { title: '企业速览', pathName: 'overview' },
{ title: '工商信息', pathName: 'businfo' }, { title: '工商信息', pathName: 'businfo' },
{ title: '股东信息', pathName: 'holderinfo'}, { title: '股东信息', pathName: 'holderinfo' },
{ title: '高管信息', pathName: 'execuinfo'}, { title: '高管信息', pathName: 'execuinfo' },
{ title: '对外投资', pathName: 'overseas'}, { title: '对外投资', pathName: 'overseas' },
{ title: '分支机构', pathName: 'branch'} { title: '分支机构', pathName: 'branch' }
] ]
}, },
{ title: '财务简析', pathName: 'financial' }, { title: '财务简析', pathName: 'financial' },
{ {
title: '项目商机', pathName: '', children: [ title: '项目商机', pathName: '', children: [
{ title: '重点项目', pathName: 'majorProject' }, { title: '重点项目', pathName: 'majorProject' },
{ title: '土地交易', pathName: 'landtransaction'}, { title: '土地交易', pathName: 'landtransaction' },
{ title: '拟建项目', pathName: 'proposed' }, { title: '拟建项目', pathName: 'proposed' },
{ title: '专项债项目', pathName: 'bond'}, { title: '专项债项目', pathName: 'bond' },
{ title: '招标计划', pathName: 'biddingplan'}, { title: '招标计划', pathName: 'biddingplan' },
{ title: '招标公告', pathName: 'announcement'}, { title: '招标公告', pathName: 'announcement' },
{ title: '标讯Pro', pathName: 'tencent'}, { title: '标讯Pro', pathName: 'tencent' },
{ title: '行政许可', pathName: 'administrative'} { title: '行政许可', pathName: 'administrative' }
] ]
}, },
{ {
...@@ -192,15 +193,6 @@ export default { ...@@ -192,15 +193,6 @@ export default {
}; };
}, },
computed: { computed: {
sideHeight() {
let sideHeight = document.getElementById("detailPart") ? document.getElementById("detailPart").offsetHeight : null, bowerHeight = document.body.clientHeight - 170 || null;
if (this.partBoxHeight < bowerHeight) {
sideHeight = bowerHeight;
} else {
sideHeight = '1222';/*this.partBoxHeight*/
}
return sideHeight;
},
routeIndex() { routeIndex() {
let idx = this.getRouteIdx('', this.pathName) || '0-0'; let idx = this.getRouteIdx('', this.pathName) || '0-0';
return idx; return idx;
...@@ -212,153 +204,61 @@ export default { ...@@ -212,153 +204,61 @@ export default {
watch: { watch: {
statisticObj: { statisticObj: {
handler(val) { handler(val) {
this.sideRoute = JSON.parse(JSON.stringify(this.defaultRoute)); this.createSideBarWithServerData(val);
let arr = JSON.parse(JSON.stringify(val));
for (var i in arr) {
for (var j in arr[i]) {
switch (j) {
case 'ownershipStructure':
if (arr[i][j] < 1) {
this.sideRoute[0].children[2].disabled = true;
}
break;
case 'leadingMember':
if (arr[i][j] < 1) {
this.sideRoute[0].children[3].disabled = true;
}
break;
case 'outboundInvestment':
if (arr[i][j] < 1) {
this.sideRoute[0].children[4].disabled = true;
}
break;
case 'branch':
if (arr[i][j] < 1) {
this.sideRoute[0].children[5].disabled = true;
}
break;
case 'importantBusiness':
if (arr[i][j] < 1) {
this.sideRoute[2].children[0].disabled = true;
} }
break; },
case 'landInfo': },
if (arr[i][j] < 1) { methods: {
this.sideRoute[2].children[1].disabled = true; financial(id) {
this.sideRoute[4].children[1].disabled = true; financial({ cid: String(id) }).then(res => {
} if ((res.code == 200 && !res.data) || !res.data?.totalAssets) {
break; this.sideRoute[1].disabled = true;
case 'busProposedProjectV1': this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute));
if (arr[i][j] < 1) {
this.sideRoute[2].children[2].disabled = true;
}
break;
case 'specialDebt':
if (arr[i][j] < 1) {
this.sideRoute[2].children[3].disabled = true;
}
break;
case 'bidPlan':
if (arr[i][j] < 1) {
this.sideRoute[2].children[4].disabled = true;
}
break;
case 'biddingAnnouncement':
if (arr[i][j] < 1) {
this.sideRoute[2].children[5].disabled = true;
}
break;
case 'proBiddingAnnouncement':
if (arr[i][j] < 1) {
this.sideRoute[2].children[6].disabled = true;
}
break;
case 'adminLicensing':
if (arr[i][j] < 1) {
this.sideRoute[2].children[7].disabled = true;
}
break;
case 'customerV1':
if (arr[i][j] < 1) {
this.sideRoute[3].children[0].disabled = true;
} }
break; });
},
createSideBarWithServerData(value) {
this.sideRoute = JSON.parse(JSON.stringify(this.defaultRoute));
const _sideBarData = JSON.parse(JSON.stringify(value));
case 'supplierV1': // {basic,behavior,business,combineMember,credit,evaluation,global,performance,personnel,qualification}
if (arr[i][j] < 1) { /**
this.sideRoute[3].children[1].disabled = true; * @type {Map<string,string>}
} */
break; const _tempMap = detailSideBar;
case 'coopBiddingAgency':
if (arr[i][j] < 1) {
this.sideRoute[3].children[2].disabled = true;
}
break;
case 'historySend': _tempMap.forEach((value, key, mapOrigin) => {
if (arr[i][j] < 1) { // 找到对应的数据源
this.sideRoute[3].children[3].disabled = true; const data = this.findDataOrigin(this.statisticObj, key);
} const sideBarOption = this.findSideBarOptions(this.sideRoute, value);
break; // 禁用菜单
if (data < 1) {
case 'tenderRecordV1':
if (arr[i][j] < 1) {
this.sideRoute[3].children[4].disabled = true;
} }
break; });
case 'adminSanction':
if (arr[i][j] < 1) {
this.sideRoute[5].children[0].disabled = true;
}
break;
case 'abnormalOperation':
if (arr[i][j] < 1) {
this.sideRoute[5].children[1].disabled = true;
}
break;
case 'dishonestExecutee':
if (arr[i][j] < 1) {
this.sideRoute[5].children[2].disabled = true;
}
break;
case 'dishonestExecutor':
if (arr[i][j] < 1) {
this.sideRoute[5].children[3].disabled = true;
}
break;
case 'adjudicativeDoc':
if (arr[i][j] < 1) {
this.sideRoute[5].children[4].disabled = true;
}
break;
case 'courtAnnouncement':
if (arr[i][j] < 1) {
this.sideRoute[5].children[5].disabled = true;
}
break;
case 'openAnnouncement':
if (arr[i][j] < 1) {
this.sideRoute[5].children[6].disabled = true;
}
break;
default: this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute));
break; },
findDataOrigin(originData, key) {
if (originData && Object.keys(originData).length) {
for (const dataKey in originData) {
if (originData.hasOwnProperty(dataKey)) {
if (dataKey == key) {
return originData[dataKey];
} }
// 是对象 递归处理
if (Object.prototype.toString.call(originData[dataKey]) == "[object Object]") {
const result = this.findDataOrigin(originData[dataKey], key);
if (result || result == "0") return result;
} }
} }
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute));
} }
},
},
methods: {
financial(id) {
financial({ cid: String(id) }).then(res => {
if ((res.code == 200 && !res.data) || !res.data?.totalAssets) {
this.sideRoute[1].disabled = true;
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute));
} }
}); },
// 找菜单对象
findSideBarOption(sideBarData, key) {
}, },
handleOpen(key, keyPath) { handleOpen(key, keyPath) {
......
...@@ -166,7 +166,18 @@ export default { ...@@ -166,7 +166,18 @@ export default {
currentPath: { currentPath: {
pathName: 'overview' //默认展示页 pathName: 'overview' //默认展示页
}, },
statisticObj: {}, statisticObj: {
basic: {},
behavior: {},
business: {},
combineMember: {},
credit: {},
evaluation: {},
global: {},
performance: {},
personnel: {},
qualification: {}
},
partBoxHeight: null, partBoxHeight: null,
cooDetail: false cooDetail: false
}; };
...@@ -260,7 +271,7 @@ export default { ...@@ -260,7 +271,7 @@ export default {
async getStatistic() { async getStatistic() {
let res = await statistic({ companyId: this.companyId }); let res = await statistic({ companyId: this.companyId });
if (res.code == 200) { if (res.code == 200) {
this.statisticObj = res.data; this.statisticObj = { ...this.statisticObj, ...res.data };
} }
}, },
async handleQuery() { async handleQuery() {
......
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