Ver Fonte

调整项目选择参与人

Lijy há 3 anos atrás
pai
commit
ab83761a39

+ 10 - 10
fhKeeper/formulahousekeeper/timesheet/config/index.js

@@ -4,19 +4,19 @@ var path = require('path')
 // var ip = '192.168.2.36'
 
  
-// var ip = '47.100.37.243' 
+var ip = '47.100.37.243' 
 // var ip = '192.168.2.159'
 
-var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+// 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
-        }
-    }
-}
+// 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 = {
   build: {

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -53,7 +53,7 @@
             </el-table-column>
             <el-table-column prop="totalCost" label="总成本" ></el-table-column>
         </el-table>
-        
+         
         <el-form :inline="true" >
             <el-form-item >
                 <!-- <el-checkbox style="margin-left:10px;" v-model="assignNoProUser" @click="assignToProject">均摊无项目人员成本</el-checkbox> -->
@@ -545,6 +545,7 @@
                
             },
             saveItems() {
+                console.log(this.list, '12345')
                 this.http.post('/finance-tblcuscol/save', this.customFieldList,
                     res => {
                         if (res.code == "ok") {

+ 16 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -407,9 +407,13 @@
             <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
             <div class="tree" style="height:400px">
                 <el-scrollbar style="height:100%">
+                    <el-input
+                    placeholder="输入关键字进行过滤"
+                    v-model="filterText">
+                    </el-input>
                 <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
                     ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="addForm.userId"
-                    highlight-current ></el-tree>
+                    highlight-current  :filter-node-method="filterNode" default-expand-all></el-tree>
                 </el-scrollbar>
             </div>
             <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>
@@ -579,7 +583,8 @@ a {
                 },
                 ause: [],
                 auseList: [],
-                yonghuUser: []
+                yonghuUser: [],
+                filterText: ''
             };
         },
         // 过滤器
@@ -601,9 +606,18 @@ a {
                 return intPartFormat + '.' + floatPart
                 }
                 return intPartFormat + floatPart
+            },
+        },
+        watch: {
+            filterText(val) {
+                this.$refs.chooseMembTree.filter(val);
             }
         },
         methods: {
+            filterNode(value, data) {
+                if (!value) return true;
+                return data.label.indexOf(value) !== -1;
+            },
             //重启项目
             restartPro(row) {
                 this.http.post('/project/start',{id: row.id},