Browse Source

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhongtianhaoyuan 1 year ago
parent
commit
ba9e37b23f

+ 6 - 1
package-lock.json

@@ -7363,6 +7363,11 @@
         "lodash.uniq": "^4.5.0"
       }
     },
+    "caniuse-lite": {
+      "version": "1.0.30001439",
+      "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001439.tgz",
+      "integrity": "sha512-1MgUzEkoMO6gKfXflStpYgZDlFM7M/ck/bgfVCACO5vnAf0fXoNVHdWtqGU+MYca+4bL9Z5bpOVmR33cWW9G2A=="
+    },
     "canvas-compress": {
       "version": "1.1.5",
       "resolved": "https://registry.npm.taobao.org/canvas-compress/download/canvas-compress-1.1.5.tgz",
@@ -23190,4 +23195,4 @@
       "integrity": "sha512-TNloHe0ums6zxbHfnaCryM61J4IWDajZwNq6dHk9vfWhhysO/OeFvvR0drBs/nbXha2YxSzfQj2FiCd6RVBe+Q=="
     }
   }
-}
+}

+ 4 - 0
package.json

@@ -55,6 +55,7 @@
     "element-china-area-data": "^5.0.2",
     "element-ui": "^2.15.9",
     "file-saver": "^2.0.5",
+    "flv.js": "^1.6.2",
     "form-making-advanced": "^1.2.6",
     "html2canvas": "^1.3.2",
     "js-base64": "^3.7.2",
@@ -75,6 +76,8 @@
     "sortablejs": "^1.8.4",
     "tinymce": "4.9.2",
     "url-loader": "^4.1.0",
+    "video.js": "^7.21.1",
+    "videojs-flvjs-es6": "^1.0.1",
     "vue": "2.6.10",
     "vue-amap": "^0.5.10",
     "vue-i18n": "7.3.2",
@@ -84,6 +87,7 @@
     "vue-seamless-scroll": "^1.1.17",
     "vuedraggable": "2.20.0",
     "vuex": "3.1.0",
+    "web-see": "^1.1.0",
     "winsea-component-library": "http://maven.zthymaoyi.com/nexus/repository/npm-hosted/winsea-component-library/-/winsea-component-library-1.0.1.tgz",
     "winseaview": "^2.5.11",
     "xe-utils": "^2.3.0",

+ 83 - 76
src/api/V2/houseSelfCollect/index.js

@@ -1,135 +1,142 @@
 //客户管理列表
 export const API_GET_CUSTOMER_MANAGE = '/identityAuthenticationInfo/selectIdentityAuthenticationInfoPurchase'
-//新增粮商1
+    //新增粮商1
 export const API_POST_CUSTOMER_ADD = '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo'
-//新增粮商2
+    //新增粮商2
 export const API_GET_CUSTOMER_IDENTITY = '/identityAuthenticationInfo/saveCompanyIdentity'
-//客户管理删除
+    //客户管理删除
 export const API_GET_CUSTOMER_DELETE = '/identityAuthenticationInfo/api/deleteCompanyIdentity'
-//客户查看
+    //客户查看
 export const API_GET_CUSTOMER_LOOK = '/identityAuthenticationInfo/api/getIdentityAuthenticationInfo'
-//收购管理列表
+    //收购管理列表
 export const API_GET_PURCHASEPRICE_MANAGE = '/purchasePrice/purchasePriceList'
-//收购管理添加
+    //收购管理添加
 export const API_POST_PURCHASEPRICE_ADD = '/purchasePrice/purchasePriceAdd'
-//收购管理查看
+    //收购管理查看
 export const API_GET_PURCHASEPRICE_LOOK = '/purchasePrice/purchasePriceLook'
-//收购管理编辑
+    //收购管理编辑
 export const API_POST_PURCHASEPRICE_EDIT = '/purchasePrice/purchasePriceEdit'
-//收购管理删除
+    //收购管理删除
 export const API_POST_PURCHASEPRICE_DEL = '/purchasePrice/purchasePriceDel'
-//收购管理员手动编辑
+    //收购管理员手动编辑
 export const API_POST_PURCHASEPRICE_ALLOWEDIT = '/purchasePrice/purchasePriceAllowEdit'
-//查询仓库列表
+    //查询仓库列表
 export const API_GET_WAREHOUSESELF = '/warehouseBaseInfo/selectWarehouseSelf'
-//客户修改
+    //客户修改
 export const API_POST_CUSTOMER_EDIT = '/identityAuthenticationInfo/api/editIdentityAuthenticationInfo'
-//客户获取验证码
+    //客户获取验证码
 export const API_GET_CUSTOMER_CODE = '/commonUser/sendVerifyCode'
-//客户验证码校验
+    //客户验证码校验
 export const API_GET_CUSTOMER_CODEJY = '/commonUser/checkVerifyCode'
-//质检添加
+    //质检添加
 export const API_POST_INSPECT_ADD = '/qualityInspectionManagement/api/addQualityInspection'
-//质检仓位下拉
+    //质检仓位下拉
 export const API_GET_INSPECT_GETBINNUMBER = '/warehouseBaseInfo/getWarehouse'
-//客户下拉
+    //客户下拉
 export const API_GET_INSPECT_GETCUSTOMER = '/identityAuthenticationInfo/identityAuthenticationInfoCustomer'
-//获取二维码
+    //获取二维码
 export const API_GET_INSPECT_GETQRCODE = '/identityAuthenticationInfo/generateQRCodeImage'
-//质检列表
+    //质检列表
 export const API_GET_INSPECT_GETINSPECTLIST = '/qualityInspectionManagement/selectQualityInspection'
-//质检查看
+    //质检查看
 export const API_GET_INSPECT_GETINSPECTLOOK = '/qualityInspectionManagement/api/getQualityInspection'
-//质检查看潮粮单价
+    //质检查看潮粮单价
 export const API_GET_INSPECT_GETINSPECTLOOKUNITPRICE = '/purchasePrice/tidalGrainPrice'
-//质检货名下拉
+    //质检货名下拉
 export const API_GET_INSPECT_GETINSPECTLOOKGOODS = '/qualityInspectionManagement/api/goodsName'
-//质检修改
+    //质检修改
 export const API_POST_INSPECT_GETINSPECTEDIT = '/qualityInspectionManagement/api/editQualityInspection'
-//质检删除
+    //质检删除
 export const API_POST_INSPECT_GETINSPECTDELETE = '/qualityInspectionManagement/api/deleteQualityInspection'
-//付款管理列表
+    //付款管理列表
 export const API_GET_PAYMENTMANAGEMENT = '/paymentManagement/selectPaymentManagement'
-//检斤列表查看
+    //检斤列表查看
 export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWeighingManagement'
-//皮重检斤保存
-export const API_POST_WEIGHTCHECK_TARE= '/weighingManagement/api/editTare'
-//毛重检斤保存
+    //皮重检斤保存
+export const API_POST_WEIGHTCHECK_TARE = '/weighingManagement/api/editTare'
+    //毛重检斤保存
 export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
-//检斤管理删除
+    //检斤管理删除
 export const API_POST_INSPECT_GETWEIGHTDELETE = '/weighingManagement/api/deleteWeightcheck'
-//付款查看
+    //付款查看
 export const API_GET_PAYMENT = '/paymentManagement/getInfo'
-// 付款结算
+    // 付款结算
 export const API_POST_PAYMENT_EDIT = '/paymentManagement/api/editInfo'
-//质检客户下拉校验
+    //质检客户下拉校验
 export const API_GET_INSPECT_GETAMOUNT = '/paymentManagement/cumulant'
-//质检运输方式
+    //质检运输方式
 export const API_GET_INSPECT_CONTRACTNO = '/inOutWarehouseTask/getContractNo'
-//识别身份证
+    //识别身份证
 export const API_GET_CUSTOMER_GETIDENTITY = '/driverViewInfo/personShibie'
-//识别银行卡
+    //识别银行卡
 export const API_GET_CUSTOMER_GETBANK = '/driverViewInfo/bankShibie'
-//查询货名有未结算状态
-export const API_GET_INSPECT_GETCOUNT= '/qualityInspectionManagement/api/settledCount'
-//检斤打印查看
-export const API_GET_WEIGHTCHECK_GETPRINT= '/weighingManagement/getWeighingManagement'
-//付款删除
+    //查询货名有未结算状态
+export const API_GET_INSPECT_GETCOUNT = '/qualityInspectionManagement/api/settledCount'
+    //检斤打印查看
+export const API_GET_WEIGHTCHECK_GETPRINT = '/weighingManagement/getWeighingManagement'
+    //付款删除
 export const API_POST_PAYMENT_DEL = '/paymentManagement/api/deleteInfo'
-//付款审核
+    //付款审核
 export const API_POST_PAYMENT_AUDIT = '/paymentManagement/api/openAuditFlow'
-//付款提交
+    //付款提交
 export const API_POST_PAYMENT_PAYMENTSUBMIT = '/paymentManagement/api/payMoney'
-//付款结算修改
+    //付款结算修改
 export const API_POST_PAYMENT_SETTLEMENTEDIT = '/paymentManagement/api/editCollect'
-//付款结算修改
+    //付款结算修改
 export const API_GET_INSPECT_GETDRYGRAINPRICE = '/purchasePrice/dryGrainPrice'
-//付款权限查询
+    //付款权限查询
 export const API_GET_INSPECT_GETJURISDICTION = '/paymentManagement/selectTaskId'
-//财务开票
+    //财务开票
 export const API_POST_INVOICING = '/paymentManagement/api/readXmlManagement'
 export const API_POST_EXPORT = '/paymentManagement/export'
-// 车牌号
+    // 车牌号
 export const API_GET_SHIPPINGINFOFORMATION = '/shippingInformation/selectShippingInformation'
-//确认质检信息
+    //确认质检信息
 export const API_POST_INSPECTIONCHECK = '/qualityInspectionManagement/api/editQualityInspection'
-//单据二维码
+    //单据二维码
 export const API_GAT_QRCODE = '/weighingManagement/generateQRCodeImage'
-//二维码获取数据
+    //二维码获取数据
 export const API_GAT_GETQRCODE = '/weighingManagement/getQRcode'
-//车型
+    //车型
 export const API_GAT_INFO = '/commonSysParameter/getInfo'
-// 审核之后接口
+    // 审核之后接口
 export const API_POST_WORKFLOW_TASK = `/newWorkflow/getTaskWebsocket`
-// 反结算
-// export const API_POST_SUSPENDINSTANCE ='/api/suspendInstance'
-export const API_POST_SUSPENDINSTANCE ='/paymentManagement/api/ReSettlement'
-//导入
-export const API_POST_IMPORT ='/qualityInspectionManagement/api/importQuality'
-//导入移库
-export const API_POST_IMPORT_YK ='/weighingManagement/api/importWeighing'
-// 结算单
+    // 反结算
+    // export const API_POST_SUSPENDINSTANCE ='/api/suspendInstance'
+export const API_POST_SUSPENDINSTANCE = '/paymentManagement/api/ReSettlement'
+    //导入
+export const API_POST_IMPORT = '/qualityInspectionManagement/api/importQuality'
+    //导入移库
+export const API_POST_IMPORT_YK = '/weighingManagement/api/importWeighing'
+    // 结算单
 export const API_GET_SETTLEACCOUT = '/warehouseInOutInfo/getInfo'
