|
|
@@ -158,18 +158,21 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
v-if="scope.row.taskStatus == 0"
|
|
|
+ :loading="actionLoading[scope.row.id + '_taskRun']"
|
|
|
@click="taskRunFun(scope.row.id)"
|
|
|
>启动任务</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
v-if="scope.row.taskStatus == 1"
|
|
|
+ :loading="actionLoading[scope.row.id + '_pause']"
|
|
|
@click="handlePauseTask(scope.row)"
|
|
|
>暂停任务</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
v-if="scope.row.taskStatus == 2"
|
|
|
+ :loading="actionLoading[scope.row.id + '_resume']"
|
|
|
@click="handleResumeTask(scope.row)"
|
|
|
>继续任务</el-button>
|
|
|
<!-- <el-button
|
|
|
@@ -183,6 +186,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
v-if="statusObj.hasOwnProperty(scope.row.taskId) && (statusObj[scope.row.taskId].runningStatus == 1 || statusObj[scope.row.taskId].runningStatus == 2)"
|
|
|
+ :loading="actionLoading[scope.row.taskId + '_stop']"
|
|
|
@click="stopRoboticFun(scope.row.taskId)"
|
|
|
v-hasPermi="['system:companyVoiceRobotic:list']"
|
|
|
>停止任务</el-button>
|
|
|
@@ -190,6 +194,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
+ :loading="actionLoading[scope.row.id + '_delete']"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['system:companyVoiceRobotic:remove']"
|
|
|
>删除
|
|
|
@@ -477,89 +482,83 @@
|
|
|
/>
|
|
|
|
|
|
<el-drawer title="呼叫客户列表" size="60%" :visible.sync="callees.show" width="800px" append-to-body>
|
|
|
- <el-table v-loading="callees.loading" :data="callees.list">
|
|
|
- <el-table-column label="电话号码" align="center" prop="phone" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ scope.row.phone }}</span>
|
|
|
- <el-button
|
|
|
- v-if="scope.row.userId"
|
|
|
- icon="el-icon-search"
|
|
|
- size="mini"
|
|
|
- circle
|
|
|
- style="margin-left: 5px;"
|
|
|
- v-hasPermi="['crm:customer:queryPhone']"
|
|
|
- @click="handleQueryPhone(scope.row)"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <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-for="item in levelList" v-if="scope.row.intention == item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="呼出次数" align="right" prop="roboticCallOutCount" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.roboticCallOutCount == null ? 0 : scope.row.roboticCallOutCount }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="AI标签" align="right" prop="customerId" width="250">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-if="scope.row.tagList && scope.row.tagList.length" class="ai-tags-container">
|
|
|
- <div v-for="tag in scope.row.tagList" :key="tag.id" class="ai-tag-item">
|
|
|
- <div class="tag-main-content">
|
|
|
- <span class="tag-property-name">{{ tag.propertyName }}</span>
|
|
|
- <span class="tag-property-value">
|
|
|
- <span v-if="Array.isArray(tag.propertyValue)">{{ tag.propertyValue.join('、') }}</span>
|
|
|
- <span v-else>{{ tag.propertyValue }}</span>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div v-if="tag.intention || (tag.likeRatio !== null && tag.likeRatio !== undefined)" class="tag-meta-info">
|
|
|
- <el-tag v-if="tag.intention" size="mini" effect="plain" class="meta-tag intention-tag">
|
|
|
- <i class="el-icon-star-on"></i> {{ getIntentionText(tag.intention) }}
|
|
|
- </el-tag>
|
|
|
- <el-tag v-if="tag.likeRatio !== null && tag.likeRatio !== undefined" size="mini" type="success" effect="plain" class="meta-tag ratio-tag">
|
|
|
- <i class="el-icon-trend-chart"></i> {{ tag.likeRatio }}%
|
|
|
- </el-tag>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="callees-drawer-content">
|
|
|
+ <el-table border height="500" v-loading="callees.loading" :data="callees.list">
|
|
|
+ <el-table-column label="电话号码" align="center" prop="phone" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.phone }}</span>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.userId"
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ v-hasPermi="['crm:customer:queryPhone']"
|
|
|
+ @click="handleQueryPhone(scope.row)"
|
|
|
+ >查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <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-for="item in levelList" v-if="scope.row.intention == item.dictValue" :key="item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
+ <span v-if="!levelList.some(item => scope.row.intention == item.dictValue)">-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="呼出次数" align="center" prop="roboticCallOutCount" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.roboticCallOutCount == null ? 0 : scope.row.roboticCallOutCount }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="AI标签" align="center" prop="customerId" width="280">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.tagList && scope.row.tagList.length" class="ai-tags-container">
|
|
|
+ <div v-for="tag in scope.row.tagList" :key="tag.id" class="ai-tag-item">
|
|
|
+ <div class="tag-main-content">
|
|
|
+ <span class="tag-property-name">{{ tag.propertyName }}</span>
|
|
|
+ <span class="tag-property-value">
|
|
|
+ <span v-if="Array.isArray(tag.propertyValue)">{{ tag.propertyValue.join('、') }}</span>
|
|
|
+ <span v-else>{{ tag.propertyValue }}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div v-if="tag.intention || (tag.likeRatio !== null && tag.likeRatio !== undefined)" class="tag-meta-info">
|
|
|
+ <el-tag v-if="tag.intention" size="mini" effect="plain" class="meta-tag intention-tag">
|
|
|
+ <i class="el-icon-star-on"></i> {{ getIntentionText(tag.intention) }}
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-if="tag.likeRatio !== null && tag.likeRatio !== undefined" size="mini" type="success" effect="plain" class="meta-tag ratio-tag">
|
|
|
+ <i class="el-icon-trend-chart"></i> {{ tag.likeRatio }}%
|
|
|
+ </el-tag>
|
|
|
</div>
|
|
|
- <span v-else class="no-tags">暂无标签</span>
|
|
|
- </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span v-else class="no-tags">暂无标签</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="是否添加客服" align="center" prop="isAdd">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag
|
|
|
- :type="scope.row.isAdd === 1 ? 'success' : 'info'"
|
|
|
- :style="{
|
|
|
- backgroundColor: scope.row.isAdd === 1 ? '#67C23A' : '#909399',
|
|
|
- color: '#fff',
|
|
|
- border: 'none'
|
|
|
- }"
|
|
|
- >
|
|
|
- {{ scope.row.isAdd === 1 ? '已添加' : '未添加' }}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
+ <el-table-column label="是否添加客服" align="center" prop="isAdd" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag :type="scope.row.isAdd === 1 ? 'success' : 'info'">
|
|
|
+ {{ scope.row.isAdd === 1 ? '已添加' : '未添加' }}
|
|
|
+ </el-tag>
|
|
|
+ </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="openCustomer(scope.row.userId,scope.row.idToString,scope.row.roboticId)"
|
|
|
- >客户信息详情</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"
|
|
|
- />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="openCustomer(scope.row.userId,scope.row.idToString,scope.row.roboticId)"
|
|
|
+ >客户信息详情</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"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</el-drawer>
|
|
|
<el-drawer title="加个微详情" size="60%" :visible.sync="wx.show" append-to-body>
|
|
|
<el-table v-loading="wx.loading" :data="wx.list">
|
|
|
@@ -940,6 +939,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
submitFormLoading:false,
|
|
|
+ actionLoading: {},
|
|
|
taskType:1,
|
|
|
taskTypeList:[{id:1,name:"普通任务"},{id:2,name:"场景任务"}],
|
|
|
currentCompanyId:null,
|
|
|
@@ -1383,16 +1383,20 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
+ const key = row.id + '_delete';
|
|
|
this.$confirm('是否确认删除机器人外呼任务编号为"' + ids + '"的数据项?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
- }).then(function () {
|
|
|
+ }).then(() => {
|
|
|
+ this.$set(this.actionLoading, key, true);
|
|
|
return delRobotic(ids);
|
|
|
}).then(() => {
|
|
|
this.getList();
|
|
|
this.msgSuccess("删除成功");
|
|
|
}).catch(function () {
|
|
|
+ }).finally(() => {
|
|
|
+ this.$set(this.actionLoading, key, false);
|
|
|
});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
@@ -1498,40 +1502,56 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
taskRunFun(id){
|
|
|
+ const key = id + '_taskRun';
|
|
|
+ this.$set(this.actionLoading, key, true);
|
|
|
taskRun({id}).then(e => {
|
|
|
this.getList();
|
|
|
- })
|
|
|
+ }).finally(() => {
|
|
|
+ this.$set(this.actionLoading, key, false);
|
|
|
+ });
|
|
|
},
|
|
|
// 暂停任务
|
|
|
handlePauseTask(row) {
|
|
|
+ const key = row.id + '_pause';
|
|
|
this.$confirm('暂停后,该任务下所有工作流将停止执行,正在进行的节点将完成当前操作后停止。确认暂停?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
+ this.$set(this.actionLoading, key, true);
|
|
|
return pauseRoboticActive({ taskId: row.id, activeType: 1 });
|
|
|
}).then(() => {
|
|
|
this.msgSuccess("暂停成功");
|
|
|
this.getList();
|
|
|
- }).catch(() => {});
|
|
|
+ }).catch(() => {}).finally(() => {
|
|
|
+ this.$set(this.actionLoading, key, false);
|
|
|
+ });
|
|
|
},
|
|
|
// 继续任务
|
|
|
handleResumeTask(row) {
|
|
|
+ const key = row.id + '_resume';
|
|
|
this.$confirm('确认继续执行该任务?恢复后工作流将继续运行。', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
+ this.$set(this.actionLoading, key, true);
|
|
|
return pauseRoboticActive({ taskId: row.id, activeType: 2 });
|
|
|
}).then(() => {
|
|
|
this.msgSuccess("继续成功");
|
|
|
this.getList();
|
|
|
- }).catch(() => {});
|
|
|
+ }).catch(() => {}).finally(() => {
|
|
|
+ this.$set(this.actionLoading, key, false);
|
|
|
+ });
|
|
|
},
|
|
|
stopRoboticFun(id){
|
|
|
+ const key = id + '_stop';
|
|
|
+ this.$set(this.actionLoading, key, true);
|
|
|
stopRobotic(id).then(e => {
|
|
|
this.updateStatusFun();
|
|
|
- })
|
|
|
+ }).finally(() => {
|
|
|
+ this.$set(this.actionLoading, key, false);
|
|
|
+ });
|
|
|
},
|
|
|
addQwUser(){
|
|
|
this.form.qwUser.push({});
|
|
|
@@ -1840,6 +1860,10 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style>
|
|
|
+.callees-drawer-content {
|
|
|
+ padding: 16px;
|
|
|
+}
|
|
|
+
|
|
|
.flow-parent{
|
|
|
display: flex;
|
|
|
flex-wrap: nowrap;
|