瀏覽代碼

Merge branch 'develop' into feature/1.4.2-deviceMenu-20230530

vothin 2 年之前
父節點
當前提交
4a707d3636

+ 28 - 2
languages/en.js

@@ -223,7 +223,8 @@ module.exports = {
     inputName: 'Please enter a name',
     reboot: 'Reboot',
     count: 'Number of statistics',
-    system: 'System'
+    system: 'System',
+    simulateSend: 'Simulate Send'
   },
   member: {
     face: 'Avatar',
@@ -890,6 +891,10 @@ module.exports = {
     transferDuration: 'Nurse transfer duration',
     transferDurationLeader: 'The transfer duration of the nurse team leader',
     nurseKeyVal: 'Nurse host transfer time',
+    linuxBedVolumeNative: 'Linux extension volume',
+    linuxBedGainSize: 'Linux extension volume gain',
+    linuxDoorVolumeNative: 'Linux doorway volume',
+    linuxDoorGainSize: 'Linux doorway machine volume gain',
     autoAccept: 'Extension automatic answering',
     openAutoAccept: 'Enable automatic answer',
     eventForward: 'Event forwarding function',
@@ -1056,7 +1061,9 @@ module.exports = {
     offlineDevice: 'off-line equipment',
     lowBatteryDevice: 'Low battery devices',
     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'
   },
   deviceType: {
     NURSE_HOST: 'Nurse Host',
@@ -1331,5 +1338,24 @@ module.exports = {
     noOnline: 'The conversion box is not online',
     add433Box: 'Please add a 433 conversion box first',
     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'
   }
 }

+ 28 - 2
languages/es.js

@@ -223,7 +223,8 @@ module.exports = {
     inputName: 'Por favor, introduzca el nombre',
     reboot: 'reiniciar',
     count: 'Estadísticas',
-    system: 'Sistema'
+    system: 'Sistema',
+    simulateSend: 'Envío simulado'
   },
   member: {
     face: 'Avatar',
@@ -890,6 +891,10 @@ module.exports = {
     transferDuration: 'Duración de transferencia de enfermera',
     transferDurationLeader: 'La duración de la transferencia del líder del equipo de enfermería',
     nurseKeyVal: 'Tiempo de transferencia del anfitrión de la enfermera',
+    linuxBedVolumeNative: 'Volumen de la extensión de Linux',
+    linuxBedGainSize: 'Ganancia de volumen de la extensión de Linux',
+    linuxDoorVolumeNative: 'Volumen de la puerta de Linux',
+    linuxDoorGainSize: 'Ganancia de volumen de la puerta de Linux',
     autoAccept: 'Extensión de respuesta automática',
     openAutoAccept: 'Habilitar respuesta automática',
     eventForward: 'Función de reenvío de eventos',
@@ -1056,7 +1061,9 @@ module.exports = {
     offlineDevice: 'Dispositivos fuera de línea',
     lowBatteryDevice: 'Equipos de baja potencia',
     checkNetwork: 'Comprobar la red del dispositivo',
-    changeBattery: 'Reemplazar la batería del dispositivo'
+    changeBattery: 'Reemplazar la batería del dispositivo',
+    interactionPush:'configuración de empuje de registro interactivo',
+    interactionPushParamConfig:'configuración de parámetros push'
   },
   deviceType: {
     NURSE_HOST: 'Enfermera anfitriona',
@@ -1331,5 +1338,24 @@ module.exports = {
     noOnline: 'La Caja de conversión no está en línea',
     add433Box: 'Por favor, agregue primero un cuadro de conversión 433',
     volumeControl: 'Control de volumen'
+  },
+  interactionPushConfig:{
+    apiUrl:'push Interface url',
+    enabled:'habilitado',
+    remark:'nota',
+    forParts:'para piezas',
+    add:'añadir nueva configuración',
+    createTitle:'añadir una nueva configuración de empuje',
+    configParam:'configuración de parámetros',
+    apiUrlRequired:'necesita empujar la dirección de la interfaz',
+    pushParam:'push param',
+    method:'empuje',
+    paramFormat:'formato de parámetros',
+    pushParamExample:'ejemplo de parámetros',
+    paramName:'nombre del parámetro',
+    paramType:'tipo de parámetro',
+    paramExplain:'descripción de parámetros',
+    paramAlias:'alias de parámetros (parámetros renombrados)',
+    exampleValue:'valor de muestra del parámetro'
   }
 }

+ 45 - 19
languages/ru-RU.js

@@ -223,7 +223,8 @@ module.exports = {
     inputName: 'Введите имя',
     reboot: 'Перезагрузка',
     count: 'Статистика',
-    system: 'Системы'
+    system: 'Системы',
+    simulateSend: 'аналоговая передача'
   },
   member: {
     face: 'Аватар',
@@ -890,6 +891,10 @@ module.exports = {
     transferDuration: 'Продолжительность перевода медсестры',
     transferDurationLeader: 'Продолжительность перевода руководителя бригады медсестер',
     nurseKeyVal: 'Время передачи хоста медсестры',
+    linuxBedVolumeNative: 'Дополнительная громкость Linux',
+    linuxBedGainSize: 'Увеличение громкости в Linux',
+    linuxDoorVolumeNative: 'Громкость дверей Linux',
+    linuxDoorGainSize: 'Улучшение громкости в Linux',
     autoAccept: 'Автоматический ответ на добавочный номер',
     openAutoAccept: 'Включить автоматический ответ',
     eventForward: 'Функция переадресации событий',
@@ -982,22 +987,22 @@ module.exports = {
     roleEnumPlaceholder: 'Выберите тип роли'
   },
   his: {
-    hisPart: '科室查询',
-    hisPartKeyval: '科室his主键',
-    hisPartName: '科室名称',
-    summary: '科室简介',
-    tel: '科室电话',
-    hisError: 'his错误',
-    hisPatient: '入住人',
-    hisPatientKeyval: '入住人his主键',
-    hisPatientInfo: '查询信息',
-    hisClerk: '工作人员',
-    hisClerkKeyval: '工作人员his主键',
-    hisDockerKeyval: '责任医生his主键',
-    hisNurseKeyval: '责任护士his主键',
-    passNo: '门禁卡',
-    hisNurseConfig: '护理项',
-    hisNurseOptionsKeyval: '护理项分类his主键'
+    hisPart: 'Отдел запроса',
+    hisPartKeyval: 'Отдел его главный ключ',
+    hisPartName: 'Название отдела',
+    summary: 'Профиль отдела',
+    tel: 'Отдел телефон',
+    hisError: 'Его ошибка',
+    hisPatient: 'Посетители',
+    hisPatientKeyval: 'Посетитель его главный ключ',
+    hisPatientInfo: 'Информация о запросе',
+    hisClerk: 'Персонал',
+    hisClerkKeyval: 'Персонал его главный ключ',
+    hisDockerKeyval: 'Ответственный доктор, его главный ключ',
+    hisNurseKeyval: 'Ответственная медсестра, его главный ключ',
+    passNo: 'Карточка контроля доступа',
+    hisNurseConfig: 'Элементы ухода',
+    hisNurseOptionsKeyval: 'Элементы ухода классифицируют его главный ключ'
   },
   tab: {
     home: 'Дом',
@@ -1027,7 +1032,7 @@ module.exports = {
     eventManage: 'Управление событиями кнопки',
     hisManage: 'Его запрос',
     interactionChars: 'Статистика взаимодействия',
-    partSetting: '机构设置',
+    partSetting: 'Институциональные параметры',
     interactionChain: 'Интерактивный порядок приема',
     functionRoleMapping: 'Права компонентов',
     countdownConfig: 'Настройка компонентов обратного отсчета',
@@ -1055,7 +1060,9 @@ module.exports = {
     offlineDevice: 'Автономное оборудование',
     lowBatteryDevice: 'Низкоэлектрическое оборудование',
     checkNetwork: 'Проверить сеть устройства',
-    changeBattery: 'Замена батарей в оборудовании'
+    changeBattery: 'Замена батарей в оборудовании',
+    interactionPush:'Интерактивная запись push - конфигурация',
+    interactionPushParamConfig:'Настройка параметров push'
   },
   deviceType: {
     NURSE_HOST: 'Устройство медсестры',
@@ -1329,5 +1336,24 @@ module.exports = {
     noOnline: 'Коммутатор не в сети',
     add433Box: 'Пожалуйста, добавьте конвертер 433.',
     volumeControl: 'Регулирование громкости'
+  },
+  interactionPushConfig:{
+    apiUrl:'Адрес интерфейса push',
+    enabled:'Открытое состояние',
+    remark:'Примечания',
+    forParts:'Отдел применения',
+    add:'Дополнительная конфигурация',
+    createTitle:'Дополнительная конфигурация push',
+    configParam:'Параметры конфигурации',
+    apiUrlRequired:'Push URL - адрес должен быть заполнен',
+    pushParam:'push Параметры',
+    method:'Метод толкания',
+    paramFormat:'Формат параметров',
+    pushParamExample:'Пример параметров',
+    paramName:'Имя параметра',
+    paramType:'Тип параметров',
+    paramExplain:'Описание параметров',
+    paramAlias:'Параметры псевдонимы (переименование параметров)',
+    exampleValue:'Примерное значение параметров'
   }
 }

+ 30 - 3
languages/zh-CN.js

@@ -224,7 +224,8 @@ module.exports = {
     inputName: '请输入名称',
     reboot: '重启',
     count: '统计次数',
-    system: '系统'
+    system: '系统',
+    simulateSend: '模拟发送'
   },
   member: {
     face: '头像',
@@ -892,6 +893,10 @@ module.exports = {
     transferDuration: '护士转接时长',
     transferDurationLeader: '护士组长转接时长',
     nurseKeyVal: '护士主机转接时长',
+    linuxBedVolumeNative: 'Linux分机音量',
+    linuxBedGainSize: 'Linux分机音量增益',
+    linuxDoorVolumeNative: 'Linux门口机音量',
+    linuxDoorGainSize: 'Linux门口机音量增益',
     autoAccept: '分机开启自动接听',
     openAutoAccept: '开启自动接听',
     eventForward: '事件转发功能',
@@ -1058,7 +1063,9 @@ module.exports = {
     offlineDevice: '离线设备',
     lowBatteryDevice: '低电量设备',
     checkNetwork: '检查设备网络',
-    changeBattery: '更换设备电池'
+    changeBattery: '更换设备电池',
+    interactionPush:'交互记录推送配置',
+    interactionPushParamConfig:'推送参数配置'
   },
   deviceType: {
     NURSE_HOST: '护士主机',
@@ -1333,5 +1340,25 @@ module.exports = {
     noOnline: '该转换盒不在线',
     add433Box: '请先添加433转换盒',
     volumeControl: '音量调节'
-  }
+  },
+    interactionPushConfig:{
+  apiUrl:'推送接口地址',
+      enabled:'开启状态',
+      remark:'备注',
+      forParts:'适用科室',
+      add:'新增配置',
+      createTitle:'新增推送配置',
+      configParam:'配置参数',
+      apiUrlRequired:'推送URL地址必须填写',
+      pushParam:'推送参数',
+      method:'推送方法',
+      paramFormat:'参数格式',
+      pushParamExample:'参数示例',
+      paramName:'参数名称',
+      paramType:'参数类型',
+      paramExplain:'参数说明',
+      paramAlias:'参数别名(重命名参数名称)',
+      exampleValue:'参数示例值',
+      isEnable:'是否开启'
+}
 }

+ 2 - 1
package.json

@@ -31,7 +31,7 @@
     "eslint-plugin-html": "^6.2.0",
     "file-saver": "2.0.1",
     "fuse.js": "3.4.4",
-    "janus-gateway": "https://github.com/meetecho/janus-gateway.git",
+    "janus-gateway": "1.1.4",
     "jquery": "^3.6.0",
     "js-cookie": "2.2.0",
     "js-md5": "^0.7.3",
@@ -65,6 +65,7 @@
     "vue-seamless-scroll": "^1.1.23",
     "vue-splitpane": "1.0.4",
     "vuedraggable": "^2.20.0",
+    "vue-json-viewer": "^2.2.22",
     "vuex": "3.1.0",
     "xlsx": "0.14.1"
   },

+ 76 - 0
src/api/ncs_interaction_push_config.js

@@ -0,0 +1,76 @@
+import request from '@/utils/request'
+/**
+ * 呼叫记录推送配置相关接口
+ * @param params
+ * @returns {*|Promise|Promise<unknown>}
+ */
+export function getList(params) {
+    return request({
+        url: '/ncs/interactionpushconfig/page',
+        method: 'POST',
+        loading: true,
+        data: params,
+        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+    })
+}
+
+/** 新增呼叫记录推送配置 */
+export function add(params) {
+    return request({
+        url: '/ncs/interactionpushconfig/add',
+        method: 'POST',
+        loading: true,
+        data: params
+    })
+}
+
+/** 删除呼叫记录推送配置 */
+export function remove(params) {
+    const ids = params.toString()
+    return request({
+        url: `/ncs/interactionpushconfig/${ids}`,
+        method: 'DELETE',
+        loading: true,
+        data: params
+    })
+}
+
+/** 更新呼叫记录推送配置 */
+export function update(id, params) {
+    return request({
+        url: `/ncs/interactionpushconfig/${id}`,
+        method: 'put',
+        data: params
+    })
+}
+
+/** 查询呼叫记录推送配置 */
+export function get(id, params) {
+    return request({
+        url: `/ncs/interactionpushconfig/${id}`,
+        method: 'get',
+        loading: false,
+        params
+    })
+}
+
+/** 查询呼叫记录推送配置 */
+export function getParamJson() {
+    return request({
+        url: `/ncs/interactionpushconfig/paramjson`,
+        method: 'get',
+        loading: false
+    })
+}
+
+/** 查询呼叫记录推送配置 */
+export function apiDebug(baseUrl, param) {
+    return request({
+        baseURL: baseUrl,
+        url:'',
+        method: 'POST',
+        headers: { 'Content-Type': 'application/json' },
+        data: param
+    })
+}
+

+ 2 - 1
src/main.js

@@ -69,7 +69,8 @@ Vue.use(Element, {
   // locale: enLang // 如果使用中文,无需设置,请删除
 })
 Vue.use(Element, { zhLang })
-
+import JsonViewer from 'vue-json-viewer'
+Vue.use(JsonViewer)
 // register global utility filters
 Object.keys(filters).forEach(key => {
   Vue.filter(key, filters[key])

+ 19 - 0
src/router/index.js

@@ -921,6 +921,25 @@ export const adminRoutes = [
       }
     ]
   },
+  {
+    path: '/ncs-interaction-push',
+    component: Layout,
+    children: [
+      {
+        path: 'index',
+        component: () => import('@/views/ncs-interaction-push-config/index'),
+        name: 'ncs-interaction-push',
+        meta: { title: i18n.t('tab.interactionPush'), icon: 'el-icon-s-promotion', noCache: true }
+      },
+      {
+        path: '/paramer-config/:id?',
+        component: () => import('@/views/ncs-interaction-push-config/param-config'),
+        name: 'interaction-push-config',
+        meta: { title: i18n.t('tab.interactionPushParamConfig'), icon: 'el-icon-s-promotion', noCache: true },
+        hidden: true
+      }
+    ]
+  },
   // {
   //   path: '/ncs-linux-version',
   //   component: Layout,

+ 464 - 0
src/views/ncs-interaction-push-config/index.vue

@@ -0,0 +1,464 @@
+<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"
+                :default-col-def="defaultColDef"
+                :animate-rows="true"
+                :row-selection="rowSelection"
+                :enable-cell-change-flash="true"
+                @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 class="toolbar-btns">
+                    <el-button type="primary" size="mini" @click="createConfig">{{ this.$t('interactionPushConfig.add') }}</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.sync="formtitle" :visible.sync="formshow" width="50%">
+            <div>
+                <el-form ref="editform" :rules="rules" label-width="120px" :model="formmodel">
+
+                    <el-row>
+                        <el-col :span="24">
+                            <el-form-item :label="this.$t('interactionPushConfig.apiUrl')" prop="api_url">
+                                <el-input
+                                        v-model="formmodel.api_url"
+                                        clearable
+                                        :maxlength="100"
+                                        :placeholder="this.$t('interactionPushConfig.apiUrl')"
+                                />
+                            </el-form-item>
+                        </el-col>
+                       <el-col :span="24">
+
+                           <el-form-item :label="this.$t('interactionPushConfig.forParts')" prop="part_ids">
+
+                                   <el-checkbox  v-for="(item,index) in parts" :key="'part'+index" v-model="item.checked" :label="item.shop_name" @change="handleCheckboxChanged" ></el-checkbox>
+
+
+
+                           </el-form-item>
+                       </el-col>
+
+                        <el-col :span="24">
+                            <el-form-item :label="this.$t('interactionPushConfig.remark')" prop="remark">
+                                <el-input
+                                        type="textarea"
+                                        :autosize="{ minRows: 2, maxRows: 4}"
+                                        :placeholder="this.$t('interactionPushConfig.remark')"
+                                        v-model="formmodel.remark">
+                                </el-input>
+
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12">
+                            <el-form-item  prop="enabled">
+                                <el-checkbox v-model="formmodel.enabled" >
+                                    {{ this.$t('interactionPushConfig.isEnable') }}
+                                </el-checkbox>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+
+            </div>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="formshow = false">{{ this.$t('action.cancel') }}</el-button>
+                <el-button type="primary" @click="handlerFormSubmit('editform')">{{ this.$t('action.yes') }}</el-button>
+            </div>
+        </el-dialog>
+
+    </div>
+
+</template>
+
+<script>
+    import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
+    import ButtonCellRender from '../../components/AgGridCellRender/ButtonCellRender'
+    import * as API_InteractionPushConfig from '@/api/ncs_interaction_push_config'
+    import { unix2Date } from '@/utils/Foundation'
+    import ListFilter from '@/components/AgGridCustomFilter/ListFilter'
+    import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
+    import ButtonCellRenderList from "@/components/AgGridCellRender/ButtonCellRenderList";
+    import * as API_PartInfo from '@/api/ncs_partInfo'
+    export default {
+        name: "index",
+        components: { ButtonCellRenderList, ButtonCellRender, ListFilter, RadioFilter },
+        data() {
+            return {
+                tableData: [],
+                /** 列表参数 */
+                params: {
+                    page_size: 20,
+                    page_no: 1
+                },
+                /** 新建组织弹出参数 **/
+                formtitle: this.$t('interactionPushConfig.createTitle'),
+                formshow: false,
+                /** 频道订阅设置 */
+                formSubscribe: false,
+                formmodel: {},
+                frameGroups: [],
+                checkList: [],
+                parts:[],
+                rules: {
+                    api_url: [
+                        { required: true, message: this.$t('interactionPushConfig.apiUrlRequired'), trigger: 'blur' }
+                    ]
+                },
+                /** ag-grid参数 **/
+                pageData: [],
+                loading: false,
+                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,
+                choiceAll: this.$t('action.choiceAll'),
+                deviceStatusTransfer: [
+                    {key: this.$t('deviceManage.statusTure'), value: true, color: 'green'},
+                    {key: this.$t('deviceManage.statusFalse'), value: false, color: 'red'}
+                ],
+            }
+        },
+        computed: {
+            tableHeight() {
+                return this.mainAreaHeight - 130
+            }
+
+        },
+        beforeMount() {
+            this.gridOptions = {}
+            this.columnDefs = [
+                {
+                    headerName: '#',
+                    headerCheckboxSelection: true,
+                    headerCheckboxSelectionFilteredOnly: true,
+                    checkboxSelection: true,
+                    sortable: false, filter: false,
+                    width: 100,
+                    resizable: false,
+                    valueGetter: this.hashValueGetter
+                },
+                { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 130 },
+                {
+                    headerName: this.$t('interactionPushConfig.apiUrl'), field: 'api_url', sortable: true, filter: 'agTextColumnFilter', flex: 1
+                },
+                {
+                    headerName: this.$t('interactionPushConfig.enabled'), field: 'enabled', sortable: true,  filterFramework: 'RadioFilter',
+                    filterParams: {
+                        listData: this.deviceStatusTransfer
+                    }, flex: 1,
+                    cellRenderer: this.deviceStatusFormatter
+                },
+                {
+                    headerName: this.$t('interactionPushConfig.forParts'), field: 'part_names', sortable: true,  filter: 'agTextColumnFilter', flex: 1
+                },
+
+                {
+                    headerName: this.$t('interactionPushConfig.remark'), field: 'remark', sortable: true, filter: 'agTextColumnFilter', flex: 1
+                },
+
+                // lockPosition 锁定位置,会在第一列
+                // lockPinned = true 不能拖动然后固定
+                // resizeable 单元个大小是否可以调整
+                { headerName: this.$t('action.handle'), field: 'id',
+                    cellRendererFramework: 'ButtonCellRenderList',
+                    cellRendererParams: param => {
+                        return {
+                            list: [
+                                {
+                                    onClick: this.handEdit,
+                                    label: this.$t('action.edit'),
+                                    buttonType: 'primary',
+                                    buttonSize: 'mini'
+                                },
+                                {
+                                    onClick: this.goConfig,
+                                    label: this.$t('interactionPushConfig.configParam'),
+                                    buttonType: 'warning',
+                                    buttonSize: 'mini',
+                                },
+                                {
+                                    onClick: this.deleteSingle,
+                                    label: this.$t('action.delete'),
+                                    buttonType: 'danger',
+                                    buttonSize: 'mini',
+                                }
+
+                            ]}
+                    },
+                    filter: false,
+                    pinned: 'right',
+                    lockPinned: true,
+                    minWidth: this.$i18n.locale === 'zh' ? 310 : 350,
+                    resizable: false,
+                    sortable: false
+                }
+
+            ]
+            this.defaultColDef = {
+                sortable: true,
+                resizable: true,
+                comparator: this.dateCustomComparator,
+                filterParams: {
+                    debounceMs: 200,
+                    newRowsAction: 'keep',
+                    textCustomComparator: this.textCustomComparator,
+                    comparator: this.dateCustomComparator
+                }
+            }
+            this.rowSelection = 'multiple'
+        },
+        async mounted() {
+            window.onresize = this.windowResize
+            this.gridApi = this.gridOptions.api
+            this.gridColumnApi = this.gridOptions.columnApi
+            // 设置默认排序字段,应用列状态之后会触发 gridSortChange 函数,会调用getlist,后面不需要再调用this.getlist
+            this.gridColumnApi.applyColumnState({
+                state: [
+                    {
+                        colId: 'id',
+                        sort: 'asc'
+                    }
+                ]
+            })
+            this.parts= await API_PartInfo.listByType(5)
+        },
+        methods: {
+            windowResize() {
+                this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
+            },
+            handlerDelete(ids) {
+                this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
+                    confirmButtonText: this.$t('action.yes'),
+                    cancelButtonText: this.$t('action.cancel'),
+                    type: 'warning'
+                }).then(() => {
+                    API_InteractionPushConfig.remove(ids).then(
+                        response => {
+                            this.getList()
+                            this.$message({
+                                type: 'success',
+                                message: this.$t('action.deleted')
+                            })
+                        }
+                    ).catch(response => {
+                        this.$message({
+                            type: 'info',
+                            message: response.message
+                        })
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: this.$t('action.cancelDelete')
+                    })
+                })
+            },
+            deleteSingle(row) {
+                this.handlerDelete(row.id)
+            },
+            handleCheckboxChanged(){
+                console.log('parts',this.parts)
+            },
+            /**
+             * 创建推送配置
+             */
+            createConfig() {
+                this.formshow = true
+                this.formmodel = {
+
+                }
+                this.parts.forEach(item=>{
+                    this.$set(item,'checked',false)
+                })
+            },
+            /** 分页大小发生改变 */
+            handlePageSizeChange(size) {
+                this.params.page_size = size
+                this.getList()
+            },
+
+            /** 分页页数发生改变 */
+            handlePageCurrentChange(page) {
+                this.params.page_no = page
+                this.getList()
+            },
+            /** 加载列表数据 */
+            getList() {
+                this.loading = true
+                const param = this.MixinClone(this.params)
+                this.gridApi.showLoadingOverlay()
+                API_InteractionPushConfig.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
+                    }
+                    this.$nextTick(() => {
+                        const node = this.gridApi.getDisplayedRowAtIndex(0)
+                        if (node !== null && node !== undefined) {
+                            node.setSelected(true)
+                        }
+                    })
+                    this.rowData = [...response.data]
+                    this.refreshPlayStatus()
+                }).catch(() => {
+                    this.loading = false
+                })
+            },
+            /** 处理搜索 */
+            handlerSearch(keywords) {
+                this.params.query = keywords
+                this.getList()
+            },
+            /** 处理字段排序 */
+            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()
+            },
+            /**
+             * 格式化unix时间戳
+             **/
+            unixDateFormatter(param) {
+                if (!param.value) return ''
+                return unix2Date(param.value * 1000)
+            },
+
+            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()
+            },
+
+            filterModifed(param) { // todo 通过转换后的数值过滤,需要转回原始数值
+                var model = param.api.getFilterModel()
+                this.params.filter = JSON.stringify(model)
+                this.getList()
+            },
+
+            handEdit(row) {
+                this.formtitle=this.$t('boardTitle.editTitle')
+                this.formmodel = {
+                    ...row
+                }
+                this.parts.forEach(item=>{
+                        this.$set(item,'checked',this.formmodel.part_ids.split(',').map(n=>Number(n)).includes(item.shop_id))
+                })
+                this.formshow = true
+            },
+            /**
+             * 提交新增表单
+             * @param formname
+             */
+            handlerFormSubmit(formName) {
+                this.$refs[formName].validate((valid) => {
+                    if (valid) {
+                        this.formmodel.part_ids = [...this.parts.filter(p=>p.checked).map(p=>p.shop_id)]
+                        this.formmodel.part_names = [...this.parts.filter(p=>p.checked).map(p=>p.shop_name)]
+                        if (!this.formmodel.id) {
+                            API_InteractionPushConfig.add(this.formmodel).then(() => {
+                                this.formshow = false
+                                this.$message.success(this.$t('action.addSuccess'))
+                                this.getList()
+                            })
+                        } else {
+                            API_InteractionPushConfig.update(this.formmodel.id, this.formmodel).then(() => {
+                                this.formshow = false
+                                this.$message.success(this.$t('action.editSuccess'))
+                                this.getList()
+                            })
+                        }
+                    } else {
+                        this.$message.error(this.$t('action.fromError'))
+                    }
+                })
+            },
+
+            goConfig(row) {
+                this.$router.push({ name: 'interaction-push-config', params: { id:row.id }})
+            },
+            /** 设备状态格式化 **/
+            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 ''
+                }
+            },
+
+
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 297 - 0
src/views/ncs-interaction-push-config/param-config.vue

@@ -0,0 +1,297 @@
+<template>
+    <el-main>
+        <el-form ref="editform" :rules="rules" label-width="120px" :model="formmodel">
+
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="this.$t('interactionPushConfig.apiUrl')" prop="api_url">
+                        <el-input
+                                v-model="formmodel.api_url"
+                                clearable
+                                :maxlength="100"
+                                :placeholder="this.$t('interactionPushConfig.apiUrl')"
+                        />
+                    </el-form-item>
+                </el-col>
+                <el-col :span="24">
+
+                    <el-form-item :label="this.$t('interactionPushConfig.forParts')" prop="part_ids">
+
+                        <el-checkbox  v-for="(item,index) in parts" :key="'part'+index" v-model="item.checked" :label="item.shop_name" @change="handleCheckboxChanged" ></el-checkbox>
+
+
+
+                    </el-form-item>
+                </el-col>
+
+                <el-col :span="24">
+                    <el-form-item :label="this.$t('interactionPushConfig.remark')" prop="remark">
+                        <el-input
+                                type="textarea"
+                                :autosize="{ minRows: 2, maxRows: 4}"
+                                :placeholder="this.$t('interactionPushConfig.remark')"
+                                v-model="formmodel.remark">
+                        </el-input>
+
+                    </el-form-item>
+                </el-col>
+                <el-col :span="24">
+                    <el-form-item  prop="enabled">
+                        <el-checkbox v-model="formmodel.enabled" >
+                            {{ this.$t('interactionPushConfig.isEnable') }}
+                        </el-checkbox>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                    <el-form-item :label="this.$t('interactionPushConfig.method')" prop="remark">
+                       POST
+                    </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                    <el-form-item :label="this.$t('interactionPushConfig.paramFormat')" prop="remark">
+                        JSON
+                    </el-form-item>
+                </el-col>
+            </el-row>
+
+
+            <fieldset>
+                <legend>{{ this.$t('interactionPushConfig.pushParam') }}</legend>
+                <el-table
+                        stripe
+                        ref="multipleTable"
+                        :data="tableData"
+                        tooltip-effect="dark"
+                        style="width: 100%"
+                        @select="select"
+                        @select-all="select"
+                        @selection-change="handleSelectionChange">
+                    <el-table-column
+                            type="selection"
+                            width="100">
+                    </el-table-column>
+                    <el-table-column
+                            :label="this.$t('interactionPushConfig.paramName')"
+                            width="160">
+                        <template slot-scope="scope">{{ scope.row.json_param_name }}</template>
+                    </el-table-column>
+                    <el-table-column
+                            :label="this.$t('interactionPushConfig.paramType')"
+                            width="160">
+                        <template slot-scope="scope">{{ scope.row.data_type }}</template>
+                    </el-table-column>
+
+                    <el-table-column
+                            prop="explain"
+                            :label="this.$t('interactionPushConfig.paramExplain')"
+                            >
+                    </el-table-column>
+
+
+                    <el-table-column
+                            prop="address"
+                            :label="this.$t('interactionPushConfig.paramAlias')"
+                            width="200"
+                            show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <el-input
+                                    v-model="scope.row.alias"
+                                    clearable
+                                    :maxlength="100"
+                            />
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                            prop="example"
+                            :label="this.$t('interactionPushConfig.exampleValue')"
+                            width="200"
+                            show-overflow-tooltip>
+                        <template slot-scope="scope">
+                            <el-input
+                                    v-model="scope.row.example"
+                                    clearable
+                            />
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </fieldset>
+            <fieldset class="margin-top-sm">
+                <legend>{{ this.$t('interactionPushConfig.pushParamExample') }}</legend>
+            <json-viewer :value="paramExample"></json-viewer>
+            </fieldset>
+            <el-form-item align="center" class="margin-top-sm">
+                <el-button type="success" @click="onSubmit('editform')">{{ this.$t('action.saveSettings') }}</el-button>
+                <el-button type="danger" @click="apiDebug">{{ this.$t('action.simulateSend') }}</el-button>
+
+            </el-form-item>
+        </el-form>
+
+    </el-main>
+</template>
+
+<script>
+
+    import * as API_Broadcast from '@/api/calling-broadcast'
+    import * as API_InteractionPushConfig from '@/api/ncs_interaction_push_config'
+    import * as API_PartInfo from '@/api/ncs_partInfo'
+    export default {
+        name: "param-config",
+        data() {
+            return {
+                formmodel: {
+                    repeat_times: 1,
+                    group_ids: [],
+                    repeat_day: []
+                },
+                configId: Number(this.$route.params.id),
+                tableData:[],
+                multipleSelection:[],
+                parts:[],
+                rules: {
+                    title: [
+                        { required: true, message: this.$t('broadcast.broadcastNameMsg'), trigger: 'blur' }
+                    ],
+                    broadcast_mode: [
+                        { required: true, message: this.$t('broadcast.broadcastModeMsg'), trigger: 'blur' }
+                    ],
+                    play_mode: [
+                        { required: true, message: this.$t('broadcast.playModeMsg'), trigger: 'blur' }
+                    ],
+                    repeat_times: [
+                        { required: true, message: this.$t('broadcast.repeatTimesMsg'), trigger: 'blur' }
+                    ],
+                    play_start: [
+                        { required: true, message: this.$t('broadcast.playStartMsg'), trigger: 'blur' }
+                    ],
+                    play_end: [
+                        { required: true, message: this.$t('broadcast.playEndMsg'), trigger: 'blur' }
+                    ]
+                }
+            }
+        },
+       async mounted() {
+            this.parts= await API_PartInfo.listByType(5)
+           this.getConfigById()
+        },
+        computed:{
+            paramExample(){
+                let example ={}
+                this.tableData.forEach(item=>{
+                    if(item.checked){
+                        let itemValue = ''
+                        if(item.data_type==='String'){
+                            itemValue=item.example
+                        }else{
+                            itemValue=item.example?Number(item.example):null
+                        }
+                        Object.defineProperty(example, (item.alias!==''?item.alias:item.json_param_name), { configurable: false,    writable: true,    enumerable: true,    value:itemValue })
+                    }
+                })
+               return example;
+            }
+        },
+        methods: {
+            getConfigById(){
+                API_InteractionPushConfig.get(this.configId,{}).then(res=>{
+                 this.formmodel={...res}
+                    this.parts.forEach(item=>{
+                        this.$set(item,'checked',this.formmodel.part_ids.split(',').map(n=>Number(n)).includes(item.shop_id))
+                    })
+                if(this.formmodel.push_param_config&&this.formmodel.push_param_config!==''){
+                    this.tableData=[...JSON.parse(this.formmodel.push_param_config)]
+                    this.$nextTick(()=>{
+                        this.tableData.forEach(item=>{
+
+                            if(item.checked){
+                                console.log('item',item)
+                                this.$refs.multipleTable.toggleRowSelection(item);
+                            }
+                        })
+                    })
+                }else{
+                    this.getParamJson()
+                }
+                }).catch(error=>{
+
+                })
+            },
+
+            handleCheckboxChanged(){
+                console.log('parts',this.parts)
+            },
+            getParamJson(){
+                API_InteractionPushConfig.getParamJson().then(res=>{
+                    this.tableData=[...res]
+
+                         this.$nextTick(()=>{
+                             this.tableData.forEach(item=>{
+
+                                 if(item.checked){
+                                     console.log('item',item)
+                                     this.$refs.multipleTable.toggleRowSelection(item);
+                                 }
+                             })
+                         })
+
+
+                }).catch(error=>{
+
+                })
+            },
+            /**
+             * 提交编辑
+             * @param formName
+             */
+            onSubmit(formName) {
+                this.$refs[formName].validate((valid) => {
+                    if (valid) {
+                        this.formmodel.part_ids = [...this.parts.filter(p=>p.checked).map(p=>p.shop_id)]
+                        this.formmodel.part_names = [...this.parts.filter(p=>p.checked).map(p=>p.shop_name)]
+                        this.formmodel.push_param_config = JSON.stringify(this.tableData)
+                        API_InteractionPushConfig.update(this.formmodel.id, this.formmodel).then(() => {
+                            this.formshow = false
+                            this.$message.success(this.$t('action.saveSuccess'))
+                        })
+                    } else {
+                        this.$message.error(this.$t('action.fromError'))
+                    }
+                })
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val
+
+
+                console.log('val',val)
+            },
+
+            apiDebug(){
+                API_InteractionPushConfig.apiDebug(this.formmodel.api_url,this.paramExample).then(res=>{
+               console.log(res);
+                }).catch(err=>{
+                    console.log(err)
+                })
+            },
+            select(val){
+                this.tableData.forEach(item=>{
+                   const temp = val.filter(p=>p.json_param_name===item.json_param_name&&p.param_name===item.param_name)
+                    if(temp.length===0){
+                        this.$set(item,'checked',false)
+                    }else{
+                        this.$set(item,'checked',true)
+                    }
+                })
+            }
+        }
+
+    }
+</script>
+
+<style scoped>
+    fieldset{
+        border:1px solid #DCDFE6;
+        border-radius: 5px;
+    }
+    .margin-top-sm{
+        margin-top: 20px;
+    }
+</style>

+ 2 - 2
src/views/ncs-nurse-config/index.vue

@@ -118,7 +118,7 @@
     <el-dialog v-model="addFormVisible" :title="myTitle" :visible.sync="addFormVisible" :close-on-click-modal="false">
       <el-form ref="addForm" :model="addForm" label-width="140px" :rules="addFormRules">
         <el-form-item :label="this.$t('nurseConfig.configName')" prop="config_name">
-          <el-input v-model="addForm.config_name" maxlength="12" />
+          <el-input v-model="addForm.config_name" maxlength="100" />
         </el-form-item>
         <el-form-item :label="this.$t('action.sort')" prop="index_no">
           <el-input-number v-model="addForm.index_no" :min="1" :max="100" />
@@ -139,7 +139,7 @@
     <el-dialog v-model="addFormOptionVisible" :title="myTitle" :visible.sync="addFormOptionVisible" :close-on-click-modal="false">
       <el-form ref="addOptionForm" :model="addOptionForm" label-width="140px" :rules="addFormRules">
         <el-form-item :label="this.$t('nurseConfig.optionName')" prop="option_name">
-          <el-input v-model="addOptionForm.option_name" maxlength="12" />
+          <el-input v-model="addOptionForm.option_name" maxlength="100" />
         </el-form-item>
         <el-form-item :label="this.$t('nurseConfig.optionColor')">
           <colorPicker v-model="addOptionForm.color_rgb" />

+ 44 - 12
src/views/ncs-orginazition/components/partInfoEdit.vue

@@ -282,6 +282,43 @@
             </el-col>
 
             <el-col :span="8">
+              <el-form-item :label="this.$t('partInfo.linuxBedVolumeNative')" prop="linux_bed_volume_native">
+                <el-input-number v-model="formmodel.linux_bed_volume_native" :min="1" :max="15" :label="this.$t('partInfo.linuxBedVolumeNative')" />
+              </el-form-item>
+            </el-col>
+
+
+            <el-col :span="8">
+              <el-form-item :label="this.$t('partInfo.linuxBedGainSize')" prop="linux_bed_gain_size">
+                <el-input-number v-model="formmodel.linux_bed_gain_size" :min="1" :max="10" :label="this.$t('partInfo.linuxBedGainSize')" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <el-col :span="8">
+              <el-form-item :label="this.$t('partInfo.linuxDoorVolumeNative')" prop="linux_door_volume_native">
+                <el-input-number v-model="formmodel.linux_door_volume_native" :min="1" :max="15" :label="this.$t('partInfo.linuxDoorVolumeNative')" />
+              </el-form-item>
+            </el-col>
+
+
+            <el-col :span="8">
+              <el-form-item :label="this.$t('partInfo.linuxDoorGainSize')" prop="linux_door_gain_size">
+                <el-input-number v-model="formmodel.linux_door_gain_size" :min="1" :max="10" :label="this.$t('partInfo.linuxDoorGainSize')" />
+              </el-form-item>
+            </el-col>
+
+
+            <el-col :span="8">
+              <el-form-item :label="this.$t('partInfo.channelImHistoryStoreDays')" prop="channel_im_history_store_days">
+                <el-input-number v-model="formmodel.channel_im_history_store_days" :min="1" :max="1000" :label="this.$t('partInfo.channelImHistoryStoreDays')" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <el-col :span="8">
               <el-form-item :label="this.$t('partInfo.autoAccept')" prop="auto_accept">
                 <el-checkbox v-model="formmodel.auto_accept" :true-label="1" :false-label="0">{{ this.$t('partInfo.openAutoAccept') }}</el-checkbox>
               </el-form-item>
@@ -292,6 +329,12 @@
                 <el-checkbox v-model="formmodel.event_forward" :true-label="1" :false-label="0">{{ this.$t('partInfo.openEventForward') }}</el-checkbox>
               </el-form-item>
             </el-col>
+
+            <el-col :span="8">
+              <el-form-item :label="this.$t('partInfo.recordEnabled')" prop="record_enabled">
+                <el-checkbox v-model="formmodel.record_enabled" :true-label="1" :false-label="0">{{ this.$t('partInfo.recordAble') }}</el-checkbox>
+              </el-form-item>
+            </el-col>
           </el-row>
 
 
@@ -310,12 +353,6 @@
             </el-col>
 
             <el-col :span="8">
-              <el-form-item :label="this.$t('partInfo.channelImHistoryStoreDays')" prop="channel_im_history_store_days">
-                <el-input-number v-model="formmodel.channel_im_history_store_days" :min="1" :max="1000" :label="this.$t('partInfo.channelImHistoryStoreDays')" />
-              </el-form-item>
-            </el-col>
-
-            <el-col :span="8">
               <el-form-item :label="this.$t('partInfo.customerNameHidden')" prop="customer_name_hidden">
                 <el-checkbox v-model="formmodel.customer_name_hidden" :true-label="1" :false-label="0">{{ this.$t('partInfo.hidden') }}</el-checkbox>
               </el-form-item>
@@ -328,12 +365,6 @@
             </el-col>
 
             <el-col :span="8">
-              <el-form-item :label="this.$t('partInfo.recordEnabled')" prop="record_enabled">
-                <el-checkbox v-model="formmodel.record_enabled" :true-label="1" :false-label="0">{{ this.$t('partInfo.recordAble') }}</el-checkbox>
-              </el-form-item>
-            </el-col>
-
-            <el-col :span="8">
               <el-form-item :label="this.$t('partInfo.screenLight')" prop="screen_light">
                 <el-checkbox v-model="formmodel.screen_light" :true-label="1" :false-label="0">{{ this.$t('partInfo.screenLight') }}</el-checkbox>
               </el-form-item>
@@ -344,6 +375,7 @@
                 <el-checkbox v-model="formmodel.room_call_bed" :true-label="1" :false-label="0">{{ this.$t('partInfo.roomCallBed') }}</el-checkbox>
               </el-form-item>
             </el-col>
+
             <el-col :span="8">
               <el-form-item :label="this.$t('partInfo.boolAllDoorStatus')">
                 <el-checkbox v-model="formmodel.bool_all_door_status" :true-label="1" :false-label="0">{{ this.$t('action.enabled') }}</el-checkbox>