csm xiugai

master
2358328281@qq.com 6 days ago
parent d3943a3755
commit d3248a3dae

@ -145,6 +145,7 @@ export default {
maintenanceEndDate: 'Maintenance End Date', maintenanceEndDate: 'Maintenance End Date',
manager: 'Account Manager', manager: 'Account Manager',
acceptanceReport: 'Acceptance Report', acceptanceReport: 'Acceptance Report',
acceptanceReportTip: 'Support uploading PDF format files (required)',
account: 'Account', account: 'Account',
accountType: 'Account Type', accountType: 'Account Type',
password: 'Password', password: 'Password',

@ -145,6 +145,7 @@ export default {
maintenanceEndDate: '维保截止时间', maintenanceEndDate: '维保截止时间',
manager: '客户经理', manager: '客户经理',
acceptanceReport: '验收报告', acceptanceReport: '验收报告',
acceptanceReportTip: '支持上传PDF格式文件必填',
account: '账号', account: '账号',
accountType: '账号类型', accountType: '账号类型',
password: '密码', password: '密码',

@ -145,6 +145,7 @@ export default {
maintenanceEndDate: '維保截止時間', maintenanceEndDate: '維保截止時間',
manager: '客戶經理', manager: '客戶經理',
acceptanceReport: '驗收報告', acceptanceReport: '驗收報告',
acceptanceReportTip: '支援上傳PDF格式檔案必填',
account: '帳號', account: '帳號',
accountType: '帳號類型', accountType: '帳號類型',
password: '密碼', password: '密碼',

@ -101,7 +101,7 @@
> >
<el-button type="primary" plain>{{ $t('btn.upload') }}</el-button> <el-button type="primary" plain>{{ $t('btn.upload') }}</el-button>
<template #tip> <template #tip>
<div class="el-upload__tip">{{ $t('label.acceptanceReport') }} (.pdf)</div> <div class="el-upload__tip">{{ $t('label.acceptanceReportTip') }}</div>
</template> </template>
</el-upload> </el-upload>
</el-form-item> </el-form-item>

@ -81,6 +81,21 @@
/> />
</div> </div>
</el-card> </el-card>
<el-dialog
v-model="previewVisible"
:title="$t('btn.preview')"
width="80%"
top="5vh"
destroy-on-close
:before-close="closePreview"
>
<iframe
v-if="previewUrl"
:src="previewUrl"
class="preview-iframe"
/>
</el-dialog>
</div> </div>
</template> </template>
@ -132,17 +147,29 @@ const goDetail = (id) => router.push(`/admin/hospitals/detail/${id}`);
const goEdit = (id) => router.push(`/admin/hospitals/edit/${id}`); const goEdit = (id) => router.push(`/admin/hospitals/edit/${id}`);
const goAdd = () => router.push("/admin/hospitals/edit"); const goAdd = () => router.push("/admin/hospitals/edit");
const previewVisible = ref(false);
const previewUrl = ref("");
const cleanupPreviewUrl = () => {
if (previewUrl.value) {
URL.revokeObjectURL(previewUrl.value);
previewUrl.value = "";
}
};
const closePreview = () => {
previewVisible.value = false;
cleanupPreviewUrl();
};
const viewReport = async (attachmentPath) => { const viewReport = async (attachmentPath) => {
if (!attachmentPath) return; if (!attachmentPath) return;
const fileName = String(attachmentPath).split(/[/\\]/).pop(); const fileName = String(attachmentPath);
try { try {
const blob = await getUploadFile(fileName); const blob = await getUploadFile(fileName);
const url = URL.createObjectURL(blob); cleanupPreviewUrl();
const win = window.open(url, "_blank"); previewUrl.value = URL.createObjectURL(blob);
if (!win) { previewVisible.value = true;
ElMessage.warning($t('msg.pleaseFillRequired'));
}
setTimeout(() => URL.revokeObjectURL(url), 60_000);
} catch (e) { } catch (e) {
ElMessage.error(e?.message || $t('msg.failed')); ElMessage.error(e?.message || $t('msg.failed'));
} }
@ -160,4 +187,9 @@ onMounted(loadList);
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
.preview-iframe {
width: 100%;
height: 80vh;
border: 0;
}
</style> </style>

@ -149,6 +149,15 @@
min-width="100" min-width="100"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column
:label="$t('table.handleTime')"
prop="completedAt"
width="170"
>
<template #default="{ row }">
{{ row.completedAt || '-' }}
</template>
</el-table-column>
<el-table-column :label="$t('table.priority')" width="90"> <el-table-column :label="$t('table.priority')" width="90">
<template #default="{ row }"> <template #default="{ row }">
<el-tag :type="priorityType(row.priority)" size="small">{{ <el-tag :type="priorityType(row.priority)" size="small">{{
@ -431,7 +440,12 @@ const loadList = async () => {
const res = await getAdminOrders(params); const res = await getAdminOrders(params);
list.value = res?.list || []; list.value = res?.list || [];
list.value.forEach((item) => { list.value.forEach((item) => {
item.createdAt = item.createdAt.split("T").join(" "); if (item.createdAt) {
item.createdAt = item.createdAt.split("T").join(" ");
}
if (item.completedAt) {
item.completedAt = item.completedAt.split("T").join(" ");
}
}); });
total.value = res?.total || 0; total.value = res?.total || 0;
parseStats(res); parseStats(res);

Loading…
Cancel
Save