Commit 2087a712af292927754afb9a72a10fae75d8f4df

Authored by xp.Huang
2 parents b1886fc5 c84e7331

Merge branch 'feat/add-task-components-lesChamps' into 'main_dev'

修改任务中心命令内容格式化

See merge request yunteng/thingskit-front!678
... ... @@ -13,6 +13,7 @@ import { TaskRecordType } from '/@/api/task/model';
13 13 import { TaskTypeNameEnum } from '../../config';
14 14 import { TimeUnitNameEnum } from '/@/enums/toolEnum';
15 15 import { PeriodTypeEnum } from '../DetailModal/config';
  16 +import { isString } from '/@/utils/is';
16 17
17 18 enum WeekEnum {
18 19 MON = 'MON',
... ... @@ -107,7 +108,7 @@ export const schemas: DescItem[] = [
107 108 render(_val: any, data: TaskRecordType) {
108 109 const value = data.executeContent.pushContent.rpcCommand;
109 110 return h(Input.TextArea, {
110   - value: typeof value == 'object' ? JSON.stringify(value) : value,
  111 + value: isString(value) ? value : JSON.stringify(value, null, '\t'),
111 112 autoSize: true,
112 113 style: { border: 'none', padding: 0 },
113 114 } as Recordable);
... ...