Commit cf8d5b0e authored by tianhongyang's avatar tianhongyang

企业详情左侧菜单map 映射

parent 0f6b84d0
......@@ -311,7 +311,6 @@ li {
.table-item {
width: 100%;
height: 100%;
.el-table {
width: 100%;
height: 100%;
......
......@@ -836,15 +836,55 @@ export function generateDirectSubtreeAndRemove(targetIds, tree, idKey = "id") {
return result ? JSON.parse(JSON.stringify({ ...result, children: result.children[0]?.children || [] })) : null;
}
// 甲方详情左侧菜单映射
// 甲方详情左侧菜单映射 key 服务器返回字段 value 菜单 pathName
export const detailSideBar = new Map([
// 企业速览
["holderinfo", "ownershipStructure"],
// 高管信息
["execuinfo", "leadingMember"],
// 对外投资
["overseas", "outboundInvestment"],
// 分支机构
// 企业概要 股东信息
["ownershipStructure", "holderinfo"],
// 企业概要 高管信息
["leadingMember", "execuinfo"],
// 企业概要 对外投资
["outboundInvestment", "overseas"],
// 企业概要 分支机构
["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 {
// 列表表头
formColum: [
{ 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: 'lastCooperateTime', width: "201px", uid: v4() },
{ label: '经营状态', prop: 'businessStatus', width: "74px", uid: v4() },
{ label: '法定代表人', prop: 'corporatePerson', width: "86px", uid: v4() },
{ label: '注册资本', prop: 'regCapital', width: "107px", uid: v4() },
{ label: '注册地区', prop: 'regArea', width: "149px", uid: v4() },
{ label: '成立日期', prop: 'registeredDate', width: "97px", uid: v4() },
{ label: '经营范围', prop: 'businessScope', width: "417px", uid: v4() },
{ label: '合作项目数量', prop: 'cooperateProjectCount', width: "98px", uid: v4(), slot: true },
{ label: '项目列表', prop: 'projectName', width: "222px", lock: true, fixed: false, slot: true, uid: v4(), showOverflowTooltip: true },
{ label: '合同编码', prop: 'projectCode', width: "123px", uid: v4() },
{ label: '省市', prop: 'provinceName', width: "102px", uid: v4() },
{ label: '项目承接类型', prop: 'isinvestproject', width: "102px", uid: v4() },
{ label: '工程基础大类', prop: 'projectType1', width: "98px", uid: v4() },
{ label: '工程类别明细', prop: 'projectType', width: "98px", uid: v4() },
{ label: '项目负责人姓名', prop: 'projectLeader', width: "110px", uid: v4() },
{ label: '项目负责人专业', prop: 'projectLeaderMajor', width: "110px", uid: v4() },
{ label: '项目负责人联系电话', prop: 'projectLeaderPhone', width: "134px", uid: v4() },
],
queryParams: {
pageSize: 20,
pageNum: 1,
// 咨询机构ID
advisoryBodyId: "",
advisoryBodyCid: "",
},
tableDataList: [],
total: 0,
......@@ -164,8 +164,8 @@ export default {
methods: {
async init() {
try {
// if (!this.$routes?.params?.advisoryBodyId) return this.$message.error("缺少咨询机构Id");
// this.queryParams.advisoryBodyId = !this.$routes?.params?.advisoryBodyId;
if (!this.$routes?.params?.advisoryBodyCid) return this.$message.error("缺少咨询机构Id");
this.queryParams.advisoryBodyCid = !this.$routes?.params?.advisoryBodyCid;
await this.getList(this.queryParams);
} catch (error) {
......
......@@ -44,7 +44,8 @@
</template>
<!-- 合作项目数量 -->
<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>
</template>
</table-list-com>
......@@ -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() {
const _queryParams = JSON.parse(JSON.stringify(this.queryParams));
......
......@@ -24,6 +24,7 @@
<script>
import { financial } from '@/api/detail/party-a/financial';
import { detailSideBar } from "@/utils";
export default {
name: 'Sidebar',
props: {
......@@ -60,23 +61,23 @@ export default {
title: '企业概要', pathName: '', children: [
{ title: '企业速览', pathName: 'overview' },
{ title: '工商信息', pathName: 'businfo' },
{ title: '股东信息', pathName: 'holderinfo'},
{ title: '高管信息', pathName: 'execuinfo'},
{ title: '对外投资', pathName: 'overseas'},
{ title: '分支机构', pathName: 'branch'}
{ title: '股东信息', pathName: 'holderinfo' },
{ title: '高管信息', pathName: 'execuinfo' },
{ title: '对外投资', pathName: 'overseas' },
{ title: '分支机构', pathName: 'branch' }
]
},
{ title: '财务简析', pathName: 'financial' },
{
title: '项目商机', pathName: '', children: [
{ title: '重点项目', pathName: 'majorProject' },
{ title: '土地交易', pathName: 'landtransaction'},
{ title: '土地交易', pathName: 'landtransaction' },
{ title: '拟建项目', pathName: 'proposed' },
{ title: '专项债项目', pathName: 'bond'},
{ title: '招标计划', pathName: 'biddingplan'},
{ title: '招标公告', pathName: 'announcement'},
{ title: '标讯Pro', pathName: 'tencent'},
{ title: '行政许可', pathName: 'administrative'}
{ title: '专项债项目', pathName: 'bond' },
{ title: '招标计划', pathName: 'biddingplan' },
{ title: '招标公告', pathName: 'announcement' },
{ title: '标讯Pro', pathName: 'tencent' },
{ title: '行政许可', pathName: 'administrative' }
]
},
{
......@@ -192,15 +193,6 @@ export default {
};
},
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() {
let idx = this.getRouteIdx('', this.pathName) || '0-0';
return idx;
......@@ -212,142 +204,7 @@ export default {
watch: {
statisticObj: {
handler(val) {
this.sideRoute = JSON.parse(JSON.stringify(this.defaultRoute));
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) {
this.sideRoute[2].children[1].disabled = true;
this.sideRoute[4].children[1].disabled = true;
}
break;
case 'busProposedProjectV1':
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;
case 'supplierV1':
if (arr[i][j] < 1) {
this.sideRoute[3].children[1].disabled = true;
}
break;
case 'coopBiddingAgency':
if (arr[i][j] < 1) {
this.sideRoute[3].children[2].disabled = true;
}
break;
case 'historySend':
if (arr[i][j] < 1) {
this.sideRoute[3].children[3].disabled = true;
}
break;
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:
break;
}
}
}
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute));
this.createSideBarWithServerData(val);
}
},
},
......@@ -359,6 +216,49 @@ export default {
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute));
}
});
},
createSideBarWithServerData(value) {
this.sideRoute = JSON.parse(JSON.stringify(this.defaultRoute));
const _sideBarData = JSON.parse(JSON.stringify(value));
// {basic,behavior,business,combineMember,credit,evaluation,global,performance,personnel,qualification}
/**
* @type {Map<string,string>}
*/
const _tempMap = detailSideBar;
_tempMap.forEach((value, key, mapOrigin) => {
// 找到对应的数据源
const data = this.findDataOrigin(this.statisticObj, key);
const sideBarOption = this.findSideBarOptions(this.sideRoute, value);
// 禁用菜单
if (data < 1) {
}
});
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute));
},
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;
}
}
}
}
},
// 找菜单对象
findSideBarOption(sideBarData, key) {
},
handleOpen(key, keyPath) {
......
......@@ -166,7 +166,18 @@ export default {
currentPath: {
pathName: 'overview' //默认展示页
},
statisticObj: {},
statisticObj: {
basic: {},
behavior: {},
business: {},
combineMember: {},
credit: {},
evaluation: {},
global: {},
performance: {},
personnel: {},
qualification: {}
},
partBoxHeight: null,
cooDetail: false
};
......@@ -260,7 +271,7 @@ export default {
async getStatistic() {
let res = await statistic({ companyId: this.companyId });
if (res.code == 200) {
this.statisticObj = res.data;
this.statisticObj = { ...this.statisticObj, ...res.data };
}
},
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