|
|
@ -1,13 +1,14 @@ |
|
|
|
<template> |
|
|
|
<div class="d-flex flex-wrap pb-3"> |
|
|
|
<!-- 编辑 --> |
|
|
|
<!-- 编辑 v-model="editVisible"--> |
|
|
|
<a-modal |
|
|
|
:mask-closable="false" |
|
|
|
@cancel="$emit('closeModal')" |
|
|
|
destroy-on-close |
|
|
|
footer |
|
|
|
title="修改轮播图" |
|
|
|
v-model="editVisible" |
|
|
|
:visible="editVisible" |
|
|
|
|
|
|
|
width="700px" |
|
|
|
> |
|
|
|
<a-form :form="form" @submit="handleSubmit" v-if="editItem"> |
|
|
@ -43,6 +44,20 @@ |
|
|
|
> |
|
|
|
<a-select-option :key="item" :value="index" v-for="(item, index) in enable">{{ item }}</a-select-option> |
|
|
|
</a-select> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
label="设备" |
|
|
|
> |
|
|
|
<a-select |
|
|
|
@change="getUse($event, 'showPosition')" |
|
|
|
class="ml-3" |
|
|
|
default-value="PC" |
|
|
|
style="width: 150px" |
|
|
|
> |
|
|
|
<a-select-option :key="item" :value="index" v-for="(item, index) in enable3">{{ item }}</a-select-option> |
|
|
|
</a-select> |
|
|
|
</a-form-item> |
|
|
|
<!-- 页面显示位置 --> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="页面显示位置"> |
|
|
@ -95,6 +110,7 @@ export default { |
|
|
|
form: this.$form.createForm(this, { name: 'r-d-add' }), |
|
|
|
enable: ['启用', '禁用'], |
|
|
|
enable1: ['不跳转', 'H5'], |
|
|
|
enable3: ['全部','pc','小程序'], |
|
|
|
enable2: [ |
|
|
|
{ |
|
|
|
name: '首页', |
|
|
@ -169,6 +185,7 @@ export default { |
|
|
|
recStatus: '', |
|
|
|
showPage: '', |
|
|
|
url: '', |
|
|
|
showPosition: '' |
|
|
|
}, |
|
|
|
jumpType: '', |
|
|
|
recStatus: '', |
|
|
@ -200,6 +217,7 @@ export default { |
|
|
|
// 改变搜索条件 |
|
|
|
getUse(e, str) { |
|
|
|
this.editData[str] = e; |
|
|
|
console.log(this.editData[str]) |
|
|
|
if (str === 'jumpType' && e === 0) { |
|
|
|
console.log("=") |
|
|
|
this.editData.jumpUrl = ''; |
|
|
@ -247,6 +265,7 @@ export default { |
|
|
|
recStatus: this.editData.recStatus, |
|
|
|
showPage: this.editData.showPage, |
|
|
|
url: this.editData.url, |
|
|
|
showPosition: this.editData.showPosition, |
|
|
|
}, |
|
|
|
}; |
|
|
|
const res = await updateCarousel(params); |
|
|
|