zhanghua
2022-11-29 d1c6fa3e2e7ef9a5009e798909ed80aecf2eb1db
src/views/operate/sms/smsTemplate/createTemplate/index.vue
@@ -74,6 +74,9 @@
            colList: [{ id: 1, columnName: "验证码模板"}, {id: 2, columnName: "活动模板"}],
        }
    },
    mounted(){
        this.$refs.edit.editor.txt.html(this.role.body)
    },
    created() {
      if (this.tableRowData) {
        this.role = deepClone(this.tableRowData);
@@ -88,8 +91,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 +109,7 @@
                        })
                        .catch(err => this.$message({ type: 'error', message: err }));
                  }
                } else {
                  this.$message({ type: 'warning', message: '请检查必填项' });
                }