master
xy 2 years ago
parent fef6d62d4c
commit a8be4c2720

@ -100,12 +100,12 @@
this.select.filter = [{ this.select.filter = [{
"key": "name", "key": "name",
"op": "like", "op": "like",
"value": queryString "value": queryString ? queryString : ''
}] }]
index(this.select).then(res=>{ index(this.select).then(res=>{
console.log(res.data) console.log(res.data)
cb(res.data) cb(res.data)
}); });
}, },
createStateFilter(queryString) { createStateFilter(queryString) {
@ -114,9 +114,9 @@
}; };
}, },
handleSelect(item) { handleSelect(item) {
console.log(item); console.log(item);
this.form.point_id=item.id; this.form.point_id=item.id;
this.form.point=item.name; this.form.point=item?.name;
}, },
show() { show() {
this.isShow = true; this.isShow = true;
@ -170,8 +170,8 @@
const res = await show({ const res = await show({
id: this.id id: this.id
}); });
this.$integrateData(this.form, res); this.$integrateData(this.form, res);
this.form.pointName=res.point.name; this.form.pointName=res.point?.name;
this.form.option_list = res?.options.map(i => { this.form.option_list = res?.options.map(i => {
return { return {
title: i.title, title: i.title,
@ -266,4 +266,4 @@
bottom: 0; bottom: 0;
} }
} }
</style> </style>

@ -29,7 +29,7 @@
<Button <Button
style="margin-left: 10px" style="margin-left: 10px"
type="primary" type="primary"
@click="$refs['addQuestions'].show()" @click=" $refs['addQuestions'].setType('add'), $refs['addQuestions'].setForm(['activity_list_id'],[7]),$refs['addQuestions'].show()"
>新增</Button >新增</Button
> >
</div> </div>
@ -43,6 +43,7 @@
@delete="deleteitem" @delete="deleteitem"
@editor=" @editor="
(row) => { (row) => {
$refs['addQuestions'].setForm(['activity_list_id'],[7]);
$refs['addQuestions'].setId(row.id); $refs['addQuestions'].setId(row.id);
$refs['addQuestions'].setType('editor') $refs['addQuestions'].setType('editor')
$refs['addQuestions'].show(); $refs['addQuestions'].show();

Loading…
Cancel
Save