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