Browse Source

等后端参数

bding 7 months ago
parent
commit
4a0d9deb6d

+ 7 - 5
src/views/roadshow_manage/compononts/addParticipateDia.vue

@@ -159,7 +159,9 @@ export default {
             if(!useId.length) return this.$message.error('请输入姓名')
             roadshowInterence.addMeetingUser({
                 RsCalendarId:this.RsCalendarId,
-                UserId:useId
+                UserId:useId,
+                TagType:this.tagIdTypes,
+                TagId:this.tagIds
             }).then(res=>{
                 if(res.Ret!==200) return 
                 this.$message.success('提交成功')
@@ -175,7 +177,7 @@ export default {
             if( res.Ret===200 ){
                 this.hashtagOptions = res.Data.List || []
             }
-          }else if(!this.hashtagValue && !query){
+          }else if(!this.hashtagValue.length && !query){
             this.hashtagOptions =[]
           }
         },
@@ -183,13 +185,13 @@ export default {
             let types = []
             let ids =[]
             this.hashtagOptions.forEach(item=>{
-                if(this.hashtagValue && this.hashtagValue.includes(item.Md5Key)) {
+                if(this.hashtagValue.length && this.hashtagValue.includes(item.Md5Key)) {
                     types.push(item.TagType)
                     ids.push(item.TagId)
                 }
             })
-            
-            console.log(arr,this.hashtagValue);
+            this.tagIdTypes = types
+            this.tagIds = ids
         }
     },
 };

+ 46 - 5
src/views/roadshow_manage/compononts/showParticipateListDia.vue

@@ -7,7 +7,7 @@
         @close="$emit('close')"
     >
         <div class="partic-list-dialog-container">
-            <el-select v-model="hashtagValue" multiple filterable remote reserve-keyword placeholder="请输入路演主题标签(可多选)" :remote-method="remoteMethod" style="width:392px;margin-bottom:20px">
+            <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>
             </el-select>
             <el-table :data="tableData" border>
@@ -32,8 +32,9 @@
             </div>
         </div>
         <div slot="footer" class="dialog-footer" style="text-align: center;">
-            <el-button type="primary" @click="$emit('close')">确定</el-button>
-            <el-button @click="$emit('close')">取消</el-button>
+            <el-button @click="$emit('close')">关闭</el-button>
+            <el-button type="primary" @click="saveTagsHandler">保存</el-button>
+
         </div>
         <addParticipateDia 
             :isAddParticipateShow="isAddShow"
@@ -56,6 +57,10 @@ export default {
         RsCalendarId: {
             type: Number,
             default: 0
+        },
+        ResearcherId:{
+            type:Number,
+            default:0
         }
     },
     data() {
@@ -64,6 +69,8 @@ export default {
             isAddShow:false,
             hashtagValue:'',// 主题标签
             hashtagOptions:[],// 主题数据
+            tagIdTypes:[],// /标签类型
+            tagIds:[],//标签ID
         };
     },
     watch: {
@@ -95,9 +102,43 @@ export default {
                 this.getTableData()
             })
         },
-        remoteMethod(query){
-          if (query !== '') {}
+        async remoteMethodHandler(query){
+          if (query !== '') {
+            const res = await roadshowInterence.rai_serve_search_tag({
+                KeyWord:query,
+                ResearcherId:this.ResearcherId,
+            })
+            if( res.Ret===200 ){
+                this.hashtagOptions = res.Data.List || []
+            }
+          }else if(!this.hashtagValue.length && !query){
+            this.hashtagOptions =[]
+          }
+        },
+        tagSelectHandler(){
+            let types = []
+            let ids =[]
+            this.hashtagOptions.forEach(item=>{
+                if(this.hashtagValue.length && this.hashtagValue.includes(item.Md5Key)) {
+                    types.push(item.TagType)
+                    ids.push(item.TagId)
+                }
+            })
+            this.tagIdTypes = types
+            this.tagIds = ids
         },
+        saveTagsHandler(){
+            if(!this.hashtagValue.length) return this.$message.error('请输入主题标签')
+            roadshowInterence.addMeetingUser({
+                RsCalendarId:this.RsCalendarId,
+                TagType:this.tagIdTypes,
+                TagId:this.tagIds
+            }).then(res=>{
+                if(res.Ret!==200) return 
+                this.$message.success('提交成功')
+                this.getTableData()
+            })
+        }
     },
     components: { addParticipateDia }
 };

+ 5 - 5
src/views/roadshow_manage/myCalendar.vue

@@ -158,12 +158,12 @@
                   <span 
                     class="deletesty"
                     v-if="row.SubmitButton"
-                    @click="submitAttendees(row)"
+                    @click="submitAttendees(row,'提交')"
                   >提交参会名单</span>
                   <span
                     class="editsty"
                     v-if="row.ViewButton"
-                    @click="currentRsCalendarId=row.RsCalendarId;isParticipateShow=true;"
+                    @click="submitAttendees(row,'查看')"
                   >查看参会名单
                   </span>
             </template>
@@ -304,6 +304,7 @@
     <showParticipateListDia 
         :isParticipateShow="isParticipateShow"
         :RsCalendarId="currentRsCalendarId"
+        :ResearcherId="currentResearcherId"
         @close="isParticipateShow=false"
     />
   </div>
@@ -737,9 +738,8 @@ export default {
       this.handleArr = handleArr(this.default_tab);
     },
     // 提交参会名单
-    submitAttendees(row){
-      console.log(112333);
-      this.isAddParticipateShow = true
+    submitAttendees(row,type){
+      type==='查看'? (this.isParticipateShow = true)  : (this.isAddParticipateShow = true)
       this.currentRsCalendarId = row.RsCalendarId
       this.currentResearcherId = row.ResearcherId
     },