|
@@ -3,34 +3,23 @@
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
<el-form-item label="任务名称" prop="name">
|
|
|
<el-input
|
|
|
- v-model="queryParams.name"
|
|
|
- placeholder="请输入任务名称"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
+ v-model="queryParams.name"
|
|
|
+ placeholder="请输入任务名称"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="机器人" prop="robot">
|
|
|
<el-select v-model="queryParams.robot" filterable clearable>
|
|
|
- <el-option-group
|
|
|
- v-for="(v, k) in robotList"
|
|
|
- :key="k"
|
|
|
- :label="k">
|
|
|
- <el-option
|
|
|
- v-for="item in v"
|
|
|
- :key="item.robotId"
|
|
|
- :label="item.robotName"
|
|
|
- :value="item.robotId">
|
|
|
- </el-option>
|
|
|
- </el-option-group>
|
|
|
- <!-- <el-option v-for="item in robotList" :label="item.name + '('+item.num+')'" :value="item.id"/>-->
|
|
|
+ <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="queryParams.dialogId" filterable clearable>
|
|
|
+ <el-option v-for="item in dialogList" :label="item.name" :value="item.id"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="话术" prop="dialogId">-->
|
|
|
- <!-- <el-select v-model="queryParams.dialogId" filterable clearable>-->
|
|
|
- <!-- <el-option v-for="item in dialogList" :label="item.name" :value="item.id"/>-->
|
|
|
- <!-- </el-select>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
<el-form-item>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
@@ -40,53 +29,53 @@
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
- type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- size="mini"
|
|
|
- @click="handleAdd"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:add']"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="handleAdd"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:add']"
|
|
|
>新增
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
- type="success"
|
|
|
- icon="el-icon-edit"
|
|
|
- size="mini"
|
|
|
- :disabled="single"
|
|
|
- @click="handleUpdate"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:edit']"
|
|
|
+ type="success"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="single"
|
|
|
+ @click="handleUpdate"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:edit']"
|
|
|
>修改
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
- type="danger"
|
|
|
- icon="el-icon-delete"
|
|
|
- size="mini"
|
|
|
- :disabled="multiple"
|
|
|
- @click="handleDelete"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:remove']"
|
|
|
+ type="danger"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleDelete"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:remove']"
|
|
|
>删除
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
- type="warning"
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="handleExport"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:export']"
|
|
|
+ type="warning"
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleExport"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:export']"
|
|
|
>导出
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
- type="success"
|
|
|
- icon="el-icon-refresh"
|
|
|
- size="mini"
|
|
|
- @click="updateStatusFun"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
+ type="success"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ size="mini"
|
|
|
+ @click="updateStatusFun"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
>更新状态
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -101,13 +90,12 @@
|
|
|
<el-table-column label="三方ID" align="center" prop="taskId"/>
|
|
|
<el-table-column label="机器人" align="center" prop="robot">
|
|
|
<template slot-scope="scope">
|
|
|
- <p v-for="(item, index) in robotList" v-if="scope.row.robot && scope.row.robot == item.id">{{ item.name }}</p>
|
|
|
+ <p v-for="(item, index) in robotList" v-if="scope.row.robot && scope.row.robot == item.id">{{item.name}}</p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="话术" align="center" prop="dialogId">
|
|
|
<template slot-scope="scope">
|
|
|
- <p v-for="(item, index) in dialogList" v-if="scope.row.dialogId && scope.row.dialogId == item.id">
|
|
|
- {{ item.name }}</p>
|
|
|
+ <p v-for="(item, index) in dialogList" v-if="scope.row.dialogId && scope.row.dialogId == item.id">{{item.name}}</p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="加微方式" align="center" prop="dialogId">
|
|
@@ -118,18 +106,11 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="工作日" align="center" prop="weekDay1">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag v-for="(item, index) in weekList"
|
|
|
- v-if="scope.row.weekDay1 && scope.row.weekDay1.indexOf(item.value) != -1">{{ item.label }}
|
|
|
- </el-tag>
|
|
|
+ <el-tag v-for="(item, index) in weekList" v-if="scope.row.weekDay1 && scope.row.weekDay1.indexOf(item.value) != -1">{{item.label}}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="开始时间" align="center" prop="startTime1"/>
|
|
|
<el-table-column label="结束时间" align="center" prop="endTime1"/>
|
|
|
- <el-table-column label="未分配数量" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag :type="Number(scope.row.num) > 0 ?'danger' : ''">{{ scope.row.num }}个</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="当前状态" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-loading="loadingStatus">
|
|
@@ -139,57 +120,50 @@
|
|
|
<el-tag v-if="statusObj[scope.row.taskId].runningStatus == 2">已暂停</el-tag>
|
|
|
<el-tag v-if="statusObj[scope.row.taskId].runningStatus == 3">已停止</el-tag>
|
|
|
</p>
|
|
|
- <p v-if="!statusObj.hasOwnProperty(scope.row.taskId)">
|
|
|
- <el-tag>空</el-tag>
|
|
|
- </p>
|
|
|
+ <p v-if="!statusObj.hasOwnProperty(scope.row.taskId)"><el-tag>空</el-tag></p>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- @click="calleesOpen(scope.row.id)"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
- >客户列表
|
|
|
- </el-button>
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="calleesOpen(scope.row.id)"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
+ >客户列表</el-button>
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- @click="wxOpen(scope.row.id)"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
- >加微统计
|
|
|
- </el-button>
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="wxOpen(scope.row.id)"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
+ >加微统计</el-button>
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- v-if="statusObj.hasOwnProperty(scope.row.taskId) && (statusObj[scope.row.taskId].runningStatus == 0 || statusObj[scope.row.taskId].runningStatus == 3)"
|
|
|
- @click="startRoboticFun(scope.row.taskId)"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
- >启动任务
|
|
|
- </el-button>
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ v-if="statusObj.hasOwnProperty(scope.row.taskId) && (statusObj[scope.row.taskId].runningStatus == 0 || statusObj[scope.row.taskId].runningStatus == 3)"
|
|
|
+ @click="startRoboticFun(scope.row.taskId)"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
+ >启动任务</el-button>
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- v-if="statusObj.hasOwnProperty(scope.row.taskId) && (statusObj[scope.row.taskId].runningStatus == 1 || statusObj[scope.row.taskId].runningStatus == 2)"
|
|
|
- @click="stopRoboticFun(scope.row.taskId)"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
- >停止任务
|
|
|
- </el-button>
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ v-if="statusObj.hasOwnProperty(scope.row.taskId) && (statusObj[scope.row.taskId].runningStatus == 1 || statusObj[scope.row.taskId].runningStatus == 2)"
|
|
|
+ @click="stopRoboticFun(scope.row.taskId)"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
+ >停止任务</el-button>
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- @click="addRoboticFun(scope.row)"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:edit']"
|
|
|
- >追加个微
|
|
|
- </el-button>
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="addRoboticFun(scope.row)"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:edit']"
|
|
|
+ >追加个微</el-button>
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['system:companyVoiceRobotic:remove']"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['system:companyVoiceRobotic:remove']"
|
|
|
>删除
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -197,40 +171,30 @@
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
|
- v-show="total>0"
|
|
|
- :total="total"
|
|
|
- :page.sync="queryParams.pageNum"
|
|
|
- :limit.sync="queryParams.pageSize"
|
|
|
- @pagination="getList"
|
|
|
+ v-show="total>0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改机器人外呼任务对话框 -->
|
|
|
<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="taskName">
|
|
|
- <el-input v-model="form.taskName" placeholder="请输入任务名称"/>
|
|
|
+ <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="robotId">
|
|
|
- <el-select v-model="form.robotId" filterable>
|
|
|
- <el-option-group
|
|
|
- v-for="(v, k) in robotList"
|
|
|
- :key="k"
|
|
|
- :label="k">
|
|
|
- <el-option
|
|
|
- v-for="item in v"
|
|
|
- :key="item.robotId"
|
|
|
- :label="item.robotName"
|
|
|
- :value="item.robotId">
|
|
|
- </el-option>
|
|
|
- </el-option-group>
|
|
|
+ <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="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="userIds">
|
|
|
<el-button @click="openSelect">选择客户({{ form.userIds ? form.userIds.length : 0 }})</el-button>
|
|
|
</el-form-item>
|
|
@@ -247,9 +211,7 @@
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-button @click="openQwUserSelect(index)">
|
|
|
- 选择个微({{ item.companyUserId ? item.companyUserId.length : 0 }})
|
|
|
- </el-button>
|
|
|
+ <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>
|
|
@@ -261,57 +223,26 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="呼叫开始日期" prop="dialStartDate">
|
|
|
- <el-date-picker
|
|
|
- size="small"
|
|
|
- v-model="form.dialStartDate"
|
|
|
- type="date"
|
|
|
- placeholder="选择开始日期"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="呼叫截止日期" prop="dialEndDate">
|
|
|
- <el-date-picker
|
|
|
- size="small"
|
|
|
- v-model="form.dialEndDate"
|
|
|
- type="date"
|
|
|
- placeholder="选择开始日期"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="呼叫开始日期" prop="dialStartTime">
|
|
|
- <el-time-select
|
|
|
- placeholder="起始时间"
|
|
|
- v-model="form.dialStartTime"
|
|
|
- value-format="HH:mm"
|
|
|
- :picker-options="{
|
|
|
- start: '09:00',
|
|
|
- step: '01:00',
|
|
|
- end: '22:00'
|
|
|
- }">
|
|
|
- </el-time-select>
|
|
|
+ <el-form-item label="模式" prop="mode">
|
|
|
+ <el-select v-model="form.mode">
|
|
|
+ <el-option label="呼叫机器人后挂断" :value="7"/>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="呼叫截止日期" prop="dialEndTime">
|
|
|
- <el-time-select
|
|
|
- placeholder="结束时间"
|
|
|
- v-model="form.dialEndTime"
|
|
|
- value-format="HH:mm"
|
|
|
- :picker-options="{
|
|
|
- start: '09:00',
|
|
|
- step: '01:00',
|
|
|
- end: '22:00',
|
|
|
- minTime: form.dialStartTime
|
|
|
- }">
|
|
|
- </el-time-select>
|
|
|
+ <el-form-item label="呼叫倍率" prop="multiplier">
|
|
|
+ <el-select v-model="form.multiplier">
|
|
|
+ <el-option :value="1"/>
|
|
|
+ <el-option :value="2"/>
|
|
|
+ <el-option :value="3"/>
|
|
|
+ <el-option :value="4"/>
|
|
|
+ <el-option :value="5"/>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="呼叫截止日期" prop="forbidDialDate">
|
|
|
- <el-checkbox v-for="item in weekList" v-model="form.forbidDialDate" :label="item.value">{{item.label}}</el-checkbox>
|
|
|
+ <el-form-item label="自动重呼" prop="autoRecall">
|
|
|
+ <el-radio v-model="form.autoRecall" label="0">否</el-radio>
|
|
|
+ <el-radio v-model="form.autoRecall" label="1">是</el-radio>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="重试次数" prop="retryTimes">
|
|
|
- <el-select v-model="form.retryTimes">
|
|
|
+ <el-form-item label="重呼次数" prop="recallTimes" v-if="form.autoRecall == 1">
|
|
|
+ <el-select v-model="form.recallTimes">
|
|
|
<el-option label="不自动重呼" :value="0"/>
|
|
|
<el-option :value="1"/>
|
|
|
<el-option :value="2"/>
|
|
@@ -320,6 +251,38 @@
|
|
|
<el-option :value="5"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="工作日" prop="weekDay">
|
|
|
+ <el-select v-model="form.weekDay" multiple style="width: 100%">
|
|
|
+ <el-option v-for="item in weekList" :label="item.label" :value="item.value"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开始时间" prop="startTime1">
|
|
|
+ <el-time-select
|
|
|
+ v-model="form.startTime1"
|
|
|
+ format="HH:mm"
|
|
|
+ value-format="HH:mm:00"
|
|
|
+ :picker-options="{
|
|
|
+ start: '00:00',
|
|
|
+ end: '23:59',
|
|
|
+ step: '00:30',
|
|
|
+ }"
|
|
|
+ placeholder="请选择开始时间">
|
|
|
+ </el-time-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="结束时间" prop="endTime1">
|
|
|
+ <el-time-select
|
|
|
+ v-model="form.endTime1"
|
|
|
+ format="HH:mm"
|
|
|
+ value-format="HH:mm:00"
|
|
|
+ :picker-options="{
|
|
|
+ start: '00:00',
|
|
|
+ end: '23:59',
|
|
|
+ step: '00:30',
|
|
|
+ minTime: form.startTime1
|
|
|
+ }"
|
|
|
+ placeholder="请选择结束时间">
|
|
|
+ </el-time-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -336,31 +299,23 @@
|
|
|
<el-table-column label="电话号码" align="center" prop="phone"/>
|
|
|
<el-table-column label="客户名称" align="center" prop="userName"/>
|
|
|
<el-table-column label="客户ID" align="center" prop="userId"/>
|
|
|
- <el-table-column label="是否回调" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.result == 0">否</el-tag>
|
|
|
- <el-tag v-if="scope.row.result == 1">是</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="意向等级" align="center" prop="intention"/>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- @click="openCustomer(scope.row.userId)"
|
|
|
- >客户信息详情
|
|
|
- </el-button>
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="openCustomer(scope.row.userId)"
|
|
|
+ >客户信息详情</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
|
- v-show="callees.total>0"
|
|
|
- :total="callees.total"
|
|
|
- :page.sync="callees.queryParams.pageNum"
|
|
|
- :limit.sync="callees.queryParams.pageSize"
|
|
|
- @pagination="getCalleesList"
|
|
|
+ v-show="callees.total>0"
|
|
|
+ :total="callees.total"
|
|
|
+ :page.sync="callees.queryParams.pageNum"
|
|
|
+ :limit.sync="callees.queryParams.pageSize"
|
|
|
+ @pagination="getCalleesList"
|
|
|
/>
|
|
|
</el-drawer>
|
|
|
<el-drawer title="加微详情" size="60%" :visible.sync="wx.show" append-to-body>
|
|
@@ -376,37 +331,39 @@
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
|
- v-show="wx.total>0"
|
|
|
- :total="wx.total"
|
|
|
- :page.sync="wx.queryParams.pageNum"
|
|
|
- :limit.sync="wx.queryParams.pageSize"
|
|
|
- @pagination="getWxList"
|
|
|
+ v-show="wx.total>0"
|
|
|
+ :total="wx.total"
|
|
|
+ :page.sync="wx.queryParams.pageNum"
|
|
|
+ :limit.sync="wx.queryParams.pageSize"
|
|
|
+ @pagination="getWxList"
|
|
|
/>
|
|
|
</el-drawer>
|
|
|
<el-drawer size="75%" title="客户详情" :visible.sync="customerDetailShow" append-to-body>
|
|
|
- <customer-details ref="customerDetails"/>
|
|
|
+ <customer-details ref="customerDetails" />
|
|
|
</el-drawer>
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<!-- 添加或修改添加个微信账号对话框 -->
|
|
|
<el-dialog title="追加个微" :visible.sync="openAdd" width="75%" append-to-body>
|
|
|
- <el-form ref="form" :model="formOpen" label-width="80px">
|
|
|
+ <el-form ref="form" :model="formOpen" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="分配账号">
|
|
|
<el-button @click="addQwUserTow">添加</el-button>
|
|
|
<el-row :gutter="24" v-for="(item, index) in formOpen.qwUser" style="margin-top: 5px">
|
|
|
<el-col :span="5">
|
|
|
<el-select v-model="item.intention" placeholder="意向等级" filterable clearable>
|
|
|
- <el-option v-for="item in levelList" :label="item.dictLabel" :value="item.dictLabel"/>
|
|
|
+ <el-option v-for="item in levelList" :label="item.dictLabel" :value="item.dictValue"/>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
<el-col :span="5">
|
|
|
<el-button @click="openQwUserSelectTow(index)">
|
|
|
- 选择企微({{ item.companyUserId ? item.companyUserId.length : 0 }})
|
|
|
+ 选择企微({{ item.qwUserId ? item.qwUserId.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-option v-for="item in dialogList" :label="item.name" :value="item.id"/>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
@@ -417,8 +374,8 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitFormTow">确 定</el-button>
|
|
|
- <el-button @click="openAdd = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -436,15 +393,12 @@ import {
|
|
|
statusList,
|
|
|
startRobotic,
|
|
|
stopRobotic,
|
|
|
- addScheme,
|
|
|
companyUserList,
|
|
|
wxList,
|
|
|
getTypes
|
|
|
} from "@/api/company/companyVoiceRobotic";
|
|
|
-import { listAiobBaiduTask, getAiobBaiduTask, delAiobBaiduTask, addAiobBaiduTask, updateAiobBaiduTask, exportAiobBaiduTask } from "@/api/aiob/AiobBaiduTask";
|
|
|
-import {listAll} from '@/api/company/wxDialog';
|
|
|
+import { listAll } from '@/api/company/wxDialog';
|
|
|
import customerSelect from '@/views/crm/components/CustomerSelect.vue';
|
|
|
-import {robotList} from '@/api/aiob/AiobBaiduTask';
|
|
|
import qwUserSelect from '@/views/components/QwUserSelect.vue';
|
|
|
import customerDetails from "@/views/crm/components/customerDetails.vue";
|
|
|
import {clearTime} from "element-ui";
|
|
@@ -460,14 +414,13 @@ export default {
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
weekList: [
|
|
|
- {label: "节假日", value: "99"},
|
|
|
- {label: "星期一", value: "1"},
|
|
|
- {label: "星期二", value: "2"},
|
|
|
- {label: "星期三", value: "3"},
|
|
|
- {label: "星期四", value: "4"},
|
|
|
- {label: "星期五", value: "5"},
|
|
|
- {label: "星期六", value: "6"},
|
|
|
- {label: "星期日", value: "0"},
|
|
|
+ {label: "星期一", value: 1},
|
|
|
+ {label: "星期二", value: 2},
|
|
|
+ {label: "星期三", value: 3},
|
|
|
+ {label: "星期四", value: 4},
|
|
|
+ {label: "星期五", value: 5},
|
|
|
+ {label: "星期六", value: 6},
|
|
|
+ {label: "星期日", value: 0},
|
|
|
],
|
|
|
// 非单个禁用
|
|
|
single: true,
|
|
@@ -529,7 +482,7 @@ export default {
|
|
|
list: [],
|
|
|
loading: false,
|
|
|
total: 0,
|
|
|
- queryParams: {
|
|
|
+ queryParams:{
|
|
|
id: null,
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
@@ -540,7 +493,7 @@ export default {
|
|
|
list: [],
|
|
|
loading: false,
|
|
|
total: 0,
|
|
|
- queryParams: {
|
|
|
+ queryParams:{
|
|
|
id: null,
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
@@ -551,8 +504,9 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- robotList().then(e => {
|
|
|
- this.robotList = e.data;
|
|
|
+ getTypes().then(e => {
|
|
|
+ this.robotList = e.robot;
|
|
|
+ this.dialogList = e.dialog;
|
|
|
})
|
|
|
listAll().then(e => {
|
|
|
this.wxDialogList = e.data;
|
|
@@ -569,19 +523,20 @@ export default {
|
|
|
/** 查询机器人外呼任务列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listAiobBaiduTask(this.queryParams).then(response => {
|
|
|
+ listRobotic(this.queryParams).then(response => {
|
|
|
this.roboticList = response.rows;
|
|
|
this.roboticList.forEach(e => {
|
|
|
- if (e.weekDay1) {
|
|
|
+ if(e.weekDay1){
|
|
|
e.weekDay = e.weekDay1.split(",")
|
|
|
}
|
|
|
})
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
+ this.updateStatusFun();
|
|
|
});
|
|
|
},
|
|
|
- updateStatusFun() {
|
|
|
- if (!this.roboticList) {
|
|
|
+ updateStatusFun(){
|
|
|
+ if(!this.roboticList){
|
|
|
return;
|
|
|
}
|
|
|
this.loadingStatus = true;
|
|
@@ -618,7 +573,6 @@ export default {
|
|
|
endTime2: null,
|
|
|
createTime: null,
|
|
|
qwUser: [],
|
|
|
- forbidDialDate: [],
|
|
|
createUser: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
@@ -649,7 +603,7 @@ export default {
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
const id = row.id || this.ids
|
|
|
- getAiobBaiduTask(id).then(response => {
|
|
|
+ getRobotic(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改机器人外呼任务";
|
|
@@ -659,23 +613,20 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- // if(this.form.forbidDialDateArr && this.form.forbidDialDateArr.length > 0) {
|
|
|
- // this.form.forbidDialDate = this.form.forbidDialDateArr.join();
|
|
|
- // }
|
|
|
+ if (this.form.weekDay && this.form.weekDay.length > 0) {
|
|
|
+ this.form.weekDay1 = this.form.weekDay.join(",")
|
|
|
+ }
|
|
|
let list = [];
|
|
|
this.form.qwUser.forEach(l => {
|
|
|
- list = list.concat(l.companyUserId.map(e => {
|
|
|
- return {intention: l.intention, companyUserId: e, wxDialogId: l.wxDialogId}
|
|
|
- }))
|
|
|
+ list = list.concat(l.companyUserId.map(e => {return {intention: l.intention, companyUserId: e,wxDialogId: l.wxDialogId}}))
|
|
|
})
|
|
|
this.form.qwUserList = list;
|
|
|
- if (!this.form.qwUserList || this.form.qwUserList.length == 0) {
|
|
|
+ if(!this.form.qwUserList || this.form.qwUserList.length == 0){
|
|
|
this.msgError("请选者加微方案");
|
|
|
return;
|
|
|
}
|
|
|
- console.info(this.form)
|
|
|
if (this.form.id != null) {
|
|
|
- updateAiobBaiduTask(this.form).then(response => {
|
|
|
+ updateRobotic(this.form).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
this.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
@@ -683,7 +634,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
- addAiobBaiduTask(this.form).then(response => {
|
|
|
+ addRobotic(this.form).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
@@ -694,27 +645,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- /** 提交按钮 */
|
|
|
- submitFormTow() {
|
|
|
- let list = [];
|
|
|
- this.formOpen.qwUser.forEach(l => {
|
|
|
- list = list.concat(l.companyUserId.map(e => {
|
|
|
- return {intention: l.intention, companyUserId: e, wxDialogId: l.wxDialogId}
|
|
|
- }))
|
|
|
- })
|
|
|
- this.formOpen.qwUserList = list;
|
|
|
- if (!this.formOpen.qwUserList || this.formOpen.qwUserList.length == 0) {
|
|
|
- this.msgError("请选者加微方案");
|
|
|
- return;
|
|
|
- }
|
|
|
- addScheme(this.formOpen).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
@@ -766,9 +696,9 @@ export default {
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
selectQwUserFunTow(e) {
|
|
|
- console.info(this.formOpen.qwUser[this.thisQwUserIndex])
|
|
|
+ console.info(e)
|
|
|
+ console.info(this.thisQwUserIndex)
|
|
|
this.formOpen.qwUser[this.thisQwUserIndex].companyUserId = e.ids;
|
|
|
- console.info(this.formOpen)
|
|
|
this.selectQwUserList[this.thisQwUserIndex] = e.rows;
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
@@ -777,7 +707,7 @@ export default {
|
|
|
this.selectQwUserList[this.thisQwUserIndex] = e.rows;
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
- calleesOpen(id) {
|
|
|
+ calleesOpen(id){
|
|
|
this.callees.show = true;
|
|
|
this.callees.queryParams.id = id;
|
|
|
this.getCalleesList();
|
|
@@ -790,7 +720,7 @@ export default {
|
|
|
this.callees.loading = false;
|
|
|
});
|
|
|
},
|
|
|
- wxOpen(id) {
|
|
|
+ wxOpen(id){
|
|
|
this.wx.show = true;
|
|
|
this.wx.queryParams.id = id;
|
|
|
this.getWxList();
|
|
@@ -804,32 +734,32 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
openCustomer(id) {
|
|
|
- this.customerDetailShow = true;
|
|
|
+ this.customerDetailShow=true;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.customerDetails.getDetails(id);
|
|
|
})
|
|
|
},
|
|
|
- startRoboticFun(id) {
|
|
|
+ startRoboticFun(id){
|
|
|
startRobotic(id).then(e => {
|
|
|
this.updateStatusFun();
|
|
|
})
|
|
|
},
|
|
|
- stopRoboticFun(id) {
|
|
|
+ stopRoboticFun(id){
|
|
|
stopRobotic(id).then(e => {
|
|
|
this.updateStatusFun();
|
|
|
})
|
|
|
},
|
|
|
- addQwUserTow(row) {
|
|
|
+ addQwUserTow(row){
|
|
|
this.formOpen.qwUser.push({});
|
|
|
},
|
|
|
- addRoboticFun(row) {
|
|
|
+ addRoboticFun(row){
|
|
|
this.openAdd = true;
|
|
|
- this.formOpen = {id: row.id, qwUser: []};
|
|
|
+ this.formOpen = {roboticId: row.id, qwUser: []};
|
|
|
},
|
|
|
- addQwUser() {
|
|
|
+ addQwUser(){
|
|
|
this.form.qwUser.push({});
|
|
|
},
|
|
|
- removeQwUser(index) {
|
|
|
+ removeQwUser(index){
|
|
|
this.form.qwUser.splice(index, 1)
|
|
|
}
|
|
|
}
|