Browse Source

将医院的东西改成月子中心

WenNingning 4 years ago
parent
commit
167a4da5be

+ 108 - 107
src/router/index.js

@@ -100,19 +100,19 @@ export const partRoutes = [
       }
     ]
   },
-  {
-    path: '/hospitalFrame',
-    component: Layout,
-    redirect: '/hospitalFrame/hospitalFrame',
-    children: [
-      {
-        path: 'hospitalFrame',
-        component: () => import('@/views/hospitalFrame/hospitalFrame'),
-        name: 'hospitalFrame',
-        meta: { title: '医院结构', icon: 'el-icon-s-shop', noCache: true }
-      }
-    ]
-  },
+  // {
+  //   path: '/hospitalFrame',
+  //   component: Layout,
+  //   redirect: '/hospitalFrame/hospitalFrame',
+  //   children: [
+  //     {
+  //       path: 'hospitalFrame',
+  //       component: () => import('@/views/hospitalFrame/hospitalFrame'),
+  //       name: 'hospitalFrame',
+  //       meta: { title: '医院结构', icon: 'el-icon-s-shop', noCache: true }
+  //     }
+  //   ]
+  // },
   {
     path: '/frameTreeView',
     component: Layout,
@@ -139,19 +139,19 @@ export const partRoutes = [
       }
     ]
   },
-  {
-    path: '/customer',
-    component: Layout,
-    redirect: '/customer/list',
-    children: [
-      {
-        path: 'customer',
-        component: () => import('@/views/customer/list'),
-        name: 'customerList',
-        meta: { title: '病人管理', icon: 'el-icon-s-custom', noCache: true }
-      }
-    ]
-  },
+  // {
+  //   path: '/customer',
+  //   component: Layout,
+  //   redirect: '/customer/list',
+  //   children: [
+  //     {
+  //       path: 'customer',
+  //       component: () => import('@/views/customer/list'),
+  //       name: 'customerList',
+  //       meta: { title: '病人管理', icon: 'el-icon-s-custom', noCache: true }
+  //     }
+  //   ]
+  // },
   {
     path: '/customerlist',
     component: Layout,
@@ -174,7 +174,14 @@ export const partRoutes = [
         path: 'index',
         component: () => import('@/views/ncs-device/nurse_watch'),
         name: 'nurse_watch',
-        meta: { title: '腕表管理', icon: 'el-icon-watch', noCache: true }
+        meta: { title: '移动设备', icon: 'el-icon-watch', noCache: true }
+      },
+      {
+        path: 'nurse_watch_frame/:id?',
+        component: () => import('@/views/hospitalFrame/nurse_watch_frame'),
+        name: 'nurseWatchFrame',
+        meta: { title: '移动设备空间', icon: 'area', noCache: true },
+        hidden: true
       }
     ]
   },
