|
|
|
@ -38,7 +38,7 @@
|
|
|
|
|
|
|
|
|
|
<Table :columns="columns1" :data="data1" style="margin-top: 20px;">
|
|
|
|
|
<template slot-scope="{ row, index }" slot="qrCodeAction">
|
|
|
|
|
<img :src="require('../../../static/img/qrCode-init.png')" @click="show(row)" style="margin-left: 5px;margin-top: 5px;width:30px;height:30px;"/>
|
|
|
|
|
<img :src="require('../../../static/img/qrCode-init.png')" @click="show(row)" @mouseover="show(row)" style="margin-left: 5px;margin-top: 5px;width:30px;height:30px;"/>
|
|
|
|
|
</template>
|
|
|
|
|
<router-link slot-scope="{ row, index }" slot="action" :to="{path:'/shop/increase/manager/staff',query:{storeId:row.id}}">
|
|
|
|
|
<Button ghost style="border:0px;color: #2074E2;"> 门店导购管理</Button>
|
|
|
|
@ -158,7 +158,7 @@
|
|
|
|
|
</Upload>
|
|
|
|
|
</Modal>
|
|
|
|
|
<Page :total="total" :current="pageNum" :page-size="pageSize" show-elevator show-total
|
|
|
|
|
placement="top" @on-change="handlePage" style="margin: 20px 50px 0 0;right:0px;position: absolute;"></Page>
|
|
|
|
|
placement="top" @on-change="handlePage" style="margin: 20px 50px 0 0;right:0px;position: absolute;bottom: 50px"></Page>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -314,7 +314,7 @@
|
|
|
|
|
listOfStore() {
|
|
|
|
|
let that = this;
|
|
|
|
|
let request = {
|
|
|
|
|
userId: 1 ,
|
|
|
|
|
userId: that.userId,
|
|
|
|
|
companyId: that.changeData(that.selectedRegion),
|
|
|
|
|
storeId: that.changeData(that.selectedStore),
|
|
|
|
|
pageNum: that.pageNum,
|
|
|
|
@ -387,7 +387,7 @@
|
|
|
|
|
selectValue = that.selectedRegion
|
|
|
|
|
}
|
|
|
|
|
let request =
|
|
|
|
|
{userId: that.userId,regionId: that.changeData(selectValue)};
|
|
|
|
|
{userId: that.userId,companyId: that.changeData(selectValue)};
|
|
|
|
|
staff.downShopData(request, function (data) {
|
|
|
|
|
data = data.data.results;
|
|
|
|
|
if(data){
|
|
|
|
@ -410,26 +410,17 @@
|
|
|
|
|
this.qrCodeImage = index.qrCodeAction;
|
|
|
|
|
this.rowData = index;
|
|
|
|
|
},
|
|
|
|
|
hide: function () {
|
|
|
|
|
this.isShow = false;
|
|
|
|
|
},
|
|
|
|
|
// 下载二维码
|
|
|
|
|
download: function (index) {
|
|
|
|
|
let name = index.code+"-"+index.name
|
|
|
|
|
let image = new Image();
|
|
|
|
|
// 解决跨域 Canvas 污染问题
|
|
|
|
|
image.setAttribute("crossOrigin", "anonymous");
|
|
|
|
|
image.onload = function() {
|
|
|
|
|
let canvas = document.createElement("canvas");
|
|
|
|
|
canvas.width = image.width;
|
|
|
|
|
canvas.height = image.height;
|
|
|
|
|
let context = canvas.getContext("2d");
|
|
|
|
|
context.drawImage(image, 0, 0, image.width, image.height);
|
|
|
|
|
let url = canvas.toDataURL("image/png"); //得到图片的base64编码数据
|
|
|
|
|
let a = document.createElement("a"); // 生成一个a元素
|
|
|
|
|
let event = new MouseEvent("click"); // 创建一个单击事件
|
|
|
|
|
a.download = name || "photo"; // 设置图片名称
|
|
|
|
|
a.href = url; // 将生成的URL设置为a.href属性
|
|
|
|
|
a.dispatchEvent(event); // 触发a的单击事件
|
|
|
|
|
};
|
|
|
|
|
image.src = index.qrCodeAction;
|
|
|
|
|
let fileName = index.name + "-门店码";
|
|
|
|
|
http.downloadImg({
|
|
|
|
|
url:index.qrCodeAction
|
|
|
|
|
},fileName,function (data) {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//切页处理
|
|
|
|
|
handlePage:function (value) {
|
|
|
|
|