浏览代码

处理授权失效自动退出登陆,路由按医院和月子中心版本参数设置

wuyunfeng 4 年之前
父节点
当前提交
c879e9abbe

+ 71 - 65
src/router/index.js

@@ -1,5 +1,7 @@
 import Vue from 'vue'
 import Vue from 'vue'
 import Router from 'vue-router'
 import Router from 'vue-router'
+// eslint-disable-next-line no-unused-vars
+import { uiVersion } from '@/utils/domain'
 
 
 Vue.use(Router)
 Vue.use(Router)
 
 
@@ -38,6 +40,7 @@ import Layout from '@/layout'
  * a base page that does not have permission requirements
  * a base page that does not have permission requirements
  * all roles can be accessed
  * all roles can be accessed
  */
  */
+console.log('version', uiVersion === 1)
 export const constantRoutes = [
 export const constantRoutes = [
   {
   {
     path: '/redirect',
     path: '/redirect',
@@ -100,19 +103,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',
     path: '/frameTreeView',
     component: Layout,
     component: Layout,
@@ -122,7 +125,7 @@ export const partRoutes = [
         path: 'frameTreeView',
         path: 'frameTreeView',
         component: () => import('@/views/hospitalFrame/frameTreeView'),
         component: () => import('@/views/hospitalFrame/frameTreeView'),
         name: 'hospitalFrame',
         name: 'hospitalFrame',
-        meta: { title: '空间位置', icon: 'el-icon-s-shop', noCache: true }
+        meta: { title: '空间位置', icon: 'tree', noCache: true }
       }
       }
     ]
     ]
   },
   },
@@ -135,23 +138,23 @@ export const partRoutes = [
         path: 'clerkList',
         path: 'clerkList',
         component: () => import('@/views/ncs-clerk/clerkList'),
         component: () => import('@/views/ncs-clerk/clerkList'),
         name: 'clerkList',
         name: 'clerkList',
-        meta: { title: '科室员工设置', icon: 'user', 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 }
+        meta: { title: '员工管理', icon: 'peoples', 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',
     path: '/customerlist',
     component: Layout,
     component: Layout,
@@ -159,26 +162,26 @@ export const partRoutes = [
     children: [
     children: [
       {
       {
         path: 'index',
         path: 'index',
-        component: () => import('@/views/customer/customerManagement'),
-        name: 'customerManager',
-        meta: { title: '用户管理', icon: 'el-icon-s-custom', noCache: true }
-      }
-    ]
-  },
-  // 医院版
-  {
-    path: '/patientlist',
-    component: Layout,
-    redirect: '/customerlist/index',
-    children: [
-      {
-        path: 'index',
-        component: () => import('@/views/customer/patientManagement'),
-        name: 'patientManagement',
-        meta: { title: '病人管理', icon: 'el-icon-s-custom', noCache: true }
+        component: () => uiVersion === 1 ? import('@/views/customer/patientManagement') : import('@/views/customer/customerManagement') ,
+        name: uiVersion === 1 ? 'patientManagement' : 'customerManager',
+        meta: { title: uiVersion === 1 ? '病人管理' : '用户管理', icon: 'el-icon-s-custom', noCache: true }
       }
       }
     ]
     ]
   },
   },
+  // // 医院版
+  // {
+  //   path: '/patientlist',
+  //   component: Layout,
+  //   redirect: '/customerlist/index',
+  //   children: [
+  //     {
+  //       path: 'index',
+  //       component: () => import('@/views/customer/patientManagement'),
+  //       name: 'patientManagement',
+  //       meta: { title: '病人管理', icon: 'el-icon-s-custom', noCache: true, hidden: uiVersion !== 1 }
+  //     }
+  //   ]
+  // },
   {
   {
     path: '/ncs-nurse-watch',
     path: '/ncs-nurse-watch',
     component: Layout,
     component: Layout,
@@ -231,19 +234,19 @@ export const partRoutes = [
       }
       }
     ]
     ]
   },
   },
-  {
-    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: '/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: '',
     path: '',
     component: Layout,
     component: Layout,
@@ -281,7 +284,7 @@ export const partRoutes = [
         path: '/broadcast/index',
         path: '/broadcast/index',
         component: () => import('@/views/ncs-broadcast/index'),
         component: () => import('@/views/ncs-broadcast/index'),
         name: 'Broadcast',
         name: 'Broadcast',
-        meta: { title: '广播设置', icon: 'el-icon-headset', noCache: true }
+        meta: { title: '广播设置', icon: 'el-icon-headset', noCache: true, hidden: uiVersion !== 1 }
       },
       },
       {
       {
         path: '/broadcast/edit/:id?',
         path: '/broadcast/edit/:id?',
@@ -301,9 +304,10 @@ export const partRoutes = [
         path: 'index',
         path: 'index',
         component: () => import('@/views/ncs-nurse-config/index'),
         component: () => import('@/views/ncs-nurse-config/index'),
         name: 'NcsNurseConfig',
         name: 'NcsNurseConfig',
-        meta: { title: '护理设置', icon: 'el-icon-s-goods', noCache: true }
+        meta: { title: '护理参数', icon: 'care1', noCache: true }
       }
       }
-    ]
+    ],
+    hidden: uiVersion !== 1
   }, {
   }, {
     path: '/calling-board',
     path: '/calling-board',
     component: Layout,
     component: Layout,
@@ -313,9 +317,10 @@ export const partRoutes = [
         path: 'index',
         path: 'index',
         component: () => import('@/views/calling-board/index'),
         component: () => import('@/views/calling-board/index'),
         name: 'CallingBoard',
         name: 'CallingBoard',
-        meta: { title: '看板设置', icon: 'el-icon-s-tools', noCache: true }
+        meta: { title: '看板设置', icon: 'el-icon-data-board', noCache: true }
       }
       }
