staging #23
|
|
@ -38,11 +38,13 @@ const tableData: TableConfig = intTableData({
|
||||||
// 操作按钮
|
// 操作按钮
|
||||||
topBtn: false, // 是头部按钮
|
topBtn: false, // 是头部按钮
|
||||||
label: "修改",
|
label: "修改",
|
||||||
|
perms: "学校修改",
|
||||||
btnType: "edit", // 按钮类型 add edit del custom
|
btnType: "edit", // 按钮类型 add edit del custom
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
topBtn: true, // 头部按钮
|
topBtn: true, // 头部按钮
|
||||||
label: "新增学校",
|
label: "新增学校",
|
||||||
|
perms: "学校新增",
|
||||||
btnType: "custom", // 按钮类型 add edit del custom
|
btnType: "custom", // 按钮类型 add edit del custom
|
||||||
btnStyle: "success", // topBtn: true才生效 success danger
|
btnStyle: "success", // topBtn: true才生效 success danger
|
||||||
custom: {
|
custom: {
|
||||||
|
|
@ -79,10 +81,8 @@ const tableData: TableConfig = intTableData({
|
||||||
label: "学校项目",
|
label: "学校项目",
|
||||||
width: "200px",
|
width: "200px",
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
search: new TableColumnSearch(true),
|
|
||||||
edit: {
|
edit: {
|
||||||
multiple: true,
|
multiple: true,
|
||||||
|
|
||||||
edit: true,
|
edit: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import ahTable from "@/components/hTable/index.vue";
|
|
||||||
import {
|
|
||||||
ConditionalType,
|
|
||||||
intTableData,
|
|
||||||
TableColumnSearch,
|
|
||||||
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 = intTableData({
|
|
||||||
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: "编号",
|
|
||||||
width: "150px",
|
|
||||||
search: new TableColumnSearch(true),
|
|
||||||
},
|
|
||||||
name: {
|
|
||||||
label: "学校名称",
|
|
||||||
width: "300px",
|
|
||||||
search: new TableColumnSearch(true),
|
|
||||||
edit: {
|
|
||||||
add: true,
|
|
||||||
edit: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
pname: {
|
|
||||||
label: "地区",
|
|
||||||
width: "300px",
|
|
||||||
custom: (row) => `${row.pname}-${row.cname}-${row.rname}`,
|
|
||||||
},
|
|
||||||
enable: {
|
|
||||||
label: "启用",
|
|
||||||
type: "switch",
|
|
||||||
custom: (row) => (row.enable ? "启用" : "禁用"),
|
|
||||||
search: new TableColumnSearch(true),
|
|
||||||
edit: {
|
|
||||||
add: true,
|
|
||||||
edit: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data: [],
|
|
||||||
pageData: {
|
|
||||||
total: 0,
|
|
||||||
},
|
|
||||||
selectRows: [],
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<ahTable v-if="showTable" ref="table" :tableConfig="tableData" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
Loading…
Reference in New Issue