Compare commits

..

3 Commits

2 changed files with 28 additions and 21 deletions

View File

@ -1,6 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
import ahTable from "@/components/hTable/index.vue"; import ahTable from "@/components/hTable/index.vue";
import { ConditionalType, TableConfig } from "@/components/hTable/hTable"; import {
ConditionalType,
intTableData,
TableColumnSearch,
TableConfig,
} from "@/components/hTable/hTable";
import { onMounted, ref, defineOptions } from "vue"; import { onMounted, ref, defineOptions } from "vue";
import { fa } from "element-plus/es/locales.mjs"; import { fa } from "element-plus/es/locales.mjs";
import { hTableAPI } from "@/api/hTable"; import { hTableAPI } from "@/api/hTable";
@ -12,7 +17,7 @@ defineOptions({
function searchCallback(data) {} function searchCallback(data) {}
const table = ref<{ initTable: (config: TableConfig) => void }>(null); const table = ref<{ initTable: (config: TableConfig) => void }>(null);
const tableData: TableConfig = { const tableData: TableConfig = intTableData({
apiUrl: ControllerName, apiUrl: ControllerName,
selectColumn: false, // selectColumn: false, //
border: false, // border: false, //
@ -68,41 +73,42 @@ const tableData: TableConfig = {
// //
id: { id: {
label: "编号", label: "编号",
search: true, search: new TableColumnSearch(true),
add: false, //
edit: false, //
width: "150px", width: "150px",
}, },
name: { name: {
label: "角色名称", label: "角色名称",
width: "180px", width: "180px",
search: true, search: new TableColumnSearch(true, ConditionalType.Like),
searchType: ConditionalType.Like, edit: {
add: true, // add: true,
edit: true, // },
}, },
enable: { enable: {
label: "启用", label: "启用",
type: "switch", type: "switch",
search: false, search: new TableColumnSearch(true),
add: true, // edit: {
edit: true, // add: true,
valueE: true, // edit: true,
valueE: true,
},
}, },
createTime: { createTime: {
label: "创建时间", label: "创建时间",
type: "datetime", type: "datetime",
search: true, search: new TableColumnSearch(true),
add: false, //
edit: false, //
}, },
remark: { remark: {
label: "备注", label: "备注",
type: "textarea", type: "textarea",
editRows: 3, search: new TableColumnSearch(true),
search: false, edit: {
add: true, // add: true,
edit: true, // edit: true,
editRows: 3,
valueE: true,
},
}, },
}, },
data: [], data: [],
@ -110,7 +116,7 @@ const tableData: TableConfig = {
total: 0, total: 0,
}, },
selectRows: [], selectRows: [],
}; });
const showTable = ref(false); const showTable = ref(false);
onMounted(async () => { onMounted(async () => {

View File

@ -43,6 +43,7 @@ const tableData: TableConfig = intTableData({
}, },
{ {
topBtn: true, // topBtn: true, //
show: false,
label: "新增学校", label: "新增学校",
perms: "学校新增", perms: "学校新增",
btnType: "custom", // add edit del custom btnType: "custom", // add edit del custom