详情页修改
This commit is contained in:
@@ -41,7 +41,7 @@ const handleFileType = (type:string) => {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- Word 预览 -->
|
<!-- Word 预览 -->
|
||||||
<template v-if="handleFileType(previewFile?.file_type) === 'word'">
|
<template v-else-if="handleFileType(previewFile?.file_type) === 'word'">
|
||||||
<VueOfficeDocx :src="previewFile?.file_url" class="w-full items-center" />
|
<VueOfficeDocx :src="previewFile?.file_url" class="w-full items-center" />
|
||||||
</template>
|
</template>
|
||||||
<!-- Excel 预览 -->
|
<!-- Excel 预览 -->
|
||||||
@@ -49,15 +49,21 @@ const handleFileType = (type:string) => {
|
|||||||
<VueOfficeExcel :src="previewFile?.file_url" class="w-full items-center" />
|
<VueOfficeExcel :src="previewFile?.file_url" class="w-full items-center" />
|
||||||
</template>
|
</template>
|
||||||
<!-- Ppt 预览 -->
|
<!-- Ppt 预览 -->
|
||||||
<template v-if="handleFileType(previewFile?.file_type) === 'ppt'">
|
<template v-else-if="handleFileType(previewFile?.file_type) === 'ppt'">
|
||||||
<VueOfficePptx :src="previewFile?.file_url" class="w-full items-center" />
|
<VueOfficePptx :src="previewFile?.file_url" class="w-full items-center" />
|
||||||
</template>
|
</template>
|
||||||
<!-- PDF 预览 -->
|
<!-- PDF 预览 -->
|
||||||
<template v-if="handleFileType(previewFile?.file_type) === 'pdf'">
|
<template v-else-if="handleFileType(previewFile?.file_type) === 'pdf'">
|
||||||
<div class="h-[68vh]">
|
<div class="h-[68vh]">
|
||||||
<PDF :src="previewFile?.file_url" class="w-full h-full items-center" />
|
<PDF :src="previewFile?.file_url" class="w-full h-full items-center" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- 其他类型文件预览 -->
|
||||||
|
<template v-else>
|
||||||
|
<div class="flex items-center justify-center py-2">
|
||||||
|
<p>暂不支持预览该文件类型</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -256,21 +256,21 @@ const back = () => {
|
|||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
const exportFile = (type: string) => {
|
const exportFile = (type: string) => {
|
||||||
window.$message?.info('还差接口')
|
window.$message?.info('差接口')
|
||||||
if(type === 'change'){
|
// if(type === 'change'){
|
||||||
window.$message?.success('导出变更申请表成功');
|
// window.$message?.success('导出变更申请表成功');
|
||||||
}
|
// }
|
||||||
if(type === 'risk'){
|
// if(type === 'risk'){
|
||||||
window.$message?.success('导出风险检查行动项表成功');
|
// window.$message?.success('导出风险检查行动项表成功');
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
// 变更附带资料下载/一键下载
|
// 变更附带资料下载/一键下载
|
||||||
const downloadFile = (file:any,type: string) => {
|
const downloadFile = (file:any) => {
|
||||||
if(type === 'all'){
|
if(file){
|
||||||
window.$message?.info('还差接口')
|
|
||||||
}else{
|
|
||||||
downloadFileFun(file?.file_url, file?.doc_name || file?.file_name);
|
downloadFileFun(file?.file_url, file?.doc_name || file?.file_name);
|
||||||
|
}else{
|
||||||
|
window.$message?.info('差接口')
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 变更附带资料预览
|
// 变更附带资料预览
|
||||||
@@ -553,7 +553,7 @@ onMounted(() => {
|
|||||||
class="rounded-sm bg-[var(--theme-color)] px-3 py-1 text-xs font-semibold text-white"
|
class="rounded-sm bg-[var(--theme-color)] px-3 py-1 text-xs font-semibold text-white"
|
||||||
:style="{'--theme-color': themeStore.themeColor}"
|
:style="{'--theme-color': themeStore.themeColor}"
|
||||||
>变更附带资料</p>
|
>变更附带资料</p>
|
||||||
<NButton ghost size="small" class="text-xs" @click="downloadFile(null,'all')"><Icon icon="material-symbols:download" class="size-16px" />一键下载</NButton>
|
<NButton ghost size="small" class="text-xs" @click="downloadFile(null)"><Icon icon="material-symbols:download" class="size-16px" />一键下载</NButton>
|
||||||
</div>
|
</div>
|
||||||
<NTable size="small">
|
<NTable size="small">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -580,7 +580,7 @@ onMounted(() => {
|
|||||||
<td>
|
<td>
|
||||||
<div class="flex items-center justify-center gap-2">
|
<div class="flex items-center justify-center gap-2">
|
||||||
<NButton text type="primary" class="text-xs" @click="openPreview(doc)">预览</NButton>
|
<NButton text type="primary" class="text-xs" @click="openPreview(doc)">预览</NButton>
|
||||||
<NButton text type="primary" class="text-xs" @click="downloadFile(doc,'single')">下载</NButton>
|
<NButton text type="primary" class="text-xs" @click="downloadFile(doc)">下载</NButton>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Icon } from '@iconify/vue'
|
|||||||
import { useThemeStore } from '@/store/modules/theme';
|
import { useThemeStore } from '@/store/modules/theme';
|
||||||
import { useRouterPush } from '@/hooks/common/router';
|
import { useRouterPush } from '@/hooks/common/router';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { getColorWithOpacity, tagTextColor, tagBgColor, tagBorderColor, formatTimestamp } from '@/utils/common';
|
import { getColorWithOpacity, tagTextColor, tagBgColor, tagBorderColor, formatTimestamp, downloadFileFun } from '@/utils/common';
|
||||||
import { AiError, aiTypeJudge } from "@/service/api/ai";
|
import { AiError, aiTypeJudge } from "@/service/api/ai";
|
||||||
import { systemConfigApi } from '@/service/api/system';
|
import { systemConfigApi } from '@/service/api/system';
|
||||||
import { getChangeDetailApi, urgeApi } from '@/service/api/change';
|
import { getChangeDetailApi, urgeApi } from '@/service/api/change';
|
||||||
@@ -200,22 +200,21 @@ const back = () => {
|
|||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
const exportFile = (type: string) => {
|
const exportFile = (type: string) => {
|
||||||
window.$message?.info('还差接口')
|
window.$message?.info('差接口')
|
||||||
if(type === 'change'){
|
// if(type === 'change'){
|
||||||
window.$message?.success('导出变更申请表成功');
|
// window.$message?.success('导出变更申请表成功');
|
||||||
}
|
// }
|
||||||
if(type === 'risk'){
|
// if(type === 'risk'){
|
||||||
window.$message?.success('导出风险检查行动项表成功');
|
// window.$message?.success('导出风险检查行动项表成功');
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
// 变更附带资料下载/一键下载
|
// 变更附带资料下载/一键下载
|
||||||
const downloadFile = (type: string) => {
|
const downloadFile = (file: any) => {
|
||||||
window.$message?.info('还差接口')
|
if(file){
|
||||||
if(type === 'all'){
|
downloadFileFun(file?.file_url, file?.doc_name || file?.file_name);
|
||||||
window.$message?.success('打包下载全部附件');
|
|
||||||
}else{
|
}else{
|
||||||
window.$message?.success('下载当前附件成功');
|
window.$message?.info('差接口')
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 变更附带资料预览
|
// 变更附带资料预览
|
||||||
@@ -657,7 +656,7 @@ onMounted(async () => {
|
|||||||
class="rounded-sm bg-[var(--theme-color)] px-3 py-1 text-xs font-semibold text-white"
|
class="rounded-sm bg-[var(--theme-color)] px-3 py-1 text-xs font-semibold text-white"
|
||||||
:style="{'--theme-color': themeStore.themeColor}"
|
:style="{'--theme-color': themeStore.themeColor}"
|
||||||
>变更附带资料</p>
|
>变更附带资料</p>
|
||||||
<NButton ghost size="small" class="text-xs" @click="downloadFile('all')"><Icon icon="material-symbols:download" class="size-16px" />一键下载</NButton>
|
<NButton ghost size="small" class="text-xs" @click="downloadFile(null)"><Icon icon="material-symbols:download" class="size-16px" />一键下载</NButton>
|
||||||
</div>
|
</div>
|
||||||
<NTable size="small">
|
<NTable size="small">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -684,7 +683,7 @@ onMounted(async () => {
|
|||||||
<td>
|
<td>
|
||||||
<div class="flex items-center justify-center gap-2">
|
<div class="flex items-center justify-center gap-2">
|
||||||
<NButton text type="primary" class="text-xs" @click="openPreview(doc)">预览</NButton>
|
<NButton text type="primary" class="text-xs" @click="openPreview(doc)">预览</NButton>
|
||||||
<NButton text type="primary" class="text-xs" @click="downloadFile('single')">下载</NButton>
|
<NButton text type="primary" class="text-xs" @click="downloadFile(doc)">下载</NButton>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -171,21 +171,21 @@ const back = () => {
|
|||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
const exportFile = (type: string) => {
|
const exportFile = (type: string) => {
|
||||||
window.$message?.info('还差接口')
|
window.$message?.info('差接口')
|
||||||
if(type === 'change'){
|
// if(type === 'change'){
|
||||||
window.$message?.success('导出变更申请表成功');
|
// window.$message?.success('导出变更申请表成功');
|
||||||
}
|
// }
|
||||||
if(type === 'risk'){
|
// if(type === 'risk'){
|
||||||
window.$message?.success('导出风险检查行动项表成功');
|
// window.$message?.success('导出风险检查行动项表成功');
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
// 变更附带资料下载/一键下载
|
// 变更附带资料下载/一键下载
|
||||||
const downloadFile = (file:any,type: string) => {
|
const downloadFile = (file:any) => {
|
||||||
if(file){
|
if(file){
|
||||||
downloadFileFun(file?.file_url, file?.doc_name || file?.file_name);
|
downloadFileFun(file?.file_url, file?.doc_name || file?.file_name);
|
||||||
}else{
|
}else{
|
||||||
window.$message?.info('还差接口')
|
window.$message?.info('差接口')
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 变更附带资料预览
|
// 变更附带资料预览
|
||||||
@@ -441,7 +441,7 @@ onMounted(() => {
|
|||||||
class="rounded-sm bg-[var(--theme-color)] px-3 py-1 text-xs font-semibold text-white"
|
class="rounded-sm bg-[var(--theme-color)] px-3 py-1 text-xs font-semibold text-white"
|
||||||
:style="{'--theme-color': themeStore.themeColor}"
|
:style="{'--theme-color': themeStore.themeColor}"
|
||||||
>变更附带资料</p>
|
>变更附带资料</p>
|
||||||
<NButton ghost size="small" class="text-xs" @click="downloadFile(null,'all')"><Icon icon="material-symbols:download" class="size-16px" />一键下载</NButton>
|
<NButton ghost size="small" class="text-xs" @click="downloadFile(null)"><Icon icon="material-symbols:download" class="size-16px" />一键下载</NButton>
|
||||||
</div>
|
</div>
|
||||||
<NTable size="small">
|
<NTable size="small">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -468,7 +468,7 @@ onMounted(() => {
|
|||||||
<td>
|
<td>
|
||||||
<div class="flex items-center justify-center gap-2">
|
<div class="flex items-center justify-center gap-2">
|
||||||
<NButton text type="primary" class="text-xs" @click="openPreview(doc)">预览</NButton>
|
<NButton text type="primary" class="text-xs" @click="openPreview(doc)">预览</NButton>
|
||||||
<NButton text type="primary" class="text-xs" @click="downloadFile(doc,'single')">下载</NButton>
|
<NButton text type="primary" class="text-xs" @click="downloadFile(doc)">下载</NButton>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ const approvalChain = computed(() => {
|
|||||||
|
|
||||||
// 下载
|
// 下载
|
||||||
const download = async () => {
|
const download = async () => {
|
||||||
|
window.$message?.info('差接口');
|
||||||
}
|
}
|
||||||
// 重新生成:AI 调用逻辑由各标签页组件实现(按 type 分发),此处仅派发事件
|
// 重新生成:AI 调用逻辑由各标签页组件实现(按 type 分发),此处仅派发事件
|
||||||
const regenerate = async () => {
|
const regenerate = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user