Browse Source

字典bug修改

asd26269546 1 year ago
parent
commit
fb1cc78b5f
1 changed files with 14 additions and 13 deletions
  1. 14 13
      src/views/fund/account/add.vue

+ 14 - 13
src/views/fund/account/add.vue

@@ -43,6 +43,19 @@ const getDict = () => {
         };
       });
     }
+    if (route.query.id) {
+      proxy.post("/accountManagement/detail", { id: route.query.id }).then((res) => {
+        formData.data = res.data;
+        if (formData.data.accountRemainderList && formData.data.accountRemainderList.length > 0) {
+          for (let i = 0; i < formData.data.accountRemainderList.length; i++) {
+            let data = formOption.btnConfig.listConfig[0].data.filter((item) => item.value === formData.data.accountRemainderList[i].currency);
+            if (data && data.length > 0) {
+              formData.data.accountRemainderList[i].currencyName = data[0].text;
+            }
+          }
+        }
+      });
+    }
   });
 };
 getDict();
@@ -232,18 +245,6 @@ const onSubmit = () => {
   }
 };
 onMounted(() => {
-  if (route.query.id) {
-    proxy.post("/accountManagement/detail", { id: route.query.id }).then((res) => {
-      formData.data = res.data;
-      if (formData.data.accountRemainderList && formData.data.accountRemainderList.length > 0) {
-        for (let i = 0; i < formData.data.accountRemainderList.length; i++) {
-          let data = formOption.btnConfig.listConfig[0].data.filter((item) => item.value === formData.data.accountRemainderList[i].currency);
-          if (data && data.length > 0) {
-            formData.data.accountRemainderList[i].currencyName = data[0].text;
-          }
-        }
-      }
-    });
-  }
+  
 });
 </script>