forked from integrated_whb/integrated_whb_vue
Merge branch 'dev' of http://47.92.113.182:3000/wangpeng/integrated_traffic_vue into dev
commit
78d6c9f6b2
|
@ -34,3 +34,10 @@ export const getUserSelectListAll = (params) =>
|
|||
// 人员列表(select)
|
||||
export const getPractitionerSelectList = (params) =>
|
||||
post("/user/getPractitionerSelectList", params);
|
||||
|
||||
// 获取没有任何企业的所有用户
|
||||
export const getUserNoCorpinfoListAll = (params) =>
|
||||
post("/user/getUserNoCorpinfoListAll", params);
|
||||
|
||||
export const getUserNoCorpinfoDataById = (params) =>
|
||||
post("/user/getUserNoCorpinfoDataById", params);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,135 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="选择人员" width="1500">
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="姓名" prop="NAME">
|
||||
<el-input
|
||||
v-model="searchForm.NAME"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="身份证号" prop="ID_CARD">
|
||||
<el-input
|
||||
v-model="searchForm.ID_CARD"
|
||||
placeholder="请输入身份证号"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="手机号" prop="PHONE">
|
||||
<el-input
|
||||
v-model="searchForm.PHONE"
|
||||
placeholder="请输入手机号"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
row-key="USER_ID"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="70">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="姓名" />
|
||||
<el-table-column prop="USERNAME" label="身份证号" />
|
||||
<el-table-column prop="PHONE" label="手机号" />
|
||||
</layout-table>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { reactive, watch } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { differenceWith } from "lodash-es";
|
||||
import { getUserNoCorpinfoListAll } from "@/request/user_practitioner.js";
|
||||
import { layoutFnGetPersonnelTypeTraffic } from "@/assets/js/data_dictionary.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
listData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "submit", "submitall"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
|
||||
const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getUserNoCorpinfoListAll, {
|
||||
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) => {
|
||||
if (value) {
|
||||
fnGetData();
|
||||
stop && stop();
|
||||
}
|
||||
}
|
||||
);
|
||||
const fnClose = () => {
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
() => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
const listData = differenceWith(
|
||||
selectionData,
|
||||
props.listData,
|
||||
(a, b) => a.RISKCHECKITEM_ID === b.RISKCHECKITEM_ID
|
||||
);
|
||||
fnClose();
|
||||
emits("submit", listData);
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -159,6 +159,17 @@
|
|||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.add"
|
||||
type="warning"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/enterprise_management/user_practitioner/choiceadd',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加已有人员
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
|
|
|
@ -164,6 +164,7 @@ const { list, searchForm, fnGetData, tableRef } = useListData(
|
|||
usePagination: false,
|
||||
defaultSearchForm: {
|
||||
YEAR: new Date().getFullYear(),
|
||||
costItems: JSON.stringify(costItems),
|
||||
},
|
||||
callbackFn: (list) => {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue