Commit f65aa435 authored by 姬鋆屾's avatar 姬鋆屾

fix:修改二维码展示添加防抖

parent 79c7da57
...@@ -215,14 +215,15 @@ ...@@ -215,14 +215,15 @@
<a-tag v-else color="blue"> 自建事项 </a-tag> <a-tag v-else color="blue"> 自建事项 </a-tag>
</template> </template>
<!-- 二维码展示 --> <!-- 二维码展示 -->
<template slot="qrCode" slot-scope="{ record }" <template slot="qrCode" slot-scope="{ record }">
><img <img
class="pointer" :class="['pointer', record.disabled == true ? 'none_click' : '']"
width="30" width="30"
height="30" height="30"
src="@/assets/img/erweima.png" src="@/assets/img/erweima.png"
@click="handlePreview(record)" @click="handlePreview(record)"
/></template> />
</template>
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="{ record }"> <template slot="action" slot-scope="{ record }">
...@@ -274,7 +275,7 @@ import YTable from "@/components/YTable.vue"; ...@@ -274,7 +275,7 @@ import YTable from "@/components/YTable.vue";
import local from "@/utils/local"; import local from "@/utils/local";
import { uniqueObjArray } from "@/utils"; import { uniqueObjArray } from "@/utils";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import _ from "lodash";
const sourceType = { const sourceType = {
0: "一体化添加", 0: "一体化添加",
1: "手动添加", 1: "手动添加",
...@@ -411,10 +412,8 @@ export default { ...@@ -411,10 +412,8 @@ export default {
methods: { methods: {
...mapMutations("site", ["SET_matterDict"]), ...mapMutations("site", ["SET_matterDict"]),
// 预览二维码 // 预览二维码
async handlePreview(val) { handlePreview: _.debounce(async function (val) {
console.log(val);
let res = await getQrInfo({ id: val.id }); let res = await getQrInfo({ id: val.id });
console.log(res);
let { data, code } = res.data; let { data, code } = res.data;
if (code == 1) { if (code == 1) {
data.qrCode data.qrCode
...@@ -423,7 +422,7 @@ export default { ...@@ -423,7 +422,7 @@ export default {
}) })
: ""; : "";
} }
}, }, 1000),
// 下载二维码 // 下载二维码
handleDownload() { handleDownload() {
let _this = this; let _this = this;
...@@ -440,7 +439,6 @@ export default { ...@@ -440,7 +439,6 @@ export default {
icon: "exclamation-circle", icon: "exclamation-circle",
maskClosable: true, maskClosable: true,
async onOk() { async onOk() {
console.log(_this.selectedBaseMatterKeys);
let res = await qrDownload( let res = await qrDownload(
{ {
...@@ -800,6 +798,9 @@ export default { ...@@ -800,6 +798,9 @@ export default {
margin-left: 10px; margin-left: 10px;
} }
} }
.none_click {
pointer-events: none;
}
// .add-btn { // .add-btn {
// background-color: #04cb8f; // background-color: #04cb8f;
// color: #fff; // color: #fff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment