|
@@ -117,9 +117,7 @@ import type { FormInstance } from 'element-plus';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
import { downloadFileByStream } from '@/utils/tools';
|
|
|
import { formatDate } from '@/utils/formatTime';
|
|
|
-import other from '@/utils/other';
|
|
|
import { fileDownload } from '@/api/public/file';
|
|
|
-import { jthsRecord } from '@/api/todo/voiceAssistant';
|
|
|
import { olaFn } from '@/utils/olaFn';
|
|
|
|
|
|
|
|
@@ -191,13 +189,7 @@ const handleQuery = () => {
|
|
|
const queryList = async () => {
|
|
|
state.loading = true;
|
|
|
try {
|
|
|
- let request = other.deepClone(state.queryParams);
|
|
|
- Reflect.deleteProperty(request, 'callTime'); // 删除无用的参数
|
|
|
|
|
|
- const { result } = await jthsRecord(request);
|
|
|
- state.tableData = result?.result ?? [];
|
|
|
- state.total = result?.total_count ?? 0;
|
|
|
- state.loading = false;
|
|
|
} catch (e) {
|
|
|
state.loading = false;
|
|
|
console.log(e);
|
|
@@ -213,43 +205,6 @@ const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
};
|
|
|
// 播放录音
|
|
|
const playRecordRef = ref<RefType>();
|
|
|
-const onPlaySoundRecording = (row: any) => {
|
|
|
- const prefix = import.meta.env.VITE_JTHS_API_URL.split(':')[0] + ':' + import.meta.env.VITE_JTHS_API_URL.split(':')[1];
|
|
|
- const suffix = row.recordUrl.split(':')[2];
|
|
|
- const url = `${prefix}:${suffix}`;
|
|
|
- if (import.meta.env.VITE_MODE_NAME !== 'YiBin') {
|
|
|
- // 测试环境
|
|
|
- playRecordRef.value.openDialog(url);
|
|
|
- } else {
|
|
|
- playRecordRef.value.openDialog(row.recordUrl);
|
|
|
- }
|
|
|
-};
|
|
|
-// 下载录音
|
|
|
-const onDownload = (row: any) => {
|
|
|
- ElMessageBox.confirm(`您确定要下载此录音吗?`, '提示', {
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- draggable: true,
|
|
|
- cancelButtonClass: 'default-button',
|
|
|
- autofocus: false,
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- const prefix = import.meta.env.VITE_JTHS_API_URL.split(':')[0] + ':' + import.meta.env.VITE_JTHS_API_URL.split(':')[1];
|
|
|
- const suffix = row.recordUrl.split(':')[2];
|
|
|
- const url = `${prefix}:${suffix}`;
|
|
|
- if (import.meta.env.VITE_MODE_NAME !== 'YiBin') {
|
|
|
- fileDownload({ path: url }).then((res: any) => {
|
|
|
- downloadFileByStream(res);
|
|
|
- });
|
|
|
- } else {
|
|
|
- fileDownload({ path: row.recordUrl }).then((res: any) => {
|
|
|
- downloadFileByStream(res);
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
-};
|
|
|
onMounted(() => {
|
|
|
// queryList();
|
|
|
});
|