forked from integrated_whb/integrated_whb_vue
优化人员选择
parent
df72d06332
commit
ce38a19607
|
@ -29,13 +29,6 @@ export const TRUCKMENU = [
|
|||
{ id: "货B73752", name: "2" },
|
||||
{ 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 = [
|
||||
{ id: "委托方", name: "1" },
|
||||
{ id: "确认方", name: "2" },
|
||||
|
|
|
@ -17,7 +17,6 @@ export const getSecurityNoticeInfo = (params) =>
|
|||
post("/securitynotice/goEdit", params); // 安全通知详情
|
||||
export const addSecurityNotice = (params) =>
|
||||
upload("/securitynotice/add", params); // 添加安全通知
|
||||
export const getUserListAll = (params) => post("/user/listSelect", params);
|
||||
export const getUserBuUserId = (params) =>
|
||||
post("/user/getUserByUserId", params);
|
||||
|
||||
|
|
|
@ -26,3 +26,11 @@ export const setPractitionerEdit = (params) =>
|
|||
// 从业人员解聘
|
||||
export const setPractitionerDismissal = (params) =>
|
||||
post("/user/setPractitionerDismissal", params);
|
||||
|
||||
// 人员列表(table分页)
|
||||
export const getUserSelectListAll = (params) =>
|
||||
post("/user/listSelect", params);
|
||||
|
||||
// 人员列表(select)
|
||||
export const getPractitionerSelectList = (params) =>
|
||||
post("/user/getPractitionerSelectList", params);
|
||||
|
|
|
@ -401,7 +401,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getUserListAll } from "@/request/safety_production_related.js";
|
||||
import { onMounted, reactive, ref, toRaw } from "vue";
|
||||
import { ACCIDENTNATUREMENU, EDUCATIONALMENU } from "@/assets/js/constant.js";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
|
@ -414,6 +413,7 @@ import {
|
|||
infoAccidentInvestigation,
|
||||
} from "@/request/production_accident.js";
|
||||
import { addingPrefixFile } from "@/assets/js/utils.js";
|
||||
import {getUserSelectListAll} from "@/request/user_practitioner.js";
|
||||
|
||||
// 获取路由实例
|
||||
const route = useRoute();
|
||||
|
@ -582,7 +582,7 @@ fnGetData();
|
|||
|
||||
const router = useRouter();
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = await getUserListAll({});
|
||||
const resData = await getUserSelectListAll({});
|
||||
data.unitsList = resData.userList;
|
||||
};
|
||||
fnGetUnitsList();
|
||||
|
|
|
@ -115,16 +115,16 @@ import useListData from "@/assets/js/useListData.js";
|
|||
import { reactive } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import { getUserListAll } from "@/request/safety_production_related.js";
|
||||
import {
|
||||
getAccidentInvestigationList,
|
||||
setAccidentInvestigationDelete,
|
||||
} from "@/request/production_accident.js";
|
||||
import { ACCIDENTNATUREMENU } from "@/assets/js/constant.js";
|
||||
import {getUserSelectListAll} from "@/request/user_practitioner.js";
|
||||
|
||||
const router = useRouter();
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = await getUserListAll({});
|
||||
const resData = await getUserSelectListAll({});
|
||||
data.unitsList = resData.userList;
|
||||
};
|
||||
fnGetUnitsList();
|
||||
|
|
|
@ -107,17 +107,18 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getTrafficPenaltyUserList } from "@/request/safety_production_related.js";
|
||||
import { onMounted, reactive, ref, toRaw } from "vue";
|
||||
import { PENALTYMETHODMENU, TRUCKMENU } from "@/assets/js/constant.js";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import {
|
||||
addViolationRegistrationView,
|
||||
editViolationRegistration,
|
||||
} from "@/request/violation_registration.js";
|
||||
import { getPractitionerSelectList } from "@/request/user_practitioner.js";
|
||||
const router = useRouter();
|
||||
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
|
@ -152,9 +153,16 @@ onMounted(async () => {
|
|||
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({
|
||||
form: {
|
||||
TRANSPORTVEHICLE: "",
|
||||
|
@ -167,12 +175,6 @@ const data = reactive({
|
|||
fileList: [],
|
||||
},
|
||||
});
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = userList
|
||||
data.unitsList = resData.userList.varList;
|
||||
};
|
||||
fnGetUnitsList();
|
||||
|
||||
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
|
@ -193,7 +195,7 @@ const fnSubmit = async () => {
|
|||
ElMessage.success("添加成功");
|
||||
}
|
||||
|
||||
router.push("/production_course_regulate/violation_registration");
|
||||
await router.push("/production_course_regulate/violation_registration");
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -105,7 +105,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getUserListAll } from "@/request/safety_production_related.js";
|
||||
import { onMounted, reactive, ref, toRaw } from "vue";
|
||||
import { PENALTYMETHODMENU, TRUCKMENU } from "@/assets/js/constant.js";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
|
@ -117,6 +116,7 @@ import {
|
|||
infoViolationRegistration,
|
||||
} from "@/request/violation_registration.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { getUserSelectListAll } from "@/request/user_practitioner.js";
|
||||
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
|
@ -150,7 +150,7 @@ onMounted(() => {
|
|||
});
|
||||
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = await getUserListAll({});
|
||||
const resData = await getUserSelectListAll({});
|
||||
data.unitsList = resData.userList;
|
||||
};
|
||||
fnGetUnitsList();
|
||||
|
|
|
@ -120,7 +120,7 @@ import {
|
|||
getViolationRegistrationList,
|
||||
setViolationRegistrationDelete,
|
||||
} from "@/request/violation_registration.js";
|
||||
import { getUserListAll } from "@/request/safety_production_related.js";
|
||||
import {getUserSelectListAll} from "@/request/user_practitioner.js";
|
||||
|
||||
const router = useRouter();
|
||||
const convertTransportVehicle = (name) => {
|
||||
|
@ -132,7 +132,7 @@ const convertPENALTYMETHOD = (name) => {
|
|||
return vehicle ? vehicle.id : "未知处罚方式";
|
||||
};
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = await getUserListAll({});
|
||||
const resData = await getUserSelectListAll({});
|
||||
data.unitsList = resData.userList;
|
||||
};
|
||||
fnGetUnitsList();
|
||||
|
|
|
@ -113,13 +113,13 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getUserListAll } from "@/request/safety_production_related.js";
|
||||
import { addSafetyMeetingView } from "@/request/traffic_safety_meeting.js";
|
||||
import { reactive, ref } from "vue";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import LayoutEditor from "@/components/editor/index.vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {getUserSelectListAll} from "@/request/user_practitioner.js";
|
||||
const formRef = ref(null);
|
||||
const cities = [
|
||||
"驾驶员",
|
||||
|
@ -154,12 +154,6 @@ const rules = {
|
|||
],
|
||||
};
|
||||
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = await getUserListAll({});
|
||||
data.unitsList = resData.varList;
|
||||
};
|
||||
fnGetUnitsList();
|
||||
|
||||
const data = reactive({
|
||||
form: {
|
||||
MEETING_TITLE: "",
|
||||
|
|
|
@ -139,7 +139,6 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getUserListAll } from "@/request/safety_production_related.js";
|
||||
import { addSafetyMeetingView } from "@/request/traffic_safety_meeting.js";
|
||||
import { reactive, ref } from "vue";
|
||||
import { MEETINGTYPEMENU } from "@/assets/js/constant.js";
|
||||
|
@ -149,6 +148,7 @@ import useFormValidate from "@/assets/js/useFormValidate.js";
|
|||
import { ElMessage } from "element-plus";
|
||||
import SelectPerson from "@/views/safety_production_related/security_notice/components/select_person.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { getUserSelectListAll } from "@/request/user_practitioner.js";
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
MEETING_TITLE: [
|
||||
|
@ -178,11 +178,6 @@ const rules = {
|
|||
};
|
||||
|
||||
const router = useRouter();
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = await getUserListAll({});
|
||||
data.unitsList = resData.varList;
|
||||
};
|
||||
fnGetUnitsList();
|
||||
|
||||
const data = reactive({
|
||||
form: {
|
||||
|
|
|
@ -15,16 +15,13 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="从业类型" prop="PRACTITIONERTYPE">
|
||||
<el-select
|
||||
v-model="searchForm.PRACTITIONERTYPE"
|
||||
placeholder="请选择从业类型"
|
||||
>
|
||||
<el-form-item label="从业类型" prop="PERSONNEL_TYPE">
|
||||
<el-select v-model="searchForm.PERSONNEL_TYPE">
|
||||
<el-option
|
||||
v-for="item in PERSONTYPEMENU"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
:value="item.name"
|
||||
v-for="item in data.personnelTypeList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -52,10 +49,11 @@
|
|||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="USER_ID" label="用户Id" />
|
||||
<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="PRACTITIONERTYPE" label="从业类型" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
</layout-table>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
|
@ -69,11 +67,11 @@
|
|||
import { useVModel } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { watch } from "vue";
|
||||
import { reactive, watch } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { differenceWith } from "lodash-es";
|
||||
import { getUserListAll } from "@/request/safety_production_related.js";
|
||||
import { PERSONTYPEMENU } from "@/assets/js/constant.js";
|
||||
import { getUserSelectListAll } from "@/request/user_practitioner.js";
|
||||
import { layoutFnGetPersonnelTypeTraffic } from "@/assets/js/data_dictionary.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
|
@ -91,11 +89,19 @@ const emits = defineEmits(["update:visible", "submit", "submitall"]);
|
|||
const visible = useVModel(props, "visible", emits);
|
||||
|
||||
const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getUserListAll, {
|
||||
useListData(getUserSelectListAll, {
|
||||
key: "userList",
|
||||
immediate: false,
|
||||
});
|
||||
const data = reactive({
|
||||
personnelTypeList: [],
|
||||
});
|
||||
|
||||
const { value: personnelTypeList } = await layoutFnGetPersonnelTypeTraffic({
|
||||
DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e",
|
||||
BIANMA: "TRAFFIC_EMPLOYMENT",
|
||||
});
|
||||
data.personnelTypeList = personnelTypeList;
|
||||
const stop = watch(
|
||||
() => props.visible,
|
||||
(value) => {
|
||||
|
|
|
@ -107,7 +107,6 @@
|
|||
<script setup>
|
||||
import {
|
||||
layoutFnGetNotificationsClassification,
|
||||
getUserListAll,
|
||||
addSecurityNotice,
|
||||
} from "@/request/safety_production_related.js";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
|
@ -164,11 +163,6 @@ const fnPerson = async () => {
|
|||
data.personList = [resData.pd];
|
||||
};
|
||||
|
||||
const fnGetUnitsList = async () => {
|
||||
const resData = await getUserListAll({});
|
||||
data.unitsList = resData.varList;
|
||||
};
|
||||
fnGetUnitsList();
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
|
|
|
@ -15,16 +15,13 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="从业类型" prop="PRACTITIONERTYPE">
|
||||
<el-select
|
||||
v-model="searchForm.PRACTITIONERTYPE"
|
||||
placeholder="请选择从业类型"
|
||||
>
|
||||
<el-form-item label="从业类型" prop="PERSONNEL_TYPE">
|
||||
<el-select v-model="searchForm.PERSONNEL_TYPE">
|
||||
<el-option
|
||||
v-for="item in PERSONTYPEMENU"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
:value="item.name"
|
||||
v-for="item in data.personnelTypeList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -52,10 +49,11 @@
|
|||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="USER_ID" label="用户Id" />
|
||||
<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="PHONE" label="手机号" />
|
||||
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
</layout-table>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
|
@ -69,10 +67,10 @@
|
|||
import { useVModel } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { watch } from "vue";
|
||||
import { reactive, watch } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { getUserListAll } from "@/request/safety_production_related.js";
|
||||
import { PERSONTYPEMENU } from "@/assets/js/constant.js";
|
||||
import { getUserSelectListAll } from "@/request/user_practitioner.js";
|
||||
import { layoutFnGetPersonnelTypeTraffic } from "@/assets/js/data_dictionary.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
|
@ -90,11 +88,19 @@ const emits = defineEmits(["update:visible", "submit", "submitall"]);
|
|||
const visible = useVModel(props, "visible", emits);
|
||||
|
||||
const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getUserListAll, {
|
||||
useListData(getUserSelectListAll, {
|
||||
key: "userList",
|
||||
immediate: false,
|
||||
});
|
||||
const data = reactive({
|
||||
personnelTypeList: [],
|
||||
});
|
||||
|
||||
const { value: personnelTypeList } = await layoutFnGetPersonnelTypeTraffic({
|
||||
DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e",
|
||||
BIANMA: "TRAFFIC_EMPLOYMENT",
|
||||
});
|
||||
data.personnelTypeList = personnelTypeList;
|
||||
const stop = watch(
|
||||
() => props.visible,
|
||||
(value) => {
|
||||
|
|
Loading…
Reference in New Issue