Browse Source

Merge branch 'develop' of http://git.wdklian.com/allen/ncs_ui into develop

wuyunfeng 2 years ago
parent
commit
8993b5131f

+ 22 - 21
languages/en.js

@@ -1052,7 +1052,8 @@ module.exports = {
     debugging485: '485 debugging',
     debugging485: '485 debugging',
     linuxVersion: 'Linux device version',
     linuxVersion: 'Linux device version',
     deviceFrame: 'Device space',
     deviceFrame: 'Device space',
-    ledDevice: 'LED devices',
+    ledDeviceManager: 'LED dot matrix screen management',
+    ledDevice: 'LED dot matrix screen control',
     entraceguardUser: 'Passage setting',
     entraceguardUser: 'Passage setting',
     customBoardManage: 'Custom Board Screen',
     customBoardManage: 'Custom Board Screen',
     customBoardDesigner: 'Designer Board Screen',
     customBoardDesigner: 'Designer Board Screen',
@@ -1063,8 +1064,8 @@ module.exports = {
     lowBatteryDevice: 'Low battery devices',
     lowBatteryDevice: 'Low battery devices',
     checkNetwork: 'Check the network of the device',
     checkNetwork: 'Check the network of the device',
     changeBattery: 'Replace the battery of the device',
     changeBattery: 'Replace the battery of the device',
-    interactionPush:'Interactive record push configuration',
-    interactionPushParamConfig:'Push parameter configuration'
+    interactionPush: 'Interactive record push configuration',
+    interactionPushParamConfig: 'Push parameter configuration'
   },
   },
   deviceType: {
   deviceType: {
     NURSE_HOST: 'Nurse Host',
     NURSE_HOST: 'Nurse Host',
@@ -1340,23 +1341,23 @@ module.exports = {
     add433Box: 'Please add a 433 conversion box first',
     add433Box: 'Please add a 433 conversion box first',
     volumeControl: 'volume control'
     volumeControl: 'volume control'
   },
   },
-  interactionPushConfig:{
-    apiUrl:'Push interface url',
-    enabled:'Enabled',
-    remark:'Remark',
-    forParts:'For Parts',
-    add:'Add new config',
-    createTitle:'Add new push config',
-    configParam:'Param Configuration',
-    apiUrlRequired:'Push interface url required',
-    pushParam:'Push parameter',
-    method:'Push method',
-    paramFormat:'Parameter format',
-    pushParamExample:'Parameter example',
-    paramName:'Parameter name',
-    paramType:'Parameter type',
-    paramExplain:'Parameter description',
-    paramAlias:'Parameter alias(rename the parameter)',
-    exampleValue:'Parameter example value'
+  interactionPushConfig: {
+    apiUrl: 'Push interface url',
+    enabled: 'Enabled',
+    remark: 'Remark',
+    forParts: 'For Parts',
+    add: 'Add new config',
+    createTitle: 'Add new push config',
+    configParam: 'Param Configuration',
+    apiUrlRequired: 'Push interface url required',
+    pushParam: 'Push parameter',
+    method: 'Push method',
+    paramFormat: 'Parameter format',
+    pushParamExample: 'Parameter example',
+    paramName: 'Parameter name',
+    paramType: 'Parameter type',
+    paramExplain: 'Parameter description',
+    paramAlias: 'Parameter alias(rename the parameter)',
+    exampleValue: 'Parameter example value'
   }
   }
 }
 }

+ 2 - 1
languages/es.js

@@ -1052,7 +1052,8 @@ module.exports = {
     debugging485: '485 depurando',
     debugging485: '485 depurando',
     linuxVersion: 'Versión del dispositivo Linux',
     linuxVersion: 'Versión del dispositivo Linux',
     deviceFrame: 'Espacio del dispositivo',
     deviceFrame: 'Espacio del dispositivo',
-    ledDevice: 'Dispositivos LED',
+    ledDeviceManager: 'Gestión de pantalla de matriz de puntos LED',
+    ledDevice: 'Control de pantalla de matriz de puntos LED',
     entraceguardUser: 'Configuración de paso',
     entraceguardUser: 'Configuración de paso',
     customBoardManage: 'Pantalla de tablero personalizada',
     customBoardManage: 'Pantalla de tablero personalizada',
     customBoardDesigner: 'Pantalla del tablero de diseño',
     customBoardDesigner: 'Pantalla del tablero de diseño',

+ 22 - 21
languages/ru-RU.js

@@ -1051,7 +1051,8 @@ module.exports = {
     debugging485: '485 отладка',
     debugging485: '485 отладка',
     linuxVersion: 'Версия устройства Linux',
     linuxVersion: 'Версия устройства Linux',
     deviceFrame: 'Пространство устройства',
     deviceFrame: 'Пространство устройства',
-    ledDevice: 'Светодиодные устройства',
+    ledDeviceManager: 'Управление экраном со светодиодной решеткой',
+    ledDevice: 'Управление светодиодным экраном',
     entraceguardUser: 'Параметры прохода',
     entraceguardUser: 'Параметры прохода',
     customBoardManage: 'Настройка экрана панели',
     customBoardManage: 'Настройка экрана панели',
     customBoardDesigner: 'Экран панели',
     customBoardDesigner: 'Экран панели',
@@ -1062,8 +1063,8 @@ module.exports = {
     lowBatteryDevice: 'Низкоэлектрическое оборудование',
     lowBatteryDevice: 'Низкоэлектрическое оборудование',
     checkNetwork: 'Проверить сеть устройства',
     checkNetwork: 'Проверить сеть устройства',
     changeBattery: 'Замена батарей в оборудовании',
     changeBattery: 'Замена батарей в оборудовании',
-    interactionPush:'Интерактивная запись push - конфигурация',
-    interactionPushParamConfig:'Настройка параметров push'
+    interactionPush: 'Интерактивная запись push - конфигурация',
+    interactionPushParamConfig: 'Настройка параметров push'
   },
   },
   deviceType: {
   deviceType: {
     NURSE_HOST: 'Устройство медсестры',
     NURSE_HOST: 'Устройство медсестры',
@@ -1338,23 +1339,23 @@ module.exports = {
     add433Box: 'Пожалуйста, добавьте конвертер 433.',
     add433Box: 'Пожалуйста, добавьте конвертер 433.',
     volumeControl: 'Регулирование громкости'
     volumeControl: 'Регулирование громкости'
   },
   },
-  interactionPushConfig:{
-    apiUrl:'Адрес интерфейса push',
-    enabled:'Открытое состояние',
-    remark:'Примечания',
-    forParts:'Отдел применения',
-    add:'Дополнительная конфигурация',
-    createTitle:'Дополнительная конфигурация push',
-    configParam:'Параметры конфигурации',
-    apiUrlRequired:'Push URL - адрес должен быть заполнен',
-    pushParam:'push Параметры',
-    method:'Метод толкания',
-    paramFormat:'Формат параметров',
-    pushParamExample:'Пример параметров',
-    paramName:'Имя параметра',
-    paramType:'Тип параметров',
-    paramExplain:'Описание параметров',
-    paramAlias:'Параметры псевдонимы (переименование параметров)',
-    exampleValue:'Примерное значение параметров'
+  interactionPushConfig: {
+    apiUrl: 'Адрес интерфейса push',
+    enabled: 'Открытое состояние',
+    remark: 'Примечания',
+    forParts: 'Отдел применения',
+    add: 'Дополнительная конфигурация',
+    createTitle: 'Дополнительная конфигурация push',
+    configParam: 'Параметры конфигурации',
+    apiUrlRequired: 'Push URL - адрес должен быть заполнен',
+    pushParam: 'push Параметры',
+    method: 'Метод толкания',
+    paramFormat: 'Формат параметров',
+    pushParamExample: 'Пример параметров',
+    paramName: 'Имя параметра',
+    paramType: 'Тип параметров',
+    paramExplain: 'Описание параметров',
+    paramAlias: 'Параметры псевдонимы (переименование параметров)',
+    exampleValue: 'Примерное значение параметров'
   }
   }
 }
 }

