|
|
|
|
@ -1,42 +1,34 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增点位场馆' : '编辑点位场馆'"
|
|
|
|
|
:form="form" :rules="rules" @submit="submit">
|
|
|
|
|
<template v-slot:activity_list_id>
|
|
|
|
|
<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-select :disabled="hasActiveId" style="width: 300px" v-model="form.activity_list_id" placeholder="请选择">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in listActivity"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:theme_id>
|
|
|
|
|
<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-select style="width: 300px" v-model="form.theme_id" placeholder="请选择">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in listTheme"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.value"
|
|
|
|
|
:value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
:form="form" :rules="rules" @submit="submit">
|
|
|
|
|
<template v-slot:activity_list_id>
|
|
|
|
|
<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-select :disabled="hasActiveId" style="width: 300px" v-model="form.activity_list_id" placeholder="请选择">
|
|
|
|
|
<el-option v-for="item in listActivity" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:theme_id>
|
|
|
|
|
<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-select style="width: 300px" v-model="form.theme_id" placeholder="请选择">
|
|
|
|
|
<el-option v-for="item in listTheme" :key="item.id" :label="item.value" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:name>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -48,66 +40,84 @@
|
|
|
|
|
<el-input v-model="form.name" clearable placeholder="请输入名称" style="width: 300px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:iswx>
|
|
|
|
|
<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-radio-group v-model="form.iswx">
|
|
|
|
|
<el-radio :label="1">是</el-radio>
|
|
|
|
|
<el-radio :label="0">否</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:appid>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red; font-weight: 600; padding-right: 4px"></span>
|
|
|
|
|
小程序appid:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.appid" clearable placeholder="请输入小程序appid" style="width: 300px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:path>
|
|
|
|
|
<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-input v-model="form.path" clearable placeholder="请输入小程序路径" style="width: 300px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:logo_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">logo(100*100) :</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload style="width: 300px" class="upload-demo" :action="action" :on-success="
|
|
|
|
|
(response, file, fileList) =>
|
|
|
|
|
successHandle(response, file, fileList, 'logo_id')
|
|
|
|
|
" :before-upload="uploadBefore" :file-list="logo_id" :on-remove="
|
|
|
|
|
(file, fileList) => removeHande(file, fileList, 'logo_id')
|
|
|
|
|
" :limit="1" list-type="picture-card">
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="tip" class="el-upload__tip">
|
|
|
|
|
只能上传jpg/png文件,且不超过500kb
|
|
|
|
|
</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:iswx>
|
|
|
|
|
<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-radio-group v-model="form.iswx">
|
|
|
|
|
<el-radio :label="1">是</el-radio>
|
|
|
|
|
<el-radio :label="0">否</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:appid>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red; font-weight: 600; padding-right: 4px"></span>
|
|
|
|
|
小程序appid:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.appid" clearable placeholder="请输入小程序appid" style="width: 300px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:path>
|
|
|
|
|
<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-input v-model="form.path" clearable placeholder="请输入小程序路径" style="width: 300px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:qrcode_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">跳转二维码 :</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload style="width: 600px" class="upload-demo" :action="action" :on-success="
|
|
|
|
|
(response, file, fileList) =>
|
|
|
|
|
successHandle(response, file, fileList, 'qrcode_id')
|
|
|
|
|
" :before-upload="uploadBefore" :file-list="qrcode_id" :on-remove="
|
|
|
|
|
(file, fileList) => removeHande(file, fileList, 'qrcode_id')
|
|
|
|
|
" :limit="1" list-type="picture-card">
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="tip" class="el-upload__tip">
|
|
|
|
|
只能上传jpg/png文件,且不超过500kb
|
|
|
|
|
</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:logo_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">logo(100*100) :</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload style="width: 600px" class="upload-demo" :action="action" :on-success="
|
|
|
|
|
(response, file, fileList) =>
|
|
|
|
|
successHandle(response, file, fileList, 'logo_id')
|
|
|
|
|
" :before-upload="uploadBefore" :file-list="logo_id" :on-remove="
|
|
|
|
|
(file, fileList) => removeHande(file, fileList, 'logo_id')
|
|
|
|
|
" :limit="1" list-type="picture-card">
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="tip" class="el-upload__tip">
|
|
|
|
|
只能上传jpg/png文件,且不超过500kb
|
|
|
|
|
</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:image_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">封面图 :</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload style="width: 300px" class="upload-demo" :action="action" :on-success="
|
|
|
|
|
<el-upload style="width: 600px" class="upload-demo" :action="action" :on-success="
|
|
|
|
|
(response, file, fileList) =>
|
|
|
|
|
successHandle(response, file, fileList, 'image_id')
|
|
|
|
|
" :before-upload="uploadBefore" :file-list="image_id" :on-remove="
|
|
|
|
|
@ -206,49 +216,49 @@
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:config>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">配置 :</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<div class="table-tree">
|
|
|
|
|
<div style="display: flex;justify-content: flex-end;margin-right: 20px;margin-bottom: 10px;">
|
|
|
|
|
<Button type="primary" @click="addRow()" size="small" style="margin-left: 10px;" ghost>新增参数</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="form.config" height="200" class="v-table" style="width: 100%;margin-bottom: 20px;">
|
|
|
|
|
<el-table-column type="index" align="center">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="key" label="标识" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.key">
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="name" label="名称" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.name">
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="value" label="数据值" width="280">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.value">
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="100" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<Button type="error" @click="delRow(scope.row,scope.$index)" size="small" style="margin-left: 10px;"
|
|
|
|
|
ghost>删除</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:config>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">配置 :</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<div class="table-tree">
|
|
|
|
|
<div style="display: flex;justify-content: flex-end;margin-right: 20px;margin-bottom: 10px;">
|
|
|
|
|
<Button type="primary" @click="addRow()" size="small" style="margin-left: 10px;" ghost>新增参数</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="form.config" height="200" class="v-table" style="width: 100%;margin-bottom: 20px;">
|
|
|
|
|
<el-table-column type="index" align="center">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="key" label="标识" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.key">
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="name" label="名称" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.name">
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="value" label="数据值" width="280">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.value">
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="100" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<Button type="error" @click="delRow(scope.row,scope.$index)" size="small" style="margin-left: 10px;"
|
|
|
|
|
ghost>删除</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:content>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -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();
|
|
|
|
|
|