|
@@ -33,7 +33,11 @@
|
|
|
type="primary"
|
|
|
class="ml8"
|
|
|
@click="recordFile(state.ruleForm)"
|
|
|
- v-if="state.ruleForm?.recordingAbsolutePath"
|
|
|
+ v-if="
|
|
|
+ ['ZiGong'].includes(themeConfig.appScope)
|
|
|
+ ? state.ruleForm?.recordingAbsolutePath && userInfos.isCenter
|
|
|
+ : state.ruleForm?.recordingAbsolutePath
|
|
|
+ "
|
|
|
>录音文件</el-button
|
|
|
>
|
|
|
</el-form-item>
|
|
@@ -113,6 +117,8 @@
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
</el-dialog>
|
|
|
+ <!-- 播放录音 -->
|
|
|
+ <play-record ref="playRecordRef" />
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts" name="orderDetail">
|
|
@@ -121,9 +127,13 @@ import { transformFile } from '@/utils/tools';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
import { formatDate } from '@/utils/formatTime';
|
|
|
import { getJudicial } from '@/api/judicial/order';
|
|
|
+import { useUserInfo } from '@/stores/userInfo';
|
|
|
+import { useThemeConfig } from '@/stores/themeConfig';
|
|
|
+import { storeToRefs } from 'pinia';
|
|
|
|
|
|
// 引入组件
|
|
|
const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue')); // 附件列表
|
|
|
+const PlayRecord = defineAsyncComponent(() => import('@/components/PlayRecord/index.vue')); // 播放录音
|
|
|
|
|
|
type ButtonType = '' | 'default' | 'success' | 'warning' | 'info' | 'text' | 'primary' | 'danger';
|
|
|
const props = defineProps({
|
|
@@ -142,6 +152,10 @@ const props = defineProps({
|
|
|
|
|
|
// 定义子组件向父组件传值/事件
|
|
|
const emit = defineEmits(['updateList']);
|
|
|
+const storesUserInfo = useUserInfo();
|
|
|
+const storesThemeConfig = useThemeConfig();
|
|
|
+const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
|
+const { userInfos } = storeToRefs(storesUserInfo); // 用户信息
|
|
|
// 定义变量内容
|
|
|
const state = reactive<any>({
|
|
|
dialogVisible: false, // 弹窗显示隐藏
|
|
@@ -199,6 +213,11 @@ const closeDialog = () => {
|
|
|
const onOrderDetail = () => {
|
|
|
openDialog(props.order);
|
|
|
};
|
|
|
+// 查看录音文件 播放录音
|
|
|
+const playRecordRef = ref<RefType>();
|
|
|
+const recordFile = (obj: any) => {
|
|
|
+ playRecordRef.value.openDialog(obj.callId);
|
|
|
+};
|
|
|
// 暴露变量
|
|
|
defineExpose({
|
|
|
openDialog,
|