| | |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- 消息标题 --> |
| | |
| | | </el-form-item> |
| | | <!-- 消息内容 --> |
| | | <el-form-item class="optionItem" label="消息内容:" prop="body"> |
| | | <MyEditor ref="edit" :readOnly="formDisabled" @getMyBody="getMyBody"></MyEditor> |
| | | <MyEditor ref="edit" :readOnly="formDisabled"></MyEditor> |
| | | </el-form-item> |
| | | <el-form-item v-if="!formDisabled"> |
| | | <div class="optionBtn"> |
| | |
| | | data() { |
| | | const validateMessageContent = (rule, value, callback) => { |
| | | if (!value) { |
| | | callback(new Error('请输入短信内容')) |
| | | callback(new Error('请输入短信内容')); |
| | | } else { |
| | | this.$refs.user.clearValidate('body'); |
| | | callback(); |
| | | } |
| | | } |
| | | return { |
| | |
| | | { required: true, trigger: ['blur', 'change'], validator: validateMessageContent } |
| | | ] |
| | | }, |
| | | colList: [{ id: "1", columnName: "验证码模板"}, {id: "2",columnName: "活动模板"}], |
| | | 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 !== 'create'; |
| | | return this.dialogType === 'view'; |
| | | } |
| | | }, |
| | | methods: { |
| | | // 新建/保存消息(1:新建,0保存消息) |
| | | handleSubmit() { |
| | | this.role.body = this.$refs.edit.editor.txt.html(); |
| | | this.$refs.user.validate((valid) => { |
| | | this.role.body = this.$refs.edit.editor.txt.html(); |
| | | if (valid) { |
| | | if (this.dialogType === 'create') { |
| | | SMS.addNewSMSTemplate(this.role) |
| | |
| | | <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 { |
| | |
| | | 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 { |
| | |
| | | } |
| | | } |
| | | |
| | | .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; |
| | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |