Commit d1d185e1 by 张权

服务专家开发

1 parent 02e29a5d
......@@ -27,7 +27,29 @@ function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, max
}
}
const liveStatusList = [{
function downloadIamge(imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名
var image = new Image()
// 解决跨域 Canvas 污染问题
image.setAttribute('crossOrigin', 'anonymous')
image.onload = function() {
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 = name || 'photo' // 设置图片名称
a.href = url // 将生成的URL设置为a.href属性
a.dispatchEvent(event) // 触发a的单击事件
}
image.src = imgsrc
}
const liveStatusList = [
{
confId: '101',
confName: '直播中'
},
......@@ -57,7 +79,8 @@ const liveStatusList = [{
}
]
const auditStatusList = [{
const auditStatusList = [
{
confId: 0,
confName: '未审核'
},
......@@ -75,4 +98,4 @@ const auditStatusList = [{
}
]
export { limitPrice, liveStatusList, auditStatusList }
\ No newline at end of file
export { limitPrice, liveStatusList, auditStatusList, downloadIamge }
......@@ -5,6 +5,10 @@
预选
<span>仅筛选有外部客户联系人的成员</span>
</div> -->
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="本企业员工" name="1"></el-tab-pane>
<el-tab-pane label="外部企业员工" name="2"></el-tab-pane>
</el-tabs>
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item label="所在门店/部门" style="margin-bottom: 0;">
......@@ -33,15 +37,30 @@
<span class="staff-title" v-show="scope.scope.staffTitle">{{ scope.scope.staffTitle }}</span>
</div>
</GLTable>
<!-- <GLTable v-loading="loading" ref="empTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" :noDataImg="url" @row-click="rowClick">
<div slot="radio" slot-scope="scope">
<el-radio v-model="selectPerson" :label="scope.scope">&nbsp;</el-radio>
</div>
<div slot="staffName" slot-scope="scope">
<span>{{ scope.scope.staffName }}</span>
<span class="staff-title" v-show="scope.scope.staffTitle">{{ scope.scope.staffTitle }}</span>
</div>
</GLTable> -->
</div>
</div>
<div class="member-checked">
<div v-if="activeName == 1" class="member-checked">
<div class="name">
已选择:{{ selectPerson && selectPerson.staffName }}
<span v-if="selectPerson && selectPerson.staffTitle" style="font-size:12px;">|&nbsp;{{ selectPerson && selectPerson.staffTitle }}</span>
</div>
<el-checkbox v-model="checked" @change="checkChange">仅看跟进专员</el-checkbox>
</div>
<div class="member-checked" v-else>
<span class="name">
<span class="el-icon-warning"></span>
<span style="color:#666;">选择一个渠道活码,将该员工设定为客户加微对象。</span>
</span>
</div>
</div>
<!-- <div class="member-right">
<div class="member-title">已选</div>
......@@ -67,6 +86,7 @@ export default {
return {
url: url,
size: 'small',
activeName: '1',
selectPerson: null,
searchForm: {},
checked: '',
......@@ -123,6 +143,8 @@ export default {
this.listDepartmentTree(false)
},
methods: {
//切换tab栏
handleClick() {},
selectionTable(val) {
this.innerTags = val
// this.$emit('selectTable', val)
......@@ -259,6 +281,13 @@ export default {
.el-input.el-input--suffix.rotate .el-input__suffix .el-icon-arrow-down {
transform: rotate(-180deg);
}
/deep/ .el-tabs__header {
margin-bottom: 0;
}
/deep/.el-tabs__nav-wrap::after {
height: 1px;
background-color: #e5e5e5;
}
.select-tree {
max-height: 400px;
overflow-y: scroll;
......@@ -320,6 +349,7 @@ export default {
justify-content: space-between;
font-size: 14px;
margin-top: 12px;
height: 20px;
.name {
display: flex;
align-items: center;
......
......@@ -45,13 +45,15 @@
<div class="btn-group">
<div class="add-btn" v-for="item in btnList" :key="item.id">
<!-- <i class="el-icon-circle-plus-outline"></i> -->
<img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" />
<img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" v-else alt />
<span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span>
<span v-else>{{ item.name }}</span>
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
<el-link v-else-if="item.type == 'link' || item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
<template v-if="!item.isHide">
<img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" />
<img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" v-else alt />
<span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span>
<span v-else>{{ item.name }}</span>
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
<el-link v-else-if="item.type == 'link' || item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</template>
</div>
</div>
</div>
......
......@@ -15,7 +15,7 @@
</div>
<div class="container">
<div class="number">
<GLCombiForm ref="showSearch" @handleOk="handleSearch" @handleRest="handleReset" labelWidth="100px" defaultWidth="210px" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData"></GLCombiForm>
<GLCombiForm ref="showSearch" @handleOk="handleSearch" @handleRest="handleReset" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" :rowNumber="3"></GLCombiForm>
</div>
<!-- 表格区域 开始 -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!