+ 24 - 23
languages/zh-CN.js

@@ -1054,7 +1054,8 @@ module.exports = {
     debugging485: '485调试',
     debugging485: '485调试',
     linuxVersion: 'Linux设备版本',
     linuxVersion: 'Linux设备版本',
     deviceFrame: '设备空间',
     deviceFrame: '设备空间',
-    ledDevice: 'LED点阵屏',
+    ledDeviceManager: 'LED点阵屏管理',
+    ledDevice: 'LED点阵屏控制',
     entraceguardUser: '用户通行设置',
     entraceguardUser: '用户通行设置',
     customBoardManage: '信息看板设计',
     customBoardManage: '信息看板设计',
     customBoardDesigner: '看板屏设计',
     customBoardDesigner: '看板屏设计',
@@ -1065,8 +1066,8 @@ module.exports = {
     lowBatteryDevice: '低电量设备',
     lowBatteryDevice: '低电量设备',
     checkNetwork: '检查设备网络',
     checkNetwork: '检查设备网络',
     changeBattery: '更换设备电池',
     changeBattery: '更换设备电池',
-    interactionPush:'交互记录推送配置',
-    interactionPushParamConfig:'推送参数配置'
+    interactionPush: '交互记录推送配置',
+    interactionPushParamConfig: '推送参数配置'
   },
   },
   deviceType: {
   deviceType: {
     NURSE_HOST: '护士主机',
     NURSE_HOST: '护士主机',
@@ -1342,24 +1343,24 @@ module.exports = {
     add433Box: '请先添加433转换盒',
     add433Box: '请先添加433转换盒',
     volumeControl: '音量调节'
     volumeControl: '音量调节'
   },
   },
-    interactionPushConfig:{
-  apiUrl:'推送接口地址',
-      enabled:'开启状态',
-      remark:'备注',
-      forParts:'适用科室',
-      add:'新增配置',
-      createTitle:'新增推送配置',
-      configParam:'配置参数',
-      apiUrlRequired:'推送URL地址必须填写',
-      pushParam:'推送参数',
-      method:'推送方法',
-      paramFormat:'参数格式',
-      pushParamExample:'参数示例',
-      paramName:'参数名称',
-      paramType:'参数类型',
-      paramExplain:'参数说明',
-      paramAlias:'参数别名(重命名参数名称)',
-      exampleValue:'参数示例值',
-      isEnable:'是否开启'
-}
+  interactionPushConfig: {
+    apiUrl: '推送接口地址',
+    enabled: '开启状态',
+    remark: '备注',
+    forParts: '适用科室',
+    add: '新增配置',
+    createTitle: '新增推送配置',
+    configParam: '配置参数',
+    apiUrlRequired: '推送URL地址必须填写',
+    pushParam: '推送参数',
+    method: '推送方法',
+    paramFormat: '参数格式',
+    pushParamExample: '参数示例',
+    paramName: '参数名称',
+    paramType: '参数类型',
+    paramExplain: '参数说明',
+    paramAlias: '参数别名(重命名参数名称)',
+    exampleValue: '参数示例值',
+    isEnable: '是否开启'
+  }
 }
 }

File diff suppressed because it is too large
+ 1 - 0
src/icons/svg/led.svg


+ 21 - 16
src/router/index.js

@@ -174,8 +174,21 @@ export const partRoutes = [
         component: () => import('@/views/ncs-device-menu/index'),
         component: () => import('@/views/ncs-device-menu/index'),
         name: 'DeviceMenu',
         name: 'DeviceMenu',
         meta: { title: i18n.t('tab.deviceMenuManager'), icon: 'el-icon-menu', noCache: true }
         meta: { title: i18n.t('tab.deviceMenuManager'), icon: 'el-icon-menu', noCache: true }
+      },
+      {
+        path: 'led-deviceManager',
+        component: () => import('@/views/ncs-led/ledDeviceManagement'),
+        name: 'LedDeviceManager',
+        meta: { title: i18n.t('tab.ledDeviceManager'), icon: 'led', noCache: true },
+        hidden: uiVersion === 2
+      },
+      {
+        path: 'led-control',
+        component: () => import('@/views/ncs-led/ledControl'),
+        name: 'LedControl',
+        meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }, // LED点阵屏
+        hidden: uiVersion === 2
       }
       }
