优化人员选择

dev
wangpeng 2024-04-08 20:11:06 +08:00
parent df72d06332
commit ce38a19607
13 changed files with 73 additions and 76 deletions

View File

@ -29,13 +29,6 @@ export const TRUCKMENU = [
{ id: "货B73752", name: "2" }, { id: "货B73752", name: "2" },
{ id: "货C87376", name: "3" }, { id: "货C87376", name: "3" },
]; ];
export const PERSONTYPEMENU = [
{ id: "其他", name: "1" },
{ id: "驾驶员", name: "2" },
{ id: "监控员", name: "3" },
{ id: "押运员", name: "4" },
{ id: "安全负责人", name: "5" },
];
export const CUSTOMERTYPEMENU = [ export const CUSTOMERTYPEMENU = [
{ id: "委托方", name: "1" }, { id: "委托方", name: "1" },
{ id: "确认方", name: "2" }, { id: "确认方", name: "2" },

View File

@ -17,7 +17,6 @@ export const getSecurityNoticeInfo = (params) =>
post("/securitynotice/goEdit", params); // 安全通知详情 post("/securitynotice/goEdit", params); // 安全通知详情
export const addSecurityNotice = (params) => export const addSecurityNotice = (params) =>
upload("/securitynotice/add", params); // 添加安全通知 upload("/securitynotice/add", params); // 添加安全通知
export const getUserListAll = (params) => post("/user/listSelect", params);
export const getUserBuUserId = (params) => export const getUserBuUserId = (params) =>
post("/user/getUserByUserId", params); post("/user/getUserByUserId", params);

View File

@ -26,3 +26,11 @@ export const setPractitionerEdit = (params) =>
// 从业人员解聘 // 从业人员解聘
export const setPractitionerDismissal = (params) => export const setPractitionerDismissal = (params) =>
post("/user/setPractitionerDismissal", params); post("/user/setPractitionerDismissal", params);
// 人员列表(table分页)
export const getUserSelectListAll = (params) =>
post("/user/listSelect", params);
// 人员列表(select)
export const getPractitionerSelectList = (params) =>
post("/user/getPractitionerSelectList", params);

View File

@ -401,7 +401,6 @@
</template> </template>
<script setup> <script setup>
import { getUserListAll } from "@/request/safety_production_related.js";
import { onMounted, reactive, ref, toRaw } from "vue"; import { onMounted, reactive, ref, toRaw } from "vue";
import { ACCIDENTNATUREMENU, EDUCATIONALMENU } from "@/assets/js/constant.js"; import { ACCIDENTNATUREMENU, EDUCATIONALMENU } from "@/assets/js/constant.js";
import LayoutUpload from "@/components/upload/index.vue"; import LayoutUpload from "@/components/upload/index.vue";
@ -414,6 +413,7 @@ import {
infoAccidentInvestigation, infoAccidentInvestigation,
} from "@/request/production_accident.js"; } from "@/request/production_accident.js";
import { addingPrefixFile } from "@/assets/js/utils.js"; import { addingPrefixFile } from "@/assets/js/utils.js";
import {getUserSelectListAll} from "@/request/user_practitioner.js";
// //
const route = useRoute(); const route = useRoute();
@ -582,7 +582,7 @@ fnGetData();
const router = useRouter(); const router = useRouter();
const fnGetUnitsList = async () => { const fnGetUnitsList = async () => {
const resData = await getUserListAll({}); const resData = await getUserSelectListAll({});
data.unitsList = resData.userList; data.unitsList = resData.userList;
}; };
fnGetUnitsList(); fnGetUnitsList();

View File

@ -115,16 +115,16 @@ import useListData from "@/assets/js/useListData.js";
import { reactive } from "vue"; import { reactive } from "vue";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { getUserListAll } from "@/request/safety_production_related.js";
import { import {
getAccidentInvestigationList, getAccidentInvestigationList,
setAccidentInvestigationDelete, setAccidentInvestigationDelete,
} from "@/request/production_accident.js"; } from "@/request/production_accident.js";
import { ACCIDENTNATUREMENU } from "@/assets/js/constant.js"; import { ACCIDENTNATUREMENU } from "@/assets/js/constant.js";
import {getUserSelectListAll} from "@/request/user_practitioner.js";
const router = useRouter(); const router = useRouter();
const fnGetUnitsList = async () => { const fnGetUnitsList = async () => {
const resData = await getUserListAll({}); const resData = await getUserSelectListAll({});
data.unitsList = resData.userList; data.unitsList = resData.userList;
}; };
fnGetUnitsList(); fnGetUnitsList();

View File

@ -107,17 +107,18 @@
</template> </template>
<script setup> <script setup>
import { getTrafficPenaltyUserList } from "@/request/safety_production_related.js";
import { onMounted, reactive, ref, toRaw } from "vue"; import { onMounted, reactive, ref, toRaw } from "vue";
import { PENALTYMETHODMENU, TRUCKMENU } from "@/assets/js/constant.js"; import { PENALTYMETHODMENU, TRUCKMENU } from "@/assets/js/constant.js";
import LayoutUpload from "@/components/upload/index.vue"; import LayoutUpload from "@/components/upload/index.vue";
import useFormValidate from "@/assets/js/useFormValidate.js"; import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { useRouter, useRoute } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import { import {
addViolationRegistrationView, addViolationRegistrationView,
editViolationRegistration, editViolationRegistration,
} from "@/request/violation_registration.js"; } from "@/request/violation_registration.js";
import { getPractitionerSelectList } from "@/request/user_practitioner.js";
const router = useRouter();
const formRef = ref(null); const formRef = ref(null);
const rules = { const rules = {
@ -152,9 +153,16 @@ onMounted(async () => {
REGISTRATION_ID: registrationId.value, REGISTRATION_ID: registrationId.value,
}); */ }); */
}); });
const userList = await getTrafficPenaltyUserList();
const router = useRouter(); const fnGetUnitsList = async () => {
const resData = await getPractitionerSelectList({
PARENT_ID: "0b62f92b0b624aab8e89a77304a64d5e",
BIANMA: "TRAFFIC_EMPLOYMENT_DRIVE",
});
data.unitsList = resData.userList;
};
fnGetUnitsList();
const data = reactive({ const data = reactive({
form: { form: {
TRANSPORTVEHICLE: "", TRANSPORTVEHICLE: "",
@ -167,12 +175,6 @@ const data = reactive({
fileList: [], fileList: [],
}, },
}); });
const fnGetUnitsList = async () => {
const resData = userList
data.unitsList = resData.userList.varList;
};
fnGetUnitsList();
const fnSubmit = async () => { const fnSubmit = async () => {
await useFormValidate(formRef); await useFormValidate(formRef);
@ -193,7 +195,7 @@ const fnSubmit = async () => {
ElMessage.success("添加成功"); ElMessage.success("添加成功");
} }
router.push("/production_course_regulate/violation_registration"); await router.push("/production_course_regulate/violation_registration");
}; };
</script> </script>

View File

@ -105,7 +105,6 @@
</template> </template>
<script setup> <script setup>
import { getUserListAll } from "@/request/safety_production_related.js";
import { onMounted, reactive, ref, toRaw } from "vue"; import { onMounted, reactive, ref, toRaw } from "vue";
import { PENALTYMETHODMENU, TRUCKMENU } from "@/assets/js/constant.js"; import { PENALTYMETHODMENU, TRUCKMENU } from "@/assets/js/constant.js";
import LayoutUpload from "@/components/upload/index.vue"; import LayoutUpload from "@/components/upload/index.vue";
@ -117,6 +116,7 @@ import {
infoViolationRegistration, infoViolationRegistration,
} from "@/request/violation_registration.js"; } from "@/request/violation_registration.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { getUserSelectListAll } from "@/request/user_practitioner.js";
const formRef = ref(null); const formRef = ref(null);
const rules = { const rules = {
@ -150,7 +150,7 @@ onMounted(() => {
}); });
const fnGetUnitsList = async () => { const fnGetUnitsList = async () => {
const resData = await getUserListAll({}); const resData = await getUserSelectListAll({});
data.unitsList = resData.userList; data.unitsList = resData.userList;
}; };
fnGetUnitsList(); fnGetUnitsList();

