@@ -266,10 +276,14 @@
import {
show,
save
- } from "@/api/index";
- import { index as activityIndex } from "@/api/activity/index";
- import tinymce from "@/components/XyTinymce"
- import {getparameteritem} from "@/api/system/dictionary.js"
+ } from "@/api/index";
+ import {
+ index as activityIndex
+ } from "@/api/activity/index";
+ import tinymce from "@/components/XyTinymce"
+ import {
+ getparameteritem
+ } from "@/api/system/dictionary.js"
export default {
components: {
tinymce
@@ -277,25 +291,27 @@
props: {},
data() {
return {
- isShow: false,
- hasActiveId:false,
+ isShow: false,
+ hasActiveId: false,
id: "",
type: "",
- image_id: [],
- logo_id:[],
+ image_id: [],
+ logo_id: [],
+ qrcode_id: [],
video_image_id: [],
action: process.env.VUE_APP_UPLOAD_API,
video_id: [],
- listActivity:[],
- listTheme:[],
+ listActivity: [],
+ listTheme: [],
form: {
- activity_list_id: '',
- theme_id:'',
- name: "",
- iswx:'',
- appid:'',
- path:'',
- logo_id:'',
+ activity_list_id: '',
+ theme_id: '',
+ name: "",
+ iswx: '',
+ appid: '',
+ path: '',
+ logo_id: '',
+ qrcode_id: '',
image_id: "",
lat: "",
lng: "",
@@ -303,15 +319,15 @@
y: "",
jiaodu: "",
video_id: "",
- video_image_id: "",
- config:[{
- key:'address',
- name:'详细地址',
- value:''
- },{
- key:'time',
- name:'开放时间',
- value:''
+ video_image_id: "",
+ config: [{
+ key: 'address',
+ name: '详细地址',
+ value: ''
+ }, {
+ key: 'time',
+ name: '开放时间',
+ value: ''
}],
content: "",
},
@@ -322,24 +338,24 @@
}, ],
},
};
- },
- created(){
- // this.loadActivity()
- this.getTheme()
-
},
- methods: {
- async loadActivity() {
- const res = await activityIndex({
- page: 1,
- page_size: 999,
- });
- this.listActivity = res.data;
- },
- getTheme(){
- getparameteritem('theme').then(res=>{
- this.listTheme = res.detail
- })
+ created() {
+ // this.loadActivity()
+ this.getTheme()
+
+ },
+ methods: {
+ async loadActivity() {
+ const res = await activityIndex({
+ page: 1,
+ page_size: 999,
+ });
+ this.listActivity = res.data;
+ },
+ getTheme() {
+ getparameteritem('theme').then(res => {
+ this.listTheme = res.detail
+ })
},
show() {
this.isShow = true;
@@ -363,13 +379,13 @@
} else {
console.error("error typeof id: " + typeof id);
}
- },
- setList(e){
- if(e){
- this.listActivity = e
- }else{
- this.loadActivity()
- }
+ },
+ setList(e) {
+ if (e) {
+ this.listActivity = e
+ } else {
+ this.loadActivity()
+ }
},
getId() {
return this.id;
@@ -393,9 +409,9 @@
}
if (!key) {
this.init();
- }
- if(this.form.activity_list_id){
- this.hasActiveId = true
+ }
+ if (this.form.activity_list_id) {
+ this.hasActiveId = true
}
},
@@ -419,48 +435,53 @@
return false;
}
},
- addRow() {
- this.form.config.push({
- name: "",
- key: "",
- value: ""
- })
- },
- delRow(obj, index) {
- this.form.config.splice(index, 1);
+ addRow() {
+ this.form.config.push({
+ name: "",
+ key: "",
+ value: ""
+ })
+ },
+ delRow(obj, index) {
+ this.form.config.splice(index, 1);
},
async getDetail() {
const res = await show({
id: this.id,
table_name: "map_points",
- with_relations: ['video', 'image', "videoImage","logo"]
+ with_relations: ['video', 'image', "videoImage", "logo",'qrcode']
});
- this.$integrateData(this.form, res);
- this.form.config = res.config && res.config.length>0?res.config:[{
- key:'address',
- name:'详细地址',
- value:''
- },{
- key:'time',
- name:'开放时间',
- value:''
- }]
+ this.$integrateData(this.form, res);
+ this.form.config = res.config && res.config.length > 0 ? res.config : [{
+ key: 'address',
+ name: '详细地址',
+ value: ''
+ }, {
+ key: 'time',
+ name: '开放时间',
+ value: ''
+ }]
this.image_id = res.image ? [{
- url: res.image?.url,
- name: res.image?.original_name,
- response: res.image
- }] : [],
- this.logo_id = res.logo ? [{
- url: res.logo?.url,
- name: res.logo?.original_name,
- response: res.logo
- }] : [],
+ url: res.image?.url,
+ name: res.image?.original_name,
+ response: res.image
+ }] : [],
+ this.logo_id = res.logo ? [{
+ url: res.logo?.url,
+ name: res.logo?.original_name,
+ response: res.logo
+ }] : [],
+ this.qrcode_id = res.qrcode ? [{
+ url: res.qrcode?.url,
+ name: res.qrcode?.original_name,
+ response: res.qrcode
+ }] : [],
- this.video_id = res.video ? [{
- url: res.video?.url,
- name: res.video?.original_name,
- response: res.video
- }] : []
+ this.video_id = res.video ? [{
+ url: res.video?.url,
+ name: res.video?.original_name,
+ response: res.video
+ }] : []
this.video_image_id = res.video_image ? [{
@@ -470,7 +491,7 @@
}] : [];
},
- submit() {
+ submit() {
if (this.type === "add") {
if (this.form.hasOwnProperty("id")) {
@@ -487,10 +508,12 @@
}
this.form.image_id = this.image_id.length == 0 ? "" : (this.image_id[0]?.response?.id);
this.form.video_id = this.video_id.length == 0 ? "" : (this.video_id[0]?.response?.id);
- this.form.video_image_id = this.video_image_id.length == 0 ? "" : (this.video_image_id[0]?.response?.id);
-
- this.form.logo_id = this.logo_id.length == 0 ? "" : (this.logo_id[0]?.response?.id);
-
+ this.form.video_image_id = this.video_image_id.length == 0 ? "" : (this.video_image_id[0]?.response?.id);
+
+ this.form.logo_id = this.logo_id.length == 0 ? "" : (this.logo_id[0]?.response?.id);
+ this.form.qrcode_id = this.qrcode_id.length == 0 ? "" : (this.qrcode_id[0]?.response?.id);
+
+
save(Object.assign(this.form, {
table_name: "map_points"
})).then(
@@ -504,20 +527,21 @@
}
);
},
- },
+ },
watch: {
isShow(val) {
- if (val) {
- console.log("form",this.form.activity_list_id)
+ if (val) {
+ console.log("form", this.form.activity_list_id)
if (this.type === "editor") {
this.getDetail();
}
} else {
this.id = "";
this.type = "";
- this.image_id = [];
+ this.image_id = [];
this.logo_id = []
+ this.qrcode_id = []
this.video_id = [];
this.video_image_id = [];
this.init();
diff --git a/src/views/PartyshistoryRecoder/components/addQuestions.vue b/src/views/PartyshistoryRecoder/components/addQuestions.vue
index ca608f8..ae747dd 100644
--- a/src/views/PartyshistoryRecoder/components/addQuestions.vue
+++ b/src/views/PartyshistoryRecoder/components/addQuestions.vue
@@ -41,8 +41,17 @@
点位场馆 :
-
+
+
+
+
+