Pārlūkot izejas kodu

修改图片搜索,关联选择问题

yuanyiming 1 gadu atpakaļ
vecāks
revīzija
b2600b89ab

+ 1 - 1
src/views/eva/components/selects.vue

@@ -9,7 +9,7 @@
         <div v-for="(i, index) in listContent" :key="index + 'q'">
           <div class="choosePerTxt" :style="{ display: choosePer.includes(i.id) ? '' : 'none' }">
             {{ i.name }}
-            <img @click="delStu(i.id)" src="@/assets/images/eva/cha.png" alt="" />
+            <img @click.stop="delStu(i.id)" src="@/assets/images/eva/cha.png" alt="" />
           </div>
         </div>
       </div>

+ 9 - 7
src/views/eva/index.vue

@@ -55,14 +55,9 @@ export default {
       searchList: []
     }
   },
-  mounted() {
-    // this.$nextTick(() => {
-    //   this.$refs.myButton.click()
-    // })
-  },
   watch: {
     userName(val) {
-      console.log(val)
+      // console.log(val)
       if (val !== '') {
         this.likeSearch(val)
       } else {
@@ -81,7 +76,7 @@ export default {
         console.log('res', res)
         this.searchList = res[0]
         if (!res[0].length) {
-          this.searchList = [{ username: '展示没有您想要查询的学生' }]
+          this.searchList = [{ username: '暂时没有您想要查询的学生' }]
         }
       })
     },
@@ -126,6 +121,7 @@ export default {
       })
     }
   },
+  mounted() {},
   created() {
     this.getData()
     console.log('state', this.$store.state)
@@ -138,15 +134,18 @@ export default {
   width: 100px;
   text-align: center;
 }
+
 /deep/ .van-tabs__line {
   width: 90px;
   height: 2px;
   flex-shrink: 0;
   background: #4a8efc;
 }
+
 /deep/ .van-tab__pane {
   height: calc(100vh - 150px);
 }
+
 .searchPage {
   width: 100%;
   box-sizing: border-box;
@@ -160,12 +159,14 @@ export default {
   width: 100%;
   // height: 54px;
 }
+
 .students {
   width: 95%;
   display: flex;
   // justify-content: space-between;
   flex-wrap: wrap;
   margin: 10px;
+
   .stuBlock {
     min-width: 100px;
     margin-top: 10px;
@@ -195,6 +196,7 @@ export default {
 
   // 搜索框结束
 }
+
 .claTit {
   margin-top: 20px;
   margin-left: 10px;

+ 17 - 12
src/views/eva/searchStudentEva.vue

@@ -283,30 +283,32 @@ export default {
       this.$forceUpdate()
     },
     save() {
-      // console.log(this.$store.state);
-      if (this.termData[0] === '') {
-        return (this.term = true)
-      }
+      let isOk = 0
+
       if (this.selectWData.length === 0) {
-        return (this.wei = true)
+        this.wei = true
+        isOk = 1
       }
       if (this.visitTime === '') {
-        return (this.tim = true)
+        this.tim = true
+        isOk = 1
       }
+      if (isOk === 1) return
 
       this.isShowMask = true
     },
     amend() {
-      // console.log(this.$store.state);
-      if (this.termData === '') {
-        this.term = true
-      }
+      let isOk = 0
+
       if (this.selectWData.length === 0) {
         this.wei = true
+        isOk = 1
       }
       if (this.visitTime === '') {
-        return (this.tim = true)
+        this.tim = true
+        isOk = 1
       }
+      if (isOk === 1) return
 
       this.isShowMask = true
     },
@@ -391,7 +393,10 @@ export default {
         if (allData.contact !== '') {
           this.selectSData = allData.contact.split(',')
         }
-        this.selectWData = allData.type.split(',')
+        if (allData.type !== '') {
+          this.selectWData = allData.type.split(',')
+        }
+        // this.selectWData = allData.type.split(',')
         this.visitTime = allData.recordDate
         this.place = allData.place
         this.recordCon = allData.recordCon

+ 16 - 12
src/views/eva/studentEvaluate.vue

@@ -294,30 +294,31 @@ export default {
       this.$forceUpdate()
     },
     save() {
-      // console.log(this.$store.state);
-      if (this.termData[0] === '') {
-        return (this.term = true)
-      }
+      let isOk = 0
       if (this.selectWData.length === 0) {
-        return (this.wei = true)
+        this.wei = true
+        isOk = 1
       }
       if (this.visitTime === '') {
-        return (this.tim = true)
+        this.tim = true
+        isOk = 1
       }
+      if (isOk === 1) return
 
       this.isShowMask = true
     },
     amend() {
+      let isOk = 0
       // console.log(this.$store.state);
-      if (this.termData === '') {
-        this.term = true
-      }
       if (this.selectWData.length === 0) {
         this.wei = true
+        isOk = 1
       }
       if (this.visitTime === '') {
-        return (this.tim = true)
+        this.tim = true
+        isOk = 1
       }
+      if (isOk === 1) return
 
       this.isShowMask = true
     },
@@ -410,13 +411,16 @@ export default {
         if (allData.contact !== '') {
           this.selectSData = allData.contact.split(',')
         }
-        this.selectWData = allData.type.split(',')
+        if (allData.type !== '') {
+          this.selectWData = allData.type.split(',')
+        }
+
         this.visitTime = allData.recordDate
         this.place = allData.place
         this.recordCon = allData.recordCon
         this.observeCon = allData.recordTit
         this.recordCon = allData.recordContent
-        if (allData.recordImg !== '' && !allData.recordImg) {
+        if (allData.recordImg !== '') {
           this.imgList = allData.recordImg.split(',')
         }
         this.termData = [allData.term]