Переглянути джерело

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

cs 2 роки тому
батько
коміт
3878e7eed0

+ 16 - 37
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -28,7 +28,7 @@
             type="month" 
             ></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('zhu-xiang-mu')" v-if="user.timeType.mainProjectState"></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-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>
@@ -61,7 +62,7 @@
         <!-- <div id="clearfix" :style="'width:'+widthHtval+'px;position: relative; height:'+containerHeight+'px;'">
              <div id="container" :style="'height:'+containerHeight+'px;width:100%'"></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 class="poss">
                 <el-pagination
@@ -227,7 +228,8 @@
                 customId: '',
                 customName: '',
                 customList: [],
-                departmentList: []
+                departmentList: [],
+                radioLoading: false
             };
         },
         methods: {
@@ -270,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") {
@@ -399,7 +394,6 @@
                 }
                 this.http.post(url, param,
                     res => {
-                        this.listLoading = false;
                         if (res.code == "ok") {
                             this.exportDialog = false;
                             var aTag = document.createElement('a');
@@ -414,7 +408,6 @@
                         }
                     },
                     error => {
-                        this.listLoading = false;
                         this.$message({
                             message: error,
                             type: "error"
@@ -428,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])
                         }
@@ -461,7 +454,6 @@
             },
             //获取人员成本统计列表
             getUserCostList() {
-                this.listLoading = true;
                 // console.log(this.port.project.userCost, '获取人员成本统计列表')
                 // console.log(this.user.timeType.fixMonthcost)
                 // console.log(Boolean(this.dateRange))
@@ -479,7 +471,7 @@
                     endDate: endDateNum
                 },
                 res => {
-                    this.listLoading = false;
+                    this.radioLoading = false
                     var _this = this;
                     this.hasReportUserList = [];
                     if (res.code == "ok") {
@@ -510,7 +502,7 @@
                         } else {
                             this.personnelAll = res.data
                             this.allListData = res.data
-                            console.log('人员返回', this.allListData);
+                            // console.log('人员返回', this.allListData);
                             this.gtff()
                         }
                     } else {
@@ -521,7 +513,7 @@
                     }
                 },
                 error => {
-                    this.listLoading = false;
+                    this.radioLoading = false
                     this.$message({
                         message: error + '外面',
                         type: "error"
@@ -790,7 +782,7 @@
             // 脱离出来的方法
             jieliu() {
                 sessionStorage.radio = this.radio;
-                
+                this.radioLoading = true
                 var param = {};
                 if (this.dateRange != null) {
                     param = {
@@ -824,9 +816,11 @@
                     param.fieldName = this.theCustomListPlant
                     // console.log(param, '要传的数据')
                 }
+                
                 this.http.post(url, param,
                 res => {
                     if (res.code == "ok") {
+                        this.radioLoading = false
                         let alltime = 0
                         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){
@@ -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 = {}
@@ -872,6 +864,7 @@
                             this.jieliu_echarts()
                         }
                     } else {
+                        this.radioLoading = false
                         this.$message({
                             message: res.msg,
                             type: "error"
@@ -879,6 +872,7 @@
                     }
                 },
                 error => {
+                    this.radioLoading = false
                     this.$message({
                         message: error,
                         type: "error"
@@ -893,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)
                                 })
@@ -911,7 +902,6 @@
                     myFunOne()
             },
             dealWithTranslationPlone(items, dataList) {
-                    console.log(items, '过来道德值')
                     if (WWOpenData.initCanvas) {
                         WWOpenData.initCanvas()
                     }
@@ -924,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
@@ -1019,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,
@@ -1046,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{
@@ -1079,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)
                         } 
@@ -1192,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) {
@@ -1251,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 {
@@ -1306,7 +1288,6 @@
             },
             // 自定义事件
             selectCal(obj) {
-                console.log(obj)
                 if(obj.distinction == 1) {
                     let arr = []
                     for(var i in obj.arrUserList) {
@@ -1314,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

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1131,7 +1131,7 @@
                 <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
                     ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="workForm.userId"
                     highlight-current :filter-node-method="filterNode">
-                    <span class="custom-tree-node" slot-scope="{ node, data }">
+                    <span class="custom-tree-node" slot-scope="{ node }">
                         <span v-if="user.userNameNeedTranslate == '1'">
                             <span v-if="node.data.children">
                                 <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>