浏览代码

再次提交

Lijy 3 年之前
父节点
当前提交
1fe1192723

+ 26 - 5
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/search.vue

@@ -2,14 +2,16 @@
   <div style="background: #fff;">
       <van-nav-bar title="选择项目" left-text="返回" @click-left="back()" fixed left-arrow/>
       <van-search v-model="value" placeholder="请输入项目名称" @clear="sea()" @blur="sea()" @search="sea()" style="margin-top: 45px;"/>
-      <van-radio-group v-model="checkeds">
+      <!-- <van-radio-group v-model="checkeds">
           <div v-for="item in project" :key="item.id" class="prejectList">
             <van-radio :name="item">{{item.projectName}}</van-radio>
           </div>
-      </van-radio-group>
+      </van-radio-group> -->
+      <div class="list" v-for="item in project" :key="item.id" @click="addts(item)">{{item.projectName}}</div>
       <div v-if="project.length == 0" class="adds">暂无数据</div>
       <div style="width: 100%;height: 44px;"></div>
-      <div class="qued" @click="qued()">确定</div>
+      <!-- <div class="qued" @click="qued()">确定</div>
+       -->
   </div>
 </template>
 
@@ -24,12 +26,22 @@ export default {
         checkeds: '',
         pro: '',
         from: '',
-        idx: 0
+        idx: 0,
+        dingshiqiL: null
     };
   },
   computed: {},
   watch: {
-      '$route': 'getParams'
+      '$route': 'getParams',
+      value(val) {
+          var that = this
+          if(that.dingshiqiL) {
+              clearTimeout(that.dingshiqiL)
+          }
+          that.dingshiqiL = setTimeout(() => {
+            that.sea()
+          }, 500)
+      }
   },
   created() {
       this.getParams()
@@ -61,6 +73,10 @@ export default {
       back() {
           this.$router.go(-1);
       },
+      addts(item) {
+          this.checkeds = item
+          this.qued()
+      },
       qued() {
           console.log(this.checkeds)
           if(this.checkeds == '') {
@@ -73,6 +89,7 @@ export default {
           }
       },
       sea() {
+          console.log(1234567)
           if(this.value.length > 0) {
               let text = this.value
               let reg = new RegExp(text)
@@ -117,4 +134,8 @@ export default {
         line-height: 85px;
         color: #b6b6b6;
     }
+    .list {
+        padding: 15px 20px;
+        border-bottom: 1px solid #f6f6f6;
+    }
 </style>

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

@@ -5,16 +5,16 @@ const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
 // var ip = '127.0.0.1'
 // var ip = '192.168.2.105'
-// 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 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
+//         }
+//     }
+// }
 
 module.exports = {
     // 关闭eslint检查