Browse Source

等更换传参

bding 10 months ago
parent
commit
e5be7f8c4c

+ 4 - 0
src/api/modules/roadshowApi.js

@@ -364,6 +364,10 @@ const roadshowInterence={
 	rai_serve_search_tag:params => {
 		return http.get('/cygx/rai_serve/search_tag_by_calendar',params)
 	},	
+	//校验是否属于策略固收接口
+	rai_serve_search_chcck_PermissionName:params => {
+		return http.get('/cygx/rai_serve/chcck_PermissionName',params)
+	},	
 }
 
 export {

+ 22 - 13
src/views/roadshow_manage/compononts/addParticipateDia.vue

@@ -7,7 +7,8 @@
         @close="$emit('close')"
     >
         <div class="partic-dialog-container">
-            <el-select v-model="hashtagValue" multiple filterable remote reserve-keyword placeholder="请输入路演主题标签(可多选)" :remote-method="remoteMethodHandler" style="width:392px;margin-bottom:20px" @change="tagSelectHandler">
+           <div v-if="isShowPermission">{{this.chartPermissionName}}</div>
+            <el-select v-else  v-model="hashtagValue" multiple filterable remote reserve-keyword placeholder="请输入路演主题标签(可多选)" :remote-method="remoteMethodHandler" style="width:392px;margin-bottom:20px" @change="tagSelectHandler">
                  <el-option v-for="item in hashtagOptions" :key="item.Md5Key" :label="item.TagName" :value="item.Md5Key"> </el-option>
             </el-select>
             <div class="inline" v-for="(item, index) in dynamicItem" :key="index">
@@ -68,8 +69,9 @@ export default {
         isAddParticipateShow(newval){
             if(newval){
                 this.dynamicItem = [{name:'',isShow:false}]
+                this.getIsPermissionName()
             }
-        }
+        },
     },
     data() {
         return {
@@ -79,8 +81,9 @@ export default {
             warningIsShow:false,
             hashtagValue:'',// 主题标签
             hashtagOptions:[],// 主题数据
-            tagIdTypes:[],// /标签类型
-            tagIds:[],//标签ID
+            tagList:[],// /标签类型
+            chartPermissionName:'',
+            isShowPermission:false
         };
     },
     methods: {
@@ -160,8 +163,7 @@ export default {
             roadshowInterence.addMeetingUser({
                 RsCalendarId:this.RsCalendarId,
                 UserId:useId,
-                TagType:this.tagIdTypes,
-                TagId:this.tagIds
+                TagList:this.tagList
             }).then(res=>{
                 if(res.Ret!==200) return 
                 this.$message.success('提交成功')
@@ -175,23 +177,30 @@ export default {
                 ResearcherId:this.ResearcherId,
             })
             if( res.Ret===200 ){
-                this.hashtagOptions = res.Data.List || []
+                this.hashtagOptions = this.hashtagOptions.concat(res.Data.List || [])
             }
           }else if(!this.hashtagValue.length && !query){
             this.hashtagOptions =[]
           }
         },
         tagSelectHandler(){
-            let types = []
-            let ids =[]
+            let tagListArr = []
             this.hashtagOptions.forEach(item=>{
                 if(this.hashtagValue.length && this.hashtagValue.includes(item.Md5Key)) {
-                    types.push(item.TagType)
-                    ids.push(item.TagId)
+                    tagListArr.push({
+                       TagType: item.TagType,
+                       TagId: item.TagId,
+                    })
                 }
             })
-            this.tagIdTypes = types
-            this.tagIds = ids
+            this.tagList = tagListArr
+        },
+      async getIsPermissionName(){
+            const res = await roadshowInterence.rai_serve_search_chcck_PermissionName()
+              if( res.Ret===200 ){
+                this.chartPermissionName = res.Data.ChartPermissionName
+                this.isShowPermission = res.Data.Belong
+            }
         }
     },
 };

