{{gateName}}切换
@@ -60,8 +60,8 @@
showVisit
},
data() {
- return {
- fullscreen:false,
+ return {
+ fullscreen: false,
clientHeight: 0,
gateShow: false,
gateAdminId: '',
@@ -86,12 +86,13 @@
},
computed: {},
mounted() {
-
+ // this.screen()
},
created() {
- this.getIdcard()
+ // this.getIdcard()
this.getUserList()
this.getToday()
+ // this.enterfullscreen()
},
methods: {
init() {
@@ -145,7 +146,8 @@
}
},
async getUserList() {
- this.gateUser = JSON.parse(Cookies.get("gateUser"))
+ this.gateUser = Cookies.get("gateUser") ? JSON.parse(Cookies.get("gateUser")) : ''
+
console.log(this.gateUser)
let res = await getUserList()
this.gateData = res
@@ -179,9 +181,20 @@
})
this.gateShow = false
},
- getIdcard() {
- const idCard = getIdcard("/idcard")
- console.log(idCard)
+ getIdcard() {
+ let that = this
+ this.$jsonp(
+ 'http://127.0.0.1:24010/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1'
+ )
+ .then((res) => {
+ console.log(res)
+ that.select.idcard = res.Certificate.IDNumber
+ that.getList()
+ })
+ .catch((err) => {
+ console.log(err)
+ this.$successMessage(err.statusText, '', 'warning')
+ })
},
screen() {
let element = document.documentElement;
@@ -208,6 +221,37 @@
}
}
this.fullscreen = !this.fullscreen;
+ },
+ enterfullscreen() { //进入全屏
+ var docElm = document.documentElement
+ //W3C
+ if (docElm.requestFullscreen) {
+ docElm.requestFullscreen()
+ }
+ //FireFox
+ else if (docElm.mozRequestFullScreen) {
+ docElm.mozRequestFullScreen()
+ }
+ //Chrome等
+ else if (docElm.webkitRequestFullScreen) {
+ docElm.webkitRequestFullScreen()
+ }
+ //IE11
+ else if (elem.msRequestFullscreen) {
+ elem.msRequestFullscreen()
+ }
+ },
+ //退出全屏
+ exitfullscreen() {
+ if (document.exitFullscreen) {
+ document.exitFullscreen()
+ } else if (document.mozCancelFullScreen) {
+ document.mozCancelFullScreen()
+ } else if (document.webkitCancelFullScreen) {
+ document.webkitCancelFullScreen()
+ } else if (document.msExitFullscreen) {
+ document.msExitFullscreen()
+ }
}
},
@@ -217,8 +261,8 @@
+
+ /deep/ .el-radio__input {
+ vertical-align: super;
+ }
+
+ /deep/ .el-radio__label {
+ font-size: 32px;
+ }
+
\ No newline at end of file
diff --git a/vue.config.js b/vue.config.js
index 7ae9160..778bb29 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -45,12 +45,12 @@ module.exports = {
},
//before: require('./mock/mock-server.js'),
proxy: {
- '/idcard': {
+ '^/idcard': {
target: 'http://127.0.0.1:24010',
changeOrigin: true, //配置跨域
- "secure": false, // 接受运行在https上,默认不接受
+ "secure": true, // 接受运行在https上,默认不接受
pathRewrite: {
- '^/idcard':''
+ ['^/idcard']:'http://127.0.0.1:24010'
}
},
[process.env.VUE_APP_BASE_API]: {