From 97d000b15db3803c7df3fb16ba31eda43760f0e0 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Tue, 30 Jan 2024 16:48:17 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/addQuestions.vue | 57 +++++++++++++++----
.../PartyshistoryRecoder/studyQuestion.vue | 9 ++-
2 files changed, 55 insertions(+), 11 deletions(-)
diff --git a/src/views/PartyshistoryRecoder/components/addQuestions.vue b/src/views/PartyshistoryRecoder/components/addQuestions.vue
index 91acb85..5466e10 100644
--- a/src/views/PartyshistoryRecoder/components/addQuestions.vue
+++ b/src/views/PartyshistoryRecoder/components/addQuestions.vue
@@ -13,15 +13,26 @@
-
+
+
+
@@ -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;
diff --git a/src/views/PartyshistoryRecoder/studyQuestion.vue b/src/views/PartyshistoryRecoder/studyQuestion.vue
index a0debec..304d274 100644
--- a/src/views/PartyshistoryRecoder/studyQuestion.vue
+++ b/src/views/PartyshistoryRecoder/studyQuestion.vue
@@ -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: "题目",