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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<template>
  <app-collapse-form title="表字段配置">
    <app-table-list v-bind="tableListProps">
      <template #table-isshow="scope">
        <app-column-tag
          :value="scope.row?.isshow"
          :valueEnum="{T:'显示',F:'隐藏'}"
          :typeEnum="{T:'success',F:'danger'}"
        />
      </template>
      <template #table-is_group="scope">
        <app-column-tag
          :value="scope.row?.is_group"
          :valueEnum="{T:'是',F:'否'}"
          :typeEnum="{T:'success',F:'danger'}"
        />
      </template>
    </app-table-list>
  </app-collapse-form>
</template>
 
<script setup>
 
const formDialogRef = ref();
const tableListRef = ref();
 
import {meta} from "@/hooks";
 
const {useMetaData} = meta;
 
const [columns, filters, fields] = useMetaData(
  'fee_model_band_column',
  () => {
    tableListProps.columns = columns;
    tableListRef.value.$forceUpdate(tableListProps);
  }
);
 
 
const tableListProps = {
  class: 'fields-sort-table-class',
  ref: tableListRef,
  title: '字段列表',
  complementHeight: 0,
  columns,
};
 
const onSetData = (list) => {
  tableListRef.value.setTableData(list);
}
 
defineExpose({
  /**
   * 初始化
   */
  onSetData
});
 
</script>