-
     ]
     ]
   },
   },
   // {
   // {
@@ -627,20 +640,6 @@ export const partRoutes = [
       }
       }
     ]
     ]
   },
   },
-  {
-    path: '/ncs_led',
-    component: Layout,
-    redirect: '/ncs_led/index',
-    children: [
-      {
-        path: 'index',
-        component: () => import('@/views/ncs-led/ledManager'),
-        name: 'part_led',
-        meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true } // LED点阵屏
-      }
-    ],
-    hidden: uiVersion !== 1
-  },
   { path: '*', redirect: '/404', hidden: true }
   { path: '*', redirect: '/404', hidden: true }
 ]
 ]
 export const hospitalRoutes = [
 export const hospitalRoutes = [
@@ -707,7 +706,7 @@ export const hospitalRoutes = [
     children: [
     children: [
       {
       {
         path: 'index',
         path: 'index',
-        component: () => import('@/views/hospital/ledManager'),
+        component: () => import('@/views/hospital/ledControl'),
         name: 'hospital_led',
         name: 'hospital_led',
         meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }
         meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }
       }
       }
@@ -784,6 +783,12 @@ export const adminRoutes = [
         component: () => import('@/views/ncs-linux-version/linuxVersionSetting'),
         component: () => import('@/views/ncs-linux-version/linuxVersionSetting'),
         name: 'linuxVersion',
         name: 'linuxVersion',
         meta: { title: i18n.t('tab.linuxVersion'), icon: 'nested', noCache: true }
         meta: { title: i18n.t('tab.linuxVersion'), icon: 'nested', noCache: true }
+      },
+      {
+        path: 'led-deviceManager',
+        component: () => import('@/views/ncs-led/led-admin'),
+        name: 'LedDeviceManager',
+        meta: { title: i18n.t('tab.ledDeviceManager'), icon: 'led', noCache: true }
       }
       }
     ]
     ]
   },
   },

+ 3 - 3
src/utils/domain.js

