|
@@ -28,7 +28,7 @@
|
|
type="month"
|
|
type="month"
|
|
></el-date-picker>
|
|
></el-date-picker>
|
|
|
|
|
|
- <el-radio-group v-model="radio" @change="getEchart" style="margin-left:10px;" size="small">
|
|
|
|
|
|
+ <el-radio-group v-model="radio" @change="getEchart" style="margin-left:10px;" size="small" :disabled="radioLoading">
|
|
<el-radio-button :label="$t('other.project')"></el-radio-button>
|
|
<el-radio-button :label="$t('other.project')"></el-radio-button>
|
|
<el-radio-button :label="$t('zhu-xiang-mu')" v-if="user.timeType.mainProjectState"></el-radio-button>
|
|
<el-radio-button :label="$t('zhu-xiang-mu')" v-if="user.timeType.mainProjectState"></el-radio-button>
|
|
<el-radio-button :label="$t('projectclassification')"></el-radio-button>
|
|
<el-radio-button :label="$t('projectclassification')"></el-radio-button>
|
|
@@ -42,14 +42,15 @@
|
|
<el-option v-for="item in customList" :key="item.id" :label="item.name" :value="item.name"></el-option>
|
|
<el-option v-for="item in customList" :key="item.id" :label="item.name" :value="item.name"></el-option>
|
|
</el-select> -->
|
|
</el-select> -->
|
|
|
|
|
|
- <el-select v-model="personnelValue" filterable clearable :placeholder="$t('pleaseselectpersonnel')" size="small" style="margin-top: 10px;width: 350px" v-if="radio == $t('ren-yuan') && user.userNameNeedTranslate != '1'" @change="personnel()">
|
|
|
|
|
|
+ <el-select v-model="personnelValue" filterable clearable :placeholder="hasReportUserList.length == 0 ? $t('nodata') : $t('pleaseselectpersonnel')" size="small" style="margin-top: 10px;width: 350px" v-if="radio == $t('ren-yuan') && user.userNameNeedTranslate != '1'" @change="personnel()"
|
|
|
|
+ :disabled="hasReportUserList.length == 0 ? true : false">
|
|
<el-option v-for="item in hasReportUserList" :key="item.id" :label="item.name" :value="item.name">
|
|
<el-option v-for="item in hasReportUserList" :key="item.id" :label="item.name" :value="item.name">
|
|
<span style="float: left">{{ item.name }}</span>
|
|
<span style="float: left">{{ item.name }}</span>
|
|
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
|
|
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
<span style="text-align: left">
|
|
<span style="text-align: left">
|
|
- <selectCat v-if="radio == $t('ren-yuan') && user.userNameNeedTranslate == '1'" :size="'small'" :widthStr="'350'" :distinction="'2'" :subject="hasReportUserList" :clearable="true" @selectCal="selectCal"></selectCat>
|
|
|
|
|
|
+ <selectCat v-if="radio == $t('ren-yuan') && user.userNameNeedTranslate == '1'" :size="'small'" :widthStr="'350'" :distinction="'2'" :subject="hasReportUserList" :clearable="true" @selectCal="selectCal" :disabled="hasReportUserList.length == 0 ? true : false"></selectCat>
|
|
</span>
|
|
</span>
|
|
|
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -61,7 +62,7 @@
|
|
<!-- <div id="clearfix" :style="'width:'+widthHtval+'px;position: relative; height:'+containerHeight+'px;'">
|
|
<!-- <div id="clearfix" :style="'width:'+widthHtval+'px;position: relative; height:'+containerHeight+'px;'">
|
|
<div id="container" :style="'height:'+containerHeight+'px;width:100%'"></div>
|
|
<div id="container" :style="'height:'+containerHeight+'px;width:100%'"></div>
|
|
</div> -->
|
|
</div> -->
|
|
- <div id="clearfix" :class="radio == $t('ren-yuan') ? 'ryuans' : ''" :style="'overflow-x: auto;width:100%;padding-bottom: 100px; position: relative; height:'+containerHeight+'px;'">
|
|
|
|
|
|
+ <div id="clearfix" :class="radio == $t('ren-yuan') ? 'ryuans' : ''" :style="'overflow-x: auto;width:100%;padding-bottom: 100px; position: relative; height:'+containerHeight+'px;'" v-loading="radioLoading">
|
|
<div id="container" :style="'height:'+(containerHeight - 20)+'px;width:100%'"></div>
|
|
<div id="container" :style="'height:'+(containerHeight - 20)+'px;width:100%'"></div>
|
|
<div class="poss">
|
|
<div class="poss">
|
|
<el-pagination
|
|
<el-pagination
|
|
@@ -227,7 +228,8 @@
|
|
customId: '',
|
|
customId: '',
|
|
customName: '',
|
|
customName: '',
|
|
customList: [],
|
|
customList: [],
|
|
- departmentList: []
|
|
|
|
|
|
+ departmentList: [],
|
|
|
|
+ radioLoading: false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -270,13 +272,6 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getUsers() {
|
|
getUsers() {
|
|
- // console.log(this.port.manage.list)
|
|
|
|
- // this.http.post(this.port.manage.list, {
|
|
|
|
- // departmentId: -1,
|
|
|
|
- // pageIndex: 1,
|
|
|
|
- // // pageSize: 99999
|
|
|
|
- // pageSize: -1
|
|
|
|
- // },
|
|
|
|
this.http.post('/user/getSimpleActiveUserList', {},
|
|
this.http.post('/user/getSimpleActiveUserList', {},
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -399,7 +394,6 @@
|
|
}
|
|
}
|
|
this.http.post(url, param,
|
|
this.http.post(url, param,
|
|
res => {
|
|
res => {
|
|
- this.listLoading = false;
|
|
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.exportDialog = false;
|
|
this.exportDialog = false;
|
|
var aTag = document.createElement('a');
|
|
var aTag = document.createElement('a');
|
|
@@ -414,7 +408,6 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
- this.listLoading = false;
|
|
|
|
this.$message({
|
|
this.$message({
|
|
message: error,
|
|
message: error,
|
|
type: "error"
|
|
type: "error"
|
|
@@ -428,7 +421,7 @@
|
|
var arrlist = JSON.parse(JSON.stringify(this.personnelAllPlly))
|
|
var arrlist = JSON.parse(JSON.stringify(this.personnelAllPlly))
|
|
var arr = []
|
|
var arr = []
|
|
for(var i in arrlist.list) {
|
|
for(var i in arrlist.list) {
|
|
- console.log(arrlist.list[i].name, this.personnelValue)
|
|
|
|
|
|
+ // console.log(arrlist.list[i].name, this.personnelValue)
|
|
if(arrlist.list[i].name == this.personnelValue) {
|
|
if(arrlist.list[i].name == this.personnelValue) {
|
|
arr.push(arrlist.list[i])
|
|
arr.push(arrlist.list[i])
|
|
}
|
|
}
|
|
@@ -461,7 +454,6 @@
|
|
},
|
|
},
|
|
//获取人员成本统计列表
|
|
//获取人员成本统计列表
|
|
getUserCostList() {
|
|
getUserCostList() {
|
|
- this.listLoading = true;
|
|
|
|
// console.log(this.port.project.userCost, '获取人员成本统计列表')
|
|
// console.log(this.port.project.userCost, '获取人员成本统计列表')
|
|
// console.log(this.user.timeType.fixMonthcost)
|
|
// console.log(this.user.timeType.fixMonthcost)
|
|
// console.log(Boolean(this.dateRange))
|
|
// console.log(Boolean(this.dateRange))
|
|
@@ -479,7 +471,7 @@
|
|
endDate: endDateNum
|
|
endDate: endDateNum
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|
|
- this.listLoading = false;
|
|
|
|
|
|
+ this.radioLoading = false
|
|
var _this = this;
|
|
var _this = this;
|
|
this.hasReportUserList = [];
|
|
this.hasReportUserList = [];
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -510,7 +502,7 @@
|
|
} else {
|
|
} else {
|
|
this.personnelAll = res.data
|
|
this.personnelAll = res.data
|
|
this.allListData = res.data
|
|
this.allListData = res.data
|
|
- console.log('人员返回', this.allListData);
|
|
|
|
|
|
+ // console.log('人员返回', this.allListData);
|
|
this.gtff()
|
|
this.gtff()
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -521,7 +513,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
- this.listLoading = false;
|
|
|
|
|
|
+ this.radioLoading = false
|
|
this.$message({
|
|
this.$message({
|
|
message: error + '外面',
|
|
message: error + '外面',
|
|
type: "error"
|
|
type: "error"
|
|
@@ -790,7 +782,7 @@
|
|
// 脱离出来的方法
|
|
// 脱离出来的方法
|
|
jieliu() {
|
|
jieliu() {
|
|
sessionStorage.radio = this.radio;
|
|
sessionStorage.radio = this.radio;
|
|
-
|
|
|
|
|
|
+ this.radioLoading = true
|
|
var param = {};
|
|
var param = {};
|
|
if (this.dateRange != null) {
|
|
if (this.dateRange != null) {
|
|
param = {
|
|
param = {
|
|
@@ -824,9 +816,11 @@
|
|
param.fieldName = this.theCustomListPlant
|
|
param.fieldName = this.theCustomListPlant
|
|
// console.log(param, '要传的数据')
|
|
// console.log(param, '要传的数据')
|
|
}
|
|
}
|
|
|
|
+
|
|
this.http.post(url, param,
|
|
this.http.post(url, param,
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
|
|
+ this.radioLoading = false
|
|
let alltime = 0
|
|
let alltime = 0
|
|
if(this.radio==this.$t('other.project') || this.radio == this.$t('zhu-xiang-mu') || this.radio==this.$t('projectclassification')){
|
|
if(this.radio==this.$t('other.project') || this.radio == this.$t('zhu-xiang-mu') || this.radio==this.$t('projectclassification')){
|
|
for(let i in res.data.costList){
|
|
for(let i in res.data.costList){
|
|
@@ -856,10 +850,8 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.allListData = res.data
|
|
this.allListData = res.data
|
|
- console.log(this.allListData, '部门数据')
|
|
|
|
this.page = 1
|
|
this.page = 1
|
|
if(this.user.userNameNeedTranslate == '1' && this.radio == this.$t('lable.department')) {
|
|
if(this.user.userNameNeedTranslate == '1' && this.radio == this.$t('lable.department')) {
|
|
- console.log('进入我处理的方法')
|
|
|
|
let arr = []
|
|
let arr = []
|
|
for(var i in this.allListData.costList) {
|
|
for(var i in this.allListData.costList) {
|
|
let obj = {}
|
|
let obj = {}
|
|
@@ -872,6 +864,7 @@
|
|
this.jieliu_echarts()
|
|
this.jieliu_echarts()
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
|
|
+ this.radioLoading = false
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
type: "error"
|
|
type: "error"
|
|
@@ -879,6 +872,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
|
|
+ this.radioLoading = false
|
|
this.$message({
|
|
this.$message({
|
|
message: error,
|
|
message: error,
|
|
type: "error"
|
|
type: "error"
|
|
@@ -893,9 +887,6 @@
|
|
const result = await new Promise((resolve, reject) => {
|
|
const result = await new Promise((resolve, reject) => {
|
|
if(WWOpenData.prefetch) {
|
|
if(WWOpenData.prefetch) {
|
|
WWOpenData.prefetch({ items }, (err, data) => {
|
|
WWOpenData.prefetch({ items }, (err, data) => {
|
|
- console.log(items)
|
|
|
|
- console.log(err)
|
|
|
|
- console.log(data)
|
|
|
|
if (err) { return reject(err) }
|
|
if (err) { return reject(err) }
|
|
resolve(data)
|
|
resolve(data)
|
|
})
|
|
})
|
|
@@ -911,7 +902,6 @@
|
|
myFunOne()
|
|
myFunOne()
|
|
},
|
|
},
|
|
dealWithTranslationPlone(items, dataList) {
|
|
dealWithTranslationPlone(items, dataList) {
|
|
- console.log(items, '过来道德值')
|
|
|
|
if (WWOpenData.initCanvas) {
|
|
if (WWOpenData.initCanvas) {
|
|
WWOpenData.initCanvas()
|
|
WWOpenData.initCanvas()
|
|
}
|
|
}
|
|
@@ -924,7 +914,6 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- console.log('取到的值', result)
|
|
|
|
for(var i in this.allListData.list) {
|
|
for(var i in this.allListData.list) {
|
|
if(result.items[i]) {
|
|
if(result.items[i]) {
|
|
this.allListData.list[i].name = result.items[i].data
|
|
this.allListData.list[i].name = result.items[i].data
|
|
@@ -1019,12 +1008,10 @@
|
|
else if(this.theCustomListFlg) {
|
|
else if(this.theCustomListFlg) {
|
|
// this.allListData = res.data.list ? res.data.list : []
|
|
// this.allListData = res.data.list ? res.data.list : []
|
|
this.total = this.allListData.list ? this.allListData.list.length : 0
|
|
this.total = this.allListData.list ? this.allListData.list.length : 0
|
|
- console.log('jieliu_echarts',this.allListData);
|
|
|
|
list = this.total ? this.allListData.list.slice(0+50*(this.page-1),49+50*(this.page-1)) : []
|
|
list = this.total ? this.allListData.list.slice(0+50*(this.page-1),49+50*(this.page-1)) : []
|
|
// list = res.data.list
|
|
// list = res.data.list
|
|
|
|
|
|
for(var i in list) {
|
|
for(var i in list) {
|
|
- // console.log(list[i].name, list[i].costMoney, list[i].cost)
|
|
|
|
xList.push(list[i].name);
|
|
xList.push(list[i].name);
|
|
let item = {
|
|
let item = {
|
|
"value": this.yAxisValue==0?list[i].costMoney:list[i].cost,
|
|
"value": this.yAxisValue==0?list[i].costMoney:list[i].cost,
|
|
@@ -1046,7 +1033,6 @@
|
|
else {
|
|
else {
|
|
//自定义列表:data:{cost:3, costMoney:222}
|
|
//自定义列表:data:{cost:3, costMoney:222}
|
|
this.total = this.allListData ? this.allListData.length : 0
|
|
this.total = this.allListData ? this.allListData.length : 0
|
|
- console.log('slice',this.allListData);
|
|
|
|
// if(this.total){
|
|
// if(this.total){
|
|
list = this.allListData.slice(0+50*(this.page-1),49+50*(this.page-1))
|
|
list = this.allListData.slice(0+50*(this.page-1),49+50*(this.page-1))
|
|
// }else{
|
|
// }else{
|
|
@@ -1079,8 +1065,6 @@
|
|
width: this.widthHtval
|
|
width: this.widthHtval
|
|
})
|
|
})
|
|
_this.myChart = myChart;
|
|
_this.myChart = myChart;
|
|
- // console.log(totalMoneyCost.toFixed(2), '看看', totalMoneyCost)
|
|
|
|
- // var chengbentongji = totalMoneyCost.toFixed(2) || totalMoneyCost
|
|
|
|
if(totalMoneyCost) {
|
|
if(totalMoneyCost) {
|
|
this.zhishin = totalMoneyCost.toFixed(2)
|
|
this.zhishin = totalMoneyCost.toFixed(2)
|
|
}
|
|
}
|
|
@@ -1192,7 +1176,6 @@
|
|
myChart.getZr().on('click', params => {
|
|
myChart.getZr().on('click', params => {
|
|
const pointInPixel = [params.offsetX, params.offsetY];
|
|
const pointInPixel = [params.offsetX, params.offsetY];
|
|
if (myChart.containPixel('grid', pointInPixel)) {
|
|
if (myChart.containPixel('grid', pointInPixel)) {
|
|
- // console.log(_this.params)
|
|
|
|
if(_this.radio==this.$t('other.project')) {
|
|
if(_this.radio==this.$t('other.project')) {
|
|
if (_this.dateRange != null) {
|
|
if (_this.dateRange != null) {
|
|
if (this.user.timeType.fixMonthcost == 0) {
|
|
if (this.user.timeType.fixMonthcost == 0) {
|
|
@@ -1251,7 +1234,6 @@
|
|
getZDY() {
|
|
getZDY() {
|
|
this.http.post('/user-custom/getUserCustomTitle',{},res => {
|
|
this.http.post('/user-custom/getUserCustomTitle',{},res => {
|
|
if(res.code == 'ok'){
|
|
if(res.code == 'ok'){
|
|
- // console.log(res, '数据来源')
|
|
|
|
this.theCustomList = res.data.result
|
|
this.theCustomList = res.data.result
|
|
this.theCustomListPlantLIst = res.data.field
|
|
this.theCustomListPlantLIst = res.data.field
|
|
}else {
|
|
}else {
|
|
@@ -1306,7 +1288,6 @@
|
|
},
|
|
},
|
|
// 自定义事件
|
|
// 自定义事件
|
|
selectCal(obj) {
|
|
selectCal(obj) {
|
|
- console.log(obj)
|
|
|
|
if(obj.distinction == 1) {
|
|
if(obj.distinction == 1) {
|
|
let arr = []
|
|
let arr = []
|
|
for(var i in obj.arrUserList) {
|
|
for(var i in obj.arrUserList) {
|
|
@@ -1314,14 +1295,12 @@
|
|
}
|
|
}
|
|
this.exportParam.userIds = arr
|
|
this.exportParam.userIds = arr
|
|
} else if(obj.distinction == 2) {
|
|
} else if(obj.distinction == 2) {
|
|
- console.log(obj)
|
|
|
|
this.personnelValue = obj.name
|
|
this.personnelValue = obj.name
|
|
this.personnel()
|
|
this.personnel()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
vueCasader(obj) {
|
|
vueCasader(obj) {
|
|
if(obj.distinction == 1) {
|
|
if(obj.distinction == 1) {
|
|
- console.log(obj, '数据')
|
|
|
|
let arr = []
|
|
let arr = []
|
|
arr.push(obj.id)
|
|
arr.push(obj.id)
|
|
this.exportParam.deptId = arr
|
|
this.exportParam.deptId = arr
|