Commit b42f4828ac0c332e5e174e568d40a62feebec08f

Authored by fengtao
1 parent bf8c0ff3

fix:修改脚本管理 转换函数 上报数据类型字段名

... ... @@ -18,11 +18,11 @@
18 18 </a-form-item>
19 19 <a-form-item
20 20 label="上报数据类型"
21   - name="reportType"
22   - :rules="[{ required: false, message: '请选择上报数据类型' }]"
  21 + name="dataType"
  22 + :rules="[{ required: true, message: '请选择上报数据类型' }]"
23 23 >
24 24 <a-space direction="vertical">
25   - <a-radio-group v-model:value="scriptForm.reportType" :options="typeOptions" />
  25 + <a-radio-group v-model:value="scriptForm.dataType" :options="typeOptions" />
26 26 </a-space>
27 27 </a-form-item>
28 28 <a-form-item label="脚本内容" :name="ifAdd ? 'convertJs' : 'script'">
... ... @@ -84,7 +84,7 @@
84 84 script: '',
85 85 params: '',
86 86 output: '',
87   - reportType: 'HEX',
  87 + dataType: 'HEX',
88 88 });
89 89 const reportTypeOptions = reactive({
90 90 typeOptions: [],
... ... @@ -101,6 +101,7 @@
101 101 reportTypeOptions.typeOptions = res.map((m) => {
102 102 return { label: m.itemText, value: m.itemValue };
103 103 });
  104 + scriptForm.dataType = 'HEX';
104 105 });
105 106 // 初始化编辑器
106 107 const initEditor = (jsScript?: string) => {
... ...