Commit 39945e85 by 姜鹏凯

update

1 parent 1326f8c9
...@@ -8,6 +8,15 @@ export function getList (params) { ...@@ -8,6 +8,15 @@ export function getList (params) {
}) })
} }
// 新增客服
export function addService (data) {
return request({
url: '/wecom/kf/add',
method: 'post',
data: data
})
}
// 删除客服 // 删除客服
export function remove (id) { export function remove (id) {
return request({ return request({
......
<template> <template>
<div> <div>
<el-steps class="g-card g-pad20" style="margin-top:10px;" :active="currentActive" align-center>
<el-step title="账号信息"></el-step>
<el-step title="欢迎语"></el-step>
<el-step title="接待规则"></el-step>
</el-steps>
<div v-show="currentActive === 1">
<part1 @next="getBase"></part1>
</div>
<div v-show="currentActive === 2">
<part2 @update="getWecome"></part2>
</div>
<div v-show="currentActive === 3">
<part3></part3>
</div>
</div> </div>
</template> </template>
<script> <script>
import Part1 from './part1.vue'
import Part2 from './part2.vue'
import Part3 from './part3.vue'
import { addService } from '@/api/drainageCode/customerService.js'
export default { export default {
name: 'customer-service-manage-add', name: 'customer-service-manage-add',
data () { data () {
return {} return {
currentActive: 1
}
},
components: {
Part1,
Part2,
Part3
},
methods: {
getBase (data) {
console.log(data)
this.currentActive = 2
},
getWecome (type, data) {
console.log(data)
this.currentActive = type
}
},
mounted () {
},
created () {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tab {
height: 78px;
background: #fff;
border-top: 1px solid #f1f1f1;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
</style> </style>
<template> <template>
<div> <div>
3333333333
</div> </div>
</template> </template>
<script> <script>
...@@ -10,5 +11,4 @@ ...@@ -10,5 +11,4 @@
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="g-card g-pad20"> <div class="g-card g-pad20">
<div class="operation"> <div class="operation">
<div class="item"> <div class="item">
<el-button type="primary" size="mini" :disabled="list.length === 10">新建客服</el-button> <el-button type="primary" size="mini" :disabled="list.length === 10" @click="addFn">新建客服</el-button>
<span class="sub" v-if="list.length < 11">还可以添加{{10 -list.length}}个客服</span> <span class="sub" v-if="list.length < 11">还可以添加{{10 -list.length}}个客服</span>
</div> </div>
<div class="item"> <div class="item">
...@@ -115,6 +115,20 @@ ...@@ -115,6 +115,20 @@
} }
}, },
methods: { methods: {
addFn (data) {
if (data) {
this.$router.push({
path: '/drainageCode/customerService/add',
query: {
id: data
}
})
} else {
this.$router.push({
path: '/drainageCode/customerService/add',
})
}
},
getData () { getData () {
// getList().then(res => { // getList().then(res => {
// this.list = res.data // this.list = res.data
......
<template>
<div>
<el-row :gutter="10" type="flex" style="margin-top:10px;">
<el-col :span="10">
<div class="g-card g-pad20">
<el-form ref="base" :rules="baseRules" :model="base" label-position="right" label-width="100px">
<el-form-item label="客服名称:" prop="name">
<el-input v-model="base.name" maxlength="15" show-word-limit clearable></el-input>
</el-form-item>
<el-form-item label="客服头像:" prop="avatar">
<upload class="image-uploader" :fileUrl.sync="base.avatar" type="0"></upload>
<div class="sub-des">
建议大小 2M 以内,仅支持 png/jpg 等图片类型
</div>
</el-form-item>
<el-form-item>
<el-button plain @click="cancelFn">取消</el-button>
<el-button type="primary" @click="nextStep">下一步</el-button>
</el-form-item>
</el-form>
</div>
</el-col>
<el-col :span="14">
<div class="g-card g-pad20" style="height: 100%">
yulan
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
name: 'customer-service-part1',
data () {
return {
base: {
name: '',
avatar: '2222'
},
baseRules: {
name: [{ required: true, message: '请输入客服名称!', trigger: 'blur' }],
avatar: [{ required: true, message: '请上传客服头像!', trigger: 'blur' }],
}
}
},
props: {
isEdit:{
type:Boolean,
default: false
},
editData: {
type: Object,
default: () => {
return {
name: '',
avatar: ''
}
}
}
},
methods: {
cancelFn () {
this.$router.go(-1)
},
nextStep () {
this.$refs['base'].validate(validate => {
if (validate) {
this.$emit('next', this.base)
}
})
}
},
mounted () {
if (this.isEdit) {
this.base.name = this.editData.name
this.base.avatar = this.editData.avatar
}
},
created () {
}
}
</script>
<style lang="scss" scoped>
.sub-des {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
::v-deep .image-uploader {
.uploader-icon {
width: 120px;
height: 114px;
line-height: 114px;
}
.upload-img {
width: 100px;
height: 94px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<el-row :gutter="10" type="flex" style="margin-top:10px;">
<el-col>
<div class="g-card g-pad20">
<el-form ref="form" :model="form" label-position="right" label-width="120px">
<el-form-item label="接待员工:" required prop="userIdList">
<div v-if="userList.length > 0">
<el-tag size="medium" v-for="(item, index) in userList" :key="index">{{ item.name }}</el-tag>
</div>
<el-button type="primary" plain size="mini" @click="onSelectUser">{{ userList.length ? '修改' : '选择' }}员工</el-button>
<div class="sub-des">每个客服账号最多添加500个接待员工</div>
</el-form-item>
<el-form-item label="分配方式:" required prop="receptionType">
<div class="radio-content">
<div>
<el-radio v-model="form.allocationWay" :label="1">轮流分配</el-radio>
<div class="sub-des">
新咨询轮流分配给所有接待员工
</div>
</div>
<div style="margin-left:20px;">
<el-radio v-model="form.allocationWay" :label="2">空闲分配</el-radio>
<div class="sub-des">
新咨询分配给当前接待人数最少的接待员工
</div>
</div>
</div>
</el-form-item>
<el-form-item label="优先分配:">
<el-switch v-model="form.isPriority" :active-value=2 :inactive-value=1></el-switch>
<div class="sub-des">
开启后,将优先分配给上次接待的员工
</div>
</el-form-item>
<el-form-item label="接待上限:">
一个接待员工最多同时接待<el-input-number v-model="form.receiveLimit" :min="2" :max="50" :controls="false"></el-input-number>人
<div class="sub-des">
请输入2~50的正整数,最多支持同时接待50人
</div>
</el-form-item>
<el-form-item label="排队提醒:">
<el-switch v-model="form.queueNotice" :active-value=1 :inactive-value=2></el-switch>
<div class="sub-des">
开启后,当员工接待达上限,客户进度接待池排队时自动发送提示语
</div>
<el-input type="textarea" :disabled="form.queueNotice === 2" v-model="form.queueNoticeContent" maxlength="200" show-word-limit placeholder="请输入" :autosize="{ minRows: 5, maxRows: 20 }" clearable />
</el-form-item>
<el-form-item label="超时未回复提醒:">
<el-switch v-model="form.timeOutNotice" :active-value=1 :inactive-value=2></el-switch>
<div class="sub-des">
开启后,当客户超过指定时间未回复时,将自动发送提示语
</div>
超过 <el-input :disabled="form.timeOutNotice === 2" style=" width:60px;" :controls="false" v-model="form.timeOut"></el-input> <el-select :disabled="form.timeOutNotice === 2" style="width:80px;" v-model="form.timeOutType"> <el-option label="分钟" :value="1"></el-option><el-option label="小时" :value="2"></el-option> </el-select> 客户未回复时,自动发送提示语
<el-input :disabled="form.timeOutNotice === 2" style="margin-top: 10px;" type="textarea" v-model="form.timeOutContent" maxlength="200" show-word-limit placeholder="请输入" :autosize="{ minRows: 5, maxRows: 20 }" clearable />
</el-form-item>
<el-form-item label="自动结束提醒:">
<el-switch v-model="form.endNotice" :active-value=1 :inactive-value=2></el-switch>
<div class="sub-des">
开启后,当客户超过指定时间未回复时,将自动结束当前会话
</div>
超过 <el-input :disabled="form.endNotice === 2" style=" width:60px;" :controls="false" v-model="form.endNoticeTime"></el-input> <el-select :disabled="form.endNotice === 2" style="width:80px;" v-model="form.endTimeType"> <el-option label="分钟" :value="1"></el-option><el-option label="小时" :value="2"></el-option> </el-select> 客户未回复时,自动发送结束语
<el-input :disabled="form.endNotice === 2" style="margin-top: 10px;" type="textarea" v-model="form.endContent" maxlength="200" show-word-limit placeholder="请输入" :autosize="{ minRows: 5, maxRows: 20 }" clearable />
</el-form-item>
<el-form-item>
<el-button plain @click="nextStep(1)">上一步</el-button>
<el-button type="primary" @click="nextStep(3)">确定</el-button>
</el-form-item>
</el-form>
</div>
</el-col>
<el-col style="width: 350px">
<div class="g-card g-pad20" style="height: 100%">
预览
</div>
</el-col>
</el-row>
<SelectUser :defaultValues="userList" :visible.sync="dialogVisibleSelectUser" title="选择员工" :isOnlyLeaf="true" @success="selectedUser"></SelectUser>
</div>
</template>
<script>
import SelectUser from '@/components/SelectUser'
export default {
name: 'customer-service-part3',
data () {
return {
form: {
userIdList: [],
allocationWay: 1,
isPriority: 1,
receiveLimit: 50,
queueNotice: 1,
queueNoticeContent: '抱歉,当前所有客服都在接待中,请耐心等待,谢谢。',
timeOutNotice:1,
timeOut: null,
timeOutType:1,
timeOutContent: '客服当前仍在等待您的回复哦~',
endNotice: 1,
endNoticeTime: null,
endTimeType: 1,
endContent: '感谢您的支持与信任,若您有任何疑问,欢迎随时联系,谢谢。'
},
userList: [],
selectedUserList: [],
dialogVisibleSelectUser: false
}
},
components: {
SelectUser
},
methods: {
onSelectUser () {
this.dialogVisibleSelectUser = true
},
selectedUser (users) {
this.userList = users
this.dialogVisibleSelectUser = false
}
},
mounted () {
},
created () {
}
}
</script>
<style lang="scss" scoped>
.radio-content {
display: flex;
align-items: center;
}
.sub-des {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!