From adf10a882ee565d6a5c37ba07a9e8ec2289ccf34 Mon Sep 17 00:00:00 2001 From: jazz <49930677+jxmanxk@users.noreply.github.com> Date: 星期四, 03 三月 2022 17:55:17 +0800 Subject: [PATCH] Merge branch 'master' of http://1.15.4.62/r/~chenshaoxiong/sms_center_backstage --- src/pages/system/banner.vue | 48 +++++++++++++++++++++++++++++++++++++----------- 1 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/pages/system/banner.vue b/src/pages/system/banner.vue index 1fb64b5..9cfe56e 100644 --- a/src/pages/system/banner.vue +++ b/src/pages/system/banner.vue @@ -19,7 +19,12 @@ <el-table-column type="index" label="搴忓彿" align="center" width="60" /> <el-table-column label="鍥剧墖" prop="imgUrl" align="center" min-width="120"> <template slot-scope="scope"> - <el-image :src="scope.row.imgUrl" style="width:80px;height:80px" fit="contain" :preview-src-list="[scope.row.imgUrl]" /> + <el-image :src="scope.row.imgUrl" style="width:80px;height:80px" fit="contain" :preview-src-list="[scope.row.imgUrl]"> + <div slot="error" class="image-slot"> + <!-- 鍥剧墖鏄剧ず澶辫触鍥炬爣 --> + <img src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png" style="width:80px;height:80px"> + </div> + </el-image> </template> </el-table-column> <el-table-column prop="jumpType" label="璺宠浆绫诲瀷" align="center" min-width="120"> @@ -58,13 +63,17 @@ /> <!-- 鏂板&缂栬緫 --> - <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" @@ -93,6 +102,7 @@ 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> @@ -133,6 +143,19 @@ pageSize: 20, // 鍒嗛〉 鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈 + jumpTypeOpt: [ + { label: '涓嶈烦杞�', value: 0 }, + { label: '灏忕▼搴忛〉闈�', value: 1 }, + { label: 'H5椤甸潰', value: 2 }, + { label: '鍏跺畠灏忕▼搴�', value: 3 } + ], + + envVersionOpt: [ + { label: '寮�鍙戠増', value: 'develop' }, + { label: '浣撻獙鐗�', value: 'trial' }, + { label: '姝e紡鐗�', value: 'release' } + ], + // 鏄剧ず寮圭獥 isShowDialog: false, @@ -166,12 +189,6 @@ uploadImgs: [] } - } - }, - computed: { - // 涓婁紶绂佺敤 - uploadDisabled() { - return this.dialogData.uploadImgs.length > 0 } }, mounted() { @@ -247,6 +264,15 @@ 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 = {} @@ -315,7 +341,7 @@ }, inf => { this.$messageSuc('淇濆瓨鎴愬姛') this.hideDialog() - this.getList() + type === 'add' ? this.reGetList() : this.getList() }) } } -- Gitblit v1.8.0