小彬 7 months ago
parent
commit
5a5bd1d0a6

+ 17 - 4
src/views/roadshow_manage/compononts/addParticipateDia.vue

@@ -4,7 +4,7 @@
         :visible.sync="isAddParticipateShow"
         width="500px"
         append-to-body
-        @close="$emit('close')"
+        @close="closeDlg"
     >
         <div class="partic-dialog-container">
             <div v-if="isShowPermission" style="margin-bottom:20px">
@@ -45,7 +45,7 @@
         </div>
         <div slot="footer" class="dialog-footer" style="text-align: center;">
             <el-button type="primary" @click="confirmPerson">确定</el-button>
-            <el-button @click="$emit('close')">取消</el-button>
+            <el-button @click="closeDlg">取消</el-button>
         </div>
     </el-dialog>
 </template>
@@ -173,7 +173,8 @@ export default {
                 this.$emit('confirm')
             })
         },
-      async remoteMethodHandler(query){
+        // 获取标签
+        async remoteMethodHandler(query){
           if (query !== '') {
             let KeyWord = this.tagName? this.tagName + ',' + query : query;
             const res = await roadshowInterence.rai_serve_search_tag({
@@ -187,6 +188,7 @@ export default {
             this.hashtagOptions =[]
           }
         },
+        // 选择标签
         tagSelectHandler(){
             let tagListArr = []
             let nameArr = []
@@ -202,12 +204,23 @@ export default {
             this.tagList = tagListArr
             this.tagName = nameArr.join(',')
         },
-      async getIsPermissionName(){
+        // 进入看看是否是策略
+        async getIsPermissionName(){
             const res = await roadshowInterence.rai_serve_search_chcck_PermissionName({ResearcherId:this.ResearcherId})
               if( res.Ret===200 ){
                 this.chartPermissionName = res.Data.ChartPermissionName
                 this.isShowPermission = res.Data.Belong
             }
+        },
+        // 关闭弹框
+        closeDlg(){
+            this.hashtagValue = ''// 主题标签
+            this.hashtagOptions = []// 主题数据
+            this.tagList = []// /标签类型
+            this.tagName =  ''
+            this.chartPermissionName = ''
+            this.isShowPermission = false
+            this.$emit('close')
         }
     },
 };

+ 18 - 4
src/views/roadshow_manage/compononts/showParticipateListDia.vue

@@ -4,7 +4,7 @@
         :visible.sync="isParticipateShow"
         width="700px"
         append-to-body
-        @close="$emit('close')"
+        @close="closeDlg"
     >
         <div class="partic-list-dialog-container">
             <div v-if="isShowPermission" style="margin-bottom:20px">
@@ -35,7 +35,7 @@
             </div>
         </div>
         <div slot="footer" class="dialog-footer" style="text-align: center;">
-            <el-button @click="$emit('close')">关闭</el-button>
+            <el-button @click="closeDlg">关闭</el-button>
             <el-button type="primary" @click="saveTagsHandler">保存</el-button>
 
         </div>
@@ -117,6 +117,7 @@ export default {
                 this.getTableData()
             })
         },
+        // 获取标签
         async remoteMethodHandler(query){
           if (query !== '') {
             let KeyWord = this.tagName? this.tagName + ',' + query : query;
@@ -125,12 +126,13 @@ export default {
                 ResearcherId:this.ResearcherId,
             })
             if( res.Ret===200 ){
-                this.hashtagOptions = this.hashtagOptions.concat(res.Data.List || [])
+                this.hashtagOptions = res.Data.List || []
             }
           }else if(!this.hashtagValue.length && !query){
             this.hashtagOptions =[]
           }
         },
+        // 标签选择后处理
         tagSelectHandler(){
             let tagListArr = []
             let nameArr = []
@@ -146,6 +148,7 @@ export default {
             this.tagList = tagListArr
             this.tagName = nameArr.join(',')
         },
+        // 提交标签
         saveTagsHandler(){
             if(!this.hashtagValue.length) return this.$message.error('请输入主题标签')
             roadshowInterence.addMeetingUser({
@@ -157,12 +160,23 @@ export default {
                 this.getTableData()
             })
         },
+        // 进入看看是否是策略
         async getIsPermissionName(){
-            const res = await roadshowInterence.rai_serve_search_chcck_PermissionName()
+            const res = await roadshowInterence.rai_serve_search_chcck_PermissionName({ResearcherId:this.ResearcherId})
               if( res.Ret===200 ){
                 this.chartPermissionName = res.Data.ChartPermissionName
                 this.isShowPermission = res.Data.Belong
             }
+        },
+        // 关闭弹框
+         closeDlg(){
+            this.hashtagValue = ''// 主题标签
+            this.hashtagOptions = []// 主题数据
+            this.tagList = []// /标签类型
+            this.tagName =  ''
+            this.chartPermissionName = ''
+            this.isShowPermission = false
+            this.$emit('close')
         }
     },
     components: { addParticipateDia }