-// 退回
-export const API_POST_RETURN= '/weighingManagement/weightReturn'
-// 新检斤保存
-export const API_POST_SUBMIT= '/warehouseInOutInfo/api/newInOutWarehouse'
-// 换仓
+    // 退回
+export const API_POST_RETURN = '/weighingManagement/weightReturn'
+    // 新检斤保存
+export const API_POST_SUBMIT = '/warehouseInOutInfo/api/newInOutWarehouse'
+    // 换仓
 export const API_POST_CHANE_NO = `/weighingManagement/api/changeWarehouse`
-// 查询合同
-export const API_GET_CONTRACT ='/contractManagementInfo/getInContract'
-// 发起人撤回
-export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
-// 获取仓库id
-export const API_GET_BASEID ='/qualityInspectionManagement/selectBaseId'
-// 换任务号
+    // 查询合同
+export const API_GET_CONTRACT = '/contractManagementInfo/getInContract'
+    // 发起人撤回
+export const API_SPONSOR_WITHDRAW = '/newWorkflow/api/stopInstance'
+    // 获取仓库id
+export const API_GET_BASEID = '/qualityInspectionManagement/selectBaseId'
+    // 换任务号
 export const API_POST_TASK_NO = `/weighingManagement/api/changeTaskNo`
-// 换客户
+    //获取摄像头
+export const API_POST_GETVIDEO = `/photoFrameController/api/devInit`
+    //获取车牌号
+    // export const API_POST_GETCARNUMBER = `/photoFrameController/api/devSetTrigger`
+export const API_POST_GETCARNUMBER = `/photoFrameController/api/zhuaPai`
+    // 换客户
 export const API_POST_CUSTOMER = `/weighingManagement/api/changeCustomer`
-// 丹东港生成入库单
+    // 丹东港生成入库单
 export const API_POST_DANDONG_ORDER = `/paymentManagement/api/generateOrder`
-// 检查客户送粮量
+    // 检查客户送粮量
 export const API_GETQUALITY = '/qualityInspectionManagement/getQualityInspectionManagementMap'
 // 查询仓库接口新
 export const API_GET_WAREHOUSE = '/warehouseBaseInfo/selectWarehouseSelfNew'
 
+export const API_POST_GETOKEN = `/photoFrameController/api/getToken`
+export const API_POST_GEROM = `/photoFrameController/api/getRom`

+ 100 - 63
src/global.js

