diff --git a/package.json b/package.json index 2f57a34..8f79aa2 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,11 @@ "image-conversion": "2.1.1", "js-cookie": "3.0.5", "jsencrypt": "3.3.2", + "mitt": "^3.0.1", "nprogress": "0.2.0", "pinia": "2.2.6", "screenfull": "6.0.2", + "spark-md5": "^3.0.2", "vue": "3.5.13", "vue-cropper": "1.1.1", "vue-i18n": "10.0.5", diff --git a/src/App.vue b/src/App.vue index 3c662b1..3bd9f2e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,7 +9,6 @@ import useSettingsStore from '@/store/modules/settings'; import { handleThemeStyle } from '@/utils/theme'; import useAppStore from '@/store/modules/app'; import { getProjectTeam } from './utils/projectTeam'; -import { useUserStore } from '@/store/modules/user'; const appStore = useAppStore(); onMounted(() => { diff --git a/src/api/safety/documentSafetyMeeting/index.ts b/src/api/safety/documentSafetyMeeting/index.ts new file mode 100644 index 0000000..8ed5baf --- /dev/null +++ b/src/api/safety/documentSafetyMeeting/index.ts @@ -0,0 +1,87 @@ +import request from '@/utils/request'; +import { + documentSafetyMeetingListFile, + documentSafetyMeetingListFolder, + documentSafetyMeetingListQuery, + documentSafetyMeetingListVo, + documentRecycleBinListQuery, + documentRecycleBinListVO +} from './type'; +import { AxiosPromise } from 'axios'; +// 查询安全会议结构 +export function documentCompletionTreeStructure(query: object) { + return request({ + url: '/safety/documentSafetyMeeting/list', + method: 'get', + params: query + }); +} +// 查询安全会议文件列表 +export function documentCompletionList(query: documentSafetyMeetingListQuery): AxiosPromise { + return request({ + url: '/safety/documentSafetyMeeting/list', + method: 'get', + params: query + }); +} +// 安全会议添加 +export function documentCompletionAdd(data: documentSafetyMeetingListFile) { + return request({ + url: '/safety/documentSafetyMeeting/file', + method: 'post', + data + }); +} +// 安全会议修改文件名 +export function documentCompletionEdit(query: object) { + return request({ + url: '/api/v1/system/documentSafetyMeeting/edit', + method: 'put', + params: query + }); +} +// 安全会议删除文件 +export function documentCompletionDelete(id: string) { + return request({ + url: '/safety/documentSafetyMeeting/' + id, + method: 'delete' + }); +} +// 安全会议获取指定id信息 +export function documentCompletionGet(id: string) { + return request({ + url: '/safety/documentSafetyMeeting/' + id, + method: 'get' + }); +} +// 新建文件夹 +export function newFolder(data: documentSafetyMeetingListFolder): AxiosPromise { + return request({ + url: '/safety/documentSafetyMeeting/folder', + method: 'post', + data + }); +} +// 单文件下载 +export function uniFileDownload(query: object) { + return request({ + url: '/api/v1/system/documentSafetyMeeting/safetyDataUniFileDownload', + method: 'get', + params: query + }); +} +// 回收站恢复 +export function completionDataRecyclingStation(id: string[]) { + return request({ + url: '/safety/documentSafetyMeeting/recovery/' + id, + method: 'put' + }); +} +// 回收站列表数据 +export function documentRecycleBinList(query: documentRecycleBinListQuery): AxiosPromise { + return request({ + url: '/safety/documentSafetyMeeting/recycleBin/list', + method: 'get', + params: { ...query, fileType: '2' } + }); +} diff --git a/src/api/safety/documentSafetyMeeting/type.ts b/src/api/safety/documentSafetyMeeting/type.ts new file mode 100644 index 0000000..0ea3ca9 --- /dev/null +++ b/src/api/safety/documentSafetyMeeting/type.ts @@ -0,0 +1,61 @@ +export interface documentSafetyMeetingListFolder { + //新增文件夹 + projectId: string; + pid?: string; + fileName: string; + remark?: string; +} + +export interface documentSafetyMeetingListFile { + //新增文件 + file: any; + req?: reqQuery; +} + +export interface reqQuery { + projectId: string; + pid?: string; +} + +export interface documentSafetyMeetingListQuery { + projectId: string; + pid?: string; + //1文件 2文件夹 3图片 + fileType?: string; +} + +export interface documentSafetyMeetingListVo { + projectId: string; + id: string; + pid: string; + fileName: string; + fileStatus?: string; + filePath: string; + fileSuffix: string; + originalName: string; + remark?: string; + //1文件 2文件夹 3图片 + fileType?: string; +} + +export interface documentRecycleBinListQuery { + projectId: string; + pid?: string; + fileType?: string; + pageSize?: number; + pageNum?: number; + orderByColumn?: string; + isAsc?: string; +} + +export interface documentRecycleBinListVO { + id: string; + projectId: string; + pid?: string; + fileName?: string; + filePath?: number; + fileSuffix?: number; + fileStatus?: string; + originalName?: string; + remark?: string; +} diff --git a/src/api/safety/safetyLog/types.ts b/src/api/safety/safetyLog/types.ts index ae9da3f..3eb029e 100644 --- a/src/api/safety/safetyLog/types.ts +++ b/src/api/safety/safetyLog/types.ts @@ -102,6 +102,7 @@ export interface SafetyLogForm extends BaseEntity { * 主键id */ id?: string | number; + creatorName?: string; /** * 项目id @@ -189,6 +190,7 @@ export interface SafetyLogQuery extends PageQuery { * 项目id */ projectId?: string | number; + creatorName?: string; /** * 发生日期 diff --git a/src/api/safety/teamMeeting/types.ts b/src/api/safety/teamMeeting/types.ts index 8678f63..9ef3523 100644 --- a/src/api/safety/teamMeeting/types.ts +++ b/src/api/safety/teamMeeting/types.ts @@ -14,12 +14,12 @@ export interface TeamMeetingVO { /** * 班组 */ - team: IdAndNameVO; + teamName: IdAndNameVO; /** * 分包公司 */ - contractor: IdAndNameVO; + contractorName: IdAndNameVO; /** * 开会时间 @@ -29,7 +29,7 @@ export interface TeamMeetingVO { /** * 宣讲人 */ - compere: IdAndNameVO; + compereName: IdAndNameVO; /** * 参与人列表 diff --git a/src/assets/icons/svg/file.png b/src/assets/icons/svg/file.png new file mode 100644 index 0000000..cf70ecf Binary files /dev/null and b/src/assets/icons/svg/file.png differ diff --git a/src/assets/icons/svg/file1.png b/src/assets/icons/svg/file1.png new file mode 100644 index 0000000..eb8ff97 Binary files /dev/null and b/src/assets/icons/svg/file1.png differ diff --git a/src/main.ts b/src/main.ts index c313b10..bf82c77 100644 --- a/src/main.ts +++ b/src/main.ts @@ -25,6 +25,9 @@ import HighLight from '@highlightjs/vue-plugin'; import 'virtual:svg-icons-register'; import ElementIcons from '@/plugins/svgicon'; +//通信 +import mitt from 'mitt'; + // permission control import './permission'; @@ -55,3 +58,5 @@ app.use(plugins); directive(app); app.mount('#app'); + +app.config.globalProperties.mittBus = mitt(); diff --git a/src/store/modules/bigUpload.ts b/src/store/modules/bigUpload.ts new file mode 100644 index 0000000..4faab6c --- /dev/null +++ b/src/store/modules/bigUpload.ts @@ -0,0 +1,12 @@ +import { defineStore } from 'pinia'; + +export const bigUpload = defineStore('bigUpload', { + state: (): { panelShow: boolean } => ({ + panelShow: false + }), + actions: { + async setPanelShow(bool: boolean) { + this.panelShow = bool; + } + } +}); diff --git a/src/views/safety/documentSafetyMeeting/RecyclingStation/index.vue b/src/views/safety/documentSafetyMeeting/RecyclingStation/index.vue new file mode 100644 index 0000000..e8f9c27 --- /dev/null +++ b/src/views/safety/documentSafetyMeeting/RecyclingStation/index.vue @@ -0,0 +1,135 @@ + + + diff --git a/src/views/safety/documentSafetyMeeting/index.vue b/src/views/safety/documentSafetyMeeting/index.vue new file mode 100644 index 0000000..f14998c --- /dev/null +++ b/src/views/safety/documentSafetyMeeting/index.vue @@ -0,0 +1,524 @@ + + + diff --git a/src/views/safety/safetyInspection/component/SafetyInspectionDetailDialog.vue b/src/views/safety/safetyInspection/component/SafetyInspectionDetailDialog.vue index aa8dacb..7004a8b 100644 --- a/src/views/safety/safetyInspection/component/SafetyInspectionDetailDialog.vue +++ b/src/views/safety/safetyInspection/component/SafetyInspectionDetailDialog.vue @@ -14,7 +14,7 @@ {{ safetyInspectionDetail?.checkTime }} - {{ safetyInspectionDetail?.creatorName }} + {{ safetyInspectionDetail?.correctorName }} {{ safetyInspectionDetail?.correctorName }} {{ dayjs(safetyInspectionDetail?.rectificationDeadline).format('YYYY 年 MM 月 DD 日') }} @@ -104,6 +104,7 @@ const get = async () => { const res = await getSafetyInspection(props.safetyInspectionId); if (res.data && res.code === 200) { safetyInspectionDetail.value = res.data; + if (res.data.checkFile) { const checkFileRes = await listByIds(res.data.checkFile.split(',')); checkFileList.value = checkFileRes.data; @@ -117,6 +118,7 @@ const get = async () => { }; onMounted(() => { + console.log('🚀 ~ onMounted ~ props.safetyInspectionId:', props.safetyInspectionId); get(); }); diff --git a/src/views/safety/safetyInspection/index.vue b/src/views/safety/safetyInspection/index.vue index 1a5d85d..b949050 100644 --- a/src/views/safety/safetyInspection/index.vue +++ b/src/views/safety/safetyInspection/index.vue @@ -5,17 +5,17 @@ - + - + - + @@ -36,7 +36,7 @@ - 批量删除 + 删除 @@ -54,10 +54,10 @@ - - + + @@ -84,9 +84,7 @@ 详情 - - 修改 - + 修改 @@ -287,6 +285,7 @@ const currentSafetyInspectionId = ref(); const showDetailDialog = ref(false); const handleShowDialog = (row?: SafetyInspectionVO) => { currentSafetyInspectionId.value = row.id; + showDetailDialog.value = true; }; diff --git a/src/views/safety/safetyLog/index.vue b/src/views/safety/safetyLog/index.vue index ac94e5d..64a9e5c 100644 --- a/src/views/safety/safetyLog/index.vue +++ b/src/views/safety/safetyLog/index.vue @@ -7,6 +7,9 @@ + + + 搜索 重置 @@ -48,7 +51,7 @@ - + @@ -176,6 +179,7 @@ const initFormData: SafetyLogForm = { stoppageOrOvertime: undefined, otherCondition: undefined, fileId: undefined, + creatorName: undefined, remark: undefined }; const data = reactive>({ @@ -198,6 +202,7 @@ const data = reactive>({ stoppageOrOvertime: undefined, otherCondition: undefined, remark: undefined, + creatorName: undefined, params: {} }, rules: { diff --git a/src/views/safety/teamMeeting/component/TeamMeetingDetailDrawer.vue b/src/views/safety/teamMeeting/component/TeamMeetingDetailDrawer.vue index bac7665..ae5c13d 100644 --- a/src/views/safety/teamMeeting/component/TeamMeetingDetailDrawer.vue +++ b/src/views/safety/teamMeeting/component/TeamMeetingDetailDrawer.vue @@ -1,12 +1,12 @@