|
|
@@ -1,12 +1,7 @@
|
|
|
<template>
|
|
|
<!-- 客户信息: 正常 -->
|
|
|
<div class="custom-normal">
|
|
|
- 客户信息: 正常
|
|
|
- <div class="table-operations">
|
|
|
- <a-button>查询</a-button>
|
|
|
- <a-button>重置</a-button>
|
|
|
- <a-button>新增</a-button>
|
|
|
- </div>
|
|
|
+ <filterCustomTable @add="add" />
|
|
|
<!-- <a-table :columns="columns"
|
|
|
:data-source="data"
|
|
|
@change="handleChange" /> -->
|
|
|
@@ -15,51 +10,53 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { computed, defineComponent, ref } from 'vue';
|
|
|
+import { QueryTableDefine } from '@/goServiceAPI/commonService/index';
|
|
|
|
|
|
import { initData } from '@/setup/methods/index';
|
|
|
import { QueryCustomInfo } from '@/goServiceAPI/ermcp/customInfo/index';
|
|
|
import { QueryCustomInfoType } from '@/goServiceAPI/ermcp/customInfo/interface';
|
|
|
+import filterCustomTable from '@/views/information/custom/compoments/filterTable/index.vue';
|
|
|
import { message } from 'ant-design-vue';
|
|
|
|
|
|
// 查询客户资料列表
|
|
|
function getCustomList() {
|
|
|
- // const filteredInfo = ref();
|
|
|
- // const sortedInfo = ref();
|
|
|
- // const columns = computed(() => {
|
|
|
- // const filtered = filteredInfo.value || {};
|
|
|
- // const sorted = sortedInfo.value || {};
|
|
|
- // return [
|
|
|
- // {
|
|
|
- // title: '序号',
|
|
|
- // dataIndex: 'index',
|
|
|
- // key: 'index',
|
|
|
- // align: 'center',
|
|
|
- // width: 50,
|
|
|
- // customRender: (param: any) => `${param.index + 1}`,
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: 'Age',
|
|
|
- // dataIndex: 'age',
|
|
|
- // key: 'age',
|
|
|
- // sorter: (a: DataItem, b: DataItem) => a.age - b.age,
|
|
|
- // sortOrder: sorted.columnKey === 'age' && sorted.order,
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: 'Address',
|
|
|
- // dataIndex: 'address',
|
|
|
- // key: 'address',
|
|
|
- // filters: [
|
|
|
- // { text: 'London', value: 'London' },
|
|
|
- // { text: 'New York', value: 'New York' },
|
|
|
- // ],
|
|
|
- // filteredValue: filtered.address || null,
|
|
|
- // onFilter: (value: string, record: DataItem) => record.address.includes(value),
|
|
|
- // sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
|
|
|
- // sortOrder: sorted.columnKey === 'address' && sorted.order,
|
|
|
- // ellipsis: true,
|
|
|
- // },
|
|
|
- // ];
|
|
|
- // });
|
|
|
+ const filteredInfo = ref();
|
|
|
+ const sortedInfo = ref();
|
|
|
+ const columns = computed(() => {
|
|
|
+ // const filtered = filteredInfo.value || {};
|
|
|
+ // const sorted = sortedInfo.value || {};
|
|
|
+ // return [
|
|
|
+ // {
|
|
|
+ // title: '序号',
|
|
|
+ // dataIndex: 'index',
|
|
|
+ // key: 'index',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 50,
|
|
|
+ // customRender: (param: any) => `${param.index + 1}`,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: 'Age',
|
|
|
+ // dataIndex: 'age',
|
|
|
+ // key: 'age',
|
|
|
+ // sorter: (a: DataItem, b: DataItem) => a.age - b.age,
|
|
|
+ // sortOrder: sorted.columnKey === 'age' && sorted.order,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: 'Address',
|
|
|
+ // dataIndex: 'address',
|
|
|
+ // key: 'address',
|
|
|
+ // filters: [
|
|
|
+ // { text: 'London', value: 'London' },
|
|
|
+ // { text: 'New York', value: 'New York' },
|
|
|
+ // ],
|
|
|
+ // filteredValue: filtered.address || null,
|
|
|
+ // onFilter: (value: string, record: DataItem) => record.address.includes(value),
|
|
|
+ // sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
|
|
|
+ // sortOrder: sorted.columnKey === 'address' && sorted.order,
|
|
|
+ // ellipsis: true,
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
+ });
|
|
|
const customList = ref<QueryCustomInfoType[]>([]);
|
|
|
function actionQuery() {
|
|
|
QueryCustomInfo(3)
|
|
|
@@ -72,16 +69,25 @@ function getCustomList() {
|
|
|
return { customList, actionQuery };
|
|
|
}
|
|
|
|
|
|
+function add() {
|
|
|
+ console.log('add');
|
|
|
+}
|
|
|
export default defineComponent({
|
|
|
name: 'custom-normal',
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ filterCustomTable,
|
|
|
+ },
|
|
|
setup() {
|
|
|
const { customList, actionQuery } = getCustomList();
|
|
|
+
|
|
|
initData(() => {
|
|
|
actionQuery();
|
|
|
+ QueryTableDefine().then((res) => {
|
|
|
+ console.log('QueryTableDefine', res[0]);
|
|
|
+ });
|
|
|
// 加载数据在这里
|
|
|
});
|
|
|
- return { customList };
|
|
|
+ return { customList, add };
|
|
|
},
|
|
|
});
|
|
|
</script>
|