|
@@ -207,8 +207,8 @@ const routerQuery = useRoutes?.query;
|
|
|
const dataId = routerQuery?.id || '';
|
|
|
const nodeId = routerQuery?.nodeId || '';
|
|
|
const dataType = routerQuery?.dataType || '1';
|
|
|
-const isaddType = routerQuery?.isaddType || false;
|
|
|
-
|
|
|
+let isaddType = routerQuery?.isaddType || false;
|
|
|
+const afterAdd=ref(false)
|
|
|
const dayDate = dayjs().format('YYYY-MM-DD')
|
|
|
const testTreeItem = ref(getStoreData('testTreeItem'));
|
|
|
const isMixRatioTestIds = ref(false);
|
|
@@ -224,7 +224,8 @@ onMounted(() => {
|
|
|
listItemBaseData.value.contractId = contractId.value
|
|
|
listItemBaseData.value.trialProjectName = title
|
|
|
listItemBaseData.value.reportDate = dayDate
|
|
|
- listItemBaseData.value.detectionCategory = Number(dataType)
|
|
|
+ // listItemBaseData.value.detectionCategory = Number(dataType)
|
|
|
+ listItemBaseData.value.detectionCategory = info.detectionCategory||1
|
|
|
listItemBaseData.value.trialUserName =info.trialUserName||(userInfo.value['nick_name'])
|
|
|
|
|
|
listItemBaseData.value.projectPosition = info.projectPosition||''
|
|
@@ -789,7 +790,36 @@ const tableFormSaveClick = async () => {
|
|
|
FormData = alllistData.value;
|
|
|
listItemBaseData.value.tableType = "1,2"
|
|
|
} else {
|
|
|
- FormData = alllistData.value.filter(e => e.type == type);
|
|
|
+
|
|
|
+ // FormData = alllistData.value.filter(e => e.type == type);
|
|
|
+ if(!afterAdd.value){
|
|
|
+ FormData = alllistData.value.filter(e => e.type == type);
|
|
|
+ }else{
|
|
|
+ console.log(111111111111);
|
|
|
+ FormData =alllistData.value.filter(e => e.type == type);
|
|
|
+
|
|
|
+ orgAlllistData.value.forEach((item1)=>{
|
|
|
+ if(item1.tableType.toString()!==tabTypeKey.value){
|
|
|
+ let data1 = {
|
|
|
+ projectId: item1.projectId,
|
|
|
+ contractId: contractId.value,
|
|
|
+ pkeyId: item1.pKeyId,
|
|
|
+ nodeId: routerQuery?.nodeId,
|
|
|
+ isCollapseLoad: false,
|
|
|
+ isBussShow:item1.isBussShow
|
|
|
+ }
|
|
|
+ // 过滤存在的key_的键值
|
|
|
+ let ishasKey= Object.keys(item1).filter(e => e.indexOf("key_") >= 0)
|
|
|
+ if (ishasKey.length > 0) {
|
|
|
+ ishasKey.forEach(key => {
|
|
|
+ data1[key] = item1[key]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ FormData.push(data1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(FormData,'FormData2222222222');
|
|
|
listItemBaseData.value.tableType = type
|
|
|
}
|
|
|
}
|
|
@@ -920,6 +950,7 @@ const tableFormSaveClick = async () => {
|
|
|
tableFormSaveLoading.value = false
|
|
|
if (!error && code === 200) {
|
|
|
window?.$message?.success('保存成功')
|
|
|
+
|
|
|
listItemBaseData.value.deviceUseIds=''
|
|
|
checkTabId.value=''
|
|
|
// alllistData.value.forEach(e => e.oper = false)
|
|
@@ -936,6 +967,7 @@ const tableFormSaveClick = async () => {
|
|
|
getSearchNodeTables()
|
|
|
getSearchNodeTablesall(1)
|
|
|
getSearchNodeTablesall(2)
|
|
|
+ afterAdd.value=true
|
|
|
// toBackClick()
|
|
|
// setTimeout(() => {
|
|
|
// window?.location?.reload() //刷新页面
|