Browse Source

开发his查询界面,包含科室查询,用户查询,工作人员查询,护理项查询

vothin 2 năm trước cách đây
mục cha
commit
bd5aefaa4b

+ 23 - 1
languages/en.js

@@ -443,7 +443,10 @@ module.exports = {
     customerStatus: 'Current status',
     customerStatusTrue: 'Checking in',
     customerStatusFalse: 'Left',
-    footprint: 'Footprint'
+    footprint: 'Footprint',
+    babyName: 'Child name',
+    babySex: 'Child gender',
+    babyBirthday: 'Child\'s birthday'
   },
   vital: {
     customerVital: 'User Log',
@@ -847,6 +850,24 @@ module.exports = {
     roleEdit: 'Edit role event',
     onChoiceRole: 'No role has been selected!'
   },
+  his: {
+    hisPart: 'Department Query',
+    hisPartKeyval: 'Department His PK',
+    hisPartName: 'Department name',
+    summary: 'Department Profile',
+    tel: 'Department telephone',
+    hisError: 'His error',
+    hisPatient: 'Patient',
+    hisPatientKeyval: 'Patient His primary key',
+    hisPatientInfo: 'Query information',
+    hisClerk: 'Working personnel',
+    hisClerkKeyval: 'Staff his PK',
+    hisDockerKeyval: 'Responsible doctor his PK',
+    hisNurseKeyval: 'Responsible nurse his PK',
+    passNo: 'Entrance guard card',
+    hisNurseConfig: 'Nursing items',
+    hisNurseOptionsKeyval: 'Nursing item classification his PK'
+  },
   tab: {
     home: 'Home',
     frameManage: 'Space position',
@@ -871,6 +892,7 @@ module.exports = {
     nurseConfig: 'Nursing parameters',
     boardManage: 'Information board settings',
     eventManage: 'Button event management',
+    hisManage: 'His query',
     interactionChars: 'Interaction statistics',
     partSetting: 'Organization settings',
     allClerk: 'All employees',

+ 23 - 1
languages/es.js

@@ -443,7 +443,10 @@ module.exports = {
     customerStatus: 'Estado actual',
     customerStatusTrue: 'Registrándose',
     customerStatusFalse: 'Izquierda',
-    footprint: 'Huella'
+    footprint: 'Huella',
+    babyName: 'Nombre del niño',
+    babySex: 'Sexo del niño',
+    babyBirthday: 'Cumpleaños del niño'
   },
   vital: {
     customerVital: 'Registro de usuario',
@@ -846,6 +849,24 @@ module.exports = {
     roleEdit: 'Editar evento de rol',
     onChoiceRole: '¡No se ha seleccionado ningún rol!'
   },
+  his: {
+    hisPart: 'Consulta de sección',
+    hisPartKeyval: 'Su clave principal',
+    hisPartName: 'Nombre de la sección',
+    summary: 'Introducción a la sección',
+    tel: 'Teléfono de la sección',
+    hisError: 'Su error',
+    hisPatient: 'Paciente',
+    hisPatientKeyval: 'Su llave maestra',
+    hisPatientInfo: 'Información de consulta',
+    hisClerk: 'Personal',
+    hisClerkKeyval: 'Su clave principal para el personal',
+    hisDockerKeyval: 'Su llave maestra',
+    hisNurseKeyval: 'Enfermera responsable su clave principal',
+    passNo: 'Tarjeta de acceso',
+    hisNurseConfig: 'Artículos de enfermería',
+    hisNurseOptionsKeyval: 'Clasificación de elementos de enfermería su clave principal',
+  },
   tab: {
     home: 'Hogar',
     frameManage: 'Posición espacial',
@@ -870,6 +891,7 @@ module.exports = {
     nurseConfig: 'Gestión de enfermería',
     boardManage: 'Paneles informativos',
     eventManage: 'Botón de gestión de eventos',
+    hisManage: 'Su consulta',
     interactionChars: 'Interacción Estadísticas',
     partSetting: 'Organización construir',
     allClerk: 'Todos los empleados',

+ 23 - 1
languages/zh-CN.js

@@ -443,7 +443,10 @@ module.exports = {
     customerStatus: '当前状态',
     customerStatusTrue: '入住中',
     customerStatusFalse: '已离开',
-    footprint: '足迹'
+    footprint: '足迹',
+    babyName: '孩子姓名',
+    babySex: '孩子性别',
+    babyBirthday: '孩子生日'
   },
   vital: {
     customerVital: '用户体征日志',
@@ -847,6 +850,24 @@ module.exports = {
     roleEdit: '编辑角色事件',
     onChoiceRole: '没有选中任何角色!'
   },
+  his: {
+    hisPart: '科室查询',
+    hisPartKeyval: '科室his主键',
+    hisPartName: '科室名称',
+    summary: '科室简介',
+    tel: '科室电话',
+    hisError: 'his错误',
+    hisPatient: '入住人',
+    hisPatientKeyval: '入住人his主键',
+    hisPatientInfo: '查询信息',
+    hisClerk: '工作人员',
+    hisClerkKeyval: '工作人员his主键',
+    hisDockerKeyval: '责任医生his主键',
+    hisNurseKeyval: '责任护士his主键',
+    passNo: '门禁卡',
+    hisNurseConfig: '护理项',
+    hisNurseOptionsKeyval: '护理项分类his主键',
+  },
   tab: {
     home: '首页',
     frameManage: '空间位置',
@@ -871,6 +892,7 @@ module.exports = {
     nurseConfig: '护理参数',
     boardManage: '看板设置',
     eventManage: '按钮事件管理',
+    hisManage: 'his查询',
     interactionChars: '交互统计',
     partSetting: '机构设置',
     allClerk: '所有员工',

+ 91 - 0
src/api/ncs_his.js

@@ -0,0 +1,91 @@
+import request from '@/utils/request'
+const serverUrl = domain.serverUrl
+const url = serverUrl.substring(0, serverUrl.length - 4) + '8009'
+
+// 查询科室列表
+export function getList(params) {
+  return request({
+    url: url + '/hisquery/depart/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+// 根据主键查询科室
+export function getPartByKeyval(keyval) {
+  return request({
+    url: url + `/hisquery/depart/${keyval}`,
+    method: 'GET',
+    loading: false
+  })
+}
+
+// 查询用户列表
+export function getPatientList(params) {
+  return request({
+    url: url + '/hisquery/patient/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+// 查询工作人员列表
+export function getClerkList(params) {
+  return request({
+    url: url + '/hisquery/employee/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+// 根据主键查询工作人员
+export function getClerkByKeyval(keyval) {
+  return request({
+    url: url + `/hisquery/employee/${keyval}`,
+    method: 'GET',
+    loading: false
+  })
+}
+
+// 查询工作人员列表
+export function getNurseConfigList(params) {
+  return request({
+    url: url + '/hisquery/nursecategory/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+// 查询工作人员列表
+export function getNurseOptionsList(params) {
+  return request({
+    url: url + '/hisquery/nurseoptions/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+export function getNurseOptionsByPartKeyval(part_keyval) {
+  return request({
+    url: url + `/hisquery/nurse_options_list/${part_keyval}`,
+    method: 'get'
+  })
+}
+
+export function getPatientNurseMappingByPatientKeyval(patient_keyval) {
+  return request({
+    url: url + `/hisquery/patient_nurse_mapping_list/${patient_keyval}`,
+    method: 'get'
+  })
+}
+

+ 47 - 13
src/router/index.js

@@ -299,19 +299,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: '',
     component: Layout,
@@ -600,6 +600,40 @@ export const adminRoutes = [
     ]
   },
   {
+    path: '/admin/ncs-his',
+    component: Layout,
+    redirect: '/ncs-his/hisManager',
+    children: [
+      {
+        path: 'index',
+        component: () => import('@/views/ncs-his/hisManagement'),
+        name: 'hisManagement',
+        meta: { title: i18n.t('tab.hisManage'), icon: 'el-icon-search', noCache: true }
+      },
+      {
+        path: 'patientManage/:keyval?',
+        component: () => import('@/views/ncs-his/his-patient/hisPatientManage'),
+        name: 'hisPatientManage',
+        meta: { title: i18n.t('his.hisPatient'), icon: 'el-icon-search', noCache: true },
+        hidden: true
+      },
+      {
+        path: 'clerkManage/:keyval?',
+        component: () => import('@/views/ncs-his/his-clerk/hisClerkManager'),
+        name: 'hisClerkManage',
+        meta: { title: i18n.t('his.hisClerk'), icon: 'el-icon-search', noCache: true },
+        hidden: true
+      },
+      {
+        path: 'nurseConfigManage/:keyval?',
+        component: () => import('@/views/ncs-his/his-nurse-config/hisNurseConfigManager'),
+        name: 'hisNurseConfigManage',
+        meta: { title: i18n.t('his.hisNurseConfig'), icon: 'el-icon-search', noCache: true },
+        hidden: true
+      }
+    ]
+  },
+  {
     path: '/calling-ncError',
     component: Layout,
     redirect: '/calling-ncError/index',

+ 29 - 10
src/views/customer/components/customerManager.vue

@@ -798,17 +798,22 @@ export default {
         cellRenderer: this.sexRenderer },
       { headerName: this.$t('customerManage.age'), field: 'age', sortable: true, filter: 'agNumberColumnFilter', width: 130, valueFormatter: this.sexFormatter
       },
-      // { headerName: '生日', field: 'birthday', sortable: true, filter: 'agDateColumnFilter', width: 130, valueFormatter: this.unixDateFormatter2, filterParams: {
-      //     comparator: (filterLocalDateAtMidnight, cellValue) => { // 所有数据都由服务器端过滤,此处只需返回0 即可
-      //       const celldate = unixToDate(cellValue, 'yyyy-MM-dd 00:00:00')
-      //       return (new Date(celldate).getTime() / 1000) - (filterLocalDateAtMidnight.getTime() / 1000)
-      //     }
-      //   }},
-      // { headerName: '入住编号', field: 'card_no', sortable: true, filter: 'agTextColumnFilter' },
-      // { headerName: '身份证件类型', field: 'id_type', sortable: true, filter: 'agTextColumnFilter' },
-      // { headerName: '证件', field: 'id_no', sortable: true, filter: 'agNumberColumnFilter', valueFormatter: this.idNoFormatter },
+      { headerName: this.$t('member.birthday'), field: 'birthday', sortable: true, filter: 'agDateColumnFilter', width: 130, valueFormatter: this.unixDateFormatter2, filterParams: {
+          comparator: (filterLocalDateAtMidnight, cellValue) => { // 所有数据都由服务器端过滤,此处只需返回0 即可
+            const celldate = unixToDate(cellValue, 'yyyy-MM-dd 00:00:00')
+            return (new Date(celldate).getTime() / 1000) - (filterLocalDateAtMidnight.getTime() / 1000)
+          }
+        }},
+      { headerName: this.$t('customerManage.cardNo'), field: 'card_no', sortable: true, filter: 'agTextColumnFilter' },
+      { headerName: this.$t('customerManage.idType'),
+        field: 'id_type',
+        sortable: true,
+        filter: 'agTextColumnFilter',
+        valueFormatter: this.idCardFormatter
+      },
+      { headerName: this.$t('customerManage.idNo'), field: 'id_no', sortable: true, filter: 'agNumberColumnFilter', valueFormatter: this.idNoFormatter },
       { headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: 'agTextColumnFilter' },
-      // { headerName: '家庭住址', field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260 },
+      { headerName: this.$t('member.homeAddress'), field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260 },
 
       { headerName: this.$t('customerManage.inDate'), field: 'in_date', sortable: true, filter: 'agDateColumnFilter', valueFormatter: this.formatterDate, filterParams: {
         comparator: (filterLocalDateAtMidnight, cellValue) => { // 所有数据都由服务器端过滤,此处只需返回0 即可
@@ -1092,6 +1097,20 @@ export default {
     sexFormatter(param) {
       return param.value + param.data.age_unit
     },
+    /**
+     * 身份证转换
+     */
+    idCardFormatter(param) {
+      if (param.value === '身份证') {
+        return this.$t('customerManage.idCard');
+      } else if (param.value === '护照') {
+        return this.$t('customerManage.passport');
+      } else if (param.value === '军人证') {
+        return this.$t('customerManage.servicemanCard');
+      } else {
+        return this.$t('customerManage.null');
+      }
+    },
     idNoFormatter(param) {
       if (param.value) {
         return param.data.id_type + ':' +  param.value

+ 283 - 0
src/views/ncs-his/his-clerk/hisClerkManager.vue

@@ -0,0 +1,283 @@
+<template>
+  <div class="app-container">
+
+    <ag-grid-layout
+        :table-height="tableHeight"
+        theme="ag-theme-alpine"
+        :column-defs="columnDefs"
+        :row-data="tableData"
+        :locale-text="localeText"
+        :grid-options="gridOptions"
+        :default-col-def="defaultColDef"
+        :animate-rows="true"
+        :row-selection="rowSelection"
+        row-height="50"
+        @filterChanged="filterModifed"
+        @sortChanged="gridSortChange"
+    >
+      <div slot="toolbar" class="inner-toolbar">
+        <div class="toolbar-search">
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
+        </div>
+      </div>
+      <el-pagination
+          v-if="pageData"
+          slot="pagination"
+          :current-page="pageData.page_no"
+          :page-sizes="[20, 50, 100, 200]"
+          :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>
+  </div>
+</template>
+
+<script>
+import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender";
+import RadioFilter from "@/components/AgGridCustomFilter/RadioFilter";
+import ListFilter from "@/components/AgGridCustomFilter/ListFilter";
+import RecordButtonCellRender from "@/components/AgGridCellRender/RecordButtonCellRender";
+import {AG_GRID_LOCALE_CN} from "@/utils/AgGridVueLocaleCn";
+import * as API_his from "@/api/ncs_his";
+import {unixToDate} from "@/utils/Foundation";
+
+export default {
+  name: "hisClerkManager",
+  components: { ButtonCellRender, RadioFilter, ListFilter, RecordButtonCellRender },
+  data() {
+    return {
+      pickerOptions: {
+      },
+      tableData: [],
+      /** 列表参数 */
+      params: {
+        page_size: 20,
+        page_no: 1,
+      },
+      pageData: [],
+      loading: false,
+      searchDateRange: [],
+      callingType: null,
+      columnDefs: null, // 新表格
+      defaultColDef: null,
+      gridOptions: null,
+      gridApi: null,
+      columnApi: null,
+      localeText: AG_GRID_LOCALE_CN,
+      rowSelection: null,
+      showViewer: false,
+      queryResult: '-1',
+      srcStreaming1: '',
+      srcStreaming2: '',
+      stream1: '',
+      stream2: '',
+      beginSeconds: 0,
+      buttonStr: this.$t('action.play'),
+      dialogVisible: false,
+      streamingType: true,
+      recordDir: '',
+      sexTransfer: [
+        { key: this.$t('member.man'), value: '1', color: 'green' },
+        { key: this.$t('member.woman'), value: '0', color: 'red' }
+      ],
+      roleTypeTransfer: [
+        { key: '医生', value: '1' },
+        { key: '护士', value: '2' },
+        { key: '护工', value: '3' },
+      ],
+      partKeyval: this.$route.params.id
+    }
+  },
+  computed: {
+    tableHeight() {
+      return this.mainAreaHeight - 130
+    }
+  },
+  beforeMount() {
+    this.gridOptions = {
+    }
+    this.columnDefs = [
+      {
+        headerName: '#',
+        headerCheckboxSelection: true,
+        headerCheckboxSelectionFilteredOnly: true,
+        checkboxSelection: true,
+        sortable: false, filter: false,
+        width: 50,
+        resizable: false,
+        valueGetter: this.hashValueGetter
+      },
+      { headerName: this.$t('his.hisClerkKeyval'), field: 'keyval', sortable: false, minWidth: 120 },
+      { headerName: this.$t('his.hisPartKeyval'), field: 'part_keyval', sortable: false, minWidth: 120 },
+      { headerName: this.$t('member.uname'), field: 'name', sortable: false, minWidth: 120 },
+      { headerName: this.$t('role.roleName'), field: 'type', sortable: false, minWidth: 120,
+        filterParams: {
+          listData: this.roleTypeTransfer
+        },
+        cellRenderer: this.roleTypeRenderer },
+      { headerName: this.$t('member.sex'), field: 'sex', sortable: true, filterFramework: 'RadioFilter', minWidth: 80,
+        filterParams: {
+          listData: this.sexTransfer
+        },
+        cellRenderer: this.sexRenderer },
+      { headerName: this.$t('member.birthday'), field: 'birthday', sortable: false, minWidth: 150 },
+      { headerName: this.$t('customerManage.idNo'), field: 'id_no', sortable: true, filter: 'agNumberColumnFilter' },
+      { headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: 'agTextColumnFilter' },
+      { headerName: this.$t('his.passNo'), field: 'pass_no', sortable: false, minWidth: 150 },
+    ]
+    this.defaultColDef = {
+      filter: false,
+      sortable: true,
+      resizable: true,
+      comparator: this.testComparator,
+      filterParams: {
+        debounceMs: 200,
+        newRowsAction: 'keep',
+        textCustomComparator: this.textCustomComparator,
+        comparator: this.testComparator
+      }
+    }
+    this.rowSelection = 'multiple'
+  },
+  mounted() {
+    window.onresize = this.windowResize
+    this.gridApi = this.gridOptions.api
+    this.getList()
+    // this.$refs.video2.addEventListener("pause", this.pause)
+  },
+  methods: {
+    windowResize() {
+      this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
+    },
+    /** 分页大小发生改变 */
+    handlePageSizeChange(size) {
+      this.params.page_size = size
+      this.getList()
+    },
+
+    /** 分页页数发生改变 */
+    handlePageCurrentChange(page) {
+      this.params.page_no = page
+      this.getList()
+    },
+    /** 加载列表数据 */
+    getList() {
+      this.loading = true
+      this.gridApi.showLoadingOverlay()
+      this.gridApi.sizeColumnsToFit()
+      if (this.partKeyval !== undefined) {
+        this.params.fixedCondition = 'part_keyval = "' + this.partKeyval + '"'
+      }
+
+      const param = this.MixinClone(this.params)
+      API_his.getClerkList(param).then(response => {
+        this.loading = false
+        this.tableData = [...response.data]
+        this.pageData = {
+          page_no: response.page_no,
+          page_size: response.page_size,
+          data_total: response.data_total
+        }
+      }).catch((error) => {
+        this.loading = false
+      })
+    },
+    /** 处理搜索 */
+    handlerSearch(value) {
+      this.params.page_no = 1
+      this.params.query = value
+      this.getList()
+    },
+    formatterCreateTime(row, column, cellValue) {
+      return unixToDate(row.create_time)
+    },
+    /** 处理字段排序 */
+    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.getList()
+    },
+    filterModifed(param) {
+      const model = param.api.getFilterModel()
+      this.params.filter = JSON.stringify(model)
+      this.getList()
+    },
+    gridSortChange(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.getList()
+    },
+    changeResult() {
+      this.params.query_result = this.queryResult
+      this.params.page_no = 1
+      this.getList()
+    },
+    /** 性别格式化 **/
+    sexRenderer(params) {
+      if (params.value === null || params.value === undefined) return ''
+      const item = this.sexTransfer.filter(p => p.value === params.value)[0]
+      if (item) {
+        return '<span style="color:' + item.color + ';">' + item.key + '</span>'
+      } else {
+        return this.$t('member.unknown')
+      }
+    },
+    /** 性别格式化 **/
+    roleTypeRenderer(params) {
+      if (params.value === null || params.value === undefined) return ''
+      const item = this.roleTypeTransfer.filter(p => p.value === params.value)[0]
+      if (item) {
+        return item.key
+      } else {
+        return this.$t('member.unknown')
+      }
+    },
+    formatterPartName(param) {
+      let partName = ''
+      API_his.getPartByKeyval(param.value).then(response => {
+        partName = response.name
+      })
+      return partName
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 306 - 0
src/views/ncs-his/his-nurse-config/hisNurseConfigManager.vue

@@ -0,0 +1,306 @@
+<template>
+  <div class="app-container">
+    <el-container :style="{height: tableHeight+'px'}">
+
+      <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="name" :label="this.$t('nurseConfig.configName')" width="120px" />
+          <el-table-column
+              width="160px"
+              align="right"
+          >
+
+          </el-table-column>
+        </el-table>
+      </el-aside>
+      <el-main>
+
+        <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="this.$t('action.keywords')" @search="handlerSearch" />
+            </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-container>
+  </div>
+</template>
+
+<script>
+import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
+import * as API_his from "@/api/ncs_his";
+
+export default {
+  name: 'hisNurseConfig',
+  components: {},
+  data() {
+    return {
+      listLoading: false,
+      tagList1: [],
+      tagList2: [],
+      pKeyval: '',
+      type: '',
+      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,
+      partKeyval: this.$route.params.id,
+    }
+  },
+  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: this.$t('his.hisNurseOptionsKeyval'), field: 'keyval', sortable: true, filter: 'agNumberColumnFilter', width: 80 },
+      { headerName: this.$t('nurseConfig.optionName'), field: 'name', sortable: true, flex: 1, filter: 'agTextColumnFilter', filterParams: {
+          debounceMs: 200,
+          newRowsAction: 'keep'
+        }
+      },
+      // lockPosition 锁定位置,会在第一列
+      // lockPinned = true 不能拖动然后固定
+      // resizeable 单元个大小是否可以调整
+      { headerName: this.$t('nurseConfig.colorRgb'), field: 'color', sortable: true, filter: false,
+        cellRenderer: this.colorFormatter
+      },
+    ]
+    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)
+    },
+    gettagList1() {
+      this.params.sort = 'index_no'
+      this.params.dir = 'asc'
+      if (this.partKeyval !== undefined && this.partKeyval.length > 0) {
+        this.params.fixedCondition = 'part_keyval= "' + this.partKeyval + '"'
+      }
+
+      API_his.getNurseConfigList(this.params).then(response => {
+        this.listLoading = false
+        this.tagList1 = response.data
+
+        if (this.tagList1.length > 0) {
+          if (this.pKeyval === '') {
+            this.pKeyval = this.tagList1[0].keyval
+          }
+          this.pName = this.tagList1[0].name
+          this.gettagList2(this.pKeyval)
+          const currentRow = this.tagList1.find(p => p.keyval === this.pKeyval)
+          this.$refs.nurseConfigTable.setCurrentRow(currentRow)
+        }
+      }).catch(() => {
+        this.listLoading = false
+      })
+    },
+    gettagList2() {
+      if (this.pKeyval !== undefined && this.pKeyval.length > 0) {
+        this.params.fixedCondition = ' category_keyval = "' + this.pKeyval + '"'
+      }
+
+      this.params.sort = 'id'
+      this.params.dir = 'desc'
+      API_his.getNurseOptionsList(this.params).then(response => {
+        this.tagList2 = response.data
+      }).catch(() => {
+      })
+    },
+    tableClick(row, column, event, cell) {
+      if (column.property === 'name') {
+        this.pKeyval = row.keyval
+        this.pName = row.name
+        this.gettagList2()
+      }
+    },
+    /** 分页大小发生改变 */
+    handlePageSizeChange(size) {
+      this.params.page_size = size
+      this.gettagList2()
+    },
+
+    /** 分页页数发生改变 */
+    handlePageCurrentChange(page) {
+      this.params.page_no = page
+      this.gettagList2()
+    },
+    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)
+    },
+    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>
+
+<style scoped>
+.permission-container {
+  padding: 10px;
+  background-color: #fff;
+}
+.el-aside{
+  padding: 8px 10px;
+}
+.mytable {
+  width: 100%;
+  padding: 20px;
+  min-height: 480px;
+  cursor: pointer;
+  font-size: 16px;
+}
+/deep/ .colorBtn {
+  width: 80px !important;
+  height: 40px !important;
+}
+/deep/ .m-colorPicker .box.open{
+  z-index: 1000 !important;
+}
+</style>

+ 272 - 0
src/views/ncs-his/his-part/hisPartManager.vue

@@ -0,0 +1,272 @@
+<template>
+  <div class="app-container">
+
+    <ag-grid-layout
+        :table-height="tableHeight"
+        theme="ag-theme-alpine"
+        :column-defs="columnDefs"
+        :row-data="tableData"
+        :locale-text="localeText"
+        :grid-options="gridOptions"
+        :default-col-def="defaultColDef"
+        :animate-rows="true"
+        :row-selection="rowSelection"
+        row-height="50"
+        @filterChanged="filterModifed"
+        @sortChanged="gridSortChange"
+    >
+      <div slot="toolbar" class="inner-toolbar">
+        <div class="toolbar-search">
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
+        </div>
+      </div>
+      <el-pagination
+          v-if="pageData"
+          slot="pagination"
+          :current-page="pageData.page_no"
+          :page-sizes="[20, 50, 100, 200]"
+          :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>
+  </div>
+</template>
+
+<script>
+import * as API_his from '@/api/ncs_his'
+import { unixToDate } from '@/utils/Foundation'
+import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
+import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender";
+import RecordButtonCellRender from "@/components/AgGridCellRender/RecordButtonCellRender";
+import RadioFilter from "@/components/AgGridCustomFilter/RadioFilter";
+import ListFilter from "@/components/AgGridCustomFilter/ListFilter";
+import ButtonCellRenderList from "@/components/AgGridCellRender/ButtonCellRenderList";
+const DeviceUrl = domain.DeviceUrl
+
+export default {
+  name: 'hisPartManager',
+  components: { ButtonCellRenderList, ButtonCellRender, RadioFilter, ListFilter, RecordButtonCellRender },
+  data() {
+    return {
+      pickerOptions: {
+      },
+      tableData: [],
+      /** 列表参数 */
+      params: {
+        page_size: 20,
+        page_no: 1,
+      },
+      pageData: [],
+      loading: false,
+      searchDateRange: [],
+      callingType: null,
+      columnDefs: null, // 新表格
+      defaultColDef: null,
+      gridOptions: null,
+      gridApi: null,
+      columnApi: null,
+      localeText: AG_GRID_LOCALE_CN,
+      rowSelection: null,
+      showViewer: false,
+      queryResult: '-1',
+      srcStreaming1: '',
+      srcStreaming2: '',
+      stream1: '',
+      stream2: '',
+      beginSeconds: 0,
+      buttonStr: this.$t('action.play'),
+      dialogVisible: false,
+      streamingType: true,
+      recordDir: '',
+    }
+  },
+  computed: {
+    tableHeight() {
+      return this.mainAreaHeight - 130
+    }
+  },
+  beforeMount() {
+    this.gridOptions = {
+    }
+    this.columnDefs = [
+      {
+        headerName: '#',
+        headerCheckboxSelection: true,
+        headerCheckboxSelectionFilteredOnly: true,
+        checkboxSelection: true,
+        sortable: false, filter: false,
+        width: 50,
+        resizable: false,
+        valueGetter: this.hashValueGetter
+      },
+      { headerName: this.$t('his.hisPartKeyval'), field: 'keyval', sortable: false, minWidth: 150 },
+      { headerName: this.$t('his.hisPartName'), field: 'name', sortable: false, minWidth: 150 },
+      { headerName: this.$t('his.summary'), field: 'summary', sortable: false, minWidth: 150 },
+      { headerName: this.$t('his.tel'), field: 'tel', sortable: false, minWidth: 150 },
+      { headerName: this.$t('action.handle'), field: 'id',
+        cellRendererFramework: 'ButtonCellRenderList',
+        cellRendererParams: param => {
+          return {
+            list: [
+              {
+                onClick: this.getHisPatient,
+                label: this.$t('his.hisPatient'),
+                buttonType: 'primary',
+                buttonSize: 'mini'
+              },
+              {
+                onClick: this.getHisClerk,
+                label: this.$t('his.hisClerk'),
+                buttonType: 'warning',
+                buttonSize: 'mini',
+              },
+              {
+                onClick: this.getHisNurseConfig,
+                label: this.$t('his.hisNurseConfig'),
+                buttonType: 'success',
+                buttonSize: 'mini',
+              }
+            ]}
+        },
+        filter: false,
+        pinned: 'right',
+        lockPinned: true,
+        minWidth: this.$i18n.locale === 'zh' ? 240 : 350,
+        resizable: false,
+        sortable: false
+      }
+    ]
+    this.defaultColDef = {
+      filter: false,
+      sortable: true,
+      resizable: true,
+      comparator: this.testComparator,
+      filterParams: {
+        debounceMs: 200,
+        newRowsAction: 'keep',
+        textCustomComparator: this.textCustomComparator,
+        comparator: this.testComparator
+      }
+    }
+    this.rowSelection = 'multiple'
+  },
+  mounted() {
+    window.onresize = this.windowResize
+    this.gridApi = this.gridOptions.api
+    this.getList()
+    // this.$refs.video2.addEventListener("pause", this.pause)
+  },
+  methods: {
+    windowResize() {
+      this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
+    },
+    /** 分页大小发生改变 */
+    handlePageSizeChange(size) {
+      this.params.page_size = size
+      this.getList()
+    },
+
+    /** 分页页数发生改变 */
+    handlePageCurrentChange(page) {
+      this.params.page_no = page
+      this.getList()
+    },
+    /** 加载列表数据 */
+    getList() {
+      this.loading = true
+      this.gridApi.showLoadingOverlay()
+      this.gridApi.sizeColumnsToFit()
+      const param = this.MixinClone(this.params)
+      API_his.getList(param).then(response => {
+        this.loading = false
+        this.tableData = [...response.data]
+        this.pageData = {
+          page_no: response.page_no,
+          page_size: response.page_size,
+          data_total: response.data_total
+        }
+      }).catch((error) => {
+        this.loading = false
+      })
+    },
+    getHisPatient(row) {
+      this.$router.push({ name: 'hisPatientManage', params: { id: row.keyval, callback: this.getList() }})
+    },
+    getHisClerk(row) {
+      this.$router.push({ name: 'hisClerkManage', params: { id: row.keyval, callback: this.getList() }})
+    },
+    getHisNurseConfig(row) {
+      this.$router.push({ name: 'hisNurseConfigManage', params: { id: row.keyval, callback: this.getList() }})
+    },
+    /** 处理搜索 */
+    handlerSearch(value) {
+      this.params.page_no = 1
+      this.params.query = value
+      this.getList()
+    },
+    formatterCreateTime(row, column, cellValue) {
+      return unixToDate(row.create_time)
+    },
+    /** 处理字段排序 */
+    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.getList()
+    },
+    filterModifed(param) {
+      const model = param.api.getFilterModel()
+      this.params.filter = JSON.stringify(model)
+      this.getList()
+    },
+    gridSortChange(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.getList()
+    },
+    changeResult() {
+      this.params.query_result = this.queryResult
+      this.params.page_no = 1
+      this.getList()
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 495 - 0
src/views/ncs-his/his-patient/hisPatientManage.vue

@@ -0,0 +1,495 @@
+<template>
+  <div class="app-container">
+
+    <ag-grid-layout
+        :table-height="tableHeight"
+        theme="ag-theme-alpine"
+        :column-defs="columnDefs"
+        :row-data="tableData"
+        :locale-text="localeText"
+        :grid-options="gridOptions"
+        :default-col-def="defaultColDef"
+        :animate-rows="true"
+        :row-selection="rowSelection"
+        row-height="50"
+        @filterChanged="filterModifed"
+        @sortChanged="gridSortChange"
+    >
+      <div slot="toolbar" class="inner-toolbar">
+        <div class="toolbar-search">
+          <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
+        </div>
+      </div>
+      <el-pagination
+          v-if="pageData"
+          slot="pagination"
+          :current-page="pageData.page_no"
+          :page-sizes="[20, 50, 100, 200]"
+          :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-dialog :visible.sync="customerFormVisible" :title="this.$t('customerManage.customerInfo')" class="customer-dialog" width="60%">
+      <el-form ref="editForm" :model="formmodel" :label-width="this.$i18n.locale === 'zh' ? '120px' : '145px'">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('customerManage.named')" prop="name">
+              {{ this.formmodel.name }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('customerManage.cardNo')">
+              {{ this.formmodel.card_no }}
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('member.sex')" class="form-item-sex">
+              {{ getSex(this.formmodel.sex) }}
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item :label="this.$t('customerManage.age')" prop="age">
+              {{ this.formmodel.age + this.formmodel.age_unit }}
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('member.mobile')" prop="mobile">
+              {{ this.formmodel.mobile }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('member.homeAddress')" prop="address">
+              {{ this.formmodel.address }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('member.birthday')" prop="birthday">
+              {{ this.formmodel.birthday }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('customerManage.inDate')" prop="in_date">
+              {{ this.formmodel.indate }}
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item :label="this.$t('customerManage.idCard')">
+              {{ this.formmodel.id_no }}
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item :label="this.$t('customerManage.frame')" prop="frame_id">
+              {{ this.formmodel.bed_no }}
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="16">
+            <el-form-item :label="this.$t('customerManage.patientIllnessDesc')">
+              {{ this.formmodel.illness_description }}
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="8">
+            <el-form-item :label="this.$t('customerManage.doctor')">
+              {{ this.formmodel.doctor_name }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item :label="this.$t('customerManage.nurse')">
+              {{ this.formmodel.nurse_name }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item :label="this.$t('customerManage.worker')">
+              {{ this.formmodel.worker_name }}
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row v-if="hisPatientMappingList.length > 0">
+          <el-col v-for="(item, index) in hisPatientMappingList" :key="index" :span="8">
+            <el-form-item :label="item.category_name">
+              <span :style="'color: #' + item.color">{{ item.options_name }}</span>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+
+        <el-row>
+
+          <el-col :span="8">
+            <el-form-item :label="this.$t('customerManage.babyName')">
+              {{ this.formmodel.baby_name }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item :label="this.$t('customerManage.babySex')">
+              {{ getSex(this.formmodel.baby_sex) }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item :label="this.$t('customerManage.babyBirthday')">
+              {{ this.formmodel.baby_birthday  }}
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import * as API_his from '@/api/ncs_his'
+import { unixToDate } from '@/utils/Foundation'
+import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
+import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender";
+import RecordButtonCellRender from "@/components/AgGridCellRender/RecordButtonCellRender";
+import RadioFilter from "@/components/AgGridCustomFilter/RadioFilter";
+import ListFilter from "@/components/AgGridCustomFilter/ListFilter";
+import {getDevicesByUuid} from "@/api/initialize";
+import * as API_NurseConfig from "@/api/ncs_nurse_config";
+const DeviceUrl = domain.DeviceUrl
+
+export default {
+  name: 'hisPatientManage',
+  components: { ButtonCellRender, RadioFilter, ListFilter, RecordButtonCellRender },
+  data() {
+    return {
+      pickerOptions: {
+      },
+      tableData: [],
+      /** 列表参数 */
+      params: {
+        page_size: 20,
+        page_no: 1,
+      },
+      activeName: 'customerBaseInfo',
+      formmodel: {},
+      pageData: [],
+      nurseconfigSelection: [],
+      loading: false,
+      searchDateRange: [],
+      callingType: null,
+      columnDefs: null, // 新表格
+      defaultColDef: null,
+      gridOptions: null,
+      gridApi: null,
+      columnApi: null,
+      localeText: AG_GRID_LOCALE_CN,
+      rowSelection: null,
+      showViewer: false,
+      queryResult: '-1',
+      srcStreaming1: '',
+      srcStreaming2: '',
+      stream1: '',
+      stream2: '',
+      beginSeconds: 0,
+      buttonStr: this.$t('action.play'),
+      dialogVisible: false,
+      streamingType: true,
+      recordDir: '',
+      sexTransfer: [
+        { key: this.$t('member.man'), value: '1', color: 'green' },
+        { key: this.$t('member.woman'), value: '0', color: 'red' }
+      ],
+      customerStatusTransfer: [
+        { key: this.$t('customerManage.customerStatusTrue'), value: '0', color: 'green' },
+        { key: this.$t('customerManage.customerStatusFalse'), value: '1', color: 'red' }
+      ],
+      partKeyval: this.$route.params.id,
+      partName: '',
+      customerFormVisible: false,
+      hisNurseOptionsList: [],
+      hisPatientMappingList: []
+    }
+  },
+  computed: {
+    tableHeight() {
+      return this.mainAreaHeight - 130
+    }
+  },
+  beforeMount() {
+    this.gridOptions = {
+    }
+    this.columnDefs = [
+      {
+        headerName: '#',
+        headerCheckboxSelection: true,
+        headerCheckboxSelectionFilteredOnly: true,
+        checkboxSelection: true,
+        sortable: false, filter: false,
+        width: 50,
+        resizable: false,
+        valueGetter: this.hashValueGetter
+      },
+      { headerName: this.$t('his.hisPatientKeyval'), field: 'keyval', sortable: false, minWidth: 120 },
+      { headerName: this.$t('his.hisPartKeyval'), field: 'part_keyval', sortable: false, minWidth: 120 },
+      { headerName: this.$t('customerManage.named'), field: 'name', sortable: false, minWidth: 120 },
+      { headerName: this.$t('customerManage.frame'), field: 'bed_no', sortable: false, minWidth: 120 },
+      { headerName: this.$t('member.sex'), field: 'sex', sortable: true, filterFramework: 'RadioFilter', minWidth: 120,
+        filterParams: {
+          listData: this.sexTransfer
+        },
+        cellRenderer: this.sexRenderer },
+      { headerName: this.$t('customerManage.customerStatus'), field: 'status', sortable: true, filterFramework: 'RadioFilter', minWidth: 80,
+        filterParams: {
+          listData: this.customerStatusTransfer
+        },
+        cellRenderer: this.customerStatusRenderer },
+      { headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: 'agTextColumnFilter', minWidth: 120 },
+      { headerName: this.$t('customerManage.age'), field: 'age', sortable: true, filter: 'agNumberColumnFilter', minWidth: 80 },
+      { headerName: this.$t('customerManage.ageUnit'), field: 'age_unit', sortable: true, filter: 'agTextColumnFilter', minWidth: 80 },
+      { headerName: this.$t('member.birthday'), field: 'birthday', sortable: false, minWidth: 120 },
+      { headerName: this.$t('customerManage.cardNo'), field: 'card_no', sortable: false, minWidth: 120 },
+      { headerName: this.$t('customerManage.inDate'), field: 'indate', sortable: true, filter: 'agTextColumnFilter' },
+      { headerName: this.$t('action.handle'), field: 'id',
+        cellRendererFramework: 'ButtonCellRender',
+        cellRendererParams: {
+          onClick: this.handleInfo,
+          label: this.$t('his.hisPatientInfo'),
+          buttonType: 'primary',
+          buttonSize: 'mini'
+        },
+        filter: false,
+        pinned: 'right',
+        lockPinned: true,
+        minWidth: 120,
+        resizable: false,
+        sortable: false
+      }
+    ]
+    this.defaultColDef = {
+      filter: false,
+      sortable: true,
+      resizable: true,
+      comparator: this.testComparator,
+      filterParams: {
+        debounceMs: 200,
+        newRowsAction: 'keep',
+        textCustomComparator: this.textCustomComparator,
+        comparator: this.testComparator
+      }
+    }
+    this.rowSelection = 'multiple'
+  },
+  mounted() {
+    window.onresize = this.windowResize
+    this.gridApi = this.gridOptions.api
+    this.getList()
+    // this.$refs.video2.addEventListener("pause", this.pause)
+  },
+  methods: {
+    windowResize() {
+      this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
+    },
+    /** 分页大小发生改变 */
+    handlePageSizeChange(size) {
+      this.params.page_size = size
+      this.getList()
+    },
+
+    /** 分页页数发生改变 */
+    handlePageCurrentChange(page) {
+      this.params.page_no = page
+      this.getList()
+    },
+    /** 加载列表数据 */
+    getList() {
+      this.loading = true
+      this.gridApi.showLoadingOverlay()
+      this.gridApi.sizeColumnsToFit()
+
+      if (this.partKeyval !== undefined) {
+        this.params.fixedCondition = 'part_keyval = "' + this.partKeyval + '"'
+      }
+
+      const param = this.MixinClone(this.params)
+      API_his.getPatientList(param).then(response => {
+        this.loading = false
+        this.tableData = [...response.data]
+        this.pageData = {
+          page_no: response.page_no,
+          page_size: response.page_size,
+          data_total: response.data_total
+        }
+      }).catch((error) => {
+        this.loading = false
+      })
+    },
+    /** 处理搜索 */
+    handlerSearch(value) {
+      this.params.page_no = 1
+      this.params.query = value
+      this.getList()
+    },
+    formatterCreateTime(row, column, cellValue) {
+      return unixToDate(row.create_time)
+    },
+    /** 处理字段排序 */
+    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.getList()
+    },
+    filterModifed(param) {
+      const model = param.api.getFilterModel()
+      this.params.filter = JSON.stringify(model)
+      this.getList()
+    },
+    gridSortChange(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.getList()
+    },
+    changeResult() {
+      this.params.query_result = this.queryResult
+      this.params.page_no = 1
+      this.getList()
+    },
+    /** 性别格式化 **/
+    sexRenderer(params) {
+      if (params.value === null || params.value === undefined) return ''
+      const item = this.sexTransfer.filter(p => p.value === params.value)[0]
+      if (item) {
+        return '<span style="color:' + item.color + ';">' + item.key + '</span>'
+      } else {
+        return this.$t('member.unknown')
+      }
+    },
+    getSex(value) {
+      if (value === null || value === undefined) return ''
+      const item = this.sexTransfer.filter(p => p.value ===value)[0]
+      if (item) {
+        return item.key
+      } else {
+        return this.$t('member.unknown')
+      }
+    },
+    /** 状态格式化 **/
+    customerStatusRenderer(params) {
+      if (params.value === null || params.value === undefined) return ''
+      const item = this.customerStatusTransfer.filter(p => p.value === params.value)[0]
+      if (item) {
+        return '<span style="color:' + item.color + ';">' + item.key + '</span>'
+      } else {
+        return this.$t('member.unknown')
+      }
+    },
+    handleInfo(row) {
+      this.boolDevice = false
+      this.formmodel = {
+        ...row
+      }
+
+      console.log(this.formmodel)
+      this.getPatientNurseMappingByPatientKeyval(this.formmodel.keyval)
+      // // 处理护理项已选择内容
+      // const nurseconfigs = this.formmodel.nurseconfigs
+      // for (let i = 0; i < this.nurseconfigSelection.length; i++) {
+      //   delete this.nurseconfigSelection[i].selected_id
+      //   delete this.nurseconfigSelection[i].mapping_id
+      // }
+      // if (nurseconfigs) {
+      //   nurseconfigs.forEach(item => {
+      //     const nurseconfigselect = this.nurseconfigSelection.find(p => p.config.id === item.nurseconfig_id)
+      //     if (nurseconfigselect) {
+      //       nurseconfigselect.selected_id = item.nurseconfig_option_id
+      //       nurseconfigselect.mapping_id = item.mapping_id
+      //     }
+      //   })
+      // }
+      this.customerFormVisible = true
+      // this.handNusreColor()
+    },
+
+    /**
+     * 加载护理参数
+     */
+    getNurseConfigs() {
+      this.nurseData = []
+      API_NurseConfig.getConfigSelectionByPartId(this.$store.getters.partId).then(res => {
+        this.nurseconfigSelection = [...res]
+      })
+    },
+    // 护理项选择 设置选中项的颜色
+    changeNurseData(val, configid, index) {
+      const currentCfg = this.nurseconfigSelection.find(p => p.config.id === configid).options.find(p => p.id === val)
+      if (currentCfg) {
+        this.$refs['patient_nurse_' + configid][0].$el.getElementsByClassName('el-input__inner')[0].style = 'color:#' + currentCfg.color_rgb + ' !important'
+      }
+      this.$set(this, 'nurseconfigSelection', this.nurseconfigSelection)
+      this.$set(this.nurseconfigSelection, index, this.nurseconfigSelection[index])
+    },
+    // 初始化护理参数选中项颜色
+    handNusreColor() {
+      // 处理护理等级颜色
+      this.$nextTick(() => {
+        this.nurseconfigSelection.forEach(item => {
+          const currentCfg = this.nurseconfigSelection.find(p => p.config.id === item.config.id).options.find(p => p.id === item.selected_id)
+          if (currentCfg) {
+            this.$refs['patient_nurse_' + item.config.id][0].$el.getElementsByClassName('el-input__inner')[0].style = 'color:#' + currentCfg.color_rgb + ' !important'
+          }
+        })
+      })
+    },
+    getPatientNurseMappingByPatientKeyval(patientKeyval) {
+      API_his.getPatientNurseMappingByPatientKeyval(patientKeyval).then(res => {
+        this.hisPatientMappingList = res
+        console.log(this.hisPatientMappingList)
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 48 - 0
src/views/ncs-his/hisManagement.vue

@@ -0,0 +1,48 @@
+<template>
+  <el-tabs v-model="activeName" style="margin:0;" type="border-card">
+    <el-tab-pane :label="this.$t('his.hisPart')" name="hisPart">
+      <keep-alive>
+        <his-part-manager :frame="frame" />
+      </keep-alive>
+    </el-tab-pane>
+    <el-tab-pane :label="this.$t('his.hisPatient')" name="hisPatient">
+      <keep-alive>
+        <his-patient-manager :frame="frame" />
+      </keep-alive>
+    </el-tab-pane>
+    <el-tab-pane :label="this.$t('his.hisClerk')" name="hisClerk">
+      <keep-alive>
+        <his-clerk-manager :frame="frame" />
+      </keep-alive>
+    </el-tab-pane>
+    <el-tab-pane :label="this.$t('his.hisNurseConfig')" name="hisNurseConfig">
+      <keep-alive>
+        <his-nurse-config-manager :frame="frame" />
+      </keep-alive>
+    </el-tab-pane>
+  </el-tabs>
+</template>
+
+<script>
+import HisPartManager from './his-part/hisPartManager'
+import HisPatientManager from './his-patient/hisPatientManage'
+import HisClerkManager from './his-clerk/hisClerkManager'
+import HisNurseConfigManager from './his-nurse-config/hisNurseConfigManager'
+export default {
+  name: 'hisManager',
+  components: { HisPartManager, HisPatientManager, HisClerkManager, HisNurseConfigManager },
+  data() {
+    return {
+      frame: {},
+      activeName: 'hisPart',
+      loading: false
+    }
+  },
+  methods: {
+  }
+}
+</script>
+
+<style scoped>
+
+</style>