|
@@ -1,167 +1,170 @@
|
|
|
-import type { TagProps, ButtonType, ElForm } from 'element-plus'
|
|
|
-import Table from '/@/components/table/index.vue'
|
|
|
+import type { TagProps, ButtonType, ElForm } from "element-plus";
|
|
|
+import Table from "/@/components/table/index.vue";
|
|
|
+
|
|
|
declare global {
|
|
|
-
|
|
|
- interface BaTable {
|
|
|
- ref?: typeof Table
|
|
|
- pk?: string
|
|
|
- data?: TableRow[]
|
|
|
- remark?: string | null
|
|
|
- loading?: boolean
|
|
|
- expandAll?: boolean
|
|
|
- selection?: TableRow[]
|
|
|
- dblClickNotEditColumn?: (string | undefined)[]
|
|
|
- column: TableColumn[]
|
|
|
- total?: number
|
|
|
- filter?: anyObj
|
|
|
- defaultOrder?: { prop: string; order: string }
|
|
|
- dragSortLimitField?: string
|
|
|
- acceptQuery?: boolean
|
|
|
- extend?: anyObj
|
|
|
- actionStruct?:actionStruct,
|
|
|
- tableName?:string,
|
|
|
- rowStyle?:string,
|
|
|
- headerRowStyle?:string
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- interface BaTableForm {
|
|
|
- ref?: InstanceType<typeof ElForm> | undefined
|
|
|
- labelWidth?: number
|
|
|
- operate?: string
|
|
|
- operateIds?: string[]
|
|
|
- items?: anyObj
|
|
|
- submitLoading?: boolean
|
|
|
- defaultItems?: anyObj
|
|
|
- loading?: boolean
|
|
|
- extend?: anyObj
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- interface BaTableBefore {
|
|
|
- getIndex?: Function
|
|
|
- postDel?: Function
|
|
|
- requestEdit?: Function
|
|
|
- onTableDblclick?: Function
|
|
|
- toggleForm?: Function
|
|
|
- onSubmit?: Function
|
|
|
- onTableAction?: Function
|
|
|
- onTableHeaderAction?: Function
|
|
|
- mount?: Function
|
|
|
- [key: string]: Function | undefined
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- interface BaTableAfter {
|
|
|
- getIndex?: Function
|
|
|
- postDel?: Function
|
|
|
- requestEdit?: Function
|
|
|
- onTableDblclick?: Function
|
|
|
- toggleForm?: Function
|
|
|
- onSubmit?: Function
|
|
|
- onTableAction?: Function
|
|
|
- onTableHeaderAction?: Function
|
|
|
- mount?: Function
|
|
|
- [key: string]: Function | undefined
|
|
|
- }
|
|
|
-
|
|
|
- interface ComSearch {
|
|
|
- form: anyObj
|
|
|
- fieldData: Map<string, any>
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- interface TableColumn extends ElTableColumn {
|
|
|
-
|
|
|
- show?: boolean
|
|
|
-
|
|
|
- render?: string
|
|
|
-
|
|
|
- buttons?: OptButton[]
|
|
|
-
|
|
|
- effect?: TagProps['effect']
|
|
|
-
|
|
|
- size?: TagProps['size']
|
|
|
-
|
|
|
- custom?: any
|
|
|
-
|
|
|
- target?: aTarget
|
|
|
-
|
|
|
- click?: Function
|
|
|
-
|
|
|
- timeFormat?: 'yyyy-mm-dd hh:MM:ss'
|
|
|
-
|
|
|
- default?: any
|
|
|
-
|
|
|
- replaceValue?: any
|
|
|
-
|
|
|
- renderFormatter?: Function
|
|
|
-
|
|
|
- operator?: boolean | OperatorStr
|
|
|
-
|
|
|
- operatorPlaceholder?: string
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- interface OptButton {
|
|
|
-
|
|
|
- render: string
|
|
|
- name: string
|
|
|
- title?: string
|
|
|
- text?: string
|
|
|
- class?: string
|
|
|
- type: ButtonType
|
|
|
- icon: string
|
|
|
- popconfirm?: any
|
|
|
- disabledTip?: boolean
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- interface TableRow extends anyObj {
|
|
|
- children?: TableRow[]
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- type HeaderOptButton = 'refresh' | 'add' | 'edit' | 'delete' | 'unfold' | 'recycle bin' | 'comSearch'
|
|
|
-
|
|
|
-
|
|
|
- type OperatorStr =
|
|
|
- | '='
|
|
|
- | '<>'
|
|
|
- | '>'
|
|
|
- | '>='
|
|
|
- | '<'
|
|
|
- | '<='
|
|
|
- | 'LIKE'
|
|
|
- | 'NOT LIKE'
|
|
|
- | 'IN'
|
|
|
- | 'NOT IN'
|
|
|
- | 'RANGE'
|
|
|
- | 'NOT RANGE'
|
|
|
- | 'NULL'
|
|
|
- | 'NOT NULL'
|
|
|
- | 'FIND_IN_SET'
|
|
|
-
|
|
|
-
|
|
|
- type aTarget = '_blank' | '_self'
|
|
|
-
|
|
|
-
|
|
|
- interface comSearchData {
|
|
|
- field: string
|
|
|
- val: string
|
|
|
- operator: string
|
|
|
- render: string
|
|
|
- }
|
|
|
-
|
|
|
- interface ElTreeData {
|
|
|
- label: string
|
|
|
- children?: ElTreeData[]
|
|
|
- }
|
|
|
-
|
|
|
- interface actionStruct{
|
|
|
- name:string
|
|
|
- data:any
|
|
|
- }
|
|
|
+
|
|
|
+ interface BaTable {
|
|
|
+ ref?: typeof Table
|
|
|
+ pk?: string
|
|
|
+ data?: TableRow[]
|
|
|
+ remark?: string | null
|
|
|
+ loading?: boolean
|
|
|
+ expandAll?: boolean
|
|
|
+ selection?: TableRow[]
|
|
|
+ dblClickNotEditColumn?: (string | undefined)[]
|
|
|
+ column: TableColumn[]
|
|
|
+ total?: number
|
|
|
+ filter?: anyObj
|
|
|
+ defaultOrder?: { prop: string; order: string }
|
|
|
+ dragSortLimitField?: string
|
|
|
+ acceptQuery?: boolean
|
|
|
+ extend?: anyObj
|
|
|
+ actionStruct?: actionStruct,
|
|
|
+ tableName?: string,
|
|
|
+ rowStyle?: string,
|
|
|
+ headerRowStyle?: string
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ interface BaTableForm {
|
|
|
+ ref?: InstanceType<typeof ElForm> | undefined;
|
|
|
+ labelWidth?: number;
|
|
|
+ operate?: string;
|
|
|
+ operateIds?: string[];
|
|
|
+ items?: anyObj;
|
|
|
+ submitLoading?: boolean;
|
|
|
+ defaultItems?: anyObj;
|
|
|
+ loading?: boolean;
|
|
|
+ extend?: anyObj;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ interface BaTableBefore {
|
|
|
+ getIndex?: Function;
|
|
|
+ postDel?: Function;
|
|
|
+ requestEdit?: Function;
|
|
|
+ onTableDblclick?: Function;
|
|
|
+ toggleForm?: Function;
|
|
|
+ onSubmit?: Function;
|
|
|
+ onTableAction?: Function;
|
|
|
+ onTableHeaderAction?: Function;
|
|
|
+ mount?: Function;
|
|
|
+
|
|
|
+ [key: string]: Function | undefined;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ interface BaTableAfter {
|
|
|
+ getIndex?: Function;
|
|
|
+ postDel?: Function;
|
|
|
+ requestEdit?: Function;
|
|
|
+ onTableDblclick?: Function;
|
|
|
+ toggleForm?: Function;
|
|
|
+ onSubmit?: Function;
|
|
|
+ onTableAction?: Function;
|
|
|
+ onTableHeaderAction?: Function;
|
|
|
+ mount?: Function;
|
|
|
+
|
|
|
+ [key: string]: Function | undefined;
|
|
|
+ }
|
|
|
+
|
|
|
+ interface ComSearch {
|
|
|
+ form: anyObj;
|
|
|
+ fieldData: Map<string, any>;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ interface TableColumn extends ElTableColumn {
|
|
|
+
|
|
|
+ show?: boolean;
|
|
|
+
|
|
|
+ render?: string;
|
|
|
+
|
|
|
+ buttons?: OptButton[];
|
|
|
+
|
|
|
+ effect?: TagProps["effect"];
|
|
|
+
|
|
|
+ size?: TagProps["size"];
|
|
|
+
|
|
|
+ custom?: any;
|
|
|
+
|
|
|
+ target?: aTarget;
|
|
|
+
|
|
|
+ click?: Function;
|
|
|
+
|
|
|
+ timeFormat?: "yyyy-mm-dd hh:MM:ss";
|
|
|
+
|
|
|
+ default?: any;
|
|
|
+
|
|
|
+ replaceValue?: any;
|
|
|
+
|
|
|
+ renderFormatter?: Function;
|
|
|
+
|
|
|
+ operator?: boolean | OperatorStr;
|
|
|
+
|
|
|
+ operatorPlaceholder?: string;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ interface OptButton {
|
|
|
+
|
|
|
+ render: string;
|
|
|
+ name: string;
|
|
|
+ title?: string;
|
|
|
+ text?: string;
|
|
|
+ class?: string;
|
|
|
+ type: ButtonType;
|
|
|
+ icon: string;
|
|
|
+ popconfirm?: any;
|
|
|
+ disabledTip?: boolean;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ interface TableRow extends anyObj {
|
|
|
+ children?: TableRow[];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ type HeaderOptButton = "refresh" | "add" | "edit" | "delete" | "unfold" | "recycle bin" | "comSearch"
|
|
|
+
|
|
|
+
|
|
|
+ type OperatorStr =
|
|
|
+ | "="
|
|
|
+ | "<>"
|
|
|
+ | ">"
|
|
|
+ | ">="
|
|
|
+ | "<"
|
|
|
+ | "<="
|
|
|
+ | "LIKE"
|
|
|
+ | "NOT LIKE"
|
|
|
+ | "IN"
|
|
|
+ | "NOT IN"
|
|
|
+ | "RANGE"
|
|
|
+ | "NOT RANGE"
|
|
|
+ | "NULL"
|
|
|
+ | "NOT NULL"
|
|
|
+ | "FIND_IN_SET"
|
|
|
+
|
|
|
+
|
|
|
+ type aTarget = "_blank" | "_self"
|
|
|
+
|
|
|
+
|
|
|
+ interface comSearchData {
|
|
|
+ field: string;
|
|
|
+ val: string;
|
|
|
+ operator: string;
|
|
|
+ render: string;
|
|
|
+ }
|
|
|
+
|
|
|
+ interface ElTreeData {
|
|
|
+ label: string;
|
|
|
+ children?: ElTreeData[];
|
|
|
+ }
|
|
|
+
|
|
|
+ interface actionStruct {
|
|
|
+ name: string;
|
|
|
+ data: any;
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -171,31 +174,31 @@ declare global {
|
|
|
* https:
|
|
|
*/
|
|
|
interface ElTableColumn {
|
|
|
- type?: 'selection' | 'index' | 'expand'
|
|
|
- index?: number | Function
|
|
|
- label?: string
|
|
|
- 'column-key'?: string
|
|
|
- prop?: string
|
|
|
- width?: string | number
|
|
|
- 'min-width'?: string | number
|
|
|
- fixed?: string | boolean
|
|
|
- 'render-header'?: Function
|
|
|
- sortable?: string | boolean
|
|
|
- 'sort-method'?: Function
|
|
|
- 'sort-by'?: Function
|
|
|
- 'sort-orders'?: string[] | null[]
|
|
|
- resizable?: boolean
|
|
|
- formatter?: Function
|
|
|
- 'show-overflow-tooltip'?: boolean
|
|
|
- align?: 'left' | 'center' | 'right'
|
|
|
- 'header-align'?: 'left' | 'center' | 'right'
|
|
|
- 'class-name'?: string
|
|
|
- 'label-class-name'?: string
|
|
|
- selectable?: Function
|
|
|
- 'reserve-selection'?: boolean
|
|
|
- filters?: { key: string; value: string }[]
|
|
|
- 'filter-placement'?: string
|
|
|
- 'filter-multiple'?: boolean
|
|
|
- 'filter-method'?: Function
|
|
|
- 'filtered-value'?: any[]
|
|
|
+ type?: "selection" | "index" | "expand";
|
|
|
+ index?: number | Function;
|
|
|
+ label?: string;
|
|
|
+ "column-key"?: string;
|
|
|
+ prop?: string;
|
|
|
+ width?: string | number;
|
|
|
+ "min-width"?: string | number;
|
|
|
+ fixed?: string | boolean;
|
|
|
+ "render-header"?: Function;
|
|
|
+ sortable?: string | boolean;
|
|
|
+ "sort-method"?: Function;
|
|
|
+ "sort-by"?: Function;
|
|
|
+ "sort-orders"?: string[] | null[];
|
|
|
+ resizable?: boolean;
|
|
|
+ formatter?: Function;
|
|
|
+ "show-overflow-tooltip"?: boolean;
|
|
|
+ align?: "left" | "center" | "right";
|
|
|
+ "header-align"?: "left" | "center" | "right";
|
|
|
+ "class-name"?: string;
|
|
|
+ "label-class-name"?: string;
|
|
|
+ selectable?: Function;
|
|
|
+ "reserve-selection"?: boolean;
|
|
|
+ filters?: { key: string; value: string }[];
|
|
|
+ "filter-placement"?: string;
|
|
|
+ "filter-multiple"?: boolean;
|
|
|
+ "filter-method"?: Function;
|
|
|
+ "filtered-value"?: any[];
|
|
|
}
|