Commit d228a19139d6025643f5486f6dd52cdd2702ecf2
Merge branch 'ft_local_dev' into 'main'
fix:修改脚本管理 转换函数 上报数据类型字段名 See merge request huang/yun-teng-iot-front!373
Showing
1 changed file
with
5 additions
and
4 deletions
| ... | ... | @@ -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) => { | ... | ... |