Merge branch 'weiyu'

This commit is contained in:
weiyu
2022-04-22 10:12:23 +08:00

View File

@ -53,7 +53,7 @@ export class SmsTemplateComponent implements OnInit {
templateCode: { templateCode: {
type: 'string', type: 'string',
title: '模板编码', title: '模板编码',
readOnly: this.isEdit ? true : false, readOnly: this.isEdit,
ui: { placeholder: '请输入模板编码', } ui: { placeholder: '请输入模板编码', }
}, },
templateContent: { templateContent: {
@ -103,6 +103,8 @@ export class SmsTemplateComponent implements OnInit {
edit(item: any) { edit(item: any) {
// console.log(item); // console.log(item);
this.isEdit = true; this.isEdit = true;
this.editSchema!.properties!.templateCode.readOnly = true;
this.sfEdit?.refreshSchema();
this.tempData = item; this.tempData = item;
this.isVisible = true; this.isVisible = true;
} }
@ -122,6 +124,8 @@ export class SmsTemplateComponent implements OnInit {
add() { add() {
this.isEdit = false; this.isEdit = false;
this.editSchema!.properties!.templateCode.readOnly = false;
this.sfEdit?.refreshSchema();
this.tempData = {}; this.tempData = {};
this.isVisible = true; this.isVisible = true;
} }