@@ -48,11 +48,11 @@ module.exports = {
 // docker run -idt -p 8007:80 -e uiVersion=2 --name ncs-ui-yz --log-opt max-size=500m --log-opt max-file=1  -v /etc/localtime:/etc/localtime --restart always  registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:bdhp1.77
 // docker run -idt -p 8007:80 -e uiVersion=2 --name ncs-ui-yz --log-opt max-size=500m --log-opt max-file=1  -v /etc/localtime:/etc/localtime --restart always  registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:bdhp1.77
 //
 //
 // 网盘医院版
 // 网盘医院版
-// docker build -t   registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:bdhp1.126 .
-// docker push registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:bdhp1.126
+// docker build -t   registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:bdhp1.128 .
+// docker push registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:bdhp1.128
 // docker pull registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:bdhp1.47
 // docker pull registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:bdhp1.47
 // 删除ui
 // 删除ui
-// docker run -idt -p 80:80 --name ncs-ui --log-opt max-size=500m --log-opt max-file=1  -v /etc/localtime:/etc/localtime --restart always  registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:bdhp1.123
+// docker run -idt -p 80:80 --name ncs-ui --log-opt max-size=500m --log-opt max-file=1  -v /etc/localtime:/etc/localtime --restart always  registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:bdhp1.128
 // 英语板
 // 英语板
 // docker build -t   registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:en1.83 .
 // docker build -t   registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:en1.83 .
 // docker push registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:en1.83
 // docker push registry.cn-shenzhen.aliyuncs.com/wdkl/hp_ui:en1.83

+ 0 - 0
src/views/hospital/ledManager.vue


+ 4 - 4
src/views/ncs-device-menu/index.vue

@@ -77,10 +77,10 @@
           <el-form-item :label="urlTemplateStr"
           <el-form-item :label="urlTemplateStr"
                         v-for="(item, index) in formmodelUrlParamsTemp" :key="'u' + index">
                         v-for="(item, index) in formmodelUrlParamsTemp" :key="'u' + index">
             <el-col :span="10" style="margin: 0 10px 0 0">
             <el-col :span="10" style="margin: 0 10px 0 0">
-              <el-input v-model="item.parameter" :maxlength="20" :placeholder="inputTemplateStr"/>
+              <el-input v-model="item.parameter" :maxlength="50" :placeholder="inputTemplateStr"/>
             </el-col>
             </el-col>
             <el-col :span="10" style="margin: 0 10px 0 0">
             <el-col :span="10" style="margin: 0 10px 0 0">
-              <el-input v-model="item.value" :maxlength="20" :placeholder="inputTemplateValueStr"/>
+              <el-input v-model="item.value" :maxlength="50" :placeholder="inputTemplateValueStr"/>
             </el-col>
             </el-col>
             <el-col :span="3" style="margin: auto">
             <el-col :span="3" style="margin: auto">
               <el-button v-if="index === 0" type="primary" @click="addInput(formmodelUrlParamsTemp)"> {{ addStr }} </el-button>
               <el-button v-if="index === 0" type="primary" @click="addInput(formmodelUrlParamsTemp)"> {{ addStr }} </el-button>
@@ -99,10 +99,10 @@
           <el-form-item :label="actIntentStr"
           <el-form-item :label="actIntentStr"
                         v-for="(item, index) in formmodelActIntent" :key="'a' + index">
                         v-for="(item, index) in formmodelActIntent" :key="'a' + index">
             <el-col :span="10" style="margin: 0 10px 0 0">
             <el-col :span="10" style="margin: 0 10px 0 0">
-              <el-input v-model="item.parameter" :maxlength="20" :placeholder="inputTemplateStr"/>
+              <el-input v-model="item.parameter" :maxlength="50" :placeholder="inputTemplateStr"/>
             </el-col>
             </el-col>
             <el-col :span="10" style="margin: 0 10px 0 0">
             <el-col :span="10" style="margin: 0 10px 0 0">
-              <el-input v-model="item.value" :maxlength="20" :placeholder="inputTemplateValueStr"/>
+              <el-input v-model="item.value" :maxlength="50" :placeholder="inputTemplateValueStr"/>
             </el-col>
             </el-col>
             <el-col :span="3" style="margin: auto">
             <el-col :span="3" style="margin: auto">
               <el-button v-if="index === 0" type="primary" @click="addInput(formmodelActIntent)"> {{ addStr }} </el-button>
               <el-button v-if="index === 0" type="primary" @click="addInput(formmodelActIntent)"> {{ addStr }} </el-button>

+ 928 - 0
src/views/ncs-led/components/ledDeviceManager.vue

@@ -0,0 +1,928 @@
+<template>
+  <div>
+    <ag-grid-layout
+        toolbar
+        :table-height="tableHeight"
+        theme="ag-theme-alpine"
+        :column-defs="columnDefs"
+        :row-data="rowData"
+        :locale-text="localeText"
+        :grid-options="gridOptions"
+        :debounce-vertical-scrollbar="true"
+        :default-col-def="defaultColDef"
+        :animate-rows="true"
+        :row-selection="rowSelection"
+        :framework-components="frameworkComponents"
+        @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 class="toolbar-btns">
+          <el-button v-if="part_view" type="primary" size="mini" @click="handleAdd">{{
+              this.$t('deviceManage.deviceAdd') }}
+          </el-button>
+          <el-button v-if="part_view" type="danger" size="mini" @click="batchDelete">{{
+              this.$t('action.deleteList') }}
+          </el-button>
+          <el-select v-if="!part_view" v-model="choicePartId" size="mini" style="padding-right: 10px" filterable clearable @change="partChange">
+            <el-option v-for="(item,index) in choicePartFrames" :key="index" :label="item.full_name" :value="item.part_id" />
+          </el-select>
+          <el-button v-if="!part_view" type="primary" size="mini" @click="deviceServerChange">{{
+              this.$t('deviceManage.deviceServerChange') }}
+          </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-dialog :title="deviceEditTitle" :visible.sync="deviceDialogVisible"
+               :width="this.$i18n.locale === 'zh' ? '60%' : '70%'">
+      <el-form ref="deviceEditForm" :rules="deviceRules"
+               :label-width="this.$i18n.locale === 'zh' ? '120px' : '165px'" :model="deviceModel">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.deviceType')" prop="device_type">
+              <el-select v-model="deviceModel.device_type"
+                         :placeholder="this.$t('deviceManage.choiceDeviceType')"
+                         :disabled="true" filterable clearable>
+                <el-option v-for="(item,index) in deviceTypeTransfer" :key="index" :label="item.key" :value="item.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.deviceName')" prop="name">
+              <el-input v-model="deviceModel.name" clearable :maxlength="20"
+                        :placeholder="this.$t('deviceManage.inputDeviceName')"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.code')" prop="code">
+              <el-input v-model="deviceModel.code" clearable
+                        :placeholder="this.$t('deviceManage.inputCode')"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.model')" prop="model">
+              <el-input v-model="deviceModel.model" clearable
+                        :placeholder="this.$t('deviceManage.inputModel')"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.ethMac')" prop="eth_mac">
+              <el-input v-model="deviceModel.eth_mac" clearable
+                        :placeholder="this.$t('deviceManage.inputEthMac')"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.ethIp')" prop="eth_ip">
+              <el-input v-model="deviceModel.eth_ip" clearable
+                        :placeholder="this.$t('deviceManage.inputEthIp')"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.wifiMac')" prop="wifi_mac">
+              <el-input v-model="deviceModel.wifi_mac" clearable
+                        :placeholder="this.$t('deviceManage.inputWifiMac')" readonly/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.wifiIp')" prop="wifi_ip">
+              <el-input v-model="deviceModel.wifi_ip" clearable
+                        :placeholder="this.$t('deviceManage.inputWifiIp')" readonly/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.softVer')" prop="soft_ver">
+              <el-input v-model="deviceModel.soft_ver" clearable
+                        :placeholder="this.$t('deviceManage.inputSoftVer')"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.hardVer')" prop="hard_ver">
+              <el-input v-model="deviceModel.hard_ver" clearable
+                        :placeholder="this.$t('deviceManage.inputHardVer')"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.wifiHostname')">
+              <el-input v-model="deviceModel.wifi_hostname" :readonly="true" clearable
+                        :placeholder="this.$t('deviceManage.inputWifiHostname')"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.wifiPassword')">
+              <el-input v-model="deviceModel.wifi_password" :readonly="true" clearable
+                        :placeholder="this.$t('deviceManage.inputPassword')"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.frameName')" prop="frame_id">
+              <el-select v-model="deviceModel.frame_id" filterable clearable :disabled="frameSelectabled"
+                         :placeholder="this.$t('deviceManage.choiceFrameName')">
+                <el-option v-for="(item,index) in partFrames" :key="index" :label="item.full_name"
+                           :value="item.id"/>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.phoneNumber')">
+              <el-input v-model="deviceModel.phone_number" clearable
+                        :placeholder="this.$t('deviceManage.inputPhoneNumber')"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.priority')">
+              <el-input-number v-model="deviceModel.priority" controls-position="right" :min="1"
+                               :max="99"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.backupId')">
+              <el-input v-model="deviceModel.backup_id" clearable placeholder=""/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.deviceStatus')">
+              <el-checkbox v-model="deviceModel.status" :true-label="1" :false-label="0">{{
+                  this.$t('deviceManage.choiceDeviceStatus') }}
+              </el-checkbox>
+              <!--              <el-radio v-model="formmodel.status" :label="1">启用</el-radio>-->
+              <!--              <el-radio v-model="formmodel.status" :label="0">不启用</el-radio>-->
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.ledResolutionRatio')" prop="led_resolution_ratio">
+              <el-input v-model="deviceModel.led_resolution_ratio" clearable
+                        :placeholder="this.$t('deviceManage.ledResolutionRatio')"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.ledVoice')" prop="led_voice">
+              <el-checkbox v-model="deviceModel.led_voice" :true-label="1" :false-label="0">
+                {{ this.$t('deviceManage.ledVoiceStatus') }}
+              </el-checkbox>
+              <!--              <el-radio-group v-model="deviceModel.led_voice" size="mini" prop="led_voice">-->
+              <!--                <el-radio :label=1>开启语音</el-radio>-->
+              <!--                <el-radio :label=0>关闭语音</el-radio>-->
+              <!--              </el-radio-group>-->
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="this.$t('deviceManage.ledFontSize')" prop="led_font_size">
+              <el-input-number v-model="deviceModel.led_font_size" controls-position="right" :min="0"
+                               :max="60"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handlerFormSubmit('deviceEditForm')">{{ this.$t('action.yes') }}
+        </el-button>
+      </div>
+    </el-dialog>
+    <!-- 设备编辑弹窗 -->
+
+    <el-dialog :title="this.$t('deviceManage.deviceServerChange')" :visible.sync="serverAddressDialogVisible"
+               width="30%">
+      <el-form ref="deviceServerChange" :rules="serverAddressRules" label-width="120px" :model="serverAddress">
+        <el-row>
+          <el-form-item :label="this.$t('deviceManage.serverIp')">
+            <el-input v-model="serverAddress.server_ip" clearable :maxlength="20"
+                      :placeholder="this.$t('deviceManage.inputServerIp')"/>
+          </el-form-item>
+        </el-row>
+        <el-row>
+          <el-form-item :label="this.$t('deviceManage.serverPort')">
+            <el-input v-model="serverAddress.server_port" clearable :maxlength="20"
+                      :placeholder="this.$t('deviceManage.inputServerPort')"/>
+          </el-form-item>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+
+        <el-button type="primary" @click="updateDevicesServerIp()">{{ this.$t('action.yes') }}</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {AG_GRID_LOCALE_CN} from '@/utils/AgGridVueLocaleCn'
+import {unix2Date} from '@/utils/Foundation'
+import ButtonCellRender from '@/components/AgGridCellRender/ButtonCellRender'
+import ListFilter from '@/components/AgGridCustomFilter/ListFilter'
+import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
+import * as API_Device from '@/api/ncs_device'
+import * as API_Frame from '@/api/ncs_hospitalFrame'
+import {FRAME_TYPE} from '@/utils/enum/FrameTypeEnum'
+import {DEVICE_TYPE} from '@/utils/enum/DeviceTypeEnum'
+import * as shop_API from "@/api/ncs_shop";
+
+import ButtonCellRenderList from '@/components/AgGridCellRender/ButtonCellRenderList'
+const DeviceUrl = domain.DeviceUrl
+export default {
+  name: 'led_deviceManager',
+  components: {ButtonCellRender, ListFilter, RadioFilter,
+    ButtonCellRenderList},
+  props: {
+    frame: {
+      type: Object,
+      default: () => {
+      }
+    },
+    part_view: { // 是否为科室视图
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      /** ag-grid参数 **/
+      pageData: {}, // 翻页数据
+      errorId: null,
+      shopVisible: false,
+      columnDefs: null,
+      rowData: null,
+      defaultColDef: null,
+      gridOptions: null,
+      gridApi: null,
+      columnApi: null,
+      localeText: AG_GRID_LOCALE_CN,
+      filterState: null,
+      rowSelection: null,
+      frameworkComponents: null,
+      /** 列表参数 */
+      params: {
+        page_size: 20,
+        page_no: 1,
+        fixedCondition: this.part_view ? ('device_type = ' + DEVICE_TYPE.LED_SCREEN + ' and part_id=' + this.$store.getters.partId) : '1=1 and device_type = ' + DEVICE_TYPE.LED_SCREEN
+      },
+      /** device 弹窗 **/
+      deviceDialogVisible: false,
+      deviceEditTitle: this.$t('deviceManage.deviceAdd'),
+      deviceModel: {},
+      deviceRules: {
+        name: [
+          this.MixinRequired(this.$t('deviceManage.inputDeviceName'))
+        ],
+        device_type: [
+          {required: true, message: this.$t('deviceManage.choiceDeviceType'), trigger: 'blur'}
+        ],
+        code: [
+          {required: true, message: this.$t('deviceManage.inputCode'), trigger: 'blur'}
+        ],
+        model: [
+          {required: true, message: this.$t('deviceManage.inputModel'), trigger: 'blur'}
+        ],
+        frame_id: [
+          {
+            required: Object.keys(this.frame).length === 0,
+            message: this.$t('deviceManage.choiceFrameName'),
+            trigger: 'blur'
+          } // 没有传入frame 属性,必须选择安装位置
+        ],
+        phone_number: [
+          {required: true, message: this.$t('deviceManage.phoneNumber'), trigger: 'blur'}
+        ],
+        sign_type: [
+          {required: true, message: this.$t('deviceManage.choiceSignType'), trigger: 'blur'}
+        ],
+        led_resolution_ratio: [
+          {required: true, message: this.$t('deviceManage.ledResolutionRatio'), trigger: 'blur'}
+        ],
+        // led_voice: [
+        //   { required: true, message: this.$t('deviceManage.ledVoice'), trigger: 'blur' }
+        // ],
+        led_font_size: [
+          {required: true, message: this.$t('deviceManage.ledFontSize'), trigger: 'blur'}
+        ],
+      },
+      partFrames: [],
+      choicePartFrames: [],
+      /** 设备类型转换数组 **/
+      deviceTypeTransfer:  DEVICE_TYPE.getKeyValueList(),
+      deviceStatusTransfer: [
+        {key: this.$t('deviceManage.statusTure'), value: 1, color: 'green'},
+        {key: this.$t('deviceManage.statusFalse'), value: 0, color: 'red'}
+      ],
+      websock: null,
+      onlineDevice: [],
+      // 请求当前科室的数据
+      shop: {},
+      serverAddress: {
+        server_ip: '172.28.100.100',
+        server_port: '8006'
+      },
+      serverAddressDialogVisible: false,
+      serverAddressRules: {
+        serverIp: [
+          this.MixinRequired(this.$t('deviceManage.inputServerIp'))
+        ],
+        serverPort: [
+          this.MixinRequired(this.$t('deviceManage.inputServerPort'))
+        ]
+      },
+      startTime: "06:00",
+      endTime: "18:00",
+      choicePartId: null,
+    }
+  },
+  computed: {
+    tableHeight() {
+      return Object.keys(this.frame).length === 0 ? this.mainAreaHeight - 130 : this.mainAreaHeight - 174
+    },
+    frameSelectabled() {
+      return Object.keys(this.frame).length > 0
+    }
+  },
+  watch: {
+    frame(val, oldvalue) {
+      console.log('watch', val)
+      this.params.fixedCondition = Object.keys(this.frame).length === 0 ? 'device_type = ' + DEVICE_TYPE.LED_SCREEN + ' and part_id=' + this.$store.getters.partId :
+          (this.frame.part_id ? 'device_type = ' + DEVICE_TYPE.LED_SCREEN + ' and part_id=' + this.frame.part_id + ' and frame_id =' + this.frame.id :
+              'device_type = ' + DEVICE_TYPE.LED_SCREEN + ' and part_id=' + this.frame.hospital_id + ' and frame_id =' + this.frame.id)
+
+      this.getShop(this.$store.getters.partId)
+      this.getList()
+    }
+  },
+  beforeMount() {
+    this.gridOptions = {}
+    this.columnDefs = [
+      {
+        headerName: '#',
+        headerCheckboxSelection: true,
+        headerCheckboxSelectionFilteredOnly: true,
+        checkboxSelection: true,
+        sortable: false, filter: false,
+        width: 80,
+        resizable: false,
+        valueGetter: this.hashValueGetter
+      },
+      {headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 100},
+      {
+        headerName: this.$t('deviceManage.deviceType'), field: 'device_type', sortable: true,
+        filterFramework: 'ListFilter', width: 160,
+        filterParams: {
+          listData: this.deviceTypeTransfer
+        },
+        valueGetter: this.deviceTypeGetter
+      },
+      // lockPosition 锁定位置,会在第一列
+      // lockPinned = true 不能拖动然后固定
+      // resizeable 单元个大小是否可以调整
+      {
+        headerName: this.$t('deviceManage.deviceName'),
+        field: 'name',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.status'), field: 'status', sortable: true,
+        filterFramework: 'RadioFilter',
+        filterParams: {
+          listData: this.deviceStatusTransfer
+        },
+        cellRenderer: this.deviceStatusFormatter
+      },
+      {
+        headerName: this.$t('deviceManage.connect'),
+        field: 'online_state',
+        sortable: false,
+        filter: 'agTextColumnFilter',
+
+        filterParams: {
+          textCustomComparator: (filter, value, filterText) => {
+            if (filterText) {
+              const filterTextLowerCase = filterText.toLowerCase()
+              const valueLowerCase = value.toString().toLowerCase()
+              switch (filter) {
+                case 'contains':
+                  return valueLowerCase.indexOf(filterTextLowerCase) >= 0
+                case 'notContains':
+                  return valueLowerCase.indexOf(filterTextLowerCase) === -1
+                case 'equals':
+                  return valueLowerCase === filterTextLowerCase
+                case 'notEqual':
+                  return valueLowerCase !== filterTextLowerCase
+                case 'startsWith':
+                  return valueLowerCase.indexOf(filterTextLowerCase) === 0
+                case 'endsWith':
+                  var index = valueLowerCase.lastIndexOf(filterTextLowerCase)
+                  return index >= 0 && index === (valueLowerCase.length - filterTextLowerCase.length)
+                default:
+                  // should never happen
+                  console.warn('invalid filter type ' + filter)
+                  return false
+              }
+            }
+          }
+        },
+        cellRenderer: this.onlineStateFormatter
+      },
+      {
+        headerName: this.$t('deviceManage.frameFullName'),
+        field: 'full_name',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.phoneNumber'),
+        field: 'phone_number',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.ethMac'),
+        field: 'eth_mac',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.ethIp'),
+        field: 'eth_ip',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.ethIpPort'),
+        field: 'eth_ip_port',
+        sortable: true,
+        filter: 'agNumberColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.model'),
+        field: 'model',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {headerName: this.$t('deviceManage.code'), field: 'code', sortable: true, filter: 'agTextColumnFilter'},
+      {
+        headerName: this.$t('deviceManage.softVer'),
+        field: 'soft_ver',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.hardVer'),
+        field: 'hard_ver',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.wifiMac'),
+        field: 'wifi_mac',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.wifiIp'),
+        field: 'wifi_ip',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.sipId'),
+        field: 'sip_id',
+        sortable: true,
+        filter: 'agTextColumnFilter'
+      },
+      {
+        headerName: this.$t('deviceManage.updateTime'),
+        field: 'update_time',
+        sortable: true,
+        filter: 'agDateColumnFilter',
+        valueFormatter: this.unixDateFormatter,
+        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('action.handle'), field: 'id',
+        cellRendererFramework: 'ButtonCellRenderList',
+        cellRendererParams: param => {
+          return {
+            list: [
+              {
+                onClick: this.handleEdit,
+                label: this.$t('action.edit'),
+                buttonType: 'primary',
+                buttonSize: 'mini'
+              },
+              {
+                onClick: this.deleteSingle,
+                label: this.$t('action.delete'),
+                buttonType: 'danger',
+                buttonSize: 'mini',
+                disabled: param.data['member_name'] === 'superadmin'
+              },
+            ]}
+        },
+        filter: false,
+        pinned: 'right',
+        lockPinned: true,
+        minWidth: this.$i18n.locale === 'zh' ? 160 : 190,
+        resizable: false,
+        sortable: false },
+    ]
+    this.defaultColDef = {
+      // filter: 'agTextColumnFilter',
+      sortable: true,
+      resizable: true,
+      enableValue: true,
+      filter: true,
+      // comparator: this.dateCustomComparator,
+      filterParams: {
+        debounceMs: 500,
+        newRowsAction: 'keep',
+        textCustomComparator: this.textCustomComparator
+      }
+    }
+    this.rowSelection = 'multiple'
+  },
+  mounted() {
+    window.onresize = this.windowResize
+    this.gridApi = this.gridOptions.api
+    this.gridColumnApi = this.gridOptions.columnApi
+    this.gridColumnApi.applyColumnState({
+      state: [
+        {
+          colId: 'id',
+          sort: 'desc'
+        }
+      ]
+    })
+    this.getShop(this.$store.getters.partId)
+    this.initWebSocket()
+  },
+  methods: {
+    windowResize() {
+      this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
+    },
+    /** 加载列表数据 */
+    getList() {
+      const param = this.MixinClone(this.params)
+      this.gridApi.showLoadingOverlay()
+      API_Device.getList(param).then(response => {
+        const deviceData = [...response.data]
+        deviceData.forEach(item => {
+          if (this.onlineDevice.length > 0) {
+            if (item.eth_mac) {
+              const mac = this.onlineDevice.filter(p => p != null && (p.toLowerCase() === item.eth_mac.toLowerCase()))[0]
+              // console.log('在线设备1', mac)
+              if (mac !== undefined && mac !== null) {
+                item['online_state'] = this.$t('deviceManage.connectTrue')
+              } else {
+                item['online_state'] = this.$t('deviceManage.connectFalse')
+              }
+            }
+          } else {
+            item['online_state'] = this.$t('deviceManage.connectFalse')
+          }
+        })
+        this.rowData = deviceData
+        this.pageData = {
+          page_no: response.page_no,
+          page_size: response.page_size,
+          data_total: response.data_total
+        }
+        this.$nextTick(() => {
+          const node = this.gridApi.getDisplayedRowAtIndex(0)
+          if (node !== null && node !== undefined) {
+            node.setSelected(true)
+          }
+        })
+      })
+    },
+    getPartFrame(partId) {
+      if (this.shop.shop_type === "0" && this.shop.parent_id === -1) {
+        API_Frame.getAllFrames().then(res => {
+          this.partFrames = [...res].filter(item => item.type === FRAME_TYPE.HOSPITAL || item.type === FRAME_TYPE.PART)
+          this.choicePartFrames = this.partFrames
+          this.choicePartFrames.unshift({
+            part_id: 0,
+            full_name: this.$t('action.all')
+          })
+          this.choicePartId = this.partFrames[0].part_id
+        })
+      } else {
+        API_Frame.getFramesPartId(partId).then(res => {
+          this.partFrames = [...res].filter(item => item.type === FRAME_TYPE.PART)
+        })
+      }
+    },
+    /**
+     * 过滤状态发生变化,发送到服务器检索数据
+     */
+    filterModifed(param) {
+      var model = param.api.getFilterModel()
+      // 连接状态不经过服务器过滤
+      delete model.online_state
+      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()
+    },
+    /** 处理搜索 */
+    handlerSearch(keywords) {
+      this.params.query = keywords
+      this.getList()
+    },
+    /** 获取设备类型文字显示,从deviceTypeTransfer 中找出value值对应的key显示出来 */
+    deviceTypeGetter(params) {
+      const gridVal = params.data.device_type
+      // return this.deviceTypeTransfer.filter(p => p.value === gridVal).map(p => p.key)
+      return DEVICE_TYPE.getDescFromValue(gridVal)
+    },
+    /** 格式化时间函数 */
+    unixDateFormatter(param) {
+      if (!param.value) return ''
+      return unix2Date(param.value * 1000)
+    },
+    /** 设备状态格式化 **/
+    deviceStatusFormatter(params) {
+      if (params.value === null || params.value === undefined) return ''
+      const item = this.deviceStatusTransfer.filter(p => p.value === params.value)[0]
+      if (item) {
+        return '<span style="color:' + item.color + ';">' + item.key + '</span>'
+      } else {
+        return ''
+      }
+    },
+    /** 设备连接状态格式化 **/
+    onlineStateFormatter(params) {
+      if (params.value === this.$t('deviceManage.connectTrue')) {
+        // return '<span style="color:green;">在线</span>'
+        return '<span style="color:green;">' + this.$t('deviceManage.connectTrue') + '</span>'
+      } else if (params.value === this.$t('deviceManage.connectFalse')) {
+        // return '<span style="color:gray;">离线</span>'
+        return '<span style="color:gray;">' + this.$t('deviceManage.connectFalse') + '</span>'
+      } else {
+        return '<span style="color:gray;"> / </span>'
+      }
+    },
+    /** 删除设备 **/
+    deleteSingle(row) {
+      this.handlerDelete(row.id)
+    },
+    /** 删除设备 **/
+    handlerDelete(id) {
+      this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
+        type: 'warning'
+      }).then(() => {
+        API_Device.remove(id).then(
+            response => {
+              this.getList()
+            }
+        ).catch(response => {
+          this.$message({
+            type: 'info',
+            message: response.message
+          })
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: this.$t('action.cancelDelete')
+        })
+      })
+    },
+    /** 添加设备事件 **/
+    handleAdd() {
+      this.deviceModel = {
+        device_type: DEVICE_TYPE.LED_SCREEN,
+        soft_ver: 'SV1.0',
+        hard_ver: 'HV1.0',
+        priority: 1,
+        code: 'C' + parseInt(Math.random() * 100000),
+        model: 'M' + parseInt(Math.random() * 100000),
+        status: 1,
+        name: ''
+      }
+      this.sosDeviceSetting = {
+        type: 0,
+        unit: '小时',
+        setting_time: 120
+      }
+      if (Object.keys(this.frame).length > 0) {
+        this.$set(this.deviceModel, 'frame_id', this.frame.id)
+      }
+      delete this.deviceModel.id
+      this.deviceEditTitle = this.$t('deviceManage.deviceAdd')
+      this.deviceDialogVisible = true
+    },
+    /** 修改设备  **/
+    handleEdit(params) {
+      this.deviceModel = {
+        ...params
+      }
+      this.deviceEditTitle = this.$t('deviceManage.deviceEdit')
+      this.deviceDialogVisible = true
+    },
+    /** 新增 提交表单 */
+    handlerFormSubmit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          const _this = this;
+          console.log('this.deviceModel', this.deviceModel)
+          /** 新增 */
+          if (!this.deviceModel.id) {
+            if (this.frame.type != null) {
+              this.deviceModel.part_id = this.frame.type === FRAME_TYPE.HOSPITAL ? this.frame.hospital_id : this.frame.part_id
+            } else {
+              this.deviceModel.part_id = this.$store.getters.partId
+            }
+            API_Device.add(this.deviceModel).then(r => {
+              this.$message.success(this.$t('action.saveSuccess'))
+              _this.device = r
+              this.deviceDialogVisible = false
+              this.getList()
+            })
+          } else {
+            /** 修改 */
+            API_Device.update(this.deviceModel.id, this.deviceModel).then(() => {
+              this.$message.success(this.$t('action.editSuccess'))
+              this.deviceDialogVisible = false
+              this.getList()
+            })
+          }
+        }
+      })
+    },
+    /** 分页大小发生改变 */
+    handlePageSizeChange(size) {
+      this.params.page_size = size
+      this.getList()
+    },
+
+    /** 分页页数发生改变 */
+    handlePageCurrentChange(page) {
+      this.params.page_no = page
+      this.getList()
+    },
+    getShop(shopId) {
+      shop_API.getShop(shopId).then(res => {
+        this.shop = res;
+        this.getPartFrame(shopId)
+      })
+    },
+    initWebSocket: function () {
+      var stockbase = DeviceUrl.replace('http', 'ws')
+      this.websock = new WebSocket(stockbase + '/deviceonline/' + this.$store.getters.uuid)
+      this.websock.onopen = this.websocketonopen
+      this.websock.onerror = this.websocketonerror
+      this.websock.onmessage = this.websocketonmessage
+      this.websock.onclose = this.websocketclose
+    },
+    websocketonopen: function () {
+      console.log(this.$t('deviceManage.webSocketSuccess'))
+    },
+    websocketonerror: function (e) {
+      console.log(this.$t('deviceManage.webSocketError'))
+    },
+    websocketonmessage: function (e) {
+      this.onlineDevice = JSON.parse(e.data)
+      if (this.rowData !== null) {
+        for (let i = 0; i < this.rowData.length; i++) {
+          if (this.rowData[i].eth_mac) {
+            const mac = this.onlineDevice.filter(p => p.toLowerCase() === this.rowData[i].eth_mac.toLowerCase())[0]
+            this.rowData[i]['online_state'] = (mac !== undefined && mac !== null) ? this.$t('deviceManage.connectTrue') : this.$t('deviceManage.connectFalse')
+          }
+        }
+        //只刷新在线状态列数据
+        var params = {
+          columns: ['online_state']
+        }
+        this.gridApi.refreshCells(params);
+
+      }
+    },
+    websocketclose: function (e) {
+      console.log('connection closed (' + e.code + ')')
+    },
+    batchDelete() {
+      const rows = this.gridApi.getSelectedRows()
+      if (rows.length === 0) {
+        this.$message({type: 'info', message: this.$t('action.pleaseChoiceDelete')})
+        return
+      }
+      const ids = []
+      rows.forEach(function (item) {
+        ids.push(item.id)
+      })
+      this.handlerDelete(ids.join(','))
+    },
+    deviceServerChange() {
+      this.serverAddressDialogVisible = true
+    },
+    updateDevicesServerIp() {
+      API_Device.updateDevicesServerIp(this.serverAddress).then(r => {
+        this.$message.success(this.$t('action.settingsSuccess'))
+        this.serverAddressDialogVisible = false
+      })
+    },
+
+    openDebug(param){
+      API_Device.openDebug(param.id).then(res=>{
+        this.$message.success(this.$t('action.handleSuccess'))
+      }).catch(err=>{
+        this.$message.error(this.$t('action.handleFailed'))
+      })
+    },
+    rebootDevice(params){
+      API_Device.rebootDevice(params.id).then(res=>{
+        this.$message.success(this.$t('action.handleSuccess'))
+      }).catch(err=>{
+        this.$message.error(this.$t('action.handleFailed'))
+      })
+    },
+    getDeviceType() {
+      return DEVICE_TYPE;
+    },
+    partChange(){
+      if (this.choicePartId !== null && this.choicePartId !== 0) {
+        this.params.fixedCondition = 'device_type = ' + DEVICE_TYPE.LED_SCREEN + ' and part_id=' + this.choicePartId
+      }
+      else {
+        this.params.fixedCondition = '1=1 and device_type = ' + DEVICE_TYPE.LED_SCREEN
+      }
+      this.getList();
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 22 - 0
src/views/ncs-led/led-admin.vue

@@ -0,0 +1,22 @@
+<template>
+  <div>
+    <led-device-manager :frame="frame" :part_view="false" />
+  </div>
+</template>
+
+<script>
+import LedDeviceManager from './components/ledDeviceManager'
+export default {
+  name: "ledDeviceManagement",
+  components: { LedDeviceManager },
+  data() {
+    return {
+      frame: {}
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 0 - 0
src/views/ncs-led/ledManager.vue


+ 23 - 0
src/views/ncs-led/ledDeviceManagement.vue

@@ -0,0 +1,23 @@
+
+<template>
+  <div>
+    <led-device-manager :frame="frame" />
+  </div>
+</template>
+
+<script>
+import LedDeviceManager from './components/ledDeviceManager'
+export default {
+  name: 'ledDeviceManagement',
+  components: { LedDeviceManager },
+  data() {
+    return {
+      frame: {}
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>