瀏覽代碼

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

ggooalice 2 年之前
父節點
當前提交
5c084c57fc

+ 20 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -152,7 +152,7 @@
                 permissions: JSON.parse(sessionStorage.getItem("permissions")),
                 radio: sessionStorage.radio!=null?sessionStorage.radio:'项目',
                 containerHeight: 0,    
-                myChart: null,
+                // myChart: null,
                 params: null,
                 widthHtval: document.body.clientWidth - 230,
                 users: [],
@@ -775,13 +775,22 @@
                 res => {
                     if (res.code == "ok") {
                         // 更具数据的长度去加每个柱子的间距
-                        for(var i in res.data.costList) {
-                            if(i>20) {
+                        // for(var i in res.data.costList) {
+                        //     if(i>20) {
+                        //         this.widthHtval = +this.widthHtval + 40
+                        //     } else {
+                        //         this.widthHtval = document.body.clientWidth - 230
+                        //     }
+                        // }
+                        // console.log(this.dayjs().add('0','day').format("YYYY-MM-DD HH:mm:ss"), '结束处理')
+                        if(res.data.costList.length > 20) {
+                            for(var i in res.data.costList) {
                                 this.widthHtval = +this.widthHtval + 40
-                            } else {
-                                this.widthHtval = document.body.clientWidth - 230
                             }
+                        } else {
+                            this.widthHtval = document.body.clientWidth - 230
                         }
+
                         var xList = []
                         var yList = []
                         var list
@@ -868,8 +877,7 @@
                             }
                         }
                         totalHours = totalHours.toFixed(1);
-                        
-                        
+                                            
                         var myChart = echarts.init(document.getElementById("container"));
                         myChart.resize({
                             width: this.widthHtval
@@ -1045,6 +1053,7 @@
             },
         },
         created() {
+            this.myChart = null
         },
         mounted() {
             this.containerHeight = window.innerHeight - 200
@@ -1092,6 +1101,10 @@
             this.jutishez()
             this.scrollFunction()
         },
+        beforeDestroy () {
+            var myChart = echarts.init(document.getElementById("container"));
+            myChart.clear()
+        },
     };
 </script>
 

+ 5 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -761,12 +761,16 @@
                 <el-button type="primary" @click="saveGroupIncharger" style="width:100%;" >保存</el-button>
             </div>
         </el-dialog>
-        <el-dialog title="修改任务分组" v-if="modGroupDialog" :visible.sync="modGroupDialog" :close-on-click-modal="false" customClass="customWidth" width="300px">
+        <el-dialog title="修改任务分组" v-if="modGroupDialog" :visible.sync="modGroupDialog" :close-on-click-modal="false" customClass="customWidth" width="400px">
             <el-form ref="form2" :model="groupForm" :rules="rules" style="margin-top:10px;">
                     <el-form-item prop="name">
                         <el-input v-model="groupForm.name" placeholder="请输入分组名称" maxlength="12"
                             show-word-limit clearable></el-input>
                     </el-form-item>
+                    <!-- <el-form-item label="编号">
+                        <el-input v-model="groupForm.code" placeholder="请输入分组编号" maxlength="20"
+                            show-word-limit clearable></el-input>
+                    </el-form-item> -->
                 </el-form>
             <div slot="footer" class="dialog-footer">
                 <el-button type="primary" @click="addGroup" style="width:100%;" >保存</el-button>

+ 29 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -234,20 +234,28 @@
         </el-dialog>
 
         <!-- 新增部门 -->
-        <el-dialog :title="depTitle" :visible.sync="departmentVisible" width="400px" >
-            <el-form ref="depForm" :model="depForm" :rules="depRules" label-width="80px">
+        <el-dialog :title="depTitle" :visible.sync="departmentVisible" width="500px" >
+            <el-form ref="depForm" :model="depForm" :rules="depRules" label-width="100px">
                 <el-form-item label="部门名称" prop="name">
-                    <el-input v-model="depForm.name" placeholder="请输入部门名称" style="width:90%" clearable></el-input>
+                    <el-input v-model="depForm.name" placeholder="请输入部门名称" clearable style="width: 100%"></el-input>
                 </el-form-item>
 
-                <el-form-item label="负责人" prop="managerId">
-                    <el-select v-model="depForm.managerId" filterable  clearable  placeholder="请选择部门负责人" style="width:90%">
+                <!-- 主要负责人 -->
+                <el-form-item label="主要负责人" prop="managerId">
+                    <el-select v-model="depForm.managerId" filterable  clearable  placeholder="请选择主要负责人" style="width: 100%">
+                        <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+
+                <!-- 其他负责人 -->
+                <el-form-item label="其他负责人" prop="managerId">
+                    <el-select v-model="depForm.otherManagerIds" filterable  clearable multiple style="width: 100%" placeholder="请选择其他负责人" >
                         <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
                 <!-- 直属领导 -->
                 <el-form-item label="直属领导" prop="reportAuditUserid">
-                    <el-select v-model="depForm.reportAuditUserid" filterable  clearable  placeholder="请选择直属领导" style="width:90%">
+                    <el-select v-model="depForm.reportAuditUserid" filterable  clearable  placeholder="请选择直属领导" style="width: 100%">
                         <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
@@ -2424,7 +2432,6 @@ export default {
 
     // 部门列表点击
     handleNodeClick(data) {
-      // console.log(data, 999)
       if (this.depData == null || data.id != this.depData.id) {
         this.depData = data;
         this.page = 1;
@@ -2434,6 +2441,7 @@ export default {
 
     // 新增、修改部门
     createDepartment(i) {
+      console.log(i, '看看')
       setTimeout(() => {
         var that = this;
         if (i == -2) {
@@ -2458,6 +2466,7 @@ export default {
           };
           that.depTitle = "新增部门";
         } else {
+          console.log(that.depData, '看看值')
           if (that.depData.managerId == "null") {
             that.depData.managerId = "";
           }
@@ -2470,7 +2479,14 @@ export default {
             parentId: that.depData.parentId,
             managerId: that.depData.managerId,
             reportAuditUserid: that.depData.reportAuditUserid,
-          };
+          }
+          if(that.depData.otherManagerIds) {
+            this.$set(that.depForm, 'otherManagerIds', that.depData.otherManagerIds)
+          } else {
+            this.$set(that.depForm, 'otherManagerIds', [])
+
+          }
+          // console.log('点击编辑的时候', that.depData)
           // if(that.depData.reportAuditUserid != null && that.depData.reportAuditUserid != "null" && that.depData.reportAuditUserid.length > 0) {
           //     that.depForm.reportAuditUserid = that.depData.reportAuditUserid
           // }
@@ -2538,6 +2554,10 @@ export default {
           if (this.depForm.reportAuditUserid) {
             form.reportAuditUserid = this.depForm.reportAuditUserid;
           }
+          // 其他负责人
+          if(this.depForm.otherManagerIds) {
+            form.otherManagerIds = this.depForm.otherManagerIds.toString();
+          }
           this.http.post(
             this.depForm.id == null
               ? this.port.manage.add
@@ -2553,6 +2573,7 @@ export default {
                 if (this.depForm.id != null) {
                   this.depData.label = form.name;
                   this.depData.managerId = form.managerId;
+                  this.depData.otherManagerIds = form.otherManagerIds;
                 }
 
                 this.getDepartment();