|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="hc-page-box">
|
|
|
+ <div v-loading="isPageLoading" class="hc-page-box">
|
|
|
<HcTabCard
|
|
|
:tabs="authBtnTabdata" :tab-key="authBtnTabKey"
|
|
|
:disabled="router.currentRoute.value.query?.id && router.currentRoute.value.query?.id.length > 0 || newId?.length > 0"
|
|
@@ -101,6 +101,7 @@
|
|
|
@upcheck-table-id="upcheckTableId"
|
|
|
@updevice-use-ids="updeviceUseIds"
|
|
|
@get-list="searchNodeAllTable1"
|
|
|
+ @new-id="listItemNewId"
|
|
|
/>
|
|
|
</el-scrollbar>
|
|
|
<hc-empty v-else v-loading="isLoadList" title="暂无表单" />
|
|
@@ -1246,7 +1247,6 @@ const tableFormSaveClick = async () => {
|
|
|
await getSearchNodeTablesall(1)
|
|
|
await getSearchNodeTablesall(2)
|
|
|
await queryNodeStatus(data)
|
|
|
-
|
|
|
} else {
|
|
|
listItemBaseData.value.id = data
|
|
|
|
|
@@ -1255,7 +1255,7 @@ const tableFormSaveClick = async () => {
|
|
|
await getSearchNodeTablesall(1)
|
|
|
await getSearchNodeTablesall(2)
|
|
|
await queryNodeStatus(data)
|
|
|
-
|
|
|
+ await listItemNewId(data)
|
|
|
afterAdd.value = true
|
|
|
isaddType = false
|
|
|
}
|
|
@@ -1289,6 +1289,34 @@ const tableFormSaveClick = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+//新的id
|
|
|
+const isPageLoading = ref(false)
|
|
|
+const listItemNewId = async (id) => {
|
|
|
+ if (!isaddType || isNullES(id)) return
|
|
|
+ isPageLoading.value = true
|
|
|
+ const { code, data, msg } = await dataApi.trialSelfInById(id)
|
|
|
+ if (code !== 200) {
|
|
|
+ window.$message?.error(msg || '操作失败')
|
|
|
+ isPageLoading.value = false
|
|
|
+ toBackClick()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ setStoreValue('test-form', getObjValue(data))
|
|
|
+ setTimeout(() => {
|
|
|
+ isPageLoading.value = false
|
|
|
+ router.push({
|
|
|
+ path: '/tentative/detect/test-form',
|
|
|
+ query: {
|
|
|
+ id: id,
|
|
|
+ nodeId: nodeId,
|
|
|
+ dataType: dataType,
|
|
|
+ tabTypeKey: '1',
|
|
|
+ cid: currentCid,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }, 2000)
|
|
|
+}
|
|
|
+
|
|
|
const setAllListData = (curform) => {
|
|
|
if (curform) {
|
|
|
curform.forEach((item) => {
|