wwp 2 months ago
parent
commit
1adf5492b3
15 changed files with 113 additions and 41 deletions
  1. +1
    -0
      SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts
  2. +3
    -2
      SafeCampus.WEB/src/components/Form/SSelect/index.vue
  3. +1
    -0
      SafeCampus.WEB/src/components/Form/SSelect/interface.ts
  4. +27
    -4
      SafeCampus.WEB/src/views/monitor/live/components/userForm.vue
  5. +20
    -13
      SafeCampus.WEB/src/views/userManage/classManage/index.vue
  6. +13
    -5
      SafeCampus.WEB/src/views/userManage/clothing/index.vue
  7. +9
    -8
      SafeCampus.WEB/src/views/userManage/major/index.vue
  8. +28
    -4
      SafeCampus.WEB/src/views/violation/portrait/detail.vue
  9. +1
    -1
      monitorMobile/pages/earlyWarning/index.vue
  10. +1
    -1
      monitorMobile/pages/monitor/index.vue
  11. +1
    -1
      monitorMobile/pages/work/passengerFlow/index.vue
  12. +2
    -0
      monitorMobile/pages/work/returnBed/detail.vue
  13. +1
    -1
      monitorMobile/pages/work/returnBed/index.vue
  14. +4
    -0
      monitorMobile/pages/work/rollCall/detail.vue
  15. +1
    -1
      monitorMobile/pages/work/rollCall/index.vue

+ 1
- 0
SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts View File

