wwp 4 miesięcy temu
rodzic
commit
4e833ae2a8
20 zmienionych plików z 226 dodań i 1061 usunięć
  1. +28
    -0
      SafeCampus.WEB/src/api/interface/sys/attendance/behaviorTrace.ts
  2. +1
    -0
      SafeCampus.WEB/src/api/interface/sys/attendance/index.ts
  3. +0
    -3
      SafeCampus.WEB/src/api/interface/sys/attendance/studentsReturn.ts
  4. +8
    -4
      SafeCampus.WEB/src/api/modules/attendance/behaviorTrace.ts
  5. +1
    -1
      SafeCampus.WEB/src/api/modules/attendance/studentsReturn.ts
  6. +0
    -191
      SafeCampus.WEB/src/views/attendance/behaviorTrace/components/form/form_basic.vue
  7. +0
    -120
      SafeCampus.WEB/src/views/attendance/behaviorTrace/components/form/index.vue
  8. +0
    -107
      SafeCampus.WEB/src/views/attendance/behaviorTrace/components/formClass/index.vue
  9. +0
    -116
      SafeCampus.WEB/src/views/attendance/behaviorTrace/components/formTeacher/index.vue
  10. +10
    -68
      SafeCampus.WEB/src/views/attendance/behaviorTrace/components/traceShow/index.vue
  11. +9
    -244
      SafeCampus.WEB/src/views/attendance/behaviorTrace/index.vue
  12. +0
    -47
      SafeCampus.WEB/src/views/attendance/passenger/components/detailForm/form_detail.vue
  13. +0
    -63
      SafeCampus.WEB/src/views/attendance/passenger/components/detailForm/index.vue
  14. +79
    -0
      SafeCampus.WEB/src/views/attendance/passenger/components/detailTable/index.vue
  15. +5
    -5
      SafeCampus.WEB/src/views/attendance/passenger/index.vue
  16. +52
    -66
      SafeCampus.WEB/src/views/attendance/studentsReturn/components/returnConfirm/index.vue
  17. +30
    -23
      SafeCampus.WEB/src/views/attendance/studentsReturn/index.vue
  18. +1
    -1
      SafeCampus.WEB/src/views/userManage/clothing/index.vue
  19. +1
    -1
      SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue
  20. +1
    -1
      SafeCampus.WEB/src/views/userManage/personnel/index.vue

+ 28
- 0
SafeCampus.WEB/src/api/interface/sys/attendance/behaviorTrace.ts Wyświetl plik

@@ -0,0 +1,28 @@
/**
* @description 学生归寝
* @license Apache License Version 2.0
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
* @remarks
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
* 1.请不要删除和修改根目录下的LICENSE文件。
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
*/

import { ReqPage } from "@/api";
/**
* @Description: 教师点名
* @Author: yxq
* @Date: 2023-12-17 15:34:54
*/

export namespace AttendanceBehaviorTrace {
export interface Page extends ReqPage {}

/** 表单 */
export interface behaviorTraceInfo {
}
}

+ 1
- 0
SafeCampus.WEB/src/api/interface/sys/attendance/index.ts Wyświetl plik

@@ -14,3 +14,4 @@
*/
export * from "./passenger";
export * from "./studentsReturn";
export * from "./behaviorTrace";

+ 0
- 3
SafeCampus.WEB/src/api/interface/sys/attendance/studentsReturn.ts Wyświetl plik

@@ -24,8 +24,5 @@ export namespace AttendanceStudentsReturn {

/** 表单 */
export interface studentsReturnInfo {
fenpianleixing:String,
shijianduan:any,
shexiangtou:any,
}
}

+ 8
- 4
SafeCampus.WEB/src/api/modules/attendance/behaviorTrace.ts Wyświetl plik

@@ -24,19 +24,23 @@ const http = moduleRequest("/business/dfieldApi/");
const attendanceBehaviorTrace = {
/** 查询底库列表 */
page(params: SysUserPersonnel.ClassPage) {
return http.get("page", params);
return http.get("test", params);
},
/** 删除底库 */
delete(params: ReqId) {
return http.delete("deleteDfieldD", params);
return http.delete("test", params);
},
/** 创建底库 */
add(params: SysUserPersonnel.ClassPage) {
return http.post("createDfieldA", params);
return http.post("test", params);
},
/** 更新底库 */
update(params: SysUserPersonnel.ClassPage) {
return http.put("updateDfieldU", params);
return http.put("test", params);
},
/** 轨迹详情 */
detail(params: SysUserPersonnel.ClassPage) {
return http.get("test", params);
}
};



+ 1
- 1
SafeCampus.WEB/src/api/modules/attendance/studentsReturn.ts Wyświetl plik

@@ -1,5 +1,5 @@
/**
* @description 单页管理接口
* @description 学生归寝
* @license Apache License Version 2.0
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
* @remarks


+ 0
- 191
SafeCampus.WEB/src/views/attendance/behaviorTrace/components/form/form_basic.vue Wyświetl plik

@@ -1,191 +0,0 @@
<!--
* @Description: 人员表单
* @Author: syy
* @Date: 2023-12-15 15:45:50
-->
<template>
<div class="userManageForm">
<div>
<el-row :gutter="16">
<el-col :span="12">
<s-form-item label="人员姓名" prop="name">
<s-input v-model="userInfo.name"></s-input>
</s-form-item>
</el-col>
<el-col :span="12">
<s-form-item label="所属班级" prop="personSetId">
<s-select v-model="userInfo.personSetId" :options="treeData" label="personSetName" value="personSetId"></s-select>
</s-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="24">
<s-form-item label="上传人脸" prop="faces">
<el-upload
v-model:file-list="fileList"
action="/api/business/personApi/uploadFile"
list-type="picture-card"
:on-success="handleAvatarSuccess"
:on-error="handleAvatarError"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
accept=".jpg, .jpeg, .png"
:headers="{
Authorization: `${TokenEnum.TOKEN_PREFIX} ${accessToken}`
}"
>
<el-icon><Plus /></el-icon>
</el-upload>
<el-dialog v-model="dialogVisible" title="查看图片">
<img w-full :src="dialogImageUrl" alt="Preview Image" style="width: 100%" />
</el-dialog>
</s-form-item>
</el-col>
</el-row>

<el-row :gutter="16">
<el-col :span="12">
<s-form-item label="性别" prop="gender">
<s-radio-group v-model="userInfo.gender" :options="genderOptions" />
</s-form-item>
</el-col>
<el-col :span="12">
<s-form-item label="年龄" prop="age">
<s-input v-model="userInfo.age"></s-input>
</s-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12">
<s-form-item label="手机号" prop="phone">
<s-input v-model="userInfo.phone"></s-input>
</s-form-item>
</el-col>
<el-col :span="12">
<s-form-item label="扩展字段" prop="extData">
<s-input v-model="userInfo.extData"></s-input>
</s-form-item>
</el-col>
</el-row>
</div>
</div>
</template>

<script setup lang="ts">
import { SysUserPersonnel, userManagePersonnelApi, userManageClassManageApi } from "@/api";
import { Plus } from "@element-plus/icons-vue";
import { useUserStore } from "@/stores/modules";
import type { UploadProps } from "element-plus";
import { ElMessage } from "element-plus";
import { TokenEnum } from "@/enums";
// props
interface FormProps {
modelValue: Partial<SysUserPersonnel.SysUserPerInfo>;
}
const emit = defineEmits(["update:modelValue"]); //定义emit
const props = defineProps<FormProps>(); //定义props
// 人员信息
const userInfo = computed({
get: () => props.modelValue,
set: val => emit("update:modelValue", val)
});
/* */
const userStore = useUserStore();
const { accessToken } = userStore;
const fileList = ref<any>([]);
const faces = ref<SysUserPersonnel.SysUserAvatar[]>([]);
const dialogImageUrl = ref("");
const dialogVisible = ref(false);
const treeData = ref<any>([]);
const handleRemove: UploadProps["onRemove"] = (uploadFile: any) => {
const index = faces.value.findIndex(item => item.uid === uploadFile.uid);
if (index > -1) {
faces.value.splice(index, 1);
}
userInfo.value.faces = faces.value;
if (uploadFile.personId) {
userManagePersonnelApi.deleteFace({ personId: uploadFile.personId, faceIds: [uploadFile.uid] }).then(res => {});
}
};

