|
@@ -47,6 +47,12 @@
|
|
|
:selected-row-keys="selectedRowKeys"
|
|
|
@select-change="selectChange"
|
|
|
>
|
|
|
+ <template #code="{ col, row }">
|
|
|
+ <more-content
|
|
|
+ :content="row[col.colKey]"
|
|
|
+ @action="handleDetail(row)"
|
|
|
+ ></more-content>
|
|
|
+ </template>
|
|
|
<template #backup-time="{ col, row }">
|
|
|
{{ timestampFilter(row[col.colKey]) }}
|
|
|
</template>
|
|
@@ -56,6 +62,13 @@
|
|
|
<template #custom-type="{ col, row }">
|
|
|
{{ customerTypeFilter(row[col.colKey]) }}
|
|
|
</template>
|
|
|
+ <template #attachmentPaths="{ col, row }">
|
|
|
+ <attachment-view
|
|
|
+ :imageList="getUrls(row[col.colKey], 'image')"
|
|
|
+ :fileList="getUrls(row[col.colKey], 'file')"
|
|
|
+ :imgSize="60"
|
|
|
+ ></attachment-view>
|
|
|
+ </template>
|
|
|
<template #operate="{ row }">
|
|
|
<div class="table-operations" @click.stop>
|
|
|
<t-link
|
|
@@ -78,6 +91,12 @@
|
|
|
</template>
|
|
|
</t-table>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- AbnormalDetailDialog -->
|
|
|
+ <abnormal-detail-dialog
|
|
|
+ v-model:visible="showAbnormalDetailDialog"
|
|
|
+ :row="curRow"
|
|
|
+ ></abnormal-detail-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -92,6 +111,7 @@ import {
|
|
|
workHoursWaitCheckAuditApi,
|
|
|
} from '@/api/work-hours';
|
|
|
import { timestampFilter, customerTypeFilter } from '@/utils/filter';
|
|
|
+import AbnormalDetailDialog from './abnormal-detail-dialog.vue';
|
|
|
import usePermission from '@/hooks/usePermission';
|
|
|
const { perm } = usePermission();
|
|
|
|
|
@@ -188,6 +208,22 @@ const computedParams = computed(() => {
|
|
|
return data;
|
|
|
});
|
|
|
|
|
|
+const getUrls = (data, type) => {
|
|
|
+ const list = data.split(',');
|
|
|
+ const imgs = ['jpg', 'png', 'jpeg'];
|
|
|
+ if (type === 'image') {
|
|
|
+ return list.filter((item) => {
|
|
|
+ const evt = item.split('.').slice(-1)[0];
|
|
|
+ return imgs.includes(evt);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return list.filter((item) => {
|
|
|
+ const evt = item.split('.').slice(-1)[0];
|
|
|
+ return !imgs.includes(evt);
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
const columns = [
|
|
|
{
|
|
|
colKey: 'row-select',
|
|
@@ -195,18 +231,22 @@ const columns = [
|
|
|
width: 50,
|
|
|
fixed: 'left',
|
|
|
},
|
|
|
+ { colKey: 'code', title: '异常编号', width: 200 },
|
|
|
{ colKey: 'serviceName', title: '服务单元', width: 140 },
|
|
|
{ colKey: 'sopNo', title: 'SOP流水号', width: 200 },
|
|
|
{ colKey: 'createRealName', title: '姓名', width: 140 },
|
|
|
{ colKey: 'supplierName', title: '供应商', width: 140 },
|
|
|
{ colKey: 'customName', title: '客户名称', width: 140 },
|
|
|
{ colKey: 'customType', title: '客户类型', cell: 'custom-type', width: 120 },
|
|
|
- { colKey: 'dingExceptionTypeStr', title: '异常类型' },
|
|
|
+ { colKey: 'dingExceptionTypeStr', title: '异常类型', width: 120 },
|
|
|
{ colKey: 'exceptionTime', title: '异常日期', width: 140 },
|
|
|
{ colKey: 'applyTime', title: '补卡时间', cell: 'backup-time', width: 180 },
|
|
|
{ colKey: 'reason', title: '理由' },
|
|
|
- // TODO:附件展示
|
|
|
- { colKey: 'attachmentPaths', title: '附件/截图' },
|
|
|
+ {
|
|
|
+ colKey: 'attachmentPaths',
|
|
|
+ title: '附件/截图',
|
|
|
+ minWidth: 240,
|
|
|
+ },
|
|
|
{ colKey: 'statusStr', title: '审核状态', width: 120 },
|
|
|
{ colKey: 'approveUserName', title: '当前审核人', width: 140 },
|
|
|
{ colKey: 'createTime', title: '申请时间', cell: 'apply-time', width: 180 },
|
|
@@ -227,6 +267,13 @@ const { pagination, tableData, fetchData, search, onChange } = useFetchTable(
|
|
|
}
|
|
|
);
|
|
|
|
|
|
+const showAbnormalDetailDialog = ref(false);
|
|
|
+const curRow = ref(null);
|
|
|
+const handleDetail = async (row) => {
|
|
|
+ curRow.value = row;
|
|
|
+ showAbnormalDetailDialog.value = true;
|
|
|
+};
|
|
|
+
|
|
|
const handleAudit = async (selectedIds, pass) => {
|
|
|
if (!selectedIds.length) {
|
|
|
MessagePlugin.error('请选择要通过的记录');
|