forked from integrated_whb/integrated_whb_vue
人员与辨别部位对接第三方
parent
0a76bcbdf0
commit
53b63fabc1
|
@ -13,6 +13,10 @@ export const getRiskPointInspectList = (params) =>
|
|||
post("/riskunit/getRisByUnitId", params); // 风险点单元检查内容
|
||||
export const getIdentifyingPartsList = (params) =>
|
||||
post("/identificationparts/list", params); // 辨识部位列表
|
||||
|
||||
export const getRyRegionList = (params) =>
|
||||
post("/identificationparts/ryRegionList", params); // 电子围栏列表
|
||||
|
||||
export const getIdentifyingPartsListById = (params) =>
|
||||
post("/identificationparts/listAllByIdens", params); // 辨识部位列表所有根据ID
|
||||
export const getIdentifyingPartsView = (params) =>
|
||||
|
|
|
@ -54,6 +54,17 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="定位卡号" prop="CARDNO">
|
||||
<el-input
|
||||
v-model="data.form.CARDNO"
|
||||
maxlength="4"
|
||||
minlength="4"
|
||||
show-word-limit
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="姓名" prop="NAME">
|
||||
<el-input v-model="data.form.NAME" placeholder="请输入" />
|
||||
|
@ -516,6 +527,14 @@ const rules = {
|
|||
ENTRY_DATE: [
|
||||
{ required: true, message: "请选择入职日期", trigger: "change" },
|
||||
],
|
||||
CARDNO: [
|
||||
{ required: true, message: "请输入定位卡号(4位纯数字)", trigger: "blur" },
|
||||
{
|
||||
pattern: /^-?[0-9]\d*$/,
|
||||
message: "请输入正确的定位卡号(4位纯数字)",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
WORKING_DATE: [
|
||||
{ required: true, message: "请选择参加工作日期", trigger: "change" },
|
||||
],
|
||||
|
@ -560,6 +579,7 @@ const data = reactive({
|
|||
oldDepartId: "",
|
||||
form: {
|
||||
ROLE_ID: "",
|
||||
CARDNO: "",
|
||||
DEPARTMENT_ID: "",
|
||||
POST_ID: "",
|
||||
USERNAME: "",
|
||||
|
|
|
@ -27,44 +27,135 @@
|
|||
:limit="99"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子围栏" prop="ELECTRONIC_FENCE">
|
||||
<el-input
|
||||
v-model="form.ELECTRONIC_FENCE"
|
||||
style="width: 240px"
|
||||
disabled
|
||||
/>
|
||||
<el-button type="primary" @click="fnRegName" style="margin-left: 10px"
|
||||
>添加</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
@click="fnRemoveRegName"
|
||||
style="margin-left: 10px"
|
||||
>移除</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-drawer
|
||||
v-model="data.drawer"
|
||||
title="电子围栏台账"
|
||||
direction="rtl"
|
||||
:before-close="handleClose"
|
||||
size="50%"
|
||||
>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="20px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="关键字" prop="KEYWORDS" label-width="60px">
|
||||
<el-input
|
||||
v-model="searchForm.KEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label-width="30px">
|
||||
<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>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="70">
|
||||
<template v-slot="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="layName" label="所属图层" width="150" />
|
||||
<el-table-column property="regName" label="名称" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="{ row }">
|
||||
<el-button type="primary" text link @click="handleJoin(row)"
|
||||
>绑定</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { nextTick, reactive, ref } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
getRiskPointListAll,
|
||||
getRyRegionList,
|
||||
setIdentifyingPartsAdd,
|
||||
setIdentifyingPartsEdit,
|
||||
} from "@/request/risk_control.js";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getRyRegionList);
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
options: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const data = reactive({
|
||||
drawer: false,
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
|
@ -86,6 +177,35 @@ const fnClose = () => {
|
|||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const handleJoin = debounce(
|
||||
1000,
|
||||
async (row) => {
|
||||
form.value.ELECTRONIC_FENCE = row.regName;
|
||||
form.value.ELECTRONIC_FENCE_ID = row.uuid;
|
||||
data.drawer = false;
|
||||
await nextTick();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnRemoveRegName = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
form.value.ELECTRONIC_FENCE = "";
|
||||
form.value.ELECTRONIC_FENCE_ID = "";
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnRegName = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
data.drawer = true;
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
|
||||
const handleClose = () => {
|
||||
data.drawer = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
|
|
Loading…
Reference in New Issue