|
@@ -299,22 +299,24 @@ const sampleRemoveApi = async (ids) => {
|
|
|
|
|
|
//填写报告
|
|
//填写报告
|
|
const fillReportClick = async ({ id, testId }) => {
|
|
const fillReportClick = async ({ id, testId }) => {
|
|
- //const { contractType } = contractInfo.value
|
|
|
|
- //const { primaryKeyId } = treeInfo.value
|
|
|
|
- await mainApi.detail(testId)
|
|
|
|
-
|
|
|
|
- /*setStoreValue('test-form', row)
|
|
|
|
- setStoreValue('testTreeItem', treeInfo.value)
|
|
|
|
- setStoreValue('prenodeDataInfo', treeInfo.value)*/
|
|
|
|
- /*router.push({
|
|
|
|
- path: '/tentative/detect/test-form',
|
|
|
|
- query: {
|
|
|
|
- id: testId,
|
|
|
|
- nodeId: nodeId,
|
|
|
|
- dataType: type,
|
|
|
|
- commissionId: id,
|
|
|
|
- tabTypeKey: 1
|
|
|
|
- },
|
|
|
|
- })*/
|
|
|
|
|
|
+ const { error, code, data, msg } = await mainApi.detail(testId)
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ const res = getObjValue(data)
|
|
|
|
+ setStoreValue('test-form', res)
|
|
|
|
+ setStoreValue('testTreeItem', treeInfo.value)
|
|
|
|
+ setStoreValue('prenodeDataInfo', treeInfo.value)
|
|
|
|
+ router.push({
|
|
|
|
+ path: '/tentative/detect/test-form',
|
|
|
|
+ query: {
|
|
|
|
+ id: testId,
|
|
|
|
+ nodeId: res.nodeId,
|
|
|
|
+ dataType: res.type,
|
|
|
|
+ commissionId: id,
|
|
|
|
+ tabTypeKey: 1,
|
|
|
|
+ },
|
|
|
|
+ }).then()
|
|
|
|
+ } else {
|
|
|
|
+ window.$message.error(msg || '操作失败')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|