Commit 2cacf913 authored by huangjie's avatar huangjie

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents 74bf58e2 a87885bf
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<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" :default-active="defaultActive"> <project-side-menu :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" :default-active="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>
...@@ -162,13 +162,14 @@ export default { ...@@ -162,13 +162,14 @@ export default {
children : "childrenList" children : "childrenList"
}, },
detailsId:'', detailsId:'',
menuId:''
}; };
}, },
watch: { watch: {
projectDetailInfo: { projectDetailInfo: {
handler(newValue) { handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {}; this.comProjectDetailInfo = newValue ? newValue : {};
this.getCbDirectExpenseList('1763446872284012544') this.getCbDirectExpenseMenuTreeApi(this.comProjectDetailInfo.projectId)
// this.getProjectOtherStatistics(this.comProjectDetailInfo.projectId) // this.getProjectOtherStatistics(this.comProjectDetailInfo.projectId)
// this.getProjectOtherStatistics('1762014527685136385') // this.getProjectOtherStatistics('1762014527685136385')
// this.init(this.comProjectDetailInfo); // this.init(this.comProjectDetailInfo);
...@@ -185,7 +186,7 @@ export default { ...@@ -185,7 +186,7 @@ export default {
}, },
//可访问data属性 //可访问data属性
created() { created() {
this.getCbDirectExpenseMenuTreeApi('1760222923030876161')
}, },
mounted() { mounted() {
...@@ -204,10 +205,11 @@ export default { ...@@ -204,10 +205,11 @@ export default {
this.menuDetails=_tempArray this.menuDetails=_tempArray
this.menuTreeList.push(_tempArray); this.menuTreeList.push(_tempArray);
const defaultCurrent = this.findMenuNode(this.menuTreeList, "土石方部分"); const defaultCurrent = this.findMenuNode(this.menuTreeList, "土石方部分");
console.log(defaultCurrent)
if (defaultCurrent) { if (defaultCurrent) {
this.defaultActive = defaultCurrent.menuName; this.defaultActive = defaultCurrent.menuName;
this.menuId = defaultCurrent.menuId;
} }
this.getCbDirectExpenseList(defaultCurrent.menuId)
} }
} catch (error) { } catch (error) {
...@@ -229,6 +231,11 @@ export default { ...@@ -229,6 +231,11 @@ export default {
} }
}, },
handleSelect(menuPath, menuPathArray){
this.defaultActive=menuPath;
this.menuId=menuPathArray.originData.menuId
this.getCbDirectExpenseList(menuPathArray.originData.menuId)
},
tableRowClassName({row, rowIndex}) { tableRowClassName({row, rowIndex}) {
if (row.expenseCategoryTag === '清') { if (row.expenseCategoryTag === '清') {
return 'color1'; return 'color1';
...@@ -248,7 +255,7 @@ export default { ...@@ -248,7 +255,7 @@ export default {
cbDirectExpenseAdd(JSON.stringify(this.ruleForm)).then(res=>{ cbDirectExpenseAdd(JSON.stringify(this.ruleForm)).then(res=>{
if(res.code == 200){ if(res.code == 200){
this.dialogVisible = false this.dialogVisible = false
this.getCbDirectExpenseList('1763446872284012544') this.getCbDirectExpenseList(this.menuId)
} }
}) })
}, },
...@@ -264,7 +271,7 @@ export default { ...@@ -264,7 +271,7 @@ export default {
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
}); });
this.getCbDirectExpenseList() this.getCbDirectExpenseList(this.menuId)
} }
}) })
}).catch(() => { }).catch(() => {
......
...@@ -209,8 +209,8 @@ export default { ...@@ -209,8 +209,8 @@ export default {
projectDetailInfo: { projectDetailInfo: {
handler(newValue) { handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {}; this.comProjectDetailInfo = newValue ? newValue : {};
// this.getCbProjectInfo(this.comProjectDetailInfo.projectId) this.getCbProjectInfo(this.comProjectDetailInfo.projectId)
this.getCbProjectInfo('1759507630130479106') // this.getCbProjectInfo('1759507630130479106')
// this.init(this.comProjectDetailInfo); // this.init(this.comProjectDetailInfo);
}, },
deep: true, deep: true,
......
...@@ -226,7 +226,7 @@ export default { ...@@ -226,7 +226,7 @@ export default {
projectDetailInfo: { projectDetailInfo: {
handler(newValue) { handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {}; this.comProjectDetailInfo = newValue ? newValue : {};
this.getProjectOtherStatistics(this.comProjectDetailInfo.projectId) this.getProjectOtherMenuTreeApi(this.comProjectDetailInfo.projectId)
// this.getProjectOtherStatistics('1762014527685136385') // this.getProjectOtherStatistics('1762014527685136385')
// this.init(this.comProjectDetailInfo); // this.init(this.comProjectDetailInfo);
}, },
...@@ -242,7 +242,7 @@ export default { ...@@ -242,7 +242,7 @@ export default {
}, },
//可访问data属性 //可访问data属性
created() { created() {
this.getProjectOtherMenuTreeApi('1762014527685136385')
}, },
//计算集 //计算集
...@@ -268,9 +268,9 @@ export default { ...@@ -268,9 +268,9 @@ export default {
const result = await getProjectOtherMenuTreeApi(params); const result = await getProjectOtherMenuTreeApi(params);
if (result.code == 200) { if (result.code == 200) {
const _tempArray = result.data; const _tempArray = result.data;
_tempArray.unshift({id:"11",itemContent:"费用汇总"}); _tempArray.unshift({id:"11",itemContent:"费用汇总"});
this.menuTreeList[0].children = _tempArray; this.menuTreeList[0].children = _tempArray;
this.getProjectOtherStatistics(this.comProjectDetailInfo.projectId)
} }
} catch (error) { } catch (error) {
......
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