Browse Source

基础数据【共性问题】:选择第2页某条数据进行以上操作成功后,页面还是停留在第2页

master^2
suyanyan 2 weeks ago
parent
commit
1606e1b7fe
16 changed files with 30 additions and 25 deletions
  1. +1
    -1
      SafeCampus.WEB/src/typings/props.d.ts
  2. +1
    -1
      SafeCampus.WEB/src/views/userManage/classManage/components/formClass/index.vue
  3. +1
    -1
      SafeCampus.WEB/src/views/userManage/classManage/components/formTeacher/index.vue
  4. +2
    -1
      SafeCampus.WEB/src/views/userManage/classManage/index.vue
  5. +1
    -1
      SafeCampus.WEB/src/views/userManage/clothing/index.vue
  6. +4
    -4
      SafeCampus.WEB/src/views/userManage/department/components/form.vue
  7. +2
    -1
      SafeCampus.WEB/src/views/userManage/department/index.vue
  8. +1
    -1
      SafeCampus.WEB/src/views/userManage/dormitory/components/form/index.vue
  9. +4
    -4
      SafeCampus.WEB/src/views/userManage/dormitory/components/formDormitory/index.vue
  10. +2
    -1
      SafeCampus.WEB/src/views/userManage/dormitory/index.vue
  11. +1
    -1
      SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue
  12. +2
    -1
      SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue
  13. +3
    -3
      SafeCampus.WEB/src/views/userManage/major/components/form.vue
  14. +2
    -1
      SafeCampus.WEB/src/views/userManage/major/index.vue
  15. +1
    -1
      SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue
  16. +2
    -2
      SafeCampus.WEB/src/views/userManage/personnel/index.vue

+ 1
- 1
SafeCampus.WEB/src/typings/props.d.ts View File

@@ -31,6 +31,6 @@ declare namespace FormProps {
treeAllData?: Array<any>; treeAllData?: Array<any>;
records?: Array<any>; records?: Array<any>;
/** 表单布局 */ /** 表单布局 */
successful?: () => void;
successful?: (init?: any) => void;
} }
} }

+ 1
- 1
SafeCampus.WEB/src/views/userManage/classManage/components/formClass/index.vue View File

