Explorar o código

Merge branch '03/03SAVECHECK' into online

Xiao_Mo %!s(int64=4) %!d(string=hai) anos
pai
achega
840d3ddfa2

+ 36 - 9
src/components/remote-search/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-select
+    <el-select v-if='!multiple'
       v-bind="{...$attrs}"
       :value="value"
       filterable
@@ -22,6 +22,29 @@
       >
       </el-option>
     </el-select>
+
+
+        <el-select v-else
+      v-bind="{...$attrs}"
+      :value="value"
+      filterable
+      remote
+      reserve-keyword
+      clearable
+      :multiple="multiple"
+      :placeholder="placeholder"
+      :loading="loading"
+      @change="changeValue"
+      :style="{ width: this.selectWidt + 'px!important' }"
+    >
+      <el-option
+        v-for="(item, index) in options"
+        :key="index"
+        :label="item.userName"
+        :value="item.userId"
+      >
+      </el-option>
+    </el-select>
   </div>
 </template>
 <script>
@@ -63,17 +86,24 @@ export default {
         data[item.userId] = item
       }
       this.listById = data
-
-      this.options =
+    if(this.multiple){
+       this.options =this.list
+    }else{
+       this.options =
         this.list.length <= this.constant
           ? this.list
           : slice(this.list, 0, this.constant);
+    }
+     
 
             //  console.log(this.options)
     },
     remoteMethod(query) {
       // throttle
-      throttle(this.getOptions, 800)(query);
+      if(!this.multiple){
+         throttle(this.getOptions, 800)(query);
+      }
+     
     },
     async getOptions(query) {
 
@@ -84,26 +114,23 @@ export default {
             item.userName.toLowerCase().indexOf(query.toString().toLowerCase()) > -1 ||
             item.userId == query;
           if (this.multiple) {
+            console.log(this.value,this.value.includes(item.userId),item.userId)
             return flag || this.value.includes(item.userId);
           } else {
             // console.log(query,this.value)
             return flag || item.userId == this.value;
           }
         });
+  
       } else {
           try{
              await this.getList()
           const optionids = this.options.map(item => item.userId)
-
           const valueItem = this.listById[this.value]
-
           if (!optionids.includes(this.value) && valueItem) {
             this.options.push(valueItem)
             this.options = uniqBy(this.options, 'userId')
           }
-
-
-
           }catch(e){
             // console.log(e)
           }

+ 4 - 3
src/router/notKeepAliveList.js

@@ -92,7 +92,8 @@ export default [
   '/business/strudentPayInfo',
   '/timedTask/timedTask',
   '/business/createPayment',
-  '/business/teamDraft'
-  // '/business/teamAudit',
-  // '/business/feeAudit',
+  '/business/teamDraft',
+  '/business/teamAudit',
+  '/business/auditFailed',
+  // '/business/feeAudit', 
 ]

+ 1 - 0
src/views/teamBuild/components/teamBaseInfo.vue

@@ -454,6 +454,7 @@ export default {
 
   },
   beforeDestroy(){
+
     sessionStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
   },