+ 30 - 14
src/views/roadshow_manage/compononts/showParticipateListDia.vue

@@ -7,8 +7,9 @@
         @close="$emit('close')"
     >
         <div class="partic-list-dialog-container">
-            <el-select v-model="hashtagValue" multiple filterable remote reserve-keyword placeholder="请输入路演主题标签(可多选)" :remote-method="remoteMethodHandler" style="width:392px;margin-bottom:20px" @change="tagSelectHandler">
-                 <el-option v-for="item in hashtagOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+            <div v-if="isShowPermission">{{this.chartPermissionName}}</div>
+            <el-select v-else v-model="hashtagValue" multiple filterable remote reserve-keyword placeholder="请输入路演主题标签(可多选)" :remote-method="remoteMethodHandler" style="width:392px;margin-bottom:20px" @change="tagSelectHandler">
+                <el-option v-for="item in hashtagOptions" :key="item.Md5Key" :label="item.TagName" :value="item.Md5Key"> </el-option>
             </el-select>
             <el-table :data="tableData" border>
                 <el-table-column align="center"
@@ -67,16 +68,16 @@ export default {
         return {
             tableData: [],
             isAddShow:false,
-            hashtagValue:'',// 主题标签
+            hashtagValue:[],// 主题标签
             hashtagOptions:[],// 主题数据
-            tagIdTypes:[],// /标签类型
-            tagIds:[],//标签ID
+            tagList:[],// /标签类型
         };
     },
     watch: {
         isParticipateShow(newval) {
             if (newval) {
                 this.getTableData();
+                this.getIsPermissionName()
             }
         },
     },
@@ -88,6 +89,15 @@ export default {
                 if (res.Ret !== 200)
                     return;
                 this.tableData = res.Data.List;
+                this.hashtagOptions = res.Data.ListLebel
+                console.log(res);
+                if(this.hashtagOptions.length){
+                    this.hashtagValue = []
+                    this.hashtagOptions.forEach(item=>{
+                        this.hashtagValue.push(item.Md5Key)
+                    })
+                    this.tagSelectHandler()
+                }
             });
         },
         addItem() {
@@ -109,35 +119,41 @@ export default {
                 ResearcherId:this.ResearcherId,
             })
             if( res.Ret===200 ){
-                this.hashtagOptions = res.Data.List || []
+                this.hashtagOptions = this.hashtagOptions.concat(res.Data.List || [])
             }
           }else if(!this.hashtagValue.length && !query){
             this.hashtagOptions =[]
           }
         },
         tagSelectHandler(){
-            let types = []
-            let ids =[]
+            let tagListArr = []
             this.hashtagOptions.forEach(item=>{
                 if(this.hashtagValue.length && this.hashtagValue.includes(item.Md5Key)) {
-                    types.push(item.TagType)
-                    ids.push(item.TagId)
+                    tagListArr.push({
+                       TagType: item.TagType,
+                       TagId: item.TagId,
+                    })
                 }
             })
-            this.tagIdTypes = types
-            this.tagIds = ids
+            this.tagList = tagListArr
         },
         saveTagsHandler(){
             if(!this.hashtagValue.length) return this.$message.error('请输入主题标签')
             roadshowInterence.addMeetingUser({
                 RsCalendarId:this.RsCalendarId,
-                TagType:this.tagIdTypes,
-                TagId:this.tagIds
+                TagList:this.tagList
             }).then(res=>{
                 if(res.Ret!==200) return 
                 this.$message.success('提交成功')
                 this.getTableData()
             })
+        },
+        async getIsPermissionName(){
+            const res = await roadshowInterence.rai_serve_search_chcck_PermissionName()
+              if( res.Ret===200 ){
+                this.chartPermissionName = res.Data.ChartPermissionName
+                this.isShowPermission = res.Data.Belong
+            }
         }
     },
     components: { addParticipateDia }