diff --git a/package.json b/package.json index 8f79aa2..4c30110 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,10 @@ "vue-cropper": "1.1.1", "vue-i18n": "10.0.5", "vue-json-pretty": "2.4.0", + "vue-print-nb": "^1.7.5", "vue-router": "4.4.5", "vue-types": "5.1.3", + "vue3-print-nb": "^0.1.4", "vxe-table": "4.5.22" }, "devDependencies": { diff --git a/src/api/quality/qualityConstructionLog/index.ts b/src/api/quality/qualityConstructionLog/index.ts new file mode 100644 index 0000000..fbcb46c --- /dev/null +++ b/src/api/quality/qualityConstructionLog/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { QualityConstructionLogVO, QualityConstructionLogForm, QualityConstructionLogQuery } from '@/api/quality/qualityConstructionLog/types'; + +/** + * 查询质量-施工日志列表 + * @param query + * @returns {*} + */ + +export const listQualityConstructionLog = (query?: QualityConstructionLogQuery): AxiosPromise => { + return request({ + url: '/quality/qualityConstructionLog/list', + method: 'get', + params: query + }); +}; + +/** + * 查询质量-施工日志详细 + * @param id + */ +export const getQualityConstructionLog = (id: string | number): AxiosPromise => { + return request({ + url: '/quality/qualityConstructionLog/' + id, + method: 'get' + }); +}; + +/** + * 新增质量-施工日志 + * @param data + */ +export const addQualityConstructionLog = (data: QualityConstructionLogForm) => { + return request({ + url: '/quality/qualityConstructionLog', + method: 'post', + data: data + }); +}; + +/** + * 修改质量-施工日志 + * @param data + */ +export const updateQualityConstructionLog = (data: QualityConstructionLogForm) => { + return request({ + url: '/quality/qualityConstructionLog', + method: 'put', + data: data + }); +}; + +/** + * 删除质量-施工日志 + * @param id + */ +export const delQualityConstructionLog = (id: string | number | Array) => { + return request({ + url: '/quality/qualityConstructionLog/' + id, + method: 'delete' + }); +}; diff --git a/src/api/quality/qualityConstructionLog/types.ts b/src/api/quality/qualityConstructionLog/types.ts new file mode 100644 index 0000000..ab34340 --- /dev/null +++ b/src/api/quality/qualityConstructionLog/types.ts @@ -0,0 +1,84 @@ +export interface QualityConstructionLogVO { + /** + * 发生日期 + */ + happenDate: string; + id?: string | number; + projectName: string; + createTime: string; + fileList: any[]; + file?: string; + /** + * 生产情况 + */ + productionStatus: string; + + /** + * 技术质量安全工作 + */ + technologyQuality: string; + + /** + * 备注 + */ + remark: string; + + /** + * 创建者 + */ + createBy: string; +} + +export interface QualityConstructionLogForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 发生日期 + */ + happenDate?: string; + + /** + * 生产情况 + */ + productionStatus?: string; + + /** + * 技术质量安全工作 + */ + technologyQuality?: string; + + /** + * 附件 + */ + file?: string; + + /** + * 备注 + */ + remark?: string; +} + +export interface QualityConstructionLogQuery extends PageQuery { + /** + * 项目id + */ + projectId?: string | number; + + /** + * 发生日期 + */ + happenDate?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/quality/qualityInspection/index.ts b/src/api/quality/qualityInspection/index.ts new file mode 100644 index 0000000..82c8a4f --- /dev/null +++ b/src/api/quality/qualityInspection/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { QualityInspectionVO, QualityInspectionForm, QualityInspectionQuery } from '@/api/quality/qualityInspection/types'; + +/** + * 查询质量-检查工单列表 + * @param query + * @returns {*} + */ + +export const listQualityInspection = (query?: QualityInspectionQuery): AxiosPromise => { + return request({ + url: '/quality/qualityInspection/list', + method: 'get', + params: query + }); +}; + +/** + * 查询质量-检查工单详细 + * @param id + */ +export const getQualityInspection = (id: string | number): AxiosPromise => { + return request({ + url: '/quality/qualityInspection/' + id, + method: 'get' + }); +}; + +/** + * 新增质量-检查工单 + * @param data + */ +export const addQualityInspection = (data: QualityInspectionForm) => { + return request({ + url: '/quality/qualityInspection', + method: 'post', + data: data + }); +}; + +/** + * 修改质量-检查工单 + * @param data + */ +export const updateQualityInspection = (data: QualityInspectionForm) => { + return request({ + url: '/quality/qualityInspection', + method: 'put', + data: data + }); +}; + +/** + * 删除质量-检查工单 + * @param id + */ +export const delQualityInspection = (id: string | number | Array) => { + return request({ + url: '/quality/qualityInspection/' + id, + method: 'delete' + }); +}; diff --git a/src/api/quality/qualityInspection/types.ts b/src/api/quality/qualityInspection/types.ts new file mode 100644 index 0000000..39bb563 --- /dev/null +++ b/src/api/quality/qualityInspection/types.ts @@ -0,0 +1,166 @@ +export interface QualityInspectionVO { + /** + * 巡检类型 + */ + inspectionType: string; + id?: string | number; + projectName: string; + rectificationFileList: any[]; + inspectionFile: string; + correctorName: string; + replyPeriodDate: string; + rectificationTime: string; + rectificationFile: string; + verificationResult: string; + /** + * 巡检附件 + */ + /** + * 巡检标题 + */ + inspectionHeadline: string; + + /** + * 巡检结果 + */ + inspectionResult: string; + + /** + * 工单状态(1通知 2整改 3验证) + */ + inspectionStatus: string; + + /** + * 备注 + */ + remark: string; + + /** + * 创建者 + */ + createBy: string; + + /** + * 创建时间 + */ + createTime: string; +} + +export interface QualityInspectionForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 巡检类型 + */ + inspectionType?: string; + + /** + * 巡检标题 + */ + inspectionHeadline?: string; + + /** + * 巡检结果 + */ + inspectionResult?: string; + + /** + * 工单状态(1通知 2整改 3验证) + */ + inspectionStatus?: string; + + /** + * 巡检附件 + */ + inspectionFile?: string; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 整改人(班组长) + */ + corrector?: string; + + /** + * 是否回复(1回复 2不回复) + */ + isReply?: string; + + /** + * 回复期限日期 + */ + replyPeriodDate?: string; + + /** + * 整改反馈 + */ + rectificationResult?: string; + + /** + * 整改时间 + */ + rectificationTime?: string; + + /** + * 整改附件 + */ + rectificationFile?: string; + + /** + * 验证结果 + */ + verificationResult?: string; + + /** + * 验证状态(1通过 2未通过) + */ + verificationType?: string; + + /** + * 验证时间 + */ + verificationTime?: string; + + /** + * 备注 + */ + remark?: string; +} + +export interface QualityInspectionQuery extends PageQuery { + /** + * 项目id + */ + projectId?: string | number; + + /** + * 巡检类型 + */ + inspectionType?: string; + + /** + * 工单状态(1通知 2整改 3验证) + */ + inspectionStatus?: string; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/safety/questionUserAnswer/types.ts b/src/api/safety/questionUserAnswer/types.ts index 0df3cd5..b58130f 100644 --- a/src/api/safety/questionUserAnswer/types.ts +++ b/src/api/safety/questionUserAnswer/types.ts @@ -30,6 +30,7 @@ export interface QuestionUserAnswerForm extends BaseEntity { */ id?: string | number; teamId?: string | number; + userName?: string; /** * 项目id */ @@ -82,6 +83,7 @@ export interface QuestionUserAnswerQuery extends PageQuery { */ userId?: string | number; teamId?: string | number; + userName?: string; projectId?: string | number; /** * 考试类型(1线上考试 2线下考试) diff --git a/src/api/system/oss/index.ts b/src/api/system/oss/index.ts index 1141f95..3a145d4 100644 --- a/src/api/system/oss/index.ts +++ b/src/api/system/oss/index.ts @@ -29,5 +29,5 @@ export function delOss(ossId: string | number | Array) { // 下载OSS对象存储 export function downLoadOss(ossId: string | number | Array) { - return download('/safety/questionUserAnswer/exportFile', { userIdList: ossId }, '安全考试.zip'); + return download('/safety/questionUserAnswer/exportFile', { idList: ossId }, '安全考试.zip'); } diff --git a/src/assets/icons/svg/danggerVerification.png b/src/assets/icons/svg/danggerVerification.png new file mode 100644 index 0000000..5d1fcd3 Binary files /dev/null and b/src/assets/icons/svg/danggerVerification.png differ diff --git a/src/assets/icons/svg/derived.png b/src/assets/icons/svg/derived.png new file mode 100644 index 0000000..f8fe596 Binary files /dev/null and b/src/assets/icons/svg/derived.png differ diff --git a/src/assets/icons/svg/failure.png b/src/assets/icons/svg/failure.png new file mode 100644 index 0000000..624c530 Binary files /dev/null and b/src/assets/icons/svg/failure.png differ diff --git a/src/assets/icons/svg/print.png b/src/assets/icons/svg/print.png new file mode 100644 index 0000000..491310c Binary files /dev/null and b/src/assets/icons/svg/print.png differ diff --git a/src/assets/icons/svg/rectification.png b/src/assets/icons/svg/rectification.png new file mode 100644 index 0000000..ef22fa8 Binary files /dev/null and b/src/assets/icons/svg/rectification.png differ diff --git a/src/assets/icons/svg/successLogo.png b/src/assets/icons/svg/successLogo.png new file mode 100644 index 0000000..4116f4b Binary files /dev/null and b/src/assets/icons/svg/successLogo.png differ diff --git a/src/assets/icons/svg/successVerification.png b/src/assets/icons/svg/successVerification.png new file mode 100644 index 0000000..c8368fb Binary files /dev/null and b/src/assets/icons/svg/successVerification.png differ diff --git a/src/assets/icons/svg/successful.png b/src/assets/icons/svg/successful.png new file mode 100644 index 0000000..c0d75a6 Binary files /dev/null and b/src/assets/icons/svg/successful.png differ diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index d99e01f..7a2692d 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -92,7 +92,7 @@ const props = defineProps({ isShowTip: propTypes.bool.def(true), //是否为施工人员上传 isConstruction: propTypes.bool.def(false), - //是否为导入资料 + //是否为上传zip文件 isImportInfo: propTypes.bool.def(false), //ip地址 uploadUrl: propTypes.string.def('/resource/oss/upload'), @@ -117,7 +117,6 @@ const showTip = computed(() => props.isShowTip && (props.fileType || props.fileS const fileUploadRef = ref(); const accept = computed(() => { - console.log('🚀 ~ accept ~ props.fileType:', props.fileType.map((value) => `.${value}`).join(',')); return props.fileType.map((value) => `.${value}`).join(','); }); diff --git a/src/main.ts b/src/main.ts index bf82c77..956c294 100644 --- a/src/main.ts +++ b/src/main.ts @@ -28,6 +28,9 @@ import ElementIcons from '@/plugins/svgicon'; //通信 import mitt from 'mitt'; +//打印 +import print from 'vue3-print-nb'; + // permission control import './permission'; @@ -51,6 +54,7 @@ app.use(HighLight); app.use(ElementIcons); app.use(router); app.use(store); +app.use(print); app.use(i18n); app.use(VXETable); app.use(plugins); diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index a6ae5e0..e2dab04 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -6,23 +6,29 @@ import defAva from '@/assets/images/profile.jpg'; import store from '@/store'; import { defineStore } from 'pinia'; import { SpecialType } from '@/api/project/workWage/types'; - +import { getProjectTeam } from '@/utils/projectTeam'; +import $cache from '@/plugins/cache'; // 添加两个函数用于操作localStorage const saveSelectedProjectToStorage = (project) => { - localStorage.setItem('selectedProject', JSON.stringify(project)); + // localStorage.setItem('selectedProject', JSON.stringify(project)); + $cache.local.setJSON('selectedProject', project); + getProjectTeam(); }; const saveProjectTeamToStorage = (project) => { - localStorage.setItem('ProjectTeamList', JSON.stringify(project)); + // localStorage.setItem('ProjectTeamList', JSON.stringify(project)); + $cache.local.setJSON('ProjectTeamList', project); }; const getSelectedProjectFromStorage = () => { - const stored = localStorage.getItem('selectedProject'); - return stored ? JSON.parse(stored) : null; + // localStorage.getItem('selectedProject'); + const stored = $cache.local.getJSON('selectedProject'); + return stored ? stored : null; }; const getProjectTeamListFromStorage = () => { - const stored = localStorage.getItem('ProjectTeamList'); - return stored ? JSON.parse(stored) : null; + const stored = $cache.local.getJSON('ProjectTeamList'); + + return stored ? stored : null; }; export const useUserStore = defineStore('user', () => { @@ -109,7 +115,8 @@ export const useUserStore = defineStore('user', () => { permissions.value = []; removeToken(); // 清除项目缓存 - localStorage.removeItem('selectedProject'); + $cache.local.remove('selectedProject'); + $cache.local.remove('ProjectTeamList'); }; const setAvatar = (value: string) => { diff --git a/src/views/quality/qualityConstructionLog/cpmponent/qualityConstructionDetail.vue b/src/views/quality/qualityConstructionLog/cpmponent/qualityConstructionDetail.vue new file mode 100644 index 0000000..10a7ea3 --- /dev/null +++ b/src/views/quality/qualityConstructionLog/cpmponent/qualityConstructionDetail.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/src/views/quality/qualityConstructionLog/index.vue b/src/views/quality/qualityConstructionLog/index.vue new file mode 100644 index 0000000..a09b53c --- /dev/null +++ b/src/views/quality/qualityConstructionLog/index.vue @@ -0,0 +1,237 @@ + + + diff --git a/src/views/quality/qualityInspection/component/qualityInspectionDetail.vue b/src/views/quality/qualityInspection/component/qualityInspectionDetail.vue new file mode 100644 index 0000000..1e42d8f --- /dev/null +++ b/src/views/quality/qualityInspection/component/qualityInspectionDetail.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/src/views/quality/qualityInspection/index.vue b/src/views/quality/qualityInspection/index.vue new file mode 100644 index 0000000..a43757e --- /dev/null +++ b/src/views/quality/qualityInspection/index.vue @@ -0,0 +1,377 @@ + + + diff --git a/src/views/safety/questionUserAnswer/index.vue b/src/views/safety/questionUserAnswer/index.vue index bc78bef..f4cce3e 100644 --- a/src/views/safety/questionUserAnswer/index.vue +++ b/src/views/safety/questionUserAnswer/index.vue @@ -4,8 +4,8 @@
- - + + @@ -70,7 +70,7 @@ 预览试卷 - 下载试卷 + 下载试卷 @@ -129,6 +129,7 @@ const initFormData: QuestionUserAnswerForm = { userId: undefined, bankId: undefined, answer: undefined, + userName: undefined, score: undefined, examTime: undefined, takeTime: undefined, @@ -145,6 +146,7 @@ const data = reactive> examType: undefined, teamId: undefined, projectId: currentProject.value.id, + userName: undefined, params: {} }, rules: { @@ -206,10 +208,14 @@ const handleSelectionChange = (selection: QuestionUserAnswerVO[]) => { // dialog.title = '修改用户试卷存储'; // }; -/** 删除按钮操作 */ -const handleDownload = async (row?: QuestionUserAnswerVO) => { - const _ids = row?.id || ids.value; - const res = await downLoadOss(_ids); +/** 批量下载按钮操作 */ +const handleDownload = async () => { + const _ids = ids.value; + await downLoadOss(_ids); +}; +/** 下载单个按钮操作 */ +const downloadOssOne = async (row?: QuestionUserAnswerVO) => { + await download.oss(row?.file); }; // const fileWatch = watch( diff --git a/src/views/safety/safetyInspection/component/SafetyInspectionDetailDialog.vue b/src/views/safety/safetyInspection/component/SafetyInspectionDetailDialog.vue index 5d0e551..1360810 100644 --- a/src/views/safety/safetyInspection/component/SafetyInspectionDetailDialog.vue +++ b/src/views/safety/safetyInspection/component/SafetyInspectionDetailDialog.vue @@ -1,83 +1,113 @@ diff --git a/src/views/safety/safetyInspection/index.vue b/src/views/safety/safetyInspection/index.vue index 15e2cdd..0aa3128 100644 --- a/src/views/safety/safetyInspection/index.vue +++ b/src/views/safety/safetyInspection/index.vue @@ -147,7 +147,7 @@
- +