详情页修改

This commit is contained in:
2026-10-08 11:47:35 +08:00
parent 99ab0a1183
commit f8c25dc9b8
5 changed files with 48 additions and 43 deletions
+13 -13
View File
@@ -256,21 +256,21 @@ const back = () => {
// 导出
const exportFile = (type: string) => {
window.$message?.info('还差接口')
if(type === 'change'){
window.$message?.success('导出变更申请表成功');
}
if(type === 'risk'){
window.$message?.success('导出风险检查行动项表成功');
}
window.$message?.info('差接口')
// if(type === 'change'){
// window.$message?.success('导出变更申请表成功');
// }
// if(type === 'risk'){
// window.$message?.success('导出风险检查行动项表成功');
// }
};
// 变更附带资料下载/一键下载
const downloadFile = (file:any,type: string) => {
if(type === 'all'){
window.$message?.info('还差接口')
}else{
const downloadFile = (file:any) => {
if(file){
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"
:style="{'--theme-color': themeStore.themeColor}"
>变更附带资料</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>
<NTable size="small">
<thead>
@@ -580,7 +580,7 @@ onMounted(() => {
<td>
<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="downloadFile(doc,'single')">下载</NButton>
<NButton text type="primary" class="text-xs" @click="downloadFile(doc)">下载</NButton>
</div>
</td>
</tr>
+14 -15
View File
@@ -4,7 +4,7 @@ import { Icon } from '@iconify/vue'
import { useThemeStore } from '@/store/modules/theme';
import { useRouterPush } from '@/hooks/common/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 { systemConfigApi } from '@/service/api/system';
import { getChangeDetailApi, urgeApi } from '@/service/api/change';
@@ -200,22 +200,21 @@ const back = () => {
// 导出
const exportFile = (type: string) => {
window.$message?.info('还差接口')
if(type === 'change'){
window.$message?.success('导出变更申请表成功');
}
if(type === 'risk'){
window.$message?.success('导出风险检查行动项表成功');
}
window.$message?.info('差接口')
// if(type === 'change'){
// window.$message?.success('导出变更申请表成功');
// }
// if(type === 'risk'){
// window.$message?.success('导出风险检查行动项表成功');
// }
};
// 变更附带资料下载/一键下载
const downloadFile = (type: string) => {
window.$message?.info('还差接口')
if(type === 'all'){
window.$message?.success('打包下载全部附件');
const downloadFile = (file: any) => {
if(file){
downloadFileFun(file?.file_url, file?.doc_name || file?.file_name);
}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"
:style="{'--theme-color': themeStore.themeColor}"
>变更附带资料</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>
<NTable size="small">
<thead>
@@ -684,7 +683,7 @@ onMounted(async () => {
<td>
<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="downloadFile('single')">下载</NButton>
<NButton text type="primary" class="text-xs" @click="downloadFile(doc)">下载</NButton>
</div>
</td>
</tr>
+11 -11
View File
@@ -171,21 +171,21 @@ const back = () => {
// 导出
const exportFile = (type: string) => {
window.$message?.info('还差接口')
if(type === 'change'){
window.$message?.success('导出变更申请表成功');
}
if(type === 'risk'){
window.$message?.success('导出风险检查行动项表成功');
}
window.$message?.info('差接口')
// if(type === 'change'){
// window.$message?.success('导出变更申请表成功');
// }
// if(type === 'risk'){
// window.$message?.success('导出风险检查行动项表成功');
// }
};
// 变更附带资料下载/一键下载
const downloadFile = (file:any,type: string) => {
const downloadFile = (file:any) => {
if(file){
downloadFileFun(file?.file_url, file?.doc_name || file?.file_name);
}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"
:style="{'--theme-color': themeStore.themeColor}"
>变更附带资料</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>
<NTable size="small">
<thead>
@@ -468,7 +468,7 @@ onMounted(() => {
<td>
<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="downloadFile(doc,'single')">下载</NButton>
<NButton text type="primary" class="text-xs" @click="downloadFile(doc)">下载</NButton>
</div>
</td>
</tr>