From 3cb82216767460689d29645ad8c7e3a98c6d3e8e Mon Sep 17 00:00:00 2001 From: zhangyanli Date: Wed, 27 Mar 2024 15:53:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=95=99=E5=9F=B9=E5=8A=9F=E8=83=BDbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/import_file/index.vue | 6 +++++ src/request/training_process_management.js | 2 +- .../enterprise/components/postman.vue | 3 +++ .../semester/components/add_review.vue | 10 ++++++++ .../semester/components/paper.vue | 18 ++++++++++++++ .../semester/components/review.vue | 9 ++++++- .../archives_management/semester/index.vue | 5 ++-- .../archives_management/student/index.vue | 4 +++- .../archives_management/user/archives.vue | 24 +++++++++++++++++-- src/views/archives_management/user/class.vue | 2 +- .../personnel_registration_form.vue | 2 +- src/views/archives_management/user/index.vue | 4 +++- src/views/education_user/sign_user/index.vue | 1 + .../components/studentStrengthen.vue | 18 ++++++++++++++ .../components/basic_info.vue | 18 ++++++++++++++ .../components/exam_records.vue | 21 +++++++++++++++- .../class_management/index.vue | 8 ------- .../exam_paper_management/add.vue | 4 ++-- .../examdraft_management/edit.vue | 18 ++++++++++++++ .../training_progress/index.vue | 5 ++++ .../course_management/index.vue | 19 ++++++++------- .../exam_paper_management/components/view.vue | 18 ++++++++++++++ .../video_courseware/index.vue | 18 +++++++------- 23 files changed, 198 insertions(+), 39 deletions(-) diff --git a/src/components/import_file/index.vue b/src/components/import_file/index.vue index 3ea7cd8..8aeaea3 100644 --- a/src/components/import_file/index.vue +++ b/src/components/import_file/index.vue @@ -31,6 +31,11 @@ const props = defineProps({ required: true, default: false, }, + year: { + type: String, + required: false, + default: "", + }, title: { type: String, default: "导入", @@ -72,6 +77,7 @@ const fnSubmit = debounce( const formData = new FormData(); formData.append("FFILE", data.form.file[0].raw); formData.append("FFILEName", data.form.file[0].name); + formData.append("year", props.year); emits("submit", formData); }, { atBegin: true } diff --git a/src/request/training_process_management.js b/src/request/training_process_management.js index bc4593f..ebb40ed 100644 --- a/src/request/training_process_management.js +++ b/src/request/training_process_management.js @@ -25,7 +25,7 @@ export const setClassFinish = (params) => post("/class/finish", params); // 班 export const setClassManagementDelay = (params) => post("/class/postpone", params); // 班级管理延期 export const getPersonnelList = (params) => - post("/trainedusersign/listByEnt", { loading: false, params }); // 班级管理添加人员 + post("/trainedusersign/listByEnt", { loading: false, ...params }); // 班级管理添加人员 export const getClassManagementView = (params) => post("/class/goEdit", params); // 班级管理查看 export const setClassManagementAdd = (params) => post("/class/add", params); // 班级管理添加 export const setClassManagementEdit = (params) => post("/class/edit", params); // 班级管理修改 diff --git a/src/views/archives_management/enterprise/components/postman.vue b/src/views/archives_management/enterprise/components/postman.vue index 91dccab..18030cb 100644 --- a/src/views/archives_management/enterprise/components/postman.vue +++ b/src/views/archives_management/enterprise/components/postman.vue @@ -82,6 +82,7 @@ @@ -199,6 +200,8 @@ const fnImport = () => { const fnSubmitImport = async (formData) => { const resData = await setPostmanImport(formData); ElMessage.success(resData.msg); + fnGetData(); + fnImport(); }; const fnClose = () => { emits("update:type", 0); diff --git a/src/views/archives_management/semester/components/add_review.vue b/src/views/archives_management/semester/components/add_review.vue index 16d0ef3..644914f 100644 --- a/src/views/archives_management/semester/components/add_review.vue +++ b/src/views/archives_management/semester/components/add_review.vue @@ -77,6 +77,11 @@ const props = defineProps({ required: true, default: () => {}, }, + curriculumId: { + type: String, + required: true, + default: "", + }, }); const emits = defineEmits(["update:visible", "update:form", "get-data"]); const { visible, form } = useVModels(props, emits); @@ -121,8 +126,13 @@ const fnSubmit = debounce( Object.keys(props.outerLayerForm).forEach((key) => { formData.append(key, props.outerLayerForm[key]); }); + console.log(props.outerLayerForm); formData.append("REVIEW_USER", form.value.REVIEW_USER); + formData.append("DEPARTMENT", form.value.DEPARTMENT_NAME); + formData.append("DUTIES", form.value.DUTIES); formData.append("CHECK_OPINION", form.value.CHECK_OPINION); + formData.append("SIGN_PATH", form.value.SIGN_PICTURE); + formData.append("CURRICULUM_ID", props.curriculumId); form.value.ARCHIVES_REVIEW_RECORD_ID && formData.append( "ARCHIVES_REVIEW_RECORD_ID", diff --git a/src/views/archives_management/semester/components/paper.vue b/src/views/archives_management/semester/components/paper.vue index f08f040..53da010 100644 --- a/src/views/archives_management/semester/components/paper.vue +++ b/src/views/archives_management/semester/components/paper.vue @@ -139,4 +139,22 @@ const fnClose = () => { } } } +:deep { + .el-radio-group { + width: 100%; + justify-content: space-between; + flex-wrap: wrap; + } + .el-radio-group .el-radio { + width: 25%; + margin-right: 0; + height: auto; + min-height: 30px; + } + .el-radio__input.is-disabled + span.el-radio__label { + white-space: break-spaces; + word-break: break-all; + line-height: 20px; + } +} diff --git a/src/views/archives_management/semester/components/review.vue b/src/views/archives_management/semester/components/review.vue index 0012321..cf3ab3d 100644 --- a/src/views/archives_management/semester/components/review.vue +++ b/src/views/archives_management/semester/components/review.vue @@ -125,7 +125,8 @@ v-model:form="data.addDialog.form" :type="data.addDialog.type" :outer-layer-form="data.form" - @get-data="fnGetReviewRecordList" + :curriculum-id="curriculumId" + @get-data="fnGetData" /> @@ -185,6 +186,7 @@ const data = reactive({ BOOK_NUM: "", CORP_NAME: "", CREATTIME: "", + CURRICULUM_ID: "", enterpriseName: "", REVIEW_PERSON: "", REVIEW_TIME: "", @@ -237,6 +239,11 @@ const fnGetData = async () => { data.form.CREATTIME = reviewInfo.pd.CREATTIME; await fnGetReviewRecordList(); } + } else { + data.reviewInfo = {}; + data.reviewRecordList = []; + data.form.REVIEW_OPINIONS = + data.form.REVIEW_OPINIONS || "此教材符合相关文件要求,同意使用。"; } }; const fnGetReviewRecordList = async () => { diff --git a/src/views/archives_management/semester/index.vue b/src/views/archives_management/semester/index.vue index 435c68b..e630e4f 100644 --- a/src/views/archives_management/semester/index.vue +++ b/src/views/archives_management/semester/index.vue @@ -52,7 +52,6 @@ - + @@ -139,7 +144,13 @@ import { } from "@/request/enterprise_management.js"; import { debounce } from "throttle-debounce"; import { ElMessageBox, ElMessage } from "element-plus"; +import { setRiskPointImport } from "@/request/risk_control.js"; +import LayoutImportFile from "@/components/import_file/index.vue"; +import { reactive } from "vue"; const router = useRouter(); +const data = reactive({ + importDialogVisible: false, +}); const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } = useListData(getFreightTrailerList); const fnGetDataTransfer = () => { @@ -158,6 +169,21 @@ const fnResetPaginationTransfer = () => { DEPARTMENT_NAME: searchForm.value.DEPARTMENT_NAME, }); }; +const fnImportDialogChangeShow = () => { + data.importDialogVisible = !data.importDialogVisible; +}; +const fnSubmitImport = async (formData) => { + const resData = await setRiskPointImport(formData); + if (resData.resultStr) { + ElMessage({ + dangerouslyUseHTMLString: true, + message: resData.resultStr, + type: resData.resultType, + }); + } + fnImportDialogChangeShow(); + fnResetPaginationTransfer(); +}; const fnExport = async () => { const selectionData = tableRef.value.getSelectionRows(); if (selectionData.length === 0) { @@ -165,7 +191,9 @@ const fnExport = async () => { return; } await ElMessageBox.confirm("确定要导出到excel吗?", { type: "warning" }); - const DATA_IDS = selectionData.map((item) => item.RISKUNIT_ID).join(","); + const DATA_IDS = selectionData + .map((item) => item.FREIGHTTRAILER_ID) + .join(","); window.location.href = import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] + "/freightTrailer/excel?" + diff --git a/src/views/enterprise_management/basics_info_management/freight_trailer/view.vue b/src/views/enterprise_management/basics_info_management/freight_trailer/view.vue index 2d125ed..1ab2822 100644 --- a/src/views/enterprise_management/basics_info_management/freight_trailer/view.vue +++ b/src/views/enterprise_management/basics_info_management/freight_trailer/view.vue @@ -33,13 +33,9 @@ {{ info.CAR_OWNERS_TEL }} - {{ info.CONTACTS }} - - - {{ info.CONTACT_PHONE }} diff --git a/src/views/mechanical_files/assigned_manage/index.vue b/src/views/mechanical_files/assigned_manage/index.vue index 441aa49..4f9b2a4 100644 --- a/src/views/mechanical_files/assigned_manage/index.vue +++ b/src/views/mechanical_files/assigned_manage/index.vue @@ -148,12 +148,6 @@ width="140" show-overflow-tooltip /> - - + + + diff --git a/src/views/mechanical_files/beidou/view.vue b/src/views/mechanical_files/beidou/view.vue index 7945406..1965c26 100644 --- a/src/views/mechanical_files/beidou/view.vue +++ b/src/views/mechanical_files/beidou/view.vue @@ -17,12 +17,6 @@ {{ data.busInfo.TRAILER_TYPE }} - - {{ data.busInfo.VEHICLE_MODEL }} - - - {{ data.busInfo.VEHICLE_BRAND }} - {{ data.busInfo.CAR_OWNERS }} diff --git a/src/views/mechanical_files/inspect_annually/add.vue b/src/views/mechanical_files/inspect_annually/add.vue index b2954cd..695d67a 100644 --- a/src/views/mechanical_files/inspect_annually/add.vue +++ b/src/views/mechanical_files/inspect_annually/add.vue @@ -344,12 +344,26 @@ const getDueDate = () => { const getRemiderDate = (val) => { if (val) { if (form.value.DUE_DATE) { - form.value.REMINDER_DATE = subtractDaysFromDate(form.value.DUE_DATE, val); + // 计算提醒日期 + const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val); + const reminderDate = new Date(reminderDateStr); + const today = new Date(); + + // 检查计算出的提醒日期是否早于当前时间 + if (reminderDate < today) { + // 如果提醒日期早于当前日期,显示错误提示并重置提醒日期 + ElMessage.error("输入的提醒天数错误,提醒日期不能早于当前日期。"); + form.value.REMINDER_DATE = ""; // 重置提醒日期 + } else { + // 如果提醒日期正常,更新表单值 + form.value.REMINDER_DATE = reminderDateStr; + } } } else { form.value.REMINDER_DATE = ""; } }; + const getVehicle = async (event) => { const resData = await getTrailerList({ TRAFFIC_TYPE: event }); data.vehicleList = resData.list; diff --git a/src/views/mechanical_files/insure/add.vue b/src/views/mechanical_files/insure/add.vue index 60c170a..210ad1f 100644 --- a/src/views/mechanical_files/insure/add.vue +++ b/src/views/mechanical_files/insure/add.vue @@ -401,7 +401,20 @@ const getDueDate = (val) => { const getRemiderDate = (val) => { if (val) { if (form.value.DUE_DATE) { - form.value.REMINDER_DATE = subtractDaysFromDate(form.value.DUE_DATE, val); + // 计算提醒日期 + const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val); + const reminderDate = new Date(reminderDateStr); + const today = new Date(); + + // 检查计算出的提醒日期是否早于当前时间 + if (reminderDate < today) { + // 如果提醒日期早于当前日期,显示错误提示并重置提醒日期 + ElMessage.error("输入的提醒天数错误,提醒日期不能早于当前日期。"); + form.value.REMINDER_DATE = ""; // 重置提醒日期 + } else { + // 如果提醒日期正常,更新表单值 + form.value.REMINDER_DATE = reminderDateStr; + } } } else { form.value.REMINDER_DATE = ""; diff --git a/src/views/mechanical_files/maintenance/add.vue b/src/views/mechanical_files/maintenance/add.vue index 01fb4f2..565b8b3 100644 --- a/src/views/mechanical_files/maintenance/add.vue +++ b/src/views/mechanical_files/maintenance/add.vue @@ -116,7 +116,7 @@ - + { const getRemiderDate = (val) => { if (val) { if (form.value.DUE_DATE) { - form.value.REMINDER_DATE = subtractDaysFromDate(form.value.DUE_DATE, val); + // 计算提醒日期 + const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val); + const reminderDate = new Date(reminderDateStr); + const today = new Date(); + + // 检查计算出的提醒日期是否早于当前时间 + if (reminderDate < today) { + // 如果提醒日期早于当前日期,显示错误提示并重置提醒日期 + ElMessage.error("输入的提醒天数错误,提醒日期不能早于当前日期。"); + form.value.REMINDER_DATE = ""; // 重置提醒日期 + } else { + // 如果提醒日期正常,更新表单值 + form.value.REMINDER_DATE = reminderDateStr; + } } } else { form.value.REMINDER_DATE = ""; } }; + const getVehicle = async (event) => { const resData = await getTrailerList({ TRAFFIC_TYPE: event }); data.vehicleList = resData.list; diff --git a/src/views/mechanical_files/maintenance/index.vue b/src/views/mechanical_files/maintenance/index.vue index 8a3a29c..763c2be 100644 --- a/src/views/mechanical_files/maintenance/index.vue +++ b/src/views/mechanical_files/maintenance/index.vue @@ -98,11 +98,11 @@ - + + + @@ -119,7 +119,13 @@ 即将到期 - + + + diff --git a/src/views/mechanical_files/maintenance/view.vue b/src/views/mechanical_files/maintenance/view.vue index 4b33f26..6d30ad3 100644 --- a/src/views/mechanical_files/maintenance/view.vue +++ b/src/views/mechanical_files/maintenance/view.vue @@ -17,12 +17,12 @@ {{ data.busInfo.TRAILER_TYPE }} - - {{ data.busInfo.VEHICLE_MODEL }} - - - {{ data.busInfo.VEHICLE_BRAND }} - + + + + + + {{ data.busInfo.CAR_OWNERS }} @@ -53,7 +53,7 @@ {{ info.KILOMETERS }} - {{ info.MAINTENANCE_CYCLE }} + {{ info.MAINTENANCE_CYCLE + "天" }} {{ info.PROCESSING_DATE }} diff --git a/src/views/mechanical_files/operations/add.vue b/src/views/mechanical_files/operations/add.vue index b6a6722..76273b4 100644 --- a/src/views/mechanical_files/operations/add.vue +++ b/src/views/mechanical_files/operations/add.vue @@ -311,7 +311,15 @@ const getDueDate = () => { const getRemiderDate = (val) => { if (val) { if (form.value.DUE_DATE) { - form.value.REMINDER_DATE = subtractDaysFromDate(form.value.DUE_DATE, val); + const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val); + const reminderDate = new Date(reminderDateStr); + const today = new Date(); + if (reminderDate < today) { + ElMessage.error("输入的提醒天数错误,提醒日期不能早于当前日期。"); + form.value.REMINDER_DAYS = ""; + } else { + form.value.REMINDER_DATE = reminderDateStr; + } } } else { form.value.REMINDER_DATE = ""; diff --git a/src/views/mechanical_files/operations/index.vue b/src/views/mechanical_files/operations/index.vue index 8e25983..b473dcc 100644 --- a/src/views/mechanical_files/operations/index.vue +++ b/src/views/mechanical_files/operations/index.vue @@ -98,7 +98,7 @@ {{ serialNumber(pagination, $index) }} - + - + + + diff --git a/src/views/mechanical_files/operations/view.vue b/src/views/mechanical_files/operations/view.vue index 1ec7624..d54166a 100644 --- a/src/views/mechanical_files/operations/view.vue +++ b/src/views/mechanical_files/operations/view.vue @@ -17,12 +17,12 @@ {{ data.busInfo.TRAILER_TYPE }} - - {{ data.busInfo.VEHICLE_MODEL }} - - - {{ data.busInfo.VEHICLE_BRAND }} - + + + + + + {{ data.busInfo.CAR_OWNERS }} diff --git a/src/views/mechanical_files/production_accident/add.vue b/src/views/mechanical_files/production_accident/add.vue index 34e0557..10178bb 100644 --- a/src/views/mechanical_files/production_accident/add.vue +++ b/src/views/mechanical_files/production_accident/add.vue @@ -402,7 +402,7 @@