Ver código fonte

reactor:回访详情新增回访时间;

zhangchong 5 meses atrás
pai
commit
79f94d9d7d

+ 6 - 4
src/components/PlayRecord/tableAudio.vue

@@ -1,6 +1,6 @@
 <template>
 	<el-card shadow="never" class="h100 card">
-		<audio ref="audioPlayerRef" :key="recordUrl" controls class="w100" style="height: 43px; padding: 0; margin: 0">
+		<audio ref="audioPlayerRef" :key="recordUrl" controls class="w100" style="height: 43px; padding: 0; margin: 0" preload="auto">
 			<source :src="recordUrl" type="audio/wav" />
 		</audio>
 		<el-table :data="tableData" border class="mt10">
@@ -49,9 +49,11 @@ const audioPlayerRef = ref<RefType>();
 const recordUrl = ref('');
 const onPlay = (row: any) => {
 	recordUrl.value = themeConfig.value.recordPrefix + row.audioFile;
-	setTimeout(() => {
-		audioPlayerRef.value.play();
-	}, 100);
+	if (audioPlayerRef.value) {
+		setTimeout(() => {
+			audioPlayerRef.value.play();
+		}, 100);
+	}
 };
 const storesThemeConfig = useThemeConfig();
 const { themeConfig } = storeToRefs(storesThemeConfig);

+ 2 - 0
src/utils/tools.ts

@@ -3,6 +3,7 @@ import dayjs from 'dayjs';
 import html2canvas from 'html2canvas';
 import JSPDF from 'jspdf';
 import { formatDate } from '@/utils/formatTime';
+import { ElMessage } from 'element-plus';
 /**
  * @description 防抖
  * @param func    功能函数(即要防抖的函数)
@@ -181,6 +182,7 @@ export function downloadFileBySrc(src: string, filename: string) {
 		})
 		.catch(function (error) {
 			console.log(error);
+			ElMessage.error('下载失败');
 		});
 }
 /**

+ 3 - 5
src/views/business/discern/ZGApply.vue

@@ -52,11 +52,9 @@
 				</template>
 				<!-- 表格操作 -->
 				<template #operation="{ row }">
-					<template v-if="state.queryParams.ScreenType === 1 || (!userInfos.isCenter && state.queryParams.ScreenType === 0)">
-						<el-button link type="primary" @click="submitDiscern(row)" title="发起甄别申请" v-auth="'business:discern:apply:submit'">
-							发起甄别
-						</el-button>
-					</template>
+					<el-button link type="primary" @click="submitDiscern(row)" title="发起甄别申请" v-auth="'business:discern:apply:submit'">
+						发起甄别
+					</el-button>
 					<el-button link type="primary" @click="onEditApplyTime(row)" title="修改甄别提起时限" v-auth="'business:discern:apply:editApplyTime'">
 						修改提起时限
 					</el-button>