diff --git a/public/img/cabinet/cabinet_4.jpg b/public/img/cabinet/cabinet_4.jpg new file mode 100644 index 0000000..be17c49 Binary files /dev/null and b/public/img/cabinet/cabinet_4.jpg differ diff --git a/src/layout/components/tag/index.vue b/src/layout/components/tag/index.vue index 9024b83..d9e3825 100644 --- a/src/layout/components/tag/index.vue +++ b/src/layout/components/tag/index.vue @@ -92,15 +92,15 @@ const moveToView = async (index: number): Promise => { } else if ( tabItemElOffsetLeft > -translateX.value && tabItemElOffsetLeft + tabItemOffsetWidth < - -translateX.value + scrollbarDomWidth + -translateX.value + scrollbarDomWidth ) { // 标签在可视区域 translateX.value = Math.min( 0, scrollbarDomWidth - - tabItemOffsetWidth - - tabItemElOffsetLeft - - tabNavPadding + tabItemOffsetWidth - + tabItemElOffsetLeft - + tabNavPadding ); } else { // 标签在可视区域右侧 @@ -455,7 +455,10 @@ function tagOnClick(item) { router.push({ name }); } } else { - router.push({ path }); + router.push({ + path, + query: item.query + }); } // showMenuModel(item?.path, item?.query); } @@ -516,43 +519,25 @@ onBeforeUnmount(() => {
-
- +
+ {{ item.meta.title }} - + - +
@@ -561,17 +546,8 @@ onBeforeUnmount(() => { -
    -
    +
      +
    • {{ item.text }} @@ -580,23 +556,14 @@ onBeforeUnmount(() => {
    - + @@ -123,15 +286,18 @@ onMounted(() => { .flex-container { display: flex; flex: 1; - gap: 20px; + gap: 12px; min-height: 0; .cabinet-info-card { - width: 30%; + width: 20%; + height: 88vh; } .info-card { - width: 70%; + width: 80%; + height: 88vh; + overflow-y: auto; } } diff --git a/src/views/cabinet/smart-cabinet-card/index.vue b/src/views/cabinet/smart-cabinet-card/index.vue index 6a2be11..ce89f0f 100644 --- a/src/views/cabinet/smart-cabinet-card/index.vue +++ b/src/views/cabinet/smart-cabinet-card/index.vue @@ -12,6 +12,7 @@ import Refresh from "@iconify-icons/ep/refresh"; import View from "@iconify-icons/ep/view"; import AddFill from "@iconify-icons/ri/add-circle-line"; import SmartCabinetCardFormModal from "./smart-cabinet-card-form-modal.vue"; +import { useMultiTagsStoreHook } from "@/store/modules/multiTags"; const { VITE_PUBLIC_IMG_PATH: IMG_PATH } = import.meta.env; defineOptions({ @@ -62,6 +63,16 @@ const resetForm = formEl => { }; const handleViewDetail = (row: SmartCabinetDTO) => { + // 保存信息到标签页 + useMultiTagsStoreHook().handleTags("push", { + path: `/cabinet/card/detail`, + name: "smartCabinetCardDetail", + query: { id: row.cabinetId }, + meta: { + title: `${row.cabinetName}`, + dynamicLevel: 3 + } + }); router.push({ path: '/cabinet/card/detail', query: { diff --git a/src/views/shop/goods/goods-edit-modal.vue b/src/views/shop/goods/goods-edit-modal.vue index 24d4931..29a1536 100644 --- a/src/views/shop/goods/goods-edit-modal.vue +++ b/src/views/shop/goods/goods-edit-modal.vue @@ -2,10 +2,11 @@ import { ref, reactive, watch } from "vue"; import { ElMessage, FormRules } from "element-plus"; import { useRenderIcon } from "@/components/ReIcon/src/hooks"; -import { GoodsDTO, updateGoodsApi, addGoodsApi } from "@/api/shop/goods"; +import { GoodsDTO, updateGoodsApi, addGoodsApi, deleteGoodsApi } from "@/api/shop/goods"; import { CategoryDTO, getCategoryAllApi } from "@/api/shop/category"; import Confirm from "@iconify-icons/ep/check"; import Upload from "@iconify-icons/ep/upload"; +import Delete from "@iconify-icons/ep/delete"; const { VITE_APP_BASE_API } = import.meta.env; const props = defineProps({ @@ -121,10 +122,20 @@ watch( if (val) initForm(); } ); +const handleDelete = async () => { + try { + await deleteGoodsApi(formData.goodsId); + ElMessage.success("删除成功"); + emit("refresh"); + closeDialog(); + } catch (error) { + console.error("删除失败", error); + } +};