diff --git a/src/views/notification_announcement/notification_template_configuration/components/configure.vue b/src/views/notification_announcement/notification_template_configuration/components/configure.vue index 64f51f6..f6f3c7a 100644 --- a/src/views/notification_announcement/notification_template_configuration/components/configure.vue +++ b/src/views/notification_announcement/notification_template_configuration/components/configure.vue @@ -103,7 +103,7 @@ const fnSubmit = debounce( const ADDRESSEE = selectionData.map((item) => item.USER_ID).join(","); const USERNAME = selectionData.map((item) => item.NAME).join(","); await ElMessageBox.confirm( - `确定要发送短信给${USERNAME.split(",").join( + `确定要发送提醒信息给${USERNAME.split(",").join( "、" )}吗?`, { 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 7c58458..4f5f8e2 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 @@ -67,11 +67,10 @@ import { useVModel } from "@vueuse/core"; import { debounce } from "throttle-debounce"; import useListData from "@/assets/js/useListData.js"; -import { reactive, watch } from "vue"; +import { nextTick, 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: { @@ -87,12 +86,6 @@ const props = defineProps({ }); const emits = defineEmits(["update:visible", "submit", "submitall"]); const visible = useVModel(props, "visible", emits); - -const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } = - useListData(getUserSelectListAll, { - key: "userList", - immediate: false, - }); const data = reactive({ personnelTypeList: [], }); @@ -102,12 +95,28 @@ const { value: personnelTypeList } = await layoutFnGetPersonnelTypeTraffic({ BIANMA: "TRAFFIC_EMPLOYMENT", }); data.personnelTypeList = personnelTypeList; -const stop = watch( + +const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } = + useListData(getUserSelectListAll, { + immediate: false, + clearSelection: false, + key: "userList", + }); + +const fnInit = async () => { + await fnResetPagination(); + await nextTick(); + const checkUserList = props.listData.map((item) => ({ USER_ID: item })); + checkUserList.forEach((item) => { + tableRef.value.toggleRowSelection(item); + }); + fnResetPagination(); +}; +watch( () => props.visible, (value) => { if (value) { - fnGetData(); - stop && stop(); + fnInit(); } } ); @@ -119,12 +128,7 @@ const fnSubmit = debounce( 1000, () => { const selectionData = tableRef.value.getSelectionRows(); - const listData = differenceWith( - selectionData, - props.listData, - (a, b) => a.USER_ID === b.USER_ID - ); - emits("submit", listData); + emits("submit", selectionData); 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 7269be8..214a010 100644 --- a/src/views/safety_production_related/security_notice/details.vue +++ b/src/views/safety_production_related/security_notice/details.vue @@ -98,7 +98,7 @@ @@ -146,7 +146,7 @@ const data = reactive({ TITLE: "", CORPINFO_ID: "", LEVEL: "", - PERSON_ID: [], + PERSON_ID: '', PERSON: [], fileList: [], videoList: [], @@ -167,7 +167,6 @@ 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,