新增坐席列表页面
This commit is contained in:
parent
748ffc3a4c
commit
bcefe9d3c8
@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
title="坐席绑定"
|
||||
:visible="true"
|
||||
width="400px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose">
|
||||
<div class="dialog-content">
|
||||
<el-form ref="ruleForm"
|
||||
:model="userInfo"
|
||||
:rules="rulesClient"
|
||||
label-width="80px"
|
||||
class="demo-ruleForm">
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="用户" prop="name">
|
||||
<el-select v-model="userInfo.userId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" align="middle">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="坐席电话" prop="remark">
|
||||
<el-select v-model="userInfo.seatTelephone" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in phoneList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose()">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit()">确认</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import systemManageApi from "@/services/systemManage";
|
||||
export default {
|
||||
name: 'addOrEditRoleDialog',
|
||||
props: {
|
||||
addOrEditRoleConfig: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userInfo:{
|
||||
userId:'',//用户
|
||||
seatTelephone:'',//坐席电话
|
||||
},
|
||||
rulesClient: {
|
||||
userId: [
|
||||
{ required: true, message: '请选择用户', trigger: 'change',},
|
||||
],
|
||||
seatTelephone: [
|
||||
{ required: true, message: '请选择坐席电话', trigger: 'change',},
|
||||
],
|
||||
},
|
||||
phoneList: [],
|
||||
userList: [],
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getSeatPhone()
|
||||
this.getSeatUnbindUser()
|
||||
},
|
||||
methods: {
|
||||
getSeatPhone() {
|
||||
systemManageApi.getSeatPhone({}).then(res => {
|
||||
if (!res.code) {
|
||||
this.phoneList = res || []
|
||||
}
|
||||
})
|
||||
},
|
||||
getSeatUnbindUser() {
|
||||
systemManageApi.getSeatUnbindUser({}).then(res => {
|
||||
if (!res.code) {
|
||||
this.userList = res || []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSubmit() {
|
||||
if(!this.$clickThrottle()) { return }
|
||||
let _this=this;
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if(valid) {
|
||||
systemManageApi.seatUnbind(_this.userInfo).then(res => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '绑定成功!',
|
||||
type: 'success'
|
||||
});
|
||||
this.$parent.getSeatList(1)
|
||||
this.handleClose()
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
handleClose() {
|
||||
this.$emit('update:addOrEditRoleConfig', false)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dialog-content{
|
||||
padding: $size16;
|
||||
max-height:500px
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__header{
|
||||
border-bottom: 1px solid $border-color-lighter !important;
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__footer{
|
||||
border-top: 1px solid $border-color-lighter !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
140
src/pages/system-management/take-management/index.vue
Normal file
140
src/pages/system-management/take-management/index.vue
Normal file
@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<div class="layout-content-wrap background-color-fff border-radius-8">
|
||||
<div class="border-b-solid-lighter-1 p-h-24">
|
||||
<div class="flex-row justify-content-between height-56 align-items-center">
|
||||
<div class="color-text-primary f22">坐席列表</div>
|
||||
<div class="color-text-regular f14" >
|
||||
<el-button type="primary" @click="handleAddForm" size="small">新增</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layout-tabs-content-box">
|
||||
<div class="">
|
||||
<el-table ref="monthlyPlanTable"
|
||||
:data="tableData"
|
||||
:header-cell-style="{background:'#F5F7FA'}"
|
||||
row-key="id"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column
|
||||
v-for="(item, i) in tableHead"
|
||||
:key="i"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
:width="item.width"
|
||||
:show-overflow-tooltip="item.showOverflowTooltip"
|
||||
:formatter="item.formatter"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-row">
|
||||
<div class="f14 color-1960F4 cursor-pointer mr-8" @click="handleAddForm(scope)">解绑</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="text-center p-v-24">
|
||||
<el-pagination
|
||||
@size-change="getRoleList"
|
||||
@current-change="getRoleList"
|
||||
:current-page="queryData.current"
|
||||
:page-size="queryData.size"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- 新增-编辑 -->
|
||||
<addOrEditRoleDialog v-if="addOrEditRoleConfig" :addOrEditRoleConfig.sync="addOrEditRoleConfig" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import systemManageApi from "@/services/systemManage";
|
||||
export default {
|
||||
components: {
|
||||
addOrEditRoleDialog: () => import('./components/addOrEditRoleDialog.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData:[],
|
||||
tableHead: [
|
||||
{
|
||||
prop: "userShowName",
|
||||
label: "用户名称",
|
||||
showOverflowTooltip: false,
|
||||
formatter: this.formatTable,
|
||||
},
|
||||
{
|
||||
prop: "seatTelephone",
|
||||
label: "座席电话",
|
||||
showOverflowTooltip: false,
|
||||
formatter: this.formatTable,
|
||||
},
|
||||
{
|
||||
prop: "bindTime",
|
||||
label: "绑定时间",
|
||||
showOverflowTooltip: false,
|
||||
formatter: this.formatTable,
|
||||
},
|
||||
|
||||
],
|
||||
queryData: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
},
|
||||
total: 0,
|
||||
addOrEditRoleConfig:null,//新增弹窗
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSeatList(1)
|
||||
},
|
||||
methods: {
|
||||
getSeatList(val){
|
||||
if(val!=undefined){this.queryData.current = val}
|
||||
systemManageApi.getSeatList(this.queryData).then(res => {
|
||||
if (!res.code) {
|
||||
this.tableData = res.records;
|
||||
this.total = res.total;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 新增
|
||||
handleAddForm(){
|
||||
this.addOrEditRoleConfig = true
|
||||
},
|
||||
// 删除
|
||||
handleDelete(scope){
|
||||
this.$confirm("此操作将永久删除该角色, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
if(!this.$clickThrottle()) { return }//防止重复点击
|
||||
systemManageApi.deleteRoleById({ id: scope.row.id }).then((res) => {
|
||||
|
||||
this.$message.success("成功");
|
||||
this.getRoleList(1)
|
||||
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
formatTable(row, column, cellValue, index) {
|
||||
return cellValue || "-";
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-table--fit {
|
||||
border:1px solid $border-color-lighter !important;
|
||||
border-bottom: 0!important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -99,6 +99,12 @@ const routes = [
|
||||
component: () => import("@/pages/system-management/department-management"),
|
||||
meta: { title: "团队管理", icon: 'menu-department-management' },
|
||||
},
|
||||
{
|
||||
path: "/system-management/take-management",
|
||||
name: "/system-management/take-management",
|
||||
component: () => import("@/pages/system-management/take-management"),
|
||||
meta: { title: "坐席管理", icon: 'menu-take-management' },
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
@ -77,6 +77,30 @@ const systemLogApi = {
|
||||
|
||||
//========================end::角色相关======================================
|
||||
|
||||
|
||||
//========================start::坐席相关======================================
|
||||
// 角色列表
|
||||
getSeatList: data => {
|
||||
return service.service.post(`${apiAdmin}system/user/seat/page`, data)
|
||||
},
|
||||
// 座席绑定
|
||||
seatBind: data => {
|
||||
return service.service.post(`${apiAdmin}system/user/seat/bind`, data)
|
||||
},
|
||||
// 座席绑定
|
||||
seatUnbind: data => {
|
||||
return service.service.post(`${apiAdmin}system/user/seat/unbind`, data)
|
||||
},
|
||||
// 获取坐席电话
|
||||
getSeatPhone: data => {
|
||||
return service.service.get(`${apiAdmin}system/user/seat/phone`, data)
|
||||
},
|
||||
// 获取未绑定坐席用户
|
||||
getSeatUnbindUser: data => {
|
||||
return service.service.post(`${apiAdmin}system/user/seat/unbind/user`, data)
|
||||
},
|
||||
//========================end::坐席相关======================================
|
||||
|
||||
//========================start::菜单管理======================================
|
||||
// 菜单列表
|
||||
getResourceList: data => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user