Pārlūkot izejas kodu

调整移动端填写日报

Lijy 3 gadi atpakaļ
vecāks
revīzija
4f0064ee19

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

@@ -1593,7 +1593,7 @@
             //项目选中了, 加载子项目
             selectProject(domain, index) {
                 console.log(domain, index, '加载')
-                this.http.post('/sub-project/list',{ 
+                this.http.post('/sub-project/list',{
                     projectId: domain.projectId
                 },
                 res => {

+ 18 - 4
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -243,7 +243,7 @@
             <!-- <van-search v-model="userName" placeholder="输入项目名称搜索" @clear="sea()" @blur="sea()" @search="sea()"></van-search> -->
             <van-search v-model="userName" placeholder="请输入项目名称" @clear="sea()" @blur="sea()" @search="sea()"/>
             <div style="minHeight:300px;">
-                <div v-for="item in projectss" :key="item.id" class="ryuan" @click="fZr(item)">{{item.projectName}}</div>
+                <div v-for="(item, index) in projectss" :key="item.id" class="ryuan" @click="fZr(item, index)">{{item.projectName}}</div>
             </div>
         </van-popup> 
     </div>
@@ -355,7 +355,7 @@
                     this.project = this.proads
                 }
             },
-            fZr(item) {
+            fZr(item,index) {
                 var domainItem = this.form.domains[this.proIdx];
                 domainItem.projectId = item.id;
                 domainItem.projectName = item.projectName;
@@ -370,6 +370,14 @@
                 this.showPickerUserddp = false;
                 //获取子项目
                 this.getSubprojectList(this.form.domains[this.proIdx]);
+                
+                //加载项目相关的工程进度
+                if (this.user.company.packageEngineering == 1){
+                    this.getProjectProfessions(this.form.domains[this.proIdx],index);
+                }
+                // 获取1相关维度
+                var proId = this.form.domains[this.clickIndex].projectId
+                this.getTaskList(proId)
             },
             getSubprojectList(domainItem) {
                 domainItem.subProjectList = [];
@@ -847,8 +855,8 @@
             clickPickerTask(i) {
                 if (!this.canEdit) return;
                 this.clickIndex = i;
-                var proId = this.form.domains[this.clickIndex].projectId
-                this.getTaskList(proId)
+                // var proId = this.form.domains[this.clickIndex].projectId
+                // this.getTaskList(proId)
                 this.showPickerTask = true;
             },
             choseTask(value, index) {
@@ -879,10 +887,12 @@
             },
 
             getProjectProfessions(domain, index) {
+                console.log(domain, '数据')
                 this.$axios.post("/project-profession/getMyProfession", {projectId: domain.projectId})
                         .then(res => {
                             if(res.code == "ok") {
                                 this.form.domains[this.clickIndex].professionProgress = res.data;
+                                console.log(this.form.domains)
                                 this.$forceUpdate();
                             } else {
                                 this.$toast.fail('获取失败');
@@ -1357,6 +1367,10 @@
         height: 40px;
         color: #333;
         border-bottom: 2px solid #f6f6f6;
+        width: 100%;
+        overflow: hidden;
+        text-overflow:ellipsis;
+        white-space: nowrap;
     }
 </style>
 

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

@@ -4,17 +4,17 @@ const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
 // var ip = '127.0.0.1'
-// var ip = '192.168.2.105'
+var ip = '192.168.2.159'
 // var ip = '47.100.37.243'
-var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-for (var i in ifaces) {
-    for (var j in ifaces[i]) {
-        var val = ifaces[i][j]
-        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-            ip = val.address
-        }
-    }
-}
+// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+// for (var i in ifaces) {
+//     for (var j in ifaces[i]) {
+//         var val = ifaces[i][j]
+//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+//             ip = val.address
+//         }
+//     }
+// }
 
 module.exports = {
     // 关闭eslint检查