Browse Source

03/08 11:33

助教老师
mo 4 years ago
parent
commit
fde0173176

+ 15 - 5
src/components/remote-search/index.vue

@@ -1,5 +1,6 @@
 <template>
   <div>
+    <!--    @focus="onFocus" -->
     <el-select
       v-bind="{...$attrs}"
       :value="value"
@@ -10,7 +11,7 @@
       :multiple="multiple"
       :placeholder="placeholder"
       :remote-method="remoteMethod"
-      @focus="remoteMethod"
+
       :loading="loading"
       @change="changeValue"
       :style="{ width: this.selectWidt + 'px!important' }"
@@ -68,17 +69,19 @@ export default {
         this.list.length <= this.constant
           ? this.list
           : slice(this.list, 0, this.constant);
-
+     this.options = uniqBy(this.options, 'userId')
             //  console.log(this.options)
     },
     remoteMethod(query) {
       // throttle
+
       throttle(this.getOptions, 800)(query);
     },
     async getOptions(query) {
+
       if (query&&query.length>0) {
         let flag;
-        this.options = this.list.filter((item) => {
+        this.options = uniqBy(this.list.filter((item) => {
           flag =
             item.userName.toLowerCase().indexOf(query.toString().toLowerCase()) > -1 ||
             item.userId == query;
@@ -88,7 +91,7 @@ export default {
             // console.log(query,this.value)
             return flag || item.userId == this.value;
           }
-        });
+        }), 'userId')
       } else {
           try{
              await this.getList()
@@ -106,10 +109,17 @@ export default {
       }
     },
     changeValue(val) {
+      console.log('调用changeValue')
       this.isFirst = false;
       this.$emit("input", val);
       this.$emit("change", val);
+
     },
+    onFocus(val){
+
+      //  getOptions
+    }
+
   },
   computed: {
     enumer() {
@@ -125,7 +135,7 @@ export default {
       deep: true,
       handler(val) {
         // && this.isFirst
-        if (this.multiple) {
+        if (this.multiple&& this.isFirst) {
           if (val?.length > 0 ) {
            this.getOptions()
           }

+ 2 - 1
src/router/notKeepAliveList.js

@@ -93,5 +93,6 @@ export default [
   '/business/teamDraft',
   '/business/teamAudit',
   '/business/auditFailed',
-  // '/business/feeAudit', 
+  '/business/resetTeaming', // 进行中修改
+  // '/business/feeAudit',
 ]

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

@@ -517,7 +517,8 @@ export default {
       if (this.$route.query.id) {
         // 单团修改
         this.teamid = this.$route.query.id;
-        let sotrage = JSON.parse(sessionStorage.getItem(`${this.$route.query.id}base`)) ;
+        let sotrage = JSON.parse(sessionStorage.getItem(`${this.$route.query.id}base`));
+        console.log(sotrage)
         if (!sotrage?.section) {
 
           getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {

+ 6 - 2
src/views/teamDetail/teamList.vue

@@ -570,12 +570,16 @@ export default {
     },
     resetTeaming(row) {
       // 修改进行中的乐团
-         sessionStorage.removeItem(`${row.id}base`);
+      console.log(row.id)
+      sessionStorage.removeItem(`${row.id}base`);
       sessionStorage.removeItem(`${row.id}sound`);
-      this.$router.push({
+      this.$nextTick(res=>{
+           this.$router.push({
         path: "/business/resetTeaming",
         query: { type: "resetTeam", id: row.id },
       });
+      })
+
     },
     setSearchList(obj) {
       //

+ 2 - 2
vue.config.js

@@ -21,8 +21,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-let target = 'http://47.114.176.40:8000' // 测试服
-// let target = 'http://192.168.3.134' // 乔
+// let target = 'http://47.114.176.40:8000' // 测试服
+let target = 'http://dev.dayaedu.com/' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**