| | |
| | | |
| | | const testObj = computed(() => { |
| | | if (testRecordList.value) { |
| | | let [type, record] = testRecordCode.value || []; |
| | | let [type, record, record2] = testRecordCode.value || []; |
| | | if (!type) return {}; |
| | | |
| | | let list = testRecordList.value.filter((v) => v.value == type)[0].children; |
| | | if (record2 !== undefined) { |
| | | return list |
| | | .filter((v) => record == v.value)[0].children |
| | | .filter((vv) => vv.value == record2)[0]; |
| | | } else { |
| | | return list.filter((v) => record == v.value)[0]; |
| | | } |
| | | } else { |
| | | return {}; |
| | | } |
| | |
| | | } |
| | | |
| | | const canSlide = computed(() => !!testDatas.value.length); |
| | | |
| | | |
| | | function updateChart(data) { |
| | | let labels = [], |
| | |
| | | $message.error("请选择要导出的测试记录"); |
| | | return false; |
| | | } |
| | | exportRecord(currentDevId.value, testRecordCode.value[1]) |
| | | exportRecord( |
| | | currentDevId.value, |
| | | testRecordCode.value[testRecordCode.value.length - 1] |
| | | ) |
| | | .then((res) => { |
| | | let { data, status, headers } = res; |
| | | const matchRes = /filename=(.*)/.exec(headers["content-disposition"]); |