山水共长天一色 hace 3 años
padre
commit
4b977eae06

+ 11 - 36
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -30,7 +30,7 @@
       <!-- 任务分组筛选 -->
       <div v-if="reqpar1" class="head_taskgroup">
         <span>任务分组</span>
-        <el-select clearable filterable v-model="valuex2" placeholder="请选择" size="small" style="margin-left:9px;width:200px" @change="taskgroupSel()">
+        <el-select clearable filterable v-model="valuex2" placeholder="请选择" size="small" style="margin-left:9px;width:13vw" @change="taskgroupSel()">
         <el-option
           v-for="item in taskgroupList"
           :key="item.name"
@@ -43,7 +43,7 @@
       <!-- 人员/项目筛选 -->
       <div class="head_select">
         <span>{{(this.radio1 == "按人员查看" ? "人员" : "项目")}}</span>
-      <el-select clearable filterable v-model="valuex" placeholder="请选择" size="small" style="margin-left:9px;width:200px" @change="optupdata()">
+      <el-select clearable filterable v-model="valuex" placeholder="请选择" size="small" style="margin-left:9px;width:13vw" @change="optupdata()">
         <el-option
           v-for="item in screenList"
           :key="item.id"
@@ -55,11 +55,11 @@
       </div>
       <!-- 资源需求导入/导出 -->
       <div class="head_files" v-if="!isDataLoaded">
-        <el-link type="primary" style="margin-left:10px;" :underline="false" href="./upload/资源需求导入模板.xlsx" download="资源需求导入模板.xlsx">模板下载</el-link>
-        <el-upload ref="upload" style="margin-left:10px;" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
+        <el-link type="primary" style="margin-left:10px;float:left;" :underline="false" href="./upload/资源需求导入模板.xlsx" download="资源需求导入模板.xlsx">模板下载</el-link>
+        <el-upload ref="upload" style="margin-left:10px;float:left;" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
           <el-link type="primary" :underline="false" >导入需求</el-link>
         </el-upload>
-        <el-link type="primary" style="margin-left:10px;" :underline="false" @click="exportProjectData" download="资源需求导出.xlsx">导出需求</el-link>
+        <el-link type="primary" style="margin-left:10px;float:left;" :underline="false" @click="exportProjectData" download="资源需求导出.xlsx">导出需求</el-link>
       </div>
     </div>
 
