فهرست منبع

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

# Conflicts:
#	src/views/ncs-orginazition/partInfoSetting.vue
LAPTOP-LIQ71VDD\m 3 سال پیش
والد
کامیت
e71e955b15

+ 7 - 1
src/views/customer/components/customerManager.vue

@@ -984,7 +984,7 @@ export default {
     /** 上传成功后的钩子 更换图片 置空存储数组*/
     uploaded(response) {
       this.imageUrl = serverUrl + '/' + response
-      this.formmodel.face = response
+      this.formmodel.face = serverUrl + '/' + response
     },
     /** 图片上传之前的校验 */
     handleShopLogoBefore(file) {
@@ -1069,6 +1069,12 @@ export default {
       this.formmodel = {
         ...row
       }
+      if (row['face']) {
+        this.imageUrl = row['face']
+      } else {
+        this.imageUrl = null
+      }
+
       // 编辑时把当前用户床位加入到空床位,否则会显示一个床位Id号
       this.emptyBeds.push({ id: this.formmodel.frame_id, full_name: this.formmodel.full_name })
       if (this.formmodel.in_date) {

+ 7 - 2
src/views/dashboard/calling-admin/partInfoSetting.vue

@@ -49,9 +49,14 @@
           <app-version-manager :part-id="part_id" :device-type="104"></app-version-manager>
         </keep-alive>
       </el-tab-pane>
-      <el-tab-pane label="转换盒app" name="conversion">
+      <el-tab-pane label="探视机" name="vistitation">
         <keep-alive>
-          <app-version-manager :part-id="part_id" :device-type="11"></app-version-manager>
+          <app-version-manager :part-id="part_id" :device-type="19" />
+        </keep-alive>
+      </el-tab-pane>
+      <el-tab-pane label="转换盒" name="transferDevice">
+        <keep-alive>
+          <app-version-manager :part-id="part_id" :device-type="11" />
         </keep-alive>
       </el-tab-pane>
     </el-tabs>

+ 67 - 0
src/views/entrace-guard/index.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <el-button @click="shotPicture">拍照</el-button>
+      <el-button @click="openDoor">开锁</el-button>
+      <el-button @click="lockDoor">锁门</el-button>
+      <el-button @click="addVisit">下发人证基本信息</el-button>
+      <el-button @click="addUser">添加人员</el-button>
+  </div>
+</template>
+
+<script>
+import { DeviceUrl } from '@/utils/domain'
+export default {
+  name: 'Index',
+  data() {
+    return {
+      websock: null
+    }
+  },
+  mounted() {
+    this.initWebSocket()
+  },
+  methods: {
+    initWebSocket: function() {
+      var stockbase = DeviceUrl.replace('http', 'ws')
+      this.websock = new WebSocket(stockbase + '/entraceguard')
+      this.websock.onopen = this.websocketonopen
+      this.websock.onerror = this.websocketonerror
+      this.websock.onmessage = this.websocketonmessage
+      this.websock.onclose = this.websocketclose
+    },
+    websocketonopen: function() {
+      this.$message.success('服务正常,可自动发现新看板')
+      this.websock.send(JSON.stringify({ 'cmd': 'web_clinet', 'id': this.$store.getters.uuid }))
+      console.log('WebSocket连接成功')
+    },
+    websocketonerror: function(e) {
+      console.log('WebSocket连接发生错误')
+    },
+    websocketonmessage: function(e) {
+      console.log(e)
+    },
+    websocketclose: function(e) {
+      console.log('connection closed (' + e.code + ')')
+    },
+    shotPicture() {
+      this.websock.send(JSON.stringify({ 'cmd': 'shotpicture', 'from': this.$store.getters.uuid, 'to': 'RLM-00112935' }))
+    },
+    openDoor() {
+      this.websock.send(JSON.stringify({ 'cmd': 'open_door', 'from': this.$store.getters.uuid, 'to': 'RLM-00112935' }))
+    },
+    lockDoor() {
+      this.websock.send(JSON.stringify({ 'cmd': 'lock_door', 'from': this.$store.getters.uuid, 'to': 'RLM-00112935' }))
+    },
+    addVisit() {
+      this.websock.send(JSON.stringify({ 'cmd': 'add_visit', 'from': this.$store.getters.uuid, 'to': 'RLM-00112935' }))
+    },
+    addUser() {
+      this.websock.send(JSON.stringify({ 'cmd': 'add_user', 'from': this.$store.getters.uuid, 'to': 'RLM-00112935' }))
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 3 - 3
src/views/ncs-device/components/deviceManager.vue

@@ -279,9 +279,9 @@ export default {
         { key: '模拟门灯', value: 14 },
         { key: '遥控器', value: 15 },
         { key: '信标', value: 16 },
-        // { key: '看板', value: 17 },
-        // { key: '门禁设备', value: 18 },
-        // { key: '探视机', value: 19 },
+        { key: '看板', value: 17 },
+        { key: '门禁设备', value: 18 },
+        { key: '探视机', value: 19 },
         { key: '485转换盒', value: 20 },
         { key: '紧急按钮', value: 21 }
       ],

+ 1 - 1
src/views/ncs-orginazition/components/AppVersionManager.vue

@@ -20,7 +20,7 @@
             </el-upload>
           </el-form-item>
           <el-form-item label="版本数字" prop="version_no">
-            <el-input-number v-model="formmodel.version_no" :min="1" :max="100" placeholder="请输入版本数字" />
+            <el-input-number v-model="formmodel.version_no" :min="1" :max="1000" placeholder="请输入版本数字" />
 <!--            <el-input v-model="formmodel.version_no" type="number" clearable :maxlength="100" placeholder="请输入版本信息" />-->
           </el-form-item>
           <el-form-item label="版本信息" prop="version_code">

+ 7 - 2
src/views/ncs-orginazition/partInfoSetting.vue

@@ -54,9 +54,14 @@
           <app-version-manager :part-id="part_id" :device-type="7" />
         </keep-alive>
       </el-tab-pane>
-      <el-tab-pane label="转换盒app" name="conversion">
+      <el-tab-pane label="探视机" name="vistitation">
         <keep-alive>
-          <app-version-manager :part-id="part_id" :device-type="11"></app-version-manager>
+          <app-version-manager :part-id="part_id" :device-type="19" />
+        </keep-alive>
+      </el-tab-pane>
+      <el-tab-pane label="转换盒" name="transferDevice">
+        <keep-alive>
+          <app-version-manager :part-id="part_id" :device-type="11" />
         </keep-alive>
       </el-tab-pane>
     </el-tabs>