|
@@ -107,16 +107,6 @@
|
|
|
v-hasPermi="['qw:contactWay:add']"
|
|
v-hasPermi="['qw:contactWay:add']"
|
|
|
>同步</el-button>
|
|
>同步</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- plain
|
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="handleAddGroup"
|
|
|
|
|
- v-hasPermi="['qw:contactWay:add']"
|
|
|
|
|
- >新增员工组</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<div style=" height: calc(100% - 40px); overflow-y: auto;">
|
|
<div style=" height: calc(100% - 40px); overflow-y: auto;">
|
|
|
<el-table v-loading="loading" :data="contactWayList" @selection-change="handleSelectionChange" border>
|
|
<el-table v-loading="loading" :data="contactWayList" @selection-change="handleSelectionChange" border>
|
|
@@ -685,57 +675,6 @@
|
|
|
<qwUserList ref="QwUserList" @selectUserList="selectUserList"></qwUserList>
|
|
<qwUserList ref="QwUserList" @selectUserList="selectUserList"></qwUserList>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
- <!-- 添加员工组对话框 -->
|
|
|
|
|
- <el-dialog :title="title" :visible.sync="groupOpen" width="1200px" append-to-body>
|
|
|
|
|
- <el-form ref="form" :model="group" :rules="rules" label-width="120px">
|
|
|
|
|
- <el-form-item label="员工组名称" prop="name">
|
|
|
|
|
- <el-input v-model="group.name" placeholder="请输入员工组名称" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="" prop="userTimeJson" v-if="form.userType==2">
|
|
|
|
|
- <div v-for="(item, index) in userTimeJson" >
|
|
|
|
|
- <el-row>
|
|
|
|
|
- <el-col :span="22">
|
|
|
|
|
- <div style="background-color: #fbfbfb;padding: 15px; border: 1px solid #e6e6e6; margin-bottom: 20px;">
|
|
|
|
|
- <el-form :model="item" label-width="80px">
|
|
|
|
|
- <el-form-item label="员工选择">
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-button
|
|
|
|
|
- size="medium"
|
|
|
|
|
- icon="el-icon-circle-plus-outline"
|
|
|
|
|
- plain
|
|
|
|
|
- @click="handleListUserForTimeSlot(index)">请选择使用员工
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div style="margin-top: 10px;">
|
|
|
|
|
- <el-tag
|
|
|
|
|
- style="margin-left: 5px; margin-top: 5px;"
|
|
|
|
|
- size="medium"
|
|
|
|
|
- :key="user.id"
|
|
|
|
|
- v-for="user in item.userList || []"
|
|
|
|
|
- closable
|
|
|
|
|
- :disable-transitions="false"
|
|
|
|
|
- @close="handleCloseTimeSlotUser(index, user)">
|
|
|
|
|
- {{ user.qwUserName }}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="1" :offset="1">
|
|
|
|
|
- <i class="el-icon-delete-solid" @click="delUserTime(index)" style="margin-top: 165px;" v-if="userTimeJson.length>1"></i>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
-
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
|
- <el-button type="primary" @click="submitGroupForm">确 定</el-button>
|
|
|
|
|
- <el-button @click="cancel">取 消</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
</div>
|
|
</div>
|
|
|
<el-drawer
|
|
<el-drawer
|
|
|
:with-header="false"
|
|
:with-header="false"
|
|
@@ -834,8 +773,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
open: false,
|
|
|
- // 是否显示新增员工组弹窗
|
|
|
|
|
- groupOpen: false,
|
|
|
|
|
// 联系方式类型,1-单人, 2-多人字典
|
|
// 联系方式类型,1-单人, 2-多人字典
|
|
|
typeOptions: [],
|
|
typeOptions: [],
|
|
|
weekOptions: [{
|
|
weekOptions: [{
|
|
@@ -887,9 +824,6 @@ export default {
|
|
|
// 表单参数
|
|
// 表单参数
|
|
|
form: {
|
|
form: {
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
- group:{
|
|
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
fileFrom:{
|
|
fileFrom:{
|
|
|
imagePicUrl:null,
|
|
imagePicUrl:null,
|
|
@@ -1414,14 +1348,6 @@ export default {
|
|
|
this.title = "添加企微活码";
|
|
this.title = "添加企微活码";
|
|
|
this.form.groupId=this.queryParams.groupId
|
|
this.form.groupId=this.queryParams.groupId
|
|
|
},
|
|
},
|
|
|
- /** 新增员工组操作 */
|
|
|
|
|
- handleAddGroup() {
|
|
|
|
|
- this.reset();
|
|
|
|
|
- this.groupOpen = true;
|
|
|
|
|
- this.title = "添加员工组";
|
|
|
|
|
- this.group.groupId=this.queryParams.groupId
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
handleAvatarSuccess(res, file) {
|
|
handleAvatarSuccess(res, file) {
|
|
|
if(res.code==200){
|
|
if(res.code==200){
|
|
|
this.form.imagePicUrl=res.url;
|
|
this.form.imagePicUrl=res.url;
|
|
@@ -1570,56 +1496,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- /** 员工组提交按钮 */
|
|
|
|
|
- submitGroupForm() {
|
|
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- this.form.corpId=this.queryParams.corpId
|
|
|
|
|
- if(this.form.userType === 1){
|
|
|
|
|
- if(Object.keys(this.userIds).length === 0){
|
|
|
|
|
- return this.$message({
|
|
|
|
|
- message: '请选择客服类型-使用员工',
|
|
|
|
|
- type: 'warning'
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if(this.form.userType==2){
|
|
|
|
|
- var jsonUserIds=[];
|
|
|
|
|
- for (let i = 0; i < this.userTimeJson.length; i++) {
|
|
|
|
|
- // 确保 userIds 与 userList 同步
|
|
|
|
|
- if(this.userTimeJson[i].userList && this.userTimeJson[i].userList.length > 0){
|
|
|
|
|
- this.userTimeJson[i].userIds = this.userTimeJson[i].userList.map(u => u.qwUserId);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- for (let j = 0; j < this.userTimeJson[i].userIds.length; j++) {
|
|
|
|
|
- if(!jsonUserIds.find(item=>item==this.userTimeJson[i].userIds[j])){
|
|
|
|
|
- jsonUserIds.push(this.userTimeJson[i].userIds[j]);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- this.userIds=jsonUserIds;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- this.group.userIds=JSON.stringify(this.userIds)
|
|
|
|
|
- // 提交前移除 userList 字段(因为后端只需要 userIds)
|
|
|
|
|
- const userTimeJsonForSubmit = this.userTimeJson.map(item => {
|
|
|
|
|
- const {userList, ...rest} = item;
|
|
|
|
|
- return rest;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- console.log("group", this.group);
|
|
|
|
|
-
|
|
|
|
|
- // addContactWay(this.form).then(response => {
|
|
|
|
|
- // this.msgSuccess("新增成功");
|
|
|
|
|
- // this.open = false;
|
|
|
|
|
- // this.getList();
|
|
|
|
|
- // });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
const ids = row.id || this.ids;
|