| | |
| | | /> |
| | | |
| | | <!-- 新增&编辑 --> |
| | | <el-dialog v-el-drag-dialog :title="dialogData.type=='add'?'新增轮播图':'编辑轮播图'" width="500px" :visible.sync="isShowDialog" append-to-body :before-close="hideDialog"> |
| | | <el-dialog v-el-drag-dialog :title="dialogData.type=='add'?'新增轮播图':'编辑轮播图'" width="500px" :visible.sync="isShowDialog" append-to-body :before-close="hideDialog" :close-on-click-modal="false"> |
| | | <el-form :ref="formName" :model="dialogData" label-width="120px" :rules="rules" size="small"> |
| | | <el-form-item label="排序号:" prop="orderNum"> |
| | | <el-input v-model="dialogData.orderNum" placeholder="请输入排序号" maxlength="10" /> |
| | | </el-form-item> |
| | | <el-form-item ref="uploadFormItem" label="轮播图:" prop="uploadImgs"> |
| | | <!-- 上传图片组件(多图) --> |
| | | <el-form-item ref="uploadFormItem" prop="uploadImgs"> |
| | | <span slot="label"> |
| | | <!-- 尺寸 --> |
| | | 轮播图:<br><span style="color: #999;font-size: 12px">(xxx*xxx像素)</span> |
| | | </span> |
| | | <!-- 上传图片组件(单图) --> |
| | | <UploadSingleImg |
| | | ref="refUploadImg" |
| | | v-model="dialogData.uploadImgs" |
| | |
| | | clearable |
| | | placeholder="请选择小程序版本" |
| | | class="com-edit-input" |
| | | @change="handleJumpTypeChange" |
| | | > |
| | | <el-option v-for="item in envVersionOpt" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | |
| | | pageSize: 20, |
| | | // 分页 ↑↑↑↑↑↑↑↑↑↑ |
| | | |
| | | jumpTypeOpt: [ |
| | | { label: '不跳转', value: 0 }, |
| | | { label: '小程序页面', value: 1 }, |
| | | { label: 'H5页面', value: 2 }, |
| | | { label: '其它小程序', value: 3 } |
| | | ], |
| | | |
| | | envVersionOpt: [ |
| | | { label: '开发版', value: 'develop' }, |
| | | { label: '体验版', value: 'trial' }, |
| | | { label: '正式版', value: 'release' } |
| | | ], |
| | | |
| | | // 显示弹窗 |
| | | isShowDialog: false, |
| | | |
| | |
| | | uploadImgs: [] |
| | | } |
| | | |
| | | } |
| | | }, |
| | | computed: { |
| | | // 上传禁用 |
| | | uploadDisabled() { |
| | | return this.dialogData.uploadImgs.length > 0 |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | handleEdit(item) { |
| | | this.showDialog('edit', item) |
| | | }, |
| | | // 跳转类型为【不跳转】时,清空其余跳转字段 |
| | | handleJumpTypeChange() { |
| | | if (this.dialogData.jumpType === 0) { |
| | | this.dialogData.jumpUrl = '' |
| | | this.dialogData.jumpMpId = '' |
| | | this.dialogData.envVersion = '' |
| | | this.dialogData.extraData = '' |
| | | } |
| | | }, |
| | | // 显示弹框 |
| | | showDialog(type, item) { |
| | | let dialogData = {} |
| | |
| | | }, inf => { |
| | | this.$messageSuc('保存成功') |
| | | this.hideDialog() |
| | | this.getList() |
| | | type === 'add' ? this.reGetList() : this.getList() |
| | | }) |
| | | } |
| | | } |