From f5aab724124ffde943e208d69811b8b7bf6fa14c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 28 二月 2024 12:03:14 +0800
Subject: [PATCH] mrshi
---
admin/src/components/business/OperaVisitsDesWindow.vue | 44 ++++++++++++++++++++++++++++++++++++++++----
1 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/admin/src/components/business/OperaVisitsDesWindow.vue b/admin/src/components/business/OperaVisitsDesWindow.vue
index 706aa05..abe4ef6 100644
--- a/admin/src/components/business/OperaVisitsDesWindow.vue
+++ b/admin/src/components/business/OperaVisitsDesWindow.vue
@@ -1,15 +1,16 @@
<template>
<GlobalWindow
:title="title"
- width="60%"
+ width="70%"
:visible.sync="visible"
+ append-to-body
:confirm-working="isWorking"
@confirm="confirm"
>
<div class="list">
<div class="list_item">
<div class="list_item_label">鎷滆淇℃伅</div>
- <div class="list_item_val" v-if="info">
+ <div class="list_item_val" v-if="info" style="display: inline-block">
<div class="list_item_val_item">鎷滆瀵规柟锛歿{info.receptMemberName}} - {{info.receptMemberDepartment}}</div>
<div class="list_item_val_item">鎷滆鏃堕棿锛歿{info.starttime}} 鑷� {{info.endtime}}</div>
<div class="list_item_val_item">鎷滆浜嬬敱锛歿{info.reason}}</div>
@@ -17,7 +18,10 @@
<div class="list_item_val_item">鐢宠闂ㄧ锛歿{info.deviceRoleList ? info.deviceRoleList.map(item => item.name).join(' | ') : ''}}</div>
<div class="list_item_val_item">鍒涘缓鏃堕棿锛歿{info.createDate}}</div>
</div>
- </div>
+ <div class="list_item_val" v-if="info" style="display: inline-block;float: right">
+ <div class="list_item_val_item" id="qrcode2" ref="qrcode2"></div>
+ </div>
+ </div>
<div class="list_item">
<div class="list_item_label">璁垮淇℃伅</div>
<div class="list_item_table" v-if="info">
@@ -92,6 +96,13 @@
</el-table-column>
<el-table-column
width="150"
+ label="璁垮浜岀淮鐮�">
+ <template slot-scope="{row}">
+ <div :id="`qrcode${row.id}`" :ref="`qrcode${row.id}`"></div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ width="150"
label="浜鸿劯鐓х墖">
<template slot-scope="{row}">
<el-image
@@ -139,6 +150,7 @@
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { queryById } from '@/api/business/visits'
+import QRCode from "qrcodejs2";
export default {
name: 'OperaVisitsWindow',
extends: BaseOpera,
@@ -146,8 +158,11 @@
data () {
return {
list: [],
- info: null
+ info: null,
+ innerVisible:false
}
+ },
+ created () {
},
methods: {
getAge (val) {
@@ -163,6 +178,17 @@
return calculationAge - 1
}
},
+ crateQrcodeShow (div,qrcode1) {
+ if(qrcode1 ==null ||qrcode1 ==''){
+ return;
+ }
+ this.qr = new QRCode(div, {
+ width: 90,
+ height: 90,
+ text: qrcode1
+ })
+ },
+
open (title, id) {
this.title = title
this.visible = true
@@ -170,6 +196,16 @@
.then(res => {
console.log(res)
this.info = res
+ this.$nextTick(() => {
+ // this.$refs.qrcode2.innerHTML = ''
+ // this.crateQrcodeShow('qrcode2',res.qrcode)
+ if(this.info.withUserList ){
+ this.info.withUserList.forEach(row => {
+ this.$refs['qrcode'+row.id].innerHTML = ''
+ this.crateQrcodeShow('qrcode'+row.id,row.qrcode)
+ })
+ }
+ })
})
}
}
--
Gitblit v1.9.3