fix: BUG修改
This commit is contained in:
parent
71192ed33a
commit
215a6ac3d5
@ -3,8 +3,8 @@ NODE_ENV = "production"
|
|||||||
|
|
||||||
# 线上环境接口地址(easymock)
|
# 线上环境接口地址(easymock)
|
||||||
# VITE_API_URL = "http://139.9.66.234:6688"
|
# VITE_API_URL = "http://139.9.66.234:6688"
|
||||||
# VITE_API_URL = "http://182.90.224.147:6688"
|
VITE_API_URL = "http://182.90.224.147:6688"
|
||||||
VITE_API_URL = "http://101.43.164.214:6688"
|
# VITE_API_URL = "http://101.43.164.214:6688"
|
||||||
|
|
||||||
# 打包
|
# 打包
|
||||||
VITE_ULD_API_URL = 'http://182.90.224.147:8012/onlinePreview?url='
|
VITE_ULD_API_URL = 'http://182.90.224.147:8012/onlinePreview?url='
|
||||||
|
|||||||
@ -58,6 +58,10 @@ export const getpreviewURLS = (params: { cameraIndexCode: string | null }) => {
|
|||||||
export const getmanualCaptureL = (params: {}) => {
|
export const getmanualCaptureL = (params: {}) => {
|
||||||
return http.post(BASEURL + `/xmgl/video/manualCapture`, params);
|
return http.post(BASEURL + `/xmgl/video/manualCapture`, params);
|
||||||
};
|
};
|
||||||
|
// 海康视频配置信息
|
||||||
|
export const getConfigInfo = (params: {}) => {
|
||||||
|
return http.get(BASEURL + `/xmgl/video/getConfig`, params);
|
||||||
|
};
|
||||||
|
|
||||||
// 通知公告!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
// 通知公告!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
// 新建通知
|
// 新建通知
|
||||||
|
|||||||
@ -334,3 +334,13 @@ export const addMember = (params: FormData) => {
|
|||||||
export const getMemberList = (params: FormData) => {
|
export const getMemberList = (params: FormData) => {
|
||||||
return http.post(BASEURL + `/project/workerInfo/page`, params);
|
return http.post(BASEURL + `/project/workerInfo/page`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 人员管理详情
|
||||||
|
export const memberInfo = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/workerInfo/queryById`, params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 人员管理编辑
|
||||||
|
export const updateMember = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/workerInfo/edit`, params);
|
||||||
|
};
|
||||||
|
|||||||
BIN
src/assets/images/dialogIcon/tipIcon.png
Normal file
BIN
src/assets/images/dialogIcon/tipIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 830 B |
@ -12,7 +12,7 @@
|
|||||||
v-show="isShowSearch"
|
v-show="isShowSearch"
|
||||||
>
|
>
|
||||||
<template #formButton>
|
<template #formButton>
|
||||||
<slot name="formButton"></slot>
|
<slot name="formButton" :selectedListIds="selectedListIds" :selectedList="selectedList" :isSelected="isSelected"></slot>
|
||||||
</template>
|
</template>
|
||||||
</SearchForm>
|
</SearchForm>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import { ref, reactive, onMounted, onBeforeUnmount, getCurrentInstance, nextTick
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
import { getvideoEngTreeList } from "@/api/modules/enterpriseApi";
|
import { getvideoEngTreeList } from "@/api/modules/enterpriseApi";
|
||||||
import { getpreviewURL } from "@/api/modules/common";
|
import { getpreviewURL, getConfigInfo } from "@/api/modules/common";
|
||||||
import TreeFilter from "@/components/TreeFilter/index.vue";
|
import TreeFilter from "@/components/TreeFilter/index.vue";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
|
|
||||||
@ -41,10 +41,10 @@ let initCount = ref(0);
|
|||||||
let oWebControl = ref(null);
|
let oWebControl = ref(null);
|
||||||
let cameraIndexCode = ref<Array<string>>([]);
|
let cameraIndexCode = ref<Array<string>>([]);
|
||||||
let objData = ref({
|
let objData = ref({
|
||||||
appkey: "21582859", //海康提供的appkey
|
appkey: "24017757", //海康提供的appkey
|
||||||
ip: "120.236.122.37", //海康提供的ip
|
ip: "182.101.141.23", //海康提供的ip
|
||||||
secret: "CfxWWzB9MEC5y6R5CmWI", //海康提供的secret
|
secret: "VJz0FbzmE6drPQ7egsBi", //海康提供的secret
|
||||||
port: 81,
|
port: 18443,
|
||||||
playMode: 0, // 0 预览 1回放
|
playMode: 0, // 0 预览 1回放
|
||||||
layout: "4x6" //页面展示的模块数【16】
|
layout: "4x6" //页面展示的模块数【16】
|
||||||
});
|
});
|
||||||
@ -87,10 +87,26 @@ const getVideo = async () => {
|
|||||||
// await sendRequest({ code: cameraIndexCode.value });
|
// await sendRequest({ code: cameraIndexCode.value });
|
||||||
await getpreviewURL({ cameraIndexCode: cameraIndexCode.value });
|
await getpreviewURL({ cameraIndexCode: cameraIndexCode.value });
|
||||||
};
|
};
|
||||||
|
// 获取视频配置信息
|
||||||
|
const getVideoConfig = async () => {
|
||||||
|
// await sendRequest({ code: cameraIndexCode.value });
|
||||||
|
const res = await getConfigInfo({});
|
||||||
|
// objData.value = ref({
|
||||||
|
// appkey: res.result.appKey, //海康提供的appkey
|
||||||
|
// ip: res.result.ip, //海康提供的ip
|
||||||
|
// secret: res.result.appSecret, //海康提供的secret
|
||||||
|
// port: +res.result.port,
|
||||||
|
// playMode: 0, // 0 预览 1回放
|
||||||
|
// layout: "4x6" //页面展示的模块数【16】
|
||||||
|
// });
|
||||||
|
// console.log(objData.value);
|
||||||
|
};
|
||||||
|
|
||||||
/** 设备列表的点击操作 */
|
/** 设备列表的点击操作 */
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
// 获取配置信息
|
||||||
|
getVideoConfig();
|
||||||
// 获取页面的实例对象 ee
|
// 获取页面的实例对象 ee
|
||||||
const pageInstance = getCurrentInstance();
|
const pageInstance = getCurrentInstance();
|
||||||
// 获取dom节点对象
|
// 获取dom节点对象
|
||||||
|
|||||||
@ -159,7 +159,7 @@ import { ref, reactive, onMounted, onBeforeUnmount, getCurrentInstance, nextTick
|
|||||||
import { ElMessage, ElMessageBox, ElStep } from "element-plus";
|
import { ElMessage, ElMessageBox, ElStep } from "element-plus";
|
||||||
|
|
||||||
import { getVideoQuestionPage, getvideoProTreeList, getvideoEngTreeList, addmonitorQuestion } from "@/api/modules/goverment";
|
import { getVideoQuestionPage, getvideoProTreeList, getvideoEngTreeList, addmonitorQuestion } from "@/api/modules/goverment";
|
||||||
import { getpreviewURL, getmanualCaptureL, getpreviewURLS } from "@/api/modules/common";
|
import { getpreviewURL, getmanualCaptureL, getpreviewURLS, getConfigInfo } from "@/api/modules/common";
|
||||||
import TreeFilter from "@/components/TreeFilter/index.vue";
|
import TreeFilter from "@/components/TreeFilter/index.vue";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
import Pagination from "@/components/ProTable/components/Pagination.vue";
|
import Pagination from "@/components/ProTable/components/Pagination.vue";
|
||||||
@ -219,10 +219,10 @@ let initCount = ref(0);
|
|||||||
let oWebControl = ref(null);
|
let oWebControl = ref(null);
|
||||||
let cameraIndexCode = ref<Array<string>>([]);
|
let cameraIndexCode = ref<Array<string>>([]);
|
||||||
let objData = ref({
|
let objData = ref({
|
||||||
appkey: "21582859", //海康提供的appkey
|
appkey: "24017757", //海康提供的appkey
|
||||||
ip: "120.236.122.37", //海康提供的ip
|
ip: "182.101.141.23", //海康提供的ip
|
||||||
secret: "CfxWWzB9MEC5y6R5CmWI", //海康提供的secret
|
secret: "VJz0FbzmE6drPQ7egsBi", //海康提供的secret
|
||||||
port: 81,
|
port: 18443,
|
||||||
playMode: 0, // 0 预览 1回放
|
playMode: 0, // 0 预览 1回放
|
||||||
layout: "4x6" //页面展示的模块数【16】
|
layout: "4x6" //页面展示的模块数【16】
|
||||||
});
|
});
|
||||||
@ -400,6 +400,20 @@ const getVideo = async () => {
|
|||||||
// await sendRequest({ code: cameraIndexCode.value });
|
// await sendRequest({ code: cameraIndexCode.value });
|
||||||
await getpreviewURL({ cameraIndexCode: cameraIndexCode.value });
|
await getpreviewURL({ cameraIndexCode: cameraIndexCode.value });
|
||||||
};
|
};
|
||||||
|
// 获取视频配置信息
|
||||||
|
const getVideoConfig = async () => {
|
||||||
|
// await sendRequest({ code: cameraIndexCode.value });
|
||||||
|
const res = await getConfigInfo({});
|
||||||
|
// objData.value = ref({
|
||||||
|
// appkey: res.result.appKey, //海康提供的appkey
|
||||||
|
// ip: res.result.ip, //海康提供的ip
|
||||||
|
// secret: res.result.appSecret, //海康提供的secret
|
||||||
|
// port: +res.result.port,
|
||||||
|
// playMode: 0, // 0 预览 1回放
|
||||||
|
// layout: "4x6" //页面展示的模块数【16】
|
||||||
|
// });
|
||||||
|
// console.log(objData.value);
|
||||||
|
};
|
||||||
|
|
||||||
// form日期选择后改变入参
|
// form日期选择后改变入参
|
||||||
const onDatePicker = () => {
|
const onDatePicker = () => {
|
||||||
@ -450,6 +464,8 @@ watch(
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
// 获取配置信息
|
||||||
|
getVideoConfig();
|
||||||
// 获取页面的实例对象 ee
|
// 获取页面的实例对象 ee
|
||||||
const pageInstance = getCurrentInstance();
|
const pageInstance = getCurrentInstance();
|
||||||
// 获取dom节点对象
|
// 获取dom节点对象
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="overview">
|
<div class="overview">
|
||||||
<el-dialog title="新增工人" show-close v-model="visible1" style="min-width: 1500px">
|
<el-dialog :title="props.title" show-close v-model="visible1" style="min-width: 1500px">
|
||||||
<el-form ref="ruleFormRef" :model="form" :rules="rules" label-width="200px" class="form" size="default">
|
<el-form ref="ruleFormRef" :model="form" :rules="rules" label-width="200px" class="form" size="default">
|
||||||
<!-- 基础信息 -->
|
<!-- 基础信息 -->
|
||||||
<div>
|
<div>
|
||||||
@ -338,7 +338,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer class="footer flx-center">
|
<footer class="footer flx-center" v-if="title == '新增人员'">
|
||||||
<el-button class="cancelButtonStyle" @click="visible1 = false">取消</el-button>
|
<el-button class="cancelButtonStyle" @click="visible1 = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submitForm(form)">保存</el-button>
|
<el-button type="primary" @click="submitForm(form)">保存</el-button>
|
||||||
</footer>
|
</footer>
|
||||||
@ -348,7 +348,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch, reactive } from "vue";
|
||||||
import type { FormInstance, UploadProps } from "element-plus";
|
import type { FormInstance, UploadProps } from "element-plus";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { getDicList } from "@/api/modules/jxjview";
|
import { getDicList } from "@/api/modules/jxjview";
|
||||||
@ -356,7 +356,9 @@ import { getBuildUnitAll, getClassGroupAll, getworkTypeAll } from "@/api/modules
|
|||||||
const baseUrl = import.meta.env.VITE_API_URL;
|
const baseUrl = import.meta.env.VITE_API_URL;
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
newMemberDialog: Boolean,
|
newMemberDialog: Boolean,
|
||||||
engineeringSn: String
|
engineeringSn: String,
|
||||||
|
title: String,
|
||||||
|
formData: Object
|
||||||
});
|
});
|
||||||
const visible1 = ref(false);
|
const visible1 = ref(false);
|
||||||
const changeType = ref(1);
|
const changeType = ref(1);
|
||||||
@ -461,13 +463,6 @@ const rules = ref({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
const enum Type {
|
|
||||||
One = 1,
|
|
||||||
Two = 2,
|
|
||||||
Three = 3,
|
|
||||||
Four = 4,
|
|
||||||
Five = 5
|
|
||||||
}
|
|
||||||
const politicsStatusList = ref([
|
const politicsStatusList = ref([
|
||||||
{ label: "中共党员", value: 1 },
|
{ label: "中共党员", value: 1 },
|
||||||
{ label: "共青团团员", value: 2 },
|
{ label: "共青团团员", value: 2 },
|
||||||
@ -504,46 +499,7 @@ const bankTypeList: any = ref([
|
|||||||
{ label: "邮政储蓄银行", value: 14 },
|
{ label: "邮政储蓄银行", value: 14 },
|
||||||
{ label: "浙商银行", value: 15 }
|
{ label: "浙商银行", value: 15 }
|
||||||
]);
|
]);
|
||||||
const form = ref({
|
const form = ref();
|
||||||
personName: "",
|
|
||||||
sex: 1,
|
|
||||||
birthday: "",
|
|
||||||
nation: "",
|
|
||||||
registerAddress: "",
|
|
||||||
idCard: "",
|
|
||||||
issuingAuthorityForIdCard: "",
|
|
||||||
idCardExpireDate: "",
|
|
||||||
idCardFront: "",
|
|
||||||
idCardBack: "",
|
|
||||||
portrait: "",
|
|
||||||
phone: "",
|
|
||||||
address: "",
|
|
||||||
companySn: "",
|
|
||||||
teamSn: "",
|
|
||||||
workerType: null,
|
|
||||||
personType: Type["One"],
|
|
||||||
safetyEducation: Type["One"],
|
|
||||||
isPurchaseInsurance: Type["One"],
|
|
||||||
isContract: Type["One"],
|
|
||||||
contractImage: "",
|
|
||||||
isPhysicalExamination: Type["One"],
|
|
||||||
bankType: null,
|
|
||||||
bankCard: "",
|
|
||||||
realNameCardNumber: "",
|
|
||||||
bankName: "",
|
|
||||||
bankCode: "",
|
|
||||||
politicsStatus: null,
|
|
||||||
educationLevel: null,
|
|
||||||
academicDegree: null,
|
|
||||||
haveMedicalHistory: Type["One"],
|
|
||||||
natureOfAccount: Type["One"],
|
|
||||||
maritalStatus: null,
|
|
||||||
contacts: "",
|
|
||||||
contactsTel: "",
|
|
||||||
entryTime: "",
|
|
||||||
trainingTime: "",
|
|
||||||
personEmail: ""
|
|
||||||
});
|
|
||||||
// 图片上传成功后的钩子
|
// 图片上传成功后的钩子
|
||||||
const handleAvatarSuccess: UploadProps["onSuccess"] = (response, uploadFile, index) => {
|
const handleAvatarSuccess: UploadProps["onSuccess"] = (response, uploadFile, index) => {
|
||||||
console.log(response.result.url);
|
console.log(response.result.url);
|
||||||
@ -644,6 +600,11 @@ const getDicMainList = async () => {
|
|||||||
educationLevelList.value.length = 0;
|
educationLevelList.value.length = 0;
|
||||||
educationLevelList.value.push(...result);
|
educationLevelList.value.push(...result);
|
||||||
};
|
};
|
||||||
|
// 重置表单
|
||||||
|
const resetForm = (formEl: FormInstance | undefined) => {
|
||||||
|
if (!formEl) return;
|
||||||
|
formEl.resetFields();
|
||||||
|
};
|
||||||
// 监听父组件的visible,用来简介控制el-dialog的弹框开关,一般是用于开
|
// 监听父组件的visible,用来简介控制el-dialog的弹框开关,一般是用于开
|
||||||
watch(
|
watch(
|
||||||
() => props.newMemberDialog,
|
() => props.newMemberDialog,
|
||||||
@ -660,8 +621,19 @@ watch(
|
|||||||
watch(visible1, (n, o) => {
|
watch(visible1, (n, o) => {
|
||||||
emits("update:newMemberDialog", n);
|
emits("update:newMemberDialog", n);
|
||||||
});
|
});
|
||||||
|
watch(
|
||||||
|
() => props.formData,
|
||||||
|
(n, o) => {
|
||||||
|
resetForm(ruleFormRef.value);
|
||||||
|
console.log(props.formData);
|
||||||
|
form.value = reactive(n);
|
||||||
|
}
|
||||||
|
);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDicMainList();
|
getDicMainList();
|
||||||
|
// 初始化 配置formData
|
||||||
|
console.log(props.formData);
|
||||||
|
form.value = reactive(props.formData);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<ProTable
|
<ProTable
|
||||||
ref="proTable"
|
ref="proTable"
|
||||||
title="班组管理列表"
|
title="人员管理列表"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:requestApi="getTableList"
|
:requestApi="getTableList"
|
||||||
:dataCallback="dataCallback"
|
:dataCallback="dataCallback"
|
||||||
@ -15,15 +15,27 @@
|
|||||||
>
|
>
|
||||||
<template #formButton="scope">
|
<template #formButton="scope">
|
||||||
<el-button class="addButtonStyle" @click="handleAddItem(1)">新增</el-button>
|
<el-button class="addButtonStyle" @click="handleAddItem(1)">新增</el-button>
|
||||||
<el-button type="primary" @click="handleAddItem(1)">批量复职</el-button>
|
<el-button type="primary" :disabled="!scope.isSelected" @click="batchOperate(1, scope.selectedListIds)"
|
||||||
<el-button type="primary" @click="handleAddItem(1)">批量离场</el-button>
|
>批量复职</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" :disabled="!scope.isSelected" @click="batchOperate(2, scope)">批量离场</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button type="primary" link @click="handleAddItem(2, row)">
|
<el-button type="primary" link @click="handleAddItem(2, row)">
|
||||||
<img src="@/assets/images/tableIcon/updateIcon.png" alt="" class="configureIcon" />
|
<img src="@/assets/images/tableIcon/look.png" alt="" class="configureIcon" />
|
||||||
<span>编辑</span>
|
<span>查看</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" link :icon="Delete" @click="deleteGroup(row)">删除</el-button>
|
<el-button type="primary" link @click="handleEditItem(1, row)">
|
||||||
|
<img src="@/assets/images/tableIcon/调动.png" alt="" class="configureIcon" />
|
||||||
|
<span>调动</span>
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" link @click="handleEditItem(2, row)">
|
||||||
|
<img src="@/assets/images/tableIcon/离场.png" alt="" class="configureIcon" />
|
||||||
|
<span>离场</span>
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
<template #portrait="{ row }">
|
||||||
|
<el-image style="width: 26px; height: 37px" :src="row.portrait" fit="fill"></el-image>
|
||||||
</template>
|
</template>
|
||||||
<template #state="{ row }">
|
<template #state="{ row }">
|
||||||
<span :class="row.state === 1 ? '' : 'redText'">{{ row.state == 1 ? "启用" : "禁用" }}</span>
|
<span :class="row.state === 1 ? '' : 'redText'">{{ row.state == 1 ? "启用" : "禁用" }}</span>
|
||||||
@ -49,19 +61,50 @@
|
|||||||
</engineeringDrawer>
|
</engineeringDrawer>
|
||||||
<allEngineering @click="engVisable = true" />
|
<allEngineering @click="engVisable = true" />
|
||||||
<addMemberForm
|
<addMemberForm
|
||||||
|
:title="title"
|
||||||
v-model:newMemberDialog="newMemberDialog"
|
v-model:newMemberDialog="newMemberDialog"
|
||||||
|
:formData="formData"
|
||||||
:engineeringSn="initParam.engineeringSn"
|
:engineeringSn="initParam.engineeringSn"
|
||||||
@confirm="saveItem"
|
@confirm="saveItem"
|
||||||
></addMemberForm>
|
></addMemberForm>
|
||||||
<DialogForm
|
<DialogForm
|
||||||
:title="title"
|
title="调动"
|
||||||
:formConfig="formConfig"
|
:formConfig="moveFormConfig"
|
||||||
:formData="formData"
|
:formData="moveFormData"
|
||||||
v-model:visible="visible"
|
v-model:visible="moveVisible"
|
||||||
|
append-to-body
|
||||||
|
width="700px"
|
||||||
|
@confirm="saveMoveItem"
|
||||||
|
>
|
||||||
|
<template #header>
|
||||||
|
<div class="title-transform">
|
||||||
|
<img src="@/assets/images/tableIcon/调动.png" alt="" />
|
||||||
|
<span>调动</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</DialogForm>
|
||||||
|
<DialogForm
|
||||||
|
title="离场"
|
||||||
|
:formConfig="exitFormConfig"
|
||||||
|
:formData="exitFormData"
|
||||||
|
v-model:visible="exitVisible"
|
||||||
append-to-body
|
append-to-body
|
||||||
width="700px"
|
width="700px"
|
||||||
@confirm="saveItem"
|
@confirm="saveItem"
|
||||||
>
|
>
|
||||||
|
<template #header>
|
||||||
|
<div class="title-transform">
|
||||||
|
<img src="@/assets/images/tableIcon/离场.png" alt="" />
|
||||||
|
<span>离场</span>
|
||||||
|
</div>
|
||||||
|
<div class="title-sub">
|
||||||
|
<img src="@/assets/images/tableIcon/离场.png" alt="" />
|
||||||
|
<div>
|
||||||
|
<img src="@/assets/images/dialogIcon/tipIcon.png" alt="" />
|
||||||
|
<span>温馨提示:人员到离职时间后不可通过像识别</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</DialogForm>
|
</DialogForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -81,14 +124,14 @@ import { editRolePermissions, getSystemRole, getTreemRoleList, getTreeByIdList }
|
|||||||
import {
|
import {
|
||||||
addClassGroup,
|
addClassGroup,
|
||||||
updateClassGroup,
|
updateClassGroup,
|
||||||
deleteClassGroup,
|
getClassGroupAll,
|
||||||
getMemberList,
|
getMemberList,
|
||||||
classGroupInfo,
|
memberInfo,
|
||||||
addMember
|
addMember,
|
||||||
|
updateMember
|
||||||
} from "@/api/modules/project";
|
} from "@/api/modules/project";
|
||||||
import DialogForm from "@/components/DialogForm/index.vue";
|
import DialogForm from "@/components/DialogForm/index.vue";
|
||||||
import addMemberForm from "./components/addMemberForm.vue";
|
import addMemberForm from "./components/addMemberForm.vue";
|
||||||
import { Delete } from "@element-plus/icons-vue";
|
|
||||||
|
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
|
|
||||||
@ -104,66 +147,109 @@ const defaultProps = {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const store = GlobalStore();
|
const store = GlobalStore();
|
||||||
const drawerVisible = ref(false);
|
const drawerVisible = ref(false);
|
||||||
const visible = ref(false);
|
const moveVisible = ref(false);
|
||||||
|
const exitVisible = ref(false);
|
||||||
const newMemberDialog = ref(false);
|
const newMemberDialog = ref(false);
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
|
const objRow = ref({});
|
||||||
// 如果表格需要初始化请求参数,直接定义传给 ProTable(之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
// 如果表格需要初始化请求参数,直接定义传给 ProTable(之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
||||||
const initParam = reactive({
|
const initParam = reactive({
|
||||||
solveFlag: 1,
|
solveFlag: 1,
|
||||||
engineeringSn: ""
|
engineeringSn: ""
|
||||||
});
|
});
|
||||||
const formData = ref({});
|
// 调动-表单
|
||||||
// 弹窗中的配置
|
const moveFormData = ref({});
|
||||||
const formConfig = {
|
// 离场-表单
|
||||||
|
const exitFormData = ref({});
|
||||||
|
const formData = ref({
|
||||||
|
personName: "",
|
||||||
|
sex: 1,
|
||||||
|
birthday: "",
|
||||||
|
nation: "",
|
||||||
|
registerAddress: "",
|
||||||
|
idCard: "",
|
||||||
|
issuingAuthorityForIdCard: "",
|
||||||
|
idCardExpireDate: "",
|
||||||
|
idCardFront: "",
|
||||||
|
idCardBack: "",
|
||||||
|
portrait: "",
|
||||||
|
phone: "",
|
||||||
|
address: "",
|
||||||
|
companySn: "",
|
||||||
|
teamSn: "",
|
||||||
|
workerType: null,
|
||||||
|
personType: 1,
|
||||||
|
safetyEducation: 1,
|
||||||
|
isPurchaseInsurance: 1,
|
||||||
|
isContract: 1,
|
||||||
|
contractImage: "",
|
||||||
|
isPhysicalExamination: 1,
|
||||||
|
bankType: null,
|
||||||
|
bankCard: "",
|
||||||
|
realNameCardNumber: "",
|
||||||
|
bankName: "",
|
||||||
|
bankCode: "",
|
||||||
|
politicsStatus: null,
|
||||||
|
educationLevel: null,
|
||||||
|
academicDegree: null,
|
||||||
|
haveMedicalHistory: 1,
|
||||||
|
natureOfAccount: 1,
|
||||||
|
maritalStatus: null,
|
||||||
|
contacts: "",
|
||||||
|
contactsTel: "",
|
||||||
|
entryTime: "",
|
||||||
|
trainingTime: "",
|
||||||
|
personEmail: ""
|
||||||
|
});
|
||||||
|
// 调动-弹窗中的配置
|
||||||
|
const moveFormConfig = {
|
||||||
formItemConfig: [
|
formItemConfig: [
|
||||||
{
|
{
|
||||||
label: "参建单位",
|
label: "班组",
|
||||||
prop: "companySn",
|
prop: "teamSn",
|
||||||
type: "select",
|
type: "select",
|
||||||
data: []
|
data: []
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "班组名称",
|
|
||||||
prop: "teamName",
|
|
||||||
type: "input"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "班组长",
|
|
||||||
prop: "leaderName",
|
|
||||||
type: "input"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "班组长电话",
|
|
||||||
prop: "leaderTel",
|
|
||||||
type: "input"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "进场时间",
|
|
||||||
prop: "entryTime",
|
|
||||||
type: "date",
|
|
||||||
format: "YYYY-MM-DD",
|
|
||||||
valueFormat: "YYYY-MM-DD"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
companySn: [
|
teamSn: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请选择",
|
message: "请选择",
|
||||||
trigger: "change"
|
trigger: "change"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
teamName: [
|
}
|
||||||
|
};
|
||||||
|
// 离场-弹窗中的配置
|
||||||
|
const exitFormConfig = {
|
||||||
|
formItemConfig: [
|
||||||
{
|
{
|
||||||
required: true,
|
label: "离场人员",
|
||||||
message: "请输入",
|
prop: "ids",
|
||||||
trigger: "blur"
|
type: "input"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "离场时间",
|
||||||
|
prop: "ids",
|
||||||
|
type: "radio",
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
label: "立即离场",
|
||||||
|
value: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "延时离场",
|
||||||
|
value: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
leaderTel: [
|
rules: {
|
||||||
|
teamSn: [
|
||||||
{
|
{
|
||||||
pattern: /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/,
|
required: true,
|
||||||
message: "请输入合法手机号",
|
message: "请选择",
|
||||||
trigger: "change"
|
trigger: "change"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -176,11 +262,14 @@ const getId = ref<number | undefined>(undefined);
|
|||||||
|
|
||||||
// 表格配置项
|
// 表格配置项
|
||||||
const columns: ColumnProps[] = [
|
const columns: ColumnProps[] = [
|
||||||
{ type: "index", label: "序号", width: 80 },
|
{ type: "selection", width: 80, fixed: "left" },
|
||||||
|
{ type: "index", label: "序号", width: 80, fixed: "left" },
|
||||||
{
|
{
|
||||||
prop: "companyName",
|
prop: "portrait",
|
||||||
label: "工程名称"
|
label: "照片",
|
||||||
|
fixed: "left"
|
||||||
},
|
},
|
||||||
|
{ prop: "personName", label: "姓名", fixed: "left", search: { el: "input" } },
|
||||||
{
|
{
|
||||||
prop: "personType",
|
prop: "personType",
|
||||||
label: "人员类别",
|
label: "人员类别",
|
||||||
@ -190,8 +279,6 @@ const columns: ColumnProps[] = [
|
|||||||
{ label: "工人", value: 2 }
|
{ label: "工人", value: 2 }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ prop: "teamName", label: "姓名", search: { el: "input" } },
|
|
||||||
{ prop: "teamName", label: "身份证号", search: { el: "input" } },
|
|
||||||
{
|
{
|
||||||
prop: "inServiceType",
|
prop: "inServiceType",
|
||||||
label: "人员状态",
|
label: "人员状态",
|
||||||
@ -201,8 +288,15 @@ const columns: ColumnProps[] = [
|
|||||||
{ label: "离场", value: 2 }
|
{ label: "离场", value: 2 }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ prop: "leaderName", label: "班组长" },
|
{ prop: "phone", label: "手机号" },
|
||||||
{ prop: "leaderTel", label: "班组长电话" },
|
{ prop: "idCard", label: "身份证号", search: { el: "input" } },
|
||||||
|
{ prop: "companyName", label: "参建单位" },
|
||||||
|
{ prop: "companyType", label: "参建单位类型" },
|
||||||
|
{ prop: "teamName", label: "班组" },
|
||||||
|
{ prop: "workerTypeName", label: "工种" },
|
||||||
|
{ prop: "entryTime", label: "进场时间" },
|
||||||
|
{ prop: "exitTime", label: "离场时间" },
|
||||||
|
{ prop: "age", label: "年龄" },
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
|
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -218,6 +312,21 @@ const dataCallback = (data: any) => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 批量操作
|
||||||
|
const batchOperate = (index: number, ids: []) => {
|
||||||
|
console.log(666);
|
||||||
|
console.log(index, ids);
|
||||||
|
// if(index == 1) {
|
||||||
|
// await useHandleData(deleteUser, { id }, "删除所选用户信息");
|
||||||
|
// proTable.value?.clearSelection();
|
||||||
|
// proTable.value?.getTableList();
|
||||||
|
// } else if(index == 2){
|
||||||
|
// await useHandleData(deleteUser, { id }, "删除所选用户信息");
|
||||||
|
// proTable.value?.clearSelection();
|
||||||
|
// proTable.value?.getTableList();
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
const closeDrawer = (done: () => void) => {
|
const closeDrawer = (done: () => void) => {
|
||||||
datas.length = 0;
|
datas.length = 0;
|
||||||
done();
|
done();
|
||||||
@ -266,32 +375,86 @@ const getTableList = (params: any) => {
|
|||||||
|
|
||||||
const handleAddItem = async (index: number, row: any) => {
|
const handleAddItem = async (index: number, row: any) => {
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
title.value = "新增班组";
|
title.value = "新增人员";
|
||||||
formData.value = reactive({});
|
formData.value = reactive({
|
||||||
|
personName: "",
|
||||||
|
sex: 1,
|
||||||
|
birthday: "",
|
||||||
|
nation: "",
|
||||||
|
registerAddress: "",
|
||||||
|
idCard: "",
|
||||||
|
issuingAuthorityForIdCard: "",
|
||||||
|
idCardExpireDate: "",
|
||||||
|
idCardFront: "",
|
||||||
|
idCardBack: "",
|
||||||
|
portrait: "",
|
||||||
|
phone: "",
|
||||||
|
address: "",
|
||||||
|
companySn: "",
|
||||||
|
teamSn: "",
|
||||||
|
workerType: null,
|
||||||
|
personType: 1,
|
||||||
|
safetyEducation: 1,
|
||||||
|
isPurchaseInsurance: 1,
|
||||||
|
isContract: 1,
|
||||||
|
contractImage: "",
|
||||||
|
isPhysicalExamination: 1,
|
||||||
|
bankType: null,
|
||||||
|
bankCard: "",
|
||||||
|
realNameCardNumber: "",
|
||||||
|
bankName: "",
|
||||||
|
bankCode: "",
|
||||||
|
politicsStatus: null,
|
||||||
|
educationLevel: null,
|
||||||
|
academicDegree: null,
|
||||||
|
haveMedicalHistory: 1,
|
||||||
|
natureOfAccount: 1,
|
||||||
|
maritalStatus: null,
|
||||||
|
contacts: "",
|
||||||
|
contactsTel: "",
|
||||||
|
entryTime: "",
|
||||||
|
trainingTime: "",
|
||||||
|
personEmail: ""
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
title.value = "编辑班组";
|
title.value = "查看人员";
|
||||||
console.log(row);
|
console.log(row);
|
||||||
const res: any = await classGroupInfo({ id: row.id });
|
const res: any = await memberInfo({ id: row.id });
|
||||||
|
res.result.idCardExpireDate = res.result.idCardExpireDate.split(",");
|
||||||
formData.value = reactive({ ...res.result });
|
formData.value = reactive({ ...res.result });
|
||||||
}
|
}
|
||||||
newMemberDialog.value = true;
|
newMemberDialog.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 修改数据按钮
|
// 获取班组管理列表
|
||||||
const handleEditItem = async (row: any) => {
|
const getGroupList = async () => {
|
||||||
getId.value = row.roleId;
|
const res = await getClassGroupAll({});
|
||||||
|
console.log(res);
|
||||||
drawerVisible.value = true;
|
moveFormConfig.formItemConfig[0].data = res.result.map(item => {
|
||||||
const { result = [] } = await getTreemRoleList();
|
console.log(item);
|
||||||
// console.log("test", result);
|
return {
|
||||||
datas.push(...result);
|
label: item.teamName,
|
||||||
|
value: item.teamSn
|
||||||
const res = await getTreeByIdList({ roleId: row.roleId });
|
};
|
||||||
// 打开弹窗时调用上面的接口勾选
|
|
||||||
nextTick(() => {
|
|
||||||
treeRef.value.setCheckedKeys(res.result.map((item: { authorityId: any }) => item.authorityId));
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 修改状态按钮
|
||||||
|
const handleEditItem = async (index: number, row: any) => {
|
||||||
|
if (index == 1) {
|
||||||
|
moveVisible.value = true;
|
||||||
|
} else if (index == 2) {
|
||||||
|
exitVisible.value = true;
|
||||||
|
}
|
||||||
|
objRow.value = row;
|
||||||
|
};
|
||||||
|
// 调动表单提交
|
||||||
|
const saveMoveItem = async (form: any) => {
|
||||||
|
const res = await updateMember(form);
|
||||||
|
proTable.value.getTableList();
|
||||||
|
ElMessage.success("编辑成功");
|
||||||
|
newMemberDialog.value = false;
|
||||||
|
};
|
||||||
// TODO: 提交表单操作
|
// TODO: 提交表单操作
|
||||||
const saveItem = async (form: any) => {
|
const saveItem = async (form: any) => {
|
||||||
form.engineeringSn = initParam.engineeringSn;
|
form.engineeringSn = initParam.engineeringSn;
|
||||||
@ -307,12 +470,6 @@ const saveItem = async (form: any) => {
|
|||||||
}
|
}
|
||||||
newMemberDialog.value = false;
|
newMemberDialog.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 删除用户信息
|
|
||||||
const deleteGroup = async (params: any) => {
|
|
||||||
await useHandleData(deleteClassGroup, { id: params.id }, `删除【${params.teamName}】`);
|
|
||||||
proTable.value.getTableList();
|
|
||||||
};
|
|
||||||
// 点击抽屉的工程名称更新页面
|
// 点击抽屉的工程名称更新页面
|
||||||
const onUpdate = async row => {
|
const onUpdate = async row => {
|
||||||
initParam.engineeringSn = row.engineeringSn;
|
initParam.engineeringSn = row.engineeringSn;
|
||||||
@ -322,5 +479,50 @@ const getengineering = (params: any) => {
|
|||||||
// let newParams = JSON.parse(JSON.stringify(params));
|
// let newParams = JSON.parse(JSON.stringify(params));
|
||||||
return getRelevanceList();
|
return getRelevanceList();
|
||||||
};
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getGroupList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss">
|
||||||
|
.title-transform {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
img {
|
||||||
|
width: 17px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-size: 18px;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title-sub {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 10px;
|
||||||
|
> img {
|
||||||
|
visibility: hidden;
|
||||||
|
width: 17px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
> div {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 10px;
|
||||||
|
img {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: PingFang SC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #606266;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import { ref, reactive, onMounted, onBeforeUnmount, getCurrentInstance, nextTick
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
import { getvideoEngTreeList } from "@/api/modules/project";
|
import { getvideoEngTreeList } from "@/api/modules/project";
|
||||||
import { getpreviewURL } from "@/api/modules/common";
|
import { getpreviewURL, getConfigInfo } from "@/api/modules/common";
|
||||||
import TreeFilter from "@/components/TreeFilter/index.vue";
|
import TreeFilter from "@/components/TreeFilter/index.vue";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
|
|
||||||
@ -41,10 +41,10 @@ let initCount = ref(0);
|
|||||||
let oWebControl = ref(null);
|
let oWebControl = ref(null);
|
||||||
let cameraIndexCode = ref<Array<string>>([]);
|
let cameraIndexCode = ref<Array<string>>([]);
|
||||||
let objData = ref({
|
let objData = ref({
|
||||||
appkey: "21582859", //海康提供的appkey
|
appkey: "24017757", //海康提供的appkey
|
||||||
ip: "120.236.122.37", //海康提供的ip
|
ip: "182.101.141.23", //海康提供的ip
|
||||||
secret: "CfxWWzB9MEC5y6R5CmWI", //海康提供的secret
|
secret: "VJz0FbzmE6drPQ7egsBi", //海康提供的secret
|
||||||
port: 81,
|
port: 18443,
|
||||||
playMode: 0, // 0 预览 1回放
|
playMode: 0, // 0 预览 1回放
|
||||||
layout: "4x6" //页面展示的模块数【16】
|
layout: "4x6" //页面展示的模块数【16】
|
||||||
});
|
});
|
||||||
@ -80,6 +80,20 @@ const getVideo = async () => {
|
|||||||
// await sendRequest({ code: cameraIndexCode.value });
|
// await sendRequest({ code: cameraIndexCode.value });
|
||||||
await getpreviewURL({ cameraIndexCode: cameraIndexCode.value });
|
await getpreviewURL({ cameraIndexCode: cameraIndexCode.value });
|
||||||
};
|
};
|
||||||
|
// 获取视频配置信息
|
||||||
|
const getVideoConfig = async () => {
|
||||||
|
// await sendRequest({ code: cameraIndexCode.value });
|
||||||
|
const res = await getConfigInfo({});
|
||||||
|
// objData.value = ref({
|
||||||
|
// appkey: res.result.appKey, //海康提供的appkey
|
||||||
|
// ip: res.result.ip, //海康提供的ip
|
||||||
|
// secret: res.result.appSecret, //海康提供的secret
|
||||||
|
// port: +res.result.port,
|
||||||
|
// playMode: 0, // 0 预览 1回放
|
||||||
|
// layout: "4x6" //页面展示的模块数【16】
|
||||||
|
// });
|
||||||
|
// console.log(objData.value);
|
||||||
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => store.editPassword,
|
() => store.editPassword,
|
||||||
@ -91,6 +105,8 @@ watch(
|
|||||||
/** 设备列表的点击操作 */
|
/** 设备列表的点击操作 */
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
// 获取配置信息
|
||||||
|
getVideoConfig();
|
||||||
// 获取页面的实例对象 ee
|
// 获取页面的实例对象 ee
|
||||||
const pageInstance = getCurrentInstance();
|
const pageInstance = getCurrentInstance();
|
||||||
// 获取dom节点对象
|
// 获取dom节点对象
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user