|
@@ -70,6 +70,10 @@
|
|
<el-radio-button label="1">项目名称</el-radio-button>
|
|
<el-radio-button label="1">项目名称</el-radio-button>
|
|
<el-radio-button label="2">项目编号</el-radio-button>
|
|
<el-radio-button label="2">项目编号</el-radio-button>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
|
+ <el-radio-group v-model="departmentadio" size="small" @change="departmentPersonnelSwitch" v-if="radio == '部门' && this.parentDeptId">
|
|
|
|
+ <el-radio-button label="1">部门</el-radio-button>
|
|
|
|
+ <el-radio-button label="2">人员</el-radio-button>
|
|
|
|
+ </el-radio-group>
|
|
</div>
|
|
</div>
|
|
<el-pagination
|
|
<el-pagination
|
|
@size-change="echartsSizeChange"
|
|
@size-change="echartsSizeChange"
|
|
@@ -249,10 +253,21 @@
|
|
radioLoading: false,
|
|
radioLoading: false,
|
|
proJuctId:'',
|
|
proJuctId:'',
|
|
possWidth: 300,
|
|
possWidth: 300,
|
|
- possradio: '1'
|
|
|
|
|
|
+ possradio: '1',
|
|
|
|
+ departmentadio: '1'
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 部门详情的部门和人员切换显示
|
|
|
|
+ departmentPersonnelSwitch() {
|
|
|
|
+ const typeIndex = this.departmentadio
|
|
|
|
+ console.log('点击切换', typeIndex, this.parentDeptId)
|
|
|
|
+ if(typeIndex == '1') {
|
|
|
|
+ this.jieliu()
|
|
|
|
+ } else {
|
|
|
|
+ this.getUserCostList(this.parentDeptId)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
echartsCurrentChange(val){
|
|
echartsCurrentChange(val){
|
|
this.page = val
|
|
this.page = val
|
|
if(this.radio == this.$t('ren-yuan')){
|
|
if(this.radio == this.$t('ren-yuan')){
|
|
@@ -521,22 +536,22 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//获取人员成本统计列表
|
|
//获取人员成本统计列表
|
|
- getUserCostList() {
|
|
|
|
- // console.log(this.port.project.userCost, '获取人员成本统计列表')
|
|
|
|
- // console.log(this.user.timeType.fixMonthcost)
|
|
|
|
- // console.log(Boolean(this.dateRange))
|
|
|
|
|
|
+ getUserCostList(departmentId) {
|
|
let startDateNum = ''
|
|
let startDateNum = ''
|
|
let endDateNum = ''
|
|
let endDateNum = ''
|
|
if(this.dateRange) {
|
|
if(this.dateRange) {
|
|
startDateNum = this.user.timeType.fixMonthcost==0?this.dateRange[0]:this.dateRange
|
|
startDateNum = this.user.timeType.fixMonthcost==0?this.dateRange[0]:this.dateRange
|
|
endDateNum = this.user.timeType.fixMonthcost==0?this.dateRange[1]:this.dateRange
|
|
endDateNum = this.user.timeType.fixMonthcost==0?this.dateRange[1]:this.dateRange
|
|
}
|
|
}
|
|
- // return
|
|
|
|
- this.http.post(this.port.project.userCost, {
|
|
|
|
- // startDate:this.user.timeType.fixMonthcost==0?this.dateRange[0]:this.dateRange,
|
|
|
|
- // endDate: this.user.timeType.fixMonthcost==0?this.dateRange[1]:this.dateRange
|
|
|
|
|
|
+ let params = {
|
|
startDate: startDateNum,
|
|
startDate: startDateNum,
|
|
endDate: endDateNum
|
|
endDate: endDateNum
|
|
|
|
+ }
|
|
|
|
+ if(departmentId) {
|
|
|
|
+ params.departmentId = departmentId
|
|
|
|
+ }
|
|
|
|
+ this.http.post(this.port.project.userCost, {
|
|
|
|
+ ...params
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|
|
this.radioLoading = false
|
|
this.radioLoading = false
|
|
@@ -911,6 +926,7 @@
|
|
} else if (this.radio==this.$t('lable.department')) {
|
|
} else if (this.radio==this.$t('lable.department')) {
|
|
url = this.port.project.depCost;
|
|
url = this.port.project.depCost;
|
|
param.parentDeptId = this.parentDeptId;
|
|
param.parentDeptId = this.parentDeptId;
|
|
|
|
+ this.departmentadio = '1'
|
|
} else if (this.radio==this.$t('ren-yuan')) {
|
|
} else if (this.radio==this.$t('ren-yuan')) {
|
|
this.getUserCostList();
|
|
this.getUserCostList();
|
|
return;
|
|
return;
|
|
@@ -1323,6 +1339,9 @@
|
|
}
|
|
}
|
|
// _this.jieliu();
|
|
// _this.jieliu();
|
|
} else {
|
|
} else {
|
|
|
|
+ if(this.departmentadio == '2') {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (_this.dateRange != null) {
|
|
if (_this.dateRange != null) {
|
|
_this.$router.push("/costDep/" + _this.params[0].data.id + "/" + _this.params[0].name
|
|
_this.$router.push("/costDep/" + _this.params[0].data.id + "/" + _this.params[0].name
|
|
+"?startDate="+_this.dateRange[0]+"&endDate="+_this.dateRange[1]);
|
|
+"?startDate="+_this.dateRange[0]+"&endDate="+_this.dateRange[1]);
|