| | |
| | | <template> |
| | | <GlobalAlertWindow |
| | | <GlobalWindow |
| | | v-loading="isUploading" |
| | | :title="title" |
| | | width="60%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | |
| | | @uploadBegin="isUploading = true" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="展示城市" prop="cityId"> |
| | | <el-form-item label="展示城市" prop="cityId" v-if="1==2"> |
| | | <div class="address"> |
| | | <el-select v-model="form.provinceId" placeholder="请选择省份" filterable @change="selectProvince"> |
| | | <el-option |
| | |
| | | </el-select> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="排序码(升序)" prop="sortnum"> |
| | | <el-input v-model="form.sortnum" type="number" placeholder="请输入排序码" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-switch |
| | | v-model="form.status" |
| | | active-color="#13ce66" |
| | | inactive-color="#999" |
| | | :active-value="0" |
| | | :inactive-value="1" |
| | | ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="跳转类型" prop="type"> |
| | | <el-select |
| | | v-model="form.type" |
| | | placeholder="请选择跳转类型" |
| | | @change="selectType" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in types()" |
| | |
| | | </el-form-item> |
| | | <!-- // 0富文本 1外链 2活动 3商家 --> |
| | | <el-form-item v-if="form.type==0" label="富文本内容" prop="content"> |
| | | <RichEditor :content="{ content : form.content}" @edit="form.content=$event" /> |
| | | <RichEditor :richData="form.content" :styleEditor="'border: 1px solid #ccc;display: inline-block;height:500px;'" @getWangedditor="getWangedditor" :readonly="false"/> |
| | | |
| | | <!-- |
| | | <RichEditor :styleEditor="'border: 1px solid #ccc;display: inline-block;height:500px;'" :content="{ content : form.content}" @edit="form.content=$event" /> |
| | | --> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.type==1" label="链接" prop="content"> |
| | | <el-input v-model="form.content" placeholder="请输入链接" v-trim/> |
| | | <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>提醒:如果配置公众号链接,跳转的公众号需要先跟小程序进行绑定,方可实现跳转</p> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.type==2" label="活动名称" prop="content"> |
| | | <el-select |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="排序码" prop="sortnum"> |
| | | <el-input v-model="form.sortnum" type="number" placeholder="请输入排序码" v-trim/> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalAlertWindow> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalAlertWindow from '@/components/common/GlobalAlertWindow' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import RichEditor from '@/components/common/RichEditor' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import { listByParentId } from '@/api/business/areas' |
| | |
| | | export default { |
| | | name: 'OperaBannerWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalAlertWindow, RichEditor, UploadAvatarImage }, |
| | | components: { GlobalWindow, RichEditor, UploadAvatarImage }, |
| | | data () { |
| | | let positionRule = (rule, value, callBack) => { |
| | | // debugger |
| | |
| | | info: '', |
| | | title: '', |
| | | sortnum: '', |
| | | status: '', |
| | | status: 0, |
| | | imgurl: '', |
| | | imgFullUrl: '', |
| | | type: 0, |
| | | type: '', |
| | | position: '', |
| | | provinceId: '', |
| | | cityId: '', |
| | |
| | | }, |
| | | inject: ['postions', 'types'], |
| | | created () { |
| | | |
| | | this.config({ |
| | | api: '/business/banner', |
| | | 'field.id': 'id' |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | getWangedditor (val) { |
| | | this.form.content = val |
| | | }, |
| | | open (title, target) { |
| | | |
| | | this.title = title |