fangyuan
2022-11-29 e2e3881fcaa2cfacf5d3290bb0ff5969482e6c48
src/views/operate/sms/smsTemplate/createTemplate/index.vue
@@ -50,7 +50,6 @@
          if (!value) {
            callback(new Error('请输入短信内容'));
          } else {
            this.$refs.user.clearValidate('body');
            callback();
          }
        }
@@ -74,11 +73,16 @@
            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() {
@@ -88,8 +92,8 @@
    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();
            this.$refs.user.validate((valid) => {
                if (valid) {
                  if (this.dialogType === 'create') {
                    SMS.addNewSMSTemplate(this.role)
@@ -106,6 +110,7 @@
                        })
                        .catch(err => this.$message({ type: 'error', message: err }));
                  }
                } else {
                  this.$message({ type: 'warning', message: '请检查必填项' });
                }
@@ -177,10 +182,6 @@
                    margin-left: 20px;
                    color: #4b9bb7;
                }
            }
            .message-tip {
                margin-left: 20px;
            }
            :deep(.el-input--suffix) {