@@ -213,89 +220,83 @@ export const partRoutes = [
         path: 'index',
         component: () => import('@/views/ncs-interaction/index'),
         name: 'CallingList',
-        meta: { title: '交互历史管理', icon: 'list', noCache: true }
-      }
-    ]
-  },
-  {
-    path: '/calling-message',
-    component: Layout,
-    redirect: '/calling-message/index',
-    children: [
-      {
-        path: 'index',
-        component: () => import('@/views/calling-message/index'),
-        name: 'CallingMessage',
-        meta: { title: '留言设置', icon: 'email', noCache: true }
-      }
-    ]
-  },
-  {
-    path: '',
-    component: Layout,
-    redirect: '/frameGroup/index',
-    name: 'frameGroup',
-    children: [
-      {
-        path: '/frameGroup/index',
-        component: () => import('@/views/hospitalFrame/frameGroup'),
-        name: 'frameGroup',
-        meta: { title: '区域管理', icon: 'area', noCache: true }
-      },
-      {
-        path: 'edit/:id?',
-        component: () => import('@/views/hospitalFrame/frameGroupEdit'),
-        name: 'frameGroupEdit',
-        meta: { title: '编辑区域信息', icon: 'area', noCache: true },
-        hidden: true
-      },
-      {
-        path: 'nurse_watch_frame/:id?',
-        component: () => import('@/views/hospitalFrame/nurse_watch_frame'),
-        name: 'nurseWatchFrame',
-        meta: { title: '腕表管理空间', icon: 'area', noCache: true },
-        hidden: true
-      }
-    ]
-  },
-  {
-    path: '',
-    component: Layout,
-    redirect: '/broadcast/index',
-    children: [
-      {
-        path: '/broadcast/index',
-        component: () => import('@/views/ncs-broadcast/index'),
-        name: 'Broadcast',
-        meta: { title: '广播设置', icon: 'el-icon-headset', noCache: true }
-      }
-    ]
-  },
-  {
-    path: '/ncs-nurse-config',
-    component: Layout,
-    redirect: '/ncs-nurse-config/index',
-    children: [
-      {
-        path: 'index',
-        component: () => import('@/views/ncs-nurse-config/index'),
-        name: 'NcsNurseConfig',
-        meta: { title: '护理设置', icon: 'el-icon-s-goods', noCache: true }
-      }
-    ]
-  }, {
-    path: '/calling-board',
-    component: Layout,
-    redirect: '/calling-board/index',
-    children: [
-      {
-        path: 'index',
-        component: () => import('@/views/calling-board/index'),
-        name: 'CallingBoard',
-        meta: { title: '看板设置', icon: 'el-icon-s-tools', noCache: true }
+        meta: { title: '交互历史', icon: 'list', noCache: true }
       }
     ]
   },
