Преглед изворни кода

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

vothin пре 3 година
родитељ
комит
7ffa217d29

+ 2 - 0
languages/zh-CN.js

@@ -697,6 +697,8 @@ module.exports = {
     initialize485Device: '初始化485设备',
     addTestMemberList: '批量添加测试用户',
     devicesRef: '设备批量刷新',
+    bindDevice: '绑定语音转换盒',
+    sureBindDevice: '确定需要绑定语音转换盒吗?',
     sureAddTestMemberList: '确定需要批量增加测试用户吗?',
     startAdd: '开始创建',
     sureDevicesRef: '确定需要批量刷新设备吗?',

+ 7 - 0
src/api/initialize.js

@@ -25,4 +25,11 @@ export function getDevicesByUuid(id) {
     url: OnlineSystemUrl + `/ncs_sync/get_device_by_uuid/${id}`,
     method: 'GET'
   })
+}
+
+export function bindDeviceTransAudio() {
+  return request({
+    url: `/initialize/bind_device_trans_audio`,
+    method: 'GET'
+  })
 }

+ 7 - 0
src/router/index.js

@@ -203,6 +203,13 @@ export const partRoutes = [
         component: () => import('@/views/ncs-device/nurse_watch'),
         name: 'nurse_watch',
         meta: { title: i18n.t('tab.mobileDeviceManage'), icon: 'el-icon-watch', noCache: true }
+      },
+      {
+        path: '/myMapHtml',
+        component: () => import('@/views/customer/myMapHtml'),
+        name: 'myMapHtml',
+        meta: { title: i18n.t('customerManage.footprint'), icon: 'area', noCache: true },
+        hidden: true
       }
     ],
     hidden: uiVersion === 1

+ 6 - 4
src/views/customer/components/elderlyCareManager.vue

@@ -396,7 +396,7 @@
                 </el-tab-pane>
 
               <el-tab-pane v-if="formmodel.id && boolDevice" :label="this.$t('customerManage.footprint')" name="footprint">
-                <my-map-html :map-url="mapUrl" style="width: 100%; height: 670px;"></my-map-html>
+<!--                <my-map-html :map-url="mapUrl" style="width: 100%; height: 670px;"></my-map-html>-->
               </el-tab-pane>
 
             </el-tabs>
@@ -493,14 +493,14 @@
     import * as API_Clerk from '@/api/ncs_clerk'
     import * as API_NurseConfig from '@/api/ncs_nurse_config'
     import vitalSignLog from '@/views/vital-sign/log'
-    import myMapHtml from '@/views/customer/myMapHtml'
+    // import myMapHtml from '@/views/customer/myMapHtml'
     import myMap from '@/views/customer/myMap'
     import * as API_SystemConfig from '@/api/ncs_systemconfig'
     import { getDevicesByUuid } from '@/api/initialize'
     const serverUrl = domain.serverUrl
     export default {
         name: 'ElderlyCareManager',
-        components: {ButtonCellRender, ListFilter, RadioFilter, vitalSignLog, myMap, myMapHtml},
+        components: {ButtonCellRender, ListFilter, RadioFilter, vitalSignLog, myMap},
         filters: {
             unixDateFilter(val) {
                 return unixToDate(val)
@@ -1017,7 +1017,9 @@
                 return unix2Date(param.value * 1000)
             },
             handleClick() {
-
+              if (this.activeName === 'footprint') {
+                this.$router.push({path:'/myMapHtml', query: {mapUrl: this.mapUrl}})
+              }
             },
             /** 生日选择变化,修改年龄字段 */
             birthdayChange(val) {

+ 12 - 10
src/views/customer/myMapHtml.vue

@@ -1,25 +1,27 @@
 <template>
-  <div style="width: 100%; height: 100%">
-    <iframe :src="mapUrl" frameborder="0" style="width: 100%; height: 100%"></iframe>
+  <div style="width: 100%; height: 800px">
+    <iframe v-bind:src="mapUrl" frameborder="0" style="width: 100%; height: 100%"></iframe>
   </div>
 </template>
 
 <script>
 export default {
   name: "myMapHtml",
-  props: {
-    mapUrl: {
-      type: String,
-      default: ''
-    }
-  },
+  // props: {
+  //   mapUrl: {
+  //     type: String,
+  //     default: ''
+  //   }
+  // },
   data() {
     return {
-
+      mapUrl: null
     }
   },
+  created() {
+  },
   mounted() {
-    console.log('1111111111111111')
+    this.mapUrl = this.$route.query.mapUrl
   }
 }
 </script>

+ 16 - 1
src/views/ncs-orginazition/components/partInfoEdit.vue

@@ -410,6 +410,7 @@
           <el-button type="success" @click="onSubmit">{{ this.$t('partInfo.saveSettings') }}</el-button>
           <el-button v-if="isShow" type="success" plain :disabled="isDisabled" @click="initialize485Device">{{ this.$t('partInfo.initialize485Device') }}</el-button>
           <el-button v-if="isShow" type="ss" @click="saveList">{{ this.$t('partInfo.addTestMemberList') }}</el-button>
+          <el-button v-if="isShow" type="ss" @click="devicesBind">{{ this.$t('partInfo.bindDevice') }}</el-button>
           <el-button v-if="isShow" type="ss" @click="devicesRef">{{ this.$t('partInfo.devicesRef') }}</el-button>
         </el-form-item>
       </el-form>
@@ -422,7 +423,7 @@
 import * as API_Part from '@/api/ncs_partInfo'
 import { saveListByCustomer } from '@/api/ncs_customer'
 import Storage from '@/utils/storage'
-import { init485Device, initData, initDeviceList } from '@/api/initialize'
+import {bindDeviceTransAudio, init485Device, initData, initDeviceList} from '@/api/initialize'
 import * as API_Clerk from '@/api/ncs_clerk'
 import * as API_SystemConfig from '@/api/ncs_systemconfig'
 export default {
@@ -649,6 +650,20 @@ export default {
         console.log(this.$t('action.cancel'))
       })
     },
+    devicesBind() {
+      const _this = this
+      this.$confirm(this.$t('partInfo.sureBindDevice') + '', this.$t('action.tips') + '', {
+        confirmButtonText: this.$t('action.yes'),
+        cancelButtonText: this.$t('action.cancel'),
+        type: 'warning'
+      }).then(() => {
+        bindDeviceTransAudio().then(res => {
+          _this.$message.info(res.message)
+        })
+      }).catch(() => {
+        console.log(this.$t('action.cancel'))
+      })
+    },
     createAdmin() {
       this.formshow = true
       this.formmodelAdmin = {