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>
......
......@@ -5,7 +5,32 @@
<span class="tip">该配置页面用于配置「精品升级」小程序质保卡客户拉新,配置订单类型后,客户扫码质保卡活码即可添加员工企微号。</span>
</div>
<div class="detail-wrap">
<el-form class="form" ref="form" :model="basicForm" label-width="112px">
<glsx-combi-form class="form" ref="form" :formRules="basicRule" labelWidth="154px" defaultWidth="474px" :formObj="basicForm" :formData="basicFormData">
<div slot="staffSlot">
<span v-if="selectPerson.staffName" class="tag-info">
<i class="el-icon-user-solid person"></i>
<span class="client name">{{ selectPerson.staffName }}</span>
<i class="el-icon-close del" @click="delPerson"></i>
</span>
<el-button class="checkNumber" v-else size="small" icon="el-icon-plus" @click="openMembers">
选择成员
</el-button>
<span v-if="selectPerson.departmentName" class="depart-name">{{ selectPerson.departmentName }}</span>
</div>
<div slot="welcomeSlot">
<WelcomeWords ref="welcome" :btnList="btnList" :eventBus="eventBus"></WelcomeWords>
<div class="tips-text">
<p>当「精品升级」小程序提交升级订单时,</p>
<p>
客户扫描订单质保码添加
<span style="color:#409eff">{{ ' ' }}{{ selectPerson.staffName || '待选择' }}</span>
,
</p>
<p>客户添加成功自动推送欢迎语,建议插入质保链接。</p>
</div>
</div>
</glsx-combi-form>
<!-- <el-form class="form" ref="form" :model="basicForm" label-width="112px">
<el-form-item label="客户类型:">
<span class="client">{{ clientType }}</span>
</el-form-item>
......@@ -21,7 +46,6 @@
<span v-if="selectPerson && selectPerson.departmentName" class="depart-name">{{ selectPerson && selectPerson.departmentName }}</span>
</el-form-item>
<el-form-item label="欢迎语:">
<!-- <label slot="label" class="required">群发内容</label> -->
<WelcomeWords ref="welcome" :btnList="btnList" :eventBus="eventBus"></WelcomeWords>
<div class="tips-text">
<p>当「精品升级」小程序提交升级订单时,</p>
......@@ -33,7 +57,7 @@
<p>客户添加成功自动推送欢迎语,建议插入质保链接。</p>
</div>
</el-form-item>
</el-form>
</el-form> -->
</div>
<glsx-dialog class="numberDialog" :title="'选择成员'" btnSize="small" :width="'850px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
<SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData"></SelectMember>
......@@ -51,20 +75,27 @@ import emoji from '@/util/emo'
import WelcomeWords from './components/welcomeWords.vue'
import SelectMember from './components/selectMember.vue'
import glsxDialog from '@/components/glsx-dialog/index.vue'
// import glsxCombiForm from '@/components/glsx-combi-form'
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'expert_detail',
components: {
WelcomeWords,
SelectMember,
glsxDialog
glsxDialog,
glsxCombiForm
},
data() {
return {
size: 'small',
eventBus: new Vue(),
clientType: '升级客户',
expertId: '',
routeInfo: {},
expertTypeList: [],
basicRule: {
businessType: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
staffId: [{ required: true, message: '请选择指定成员', trigger: 'change' }],
expertType: [{ required: true, message: '请选择专家类型', trigger: 'change' }]
},
btnList: [
{
id: 1,
......@@ -91,51 +122,106 @@ export default {
name: '活动',
type: 'acivity',
funName: 'activity'
}
},
// {
// id: 5,
// name: '模板',
// type: 'nickname',
// funName: 'message'
// },
// {
// id: 6,
// name: '插入质保链接',
// type: 'link',
// funName: 'link'
// }
{
id: 6,
name: '插入质保链接',
type: 'link',
funName: 'link',
isHide: true
}
],
membersVisible: false,
selectData: [],
basicForm: {},
selectPerson: null,
numberTypeList: []
basicForm: {
businessType: 1,
staffId: '',
expertType: 1,
staffUserId: ''
},
selectPerson: {},
numberTypeList: [],
basicFormData: [
{
label: '专家类型',
name: 'expertType',
type: 'select',
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
isClear: true
},
{
label: '客户类型',
name: 'businessType',
type: 'select',
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
isClear: true
},
{
label: '指定成员',
name: 'staffId',
addHtml: 'staffSlot'
},
{
label: '欢迎语',
name: '',
addHtml: 'welcomeSlot'
}
]
}
},
watch: {
'basicForm.businessType': {
handler(nVal) {
if (nVal) {
this.btnList.find(item => item.id == 6).isHide = nVal != 1
}
},
immediate: true
},
selectPerson: {
handler(val) {
console.log(val)
this.basicForm.staffId = val.staffId || ''
this.basicForm.staffUserId = val.userId || ''
},
deep: true
}
},
created() {
this.getTypeList()
},
mounted() {
const urlParam = this.$route.params
let param = JSON.parse(urlParam.id)
this.clientType = param.clientType
if (this.clientType == '升级客户') {
let obj = {
id: 6,
name: '插入质保链接',
type: 'link',
funName: 'link'
}
this.btnList.push(obj)
}
if (param.expertId) {
this.expertId = param.expertId
this.getDetail(param.expertId)
this.routeInfo = JSON.parse(urlParam.id)
console.log(this.routeInfo, 456456)
if (this.routeInfo.expertId) {
this.getDetail(this.routeInfo.expertId)
}
this.getTypeList()
},
methods: {
getTypeList() {
this.$apis.expert.getMenberType({ dictType: 'operation_type' }).then(res => {
if (res) {
this.numberTypeList = res
let target = this.basicFormData.find(item => item.name === 'businessType')
target.optionList = res
}
})
this.$apis.expert.getMenberType({ dictType: 'expert_type' }).then(res => {
if (res) {
this.expertTypeList = res
let target = this.basicFormData.find(item => item.name === 'expertType')
target.optionList = res
}
})
},
......@@ -144,12 +230,13 @@ export default {
if (res?.id) {
this.selectPerson = res
this.$refs.welcome.setDetail(res.welcomeInfo)
this.clientType = res.businessTypeName
this.basicForm.businessType = res.businessType
this.basicForm.expertType = res.expertType
}
})
},
delPerson() {
this.selectPerson = null
this.selectPerson = {}
},
// 成员弹窗
handleConfirm() {
......@@ -176,45 +263,53 @@ export default {
})
},
handleSave() {
if (!this.selectPerson?.staffId) {
return this.$message.error('请选择轻改专家')
}
let preList = [...this.$refs.welcome.previewList]
preList.forEach(item => {
if (item.attType == 1 && !item.attContent.trim()) {
item.attContent = '\n'
} else if (item.attType == 1) {
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
}
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
})
const typeItem = preList.find(item => {
return item.attType == 1
})
if (!typeItem) {
preList.unshift({ attType: '1', attContent: '\n' })
}
const targetItem = this.numberTypeList.find(item => {
return item.dictLabel == this.clientType
})
let params = {
businessType: targetItem.dictValue,
staffId: this.selectPerson.staffId,
// welcomeInfo: this.$refs.welcome.previewList
welcomeInfo: preList
}
let API = this.expertId ? this.$apis.expert.editExpert : this.$apis.expert.saveExpert
if (this.expertId) params.id = this.expertId
API(params).then(res => {
if (res) {
this.$message({
type: 'success',
message: '提交成功'
this.$refs.form.$refs.formRef.validate(valid => {
if (valid) {
let preList = [...this.$refs.welcome.previewList]
preList.forEach(item => {
if (item.attType == 1 && !item.attContent.trim()) {
item.attContent = '\n' //欢迎语textArea为空时传换行符
} else if (item.attType == 1) {
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
}
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
})
this.$router.push({
path: '/expert/index'
const typeItem = preList.find(item => {
return item.attType == 1
})
if (!typeItem) {
preList.unshift({ attType: '1', attContent: '\n' }) //欢迎语textArea为空时传换行符
}
// const targetItem = this.numberTypeList.find(item => {
// return item.dictLabel == this.clientType
// })
// let params = {
// businessType: targetItem.dictValue,
// staffId: this.selectPerson.staffId,
// // welcomeInfo: this.$refs.welcome.previewList
// welcomeInfo: preList
// }
let params = { ...this.basicForm }
params.welcomeInfo = preList
console.log(params, 'params')
let API = this.routeInfo.expertId ? this.$apis.expert.editExpert : this.$apis.expert.saveExpert
if (this.routeInfo.expertId) {
params.id = this.routeInfo.expertId
params.businessUuid = this.routeInfo.businessUuid
params.configId = this.routeInfo.configId
}
API(params).then(res => {
if (res) {
this.$message({
type: 'success',
message: '提交成功'
})
this.$router.push({
path: '/expert/index'
})
}
})
}
})
......@@ -315,11 +410,7 @@ export default {
}
.form {
/deep/.el-form-item {
&:nth-child(-n + 2) {
height: 36px;
}
// height: 36px;
line-height: 36px;
display: block;
margin-bottom: 20px;
& > .el-form-item__label {
padding: 0;
......
......@@ -2,20 +2,16 @@
<div class="expert-container">
<div v-if="userType != 2">
<div class="btn-area">
<GLButton id="clientBtn" :size="size" fn="新增配置" type="primary" @click.stop="addConfig('top')">
<GLButton :size="size" icon="el-icon-plus" fn="新增配置" type="primary" @click.stop="addConfig()">
新增配置
<i class="el-icon-arrow-down"></i>
</GLButton>
<ul v-if="showClientType" class="client">
<li v-for="item in numberTypeList" :key="item.dictValue" @click.stop="selectClientType(item.dictLabel)">{{ item.dictLabel }}</li>
</ul>
</div>
<span class="btnTip">配置门店轻改专家,形成业务活码,客户可通过「精品升级」订单扫码来添加该员工。</span>
</div>
<div class="expert-wrap">
<glsx-combi-form ref="expertRef" labelWidth="112px" defaultWidth="215px" :formObj="batchListSearch" :formData="expertForm">
<GLCombiForm ref="expertRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="batchListSearch" :formData="expertForm">
<div slot="department">
<el-cascader clearable popper-class="expert-cascader" ref="cascaderRef" @change="getCurDepartment" placeholder="请选择门店" :show-all-levels="false" v-model="batchListSearch.departmentId" :props="mypropParam1" :options="departmentList" size="small" style="width: 215px" separator=" " filterable>
<el-cascader clearable popper-class="expert-cascader" ref="cascaderRef" @change="getCurDepartment" placeholder="请选择门店" :show-all-levels="false" v-model="batchListSearch.departmentId" :props="mypropParam1" :options="departmentList" size="small" style="width: 280px" separator=" " filterable>
<template slot-scope="{ data }">
<el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.departmentName.length > 12 ? false : true" class="item" effect="light" :content="data.departmentName" placement="top-end">
<div class="limitText" style="width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis">{{ data.departmentName }}</div>
......@@ -23,21 +19,30 @@
</template>
</el-cascader>
</div>
<span slot="footer" class="footer-btns" style="display: inline-flex;padding-top: 1px;margin-bottom:20px;">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</GLCombiForm>
<div>
<GLTable :noDataImg="url" :class="[{ hasDataTable: !hasData }]" ref="expertTable" :hasNum="false" :pageConf="batchPageConf" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getListApi">
<div slot="staffName" slot-scope="scope">
<span>{{ scope.scope.staffName }}</span>
<span style="font-size:12px;color:#999999;">&nbsp;|&nbsp;{{ scope.scope.departmentName }}</span>
</div>
<div slot="qrCode" slot-scope="scope">
<span v-if="!scope.scope.qrCode">无</span>
<!-- <img v-else style="height:36px;width:36px;" :src="scope.scope.qrCode" alt="" /> -->
<el-popover v-else placement="bottom" width="240" trigger="click">
<img :src="scope.scope.qrCode" style="width: 200px; height: 200px" />
<img :src="scope.scope.qrCode" style="width: 36px; height: 36px" slot="reference" />
</el-popover>
</div>
<span slot="status" slot-scope="scope">
<!-- <el-switch :value="scope.scope.status == 0" active-color="#5850ff" inactive-color="#eee" @change="changStatus(scope.scope.status, scope.scope.id)"></el-switch>
{{ scope.scope.status == 0 ? '启用' : '停用' }} -->
<GLButton v-if="userType != 2" class="switch" mode="el-switch" fn="禁用" :value="scope.scope.status == 0" active-color="#5850ff" inactive-color="#eee" :active-text="scope.scope.status == 0 ? '启用' : '停用'" @change="changStatus(scope.scope.status, scope.scope.id)">{{ scope.scope.status == 0 ? '启用' : '停用' }}</GLButton>
</span>
<!-- <div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="userType != 2" fn="编辑" type="text" @click="selectClientType(scope.scope.businessTypeName, scope.scope.id)">编辑</GLButton>
<GLButton v-if="userType != 2" fn="删除" type="text" @click="handleDel(scope.scope)">删除</GLButton>
</div> -->
<div class="table-btns" slot="table-btns" slot-scope="scope">
<!-- <GLButton v-if="userType != 2" fn="编辑" type="text" @click="addConfig(scope.scope.businessTypeName, scope.scope.id)">编辑</GLButton>
<GLButton v-if="userType != 2" fn="删除" type="text" @click="handleDel(scope.scope)">删除</GLButton>
<GLButton v-if="userType != 2" fn="下载活码" type="text" @click="handleDel(scope.scope)">下载活码</GLButton> -->
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
......@@ -45,13 +50,9 @@
<img class="default-img" :src="imagBaseURL + 'serviceser.png'" alt="" />
<span class="tip">用于「精品升级」客户线上化,配置轻改专家成员,可通过精品升级的质保卡活码拉新。</span>
<div v-if="userType != 2" class="btn-area my-search-btn">
<GLButton id="clientBtn" plain :size="size" fn="新增配置" type="primary" @click.stop="addConfig('center')">
<GLButton plain :size="size" icon="el-icon-plus" fn="新增配置" type="primary" @click.stop="addConfig()">
新增配置
<i class="el-icon-arrow-down"></i>
</GLButton>
<ul v-if="showCenterClientType" class="client">
<li v-for="item in numberTypeList" :key="item.dictValue" @click.stop="selectClientType(item.dictLabel)">{{ item.dictLabel }}</li>
</ul>
</div>
</div>
</div>
......@@ -65,6 +66,7 @@ const imagBaseURL = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/'
import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
import url from '@/assets/empty.png'
import { downloadIamge } from '@/common/constant'
export default {
name: 'expert_index',
data() {
......@@ -84,7 +86,6 @@ export default {
hasData: true,
size: 'small',
getListApi: this.$apis.expert.getExpertList,
showClientType: false,
showCenterClientType: false,
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
batchListSearch: {
......@@ -103,13 +104,13 @@ export default {
},
attrs: {
type: 'text',
fn:'编辑'
fn: '编辑'
},
listeners: {
click: row => this.selectClientType(row.scope.businessTypeName, row.scope.id)
click: row => this.addConfig(row.scope)
}
},
{
{
type: 'GLButton',
name: row => {
return '删除'
......@@ -119,11 +120,27 @@ export default {
},
attrs: {
type: 'text',
fn:'删除'
fn: '删除'
},
listeners: {
click: row => this.handleDel(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '下载活码'
},
condition: row => {
return this.userType != 2 && row.scope.qrCode
},
attrs: {
type: 'text',
fn: '下载活码'
},
listeners: {
click: row => this.downloadQrcode(row.scope.qrCode)
}
}
],
expertForm: [
......@@ -155,47 +172,43 @@ export default {
tableColumns: [
{
label: '编号',
prop: 'stateId',
formatter: cellValue => {
return cellValue.stateId || '-'
}
prop: 'stateId'
},
{
label: '所属门店/部门',
prop: 'departmentName',
formatter: cellValue => {
return cellValue.departmentName || '-'
}
label: '渠道活码',
prop: '',
addHtml: 'qrCode'
},
{
label: '员工',
prop: 'staffName',
formatter: cellValue => {
return cellValue.staffName || '-'
}
prop: '',
addHtml: 'staffName'
},
{
label: '专家类型',
prop: 'expertTypeName',
width: 200
},
{
label: '客户类型',
prop: 'businessTypeName',
formatter: cellValue => {
return cellValue.businessTypeName || '-'
}
width: 200
},
{
label: '欢迎语',
prop: 'isWelcomeWord',
formatter: cellValue => {
return cellValue.isWelcomeWord == -1 ? '无' : '有'
}
label: '所属企业微信',
prop: 'entmicroName',
width: 200
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
width: 150
},
{
label: '操作',
prop: '',
width: 200,
fixed: 'right',
addHtml: 'table-btns'
}
......@@ -212,14 +225,10 @@ export default {
this.isEmptyTable()
},
mounted() {
document.getElementById('app').addEventListener('click', this.setClientType)
this.getTypeList()
const { session } = this.$globalState || {}
this.userType = session.userType
},
beforeDestroy() {
document.getElementById('app').removeEventListener('click', this.setClientType)
},
methods: {
// 获取当前选择的商户
getCurDepartment(val) {
......@@ -239,14 +248,17 @@ export default {
}
})
},
handleDel({ id }) {
downloadQrcode(url) {
downloadIamge(url)
},
handleDel({ id, businessUuid, configId }) {
this.$confirm('是否确认删除?', '退单', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
customClass: 'customConfirm'
}).then(() => {
this.$apis.expert.delExpert({ id }).then(res => {
this.$apis.expert.delExpert({ id, businessUuid, configId }).then(res => {
if (res) {
this.handleSearch()
this.isEmptyTable()
......@@ -298,10 +310,6 @@ export default {
})
return arr
},
setClientType() {
if (this.showClientType) this.showClientType = false
if (this.showCenterClientType) this.showCenterClientType = false
},
changStatus(status, id) {
this.$apis.expert.editExpert({ id, status: status == 0 ? -1 : 0 }).then(res => {
if (res) {
......@@ -309,40 +317,19 @@ export default {
}
})
},
addConfig(area) {
if (area == 'top') {
this.showClientType = true
} else {
this.showCenterClientType = true
addConfig(row) {
let paraFormat = {}
if (row && row.id) {
paraFormat.expertId = row.id
paraFormat.businessUuid = row.businessUuid
paraFormat.configId = row.configId
}
const urlpara = JSON.stringify(paraFormat)
this.$router.push({ path: '/expert/detail/' + urlpara, query: { $title: row ? '编辑' : '新增配置' } })
},
goDetail() {
this.$router.push({ path: '/expert/detail/5' })
},
selectClientType(type, id) {
this.showCenterClientType = false
this.showClientType = false
let paraFormat = {
clientType: type
}
if (id) {
paraFormat.expertId = id
}
const urlpara = JSON.stringify(paraFormat)
this.$router.push({ path: '/expert/detail/' + urlpara, query: { $title: id ? '编辑' : '新增配置' } })
},
// beforeSearchFn() {
// return new Promise((resolve, reject) => {
// this.batchListSearch = { ...this.setParams() }
// resolve()
// })
// },
// setParams() {
// const params = {}
// params.searchText = 'dasda'
// return params
// },
handleSearch() {
this.$refs.expertTable.refreshTable()
},
......@@ -365,10 +352,6 @@ export default {
}
}
/deep/ .el-form-item {
margin-right: 12px !important;
}
.btn-area {
display: inline-block;
position: relative;
......
......@@ -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!