Browse Source

修改的时候不调科室列表接口

zhangxc 6 năm trước cách đây
mục cha
commit
f05056016c

+ 5 - 4
src/components/icss/AddMedicalInfo.vue

@@ -179,7 +179,7 @@
                    <el-select v-model="form.department"   filterable  placeholder="请选择" size="small">
                           <el-option
                               v-for="(item) in departmentList"
-                              :key="item.id"
+                              :key="item.name"
                               :label="item.name"
                               :value="item.name">
                           </el-option>
@@ -368,6 +368,7 @@
         
       }
       this.getPrimarySite()
+      this.getAllDepts()
     },
     methods: {
       back() { this.$router.go(-1) },
@@ -460,10 +461,10 @@
          
         })
       },
-      getDeptInfo() {
-        api.getDeptInfo({}).then((res) => {
+      getAllDepts() {
+        api.getAllDepts({name: ''}).then((res) => {
           if(res.data.code == '0') {
-            this.departmentList = res.data.data.records
+            this.departmentList = res.data.data
           }
         })
       },

+ 3 - 1
src/components/icss/AddPhysicalExamTemp.vue

@@ -118,8 +118,10 @@
             this.departList.push({ id, name, val:id })
             this.form.department = id
             
+        } else {
+            this.getDepartmentList()
         }
-        this.getDepartmentList()
+        
         this.getTagList()
     },
     watch: {