-    ]
+    ],
+    hidden: uiVersion !== 1
   },
   },
   {
   {
     path: '/ncs-event',
     path: '/ncs-event',
@@ -326,9 +331,10 @@ export const partRoutes = [
         path: 'index',
         path: 'index',
         component: () => import('@/views/ncs-event/index'),
         component: () => import('@/views/ncs-event/index'),
         name: 'eventList',
         name: 'eventList',
-        meta: { title: '按钮事件管理', icon: 'el-icon-notebook-2', noCache: true }
+        meta: { title: '按钮事件管理', icon: 'el-icon-notebook-2', noCache: true}
       }
       }
-    ]
+    ],
+    hidden: uiVersion === 1
   },
   },
   // {
   // {
   //   path: '/calling-deviceregisterparams',
   //   path: '/calling-deviceregisterparams',

+ 9 - 6
src/utils/checkToken.js

@@ -43,8 +43,9 @@ export default function checkToken(options) {
       MessageBox.alert('您的登录状态已失效,请重新登录!', '权限错误', {
       MessageBox.alert('您的登录状态已失效,请重新登录!', '权限错误', {
         type: 'error',
         type: 'error',
         callback: () => {
         callback: () => {
-          store.dispatch('fedLogoutAction')
-          window.location.replace(`/login?forward=${location.pathname}`)
+          store.dispatch('user/logout').then(() => {
+            window.location.replace(`/login?forward=${location.pathname}`)
+          })
         }
         }
       })
       })
       return
       return
@@ -72,8 +73,9 @@ export default function checkToken(options) {
           resolve()
           resolve()
         }).catch(() => {
         }).catch(() => {
           window.__refreshTokenLock__ = undefined
           window.__refreshTokenLock__ = undefined
-          store.dispatch('user/logout')
-          window.location.replace(`/login?forward=${location.pathname}`)
+          store.dispatch('user/logout').then(() => {
+            window.location.replace(`/login?forward=${location.pathname}`)
+          })
         })
         })
       } else {
       } else {
         // console.log('进入循环检测...')
         // console.log('进入循环检测...')
@@ -84,8 +86,9 @@ export default function checkToken(options) {
             // console.log(options.url + ' | 是否已拿到新的token:', __RTK__ === null)
             // console.log(options.url + ' | 是否已拿到新的token:', __RTK__ === null)
             if (__RTK__ === undefined) {
             if (__RTK__ === undefined) {
               // console.log('登录已失效了,不用再等待了...')
               // console.log('登录已失效了,不用再等待了...')
-              store.dispatch('fedLogoutAction')
-              window.location.replace(`/login?forward=${location.pathname}`)
+              store.dispatch('user/logout').then(()=>{
+                window.location.replace(`/login?forward=${location.pathname}`)
+              })
               return
               return
             }
             }
             __RTK__ === null
             __RTK__ === null

+ 2 - 1
src/utils/domain.js

@@ -1,6 +1,7 @@
 module.exports = {
 module.exports = {
   serverUrl: 'http://localhost:8005',
   serverUrl: 'http://localhost:8005',
   DeviceUrl: 'http://localhost:8006',
   DeviceUrl: 'http://localhost:8006',
-  apiMode: 'dev'
+  apiMode: 'dev',
+  uiVersion: 1 // 1 医院版,2 月子中心版
 }
 }
 
 

+ 7 - 0
src/utils/request.js

@@ -127,6 +127,13 @@ service.interceptors.response.use(
     const error_response = error.response || {}
     const error_response = error.response || {}
     const error_data = error_response.data || {}
     const error_data = error_response.data || {}
 
 
+    if (error_response.status === 403) {
+      if (!Storage.getItem('calling_refresh_token')) return
+      store.dispatch('user/logout')
+      window.location.replace(`/login?forward=${location.pathname}`)
+      return
+    }
+
     Message({
     Message({
       message: error_data.message,
       message: error_data.message,
       type: 'error',
       type: 'error',

+ 9 - 11
src/views/calling-setting/index.vue

@@ -1,10 +1,10 @@
 <template>
 <template>
   <div class="tab-container">
   <div class="tab-container">
     <el-tabs v-model="activeName" style="margin:15px;" type="border-card">
     <el-tabs v-model="activeName" style="margin:15px;" type="border-card">
-      <el-tab-pane v-for="(item,index) in tabMapOptions" :key="item.key" :label="item.label" :name="item.key">
+      <el-tab-pane   label="系统设置" name="systemSetting">
         <keep-alive>
         <keep-alive>
-            <system-setting v-if="index===0" />
-          <speech-setting v-if="index===1"></speech-setting>
+           <part-info-edit :part-id="partid"></part-info-edit>
+<!--          <speech-setting v-if="index===1"></speech-setting>-->
         </keep-alive>
         </keep-alive>
       </el-tab-pane>
       </el-tab-pane>
     </el-tabs>
     </el-tabs>
@@ -12,21 +12,19 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import SystemSetting from './components/SystemSetting'
-import SpeechSetting from './components/SpeechSetting'
+import partInfoEdit from '../ncs-orginazition/components/partInfoEdit'
 export default {
 export default {
   name: 'Index',
   name: 'Index',
-  components: { SpeechSetting, SystemSetting },
+  components: { partInfoEdit },
   data() {
   data() {
     return {
     return {
       tabMapOptions: [
       tabMapOptions: [
-        { label: '系统设置', key: 'systemSetting' },
-        {
-          label: '高级设置', key: 'speechCfg'
-        }
+        { label: '系统设置', key: 'systemSetting' }
+
       ],
       ],
       activeName: 'systemSetting',
       activeName: 'systemSetting',
-      createdTimes: 0
+      createdTimes: 0,
+      partid: this.$store.getters.partId
     }
     }
   },
   },
   watch: {
   watch: {

+ 1 - 1
src/views/customer/components/patientManager.vue

@@ -22,7 +22,7 @@
           <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
           <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
         </div>
         </div>
         <div class="toolbar-btns">
         <div class="toolbar-btns">
-          <el-button type="primary" size="mini" :disabled="!isEmptyFrame" @click="handleAdd">入登记</el-button>
+          <el-button type="primary" size="mini" :disabled="!isEmptyFrame" @click="handleAdd">入登记</el-button>
         </div>
         </div>
       </div>
       </div>
       <el-pagination
       <el-pagination

+ 530 - 280
src/views/ncs-nurse-config/index.vue

@@ -1,126 +1,190 @@
 <template>
 <template>
-  <div  class="app-container">
-    <el-row>
-      <el-col :span="24" class="toolbar">
-        <el-form :inline="true">
-          <el-form-item>
-            <el-button type="primary" @click="addNurseConfig(1,null,1)">添加护理</el-button>
-          </el-form-item>
-        </el-form>
-      </el-col>
-    </el-row>
+  <div class="app-container">
+    <!--    <el-row>-->
+    <!--      <el-col :span="24" class="toolbar">-->
+    <!--        <el-form :inline="true">-->
+    <!--          <el-form-item>-->
+
+    <!--          </el-form-item>-->
+    <!--        </el-form>-->
+    <!--      </el-col>-->
+    <!--    </el-row>-->
     <el-container :style="{height: tableHeight+'px'}">
     <el-container :style="{height: tableHeight+'px'}">
 
 
-      <el-aside width="360px" style="background-color: rgb(238, 241, 246)">
-        <el-table :data="tagList1" highlight-current-row v-loading="listLoading" stripe
-                  @cell-click="tableClick" class="mytable">
-          <el-table-column v-if="false" prop="id"></el-table-column>
-          <el-table-column prop="config_name" label="护理名"></el-table-column>
+      <el-aside width="300px" style="background-color: rgb(238, 241, 246)">
+        <el-table
+          ref="nurseConfigTable"
+          v-loading="listLoading"
+          :data="tagList1"
+          highlight-current-row
+          :height="tableHeight-40"
+          stripe
+          @row-click="tableClick"
+        >
+          <el-table-column prop="config_name" label="护理名" width="120px" />
           <el-table-column
           <el-table-column
-                  label=""
-                  width="180">
+            width="160px"
+            align="right"
+          >
+            <template slot="header" slot-scope="scope">
+              <el-button type="primary" size="mini" @click="addNurseConfig(1,null,1)">添加护理参数</el-button>
+            </template>
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <el-button type="success" icon="el-icon-circle-plus-outline" circle
-                         @click.native.prevent="addNurseConfig(scope.$index, scope.row,2)"></el-button>
-              <el-button type="primary" icon="el-icon-edit" circle
-                         @click.native.prevent="updateRow(scope.$index, scope.row, 1)"></el-button>
-              <el-button type="danger" icon="el-icon-delete" circle
-                         @click.native.prevent="deleteRow(scope.$index, scope.row,1)"></el-button>
+              <!--              <el-button-->
+              <!--                type="success"-->
+              <!--                icon="el-icon-circle-plus-outline"-->
+              <!--                circle-->
+              <!--                size="mini"-->
+              <!--                @click.native.prevent="addNurseConfig(scope.$index, scope.row,2)"-->
+              <!--              />-->
+              <el-button
+                type="primary"
+                icon="el-icon-edit"
+                circle
+                size="mini"
+                @click.native.prevent="updateRow(scope.$index, scope.row, 1)"
+              />
+              <el-button
+                type="danger"
+                icon="el-icon-delete"
+                circle
+                size="mini"
+                @click.native.prevent="deleteRow(scope.$index, scope.row,1)"
+              />
             </template>
             </template>
           </el-table-column>
           </el-table-column>
         </el-table>
         </el-table>
       </el-aside>
       </el-aside>
       <el-main>
       <el-main>
-        <el-row>
-          <el-col>当前选择:<h4>{{pName}}</h4></el-col>
-        </el-row>
-<!--        <el-header style="text-align: right; font-size: 12px;height: 30px">当前选择:<h4>{{pName}}</h4></el-header>-->
-        <el-table :data="tagList2" highlight-current-row v-loading="listLoading" stripe class="mytable">
-          <el-table-column v-if="false" prop="id"></el-table-column>
-          <el-table-column prop="option_name" label="护理项名"></el-table-column>
-          <el-table-column prop="nursecfg_color" label="颜色标识" width="160" align="center">
-            <template slot-scope="scope">
-              <el-button :style="'width: 120px;height: 30px;background-color: #'+scope.row.color_rgb" />
-            </template>
-          </el-table-column>
-          <el-table-column label="" width="140">
-            <template slot-scope="scope">
-              <el-button type="primary" icon="el-icon-edit" circle @click.native.prevent="updateRow(scope.$index, scope.row, 2)"></el-button>
-              <el-button type="danger" icon="el-icon-delete" circle @click.native.prevent="deleteRow(scope.$index, scope.row,2)"></el-button>
-            </template>
-          </el-table-column>
-        </el-table>
+        <!--        <el-row>-->
+        <!--          <el-col>当前选择:<h4>{{ pName }}</h4></el-col>-->
+        <!--        </el-row>-->
+        <!--        &lt;!&ndash;        <el-header style="text-align: right; font-size: 12px;height: 30px">当前选择:<h4>{{pName}}</h4></el-header>&ndash;&gt;-->
+        <!--        <el-table v-loading="listLoading" :data="tagList2" highlight-current-row stripe class="mytable">-->
+        <!--          <el-table-column v-if="false" prop="id" />-->
+        <!--          <el-table-column prop="option_name" label="护理项名" />-->
+        <!--          <el-table-column prop="nursecfg_color" label="颜色标识" width="160" align="center">-->
+        <!--            <template slot-scope="scope">-->
+        <!--              <el-button :style="'width: 120px;height: 30px;background-color: #'+scope.row.color_rgb" />-->
+        <!--            </template>-->
+        <!--          </el-table-column>-->
+        <!--          <el-table-column label="" width="140">-->
+        <!--            <template slot-scope="scope">-->
+        <!--              <el-button type="primary" icon="el-icon-edit" circle @click.native.prevent="updateRow(scope.$index, scope.row, 2)" />-->
+        <!--              <el-button type="danger" icon="el-icon-delete" circle @click.native.prevent="deleteRow(scope.$index, scope.row,2)" />-->
+        <!--            </template>-->
+        <!--          </el-table-column>-->
+        <!--        </el-table>-->
+
+        <ag-grid-layout
+          toolbar
+          :table-height="tableHeight-130"
+          theme="ag-theme-alpine"
+          :column-defs="columnDefs"
+          :row-data="tagList2"
+          :locale-text="localeText"
+          :grid-options="gridOptions"
+          :default-col-def="defaultColDef"
+          :animate-rows="true"
+          :row-selection="rowSelection"
+          @filterChanged="filterModifed"
+          @sortChanged="gridSortChange"
+        >
+          <!--        @rowDoubleClicked="getList"-->
+          <div slot="toolbar" class="inner-toolbar">
+            <div class="toolbar-search">
+              <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+            </div>
+            <div class="toolbar-btns">
+              <el-button type="primary" size="mini" @click="addOption">新增护理项</el-button>
+            </div>
+          </div>
+          <el-pagination
+            v-if="pageData"
+            slot="pagination"
+            :current-page="pageData.page_no"
+            :page-sizes="[10, 20, 50, 100]"
+            :page-size="pageData.page_size"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="pageData.data_total"
+            @size-change="handlePageSizeChange"
+            @current-change="handlePageCurrentChange"
+          />
+        </ag-grid-layout>
       </el-main>
       </el-main>
     </el-container>
     </el-container>
 
 
-<!--    <el-row>-->
-<!--      <el-col :span="8">-->
-<!--        <el-row>-->
-<!--          <el-col :span="24" class="toolbar">-->
-<!--            <el-form :inline="true">-->
-<!--              <el-form-item>-->
-<!--                <el-button type="primary" @click="addNurseConfig(1,null,1)">添加护理</el-button>-->
-<!--              </el-form-item>-->
-<!--            </el-form>-->
-<!--          </el-col>-->
-<!--        </el-row>-->
-<!--        <el-table :data="tagList1" highlight-current-row v-loading="listLoading" stripe-->
-<!--                  @cell-click="tableClick" class="mytable">-->
-<!--          <el-table-column v-if="false" prop="id"></el-table-column>-->
-<!--          <el-table-column prop="config_name" label="护理名"></el-table-column>-->
-<!--          <el-table-column-->
-<!--                  label=""-->
-<!--                  width="180">-->
-<!--            <template slot-scope="scope">-->
-<!--              <el-button type="success" icon="el-icon-circle-plus-outline" circle-->
-<!--                         @click.native.prevent="addNurseConfig(scope.$index, scope.row,2)"></el-button>-->
-<!--              <el-button type="primary" icon="el-icon-edit" circle-->
-<!--                         @click.native.prevent="updateRow(scope.$index, scope.row, 1)"></el-button>-->
-<!--              <el-button type="danger" icon="el-icon-delete" circle-->
-<!--                         @click.native.prevent="deleteRow(scope.$index, scope.row,1)"></el-button>-->
-<!--            </template>-->
-<!--          </el-table-column>-->
-<!--        </el-table>-->
-<!--      </el-col>-->
+    <!--    <el-row>-->
+    <!--      <el-col :span="8">-->
+    <!--        <el-row>-->
+    <!--          <el-col :span="24" class="toolbar">-->
+    <!--            <el-form :inline="true">-->
+    <!--              <el-form-item>-->
+    <!--                <el-button type="primary" @click="addNurseConfig(1,null,1)">添加护理</el-button>-->
+    <!--              </el-form-item>-->
+    <!--            </el-form>-->
+    <!--          </el-col>-->
+    <!--        </el-row>-->
+    <!--        <el-table :data="tagList1" highlight-current-row v-loading="listLoading" stripe-->
+    <!--                  @cell-click="tableClick" class="mytable">-->
+    <!--          <el-table-column v-if="false" prop="id"></el-table-column>-->
+    <!--          <el-table-column prop="config_name" label="护理名"></el-table-column>-->
+    <!--          <el-table-column-->
+    <!--                  label=""-->
+    <!--                  width="180">-->
+    <!--            <template slot-scope="scope">-->
+    <!--              <el-button type="success" icon="el-icon-circle-plus-outline" circle-->
+    <!--                         @click.native.prevent="addNurseConfig(scope.$index, scope.row,2)"></el-button>-->
+    <!--              <el-button type="primary" icon="el-icon-edit" circle-->
+    <!--                         @click.native.prevent="updateRow(scope.$index, scope.row, 1)"></el-button>-->
+    <!--              <el-button type="danger" icon="el-icon-delete" circle-->
+    <!--                         @click.native.prevent="deleteRow(scope.$index, scope.row,1)"></el-button>-->
+    <!--            </template>-->
+    <!--          </el-table-column>-->
+    <!--        </el-table>-->
+    <!--      </el-col>-->
 
 
-<!--      <el-col :span="15">-->
-<!--        <el-row>-->
-<!--          <el-col>当前选择:<h4>{{pName}}</h4></el-col>-->
-<!--        </el-row>-->
-<!--        <el-table :data="tagList2" highlight-current-row v-loading="listLoading" stripe class="mytable">-->
-<!--          <el-table-column v-if="false" prop="id"></el-table-column>-->
-<!--          <el-table-column prop="option_name" label="护理项名"></el-table-column>-->
-<!--          <el-table-column prop="nursecfg_color" label="颜色标识" width="160" align="center">-->
-<!--            <template slot-scope="scope">-->
-<!--              <el-button :style="'width: 120px;height: 30px;background-color: #'+scope.row.color_rgb" />-->
-<!--            </template>-->
-<!--          </el-table-column>-->
-<!--          <el-table-column label="" width="140">-->
-<!--            <template slot-scope="scope">-->
-<!--              <el-button type="primary" icon="el-icon-edit" circle @click.native.prevent="updateRow(scope.$index, scope.row, 2)"></el-button>-->
-<!--              <el-button type="danger" icon="el-icon-delete" circle @click.native.prevent="deleteRow(scope.$index, scope.row,2)"></el-button>-->
-<!--            </template>-->
-<!--          </el-table-column>-->
-<!--        </el-table>-->
-<!--      </el-col>-->
-<!--    </el-row>-->
+    <!--      <el-col :span="15">-->
+    <!--        <el-row>-->
+    <!--          <el-col>当前选择:<h4>{{pName}}</h4></el-col>-->
+    <!--        </el-row>-->
+    <!--        <el-table :data="tagList2" highlight-current-row v-loading="listLoading" stripe class="mytable">-->
+    <!--          <el-table-column v-if="false" prop="id"></el-table-column>-->
+    <!--          <el-table-column prop="option_name" label="护理项名"></el-table-column>-->
+    <!--          <el-table-column prop="nursecfg_color" label="颜色标识" width="160" align="center">-->
+    <!--            <template slot-scope="scope">-->
+    <!--              <el-button :style="'width: 120px;height: 30px;background-color: #'+scope.row.color_rgb" />-->
+    <!--            </template>-->
+    <!--          </el-table-column>-->
+    <!--          <el-table-column label="" width="140">-->
+    <!--            <template slot-scope="scope">-->
+    <!--              <el-button type="primary" icon="el-icon-edit" circle @click.native.prevent="updateRow(scope.$index, scope.row, 2)"></el-button>-->
+    <!--              <el-button type="danger" icon="el-icon-delete" circle @click.native.prevent="deleteRow(scope.$index, scope.row,2)"></el-button>-->
+    <!--            </template>-->
+    <!--          </el-table-column>-->
+    <!--        </el-table>-->
+    <!--      </el-col>-->
+    <!--    </el-row>-->
     <!--新增护理界面-->
     <!--新增护理界面-->
-    <el-dialog :title="myTitle" v-model="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false">
-      <el-form :model="addForm" label-width="140px" :rules="addFormRules" ref="addForm">
+    <el-dialog v-model="addFormVisible" :title="myTitle" :visible.sync="addFormVisible" :close-on-click-modal="false">
+      <el-form ref="addForm" :model="addForm" label-width="140px" :rules="addFormRules">
         <el-form-item label="护理名" prop="config_name">
         <el-form-item label="护理名" prop="config_name">
-          <el-input v-model="addForm.config_name" maxlength="12"></el-input>
+          <el-input v-model="addForm.config_name" maxlength="12" />
+        </el-form-item>
+        <el-form-item label="排序" prop="index_no">
+          <el-input-number v-model="addForm.index_no" :min="1" :max="100" />
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
         <el-button @click.native="addFormVisible = false">取消</el-button>
         <el-button @click.native="addFormVisible = false">取消</el-button>
-        <el-button type="primary" @click.native="addSubmit" :loading="addOptionLoading">提交</el-button>
+        <el-button type="primary" :loading="addOptionLoading" @click.native="addSubmit">提交</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
     <!--新增护理项界面-->
     <!--新增护理项界面-->
-    <el-dialog :title="myTitle" v-model="addFormOptionVisible" :visible.sync="addFormOptionVisible" :close-on-click-modal="false">
-      <el-form :model="addOptionForm" label-width="140px" :rules="addFormRules" ref="addOptionForm">
+    <el-dialog v-model="addFormOptionVisible" :title="myTitle" :visible.sync="addFormOptionVisible" :close-on-click-modal="false">
+      <el-form ref="addOptionForm" :model="addOptionForm" label-width="140px" :rules="addFormRules">
         <el-form-item label="护理项名" prop="option_name">
         <el-form-item label="护理项名" prop="option_name">
-          <el-input v-model="addOptionForm.option_name" maxlength="12"></el-input>
+          <el-input v-model="addOptionForm.option_name" maxlength="12" />
         </el-form-item>
         </el-form-item>
         <el-form-item label="护理灯颜色">
         <el-form-item label="护理灯颜色">
           <colorPicker v-model="addOptionForm.color_rgb" />
           <colorPicker v-model="addOptionForm.color_rgb" />
@@ -128,220 +192,406 @@
       </el-form>
       </el-form>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
         <el-button @click.native="addFormOptionVisible = false">取消</el-button>
         <el-button @click.native="addFormOptionVisible = false">取消</el-button>
-        <el-button type="primary" @click.native="addOptionSubmit" :loading="addOptionLoading">提交</el-button>
+        <el-button type="primary" :loading="addOptionLoading" @click.native="addOptionSubmit">提交</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-  import * as API_NcsNurseConfig from '@/api/ncs_nurse_config'
-  import * as API_NcsNurseConfigOption from '@/api/ncs_nurse_config_option'
+import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
+import { unix2Date } from '@/utils/Foundation'
+import ButtonCellRender from '../../components/AgGridCellRender/ButtonCellRender'
+import * as API_NcsNurseConfig from '@/api/ncs_nurse_config'
+import * as API_NcsNurseConfigOption from '@/api/ncs_nurse_config_option'
 
 
-  export default {
-    name: 'ncsNurseConfigList',
-    data() {
-      return {
-        listLoading: false,
-        tagList1: [],
-        tagList2: [],
-        pid: '',
-        type: '',
-        addForm: {
-          config_name: ''
-        },
-        addFormVisible: false,
-        addLoading: false,
-        addFormRules: {
-          config_name: [
-            { required: true, message: '请输入护理名称', trigger: 'blur' }
-          ],
-          option_name: [
-            { required: true, message: '请输入护理项名称', trigger: 'blur' }
-          ]
-        },
-        addFormOptionVisible: false,
-        addOptionLoading: false,
-        addOptionForm: {
-          option_name: '',
-          color_rgb: '#000000'
+export default {
+  name: 'NcsNurseConfigList',
+  components: { ButtonCellRender },
+  data() {
+    return {
+      listLoading: false,
+      tagList1: [],
+      tagList2: [],
+      pid: 0,
+      type: '',
+      addForm: {
+        config_name: ''
+      },
+      addFormVisible: false,
+      addLoading: false,
+      addFormRules: {
+        config_name: [
+          { required: true, message: '请输入护理名称', trigger: 'blur' }
+        ],
+        option_name: [
+          { required: true, message: '请输入护理项名称', trigger: 'blur' }
+        ]
+      },
+      addFormOptionVisible: false,
+      addOptionLoading: false,
+      addOptionForm: {
+        option_name: '',
+        color_rgb: '#000000'
+      },
+      addOredit: '',
+      myTitle: '',
+      shopVisible: false,
+      member_tags: null,
+      params: {
+        page_size: 20,
+        page_no: 1,
+        sort: 'id',
+        dir: 'desc'
+      },
+      partId: this.$store.getters.partId,
+      pName: null,
+      /** ag-grid参数 **/
+      pageData: [],
+      loading: false,
+      errorId: null,
+      columnDefs: null,
+      rowData: null,
+      defaultColDef: null,
+      gridOptions: null,
+      gridApi: null,
+      columnApi: null,
+      localeText: AG_GRID_LOCALE_CN,
+      filterState: null,
+      rowSelection: null
+    }
+  },
+  computed: {
+    tableHeight() {
+      return this.mainAreaHeight - 40
+    }
+  },
+  beforeMount() {
+    this.gridOptions = {
+    }
+    this.columnDefs = [
+      {
+        headerName: '#',
+        headerCheckboxSelection: true,
+        headerCheckboxSelectionFilteredOnly: true,
+        checkboxSelection: true,
+        sortable: false, filter: false,
+        width: 100,
+        resizable: false,
+        valueGetter: this.hashValueGetter
+      },
+      { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter' },
+      { headerName: '护理项名称', field: 'option_name', sortable: true, flex: 1, filter: 'agTextColumnFilter', filterParams: {
+        debounceMs: 200,
+        newRowsAction: 'keep'
+      }
+      },
+      // lockPosition 锁定位置,会在第一列
+      // lockPinned = true 不能拖动然后固定
+      // resizeable 单元个大小是否可以调整
+      { headerName: '颜色标识', field: 'color_rgb', sortable: true, filter: false,
+        cellRenderer: this.colorFormatter
+      },
+
+      { headerName: '编辑',
+        cellRendererFramework: 'ButtonCellRender',
+        cellRendererParams: {
+          onClick: this.handEdit,
+          label: '编辑',
+          buttonType: 'primary',
+          buttonSize: 'mini'
         },
         },
-        addOredit: '',
-        myTitle: '',
-        shopVisible: false,
-        member_tags: null,
-        params : {
-          page_size: 100,
-          page_no: 1,
-          sort: 'id',
-          dir: 'desc'
+        filter: false,
+        pinned: 'right',
+        lockPinned: true,
+        width: 100,
+        resizable: false,
+        sortable: false },
+      { headerName: '删除',
+        cellRendererFramework: 'ButtonCellRender',
+        cellRendererParams: param => {
+          return {
+            onClick: this.deleteSingle,
+            label: '删除',
+            buttonType: 'danger',
+            buttonSize: 'mini',
+            disabled: param.data['member_name'] === 'superadmin'
+          }
         },
         },
-        partId: this.$store.getters.partId,
-        pName: null
-      }
-    },
-    computed: {
-      tableHeight() {
-        return this.mainAreaHeight - 40
+        pinned: 'right',
+        lockPinned: true,
+        width: 100,
+        resizable: false,
+        filter: false,
+        sortable: false }
+    ]
+    this.defaultColDef = {
+      filter: 'agTextColumnFilter',
+      sortable: true,
+      resizable: true,
+      comparator: this.dateCustomComparator,
+      filterParams: {
+        debounceMs: 200,
+        newRowsAction: 'keep',
+        textCustomComparator: this.textCustomComparator,
+        comparator: this.dateCustomComparator
       }
       }
+    }
+    this.rowSelection = 'multiple'
+  },
+  mounted() {
+    window.onresize = this.windowResize()
+    this.gettagList1()
+  },
+  methods: {
+    windowResize() {
+      this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
     },
     },
-    methods: {
-      gettagList1() {
-        this.params.fixedCondition = ' part_id=' + this.partId,
-        API_NcsNurseConfig.getList(this.params).then(response => {
-          this.listLoading = false
-          this.tagList1 = response.data
-          if (this.tagList1.length > 0) {
+    gettagList1() {
+      this.params.fixedCondition = ' part_id=' + this.partId
+      this.params.sort = 'index_no'
+      this.params.dir = 'asc'
+      API_NcsNurseConfig.getList(this.params).then(response => {
+        this.listLoading = false
+        this.tagList1 = response.data
+        if (this.tagList1.length > 0) {
+          if (this.pid === 0) {
             this.pid = this.tagList1[0].id
             this.pid = this.tagList1[0].id
-            this.pName = this.tagList1[0].config_name
-            this.gettagList2(this.pid)
           }
           }
-        }).catch(() => {
-          this.listLoading = false
-        })
-      },
-      gettagList2() {
-        this.params.fixedCondition = ' part_id=' + this.partId +' and ncfg_id = ' + this.pid
-        API_NcsNurseConfigOption.getList(this.params).then(response => {
-          this.tagList2 = response.data
-        }).catch(() => {
-        })
-      },
-      tableClick(row, column, event, cell) {
-        if (column.property === 'config_name') {
-          this.pid = row.id
-          this.pName = row.config_name
-          this.gettagList2()
+          this.pName = this.tagList1[0].config_name
+          this.gettagList2(this.pid)
+          const currentRow = this.tagList1.find(p => p.id === this.pid)
+          this.$refs.nurseConfigTable.setCurrentRow(currentRow)
         }
         }
-      },
-      addNurseConfig(index, row, type) {
-        this.type = type
-        this.addOredit = 'add'
-        if (type === 1) {
-          this.myTitle = '新增护理'
-          this.addFormVisible = true
-        } else if (type === 2) {
-          this.addOptionForm = {
-            option_name: null,
-            color_rgb: '#000000'
-          }
-          this.pid = row.id
-          this.myTitle = '新增护理项'
-          this.addFormOptionVisible = true
+      }).catch(() => {
+        this.listLoading = false
+      })
+    },
+    gettagList2() {
+      this.params.fixedCondition = ' part_id=' + this.partId + ' and ncfg_id = ' + this.pid
+      this.params.sort = 'id'
+      this.params.dir = 'desc'
+      API_NcsNurseConfigOption.getList(this.params).then(response => {
+        this.tagList2 = response.data
+      }).catch(() => {
+      })
+    },
+    tableClick(row, column, event, cell) {
+      if (column.property === 'config_name') {
+        this.pid = row.id
+        this.pName = row.config_name
+        this.gettagList2()
+      }
+    },
+    addNurseConfig(index, row, type) {
+      this.type = type
+      this.addOredit = 'add'
+      if (type === 1) {
+        this.myTitle = '新增护理'
+        this.addFormVisible = true
+        this.addForm = {
+          index_no: 1
         }
         }
-      },
-      addOptionSubmit() {
-        let _this = this
-        this.$refs.addOptionForm.validate((valid) => {
-          if (valid) {
-            this.addOptionForm.color_rgb = this.addOptionForm.color_rgb.replace('#', '')
-            let _this = this
-            if (this.addOredit === 'add') {
-              let classEntity = Object.assign({}, this.addOptionForm)
-              classEntity.part_id = this.partId
-              classEntity.ncfg_id = this.pid
-              API_NcsNurseConfigOption.add(classEntity).then(r => {
-                _this.gettagList2()
-                _this.$message({
-                  message: '新增成功!',
-                  type: 'success'
-                })
-              })
-            } else if (this.addOredit === 'edit') {
-              API_NcsNurseConfigOption.update(this.addOptionForm.id, this.addOptionForm).then(r => {
-                _this.gettagList2()
-                _this.$message({
-                  message: '修改成功!',
-                  type: 'success'
-                })
-              })
-            }
-            this.addFormOptionVisible = false
-          }
-        })
-      },
-      addSubmit() {
-        let _this = this
-        this.$refs.addForm.validate((valid) => {
-          if (valid) {
-            let _this = this
-            if (this.addOredit === 'add') {
-              let classEntity = Object.assign({}, this.addForm)
-              classEntity.part_id = this.partId
-              API_NcsNurseConfig.add(classEntity).then(r => {
-                _this.gettagList1()
-                _this.$message({
-                  message: '新增成功!',
-                  type: 'success'
-                })
+      } else if (type === 2) {
+        this.addOptionForm = {
+          option_name: null,
+          color_rgb: '#000000'
+        }
+        this.pid = row.id
+        this.myTitle = '新增护理项'
+        this.addFormOptionVisible = true
+      }
+    },
+    addOption() {
+      this.addNurseConfig(null, { id: this.pid }, 2)
+    },
+    addOptionSubmit() {
+      const _this = this
+      this.$refs.addOptionForm.validate((valid) => {
+        if (valid) {
+          this.addOptionForm.color_rgb = this.addOptionForm.color_rgb.replace('#', '')
+          const _this = this
+          if (this.addOredit === 'add') {
+            const classEntity = Object.assign({}, this.addOptionForm)
+            classEntity.part_id = this.partId
+            classEntity.ncfg_id = this.pid
+            API_NcsNurseConfigOption.add(classEntity).then(r => {
+              _this.gettagList2()
+              _this.$message({
+                message: '新增成功!',
+                type: 'success'
               })
               })
-            } else if (this.addOredit === 'edit') {
-              API_NcsNurseConfig.update(this.addForm.id, {config_name: this.addForm.config_name}).then(r => {
-                _this.gettagList1()
-                _this.$message({
-                  message: '修改成功!',
-                  type: 'success'
-                })
+            })
+          } else if (this.addOredit === 'edit') {
+            API_NcsNurseConfigOption.update(this.addOptionForm.id, this.addOptionForm).then(r => {
+              _this.gettagList2()
+              _this.$message({
+                message: '修改成功!',
+                type: 'success'
               })
               })
-            }
-            this.addForm = {
-              config_name: null
-            }
-            this.addFormVisible = false
-          }
-        })
-      },
-      updateRow(index, row, type) {
-        this.addOredit = 'edit'
-        this.myTitle = '修改护理'
-        if (type === 1) {
-          this.addForm.id = row.id
-          this.addForm.config_name = row.config_name
-          this.addFormVisible = true
-        } else {
-          this.addOptionForm = {
-            id: row.id,
-            option_name: row.option_name,
-            color_rgb: '#' + row.color_rgb
+            })
           }
           }
-          this.addFormOptionVisible = true
+          this.addFormOptionVisible = false
         }
         }
-
-      },
-      deleteRow(index, row, type) {
-        this.type = type
-        let _this = this
-        this.$confirm('删除提交吗?', '提示', {}).then(() => {
-          if (type === 1) {
-            API_NcsNurseConfig.remove(row.id).then(r => {
+      })
+    },
+    addSubmit() {
+      const _this = this
+      this.$refs.addForm.validate((valid) => {
+        if (valid) {
+          const _this = this
+          if (this.addOredit === 'add') {
+            const classEntity = Object.assign({}, this.addForm)
+            classEntity.part_id = this.partId
+            API_NcsNurseConfig.add(classEntity).then(r => {
               _this.gettagList1()
               _this.gettagList1()
               _this.$message({
               _this.$message({
-                message: '删除成功!',
+                message: '新增成功!',
                 type: 'success'
                 type: 'success'
               })
               })
             })
             })
-          } else {
-            API_NcsNurseConfigOption.remove(row.id).then(r => {
-              _this.gettagList2()
+          } else if (this.addOredit === 'edit') {
+            API_NcsNurseConfig.update(this.addForm.id, this.addForm).then(r => {
+              _this.gettagList1()
               _this.$message({
               _this.$message({
-                message: '删除成功!',
+                message: '修改成功!',
                 type: 'success'
                 type: 'success'
               })
               })
             })
             })
           }
           }
-        })
-      },
-      memberInit() {
-      },
-      openAdvert(index, row) {
-        this.member_tags = row.tag
-        this.shopVisible = true
+          this.addForm = {
+            config_name: null
+          }
+          this.addFormVisible = false
+        }
+      })
+    },
+    handEdit(row) {
+      this.updateRow(null, row, 2)
+    },
+    updateRow(index, row, type) {
+      this.addOredit = 'edit'
+      this.myTitle = '修改护理'
+      if (type === 1) {
+        this.addForm = { ...row }
+        this.addFormVisible = true
+      } else {
+        this.addOptionForm = {
+          id: row.id,
+          option_name: row.option_name,
+          color_rgb: '#' + row.color_rgb
+        }
+        this.addFormOptionVisible = true
+      }
+    },
+    deleteSingle(row) {
+      this.deleteRow(null, row, 2)
+    },
+
+    /** 分页大小发生改变 */
+    handlePageSizeChange(size) {
+      this.params.page_size = size
+      this.gettagList2()
+    },
+
+    /** 分页页数发生改变 */
+    handlePageCurrentChange(page) {
+      this.params.page_no = page
+      this.gettagList2()
+    },
+    deleteRow(index, row, type) {
+      this.type = type
+      const _this = this
+      this.$confirm('删除提交吗?', '提示', {}).then(() => {
+        if (type === 1) {
+          API_NcsNurseConfig.remove(row.id).then(r => {
+            _this.gettagList1()
+            _this.$message({
+              message: '删除成功!',
+              type: 'success'
+            })
+          })
+        } else {
+          API_NcsNurseConfigOption.remove(row.id).then(r => {
+            _this.gettagList2()
+            _this.$message({
+              message: '删除成功!',
+              type: 'success'
+            })
+          })
+        }
+      })
+    },
+    memberInit() {
+    },
+    openAdvert(index, row) {
+      this.member_tags = row.tag
+      this.shopVisible = true
+    },
+    colorFormatter(param) {
+      console.log('aa', param)
+      return '<button style="width: 120px;height: 30px;vertical-align:middle;border:0;background-color: #' + param.value + '"/>'
+    },
+    /** 处理搜索 */
+    handlerSearch(keywords) {
+      this.params.query = keywords
+      this.gettagList2()
+    },
+    /** 处理字段排序 */
+    tableSort(column) {
+      if (column.order !== null) {
+        this.params.sort = column.prop
+        this.params.dir = column.order === 'ascending' ? 'asc' : 'desc'
+      } else {
+        this.params.sort = null
+        this.params.dir = null
       }
       }
+      this.gettagList2()
+    },
+    gridSortChange(param) {
+      console.log('sortparam', param)
+      const columnState = param.columnApi.getColumnState()
+      // 排序状态
+      const sortState = columnState.filter(function(s) {
+        return s.sort != null
+      }).map(function(s) {
+        return {
+          colId: s.colId,
+          sort: s.sort,
+          sortIndex: s.sortIndex
+        }
+      }).sort(function(a, b) {
+        return a.sortIndex - b.sortIndex
+      })
+      if (sortState.length > 0) {
+        if (sortState.length === 1) {
+          this.params.sort = sortState[0].colId
+          this.params.dir = sortState[0].sort
+        } else {
+          let sortstring = ''
+          sortState.forEach(function(item) {
+            sortstring += item.colId + ' ' + item.sort + ','
+          })
+          this.params.sort = sortstring.substring(0, sortstring.length - 1)
+          this.params.dir = ' '
+        }
+      } else {
+        delete this.params.sort
+        delete this.params.dir
+      }
+
+      this.gettagList2()
+      console.log(sortState)
     },
     },
-    mounted() {
-      this.gettagList1()
+    filterModifed(param) {
+      console.log(param)
+      var model = param.api.getFilterModel()
+      console.log('model', JSON.stringify(model))
+      this.params.filter = JSON.stringify(model)
+      this.gettagList2()
     }
     }
   }
   }
+}
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>

+ 7 - 0
src/views/ncs-orginazition/components/partInfoEdit.vue

@@ -265,6 +265,7 @@ export default {
   async mounted() {
   async mounted() {
     // this.nurseLevel0Config = await API_Nurse.getNurseConfigs(this.partId, 0)
     // this.nurseLevel0Config = await API_Nurse.getNurseConfigs(this.partId, 0)
     this.getPartInfo()
     this.getPartInfo()
+    this.getPartents()
   },
   },
   methods: {
   methods: {
     getPartInfo() {
     getPartInfo() {
@@ -346,6 +347,12 @@ export default {
           this.$message.error('表单填写错误,请检查!')
           this.$message.error('表单填写错误,请检查!')
         }
         }
       })
       })
+    },
+    /** 获取上级机构数组 特指医院 **/
+    getPartents() {
+      API_Part.listByType(6).then(res => {
+        this.parents = [...res]
+      })
     }
     }
   }
   }
 }
 }

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

@@ -430,7 +430,7 @@ export default {
     handEdit(row) {
     handEdit(row) {
       this.$router.push({ name: 'partInfoSetting', params: { id: row.shop_id, callback: this.getList() }})
       this.$router.push({ name: 'partInfoSetting', params: { id: row.shop_id, callback: this.getList() }})
     },
     },
-    /** 获取上级机构数组 特医院 **/
+    /** 获取上级机构数组 特医院 **/
     getPartents() {
     getPartents() {
       API_PartInfo.listByType(6).then(res => {
       API_PartInfo.listByType(6).then(res => {
         this.parents = [...res]
         this.parents = [...res]

+ 5 - 0
src/views/ncs-orginazition/partInfoSetting.vue

@@ -49,6 +49,11 @@
           <app-version-manager :part-id="part_id" :device-type="104"></app-version-manager>
           <app-version-manager :part-id="part_id" :device-type="104"></app-version-manager>
         </keep-alive>
         </keep-alive>
       </el-tab-pane>
       </el-tab-pane>
+      <el-tab-pane label="移动设备" name="vsickbed">
+        <keep-alive>
+          <app-version-manager :part-id="part_id" :device-type="7"></app-version-manager>
+        </keep-alive>
+      </el-tab-pane>
     </el-tabs>
     </el-tabs>
   </div>
   </div>
 </template>
 </template>