const handlePictureCardPreview: UploadProps["onPreview"] = uploadFile => {
dialogImageUrl.value = uploadFile.url!;
dialogVisible.value = true;
};
const handleAvatarSuccess: UploadProps["onSuccess"] = (response, uploadFile) => {
if (response.code === 200) {
faces.value.push({ faceUrl: response.data, uid: uploadFile.uid });
userInfo.value.faces = faces.value;
ElMessage.success(response.msg);
} else {
ElMessage.error(response.msg);
fileList.value = fileList.value.splice(0, fileList.value.length - 1);
}
};
const handleAvatarError: UploadProps["onError"] = (error, uploadFile, uploadFiles) => {
console.log(error, uploadFile, uploadFiles, "err");
};
// 通用状态选项
const genderOptions = ref([
{
label: "未知",
value: "GENDER_UNKNOWN"
},
{
label: "男",
value: "GENDER_MALE"
},
{
label: "女",
value: "GENDER_FEMALE"
}
]);
const getRequestData = async () => {
const { data } = await userManageClassManageApi.page();
treeData.value = data;
};
onMounted(() => {
// 初始化
userInfo.value.gender = userInfo.value.gender ? userInfo.value.gender : genderOptions.value[0].value;
getRequestData();
if (userInfo.value.personId) {
if (userInfo.value.faces?.length > 0) {
fileList.value = [
...JSON.parse(JSON.stringify(userInfo.value.faces)).map((item: any) => {
return {
url: item.faceUrl,
uid: item.faceId,
personId: userInfo.value.personId
};
})
];
faces.value = [
...JSON.parse(JSON.stringify(userInfo.value.faces)).map((item: any) => {
return {
faceUrl: item.faceUrl,
uid: item.faceId,
personId: userInfo.value.personId
};
})
];
}
}
});
</script>

<style lang="scss" scoped>
:deep(.el-input__wrapper) {
width: 100% !important;
}
:deep(.el-date-editor.el-input) {
width: 92% !important;
}
:deep(.el-upload-list--picture-card .el-upload-list__item) {
width: 100px !important;
height: 100px !important;
}
:deep(.el-upload--picture-card) {
width: 100px !important;
height: 100px !important;
}
</style>

+ 0
- 120
SafeCampus.WEB/src/views/attendance/behaviorTrace/components/form/index.vue Wyświetl plik

@@ -1,120 +0,0 @@
<!--
* @Description: 表单
* @Author: syy
* @Date: 2023-12-15 15:45:59
-->
<template>
<div>
<form-container v-model="visible" :title="`${sysUserProps.opt}人员`" form-size="800px" @close="onClose">
<el-form
ref="sysUserFormRef"
:rules="rules"
:disabled="sysUserProps.disabled"
:model="sysUserProps.record"
:hide-required-asterisk="sysUserProps.disabled"
label-width="auto"
label-suffix=" :"
>
<el-tabs v-model="activeName">
<Basic v-model="sysUserProps.record"></Basic>
</el-tabs>
</el-form>
<template #footer>
<el-button @click="onClose"> 取消 </el-button>
<el-button v-show="!sysUserProps.disabled" type="primary" @click="handleSubmit"> 确定 </el-button>
</template>
</form-container>
</div>
</template>

<script setup lang="ts" name="SysUserPersonnelForm">
import { SysUserPersonnel, userManagePersonnelApi } from "@/api";
import { FormOptEnum, SysDictEnum } from "@/enums";
import { required } from "@/utils/formRules";
import { FormInstance } from "element-plus";
import { useDictStore } from "@/stores/modules";
import Basic from "./form_basic.vue";

const visible = ref(false); //是否显示表单
const activeName = ref("basic");
// 表单参数
const sysUserProps = reactive<FormProps.Base<SysUserPersonnel.SysUserPerInfo>>({
opt: FormOptEnum.ADD,
record: {},
disabled: false
});

// 表单验证规则
const rules = reactive({
// personId: [required("请输入人员ID")],
name: [required("请输入姓名")],
gender: [required("请选择性别")],
faces: [required("请上传人脸图片")],
phone: [required("请输入手机号")]
// extData: [required("请输入扩展数据")]
});

/**
* 打开表单
* @param props 表单参数
*/
function onOpen(props: FormProps.Base<SysUserPersonnel.SysUserPerInfo>) {
Object.assign(sysUserProps, props); //合并参数
if (props.opt == FormOptEnum.ADD) {
//如果是新增,设置默认值
// sysUserProps.record.sortCode = 99;
}
visible.value = true; //显示表单
if (props.record.personId) {
//如果传了id,就去请求api获取record
userManagePersonnelApi.detail({ id: props.record.personId }).then(res => {
sysUserProps.record = res.data;
});
}
}

