diff --git a/src/api/cabinet/cabinet-cell.ts b/src/api/cabinet/cabinet-cell.ts index cc11ee6..095e9c5 100644 --- a/src/api/cabinet/cabinet-cell.ts +++ b/src/api/cabinet/cabinet-cell.ts @@ -4,6 +4,7 @@ export interface CabinetCellQuery extends BasePageQuery { cabinetId?: number; cellNo?: number; cellType?: number; + goodsName?: string; } export interface CabinetCellDTO { diff --git a/src/views/cabinet/cabinet-cell/index.vue b/src/views/cabinet/cabinet-cell/index.vue index 10c435f..dbb69b3 100644 --- a/src/views/cabinet/cabinet-cell/index.vue +++ b/src/views/cabinet/cabinet-cell/index.vue @@ -204,12 +204,12 @@ const switchCellType = (cellType: number) => { - + - + diff --git a/src/views/cabinet/mqtt-server/index.vue b/src/views/cabinet/mqtt-server/index.vue index 07569b4..51ae077 100644 --- a/src/views/cabinet/mqtt-server/index.vue +++ b/src/views/cabinet/mqtt-server/index.vue @@ -122,12 +122,12 @@ getList(); - + - + diff --git a/src/views/cabinet/operation/index.vue b/src/views/cabinet/operation/index.vue index aa81a50..48d0217 100644 --- a/src/views/cabinet/operation/index.vue +++ b/src/views/cabinet/operation/index.vue @@ -84,8 +84,8 @@ getList(); - + diff --git a/src/views/cabinet/shop/index.vue b/src/views/cabinet/shop/index.vue index 9113da3..b10231f 100644 --- a/src/views/cabinet/shop/index.vue +++ b/src/views/cabinet/shop/index.vue @@ -138,8 +138,8 @@ getList(); - + diff --git a/src/views/cabinet/smart-cabinet-card/detail.vue b/src/views/cabinet/smart-cabinet-card/detail.vue index 650266a..83b2d41 100644 --- a/src/views/cabinet/smart-cabinet-card/detail.vue +++ b/src/views/cabinet/smart-cabinet-card/detail.vue @@ -2,7 +2,7 @@ import { ref, onMounted } from "vue"; import { useRoute, useRouter } from "vue-router"; import { getSmartCabinetDetailApi, type SmartCabinetDTO } from "@/api/cabinet/smart-cabinet"; -import { changeGoodsCellsStock, clearGoodsCells, getCabinetCellList, type CabinetCellDTO } from "@/api/cabinet/cabinet-cell"; +import { CabinetCellQuery, changeGoodsCellsStock, clearGoodsCells, getCabinetCellList, type CabinetCellDTO } from "@/api/cabinet/cabinet-cell"; import { useRenderIcon } from "@/components/ReIcon/src/hooks"; import { CabinetImgMap } from "@/utils/cabinetImgMap"; import GatewayConfigModal from "@/views/cabinet/smart-cabinet/GatewayConfigModal.vue"; @@ -50,6 +50,9 @@ const shopConfigVisible = ref(false); const mainCabinetConfigVisible = ref(false); const editCabinetDrawerVisible = ref(false); const cellList = ref([]); +const searchCellParams = ref({ + goodsName: null +}); const cellPagination = ref({ pageSize: 5, currentPage: 1, @@ -140,11 +143,17 @@ function switchCellType(cellType: number) { } } +function resetCellSearch() { + searchCellParams.value.cellNo = null; + fetchCellList(); +} + async function fetchCellList() { try { loading.value = true; const { data } = await getCabinetCellList({ cabinetId: cabinetId.value, + goodsName: searchCellParams.value.goodsName, pageSize: cellPagination.value.pageSize, pageNum: cellPagination.value.currentPage }); @@ -304,10 +313,26 @@ onMounted(() => {
-
- +
+ + + + + + + 搜索 + + + + + 重置 + + + +
@@ -346,7 +371,8 @@ onMounted(() => { - --> + --> diff --git a/src/views/shop/order/index.vue b/src/views/shop/order/index.vue index f59c206..9dd1802 100644 --- a/src/views/shop/order/index.vue +++ b/src/views/shop/order/index.vue @@ -142,12 +142,12 @@ getList(); value-format="YYYY-MM-DD HH:mm:ss" class="!w-[200px]" /> - + - + diff --git a/src/views/system/role/role-form-modal.vue b/src/views/system/role/role-form-modal.vue index 94be0dc..f2fb717 100644 --- a/src/views/system/role/role-form-modal.vue +++ b/src/views/system/role/role-form-modal.vue @@ -101,20 +101,42 @@ async function handleConfirm() { loading.value = false; } } + +const processedMenuOptions = computed(() => { + const categories = []; + + const collectLeaves = (menu: MenuDTO) => { + if (!menu.children) return []; + return menu.children.filter(child => child.children?.length ? false : true); + }; + + const collectMenus = (menuOption: MenuDTO) => { + const leaves = collectLeaves(menuOption); + leaves.unshift(menuOption); + if (leaves.length) { + categories.push({ + categoryName: menuOption.menuName, + items: leaves + }); + } + if (menuOption.children?.length) { + const lastMenu = menuOption.children.filter(child => child.children?.length); + lastMenu.forEach(child => { + collectMenus(child); + }); + } + }; + props.menuOptions.forEach(menuOption => { + collectMenus(menuOption); + }) + + return categories; +}); + + \ No newline at end of file diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index f272a2a..dbfb64b 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -53,8 +53,8 @@ watch( - +