Commit f91cdfe9 authored by Administrator's avatar Administrator

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

parents a16d3cd1 77e284af
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<router-link :to="`/biddetail/${scope.row.sourceId}`" tag="a" class="a-link" v-if="scope.row.sourceId" v-html="scope.row.projectName"></router-link> <router-link :to="`/biddetail/${scope.row.sourceId}`" tag="a" class="a-link" v-if="scope.row.sourceId" v-html="scope.row.projectName"></router-link>
<div v-else v-html="scope.row.projectName || '--'"></div> <div v-else v-html="scope.row.projectName || '--'"></div>
</template> </template>
<template> <template v-else>
<span @click="linkTo1(scope.row.sourceId)" v-if="scope.row.projectName" style="color: #0081FF;cursor: pointer;" v-html="scope.row.projectName">{{scope.row.projectName}}</span> <span @click="linkTo1(scope.row.sourceId)" v-if="scope.row.projectName" style="color: #0081FF;cursor: pointer;" v-html="scope.row.projectName">{{scope.row.projectName}}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<router-link :to="`/biddetail/${scope.row.sourceId}`" tag="a" class="a-link" v-if="scope.row.sourceId" v-html="scope.row.projectName"></router-link> <router-link :to="`/biddetail/${scope.row.sourceId}`" tag="a" class="a-link" v-if="scope.row.sourceId" v-html="scope.row.projectName"></router-link>
<div v-else v-html="scope.row.projectName || '--'"></div> <div v-else v-html="scope.row.projectName || '--'"></div>
</template> </template>
<template> <template v-else>
<span @click="linkTo1(scope.row.sourceId)" v-if="scope.row.projectName" style="color: #0081FF;cursor: pointer;" v-html="scope.row.projectName">{{scope.row.projectName}}</span> <span @click="linkTo1(scope.row.sourceId)" v-if="scope.row.projectName" style="color: #0081FF;cursor: pointer;" v-html="scope.row.projectName">{{scope.row.projectName}}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
......
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
}, },
// 跳转项目详情 // 跳转项目详情
viewProjectDetail(row) { viewProjectDetail(row) {
this.$tab.openPage(row.projectName, `/consultingOrgManagement/projectDetail?advisoryBodyCid=${row.advisoryBody?.advisoryBodyCid ? row.advisoryBody?.advisoryBodyCid : ""}&projectKey=${row.projectKey}`);
}, },
viewEnterprise(row) { viewEnterprise(row) {
......
...@@ -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" @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>
...@@ -17,14 +17,16 @@ ...@@ -17,14 +17,16 @@
</project-side-menu> </project-side-menu>
</div> </div>
</div> </div>
<div class="right-table"> <div class="right-table" ref="rightTable">
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<div class="table-item"> <div class="table-item">
<el-table <el-table
v-if="!isSkeleton"
element-loading-text="Loading" element-loading-text="Loading"
:maxHeight="maxHeight"
:data="tableData" :data="tableData"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
row-key="id" row-key="id"
v-horizontal-scroll="'hover'"
default-expand-all default-expand-all
:tree-props="{children: 'childrenList', hasChildren: 'hasChildren'}" :tree-props="{children: 'childrenList', hasChildren: 'hasChildren'}"
border border
...@@ -60,7 +62,6 @@ ...@@ -60,7 +62,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -101,6 +102,7 @@ ...@@ -101,6 +102,7 @@
<script> <script>
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'
export default { export default {
name: "directCost", name: "directCost",
props: { props: {
...@@ -116,10 +118,11 @@ export default { ...@@ -116,10 +118,11 @@ export default {
default: () => ({}) default: () => ({})
} }
}, },
components: {ProjectSideMenu}, components: {ProjectSideMenu,skeleton},
data() { data() {
return { return {
date:'2023年11月', date:'2023年11月',
isSkeleton: true,
datelist:[ datelist:[
{ {
dictValue:'2023年11月', dictValue:'2023年11月',
...@@ -162,7 +165,8 @@ export default { ...@@ -162,7 +165,8 @@ export default {
children : "childrenList" children : "childrenList"
}, },
detailsId:'', detailsId:'',
menuId:'' menuId:'',
maxHeight:''
}; };
}, },
watch: { watch: {
...@@ -184,7 +188,6 @@ export default { ...@@ -184,7 +188,6 @@ export default {
immediate: true immediate: true
} }
}, },
//可访问data属性
created() { created() {
}, },
...@@ -217,7 +220,6 @@ export default { ...@@ -217,7 +220,6 @@ export default {
}, },
async getCbDirectExpenseList(params) { async getCbDirectExpenseList(params) {
try { try {
const result = await getCbDirectExpenseList(params); const result = await getCbDirectExpenseList(params);
if (result.code == 200) { if (result.code == 200) {
const _dataArray = result.data; const _dataArray = result.data;
...@@ -226,6 +228,8 @@ export default { ...@@ -226,6 +228,8 @@ export default {
this.tableData.forEach((item,index)=>{ this.tableData.forEach((item,index)=>{
item.index=index+1 item.index=index+1
}) })
this.maxHeightInit();
this.isSkeleton = false;
} }
} catch (error) { } catch (error) {
...@@ -295,6 +299,11 @@ export default { ...@@ -295,6 +299,11 @@ export default {
} }
} }
}, },
async maxHeightInit() {
const divHeight = this.$refs.rightTable.clientHeight-32;
this.maxHeight=divHeight;
console.log('DIV的高度是:', divHeight);
}
}, },
} }
</script> </script>
...@@ -352,6 +361,35 @@ export default { ...@@ -352,6 +361,35 @@ export default {
.color2{ .color2{
background: #FFFFFF; background: #FFFFFF;
} }
.el-table__fixed-right {
z-index: 9;
right: 16px !important;
bottom: 15px !important;
.el-table__fixed-header-wrapper {
position: absolute;
}
}
.el-table__fixed-right-patch {
width: 16px !important;
z-index: 9;
top: 0px;
background: #f0f3fa;
border: 1px solid #e6eaf1;
border-left: unset;
border-top: unset;
}
// 自动适配下 减去滚动条高度
.el-table__fixed {
height: calc(100% - 15px) !important;
}
.el-table__fixed-right {
height: calc(100% - 15px) !important;
}
.el-table__fixed-body-wrapper {
.el-table__body {
padding-bottom: 10px!important;
}
}
} }
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="otherProjects-cont"> <div class="otherProjects-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" @select="select"> <project-side-menu :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" v-model="defaultActive" @select="select">
<template slot="其他费-1"> <template slot="其他费-1">
<img src="@/assets/images/projectCostLedger/icon_cost_detail_5.svg" alt=""> <img src="@/assets/images/projectCostLedger/icon_cost_detail_5.svg" alt="">
<div class="project-sub-menu-title-text">其他费</div> <div class="project-sub-menu-title-text">其他费</div>
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
</div> </div>
</div> </div>
<div class="right-table"> <div class="right-table">
<div class="table-item" v-if="defaultActive ==='费用汇总'"> <skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<div class="table-item" v-if="defaultActiveTitle ==='费用汇总'">
<tables <tables
v-if="!isSkeleton" v-if="!isSkeleton"
:tableLoading="tableLoading" :tableLoading="tableLoading"
...@@ -62,10 +63,11 @@ ...@@ -62,10 +63,11 @@
import Tables from "../../../../component/Tables" import Tables from "../../../../component/Tables"
import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu"; import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu";
import { getProjectOtherMenuTreeApi,getProjectOtherStatistics,getProjectOtherList } from "@/api/projectCostLedger"; import { getProjectOtherMenuTreeApi,getProjectOtherStatistics,getProjectOtherList } from "@/api/projectCostLedger";
import skeleton from '../../../../component/skeleton'
export default { export default {
name: "directCost", name: "directCost",
components: { components: {
Tables,ProjectSideMenu Tables,ProjectSideMenu,skeleton
}, },
props: { props: {
// 项目ID // 项目ID
...@@ -83,8 +85,9 @@ export default { ...@@ -83,8 +85,9 @@ export default {
data() { data() {
return { return {
comProjectId:'', comProjectId:'',
isSkeleton:false, // 加载数据列表
tableLoading:false, isSkeleton: true,
tableLoading: false,
tableData:[], tableData:[],
tableDataTotal:0, tableDataTotal:0,
forData: [ forData: [
...@@ -109,6 +112,7 @@ export default { ...@@ -109,6 +112,7 @@ export default {
pageNum:1, pageNum:1,
pageSize:10, pageSize:10,
}, },
defaultActiveTitle: "费用汇总",
defaultActive: "", defaultActive: "",
menuTreeList: [ menuTreeList: [
{ {
...@@ -145,11 +149,7 @@ export default { ...@@ -145,11 +149,7 @@ export default {
immediate: true immediate: true
} }
}, },
//可访问data属性
created() {
},
//计算集 //计算集
computed: { computed: {
...@@ -177,6 +177,7 @@ export default { ...@@ -177,6 +177,7 @@ export default {
const _dataArray = result.data; const _dataArray = result.data;
this.tableDataTotal=_dataArray.length; this.tableDataTotal=_dataArray.length;
this.tableData = _dataArray; this.tableData = _dataArray;
this.isSkeleton = false;
} }
} catch (error) { } catch (error) {
...@@ -184,14 +185,19 @@ export default { ...@@ -184,14 +185,19 @@ export default {
}, },
select(menuPath, menuPathArray){ select(menuPath, menuPathArray){
this.defaultActive=menuPath; this.defaultActive=menuPath;
this.defaultActiveTitle=menuPathArray.nodeName;
let param = { let param = {
projectId:this.comProjectDetailInfo.projectId, projectId:this.comProjectDetailInfo.projectId,
parentId:menuPathArray.originData.id parentId:menuPathArray.originData.id
} }
getProjectOtherList(param).then(res=>{ if(menuPathArray.nodeName === '费用汇总'){
this.tableData1 = res.data; this.getProjectOtherStatistics(this.comProjectDetailInfo.projectId)
this.tableDataTotal1=res.data.length; }else {
}) getProjectOtherList(param).then(res=>{
this.tableData1 = res.data;
this.tableDataTotal1=res.data.length;
})
}
}, },
//分页 //分页
handleCurrentChange(e){ handleCurrentChange(e){
......
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