@@ -98,7 +98,7 @@ async function handleSubmit() {
.add(sysUserProps.record) .add(sysUserProps.record)
.then(() => { .then(() => {
ElMessage.success("新增成功"); ElMessage.success("新增成功");
sysUserProps.successful!(); //调用父组件的successful方法
sysUserProps.successful!(true); //调用父组件的successful方法
}) })
.finally(() => { .finally(() => {
onClose(); onClose();


+ 1
- 1
SafeCampus.WEB/src/views/userManage/classManage/components/formTeacher/index.vue View File

@@ -96,7 +96,7 @@ async function handleSubmit() {
await userManageTeacherApi await userManageTeacherApi
.add(sysUserProps.record) .add(sysUserProps.record)
.then(() => { .then(() => {
sysUserProps.successful!(); //调用父组件的successful方法
sysUserProps.successful!(true); //调用父组件的successful方法
}) })
.finally(() => { .finally(() => {
onClose(); onClose();


+ 2
- 1
SafeCampus.WEB/src/views/userManage/classManage/index.vue View File

@@ -144,7 +144,8 @@ const formRefC = ref<InstanceType<typeof FormClass> | null>(null);
} }


// 刷新表格 // 刷新表格
const RefreshTable = () => {
const RefreshTable = (init: boolean = false) => {
if(init)proTable.value!.pageable.pageNum = 1
proTable.value?.refresh(); proTable.value?.refresh();
} }




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

@@ -36,7 +36,7 @@
</template> </template>
</TreeFilter> </TreeFilter>
<div class="table-box"> <div class="table-box">
<ProTable ref="proTable" title="服装库管理" :columns="columns" rowKey="clothId" :data="tableData.clothes">
<ProTable ref="proTable" :pagination="false" title="服装库管理" :columns="columns" rowKey="clothId" :data="tableData.clothes">
<!-- 表格 header 按钮 --> <!-- 表格 header 按钮 -->
<template #tableHeader="scope"> <template #tableHeader="scope">
<s-button suffix="服装" @click="onOpen(FormOptEnum.ADD, { clothSetId: clothSetId }, treeData)" /> <s-button suffix="服装" @click="onOpen(FormOptEnum.ADD, { clothSetId: clothSetId }, treeData)" />


+ 4
- 4
SafeCampus.WEB/src/views/userManage/department/components/form.vue View File

@@ -32,7 +32,7 @@


<script setup lang="ts"> <script setup lang="ts">
import { SysDepartment, userManageDepartmentApi } from "@/api"; import { SysDepartment, userManageDepartmentApi } from "@/api";
import { FormOptEnum, SysDictEnum } from "@/enums";
import { FormOptEnum } from "@/enums";
import { required } from "@/utils/formRules"; import { required } from "@/utils/formRules";
import { FormInstance } from "element-plus"; import { FormInstance } from "element-plus";
import { useDictStore } from "@/stores/modules"; import { useDictStore } from "@/stores/modules";
@@ -86,16 +86,16 @@ async function handleSubmit() {
//提交表单 //提交表单
if (departmentProps.opt == FormOptEnum.ADD) { if (departmentProps.opt == FormOptEnum.ADD) {
await userManageDepartmentApi await userManageDepartmentApi
.add(departmentProps.record, departmentProps.record.id != undefined)
.add(departmentProps.record)
.then(() => { .then(() => {
departmentProps.successful!(); //调用父组件的successful方法
departmentProps.successful!(true); //调用父组件的successful方法
}) })
.finally(() => { .finally(() => {
onClose(); onClose();
}); });
} else { } else {
await userManageDepartmentApi await userManageDepartmentApi
.update(departmentProps.record, departmentProps.record.id != undefined)
.update(departmentProps.record)
.then(() => { .then(() => {
departmentProps.successful!(); //调用父组件的successful方法 departmentProps.successful!(); //调用父组件的successful方法
}) })


+ 2
- 1
SafeCampus.WEB/src/views/userManage/department/index.vue View File

@@ -94,7 +94,8 @@ function onOpen(opt: FormOptEnum, record: {} | SysDepartment.DepartmentInfo = {}
} }


// 刷新表格 // 刷新表格
const RefreshTable = () => {
const RefreshTable = (init: boolean = false) => {
if(init)proTable.value!.pageable.pageNum = 1
proTable.value?.refresh(); proTable.value?.refresh();
} }




+ 1
- 1
SafeCampus.WEB/src/views/userManage/dormitory/components/form/index.vue View File

@@ -98,7 +98,7 @@ async function handleSubmit() {
await userManageDormitoryApi await userManageDormitoryApi
.add(SysDormitoryProps.record) .add(SysDormitoryProps.record)
.then(() => { .then(() => {
SysDormitoryProps.successful!(); //调用父组件的successful方法
SysDormitoryProps.successful!(true); //调用父组件的successful方法
}) })
.finally(() => { .finally(() => {
onClose(); onClose();


+ 4
- 4
SafeCampus.WEB/src/views/userManage/dormitory/components/formDormitory/index.vue View File

@@ -125,7 +125,7 @@ async function handleSubmit() {
await userManageDormitoryApi await userManageDormitoryApi
.addDormitory(sysDormitoryProps.record) .addDormitory(sysDormitoryProps.record)
.then(() => { .then(() => {
sysDormitoryProps.successful!(); //调用父组件的successful方法
sysDormitoryProps.successful!(true); //调用父组件的successful方法
}) })
.finally(() => { .finally(() => {
onClose(); onClose();
@@ -156,12 +156,12 @@ const getCreamaList = () => {
console.log(sysDormitoryProps.record, 89); console.log(sysDormitoryProps.record, 89);


creamaData.value = res.data; creamaData.value = res.data;
let dormitoryData = sysDormitoryProps.record;
let insObj = reactive({
let dormitoryData: any = sysDormitoryProps.record;
let insObj: any = reactive({
sensorId: "", sensorId: "",
sensorName: "" sensorName: ""
}); });
let outObj = reactive({
let outObj: any = reactive({
sensorId: "", sensorId: "",
sensorName: "" sensorName: ""
}); });


+ 2
- 1
SafeCampus.WEB/src/views/userManage/dormitory/index.vue View File

@@ -293,7 +293,8 @@ function onOpen(opt: FormOptEnum, record: {} | SysDormitory.ChamberInfo = {}) {
} }


// 刷新表格 // 刷新表格
const RefreshTable = () => {
const RefreshTable = (init: boolean = false) => {
if(init)proTable.value!.pageable.pageNum = 1
proTable.value?.refresh(); proTable.value?.refresh();
} }
// 同时刷新列表和树并恢复初始状态 // 同时刷新列表和树并恢复初始状态


+ 1
- 1
SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue View File

@@ -105,7 +105,7 @@ async function handleSubmit() {
await userManageKeyPersonApi await userManageKeyPersonApi
.add(sysUserProps.record) .add(sysUserProps.record)
.then(() => { .then(() => {
sysUserProps.successful!(); //调用父组件的successful方法
sysUserProps.successful!(true); //调用父组件的successful方法
}) })
.finally(() => { .finally(() => {
onClose(); onClose();


+ 2
- 1
SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue View File

@@ -131,7 +131,8 @@ function onOpen(opt: FormOptEnum, record: {} | SysUserPersonnel.SysUserPerInfo =
} }


// 刷新表格 // 刷新表格
const RefreshTable = () => {
const RefreshTable = (init: boolean = false) => {
if(init)proTable.value!.pageable.pageNum = 1
proTable.value?.refresh(); proTable.value?.refresh();
} }
</script> </script>


+ 3
- 3
SafeCampus.WEB/src/views/userManage/major/components/form.vue View File

@@ -103,16 +103,16 @@ async function handleSubmit() {
//提交表单 //提交表单
if (majorProps.opt == FormOptEnum.ADD) { if (majorProps.opt == FormOptEnum.ADD) {
await userManageMajorApi await userManageMajorApi
.add(majorProps.record, majorProps.record.id != undefined)
.add(majorProps.record)
.then(() => { .then(() => {
majorProps.successful!(); //调用父组件的successful方法
majorProps.successful!(true); //调用父组件的successful方法
}) })
.finally(() => { .finally(() => {
onClose(); onClose();
}); });
} else { } else {
await userManageMajorApi await userManageMajorApi
.update(majorProps.record, majorProps.record.id != undefined)
.update(majorProps.record)
.then(() => { .then(() => {
majorProps.successful!(); //调用父组件的successful方法 majorProps.successful!(); //调用父组件的successful方法
}) })


+ 2
- 1
SafeCampus.WEB/src/views/userManage/major/index.vue View File

@@ -118,7 +118,8 @@ function onOpen(opt: FormOptEnum, record: {} | SysMajor.MajorInfo = {}) {
} }


// 刷新表格 // 刷新表格
const RefreshTable = () => {
const RefreshTable = (init: boolean = false) => {
if(init)proTable.value!.pageable.pageNum = 1
proTable.value?.refresh(); proTable.value?.refresh();
} }




+ 1
- 1
SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue View File

@@ -105,7 +105,7 @@ async function handleSubmit() {
await userManagePersonnelApi await userManagePersonnelApi
.add(sysUserProps.record) .add(sysUserProps.record)
.then(() => { .then(() => {
sysUserProps.successful!(); //调用父组件的successful方法
sysUserProps.successful!(true); //调用父组件的successful方法
}) })
.finally(() => { .finally(() => {
onClose(); onClose();


+ 2
- 2
SafeCampus.WEB/src/views/userManage/personnel/index.vue View File

@@ -160,8 +160,8 @@ function onOpen(opt: FormOptEnum, record: {} | SysUserPersonnel.SysUserPerInfo =
} }


// 刷新表格 // 刷新表格
const RefreshTable = () => {
proTable.value!.pageable.pageNum = 1;
const RefreshTable = (init: boolean = false) => {
if(init)proTable.value!.pageable.pageNum = 1
proTable.value?.refresh(); proTable.value?.refresh();
// treeFilter.value?.refresh(); //刷新树形筛选器 // treeFilter.value?.refresh(); //刷新树形筛选器
} }


Loading…
Cancel
Save