zgCallLog.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. <template>
  2. <div class="tels-callLog-container layout-padding">
  3. <div class="layout-padding-auto layout-padding-view pd20">
  4. <el-tabs v-model="state.queryParams.type" @tab-change="changeTba">
  5. <el-tab-pane name="1" label="呼入列表"></el-tab-pane>
  6. <el-tab-pane name="2" label="呼出列表"></el-tab-pane>
  7. <el-tab-pane name="3" label="未接列表"></el-tab-pane>
  8. </el-tabs>
  9. <ProTable
  10. ref="proTableRef"
  11. :columns="inColumns"
  12. :data="state.tableData"
  13. @updateTable="queryList"
  14. :loading="state.loading"
  15. :pagination="false"
  16. v-if="state.queryParams.type === '1'"
  17. >
  18. <template #table-search>
  19. <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent label-minWidth="100px" inline>
  20. <el-form-item prop="FromNo">
  21. <el-input v-model="state.queryParams.FromNo" placeholder="主叫号码" clearable @keyup.enter="handleQuery" class="keyword-input" />
  22. </el-form-item>
  23. <el-form-item prop="ToNo">
  24. <el-input v-model="state.queryParams.ToNo" placeholder="被叫号码" clearable @keyup.enter="handleQuery" class="keyword-input" />
  25. </el-form-item>
  26. <el-form-item label="" label-width="">
  27. <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
  28. <el-button @click="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
  29. </el-form-item>
  30. </el-form>
  31. </template>
  32. <template #operation="{ row }">
  33. <template v-if="['1', '2'].includes(state.queryParams.type)">
  34. <el-button link type="primary" @click="onCreate(row)" title="创建失联工单" v-auth="'tels:callLog:connectOrder'" v-if="!row.orderId">
  35. 失联工单
  36. </el-button>
  37. <!-- <el-button link type="primary" @click="onConnect(row)" title="关联业务" v-auth="'tels:callLog:connect'" v-if="!row.orderId">
  38. 关联业务
  39. </el-button>-->
  40. <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.audioFile">播放录音</el-button>
  41. <el-button link type="primary" @click="onDownload(row)" title="下载录音" v-if="row.audioFile"> 下载录音 </el-button>
  42. </template>
  43. <template v-else>
  44. <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.audioFile">播放录音</el-button>
  45. <el-button link type="primary" @click="onDownload(row)" title="下载录音" v-if="row.audioFile"> 下载录音 </el-button>
  46. </template>
  47. </template>
  48. <template #title="{ row }">
  49. <order-detail :order="{...row,id: row.orderId}" @updateList="queryList">{{ row.title }}</order-detail>
  50. </template>
  51. <template #pagination>
  52. <div class="flex-end mt10">
  53. <!-- <el-button class="default-button" @click="onChangeTotal">展示总数</el-button>-->
  54. <el-pagination
  55. layout="prev, pager, next"
  56. :total="state.total"
  57. @current-change="handleCurrentChange"
  58. :page-size="state.queryParams.PageSize"
  59. :current-page="state.queryParams.PageIndex"
  60. :pager-count="5"
  61. />
  62. </div>
  63. </template>
  64. </ProTable>
  65. <ProTable
  66. ref="proTableRef"
  67. :columns="outColumns"
  68. :data="state.tableData"
  69. @updateTable="queryList"
  70. :loading="state.loading"
  71. v-if="state.queryParams.type === '2'"
  72. :pagination="false"
  73. >
  74. <template #table-search>
  75. <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent label-minWidth="100px" inline>
  76. <el-form-item prop="FromNo">
  77. <el-input v-model="state.queryParams.FromNo" placeholder="主叫号码" clearable @keyup.enter="handleQuery" class="keyword-input"/>
  78. </el-form-item>
  79. <el-form-item prop="ToNo">
  80. <el-input v-model="state.queryParams.ToNo" placeholder="被叫号码" clearable @keyup.enter="handleQuery" class="keyword-input"/>
  81. </el-form-item>
  82. <el-form-item label="" label-width="">
  83. <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
  84. <el-button @click="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
  85. </el-form-item>
  86. </el-form>
  87. </template>
  88. <template #operation="{ row }">
  89. <template v-if="['1', '2'].includes(state.queryParams.type)">
  90. <el-button link type="primary" @click="onCreate(row)" title="创建失联工单" v-auth="'tels:callLog:connectOrder'" v-if="!row.orderId">
  91. 失联工单
  92. </el-button>
  93. <!-- <el-button link type="primary" @click="onConnect(row)" title="关联业务" v-auth="'tels:callLog:connect'" v-if="!row.orderId">
  94. 关联业务
  95. </el-button>-->
  96. <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.audioFile">播放录音</el-button>
  97. <el-button link type="primary" @click="onDownload(row)" title="下载录音" v-if="row.audioFile"> 下载录音 </el-button>
  98. </template>
  99. <template v-else>
  100. <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.audioFile">播放录音</el-button>
  101. <el-button link type="primary" @click="onDownload(row)" title="下载录音" v-if="row.audioFile"> 下载录音 </el-button>
  102. </template>
  103. </template>
  104. <template #title="{ row }">
  105. <order-detail :order="{...row,id: row.orderId}" @updateList="queryList">{{ row.title }}</order-detail>
  106. </template>
  107. <template #pagination>
  108. <div class="flex-end mt10">
  109. <!-- <el-button class="default-button" @click="onChangeTotal">展示总数</el-button>-->
  110. <el-pagination
  111. layout="prev, pager, next"
  112. :total="state.total"
  113. @current-change="handleCurrentChange"
  114. :page-size="state.queryParams.PageSize"
  115. :current-page="state.queryParams.PageIndex"
  116. :pager-count="5"
  117. />
  118. </div>
  119. </template>
  120. </ProTable>
  121. <ProTable
  122. ref="proTableRef"
  123. :columns="noColumns"
  124. :data="state.tableData"
  125. @updateTable="queryList"
  126. :loading="state.loading"
  127. v-if="state.queryParams.type === '3'"
  128. :pagination="false"
  129. >
  130. <template #table-search>
  131. <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent label-minWidth="100px" inline>
  132. <el-form-item prop="FromNo">
  133. <el-input v-model="state.queryParams.FromNo" placeholder="主叫号码" clearable @keyup.enter="handleQuery" class="keyword-input"/>
  134. </el-form-item>
  135. <el-form-item prop="ToNo">
  136. <el-input v-model="state.queryParams.ToNo" placeholder="被叫号码" clearable @keyup.enter="handleQuery" class="keyword-input"/>
  137. </el-form-item>
  138. <el-form-item label="" label-width="">
  139. <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
  140. <el-button @click="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
  141. </el-form-item>
  142. </el-form>
  143. </template>
  144. <template #operation="{ row }">
  145. <template v-if="['1', '2'].includes(state.queryParams.type)">
  146. <el-button link type="primary" @click="onCreate(row)" title="创建失联工单" v-auth="'tels:callLog:connectOrder'" v-if="!row.orderId">
  147. 失联工单
  148. </el-button>
  149. <!-- <el-button link type="primary" @click="onConnect(row)" title="关联业务" v-auth="'tels:callLog:connect'" v-if="!row.orderId">
  150. 关联业务
  151. </el-button>-->
  152. <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.audioFile">播放录音</el-button>
  153. <el-button link type="primary" @click="onDownload(row)" title="下载录音" v-if="row.audioFile"> 下载录音 </el-button>
  154. </template>
  155. <template v-else>
  156. <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.audioFile">播放录音</el-button>
  157. <el-button link type="primary" @click="onDownload(row)" title="下载录音" v-if="row.audioFile"> 下载录音 </el-button>
  158. </template>
  159. </template>
  160. <template #title="{ row }">
  161. <order-detail :order="{...row,id: row.orderId}" @updateList="queryList">{{ row.title }}</order-detail>
  162. </template>
  163. <template #pagination>
  164. <div class="flex-end mt10">
  165. <!-- <el-button class="default-button" @click="onChangeTotal">展示总数</el-button>-->
  166. <el-pagination
  167. layout="prev, pager, next"
  168. :total="state.total"
  169. @current-change="handleCurrentChange"
  170. :page-size="state.queryParams.PageSize"
  171. :current-page="state.queryParams.PageIndex"
  172. :pager-count="5"
  173. />
  174. </div>
  175. </template>
  176. </ProTable>
  177. <el-drawer v-model="drawer" title="更多查询" size="500px">
  178. <el-form :model="state.queryParams" ref="drawerRuleFormRef" @submit.native.prevent label-width="100px">
  179. <el-form-item prop="TelNo" label="响应分机">
  180. <el-input v-model="state.queryParams.TelNo" placeholder="响应分机" clearable @keyup.enter="handleQuery" />
  181. </el-form-item>
  182. <el-form-item prop="crTime" label="时间段">
  183. <el-date-picker
  184. v-model="state.queryParams.crTime"
  185. type="datetimerange"
  186. unlink-panels
  187. range-separator="至"
  188. start-placeholder="开始时间"
  189. end-placeholder="挂断时间"
  190. :shortcuts="shortcuts"
  191. @change="handleQuery"
  192. value-format="YYYY-MM-DD[T]HH:mm:ss"
  193. :default-time="defaultTimeStartEnd"
  194. />
  195. </el-form-item>
  196. <el-form-item prop="Direction" v-show="['3'].includes(state.queryParams.type)" label="电话方向">
  197. <el-select v-model="state.queryParams.Direction" placeholder="电话方向" clearable class="w100" @change="handleQuery">
  198. <el-option v-for="item in state.callDirectionOption" :value="item.key" :key="item.key" :label="item.value" />
  199. </el-select>
  200. </el-form-item>
  201. <el-form-item prop="EndBy" v-show="['4'].includes(state.queryParams.type)" label="挂断状态">
  202. <el-select v-model="state.queryParams.EndBy" placeholder="挂断状态" clearable class="w100" @change="handleQuery">
  203. <el-option v-for="item in state.endByOptions" :value="item.key" :key="item.key" :label="item.value" />
  204. </el-select>
  205. </el-form-item>
  206. <el-form-item prop="UserName" v-show="['1'].includes(state.queryParams.type)" label="话务员名称">
  207. <el-input v-model="state.queryParams.UserName" placeholder="话务员名称" clearable @keyup.enter="handleQuery" />
  208. </el-form-item>
  209. <el-form-item prop="OrderNo" v-show="['0', '1'].includes(state.queryParams.type)" label="工单编码">
  210. <el-input v-model="state.queryParams.OrderNo" placeholder="工单编码" clearable @keyup.enter="handleQuery" />
  211. </el-form-item>
  212. <el-form-item prop="Title" v-show="['0', '1'].includes(state.queryParams.type)" label="工单标题">
  213. <el-input v-model="state.queryParams.Title" placeholder="工单标题" clearable @keyup.enter="handleQuery" />
  214. </el-form-item>
  215. <el-form-item prop="WaitDurationStart" v-show="['3'].includes(state.queryParams.type)" label="等待时长">
  216. <el-row :gutter="10">
  217. <el-col :span="12">
  218. <el-input placeholder="等待时长开始" v-model.number="state.queryParams.WaitDurationStart" clearable />
  219. </el-col>
  220. <el-col :span="12">
  221. <el-input placeholder="等待时长结束" v-model.number="state.queryParams.WaitDurationEnd" clearable />
  222. </el-col>
  223. </el-row>
  224. </el-form-item>
  225. </el-form>
  226. <template #footer>
  227. <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
  228. <el-button @click="resetQuery(drawerRuleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
  229. </template>
  230. </el-drawer>
  231. </div>
  232. <!-- 播放录音 -->
  233. <play-record ref="playRecordRef" />
  234. <!-- 业务关联 -->
  235. <connect-business ref="connectBusinessRef" @updateList="queryList" />
  236. </div>
  237. </template>
  238. <script lang="tsx" setup name="callLog">
  239. import { defineAsyncComponent, onMounted, reactive, ref, onActivated, onBeforeUnmount } from 'vue';
  240. import type { FormInstance } from 'element-plus';
  241. import { ElMessageBox } from 'element-plus';
  242. import { downloadFileBySrc, getNeedArr } from '@/utils/tools';
  243. import { formatDate } from '@/utils/formatTime';
  244. import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
  245. import { useRouter } from 'vue-router';
  246. import mittBus from '@/utils/mitt';
  247. import Other from '@/utils/other';
  248. import { getCallCenterCallRecord, getCallCenterCallRecordBaseData } from '@/api/callCenter';
  249. import { useThemeConfig } from '@/stores/themeConfig';
  250. import { storeToRefs } from 'pinia';
  251. // 引入组件
  252. const PlayRecord = defineAsyncComponent(() => import('@/components/PlayRecord/index.vue')); // 播放录音
  253. const ConnectBusiness = defineAsyncComponent(() => import('@/views/tels/callLog/component/Connect-business.vue')); // 关联工单还是回访
  254. const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
  255. const proTableRef = ref<RefType>(); // 表格ref
  256. // 表格配置项
  257. // 定义变量内容
  258. const state = reactive<any>({
  259. queryParams: {
  260. PageIndex: 1, // 当前页
  261. PageSize: 20, // 每页条数
  262. type: '1', // 默认呼入列表
  263. IsConnected: null, // 接通状态
  264. FromNo: null, // 主叫
  265. ToNo: null, // 被叫
  266. UserName: null, // 话务员名称
  267. TelNo: null, // 分机号
  268. EndBy: null, //挂断
  269. Direction: null, // 通话方向
  270. crTime: [], // 时间
  271. CallStartTimeStart: null,
  272. CallStartTimeEnd: null,
  273. WaitDurationStart: null,
  274. WaitDurationEnd: null,
  275. },
  276. tableData: [], // 列表数据
  277. loading: false, // 加载
  278. total: 0, // 总条数
  279. callDirection: [],
  280. onState: [],
  281. endByOptions: [],
  282. });
  283. const ruleFormRef = ref<FormInstance>(); // 表单ref
  284. const searchCol = ref(true); // 展开/收起
  285. // 展开/收起
  286. const closeSearch = () => {
  287. searchCol.value = !searchCol.value;
  288. };
  289. // 呼入列表表头(已接通)
  290. const inColumns = ref<any[]>([
  291. { prop: 'fromNo', label: '主叫号码', minWidth: 120 },
  292. { prop: 'toNo', label: '被叫号码', minWidth: 120 },
  293. { prop: 'orderNo', label: '工单编码', minWidth: 140 },
  294. { prop: 'title', label: '工单标题', minWidth: 200 },
  295. { prop: 'telNo', label: '响应分机' },
  296. { prop: 'mobileAreaName', label: '号码归属地', minWidth: 120 },
  297. { prop: 'userName', label: '话务员', minWidth: 100 },
  298. { prop: 'groupId', label: '功能组号码', minWidth: 120 },
  299. { prop: 'duration', label: '通话时间(秒)', minWidth: 110 },
  300. { prop: 'endByText', label: '挂断状态', minWidth: 100 },
  301. {
  302. prop: 'beginIvrTime',
  303. label: '开始时间',
  304. minWidth: 160,
  305. render: (scope) => <span>{formatDate(scope.row.beginIvrTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
  306. },
  307. {
  308. prop: 'answeredTime',
  309. label: '接通时间',
  310. minWidth: 160,
  311. render: (scope) => <span>{formatDate(scope.row.answeredTime, ' YYYY-mm-dd HH:MM:SS')}</span>,
  312. },
  313. { prop: 'endTime', label: '挂断时间', minWidth: 160, render: (scope) => <span>{formatDate(scope.row.endTime, 'YYYY-mm-dd HH:MM:SS')}</span> },
  314. { prop: 'operation', label: '操作', fixed: 'right', minWidth: 240, align: 'center' },
  315. ]);
  316. // 呼出列表表头(已接通)
  317. const outColumns = ref<any[]>([
  318. { prop: 'fromNo', label: '主叫号码', minWidth: 120 },
  319. { prop: 'toNo', label: '被叫号码', minWidth: 120 },
  320. { prop: 'telNo', label: '响应分机' },
  321. { prop: 'orderNo', label: '工单编码', minWidth: 140 },
  322. { prop: 'title', label: '工单标题', minWidth: 200 },
  323. { prop: 'endByText', label: '挂断状态', minWidth: 100 },
  324. { prop: 'groupId', label: '功能组号码', minWidth: 120 },
  325. { prop: 'duration', label: '通话时间(秒)', minWidth: 110 },
  326. {
  327. prop: 'beginIvrTime',
  328. label: '开始时间',
  329. minWidth: 160,
  330. render: (scope) => <span>{formatDate(scope.row.beginIvrTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
  331. },
  332. {
  333. prop: 'answeredTime',
  334. label: '接通时间',
  335. minWidth: 160,
  336. render: (scope) => <span>{formatDate(scope.row.answeredTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
  337. },
  338. { prop: 'endTime', label: '挂断时间', minWidth: 160, render: (scope) => <span>{formatDate(scope.row.endTime, 'YYYY-mm-dd HH:MM:SS')}</span> },
  339. { prop: 'operation', label: '操作', fixed: 'right', minWidth: 240, align: 'center' },
  340. ]);
  341. // 未接表头
  342. const noColumns = ref<any[]>([
  343. { prop: 'directionText', label: '呼叫方向' },
  344. { prop: 'fromNo', label: '主叫号码', minWidth: 120 },
  345. { prop: 'toNo', label: '被叫号码', minWidth: 120 },
  346. { prop: 'telNo', label: '响应分机' },
  347. { prop: 'groupId', label: '功能组号码', minWidth: 120 },
  348. {
  349. prop: 'beginIvrTime',
  350. label: '开始时间',
  351. minWidth: 160,
  352. render: (scope) => <span>{formatDate(scope.row.beginIvrTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
  353. },
  354. { prop: 'endTime', label: '挂断时间', minWidth: 160, render: (scope) => <span>{formatDate(scope.row.endTime, 'YYYY-mm-dd HH:MM:SS')}</span> },
  355. { prop: 'waitDuration', label: '等待时长(秒)', minWidth: 110 },
  356. { prop: 'operation', label: '操作', fixed: 'right', minWidth: 160, align: 'center' },
  357. ]);
  358. const changeTba = () => {
  359. ruleFormRef.value?.resetFields();
  360. drawerRuleFormRef.value?.resetFields();
  361. handleQuery();
  362. };
  363. // 手动查询,将页码设置为1
  364. const handleQuery = () => {
  365. state.queryParams.PageIndex = 1;
  366. queryIndex.value = 0;
  367. queryList(true);
  368. };
  369. // 改变页码
  370. const queryIndex = ref(0); // 数据批次
  371. const totalTable = ref([]); // 数据总数
  372. const handleCurrentChange = (val: number) => {
  373. state.queryParams.PageIndex = val;
  374. // 判断当前页是否是数据的最后一页
  375. if (val === Math.ceil(state.total / state.queryParams.PageSize)) {
  376. queryList();
  377. } else {
  378. state.tableData = getNeedArr(totalTable.value, state.queryParams.PageSize)[state.queryParams.PageIndex - 1]; //当前页的表格数据
  379. }
  380. };
  381. /** 通话记录列表 */
  382. const requestParams = ref<EmptyObjectType>({});
  383. const queryList = async (isQuery: boolean = false) => {
  384. state.loading = true;
  385. requestParams.value = Other.deepClone(state.queryParams);
  386. requestParams.value.CallStartTimeStart = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
  387. requestParams.value.CallStartTimeEnd = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
  388. Reflect.deleteProperty(requestParams.value, 'crTime'); // 通话开始和结束时间段
  389. requestParams.value.QueryIndex = queryIndex.value; // 数据批次
  390. state.loading = true;
  391. getCallCenterCallRecord(requestParams.value)
  392. .then((response: any) => {
  393. if (isQuery) {
  394. // 如果是查询
  395. totalTable.value = []; // 先清空
  396. totalTable.value = response?.result;
  397. state.total = totalTable.value.length;
  398. state.tableData = getNeedArr(totalTable.value, state.queryParams.PageSize)[state.queryParams.PageIndex - 1]; //当前页的表格数据
  399. queryIndex.value = 1;
  400. } else {
  401. if (response?.result.length) queryIndex.value++;
  402. totalTable.value = totalTable.value.concat(response?.result);
  403. state.total = totalTable.value.length;
  404. state.tableData = getNeedArr(totalTable.value, state.queryParams.PageSize)[state.queryParams.PageIndex - 1]; //当前页的表格数据
  405. }
  406. state.loading = false;
  407. })
  408. .catch(() => {
  409. state.loading = false;
  410. });
  411. };
  412. /** 重置按钮操作 */
  413. const drawer = ref(false);
  414. const drawerRuleFormRef = ref();
  415. const resetQuery = (formEl: FormInstance | undefined) => {
  416. if (!formEl) return;
  417. formEl.resetFields();
  418. queryIndex.value = 0;
  419. ruleFormRef.value?.resetFields();
  420. queryList(true);
  421. };
  422. // 播放录音
  423. const playRecordRef = ref<RefType>();
  424. const storesThemeConfig = useThemeConfig();
  425. const { themeConfig } = storeToRefs(storesThemeConfig);
  426. const onPlaySoundRecording = (val: any) => {
  427. playRecordRef.value.openDialog(val.id);
  428. };
  429. // 下载录音
  430. const onDownload = (row: any) => {
  431. ElMessageBox.confirm(`您确定要下载此录音吗?`, '提示', {
  432. confirmButtonText: '确认',
  433. cancelButtonText: '取消',
  434. type: 'warning',
  435. draggable: true,
  436. cancelButtonClass: 'default-button',
  437. autofocus: false,
  438. })
  439. .then(() => {
  440. // window.open(themeConfig.value.recordPrefix + row.audioFile);
  441. downloadFileBySrc( themeConfig.value.recordPrefix + row.audioFile, row.audioFile);
  442. })
  443. .catch(() => {});
  444. };
  445. // 失联工单
  446. const router = useRouter();
  447. const onCreate = (row: any) => {
  448. router.push({
  449. name: 'orderAccept',
  450. query: {
  451. createBy: 'tel',
  452. fromTel: row.fromNo,
  453. callId: row.id,
  454. transfer: row.toNo,
  455. telArea: '',
  456. },
  457. });
  458. };
  459. // 基础信息
  460. const getBaseData = async () => {
  461. try {
  462. const { result } = await getCallCenterCallRecordBaseData();
  463. state.callDirectionOption = result.direction;
  464. state.endByOptions = result.endBy;
  465. } catch (e) {
  466. console.log(e);
  467. }
  468. };
  469. onMounted(() => {
  470. getBaseData();
  471. queryList();
  472. });
  473. onActivated(() => {
  474. mittBus.on('clearCachePage', () => {
  475. //清除缓存
  476. queryList();
  477. });
  478. });
  479. onBeforeUnmount(() => {
  480. mittBus.off('clearCachePage');
  481. });
  482. </script>
  483. <style lang="scss" scoped>
  484. .tels-callLog-container {
  485. :deep(.pro-table-main) {
  486. height: calc(100% - 42px);
  487. }
  488. }
  489. </style>