@@ -35,6 +35,7 @@ export namespace SysUserPersonnel {
userName?: string | number | undefined;
majorId?: any;
majorName?: any;
teacherId?: any;
}
/** 人脸信息 */
export interface SysUserAvatar {


+ 3
- 2
SafeCampus.WEB/src/components/Form/SSelect/index.vue View File

@@ -4,7 +4,7 @@
* @Date: 2023-12-15 15:38:32
!-->
<template>
<el-select :placeholder="placeholder" :filterable="filterable" class="w-full" v-bind="$attrs" clearable>
<el-select :placeholder="placeholder" :filterable="filterable" class="w-full" v-bind="$attrs" :clearable="clearable">
<el-option v-for="(item, index) in options" :key="index" :label="item[props.label]" :value="item[props.value]" />
</el-select>
</template>
@@ -21,7 +21,8 @@ const props = withDefaults(defineProps<SSelectProps>(), {
value: "value",
label: "label",
button: false,
filterable: false //是否可搜索
filterable: false, //是否可搜索
clearable: true //是否可清空
});

const placeholder = computed(() => {


+ 1
- 0
SafeCampus.WEB/src/components/Form/SSelect/interface.ts View File

@@ -22,4 +22,5 @@ export interface SSelectProps {
/** 选项值 */
value?: string;
filterable?: boolean;
clearable?: boolean;
}

+ 27
- 4
SafeCampus.WEB/src/views/monitor/live/components/userForm.vue View File

@@ -15,7 +15,7 @@
label-width="auto"
label-suffix=" :"
>
<s-form-item label="指定推送人" prop="userId">
<s-form-item label="指定人" prop="userId">
<el-button link type="primary" @click="showSelector">选择</el-button>
<el-tag v-if="liveUserProps.record.userId" class="ml-3px" type="warning" closable @close="removeDirector">{{
liveUserProps.record.userInfo?.name
@@ -32,7 +32,7 @@
</template>

<script setup lang="ts">
import { SysOrg, SysUser, sysOrgApi, sysPositionApi, sysRoleApi, sysUserApi, monitorLIVEApi } from "@/api";
import { SysOrg, SysUser, sysOrgApi, userManageTeacherApi, sysPositionApi, sysRoleApi, sysUserApi, monitorLIVEApi } from "@/api";
import { FormOptEnum, SysDictEnum } from "@/enums";
import { required } from "@/utils/formRules";
import { FormInstance } from "element-plus";
@@ -51,7 +51,7 @@ const liveUserProps = reactive<FormProps.Base<any>>({

// 表单验证规则
const rules = reactive({
userId: [required("请选择指定推送人")]
userId: [required("请选择指定人")]
});

/**
@@ -98,7 +98,7 @@ async function handleSubmit() {
.finally(() => {
onClose();
});
} else {
} else if (liveUserProps.opt == "视频推送人") {
params.userId = liveUserProps.record.userId;
params.ids.push(liveUserProps.record.id);
//提交表单
@@ -111,6 +111,29 @@ async function handleSubmit() {
onClose();
});
// delete params.
} else if (liveUserProps.opt == "绑定班主任") {
await userManageTeacherApi
.add(liveUserProps.record)
.then(() => {
liveUserProps.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
} else if (liveUserProps.opt == "修改班主任") {
let params = {
id: liveUserProps.record.teacherId,
userId: liveUserProps.record.userId,
personSetId: liveUserProps.record.personSetId
};
await userManageTeacherApi
.update(params)
.then(() => {
liveUserProps.successful!(); //调用父组件的successful方法
})
.finally(() => {
onClose();
});
}
// console.log(params);
// return;


+ 20
- 13
SafeCampus.WEB/src/views/userManage/classManage/index.vue View File

@@ -35,13 +35,13 @@
<el-link type="primary" :underline="false" :icon="ArrowDown"> 更多 </el-link>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-if="!scope.row.userId" :command="commander(scope.row, cmdEnumTree.AddTeacher)">
<el-dropdown-item v-if="!scope.row.pushUserId" :command="commander(scope.row, cmdEnumTree.AddTeacher)">
{{ cmdEnumTree.AddTeacher }}
</el-dropdown-item>
<el-dropdown-item v-if="scope.row.userId" :command="commander(scope.row, cmdEnumTree.UpdateTeacher)">
<el-dropdown-item v-if="scope.row.pushUserId" :command="commander(scope.row, cmdEnumTree.UpdateTeacher)">
{{ cmdEnumTree.UpdateTeacher }}
</el-dropdown-item>
<el-dropdown-item v-if="scope.row.userId" :command="commander(scope.row, cmdEnumTree.DeleteTeacher)">
<el-dropdown-item v-if="scope.row.pushUserId" :command="commander(scope.row, cmdEnumTree.DeleteTeacher)">
{{ cmdEnumTree.DeleteTeacher }}
</el-dropdown-item>
</el-dropdown-menu>
@@ -50,12 +50,12 @@
</el-space>
</template>
</ProTable>
<!-- 人员选择 -->
<userForm ref="userFormRef" />
</div>

<!-- 班级新增/编辑表单 -->
<FormClass ref="formRefC" />
<!-- 班主任绑定/修改 -->
<FormTeacher ref="formRefT" />
</div>
</template>
<script setup lang="tsx" name="SysUserKeyPersonnel">
@@ -63,9 +63,9 @@ import { userManageClassManageApi,userManageTeacherApi,SysUserPersonnel,userMana
import { useHandleData } from "@/hooks/useHandleData";
import { FormOptEnum } from "@/enums";
import FormClass from "./components/formClass/index.vue";
import FormTeacher from "./components/formTeacher/index.vue";
import { ArrowDown } from "@element-plus/icons-vue";
import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
import userForm from "@/views/monitor/live/components/userForm.vue";
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTable = ref<ProTableInstance>();
const majorOptions = ref<any>([])
@@ -127,9 +127,6 @@ const columns: ColumnProps<SysUserPersonnel.ClassPage>[] = [

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


/**
* 打开班级表单
@@ -184,20 +181,30 @@ function commander(row: SysUserPersonnel.ClassPage, commander: cmdEnumTree): Com
async function handleCommandTree(commander: CommandTree) {
switch (commander.commander) {
case cmdEnumTree.AddTeacher:
formRefT.value?.onOpen({ opt: commander.commander, record: commander.row, successful: RefreshTable });
pushPerson(cmdEnumTree.AddTeacher, commander.row)
break
case cmdEnumTree.UpdateTeacher:
formRefT.value?.onOpen({ opt: commander.commander, record: commander.row, successful: RefreshTable });
pushPerson(cmdEnumTree.UpdateTeacher, commander.row)
break;
case cmdEnumTree.DeleteTeacher:
// 二次确认 => 请求api => 刷新表格
await useHandleData(userManageTeacherApi.delete, {id: commander.row.userId}, '解绑教师');
await useHandleData(userManageTeacherApi.delete, {id: commander.row.teacherId}, '解绑教师');
RefreshTable(); //刷新表格
break;
}
}

// 人员选择
// 表单引用
const userFormRef = ref<InstanceType<typeof userForm> | null>(null);
/**
* 打开表单
* @param opt 操作类型
* @param record 记录
*/
function pushPerson(opt: cmdEnumTree, record: {}) {
userFormRef.value?.onOpen({ opt: opt, record: record, successful: RefreshTable });
}
onMounted(() => {
// 获取专业下拉数据
getMajorList();


+ 13
- 5
SafeCampus.WEB/src/views/userManage/clothing/index.vue View File

@@ -5,13 +5,16 @@
-->
<template>
<div class="main-box">
<!-- :request-api="userManageClothApi.getList" -->
<TreeFilter
ref="treeFilter"
label="clothSetName"
id="clothSetId"
width="300px"
:show-all="true"
:request-api="userManageClothApi.getList"
:show-all="false"
:isData="true"
:data="treeData"
:default-value="clothSetId"
@change="changeTreeFilter"
>
<template v-slot:header>
@@ -35,7 +38,7 @@
<ProTable ref="proTable" title="服装库管理" :columns="columns" rowKey="clothId" :data="tableData.clothes">
<!-- 表格 header 按钮 -->
<template #tableHeader="scope">
<s-button suffix="服装" @click="onOpen(FormOptEnum.ADD, { clothSetId: clothSetId }, treeFilter.treeAllData)" />
<s-button suffix="服装" @click="onOpen(FormOptEnum.ADD, { clothSetId: clothSetId }, treeData)" />
<s-button
type="danger"
:opt="FormOptEnum.DELETE"
@@ -87,6 +90,8 @@ const treeFilter = ref<any>({});
const userStore = useUserStore();
const { accessToken } = userStore;
const tableData = ref<any>([])
// 初始化数据
const treeData = ref<any>([]);
// 表格配置项
const columns: ColumnProps<SysUserCloth.list>[] = [
{ type: "selection", fixed: "left", width: 50 },
@@ -171,14 +176,17 @@ function changeTreeFilter(val: number | string) {
}
// 获取列表
const getList = (clothSetId:any)=>{
// if(!clothSetId) return false
if(!clothSetId) return false
userManageClothApi.page({clothSetId:clothSetId}).then((resp:any)=>{
if(resp.code == 200){
tableData.value = resp.data
}
})
}
onMounted(() => {
onMounted(async () => {
const { data }:any = await userManageClothApi.getList({});
treeData.value = data;
clothSetId.value = data[0].clothSetId.toString()
getList(clothSetId.value)
})
</script>


+ 9
- 8
SafeCampus.WEB/src/views/userManage/major/index.vue View File

@@ -62,6 +62,15 @@ const getDepartmentList = async () => {
// 表格配置项
const columns: ColumnProps<SysMajor.MajorInfo>[] = [
{ type: "selection", fixed: "left", width: 50 },
{
prop: "code",
label: "专业编号"
},
{
prop: "name",
label: "专业名称"
},
{
prop: "depId",
label: "所属院系",
@@ -72,14 +81,6 @@ const columns: ColumnProps<SysMajor.MajorInfo>[] = [
},
fieldNames: { label: "name", value: "id" }
},
{
prop: "code",
label: "专业编号"
},
{
prop: "name",
label: "专业名称"
},
{
prop: "introduce",
label: "专业简介"


+ 28
- 4
SafeCampus.WEB/src/views/violation/portrait/detail.vue View File

@@ -107,7 +107,13 @@
<div class="situation attendanceStatus">
<div class="top">
<span class="title">出勤情况分析</span>
<s-select v-model="state.attendanceTime" :options="state.options" style="width: 100px" @change="getStuAttendance"></s-select>
<s-select
v-model="state.attendanceTime"
:clearable="false"
:options="state.options"
style="width: 100px"
@change="getStuAttendance"
></s-select>
</div>
<div class="contentBox">
<div class="tip">
@@ -123,7 +129,13 @@
<div class="situation schoolStatus">
<div class="top">
<span class="title">出校访学情况</span>
<s-select v-model="state.leavesSchTime" :options="state.options" style="width: 100px" @change="getStuLeave"></s-select>
<s-select
v-model="state.leavesSchTime"
:clearable="false"
:options="state.options"
style="width: 100px"
@change="getStuLeave"
></s-select>
</div>
<div class="contentBox">
<div class="tip">
@@ -168,7 +180,13 @@
<div class="situation attendanceStatus">
<div class="top">
<span class="title">图书馆使用情况</span>
<s-select v-model="state.libraryTime" :options="state.options" style="width: 100px" @change="getStuLibrary"></s-select>
<s-select
v-model="state.libraryTime"
:clearable="false"
:options="state.options"
style="width: 100px"
@change="getStuLibrary"
></s-select>
</div>
<div class="contentBox">
<div class="tip">
@@ -188,7 +206,13 @@
<div class="situation attendanceStatus">
<div class="top">
<span class="title">一卡通消费情况</span>
<s-select v-model="state.oneCardTime" :options="state.options" style="width: 100px" @change="getOneCardSolution"></s-select>
<s-select
v-model="state.oneCardTime"
:clearable="false"
:options="state.options"
style="width: 100px"
@change="getOneCardSolution"
></s-select>
</div>
<div class="contentBox">
<div class="tip">


+ 1
- 1
monitorMobile/pages/earlyWarning/index.vue View File

@@ -88,7 +88,7 @@

</view>
<view class="tableBox">
<u-empty marginTop="100rpx" :show="warnList.length == 0" mode="list" text="暂无数据"></u-empty>
<u-empty marginTop="100rpx" :show="warnList.length == 0&&status == 'nomore'" mode="list" text="暂无数据"></u-empty>
<!-- <u-pull-refresh :refreshing="refreshing" @refresh="onRefresh"> -->
<!-- <scroll-view class="scroll-view" scroll-y="true" refresher-enabled="true"
@refresher-pull="onRefresh" @refresher-refresh="doRefresh" @refresher-restore="restore"


+ 1
- 1
monitorMobile/pages/monitor/index.vue View File

@@ -78,7 +78,7 @@
</view>
</view>
<view class="tableBox">
<u-empty marginTop="100rpx" :show="monitorList.length == 0" mode="list" text="暂无数据"></u-empty>
<u-empty marginTop="100rpx" :show="monitorList.length == 0&&status == 'nomore'" mode="list" text="暂无数据"></u-empty>
<u-list @scrolltolower="scrolltolower" style="height: calc(100% - 0rpx);">
<u-list-item v-for="(item, index) in monitorList" :key="index">
<view class="liBox">


+ 1
- 1
monitorMobile/pages/work/passengerFlow/index.vue View File

@@ -1,6 +1,6 @@
<template>
<view style="height: 100%;">
<u-empty marginTop="100rpx" :show="false" mode="list" text="暂无数据"></u-empty>
<u-empty marginTop="100rpx" :show="list.length == 0&&status == 'nomore'" mode="list" text="暂无数据"></u-empty>
<u-list @scrolltolower="scrolltolower" style="height: calc(100% - 29rpx);padding-top:29rpx">
<u-list-item v-for="(item, index) in list" :key="index">
<view class="whiteCard">


+ 2
- 0
monitorMobile/pages/work/returnBed/detail.vue View File

@@ -86,7 +86,9 @@
},
mounted() {
const {id,ReturnTime} = this.options
this.LOADING('加载中...')
returnInfo({id,ReturnTime}).then(res=>{
this.HIDE_LOADING()
if(res.code != 200)return
this.info = res.data
this.list = res.data.personInfos || []


+ 1
- 1
monitorMobile/pages/work/returnBed/index.vue View File

@@ -6,7 +6,7 @@
:options="list.map(e=>{return {...e,label:'寝室'+e.label}})" placeholder="请选择寝室"
popupTitle="选择寝室" search-placeholder="请输入宿舍号" />
</view>
<u-empty marginTop="100rpx" :show="false" mode="list" text="暂无数据"></u-empty>
<u-empty marginTop="100rpx" :show="list.length == 0&&status == 'nomore'" mode="list" text="暂无数据"></u-empty>
<u-list @scrolltolower="scrolltolower" style="height: calc(100% - 220rpx);">
<u-list-item v-for="(item, index) in list" :key="index" v-show="!room || room == item.id">
<view class="whiteCard">


+ 4
- 0
monitorMobile/pages/work/rollCall/detail.vue View File

@@ -95,22 +95,26 @@
} = this.options
// 班级人员
if (personSetId) {
this.LOADING('加载中...')
await detail({
personSetId,
pageSize: 1000,
pageNum: 1
}).then(res => {
this.HIDE_LOADING()
if (res.code != 200) return
this.list = res.data.list
})
}
// 监控行为列表
if (taskId) {
this.LOADING('加载中...')
page({
taskId,
pageSize: 1000,
pageNum: 1
}).then(res => {
this.HIDE_LOADING()
if (res.code != 200) return
this.alarmList = res.data.list
this.list = this.list.map(e => {


+ 1
- 1
monitorMobile/pages/work/rollCall/index.vue View File

@@ -4,7 +4,7 @@
<SelectRadio v-model="search.CameraId" align="center" placeholder="请选择摄像头" @change="refresh"
:options="allOptions.monitorList" />
</view>
<u-empty marginTop="100rpx" :show="false" mode="list" text="暂无数据"></u-empty>
<u-empty marginTop="100rpx" :show="list.length == 0&&status == 'nomore'" mode="list" text="暂无数据"></u-empty>
<u-list @scrolltolower="scrolltolower" style="height: calc(100% - 150rpx);">
<u-list-item v-for="(item, index) in list" :key="index">
<u-checkbox v-if="isManage" :name="item.name" shape="circle" label=""></u-checkbox>


Loading…
Cancel
Save