@@ -516,50 +516,25 @@ export default {
   }
   .gantt_head{
     width: 100%;
-    height: 60px;
+    height: 80px;
     display: flex;
     justify-content: space-between;
     align-items: center;
   }
   .gantt_head .head_RorX{
-    height: 60px;
-    line-height: 60px;
-    width: 24%;
-    display: flex;
-    align-items: center;
-    justify-content: left;
+    width: 18vw;
   }
   .gantt_head .head_date{
-    height: 60px;
-    line-height: 60px;
-    width: 30%;
-    display: flex;
-    align-items: center;
-    justify-content: left;
+    width: 27vw;
   }
   .gantt_head .head_taskgroup{
-    height: 60px;
-    line-height: 60px;
-    width: 23%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
+    width: 18vw;
   }
   .gantt_head .head_select{
-    height: 60px;
-    line-height: 60px;
-    width: 23%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
+    width: 17vw;
   }
   .gantt_head .head_files{
-    height: 60px;
-    line-height: 60px;
-    width: 20%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
+    width: 14vw;
   }
   .poss {
     height: 8%;

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

@@ -372,7 +372,7 @@
                             <el-option v-for="item in domain.auditUserList" :label="item.auditorName" :value="item.auditorId" :key="item.id"></el-option>
                         </el-select>
                     </el-form-item>
-                    <!-- 相关维度 -->
+                    <!-- 相关维度/自定义维度 -->
                     <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1">
                         <el-select v-model="domain.degreeId" clearable placeholder="请选择" :disabled="!canEdit">
                             <el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
@@ -698,6 +698,24 @@
                         <el-option v-for="item in zhoBao.auditUserList" :key="item.id" :label="item.auditorName" :value="item.auditorId"></el-option>
                     </el-select>
                 </div>
+                <!-- 自定义维度  -->
+                <div class="zhoFel" v-if="user.timeType.customDegreeActive">
+                    <p>{{user.timeType.customDegreeName}}</p>
+                    <el-select v-model="zhoBao.degreeId" placeholder="请选择" clearable="true" style="width: 355px">
+                        <el-option v-for="item in zhoBao.wuduList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                    </el-select>
+                    
+                </div>
+                <!-- 自定义数值 -->
+                <div class="zhoFel" v-if="user.timeType.customDataActive">
+                    <p>{{user.timeType.customDataName}}</p>
+                    <el-input-number :id="'weekData_num'" :disabled="!canEdit" v-model="zhoBao.customData" style="width:200px;" @keyup.native="restrictNumber('weekData_num')"></el-input-number>
+                </div>
+                <!-- 自定义文本 -->
+                <div class="zhoFel" v-if="user.timeType.customTextActive">
+                    <p>{{user.timeType.customTextName}}</p>
+                    <el-input :disabled="!canEdit" v-model="zhoBao.customText" style="width:355px;" maxlength="25" show-word-limit></el-input>
+                </div>
                 <div class="zhoFel" v-if="reportTimeType.type == 2">
                     <p>选择时间</p>
                     <el-time-picker style="width: 355px" is-range v-model="zhoBao.time" format="HH:mm" value-format="HH:mm" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
@@ -1465,6 +1483,7 @@
             
         },
         methods: {
+
             filterNode(value, data) {
                 // console.log(value, data, '搜索')
                 if (!value) return true;
@@ -3674,7 +3693,7 @@
             },
             // 按周填报里内容的填写
             tianxies(item, i, names, row) {
-                // console.log(item, i, names, row[0], '你好')
+                // console.log(item, i, names, row, '你好')
                 var idd = ''
                 var obj = {}
                 for(var l in this.projectList) {
@@ -3686,6 +3705,7 @@
                 this.tianxieDialogVisible = true
                 this.scopess = item
                 var sss = {}
+                
                 sss.projectId = idd;
                 sss.con = item.con
                 sss.progress = item.progress
@@ -3718,6 +3738,7 @@
                         //只有一个审核人,自动设置上去
                         sss.projectAuditorId = sss.auditUserList[0].auditorId;
                     }
+                    sss.wuduList = row[0].wuduList
                     // console.log(sss, '数据')
                     that.zhoBaoIdx = i
                     that.zhoBaoName = names
@@ -4114,7 +4135,7 @@
                             for(var j in zhoD) {     
                                 if(j != 'zhoDataTime' && j != 'he' && zhoD[j].time && zhoD[j].time.length > 0 && zhoD[j].time != null && zhoD[j].time != 'null') {
                                     flgs = true
-                                    formData.append("degreeId", "-1");
+                                    // formData.append("degreeId", "-1");
                                     formData.append("id", '-1');
                                     for(var s in this.projectList) {
                                         if(j == this.projectList[s].projectName) {
@@ -4151,6 +4172,21 @@
                                     } else {
                                         formData.append("basecostId", 0);
                                     }
+                                    if(this.user.timeType.customDegreeActive && zhoD[j].degreeId){
+                                        formData.append('degreeId',zhoD[j].degreeId)
+                                    }else{
+                                        formData.append("degreeId", "-1");
+                                    }
+                                    if(this.user.timeType.customDataActive && zhoD[j].customData){
+                                        formData.append('customData',zhoD[j].customData)
+                                    }else if(this.user.timeType.customDataActive){
+                                        formData.append('customData',0)
+                                    }
+                                    if(this.user.timeType.customTextActive && zhoD[j].customText){
+                                        formData.append('customText',zhoD[j].customText)
+                                    }else if(this.user.timeType.customTextActive){
+                                        formData.append('customText','-')
+                                    }
                                 }
                             }
                         }
@@ -4162,7 +4198,7 @@
                                 for(var j in zhoD) {     
                                     if(j != 'zhoDataTime' && j != 'he' && zhoD[j].time && zhoD[j].time.length > 0 && zhoD[j].time != null && zhoD[j].time != 'null') {
                                         flgs = true
-                                        formData.append("degreeId", "-1");
+                                        // formData.append("degreeId", "-1");
                                         formData.append("id", '-1');
                                         for(var s in this.projectList) {
                                             if(j == this.projectList[s].projectName) {
@@ -4188,13 +4224,28 @@
                                         } else {
                                             formData.append("basecostId", 0);
                                         }
+                                        if(this.user.timeType.customDegreeActive && zhoD[j].degreeId){
+                                            formData.append('degreeId',zhoD[j].degreeId)
+                                        }else{
+                                            formData.append("degreeId", "-1");
+                                        }
+                                        if(this.user.timeType.customDataActive && zhoD[j].customData){
+                                            formData.append('customData',zhoD[j].customData)
+                                        }else if(this.user.timeType.customDataActive){
+                                            formData.append('customData',0)
+                                        }
+                                        if(this.user.timeType.customTextActive && zhoD[j].customText){
+                                            formData.append('customText',zhoD[j].customText)
+                                        }else if(this.user.timeType.customTextActive){
+                                            formData.append('customText','-')
+                                        }
                                     }
                                 }
                             } else {
                                 for(var j in zhoD) {     
                                     if(j != 'zhoDataTime' && j != 'he' && zhoD[j].workingTime && zhoD[j].workingTime.length > 0 && zhoD[j].workingTime > 0 && zhoD[j].workingTime != null && zhoD[j].workingTime != 'null') {
                                         flgs = true
-                                        formData.append("degreeId", "-1");
+                                        // formData.append("degreeId", "-1");
                                         formData.append("id", '-1');
                                         for(var s in this.projectList) {
                                             if(j == this.projectList[s].projectName) {
@@ -4228,12 +4279,29 @@
                                         } else {
                                             formData.append("basecostId", 0);
                                         }
+                                        if(this.user.timeType.customDegreeActive && zhoD[j].degreeId){
+                                            formData.append('degreeId',zhoD[j].degreeId)
+                                        }else{
+                                            formData.append("degreeId", "-1");
+                                        }
+                                        if(this.user.timeType.customDataActive && zhoD[j].customData){
+                                            formData.append('customData',zhoD[j].customData)
+                                        }else if(this.user.timeType.customDataActive){
+                                            formData.append('customData',0)
+                                        }
+                                        if(this.user.timeType.customTextActive && zhoD[j].customText){
+                                            formData.append('customText',zhoD[j].customText)
+                                        }else if(this.user.timeType.customTextActive){
+                                            formData.append('customText','-')
+                                        }
                                     }
                                 }
                             }
                         }
-                    } 
+                    }
                     
+                    // 自定义维度
+
                     this.http.uploadFile( this.port.report.editPort, formData,
                         res => {
                             // this.listLoading = false;

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

@@ -3,7 +3,7 @@ const pxtorem = require("postcss-pxtorem");
 const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
-var ip = '192.168.2.15'
+var ip = '192.168.2.2'
 // var ip = '127.0.0.1'
 // var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 // for (var i in ifaces) {