feat(sis): 电梯信息增加楼层授权功能
This commit is contained in:
@@ -25,6 +25,7 @@ import { commonDownloadExcel } from '#/utils/file/download';
|
||||
|
||||
import elevatorInfoModal from './elevatorInfo-modal.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import floorAuthModal from './floorAuth-modal.vue';
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@@ -88,6 +89,10 @@ const [ElevatorInfoModal, modalApi] = useVbenModal({
|
||||
connectedComponent: elevatorInfoModal,
|
||||
});
|
||||
|
||||
const [FloorAuthModal, floorAuthModalApi] = useVbenModal({
|
||||
connectedComponent: floorAuthModal,
|
||||
});
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
@@ -122,6 +127,12 @@ function handleDownloadExcel() {
|
||||
fieldMappingTime: formOptions.fieldMappingTime,
|
||||
});
|
||||
}
|
||||
|
||||
function handleAuth(row: Required<ElevatorInfoForm>) {
|
||||
floorAuthModalApi.setData({ unitId: row.unitId, elevatorId: row.elevatorId });
|
||||
floorAuthModalApi.open();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -154,6 +165,8 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button @click.stop="handleAuth(row)">楼层授权</ghost-button>
|
||||
|
||||
<ghost-button
|
||||
v-access:code="['sis:elevatorInfo:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
@@ -178,5 +191,6 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
</BasicTable>
|
||||
<ElevatorInfoModal @reload="tableApi.query()" />
|
||||
<FloorAuthModal @reload="tableApi.query()" />
|
||||
</Page>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user