新增 预览学校的功能

新增 预览班级
This commit is contained in:
小肥羊 2025-08-27 17:15:00 +08:00
parent 7d3f6c7001
commit f829df79f8
3 changed files with 83 additions and 0 deletions

View File

@ -33,12 +33,14 @@ const tableData: TableConfig = {
operationColumn: true, // operationColumn: true, //
operationColumnData: [ operationColumnData: [
{ {
perms: "班级修改",
// //
topBtn: false, // topBtn: false, //
label: "修改", label: "修改",
btnType: "edit", // add edit del custom btnType: "edit", // add edit del custom
}, },
{ {
perms: "班级新增",
topBtn: true, // topBtn: true, //
label: "新增", label: "新增",
btnType: "custom", // add edit del custom btnType: "custom", // add edit del custom
@ -52,6 +54,7 @@ const tableData: TableConfig = {
}, },
}, },
{ {
perms: "班级删除",
topBtn: false, // topBtn: false, //
show: true, show: true,
label: "删除", label: "删除",

View File

@ -18,6 +18,7 @@
:expand-on-click-node="false" :expand-on-click-node="false"
show-checkbox show-checkbox
ref="treeRef" ref="treeRef"
:check-strictly="true"
:class="isAuthorized ? `menu-tree menu-tree1` : `menu-tree`" :class="isAuthorized ? `menu-tree menu-tree1` : `menu-tree`"
> >
<template #default="{ node, data }"> <template #default="{ node, data }">

View File

@ -0,0 +1,79 @@
<script setup lang="ts">
import ahTable from "@/components/hTable/index.vue";
import { ConditionalType, TableConfig } from "@/components/hTable/hTable";
import { onMounted, ref } from "vue";
import { fa } from "element-plus/es/locales.mjs";
defineOptions({
name: "SchoolPreview",
});
const showTable = ref(false);
onMounted(() => {
showTable.value = true;
});
function searchCallback(data) {
//let c = data.Conditions.find((s) => s.FieldName == "Pname");
}
const table = ref<{ initTable: (config: TableConfig) => void }>(null);
const tableData: TableConfig = {
apiUrl: "usercenter/back/schools",
selectColumn: false, //
border: false, //
searchCallback: searchCallback,
search: {
//
show: true,
PageIndex: 0,
PageSize: 20,
OrderBy: "CreateTime", //
defaultConditions: [], //
Conditions: [],
},
operationColumn: true, //
operationColumnData: [],
column: {
//
id: {
label: "编号",
search: true,
add: false, //
edit: false, //
width: "150px",
},
name: {
label: "学校名称",
width: "300px",
search: true,
searchType: ConditionalType.Like,
add: true, //
edit: true, //
},
pname: {
label: "地区",
width: "300px",
search: false,
custom: (row) => `${row.pname}-${row.cname}-${row.rname}`,
add: false, //
edit: false, //
},
enable: {
label: "启用",
type: "switch",
search: true,
custom: (row) => (row.enable ? "启用" : "禁用"),
add: true, //
edit: true, //
},
},
data: [],
pageData: {
total: 0,
},
selectRows: [],
};
</script>
<template>
<div>
<ahTable v-if="showTable" ref="table" :tableConfig="tableData" />
</div>
</template>