<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>
|