Procházet zdrojové kódy

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

* 'master' of http://git.wdklian.com/allen/ncs_ui:
  1、腕表功能开发;2、其他功能优化
  1、交互历史开发;2、其他优化
  1、优化;2、交互事件开发
  优化

# Conflicts:
#	src/layout/components/Navbar.vue
wuyunfeng před 4 roky
rodič
revize
0fc073beec

+ 3 - 3
src/api/ncs_calling_history.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 export function getList(params) {
   return request({
-    url: '/ncs/calling_history/page',
+    url: '/ncs/interaction/pagelist',
     method: 'POST',
     loading: true,
     data: params,
@@ -12,7 +12,7 @@ export function getList(params) {
 export function remove(params) {
   const ids = params.toString()
   return request({
-    url: `/ncs/calling_history/${ids}`,
+    url: `/ncs/interaction/${ids}`,
     method: 'DELETE',
     loading: true,
     data: params
@@ -21,7 +21,7 @@ export function remove(params) {
 
 export function clearRecord(id) {
   return request({
-    url: `/ncs/calling_history/deleteByPartId/${id}`,
+    url: `/ncs/interaction/deleteByPartId/${id}`,
     method: 'DELETE',
     loading: true
   })

+ 41 - 0
src/components/AgGridImg/AgGridImg.vue

@@ -0,0 +1,41 @@
+<template>
+  <div>
+    <slot v-if="!myFace" name="error">
+      <div slot="error" class="image-slot">
+        <i class="el-icon-picture-outline" />
+      </div>
+    </slot>
+    <img v-else :src="myFace" class="el-image__inner" style="width: 50px; height: 50px" @click="buttonClick">
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'AgGridImg',
+  data() {
+    return {
+      myFace: '',
+      srcList: ['1']
+    }
+  },
+  beforeMount() {
+  },
+  async mounted() {
+    const { face } = this.params
+    if (face) {
+      this.myFace = this.params.node.data[face]
+    }
+  },
+  methods: {
+    buttonClick() {
+      if (typeof this.params.onClick === 'function') {
+        this.params.onClick(this.params.node.data)
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 17 - 4
src/router/index.js

@@ -152,6 +152,19 @@ export const partRoutes = [
     ]
   },
   {
+    path: '/ncs-nurse-watch',
+    component: Layout,
+    redirect: '/ncs-device/nurse_watch',
+    children: [
+      {
+        path: 'index',
+        component: () => import('@/views/ncs-device/nurse_watch'),
+        name: 'nurse_watch',
+        meta: { title: '腕表管理', icon: 'component', noCache: true }
+      }
+    ]
+  },
+  {
     path: '/remark',
     component: Layout,
     redirect: '/remark/index',
@@ -178,15 +191,15 @@ export const partRoutes = [
     ]
   },
   {
-    path: '/ncs-calling-history',
+    path: '/ncs-interaction',
     component: Layout,
-    redirect: '/ncs-calling-history/index',
+    redirect: '/ncs-interaction/index',
     children: [
       {
         path: 'index',
-        component: () => import('@/views/ncs-calling-history/index'),
+        component: () => import('@/views/ncs-interaction/index'),
         name: 'CallingList',
-        meta: { title: '呼叫历史查询', icon: 'list', noCache: true }
+        meta: { title: '交互历史管理', icon: 'list', noCache: true }
       }
     ]
   },

+ 40 - 0
src/utils/device_type.js

@@ -0,0 +1,40 @@
+export function returnDeviceType(value) {
+  switch (value) {
+    case 1:
+      return '护士主机'
+    case 2:
+      return '医生主机'
+    case 3:
+      return '门口机'
+    case 4:
+      return '病床分机'
+    case 5:
+      return 'LCD走廊屏'
+    case 6:
+      return 'LED点阵屏'
+    case 7:
+      return '护士腕表'
+    case 8:
+      return '护工腕表'
+    case 9:
+      return '病人腕表'
+    case 10:
+      return '手机App'
+    case 11:
+      return '总线转换盒'
+    case 12:
+      return '模拟分机'
+    case 13:
+      return '模拟紧急按钮'
+    case 14:
+      return '模拟门灯'
+    case 15:
+      return '遥控器'
+    case 16:
+      return '信标'
+    case 17:
+      return '看板'
+    default:
+      return '未知设备'
+  }
+}

+ 1 - 1
src/utils/domain.js

@@ -1,6 +1,6 @@
 module.exports = {
   serverUrl: 'http://localhost:8005',
-  runtimeUrl: 'http://localhost:8003',
+  DeviceUrl: 'http://localhost:8006',
   apiMode: 'dev'
 }
 

+ 208 - 90
src/views/customer/list.vue

@@ -4,7 +4,7 @@
     <div class="toolbar" style="padding-left: 20px">
       <el-form :inline="true" label-width="120px">
         <el-form-item>
-          <el-input v-model="searchStr" placeholder="请输入病人姓名或编号" clearable>
+          <el-input v-model="searchStr" placeholder="请输入病人姓名、编号、病床" clearable @clear="clickSearch" @keyup.native.enter="clickSearch">
             <el-button slot="append" icon="el-icon-search" @click="clickSearch"></el-button>
           </el-input>
         </el-form-item>
@@ -19,49 +19,32 @@
         </el-form-item>
       </el-form>
     </div>
-    
-    <en-table-layout
-      :toolbar = false
-      @selection-change="selectFun"
-      pagination
-      :tableData="tableData"
-      :height="600"
-      :loading="loading"
-      :default-sort="{prop: 'id', order: 'ascending'}"
+    <ag-grid-layout
+            :toolbar="false"
+            :table-height="tableHeight"
+            theme="ag-theme-alpine"
+            :column-defs="columnDefs"
+            :row-data="tableData"
+            :locale-text="localeText"
+            :grid-options="gridOptions"
+            :default-col-def="defaultColDef"
+            :animate-rows="true"
+            :row-selection="rowSelection"
+            @filterChanged="filterModifed"
+            @sortChanged="gridSortChange"
     >
-      <!--表头-->
-      <template slot="table-columns">
-        <el-table-column type="selection" width="55" align="center"></el-table-column>
-        <el-table-column prop="named" label="姓名" align="center" min-width="160"></el-table-column>
-        <el-table-column prop="card_no" label="病人编号" align="center" min-width="160"></el-table-column>
-        <el-table-column prop="relative_name" label="年龄" align="center" :formatter="formatterAge" width="100"></el-table-column>
-        <el-table-column prop="sex" label="性别" align="center" width="70" :formatter="formatterSex"></el-table-column>
-        <el-table-column prop="in_date" label="住院时间" align="center" :formatter="formatterDate" min-width="190"></el-table-column>
-        <el-table-column prop="status" label="状态" align="center" :formatter="formatterStatus" width="100"></el-table-column>
-        <el-table-column prop="full_name" label="病床" align="center" width="120"></el-table-column>
-        <el-table-column label="操作" width="220">
-          <template slot-scope="scope">
-            <el-button type="primary" size="mini" @click="handleAdd(scope.row.id,scope.row.frame_id)">编辑</el-button>
-            <el-button v-if="!scope.row.status" type="warning" size="mini" @click="handlerEdit(scope.row.id, scope.row.full_name, 1)">换床</el-button>
-            <el-button v-if="!scope.row.status" size="mini" @click="handlerEdit(scope.row.id, scope.row.full_name, 2)">出院</el-button>
-          </template>
-        </el-table-column>
-      </template>
-
-      <!--翻页-->
       <el-pagination
-        slot="pagination"
-        v-if="pageData"
-        :current-page="pageData.page_no"
-        :page-sizes="[20, 30, 50, 100]"
-        :page-size="pageData.page_size"
-        @size-change="handlePageSizeChange"
-        @current-change="handlePageCurrentChange"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="pageData.data_total">
-      </el-pagination>
-    </en-table-layout>
-
+              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="编辑病人信息" :visible.sync="dialogAddVisible" :append-to-body="true" width="85%">
       <customer-edit :customer-id="customerId" :frame-id="frameId" @saved="handlePatientFinished"></customer-edit>
     </el-dialog>
@@ -91,10 +74,13 @@
   import customerEdit from '@/views/customer/customerEdit'
   import * as RegExp from "@/utils/RegExp"
   import * as API_hospitalFrame from "@/api/ncs_hospitalFrame"
+  import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
+  import {param} from "@/utils"
+  import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender";
 
   export default {
     name: 'customer_list',
-    components: { customerEdit },
+    components: { customerEdit, ButtonCellRender },
     data: function() {
       return {
         /** 列表loading状态 */
@@ -105,7 +91,8 @@
           page_no: 1,
           sort: 'status,create_time',
           dir: 'desc',
-          fixedCondition: ' 1 = 1'
+          fixedCondition: ' part_id = ' + this.$store.getters.partId,
+          alias: 'nc'
         },
         currentRow: {},
         /** 列表数据 */
@@ -122,10 +109,109 @@
         callingType: null,
         frameList: [],
         searchStr: null,
-        full_name: ''
+        full_name: '',
+        columnDefs: null,
+        defaultColDef: null,
+        gridOptions: null,
+        gridApi: null,
+        columnApi: null,
+        localeText: AG_GRID_LOCALE_CN,
+        rowSelection: null,
+      }
+    },
+    computed: {
+      tableHeight() {
+        return this.mainAreaHeight - 130
+      }
+    },
+    beforeMount() {
+      this.gridOptions = {
       }
+      this.columnDefs = [
+        {
+          headerName: '#',
+          headerCheckboxSelection: true,
+          headerCheckboxSelectionFilteredOnly: true,
+          checkboxSelection: true,
+          sortable: false, filter: false,
+          width: 50,
+          resizable: false,
+          valueGetter: this.hashValueGetter
+        },
+        { headerName: '姓名', field: 'named', sortable: true, filter: 'agTextColumnFilter', width: 160 },
+        { headerName: '病人编号', field: 'card_no', sortable: true, filter: true, width: 170 },
+        { headerName: '年龄', field: 'age', sortable: true, filter: false, valueFormatter: this.formatterAge, width: 100 },
+        { headerName: '性别', field: 'sex', sortable: true, filter: false, valueFormatter: this.formatterSex, width: 100 },
+        { headerName: '住院时间', field: 'in_date', valueFormatter: this.formatterDate, sortable: true, filter: false, width: 220 },
+        { headerName: '状态', field: 'status', sortable: true, filter: false, valueFormatter: this.formatterStatus, width: 100 },
+        { headerName: '病床', field: 'full_name', sortable: true, filter: true, width: 120 },
+        { headerName: '操作任务', field: 'id',
+          cellRendererFramework: 'ButtonCellRender',
+          cellRendererParams: param => {
+            return {
+              onClick: this.handleAdd,
+              label: '编辑',
+              buttonType: 'primary',
+              buttonSize: 'mini'
+            }
+          },
+          filter: false,
+          pinned: 'right',
+          lockPinned: true,
+          width: 100,
+          resizable: false,
+          sortable: false },
+        { headerName: '换床', field: 'id',
+          cellRendererFramework: 'ButtonCellRender',
+          cellRendererParams: param => {
+            return {
+              onClick: this.handlerEdit,
+              label: '换床',
+              buttonType: 'success',
+              buttonSize: 'mini',
+              show: !param.data['status']
+            }
+          },
+          filter: false,
+          pinned: 'right',
+          lockPinned: true,
+          width: 100,
+          resizable: false,
+          sortable: false },
+        { headerName: '出院', field: 'id',
+          cellRendererFramework: 'ButtonCellRender',
+          cellRendererParams: param => {
+            return {
+              onClick: this.cy,
+              label: '出院',
+              buttonType: 'danger',
+              buttonSize: 'mini',
+              show: !param.data['status']
+            }
+          },
+          pinned: 'right',
+          lockPinned: true,
+          width: 100,
+          resizable: false,
+          filter: false,
+          sortable: false }
+      ]
+      this.defaultColDef = {
+        filter: 'agTextColumnFilter',
+        sortable: true,
+        resizable: true,
+        comparator: this.testComparator,
+        filterParams: {
+          debounceMs: 200,
+          newRowsAction: 'keep',
+          textCustomComparator: this.textCustomComparator,
+          comparator: this.testComparator
+        }
+      },
+              this.rowSelection = 'multiple'
     },
     mounted() {
+      this.gridApi = this.gridOptions.api
       this.GET_List()
     },
     methods: {
@@ -136,7 +222,7 @@
       /** 加载设备信息列表 */
       GET_List() {
         this.loading = true
-        this.params.fixedCondition += ' and nc.part_id = ' + this.$store.getters.partId
+        this.gridApi.showLoadingOverlay()
         API_customer.getList(this.params).then(res => {
           this.loading = false
           this.tableData = res.data
@@ -157,7 +243,7 @@
       changeStatus(value) {
         delete this.params.fixedCondition
         if (value) {
-          this.params.fixedCondition = ' nc.status=' + value
+          this.params.fixedCondition = ' part_id =' + this.$store.getters.partId + ' and status=' + value
         } else {
           this.params.fixedCondition = ' 1 = 1'
         }
@@ -193,33 +279,33 @@
         this.handlerDelete(ids.join(','), 'del')
       },
       /** 添加设备信息 */
-      handleAdd(id, frame_id) {
+      handleAdd(row) {
         this.dialogAddVisible = true
-        this.customerId = id
-        this.frameId = frame_id
+        this.customerId = row.id
+        this.frameId = row.frame_id
       },
-      handlerEdit(id, name,  type) {
-        this.customerId = id
-        this.full_name = name
-        if (type === 1) {
-          API_hospitalFrame.getSickbedByPartId(this.$store.getters.partId).then(res=> {
-            this.frameList = res
-          })
-          this.formshow = true
-        } else {
-          let _this = this
-          this.$confirm('你确定要进行出院操作吗', '警告', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          }).then(() => {
-            const data = {
-              out_date: new Date(new Date().toLocaleDateString()).getTime(),
-              status: 1
-            }
-            _this.updateSave(data)
-          })
-        }
+      handlerEdit(row) {
+        this.customerId = row.id
+        this.full_name = row.full_name
+        API_hospitalFrame.getSickbedByPartId(this.$store.getters.partId).then(res=> {
+          this.frameList = res
+        })
+        this.formshow = true
+      },
+      cy(row) {
+        this.customerId = row.id
+        let _this = this
+        this.$confirm('你确定要进行出院操作吗', '警告', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          const data = {
+            out_date: new Date(new Date().toLocaleDateString()).getTime(),
+            status: 1
+          }
+          _this.updateSave(data)
+        })
       },
       /** 分页大小发生改变 */
       handlePageSizeChange(size) {
@@ -231,22 +317,22 @@
         this.params.page_no = page
         this.GET_List()
       },
-      formatterAge(row, column, cellValue) {
-        return row.age + row.age_unit
+      formatterAge(param) {
+        return param.data.age + param.data.age_unit
       },
-      formatterStatus(row, column, cellValue) {
-        if (row.status) {
+      formatterStatus(param) {
+        if (param.value) {
           return '已出院'
         } else {
           return '在院'
         }
       },
-      formatterDate(row, column, cellValue) {
-        let date = unix2Date(row.in_date, 'yyyy-MM-dd')
-        if (row.out_date) {
-          date += '至' + unix2Date(row.out_date, 'yyyy-MM-dd')
+      formatterDate(param) {
+        let date = unix2Date(param.data.in_date, 'yyyy-MM-dd')
+        if (param.data.out_date) {
+          date += '至' + unix2Date(param.data.out_date, 'yyyy-MM-dd')
         } else {
-          if (row.in_date) {
+          if (param.data.in_date) {
             date += '至今'
           }
         }
@@ -279,18 +365,50 @@
           this.GET_List()
         })
       },
-      clickSearch() {
-        delete this.params.fixedCondition
-        if (this.searchStr != null && this.searchStr != '') {
-          this.params.fixedCondition = " ( nc.named like concat('%','" + this.searchStr + "','%') or nc.card_no like concat('%','" + this.searchStr + "','%')) "
-        } else {
-          this.params.fixedCondition = ' 1 = 1'
-        }
+      clickSearch(value) {
+        this.params.filerStr = this.searchStr
         this.GET_List()
       },
       /** 性别格式化 */
-      formatterSex(row, column, cellValue) {
-        return row.sex === 1 ? '男' :  row.sex === 2 ? '女' : '未知'
+      formatterSex(row) {
+        return row.data.sex === 1 ? '男' :  row.data.sex === 2 ? '女' : '未知'
+      },
+      filterModifed(param) {
+        let model = param.api.getFilterModel()
+        this.params.filter = JSON.stringify(model)
+        this.GET_List()
+      },
+      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.GET_List()
       },
     }
   }

+ 69 - 41
src/views/dashboard/calling/index.vue

@@ -75,27 +75,16 @@
       <el-col :span="16">
         <el-card style="maring:10px">
           <div slot="header" class="clearfix">
-            <span style="float: left">最近呼叫</span>
+            <span style="float: left">最近交互</span>
             <el-link type="primary" style="float: right" @click="goMove('CallingList')">更多</el-link>
           </div>
           <div style="height: 300px">
-<!--            <el-scrollbar wrapClass="scrollbar-wrapper" style="min-height: 250px">-->
-<!--              <vue-seamless-scroll :data="callingHistoryList" :class-option="defaultOption" class="seamless-warp">-->
-<!--                <el-card v-for="(item, index) in callingHistoryList" :key="index">-->
-<!--                  <a>-->
-<!--                    <div style="margin-top: 5px;">-->
-<!--                      <span style="margin-left: 20px; line-height:1.2">{{item.content}}</span>-->
-<!--                    </div>-->
-<!--                  </a>-->
-<!--                </el-card>-->
-<!--              </vue-seamless-scroll>-->
-<!--            </el-scrollbar>-->
             <el-table :data="callingHistoryList" height="300px">
-                <el-table-column prop="calllist_type" label="呼叫类型" width="120" align="center" :formatter="formatterCallType" />
-                <el-table-column prop="content" label="呼叫内容" width="320" align="center" />
-                <el-table-column prop="create_time" label="呼叫时间" width="170" align="center" :formatter="formatterCreateTime" />
-                <el-table-column prop="calling_direct" label="呼叫方向" align="center" :formatter="formatterCallDirect" />
-                <el-table-column prop="nickname" label="呼叫人" align="center" />
+                <el-table-column prop="fromMemberName" label="发起方" min-width="140" align="center" :formatter="formatterFromName" />
+                <el-table-column prop="toMemberName" label="接收方" min-width="140" align="center" :formatter="formatterToName" />
+                <el-table-column prop="action_type" label="交互类型" width="100" align="center" :formatter="formatterType" />
+                <el-table-column prop="action_end" label="交互结果" width="100" align="center" :formatter="formatterResult" />
+                <el-table-column prop="create_date" label="交互时间" width="170" align="center" :formatter="formatterCreateTime" />
             </el-table>
           </div>
         </el-card>
@@ -144,7 +133,7 @@
   import * as API_task from '@/api/ncs_task'
   import * as API_Remark from '@/api/ncs_remark'
   import {unixToDate} from '@/utils/Foundation'
-  import * as API_CallingList from '@/api/ncs_calling_history'
+  import * as API_CallingList from '@/api/ncs_interaction'
 
 export default {
   name: 'Index',
@@ -190,6 +179,12 @@ export default {
       this.getRemarkList()
     }
   },
+  activated() {
+    this.getTodayList()
+    this.getNoteList()
+    this.getCallingHistoryList()
+    this.getRemarkList()
+  },
   methods: {
     getTodayList() {
       const param = this.MixinClone(this.params)
@@ -224,8 +219,9 @@ export default {
     },
     getCallingHistoryList() {
       const param = this.MixinClone(this.params)
-      param.fixedCondition = ' nch.part_id=' + this.$store.getters.partId
-      param.sort = 'nch.id'
+      param.page_size = 10
+      param.fixedCondition = ' part_id=' + this.$store.getters.partId
+      param.sort = 'id'
       let _this = this
       API_CallingList.getList(param).then(response => {
         _this.callingHistoryList = response.data
@@ -241,33 +237,65 @@ export default {
     goMove(path) {
       this.$router.push({name: path})
     },
-    formatterCallType(row, column, cellValue) {
-      switch (row.calling_type) {
-        case 1:
-          return '病房普通呼叫'
-        case 2:
-          return '门口机呼叫'
-        case 3:
-          return '卫生间紧急呼叫'
-        case 4:
-          return '请求增援'
-        case 5:
-          return '优先呼叫'
-        case 6:
-          return '关系人电话呼叫'
+    formatterFromName(row, column, cellValue) {
+      if (!row.outerior_action && row.relative_id === null) {
+        let named = ''
+        if (row.from_frame_full_name && row.from_member_name) {
+          named = row.from_frame_full_name + row.from_member_name
+        } else if (row.from_frame_full_name) {
+          named = row.from_frame_full_name
+        } else if (row.from_member_name) {
+          named = row.from_member_name
+        }
+        return named
+      } else {
+        return row.from_member_name + '的' + row.relative_name
+      }
+    },
+    formatterToName(row, column, cellValue) {
+      let named = ''
+      if (row.to_frame_full_name && row.to_member_name) {
+        named = row.to_frame_full_name + row.to_member_name
+      } else if (row.to_frame_full_name) {
+        named = row.to_frame_full_name
+      } else if (row.to_member_name) {
+        named = row.to_member_name
+      }
+      return named
+    },
+    formatterType(row, column, cellValue) {
+      switch (cellValue) {
+        case 'CALLBACK':
+          return 'TCP反馈'
+        case 'VOICE':
+          return '语音'
+        case 'VIDEO':
+          return '视频'
+        case 'IM':
+          return '留言'
+        case 'DEVICE':
+          return '设备'
+        case 'DATA':
+          return '数据'
+        case 'EVENT':
+          return '事件'
+        case 'BROADCAST':
+          return '广播'
+        case 'TIME':
+          return '时间'
         default:
-          return '未知呼叫'
+          return '未知'
       }
     },
-    formatterCallDirect(row, column, cellValue) {
-      if (row.calling_direct === 0) {
-        return '呼出'
-      } else {
-        return '呼入'
+    formatterResult(row, column, cellValue) {
+      if (cellValue) {
+        return '成功'
+      } else if (!cellValue) {
+        return '未响应'
       }
     },
     formatterCreateTime(row, column, cellValue) {
-      return unixToDate(row.create_time)
+      return unixToDate(cellValue)
     },
   }
 

+ 1 - 0
src/views/hospitalFrame/hospitalFrame.vue

@@ -280,6 +280,7 @@ export default {
     // --------------------设备管理
     handlePartDevice() {
       this.frameId = this.hospital_frame.frame_part.id
+      this.selectedFrame = this.hospital_frame.frame_part
       this.openDeviceList()
     },
     openDeviceList() {

+ 0 - 297
src/views/ncs-calling-history/index.vue

@@ -1,297 +0,0 @@
-<template>
-  <div class="app-container">
-
-    <en-table-layout
-      toolbar
-      pagination
-      :table-data="tableData"
-      :height="tableHeight"
-      :loading="loading"
-      @selection-change="selectFun"
-      @sort-change="tableSort"
-    >
-      <!--工具栏-->
-      <div slot="toolbar" class="inner-toolbar">
-        <div class="toolbar-search">
-<!--          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />-->
-          <el-form ref="editform" label-width="120px">
-            <el-form-item label="呼叫类型">
-              <el-select v-model="callingType" placeholder="请选择设备类型" clearable @change="handlerSearch">
-                <el-option label="病房普通呼叫" :value="1" />
-                <el-option label="门口机呼叫" :value="2" />
-                <el-option label="卫生间紧急呼叫" :value="3" />
-                <el-option label="请求增援" :value="4" />
-                <el-option label="优先呼叫" :value="5" />
-                <el-option label="关系人电话呼叫" :value="6" />
-              </el-select>
-            </el-form-item>
-          </el-form>
-
-        </div>
-        <div class="toolbar-btns">
-
-          <el-form label-width="120px">
-            <el-form-item label="搜索时间段">
-              <el-date-picker
-                v-model="searchDateRange"
-                type="daterange"
-                align="right"
-                unlink-panels
-                value-format="yyyy/MM/dd"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                :picker-options="pickerOptions"
-                :default-time="['00:00:00', '23:59:59']"
-                @change="dateRangeChange"
-              />
-              <el-button style="margin-left: 20px" type="danger" @click="clearRecord">清空记录</el-button>
-            </el-form-item>
-
-          </el-form>
-        </div>
-      </div>
-      <!--表头-->
-      <template slot="table-columns">
-        <el-table-column
-          type="selection"
-          width="55"
-          align="center"
-        />
-        <el-table-column prop="calllist_type" sortable="custom" label="呼叫类型" width="160" align="center" :formatter="formatterCallType" />
-        <el-table-column prop="content" label="呼叫内容" width="320" align="center" />
-        <el-table-column prop="create_time" sortable="custom" label="呼叫时间" width="170" align="center" :formatter="formatterCreateTime" />
-        <el-table-column prop="calling_text" label="呼叫代码" align="center" />
-        <el-table-column prop="calling_direct" sortable="custom" label="呼叫方向" align="center" :formatter="formatterCallDirect" />
-        <el-table-column prop="nickname" label="呼叫人" align="center" />
-        <el-table-column prop="calling_time" sortable="custom" label="是否接听" align="center" :formatter="formatterCallTime" />
-        <el-table-column label="操作" align="center" width="100">
-          <template slot-scope="scope">
-            <el-button type="danger" size="mini" @click="handlerDelete(scope.row.id)">删除</el-button>
-          </template>
-        </el-table-column>
-
-      </template>
-
-      <!--翻页-->
-      <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"
-      />
-    </en-table-layout>
-
-  </div>
-</template>
-
-<script>
-import * as API_CallingList from '@/api/ncs_calling_history'
-import { unixToDate } from '@/utils/Foundation'
-export default {
-  name: 'Index',
-  data() {
-    return {
-      pickerOptions: {
-        shortcuts: [{
-          text: '最近一周',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
-            picker.$emit('pick', [start, end])
-          }
-        }, {
-          text: '最近一个月',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
-            picker.$emit('pick', [start, end])
-          }
-        }, {
-          text: '最近三个月',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
-            picker.$emit('pick', [start, end])
-          }
-        }]
-      },
-      tableData: [],
-      /** 列表参数 */
-      params: {
-        page_size: 20,
-        page_no: 1,
-        fixedCondition: ' nch.part_id=' + this.$store.getters.partId,
-        sort: 'nch.id',
-        dir: 'desc'
-      },
-      pageData: [],
-      loading: false,
-      searchDateRange: [],
-      callingType: null
-    }
-  },
-  computed: {
-    tableHeight() {
-      return this.mainAreaHeight - 130
-    }
-  },
-  mounted() {
-    this.getList()
-  },
-  methods: {
-
-    /** 表格行选择变化记录选中行数据*/
-    selectFun: function(val) {
-      this.multipleSelection = val
-    },
-    /** 删除单条数据 */
-    handlerDelete(ids) {
-      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        API_CallingList.remove(ids).then(
-          response => {
-            this.getList()
-            this.$message({
-              type: 'success',
-              message: '删除成功!'
-            })
-          }
-        ).catch(response => {
-          this.$message({
-            type: 'info',
-            message: response.message
-          })
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        })
-      })
-    },
-    /** 分页大小发生改变 */
-    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)
-      API_CallingList.getList(param).then(response => {
-        this.loading = false
-        this.tableData = [...response.data]
-        this.pageData = {
-          page_no: response.page_no,
-          page_size: response.page_size,
-          data_total: response.data_total
-        }
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /** 处理搜索 */
-    handlerSearch(value) {
-      if (value) {
-        this.params.fixedCondition = ' nch.calling_type=' + value
-      } else {
-        delete this.params.fixedCondition
-      }
-      this.getList()
-    },
-    formatterCallType(row, column, cellValue) {
-      switch (row.calling_type) {
-        case 1:
-          return '病房普通呼叫'
-        case 2:
-          return '门口机呼叫'
-        case 3:
-          return '卫生间紧急呼叫'
-        case 4:
-          return '请求增援'
-        case 5:
-          return '优先呼叫'
-        case 6:
-          return '关系人电话呼叫'
-        default:
-          return '未知呼叫'
-      }
-    },
-    formatterCallDirect(row, column, cellValue) {
-      if (row.calling_direct === 0) {
-        return '呼出'
-      } else {
-        return '呼入'
-      }
-    },
-    formatterCallTime(row, column, cellValue) {
-      if (row.calling_time === null) {
-        return '未接听'
-      } else {
-        return '已接听'
-      }
-    },
-    formatterCreateTime(row, column, cellValue) {
-      return unixToDate(row.create_time)
-    },
-    /** 处理字段排序 */
-    tableSort(column) {
-      if (column.order !== null) {
-        this.params.sort = column.prop
-        this.params.dir = column.order === 'ascending' ? 'asc' : 'desc'
-      } else {
-        this.params.sort = null
-        this.params.dir = null
-      }
-      this.getList()
-    },
-    dateRangeChange(value) {
-      if (value && value.length > 0) {
-        this.params.start_date = value[0]
-        this.params.end_date = value[1]
-      } else {
-        delete this.params.start_date
-        delete this.params.end_date
-      }
-
-      this.getList()
-    },
-    clearRecord() {
-      this.$confirm('清除所有呼叫记录?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        API_CallingList.clearRecord(this.$store.getters.partId).then(res => {
-          this.$message.success('清除成功!')
-          this.getList()
-        }).catch(err => {
-          this.$message.error(err.message)
-        })
-      })
-    }
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 165 - 70
src/views/ncs-clerk/clerkList.vue

@@ -1,63 +1,40 @@
 <template>
   <div>
-    <en-table-layout
-      toolbar
-      @selection-change="selectFun"
-      @sort-change="tableSort"
-      pagination
-      :tableData="tableData"
-      :height="600"
-      :loading="loading"
-      :default-sort="{prop: 'member_id', order: 'ascending'}"
+    <ag-grid-layout
+            :table-height="tableHeight"
+            theme="ag-theme-alpine"
+            :column-defs="columnDefs"
+            :row-data="tableData"
+            :locale-text="localeText"
+            :grid-options="gridOptions"
+            :default-col-def="defaultColDef"
+            :animate-rows="true"
+            :row-selection="rowSelection"
+            rowHeight="50"
+            @filterChanged="filterModifed"
+            @sortChanged="gridSortChange"
     >
-      <!--工具栏-->
       <div slot="toolbar" class="inner-toolbar">
         <div class="toolbar-search">
           <en-table-search @search="handlerSearch" placeholder="请输入搜索关键字"/>
         </div>
         <div class="toolbar-btns">
           <el-button type="primary" @click="handleAddMember">新增</el-button>
-         <!-- <el-button type="danger" @click="batchDelete">禁用</el-button>-->
+          <!-- <el-button type="danger" @click="batchDelete">禁用</el-button>-->
         </div>
       </div>
-      <!--表头-->
-      <template slot="table-columns">
-        <el-table-column type="selection" width="55" align="center"></el-table-column>
-        <el-table-column style="text-align: left;" label="头像" width="70">
-          <template slot-scope="scope">
-            <el-image :src="scope.row.face" lazy fit="cover" :preview-src-list="srcList" @click="lookBigImg(scope.row.face)">
-              <div slot="error" class="image-slot">
-                <i class="el-icon-picture-outline"></i>
-              </div>
-            </el-image>
-          </template>
-        </el-table-column>
-        <el-table-column prop="uname" label="登陆名" min-width="150" align="center"></el-table-column>
-        <el-table-column prop="clerk_name" label="真实名字" min-width="150" align="center"></el-table-column>
-        <el-table-column prop="sex" label="性别" :formatter="formatterSex" width="100" align="center"></el-table-column>
-        <el-table-column prop="mobile" label="手机" align="center"></el-table-column>
-        <el-table-column prop="role_name" label="角色"  :formatter="formatterRole" width="150" align="center"></el-table-column>
-        <el-table-column style="text-align: left;" label="操作" width="100">
-          <template slot-scope="scope">
-            <el-button type="success" size="mini"  @click="handlerEdit(scope.$index,scope.row)">编辑</el-button>
-          </template>
-        </el-table-column>
-      </template>
-
-      <!--翻页-->
       <el-pagination
-        slot="pagination"
-        v-if="pageData"
-        :current-page="pageData.page_no"
-        :page-sizes="[10, 20, 50, 100]"
-        :page-size="pageData.page_size"
-        @size-change="handlePageSizeChange"
-        @current-change="handlePageCurrentChange"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="pageData.data_total">
-      </el-pagination>
-    </en-table-layout>
-
+              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>
     <!--添加会员 dialog-->
     <el-dialog
       title="编辑成员信息"
@@ -193,7 +170,9 @@
       </div>
     </el-dialog>
 
-
+    <template>
+      <image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="srcList"/>
+    </template>
   </div>
 </template>
 
@@ -201,9 +180,16 @@
   import { serverUrl } from '@/utils/domain'
   import * as clerk_API from '@/api/ncs_clerk'
   import * as RegExp from '@/utils/RegExp'
+  import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
+  import {param} from "@/utils"
+  import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender"
+  import AgGridImg from "@/components/AgGridImg/AgGridImg"
+  import ImageViewer from "element-ui/packages/image/src/image-viewer"
+  let prevOverflow = ''
 
   export default {
     name: 'careDoctorManager',
+    components: { ButtonCellRender, AgGridImg, ImageViewer },
     data: function() {
       return {
         uploadurl: serverUrl + '/ncs/upload/uploadFile',
@@ -215,7 +201,7 @@
           page_size: 10,
           page_no: 1,
           sort: 'nc.member_id',
-          dir: 'asc'
+          dir: 'asc',
         },
         /** 列表数据 */
         tableData: [],
@@ -268,10 +254,84 @@
             { max: 50, message: '最长50个字符', trigger: 'blur' }]
         },
         pwdType: 'password',
-        srcList: ['1']
+        srcList: ['1'],
+        columnDefs: null, // 新表格
+        defaultColDef: null,
+        gridOptions: null,
+        gridApi: null,
+        columnApi: null,
+        localeText: AG_GRID_LOCALE_CN,
+        rowSelection: null,
+        showViewer: false
+      }
+    },
+    computed: {
+      tableHeight() {
+        return this.mainAreaHeight - 130
       }
     },
+    beforeMount() {
+      this.gridOptions = {
+      }
+      this.columnDefs = [
+        {
+          headerName: '#',
+          headerCheckboxSelection: true,
+          headerCheckboxSelectionFilteredOnly: true,
+          checkboxSelection: true,
+          sortable: false, filter: false,
+          width: 50,
+          resizable: false,
+          valueGetter: this.hashValueGetter
+        },
+        { headerName: '头像', field: 'face', sortable: true, filter: false, width: 70,
+          cellRendererFramework: 'AgGridImg',
+          cellRendererParams: param => {
+            return {
+              onClick: this.lookBigImg,
+              face: 'face'
+            }
+          },
+        },
+        { headerName: '登陆名', field: 'uname', sortable: true, filter: true, minWidth: 170 },
+        { headerName: '真实名字', field: 'clerk_name', sortable: true, filter: true, minWidth: 120 },
+        { headerName: '性别', field: 'sex', sortable: true, filter: false, valueFormatter: this.formatterSex, width: 100 },
+        { headerName: '手机', field: 'mobile', sortable: true, filter: true, minWidth: 170 },
+        { headerName: '角色', field: 'role_name', sortable: true, filter: false, valueFormatter: this.formatterRole, width: 120 },
+        { headerName: '操作', field: 'id',
+          cellRendererFramework: 'ButtonCellRender',
+          cellRendererParams: param => {
+            return {
+              onClick: this.handlerEdit,
+              label: '编辑',
+              buttonType: 'primary',
+              buttonSize: 'mini'
+            }
+          },
+          filter: false,
+          pinned: 'right',
+          lockPinned: true,
+          width: 100,
+          resizable: false,
+          sortable: false
+        }
+      ]
+      this.defaultColDef = {
+        filter: 'agTextColumnFilter',
+        sortable: true,
+        resizable: true,
+        comparator: this.testComparator,
+        filterParams: {
+          debounceMs: 200,
+          newRowsAction: 'keep',
+          textCustomComparator: this.textCustomComparator,
+          comparator: this.testComparator
+        }
+      },
+              this.rowSelection = 'multiple'
+    },
     mounted() {
+      this.gridApi = this.gridOptions.api
       this.getRoles({ page_size: 200, page_no: 1, fixedCondition: ' shop_id = -1', sort: ' role_id', dir: 'desc' })
       this.GET_MemberList()
     },
@@ -286,6 +346,8 @@
       /** 加载用户列表 */
       GET_MemberList() {
         this.loading = true
+        this.gridApi.showLoadingOverlay()
+        this.gridApi.sizeColumnsToFit()
         clerk_API.getList(this.params).then(response => {
           this.loading = false
           let size = 0
@@ -310,17 +372,6 @@
         this.params.query = keywords
         this.GET_MemberList()
       },
-      /** 表头排序 **/
-      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.GET_MemberList()
-      },
       /** 单条数据删除处理 */
       handlerDelete(ids) {
         this.$confirm('你确定要禁用此用户?', '警告', {
@@ -375,15 +426,15 @@
       },
 
       /** 性别格式化 */
-      formatterSex(row, column, cellValue) {
-        return row.sex === 1 ? '男' :  row.sex === 2 ? '女' : '未知'
+      formatterSex(row) {
+        return row.data.sex === 1 ? '男' :  row.data.sex === 2 ? '女' : '未知'
       },
 
-      formatterRole(row, column, cellValue) {
-        if (row.founder === 1) {
+      formatterRole(row) {
+        if (row.data.founder === 1) {
           return '机构负责人'
         } else {
-          return cellValue
+          return row.data.role_name
         }
       },
       /** 提交添加会员表单 */
@@ -428,7 +479,7 @@
         this.dialogAddMemberVisible = true
       },
       /** 编辑用户 */
-      handlerEdit(index, row) {
+      handlerEdit(row) {
         this.addMemberForm = Object.assign({}, row)
         this.imageUrl = row.face
         delete this.addMemberForm.password
@@ -495,9 +546,53 @@
         this.imageUrl = serverUrl + '/' + res
         this.addMemberForm.face = this.imageUrl
       },
-      lookBigImg(img) {
+      lookBigImg(row) {
         this.srcList = []
-        this.srcList.push(img)
+        this.srcList.push(row.face)
+        prevOverflow = document.body.style.overflow;
+        document.body.style.overflow = 'hidden';
+        this.showViewer = true;
+      },
+      closeViewer() {
+        document.body.style.overflow = prevOverflow;
+        this.showViewer = false;
+      },
+      filterModifed(param) {
+        let model = param.api.getFilterModel()
+        this.params.filter = JSON.stringify(model)
+        this.GET_MemberList()
+      },
+      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.GET_MemberList()
       }
 
     }

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

@@ -338,6 +338,7 @@
 
 <script>
 import * as API_Device from '@/api/ncs_device'
+import { returnDeviceType } from '@/utils/device_type'
 
 export default {
   name: 'DeviceAdmin',
@@ -593,44 +594,7 @@ export default {
       }
     },
     formatterDeviceType(row, column, cellValue) {
-      switch (cellValue) {
-        case 1:
-          return '护士主机'
-        case 2:
-          return '医生主机'
-        case 3:
-          return '门口机'
-        case 4:
-          return '病床分机'
-        case 5:
-          return 'LCD走廊屏'
-        case 6:
-          return 'LED点阵屏'
-        case 7:
-          return '护士腕表'
-        case 8:
-          return '护工腕表'
-        case 9:
-          return '病人腕表'
-        case 10:
-          return '手机App'
-        case 11:
-          return '总线转换盒'
-        case 12:
-          return '模拟分机'
-        case 13:
-          return '模拟紧急按钮'
-        case 14:
-          return '模拟门灯'
-        case 15:
-          return '遥控器'
-        case 16:
-          return '信标'
-        case 17:
-          return '看板'
-        default:
-          return '未知设备'
-      }
+      return returnDeviceType(cellValue)
     },
     formatterStatus(row, column, cellValue) {
       return cellValue === 1 ? '<span class="text">已启用</span>' : '未启用'

+ 27 - 59
src/views/ncs-device/device-edit.vue

@@ -93,13 +93,13 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="设备位置">
-              <el-input v-model="formmodel.frame_name" :readonly="true" clearable placeholder="" />
-            </el-form-item>
-          </el-col>
-        </el-row>
+<!--        <el-row>-->
+<!--          <el-col :span="12">-->
+<!--            <el-form-item label="设备位置">-->
+<!--              <el-input v-model="formmodel.frame_name" :readonly="true" clearable placeholder="" />-->
+<!--            </el-form-item>-->
+<!--          </el-col>-->
+<!--        </el-row>-->
 
         <el-row>
           <el-col :span="12">
@@ -122,6 +122,8 @@
 
 <script>
 import * as API_Device from '@/api/ncs_device'
+import { returnDeviceType } from "@/utils/device_type"
+
 export default {
 
   name: 'Index',
@@ -134,10 +136,10 @@ export default {
       type: Number,
       default: 0
     },
-    frame: {
-      type: Object,
-      default: null
-    },
+    // frame: {
+    //   type: Object,
+    //   default: null
+    // },
     nextIp: {
       type: String,
       default: ''
@@ -148,7 +150,7 @@ export default {
       /** 表单数据 */
       formmodel: {
         eth_ip: this.nextIp,
-        frame_name: this.frame.full_name,
+        // frame_name: this.frame.full_name,
         eth_mac: ''
       },
       /** 弹出窗口标题信息 */
@@ -201,9 +203,11 @@ export default {
       this.formmodel.eth_ip = val
     }
   },
-  async mounted() {
+  mounted() {
     if (this.deviceId !== 0) {
       this.getDeviceById()
+    } else {
+      this.handlerAdd()
     }
   },
   methods: {
@@ -211,6 +215,9 @@ export default {
     async handlerAdd() {
       console.log('nextip', this.nextIp)
       this.deviceTypeDisabled = false
+      if (this.$refs.editform) {
+        this.$refs.editform.resetFields()
+      }
       this.formmodel = {
         part_id: this.$store.getters.partId,
         soft_ver: 'SV1.0',
@@ -221,9 +228,6 @@ export default {
         wifi_ip: '',
         status: 1
       }
-      if (this.$refs.editform) {
-        this.$refs.editform.resetFields()
-      }
       this.editflag = 0
       this.formtitle = '新增设备'
     },
@@ -233,10 +237,11 @@ export default {
       this.$refs[formName].validate((valid) => {
         if (valid) {
           /** 新增 */
+          const params = this.MixinClone(this.formmodel)
           if (this.editflag === 0) {
-            this.formmodel.part_id = this.$store.getters.partId
-            this.formmodel.frame_id = this.frameId
-            API_Device.add(this.formmodel).then(() => {
+            params.part_id = this.$store.getters.partId
+            params.frame_id = this.frameId
+            API_Device.add(params).then(() => {
               this.$message.success('保存成功!')
               this.handlerAdd()
               this.$emit('saved')
@@ -245,9 +250,9 @@ export default {
             })
           } else {
             /** 修改 */
-            API_Device.update(this.formmodel.id, this.formmodel).then(() => {
+            API_Device.update(params.id, params).then(() => {
               this.$message.success('修改成功!')
-              this.handlerAdd()
+              // this.handlerAdd()
               this.$emit('saved')
             }).catch(response => {
               this.$message.warning(response.message)
@@ -257,44 +262,7 @@ export default {
       })
     },
     formatterDeviceType(row, column, cellValue) {
-      switch (cellValue) {
-        case 1:
-          return '护士主机'
-        case 2:
-          return '医生主机'
-        case 3:
-          return '门口机'
-        case 4:
-          return '病床分机'
-        case 5:
-          return 'LCD走廊屏'
-        case 6:
-          return 'LED点阵屏'
-        case 7:
-          return '护士腕表'
-        case 8:
-          return '护工腕表'
-        case 9:
-          return '病人腕表'
-        case 10:
-          return '手机App'
-        case 11:
-          return '总线转换盒'
-        case 12:
-          return '模拟分机'
-        case 13:
-          return '模拟紧急按钮'
-        case 14:
-          return '模拟门灯'
-        case 15:
-          return '遥控器'
-        case 16:
-          return '信标'
-        case 17:
-          return '看板'
-        default:
-          return '未知设备'
-      }
+      return returnDeviceType(cellValue)
     },
     deviceTypeChange(value) {
       this.rules.eth_mac[0].required = true

+ 10 - 43
src/views/ncs-device/deviceInfo.vue

@@ -54,7 +54,7 @@
     </en-table-layout>
 
     <el-dialog title="编辑设备信息" :visible.sync="dialogAddDeviceInfoVisible" :append-to-body="true" width="60%">
-      <device-edit :device-id="deviceId" :frame-id="frameId" :frame="frame" :next-ip="nextIp" @saved="handlePatientFinished" />
+      <device-edit :device-id="deviceId" :frame-id="frameId" :frame="frame" :next-ip="nextIp" ref="child" @saved="handlePatientFinished" />
     </el-dialog>
 
   </div>
@@ -63,6 +63,7 @@
 <script>
 import * as API_Device from '@/api/ncs_device'
 import DeviceEdit from '@/views/ncs-device/device-edit'
+import { returnDeviceType } from "@/utils/device_type"
 
 export default {
   name: 'DeviceInfo',
@@ -86,7 +87,7 @@ export default {
         page_size: 10,
         page_no: 1,
         sort: 'id',
-        dir: 'asc'
+        dir: 'asc',
       },
       currentRow: {},
       /** 列表数据 */
@@ -109,48 +110,12 @@ export default {
   },
   mounted() {
     this.GET_List()
+    console.log('frame=', this.frame)
     console.log(this.frameId)
   },
   methods: {
     formatterDeviceType(row, column, cellValue) {
-      switch (cellValue) {
-        case 1:
-          return '护士主机'
-        case 2:
-          return '医生主机'
-        case 3:
-          return '门口机'
-        case 4:
-          return '病床分机'
-        case 5:
-          return 'LCD走廊屏'
-        case 6:
-          return 'LED点阵屏'
-        case 7:
-          return '护士腕表'
-        case 8:
-          return '护工腕表'
-        case 9:
-          return '病人腕表'
-        case 10:
-          return '手机App'
-        case 11:
-          return '总线转换盒'
-        case 12:
-          return '模拟分机'
-        case 13:
-          return '模拟紧急按钮'
-        case 14:
-          return '模拟门灯'
-        case 15:
-          return '遥控器'
-        case 16:
-          return '信标'
-        case 17:
-          return '看板'
-        default:
-          return '未知设备'
-      }
+      return returnDeviceType(cellValue)
     },
     /** 选择行变化时,记录选中的行数据 */
     selectFun(val) {
@@ -174,7 +139,7 @@ export default {
     },
     /** 处理搜索 **/
     handlerSearch(keywords) {
-      this.params.query = keywords
+      this.params.filerStr = keywords
       this.GET_List()
     },
     /** 单条数据删除处理 */
@@ -208,7 +173,6 @@ export default {
     },
     /** 编辑设备信息 */
     handlerEdit(index, row) {
-      console.log(row)
       this.deviceId = row.id
       this.dialogAddDeviceInfoVisible = true
     },
@@ -224,8 +188,11 @@ export default {
     },
     async handleAddDeviceInfo() {
       this.nextIp = await API_Device.getNextIP()
-      this.deviceId = 0
       this.dialogAddDeviceInfoVisible = true
+      this.deviceId = 0
+      if (this.$refs.child) {
+        this.$refs.child.handlerAdd()
+      }
     },
     handlePatientFinished() {
       this.dialogAddDeviceInfoVisible = false

+ 5 - 41
src/views/ncs-device/index.vue

@@ -23,7 +23,7 @@
             style="margin-right: 20px;"
             @change="editLockChange"
           />
-<!--          <el-button v-if="editLock" type="primary" @click="handlerAdd">新增设备</el-button>-->
+          <!--          <el-button v-if="editLock" type="primary" @click="handlerAdd">新增设备</el-button>-->
           <el-button v-if="editLock" type="danger" @click="batchDelete">批量删除</el-button>
         </div>
       </div>
@@ -76,7 +76,7 @@
     </en-table-layout>
 
     <el-dialog title.sync="修改设备" :visible.sync="formshow" width="70%">
-      <device-edit :device-id="deviceId" @saved="handlePatientFinished"></device-edit>
+      <device-edit :device-id="deviceId" @saved="handlePatientFinished" />
     </el-dialog>
 
     <el-dialog title="开启设备编辑" :visible.sync="formshow1" width="30%">
@@ -99,6 +99,7 @@
 <script>
 import * as API_Device from '@/api/ncs_device'
 import DeviceEdit from '@/views/ncs-device/device-edit'
+import { returnDeviceType } from '@/utils/device_type'
 export default {
   name: 'Index',
   components: { DeviceEdit },
@@ -223,51 +224,14 @@ export default {
       })
     },
     formatterDeviceType(row, column, cellValue) {
-      switch (cellValue) {
-        case 1:
-          return '护士主机'
-        case 2:
-          return '医生主机'
-        case 3:
-          return '门口机'
-        case 4:
-          return '病床分机'
-        case 5:
-          return 'LCD走廊屏'
-        case 6:
-          return 'LED点阵屏'
-        case 7:
-          return '护士腕表'
-        case 8:
-          return '护工腕表'
-        case 9:
-          return '病人腕表'
-        case 10:
-          return '手机App'
-        case 11:
-          return '总线转换盒'
-        case 12:
-          return '模拟分机'
-        case 13:
-          return '模拟紧急按钮'
-        case 14:
-          return '模拟门灯'
-        case 15:
-          return '遥控器'
-        case 16:
-          return '信标'
-        case 17:
-          return '看板'
-        default:
-          return '未知设备'
-      }
+      return returnDeviceType(cellValue)
     },
     formatterStatus(row, column, cellValue) {
       return cellValue === 1 ? '<span class="text">已启用</span>' : '未启用'
     },
     /** 处理搜索 */
     handlerSearch(keywords) {
-      this.params.query = keywords
+      this.params.filerStr = keywords
       this.getList()
     },
     /** 处理字段排序 */

+ 400 - 0
src/views/ncs-device/nurse_watch.vue

@@ -0,0 +1,400 @@
+<template>
+  <div class="formwrap">
+    <ag-grid-layout
+      :table-height="tableHeight"
+      theme="ag-theme-alpine"
+      :column-defs="columnDefs"
+      :row-data="tableData"
+      :locale-text="localeText"
+      :grid-options="gridOptions"
+      :default-col-def="defaultColDef"
+      :animate-rows="true"
+      :row-selection="rowSelection"
+      row-height="50"
+      @filterChanged="filterModifed"
+      @sortChanged="gridSortChange"
+    >
+      <!--工具栏-->
+      <div slot="toolbar" class="inner-toolbar">
+        <div class="toolbar-search">
+          <en-table-search placeholder="请输入搜索关键字" @search="handlerSearch" />
+        </div>
+      </div>
+      <el-pagination
+        v-if="pageData"
+        slot="pagination"
+        :current-page="pageData.page_no"
+        :page-sizes="[10, 20, 50, 100]"
+        :page-size="pageData.page_size"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="pageData.data_total"
+        @size-change="handlePageSizeChange"
+        @current-change="handlePageCurrentChange"
+      />
+    </ag-grid-layout>
+    <!--编辑表单-->
+    <el-dialog title="改绑" :visible.sync="formshow" width="70%">
+      <div style="width:100%;margin:0 auto;height: 400px;">
+        <el-form label-width="120px" style="min-width: 100%;float:left;">
+          <table border="1" class="tablewen">
+            <tr>
+              <td class="td1">设备别名:</td>
+              <td class="td2"><span>{{ deviceInfo.name }}</span></td>
+              <td class="td1">设备状态:</td>
+              <td class="td2">
+                <span v-if="deviceInfo.status===1">已启用</span>
+                <span v-else>未启用</span>
+              </td>
+            </tr>
+            <tr>
+              <td class="td1">绑定人:</td>
+              <td class="td2"><span>{{ deviceInfo.member_name }}</span></td>
+              <td class="td1">设备型号:</td>
+              <td class="td2"><span>{{ deviceInfo.model }}</span></td>
+            </tr>
+            <tr>
+              <td class="td1">有线物理地址:</td>
+              <td class="td2"><span>{{ deviceInfo.eth_mac }}</span></td>
+              <td class="td1">有线IP地址:</td>
+              <td class="td2"><span>{{ deviceInfo.eth_ip }}</span></td>
+            </tr>
+            <tr>
+              <td class="td1">出厂编号:</td>
+              <td class="td2"><span>{{ deviceInfo.code }}</span></td>
+              <td class="td1">SIP账号:</td>
+              <td class="td2"><span>{{ deviceInfo.sip_id }}</span></td>
+            </tr>
+            <tr>
+              <td class="td1">软件版本:</td>
+              <td class="td2"><span>{{ deviceInfo.soft_ver }}</span></td>
+              <td class="td1">硬件版本:</td>
+              <td class="td2"><span>{{ deviceInfo.hard_ver }}</span></td>
+            </tr>
+            <tr>
+              <td class="td1">WIFI物理地址:</td>
+              <td class="td2"><span>{{ deviceInfo.wifi_mac }}</span></td>
+              <td class="td1">WIFIIP地址:</td>
+              <td class="td2"><span>{{ deviceInfo.wifi_ip }}</span></td>
+            </tr>
+          </table>
+          <el-form-item label="可选护士:">
+            <el-radio-group v-model="deviceInfo.member_id">
+              <el-radio v-for="(item, index) in nurses" :key="index" :label="item.member_id">
+                <i class="el-icon-user-solid" style="color: #b59abf;margin-top: 5px" />{{ item.clerk_name }}
+              </el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="formshow = false">取 消</el-button>
+        <el-button type="primary" @click="handlerFormSubmit('editform')">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import * as API_Device from '@/api/ncs_device'
+import { unixToDate } from '@/utils/Foundation'
+import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
+import { DeviceUrl } from '@/utils/domain'
+import * as clerk_API from '@/api/ncs_clerk'
+
+export default {
+  name: 'Index',
+  data: function() {
+    return {
+      /** 表格数据 */
+      tableData: [],
+      /** 表单数据 */
+      formmodel: {},
+      formshow: false, // 编辑表单显示开关
+      /** 表单校验 */
+      rules: {
+        name: [
+          { required: true, message: '请输入名称', trigger: 'blur' }
+        ]
+      },
+      pageData: [],
+      loading: false,
+      multipleSelection: [],
+      /** 列表参数 */
+      params: {
+        page_size: 20,
+        page_no: 1,
+        fixedCondition: ' part_id=' + this.$store.getters.partId + ' and device_type = 7',
+        sort: 'id',
+        dir: 'desc'
+      },
+      editflag: 0,
+      deviceInfo: {},
+      nurses: [],
+      columnDefs: null, // 新表格
+      defaultColDef: null,
+      gridOptions: null,
+      gridApi: null,
+      columnApi: null,
+      localeText: AG_GRID_LOCALE_CN,
+      rowSelection: null,
+      showViewer: false
+    }
+  },
+  computed: {
+    tableHeight() {
+      return this.mainAreaHeight - 130
+    }
+  },
+  beforeMount() {
+    this.gridOptions = {
+    }
+    this.columnDefs = [
+      {
+        headerName: '#',
+        headerCheckboxSelection: true,
+        headerCheckboxSelectionFilteredOnly: true,
+        checkboxSelection: true,
+        sortable: false,
+        width: 50,
+        resizable: false,
+        valueGetter: this.hashValueGetter
+      },
+      { headerName: '设备别名', field: 'name', sortable: true, minWidth: 150 },
+      { headerName: '设备状态', field: 'status', sortable: true, cellRenderer: this.formatterSatus, minWidth: 100 },
+      { headerName: '绑定人', field: 'member_name', sortable: true, minWidth: 140 },
+      { headerName: '所属位置', field: 'full_name', sortable: true, minWidth: 140 },
+      { headerName: '有线物理地址', field: 'eth_mac', sortable: true, minWidth: 150 },
+      { headerName: '有线IP地址', field: 'eth_ip', sortable: true, minWidth: 150 },
+      { headerName: '设备型号', field: 'model', sortable: true, minWidth: 150 },
+      { headerName: '出厂编号', field: 'code', sortable: true, minWidth: 150 },
+      { headerName: '软件版本', field: 'soft_ver', sortable: true, minWidth: 150 },
+      { headerName: '硬件版本', field: 'hard_ver', sortable: true, minWidth: 150 },
+      { headerName: 'WIFI物理地址', field: 'wifi_mac', sortable: true, minWidth: 150 },
+      { headerName: 'WIFIIP地址', field: 'wifi_ip', sortable: true, minWidth: 150 },
+      { headerName: 'SIP账号', field: 'sip_id', sortable: true, minWidth: 150 },
+      { headerName: '最后修改时间', field: 'update_time', sortable: true, valueFormatter: this.formatterDate, minWidth: 170 }
+    ]
+    this.defaultColDef = {
+      filter: false,
+      sortable: true,
+      resizable: true,
+      comparator: this.testComparator,
+      filterParams: {
+        debounceMs: 200,
+        newRowsAction: 'keep',
+        textCustomComparator: this.textCustomComparator,
+        comparator: this.testComparator
+      }
+    }
+    this.rowSelection = 'multiple'
+  },
+  mounted() {
+    this.gridApi = this.gridOptions.api
+    this.getList()
+    this.initWebSocket()
+  },
+  methods: {
+    initWebSocket: function() {
+      const stockbase = DeviceUrl.replace('http', 'ws')
+      this.websock = new WebSocket(stockbase + '/web-socket/nurseDevice/' + this.$store.getters.partId)
+      this.websock.onopen = this.websocketonopen
+      this.websock.onerror = this.websocketonerror
+      this.websock.onmessage = this.websocketonmessage
+      this.websock.onclose = this.websocketclose
+    },
+    websocketonopen: function() {
+      console.log('WebSocket连接成功')
+      this.$message.success('连接成功')
+    },
+    websocketonerror: function(e) {
+      console.log('WebSocket连接发生错误')
+    },
+    websocketonmessage: function(e) {
+      console.log('收到消息:', e.data)
+      if (e.data) {
+        this.formshow = true
+        this.deviceInfo = JSON.parse(e.data)
+        this.getEmployees()
+      }
+    },
+    websocketclose: function(e) {
+      const _this = this
+      console.log('socket连接关闭connection closed (' + e.code + ')')
+      this.$alert('连接已断开,需重新连接', '连接确定', {
+        confirmButtonText: '确定',
+        callback: action => {
+          _this.initWebSocket()
+        }
+      })
+    },
+    /** 选择行变化时,记录选中的行数据 */
+    selectFun(val) {
+      this.multipleSelection = val
+    },
+    /** 分页大小发生改变 */
+    handlePageSizeChange(size) {
+      this.params.page_size = size
+      this.getList()
+    },
+    /** 分页页数发生改变 */
+    handlePageCurrentChange(page) {
+      this.params.page_no = page
+      this.getList()
+    },
+    /** 加载通知列表 */
+    getList() {
+      this.loading = true
+      this.gridApi.showLoadingOverlay()
+      this.gridApi.sizeColumnsToFit()
+      API_Device.getList(this.params).then(response => {
+        this.loading = false
+        this.tableData = response.data
+        this.pageData = {
+          page_no: response.page_no,
+          page_size: response.page_size,
+          data_total: response.data_total
+        }
+      }).catch(() => {
+        this.loading = false
+      })
+    },
+    /** 新增 提交表单 */
+    handlerFormSubmit(formName) {
+      if (this.deviceInfo.member_id === null || this.deviceInfo.member_id === '') {
+        this.$message.info('请选择护士')
+        return
+      }
+      const params = this.MixinClone(this.deviceInfo)
+      const sendData = {
+        id: params.id,
+        member_id: params.member_id,
+        status: 1,
+        eth_ip: params.eth_ip,
+        eth_ip_port: params.eth_ip_port
+      }
+      this.websock.send(JSON.stringify(sendData))
+      this.formshow = false
+      const _this = this
+      setTimeout(function() {
+        _this.$message.success('分配成功')
+        _this.getList()
+      }, 1000)
+    },
+    /** 处理搜索 */
+    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()
+    },
+    formatterDate(params) {
+      return unixToDate(params.value)
+    },
+    filterModifed(param) {
+      const model = param.api.getFilterModel()
+      this.params.filter = JSON.stringify(model)
+      this.GET_List()
+    },
+    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.GET_List()
+    },
+    formatterSatus(param) {
+      if (param.value === 1) {
+        return '<span style="color:green">已启用</span>'
+      } else {
+        return '<span style="color:red">未启用</span>'
+      }
+    },
+    getEmployees() {
+      const _this = this
+      clerk_API.listByPartRoleId({ partId: this.$store.getters.partId }).then(res => {
+        const groupBy = (arr, func) =>
+          arr.map(typeof func === 'function' ? func : val => val[func]).reduce((acc, val, i) => {
+            acc[val] = (acc[val] || []).concat(arr[i])
+            return acc
+          }, {})
+        const groupData = groupBy(res, item => item.role_name)
+        if (Object.entries(groupData).length > 0) {
+          Object.entries(groupData).forEach(item => {
+            if (item[0] === '护士') {
+              _this.nurses = item[1]
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style type="text/scss" scoped>
+  .tablewen{
+    width:100%;
+    border-collapse:collapse;
+    border: 1px solid #a5b6c8;
+    margin-bottom: 30px;
+    line-height: 40px;
+  }
+  .tablewen td{
+    font-size: 14px;
+    -webkit-margin-before: 0.83em;
+    -webkit-margin-after: 0.83em;
+    -webkit-margin-start: 0px;
+    -webkit-margin-end: 0px;
+    font-weight: bold;
+  }
+  .tablewen td span{
+    font-size: 0.8em;
+    -webkit-margin-before: 0.83em;
+    -webkit-margin-after: 0.83em;
+    -webkit-margin-start: 0px;
+    -webkit-margin-end: 0px;
+    font-weight: bold;
+    color: #8c939d;
+    margin-left: 5px;
+  }
+  .tablewen .td1{
+    width:15%;
+  }
+  .tablewen .td2{
+    width:20%;
+  }
+</style>

+ 227 - 68
src/views/ncs-event/index.vue

@@ -1,14 +1,68 @@
 <template>
     <div class="formwrap">
-        <en-table-layout
-                toolbar
-                @selection-change="selectFun"
-                @sort-change="tableSort"
-                pagination
-                :tableData="tableData"
-                :height="600"
-                :loading="loading"
-                :default-sort="{prop: 'id', order: 'ascending'}"
+<!--        <en-table-layout-->
+<!--                toolbar-->
+<!--                @selection-change="selectFun"-->
+<!--                @sort-change="tableSort"-->
+<!--                pagination-->
+<!--                :tableData="tableData"-->
+<!--                :height="600"-->
+<!--                :loading="loading"-->
+<!--                :default-sort="{prop: 'id', order: 'ascending'}"-->
+<!--        >-->
+<!--            &lt;!&ndash;表头&ndash;&gt;-->
+<!--            <template slot="table-columns">-->
+<!--                <el-table-column type="selection" width="55" align="center"></el-table-column>-->
+<!--                <el-table-column style="text-align: left;" label="图标" width="70">-->
+<!--                    <template slot-scope="scope">-->
+<!--                        <el-image :src="scope.row.icon_src" lazy fit="cover" :preview-src-list="srcList" @click="lookBigImg(scope.row.icon_src)">-->
+<!--                            <div slot="error" class="image-slot">-->
+<!--                                <i class="el-icon-picture-outline"></i>-->
+<!--                            </div>-->
+<!--                        </el-image>-->
+<!--                    </template>-->
+<!--                </el-table-column>-->
+<!--                <el-table-column prop="name" label="名称" min-width="150" align="center" />-->
+<!--                <el-table-column prop="desc" label="描述" min-width="150" align="center" />-->
+<!--                <el-table-column prop="key_code" label="唯一标识码" width="160" align="center" />-->
+<!--                <el-table-column prop="min_x" label="x轴范围" align="center" width="150" :formatter="formatterX" />-->
+<!--                <el-table-column prop="min_y" label="y轴范围" width="150" align="center" :formatter="formatterY" />-->
+<!--                <el-table-column prop="create_time" label="创建时间" width="170" align="center" :formatter="formatterDate" />-->
+<!--                <el-table-column style="text-align: left;" label="操作" width="150">-->
+<!--                    <template slot-scope="scope">-->
+<!--                        <el-button type="success" size="mini"  @click="handlerEdit(scope.$index,scope.row)">编辑</el-button>-->
+<!--                        <el-button type="danger" size="mini"  @click="handlerDelete(scope.row.id)">删除</el-button>-->
+<!--                    </template>-->
+<!--                </el-table-column>-->
+<!--            </template>-->
+
+<!--            &lt;!&ndash;翻页&ndash;&gt;-->
+<!--            <el-pagination-->
+<!--                    slot="pagination"-->
+<!--                    v-if="pageData"-->
+<!--                    :current-page="pageData.page_no"-->
+<!--                    :page-sizes="[10, 20, 50, 100]"-->
+<!--                    :page-size="pageData.page_size"-->
+<!--                    @size-change="handlePageSizeChange"-->
+<!--                    @current-change="handlePageCurrentChange"-->
+<!--                    layout="total, sizes, prev, pager, next, jumper"-->
+<!--                    :total="pageData.data_total">-->
+<!--            </el-pagination>-->
+<!--        </en-table-layout>-->
+
+        <ag-grid-layout
+                :table-height="tableHeight"
+                theme="ag-theme-alpine"
+                :column-defs="columnDefs"
+                :row-data="tableData"
+                :locale-text="localeText"
+                :grid-options="gridOptions"
+                :default-col-def="defaultColDef"
+                :animate-rows="true"
+                :row-selection="rowSelection"
+                rowHeight="50"
+                @filterChanged="filterModifed"
+                @sortChanged="gridSortChange"
         >
             <!--工具栏-->
             <div slot="toolbar" class="inner-toolbar">
@@ -19,45 +73,21 @@
                     <el-button type="primary" @click="handleAdd">新增</el-button>
                 </div>
             </div>
-            <!--表头-->
-            <template slot="table-columns">
-                <el-table-column type="selection" width="55" align="center"></el-table-column>
-                <el-table-column style="text-align: left;" label="图标" width="70">
-                    <template slot-scope="scope">
-                        <el-image :src="scope.row.icon_src" lazy fit="cover" :preview-src-list="srcList" @click="lookBigImg(scope.row.icon_src)">
-                            <div slot="error" class="image-slot">
-                                <i class="el-icon-picture-outline"></i>
-                            </div>
-                        </el-image>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="name" label="名称" min-width="150" align="center" />
-                <el-table-column prop="desc" label="描述" min-width="150" align="center" />
-                <el-table-column prop="key_code" label="唯一标识码" width="160" align="center" />
-                <el-table-column prop="min_x" label="x轴范围" align="center" width="150" :formatter="formatterX" />
-                <el-table-column prop="min_y" label="y轴范围" width="150" align="center" :formatter="formatterY" />
-                <el-table-column prop="create_time" label="创建时间" width="170" align="center" :formatter="formatterDate" />
-                <el-table-column style="text-align: left;" label="操作" width="150">
-                    <template slot-scope="scope">
-                        <el-button type="success" size="mini"  @click="handlerEdit(scope.$index,scope.row)">编辑</el-button>
-                        <el-button type="danger" size="mini"  @click="handlerDelete(scope.row.id)">删除</el-button>
-                    </template>
-                </el-table-column>
-            </template>
-
-            <!--翻页-->
             <el-pagination
-                    slot="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"
-                    layout="total, sizes, prev, pager, next, jumper"
-                    :total="pageData.data_total">
-            </el-pagination>
-        </en-table-layout>
+            />
+        </ag-grid-layout>
+        <template>
+            <image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="srcList"/>
+        </template>
         <!--编辑表单-->
         <el-dialog title="编辑按钮事件" :visible.sync="formshow" width="50%">
             <div>
@@ -109,9 +139,17 @@
 <script>
     import * as API_event from '@/api/ncs_event'
     import {unix2Date, unixToDate} from "@/utils/Foundation"
-    import {serverUrl} from "@/utils/domain";
+    import {serverUrl} from "@/utils/domain"
+    import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
+    import {param} from "@/utils"
+    import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender"
+    import AgGridImg from "@/components/AgGridImg/AgGridImg"
+    import ImageViewer from "element-ui/packages/image/src/image-viewer"
+    let prevOverflow = ''
+
     export default {
         name: 'index',
+        components: { ButtonCellRender, AgGridImg, ImageViewer },
         data: function () {
             return {
                 /** 表格数据 */
@@ -137,7 +175,15 @@
                 editflag: 0,
                 srcList: ['1'],
                 uploadurl: serverUrl + '/ncs/upload/uploadFile',
-                imageUrl: ''
+                imageUrl: '',
+                columnDefs: null, // 新表格
+                defaultColDef: null,
+                gridOptions: null,
+                gridApi: null,
+                columnApi: null,
+                localeText: AG_GRID_LOCALE_CN,
+                rowSelection: null,
+                showViewer: false
             }
         },
         computed: {
@@ -145,6 +191,84 @@
                 return this.mainAreaHeight - 130
             }
         },
+        beforeMount() {
+            this.gridOptions = {
+            }
+            this.columnDefs = [
+                {
+                    headerName: '#',
+                    headerCheckboxSelection: true,
+                    headerCheckboxSelectionFilteredOnly: true,
+                    checkboxSelection: true,
+                    sortable: false, filter: false,
+                    width: 50,
+                    resizable: false,
+                    valueGetter: this.hashValueGetter
+                },
+                { headerName: '图标', field: 'icon_src', sortable: true, filter: false, width: 70,
+                    cellRendererFramework: 'AgGridImg',
+                    cellRendererParams: param => {
+                        return {
+                            onClick: this.lookBigImg,
+                            face: 'icon_src'
+                        }
+                    },
+                },
+                { headerName: '名称', field: 'name', sortable: true, minWidth: 150 },
+                { headerName: '描述', field: 'desc', sortable: true, minWidth: 220 },
+                { headerName: '唯一标识码', field: 'key_code', sortable: true, width: 160 },
+                { headerName: 'x轴范围', field: 'min_x', sortable: true, filter: false, valueFormatter: this.formatterX, minWidth: 150 },
+                { headerName: 'y轴范围', field: 'min_y', sortable: true, filter: false, valueFormatter: this.formatterY, width: 150 },
+                { headerName: '创建时间', field: 'create_time', sortable: true, filter: false, valueFormatter: this.formatterDate, width: 170 },
+                { headerName: '编辑', field: 'id',
+                    cellRendererFramework: 'ButtonCellRender',
+                    cellRendererParams: param => {
+                        return {
+                            onClick: this.handlerEdit,
+                            label: '编辑',
+                            buttonType: 'primary',
+                            buttonSize: 'mini'
+                        }
+                    },
+                    filter: false,
+                    pinned: 'right',
+                    lockPinned: true,
+                    width: 100,
+                    resizable: false,
+                    sortable: false
+                },
+                { headerName: '删除', field: 'id',
+                    cellRendererFramework: 'ButtonCellRender',
+                    cellRendererParams: param => {
+                        return {
+                            onClick: this.deleteSingle,
+                            label: '删除',
+                            buttonType: 'danger',
+                            buttonSize: 'mini'
+                        }
+                    },
+                    pinned: 'right',
+                    lockPinned: true,
+                    width: 100,
+                    resizable: false,
+                    filter: false,
+                    sortable: false
+                }
+            ]
+            this.defaultColDef = {
+                filter: 'agTextColumnFilter',
+                sortable: true,
+                resizable: true,
+                comparator: this.testComparator,
+                filterParams: {
+                    debounceMs: 200,
+                    newRowsAction: 'keep',
+                    textCustomComparator: this.textCustomComparator,
+                    comparator: this.testComparator
+                }
+            },
+                this.rowSelection = 'multiple'
+        },
         mounted() {
             this.getList()
         },
@@ -159,7 +283,7 @@
                 this.editflag = 0
                 this.formshow = true
             },
-            handlerEdit: function (index, row) {
+            handlerEdit: function (row) {
                 this.formmodel = Object.assign({}, row)
                 this.imageUrl = row.icon_src
                 this.editflag = 1
@@ -169,6 +293,9 @@
             selectFun(val) {
                 this.multipleSelection = val
             },
+            deleteSingle(row) {
+                this.handlerDelete(row.id)
+            },
             /** 单条数据删除处理 */
             handlerDelete(ids) {
                 this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
@@ -197,18 +324,6 @@
                     })
                 })
             },
-            /** 批量数据删除处理(删除选中的行) */
-            batchDelete: function () {
-                if (rows.length === 0) {
-                    this.$message({ type: 'info', message: '请先勾选需要删除的数据' })
-                    return
-                }
-                const ids = []
-                rows.forEach(function (item) {
-                    ids.push(item.id)
-                })
-                this.handlerDelete(ids.join(','))
-            },
             /** 分页大小发生改变 */
             handlePageSizeChange(size) {
                 this.params.page_size = size
@@ -279,10 +394,6 @@
                 }
                 this.getList()
             },
-            lookBigImg(img) {
-                this.srcList = []
-                this.srcList.push(img)
-            },
             /** 图片上传之前的校验 */
             handleShopLogoBefore(file) {
                 return new Promise((resolve, reject) => {
@@ -328,18 +439,18 @@
                 this.imageUrl = serverUrl + '/' + res
                 this.formmodel.icon_src = this.imageUrl
             },
-            formatterX(row, column, cellValue) {
-                if (row.min_x != null && row.min_x !== '' && row.max_x != null && row.max_x !== '') {
-                    return row.min_x + '-' + row.max_x
+            formatterX(row) {
+                if (row.data.min_x != null && row.data.min_x !== '' && row.data.max_x != null && row.data.max_x !== '') {
+                    return row.data.min_x + '-' + row.data.max_x
                 }
             },
-            formatterY(row, column, cellValue) {
-                if (row.min_y != null && row.min_y !== '' && row.max_y != null && row.max_y !== '') {
-                    return row.min_y + '-' + row.max_y
+            formatterY(row) {
+                if (row.data.min_y != null && row.data.min_y !== '' && row.data.max_y != null && row.data.max_y !== '') {
+                    return row.data.min_y + '-' + row.data.max_y
                 }
             },
-            formatterDate(row, column, cellValue) {
-                return unixToDate(row.create_time)
+            formatterDate(params) {
+                return unixToDate(params.value)
             },
             handleChangeMinX(val) {
                 if (this.formmodel.max_x <= val || !this.formmodel.max_x) {
@@ -370,6 +481,54 @@
                     this.formmodel.min_y = 0
                 }
 
+            },
+            lookBigImg(row) {
+                this.srcList = []
+                this.srcList.push(row.icon_src)
+                prevOverflow = document.body.style.overflow;
+                document.body.style.overflow = 'hidden';
+                this.showViewer = true;
+            },
+            closeViewer() {
+                document.body.style.overflow = prevOverflow;
+                this.showViewer = false;
+            },
+            filterModifed(param) {
+                let model = param.api.getFilterModel()
+                this.params.filter = JSON.stringify(model)
+                this.GET_List()
+            },
+            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.GET_List()
             }
         }
     }

+ 383 - 0
src/views/ncs-interaction/index.vue

@@ -0,0 +1,383 @@
+<template>
+  <div class="app-container">
+
+    <ag-grid-layout
+      :table-height="tableHeight"
+      theme="ag-theme-alpine"
+      :column-defs="columnDefs"
+      :row-data="tableData"
+      :locale-text="localeText"
+      :grid-options="gridOptions"
+      :default-col-def="defaultColDef"
+      :animate-rows="true"
+      :row-selection="rowSelection"
+      row-height="50"
+      @filterChanged="filterModifed"
+      @sortChanged="gridSortChange"
+    >
+      <!--工具栏-->
+      <div slot="toolbar" class="inner-toolbar">
+        <div class="toolbar-search">
+          <en-table-search placeholder="请输入发起方或接收方" @search="handlerSearch" />
+        </div>
+        <div class="toolbar-btns">
+
+          <el-form label-width="120px">
+            <el-form-item label="搜索时间段">
+              <el-date-picker
+                v-model="searchDateRange"
+                type="daterange"
+                align="right"
+                unlink-panels
+                value-format="yyyy/MM/dd"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                :picker-options="pickerOptions"
+                :default-time="['00:00:00', '23:59:59']"
+                @change="dateRangeChange"
+              />
+              <el-button type="danger" @click="batchDelete">删除</el-button>
+            </el-form-item>
+
+          </el-form>
+        </div>
+      </div>
+      <el-pagination
+        v-if="pageData"
+        slot="pagination"
+        :current-page="pageData.page_no"
+        :page-sizes="[20, 50, 100, 200]"
+        :page-size="pageData.page_size"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="pageData.data_total"
+        @size-change="handlePageSizeChange"
+        @current-change="handlePageCurrentChange"
+      />
+    </ag-grid-layout>
+
+  </div>
+</template>
+
+<script>
+import * as API_interaction from '@/api/ncs_interaction'
+import { unixToDate } from '@/utils/Foundation'
+import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
+import { returnDeviceType } from '@/utils/device_type'
+
+export default {
+  name: 'Index',
+  data() {
+    return {
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick(picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+            picker.$emit('pick', [start, end])
+          }
+        }, {
+          text: '最近一个月',
+          onClick(picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+            picker.$emit('pick', [start, end])
+          }
+        }, {
+          text: '最近三个月',
+          onClick(picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+            picker.$emit('pick', [start, end])
+          }
+        }]
+      },
+      tableData: [],
+      /** 列表参数 */
+      params: {
+        page_size: 20,
+        page_no: 1,
+        fixedCondition: ' part_id=' + this.$store.getters.partId,
+        sort: 'id',
+        dir: 'desc'
+      },
+      pageData: [],
+      loading: false,
+      searchDateRange: [],
+      callingType: null,
+      columnDefs: null, // 新表格
+      defaultColDef: null,
+      gridOptions: null,
+      gridApi: null,
+      columnApi: null,
+      localeText: AG_GRID_LOCALE_CN,
+      rowSelection: null,
+      showViewer: false
+    }
+  },
+  computed: {
+    tableHeight() {
+      return this.mainAreaHeight - 130
+    }
+  },
+  beforeMount() {
+    this.gridOptions = {
+    }
+    this.columnDefs = [
+      {
+        headerName: '#',
+        headerCheckboxSelection: true,
+        headerCheckboxSelectionFilteredOnly: true,
+        checkboxSelection: true,
+        sortable: false, filter: false,
+        width: 50,
+        resizable: false,
+        valueGetter: this.hashValueGetter
+      },
+      { headerName: '发起方', field: 'fromMemberName', sortable: true, valueFormatter: this.formatterFromName, minWidth: 150 },
+      { headerName: '接收方', field: 'toMemberName', sortable: true, valueFormatter: this.formatterToName, minWidth: 150 },
+      { headerName: '交互类型', field: 'action_type', sortable: true, valueFormatter: this.formatterType, width: 100 },
+      { headerName: '交互结果', field: 'action_end', sortable: true, cellRenderer: this.formatterResult, width: 100 },
+      { headerName: '交互数据', field: 'data', sortable: true, width: 120 },
+      { headerName: '交互时间', field: 'create_date', sortable: true, valueFormatter: this.formatterDate, width: 150 },
+      { headerName: '发起设备', field: 'from_device_type', sortable: true, valueFormatter: this.formatterDeviceType, width: 120 },
+      { headerName: '接收设备', field: 'to_device_type', sortable: true, valueFormatter: this.formatterDeviceType, width: 120 }
+    ]
+    this.defaultColDef = {
+      filter: false,
+      sortable: true,
+      resizable: true,
+      comparator: this.testComparator,
+      filterParams: {
+        debounceMs: 200,
+        newRowsAction: 'keep',
+        textCustomComparator: this.textCustomComparator,
+        comparator: this.testComparator
+      }
+    }
+    this.rowSelection = 'multiple'
+  },
+  mounted() {
+    this.gridApi = this.gridOptions.api
+    this.getList()
+  },
+  methods: {
+    /** 批量数据删除处理(删除选中的行) */
+    batchDelete: function() {
+      const rows = this.gridApi.getSelectedRows()
+      if (rows.length === 0) {
+        this.$message({ type: 'info', message: '请先勾选需要删除的数据' })
+        return
+      }
+      const ids = []
+      rows.forEach(function(item) {
+        ids.push(item.id)
+      })
+      this.handlerDelete(ids.join(','))
+    },
+    /** 删除单条数据 */
+    handlerDelete(ids) {
+      this.$confirm('删除操作后数据不可复原,您确定要删除此数据?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        API_interaction.remove(ids).then(
+          response => {
+            this.getList()
+            this.$message({
+              type: 'success',
+              message: '删除成功!'
+            })
+          }
+        ).catch(response => {
+          this.$message({
+            type: 'info',
+            message: response.message
+          })
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        })
+      })
+    },
+    /** 分页大小发生改变 */
+    handlePageSizeChange(size) {
+      this.params.page_size = size
+      this.getList()
+    },
+
+    /** 分页页数发生改变 */
+    handlePageCurrentChange(page) {
+      this.params.page_no = page
+      this.getList()
+    },
+    /** 加载列表数据 */
+    getList() {
+      this.loading = true
+      this.gridApi.showLoadingOverlay()
+      this.gridApi.sizeColumnsToFit()
+      const param = this.MixinClone(this.params)
+      API_interaction.getList(param).then(response => {
+        this.loading = false
+        this.tableData = [...response.data]
+        this.pageData = {
+          page_no: response.page_no,
+          page_size: response.page_size,
+          data_total: response.data_total
+        }
+      }).catch(() => {
+        this.loading = false
+      })
+    },
+    /** 处理搜索 */
+    handlerSearch(value) {
+      this.params.filerStr = value
+      this.getList()
+    },
+    formatterCreateTime(row, column, cellValue) {
+      return unixToDate(row.create_time)
+    },
+    /** 处理字段排序 */
+    tableSort(column) {
+      if (column.order !== null) {
+        this.params.sort = column.prop
+        this.params.dir = column.order === 'ascending' ? 'asc' : 'desc'
+      } else {
+        this.params.sort = null
+        this.params.dir = null
+      }
+      this.getList()
+    },
+    dateRangeChange(value) {
+      if (value && value.length > 0) {
+        this.params.start_date = value[0]
+        this.params.end_date = value[1]
+      } else {
+        delete this.params.start_date
+        delete this.params.end_date
+      }
+
+      this.getList()
+    },
+    formatterFromName(row) {
+      if (!row.data.outerior_action && row.data.relative_id === null) {
+        let named = ''
+        if (row.data.from_frame_full_name && row.data.from_member_name) {
+          named = row.data.from_frame_full_name + row.data.from_member_name
+        } else if (row.data.from_frame_full_name) {
+          named = row.data.from_frame_full_name
+        } else if (row.data.from_member_name) {
+          named = row.data.from_member_name
+        }
+        return named
+      } else {
+        return row.data.from_member_name + '的' + row.data.relative_name
+      }
+    },
+    formatterToName(row) {
+      let named = ''
+      if (row.data.to_frame_full_name && row.data.to_member_name) {
+        named = row.data.to_frame_full_name + row.data.to_member_name
+      } else if (row.data.to_frame_full_name) {
+        named = row.data.to_frame_full_name
+      } else if (row.data.to_member_name) {
+        named = row.data.to_member_name
+      }
+      return named
+    },
+    formatterType(param) {
+      switch (param.value) {
+        case 'CALLBACK':
+          return 'TCP反馈'
+        case 'VOICE':
+          return '语音'
+        case 'VIDEO':
+          return '视频'
+        case 'IM':
+          return '留言'
+        case 'DEVICE':
+          return '设备'
+        case 'DATA':
+          return '数据'
+        case 'EVENT':
+          return '事件'
+        case 'BROADCAST':
+          return '广播'
+        case 'TIME':
+          return '时间'
+        default:
+          return '未知'
+      }
+    },
+    formatterResult(param) {
+      if (param.value) {
+        return '<span style="color:green">成功</span>'
+      } else if (!param.value) {
+        return '<span style="color:red">未响应</span>'
+      }
+    },
+    formatterDeviceType(param) {
+      if (param.data.outerior_action) {
+        return returnDeviceType(param.value)
+      } else {
+        if (param.value) {
+          return returnDeviceType(param.value)
+        } else {
+          return '暂未响应'
+        }
+      }
+    },
+    formatterDate(params) {
+      return unixToDate(params.value)
+    },
+    filterModifed(param) {
+      const model = param.api.getFilterModel()
+      this.params.filter = JSON.stringify(model)
+      this.getList()
+    },
+    gridSortChange(param) {
+      const columnState = param.columnApi.getColumnState()
+      // 排序状态
+      const sortState = columnState.filter(function(s) {
+        return s.sort != null
+      }).map(function(s) {
+        return {
+          colId: s.colId,
+          sort: s.sort,
+          sortIndex: s.sortIndex
+        }
+      }).sort(function(a, b) {
+        return a.sortIndex - b.sortIndex
+      })
+      if (sortState.length > 0) {
+        if (sortState.length === 1) {
+          this.params.sort = sortState[0].colId
+          this.params.dir = sortState[0].sort
+        } else {
+          let sortstring = ''
+          sortState.forEach(function(item) {
+            sortstring += item.colId + ' ' + item.sort + ','
+          })
+          this.params.sort = sortstring.substring(0, sortstring.length - 1)
+          this.params.dir = ' '
+        }
+      } else {
+        delete this.params.sort
+        delete this.params.dir
+      }
+      this.getList()
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 3 - 70
src/views/ncs-task/index.vue

@@ -1,72 +1,5 @@
 <template>
     <div class="formwrap">
-<!--        <en-table-layout-->
-<!--                toolbar-->
-<!--                @selection-change="selectFun"-->
-<!--                @sort-change="tableSort"-->
-<!--                pagination-->
-<!--                :tableData="tableData"-->
-<!--                :height="600"-->
-<!--                :loading="loading"-->
-<!--                fit-->
-<!--                tooltip-effect="light"-->
-<!--                :default-sort="{prop: 'publish_time', order: 'descending'}"-->
-<!--        >-->
-<!--            &lt;!&ndash;工具栏&ndash;&gt;-->
-<!--            <div slot="toolbar" class="inner-toolbar">-->
-<!--                <div class="toolbar-search">-->
-<!--                    <en-table-search @search="handlerSearch" placeholder="请输入搜索关键字"/>-->
-<!--                </div>-->
-<!--                <div class="toolbar-btns">-->
-<!--                    <el-button type="primary" @click="handlerAdd">新增</el-button>-->
-<!--                    <el-button type="danger" @click="batchDelete">删除</el-button>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--            &lt;!&ndash;表头&ndash;&gt;-->
-<!--            <template slot="table-columns">-->
-<!--                <el-table-column type="selection" width="55" align="center"></el-table-column>-->
-<!--                <el-table-column prop="task_content" label="内容" :formatter="contentformatter" align="left" min-width="300" :show-overflow-tooltip="true" />-->
-<!--                <el-table-column prop="task_plan_time" sortable="custom" label="计划任务时间" :formatter="formatterDate" align="center" width="170" />-->
-<!--                <el-table-column prop="task_do_time" sortable="custom" label="实际任务时间" :formatter="formatterDate2" align="center" width="170" />-->
-<!--                <el-table-column prop="task_success" label="任务状态" align="center">-->
-<!--                    <template slot-scope="scope">-->
-<!--                        <el-tag type="success" v-if="scope.row.task_result">成功</el-tag>-->
-<!--                        <el-tag type="error" v-if="scope.row.task_result == false">失败</el-tag>-->
-<!--                        <el-tag type="warning" v-if="scope.row.task_result == null">暂未操作</el-tag>-->
-<!--                    </template>-->
-<!--                </el-table-column>-->
-<!--                <el-table-column prop="result" label="任务结果" width="220" :show-overflow-tooltip="true"/>-->
-<!--                <el-table-column prop="task_do_name" label="最新操作人" width="100" align="center" />-->
-<!--                <el-table-column prop="create_id" label="创建人" width="100">-->
-<!--                    <template slot-scope="scope">-->
-<!--                        <span v-if="scope.row.create_id==0">系统</span>-->
-<!--                        <span v-else>{{scope.row.create_name}}</span>-->
-<!--                    </template>-->
-<!--                </el-table-column>-->
-<!--                <el-table-column style="text-align: left;" label="操作" width="160" fixed="right">-->
-<!--                    <template slot-scope="scope">-->
-<!--                        <el-button type="success" size="mini" @click="handlerEdit(scope.$index,scope.row)">-->
-<!--                            操作-->
-<!--                        </el-button>-->
-<!--                        <el-button type="danger" size="mini" @click="handlerDelete(scope.row.id)">-->
-<!--                            删除-->
-<!--                        </el-button>-->
-<!--                    </template>-->
-<!--                </el-table-column>-->
-<!--            </template>-->
-<!--            &lt;!&ndash;翻页&ndash;&gt;-->
-<!--            <el-pagination-->
-<!--                    slot="pagination"-->
-<!--                    v-if="pageData"-->
-<!--                    :current-page="pageData.page_no"-->
-<!--                    :page-sizes="[10, 20, 50, 100]"-->
-<!--                    :page-size="pageData.page_size"-->
-<!--                    @size-change="handlePageSizeChange"-->
-<!--                    @current-change="handlePageCurrentChange"-->
-<!--                    layout="total, sizes, prev, pager, next, jumper"-->
-<!--                    :total="pageData.data_total">-->
-<!--            </el-pagination>-->
-<!--        </en-table-layout>-->
         <el-tabs v-model="activeName" @tab-click="handleClick">
             <el-tab-pane label="全部" name="all"></el-tab-pane>
             <el-tab-pane label="未操作" name="not_operating"></el-tab-pane>
@@ -172,9 +105,9 @@
     import {unix2Date, unixToDate} from "@/utils/Foundation"
     import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
     import Tooltip from '../../components/Tooltip/Tooltip'
-    import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender";
-    import {serverUrl} from "@/utils/domain";
-    import {param} from "@/utils";
+    import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender"
+    import {serverUrl} from "@/utils/domain"
+    import {param} from "@/utils"
     export default {
         name: 'index',
         components: { Tooltip, ButtonCellRender },