|
@@ -57,12 +57,30 @@
|
|
|
<el-table :data="tableData.data">
|
|
<el-table :data="tableData.data">
|
|
|
<el-table-column label="责任书名称" prop="responsibilityName" width="180" />
|
|
<el-table-column label="责任书名称" prop="responsibilityName" width="180" />
|
|
|
<el-table-column label="状态" prop="statusName" width="100" />
|
|
<el-table-column label="状态" prop="statusName" width="100" />
|
|
|
- <el-table-column label="类别名称" prop="departmentName" />
|
|
|
|
|
- <el-table-column label="分组名称" prop="userGroupName" />
|
|
|
|
|
|
|
+ <el-table-column label="类别名称" prop="departmentName" width="200"/>
|
|
|
|
|
+ <el-table-column label="分组名称" prop="userGroupName" width="200"/>
|
|
|
|
|
+ <el-table-column label="责任人姓名" prop="responsiblePersonName" width="200"/>
|
|
|
|
|
+ <el-table-column label="是否并签" prop="signConfigName" width="200"/>
|
|
|
|
|
+ <el-table-column label="责任书文档" width="200">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <div class="file-list" v-if="scope.row.attachment.length > 0">
|
|
|
|
|
+ <div v-for="file in scope.row.attachment" :key="file.fileId" class="file-item">
|
|
|
|
|
|
|
|
- <el-table-column label="责任人姓名" prop="responsiblePersonName" />
|
|
|
|
|
- <el-table-column label="是否并签" prop="signConfigName" />
|
|
|
|
|
- <el-table-column label="计划完成时间" prop="planEndTime" />
|
|
|
|
|
|
|
+ <div class="file-info" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name file-container--div__name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <img
|
|
|
|
|
+ class="file-container--div__download"
|
|
|
|
|
+ :src="DownloadIcon"
|
|
|
|
|
+ @click="downloadFile(file.fileUrl, file.fileName)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="计划完成时间" width="160" prop="planEndTime" />
|
|
|
|
|
+ <el-table-column label="当前节点" prop="nodeDescription" width="200"/>
|
|
|
<el-table-column fixed="right" width="200" label="操作">
|
|
<el-table-column fixed="right" width="200" label="操作">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
@@ -110,6 +128,7 @@
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</main>
|
|
</main>
|
|
|
|
|
+ <PreviewOnline ref="previewOnlineRef" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
@@ -126,10 +145,12 @@
|
|
|
safetyResponsibilityAdminDeleteIssuedObject,
|
|
safetyResponsibilityAdminDeleteIssuedObject,
|
|
|
safetyResponsibilityAdminScrap,
|
|
safetyResponsibilityAdminScrap,
|
|
|
} from '@/api/production-safety/responsibility-implementation';
|
|
} from '@/api/production-safety/responsibility-implementation';
|
|
|
|
|
+ import DownloadIcon from '@/views/disaster/disaster-control/src/svg/download.svg';
|
|
|
|
|
+ import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
|
|
|
import { downloadByData } from '@/utils/file/download';
|
|
import { downloadByData } from '@/utils/file/download';
|
|
|
import { unformatAttachment } from '@/components/UploadFiles/utils';
|
|
import { unformatAttachment } from '@/components/UploadFiles/utils';
|
|
|
import { downloadFile } from '@/views/disaster/utils';
|
|
import { downloadFile } from '@/views/disaster/utils';
|
|
|
-
|
|
|
|
|
|
|
+ import { FILE_TYPE_ICON } from '@/components/UploadFiles/constants';
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
const activeTab = ref<any>(route.query.status ? Number(route.query.status) : '');
|
|
const activeTab = ref<any>(route.query.status ? Number(route.query.status) : '');
|
|
@@ -189,6 +210,14 @@
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ // 预览
|
|
|
|
|
+ const previewOnlineRef = ref<InstanceType<typeof PreviewOnline>>();
|
|
|
|
|
+ const previewOnline = (url: string | undefined, type: keyof typeof FILE_TYPE_ICON) => {
|
|
|
|
|
+ if (url) {
|
|
|
|
|
+ previewOnlineRef.value?.open(url, type);
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
// const handleExport = () => {
|
|
// const handleExport = () => {
|
|
|
// safetyResponsibilityAdminExportIssuedObject({
|
|
// safetyResponsibilityAdminExportIssuedObject({
|
|
|
// ...omit(queryParams.queryParam, 'date'),
|
|
// ...omit(queryParams.queryParam, 'date'),
|
|
@@ -227,6 +256,10 @@
|
|
|
: undefined,
|
|
: undefined,
|
|
|
},
|
|
},
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
|
+
|
|
|
|
|
+ res.pages.records.forEach((item:any)=>{
|
|
|
|
|
+ item.attachment = JSON.parse(item.attachment) || []
|
|
|
|
|
+ })
|
|
|
tableData.data = res.pages.records;
|
|
tableData.data = res.pages.records;
|
|
|
tableData.total = res.pages.totalPage;
|
|
tableData.total = res.pages.totalPage;
|
|
|
Object.keys(detailData).forEach((item) => {
|
|
Object.keys(detailData).forEach((item) => {
|
|
@@ -234,7 +267,7 @@
|
|
|
detailData[item] = res[item];
|
|
detailData[item] = res[item];
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- console.log(detailData);
|
|
|
|
|
|
|
+ console.log(tableData.data)
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
const handleRestParams = () => {
|
|
const handleRestParams = () => {
|
|
@@ -360,4 +393,30 @@
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
color: rgba(0, 0, 0, 0.85);
|
|
color: rgba(0, 0, 0, 0.85);
|
|
|
}
|
|
}
|
|
|
|
|
+ .file-item {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+ .file-info{
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 28px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+ .file-name {
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ max-width: 100px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .file-container--div__download {
|
|
|
|
|
+ width: 28px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|