WenNingning 4 năm trước cách đây
mục cha
commit
e73dfbf642

+ 1 - 3
src/views/hospital/ncs_customer/customerManager.vue

@@ -655,7 +655,7 @@ export default {
             label: '删除',
             buttonType: 'danger',
             buttonSize: 'mini',
-            disabled: param.data['member_name'] === 'superadmin'
+            disabled: param.data['member_name'] === 'superadmin' || param.data['status'] === 0
           }
         },
         pinned: 'right',
@@ -1007,8 +1007,6 @@ export default {
           this.$emit('saved')
           this.getList()
         })
-      }).catch(err => {
-        this.$message.error(err)
       })
     },
     /** 换床 **/

+ 11 - 8
src/views/hospital/ncs_frame/frameTreeView.vue

@@ -123,14 +123,19 @@
           </el-col>
         </el-row>
         <el-tabs v-model="activeName" style="margin:0;" type="border-card">
+          <el-tab-pane label="用户列表" name="frameInfo">
+            <keep-alive>
+              <customer-manager :frame="selectedNode" @saved="handleCustomerChange" />
+            </keep-alive>
+          </el-tab-pane>
           <el-tab-pane label="设备列表" name="deviceList">
             <keep-alive>
               <device-manager :frame="selectedNode" />
             </keep-alive>
           </el-tab-pane>
-          <el-tab-pane label="用户列表" name="frameInfo">
+          <el-tab-pane label="机构成员" name="clerkList">
             <keep-alive>
-              <customer-manager :frame="selectedNode" @saved="handleCustomerChange" />
+              <clerk-list :part-id="selectedNode.part_id" />
             </keep-alive>
           </el-tab-pane>
         </el-tabs>
@@ -283,12 +288,13 @@ import * as HospitalFrame_API from '@/api/ncs_hospitalFrame'
 import * as API_FrameGroup from '@/api/ncs_frameGroup'
 import CustomerManager from '@/views/hospital/ncs_customer/customerManager'
 import DeviceManager from '@/views/hospital/ncs_device/deviceManager'
+import ClerkList from '@/views/ncs-clerk/clerkList'
 import CountTo from 'vue-count-to'
 import * as API_PartInfo from '@/api/ncs_partInfo'
 
 export default {
   name: 'FrameTreeView',
-  components: { DeviceManager, CustomerManager, CountTo },
+  components: { DeviceManager, CustomerManager, CountTo, ClerkList },
   data() {
     return {
       treeData: [],
@@ -297,7 +303,7 @@ export default {
       selectedNodeId: 0,
       selectedNode: {},
       filterText: '',
-      activeName: 'deviceList',
+      activeName: 'frameInfo',
       /** 上级机构数组 **/
       parents: [],
       /** frame 编辑弹窗 **/
@@ -494,10 +500,7 @@ export default {
             HospitalFrame_API.addHospitalFrame(params).then(response => {
               this.$message.success('添加成功!')
               this.frameDialogVisible = false
-              this.getFrameTree().then(() => {
-                this.selectedNodeId = response.id
-                this.$refs.frameTree.setCurrentKey(this.selectedNodeId)
-              })
+              this.getFrameTree()
             })
           }
         } else {

+ 1 - 4
src/views/hospitalFrame/frameTreeView.vue

@@ -356,10 +356,7 @@ export default {
             HospitalFrame_API.addHospitalFrame(params).then(response => {
               this.$message.success('添加成功!')
               this.frameDialogVisible = false
-              this.getFrameTree().then(() => {
-                this.selectedNodeId = response.id
-                this.$refs.frameTree.setCurrentKey(this.selectedNodeId)
-              })
+              this.getFrameTree()
             })
           }
         } else {

+ 27 - 4
src/views/ncs-clerk/clerkList.vue

@@ -201,6 +201,12 @@
   export default {
     name: 'careDoctorManager',
     components: { ButtonCellRender, AgGridImg, ImageViewer, RadioFilter },
+    props: {
+      partId: {
+        type: Number,
+        default: 0
+      }
+    },
     data: function() {
       return {
         uploadurl: serverUrl + '/ncs/upload/uploadFile',
@@ -212,8 +218,7 @@
           page_size: 10,
           page_no: 1,
           sort: 'nc.member_id',
-          dir: 'asc',
-          fixedCondition: 'nc.shop_id=' + this.$store.getters.partId
+          dir: 'asc'
         },
         /** 列表数据 */
         tableData: [],
@@ -283,7 +288,8 @@
         roleZzId: null,
         newCheckList: [],
         oldCheckList: [],
-        nurseList: []
+        nurseList: [],
+        shopId: null
       }
     },
     computed: {
@@ -291,6 +297,17 @@
         return this.mainAreaHeight - 130
       }
     },
+    watch: {
+      partId(val, oldvalue) {
+        if (val === null) {
+          this.shopId = this.$store.getters.partId
+        } else {
+          this.shopId = val
+        }
+        this.params.fixedCondition =  'nc.shop_id=' + this.shopId
+        this.GET_MemberList()
+      }
+    },
     beforeMount() {
       this.gridOptions = {
       }
@@ -358,6 +375,12 @@
     mounted() {
       this.gridApi = this.gridOptions.api
       this.getRoles({ page_size: 200, page_no: 1, fixedCondition: ' shop_id = -1', sort: ' role_id', dir: 'desc' })
+      if (this.partId === 0) {
+        this.shopId = this.$store.getters.partId
+      } else {
+        this.shopId = this.partId
+      }
+      this.params.fixedCondition =  'nc.shop_id=' + this.shopId
       this.GET_MemberList()
     },
     activated() {
@@ -498,7 +521,7 @@
                 this.GET_MemberList()
               })
             } else {
-              params.shop_id = this.$store.getters.partId
+              params.shop_id = this.shopId
               clerk_API.add(params).then(response => {
                 this.dialogAddMemberVisible = false
                 this.imageUrl = null