Browse Source

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

* 'master' of http://git.wdklian.com/allen/ncs_ui:
  修复因为domain文件移位,导致device和system连接异常的问题,新增医嘱输入的功能,修复首页滚动有误的问题,修复首页用户备注更多跳转错误的问题,禁用空间结构中科室和医院的编辑删除功能
  重构蓝牙信标定位

# Conflicts:
#	src/views/customer/customerEdit.vue
#	src/views/ncs-device/components/deviceManager.vue
#	src/views/ncs-orginazition/components/AppVersionManager.vue
wuyunfeng 3 years ago
parent
commit
5a3ad78837

+ 2 - 2
src/views/customer/components/elderlyCareManager.vue

@@ -473,13 +473,13 @@
     import {unix2Date, unixToDate} from '@/utils/Foundation'
     import * as API_Frame from '@/api/ncs_hospitalFrame'
     import * as RegExp from '@/utils/RegExp'
-    import {serverUrl} from '@/utils/domain'
+    // import {serverUrl} from '@/utils/domain'
     import * as API_Remark from '@/api/ncs_remark'
     import * as API_User from '@/api/user'
     import * as API_Clerk from '@/api/ncs_clerk'
     import * as API_NurseConfig from '@/api/ncs_nurse_config'
     import vitalSignLog from '@/views/vital-sign/log'
