Browse Source

【nev-pc】登录页调试高拍仪功能及放到配置中处理

ag_report_nev
安虹睿 10 months ago
parent
commit
709f54d0cb
  1. 2
      fe/PC/public/config.js
  2. 2
      fe/PC/src/App.vue
  3. 2
      fe/PC/src/utils/detailsTableColumns/index.js
  4. 23
      fe/PC/src/views/login/index.vue

2
fe/PC/public/config.js

@ -40,6 +40,8 @@ window.SITE_CONFIG['MOrDFasterUrl_inventory'] = 'http://dev.ccwin-in.com:60075/'
window.SITE_CONFIG['pageHasMOrDList'] = [
// 'PurchaseOrder_mrt','PurchaseOrder_det',//采购订单信息
]
window.SITE_CONFIG['showGrabimageIframeTest'] = false//登录页调试高拍仪显示按钮
// mock

2
fe/PC/src/App.vue

@ -33,6 +33,8 @@ localStorage.setItem('MOrDFasterUrl_store',window.SITE_CONFIG['MOrDFasterUrl_sto
localStorage.setItem('MOrDFasterUrl_job',window.SITE_CONFIG['MOrDFasterUrl_job'])
localStorage.setItem('MOrDFasterUrl_inventory',window.SITE_CONFIG['MOrDFasterUrl_inventory'])
localStorage.setItem('pageHasMOrDList',window.SITE_CONFIG['pageHasMOrDList'])
localStorage.setItem('showGrabimageIframeTest',window.SITE_CONFIG['showGrabimageIframeTest'])
</script>
<style lang="scss">

2
fe/PC/src/utils/detailsTableColumns/index.js

@ -1738,7 +1738,7 @@ export const materialReturnNote = [
{ label: _Names.itemDesc1, prop: "itemDesc1" },
{ label: _Names.itemDesc2, prop: "itemDesc2" },
{ label: _Names.configuration, prop: "item_configurationFromFE" },
{ label: "料数量", prop: "qty" },
{ label: "退料数量", prop: "qty" },
{ label: "箱码", prop: "packingCode" },
{ label: "入库库位", prop: "locationCode" },
{ label: _Names.locationErpCode, prop: 'locationErpCode' },

23
fe/PC/src/views/login/index.vue

@ -1,5 +1,10 @@
<template>
<div class="login-container">
<iframe v-show="showGrabimageIframe == 'true'" id="getGrabimageIframe" :src='getGrabimageIframeUrl' style="z-index:200;background:#fff;width:200px;height:200px;position:fixed;left:0"></iframe>
<el-button v-if="showGrabimageIframe == 'true'" style="z-index:200;position:fixed;left:0;bottom:0;background:#000737;border:none" @click="getBase64">获取base64</el-button>
<div v-if="showGrabimageIframe == 'true'" style="z-index:200;position:fixed;left:0;bottom:40px;background:#000737;border:none" @click="getBase64">
<img :src="getGrabimageUrl"/>
</div>
<img class="loginLogoImg" src="../../../public/login_logo.png" alt="">
<div class="login-form-wrapper">
<div class="left"></div>
@ -92,6 +97,9 @@ export default {
}
}
return {
getGrabimageIframeUrl:localStorage.getItem('grabimageURL'),
showGrabimageIframe:localStorage.getItem('showGrabimageIframeTest'),
getGrabimageUrl:null,
loginForm: {
grant_type: 'password',
client_id: 'Auth_App',
@ -142,11 +150,26 @@ export default {
} else if (this.loginForm.password === '') {
this.$refs.password.focus()
}
let _this = this
window.addEventListener('message', function(event) {
// if (event.origin === 'http://iframe-domain.com') { // iframe
var result = event.data; //
_this.getGrabimageUrl = result.data;
console.log('登录页返回base64',result)
// }
});
},
destroyed () {
// window.removeEventListener('storage', this.afterQRScan)
},
methods: {
getBase64(){
//
this.getGrabimageIframeUrl = localStorage.getItem('grabimageURL') + '?time='+new Date().getTime()
var iframeWindow = document.getElementById('getGrabimageIframe').contentWindow;
iframeWindow.postMessage('callMyFunction', '*');
},
checkCapslock (e) {
const { key } = e
this.capsTooltip = key && key.length === 1 && (key >= 'A' && key <= 'Z')

Loading…
Cancel
Save