View File

@ -120,7 +120,7 @@ import {
getViolationRegistrationList, getViolationRegistrationList,
setViolationRegistrationDelete, setViolationRegistrationDelete,
} from "@/request/violation_registration.js"; } from "@/request/violation_registration.js";
import { getUserListAll } from "@/request/safety_production_related.js"; import {getUserSelectListAll} from "@/request/user_practitioner.js";
const router = useRouter(); const router = useRouter();
const convertTransportVehicle = (name) => { const convertTransportVehicle = (name) => {
@ -132,7 +132,7 @@ const convertPENALTYMETHOD = (name) => {
return vehicle ? vehicle.id : "未知处罚方式"; return vehicle ? vehicle.id : "未知处罚方式";
}; };
const fnGetUnitsList = async () => { const fnGetUnitsList = async () => {
const resData = await getUserListAll({}); const resData = await getUserSelectListAll({});
data.unitsList = resData.userList; data.unitsList = resData.userList;
}; };
fnGetUnitsList(); fnGetUnitsList();

View File

@ -113,13 +113,13 @@
</template> </template>
<script setup> <script setup>
import { getUserListAll } from "@/request/safety_production_related.js";
import { addSafetyMeetingView } from "@/request/traffic_safety_meeting.js"; import { addSafetyMeetingView } from "@/request/traffic_safety_meeting.js";
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
import LayoutUpload from "@/components/upload/index.vue"; import LayoutUpload from "@/components/upload/index.vue";
import LayoutEditor from "@/components/editor/index.vue"; import LayoutEditor from "@/components/editor/index.vue";
import useFormValidate from "@/assets/js/useFormValidate.js"; import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import {getUserSelectListAll} from "@/request/user_practitioner.js";
const formRef = ref(null); const formRef = ref(null);
const cities = [ const cities = [
"驾驶员", "驾驶员",
@ -154,12 +154,6 @@ const rules = {
], ],
}; };
const fnGetUnitsList = async () => {
const resData = await getUserListAll({});
data.unitsList = resData.varList;
};
fnGetUnitsList();
const data = reactive({ const data = reactive({
form: { form: {
MEETING_TITLE: "", MEETING_TITLE: "",

View File

@ -139,7 +139,6 @@
</template> </template>
<script setup> <script setup>
import { getUserListAll } from "@/request/safety_production_related.js";
import { addSafetyMeetingView } from "@/request/traffic_safety_meeting.js"; import { addSafetyMeetingView } from "@/request/traffic_safety_meeting.js";
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
import { MEETINGTYPEMENU } from "@/assets/js/constant.js"; import { MEETINGTYPEMENU } from "@/assets/js/constant.js";
@ -149,6 +148,7 @@ import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import SelectPerson from "@/views/safety_production_related/security_notice/components/select_person.vue"; import SelectPerson from "@/views/safety_production_related/security_notice/components/select_person.vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { getUserSelectListAll } from "@/request/user_practitioner.js";
const formRef = ref(null); const formRef = ref(null);
const rules = { const rules = {
MEETING_TITLE: [ MEETING_TITLE: [
@ -178,11 +178,6 @@ const rules = {
}; };
const router = useRouter(); const router = useRouter();
const fnGetUnitsList = async () => {
const resData = await getUserListAll({});
data.unitsList = resData.varList;
};
fnGetUnitsList();
const data = reactive({ const data = reactive({
form: { form: {

View File

@ -15,16 +15,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="从业类型" prop="PRACTITIONERTYPE"> <el-form-item label="从业类型" prop="PERSONNEL_TYPE">
<el-select <el-select v-model="searchForm.PERSONNEL_TYPE">
v-model="searchForm.PRACTITIONERTYPE"
placeholder="请选择从业类型"
>
<el-option <el-option
v-for="item in PERSONTYPEMENU" v-for="item in data.personnelTypeList"
:key="item.id" :key="item.DICTIONARIES_ID"
:label="item.id" :label="item.NAME"
:value="item.name" :value="item.DICTIONARIES_ID"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -52,10 +49,11 @@
{{ serialNumber(pagination, $index) }} {{ serialNumber(pagination, $index) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="USER_ID" label="用户Id" />
<el-table-column prop="NAME" label="姓名" /> <el-table-column prop="NAME" label="姓名" />
<el-table-column prop="PERSONNEL_TYPE_NAME" label="从业类型" />
<el-table-column prop="PHONE" label="手机号" />
<el-table-column prop="DEPARTMENT_NAME" label="部门" /> <el-table-column prop="DEPARTMENT_NAME" label="部门" />
<el-table-column prop="PRACTITIONERTYPE" label="从业类型" /> <el-table-column prop="POST_NAME" label="岗位" />
</layout-table> </layout-table>
<template #footer> <template #footer>
<el-button @click="fnClose"></el-button> <el-button @click="fnClose"></el-button>
@ -69,11 +67,11 @@
import { useVModel } from "@vueuse/core"; import { useVModel } from "@vueuse/core";
import { debounce } from "throttle-debounce"; import { debounce } from "throttle-debounce";
import useListData from "@/assets/js/useListData.js"; import useListData from "@/assets/js/useListData.js";
import { watch } from "vue"; import { reactive, watch } from "vue";
import { serialNumber } from "@/assets/js/utils.js"; import { serialNumber } from "@/assets/js/utils.js";
import { differenceWith } from "lodash-es"; import { differenceWith } from "lodash-es";
import { getUserListAll } from "@/request/safety_production_related.js"; import { getUserSelectListAll } from "@/request/user_practitioner.js";
import { PERSONTYPEMENU } from "@/assets/js/constant.js"; import { layoutFnGetPersonnelTypeTraffic } from "@/assets/js/data_dictionary.js";
const props = defineProps({ const props = defineProps({
visible: { visible: {
@ -91,11 +89,19 @@ const emits = defineEmits(["update:visible", "submit", "submitall"]);
const visible = useVModel(props, "visible", emits); const visible = useVModel(props, "visible", emits);
const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } = const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
useListData(getUserListAll, { useListData(getUserSelectListAll, {
key: "userList", key: "userList",
immediate: false, immediate: false,
}); });
const data = reactive({
personnelTypeList: [],
});
const { value: personnelTypeList } = await layoutFnGetPersonnelTypeTraffic({
DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e",
BIANMA: "TRAFFIC_EMPLOYMENT",
});
data.personnelTypeList = personnelTypeList;
const stop = watch( const stop = watch(
() => props.visible, () => props.visible,
(value) => { (value) => {

View File

@ -107,7 +107,6 @@
<script setup> <script setup>
import { import {
layoutFnGetNotificationsClassification, layoutFnGetNotificationsClassification,
getUserListAll,
addSecurityNotice, addSecurityNotice,
} from "@/request/safety_production_related.js"; } from "@/request/safety_production_related.js";
import { onMounted, reactive, ref } from "vue"; import { onMounted, reactive, ref } from "vue";
@ -164,11 +163,6 @@ const fnPerson = async () => {
data.personList = [resData.pd]; data.personList = [resData.pd];
}; };
const fnGetUnitsList = async () => {
const resData = await getUserListAll({});
data.unitsList = resData.varList;
};
fnGetUnitsList();
const fnSubmit = async () => { const fnSubmit = async () => {
await useFormValidate(formRef); await useFormValidate(formRef);
const formData = new FormData(); const formData = new FormData();

View File

@ -15,16 +15,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="从业类型" prop="PRACTITIONERTYPE"> <el-form-item label="从业类型" prop="PERSONNEL_TYPE">
<el-select <el-select v-model="searchForm.PERSONNEL_TYPE">
v-model="searchForm.PRACTITIONERTYPE"
placeholder="请选择从业类型"
>
<el-option <el-option
v-for="item in PERSONTYPEMENU" v-for="item in data.personnelTypeList"
:key="item.id" :key="item.DICTIONARIES_ID"
:label="item.id" :label="item.NAME"
:value="item.name" :value="item.DICTIONARIES_ID"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -52,10 +49,11 @@
{{ serialNumber(pagination, $index) }} {{ serialNumber(pagination, $index) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="USER_ID" label="用户Id" />
<el-table-column prop="NAME" label="姓名" /> <el-table-column prop="NAME" label="姓名" />
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
<el-table-column prop="PERSONNEL_TYPE_NAME" label="从业类型" /> <el-table-column prop="PERSONNEL_TYPE_NAME" label="从业类型" />
<el-table-column prop="PHONE" label="手机号" />
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
<el-table-column prop="POST_NAME" label="岗位" />
</layout-table> </layout-table>
<template #footer> <template #footer>
<el-button @click="fnClose"></el-button> <el-button @click="fnClose"></el-button>
@ -69,10 +67,10 @@
import { useVModel } from "@vueuse/core"; import { useVModel } from "@vueuse/core";
import { debounce } from "throttle-debounce"; import { debounce } from "throttle-debounce";
import useListData from "@/assets/js/useListData.js"; import useListData from "@/assets/js/useListData.js";
import { watch } from "vue"; import { reactive, watch } from "vue";
import { serialNumber } from "@/assets/js/utils.js"; import { serialNumber } from "@/assets/js/utils.js";
import { getUserListAll } from "@/request/safety_production_related.js"; import { getUserSelectListAll } from "@/request/user_practitioner.js";
import { PERSONTYPEMENU } from "@/assets/js/constant.js"; import { layoutFnGetPersonnelTypeTraffic } from "@/assets/js/data_dictionary.js";
const props = defineProps({ const props = defineProps({
visible: { visible: {
@ -90,11 +88,19 @@ const emits = defineEmits(["update:visible", "submit", "submitall"]);
const visible = useVModel(props, "visible", emits); const visible = useVModel(props, "visible", emits);
const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } = const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
useListData(getUserListAll, { useListData(getUserSelectListAll, {
key: "userList", key: "userList",
immediate: false, immediate: false,
}); });
const data = reactive({
personnelTypeList: [],
});
const { value: personnelTypeList } = await layoutFnGetPersonnelTypeTraffic({
DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e",
BIANMA: "TRAFFIC_EMPLOYMENT",
});
data.personnelTypeList = personnelTypeList;
const stop = watch( const stop = watch(
() => props.visible, () => props.visible,
(value) => { (value) => {