master
lion 2 years ago
parent 44a7676e3b
commit 97d000b15d

@ -13,15 +13,26 @@
</div>
</div>
</template>
<template v-slot:activity_list_name>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"></span>
项目名称
</div>
<div class="xy-table-item-content">
<el-autocomplete v-model="form.activity_list_name" value-key="name" clearable placeholder="请输入项目名称"
style="width: 300px" :fetch-suggestions="queryActiveSearchAsync" @select="handleActiveSelect"></el-autocomplete>
</div>
</div>
</template>
<template v-slot:pointName>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px">*</span>
<span style="color: red; font-weight: 600; padding-right: 4px"></span>
点位场馆
</div>
<div class="xy-table-item-content">
<el-autocomplete v-model="form.pointName" value-key="name" clearable placeholder="请输入题目"
<el-autocomplete v-model="form.pointName" value-key="name" clearable placeholder="请输入点位场馆"
style="width: 300px" :fetch-suggestions="querySearchAsync" @select="handleSelect"></el-autocomplete>
</div>
</div>
@ -62,7 +73,9 @@
show,
save
} from "@/api/party/studyQuestion";
import {
index as activeIndex
} from "@/api/activity/index";
import {
index
} from "@/api/index";
@ -77,13 +90,15 @@
page: 1,
page_size: 999,
table_name: "map_points",
activity_list_id: 7,
activity_list_id: '',
filter: [],
},
form: {
activity_list_id: 7,
// activity_list_id: '',
title: "",
point_id: "",
point_id: "",
activity_list_id:'',
activity_list_name:'',
pointName: "",
option_list: [],
},
@ -117,7 +132,24 @@
console.log(item);
this.form.point_id=item.id;
this.form.point=item?.name;
},
},
queryActiveSearchAsync(queryString, cb) {
let select = {
page: 1,
page_size: 999,
keyword:queryString ? queryString : ''
}
activeIndex(select).then(res=>{
console.log(res.data)
cb(res.data)
});
},
handleActiveSelect(item) {
console.log(item);
this.form.activity_list_id=item.id;
this.form.activity_list_name=item?.name;
},
show() {
this.isShow = true;
},
@ -171,7 +203,10 @@
id: this.id
});
this.$integrateData(this.form, res);
this.form.pointName=res.point?.name;
this.form.pointName=res.point?.name;
// activity_list_id:'',
// activity_list_name:'',
this.form.activity_list_name = res.activity_list?.name
this.form.option_list = res?.options.map(i => {
return {
title: i.title,
@ -181,7 +216,9 @@
})
},
submit() {
submit() {
console.log(this.form)
// return
if (this.type === "add") {
if (this.form.hasOwnProperty("id")) {
delete this.form.id;

@ -74,7 +74,8 @@ export default {
page: 1,
page_size: 20,
keyword: "",
activity_list_id: 7,
// activity_list_id: 7,
activity_list_id: '',
},
listActivity: [],
total: 0,
@ -86,6 +87,12 @@ export default {
minWidth: 220,
align: "left",
},
{
prop: "activity_list.name",
label: "项目名称",
minWidth: 220,
align: "left",
},
{
prop: "title",
label: "题目",

Loading…
Cancel
Save