补充二维码

This commit is contained in:
huangdeliang 2021-03-06 14:18:00 +08:00
parent d266eabe8b
commit f82e87fe55

View File

@ -19,7 +19,17 @@
@click="handleOnRecipesLinkClick" @click="handleOnRecipesLinkClick"
>客户食谱链接 >客户食谱链接
</el-button> </el-button>
<el-popover placement="top" trigger="click" v-if="cusOutId" style="margin: 0 12px">
<VueQr :text="copyValue" :logoSrc="logo" />
<el-button
slot="reference"
size="mini"
icon="el-icon-picture-outline"
type="primary"
@click="handleCopy(scope.row.path)"
>二维码</el-button
>
</el-popover>
<el-button icon="el-icon-view" size="mini" @click="handleInnerOpen" <el-button icon="el-icon-view" size="mini" @click="handleInnerOpen"
>查看暂停记录 >查看暂停记录
</el-button> </el-button>
@ -68,13 +78,17 @@
import Clipboard from "clipboard"; import Clipboard from "clipboard";
import { listRecipesPlanByCusId } from "@/api/custom/recipesPlan"; import { listRecipesPlanByCusId } from "@/api/custom/recipesPlan";
import PlanPauseDrawer from "./PlanPauseDrawer"; import PlanPauseDrawer from "./PlanPauseDrawer";
import VueQr from "vue-qr";
const logo = require("@/assets/logo/logo_b.png");
export default { export default {
name: "RecipesPlanDrawer", name: "RecipesPlanDrawer",
components: { components: {
PlanPauseDrawer, PlanPauseDrawer,
VueQr,
}, },
data() { data() {
return { return {
logo,
visible: false, visible: false,
title: "", title: "",
cusOutId: "", cusOutId: "",
@ -90,6 +104,7 @@ export default {
if (!this.data) { if (!this.data) {
return; return;
} }
this.visible = true; this.visible = true;
this.title = `${this.data.name}」食谱计划`; this.title = `${this.data.name}」食谱计划`;
this.planLoading = true; this.planLoading = true;
@ -101,6 +116,10 @@ export default {
} }
return str; return str;
}, ""); }, "");
this.copyValue =
window.location.origin.replace("manage", "sign") +
"/recipes/detail/" +
this.cusOutId;
// console.log(this.planList); // console.log(this.planList);
this.planLoading = false; this.planLoading = false;
}); });
@ -115,10 +134,6 @@ export default {
this.innerTitle = `${this.data.name}」暂停记录`; this.innerTitle = `${this.data.name}」暂停记录`;
}, },
handleOnRecipesLinkClick() { handleOnRecipesLinkClick() {
this.copyValue =
window.location.origin.replace("manage", "sign") +
"/recipes/detail/" +
this.cusOutId;
new Clipboard(".copyBtn"); new Clipboard(".copyBtn");
this.$message({ this.$message({
message: "拷贝成功", message: "拷贝成功",