From d233d809dd78aa2bf973cdb2ad577dc823eb6ddc Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期二, 28 二月 2023 11:45:36 +0800
Subject: [PATCH] 2023/2/28 肖辉 违建登记添加-身份证正反面调整
---
src/views/operate/sms/smsTemplate/createTemplate/index.vue | 61 +++++++++++++++++-------------
1 files changed, 34 insertions(+), 27 deletions(-)
diff --git a/src/views/operate/sms/smsTemplate/createTemplate/index.vue b/src/views/operate/sms/smsTemplate/createTemplate/index.vue
index db35460..e4eb065 100644
--- a/src/views/operate/sms/smsTemplate/createTemplate/index.vue
+++ b/src/views/operate/sms/smsTemplate/createTemplate/index.vue
@@ -2,7 +2,7 @@
<div class="createUser">
<main>
<div class="mainContent">
- <el-form ref="user" label-width="140px" autoComplete="on" :model="role" :rules="createRoleRules"
+ <el-form ref="user" :disabled="formDisabled" label-width="140px" autoComplete="on" :model="role" :rules="createRoleRules"
label-position="right">
<!-- 娑堟伅鏍忕洰 -->
<el-form-item class="optionItem" label="妯℃澘绫诲瀷:" prop="type">
@@ -13,20 +13,20 @@
:value="item.id">
</el-option>
</el-select>
- </div>
+ </div>
</div>
</el-form-item>
<!-- 娑堟伅鏍囬 -->
- <el-form-item class="optionItems" label="娑堟伅鏍囬:" prop="title" :disabled="disabled">
+ <el-form-item class="optionItems" label="娑堟伅鏍囬:" prop="title">
<div class="message-item__left">
<el-input v-model="role.title" placeholder="璇烽�夋嫨娑堟伅鏍囬"></el-input>
</div>
</el-form-item>
<!-- 娑堟伅鍐呭 -->
- <el-form-item class="optionItem" label="娑堟伅鍐呭:" prop="body" :disabled="disabled">
- <MyEditor ref="edit" @getMyBody="getMyBody" ></MyEditor>
+ <el-form-item class="optionItem" label="娑堟伅鍐呭:" prop="body">
+ <MyEditor ref="edit" :readOnly="formDisabled"></MyEditor>
</el-form-item>
- <el-form-item>
+ <el-form-item v-if="!formDisabled">
<div class="optionBtn">
<el-button type="primary" @click.native.prevent="handleSubmit(0)" class="btn save">淇濆瓨
</el-button>
@@ -48,9 +48,9 @@
data() {
const validateMessageContent = (rule, value, callback) => {
if (!value) {
- callback(new Error('璇疯緭鍏ョ煭淇″唴瀹�'))
+ callback(new Error('璇疯緭鍏ョ煭淇″唴瀹�'));
} else {
- this.$refs.user.clearValidate('body');
+ callback();
}
}
return {
@@ -70,21 +70,32 @@
{ required: true, trigger: ['blur', 'change'], validator: validateMessageContent }
]
},
- colList: [{ id: "1", columnName: "楠岃瘉鐮佹ā鏉�"}, {id: "2",columnName: "娲诲姩妯℃澘"}],
- disabled: this.dialogType === 'view'
+ colList: [{ id: 1, columnName: "楠岃瘉鐮佹ā鏉�"}, {id: 2, columnName: "娲诲姩妯℃澘"}],
}
},
+
created() {
if (this.tableRowData) {
this.role = deepClone(this.tableRowData);
}
},
+
+ mounted(){
+ this.$refs.edit.editor.txt.html(this.role.body);
+ },
+
+ computed: {
+ formDisabled() {
+ return this.dialogType === 'view';
+ }
+ },
methods: {
// 鏂板缓/淇濆瓨娑堟伅(1:鏂板缓,0淇濆瓨娑堟伅)
handleSubmit() {
+ this.role.body = this.$refs.edit.editor.txt.html();
this.$refs.user.validate((valid) => {
if (valid) {
- if (this.dialogType === 'created') {
+ if (this.dialogType === 'create') {
SMS.addNewSMSTemplate(this.role)
.then(() => {
this.$message({ type: 'success', message: '鎿嶄綔鎴愬姛' });
@@ -114,7 +125,7 @@
handleReset() {
this.$refs.edit.editor.txt.clear();
this.$refs.user.resetFields();
- }
+ },
},
props: ['tableRowData', 'dialogType']
}
@@ -122,11 +133,11 @@
<style lang="scss" scoped>
.createUser {
border-radius: 1px;
- background-color: #09152f;
+ background-color: white;
main {
text-align: left;
- background-color: #09152f;
+ background-color: white;
padding-bottom: 50px;
.mainContent {
@@ -134,16 +145,16 @@
justify-content: center;
padding-top: 50px;
&:deep(.el-dialog__title) {
- color: #4b9bb7;
+ //color: #4b9bb7;
}
&::v-deep .el-form-item__label {
- color: #4b9bb7;
+ //color: #4b9bb7;
}
&::v-deep .el-input__inner {
width: 400px;
- background-color: #09152f;
- border: 1px solid #17324c;
+ //background-color: #09152f;
+ //border: 1px solid #17324c;
}
.message-item__left {
@@ -173,18 +184,14 @@
}
}
- .message-tip {
- margin-left: 20px;
- }
-
:deep(.el-input--suffix) {
width: 400px;
}
- &::v-deep .el-textarea__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
+ // &::v-deep .el-textarea__inner {
+ // //background-color: #09152f;
+ // //border: 1px solid #17324c;
+ // }
.el-form-item__content {
width: 400px;
@@ -219,4 +226,4 @@
}
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0