Commit 1eef49ab by xuyl

修改样式,更换轮询接口方式

1 parent f16b452e
......@@ -42,6 +42,7 @@ export default {
url,
verifyQRCodeFailsToOpen: false,
addLoading: false,
qrCodeInterval: null,
qrcodeUrl: '',
qrCodeVisible: false,
qrcodeId: '',
......@@ -94,24 +95,29 @@ export default {
{
label: '员工企微',
prop: 'staffName',
addHtml: 'staffName'
addHtml: 'staffName',
minwidth:110
},
{
label: '手机号码',
prop: 'staffPhone'
prop: 'staffPhone',
minwidth:110
},
{
label: '所属门店',
prop: 'merchantName'
prop: 'merchantName',
minwidth:110
},
{
label: '最后同步时间',
prop: 'lastLoginTime'
prop: 'lastLoginTime',
minwidth:110
},
{
label: '状态',
prop: 'loginStatus',
addHtml: 'loginStatus'
addHtml: 'loginStatus',
minwidth:110
}
]
},
......@@ -147,19 +153,23 @@ export default {
})
},
verifyQRCodeIsInvalid() {
this.qrCodeInterval = setTimeout(() => {
this.$apis.collocation.getQcCodeDetail({ id: this.qrcodeId }).then(res => {
if (res == true) {
this.$message({
type: 'error',
message: '二维码已失效,请刷新'
})
this.verifyQRCodeFailsToOpen = false
clearTimeout(this.qrCodeInterval)
return
}
})
}, 300000)
this.qrCodeInterval = setInterval(() => {
this.qrcodeTimeoutApi()
// 300000
}, 5000)
},
qrcodeTimeoutApi() {
this.$apis.collocation.getQcCodeDetail({ id: this.qrcodeId }).then(res => {
if (res == true) {
this.$message({
type: 'error',
message: '二维码已失效,请刷新'
})
this.verifyQRCodeFailsToOpen = false
clearInterval(this.qrCodeInterval)
return
}
})
},
refreshQrcode() {
this.handleqrCode()
......@@ -176,7 +186,7 @@ export default {
if (val.qrCodeVisible == true && val.verifyQRCodeFailsToOpen == true) {
this.verifyQRCodeIsInvalid()
} else {
clearTimeout(this.qrCodeInterval)
clearInterval(this.qrCodeInterval)
}
}
}
......@@ -184,8 +194,10 @@ export default {
</script>
<style lang="scss" scoped>
.el-table--border .el-table__cell:first-child .cell, .el-table .cell{
padding-right: 10px;
/deep/ {
.el-table th > .cell {
padding: 0 16px;
}
}
.container {
padding: 20px;
......
......@@ -296,6 +296,11 @@ export default {
</script>
<style scoped lang="scss">
/deep/ {
.el-table th > .cell {
padding: 0 16px;
}
}
.container {
background: #fff;
padding: 20px;
......
......@@ -227,6 +227,11 @@ export default {
</script>
<style lang="scss" scoped>
/deep/ {
.el-table th > .cell {
padding: 0 16px;
}
}
.el-table--border .el-table__cell:first-child .cell, .el-table .cell{
padding-right: 10px;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!