Ben Lin
2024-06-13 28cd71d5ff26ca539e48a229eed4055df7cae5ad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * @Description: file content
 * @Author: Ben Lin
 * @version: 
 * @Date: 2024-06-13 10:59:53
 * @LastEditors: your name
 * @LastEditTime: 2024-06-13 20:23:02
 */
import { firstColumns, firstFormSchemas, firstSearchForm, secondColumns, secondFormSchemas } from "./basLabelVar";
import { BasicColumn, FormSchema } from "/@/components/Table";
 
/**
 * @description: 获取表格字段
 * @param {string} entityName
 * @param {string} type
 * @return {*}
 */
export function GetBaseColumns(entityName: string, type: string) {
    let data: BasicColumn[] = [];
    switch (entityName) {
        case 'BAS_LABEL_VAR':
            data =type=='detailfirst'? firstColumns: secondColumns;
            break;
        default:
            break;
    }
    return data;
}
 
/**
 * @description: 获取增删改表单字段
 * @param {string} entityName
 * @param {string} type
 * @return {*}
 */
export function GetFormColumns(entityName: string, type: string) {
    let data: FormSchema[] = [];
    switch (entityName) {
        case 'BAS_LABEL_VAR':
            data =type=='detailfirst'? firstFormSchemas: secondFormSchemas;
            break;
        default:
            break;
    }
    return data;
}
 
/**
 * @description: 获取查询表单字段
 * @param {string} entityName
 * @param {string} type
 * @return {*}
 */
export function GetSearchFormColumns(entityName: string, type: string) {
    let data: FormSchema[] = [];
    switch (entityName) {
        case 'BAS_LABEL_VAR':
            data =type=='detailfirst'? firstSearchForm: secondFormSchemas;
            break;
        default:
            break;
    }
    return data;
}