+  // {
+  //   path: '/calling-message',
+  //   component: Layout,
+  //   redirect: '/calling-message/index',
+  //   children: [
+  //     {
+  //       path: 'index',
+  //       component: () => import('@/views/calling-message/index'),
+  //       name: 'CallingMessage',
+  //       meta: { title: '留言设置', icon: 'email', noCache: true }
+  //     }
+  //   ]
+  // },
+  // {
+  //   path: '',
+  //   component: Layout,
+  //   redirect: '/frameGroup/index',
+  //   name: 'frameGroup',
+  //   children: [
+  //     {
+  //       path: '/frameGroup/index',
+  //       component: () => import('@/views/hospitalFrame/frameGroup'),
+  //       name: 'frameGroup',
+  //       meta: { title: '区域管理', icon: 'area', noCache: true }
+  //     },
+  //     {
+  //       path: 'edit/:id?',
+  //       component: () => import('@/views/hospitalFrame/frameGroupEdit'),
+  //       name: 'frameGroupEdit',
+  //       meta: { title: '编辑区域信息', icon: 'area', noCache: true },
+  //       hidden: true
+  //     }
+  //   ]
+  // },
+  // {
+  //   path: '',
+  //   component: Layout,
+  //   redirect: '/broadcast/index',
+  //   children: [
+  //     {
+  //       path: '/broadcast/index',
+  //       component: () => import('@/views/ncs-broadcast/index'),
+  //       name: 'Broadcast',
+  //       meta: { title: '广播设置', icon: 'el-icon-headset', noCache: true }
+  //     }
+  //   ]
+  // },
+  // {
+  //   path: '/ncs-nurse-config',
+  //   component: Layout,
+  //   redirect: '/ncs-nurse-config/index',
+  //   children: [
+  //     {
+  //       path: 'index',
+  //       component: () => import('@/views/ncs-nurse-config/index'),
+  //       name: 'NcsNurseConfig',
+  //       meta: { title: '护理设置', icon: 'el-icon-s-goods', noCache: true }
+  //     }
+  //   ]
+  // },
+  // {
+  //   path: '/calling-board',
+  //   component: Layout,
+  //   redirect: '/calling-board/index',
+  //   children: [
+  //     {
+  //       path: 'index',
+  //       component: () => import('@/views/calling-board/index'),
+  //       name: 'CallingBoard',
+  //       meta: { title: '看板设置', icon: 'el-icon-s-tools', noCache: true }
+  //     }
+  //   ]
+  // },
   {
     path: '/ncs-event',
     component: Layout,

+ 2 - 2
src/views/dashboard/calling/index.vue

@@ -241,7 +241,7 @@ export default {
       if (!row.outerior_action && row.relative_id === null) {
         let named = ''
         if (row.from_frame_full_name && row.from_member_name) {
-          named = row.from_frame_full_name + row.from_member_name
+          named = row.from_frame_full_name + ' ' + row.from_member_name
         } else if (row.from_frame_full_name) {
           named = row.from_frame_full_name
         } else if (row.from_member_name) {
@@ -255,7 +255,7 @@ export default {
     formatterToName(row, column, cellValue) {
       let named = ''
       if (row.to_frame_full_name && row.to_member_name) {
-        named = row.to_frame_full_name + row.to_member_name
+        named = row.to_frame_full_name + ' ' + row.to_member_name
       } else if (row.to_frame_full_name) {
         named = row.to_frame_full_name
       } else if (row.to_member_name) {

+ 25 - 12
src/views/hospitalFrame/nurse_watch_frame.vue

@@ -3,7 +3,7 @@
     <el-card style="margin: 15px">
       <el-form ref="editform" label-width="80px">
         <fieldset class="margin-top-sm">
-          <legend>腕表管辖空间</legend>
+          <legend>管辖空间</legend>
           <el-row :gutter="20">
             <el-col v-for="(item,index) in rooms" :key="index" gut :xs="8" :sm="6" :md="4" :lg="4" :xl="4">
               <el-card class="box-card">
@@ -20,8 +20,7 @@
           </el-row>
         </fieldset>
         <el-form-item align="center" class="margin-top-sm">
-          <el-button type="success" @click="onSubmit">保存设置</el-button>
-          <el-button @click="back">返回</el-button>
+          <el-button type="success" :disabled="hasDisabled" @click="onSubmit">保存设置</el-button>
         </el-form-item>
       </el-form>
     </el-card>
@@ -37,15 +36,32 @@ import * as API_device from '@/api/ncs_device'
 
 export default {
   name: 'FrameGroupEdit',
+  props: {
+    deviceId: {
+      type: Number,
+      default: 0
+    },
+    roleId: {
+      type: Number,
+      default: 0
+    }
+  },
   data() {
     return {
-      deviceId: this.$route.params.id,
-      roleId: this.$route.params.role_id,
+      // deviceId: this.$route.params.id,
+      // roleId: this.$route.params.role_id,
       deviceFrames: [],
       /** 空间结构房间 **/
       rooms: [],
       checkList: [],
-      checkDate: []
+      checkDate: [],
+      hasDisabled: false
+    }
+  },
+  watch: {
+    deviceId: function(newval) {
+      console.log('newval=', newval)
+      this.getGroup()
     }
   },
   mounted() {
@@ -78,7 +94,6 @@ export default {
           }
         })
       })
-      console.log(frames[0])
       frames.forEach(item => {
         if (item.children) {
           this.$set(item, 'children', this.filterGroupFrames(item.children, item.id))
@@ -103,7 +118,6 @@ export default {
       const length_checked = _list.filter(_item => _item.checked).length
       this.$set(frame, 'allCkeck', length === _list.filter(_item => _item.checked).length)
       this.$set(frame, 'indeterminate', (length_checked !== 0) && (length !== length_checked))
-      console.log('list', _list)
       return _list
     },
     /** 选择 */
@@ -134,6 +148,7 @@ export default {
       return perm
     },
     onSubmit() {
+      this.hasDisabled = true
       const data = []
       this.rooms.forEach(item => {
         if (item.checked) {
@@ -149,15 +164,13 @@ export default {
         this.$message.info('请选择病床!')
         return
       }
-      console.log(data)
       API_hospitalFrame.updateDeviceFrameManage({ deviceId: this.deviceId, frameIds: data }).then(res => {
         this.$message.success('保存成功!')
+        this.hasDisabled = false
       }).catch(err => {
         this.$message.error(err.message)
+        this.hasDisabled = false
       })
-    },
-    back() {
-      window.history.back()
     }
   }
 

+ 1 - 1
src/views/ncs-device/components/deviceManager.vue

@@ -67,7 +67,7 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="有线物理地址" prop="eth_mac">
+            <el-form-item label="设备识别码" prop="eth_mac">
               <el-input v-model="deviceModel.eth_mac" clearable placeholder="请输入物理MAC地址" />
             </el-form-item>
           </el-col>

+ 2 - 2
src/views/ncs-device/device-admin.vue

@@ -74,7 +74,7 @@
           </template>
         </el-table-column>
 
-        <el-table-column prop="device_eth_mac" sortable="custom" label="有线物理地址" width="160" align="center" />
+        <el-table-column prop="device_eth_mac" sortable="custom" label="设备识别码" width="160" align="center" />
         <el-table-column prop="device_eth_ip" sortable="custom" label="有线IP地址" width="160" align="center" />
         <el-table-column prop="device_model" sortable="custom" label="设备型号" width="160" align="center" />
 
@@ -172,7 +172,7 @@
 
           <el-row>
             <el-col :span="12">
-              <el-form-item label="有线物理地址" prop="device_eth_mac">
+              <el-form-item label="设备识别码" prop="device_eth_mac">
                 <el-input v-model="formmodel.device_eth_mac" clearable placeholder="请输入物理MAC地址" />
               </el-form-item>
             </el-col>

+ 1 - 1
src/views/ncs-device/device-edit.vue

@@ -47,7 +47,7 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="有线物理地址" prop="eth_mac">
+            <el-form-item label="设备识别码" prop="eth_mac">
               <el-input v-model="formmodel.eth_mac" clearable placeholder="请输入物理MAC地址" />
             </el-form-item>
           </el-col>

+ 1 - 1
src/views/ncs-device/index.vue

@@ -43,7 +43,7 @@
           </template>
         </el-table-column>
         <el-table-column prop="full_name" sortable="custom" label="部署位置" width="140" align="center" />
-        <el-table-column prop="eth_mac" sortable="custom" label="有线物理地址" width="160" align="center" />
+        <el-table-column prop="eth_mac" sortable="custom" label="设备识别码" width="160" align="center" />
         <el-table-column prop="eth_ip" sortable="custom" label="有线IP地址" width="160" align="center" />
         <el-table-column prop="model" sortable="custom" label="设备型号" width="160" align="center" />
         <el-table-column prop="code" sortable="custom" label="出厂编号" width="160" align="center" />

+ 24 - 12
src/views/ncs-device/nurse_watch.vue

@@ -32,7 +32,7 @@
         @current-change="handlePageCurrentChange"
       />
     </ag-grid-layout>
-    <!--编辑表单-->
+    <!--改绑-->
     <el-dialog title="改绑" :visible.sync="formshow" width="70%">
       <div style="width:100%;margin:0 auto;height: 400px;">
         <el-form label-width="120px" style="min-width: 100%;float:left;">
@@ -53,7 +53,7 @@
               <td class="td2"><span>{{ deviceInfo.model }}</span></td>
             </tr>
             <tr>
-              <td class="td1">有线物理地址:</td>
+              <td class="td1">设备识别码:</td>
               <td class="td2"><span>{{ deviceInfo.eth_mac }}</span></td>
               <td class="td1">有线IP地址:</td>
               <td class="td2"><span>{{ deviceInfo.eth_ip }}</span></td>
@@ -91,6 +91,11 @@
         <el-button type="primary" @click="handlerFormSubmit('editform')">确 定</el-button>
       </div>
     </el-dialog>
+
+    <!--管理空间-->
+    <el-dialog title="管理空间" :visible.sync="dialogAddVisible" :append-to-body="true" width="70%">
+      <nurse-watch-frame :device-id="deviceId" :role-id="roleId" />
+    </el-dialog>
   </div>
 </template>
 
@@ -100,12 +105,13 @@ import { unixToDate } from '@/utils/Foundation'
 import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
 import { DeviceUrl } from '@/utils/domain'
 import * as clerk_API from '@/api/ncs_clerk'
-import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender"
-import RadioFilter from "@/components/AgGridCustomFilter/RadioFilter";
+import ButtonCellRender from '@/components/AgGridCellRender/ButtonCellRender'
+import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
+import nurseWatchFrame from '@/views/hospitalFrame/nurse_watch_frame'
 
 export default {
   name: 'Index',
-  components: { ButtonCellRender, RadioFilter },
+  components: { ButtonCellRender, RadioFilter, nurseWatchFrame },
   data: function() {
     return {
       /** 表格数据 */
@@ -145,7 +151,10 @@ export default {
       deviceStatusTransfer: [
         { key: '启用', value: 1, color: 'green' },
         { key: '未启用', value: 0, color: 'red' }
-      ]
+      ],
+      deviceId: null,
+      roleId: null,
+      dialogAddVisible: false
     }
   },
   computed: {
@@ -175,7 +184,7 @@ export default {
       },
       { headerName: '绑定人', field: 'member_name', sortable: true, filter: 'agTextColumnFilter', minWidth: 140, valueFormatter: this.formatterName },
       { headerName: '所属位置', field: 'full_name', sortable: true, filter: 'agTextColumnFilter', minWidth: 140 },
-      { headerName: '有线物理地址', field: 'eth_mac', sortable: true, filter: 'agTextColumnFilter', minWidth: 150 },
+      { headerName: '设备识别码', field: 'eth_mac', sortable: true, filter: 'agTextColumnFilter', minWidth: 150 },
       { headerName: '有线IP地址', field: 'eth_ip', sortable: true, filter: 'agTextColumnFilter', minWidth: 150 },
       { headerName: '设备型号', field: 'model', sortable: true, filter: 'agTextColumnFilter', minWidth: 150 },
       { headerName: '出厂编号', field: 'code', sortable: true, filter: 'agTextColumnFilter', minWidth: 150 },
@@ -193,11 +202,11 @@ export default {
         }
       },
       {
-        headerName: '编辑', field: 'shop_id',
+        headerName: '管理', field: 'shop_id',
         cellRendererFramework: 'ButtonCellRender',
         cellRendererParams: {
           onClick: this.handEdit,
-          label: '编辑',
+          label: '管理',
           buttonType: 'primary',
           buttonSize: 'mini'
         },
@@ -342,12 +351,12 @@ export default {
     },
     formatterName(params) {
       if (params.value && params.data.role_name) {
-        return params.value + params.data.role_name
+        return params.value + ' ' + params.data.role_name
       } else {
         if (params.value) {
           return params.value
         } else if (params.data.role_name) {
-          return '未绑定' + params.data.role_name
+          return '未绑定 ' + params.data.role_name
         }
       }
     },
@@ -415,7 +424,10 @@ export default {
     },
     handEdit(row) {
       if (row.role_id) {
-        this.$router.push({ name: 'nurseWatchFrame', params: { id: row.id, role_id: row.role_id, callback: this.getList() }})
+        this.deviceId = row.id
+        this.roleId = row.role_id
+        this.dialogAddVisible = true
+        // this.$router.push({ name: 'nurseWatchFrame', params: { id: row.id, role_id: row.role_id, callback: this.getList() }})
       } else {
         this.$message.error('请先设置适用人')
       }

+ 2 - 2
src/views/ncs-interaction/index.vue

@@ -270,7 +270,7 @@ export default {
       if (!row.data.outerior_action && row.data.relative_id === null) {
         let named = ''
         if (row.data.from_frame_full_name && row.data.from_member_name) {
-          named = row.data.from_frame_full_name + row.data.from_member_name
+          named = row.data.from_frame_full_name + ' ' + row.data.from_member_name
         } else if (row.data.from_frame_full_name) {
           named = row.data.from_frame_full_name
         } else if (row.data.from_member_name) {
@@ -284,7 +284,7 @@ export default {
     formatterToName(row) {
       let named = ''
       if (row.data.to_frame_full_name && row.data.to_member_name) {
-        named = row.data.to_frame_full_name + row.data.to_member_name
+        named = row.data.to_frame_full_name + ' ' + row.data.to_member_name
       } else if (row.data.to_frame_full_name) {
         named = row.data.to_frame_full_name
       } else if (row.data.to_member_name) {