|
|
|
@ -1,27 +1,25 @@
|
|
|
|
|
<template>
|
|
|
|
|
<Modal
|
|
|
|
|
v-model="dispalyModal"
|
|
|
|
|
<Modal v-model="dispalyModal"
|
|
|
|
|
width="1000"
|
|
|
|
|
:loading="loading"
|
|
|
|
|
:mask-closable="false"
|
|
|
|
|
@on-cancel="cancel"
|
|
|
|
|
@on-ok="save"
|
|
|
|
|
>
|
|
|
|
|
<p slot="header" style="color:#f60;text-align:left">
|
|
|
|
|
@on-ok="save">
|
|
|
|
|
<p slot="header"
|
|
|
|
|
style="color:#f60;text-align:left">
|
|
|
|
|
<span>配置活动</span>
|
|
|
|
|
</p>
|
|
|
|
|
<div>基本配置</div>
|
|
|
|
|
<Form
|
|
|
|
|
ref="formValidate"
|
|
|
|
|
<Form ref="formValidate"
|
|
|
|
|
:model="formValidate"
|
|
|
|
|
:rules="ruleValidate"
|
|
|
|
|
:label-width="80"
|
|
|
|
|
>
|
|
|
|
|
:label-width="80">
|
|
|
|
|
<Row>
|
|
|
|
|
<i-col style="text-align: left;" span="8">
|
|
|
|
|
<FormItem label="" prop="logo">
|
|
|
|
|
<Upload
|
|
|
|
|
ref="upload"
|
|
|
|
|
<i-col style="text-align: left;"
|
|
|
|
|
span="8">
|
|
|
|
|
<FormItem label=""
|
|
|
|
|
prop="logo">
|
|
|
|
|
<Upload ref="upload"
|
|
|
|
|
:show-upload-list="false"
|
|
|
|
|
:on-success="uploadImgSuccess"
|
|
|
|
|
:format="['jpg', 'jpeg', 'png']"
|
|
|
|
@ -30,90 +28,75 @@
|
|
|
|
|
multiple
|
|
|
|
|
type="drag"
|
|
|
|
|
action=""
|
|
|
|
|
style="display: inline-block;"
|
|
|
|
|
>
|
|
|
|
|
style="display: inline-block;">
|
|
|
|
|
<div style="width: 200px;height:200px;line-height: 200px;">
|
|
|
|
|
<span v-if="!formValidate.logo">请上传图片</span>
|
|
|
|
|
<img
|
|
|
|
|
v-if="formValidate.logo"
|
|
|
|
|
<img v-if="formValidate.logo"
|
|
|
|
|
:src="`/kiisoo-ic` + formValidate.logo"
|
|
|
|
|
alt=""
|
|
|
|
|
style="width: 100%; height: auto"
|
|
|
|
|
/>
|
|
|
|
|
style="width: 100%; height: auto" />
|
|
|
|
|
</div>
|
|
|
|
|
</Upload>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="15" offset="1">
|
|
|
|
|
<FormItem label="活动名称" prop="name">
|
|
|
|
|
<i-input
|
|
|
|
|
type="text"
|
|
|
|
|
<i-col span="15"
|
|
|
|
|
offset="1">
|
|
|
|
|
<FormItem label="活动名称"
|
|
|
|
|
prop="name">
|
|
|
|
|
<i-input type="text"
|
|
|
|
|
v-model="formValidate.name"
|
|
|
|
|
placeholder="请输入活动名称"
|
|
|
|
|
></i-input>
|
|
|
|
|
placeholder="请输入活动名称"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<Form-item label="活动描述" prop="description">
|
|
|
|
|
<i-input
|
|
|
|
|
v-model="formValidate.description"
|
|
|
|
|
<Form-item label="活动描述"
|
|
|
|
|
prop="description">
|
|
|
|
|
<i-input v-model="formValidate.description"
|
|
|
|
|
type="textarea"
|
|
|
|
|
:autosize="{ minRows: 3 }"
|
|
|
|
|
placeholder="请输入活动描述"
|
|
|
|
|
></i-input>
|
|
|
|
|
placeholder="请输入活动描述"></i-input>
|
|
|
|
|
</Form-item>
|
|
|
|
|
<FormItem label="APPID" prop="appId">
|
|
|
|
|
<i-input
|
|
|
|
|
type="text"
|
|
|
|
|
<FormItem label="APPID"
|
|
|
|
|
prop="appId">
|
|
|
|
|
<i-input type="text"
|
|
|
|
|
v-model="formValidate.appId"
|
|
|
|
|
placeholder="请输入appid"
|
|
|
|
|
></i-input>
|
|
|
|
|
placeholder="请输入appid"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="URI" prop="uri">
|
|
|
|
|
<i-input
|
|
|
|
|
type="text"
|
|
|
|
|
<FormItem label="URI"
|
|
|
|
|
prop="uri">
|
|
|
|
|
<i-input type="text"
|
|
|
|
|
v-model="formValidate.uri"
|
|
|
|
|
placeholder="请输入URI"
|
|
|
|
|
></i-input>
|
|
|
|
|
placeholder="请输入URI"></i-input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
</Form>
|
|
|
|
|
<div class="topic">活动类型</div>
|
|
|
|
|
<Row
|
|
|
|
|
:gutter="10"
|
|
|
|
|
<Row :gutter="10"
|
|
|
|
|
class="inputItem"
|
|
|
|
|
v-for="(item, index) in formValidate.params"
|
|
|
|
|
:key="index"
|
|
|
|
|
>
|
|
|
|
|
:key="index">
|
|
|
|
|
<i-col :span="2"> 类型{{ index + 1 }} </i-col>
|
|
|
|
|
<i-col :span="9">
|
|
|
|
|
<i-input
|
|
|
|
|
class="inputClass"
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
v-model="item.name"
|
|
|
|
|
placeholder="请输入活动类型名称"
|
|
|
|
|
></i-input>
|
|
|
|
|
placeholder="请输入活动类型名称"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col :span="9">
|
|
|
|
|
<i-input
|
|
|
|
|
class="inputClass"
|
|
|
|
|
<i-input class="inputClass"
|
|
|
|
|
type="text"
|
|
|
|
|
style="margin-left: 20px"
|
|
|
|
|
v-model="item.defaultVal"
|
|
|
|
|
placeholder="请输入参数"
|
|
|
|
|
></i-input>
|
|
|
|
|
placeholder="请输入参数"></i-input>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col :span="4">
|
|
|
|
|
<Button
|
|
|
|
|
style="margin-left: 20px"
|
|
|
|
|
<Button style="margin-left: 20px"
|
|
|
|
|
type="error"
|
|
|
|
|
@click="delActivityInput(index)"
|
|
|
|
|
>删除</Button
|
|
|
|
|
>
|
|
|
|
|
@click="delActivityInput(index)">删除</Button>
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Button style="margin-top: 10px" type="primary" @click="addActivityInput"
|
|
|
|
|
>+添加活动类型</Button
|
|
|
|
|
>
|
|
|
|
|
<Button style="margin-top: 10px"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="addActivityInput">+添加活动类型</Button>
|
|
|
|
|
</Modal>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
@ -242,6 +225,7 @@ export default {
|
|
|
|
|
save () {
|
|
|
|
|
let that = this;
|
|
|
|
|
let i = 0;
|
|
|
|
|
this.loading = true;
|
|
|
|
|
if (
|
|
|
|
|
typeof that.formValidate.logo == "undefined" ||
|
|
|
|
|
that.formValidate.logo == "" ||
|
|
|
|
|