Commit 99c6ac358b7241fbaf7eae436e88d42565a4f420
1 parent
8ff0305c
fix:DEFECT-933 产品测试脚本,点击测试时显示为新增转换函数,应该与选择了的转换函数内容一致
Showing
1 changed file
with
8 additions
and
6 deletions
| ... | ... | @@ -60,8 +60,10 @@ |
| 60 | 60 | converScriptRef.value?.setFormData(data.record); |
| 61 | 61 | } |
| 62 | 62 | if (unref(isTitle) == 'test') { |
| 63 | - // converScriptRef.value?.setScriptContentData(''); | |
| 64 | - converScriptRef.value?.setFormData(data.record); | |
| 63 | + if (data.record) { | |
| 64 | + const res = await getScriptManageDetail(data.record); | |
| 65 | + converScriptRef.value?.setFormData(res); | |
| 66 | + } | |
| 65 | 67 | } |
| 66 | 68 | setModalProps({ title, showOkBtn: true, showCancelBtn: true, okText }); |
| 67 | 69 | if (!unref(isUpdate)) { |
| ... | ... | @@ -96,15 +98,15 @@ |
| 96 | 98 | setTimeout(() => { |
| 97 | 99 | closeModal(); |
| 98 | 100 | }, 10); |
| 101 | + emits('success', { | |
| 102 | + res, | |
| 103 | + text: isText.value, | |
| 104 | + }); | |
| 99 | 105 | } else { |
| 100 | 106 | if (res) { |
| 101 | 107 | converScriptRef.value?.setScriptOutputData(res?.output || res?.error); |
| 102 | 108 | } |
| 103 | 109 | } |
| 104 | - emits('success', { | |
| 105 | - res, | |
| 106 | - text: isText.value, | |
| 107 | - }); | |
| 108 | 110 | } finally { |
| 109 | 111 | setModalProps({ confirmLoading: false }); |
| 110 | 112 | } | ... | ... |