|
@@ -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 }
|
|
|
};
|