页面路径完善
This commit is contained in:
@@ -131,9 +131,7 @@ const cancelForm = () => {
|
||||
};
|
||||
|
||||
function goBack() {
|
||||
router.push({
|
||||
path: '/house/houselist'
|
||||
});
|
||||
router.back();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ const handleAddBuilding = () => {
|
||||
};
|
||||
const editBuilding = (id: number) => {
|
||||
router.push({
|
||||
path: '/house/addbuilding',
|
||||
path: '/house/editbuilding',
|
||||
query: {
|
||||
buildingId: id
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div class="house-list">
|
||||
<div class="house flex align-center" @contextmenu="contextMenu.open($event, house.houseId)" v-for="house in list.houses" :key="house.houseId">
|
||||
<el-checkbox :label="house.houseNo" :value="house.houseId" />
|
||||
<div class="flex flex-center">
|
||||
<el-checkbox :label="house.houseNo" :value="house.houseId" />
|
||||
<div class="calp" @click="handleCalp($event, house.houseId)">···</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右键菜单组件 -->
|
||||
<ContextMenu ref="contextMenu" :menu="menuList" @select="handleSelect" />
|
||||
@@ -31,6 +34,10 @@ const handleSelect = (data: { type: string; value: string }) => {
|
||||
const emit = defineEmits<{
|
||||
contextmenufun: [value: { type: string; value: string }];
|
||||
}>();
|
||||
|
||||
const handleCalp = (event: MouseEvent, houseid: string) => {
|
||||
contextMenu.value.open(event, houseid);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -48,7 +55,6 @@ const emit = defineEmits<{
|
||||
line-height: 40px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
margin: 5px;
|
||||
padding-left: 10px;
|
||||
padding-top: 3px;
|
||||
@@ -69,4 +75,19 @@ const emit = defineEmits<{
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.calp {
|
||||
margin-left: 10px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 10px;
|
||||
letter-spacing: -3px;
|
||||
transform: rotateZ(90deg) scale(0.8);
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -46,7 +46,7 @@ function contextMenuFun(val: { type: string; value: string }) {
|
||||
switch (val.type) {
|
||||
case 'edit':
|
||||
router.push({
|
||||
path: '/house/addHouse',
|
||||
path: '/house/editHouse',
|
||||
query: {
|
||||
id: val.value
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="Houselist" lang="ts">
|
||||
// TODO 楼栋类型
|
||||
import building from './components/building.vue';
|
||||
import unit from './components/unit.vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
|
||||
Reference in New Issue
Block a user