ggooalice 2 éve
szülő
commit
dfc0f98b51

+ 5 - 28
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -42,14 +42,15 @@
                 <el-option v-for="item in customList" :key="item.id" :label="item.name" :value="item.name"></el-option>
             </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">
                     <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>
                 </el-option>
             </el-select>
             <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>
 
         </el-col>
@@ -271,13 +272,6 @@
                 });
             },
             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', {},
                     res => {
                         if (res.code == "ok") {
@@ -427,7 +421,7 @@
                     var arrlist = JSON.parse(JSON.stringify(this.personnelAllPlly))
                     var arr = []
                     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) {
                             arr.push(arrlist.list[i])
                         }
@@ -508,7 +502,7 @@
                         } else {
                             this.personnelAll = res.data
                             this.allListData = res.data
-                            console.log('人员返回', this.allListData);
+                            // console.log('人员返回', this.allListData);
                             this.gtff()
                         }
                     } else {
@@ -856,10 +850,8 @@
                             }
                         }
                         this.allListData = res.data
-                        console.log(this.allListData, '部门数据')
                         this.page = 1
                         if(this.user.userNameNeedTranslate == '1' && this.radio == this.$t('lable.department')) {
-                            console.log('进入我处理的方法')
                             let arr = []
                             for(var i in this.allListData.costList) {
                                 let obj = {}
@@ -895,9 +887,6 @@
                         const result = await new Promise((resolve, reject) => {
                             if(WWOpenData.prefetch) {
                                  WWOpenData.prefetch({ items }, (err, data) => {
-                                    console.log(items)
-                                    console.log(err)
-                                    console.log(data)
                                     if (err) { return reject(err) }
                                     resolve(data)
                                 })
@@ -913,7 +902,6 @@
                     myFunOne()
             },
             dealWithTranslationPlone(items, dataList) {
-                    console.log(items, '过来道德值')
                     if (WWOpenData.initCanvas) {
                         WWOpenData.initCanvas()
                     }
@@ -926,7 +914,6 @@
                                 })
                             }
                         })
-                        console.log('取到的值', result)
                         for(var i in this.allListData.list) {
                             if(result.items[i]) {  
                                 this.allListData.list[i].name = result.items[i].data
@@ -1021,12 +1008,10 @@
                         else if(this.theCustomListFlg) {
                             // this.allListData = res.data.list ? res.data.list : []
                             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 = res.data.list
                             
                             for(var i in list) {
-                                // console.log(list[i].name, list[i].costMoney, list[i].cost)
                                 xList.push(list[i].name);
                                 let item = {
                                     "value": this.yAxisValue==0?list[i].costMoney:list[i].cost,
@@ -1048,7 +1033,6 @@
                         else {
                             //自定义列表:data:{cost:3, costMoney:222}
                             this.total = this.allListData ? this.allListData.length : 0
-                            console.log('slice',this.allListData);
                             // if(this.total){
                                 list = this.allListData.slice(0+50*(this.page-1),49+50*(this.page-1))
                             // }else{
@@ -1081,8 +1065,6 @@
                             width: this.widthHtval
                         })
                         _this.myChart = myChart;
-                        // console.log(totalMoneyCost.toFixed(2), '看看', totalMoneyCost)
-                        // var chengbentongji = totalMoneyCost.toFixed(2) || totalMoneyCost
                         if(totalMoneyCost) {
                             this.zhishin = totalMoneyCost.toFixed(2)
                         } 
@@ -1194,7 +1176,6 @@
                         myChart.getZr().on('click', params => {
                             const pointInPixel = [params.offsetX, params.offsetY];
                             if (myChart.containPixel('grid', pointInPixel)) {
-                                // console.log(_this.params)
                                 if(_this.radio==this.$t('other.project')) {
                                     if (_this.dateRange != null) {
                                         if (this.user.timeType.fixMonthcost == 0) {
@@ -1253,7 +1234,6 @@
             getZDY() {
                 this.http.post('/user-custom/getUserCustomTitle',{},res => {
                     if(res.code == 'ok'){
-                        // console.log(res, '数据来源')
                         this.theCustomList = res.data.result
                         this.theCustomListPlantLIst = res.data.field
                     }else {
@@ -1308,7 +1288,6 @@
             },
             // 自定义事件
             selectCal(obj) {
-                console.log(obj)
                 if(obj.distinction == 1) {
                     let arr = []
                     for(var i in obj.arrUserList) {
@@ -1316,14 +1295,12 @@
                     }
                     this.exportParam.userIds = arr
                 } else if(obj.distinction == 2) {
-                    console.log(obj)
                     this.personnelValue = obj.name
                     this.personnel()
                 }
             },
             vueCasader(obj) {
                 if(obj.distinction == 1) {
-                    console.log(obj, '数据')
                     let arr = []
                     arr.push(obj.id)
                     this.exportParam.deptId = arr