zhuoyuan.wang
2024-06-19 15ebe96f28cadec6a726c5324593a40bbf56205f
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
<template>
  <app-collapse-form title="工作表配置">
    <app-table-list v-bind="tableListProps"/>
  </app-collapse-form>
</template>
 
<script setup>
const tableListRef = ref();
 
import {meta} from "@/hooks";
import * as tools from "@/utils/tools.js";
 
const {useMetaData} = meta;
 
const [columns, filters, fields] = useMetaData(
  'fee_model_workbook',
  () => {
    tableListProps.columns = columns;
    tableListRef.value.$forceUpdate(tableListProps);
  }
);
 
const tableListProps = {
  ref: tableListRef,
  title: '列表',
  complementHeight: 0,
  columns,
};
 
const onSetData = (list) => {
  tableListRef.value.setTableData(tools.listSort(list, 'orderno'));
  dragSortHandler();
}
 
defineExpose({
  /**
   * 初始化
   */
  onSetData
});
 
</script>