Commit c84e7331beb51ee293cd92ebfd89ec34cf2ddcb9

Authored by loveumiko
1 parent 69e26c84

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

... ... @@ -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);
... ...