From cf295e5087a705e5214530fbd5eb3bb3221007b9 Mon Sep 17 00:00:00 2001 From: luobisheng <727299681@qq.com> Date: 星期一, 28 十一月 2022 18:11:49 +0800 Subject: [PATCH] 短信模板修改 --- src/views/operate/sms/smsTemplate/index.vue | 8 +++- src/views/operate/sms/smsTemplate/createTemplate/index.vue | 8 ++-- src/views/operate/video/updateInterface/index.vue | 82 +++++++++++++---------------------------- 3 files changed, 36 insertions(+), 62 deletions(-) diff --git a/src/views/operate/sms/smsTemplate/createTemplate/index.vue b/src/views/operate/sms/smsTemplate/createTemplate/index.vue index dcc0434..421b57f 100644 --- a/src/views/operate/sms/smsTemplate/createTemplate/index.vue +++ b/src/views/operate/sms/smsTemplate/createTemplate/index.vue @@ -48,9 +48,10 @@ data() { const validateMessageContent = (rule, value, callback) => { if (!value) { - callback(new Error('璇疯緭鍏ョ煭淇″唴瀹�')) + callback(new Error('璇疯緭鍏ョ煭淇″唴瀹�')); } else { this.$refs.user.clearValidate('body'); + callback(); } } return { @@ -87,8 +88,8 @@ methods: { // 鏂板缓/淇濆瓨娑堟伅(1:鏂板缓,0淇濆瓨娑堟伅) handleSubmit() { - this.$refs.user.validate((valid) => { - this.role.body = this.$refs.edit.editor.txt.html(); + this.role.body = this.$refs.edit.editor.txt.html(); + this.$refs.user.validate(valid => { if (valid) { if (this.dialogType === 'create') { SMS.addNewSMSTemplate(this.role) @@ -105,7 +106,6 @@ }) .catch(err => this.$message({ type: 'error', message: err })); } - } else { this.$message({ type: 'warning', message: '璇锋鏌ュ繀濉」' }); } diff --git a/src/views/operate/sms/smsTemplate/index.vue b/src/views/operate/sms/smsTemplate/index.vue index 1680a06..7ad5a7d 100644 --- a/src/views/operate/sms/smsTemplate/index.vue +++ b/src/views/operate/sms/smsTemplate/index.vue @@ -64,7 +64,8 @@ <!-- 鏂板缓娑堟伅 --> <el-dialog :title="dialogType === 'view' ? '鏌ョ湅鐭俊妯℃澘' : '鏇存柊鐭俊妯℃澘'" :visible.sync="isShowDialog" width="80%" :before-close="handleConfirmClose"> - <MyCreate v-if="isShowDialog" @closeMyDialog="handleConfirmClose" :dialogType="dialogType" :tableRowData="messageTemplateData"></MyCreate> + <MyCreate v-if="isShowDialog" @closeMyDialog="handleConfirmClose" @closeDialog="closeDialog" + :dialogType="dialogType" :tableRowData="messageTemplateData"></MyCreate> </el-dialog> <div class="tools"> <div class="funs"> @@ -305,7 +306,10 @@ .then(() => { done(); }) - } + }, + closeDialog() { + this.isShowDialog = false; + } } } </script> diff --git a/src/views/operate/video/updateInterface/index.vue b/src/views/operate/video/updateInterface/index.vue index 9135a69..d1d05cd 100644 --- a/src/views/operate/video/updateInterface/index.vue +++ b/src/views/operate/video/updateInterface/index.vue @@ -22,15 +22,16 @@ <el-input v-model="videoData.id"></el-input> </el-form-item> <el-form-item prop="url" label="瑙嗛" min-width="8"> + <video controls v-if="videoList" :src="videoData.url" width="300px" height="200px" /> <el-upload + v-if="isUpdate" class="avatar-uploader" action="" ref="image" :show-file-list="false" :auto-upload="true" :http-request="videoUpload"> - <video controls v-if="videoData.url" :src="videoData.url" width="300px" height="200px" /> - <i v-else class="el-icon-plus avatar-uploader-icon"></i> + <i class="el-icon-plus avatar-uploader-icon"></i> </el-upload> </el-form-item> <el-button v-if="!isDisabled" class="submit-button" type="primary" @click.native.prevent="onSubmit">鎻愪氦</el-button> @@ -71,13 +72,16 @@ url: [{ required: true, validator: validateVideoUrl }], type: [{ required: true, trigger: ['blur', 'change'], message: '璇烽�夋嫨绫诲瀷' }] }, - isDisabled: false + isDisabled: false, + videoList: [] } }, created() { this.videoData = deepClone(this.dialogData); - this.videoData.url = this.videoData.url ? this.videoData.url.split(',')[0] : ''; + if (this.videoData.url) { + this.videoList = this.videoData.url.split(','); + } this.isDisabled = !this.isUpdate; }, methods: { @@ -147,6 +151,24 @@ display: flex; justify-content: center; align-items: center; + .avatar-uploader .el-upload { + border: 1px solid #ffffff; + border-radius: 6px; + cursor: pointer; + position: relative; + overflow: hidden; + } + .avatar-uploader .el-upload:hover { + border-color: #409EFF; + } + .avatar-uploader-icon { + font-size: 14px; + color: #8c939d; + width: 50px; + height: 50px; + line-height: 50px; + text-align: center; + } .submit-button { margin-left: 200px; @@ -190,58 +212,6 @@ width: 36px; height: 36px; border-radius: 50%; -} - -.card { - position: absolute; - z-index: 2000; - right: 0; - - .box-card { - min-height: 240px; - max-height: 260px; - overflow: hidden; - background-color: #09152f; - position: relative; - max-width: 220px; - - .scrollWrap { - overflow: scroll; - height: 180px; - position: relative; - color: #4b9bb7; - - .el-checkbox-group { - display: flex; - flex-direction: column; - - .el-checkbox { - line-height: 20px; - } - } - } - - .myclear { - width: 100%; - line-height: 20px; - color: #4b9bb7; - display: flex; - justify-content: space-between; - } - - .hidebar { - position: absolute; - top: 77px; - right: 20px; - width: 20px; - height: 180px; - background-color: #09152f; - } - - .item { - line-height: 40px; - } - } } .leader { -- Gitblit v1.8.0