You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.2 KiB
74 lines
2.2 KiB
<template>
|
|
<PageWrapper dense>
|
|
<BasicTable @register="registerTable">
|
|
<template #toolbar>
|
|
<!-- <a-button type="primary">导入</a-button>
|
|
<a-button type="primary">导出</a-button> -->
|
|
<a-button type="link" @click="handleCheck(1)">基本信息</a-button>
|
|
</template>
|
|
<template #bodyCell="{ column, record }">
|
|
<template v-if="column && record && column.key === 'action'">
|
|
<a-button type="link" @click="showDrawer(record.id)">基本信息</a-button>
|
|
<a-button type="link" @click="handleCheck(record.id)">核查情况</a-button>
|
|
</template>
|
|
</template>
|
|
</BasicTable>
|
|
<detailDrawer ref="detailDrawerRef" />
|
|
</PageWrapper>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { PageWrapper } from '@/components/Page';
|
|
import { BasicTable, useTable } from '@/components/Table';
|
|
import { list, removeByIds } from './api';
|
|
import { formSchemas, columns } from './data';
|
|
import detailDrawer from './detailDrawer.vue';
|
|
import { ref } from 'vue';
|
|
import { useGo } from '@/hooks/web/usePage';
|
|
import {getHangzhouRegions} from '@/api/common/index'
|
|
defineOptions({ name: 'info' });
|
|
import { PageEnum } from '@/enums/pageEnum';
|
|
const [registerTable, { reload }] = useTable({
|
|
title: '子站信息管理',
|
|
api: list,
|
|
showIndexColumn: true,
|
|
rowKey: 'id',
|
|
useSearchForm: true,
|
|
formConfig: {
|
|
schemas: formSchemas,
|
|
name: 'info',
|
|
baseColProps: {
|
|
xs: 24,
|
|
sm: 24,
|
|
md: 24,
|
|
lg: 6,
|
|
},
|
|
},
|
|
immediate: true,
|
|
columns: columns,
|
|
actionColumn: {
|
|
width: 300,
|
|
title: '操作',
|
|
key: 'action',
|
|
fixed: 'right',
|
|
},
|
|
});
|
|
//新增编辑弹窗
|
|
//详情,跳转
|
|
const detailDrawerRef = ref();
|
|
const showDrawer = (id: any) => {
|
|
detailDrawerRef.value.showDrawer(id);
|
|
};
|
|
const go = useGo();
|
|
const handleCheck = (id: any) => {
|
|
go({ path: '/stationCheck/checkOrder' as PageEnum, query: { stationId:id } });
|
|
};
|
|
//下拉框
|
|
const getHangzhouOptions =async()=>{
|
|
const res = await getHangzhouRegions()
|
|
formSchemas[0].componentProps.options = res
|
|
}
|
|
getHangzhouOptions()
|
|
</script>
|
|
|
|
<style scoped></style>
|
|
|