|
@@ -168,75 +168,86 @@
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
<!-- 添加或修改机器人外呼任务对话框 -->
|
|
<!-- 添加或修改机器人外呼任务对话框 -->
|
|
|
- <el-drawer size="75%" :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
|
- <div class="app-container">
|
|
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
|
- <el-form-item label="任务名称" prop="name">
|
|
|
|
|
- <el-input v-model="form.name" placeholder="请输入任务名称"/>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <!-- <el-form-item label="机器人" prop="robot">
|
|
|
|
|
- <el-select v-model="form.robot" filterable>
|
|
|
|
|
- <el-option v-for="item in robotList" :label="item.name + '('+item.num+')'" :value="item.id"/>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="话术" prop="dialogId">
|
|
|
|
|
- <el-select v-model="form.dialogId" filterable>
|
|
|
|
|
- <el-option v-for="item in dialogList" :label="item.name" :value="item.id"/>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item> -->
|
|
|
|
|
- <!-- <el-form-item label="主叫分组" prop="cidGroupId">
|
|
|
|
|
- <el-select v-model="form.cidGroupId" filterable>
|
|
|
|
|
- <el-option v-for="item in CIDGroupList" :label="item.name" :value="item.id"/>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item> -->
|
|
|
|
|
- <el-form-item label="拨打客户" prop="userIds">
|
|
|
|
|
- <el-button @click="openSelect">选择客户({{ form.userIds ? form.userIds.length : 0 }})</el-button>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <!-- <el-form-item label="任务流程" prop="taskFlow"> -->
|
|
|
|
|
-<!-- <draggable v-model="taskFlowList" @end="" class="flow-parent">-->
|
|
|
|
|
-<!-- <div class="flow-child" v-for="item in taskFlowList">-->
|
|
|
|
|
-<!-- <el-tag>{{ item.value }}</el-tag>-->
|
|
|
|
|
-<!-- <i class="el-icon-arrow-right"></i>-->
|
|
|
|
|
-<!-- </div>-->
|
|
|
|
|
-<!-- </draggable>-->
|
|
|
|
|
- <el-form-item label="任务流程" prop="companyAiWorkflowId">
|
|
|
|
|
- <el-select v-model="form.companyAiWorkflowId" filterable>
|
|
|
|
|
- <el-option v-for="item in workflowList" :label="item.label" :value="item.value"/>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="加微方式" prop="addType">
|
|
|
|
|
- <el-radio v-model="form.addType" :label="0">平均</el-radio>
|
|
|
|
|
- <el-radio v-model="form.addType" :label="1">意向</el-radio>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
-<!-- <el-form-item label="加微等待时间" prop="addWxTime" >-->
|
|
|
|
|
-<!-- <el-input style="width:240px" v-model="form.addWxTime" placeholder="加微等待时间"/>-->
|
|
|
|
|
-<!-- </el-form-item>-->
|
|
|
|
|
- <el-form-item label="分配账号">
|
|
|
|
|
- <el-button @click="addQwUser">添加</el-button>
|
|
|
|
|
- <el-row :gutter="24" v-for="(item, index) in form.qwUser" style="margin-top: 5px">
|
|
|
|
|
- <el-col :span="5" v-if="form.addType == 1">
|
|
|
|
|
- <el-select v-model="item.intention" placeholder="意向等级" filterable clearable>
|
|
|
|
|
- <el-option v-for="item in levelList" :label="item.dictLabel" :value="item.dictValue"/>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="4">
|
|
|
|
|
- <el-button @click="openQwUserSelect(index)">选择企微({{ item.companyUserId ? item.companyUserId.length : 0 }})</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <!-- <el-col :span="5">
|
|
|
|
|
- <el-select v-model="item.wxDialogId" placeholder="话术" filterable>
|
|
|
|
|
- <el-option v-for="item in wxDialogList" :label="item.name" :value="item.id"/>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="5">
|
|
|
|
|
- <el-select v-model="item.smsTempId" placeholder="短信模板" filterable>
|
|
|
|
|
- <el-option v-for="item in smsTempList" :label="item.title" :value="item.tempId"/>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
- <el-col :span="3">
|
|
|
|
|
- <el-button type="danger" icon="el-icon-delete" circle @click="removeQwUser(index)"></el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
|
+ <el-drawer size="60%" :title="title" :visible.sync="open" width="500px" append-to-body class="task-form-drawer">
|
|
|
|
|
+ <div class="drawer-content">
|
|
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="90px" class="task-form">
|
|
|
|
|
+ <div class="form-section">
|
|
|
|
|
+ <div class="section-title">
|
|
|
|
|
+ <i class="el-icon-document"></i>
|
|
|
|
|
+ <span>基本信息</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-form-item label="任务名称" prop="name">
|
|
|
|
|
+ <el-input v-model="form.name" placeholder="请输入任务名称" clearable/>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="拨打客户" prop="userIds">
|
|
|
|
|
+ <el-button icon="el-icon-user" @click="openSelect">
|
|
|
|
|
+ 选择客户
|
|
|
|
|
+ <el-tag v-if="form.userIds && form.userIds.length" type="primary" size="small" style="margin-left: 8px;">
|
|
|
|
|
+ {{ form.userIds.length }}
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="任务流程" prop="companyAiWorkflowId">
|
|
|
|
|
+ <el-select v-model="form.companyAiWorkflowId" filterable placeholder="请选择任务流程">
|
|
|
|
|
+ <el-option v-for="item in workflowList" :key="item.value" :label="item.label" :value="item.value"/>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="form-section">
|
|
|
|
|
+ <div class="section-title">
|
|
|
|
|
+ <i class="el-icon-setting"></i>
|
|
|
|
|
+ <span>加微设置</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-form-item label="加微方式" prop="addType">
|
|
|
|
|
+ <el-radio-group v-model="form.addType">
|
|
|
|
|
+ <el-radio :label="0" border>
|
|
|
|
|
+ <i class="el-icon-pie-chart"></i>
|
|
|
|
|
+ 平均分配
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ <el-radio :label="1" border>
|
|
|
|
|
+ <i class="el-icon-star-on"></i>
|
|
|
|
|
+ 意向分配
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="form-section account-section">
|
|
|
|
|
+ <div class="section-title">
|
|
|
|
|
+ <i class="el-icon-user-solid"></i>
|
|
|
|
|
+ <span>分配账号</span>
|
|
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus" @click="addQwUser" plain>添加</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="account-list" v-if="form.qwUser && form.qwUser.length">
|
|
|
|
|
+ <div v-for="(item, index) in form.qwUser" :key="index" class="account-item">
|
|
|
|
|
+ <el-row :gutter="12">
|
|
|
|
|
+ <el-col :span="form.addType == 1 ? 6 : 0" v-if="form.addType == 1">
|
|
|
|
|
+ <el-select v-model="item.intention" placeholder="意向等级" filterable clearable size="small">
|
|
|
|
|
+ <el-option v-for="opt in levelList" :key="opt.dictValue" :label="opt.dictLabel" :value="opt.dictValue"/>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="form.addType == 1 ? 7 : 10">
|
|
|
|
|
+ <el-button icon="el-icon-user" @click="openQwUserSelect(index)" size="small" style="width: 100%;">
|
|
|
|
|
+ 选择企微
|
|
|
|
|
+ <el-tag v-if="item.companyUserId && item.companyUserId.length" type="success" size="mini" style="margin-left: 6px;">
|
|
|
|
|
+ {{ item.companyUserId.length }}
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="form.addType == 1 ? 9 : 12">
|
|
|
|
|
+ <el-select v-model="item.wxDialogId" placeholder="选择话术" filterable size="small">
|
|
|
|
|
+ <el-option v-for="dialog in wxDialogList" :key="dialog.id" :label="dialog.name" :value="dialog.id"/>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="2">
|
|
|
|
|
+ <el-button type="danger" icon="el-icon-delete" circle @click="removeQwUser(index)" size="small"></el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-empty v-else description="暂无分配账号" :image-size="80"></el-empty>
|
|
|
|
|
+ </div>
|
|
|
<!-- <el-form-item label="模式" prop="mode">
|
|
<!-- <el-form-item label="模式" prop="mode">
|
|
|
<el-select v-model="form.mode">
|
|
<el-select v-model="form.mode">
|
|
|
<el-option label="呼叫机器人后挂断" :value="7"/>
|
|
<el-option label="呼叫机器人后挂断" :value="7"/>
|
|
@@ -710,7 +721,11 @@ export default {
|
|
|
endTime2: null,
|
|
endTime2: null,
|
|
|
createTime: null,
|
|
createTime: null,
|
|
|
qwUser: [],
|
|
qwUser: [],
|
|
|
- createUser: null
|
|
|
|
|
|
|
+ createUser: null,
|
|
|
|
|
+ userIds: [],
|
|
|
|
|
+ userNames: [],
|
|
|
|
|
+ userTableList: [],
|
|
|
|
|
+ companyAiWorkflowId: null
|
|
|
};
|
|
};
|
|
|
this.resetForm("form");
|
|
this.resetForm("form");
|
|
|
},
|
|
},
|
|
@@ -753,6 +768,26 @@ export default {
|
|
|
if (this.form.weekDay && this.form.weekDay.length > 0) {
|
|
if (this.form.weekDay && this.form.weekDay.length > 0) {
|
|
|
this.form.weekDay1 = this.form.weekDay.join(",")
|
|
this.form.weekDay1 = this.form.weekDay.join(",")
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 验证加微方案
|
|
|
|
|
+ if(!this.form.qwUser || this.form.qwUser.length == 0){
|
|
|
|
|
+ this.msgError("请添加分配账号");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 验证每个账号是否选择了企微和话术
|
|
|
|
|
+ for(let i = 0; i < this.form.qwUser.length; i++) {
|
|
|
|
|
+ const account = this.form.qwUser[i];
|
|
|
|
|
+ if(!account.companyUserId || account.companyUserId.length == 0) {
|
|
|
|
|
+ this.msgError(`第 ${i + 1} 个账号请选择企微`);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!account.wxDialogId) {
|
|
|
|
|
+ this.msgError(`第 ${i + 1} 个账号请选择话术`);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
let list = [];
|
|
let list = [];
|
|
|
this.form.qwUser.forEach(l => {
|
|
this.form.qwUser.forEach(l => {
|
|
|
list = list.concat(l.companyUserId.map(e => {return {intention: l.intention, companyUserId: e,wxDialogId: l.wxDialogId,smsTempId:l.smsTempId}}))
|
|
list = list.concat(l.companyUserId.map(e => {return {intention: l.intention, companyUserId: e,wxDialogId: l.wxDialogId,smsTempId:l.smsTempId}}))
|
|
@@ -821,7 +856,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
openSelect() {
|
|
openSelect() {
|
|
|
- this.$refs.customer.setRows(this.form.userTableList);
|
|
|
|
|
|
|
+ this.$refs.customer.setRows(this.form.userTableList || []);
|
|
|
},
|
|
},
|
|
|
openQwUserSelect(index) {
|
|
openQwUserSelect(index) {
|
|
|
this.thisQwUserIndex = index;
|
|
this.thisQwUserIndex = index;
|
|
@@ -1279,4 +1314,97 @@ export default {
|
|
|
.duration i {
|
|
.duration i {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+/* 任务表单样式 */
|
|
|
|
|
+.task-form-drawer ::v-deep .el-drawer__body {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.drawer-content {
|
|
|
|
|
+ padding: 16px;
|
|
|
|
|
+ background: #f5f7fa;
|
|
|
|
|
+ min-height: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.task-form {
|
|
|
|
|
+ max-width: 750px;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.form-section {
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ padding: 16px 20px;
|
|
|
|
|
+ margin-bottom: 16px;
|
|
|
|
|
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.section-title {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ color: #303133;
|
|
|
|
|
+ margin-bottom: 16px;
|
|
|
|
|
+ padding-bottom: 10px;
|
|
|
|
|
+ border-bottom: 1px solid #f0f2f5;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.section-title i {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ color: #1890ff;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.task-form ::v-deep .el-form-item {
|
|
|
|
|
+ margin-bottom: 16px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.task-form ::v-deep .el-form-item:last-child {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.task-form ::v-deep .el-input,
|
|
|
|
|
+.task-form ::v-deep .el-select {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.task-form ::v-deep .el-radio-group {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ display: grid;
|
|
|
|
|
+ grid-template-columns: repeat(2, 1fr);
|
|
|
|
|
+ gap: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.task-form ::v-deep .el-radio.is-bordered {
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ padding: 10px 16px;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.task-form ::v-deep .el-radio.is-bordered i {
|
|
|
|
|
+ margin-right: 6px;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.account-list {
|
|
|
|
|
+ margin-top: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.account-item {
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ padding: 12px;
|
|
|
|
|
+ background: #f9fafb;
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ border: 1px solid #e8e8e8;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.account-item:hover {
|
|
|
|
|
+ border-color: #1890ff;
|
|
|
|
|
+ background: #f0f9ff;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.account-item ::v-deep .el-select {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|