Commit 297dd053 by 前端

Merge branch 'SAAS+V4.41.1' into 'master'

上线合并

See merge request !13
2 parents 886e0745 e46230b3
...@@ -85,3 +85,7 @@ html { ...@@ -85,3 +85,7 @@ html {
vertical-align: middle; vertical-align: middle;
white-space: nowrap; white-space: nowrap;
} }
.message-Z-zinde{
z-index: 5000 !important;
}
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
}, },
inviteInfo: { inviteInfo: {
type: Object, type: Object,
default: () => { } default: () => {}
} }
// hideStatus: Boolean // hideStatus: Boolean
}, },
...@@ -52,9 +52,10 @@ export default { ...@@ -52,9 +52,10 @@ export default {
SC003: 2, SC003: 2,
SC004: 3 SC004: 3
} }
this.inviteInfo.sceneCodeList && this.inviteInfo.sceneCodeList.forEach(item => { this.inviteInfo.sceneCodeList &&
sceneStr = sceneStr + (sceneStr ? (',' + sceneToNum[item]) : sceneToNum[item]) this.inviteInfo.sceneCodeList.forEach(item => {
}) sceneStr = sceneStr + (sceneStr ? ',' + sceneToNum[item] : sceneToNum[item])
})
let params = { let params = {
merchantId: this.inviteInfo.shopMerchantId, merchantId: this.inviteInfo.shopMerchantId,
staffLabel: sceneStr staffLabel: sceneStr
...@@ -63,13 +64,24 @@ export default { ...@@ -63,13 +64,24 @@ export default {
this.inviteData = res this.inviteData = res
}) })
}, },
handleSaveImg(url, downloadTxt = '海报') { handleSaveImg(imgSrc, fileName = '二维码') {
var alink = document.createElement('a') let image = new Image()
alink.href = url image.src = imgSrc
alink.setAttribute('target', '_blank') // 解决跨域 Canvas 污染问题
alink.download = downloadTxt image.setAttribute('crossOrigin', 'Anonymous') // 支持跨域
alink.click() image.onload = function() {
alink.remove() var canvas = document.createElement('canvas')
canvas.width = image.width
canvas.height = image.height
var context = canvas.getContext('2d')
context.drawImage(image, 0, 0, image.width, image.height)
var url = canvas.toDataURL('image/png') //得到图片的base64编码数据
var a = document.createElement('a') // 生成一个a元素
var event = new MouseEvent('click') // 创建一个单击事件
a.download = fileName || 'photo' // 设置图片名称
a.href = url // 将生成的URL设置为a.href属性
a.dispatchEvent(event) // 触发a的单击事件
}
}, },
handleSaveTxt(txt) { handleSaveTxt(txt) {
this.$message({ this.$message({
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>客户管理列表</h2> <h2>客户管理列表</h2>
<div> <!-- <div>
<el-button size="small" @click="handleEditCustomer('add')" type="primary" plain>新增客户</el-button> <el-button size="small" @click="handleEditCustomer('add')" type="primary" plain>新增客户</el-button>
<el-button size="small" @click="handleApply">我的开店申请</el-button> <el-button size="small" @click="handleApply">我的开店申请</el-button>
</div> </div> -->
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
...@@ -78,17 +78,17 @@ export default { ...@@ -78,17 +78,17 @@ export default {
} }
], ],
tableButtonList: [ tableButtonList: [
{ // {
type: 'GLButton', // type: 'GLButton',
name: '编辑', // name: '编辑',
attrs: { // attrs: {
type: 'text', // type: 'text',
fn: '编辑' // fn: '编辑'
}, // },
listeners: { // listeners: {
click: row => this.handleEditCustomer('edit', row) // click: row => this.handleEditCustomer('edit', row)
} // }
}, // },
{ {
type: 'GLButton', type: 'GLButton',
name: '查看', name: '查看',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!