// 提交数据(新增/编辑)
const sysUserFormRef = ref<FormInstance>();
/** 提交表单 */
async function handleSubmit() {
sysUserFormRef.value?.validate(async valid => {
if (!valid) return; //表单验证失败
//提交表单
if (sysUserProps.record.faces.length === 0) {
return ElMessage.error("请上传人脸图片");
}
if (sysUserProps.record.personId) {
await userManagePersonnelApi
.update(sysUserProps.record)
.then(() => {
sysUserProps.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
} else {
await userManagePersonnelApi
.add(sysUserProps.record)
.then(() => {
sysUserProps.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
}
});
}

/** 关闭表单*/
function onClose() {
visible.value = false;
activeName.value = "basic";
}

// 暴露给父组件的方法
defineExpose({
onOpen
});
</script>

<style lang="scss" scoped></style>

+ 0
- 107
SafeCampus.WEB/src/views/attendance/behaviorTrace/components/formClass/index.vue Wyświetl plik

@@ -1,107 +0,0 @@
<!--
* @Description: 表单
* @Author: syy
* @Date: 2023-12-15 15:45:59
-->
<template>
<div>
<form-container v-model="visibleClass" :title="`${sysUserProps.opt}班级`" form-size="400px" @close="onClose">
<el-form
ref="sysUserFormRef"
:rules="rules"
:disabled="sysUserProps.disabled"
:model="sysUserProps.record"
:hide-required-asterisk="sysUserProps.disabled"
label-width="auto"
label-suffix=" :"
>
<div>
<el-row :gutter="16">
<el-col :span="22">
<s-form-item label="班级名称" prop="personSetName">
<s-input v-model="sysUserProps.record.personSetName"></s-input>
</s-form-item>
</el-col>
</el-row>
</div>
</el-form>
<template #footer>
<el-button @click="onClose"> 取消 </el-button>
<el-button v-show="!sysUserProps.disabled" type="primary" @click="handleSubmit"> 确定 </el-button>
</template>
</form-container>
</div>
</template>

<script setup lang="ts" name="SysUserPerformClass">
import { ref } from "vue";
import { SysUserPersonnel, userManageClassManageApi } from "@/api";
import { FormOptEnum } from "@/enums";
import { required } from "@/utils/formRules";
import { FormInstance } from "element-plus";

const visibleClass = ref(false); //是否显示表单
// 表单参数
const sysUserProps = reactive<FormProps.Base<SysUserPersonnel.ClassPage>>({
opt: FormOptEnum.ADD,
record: {},
disabled: false
});
// 表单验证规则
const rules = reactive({
personSetName: [required("请输入班级名称")]
});

/**
* 打开表单
* @param props 表单参数
*/
function onOpen(props: FormProps.Base<SysUserPersonnel.ClassPage>) {
Object.assign(sysUserProps, props); //合并参数
visibleClass.value = true; //显示表单
sysUserProps.record = props.record;
}

// 提交数据(新增/编辑)
const sysUserFormRef = ref<FormInstance>();
/** 提交表单 */
async function handleSubmit() {
sysUserFormRef.value?.validate(async valid => {
if (!valid) return; //表单验证失败
sysUserProps.record.name = sysUserProps.record.personSetName;
//提交表单
if (sysUserProps.record.personSetId) {
sysUserProps.record.id = sysUserProps.record.personSetId;
await userManageClassManageApi
.update(sysUserProps.record)
.then(() => {
sysUserProps.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
} else {
await userManageClassManageApi
.add(sysUserProps.record)
.then(() => {
sysUserProps.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
}
});
}

/** 关闭表单*/
function onClose() {
visibleClass.value = false;
}

// 暴露给父组件的方法
defineExpose({
onOpen
});
</script>

<style lang="scss" scoped></style>

+ 0
- 116
SafeCampus.WEB/src/views/attendance/behaviorTrace/components/formTeacher/index.vue Wyświetl plik

@@ -1,116 +0,0 @@
<!--
* @Description: 表单
* @Author: syy
* @Date: 2023-12-15 15:45:59
-->
<template>
<div>
<form-container v-model="visibleClass" :title="`${sysUserProps.opt}`" form-size="400px" @close="onClose">
<el-form
ref="sysUserFormRef"
:rules="rules"
:disabled="sysUserProps.disabled"
:model="sysUserProps.record"
:hide-required-asterisk="sysUserProps.disabled"
label-width="auto"
label-suffix=" :"
>
<div>
<el-row :gutter="16">
<el-col :span="22">
<s-form-item label="班主任" prop="userId">
<s-select v-model="sysUserProps.record.userId" :options="teacherData" label="name" value="userId"></s-select>
</s-form-item>
</el-col>
</el-row>
</div>
</el-form>
<template #footer>
<el-button @click="onClose"> 取消 </el-button>
<el-button v-show="!sysUserProps.disabled" type="primary" @click="handleSubmit"> 确定 </el-button>
</template>
</form-container>
</div>
</template>

<script setup lang="ts" name="SysUserPerformClass">
import { ref } from "vue";
import { SysUserPersonnel, userManageTeacherApi } from "@/api";
import { required } from "@/utils/formRules";
import { FormInstance } from "element-plus";
const teacherData = ref<any>([]);
const visibleClass = ref(false); //是否显示表单
// 表单参数
enum FormOptEnum {
/** 新增 */
AddTeacher = "绑定班主任",
/** 编辑 */
UpdateTeacher = "修改班主任"
}
const sysUserProps = reactive<FormProps.Base<SysUserPersonnel.ClassPage>>({
opt: FormOptEnum.AddTeacher,
record: {},
disabled: false
});
// 表单验证规则
const rules = reactive({
userId: [required("请选择班主任名称")]
});

/**
* 打开表单
* @param props 表单参数
*/
function onOpen(props: FormProps.Base<SysUserPersonnel.ClassPage>) {
getRequestData();
Object.assign(sysUserProps, props); //合并参数
visibleClass.value = true; //显示表单
sysUserProps.record = props.record;
}

const getRequestData = async () => {
const { data } = await userManageTeacherApi.page();
teacherData.value = data;
};

// 提交数据(新增/编辑)
const sysUserFormRef = ref<FormInstance>();
/** 提交表单 */
async function handleSubmit() {
sysUserFormRef.value?.validate(async valid => {
if (!valid) return; //表单验证失败
console.log(sysUserProps);
//提交表单
if (sysUserProps.opt === FormOptEnum.UpdateTeacher) {
await userManageTeacherApi
.update(sysUserProps.record)
.then(() => {
sysUserProps.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
} else {
await userManageTeacherApi
.add(sysUserProps.record)
.then(() => {
sysUserProps.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
}
});
}

/** 关闭表单*/
function onClose() {
visibleClass.value = false;
}
// 暴露给父组件的方法
defineExpose({
onOpen
});
</script>

<style lang="scss" scoped></style>

SafeCampus.WEB/src/views/attendance/behaviorTrace/components/nofaceTable/index.vue → SafeCampus.WEB/src/views/attendance/behaviorTrace/components/traceShow/index.vue Wyświetl plik

@@ -1,23 +1,12 @@
<!--
* @Description: 人脸识别失败表格
* @Description: 行为轨迹
* @Author: yxq
* @Date: 2023-12-15 15:45:59
-->
<template>
<div>
<form-container v-model="visible" :title="`行为轨迹查看`" form-size="1000px" @close="onClose">
<ProTable ref="proTable" title="教师点名" height="600px" :data="tableData" :columns="columns">
<!-- 表格 header 按钮 -->
<template #tableHeader>
<!-- <s-button type="primary" icon="none" prefix="人工" suffix="确认" @click="handleSubmit" /> -->
</template>
<!-- 表格操作栏 -->
<template #operation="scope">
<el-space>
<s-button link :opt="FormOptEnum.EDIT" prefix="人工" suffix="确认" @click="onOpen(FormOptEnum.VIEW, scope.row)" />
</el-space>
</template>
</ProTable>
<form-container v-model="visible" :title="`行为轨迹查看`" form-size="800px" @close="onClose">
<ProTable ref="proTable" title="行为轨迹" height="500px" :data="tableData" :columns="columns"></ProTable>
<template #footer>
<el-button @click="onClose"> 关闭 </el-button>
</template>
@@ -31,15 +20,15 @@
</div>
</template>
<script setup lang="tsx" name="attendancePassenger">
import { AttendancePassenger, attendancePassenger } from "@/api";
<script setup lang="tsx" name="attendanceBehaviorTrace">
import { AttendanceBehaviorTrace, attendanceBehaviorTrace } from "@/api";
import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
import { FormOptEnum } from "@/enums";

const visible = ref(false); //是否显示
// 弹框参数
const propsInfo = reactive<FormProps.Base<AttendancePassenger.PassengerInfo>>({
opt: FormOptEnum.ADD, //操作类型
const propsInfo = reactive<FormProps.Base<AttendanceBehaviorTrace.behaviorTraceInfo>>({
opt: FormOptEnum.VIEW, //操作类型
record: {}, //弹框数据
disabled: false
});
@@ -47,17 +36,12 @@ const propsInfo = reactive<FormProps.Base<AttendancePassenger.PassengerInfo>>({
* 打开弹框
* @param props 弹框参数
*/
function onOpen(props: FormProps.Base<AttendancePassenger.PassengerInfo>) {
function onOpen(props: FormProps.Base<AttendanceBehaviorTrace.PassengerInfo>) {
Object.assign(propsInfo, props); //合并参数
if (props.opt == FormOptEnum.ADD) {
//如果是新增,设置默认值
propsInfo.record.shijianduan = [];
propsInfo.record.shexiangtou = [];
}
visible.value = true; //显示弹框
if (props.record.id) {
//如果传了id,就去请求api获取record
attendancePassenger.detail({ id: props.record.id }).then(res => {
attendanceBehaviorTrace.detail({ id: props.record.id }).then(res => {
propsInfo.record = res.data;
});
}
@@ -135,13 +119,12 @@ const columns: ColumnProps[] = [
<img
src={scope.row.faces.length > 0 ? scope.row.faces[0].faceUrl : ""}
onClick={() => viewHeadImage(scope)}
style="width:50px;height:50px;"
style="width:50px;height:50px;cursor:pointer"
alt=""
/>
);
}
}
// { prop: "operation", label: "操作", width: 250, fixed: "right" }
];
// 图片预览
const imgVisible = ref(false);
@@ -150,47 +133,6 @@ const viewHeadImage = (scope: any) => {
faceUrl.value = scope.row.faces[0].faceUrl;
imgVisible.value = true
};
// 刷新表格
const RefreshTable = () => {
proTable.value?.refresh();
};

// 提交数据(新增/编辑)
const formRef = ref<FormInstance>();
/** 提交表单 */
async function handleSubmit() {
formRef.value?.validate(async valid => {
if (!valid) return; //表单验证失败
// shijianduan时间段
propsInfo.record.startTime = formatDate(propsInfo.record.shijianduan[0]);
propsInfo.record.endTime = formatDate(propsInfo.record.shijianduan[1]);
delete propsInfo.record.shijianduan;
// shexiangtou摄像头
propsInfo.record.shexiangtou = propsInfo.record.shexiangtou.toString();
//提交表单
console.log(propsInfo);
if (propsInfo.record.id) {
await attendancePassenger
.update(propsInfo.record)
.then(() => {
propsInfo.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
} else {
console.log(propsInfo.record);
await attendancePassenger
.add(propsInfo.record)
.then(() => {
propsInfo.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
}
});
}
/** 关闭表单*/
function onClose() {
visible.value = false;

+ 9
- 244
SafeCampus.WEB/src/views/attendance/behaviorTrace/index.vue Wyświetl plik

@@ -1,6 +1,6 @@
<!--
* @Description: 人员管理
* @Author: syy
* @Description: 行为轨迹
* @Author: yxq
* @Date: 2024-7-15
-->
<template>
@@ -15,132 +15,48 @@
@change="changeTreeFilter"
>
<template v-slot:header>
<!-- <s-button suffix="班级" @click="addClass(FormOptEnum.ADD)" style="margin-bottom: 15px" /> -->
<h4 style="margin: 0 0 15px; font-size: 18px; font-weight: bold; color: var(--el-color-info-dark-2); letter-spacing: 0.5px">所属班级</h4>
</template>
<template v-slot:label="{ row }">
<span class="custom-tree-node">
<span>{{ row.node.label }}</span>
<span v-if="row.node.label != '全部'">
<!-- <a @click.stop="addClass(FormOptEnum.EDIT, row.node.data)">
<el-icon><Edit /></el-icon>
</a> -->
<!-- <a style="margin-left: 8px" @click.stop="addDelete(row.node.data.personSetId, '删除班级')">
<el-icon><Delete /></el-icon>
</a> -->
<!-- <a style="margin-left: 8px" @click.stop>
<el-dropdown @command="handleCommandTree">
<el-link :underline="false" :icon="More"> </el-link>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-if="!row.node.data.userId" :command="commander(row.node.data, cmdEnumTree.AddTeacher)">
{{ cmdEnumTree.AddTeacher }}
</el-dropdown-item>
<el-dropdown-item v-if="row.node.data.userId" :command="commander(row.node.data, cmdEnumTree.UpdateTeacher)">
{{ cmdEnumTree.UpdateTeacher }}
</el-dropdown-item>
<el-dropdown-item v-if="row.node.data.userId" :command="commander(row.node.data, cmdEnumTree.DeleteTeacher)">
{{ cmdEnumTree.DeleteTeacher }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</a> -->
</span>
</span>
</template>
</TreeFilter>
<div class="table-box">
<ProTable ref="proTable" title="人员管理" :columns="columns" rowKey="personId" :request-api="userManagePersonnelApi.page">
<!-- 表格 header 按钮 -->
<template #tableHeader="scope">
<!-- <s-button v-auth="userPerButtonCode.add" suffix="人员" @click="onOpen(FormOptEnum.ADD, { personSetId: personSetId })" />
<s-button
v-auth="userPerButtonCode.delete"
type="danger"
:opt="FormOptEnum.DELETE"
plain
suffix="人员"
:disabled="!scope.isSelected"
@click="onDelete(scope.selectedListIds, '删除所选人员')"
/> -->
</template>
<!-- 表格操作栏 -->
<template #operation="scope">
<el-space>
<s-button link prefix="轨迹" suffix="查看" :opt="FormOptEnum.VIEW" @click="onOpenDetail(FormOptEnum.VIEW, scope.row)" />
<!-- <s-button v-auth="userPerButtonCode.edit" link :opt="FormOptEnum.EDIT" @click="onOpen(FormOptEnum.EDIT, scope.row)" />
<s-button v-auth="userPerButtonCode.delete" link :opt="FormOptEnum.DELETE" @click="onDelete([scope.row.personId], `删除人员`)" />
<el-dropdown @command="handleCommand">
<el-link type="primary" :underline="false" :icon="ArrowDown"> 更多 </el-link>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item :command="command(scope.row, cmdEnum.AddFace)"
><el-upload
ref="upload"
class="upload-demo"
action="/api/business/personApi/uploadFile"
:show-file-list="false"
:on-success="handleAvatarSuccess"
accept=".jpg, .jpeg, .png"
:headers="{
Authorization: `${TokenEnum.TOKEN_PREFIX} ${accessToken}`
}"
>
<template #trigger>
{{ cmdEnum.AddFace }}
</template>
</el-upload>
</el-dropdown-item>
<el-dropdown-item :command="command(scope.row, cmdEnum.UnderpantsUnBinding)">
{{ cmdEnum.UnderpantsUnBinding }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown> -->
</el-space>
</template>
</ProTable>
</div>
<!-- 人员新增/编辑表单 -->
<Form ref="formRef"></Form>
<!-- 班级新增/编辑表单 -->
<FormClass ref="formRefC" />
<!-- 班主任绑定/修改 -->
<FormTeacher ref="formRefT" />
<!-- 预览头像 -->
<el-dialog v-model="visible" title="查看头像" width="830px" :before-close="handleClose">
<el-dialog v-model="visible" title="查看快照" width="830px" :before-close="handleClose">
<div style="display: flex; align-items: center; justify-content: center">
<img class="detailpic" :src="faceUrl" alt="" />
</div>
</el-dialog>
<!-- 轨迹详情 -->
<TraceDetail ref="detialRef" />
<TraceShow ref="detialRef" />
</div>
</template>
<script setup lang="tsx" name="SysUserPersonnel">
import { userManagePersonnelApi,userPerButtonCode,SysUserPersonnel,userManageClassManageApi,userManageTeacherApi } from "@/api";
import { useHandleData } from "@/hooks/useHandleData";
import { userManagePersonnelApi,SysUserPersonnel,userManageClassManageApi,userManageTeacherApi } from "@/api";
import { FormOptEnum } from "@/enums";
import Form from "./components/form/index.vue";
import FormClass from "./components/formClass/index.vue";
import FormTeacher from "./components/formTeacher/index.vue";
import { ArrowDown,More } from "@element-plus/icons-vue";
import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
import TreeFilter from "@/components/TreeFilter/index.vue";
import { useUserStore } from "@/stores/modules";
import { TokenEnum } from "@/enums";
import type { UploadProps } from "element-plus";
import TraceDetail from "./components/nofaceTable/index.vue";
import TraceShow from "./components/traceShow/index.vue";
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const faceUrl = ref('');
const visible = ref(false); //是否显示人员表单
const visible = ref(false); //预览头像
const proTable = ref<ProTableInstance>();
const treeFilter = ref<InstanceType<typeof TreeFilter> | null>(null);
const userStore = useUserStore();
const { accessToken } = userStore;
// 表格配置项
const columns: ColumnProps<SysUserPersonnel.SysUserPerInfo>[] = [
{ type: "selection", fixed: "left", width: 50 },
{
prop: "faceUrl",
label: "人脸",
@@ -174,168 +90,17 @@ const columns: ColumnProps<SysUserPersonnel.SysUserPerInfo>[] = [
const viewHeadImage = (scope: any) => {
faceUrl.value = scope.row.faces[0].faceUrl;
visible.value = true
console.log(faceUrl);
};
const handleClose = () => {
visible.value = false;
};


// 人员表单引用
const formRef = ref<InstanceType<typeof Form> | null>(null);
// 班级表单引用
const formRefC = ref<InstanceType<typeof FormClass> | null>(null);
// 班级表单引用
const formRefT = ref<InstanceType<typeof FormTeacher> | null>(null);

/**
* 打开表单
* @param opt 操作类型
* @param record 记录
*/
function onOpen(opt: FormOptEnum, record: {} | SysUserPersonnel.SysUserPerInfo = {}) {
formRef.value?.onOpen({ opt: opt, record: record, successful: RefreshTable });
}

/**
* 打开班级表单
* @param opt 操作类型
* @param record 记录
*/

function addClass(opt: FormOptEnum, record: {} | SysUserPersonnel.ClassPage = {}) {
formRefC.value?.onOpen({ opt: opt, record: JSON.parse(JSON.stringify(record)), successful: RefreshTable });
}
/**
* 班级删除
* @param ids id数组
*/
async function addDelete(id: string[],msg: string) {
// 二次确认 => 请求api => 刷新表格
await useHandleData(userManageClassManageApi.delete, { id }, msg);
RefreshTable(); //刷新表格
}

/**
* 人员删除
* @param ids id数组
*/
async function onDelete(ids: string[], msg: string) {
if(ids.length === 0){
ElMessage({
message: '请选择要删除的人员',
type: 'warning'
});
return
}
// 二次确认 => 请求api => 刷新表格
await useHandleData(userManagePersonnelApi.delete, {id: ids.join(",") }, msg);
RefreshTable(); //刷新表格
}

// 刷新表格
const RefreshTable = () => {
proTable.value?.refresh();
treeFilter.value?.refresh(); //刷新树形筛选器
}


/** 更多下拉菜单命令枚举 */
enum cmdEnum {
AddFace = "添加人脸",
UnderpantsUnBinding = "底库解绑"
}
/** 下拉菜单参数接口 */
interface Command {
row: SysUserPersonnel.SysUserPerInfo;
command: cmdEnum;
}

/**配置command的参数 */
function command(row: SysUserPersonnel.SysUserPerInfo, command: cmdEnum): Command {
return {
row: row,
command: command
};
}
/**
* 列表更多下拉菜单点击事件
* @param command
*/
const personId = ref<number | string>(); //人员id
function handleCommand(command: Command) {
switch (command.command) {
case cmdEnum.AddFace:
personId.value = command.row.personId; //获取人员id
break
case cmdEnum.UnderpantsUnBinding:
userManagePersonnelApi.personUnBindDfie({
personId:command.row.personId,
personSetId: command.row.personSets[0].personSetId
}).then(res=>{
ElMessage.success('底库解绑成功');
RefreshTable()
})
break;
}
}



/** 更多下拉菜单命令枚举 */
enum cmdEnumTree {
AddTeacher = "绑定班主任",
UpdateTeacher = "修改班主任",
DeleteTeacher = "解绑班主任",
}

/** 树下拉菜单参数接口 */
interface CommandTree {
row: SysUserPersonnel.ClassPage;
commander: cmdEnumTree;
}

/**配置command的参数 */
function commander(row: SysUserPersonnel.ClassPage, commander: cmdEnumTree): CommandTree {
return {
row: row,
commander: commander,
};
}
/**
* 树更多下拉菜单点击事件
* @param commandtree
*/
async function handleCommandTree(commander: CommandTree) {
switch (commander.commander) {
case cmdEnumTree.AddTeacher:
formRefT.value?.onOpen({ opt: commander.commander, record: commander.row, successful: RefreshTable });
break
case cmdEnumTree.UpdateTeacher:
formRefT.value?.onOpen({ opt: commander.commander, record: commander.row, successful: RefreshTable });
break;
case cmdEnumTree.DeleteTeacher:
// 二次确认 => 请求api => 刷新表格
await useHandleData(userManageTeacherApi.delete, {id: commander.row.id}, '解绑教师');
RefreshTable(); //刷新表格
break;
}
}

const handleAvatarSuccess: UploadProps["onSuccess"] = (response) => {
if (response.code === 200) {
userManagePersonnelApi.addFace({
personId: personId.value,
faceUrl: response.data
}).then(res=>{
RefreshTable()
})
} else {
ElMessage.error(response.msg);
}
};

/** 部门切换 */
const personSetId = ref<number | string>()
function changeTreeFilter(val: number | string) {
@@ -344,7 +109,7 @@ function changeTreeFilter(val: number | string) {
proTable.value!.searchParam.personSetId = val;
proTable.value!.search();
}
const detialRef = ref<InstanceType<typeof TraceDetail> | null>(null);
const detialRef = ref<InstanceType<typeof TraceShow> | null>(null);
/**
* 详情
* @param opt 操作类型


+ 0
- 47
SafeCampus.WEB/src/views/attendance/passenger/components/detailForm/form_detail.vue Wyświetl plik

@@ -1,47 +0,0 @@
<!--
* @Description: 客流查询
* @Author: yxq
* @Date: 2023-12-17 15:45:50
-->
<template>
<div>
<div>
<el-row :gutter="16">
<el-col :span="24">
<s-form-item label="分片时间" prop="shijianduan">
<s-input v-model="formInfo.fenpianshijian" disabled></s-input>
</s-form-item>
<s-form-item label="分片数量" prop="shijianduan">
<s-input v-model="formInfo.fenpianshuliang" disabled></s-input>
</s-form-item>
</el-col>
</el-row>
</div>
</div>
</template>

<script setup lang="ts">
import { AttendancePassenger, monitorLIVEApi } from "@/api";
// props
interface FormProps {
modelValue: Partial<AttendancePassenger.PassengerInfo>;
}
const emit = defineEmits(["update:modelValue"]); //定义emit
const props = defineProps<FormProps>(); //定义props
// 客流查询表单
const formInfo = computed({
get: () => props.modelValue,
set: val => emit("update:modelValue", val)
});
console.log(props.modelValue);

onMounted(() => {
// 初始化
});
</script>

<style lang="scss" scoped>
:deep(.el-input__wrapper) {
width: 100% !important;
}
</style>

+ 0
- 63
SafeCampus.WEB/src/views/attendance/passenger/components/detailForm/index.vue Wyświetl plik

@@ -1,63 +0,0 @@
<!--
* @Description: 表单
* @Author: syy
* @Date: 2023-12-15 15:45:59
-->
<template>
<div>
<form-container v-model="visible" :title="`分片详情`" form-size="600px" @close="onClose">
<el-form
ref="formRef"
:disabled="formProps.disabled"
:model="formProps.record"
:hide-required-asterisk="formProps.disabled"
label-width="auto"
label-suffix=" :"
>
<el-tabs v-model="activeName">
<Detail v-model="formProps.record"></Detail>
</el-tabs>
</el-form>
<template #footer>
<el-button type="primary" @click="onClose"> 确定 </el-button>
</template>
</form-container>
</div>
</template>

<script setup lang="ts">
import { AttendancePassenger, attendancePassenger } from "@/api";
import { FormOptEnum } from "@/enums";
import Detail from "./form_detail.vue";

const visible = ref(false); //是否显示表单
const activeName = ref("detail");
// 表单参数
const formProps = reactive<FormProps.Base<AttendancePassenger.PassengerInfo>>({
opt: FormOptEnum.ADD,
record: {},
disabled: false
});

/**
* 打开表单
* @param props 表单参数
*/
function onOpen(props: FormProps.Base<AttendancePassenger.PassengerInfo>) {
Object.assign(formProps, props); //合并参数
visible.value = true; //显示表单
}

/** 关闭表单*/
function onClose() {
visible.value = false;
activeName.value = "detail";
}

// 暴露给父组件的方法
defineExpose({
onOpen
});
</script>

<style lang="scss" scoped></style>

+ 79
- 0
SafeCampus.WEB/src/views/attendance/passenger/components/detailTable/index.vue Wyświetl plik

@@ -0,0 +1,79 @@
<!--
* @Description: 行为轨迹
* @Author: yxq
* @Date: 2023-12-15 15:45:59
-->
<template>
<div>
<form-container v-model="visible" :title="`分片详情`" form-size="800px" @close="onClose">
<ProTable ref="proTable" title="分片详情" height="500px" :data="tableData" :columns="columns"></ProTable>
<template #footer>
<el-button @click="onClose"> 关闭 </el-button>
</template>
</form-container>
</div>
</template>
<script setup lang="tsx" name="attendanceBehaviorTrace">
import { AttendanceBehaviorTrace, attendanceBehaviorTrace } from "@/api";
import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
import { FormOptEnum } from "@/enums";

const visible = ref(false); //是否显示
// 弹框参数
const propsInfo = reactive<FormProps.Base<AttendanceBehaviorTrace.behaviorTraceInfo>>({
opt: FormOptEnum.VIEW, //操作类型
record: {}, //弹框数据
disabled: false
});
/**
* 打开弹框
* @param props 弹框参数
*/
function onOpen(props: FormProps.Base<AttendanceBehaviorTrace.PassengerInfo>) {
Object.assign(propsInfo, props); //合并参数
visible.value = true; //显示弹框
if (props.record.id) {
//如果传了id,就去请求api获取record
attendanceBehaviorTrace.detail({ id: props.record.id }).then(res => {
propsInfo.record = res.data;
});
}
}

const tableData = ref([
{
time:'2024-07-16 00:00:00',
name:'60',
},
{
time:'2024-07-17 00:00:00',
name:'40',
},
]);
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTable = ref<ProTableInstance>();
// 表格配置项
const columns: ColumnProps[] = [
{
prop: "time",
label: "时间"
},
{
prop: "name",
label: "人数",
},
];
/** 关闭表单*/
function onClose() {
visible.value = false;
}

// 暴露给父组件的方法
defineExpose({
onOpen
});
</script>
<style lang="scss" scoped></style>

+ 5
- 5
SafeCampus.WEB/src/views/attendance/passenger/index.vue Wyświetl plik

@@ -18,14 +18,14 @@
</template>
</ProTable>
<Form ref="formRef" />
<DetailForm ref="detailFormRef"></DetailForm>
<DetailTable ref="detailTableRef"></DetailTable>
</div>
</template>
<script setup lang="ts" name="AttendancePassenger">
import { attendancePassenger, attendancePassengerBtnCode, AttendancePassenger } from "@/api";
import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
import Form from "./components/form/index.vue";
import DetailForm from "./components/detailForm/index.vue";
import DetailTable from "./components/detailTable/index.vue";
import { FormOptEnum } from "@/enums";
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTable = ref<ProTableInstance>();
@@ -75,13 +75,13 @@ const columns: ColumnProps<any>[] = [
},
{
prop: "tongjirenshu",
label: "统计后的总人数"
label: "总人数"
},
{ prop: "operation", label: "操作", width: 250, fixed: "right" }
];
// 表单引用
const formRef = ref<InstanceType<typeof Form> | null>(null);
const detailFormRef = ref<InstanceType<typeof DetailForm> | null>(null);
const detailTableRef = ref<InstanceType<typeof DetailTable> | null>(null);
/**
* 打开表单
* @param opt 操作类型
@@ -93,7 +93,7 @@ function onOpen(opt: FormOptEnum, record: {} | AttendancePassenger.PassengerInfo
formRef.value?.onOpen({ opt: opt, record: record, successful: RefreshTable });
break;
case FormOptEnum.VIEW:
detailFormRef.value?.onOpen({ opt: opt, record: record, successful: RefreshTable });
detailTableRef.value?.onOpen({ opt: opt, record: record, successful: RefreshTable });
}
}
// 刷新表格


SafeCampus.WEB/src/views/attendance/studentsReturn/components/nofaceTable/index.vue → SafeCampus.WEB/src/views/attendance/studentsReturn/components/returnConfirm/index.vue Wyświetl plik

@@ -5,17 +5,18 @@
-->
<template>
<div>
<form-container v-model="visible" :title="`${propsInfo.record.classname}人脸未识别确认`" form-size="1000px" @close="onClose">
<ProTable ref="proTable" title="教师点名" height="600px" :data="tableData" :columns="columns">
<form-container v-model="visible" row-key="id" :title="`${propsInfo.record.qinshibianhao}归寝确认`" form-size="800px" @close="onClose">
<ProTable ref="noFaceTableRef" title="归寝确认" height="500px" :data="tableData" :columns="columns">
<!-- 表格 header 按钮 -->
<template #tableHeader>
<s-button type="primary" icon="check" prefix="人工" suffix="确认" @click="handleSubmit" />
</template>
<!-- 表格操作栏 -->
<template #operation="scope">
<el-space>
<s-button link :opt="FormOptEnum.EDIT" prefix="人工" suffix="确认" @click="onOpen(FormOptEnum.VIEW, scope.row)" />
</el-space>
<template #tableHeader="scope">
<s-button
type="primary"
:disabled="!scope.isSelected"
icon="check"
prefix="人工"
suffix="确认"
@click="personConfirm(scope.selectedListIds, '确认已归寝')"
/>
</template>
</ProTable>
<template #footer>
@@ -31,15 +32,16 @@
</div>
</template>
<script setup lang="tsx" name="attendancePassenger">
import { AttendancePassenger, attendancePassenger } from "@/api";
import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
<script setup lang="tsx" name="attendanceStudentsReturn">
import { AttendanceStudentsReturn, attendanceStudentsReturn } from "@/api";
import { ColumnProps, noFaceTableInstance } from "@/components/noFaceTableRef/interface";
import { FormOptEnum } from "@/enums";
import { useHandleData } from "@/hooks";

const visible = ref(false); //是否显示
// 弹框参数
const propsInfo = reactive<FormProps.Base<AttendancePassenger.PassengerInfo>>({
opt: FormOptEnum.ADD, //操作类型
const propsInfo = reactive<FormProps.Base<AttendanceStudentsReturn.PassengerInfo>>({
opt: FormOptEnum.VIEW, //操作类型
record: {}, //弹框数据
disabled: false
});
@@ -47,17 +49,12 @@ const propsInfo = reactive<FormProps.Base<AttendancePassenger.PassengerInfo>>({
* 打开弹框
* @param props 弹框参数
*/
function onOpen(props: FormProps.Base<AttendancePassenger.PassengerInfo>) {
function onOpen(props: FormProps.Base<AttendanceStudentsReturn.PassengerInfo>) {
Object.assign(propsInfo, props); //合并参数
if (props.opt == FormOptEnum.ADD) {
//如果是新增,设置默认值
propsInfo.record.shijianduan = [];
propsInfo.record.shexiangtou = [];
}
visible.value = true; //显示弹框
if (props.record.id) {
//如果传了id,就去请求api获取record
attendancePassenger.detail({ id: props.record.id }).then(res => {
attendanceStudentsReturn.detail({ id: props.record.id }).then(res => {
propsInfo.record = res.data;
});
}
@@ -65,6 +62,7 @@ function onOpen(props: FormProps.Base<AttendancePassenger.PassengerInfo>) {

const tableData = ref([
{
id:'1',
studentname: "张三",
faces: [
{
@@ -72,8 +70,11 @@ const tableData = ref([
"http://deepvision.oss-cn-zhangjiakou.aliyuncs.com/dfield-cruising/online/person-set/quanjiang/DEMO00001/8746a847ecd64c1696b37f4cdf617a18/5dc35e4c7af84b3fb5aab70156574873.jpg?Expires=1721375257&OSSAccessKeyId=STS.NTfeBHwzU7kivsSS2EypREace&Signature=c1aTbDc1hNISq%2BV05o0slEfoCTI%3D&security-token=CAIS0wN1q6Ft5B2yfSjIr5fTLvj8mqV0gKmCdFXitzIQdf9%2BqqTIhzz2IHFMf3huCeodsv8%2BlGxS5%2FgelrpqVpZDR03Na8RHwrly1lv5O9KY4x49TRng0s%2FLI3OaLjKm9hi7AYygPgK0GJqEb1TDiVUto9%2FTfimjWFqIKICAjYUdAP0cQgi%2Fa0gwZrJRPRAwh8IGEnHTOP2xUHvtmXGCNFd0nQB%2BhGhjk7TdpPeR8R3Dllb35%2FYIroDqWPieYtJrIY10XqWBvqx%2FfbGT1zVLuVoYtvV6gaFc5zbcv9abRFVf4hiCP6%2Ff6MBuNw5%2Fae94efZNp%2BOukuZj6K6B1db7xhtVI%2BBOUiPZA4mr2IzdBeqvNNcwc7m8F1no9YjXbsGs9EEGGStLaVgVI4F8dyAhWEd9FWjgR%2FX5qAyQUGCKULOY1aw6651xwmjz8MCCT1r1GOTBindGasVnMxh5Z0JMjDK9aNkKfgFUbVJ8BrGTCIh%2FYx0bsq7yowDIEyp71TRMo%2Bbu%2FDBhIifKpO4VN7AxMup1DPwu2wNCxORK3yyybb5sa3aTR6942p%2F%2FF5VxFNPqOx1rmCMf4znuW4yrvNkAVvNcuIqdR8aLhaLIEbHzoKxuEKRnrfsIeBqAAUB%2FCKIuI1UaCj4LYX8DyIYOI8tUKFsMguPHpPENaK9Lcz5ZhB%2BrX6BcQfNWOLhDx7KyRE28vtEs2uolAhLTRaZsZFjbAZE5Ngt09%2FbSXdD%2FR%2BOlGMpQdp752x5lOlvPsJp1skuFLbramyqY4oj4tVwv1OLWpcsEc3AEosPalpAuIAA%3D"
},
],
louceng:'3',
qinshi:'301',
},
{
id:'2',
studentname: "李四",
faces: [
{
@@ -81,8 +82,11 @@ const tableData = ref([
"http://deepvision.oss-cn-zhangjiakou.aliyuncs.com/dfield-cruising/online/person-set/quanjiang/DEMO00001/8746a847ecd64c1696b37f4cdf617a18/5dc35e4c7af84b3fb5aab70156574873.jpg?Expires=1721375257&OSSAccessKeyId=STS.NTfeBHwzU7kivsSS2EypREace&Signature=c1aTbDc1hNISq%2BV05o0slEfoCTI%3D&security-token=CAIS0wN1q6Ft5B2yfSjIr5fTLvj8mqV0gKmCdFXitzIQdf9%2BqqTIhzz2IHFMf3huCeodsv8%2BlGxS5%2FgelrpqVpZDR03Na8RHwrly1lv5O9KY4x49TRng0s%2FLI3OaLjKm9hi7AYygPgK0GJqEb1TDiVUto9%2FTfimjWFqIKICAjYUdAP0cQgi%2Fa0gwZrJRPRAwh8IGEnHTOP2xUHvtmXGCNFd0nQB%2BhGhjk7TdpPeR8R3Dllb35%2FYIroDqWPieYtJrIY10XqWBvqx%2FfbGT1zVLuVoYtvV6gaFc5zbcv9abRFVf4hiCP6%2Ff6MBuNw5%2Fae94efZNp%2BOukuZj6K6B1db7xhtVI%2BBOUiPZA4mr2IzdBeqvNNcwc7m8F1no9YjXbsGs9EEGGStLaVgVI4F8dyAhWEd9FWjgR%2FX5qAyQUGCKULOY1aw6651xwmjz8MCCT1r1GOTBindGasVnMxh5Z0JMjDK9aNkKfgFUbVJ8BrGTCIh%2FYx0bsq7yowDIEyp71TRMo%2Bbu%2FDBhIifKpO4VN7AxMup1DPwu2wNCxORK3yyybb5sa3aTR6942p%2F%2FF5VxFNPqOx1rmCMf4znuW4yrvNkAVvNcuIqdR8aLhaLIEbHzoKxuEKRnrfsIeBqAAUB%2FCKIuI1UaCj4LYX8DyIYOI8tUKFsMguPHpPENaK9Lcz5ZhB%2BrX6BcQfNWOLhDx7KyRE28vtEs2uolAhLTRaZsZFjbAZE5Ngt09%2FbSXdD%2FR%2BOlGMpQdp752x5lOlvPsJp1skuFLbramyqY4oj4tVwv1OLWpcsEc3AEosPalpAuIAA%3D"
},
],
louceng:'3',
qinshi:'302',
},
{
id:'3',
studentname: "张三",
faces: [
{
@@ -90,8 +94,11 @@ const tableData = ref([
"http://deepvision.oss-cn-zhangjiakou.aliyuncs.com/dfield-cruising/online/person-set/quanjiang/DEMO00001/8746a847ecd64c1696b37f4cdf617a18/5dc35e4c7af84b3fb5aab70156574873.jpg?Expires=1721375257&OSSAccessKeyId=STS.NTfeBHwzU7kivsSS2EypREace&Signature=c1aTbDc1hNISq%2BV05o0slEfoCTI%3D&security-token=CAIS0wN1q6Ft5B2yfSjIr5fTLvj8mqV0gKmCdFXitzIQdf9%2BqqTIhzz2IHFMf3huCeodsv8%2BlGxS5%2FgelrpqVpZDR03Na8RHwrly1lv5O9KY4x49TRng0s%2FLI3OaLjKm9hi7AYygPgK0GJqEb1TDiVUto9%2FTfimjWFqIKICAjYUdAP0cQgi%2Fa0gwZrJRPRAwh8IGEnHTOP2xUHvtmXGCNFd0nQB%2BhGhjk7TdpPeR8R3Dllb35%2FYIroDqWPieYtJrIY10XqWBvqx%2FfbGT1zVLuVoYtvV6gaFc5zbcv9abRFVf4hiCP6%2Ff6MBuNw5%2Fae94efZNp%2BOukuZj6K6B1db7xhtVI%2BBOUiPZA4mr2IzdBeqvNNcwc7m8F1no9YjXbsGs9EEGGStLaVgVI4F8dyAhWEd9FWjgR%2FX5qAyQUGCKULOY1aw6651xwmjz8MCCT1r1GOTBindGasVnMxh5Z0JMjDK9aNkKfgFUbVJ8BrGTCIh%2FYx0bsq7yowDIEyp71TRMo%2Bbu%2FDBhIifKpO4VN7AxMup1DPwu2wNCxORK3yyybb5sa3aTR6942p%2F%2FF5VxFNPqOx1rmCMf4znuW4yrvNkAVvNcuIqdR8aLhaLIEbHzoKxuEKRnrfsIeBqAAUB%2FCKIuI1UaCj4LYX8DyIYOI8tUKFsMguPHpPENaK9Lcz5ZhB%2BrX6BcQfNWOLhDx7KyRE28vtEs2uolAhLTRaZsZFjbAZE5Ngt09%2FbSXdD%2FR%2BOlGMpQdp752x5lOlvPsJp1skuFLbramyqY4oj4tVwv1OLWpcsEc3AEosPalpAuIAA%3D"
},
],
louceng:'4',
qinshi:'401',
},
{
id:'4',
studentname: "李四",
faces: [
{
@@ -99,8 +106,11 @@ const tableData = ref([
"http://deepvision.oss-cn-zhangjiakou.aliyuncs.com/dfield-cruising/online/person-set/quanjiang/DEMO00001/8746a847ecd64c1696b37f4cdf617a18/5dc35e4c7af84b3fb5aab70156574873.jpg?Expires=1721375257&OSSAccessKeyId=STS.NTfeBHwzU7kivsSS2EypREace&Signature=c1aTbDc1hNISq%2BV05o0slEfoCTI%3D&security-token=CAIS0wN1q6Ft5B2yfSjIr5fTLvj8mqV0gKmCdFXitzIQdf9%2BqqTIhzz2IHFMf3huCeodsv8%2BlGxS5%2FgelrpqVpZDR03Na8RHwrly1lv5O9KY4x49TRng0s%2FLI3OaLjKm9hi7AYygPgK0GJqEb1TDiVUto9%2FTfimjWFqIKICAjYUdAP0cQgi%2Fa0gwZrJRPRAwh8IGEnHTOP2xUHvtmXGCNFd0nQB%2BhGhjk7TdpPeR8R3Dllb35%2FYIroDqWPieYtJrIY10XqWBvqx%2FfbGT1zVLuVoYtvV6gaFc5zbcv9abRFVf4hiCP6%2Ff6MBuNw5%2Fae94efZNp%2BOukuZj6K6B1db7xhtVI%2BBOUiPZA4mr2IzdBeqvNNcwc7m8F1no9YjXbsGs9EEGGStLaVgVI4F8dyAhWEd9FWjgR%2FX5qAyQUGCKULOY1aw6651xwmjz8MCCT1r1GOTBindGasVnMxh5Z0JMjDK9aNkKfgFUbVJ8BrGTCIh%2FYx0bsq7yowDIEyp71TRMo%2Bbu%2FDBhIifKpO4VN7AxMup1DPwu2wNCxORK3yyybb5sa3aTR6942p%2F%2FF5VxFNPqOx1rmCMf4znuW4yrvNkAVvNcuIqdR8aLhaLIEbHzoKxuEKRnrfsIeBqAAUB%2FCKIuI1UaCj4LYX8DyIYOI8tUKFsMguPHpPENaK9Lcz5ZhB%2BrX6BcQfNWOLhDx7KyRE28vtEs2uolAhLTRaZsZFjbAZE5Ngt09%2FbSXdD%2FR%2BOlGMpQdp752x5lOlvPsJp1skuFLbramyqY4oj4tVwv1OLWpcsEc3AEosPalpAuIAA%3D"
},
],
louceng:'3',
qinshi:'301',
},
{
id:'5',
studentname: "张三",
faces: [
{
@@ -108,13 +118,23 @@ const tableData = ref([
"http://deepvision.oss-cn-zhangjiakou.aliyuncs.com/dfield-cruising/online/person-set/quanjiang/DEMO00001/8746a847ecd64c1696b37f4cdf617a18/5dc35e4c7af84b3fb5aab70156574873.jpg?Expires=1721375257&OSSAccessKeyId=STS.NTfeBHwzU7kivsSS2EypREace&Signature=c1aTbDc1hNISq%2BV05o0slEfoCTI%3D&security-token=CAIS0wN1q6Ft5B2yfSjIr5fTLvj8mqV0gKmCdFXitzIQdf9%2BqqTIhzz2IHFMf3huCeodsv8%2BlGxS5%2FgelrpqVpZDR03Na8RHwrly1lv5O9KY4x49TRng0s%2FLI3OaLjKm9hi7AYygPgK0GJqEb1TDiVUto9%2FTfimjWFqIKICAjYUdAP0cQgi%2Fa0gwZrJRPRAwh8IGEnHTOP2xUHvtmXGCNFd0nQB%2BhGhjk7TdpPeR8R3Dllb35%2FYIroDqWPieYtJrIY10XqWBvqx%2FfbGT1zVLuVoYtvV6gaFc5zbcv9abRFVf4hiCP6%2Ff6MBuNw5%2Fae94efZNp%2BOukuZj6K6B1db7xhtVI%2BBOUiPZA4mr2IzdBeqvNNcwc7m8F1no9YjXbsGs9EEGGStLaVgVI4F8dyAhWEd9FWjgR%2FX5qAyQUGCKULOY1aw6651xwmjz8MCCT1r1GOTBindGasVnMxh5Z0JMjDK9aNkKfgFUbVJ8BrGTCIh%2FYx0bsq7yowDIEyp71TRMo%2Bbu%2FDBhIifKpO4VN7AxMup1DPwu2wNCxORK3yyybb5sa3aTR6942p%2F%2FF5VxFNPqOx1rmCMf4znuW4yrvNkAVvNcuIqdR8aLhaLIEbHzoKxuEKRnrfsIeBqAAUB%2FCKIuI1UaCj4LYX8DyIYOI8tUKFsMguPHpPENaK9Lcz5ZhB%2BrX6BcQfNWOLhDx7KyRE28vtEs2uolAhLTRaZsZFjbAZE5Ngt09%2FbSXdD%2FR%2BOlGMpQdp752x5lOlvPsJp1skuFLbramyqY4oj4tVwv1OLWpcsEc3AEosPalpAuIAA%3D"
},
],
louceng:'5',
qinshi:'502',
}
]);
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTable = ref<ProTableInstance>();
// 获取 noFaceTableRef 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const noFaceTableRef = ref<noFaceTableInstance>();
// 表格配置项
const columns: ColumnProps[] = [
{ type: "selection" },
{
prop: "louceng",
label: "楼层"
},
{
prop: "qinshi",
label: "寝室编号"
},
{
prop: "studentname",
label: "学生姓名"
@@ -133,7 +153,6 @@ const columns: ColumnProps[] = [
);
}
}
// { prop: "operation", label: "操作", width: 250, fixed: "right" }
];
// 图片预览
const imgVisible = ref(false);
@@ -142,52 +161,19 @@ const viewHeadImage = (scope: any) => {
faceUrl.value = scope.row.faces[0].faceUrl;
imgVisible.value = true
};
// 刷新表格
const RefreshTable = () => {
proTable.value?.refresh();
};

// 提交数据(新增/编辑)
const formRef = ref<FormInstance>();
/** 提交表单 */
async function handleSubmit() {
formRef.value?.validate(async valid => {
if (!valid) return; //表单验证失败
// shijianduan时间段
propsInfo.record.startTime = formatDate(propsInfo.record.shijianduan[0]);
propsInfo.record.endTime = formatDate(propsInfo.record.shijianduan[1]);
delete propsInfo.record.shijianduan;
// shexiangtou摄像头
propsInfo.record.shexiangtou = propsInfo.record.shexiangtou.toString();
//提交表单
console.log(propsInfo);
if (propsInfo.record.id) {
await attendancePassenger
.update(propsInfo.record)
.then(() => {
propsInfo.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
} else {
console.log(propsInfo.record);
await attendancePassenger
.add(propsInfo.record)
.then(() => {
propsInfo.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
}
});
/** 人工确认 */
async function personConfirm(ids: string[], msg: string) {
await useHandleData(attendanceStudentsReturn.delete, {id: ids.toString() }, msg);
RefreshTable(); //刷新表格
}
/** 关闭表单*/
function onClose() {
visible.value = false;
}

// 刷新表格
const RefreshTable = () => {
noFaceTableRef.value?.refresh();
};
// 暴露给父组件的方法
defineExpose({
onOpen

+ 30
- 23
SafeCampus.WEB/src/views/attendance/studentsReturn/index.vue Wyświetl plik

@@ -9,32 +9,39 @@
<!-- 表格操作栏 -->
<template #operation="scope">
<el-space>
<s-button link prefix="人工" :opt="FormOptEnum.EDIT" suffix="确认" @click="onOpen(FormOptEnum.VIEW, scope.row)" />
<s-button
:disabled="!scope.row.noFaceNum"
link
prefix="人工"
:opt="FormOptEnum.EDIT"
suffix="确认"
@click="onOpen(FormOptEnum.VIEW, scope.row)"
/>
</el-space>
</template>
</ProTable>
<FaceConfirm ref="FaceConfirmRef" />
<ReturnConfirm ref="ReturnConfirmRef" />
</div>
</template>
<script setup lang="ts">
import { attendanceStudentsReturn, AttendanceStudentsReturn } from "@/api";
import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
import { FormOptEnum } from "@/enums";
import FaceConfirm from "./components/nofaceTable/index.vue";
import ReturnConfirm from "./components/returnConfirm/index.vue";
const data = ref([
{
classname: "XXXXX班级",
classId: "544165",
studentNum: "43",
guiqinNum: "38",
noFaceNum: "5"
louceng: "3",
qinshibianhao: "306",
qinshirenshu: "6",
guiqinNum: "5",
noFaceNum: "1"
},
{
classname: "XX班级",
classId: "555333",
studentNum: "42",
guiqinNum: "37",
noFaceNum: "5"
louceng: "3",
qinshibianhao: "307",
qinshirenshu: "8",
guiqinNum: "6",
noFaceNum: "2"
}
]);
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
@@ -42,16 +49,16 @@ const proTable = ref<ProTableInstance>();
// 表格配置项
const columns: ColumnProps[] = [
{
prop: "classname",
label: "班级名称"
prop: "louceng",
label: "楼层"
},
{
prop: "classId",
label: "班级ID"
prop: "qinshibianhao",
label: "寝室编号"
},
{
prop: "studentNum",
label: "学生人数"
prop: "qinshirenshu",
label: "寝室人数"
},
{
prop: "guiqinNum",
@@ -59,20 +66,20 @@ const columns: ColumnProps[] = [
},
{
prop: "noFaceNum",
label: "人脸无法识别人数"
label: "未归寝人数"
},
{ prop: "operation", label: "操作", width: 250, fixed: "right" }
];
const FaceConfirmRef = ref<InstanceType<typeof FaceConfirm> | null>(null);
const ReturnConfirmRef = ref<InstanceType<typeof ReturnConfirm> | null>(null);
/**
* 打开弹框
* 人工确认
* @param opt 操作类型
* @param record 弹框数据
*/
function onOpen(opt: FormOptEnum, record: {} | AttendanceStudentsReturn.studentsReturnInfo = {}) {
switch (opt) {
case FormOptEnum.VIEW:
FaceConfirmRef.value?.onOpen({ opt: opt, record: record, successful: RefreshTable });
ReturnConfirmRef.value?.onOpen({ opt: opt, record: record, successful: RefreshTable });
break;
}
}


+ 1
- 1
SafeCampus.WEB/src/views/userManage/clothing/index.vue Wyświetl plik

@@ -60,7 +60,7 @@
<!-- 预览头像 -->
<el-dialog v-model="visible" title="查看头像" width="830px" :before-close="handleClose">
<div style="display: flex; align-items: center; justify-content: center">
<img style="max-width: 100%" class="detailpic" :src="faceUrl" alt="" />
<img style="max-width: 100%; max-height: 600px" class="detailpic" :src="faceUrl" alt="" />
</div>
<template #footer>
<div class="dialog-footer">


+ 1
- 1
SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue Wyświetl plik

@@ -57,7 +57,7 @@
<!-- 预览头像 -->
<el-dialog v-model="visible" title="查看头像" width="830px" :before-close="handleClose">
<div style="display: flex; align-items: center; justify-content: center">
<img class="detailpic" :src="faceUrl" alt="" style="max-width: 100%" />
<img class="detailpic" :src="faceUrl" alt="" style="max-width: 100%; max-height: 600px" />
</div>
</el-dialog>
</div>


+ 1
- 1
SafeCampus.WEB/src/views/userManage/personnel/index.vue Wyświetl plik

@@ -109,7 +109,7 @@
<!-- 预览头像 -->
<el-dialog v-model="visible" title="查看头像" width="830px" :before-close="handleClose">
<div style="display: flex; align-items: center; justify-content: center">
<img style="max-width: 100%" class="detailpic" :src="faceUrl" alt="" />
<img style="max-width: 100%; max-height: 600px" class="detailpic" :src="faceUrl" alt="" />
</div>
</el-dialog>
</div>


Ładowanie…
Anuluj
Zapisz