Ver código fonte

显示问题

刘湘琪 2 anos atrás
pai
commit
361aee314f
1 arquivos alterados com 8 adições e 1 exclusões
  1. 8 1
      src/views/enterprise/ent/edit.vue

+ 8 - 1
src/views/enterprise/ent/edit.vue

@@ -598,7 +598,7 @@ export default {
     };
   },
   created() {
-    this.getProvinceData()
+
     this.form.id = this.$route.params.id || undefined;
     this.type = this.$route.query.type || undefined
     if(this.form.id) {
@@ -606,6 +606,8 @@ export default {
       this.params.dataId = this.$route.params.id
       this.getData()
       this.getEnclosureData()
+    }else{
+      this.getProvinceData()
     }
     // if(this.form.provinceId) {
     //   console.log("&&&&&&&&&&&&&&&&&&&")
@@ -663,6 +665,11 @@ export default {
           this.form.serviceDate[0] = this.form.startDate
           this.form.serviceDate[1] = this.form.endDate
         }
+        getProvinceDataApi().then(res => {
+          if(res.code == 200) {
+            this.provinceDataList = res.data
+          }
+        })
         this.form.provinceId = res.data.provinceId
         if(this.form.provinceId) {
           getRegionChildrenApi(this.form.provinceId).then(res => {