-
+    const serverUrl = domain.serverUrl
     export default {
         name: 'ElderlyCareManager',
         components: {ButtonCellRender, ListFilter, RadioFilter, vitalSignLog},

+ 16 - 3
src/views/customer/components/patientManager.vue

@@ -43,7 +43,7 @@
         <el-dialog :visible.sync="customerFormVisible" title="用户信息" class="customer-dialog">
             <el-tabs v-model="activeName" type="border-card" tab-position="bottom" width="50%" @tab-click="handleClick">
                 <el-tab-pane label="基本信息" name="customerBaseInfo">
-                    <div style="height: 590px">
+                    <div style="height: 720px">
                         <el-form ref="editForm" :model="formmodel" :rules="rules" label-width="120px">
                             <el-row>
                                 <el-col :span="12">
@@ -182,6 +182,19 @@
                                 </el-col>
                             </el-row>
 
+                          <el-row>
+                            <el-form-item label="医嘱">
+                              <el-input
+                                  v-model="formmodel.advice"
+                                  type="textarea"
+                                  :autosize="{ minRows: 2, maxRows: 4}"
+                                  :minlength="2"
+                                  :maxlength="50"
+                                  :placeholder="'请输入文本内容,长度2~50'"
+                              />
+                            </el-form-item>
+                          </el-row>
+
                             <el-row>
                                 <el-col :span="8">
                                     <el-form-item label="责任医生">
@@ -473,13 +486,13 @@
     import {unix2Date, unixToDate} from '@/utils/Foundation'
     import * as API_Frame from '@/api/ncs_hospitalFrame'
     import * as RegExp from '@/utils/RegExp'
-    import {serverUrl} from '@/utils/domain'
+    // import {serverUrl} from '@/utils/domain'
     import * as API_Remark from '@/api/ncs_remark'
     import * as API_User from '@/api/user'
     import * as API_Clerk from '@/api/ncs_clerk'
     import * as API_NurseConfig from '@/api/ncs_nurse_config'
     import vitalSignLog from '@/views/vital-sign/log'
-
+    const serverUrl = domain.serverUrl
     export default {
         name: 'PatientManager',
         components: {ButtonCellRender, ListFilter, RadioFilter, vitalSignLog},

+ 9 - 1
src/views/dashboard/calling/index.vue

@@ -134,6 +134,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_interaction'
+const uiVersion = domain.uiVersion
 
 export default {
   name: 'Index',
@@ -191,19 +192,22 @@ export default {
       param.fixedCondition = ' part_id = ' + this.$store.getters.partId
       const _this = this
       _this.todayList = []
+      let data = []
       API_task.getList(param).then(response => {
         const today = (new Date().setHours(0, 0, 0, 0)) / 1000
         const todayend = (today * 1000 + 86400000) / 1000
         response.data.forEach((item, index) => {
           if (item.task_plan_time >= today && item.task_plan_time < todayend) {
-            _this.todayList.push(item)
+            data.push(item)
           }
         })
+        _this.todayList = data
       })
     },
     getNoteList() {
       const param = this.MixinClone(this.params)
       param.fixedCondition = ' type = 2 and part_id=' + this.$store.getters.partId
+      param.page_size = 20
       const _this = this
       API_Remark.getRemarks(param).then(response => {
         _this.noteList = response.data
@@ -212,6 +216,7 @@ export default {
     getRemarkList() {
       const param = this.MixinClone(this.params)
       param.fixedCondition = ' type = 1 and part_id=' + this.$store.getters.partId
+      param.page_size = 20
       const _this = this
       API_Remark.getRemarks(param).then(response => {
         _this.remarkList = response.data
@@ -235,6 +240,9 @@ export default {
       this.isShowArticle = true
     },
     goMove(path) {
+      if (path === 'customerList') {
+        uiVersion === 1 ? path = 'patientManagement' : uiVersion === 2 ? path = 'customerManager' : path = 'elderlyCareManager'
+      }
       this.$router.push({ name: path })
     },
     formatterFromName(row, column, cellValue) {

+ 2 - 1
src/views/hospital/ncs_frame/frameTreeView.vue

@@ -52,13 +52,14 @@
               />
               <el-button
                 type="text"
+                :disabled="data.type===1 || data.type===3"
                 size="mini"
                 icon="el-icon-edit"
                 @click.stop="() => edit(data)"
               />
               <el-button
                 type="text"
-                :disabled="data.id===1"
+                :disabled="data.type===1"
                 size="mini"
                 icon="el-icon-delete"
                 @click.stop="() => remove(data)"

+ 4 - 2
src/views/hospitalFrame/frameTreeView-admin.vue

@@ -46,13 +46,14 @@
               />
               <el-button
                 type="text"
+                :disabled="data.type===1 || data.type===3"
                 size="mini"
                 icon="el-icon-edit"
                 @click.stop="() => edit(data)"
               />
               <el-button
                 type="text"
-                :disabled="data.id===1"
+                :disabled="data.type===1"
                 size="mini"
                 icon="el-icon-delete"
                 @click.stop="() => remove(data)"
@@ -195,8 +196,9 @@ import * as API_FrameGroup from '@/api/ncs_frameGroup'
 import CustomerManager from '../customer/components/customerManager'
 import DeviceManager from '../ncs-device/components/deviceManager'
 import PatientManager from '../customer/components/patientManager'
-import { uiVersion } from '@/utils/domain'
+// import { uiVersion } from '@/utils/domain'
 import { FRAME_TYPE } from '@/utils/enum/FrameTypeEnum'
+const uiVersion = domain.uiVersion
 export default {
   name: 'FrameTreeView',
   components: { PatientManager, DeviceManager, CustomerManager },

+ 2 - 1
src/views/hospitalFrame/frameTreeView.vue

@@ -46,13 +46,14 @@
               />
               <el-button
                 type="text"
+                :disabled="data.type===1 || data.type===3"
                 size="mini"
                 icon="el-icon-edit"
                 @click.stop="() => edit(data)"
               />
               <el-button
                 type="text"
-                :disabled="data.id===1"
+                :disabled="data.type===1 || data.type===3"
                 size="mini"
                 icon="el-icon-delete"
                 @click.stop="() => remove(data)"

+ 2 - 1
src/views/hospitalFrame/nurse_watch_frame.vue

@@ -71,7 +71,8 @@
      */
 import * as API_hospitalFrame from '@/api/ncs_hospitalFrame'
 import * as API_device from '@/api/ncs_device'
-import { uiVersion } from '@/utils/domain'
+// import { uiVersion } from '@/utils/domain'
+const uiVersion = domain.uiVersion
 import {getFrameByRoleGroupId} from "@/api/ncs_hospitalFrame";
 
 export default {

+ 3 - 1
src/views/ncs-broadcast/index.vue

@@ -167,7 +167,9 @@ import * as API_FrameGroup from '@/api/ncs_frameGroup'
 import ListFilter from '@/components/AgGridCustomFilter/ListFilter'
 import RadioFilter from '@/components/AgGridCustomFilter/RadioFilter'
 import * as API_BroadcastFiles from '@/api/calling-broadcastFiles'
-import { serverUrl, DeviceUrl } from '@/utils/domain'
+// import { serverUrl, DeviceUrl } from '@/utils/domain'
+const serverUrl = domain.serverUrl
+const DeviceUrl = domain.DeviceUrl
 export default {
   name: 'Index',
   components: { ButtonCellRender, ListFilter, RadioFilter },

+ 1 - 0
src/views/ncs-channel/index.vue

@@ -436,6 +436,7 @@ export default {
         subscribeIds = [...item.clerks.filter(p => p.checked).map(p => p.member_id), ...subscribeIds]
       })
       API_Channel.setChannelSubscribers({ channel_id: this.formmodel.id, member_ids: subscribeIds.length === 0 ? null : [...subscribeIds] }).then(() => {
+        this.formSubscribe = false
         this.$message.success('修改成功!')
       })
     },

+ 1 - 2
src/views/ncs-chars/index.vue

@@ -503,7 +503,6 @@ export default {
       let secondTime = endTime//将传入的秒的值转化为Number
       let min = 0// 初始化分
       let h =0// 初始化小时
-      let result=''
       if(secondTime>60){//如果秒数大于60,将秒数转换成整数
         min=parseInt(secondTime/60)//获取分钟,除以60取整数,得到整数分钟
         secondTime=parseInt(secondTime%60)//获取秒数,秒数取佘,得到整数秒数
@@ -515,7 +514,7 @@ export default {
           return min +'分' + secondTime + '秒'
         }
       } else {
-        return secondTime + '秒'
+        return secondTime + '秒'``
       }
     }
   }

+ 2 - 8
src/views/ncs-device/components/deviceManager.vue

@@ -248,9 +248,9 @@ import * as API_Frame from '@/api/ncs_hospitalFrame'
 import * as API_SosDeviceSetting from '@/api/ncs_sos_device_settings'
 import * as clerk_API from '@/api/ncs_clerk'
 // import { DeviceUrl } from '@/utils/domain'
-const DeviceUrl = domain.DeviceUrl
 import { FRAME_TYPE } from '@/utils/enum/FrameTypeEnum'
 import { DEVICE_TYPE } from '@/utils/enum/DeviceTypeEnum'
+const DeviceUrl = domain.DeviceUrl
 export default {
   name: 'DeviceManager',
   components: { ButtonCellRender, ListFilter, RadioFilter },
@@ -782,13 +782,7 @@ export default {
       } else if (val === DEVICE_TYPE.DIGIT_BED_DEVICE ||
           val === DEVICE_TYPE.SIMULATE_BED_DEVICE ||
           val === DEVICE_TYPE.REMOTE_CONTROL ||
-          val === DEVICE_TYPE.CELL_PHONE ||
-          val === DEVICE_TYPE.ALARM_BODY_INDUCTIVE ||
-          val === DEVICE_TYPE.ALARM_WATER_OVERFLOW ||
-          val === DEVICE_TYPE.ALARM_HOUSEHOLD_GAS ||
-          val === DEVICE_TYPE.ALARM_HOUSEHOLD_SMOKE ||
-          val === DEVICE_TYPE.ALARM_BUTTON_SOS ||
-          val === DEVICE_TYPE.DOOR_LOCK
+          val === DEVICE_TYPE.CELL_PHONE
       ) {
         this.getFramesByType(FRAME_TYPE.BED)
       } else {

+ 1 - 1
src/views/ncs-device/nurse_watch.vue

@@ -295,7 +295,7 @@ export default {
       this.websock.onclose = this.websocketclose
     },
     websocketonopen: function() {
-      console.log('WebSocket连接成功')
+      console.log('WebSocket连接成功1111111')
       this.$message.success('连接成功')
     },
     websocketonerror: function(e) {

+ 293 - 0
src/views/ncs-device/watch_location(空间节点版).vue

@@ -0,0 +1,293 @@
+<template>
+  <div class="app-container">
+    <div class="block">
+      <el-date-picker
+          v-model="queryTime"
+          type="date"
+          placeholder="选择日期进行搜索"
+          value-format="yyyy-MM-dd">
+      </el-date-picker>
+      <el-button type="primary" plain style="margin-left: 30px" v-loading.fullscreen.lock="fullscreenLoading" @click="getNewLocation">获取最新位置</el-button>
+      <el-tag v-if="myTitle" style="margin-left: 20px;" type="warning">{{ myTitle }}</el-tag>
+    </div>
+    <div>
+      <el-row>
+        <el-col :span="6" v-for="(item, index) in frames" :key="index">
+          <el-card :id="'myFrame'+item.id" shadow="never" class="myClass">
+            <div>
+              <svg-icon :id="'myIcon' + item.id" icon-class="footmark" class-name="footmark" style="font-size: 30px;display: none" />
+              <svg-icon icon-class="sickroom" style="font-size: 40px;padding-right: 20px" />{{ item.full_name }}
+            </div>
+            <div style="float:right">
+              <span :id="'myText' + item.id" ></span>
+            </div>
+
+          </el-card>
+        </el-col>
+      </el-row>
+    </div>
+    <div v-if="locationList.length > 0" style="margin-top: 20px;">
+      <el-card>
+        <div v-for="(item, index) in locationList" :key="index" class="text item">
+          <i class="el-icon-user-solid"></i> 您于 <el-tag><i class="el-icon-time"></i>{{ formatterCreateTime(item.create_time )}}</el-tag> 在
+          <el-tag type="success"><i class="el-icon-location-outline"></i>{{ item.full_name }}</el-tag>附近
+        </div>
+      </el-card>
+    </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"
+    />
+  </div>
+</template>
+
+<script>
+import * as API_DeviceLocation from '@/api/ncs_device_location'
+import { unixToDate } from '@/utils/Foundation'
+import { getListByDeviceId } from '@/api/ncs_hospitalFrame'
+import { DeviceUrl } from '@/utils/domain'
+export default {
+  name: 'Index',
+  props: {
+    deviceId: {
+      type: Number,
+      default: 0
+    },
+    isShow: {
+      type: Boolean,
+      default: false
+    }
+  },
+
+  data: function() {
+    return {
+      frames: [],
+      locationList: [],
+      params: {
+        page_size: 20,
+        page_no: 1,
+        fixedCondition: ' device_id = ' + this.deviceId,
+        sort: 'create_time',
+        dir: 'desc'
+      },
+      tableData: [],
+      pageData: [],
+      deviceList: [],
+      clearList: [],
+      queryTime: null,
+      websock: null,
+      fullscreenLoading: false,
+      myTitle: ''
+    }
+  },
+  watch: {
+    isShow: function () {
+      if (this.isShow) {
+        this.sx()
+      } else {
+        this.websocketclose()
+      }
+    },
+    queryTime: function () {
+      if (this.queryTime) {
+        this.params.query_time = this.queryTime
+      } else {
+        delete this.params.query_time
+      }
+      this.clearStyle()
+      this.API_GetList()
+    }
+  },
+  mounted() {
+    this.API_Frames()
+    this.initWebSocket()
+  },
+  methods: {
+    API_Frames() {
+      const _this = this
+      getListByDeviceId(this.$store.getters.partId).then(res => {
+        _this.frames = res
+        _this.API_GetList()
+      })
+    },
+    API_GetList() {
+      const _this = this
+      API_DeviceLocation.getPage(this.params).then(res => {
+        _this.tableData = [...res.data]
+        _this.pageData = {
+          page_no: res.page_no,
+          page_size: res.page_size,
+          data_total: res.data_total
+        }
+        _this.locationList = []
+        if (_this.tableData.length > 0) {
+          _this.changeStyle()
+        }
+      })
+    },
+    changeStyle() {
+      const _this = this
+      let myId = ''
+      const time = Date.parse(new Date()) / 1000
+      if (time - this.tableData[0].create_time > 60) {
+        _this.myTitle = '当前不在信标范围内'
+      }
+      this.tableData.reverse()
+      for (let i = 0; i< _this.tableData.length; i++) {
+        (function (t, data) {   // 注意这里是形参
+          setTimeout(function () {
+            if (myId) {
+              document.getElementById(myId).style = 'background: #d3dce6'
+            }
+            document.getElementById('myFrame'+data.frame_id).style = 'color: white;background: #3DCB0A'
+            document.getElementById('myIcon'+data.frame_id).style.display='inline'
+            _this.$notify({
+              title: data.full_name,
+              message: unixToDate(data.create_time) + '在' + data.full_name + '附近',
+              position: 'bottom-right',
+              showClose: false,
+              duration: 2500
+            })
+            myId = 'myFrame'+data.frame_id
+            _this.locationList.unshift(data)
+            let text = document.getElementById('myText'+data.frame_id)
+            if (text.innerText) {
+              text.innerText = text.innerText + '、'+ (i+1)
+            } else {
+              text.innerText = (i+1)
+            }
+            // document.getElementById('myText'+data.frame_id).innerText = i+1+1
+            if (_this.clearList.find(p => p === data.frame_id) == null) {
+              _this.clearList.push(data.frame_id)
+            }
+
+          }, 250 * t);	// 还是每秒执行一次,不是累加的
+        })(i, _this.tableData[i])   // 注意这里是实参,这里把要用的参数传进去
+      }
+    },
+    sx() {
+      this.queryTime = null
+      this.params ={
+        page_size: 20,
+        page_no: 1,
+        fixedCondition: ' device_id = ' + this.deviceId,
+        sort: 'create_time',
+        dir: 'desc'
+      }
+      this.myTitle = ''
+      this.frames = []
+      this.locationList = []
+      this.initWebSocket()
+      this.API_Frames()
+    },
+    /** 分页大小发生改变 */
+    handlePageSizeChange(size) {
+      this.params.page_size = size
+      this.clearStyle()
+      this.API_GetList()
+    },
+    /** 分页页数发生改变 */
+    handlePageCurrentChange(page) {
+      this.params.page_no = page
+      this.clearStyle()
+      this.API_GetList()
+    },
+    clearStyle() {
+      this.clearList.forEach(item => {
+        document.getElementById('myFrame'+item).style = ''
+        document.getElementById('myIcon'+item).style.display='none'
+        document.getElementById('myText'+item).innerText = ''
+      })
+    },
+    formatterCreateTime(data) {
+      return unixToDate(data)
+    },
+    getNewLocation() {
+      this.fullscreenLoading = true
+      const _this = this
+      setTimeout(() => {
+        if (_this.fullscreenLoading)
+          _this.fullscreenLoading = false
+      }, 30000)
+      this.websock.send(this.deviceId)
+    },
+    initWebSocket: function() {
+      const stockbase = DeviceUrl.replace('http', 'ws')
+      this.websock = new WebSocket(stockbase + '/web-socket/device_location/' + this.deviceId)
+      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连接成功')
+    },
+    websocketonerror: function(e) {
+      console.log('WebSocket连接发生错误')
+    },
+    websocketonmessage: function(e) {
+      console.log('收到消息:', e.data)
+      const data = JSON.parse(e.data)
+      if (data.frame_id) {
+        this.myTitle = ''
+        this.fullscreenLoading = false
+        let size = this.tableData.length
+        if (size > 0) {
+          document.getElementById('myFrame'+this.tableData[(size - 1)].frame_id).style = 'background: #d3dce6'
+        }
+        document.getElementById('myFrame'+data.frame_id).style = 'color: white;background: #3DCB0A'
+        document.getElementById('myIcon'+data.frame_id).style.display='inline'
+        this.$notify({
+          title: data.full_name,
+          message: unixToDate(data.create_time) + '在' + data.full_name + '附近',
+          showClose: false,
+          offset: 100
+        })
+        let text = document.getElementById('myText'+data.frame_id)
+        if (text.innerText) {
+          text.innerText = text.innerText + '、'+ (size+1)
+        } else {
+          text.innerText = (i+1)
+        }
+        this.tableData.push(data)
+        this.locationList.unshift(data)
+        if (this.clearList.find(p => p === data.frame_id) == null) {
+          this.clearList.push(data.frame_id)
+        }
+      }
+
+    },
+    websocketclose: function(e) {
+      console.log('socket连接关闭connection closed (' + e + ')')
+    }
+  }
+}
+</script>
+
+<style scoped type="text/scss">
+.el-row {
+  margin-bottom: 20px;
+&:last-child {
+   margin-bottom: 0;
+ }
+}
+.el-col {
+  border-radius: 30px;
+  padding: 20px;
+}
+.text {
+  font-size: 14px;
+}
+
+.item {
+  margin-bottom: 18px;
+}
+</style>

+ 28 - 25
src/views/ncs-device/watch_location.vue

@@ -12,11 +12,11 @@
     </div>
     <div>
       <el-row>
-        <el-col :span="6" v-for="(item, index) in frames" :key="index">
+        <el-col :span="6" v-for="(item, index) in beaconDevices" :key="index">
           <el-card :id="'myFrame'+item.id" shadow="never" class="myClass">
             <div>
               <svg-icon :id="'myIcon' + item.id" icon-class="footmark" class-name="footmark" style="font-size: 30px;display: none" />
-              <svg-icon icon-class="sickroom" style="font-size: 40px;padding-right: 20px" />{{ item.full_name }}
+              <svg-icon icon-class="sickroom" style="font-size: 40px;padding-right: 20px" />{{ item.name }}
             </div>
             <div style="float:right">
               <span :id="'myText' + item.id" ></span>
@@ -53,7 +53,10 @@
 import * as API_DeviceLocation from '@/api/ncs_device_location'
 import { unixToDate } from '@/utils/Foundation'
 import { getListByDeviceId } from '@/api/ncs_hospitalFrame'
-import {DeviceUrl} from "@/utils/domain";
+// import {DeviceUrl} from "@/utils/domain"
+const DeviceUrl = domain.DeviceUrl
+import { getDeviceByType } from '@/api/ncs_device'
+import { DEVICE_TYPE } from '@/utils/enum/DeviceTypeEnum'
 export default {
   name: 'Index',
   props: {
@@ -69,7 +72,7 @@ export default {
 
   data: function() {
     return {
-      frames: [],
+      beaconDevices: [],
       locationList: [],
       params: {
         page_size: 20,
@@ -107,14 +110,14 @@ export default {
     }
   },
   mounted() {
-    this.API_Frames()
+    this.API_Devices()
     this.initWebSocket()
   },
   methods: {
-    API_Frames() {
+    API_Devices() {
       const _this = this
-      getListByDeviceId(this.$store.getters.partId).then(res => {
-        _this.frames = res
+      getDeviceByType(this.$store.getters.partId, DEVICE_TYPE.BEACON).then(res => {
+        _this.beaconDevices = res
         _this.API_GetList()
       })
     },
@@ -127,6 +130,7 @@ export default {
           page_size: res.page_size,
           data_total: res.data_total
         }
+        _this.locationList = []
         if (_this.tableData.length > 0) {
           _this.changeStyle()
         }
@@ -134,7 +138,6 @@ export default {
     },
     changeStyle() {
       const _this = this
-      this.locationList = []
       let myId = ''
       const time = Date.parse(new Date()) / 1000
       if (time - this.tableData[0].create_time > 60) {
@@ -147,8 +150,8 @@ export default {
             if (myId) {
               document.getElementById(myId).style = 'background: #d3dce6'
             }
-            document.getElementById('myFrame'+data.frame_id).style = 'color: white;background: #3DCB0A'
-            document.getElementById('myIcon'+data.frame_id).style.display='inline'
+            document.getElementById('myFrame'+data.beacon_device_id).style = 'color: white;background: #3DCB0A'
+            document.getElementById('myIcon'+data.beacon_device_id).style.display='inline'
             _this.$notify({
               title: data.full_name,
               message: unixToDate(data.create_time) + '在' + data.full_name + '附近',
@@ -156,17 +159,17 @@ export default {
               showClose: false,
               duration: 2500
             })
-            myId = 'myFrame'+data.frame_id
+            myId = 'myFrame'+data.beacon_device_id
             _this.locationList.unshift(data)
-            let text = document.getElementById('myText'+data.frame_id)
+            let text = document.getElementById('myText'+data.beacon_device_id)
             if (text.innerText) {
               text.innerText = text.innerText + '、'+ (i+1)
             } else {
               text.innerText = (i+1)
             }
-            // document.getElementById('myText'+data.frame_id).innerText = i+1+1
-            if (_this.clearList.find(p => p === data.frame_id) == null) {
-              _this.clearList.push(data.frame_id)
+            // document.getElementById('myText'+data.beacon_device_id).innerText = i+1+1
+            if (_this.clearList.find(p => p === data.beacon_device_id) == null) {
+              _this.clearList.push(data.beacon_device_id)
             }
 
           }, 250 * t);	// 还是每秒执行一次,不是累加的
@@ -183,10 +186,10 @@ export default {
         dir: 'desc'
       }
       this.myTitle = ''
-      this.frames = []
+      this.beaconDevices = []
       this.locationList = []
       this.initWebSocket()
-      this.API_Frames()
+      this.API_Devices()
     },
     /** 分页大小发生改变 */
     handlePageSizeChange(size) {
@@ -236,22 +239,22 @@ export default {
     websocketonmessage: function(e) {
       console.log('收到消息:', e.data)
       const data = JSON.parse(e.data)
-      if (data.frame_id) {
+      if (data.beacon_device_id) {
         this.myTitle = ''
         this.fullscreenLoading = false
         let size = this.tableData.length
         if (size > 0) {
-          document.getElementById('myFrame'+this.tableData[(size - 1)].frame_id).style = 'background: #d3dce6'
+          document.getElementById('myFrame'+this.tableData[(size - 1)].beacon_device_id).style = 'background: #d3dce6'
         }
-        document.getElementById('myFrame'+data.frame_id).style = 'color: white;background: #3DCB0A'
-        document.getElementById('myIcon'+data.frame_id).style.display='inline'
+        document.getElementById('myFrame'+data.beacon_device_id).style = 'color: white;background: #3DCB0A'
+        document.getElementById('myIcon'+data.beacon_device_id).style.display='inline'
         this.$notify({
           title: data.full_name,
           message: unixToDate(data.create_time) + '在' + data.full_name + '附近',
           showClose: false,
           offset: 100
         })
-        let text = document.getElementById('myText'+data.frame_id)
+        let text = document.getElementById('myText'+data.beacon_device_id)
         if (text.innerText) {
           text.innerText = text.innerText + '、'+ (size+1)
         } else {
@@ -259,8 +262,8 @@ export default {
         }
         this.tableData.push(data)
         this.locationList.unshift(data)
-        if (this.clearList.find(p => p === data.frame_id) == null) {
-          this.clearList.push(data.frame_id)
+        if (this.clearList.find(p => p === data.beacon_device_id) == null) {
+          this.clearList.push(data.beacon_device_id)
         }
       }
 

+ 3 - 3
src/views/ncs-remark/index.vue

@@ -45,7 +45,7 @@
                 @current-change="handlePageCurrentChange"
         />
 
-        <el-dialog title="添加用户备注" :visible.sync="dialogAddVisible" :append-to-body="true" width="80%">
+        <el-dialog title="添加便签" :visible.sync="dialogAddVisible" :append-to-body="true" width="80%">
             <el-form :rules="rules" ref="editForm" label-width="140px">
                 <el-form-item label="内容" prop="content">
                     <el-input
@@ -82,9 +82,9 @@
 <script>
     import * as API_Remark from '@/api/ncs_remark'
     import {unixToDate} from '@/utils/Foundation'
-    import {serverUrl} from "@/utils/domain"
+    // import {serverUrl} from "@/utils/domain"
     import * as RegExp from "@/utils/RegExp"
-
+    const serverUrl = domain.serverUrl
     export default {
         name: 'Index',
         data() {

+ 4 - 2
src/views/ncs-task/index.vue

@@ -349,7 +349,8 @@ export default {
         if (valid) {
           /** 新增通知 */
           if (this.editflag === 0) {
-            this.formmodel.task_plan_time = Date.parse(new Date()) / 1000
+            // this.formmodel.task_plan_time = Date.parse(new Date()) / 1000
+            this.formmodel.task_plan_time = this.formmodel.task_plan_time / 1000
             this.formmodel.file_name = this.fileName
             this.formmodel.file_path = this.filePath
             this.formmodel.create_id = this.$store.getters.userInfo.uid
@@ -373,7 +374,8 @@ export default {
                 this.getList()
               })
             } else {
-              this.formmodel.task_plan_time = Date.parse(new Date()) / 1000
+              // this.formmodel.task_plan_time = Date.parse(new Date()) / 1000
+              this.formmodel.task_plan_time = this.formmodel.task_plan_time / 1000
               this.formmodel.file_name = this.fileName
               this.formmodel.file_path = this.filePath
               this.formmodel.create_id = this.$store.getters.userInfo.uid