@@ -5,69 +5,106 @@ import store from '@/vendors/vuex'
 // 2.新创建一个vue实例
 const v = new Vue()
 export default {
-  ws: {},
-  uploadPath,
-  websocket: '',
-  setWs: function(newWs) {
-    this.ws = newWs
-  },
-  whetherWebSocket: function() {
-    var that =this
-      if ('WebSocket' in window) {
-        if (process.env.NODE_ENV === 'production') {
-          that.websocket = new WebSocket('wss://www.zthymaoyi.com/wss/websocket/?adminId=84f62127b7384dcdbaeaddfe460329fc' )
+    ws: {},
+    uploadPath,
+    websocket: '',
+    videoSrc1: '',
+    videoSrc2: '',
+    setWs: function(newWs) {
+        this.ws = newWs
+    },
+    whetherWebSocket: function(type) {
+        var that = this
+        if ('WebSocket' in window) {
+            if (process.env.NODE_ENV === 'production') {
+                that.websocket = new WebSocket('wss://www.zthymaoyi.com/wss/websocket/?adminId=84f62127b7384dcdbaeaddfe460329fc')
+            } else {
+                // that.websocket = new WebSocket('ws://192.168.110.82:8080/')
+                that.websocket = new WebSocket('ws://192.168.110.82:8090/ws/websocket/84f62127b7384dcdbaeaddfe460329fc192.168.110.98')
+            }
+            that.initWebSocket(type)
+        } else {
+            alert('当前浏览器不支持websocket')
         }
-        else {
-          that.websocket = new WebSocket('ws://localhost:3000/')
-        }
-        that.initWebSocket()
-      } else {
-        alert('当前浏览器不支持websocket')
-      }
-  },
- 
-  initWebSocket: function() {
-    // 连接错误
-    this.websocket.onerror =evt => {
-      console.log('WebSocket连接发生错误   状态码:' + this.websocket.readyState)
-    }
-    // 连接成功
-    this.websocket.onopen = evt => {
-      console.log('WebSocket连接成功    状态码:' + this.websocket.readyState)
-    }
-    // 收到消息的回调
-    this.websocket.onmessage = event => {
-      // 根据服务器推送的消息做自己的业务处理
-      console.log('服务端返回:' + event.data)
-      var msg = event.data.split('$')
-      var that = this
-      // document.getElementsByClassName('app-container').reload()
-      v.$notify.warning({
-        title: '新消息提醒',
-        message: msg[0],
-        duration: 0,
-        onClick() {
-          this.$router.push({
-            path: msg[1] }) // 你要跳转的路由 还可以传参 当然也可以通过其他方式跳转
+    },
+
+    initWebSocket: function(type) {
+        if (type == 'video') {
+            // 连接错误
+            this.websocket.onerror = evt => {
+                    console.log('WebSocket连接发生错误   状态码:' + this.websocket.readyState)
+                }
+                // 连接成功
+            this.websocket.onopen = evt => {
+                    console.log('WebSocket连接成功    状态码:' + this.websocket.readyState)
+                }
+                // 收到消息的回调
+            this.websocket.onmessage = event => {
+                    debugger
+                    // 根据服务器推送的消息做自己的业务处理
+                    // console.log('服务端返回:' + event)
+                    // console.log('event.data', event.data)
+                    var msg = event.data.split('$');
+                    // this.videoSrc1 = 'data:image/jpg;base64,' + msg[0]
+                    // this.videoSrc2 = 'data:image/jpg;base64,' + msg[1]
+                    console.log('msg[0]', msg[0])
+                    console.log('msg[1]', msg[1])
+                    store.commit('user/SET_VIDEOSRC', {
+                        videoSrc1: 'data:image/jpg;base64,' + msg[0],
+                        videoSrc2: 'data:image/jpg;base64,' + msg[1],
+                    });
+                    console.log('执行成功')
+                }
+                // 连接关闭的回调
+            this.websocket.onclose = evt => {
+                console.log('WebSocket连接关闭    状态码:' + this.websocket.readyState)
+            }
+        } else {
+            // 连接错误
+            this.websocket.onerror = evt => {
+                    console.log('WebSocket连接发生错误   状态码:' + this.websocket.readyState)
+                }
+                // 连接成功
+            this.websocket.onopen = evt => {
+                    console.log('WebSocket连接成功    状态码:' + this.websocket.readyState)
+                }
+                // 收到消息的回调
+            this.websocket.onmessage = event => {
+                    debugger
+                    // 根据服务器推送的消息做自己的业务处理
+                    console.log('服务端返回:' + event.data)
+                    var msg = event.data.split('$')
+                    var that = this
+                        // document.getElementsByClassName('app-container').reload()
+                    v.$notify.warning({
+                            title: '新消息提醒',
+                            message: msg[0],
+                            duration: 0,
+                            onClick() {
+                                this.$router.push({
+                                        path: msg[1]
+                                    }) // 你要跳转的路由 还可以传参 当然也可以通过其他方式跳转
+                            }
+                        })
+                        // console.log(router)
+                    var currentPage = this.$router.history.current.path
+                    console.log(currentPage, 'currentPage')
+                    this.$router.push({ path: '/' })
+                    console.log('执行成功1')
+                    this.$router.push({
+                        path: currentPage,
+                        query: {
+                            params: Date()
+                        }
+                    })
+                    console.log('执行成功')
+                }
+                // 连接关闭的回调
+            this.websocket.onclose = evt => {
+                console.log('WebSocket连接关闭    状态码:' + this.websocket.readyState)
+            }
         }
-      })
-      // console.log(router)
-      var currentPage = this.$router.history.current.path
-      console.log(currentPage, 'currentPage')
-      this.$router.push({ path: '/' })
-      console.log('执行成功1')
-      this.$router.push({ path: currentPage,
-        query: {
-          params: Date()
-        }})
-      console.log('执行成功')
-    }
-    // 连接关闭的回调
-    this.websocket.onclose = evt => {
-      console.log('WebSocket连接关闭    状态码:' + this.websocket.readyState)
+        // 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
+        window.onbeforeunload = this.onbeforeunload
     }
-
-    // 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
-    window.onbeforeunload = this.onbeforeunload
-  }
-}
+}

+ 152 - 144
src/model/houseSelfCollect/index.js

@@ -1,208 +1,216 @@
 import { errorCatcher, errorHandle, filter } from 'base-core-lib'
 import { appRx } from '../defalutConfig/indexRx'
 import {
-  API_GET_CUSTOMER_MANAGE,
-  API_POST_CUSTOMER_ADD,
-  API_GET_CUSTOMER_IDENTITY,
-  API_GET_CUSTOMER_DELETE,
-  API_GET_CUSTOMER_LOOK,
-  API_GET_PURCHASEPRICE_MANAGE,
-  API_POST_PURCHASEPRICE_ADD,
-  API_GET_PURCHASEPRICE_LOOK,
-  API_POST_PURCHASEPRICE_EDIT,
-  API_POST_PURCHASEPRICE_DEL,
-  API_POST_PURCHASEPRICE_ALLOWEDIT,
-  API_GET_WAREHOUSESELF,
-  API_POST_CUSTOMER_EDIT,
-  API_POST_INSPECT_ADD,
-  API_GET_INSPECT_GETBINNUMBER,
-  API_GET_INSPECT_GETCUSTOMER,
-  API_GET_INSPECT_GETQRCODE,
-  API_GET_INSPECT_GETINSPECTLIST,
-  API_GET_INSPECT_GETINSPECTLOOK,
-  API_GET_INSPECT_GETINSPECTLOOKUNITPRICE,
-  API_GET_INSPECT_GETINSPECTLOOKGOODS,
-  API_POST_INSPECT_GETINSPECTEDIT,
-  API_POST_INSPECT_GETINSPECTDELETE,
-  API_GET_PAYMENTMANAGEMENT,
-  API_GET_WEIGHTCHECK_GETWEIGHINGLIST,
-  API_POST_WEIGHTCHECK_GROSSWEIGHT,
-  API_POST_WEIGHTCHECK_TARE,
-  API_GET_PAYMENT,
-  API_POST_PAYMENT_EDIT,
-  API_GET_INSPECT_GETAMOUNT,
-  API_GET_CUSTOMER_GETIDENTITY,
-  API_GET_CUSTOMER_GETBANK,
-  API_GET_INSPECT_GETCOUNT,
-  API_GET_WEIGHTCHECK_GETPRINT,
-  API_POST_PAYMENT_DEL,
-  API_POST_PAYMENT_AUDIT,
-  API_POST_PAYMENT_PAYMENTSUBMIT,
-  API_POST_PAYMENT_SETTLEMENTEDIT,
-  API_GET_CUSTOMER_CODE,
-  API_GET_CUSTOMER_CODEJY,
-  API_GET_INSPECT_GETDRYGRAINPRICE,
-  API_GET_INSPECT_GETJURISDICTION,
-  API_POST_INVOICING,
-  API_POST_EXPORT,
-  API_GET_SHIPPINGINFOFORMATION,
-  API_POST_INSPECTIONCHECK,
-  API_GAT_QRCODE,
-  API_GAT_GETQRCODE,
-  API_GAT_INFO,
-  API_POST_WORKFLOW_TASK,
-  API_POST_INSPECT_GETWEIGHTDELETE,
-  API_POST_SUSPENDINSTANCE,
-  API_POST_IMPORT,
-  API_POST_IMPORT_YK,
-  API_GET_INSPECT_CONTRACTNO,
-  API_GET_SETTLEACCOUT,
-  API_POST_RETURN,
-  API_POST_SUBMIT,
-  API_POST_CHANE_NO,
-  API_POST_TASK_NO,
-  API_POST_CUSTOMER,
-  API_POST_DANDONG_ORDER,
-  API_POST_DELETE,
-  API_GET_CONTRACT,
-  API_SPONSOR_WITHDRAW,
-  API_GET_BASEID,
-  API_GETQUALITY,
-  API_GET_WAREHOUSE
+    API_GET_CUSTOMER_MANAGE,
+    API_POST_CUSTOMER_ADD,
+    API_GET_CUSTOMER_IDENTITY,
+    API_GET_CUSTOMER_DELETE,
+    API_GET_CUSTOMER_LOOK,
+    API_GET_PURCHASEPRICE_MANAGE,
+    API_POST_PURCHASEPRICE_ADD,
+    API_GET_PURCHASEPRICE_LOOK,
+    API_POST_PURCHASEPRICE_EDIT,
+    API_POST_PURCHASEPRICE_DEL,
+    API_POST_PURCHASEPRICE_ALLOWEDIT,
+    API_GET_WAREHOUSESELF,
+    API_POST_CUSTOMER_EDIT,
+    API_POST_INSPECT_ADD,
+    API_GET_INSPECT_GETBINNUMBER,
+    API_GET_INSPECT_GETCUSTOMER,
+    API_GET_INSPECT_GETQRCODE,
+    API_GET_INSPECT_GETINSPECTLIST,
+    API_GET_INSPECT_GETINSPECTLOOK,
+    API_GET_INSPECT_GETINSPECTLOOKUNITPRICE,
+    API_GET_INSPECT_GETINSPECTLOOKGOODS,
+    API_POST_INSPECT_GETINSPECTEDIT,
+    API_POST_INSPECT_GETINSPECTDELETE,
+    API_GET_PAYMENTMANAGEMENT,
+    API_GET_WEIGHTCHECK_GETWEIGHINGLIST,
+    API_POST_WEIGHTCHECK_GROSSWEIGHT,
+    API_POST_WEIGHTCHECK_TARE,
+    API_GET_PAYMENT,
+    API_POST_PAYMENT_EDIT,
+    API_GET_INSPECT_GETAMOUNT,
+    API_GET_CUSTOMER_GETIDENTITY,
+    API_GET_CUSTOMER_GETBANK,
+    API_GET_INSPECT_GETCOUNT,
+    API_GET_WEIGHTCHECK_GETPRINT,
+    API_POST_PAYMENT_DEL,
+    API_POST_PAYMENT_AUDIT,
+    API_POST_PAYMENT_PAYMENTSUBMIT,
+    API_POST_PAYMENT_SETTLEMENTEDIT,
+    API_GET_CUSTOMER_CODE,
+    API_GET_CUSTOMER_CODEJY,
+    API_GET_INSPECT_GETDRYGRAINPRICE,
+    API_GET_INSPECT_GETJURISDICTION,
+    API_POST_INVOICING,
+    API_POST_EXPORT,
+    API_GET_SHIPPINGINFOFORMATION,
+    API_POST_INSPECTIONCHECK,
+    API_GAT_QRCODE,
+    API_GAT_GETQRCODE,
+    API_GAT_INFO,
+    API_POST_WORKFLOW_TASK,
+    API_POST_INSPECT_GETWEIGHTDELETE,
+    API_POST_SUSPENDINSTANCE,
+    API_POST_IMPORT,
+    API_POST_IMPORT_YK,
+    API_GET_INSPECT_CONTRACTNO,
+    API_GET_SETTLEACCOUT,
+    API_POST_RETURN,
+    API_POST_SUBMIT,
+    API_POST_CHANE_NO,
+    API_POST_TASK_NO,
+    API_POST_CUSTOMER,
+    API_POST_DANDONG_ORDER,
+    API_POST_DELETE,
+    API_GET_CONTRACT,
+    API_SPONSOR_WITHDRAW,
+    API_GET_BASEID,
+    API_GET_WAREHOUSE,
+    API_POST_GETVIDEO,
+    API_POST_GETCARNUMBER,
+    API_POST_GETOKEN,
+    API_POST_GEROM
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
-//新增粮商1
+    //新增粮商1
 export const customerAdd = appRx.post(API_POST_CUSTOMER_ADD, errorCatcher, errorHandle, filter)
-//新增粮商2
+    //新增粮商2
 export const customerIdentity = appRx.get(API_GET_CUSTOMER_IDENTITY, errorCatcher, errorHandle, filter)
-//客户管理删除
+    //客户管理删除
 export const getCustomerDelete = appRx.post(API_GET_CUSTOMER_DELETE, errorCatcher, errorHandle, filter)
-//客户查看
+    //客户查看
 export const getCustomerLook = appRx.get(API_GET_CUSTOMER_LOOK, errorCatcher, errorHandle, filter)
-//收购管理列表
+    //收购管理列表
 export const getPurchasePrice = appRx.get(API_GET_PURCHASEPRICE_MANAGE, errorCatcher, errorHandle, filter)
-//收购管理添加
+    //收购管理添加
 export const purchasePriceAdd = appRx.post(API_POST_PURCHASEPRICE_ADD, errorCatcher, errorHandle, filter)
-//收购管理查看
+    //收购管理查看
 export const purchasePriceLook = appRx.get(API_GET_PURCHASEPRICE_LOOK, errorCatcher, errorHandle, filter)
-//收购管理编辑
+    //收购管理编辑
 export const purchasePriceEdit = appRx.post(API_POST_PURCHASEPRICE_EDIT, errorCatcher, errorHandle, filter)
-//收购管理删除
+    //收购管理删除
 export const purchasePriceDel = appRx.post(API_POST_PURCHASEPRICE_DEL, errorCatcher, errorHandle, filter)
-//收购管理手动编辑
+    //收购管理手动编辑
 export const purchasePriceAllowEdit = appRx.post(API_POST_PURCHASEPRICE_ALLOWEDIT, errorCatcher, errorHandle, filter)
-//查看仓库
+    //查看仓库
 export const selectWarehouseSelf = appRx.get(API_GET_WAREHOUSESELF, errorCatcher, errorHandle, filter)
-//客户查看
+    //客户查看
 export const CustomerEdit = appRx.post(API_POST_CUSTOMER_EDIT, errorCatcher, errorHandle, filter)
-// 获取验证码
+    // 获取验证码
 export const GetCustomerCode = appRx.get(API_GET_CUSTOMER_CODE, errorCatcher, errorHandle, filter)
-// 验证码校验
+    // 验证码校验
 export const GetCustomerCodeJY = appRx.get(API_GET_CUSTOMER_CODEJY, errorCatcher, errorHandle, filter)
-//质检添加
+    //质检添加
 export const inspectAdd = appRx.post(API_POST_INSPECT_ADD, errorCatcher, errorHandle, filter)
-//仓位下拉
+    //仓位下拉
 export const getbinNumber = appRx.get(API_GET_INSPECT_GETBINNUMBER, errorCatcher, errorHandle, filter)
-//客户下拉
+    //客户下拉
 export const getcustomer = appRx.get(API_GET_INSPECT_GETCUSTOMER, errorCatcher, errorHandle, filter)
-//获取二维码
+    //获取二维码
 export const getQRCode = appRx.get(API_GET_INSPECT_GETQRCODE, errorCatcher, errorHandle, filter)
-//质检列表
+    //质检列表
 export const getinspectList = appRx.get(API_GET_INSPECT_GETINSPECTLIST, errorCatcher, errorHandle, filter)
-//质检查看
+    //质检查看
 export const getinspectLook = appRx.get(API_GET_INSPECT_GETINSPECTLOOK, errorCatcher, errorHandle, filter)
-//质检查看潮粮单价
+    //质检查看潮粮单价
 export const getinspectLookUnitPrice = appRx.get(API_GET_INSPECT_GETINSPECTLOOKUNITPRICE, errorCatcher, errorHandle, filter)
-//质检查看货名下拉
+    //质检查看货名下拉
 export const getinspectLookGoods = appRx.get(API_GET_INSPECT_GETINSPECTLOOKGOODS, errorCatcher, errorHandle, filter)
-//质检修改
+    //质检修改
 export const getinspectEdit = appRx.post(API_POST_INSPECT_GETINSPECTEDIT, errorCatcher, errorHandle, filter)
-//质检删除
+    //质检删除
 export const getinspectDelete = appRx.post(API_POST_INSPECT_GETINSPECTDELETE, errorCatcher, errorHandle, filter)
-//付款管理列表
+    //付款管理列表
 export const getpayment = appRx.get(API_GET_PAYMENTMANAGEMENT, errorCatcher, errorHandle, filter)
-//检斤列表查看
+    //检斤列表查看
 export const getweighingList = appRx.get(API_GET_WEIGHTCHECK_GETWEIGHINGLIST, errorCatcher, errorHandle, filter)
-//皮重检斤保存
+    //皮重检斤保存
 export const tare = appRx.post(API_POST_WEIGHTCHECK_TARE, errorCatcher, errorHandle, filter)
-//毛重检斤保存
+    //毛重检斤保存
 export const grossWeight = appRx.post(API_POST_WEIGHTCHECK_GROSSWEIGHT, errorCatcher, errorHandle, filter)
-//检斤删除
+    //检斤删除
 export const getweighingDelete = appRx.post(API_POST_INSPECT_GETWEIGHTDELETE, errorCatcher, errorHandle, filter)
-//付款信息查看
+    //付款信息查看
 export const getpaymentexamine = appRx.get(API_GET_PAYMENT, errorCatcher, errorHandle, filter)
-//付款信息结算
+    //付款信息结算
 export const postpaymentedit = appRx.post(API_POST_PAYMENT_EDIT, errorCatcher, errorHandle, filter)
-//质检客户下拉校验
+    //质检客户下拉校验
 export const getamount = appRx.get(API_GET_INSPECT_GETAMOUNT, errorCatcher, errorHandle, filter)
-//质检运输方式
+    //质检运输方式
 export const getinspectcontractno = appRx.get(API_GET_INSPECT_CONTRACTNO, errorCatcher, errorHandle, filter)
-//身份证识别
+    //身份证识别
 export const getIdentity = appRx.get(API_GET_CUSTOMER_GETIDENTITY, errorCatcher, errorHandle, filter)
-//银行卡识别
+    //银行卡识别
 export const getBank = appRx.get(API_GET_CUSTOMER_GETBANK, errorCatcher, errorHandle, filter)
-//查询货名有未结算状态
+    //查询货名有未结算状态
 export const getCount = appRx.get(API_GET_INSPECT_GETCOUNT, errorCatcher, errorHandle, filter)
-//检斤打印查看
+    //检斤打印查看
 export const getPrint = appRx.get(API_GET_WEIGHTCHECK_GETPRINT, errorCatcher, errorHandle, filter)
-//付款删除
-export const delpayment  = appRx.post(API_POST_PAYMENT_DEL, errorCatcher, errorHandle, filter)
-//付款审核
-export const auditpayment  = appRx.post(API_POST_PAYMENT_AUDIT, errorCatcher, errorHandle, filter)
-//付款提交
+    //付款删除
+export const delpayment = appRx.post(API_POST_PAYMENT_DEL, errorCatcher, errorHandle, filter)
+    //付款审核
+export const auditpayment = appRx.post(API_POST_PAYMENT_AUDIT, errorCatcher, errorHandle, filter)
+    //付款提交
 export const paymentCommit = appRx.post(API_POST_PAYMENT_PAYMENTSUBMIT, errorCatcher, errorHandle, filter)
-//付款结算修改
+    //付款结算修改
 export const settlementEdit = appRx.post(API_POST_PAYMENT_SETTLEMENTEDIT, errorCatcher, errorHandle, filter)
-//质检干粮单价查看
+    //质检干粮单价查看
 export const getDryGrainPrice = appRx.get(API_GET_INSPECT_GETDRYGRAINPRICE, errorCatcher, errorHandle, filter)
-//付款权限查询
-export const getJurisdiction  = appRx.get(API_GET_INSPECT_GETJURISDICTION, errorCatcher, errorHandle, filter)
-//财务开票post
-export const invoicing  = appRx.post(API_POST_INVOICING, errorCatcher, errorHandle, filter)
+    //付款权限查询
+export const getJurisdiction = appRx.get(API_GET_INSPECT_GETJURISDICTION, errorCatcher, errorHandle, filter)
+    //财务开票post
+export const invoicing = appRx.post(API_POST_INVOICING, errorCatcher, errorHandle, filter)
 
 export const export1 = appRx.post(API_POST_EXPORT)
-// 车牌号
-export const getshippinginfo  = appRx.get(API_GET_SHIPPINGINFOFORMATION, errorCatcher, errorHandle, filter)
-// 确认初检信息
-export const postCheck  = appRx.post(API_POST_INSPECTIONCHECK, errorCatcher, errorHandle, filter)
-// 单据二维码
-export const getQRcode  = appRx.get(API_GAT_QRCODE, errorCatcher, errorHandle, filter)
-// 二维码获取数据
-export const getQRCodeData  = appRx.get(API_GAT_GETQRCODE, errorCatcher, errorHandle, filter)
-// 车型
-export const getcartype  = appRx.get(API_GAT_INFO, errorCatcher, errorHandle, filter)
-// 审核之后
+    // 车牌号
+export const getshippinginfo = appRx.get(API_GET_SHIPPINGINFOFORMATION, errorCatcher, errorHandle, filter)
+    // 确认初检信息
+export const postCheck = appRx.post(API_POST_INSPECTIONCHECK, errorCatcher, errorHandle, filter)
+    // 单据二维码
+export const getQRcode = appRx.get(API_GAT_QRCODE, errorCatcher, errorHandle, filter)
+    // 二维码获取数据
+export const getQRCodeData = appRx.get(API_GAT_GETQRCODE, errorCatcher, errorHandle, filter)
+    // 车型
+export const getcartype = appRx.get(API_GAT_INFO, errorCatcher, errorHandle, filter)
+    // 审核之后
 export const workflowcontent = appRx.get(API_POST_WORKFLOW_TASK, errorCatcher, errorHandle, filter)
-// 反结算
+    // 反结算
 export const suspendinstance = appRx.post(API_POST_SUSPENDINSTANCE, errorCatcher, errorHandle, filter)
-// 导入
+    // 导入
 export const importWord = appRx.post(API_POST_IMPORT, errorCatcher, errorHandle, filter)
-// 导入移库
+    // 导入移库
 export const importWordYk = appRx.post(API_POST_IMPORT_YK, errorCatcher, errorHandle, filter)
-// 查看结算单
+    // 查看结算单
 export const getsettleaccout = appRx.get(API_GET_SETTLEACCOUT, errorCatcher, errorHandle, filter)
-// 退回
+    // 退回
 export const returnInfo = appRx.post(API_POST_RETURN, errorCatcher, errorHandle, filter)
-// 删除
+    // 删除
 export const deleteInfo = appRx.post(API_POST_DELETE, errorCatcher, errorHandle, filter)
-// 新检斤保存
+    // 新检斤保存
 export const newSubmit = appRx.post(API_POST_SUBMIT, errorCatcher, errorHandle, filter)
-// 换仓
+    // 换仓
 export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle, filter)
-// 获取合同
+    // 获取合同
 export const getcontract = appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle, filter)
-// 发起人撤回
+    // 发起人撤回
 export const sponsorWithdraw = appRx.post(API_SPONSOR_WITHDRAW, errorCatcher, errorHandle, filter)
-// 获取仓库id
+    // 获取仓库id
 export const getBaseId = appRx.get(API_GET_BASEID, errorCatcher, errorHandle, filter)
-// 换任务号
+    // 换任务号
 export const changeTaskNo = appRx.post(API_POST_TASK_NO, errorCatcher, errorHandle, filter)
-// 丹东港生成入库单
+    // 丹东港生成入库单
 export const dandongOrder = appRx.post(API_POST_DANDONG_ORDER, errorCatcher, errorHandle, filter)
-// 检查客户送粮量
-export const getquality = appRx.get(API_GETQUALITY, errorCatcher, errorHandle, filter)
-// 换客户
+    // 获取仓库摄像头
+export const getVideo = appRx.post(API_POST_GETVIDEO, errorCatcher, errorHandle, filter)
+    // 获取车牌号
+export const getCarNumber = appRx.post(API_POST_GETCARNUMBER, errorCatcher, errorHandle, filter)
+    // 换客户
 export const changeCustomer = appRx.post(API_POST_CUSTOMER, errorCatcher, errorHandle, filter)
-// 查询仓库新
+    // 查询仓库新
 export const getwarehouse = appRx.get(API_GET_WAREHOUSE, errorCatcher, errorHandle, filter)
+
+export const getToken = appRx.post(API_POST_GETOKEN, errorCatcher, errorHandle, filter)
+export const getRom = appRx.post(API_POST_GEROM, errorCatcher, errorHandle, filter)

+ 65 - 61
src/store/getters.js

@@ -1,66 +1,70 @@
 import { getStore } from '@/utils/store'
 import { version } from '../../package.json'
 const getters = {
-  systemVersion: state => version,
-  tag: state => state.tags.tag,
-  website: state => state.commonStore.website,
-  userInfo: state => state.user.userInfo || getStore({ name: 'userInfo' }),
-  userSetting: state => state.user.userSetting || getStore({ name: 'userSetting' }),
-  colorName: state => state.commonStore.colorName,
-  themeName: state => state.commonStore.themeName,
-  isShade: state => state.commonStore.isShade,
-  isCollapse: state => state.commonStore.isCollapse,
-  keyCollapse: (state, getters) => getters.screen > 1 ? getters.isCollapse : false,
-  screen: state => state.commonStore.screen,
-  isLock: state => state.commonStore.isLock,
-  isFullScren: state => state.commonStore.isFullScren,
-  lockPasswd: state => state.commonStore.lockPasswd,
-  tagList: state => state.tags.tagList,
-  tagWel: state => state.tags.tagWel,
-  permission: state => state.user.permission,
-  menuAll: state => state.user.menuAll,
-  logsList: state => state.logs.logsList,
-  logsLen: state => state.logs.logsList.length || 0,
-  logsFlag: (state, getters) => getters.logsLen === 0,
-  showTag: state => state.commonStore.showTag,
-  showMenu: state => state.commonStore.showMenu,
-  showTheme: state => state.commonStore.showTheme,
-  showSearch: state => state.commonStore.showSearch,
-  openRoute: state => state.user.openRoute,
-  sidebar: state => state.app.sidebar,
-  language: state => state.app.language,
-  size: state => state.app.size,
-  device: state => state.app.device,
-  visitedViews: state => state.tagsView.visitedViews,
-  cachedViews: state => state.tagsView.cachedViews,
-  token: state => state.user.token,
-  avatar: state => state.user.avatar,
-  name: state => state.user.name,
-  introduction: state => state.user.introduction,
-  roles: state => state.user.roles,
-  companyId: state => state.user.companyId,
-  menu: state => state.permission.menu,
-  tabActiveName: state => state.user.tabActiveName,
-  systemOperationNum: state => state.app.systemOperationNum,
-  systemWarnNum: state => state.app.systemWarnNum,
-  baseInfo: state => state.user.baseInfo, // 设置系统基础信息
-  deptBudgetList: state => state.app.deptBudgetList,
-  reader: state => state.app.reader,
-  guideInfo: state => state.user.guideInfo, // 新手指引信息
-  sparepartSp: state => state.app.sparepartSp, // 搜索状态
-  sparepartMa: state => state.app.sparepartMa, // 搜索状态
-  sparepartMap: state => state.app.sparepartMap, // 航海搜索状态
-  isLoadding: state => state.app.isLoadding, // loadding 状态
-  // 产品-体系-文件修改程序(待处理个数)
-  modificationNum: state => state.app.modificationNum,
-  // 产品-体系-运行预警
-  warnNum: state => state.app.warnNum,
-  // 产品-体系-流转报表(待处理个数)
-  circulationNum: state => state.app.circulationNum,
-  // 船端是否弹出框
-  scheduleState: state => state.user.scheduleState,
-  isTrainDialog: state => state.user.isTrainDialog, // 新手训练营弹框显示
-  adminId: state => state.app.adminId, 
+    systemVersion: state => version,
+    tag: state => state.tags.tag,
+    website: state => state.commonStore.website,
+    userInfo: state => state.user.userInfo || getStore({ name: 'userInfo' }),
+    userSetting: state => state.user.userSetting || getStore({ name: 'userSetting' }),
+    colorName: state => state.commonStore.colorName,
+    themeName: state => state.commonStore.themeName,
+    isShade: state => state.commonStore.isShade,
+    isCollapse: state => state.commonStore.isCollapse,
+    keyCollapse: (state, getters) => getters.screen > 1 ? getters.isCollapse : false,
+    screen: state => state.commonStore.screen,
+    isLock: state => state.commonStore.isLock,
+    isFullScren: state => state.commonStore.isFullScren,
+    lockPasswd: state => state.commonStore.lockPasswd,
+    tagList: state => state.tags.tagList,
+    tagWel: state => state.tags.tagWel,
+    permission: state => state.user.permission,
+    menuAll: state => state.user.menuAll,
+    logsList: state => state.logs.logsList,
+    logsLen: state => state.logs.logsList.length || 0,
+    logsFlag: (state, getters) => getters.logsLen === 0,
+    showTag: state => state.commonStore.showTag,
+    showMenu: state => state.commonStore.showMenu,
+    showTheme: state => state.commonStore.showTheme,
+    showSearch: state => state.commonStore.showSearch,
+    openRoute: state => state.user.openRoute,
+    sidebar: state => state.app.sidebar,
+    language: state => state.app.language,
+    size: state => state.app.size,
+    device: state => state.app.device,
+    // visitedViews: state => state.tagsView.visitedViews,
+    // cachedViews: state => state.tagsView.cachedViews,
+    token: state => state.user.token,
+    avatar: state => state.user.avatar,
+    name: state => state.user.name,
+    introduction: state => state.user.introduction,
+    roles: state => state.user.roles,
+    companyId: state => state.user.companyId,
+    menu: state => state.permission.menu,
+    tabActiveName: state => state.user.tabActiveName,
+    systemOperationNum: state => state.app.systemOperationNum,
+    systemWarnNum: state => state.app.systemWarnNum,
+    baseInfo: state => state.user.baseInfo, // 设置系统基础信息
+    deptBudgetList: state => state.app.deptBudgetList,
+    reader: state => state.app.reader,
+    guideInfo: state => state.user.guideInfo, // 新手指引信息
+    sparepartSp: state => state.app.sparepartSp, // 搜索状态
+    sparepartMa: state => state.app.sparepartMa, // 搜索状态
+    sparepartMap: state => state.app.sparepartMap, // 航海搜索状态
+    isLoadding: state => state.app.isLoadding, // loadding 状态
+    // 产品-体系-文件修改程序(待处理个数)
+    modificationNum: state => state.app.modificationNum,
+    // 产品-体系-运行预警
+    warnNum: state => state.app.warnNum,
+    // 产品-体系-流转报表(待处理个数)
+    circulationNum: state => state.app.circulationNum,
+    // 船端是否弹出框
+    scheduleState: state => state.user.scheduleState,
+    isTrainDialog: state => state.user.isTrainDialog, // 新手训练营弹框显示
+    adminId: state => state.app.adminId,
+    videoSrc1: state => state.user.videoSrc1,
+    videoSrc2: state => state.user.videoSrc2,
+    carNumber1: state => state.user.carNumber1,
+    carNumber2: state => state.user.carNumber2,
 
 }
-export default getters
+export default getters

+ 300 - 277
src/store/modules/user.js

@@ -1,8 +1,8 @@
-import { fastLogin, logout, login,complogin, getRoule, getCurrentUserInfo, companyInfo, isLandBased, getAccountLoginHistoryCount, updateShowInfo }
-  from '@/model/indexRx'
+import { fastLogin, logout, login, complogin, getRoule, getCurrentUserInfo, companyInfo, isLandBased, getAccountLoginHistoryCount, updateShowInfo }
+from '@/model/indexRx'
 import { getNoviceGuideData, findVesselSysVersion, getStaffHomeShowList } from '@/model/indexRx'
 import {
-  getTenantInfoByUser,
+    getTenantInfoByUser,
 } from '@/model/signIn/index'
 import { setToken, getCompanyId, clearStorage } from '../../utils/auth'
 import { resetRouter, asyncRoutes } from '../../router'
@@ -10,309 +10,332 @@ import notification from '../../notification'
 import { Message } from 'element-ui';
 import Cookies from 'js-cookie'
 import {
-  setStore,
+    setStore,
 } from '@/utils/store'
 import { groupBy } from 'lodash'
 
 const state = {
-  token: '',
-  name: '',
-  avatar: '',
-  openRoute:[],
-  companyId: getCompanyId(),
-  introduction: '',
-  roles: [],
-  tabActiveName: '', // 用于存放采购管理模块的tab
-  baseInfo: {},
-  scheduleState: true,
-  guideInfo: {},
-  isTrainDialog: '',
-  userInfo: '',
-  userSetting: '',
-  adminId: Cookies.get('adminId') || ''
+    carNumber1: '',
+    carNumber2: '',
+    token: '',
+    name: '',
+    avatar: '',
+    openRoute: [],
+    companyId: getCompanyId(),
+    introduction: '',
+    roles: [],
+    tabActiveName: '', // 用于存放采购管理模块的tab
+    baseInfo: {},
+    scheduleState: true,
+    guideInfo: {},
+    isTrainDialog: '',
+    userInfo: '',
+    userSetting: '',
+    adminId: Cookies.get('adminId') || ''
 }
 
 const getters = {
-  // ...
-  getUserSetting: (state, getters) => {
-    return getters.userSetting
-  }
+    // ...
+    getUserSetting: (state, getters) => {
+        return getters.userSetting
+    },
 }
 
 const mutations = {
-  // 设置基础信息
-  SET_BASE_INFO: (state, baseInfo) => {
-    state.baseInfo = { ...baseInfo } // , fileUrl: '/pb'
-  },
-  // 新手指引信息
-  SET_GUIDE_INFO: (state, guideInfo) => {
-    state.guideInfo = { ...guideInfo }
-  },
-  SET_TOKEN: (state, token) => {
-    state.token = token
-  },
-  SET_INTRODUCTION: (state, introduction) => {
-    state.introduction = introduction
-  },
-  SET_NAME: (state, name) => {
-    state.name = name
-  },
-  SET_AVATAR: (state, avatar) => {
-    state.avatar = avatar
-  },
-  SET_ROLES: (state, roles) => {
-    state.roles = roles
-  },
-  SET_OPEN_ROUTE: (state, openRoute) => {
-    console.log(state, openRoute)
-    state.openRoute = openRoute
-  },
-  SET_COMPANY: (state, companyId) => {
-    state.companyId = companyId
-  },
-  // SET_TRAIN: (state, isTrainDialog) => {
-  //   state.isTrainDialog = isTrainDialog
-  // },
-  SET_TABNAME: (state, tabActiveName) => {
-    state.tabActiveName = tabActiveName
-  },
-  SET_SCHEDULE_STATE: (state, params) => {
-    state.scheduleState = params
-  },
-  SET_USER_INFO: (state, params) => {
-    state.userInfo = params
-  },
-  SET_USERSETTING: (state, params) => {
-    state.userSetting = params
-  },
-  SET_ADMINID: (state, adminId) => {
-    state.adminId = adminId
-    Cookies.set('adminId', adminId)
-  }
+    // 设置基础信息
+    SET_BASE_INFO: (state, baseInfo) => {
+        state.baseInfo = {...baseInfo } // , fileUrl: '/pb'
+    },
+    // 新手指引信息
+    SET_GUIDE_INFO: (state, guideInfo) => {
+        state.guideInfo = {...guideInfo }
+    },
+    SET_TOKEN: (state, token) => {
+        state.token = token
+    },
+    SET_VIDEOSRC1: (state, videoSrc1) => {
+        state.videoSrc1 = videoSrc1
+    },
+    SET_VIDEOSRC2: (state, videoSrc2) => {
+        state.videoSrc2 = videoSrc2
+    },
+    SET_CARNUMBER1: (state, carNumber1) => {
+        state.carNumber1 = carNumber1
+    },
+    SET_CARNUMBER2: (state, carNumber2) => {
+        state.carNumber2 = carNumber2
+    },
+
+    SET_INTRODUCTION: (state, introduction) => {
+        state.introduction = introduction
+    },
+    SET_NAME: (state, name) => {
+        state.name = name
+    },
+    SET_AVATAR: (state, avatar) => {
+        state.avatar = avatar
+    },
+    SET_ROLES: (state, roles) => {
+        state.roles = roles
+    },
+    SET_OPEN_ROUTE: (state, openRoute) => {
+        state.openRoute = openRoute
+    },
+    SET_COMPANY: (state, companyId) => {
+        state.companyId = companyId
+    },
+    // SET_TRAIN: (state, isTrainDialog) => {
+    //   state.isTrainDialog = isTrainDialog
+    // },
+    SET_TABNAME: (state, tabActiveName) => {
+        state.tabActiveName = tabActiveName
+    },
+    SET_SCHEDULE_STATE: (state, params) => {
+        state.scheduleState = params
+    },
+    SET_USER_INFO: (state, params) => {
+        state.userInfo = params
+    },
+    SET_USERSETTING: (state, params) => {
+        state.userSetting = params
+    },
+    SET_ADMINID: (state, adminId) => {
+        state.adminId = adminId
+        Cookies.set('adminId', adminId)
+    }
 }
 
 const actions = {
-  async login({ commit, dispatch }, userInfo) {
-    const { username, password, domainName, companyName,status } = userInfo
-    localStorage.setItem('ws-pf_pass',password)
-      const data = await login({
-      username: username.trim(),
-      password: password,
-      domainName: domainName,
-      companyName: companyName
-    }).toPromise()
-    
-    const { compId,
-      tenantId,
-      vesselId,
-      vesselBankFlag,
-      clientFag,
-      userId
-    } = data
+    async login({ commit, dispatch }, userInfo) {
+        const { username, password, domainName, companyName, status } = userInfo
+        localStorage.setItem('ws-pf_pass', password)
+        const data = await login({
+            username: username.trim(),
+            password: password,
+            domainName: domainName,
+            companyName: companyName
+        }).toPromise()
 
-    // {TYPE='' MESSAGE} [第一次,失效].indexOf(type){type,msg,到期时间}
-    // EventBus.$emit('success', '登录成功')
-    localStorage.setItem('ws-pf_compId', compId)
-    localStorage.setItem('ws-pf_userId', userId)
-    localStorage.setItem('ws-pf_tenantId', tenantId)
-    localStorage.setItem('ws-pf_vesselId', vesselId) // 仅适用于一条船
-    localStorage.setItem('ws-pf_vesselBankFlag', vesselBankFlag) // 当前登录人是船端还是岸端的人员
-    localStorage.setItem('ws-pf_clientFag', clientFag)
-    notification.setSessionId(userId) // 设置通知唯一标识
-    notification.start() // 开始监听通知
-    // 查询当前租户服务类型
-    await isLandBased().toPromise().then(response => {
-      localStorage.setItem('ws-pf_serviceTypeFlag', response)
-    })
-    const { organizationMonetaryKey,
-      compName,
-      compDomainName,
-      organizationMonetaryValue
-    } = await companyInfo({ compId: compId }).toPromise()
-    localStorage.setItem('ws-pf_organMonetaryKey', organizationMonetaryKey)
-    localStorage.setItem('ws-pf_compName', compName)
-    localStorage.setItem('ws-pf_compDomainName', compDomainName)
-    localStorage.setItem('ws-pf_organMonetaryValue', organizationMonetaryValue)
-    dispatch('getUserInfo', { vesselBankFlag, compName })
-    dispatch('toSetShow', userId)
-    setToken('Admin-Token')
-    return data
-  },
-  
-  // async complogin({ commit, dispatch }, userInfo) {
-    
-      
-  // },
-  async fastLogin({ dispatch }, userInfo) {
-    const { mobilePhone, veriCode } = userInfo
-    const data = await fastLogin({
-      mobilePhone: mobilePhone,
-      veriCode: veriCode
-    }).toPromise()
-    const {
-      compId,
-      userId,
-      tenantId,
-      vesselId,
-      vesselBankFlag
-    } = data
-    localStorage.setItem('ws-pf_compId', compId)
-    localStorage.setItem('ws-pf_userId', userId)
-    localStorage.setItem('ws-pf_tenantId', tenantId)
-    localStorage.setItem('ws-pf_vesselId', vesselId) // 仅适用于一条船
-    localStorage.setItem('ws-pf_vesselBankFlag', vesselBankFlag) // 当前登录人是船端还是岸端的人员
+        const {
+            compId,
+            tenantId,
+            vesselId,
+            vesselBankFlag,
+            clientFag,
+            userId
+        } = data
+
+        // {TYPE='' MESSAGE} [第一次,失效].indexOf(type){type,msg,到期时间}
+        // EventBus.$emit('success', '登录成功')
+        localStorage.setItem('ws-pf_compId', compId)
+        localStorage.setItem('ws-pf_userId', userId)
+        localStorage.setItem('ws-pf_tenantId', tenantId)
+        localStorage.setItem('ws-pf_vesselId', vesselId) // 仅适用于一条船
+        localStorage.setItem('ws-pf_vesselBankFlag', vesselBankFlag) // 当前登录人是船端还是岸端的人员
+        localStorage.setItem('ws-pf_clientFag', clientFag)
+        notification.setSessionId(userId) // 设置通知唯一标识
+        notification.start() // 开始监听通知
+            // 查询当前租户服务类型
+        await isLandBased().toPromise().then(response => {
+            localStorage.setItem('ws-pf_serviceTypeFlag', response)
+        })
+        const {
+            organizationMonetaryKey,
+            compName,
+            compDomainName,
+            organizationMonetaryValue
+        } = await companyInfo({ compId: compId }).toPromise()
+        localStorage.setItem('ws-pf_organMonetaryKey', organizationMonetaryKey)
+        localStorage.setItem('ws-pf_compName', compName)
+        localStorage.setItem('ws-pf_compDomainName', compDomainName)
+        localStorage.setItem('ws-pf_organMonetaryValue', organizationMonetaryValue)
+        dispatch('getUserInfo', { vesselBankFlag, compName })
+        dispatch('toSetShow', userId)
+        setToken('Admin-Token')
+        return data
+    },
 
-    notification.setSessionId(userId) // 设置通知唯一标识
-    notification.start() // 开始监听通知
+    // async complogin({ commit, dispatch }, userInfo) {
 
-    // 查询当前租户服务类型
-    isLandBased().toPromise().then(response => {
-      localStorage.setItem('ws-pf_serviceTypeFlag', response)
-    })
-    const {
-      organizationMonetaryKey,
-      compName,
-      organizationMonetaryValue
-    } = await companyInfo({ compId: compId }).toPromise()
 
-    localStorage.setItem('ws-pf_organMonetaryKey', organizationMonetaryKey)
-    localStorage.setItem('ws-pf_compName', compName)
-    localStorage.setItem(
-      'ws-pf_organMonetaryValue',
-      organizationMonetaryValue
-    )
-    dispatch('getUserInfo', { vesselBankFlag, compName })
-    dispatch('toSetShow', userId)
-    setToken('Admin-Token')
-    return data
+    // },
+    async fastLogin({ dispatch }, userInfo) {
+        const { mobilePhone, veriCode } = userInfo
+        const data = await fastLogin({
+            mobilePhone: mobilePhone,
+            veriCode: veriCode
+        }).toPromise()
+        const {
+            compId,
+            userId,
+            tenantId,
+            vesselId,
+            vesselBankFlag
+        } = data
+        localStorage.setItem('ws-pf_compId', compId)
+        localStorage.setItem('ws-pf_userId', userId)
+        localStorage.setItem('ws-pf_tenantId', tenantId)
+        localStorage.setItem('ws-pf_vesselId', vesselId) // 仅适用于一条船
+        localStorage.setItem('ws-pf_vesselBankFlag', vesselBankFlag) // 当前登录人是船端还是岸端的人员
 
-  },
-  // get user info
-  getRoule({ commit, state }) {
-    return new Promise(async (resolve, reject) => {
-      try {
-        const data = await getRoule(state.roles)
-        data.forEach(route => { asyncRoutes.push(route) })
-        commit('SET_ROUTES', asyncRoutes)
-        resolve(asyncRoutes)
-      } catch (error) {
-        reject(error)
-      }
-    })
-  },
+        notification.setSessionId(userId) // 设置通知唯一标识
+        notification.start() // 开始监听通知
 
-  // user logout
-  logout({ commit, state }) {
-    return new Promise((resolve, reject) => {
-      logout(state.token).toPromise()
-        .then(() => {
-          commit('SET_TOKEN', '')
-          commit('SET_COMPANY', '')
-          // commit('SET_TRAIN', '')
-          commit('SET_ROLES', [])
-          commit('SET_OPEN_ROUTE', [])
-          commit('SET_GUIDE_INFO', [])
-          commit('permission/SET_ROUTES', [], { root: true }) // 清空路由,因为有权限管理
-          localStorage.removeItem('wf-pf_admin-token')
-          clearStorage()
-          resetRouter()
-          notification.end() // 取消监听通知
-          resolve()
+        // 查询当前租户服务类型
+        isLandBased().toPromise().then(response => {
+            localStorage.setItem('ws-pf_serviceTypeFlag', response)
         })
-        .catch(error => {
-          reject(error)
+        const {
+            organizationMonetaryKey,
+            compName,
+            organizationMonetaryValue
+        } = await companyInfo({ compId: compId }).toPromise()
+
+        localStorage.setItem('ws-pf_organMonetaryKey', organizationMonetaryKey)
+        localStorage.setItem('ws-pf_compName', compName)
+        localStorage.setItem(
+            'ws-pf_organMonetaryValue',
+            organizationMonetaryValue
+        )
+        dispatch('getUserInfo', { vesselBankFlag, compName })
+        dispatch('toSetShow', userId)
+        setToken('Admin-Token')
+        return data
+
+    },
+    // get user info
+    getRoule({ commit, state }) {
+        return new Promise(async(resolve, reject) => {
+            try {
+                const data = await getRoule(state.roles)
+                data.forEach(route => { asyncRoutes.push(route) })
+                commit('SET_ROUTES', asyncRoutes)
+                resolve(asyncRoutes)
+            } catch (error) {
+                reject(error)
+            }
         })
-    })
-  },
+    },
 
-  // remove token
-  resetToken({ commit }) {
-    return new Promise(resolve => {
-      commit('SET_TOKEN', '')
-      commit('SET_ROLES', [])
-      clearStorage()
-      resolve()
-    })
-  },
+    // user logout
+    logout({ commit, state }) {
+        return new Promise((resolve, reject) => {
+            logout(state.token).toPromise()
+                .then(() => {
+                    commit('SET_TOKEN', '')
+                    commit('SET_COMPANY', '')
+                        // commit('SET_TRAIN', '')
+                    commit('SET_ROLES', [])
+                    commit('SET_OPEN_ROUTE', [])
+                    commit('SET_GUIDE_INFO', [])
+                    commit('permission/SET_ROUTES', [], { root: true }) // 清空路由,因为有权限管理
+                    localStorage.removeItem('wf-pf_admin-token')
+                    clearStorage()
+                    resetRouter()
+                    notification.end() // 取消监听通知
+                    resolve()
+                })
+                .catch(error => {
+                    reject(error)
+                })
+        })
+    },
 
-  async getBaseInfo({ commit }, params) {
-    if (process.env.VUE_APP_PACKAGE_ENV === 'ship') {
-      findVesselSysVersion().toPromise().then(res => {
-        let loginAddress = 'http://' + res.localHostAddress + ':81/'
-        commit('SET_BASE_INFO', {
-          fileUrl: loginAddress
+    // remove token
+    resetToken({ commit }) {
+        return new Promise(resolve => {
+            commit('SET_TOKEN', '')
+            commit('SET_ROLES', [])
+            clearStorage()
+            resolve()
         })
-      })
-    } else {
-    }
+    },
 
-  },
-  setScheduleState({ commit }, params) {
-    commit('SET_SCHEDULE_STATE', params)
-  },
-  async getTrainInfo({ commit }, params) {
-    let guideData = await getNoviceGuideData().toPromise()
-    commit('SET_GUIDE_INFO', guideData.data)
-  },
+    async getBaseInfo({ commit }, params) {
+        if (process.env.VUE_APP_PACKAGE_ENV === 'ship') {
+            findVesselSysVersion().toPromise().then(res => {
+                let loginAddress = 'http://' + res.localHostAddress + ':81/'
+                commit('SET_BASE_INFO', {
+                    fileUrl: loginAddress
+                })
+            })
+        } else {}
 
-  async getNewLogin({ commit }, params) {
-    // let res = await getAccountLoginHistoryCount().toPromise()
-    // commit('SET_TRAIN', res * 1 <= 0 ? 'new' : 'old')
-  },
-  async getUserInfo({ commit, dispatch }, { vesselBankFlag = 'B', compName = '' }) {
-    const response = await getCurrentUserInfo().toPromise()
-    const {
-      staffName, deptId, deptName, deptNameEn, vessels = [],
-      majorRole: { roleName = '', roleId = '', dutyId = '' },
-      roles
-    } = response
-    const content = {
-      ...response,
-      showRoleName: roleName || roles[0].roleName,
-      showRoleId: roleId || roles[0].roleId,
-      showCompName: vesselBankFlag === 'V' ? vessels[0].vesselName : compName,
-      avatar: 'img/user.png'
-    }
-    setStore({
-      name: 'userInfo', content: content, type: 'session'
-    })
-    dispatch('common/setLocalVessels', vessels, { root: true })
-    commit('SET_USER_INFO', content)
+    },
+    setScheduleState({ commit }, params) {
+        commit('SET_SCHEDULE_STATE', params)
+    },
+    async getTrainInfo({ commit }, params) {
+        let guideData = await getNoviceGuideData().toPromise()
+        commit('SET_GUIDE_INFO', guideData.data)
+    },
+
+    async getNewLogin({ commit }, params) {
+        // let res = await getAccountLoginHistoryCount().toPromise()
+        // commit('SET_TRAIN', res * 1 <= 0 ? 'new' : 'old')
+    },
+    async getUserInfo({ commit, dispatch }, { vesselBankFlag = 'B', compName = '' }) {
+        const response = await getCurrentUserInfo().toPromise()
+        const {
+            staffName,
+            deptId,
+            deptName,
+            deptNameEn,
+            vessels = [],
+            majorRole: { roleName = '', roleId = '', dutyId = '' },
+            roles
+        } = response
+        const content = {
+            ...response,
+            showRoleName: roleName || roles[0].roleName,
+            showRoleId: roleId || roles[0].roleId,
+            showCompName: vesselBankFlag === 'V' ? vessels[0].vesselName : compName,
+            avatar: 'img/user.png'
+        }
+        setStore({
+            name: 'userInfo',
+            content: content,
+            type: 'session'
+        })
+        dispatch('common/setLocalVessels', vessels, { root: true })
+        commit('SET_USER_INFO', content)
 
-    localStorage.setItem('ws-pf_dutyId', dutyId || response.roles[0].dutyId)
-    localStorage.setItem('ws-pf_roleName', roleName || roles[0].roleName)
+        localStorage.setItem('ws-pf_dutyId', dutyId || response.roles[0].dutyId)
+        localStorage.setItem('ws-pf_roleName', roleName || roles[0].roleName)
 
-    localStorage.setItem('ws-pf_staffName', staffName)
-    localStorage.setItem('ws-pf_deptId', deptId)
-    localStorage.setItem('ws-pf_deptName', deptName)
-    localStorage.setItem('ws-pf_deptNameEn', deptNameEn)
-    localStorage.setItem('ws-pf_vessels', JSON.stringify(vessels))
-    localStorage.setItem('ws-pf_roleId', roleId || roles[0].roleId)
+        localStorage.setItem('ws-pf_staffName', staffName)
+        localStorage.setItem('ws-pf_deptId', deptId)
+        localStorage.setItem('ws-pf_deptName', deptName)
+        localStorage.setItem('ws-pf_deptNameEn', deptNameEn)
+        localStorage.setItem('ws-pf_vessels', JSON.stringify(vessels))
+        localStorage.setItem('ws-pf_roleId', roleId || roles[0].roleId)
 
-  },
-  async toSetShow({ commit, dispatch }, { userId = '' }) {
-    const data = await getStaffHomeShowList({
-      staffId: userId
-    }).toPromise()
-    const showObject = groupBy(data, 'typeId')
-    setStore({
-      name: 'userSetting', content: showObject, type: 'session'
-    })
-    commit('SET_USERSETTING', showObject)
-  },
-  async changeVesslBank({ commit, dispatch, state }, showVal) {
-    await updateShowInfo(showVal).toPromise()
-    dispatch('toSetShow', { userId: localStorage.getItem('ws-pf_userId') })
-  },
-  setAdminId({ commit }, adminId) {
-    commit('SET_ADMINID', adminId)
-  },
+    },
+    async toSetShow({ commit, dispatch }, { userId = '' }) {
+        const data = await getStaffHomeShowList({
+            staffId: userId
+        }).toPromise()
+        const showObject = groupBy(data, 'typeId')
+        setStore({
+            name: 'userSetting',
+            content: showObject,
+            type: 'session'
+        })
+        commit('SET_USERSETTING', showObject)
+    },
+    async changeVesslBank({ commit, dispatch, state }, showVal) {
+        await updateShowInfo(showVal).toPromise()
+        dispatch('toSetShow', { userId: localStorage.getItem('ws-pf_userId') })
+    },
+    setAdminId({ commit }, adminId) {
+        commit('SET_ADMINID', adminId)
+    },
 }
 
 export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-  getters
-}
+    namespaced: true,
+    state,
+    mutations,
+    actions,
+    getters
+}

+ 95 - 0
src/utils/webSocket.js

@@ -0,0 +1,95 @@
+import Vue from 'vue'
+const uploadPath = process.env.VUE_APP_BASE_API + '/appendix/admin'
+import store from '@/vendors/vuex'
+// import router from './router'
+// 2.新创建一个vue实例
+const v = new Vue()
+let websocket1 = ''
+let websocket2 = ''
+export const whetherWebSocket1 = (ip, id) => {
+    var that = this
+    if ('WebSocket' in window) {
+        if (process.env.NODE_ENV === 'production') {
+            // websocket1 = new WebSocket('wss://www.zthymaoyi.com/wss/websocket/?adminId=84f62127b7384dcdbaeaddfe460329fc')
+            websocket1 = new WebSocket('wss://apitest2.eliangeyun.com/wss/websocket/' + ip)
+
+        } else {
+            // that.websocket = new WebSocket('ws://192.168.110.82:8080/')
+            // websocket1 = new WebSocket('ws://192.168.110.82:8090/ws/websocket/' + ip)
+            websocket1 = new WebSocket('wss://apitest2.eliangeyun.com/wss/websocket/' + ip)
+
+        }
+        initWebSocket1()
+    } else {
+        alert('当前浏览器不支持websocket')
+    }
+};
+
+function initWebSocket1() {
+    // 连接错误
+    websocket1.onerror = evt => {
+            console.log('websocket1   状态码:' + websocket1.readyState)
+        }
+        // 连接成功
+    websocket1.onopen = evt => {
+            console.log('websocket1    状态码:' + websocket1.readyState)
+        }
+        // 收到消息的回调
+    websocket1.onmessage = event => {
+            debugger
+            // 根据服务器推送的消息做自己的业务处理
+            // console.log('服务端返回:' + event)
+            // console.log('event.data', event.data)
+            let msg = event.data.split('$')
+            console.log('number1', msg[0])
+            store.commit('user/SET_CARNUMBER1', msg[0]);
+            // }
+
+            // console.log('执行成功')
+        }
+        // 连接关闭的回调
+    websocket1.onclose = evt => {
+        console.log('websocket1    状态码:' + websocket1.readyState)
+    }
+}
+
+export const whetherWebSocket2 = (ip, id) => {
+    var that = this
+    if ('WebSocket' in window) {
+        if (process.env.NODE_ENV === 'production') {
+            // websocket2 = new WebSocket('wss://www.zthymaoyi.com/wss/websocket/?adminId=84f62127b7384dcdbaeaddfe460329fc')
+            websocket2 = new WebSocket('wss://apitest2.eliangeyun.com/wss/websocket/' + ip)
+        } else {
+            // that.websocket = new WebSocket('ws://192.168.110.82:8080/')
+            websocket2 = new WebSocket('wss://apitest2.eliangeyun.com/wss/websocket/' + ip)
+        }
+        initWebSocket2()
+    } else {
+        alert('当前浏览器不支持websocket')
+    }
+};
+
+function initWebSocket2() {
+    // 连接错误
+    websocket2.onerror = evt => {
+            console.log('websocket2   状态码:' + websocket2.readyState)
+        }
+        // 连接成功
+    websocket2.onopen = evt => {
+            console.log('websocket2    状态码:' + websocket2.readyState)
+        }
+        // 收到消息的回调
+    websocket2.onmessage = event => {
+            // 根据服务器推送的消息做自己的业务处理
+            // console.log('服务端返回:' + event)
+            // console.log('event.data', event.data)
+            let msg = event.data.split('$')
+            console.log('number2', msg[0])
+            store.commit('user/SET_CARNUMBER2', msg[0]);
+            // console.log('执行成功')
+        }
+        // 连接关闭的回调
+    websocket2.onclose = evt => {
+        console.log('websocket2    状态码:' + websocket2.readyState)
+    }
+}

+ 140 - 12
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -24,8 +24,22 @@
 
         <div class="bottom">
           <div class="bg-left titleup"><span class="word_css">实时监控</span></div>
-          <!-- <div>
-            <canvas id="video" class="canvas"></canvas>
+           <!-- <div class="videoImg">
+            <div class="videoImg-row">
+                <video id="videoElement" autoplay muted width="50%"></video>
+              <video id="videoElement1" autoplay muted width="50%"></video>
+            </div>
+
+            <div class="videoImg-row">
+              <div class="carnumber-style">
+                <el-button @click='positionPlace(1)' type="primary" class="btn">定位车辆</el-button>
+                <div class="number">车牌号1:{{ $store.state.user.carNumber1 }}</div>
+              </div>
+              <div class="carnumber-style">
+                <el-button @click='positionPlace(2)' type="primary" class="btn">定位车辆</el-button>
+                <div class="number">车牌号2:{{ $store.state.user.carNumber2 }}</div>
+              </div>
+            </div>
           </div> -->
           <div v-if="!monitorUrl1" class="video1">
             <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
@@ -331,6 +345,7 @@
   </div>
 </template>
 <script>
+import flvjs from 'flv.js';
 import {
   tare,
   grossWeight,
@@ -341,7 +356,9 @@ import {
   selectWarehouseSelf,
   getsettleaccout,
   newSubmit,
-  getbinNumber
+  getbinNumber,
+  getToken,
+  getRom,
 } from '@/model/houseSelfCollect/index'
 import {
   addstorageputList
@@ -403,7 +420,9 @@ export default {
                 count: this.warehouseList[0].count,
                 No: this.warehouseList[0].commonWarehouseNo,
                 allowEdit: this.warehouseList[0].allowEdit,
-                compId: localStorage.getItem('ws-pf_compId')
+                compId: localStorage.getItem('ws-pf_compId'),
+                ip1: this.warehouseList[0].shexiang1,
+                ip2: this.warehouseList[0].shexiang2
               }))
               this.warehouseName = this.warehouseList[0].warehouseName
               localStorage.setItem('ck', this.warehouseName)
@@ -451,6 +470,11 @@ export default {
   },
   data() {
     return {
+      player: null,
+      ip1: '',
+      ip2: '',
+      rom1: '',
+      rom2: '',
       timer: '',
       refresh: 60,
       isShowBalance: false,
@@ -778,8 +802,15 @@ export default {
           this.allowEdit = _saomaData.allowEdit
           this.id = _saomaData.id
           this.number = _saomaData.number
-
-
+          for (var i = 0; i < response.length; i++) {
+            if (this.warehouseName == this.warehouseList[i].warehouseName) {
+              this.ip1 = this.warehouseList[i].shexiang1
+              this.ip2 = this.warehouseList[i].shexiang2
+              this.rom1 = this.warehouseList[i].rom1
+              this.rom2 = this.warehouseList[i].rom2
+              break
+            }
+          }
           localStorage.removeItem('saoma_data'); //第一次进来结束后清除缓存
         } else if (localStorage.getItem('houseSelfCollect_house1')) {
           this.warehouseName = JSON.parse(localStorage.getItem('houseSelfCollect_house1')).value
@@ -789,6 +820,10 @@ export default {
               this.monitorUrl1 = this.warehouseList[i].monitorUrl1
               this.monitorUrl2 = this.warehouseList[i].monitorUrl2
               this.allowEdit = this.warehouseList[i].allowEdit
+              this.ip1 = this.warehouseList[i].shexiang1
+              this.ip2 = this.warehouseList[i].shexiang2
+              this.rom1 = this.warehouseList[i].rom1
+              this.rom2 = this.warehouseList[i].rom2
               break
             }
           }
@@ -807,6 +842,10 @@ export default {
           this.allowEdit = this.warehouseList[0].allowEdit
           this.monitorUrl1 = this.warehouseList[0].monitorUrl1
           this.monitorUrl2 = this.warehouseList[0].monitorUrl2
+          this.ip1 = this.warehouseList[0].shexiang1
+          this.ip2 = this.warehouseList[0].shexiang2
+          this.rom1 = this.warehouseList[0].rom1
+          this.rom2 = this.warehouseList[0].rom2
         }
 
         this.deptBudgetList.warehouseName = this.warehouseName
@@ -842,6 +881,101 @@ export default {
 
   },
   methods: {
+    play() {
+      this.flvPlayer.play();
+    },
+    positionPlace(type) {
+      let _number = ''
+      if(type ==1){
+        _number = this.carNumber1
+      }else{
+        _number = this.carNumber2
+      }
+      console.log('定位车辆')
+      console.log(this.carList)
+      for (let i = 0; i < this.carList.length; i++) {
+        if (_number == this.carList[i].carNumber) {
+          this.setCurrent(this.carList[2])
+          return
+        } else {
+          this.$message({
+            message: '未识别到车辆信息',
+            type: 'warning'
+          });
+        }
+      }
+    },
+    getVideos(ip1, ip2, rom1, rom2) {
+      if (rom1) {
+        if (flvjs.isSupported()) {
+          getToken({ romId: rom1 })
+            .toPromise()
+            .then((response) => {
+              console.log(111)
+              // let _accessToken = response.split('$$')[0]
+              let _playUrl = response.split('$$')[1]
+              // this.VideoSrc = _playUrl
+              let videoElement = document.getElementById('videoElement');
+              this.flvPlayer = flvjs.createPlayer({
+                type: 'flv',
+                isLive: true,
+                hasAudio: false,
+                url: _playUrl
+              });
+              this.flvPlayer.attachMediaElement(videoElement);
+              this.flvPlayer.load();
+              this.flvPlayer.play();
+
+            })
+            .catch((response) => {
+
+            })
+        }
+        whetherWebSocket1(ip1, localStorage.getItem('ws-pf_userId'))
+      }
+      if (rom2) {
+          if (flvjs.isSupported()) {
+            getRom({ romId: rom2 })
+              .toPromise()
+              .then((response) => {
+                console.log(111)
+                // let _accessToken = response.split('$$')[0]
+                let _playUrl = response.split('$$')[1]
+                // this.VideoSrc1 = _playUrl
+                let videoElement1 = document.getElementById('videoElement1');
+                this.flvPlayer = flvjs.createPlayer({
+                  type: 'flv',
+                  isLive: true,
+                  hasAudio: false,
+                  url: _playUrl
+                });
+                this.flvPlayer.attachMediaElement(videoElement1);
+                this.flvPlayer.load();
+                this.flvPlayer.play();
+
+              })
+              .catch((response) => {
+
+              })
+          }
+
+          whetherWebSocket2(ip2, localStorage.getItem('ws-pf_userId'))
+        }
+
+      // getVideo({
+      //   ip1:ip1,
+      //   ip2:ip2,
+      //   userId:localStorage.getItem('ws-pf_userId')
+      // })
+      //     .toPromise()
+      //     .then((response) => {
+      //       console.log(111)
+
+      //   })
+      //   .catch((response) => { 
+
+      //   })
+    },
     changeOut(e) {
         if (e) {
           this.printout = true
@@ -849,12 +983,6 @@ export default {
           this.printout = false
         }
       },
-    getVideos() {
-      let canvas = document.getElementById('video')
-      let url = 'ws://127.0.0.1:8082'
-      var player = new JSMpeg.Player(url, { canvas: canvas })
-      console.log(player)
-    },
     refreshClick(type) {
       let that = this
       if (type == 1) {

+ 119 - 119
src/views/platformAudit/component/routers/route.js

@@ -14,128 +14,128 @@ const platformauditRouter = {
     children: [
 
         // 粮商审核
-        {
-            path: 'grainmerchantreview',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainmerchantreview'),
-            name: 'grainmerchantreview',
-            meta: {
-                title: 'grainmerchantreview',
-                shortcutEntrance: 'grainmerchantreview',
-                module: 'audit.grainMerchant.grainMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '粮商审核'
-            },
-        },
+        // {
+        //     path: 'grainmerchantreview',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainmerchantreview'),
+        //     name: 'grainmerchantreview',
+        //     meta: {
+        //         title: 'grainmerchantreview',
+        //         shortcutEntrance: 'grainmerchantreview',
+        //         module: 'audit.grainMerchant.grainMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '粮商审核'
+        //     },
+        // },
 
-        //司机审核
-        {
-            path: 'driverreview',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/driverreview'),
-            name: 'driverreview',
-            meta: {
-                title: 'driverreview',
-                shortcutEntrance: 'driverreview',
-                module: 'audit.driverMerchant.driverMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '司机审核'
-            },
-        },
+        // //司机审核
+        // {
+        //     path: 'driverreview',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/driverreview'),
+        //     name: 'driverreview',
+        //     meta: {
+        //         title: 'driverreview',
+        //         shortcutEntrance: 'driverreview',
+        //         module: 'audit.driverMerchant.driverMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '司机审核'
+        //     },
+        // },
 
-        //采购交易信息审核
-        {
-            path: 'transactioninformationreview',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/transactioninformationreview'),
-            name: 'transactioninformationreview',
-            meta: {
-                title: 'transactioninformationreview',
-                shortcutEntrance: 'transactioninformationreview',
-                module: 'audit.tranMerchant.tranMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '采购信息审核'
-            },
-        },
+        // //采购交易信息审核
+        // {
+        //     path: 'transactioninformationreview',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/transactioninformationreview'),
+        //     name: 'transactioninformationreview',
+        //     meta: {
+        //         title: 'transactioninformationreview',
+        //         shortcutEntrance: 'transactioninformationreview',
+        //         module: 'audit.tranMerchant.tranMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '采购信息审核'
+        //     },
+        // },
 
-        //销售交易信息审核
-        {
-            path: 'saletransactioninformationreview',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/saletransactioninformationreview'),
-            name: 'saletransactioninformationreview',
-            meta: {
-                title: 'saletransactioninformationreview',
-                shortcutEntrance: 'saletransactioninformationreview',
-                module: 'audit.tranMerchant.tranMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '销售信息审核'
-            },
-        },
-        //粮脉企业审核
-        {
-            path: 'grainpulseenterprisereview',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainpulseenterprisereview'),
-            name: 'grainpulseenterprisereview',
-            meta: {
-                title: 'grainpulseenterprisereview',
-                shortcutEntrance: 'grainpulseenterprisereview',
-                module: 'audit.tranMerchant.tranMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '粮脉企业审核'
-            },
-        },
-        //粮脉动态审核
-        {
-            path: 'grainPulseDynamic',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainPulseDynamic'),
-            name: 'grainPulseDynamic',
-            meta: {
-                title: 'grainPulseDynamic',
-                shortcutEntrance: 'grainPulseDynamic',
-                module: 'audit.grainMerchant.grainMerchantInfo.review',
-                permissicon: [],
-                keepAlive: true,
-                _title: '粮脉动态审核'
-            },
-        },
-        //交易信息审核
-        {
-            path: 'tradeInformation',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/tradeInformation'),
-            name: 'tradeInformation',
-            meta: {
-                title: 'tradeInformation',
-                shortcutEntrance: 'tradeInformation',
-                module: 'audit.grainMerchant.grainMerchantInfo.review',
-                permissicon: [],
-                keepAlive: true,
-                _title: '交易信息审核'
-            },
-        },
-        // 客服留言
-        {
-            path: 'customerService',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/customerService'),
-            name: 'customerService',
-            meta: {
-                title: 'customerService',
-                shortcutEntrance: 'customerService',
-                module: 'audit.grainMerchant.grainMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '客服留言'
-            },
-        },
+        // //销售交易信息审核
+        // {
+        //     path: 'saletransactioninformationreview',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/saletransactioninformationreview'),
+        //     name: 'saletransactioninformationreview',
+        //     meta: {
+        //         title: 'saletransactioninformationreview',
+        //         shortcutEntrance: 'saletransactioninformationreview',
+        //         module: 'audit.tranMerchant.tranMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '销售信息审核'
+        //     },
+        // },
+        // //粮脉企业审核
+        // {
+        //     path: 'grainpulseenterprisereview',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainpulseenterprisereview'),
+        //     name: 'grainpulseenterprisereview',
+        //     meta: {
+        //         title: 'grainpulseenterprisereview',
+        //         shortcutEntrance: 'grainpulseenterprisereview',
+        //         module: 'audit.tranMerchant.tranMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '粮脉企业审核'
+        //     },
+        // },
+        // //粮脉动态审核
+        // {
+        //     path: 'grainPulseDynamic',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainPulseDynamic'),
+        //     name: 'grainPulseDynamic',
+        //     meta: {
+        //         title: 'grainPulseDynamic',
+        //         shortcutEntrance: 'grainPulseDynamic',
+        //         module: 'audit.grainMerchant.grainMerchantInfo.review',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '粮脉动态审核'
+        //     },
+        // },
+        // //交易信息审核
+        // {
+        //     path: 'tradeInformation',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/tradeInformation'),
+        //     name: 'tradeInformation',
+        //     meta: {
+        //         title: 'tradeInformation',
+        //         shortcutEntrance: 'tradeInformation',
+        //         module: 'audit.grainMerchant.grainMerchantInfo.review',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '交易信息审核'
+        //     },
+        // },
+        // // 客服留言
+        // {
+        //     path: 'customerService',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/customerService'),
+        //     name: 'customerService',
+        //     meta: {
+        //         title: 'customerService',
+        //         shortcutEntrance: 'customerService',
+        //         module: 'audit.grainMerchant.grainMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '客服留言'
+        //     },
+        // },
     ],
 };
 export default platformauditRouter;