diff --git a/src/assets/js/constant.js b/src/assets/js/constant.js index eded5e4..db31fd3 100644 --- a/src/assets/js/constant.js +++ b/src/assets/js/constant.js @@ -139,7 +139,6 @@ export const REMIND_DAYS = [ { ID: "2", NAME: "90天", NUM: "90" }, ]; - // export const MAINTENANCE_LEVEL_LIST = [ // //维保等级 // {ID:'1',NAME:'一级维保'}, diff --git a/src/request/customer_management.js b/src/request/customer_management.js index 4455f66..5a07e75 100644 --- a/src/request/customer_management.js +++ b/src/request/customer_management.js @@ -10,4 +10,4 @@ export const deleteSafetyCustomerView = (params) => upload("/securitycustomer/delete", params); // 删除 export const getTrafficCustomerSelectList = (params) => - post("/securitycustomer/getTrafficCustomerSelectList", params); // 客户管理列表(list) + post("/securitycustomer/getTrafficCustomerSelectList", params); // 客户管理列表(list) diff --git a/src/request/location_management.js b/src/request/location_management.js index 44c01ef..a48b7f4 100644 --- a/src/request/location_management.js +++ b/src/request/location_management.js @@ -10,4 +10,4 @@ export const deleteSafetyLocationView = (params) => post("/securitylocation/delete", params); // 添加地段管理 export const getTrafficLocationSelectList = (params) => - post("/securitylocation/getTrafficLocationSelectList", params); // 地点管理列表 + post("/securitylocation/getTrafficLocationSelectList", params); // 地点管理列表 diff --git a/src/views/enterprise_management/user_practitioner/index.vue b/src/views/enterprise_management/user_practitioner/index.vue index bbd6c48..e90fe13 100644 --- a/src/views/enterprise_management/user_practitioner/index.vue +++ b/src/views/enterprise_management/user_practitioner/index.vue @@ -234,7 +234,7 @@ const reviewItem = async (row) => { /* const fnWindow = async () => { window.open( - "http://60.10.47.50:9001/#/middlePage?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXNzd2QiOiJMZmtmcUAxMjM0NTYiLCJleHAiOjE3MTE2MjQ3NDQsInVzZXIiOiJsZnlqemhkcCIsInRhcmdldCI6Imh0dHA6Ly8xOTIuMTY4LjAuNjk6ODA4Mi8jL21pZGRsZVBhZ2UifQ.nkVxqT3lcNkNIW1jiJY71gyXazJWyfHgfClWnbaFz8I" + "http://192.168.0.69:8081/#/middlePage?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXNzd2QiOiJMZmtmcUAxMjM0NTYiLCJleHAiOjE3MTI3MTUxNDYsInVzZXIiOiJsZnlqemhkcCIsInRhcmdldCI6Imh0dHA6Ly8xOTIuMTY4LjAuNjk6ODA4Mi8jL21pZGRsZVBhZ2UifQ.xb0HD3sqJOCi4y3Ogtg27rTkKPrmdKd-DK660LpM_X8" ); }; */ // 页面下拉选项字典获取 diff --git a/src/views/mechanical_files/maintenance/add.vue b/src/views/mechanical_files/maintenance/add.vue index 96f99e0..5e73ee3 100644 --- a/src/views/mechanical_files/maintenance/add.vue +++ b/src/views/mechanical_files/maintenance/add.vue @@ -314,15 +314,25 @@ const rules = { }, ], REGISTRANT: [{ required: true, message: "请输入登记人", trigger: "blur" }], - PROCESSING_DATE: [{ required: true, message: "请选择办理日期", trigger: "blur" }], - MAINTENANCE_LEVEL: [{ required: true, message: "请选择维保等级", trigger: "blur" }], - MAINTENANCE_CYCLE: [{ required: true, message: "请输入维保周期天数", trigger: "blur" }], + PROCESSING_DATE: [ + { required: true, message: "请选择办理日期", trigger: "blur" }, + ], + MAINTENANCE_LEVEL: [ + { required: true, message: "请选择维保等级", trigger: "blur" }, + ], + MAINTENANCE_CYCLE: [ + { required: true, message: "请输入维保周期天数", trigger: "blur" }, + ], KILOMETERS: [ { required: true, message: "请输入维保公里数", trigger: "blur" }, ], DUE_DATE: [{ required: true, message: "请选择到期日期", trigger: "blur" }], - REMINDER_DAYS: [{ required: true, message: "请选择提醒天数", trigger: "blur" }], - REMINDER_DATE: [{ required: true, message: "请选择提醒日期", trigger: "blur" }], + REMINDER_DAYS: [ + { required: true, message: "请选择提醒天数", trigger: "blur" }, + ], + REMINDER_DATE: [ + { required: true, message: "请选择提醒日期", trigger: "blur" }, + ], }; const getDueDate = () => { if (form.value.PROCESSING_DATE && form.value.MAINTENANCE_CYCLE) { diff --git a/src/views/safety_production_related/security_notice/add.vue b/src/views/safety_production_related/security_notice/add.vue index 37e4854..73de818 100644 --- a/src/views/safety_production_related/security_notice/add.vue +++ b/src/views/safety_production_related/security_notice/add.vue @@ -185,8 +185,8 @@ const fnSubmit = async () => { }; const fnSelectPersonSubmit = (selectionData) => { - const userIds = selectionData.map((item) => item.USER_ID).join(", "); - const names = selectionData.map((item) => item.NAME).join(", "); + const userIds = selectionData.map((item) => item.USER_ID).join(","); + const names = selectionData.map((item) => item.NAME).join(","); data.form.PERSON_ID = userIds; data.form.PERSON = names; }; @@ -194,8 +194,8 @@ const fnSelectPersonSubmit = (selectionData) => { const fnSelectAllRiskSubmit = (allData) => { const dataList = allData.value; - const userIds = dataList.map((item) => item.USER_ID).join(", "); - const names = dataList.map((item) => item.NAME).join(", "); + const userIds = dataList.map((item) => item.USER_ID).join(","); + const names = dataList.map((item) => item.NAME).join(","); data.form.PERSON_ID = userIds; data.form.PERSON = names; diff --git a/src/views/safety_production_related/security_notice/components/select_person.vue b/src/views/safety_production_related/security_notice/components/select_person.vue index 7eb7237..7c58458 100644 --- a/src/views/safety_production_related/security_notice/components/select_person.vue +++ b/src/views/safety_production_related/security_notice/components/select_person.vue @@ -71,6 +71,7 @@ import { reactive, watch } from "vue"; import { serialNumber } from "@/assets/js/utils.js"; import { getUserSelectListAll } from "@/request/user_practitioner.js"; import { layoutFnGetPersonnelTypeTraffic } from "@/assets/js/data_dictionary.js"; +import { differenceWith } from "lodash-es"; const props = defineProps({ visible: { @@ -78,7 +79,7 @@ const props = defineProps({ required: true, default: false, }, - selectionData: { + listData: { type: Array, required: true, default: () => [], @@ -105,10 +106,7 @@ const stop = watch( () => props.visible, (value) => { if (value) { - props.selectionData.forEach((row) => { - tableRef.value.toggleRowSelection(row, undefined); - }); - fnResetPagination(); + fnGetData(); stop && stop(); } } @@ -121,7 +119,12 @@ const fnSubmit = debounce( 1000, () => { const selectionData = tableRef.value.getSelectionRows(); - emits("submit", selectionData); + const listData = differenceWith( + selectionData, + props.listData, + (a, b) => a.USER_ID === b.USER_ID + ); + emits("submit", listData); fnClose(); }, { atBegin: true } diff --git a/src/views/safety_production_related/security_notice/details.vue b/src/views/safety_production_related/security_notice/details.vue index 4156dab..7269be8 100644 --- a/src/views/safety_production_related/security_notice/details.vue +++ b/src/views/safety_production_related/security_notice/details.vue @@ -25,7 +25,7 @@ clearable > 选择 @@ -97,8 +97,8 @@ 确定 @@ -139,14 +139,14 @@ const rules = { }, ], }; -const relatedClassificationTempList = - await layoutFnGetNotificationsClassification(); const router = useRouter(); const data = reactive({ + relatedClassificationList: [], form: { TITLE: "", CORPINFO_ID: "", LEVEL: "", + PERSON_ID: [], PERSON: [], fileList: [], videoList: [], @@ -155,11 +155,34 @@ const data = reactive({ REPLYSTATUS: "", }, dialog: { - SelectPersonDialogVisible: false, - selectionData: [], + selectPersonDialogVisible: false, }, }); +const relatedClassificationTempList = + await layoutFnGetNotificationsClassification(); +data.relatedClassificationList = relatedClassificationTempList.value.list; + +const fnGetData = async () => { + if (!NOTIFICATION_ID) return; + const resData = await getSecurityNoticeInfo({ NOTIFICATION_ID }); + data.form = resData.pd; + data.form.PERSON_ID = data.form.PERSON_ID.split(","); + data.form.fileList = addingPrefixToFile([ + { + FILEPATH: data.form.ATTACHMENT_ROUTE, + }, + ]); + data.form.videoList = addingPrefixToFile([ + { + FILEPATH: data.form.VIDEO_ROUTE, + }, + ]); + const names = resData.pd.names; + data.form.PERSON = names.map((item) => item.NAME).join(","); +}; +fnGetData(); + const fnSubmit = async () => { await useFormValidate(formRef); const formData = new FormData(); @@ -191,42 +214,22 @@ const fnSubmit = async () => { }; const fnSelectPersonSubmit = (selectionData) => { - const userIds = selectionData.map((item) => item.USER_ID).join(", "); - const names = selectionData.map((item) => item.NAME).join(", "); + const userIds = selectionData.map((item) => item.USER_ID).join(","); + const names = selectionData.map((item) => item.NAME).join(","); data.form.PERSON_ID = userIds; data.form.PERSON = names; }; const fnSelectAllRiskSubmit = (allData) => { const dataList = allData.value; - const userIds = dataList.map((item) => item.USER_ID).join(", "); - const names = dataList.map((item) => item.NAME).join(", "); + const userIds = dataList.map((item) => item.USER_ID).join(","); + const names = dataList.map((item) => item.NAME).join(","); data.form.PERSON_ID = userIds; data.form.PERSON = names; data.form.allStatus = 1; data.form.PERSON = "已全部选择"; }; -const fnGetData = async () => { - if (!NOTIFICATION_ID) return; - const resData = await getSecurityNoticeInfo({ NOTIFICATION_ID }); - data.form = resData.pd; - data.dialog.selectionData = resData.pd.PERSON_ID?.split(","); - data.form.fileList = addingPrefixToFile([ - { - FILEPATH: data.form.ATTACHMENT_ROUTE, - }, - ]); - data.form.videoList = addingPrefixToFile([ - { - FILEPATH: data.form.VIDEO_ROUTE, - }, - ]); - const names = resData.pd.names; - data.form.PERSON = names.map((item) => item.NAME).join(","); -}; -fnGetData(); -const relatedClassificationList = relatedClassificationTempList.value.list; diff --git a/src/views/safety_production_related/security_notice/notice_info.vue b/src/views/safety_production_related/security_notice/notice_info.vue index 5f64f0c..1ccb5f2 100644 --- a/src/views/safety_production_related/security_notice/notice_info.vue +++ b/src/views/safety_production_related/security_notice/notice_info.vue @@ -11,7 +11,7 @@ {{ detailItems.REPLYSTATUS === "1" ? "是" : "否" }} - @@ -25,7 +25,7 @@ :href="VITE_FILE_URL + detailItems.ATTACHMENT_ROUTE" target="_blank" rel="noopener noreferrer" - >查看通知附件查看通知附件 @@ -36,10 +36,10 @@ @@ -48,16 +48,20 @@ - - + + - - + + @@ -83,7 +87,6 @@ const detailItems = ref({ const fnGetData = async () => { const response = await getSecurityNoticeInfo({ NOTIFICATION_ID }); detailItems.value = response.pd; - console.log("detail",response); }; fnGetData();