liuyanpeng 1 год назад
Родитель
Сommit
7316d98be6
1 измененных файлов с 6 добавлено и 1 удалено
  1. 6 1
      src/window1/tabGridView/AddAssets.vue

+ 6 - 1
src/window1/tabGridView/AddAssets.vue

@@ -134,6 +134,8 @@ const assetCategorys = ref([]);
 
 const secondMenu = ref([]);
 
+const isFirst = ref(true);
+
 // 所选资产分类名
 const assetName = ref('');
 const allName = ref('');
@@ -202,7 +204,9 @@ const changeDetailAsset = key => {
       item.children.forEach(child => {
         if (child.id === key) {
           assetName.value = child.text;
-          allName.value = child.text;
+          if (!isFirst.value) {
+            allName.value = child.text;
+          }
           if (child.children && child.children.length) {
             listMenu.push(child.children);
           }
@@ -212,6 +216,7 @@ const changeDetailAsset = key => {
   });
   list.value = listMenu.flat();
   emit('getStepInfo', step.value, allName.value);
+  isFirst.value = false;
 };
 
 // 获取明细所选资产