This commit is contained in:
沈鸿 2025-05-29 09:59:42 +08:00
commit a8427ed66b
33 changed files with 2485 additions and 100 deletions

View File

@ -1,6 +1,6 @@
import actions from './actions';
const { VITE_APP_SUB_OS, VITE_APP_SUB_ADMIN, VITE_APP_SUB_GAS, VITE_APP_SUB_GSS, VITE_APP_SUB_GSR } = import.meta.env;
const { VITE_APP_SUB_OS, VITE_APP_SUB_OA, VITE_APP_SUB_ADMIN, VITE_APP_SUB_GAS, VITE_APP_SUB_GSS, VITE_APP_SUB_GSR } = import.meta.env;
export const leftApps = [
{
@ -12,7 +12,7 @@ export const leftApps = [
},
{
name: 'sub-operation-admin',
entry: VITE_APP_SUB_OS,
entry: VITE_APP_SUB_OA,
activeRule: '/sub-operation-admin',
title: '管理后台',
icon: 'images/platform/icon-admin.png',
@ -77,7 +77,7 @@ export const defaultApps = [
},
{
name: 'sub-operation-admin',
entry: VITE_APP_SUB_OS,
entry: VITE_APP_SUB_OA,
activeRule: '/sub-operation-admin',
title: '运营管理后台',
icon: 'images/platform/icon-admin.png',

View File

@ -26,18 +26,18 @@
<div class="_label" style="font-size: 30px">溯源信息</div>
<div class="traceability_info_box">
<div class="traceability_info_box_image">
<img v-if="info.productType === '番茄'" src="../../../assets/images/entities/tomatoImg.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '芹菜'" src="../../../assets/images/entities/芹菜.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '白菜'" src="../../../assets/images/entities/白菜.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '石斛'" src="../../../assets/images/entities/石斛.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '铁皮石斛'" src="../../../assets/images/entities/石斛.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '紫皮石斛'" src="../../../assets/images/entities/石斛.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '甘蔗'" src="../../../assets/images/entities/3.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '黑皮甘蔗'" src="../../../assets/images/entities/3.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '黄皮甘蔗'" src="../../../assets/images/entities/3.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '红茶'" src="../../../assets/images/entities/红茶.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '核桃'" src="../../../assets/images/entities/核桃.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '核桃仁'" src="../../../assets/images/entities/核桃.png" style="width: 100%; height: 100%" />
<img v-if="info.productName === '番茄'" src="../../../assets/images/entities/tomatoImg.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '芹菜'" src="../../../assets/images/entities/芹菜.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '白菜'" src="../../../assets/images/entities/白菜.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '石斛'" src="../../../assets/images/entities/石斛.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '铁皮石斛'" src="../../../assets/images/entities/石斛.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '紫皮石斛'" src="../../../assets/images/entities/石斛.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '甘蔗'" src="../../../assets/images/entities/3.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '黑皮甘蔗'" src="../../../assets/images/entities/3.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '黄皮甘蔗'" src="../../../assets/images/entities/3.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '红茶'" src="../../../assets/images/entities/红茶.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '核桃'" src="../../../assets/images/entities/核桃.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productName === '核桃仁'" src="../../../assets/images/entities/核桃.png" style="width: 100%; height: 100%" />
</div>
<div class="traceability_info_box_title">
<div class="traceability_info_right">新鲜{{ info.productType }}</div>

View File

@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>政务服务</title>
<title>运营服务</title>
</head>
<body>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,190 @@
<template>
<div class="smartFarm-left-menu-warp">
<div class="left-menu">
<div
v-for="(n, index) in menus"
:key="index"
class="left-menu-item"
style="position: relative"
@click.stop="
toLink(index);
openList(index);
"
>
<div style="display: flex; justify-content: flex-start; align-items: center">
<div class="item-img">
<img :src="getAssetsFile('images/smartFarm/' + n.icon)?.href ?? ''" alt="" />
</div>
<span :class="currentIndex === index ? 'active' : ''" class="item-title">{{ n.title }}</span>
<img v-if="n.children.length > 0 && n.isOpen" alt="" :src="getAssetsFile('images/smartFarm/closing.png')" class="isOpen" />
<img
v-if="n.children.length > 0 && !n.isOpen"
alt=""
:src="getAssetsFile('images/smartFarm/down_1@2x.png')"
class="isOpen fz"
@click.stop="openList(index)"
/>
</div>
<div v-if="n.children.length > 0 && n.isOpen" class="item-children">
<div v-for="(item, indexC) in n.children" :key="indexC">
<ul style="overflow: visible; padding-left: 40px; text-align: left; list-style-type: disc !important">
<li :class="item.name === currentCIndex ? 'active' : ''" @click.stop="toLinkSub(index, item.name)">
<div class="dot"></div>
{{ item.title }}
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { isEmpty, getAssetsFile } from '@/utils';
import { useRoute, useRouter } from 'vue-router';
import { useGetCommonData } from '../../store/modules/common';
import { productFactory } from './modul';
const store = useGetCommonData();
const route = useRoute();
const router = useRouter();
const props = defineProps({
menus: {
type: Array,
required: true,
default: () => [],
},
});
watch(
() => props.menus,
(newMenus) => {
leftMenu.value = [...newMenus];
},
{ deep: true }
);
const leftMenu = ref([...props.menus]);
let currentIndex = ref(0);
let currentCIndex = ref('');
const toLink = (index) => {
productFactory(props.menus[index].title);
currentIndex.value = index;
if (leftMenu.value[index].children.length > 0) {
window.sessionStorage.setItem('currentOpen', index);
}
if (index === 0) {
window.sessionStorage.setItem('currentChild', 'main');
}
currentCIndex.value = '';
let path = index !== undefined ? leftMenu.value[index].path : null;
if (path) {
router.push(path);
window.sessionStorage.setItem('currentParent', index);
}
};
const toLinkSub = (index, name) => {
console.info('index', index);
console.info('currentChild', name);
currentCIndex.value = name;
window.sessionStorage.setItem('currentChild', name);
let path;
for (let i in leftMenu.value[index].children) {
if (leftMenu.value[index].children[i].name === name) {
path = leftMenu.value[index].children[i].path;
}
}
if (path) {
console.info('path', path);
router.push(path);
}
};
const openList = (index) => {
currentIndex.value = index;
leftMenu.value[index].isOpen = !leftMenu.value[index].isOpen;
};
onMounted(() => {
currentIndex.value = window.sessionStorage.getItem('currentParent') ? Number(window.sessionStorage.getItem('currentParent')) : 0;
const currentMenu = window.sessionStorage.getItem('currentOpen');
if (currentMenu) {
for (let i in leftMenu.value) {
leftMenu.value[i].isOpen = i === currentMenu;
}
}
const currentChild = window.sessionStorage.getItem('currentChild');
if (currentChild && currentChild === 'main') {
currentCIndex.value = '';
} else if (currentChild) {
currentCIndex.value = currentChild;
}
});
</script>
<style lang="scss" scoped>
.fz {
transform: rotate(180deg);
}
.isOpen {
position: absolute;
right: -24px;
width: 20px;
height: 20px;
}
.active {
color: $color-main;
}
.smartFarm-left-menu-warp {
padding: 0 30px 0 10px;
width: 100%;
height: 100%;
.left-menu {
.left-menu-item {
padding: 16px 0;
width: 100%;
cursor: pointer;
&.active {
color: $color-main;
}
.item-img,
.item-title {
vertical-align: middle;
}
.item-img {
display: inline-block;
width: 32px;
height: 32px;
}
.item-title {
padding-left: 8px;
font-size: 18px;
font-weight: 400;
}
.item-children {
margin-top: 8px;
font-size: 16px;
text-align: center;
transition: transform 0.3s ease;
.dot {
display: inline-block;
margin-right: 15px;
width: 4px;
height: 4px;
border-radius: 90px;
background-color: black;
vertical-align: middle;
}
li {
margin: 5px auto;
height: 35px;
line-height: 35px;
}
}
}
}
}
</style>

View File

@ -0,0 +1,27 @@
import { useGetCommonData } from '../../store/modules/common';
const store = useGetCommonData();
// 仓储
function createProductA() {
store.getData({ title: '仓储' });
}
// 物流
function createProductB() {
store.getData1({ title: '物流' });
}
// 工厂函数
export function productFactory(title) {
switch (title) {
case '仓储':
return createProductA();
case '物流':
return createProductB();
default:
throw new Error('未知产品类型');
}
}
// 可选:直接导出具体产品构造函数
export { createProductA, createProductB };

View File

@ -10,14 +10,15 @@
<template v-if="!item.alwaysShow && hasOneShowingChild(item.children, item)">
<layout-link v-if="onlyOneChild.meta" :to="onlyOneChild.path">
<el-menu-item :index="onlyOneChild.path">
<layout-icon :size="20" :icon="onlyOneChild?.meta?.icon" />
<img v-if="onlyOneChild.meta.icon" :src="getAssetsFile(onlyOneChild.meta.icon)" style="height: 20px; margin-right: 20px" alt="" />
<!-- <layout-icon :size="20" :icon="onlyOneChild?.meta?.icon ? getAssetsFile(onlyOneChild.meta.icon) : undefined" />-->
<template #title>{{ onlyOneChild.meta && onlyOneChild.meta?.title }}</template>
</el-menu-item>
</layout-link>
</template>
<el-sub-menu v-else :index="item.path" teleported>
<template #title>
<layout-icon :size="20" :icon="item?.meta?.icon" />
<!-- <layout-icon :size="20" :icon="item?.meta?.icon ? getAssetsFile(item.meta.icon) : undefined" />-->
<span>{{ item.meta && item.meta?.title }}</span>
</template>
<sub-item v-for="child in item.children" :key="child.path" :item="child" />
@ -30,6 +31,7 @@ import { ref } from 'vue';
// import { isExternal } from '@/utils/validate.js';
import LayoutLink from './Link';
import LayoutIcon from './Icon';
import { getAssetsFile } from '@/utils/index.js';
// import path from 'path-browserify';
defineProps({
@ -65,7 +67,6 @@ const hasOneShowingChild = (children = [], parent) => {
onlyOneChild.value = { ...parent, noShowingChildren: true };
return true;
}
return false;
};

View File

@ -73,6 +73,18 @@ export const constantRoutes = [
name: 'userLands',
meta: { title: '我的土地' },
},
{
path: '/sub-operation-service/mySource',
component: () => import('@/views/userCenter/mySource.vue'),
name: 'mySource',
meta: { title: '我的溯源' },
},
{
path: '/sub-operation-service/myFinance',
component: () => import('@/views/userCenter/myFinance.vue'),
name: 'myFinance',
meta: { title: '我的金融' },
},
],
},
@ -203,14 +215,20 @@ export const constantRoutes = [
path: '/sub-operation-service/packaging',
name: 'packaging',
component: Layout,
redirect: '/sub-operation-service/packaging/index',
redirect: '/sub-operation-service/packaging/sorting',
meta: { title: '分拣包装' },
children: [
{
path: '/sub-operation-service/packaging/sorting',
component: () => import('@/views/packaging/sorting.vue'),
name: 'sortingMain',
meta: { title: '分拣首页' },
},
{
path: '/sub-operation-service/packaging/index',
component: () => import('@/views/packaging/index.vue'),
name: 'packagingMain',
meta: { title: '分拣包装首页' },
meta: { title: '包装首页' },
},
],
},
@ -218,14 +236,20 @@ export const constantRoutes = [
path: '/sub-operation-service/warehouseLogistics',
name: 'warehouseLogistics',
component: Layout,
redirect: '/sub-operation-service/warehouseLogistics/index',
redirect: '/sub-operation-service/warehouse',
meta: { title: '仓储物流' },
children: [
{
path: '/sub-operation-service/warehouseLogistics/index',
component: () => import('@/views/warehouseLogistics/index.vue'),
name: 'warehouseLogisticsMain',
meta: { title: '仓储物流首页' },
path: '/sub-operation-service/warehouse',
component: () => import('@/views/warehouseLogistics/warehouse/index.vue'),
name: 'warehouseMain',
meta: { title: '仓储首页' },
},
{
path: '/sub-operation-service/logistics',
component: () => import('@/views/warehouseLogistics/logistics/index.vue'),
name: 'logistics-list',
meta: { title: '物流首页' },
},
],
},

View File

@ -43,7 +43,7 @@ export default [
path: '/sub-operation-service/logistics-list',
component: () => import('@/views/warehouseLogistics/logistics/index.vue'),
name: 'logistics-list',
meta: { title: '物流列表', icon: '' },
meta: { title: '物流', icon: '' },
hidden: true,
},
{
@ -55,27 +55,27 @@ export default [
},
],
},
{
path: '/sub-operation-service/test',
component: Views,
redirect: '/sub-operation-service/test1',
name: 'test',
meta: { title: '测试', icon: 'images/ecommerce/menu3.png' },
children: [
{
path: '/sub-operation-service/test1',
component: () => import('@/views/warehouseLogistics/test/test1.vue'),
name: 'test1',
meta: { title: '子菜单1', icon: '' },
},
{
path: '/sub-operation-service/test2',
component: () => import('@/views/warehouseLogistics/test/test1.vue'),
name: 'test2',
meta: { title: '子菜单2', icon: '' },
},
],
},
// {
// path: '/sub-operation-service/test',
// component: Views,
// redirect: '/sub-operation-service/test1',
// name: 'test',
// meta: { title: '测试', icon: 'images/ecommerce/menu3.png' },
// children: [
// {
// path: '/sub-operation-service/test1',
// component: () => import('@/views/warehouseLogistics/test/test1.vue'),
// name: 'test1',
// meta: { title: '子菜单1', icon: '' },
// },
// {
// path: '/sub-operation-service/test2',
// component: () => import('@/views/warehouseLogistics/test/test1.vue'),
// name: 'test2',
// meta: { title: '子菜单2', icon: '' },
// },
// ],
// },
],
},
];

View File

@ -0,0 +1,22 @@
import { defineStore } from 'pinia';
import { constantRoutes, notFoundRouter } from '@/router';
import { createAsyncRoutes, filterAsyncRoutes, filterKeepAlive } from '@/utils/router';
import { useUserStore } from '@/store/modules/user';
import { getTree } from '@/utils';
export const useGetCommonData = defineStore('commonData', {
state: () => ({
data: {},
}),
actions: {
//仓储调用方法
getData(res) {
useGetCommonData().$state.data = res;
},
//物流调用方法
getData1(res) {
useGetCommonData().$state.data = res;
},
},
getters: {},
});

View File

@ -3,7 +3,7 @@
@import '@/assets/fonts/aliiconfont.css';
#app {
position: relative;
position: absolute;
width: 100%;
height: 100%;
font-family: Avenir, sans-serif;

View File

@ -0,0 +1,122 @@
<template>
<div class="smartFarm-common-warp">
<div class="smartFarm-common-content">
<div class="left-menu">
<slot v-if="$slots.left" name="left"></slot>
<template v-else>
<left-menu :menus="menus"></left-menu>
</template>
</div>
<div class="common-content">
<slot v-if="$slots.main" name="main"></slot>
<template v-else></template>
</div>
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, watch } from 'vue';
import leftMenu from './leftMenu.vue';
const props = defineProps({
currentName: { type: String, default: 'agricultural' },
});
const menus = reactive([
{
name: 'supplier',
title: '农业环境监测',
icon: 'menu1.png',
path: '/sub-operation-service/smartFarm/main',
isOpen: true,
children: [
{
name: 'supplier',
title: '田间监测',
path: '/sub-operation-service/smartFarm/inspection',
},
{
name: 'supplier',
title: '水质监测',
path: '/sub-operation-service/ecommerce-supplier',
},
{
name: 'supplier',
title: '病虫害监测',
path: '/sub-operation-service/ecommerce-supplier',
},
],
},
{
name: 'control',
title: '生产管理控制',
icon: 'menu3.png',
path: '',
isOpen: false,
children: [
{
name: 'control',
title: '一体育苗',
icon: 'menu3.png',
path: '/sub-operation-service/smartFarm/manageControl/growSeedlings',
},
{
name: 'control',
title: '病虫害预防',
icon: 'menu3.png',
path: '/sub-operation-service/smartFarm/manageControl/pestPrevention',
},
{
name: 'control',
title: '喷灌滴灌',
icon: 'menu3.png',
path: '/sub-operation-service/smartFarm/manageControl/irrigationSystem',
},
{
name: 'control',
title: '排集水控制',
icon: 'menu3.png',
path: '/sub-operation-service/smartFarm/manageControl/drainageControl',
},
{
name: 'control',
title: '开窗卷帘',
icon: 'menu3.png',
path: '/sub-operation-service/smartFarm/manageControl/openCurtain',
},
],
},
]);
</script>
<style lang="scss" scoped>
.smartFarm-common-warp {
width: 100%;
height: calc(100vh - 230px);
text-align: center;
.smartFarm-common-content {
width: $width-main;
margin: auto;
height: 100%;
display: inline-flex;
justify-content: space-between;
margin: auto;
width: $width-main;
height: 100%;
.left-menu,
.common-content {
overflow-y: auto;
padding: 8px;
height: calc(100% - 16px);
border-radius: 8px;
}
.left-menu {
width: 240px;
background: $color-fff;
}
.common-content {
margin-left: 16px;
width: calc(100% - 240px);
}
}
}
</style>

View File

@ -0,0 +1,192 @@
<template>
<div class="smartFarm-left-menu-warp">
<div class="left-menu">
<div
v-for="(n, index) in leftMenu"
:key="index"
class="left-menu-item"
style="position: relative"
@click.stop="
toLink(index);
openList(index);
"
>
<div style="display: flex; justify-content: flex-start; align-items: center">
<div class="item-img">
<img :src="getAssetsFile('images/smartFarm/' + n.icon)?.href ?? ''" alt="" />
</div>
<span :class="currentIndex === index ? 'active' : ''" class="item-title">{{ n.title }}</span>
<img v-if="n.children.length > 0 && n.isOpen" alt="" :src="getAssetsFile('images/smartFarm/closing.png')" class="isOpen" />
<img
v-if="n.children.length > 0 && !n.isOpen"
alt=""
:src="getAssetsFile('images/smartFarm/down_1@2x.png')"
class="isOpen fz"
@click.stop="openList(index)"
/>
</div>
<div v-if="n.children.length > 0 && n.isOpen" class="item-children">
<div v-for="(item, indexC) in n.children" :key="indexC">
<ul style="overflow: visible; padding-left: 40px; text-align: left; list-style-type: disc !important">
<li :class="item.name === currentCIndex ? 'active' : ''" @click.stop="toLinkSub(index, item.name)">
<div class="dot"></div>
{{ item.title }}
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { isEmpty, getAssetsFile } from '@/utils';
import { useRoute, useRouter } from 'vue-router';
const route = useRoute();
const router = useRouter();
const leftMenu = reactive([
{
name: 'inspection',
title: '分拣',
icon: 'menu1.png',
path: '/sub-operation-service/packaging/sorting',
isOpen: false,
children: [
// {
// name: 'fieldInspection',
// title: '',
// icon: 'menu1.png',
// path: '/sub-operation-service/smartFarm/fieldInspection',
// },
],
},
{
name: 'control',
title: '包装',
icon: 'menu3.png',
path: '/sub-operation-service/packaging/sorting',
isOpen: false,
children: [],
},
]);
let currentIndex = ref(0);
let currentCIndex = ref('');
const toLink = (index) => {
currentIndex.value = index;
if (leftMenu[index].children.length > 0) {
window.sessionStorage.setItem('currentOpen', index);
}
if (index === 0) {
window.sessionStorage.setItem('currentChild', 'main');
}
currentCIndex.value = '';
let path = index !== undefined ? leftMenu[index].path : null;
if (path) {
router.push(path);
window.sessionStorage.setItem('currentParent', index);
}
};
const toLinkSub = (index, name) => {
console.info('index', index);
console.info('currentChild', name);
currentCIndex.value = name;
window.sessionStorage.setItem('currentChild', name);
let path;
for (let i in leftMenu[index].children) {
if (leftMenu[index].children[i].name === name) {
path = leftMenu[index].children[i].path;
}
}
if (path) {
console.info('path', path);
router.push(path);
}
};
const openList = (index) => {
currentIndex.value = index;
leftMenu[index].isOpen = !leftMenu[index].isOpen;
};
onMounted(() => {
currentIndex.value = window.sessionStorage.getItem('currentParent') ? Number(window.sessionStorage.getItem('currentParent')) : 0;
const currentMenu = window.sessionStorage.getItem('currentOpen');
if (currentMenu) {
for (let i in leftMenu) {
leftMenu[i].isOpen = i === currentMenu;
}
}
const currentChild = window.sessionStorage.getItem('currentChild');
if (currentChild && currentChild === 'main') {
currentCIndex.value = '';
} else if (currentChild) {
currentCIndex.value = currentChild;
}
});
</script>
<style lang="scss" scoped>
.fz {
transform: rotate(180deg);
}
.isOpen {
position: absolute;
right: -24px;
width: 20px;
height: 20px;
}
.active {
color: $color-main;
}
.smartFarm-left-menu-warp {
padding: 0 30px 0 10px;
width: 100%;
height: 100%;
.left-menu {
.left-menu-item {
padding: 16px 0;
width: 100%;
cursor: pointer;
&.active {
color: $color-main;
}
.item-img,
.item-title {
vertical-align: middle;
}
.item-img {
display: inline-block;
width: 32px;
height: 32px;
}
.item-title {
padding-left: 8px;
font-size: 18px;
font-weight: 400;
}
.item-children {
margin-top: 8px;
font-size: 16px;
text-align: center;
transition: transform 0.3s ease;
.dot {
display: inline-block;
margin-right: 15px;
width: 4px;
height: 4px;
border-radius: 90px;
background-color: black;
vertical-align: middle;
}
li {
margin: 5px auto;
height: 35px;
line-height: 35px;
}
}
}
}
}
</style>

View File

@ -0,0 +1,256 @@
<template>
<!-- <page-layout :menus="state.menus"> </page-layout>-->
<section>
<common>
<template #main>
<el-card shadow="none" style="border-radius: 14px">
<div class="tabs">
<div class="tab" style="color: rgba(153, 153, 153, 1)">仓储分类</div>
<div class="tab cursor" :class="{ active: currentTab === 0 }" @click.stop="currentTab = 0">普通仓库</div>
<div class="tab cursor" :class="{ active: currentTab === 1 }" @click.stop="currentTab = 1">恒温仓库</div>
<div class="tab cursor" :class="{ active: currentTab === 2 }" @click.stop="currentTab = 2">冷库</div>
<div class="tab cursor" :class="{ active: currentTab === 3 }" @click.stop="currentTab = 3">气调仓库</div>
<div class="tab">&nbsp;</div>
</div>
</el-card>
<el-row :gutter="20" style="margin-top: 10px">
<el-col v-for="(item, index) in state.data" :key="index" :span="12">
<el-card class="storage-card" shadow="hover">
<div class="storage-content">
<div class="storage-content-top" @click="toLink(item)">
<el-image :src="item.imageUrl" fit="cover" class="storage-image" />
<div class="storage-info">
<h3 class="storage-title">{{ item.title }}</h3>
<div class="storage-desc">
<span>{{ item.description }}</span>
<img :src="getAssetsFile('images/warehouseLogistics/认证.png')" alt="" style="width: 20px" />
<img :src="getAssetsFile('images/warehouseLogistics/优先级.png')" alt="" style="width: 20px" />
</div>
<div class="storage-tags">
<el-tag effect="plain" round style="background-color: rgba(37, 191, 130, 0.2); color: #25bf82">延长仓储</el-tag>
<el-tag effect="plain" round style="background-color: rgba(37, 191, 130, 0.2); color: #25bf82">保鲜储存</el-tag>
</div>
<div class="storage-location">
<el-icon><Location /></el-icon>
{{ item.location }}
</div>
</div>
</div>
<div class="storage-price">
<div class="storage-price-left">
<span class="price-label">报价</span>
<span class="price-amount">¥{{ item.price }}//</span>
</div>
<el-button type="success" class="contact-btn">
<img :src="getAssetsFile('images/warehouseLogistics/messageBox.png')" alt="" style="height: 30px; margin-right: 5px" />
<span>联系卖家</span>
</el-button>
</div>
<div v-if="item.rank" class="rank-badge">
<!-- {{ item.rank }}-->
<img :src="getAssetsFile('images/warehouseLogistics/top' + item.rank + '.png')" alt="" style="width: 80px" />
</div>
</div>
</el-card>
</el-col>
</el-row>
<page-pagination :total="20" @current-change="currentChange" />
</template>
</common>
</section>
</template>
<script setup name="page-menu">
import { ref, reactive, watch } from 'vue';
import { getAssetsFile } from '@/utils';
import { useRoute, useRouter } from 'vue-router';
import warehouseLogisticsRoutes from '@/router/modules/warehouseLogistics';
import Common from './components/common.vue';
const route = useRoute();
const router = useRouter();
const state = reactive({
menus: warehouseLogisticsRoutes[0].children,
query: {
current: 1,
},
data: [
{
imageUrl: '/storage1.jpg',
title: '果蔬保鲜仓储',
description: '绿鲜蔬选果蔬仓储中心 ',
location: '临沧市-耿马县',
price: '600.0',
rank: '1',
},
{
imageUrl: '/storage2.jpg',
title: '果蔬保鲜仓储',
description: '绿鲜蔬选果蔬仓储中心',
location: '临沧市-耿马县',
price: '600.0',
rank: '2',
},
{
imageUrl: '/storage3.jpg',
title: '果蔬保鲜仓储',
description: '绿鲜蔬选果蔬仓储中心 ',
location: '临沧市-耿马县',
price: '600.0',
rank: '3',
},
{
imageUrl: '/storage3.jpg',
title: '果蔬保鲜仓储',
description: '绿鲜蔬选果蔬仓储中心 ',
location: '临沧市-耿马县',
price: '600.0',
rank: '',
},
{
imageUrl: '/storage3.jpg',
title: '果蔬保鲜仓储',
description: '绿鲜蔬选果蔬仓储中心 ',
location: '临沧市-耿马县',
price: '600.0',
rank: '',
},
{
imageUrl: '/storage3.jpg',
title: '果蔬保鲜仓储',
description: '绿鲜蔬选果蔬仓储中心 ',
location: '临沧市-耿马县',
price: '600.0',
rank: '',
},
],
});
const currentTab = ref(0);
const currentChange = (current) => {
state.query.current = current;
};
const toLink = (row) => {
router.push({
path: '/sub-operation-service/warehouse-detail',
query: { id: row?.id ?? '100' },
});
};
</script>
<style lang="scss" scoped>
.tabs {
height: 50px;
line-height: 50px;
display: flex;
font-size: 18px;
justify-content: space-between;
padding: 0 20px;
}
.cursor {
cursor: pointer;
}
.active {
color: rgba(37, 191, 130, 1);
}
.storage-card {
position: relative;
overflow: hidden;
margin-bottom: 20px;
border: 0;
border-radius: 24px;
}
.storage-content {
@include flex-column;
gap: 16px;
&-top {
@include flex-row;
align-items: center;
}
}
.storage-image {
margin-right: 16px;
width: 120px;
height: 120px;
border-radius: 8px;
object-fit: cover;
}
.storage-info {
padding-right: 50px;
flex: 1;
cursor: pointer;
}
.storage-title,
.storage-desc,
.storage-tags,
.storage-location {
overflow: hidden;
margin: 10px 0;
width: 100%;
}
.storage-title {
font-size: 20px;
font-weight: 700;
color: #000000;
@include ellipsis;
}
.storage-desc {
font-size: 16px;
color: #999999;
@include ellipsis;
i {
display: inline-block;
width: 20px;
height: 20px;
}
}
.storage-tags {
span {
margin-right: 10px;
}
}
.storage-location {
display: flex;
align-items: center;
font-size: 16px;
font-weight: 400;
color: #000000;
}
.storage-price {
display: flex;
align-items: center;
&-left {
flex: 1;
}
}
.price-label {
margin-right: 10px;
font-size: 16px;
color: #999999;
}
.price-amount {
font-size: 20px;
font-weight: 700;
color: $color-primary;
}
.contact-btn {
width: 152px;
height: 48px;
font-size: 20px;
border-radius: 8px;
background: #25bf82 !important;
:deep(.el-icon) {
margin-right: 10px;
}
}
.rank-badge {
position: absolute;
top: 0;
right: 20px;
width: 80px;
height: 80px;
}
</style>

View File

@ -24,7 +24,10 @@ const props = defineProps({
</script>
<style lang="scss" scoped>
.ecommerce-common-warp {
position: absolute;
width: 100%;
text-align: center;
height: 100%;
// height: calc(100vh - 230px);
text-align: center;
@ -37,6 +40,7 @@ const props = defineProps({
.left-menu,
.common-content {
overflow-y: auto;
overflow-x: hidden;
padding: 8px;
// height: calc(100% - 16px);

View File

@ -33,7 +33,9 @@ const props = defineProps({
const leftMenu = reactive([
{ name: 'agricultural', title: '我的购物车', icon: 'menu1.png', path: '/sub-operation-service/userCenter' },
{ name: 'supplier', title: '我的订单', icon: 'menu2-1.png', path: '/sub-operation-service/userOrders' },
{ name: 'purchaser', title: '我的土地', icon: 'menu3-1.png', path: '/sub-operation-service/userLands' },
// { name: 'purchaser', title: '', icon: 'menu3-1.png', path: '/sub-operation-service/userLands' },
{ name: 'mySource', title: '我的溯源', icon: 'menu3-1.png', path: '/sub-operation-service/mySource' },
{ name: 'myFinance', title: '我的金融', icon: 'menu3-1.png', path: '/sub-operation-service/myFinance' },
]);
let currentIndex = ref(0);
@ -101,7 +103,7 @@ const toLink = (n, index) => {
width: 100%;
display: inline-flex;
justify-content: flex-start;
padding: 16px 0;
padding: 16px 0 16px 16px;
cursor: pointer;
&.active {
color: $color-main;

View File

@ -0,0 +1,335 @@
<template>
<div class="custom-table-container">
<div class="custom-table-tool">
<el-form :inline="true" class="demo-form-inline" :label-width="'auto'">
<el-form-item label="每页显示">
<el-select v-model="internalPageSize" placeholder="请选择" style="width: 100px" @change="pageSizeChange($event)">
<el-option v-for="item in pageSizes" :key="item" :label="item" :value="item" />
</el-select>
<span style="padding: 0 10px"></span>
</el-form-item>
</el-form>
</div>
<el-table
style="flex: 1; display: flex; flex-direction: column"
:max-height="tableMaxHeight"
:data="pagedTableData"
:border="showBorder"
:stripe="showStripe"
v-bind="$attrs"
:header-cell-class-name="headerCellClassName"
:cell-class-name="cellClassName"
@selection-change="handleSelectionChange"
>
<!-- 首列多选框 -->
<el-table-column v-if="showSelection" type="selection" width="55" align="center" />
<template v-for="column in columns" :key="column.prop">
<el-table-column
:prop="column.prop"
:label="column.label"
:width="column.width"
:align="column.align || 'center'"
:sortable="column.sortable"
:header-class-name="column.headerClassName"
>
<!-- 支持插槽 -->
<template v-if="column.slotName" #default="scope">
<slot :name="column.slotName" :row="scope.row"></slot>
</template>
</el-table-column>
</template>
</el-table>
<div v-if="showPagination" class="pagination-container">
<span class="custom-pagination-text">
{{ internalPage }}{{ Math.ceil(internalTotal / internalPageSize) }}{{ internalTotal }}
</span>
<div style="flex: 1; display: flex; justify-content: end; text-align: right">
<el-pagination
v-model:current-page="internalPage"
v-model:page-size="internalPageSize"
:page-sizes="pageSizes"
:small="small"
:disabled="disabled"
:background="background"
layout="prev, pager, next"
:total="internalTotal"
@current-change="handleCurrentChange"
/>
<span class="custom-pagination-size"> {{ internalPageSize }}/ </span>
</div>
</div>
</div>
</template>
<script setup>
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue';
const props = defineProps({
//
tableData: {
type: Array,
default: () => [],
},
//
columns: {
type: Array,
default: () => [],
},
//
showPagination: {
type: Boolean,
default: true,
},
//
showBorder: {
type: Boolean,
default: false,
},
//
showStripe: {
type: Boolean,
default: false,
},
//
showSelection: {
type: Boolean,
default: false,
},
//
pageSizes: {
type: Array,
default: () => [10, 20, 30, 50],
},
// 使
small: {
type: Boolean,
default: false,
},
//
disabled: {
type: Boolean,
default: false,
},
//
background: {
type: Boolean,
default: false,
},
//
headerCellClassName: {
type: Function,
default: () => '',
},
//
cellClassName: {
type: Function,
default: () => '',
},
});
const emit = defineEmits(['page-change', 'selection-change']);
//
const internalPage = ref(1);
const internalPageSize = ref(props.pageSizes?.[0] || 10);
const internalTotal = ref(0);
//
const pagedTableData = computed(() => {
const start = (internalPage.value - 1) * internalPageSize.value;
const end = start + internalPageSize.value;
return props.tableData.slice(start, end);
});
//
watch(
() => props.tableData,
(newData) => {
internalTotal.value = newData.length; // 3
},
{ immediate: true }
);
//
const pageSizeChange = (val) => {
console.log(`每页 ${val}`);
internalPageSize.value = val;
internalPage.value = 1; //
console.log(internalPage.value, internalPageSize.value);
emitPageChange();
};
//
const handleCurrentChange = (val) => {
console.log(`当前页改变 ${val}`);
internalPage.value = val;
emitPageChange();
};
//
const emitPageChange = () => {
emit('page-change', {
page: internalPage.value,
pageSize: internalPageSize.value,
});
};
//
const handleSelectionChange = (selection) => {
emit('selection-change', selection);
};
const tableRef = ref(null);
const tableMaxHeight = ref(null); // 使max-heightheight
//
const calculateMaxHeight = () => {
const paginationHeight = 60; //
const container = tableRef.value?.$el?.parentElement;
if (container) {
const containerHeight = container.clientHeight;
tableMaxHeight.value = containerHeight - paginationHeight;
}
};
onMounted(() => {
calculateMaxHeight();
window.addEventListener('resize', calculateMaxHeight);
// MutationObserver
const observer = new MutationObserver(calculateMaxHeight);
if (tableRef.value?.$el?.parentElement) {
observer.observe(tableRef.value.$el.parentElement, {
attributes: true,
attributeFilter: ['style', 'class'],
});
}
});
onBeforeUnmount(() => {
window.removeEventListener('resize', calculateMaxHeight);
});
</script>
<style lang="scss" scoped>
.custom-table-container {
// position: relative;
padding: 10px 0;
display: flex;
flex-direction: column;
height: 100%; /* 关键:继承父容器高度 */
overflow: hidden; /* 防止内容溢出 */
}
/* 表格弹性布局 */
:deep(.el-table) {
flex: 1;
display: flex;
flex-direction: column;
/* 表头固定 */
.el-table__header-wrapper {
flex-shrink: 0;
}
/* 表体可滚动 */
.el-table__body-wrapper {
flex: 1;
overflow: auto;
}
}
.demo-form-inline {
text-align: left;
padding-left: 20px;
}
.pagination-container {
margin-top: 10px;
padding: 0 20px;
display: flex;
justify-content: space-between;
color: #999;
font-weight: 400;
}
.custom-pagination-text {
flex: 1;
text-align: left;
line-height: 32px;
}
.custom-pagination-size {
text-align: right;
line-height: 32px;
margin-left: 20px;
}
/* 去除表格边框 */
:deep(.el-table) {
--el-table-border-color: transparent;
}
/* 自定义鼠标悬停颜色 */
:deep(.el-table__body tr:hover > td) {
background-color: rgba(37, 191, 130, 0.1) !important;
}
/* 自定义表头样式 */
:deep(.custom-header) {
background-color: #fff !important;
color: #999;
font-weight: 400;
}
:deep(.el-pagination) {
/* 整体分页样式 */
font-size: 14px;
font-weight: normal;
/* 页码按钮容器 */
.el-pager {
/* 所有页码项 */
li {
font-weight: 400; /* 普通页码字体不加粗 */
color: #606266; /* 普通页码颜色 */
background: transparent;
font-size: 14px;
/* 当前选中页码 */
&.active,
&.is-active {
font-weight: 400 !important; /* 当前页不加粗 */
color: #25bf82 !important; /* 自定义当前页颜色 - 橙色示例 */
}
/* 悬停状态 */
&:hover {
color: #409eff;
}
}
}
/* 上一页/下一页按钮 */
.btn-prev,
.btn-next {
font-weight: 400;
&:disabled {
color: #c0c4cc;
}
}
/* 每页条数选择器 */
.el-pagination__sizes {
.el-input__inner {
font-weight: 400;
}
}
/* 跳页输入框 */
.el-pagination__jump {
font-weight: 400;
}
}
</style>

View File

@ -0,0 +1,393 @@
<template>
<div>
<common current-name="agricultural">
<template #main>
<div class="container">
<userHeader ref="titleRef" :title="'我的金融'"></userHeader>
<!-- 搜索栏 -->
<div ref="searchBarRef" class="search-box">
<div class="order-tab">
<el-tabs v-model="activeCurrent" @tab-click="tabChange">
<el-tab-pane v-for="(t, indext) in bottomList" :key="indext" :label="t.title" :name="t.name"> </el-tab-pane>
</el-tabs>
</div>
<div class="search-bar">
<div class="search-bar-left">
<el-form ref="searchForm" :inline="true" :model="formInline" class="demo-form-inline" :label-width="'auto'">
<el-form-item label="产品名称" prop="productName">
<el-input v-model="formInline.productName" placeholder="请输入产品名称" clearable />
</el-form-item>
<el-form-item v-show="activeCurrent == '3'" label="担保人" prop="guarantor">
<el-input v-model="formInline.guarantor" placeholder="请输入担保人" clearable />
</el-form-item>
<el-form-item label="申请人" prop="applicant">
<el-input v-model="formInline.applicant" placeholder="请输入申请人" clearable />
</el-form-item>
<el-form-item label="申请状态" prop="status">
<el-select v-model="formInline.status" placeholder="请选择">
<el-option label="全部" value="99" />
<el-option label="待检测" value="0" />
<el-option label="已检测" value="1" />
</el-select>
</el-form-item>
<el-form-item label="申请日期" prop="startDate" style="margin-right: 0">
<el-date-picker v-model="formInline.startDate" type="date" placeholder="请选择起始日期" clearable style="width: 160px" />
</el-form-item>
<el-form-item style="margin-right: 0">
<span style="width: 30px; text-align: center; display: inline-block"> - </span>
</el-form-item>
<el-form-item prop="endDate">
<el-date-picker v-model="formInline.endDate" type="date" placeholder="请选择截止日期" clearable style="width: 160px" />
</el-form-item>
</el-form>
</div>
<div class="search-bar-right">
<el-button type="primary" icon="Search" @click="onSubmit">查询</el-button>
<el-button icon="Refresh" style="margin: 24px 0 0 0" @click="resetForm">重置</el-button>
</div>
</div>
</div>
<!-- 表格 -->
<div class="table-cont" :style="{ height: tableViewportHeight + 'px' }">
<tableComponent
:table-data="tableData"
:columns="columns"
:show-border="false"
:show-selection="true"
:header-cell-class-name="getHeaderClass"
@page-change="handlePaginationChange"
@selection-change="handleSelectionChange"
>
<!-- 自定义-状态 -->
<template #status="slotProps">
<span :style="{ color: slotProps.row.status == 1 ? 'green' : '#FFB345' }">
{{ slotProps.row.status === 1 ? '已通过' : '已申请' }}
</span>
</template>
<!-- 自定义-操作 -->
<template #action="slotProps">
<el-dropdown>
<span class="el-dropdown-link">
<el-icon><More /></el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="handleEdit(slotProps.row, 1)">Action 1</el-dropdown-item>
<el-dropdown-item @click="handleEdit(slotProps.row, 2)">Action 2</el-dropdown-item>
<el-dropdown-item @click="handleEdit(slotProps.row, 3)">Action 3</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</tableComponent>
</div>
</div>
</template>
</common>
</div>
</template>
<script setup>
import common from './components/common.vue';
import { ref, reactive, computed, onMounted, onBeforeUnmount } from 'vue';
import userHeader from './components/userHeader.vue';
import tableComponent from './components/tableComponent.vue';
import Mock from 'mockjs';
const formInline = reactive({
productName: '',
applicant: '',
guarantor: '',
status: '99',
startDate: '',
endDate: '',
});
let activeCurrent = ref('1');
let bottomList = reactive([
{ title: '我的信贷', name: '1' },
{ title: '我的保险', name: '2' },
{ title: '我的担保贷款', name: '3' },
]);
const tabChange = () => {
console.log(activeCurrent.value);
};
const searchForm = ref(null);
const onSubmit = () => {
console.log('submit!');
};
const resetForm = () => {
searchForm.value.resetFields();
};
//
const tableData = ref([]);
//
const columns = ref([
{ prop: 'id', label: 'ID', width: '80' },
{ prop: 'productName', label: '产品名称' },
{ prop: 'guarantor', label: '担保人' },
{ prop: 'applicant', label: '申请人' },
{ prop: 'status', label: '申请状态', slotName: 'status' },
{ prop: 'applyTime', label: '申请日期', width: '180px' },
{ prop: 'action', label: '操作', slotName: 'action', width: '180' },
]);
//
const generateMockData = () => {
return Mock.mock({
'list|30': [
{
'id|+1': 1,
productName: '惠农e贷', //
applyTime: '@datetime',
'status|1': [1, 1, 1, 0], //0 1
guarantor: '@cname',
applicant: '@cname',
},
],
}).list;
};
//
const loadData = () => {
// API
setTimeout(() => {
tableData.value = generateMockData();
}, 500);
};
// ,columnsheaderClassName: 'custom-header'
const getHeaderClass = ({ column }) => {
return 'custom-header';
};
//
const handlePaginationChange = ({ page, pageSize }) => {
console.log('分页变化:', page, pageSize);
// API
// fetchData(page, limit,pageSize)
};
//
const handleSelectionChange = (selection) => {
console.log('选中项:', selection);
};
let nowClickRow = ref(null);
//
const handleEdit = (row, num) => {
nowClickRow.value = row;
console.log('编辑的行:', row);
console.log('第几个按钮:', num);
};
const titleRef = ref(null);
const searchBarRef = ref(null);
const tableViewportHeight = ref(0);
//
const calculateTableHeight = () => {
//
const windowHeight = window.innerHeight;
//
const headerHeight = titleRef.value?.$el?.offsetHeight || 0;
const searchBarHeight = searchBarRef.value?.offsetHeight || 0;
//
const paddingCompensation = 60;
//
tableViewportHeight.value = windowHeight - headerHeight - searchBarHeight - paddingCompensation;
// console.log(tableViewportHeight.value);
};
//
onMounted(() => {
loadData();
calculateTableHeight();
//
window.addEventListener('resize', calculateTableHeight);
// DOMheader/searchbar
const observer = new ResizeObserver(calculateTableHeight);
if (titleRef.value?.$el) observer.observe(titleRef.value.$el);
if (searchBarRef.value) observer.observe(searchBarRef.value);
});
onBeforeUnmount(() => {
window.removeEventListener('resize', calculateTableHeight);
});
</script>
<style lang="scss" scoped>
.container {
width: 100%;
overflow: hidden; /* 防止全局滚动条 */
.search-box {
overflow: hidden;
margin: 16px 0;
padding: 1px 8px 0 16px;
border-radius: 16px;
background: #fff;
.order-tab {
width: 100%;
::v-deep() {
.el-tabs__nav-wrap::after {
background: transparent !important;
}
.el-tabs__active-bar {
height: 3px !important;
border-radius: 4px;
}
.el-descriptions__label,
.el-descriptions__content {
font-size: 16px !important;
}
.cell-item {
display: inline-flex;
}
.el-descriptions__label {
color: $color-999;
}
.el-descriptions__content {
color: $color-333;
}
}
}
}
.search-bar {
display: flex;
flex-shrink: 0; /* 禁止收缩 */
min-height: 100px;
.search-bar-left {
flex: 1;
}
.search-bar-right {
width: 100px;
}
.demo-form-inline {
text-align: left;
}
.el-form--inline .el-form-item {
margin-right: 30px;
}
.demo-form-inline .el-input {
--el-input-width: 160px;
}
.demo-form-inline .el-select {
--el-select-width: 160px;
}
.demo-form-inline .el-date-picker {
--el-select-width: 160px;
}
}
.table-cont {
min-height: 300px;
border-radius: 16px;
overflow: hidden;
background-color: #fff;
position: relative;
.el-icon-custom {
vertical-align: middle;
cursor: pointer;
}
}
/* 自定义弹窗样式 */
.traceability-dialog {
background: transparent;
box-shadow: none;
border-radius: 16px !important;
}
/* 主要内容区域 */
.dialog-content {
display: flex;
flex-direction: column;
align-items: center;
background: white;
border-radius: 8px;
padding: 0 0 20px 0;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
/* 产品信息 */
.product-info {
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 20px;
font-size: 14px;
color: #666;
}
.product-name {
font-weight: bold;
color: #333;
}
/* 二维码图片 */
.qrcode-image {
width: 200px;
height: 200px;
margin: 0 auto;
}
/* 下载区域 */
.download-section {
display: flex;
align-items: center;
margin: 0 0 10px 0;
color: #25bf82;
cursor: pointer;
font-size: 12px;
line-height: 18px;
}
.download-icon {
margin-left: 8px;
font-size: 16px;
}
/* 遗传编码区域 */
.code-section {
display: flex;
align-items: center;
margin: 10px 0;
background: rgba(37, 191, 130, 0.1);
border-radius: 4px;
}
.genetic-code {
font-family: monospace;
font-size: 14px;
color: #25bf82;
display: inline-block;
max-width: 250px;
padding: 0 10px;
}
.copy-icon {
margin-left: 10px;
color: #409eff;
cursor: pointer;
font-size: 16px;
}
/* 关闭按钮 */
.close-button {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: -60px;
color: white;
font-size: 30px;
cursor: pointer;
transition: all 0.3s;
}
}
</style>

View File

@ -0,0 +1,488 @@
<template>
<div>
<common current-name="agricultural">
<template #main>
<div class="container">
<userHeader ref="titleRef" :title="'我的溯源'"></userHeader>
<!-- 搜索栏 -->
<div ref="searchBarRef" class="search-bar">
<div class="search-bar-left">
<el-form ref="searchForm" :inline="true" :model="formInline" class="demo-form-inline" :label-width="'auto'">
<el-form-item label="产品名称" prop="productName">
<el-input v-model="formInline.productName" placeholder="请输入产品名称" clearable />
</el-form-item>
<el-form-item label="溯源码" prop="sourceCode">
<el-input v-model="formInline.sourceCode" placeholder="请输入编号" clearable />
</el-form-item>
<el-form-item label="申请状态" prop="status">
<el-select v-model="formInline.status" placeholder="请选择">
<el-option label="全部" value="99" />
<el-option label="待检测" value="0" />
<el-option label="已检测" value="1" />
</el-select>
</el-form-item>
<el-form-item label="申请日期" prop="startDate" style="margin-right: 0">
<el-date-picker v-model="formInline.startDate" type="date" placeholder="请选择起始日期" clearable style="width: 160px" />
</el-form-item>
<el-form-item style="margin-right: 0">
<span style="width: 30px; text-align: center; display: inline-block"> - </span>
</el-form-item>
<el-form-item prop="endDate">
<el-date-picker v-model="formInline.endDate" type="date" placeholder="请选择截止日期" clearable style="width: 160px" />
</el-form-item>
</el-form>
</div>
<div class="search-bar-right">
<el-button type="primary" icon="Search" @click="onSubmit">查询</el-button>
<el-button icon="Refresh" style="margin: 24px 0 0 0" @click="resetForm">重置</el-button>
</div>
</div>
<!-- 表格 -->
<div class="table-cont" :style="{ height: tableViewportHeight + 'px' }">
<tableComponent
:table-data="tableData"
:columns="columns"
:show-border="false"
:show-selection="true"
:header-cell-class-name="getHeaderClass"
@page-change="handlePaginationChange"
@selection-change="handleSelectionChange"
>
<!-- 自定义-状态 -->
<template #status="slotProps">
<span :style="{ color: slotProps.row.status == 1 ? 'green' : 'red' }">
{{ slotProps.row.status === 1 ? '已检测' : '待检测' }}
</span>
</template>
<!-- 自定义-检测报告 -->
<template #report="slotProps">
<el-icon v-if="slotProps.row.report == 1" color="#25bf82" size="20px" class="el-icon-custom" @click="seeReportImg(slotProps.row)"
><Memo style="width: 2em; height: 2em"
/></el-icon>
<el-icon v-else color="#999" size="20px" class="el-icon-custom"><Memo style="width: 2em; height: 2em" /></el-icon>
</template>
<!-- 自定义-溯源码 -->
<template #sourceCode="slotProps">
<el-icon v-if="slotProps.row.sourceCode == 1" color="#25bf82" size="20px" class="el-icon-custom" @click="seeCodeImg(slotProps.row)"
><Film style="width: 2em; height: 2em"
/></el-icon>
<el-icon v-else color="#999" size="20px" class="el-icon-custom"><Film style="width: 2em; height: 2em" /></el-icon>
</template>
<!-- 自定义-操作 -->
<template #action="slotProps">
<el-dropdown>
<span class="el-dropdown-link">
<el-icon><More /></el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="handleEdit(slotProps.row, 1)">Action 1</el-dropdown-item>
<el-dropdown-item @click="handleEdit(slotProps.row, 2)">Action 2</el-dropdown-item>
<el-dropdown-item @click="handleEdit(slotProps.row, 3)">Action 3</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</tableComponent>
</div>
<!-- 图片预览组件 -->
<el-image-viewer v-if="showPreview" :url-list="[previewImageUrl]" :initial-index="0" @close="closePreview" />
<!-- 查看溯源码 -->
<el-dialog v-model="dialogVisible" :show-close="false" width="450px" custom-class="traceability-dialog" :before-close="handleClose">
<!-- 主要内容区域 -->
<div class="dialog-content">
<!-- 二维码图片 -->
<img :src="codeUrl" alt="溯源码" class="qrcode-image" />
<!-- 下载区域 -->
<div class="download-section" @click="handleDownload">
<el-icon class="download-icon"><Download /></el-icon>
<span style="margin-left: 5px">下载溯源码</span>
</div>
<!-- 遗传编码区域 -->
<div class="code-section">
<span class="genetic-code">10.5488754215478XE254.1040201</span>
<el-tooltip content="复制溯源码" placement="top">
<el-button color="#25bf82" style="color: #fff; font-weight: 400; height: 100%" @click="copyCode">复制</el-button>
</el-tooltip>
</div>
</div>
<!-- 自定义关闭按钮 -->
<el-icon class="close-button" @click="dialogVisible = false">
<CircleCloseFilled />
</el-icon>
</el-dialog>
</div>
</template>
</common>
</div>
</template>
<script setup>
import common from './components/common.vue';
import { ref, reactive, computed, onMounted, onBeforeUnmount } from 'vue';
import { isEmpty, getAssetsFile } from '@/utils';
import userHeader from './components/userHeader.vue';
import tableComponent from './components/tableComponent.vue';
import Mock from 'mockjs';
import { Close, Download, DocumentCopy, Loading } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
const formInline = reactive({
productName: '',
sourceCode: '',
status: '99',
startDate: '',
endDate: '',
});
const searchForm = ref(null);
const onSubmit = () => {
console.log('submit!');
};
const resetForm = () => {
searchForm.value.resetFields();
};
//
const tableData = ref([]);
//
const columns = ref([
{ prop: 'id', label: 'ID', width: '80' },
{ prop: 'productName', label: '产品名称', width: '180px' },
{ prop: 'applyTime', label: '申请时间', width: '180px' },
{ prop: 'status', label: '申请状态', slotName: 'status' },
{ prop: 'report', label: '检测报告', slotName: 'report' },
{ prop: 'sourceCode', label: '溯源码', slotName: 'sourceCode' },
{ prop: 'action', label: '操作', slotName: 'action', width: '180' },
]);
//
const generateMockData = () => {
return Mock.mock({
'list|30': [
{
'id|+1': 1,
productName: '原生态 有机 西红柿', //
applyTime: '@datetime',
'status|1': [1, 1, 1, 0], //0 1
'report|1': [1, 1, 1, 0], //0 1
reportUrl: '@url',
'sourceCode|1': [1, 1, 1, 0], //0 1
code: '@guid',
codeUrl: '@url',
},
],
}).list;
};
//
const loadData = () => {
// API
setTimeout(() => {
tableData.value = generateMockData();
}, 500);
};
// ,columnsheaderClassName: 'custom-header'
const getHeaderClass = ({ column }) => {
return 'custom-header';
};
//
const handlePaginationChange = ({ page, pageSize }) => {
console.log('分页变化:', page, pageSize);
// API
// fetchData(page, limit,pageSize)
};
//
const handleSelectionChange = (selection) => {
console.log('选中项:', selection);
};
let nowClickRow = ref(null);
const dialogVisible = ref(false);
let codeUrl = ref('');
codeUrl.value = getAssetsFile('images/userCenter/检测报告.png').href ?? '';
//
const handleEdit = (row, num) => {
nowClickRow.value = row;
console.log('编辑的行:', row);
console.log('第几个按钮:', num);
};
//
const showPreview = ref(false);
const previewImageUrl = ref('');
//
const seeReportImg = (row) => {
nowClickRow.value = row;
console.log('查看检测报告:', row);
if (row.reportUrl) {
//
// const imgUrl = row.reportUrl.startsWith('http') ? row.reportUrl : `${import.meta.env.VITE_API_BASE}${row.reportUrl}`;
const imgUrl = codeUrl.value;
previewImageUrl.value = imgUrl;
showPreview.value = true;
} else {
ElMessage.warning('该记录没有检测报告');
}
};
const closePreview = () => {
showPreview.value = false;
};
//
const seeCodeImg = (row) => {
nowClickRow.value = row;
console.log('查看溯源码:', row);
// codeUrl.value = getAssetsFile(row.codeUrl);
codeUrl.value = getAssetsFile('images/userCenter/weweima.png').href ?? '';
dialogVisible.value = true;
};
const handleClose = (done) => {
dialogVisible.value = false;
};
const handleDownload = async () => {
console.log('下载溯源码:', nowClickRow.value);
try {
if (!nowClickRow.value.codeUrl) {
ElMessage.error('图片链接无效');
return;
}
//
const loading = ElMessage({
message: '正在准备下载...',
duration: 0,
icon: Loading,
});
// 使fetchBlob
const response = await fetch(codeUrl.value);
if (!response.ok) throw new Error('网络响应不正常');
const blob = await response.blob();
const blobUrl = window.URL.createObjectURL(blob);
//
const link = document.createElement('a');
link.href = blobUrl;
link.download = `${new Date().toISOString().slice(0, 10)}.png`;
link.style.display = 'none';
document.body.appendChild(link);
link.click();
//
setTimeout(() => {
document.body.removeChild(link);
window.URL.revokeObjectURL(blobUrl);
loading.close();
ElMessage.success('下载完成');
}, 100);
} catch (error) {
console.error('下载失败:', error);
ElMessage.error('下载失败: ' + error.message);
}
};
const copyCode = () => {
const code = '10.5488754215478XE254.1040201';
navigator.clipboard
.writeText(code)
.then(() => ElMessage.success('复制成功'))
.catch(() => ElMessage.error('复制失败'));
};
const titleRef = ref(null);
const searchBarRef = ref(null);
const tableViewportHeight = ref(0);
//
const calculateTableHeight = () => {
//
const windowHeight = window.innerHeight;
//
const headerHeight = titleRef.value?.$el?.offsetHeight || 0;
const searchBarHeight = searchBarRef.value?.offsetHeight || 0;
//
const paddingCompensation = 60;
//
tableViewportHeight.value = windowHeight - headerHeight - searchBarHeight - paddingCompensation;
// console.log(tableViewportHeight.value);
};
//
onMounted(() => {
loadData();
calculateTableHeight();
//
window.addEventListener('resize', calculateTableHeight);
// DOMheader/searchbar
const observer = new ResizeObserver(calculateTableHeight);
if (titleRef.value?.$el) observer.observe(titleRef.value.$el);
if (searchBarRef.value) observer.observe(searchBarRef.value);
});
onBeforeUnmount(() => {
window.removeEventListener('resize', calculateTableHeight);
});
</script>
<style lang="scss" scoped>
.container {
width: 100%;
overflow: hidden; /* 防止全局滚动条 */
.search-bar {
overflow: hidden;
margin: 16px 0;
padding: 16px 8px 0 16px;
border-radius: 16px;
background: #fff;
display: flex;
flex-shrink: 0; /* 禁止收缩 */
min-height: 100px;
.search-bar-left {
flex: 1;
}
.search-bar-right {
width: 100px;
}
.demo-form-inline {
text-align: left;
}
.el-form--inline .el-form-item {
margin-right: 30px;
}
.demo-form-inline .el-input {
--el-input-width: 160px;
}
.demo-form-inline .el-select {
--el-select-width: 160px;
}
.demo-form-inline .el-date-picker {
--el-select-width: 160px;
}
}
.table-cont {
min-height: 300px;
border-radius: 16px;
overflow: hidden;
background-color: #fff;
position: relative;
.el-icon-custom {
vertical-align: middle;
cursor: pointer;
}
}
/* 自定义弹窗样式 */
.traceability-dialog {
background: transparent;
box-shadow: none;
border-radius: 16px !important;
}
/* 主要内容区域 */
.dialog-content {
display: flex;
flex-direction: column;
align-items: center;
background: white;
border-radius: 8px;
padding: 0 0 20px 0;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
/* 产品信息 */
.product-info {
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 20px;
font-size: 14px;
color: #666;
}
.product-name {
font-weight: bold;
color: #333;
}
/* 二维码图片 */
.qrcode-image {
width: 200px;
height: 200px;
margin: 0 auto;
}
/* 下载区域 */
.download-section {
display: flex;
align-items: center;
margin: 0 0 10px 0;
color: #25bf82;
cursor: pointer;
font-size: 12px;
line-height: 18px;
}
.download-icon {
margin-left: 8px;
font-size: 16px;
}
/* 遗传编码区域 */
.code-section {
display: flex;
align-items: center;
margin: 10px 0;
background: rgba(37, 191, 130, 0.1);
border-radius: 4px;
}
.genetic-code {
font-family: monospace;
font-size: 14px;
color: #25bf82;
display: inline-block;
max-width: 250px;
padding: 0 10px;
}
.copy-icon {
margin-left: 10px;
color: #409eff;
cursor: pointer;
font-size: 16px;
}
/* 关闭按钮 */
.close-button {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: -60px;
color: white;
font-size: 30px;
cursor: pointer;
transition: all 0.3s;
}
}
</style>

View File

@ -0,0 +1,75 @@
<template>
<div class="smartFarm-common-warp">
<div class="smartFarm-common-content">
<div class="left-menu">
<slot v-if="$slots.left" name="left"></slot>
<template v-else>
<left-menu :menus="menus"></left-menu>
</template>
</div>
<div class="common-content">
<slot v-if="$slots.main" name="main"></slot>
<template v-else></template>
</div>
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, watch } from 'vue';
import leftMenu from '@/components/common/leftMenu.vue';
const props = defineProps({
currentName: { type: String, default: 'agricultural' },
});
const menus = reactive([
{
name: 'inspection',
title: '仓储',
icon: 'menu1.png',
path: '/sub-operation-service/warehouse',
isOpen: false,
children: [],
},
{
name: 'control',
title: '物流',
icon: 'menu3.png',
path: '/sub-operation-service/logistics',
isOpen: false,
children: [],
},
]);
</script>
<style lang="scss" scoped>
.smartFarm-common-warp {
width: 100%;
height: calc(100vh - 230px);
text-align: center;
.smartFarm-common-content {
width: $width-main;
margin: auto;
height: 100%;
display: inline-flex;
justify-content: space-between;
margin: auto;
width: $width-main;
height: 100%;
.left-menu,
.common-content {
overflow-y: auto;
padding: 8px;
height: calc(100% - 16px);
border-radius: 8px;
}
.left-menu {
width: 240px;
background: $color-fff;
}
.common-content {
margin-left: 16px;
width: calc(100% - 240px);
}
}
}
</style>

View File

@ -0,0 +1,192 @@
<template>
<div class="smartFarm-left-menu-warp">
<div class="left-menu">
<div
v-for="(n, index) in leftMenu"
:key="index"
class="left-menu-item"
style="position: relative"
@click.stop="
toLink(index);
openList(index);
"
>
<div style="display: flex; justify-content: flex-start; align-items: center">
<div class="item-img">
<img :src="getAssetsFile('images/smartFarm/' + n.icon)?.href ?? ''" alt="" />
</div>
<span :class="currentIndex === index ? 'active' : ''" class="item-title">{{ n.title }}</span>
<img v-if="n.children.length > 0 && n.isOpen" alt="" :src="getAssetsFile('images/smartFarm/closing.png')" class="isOpen" />
<img
v-if="n.children.length > 0 && !n.isOpen"
alt=""
:src="getAssetsFile('images/smartFarm/down_1@2x.png')"
class="isOpen fz"
@click.stop="openList(index)"
/>
</div>
<div v-if="n.children.length > 0 && n.isOpen" class="item-children">
<div v-for="(item, indexC) in n.children" :key="indexC">
<ul style="overflow: visible; padding-left: 40px; text-align: left; list-style-type: disc !important">
<li :class="item.name === currentCIndex ? 'active' : ''" @click.stop="toLinkSub(index, item.name)">
<div class="dot"></div>
{{ item.title }}
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { isEmpty, getAssetsFile } from '@/utils';
import { useRoute, useRouter } from 'vue-router';
const route = useRoute();
const router = useRouter();
const leftMenu = reactive([
{
name: 'inspection',
title: '仓储',
icon: 'menu1.png',
path: '/sub-operation-service/warehouse',
isOpen: false,
children: [
// {
// name: 'fieldInspection',
// title: '',
// icon: 'menu1.png',
// path: '/sub-operation-service/smartFarm/fieldInspection',
// },
],
},
{
name: 'control',
title: '物流',
icon: 'menu3.png',
path: '/sub-operation-service/logistics',
isOpen: false,
children: [],
},
]);
let currentIndex = ref(0);
let currentCIndex = ref('');
const toLink = (index) => {
currentIndex.value = index;
if (leftMenu[index].children.length > 0) {
window.sessionStorage.setItem('currentOpen', index);
}
if (index === 0) {
window.sessionStorage.setItem('currentChild', 'main');
}
currentCIndex.value = '';
let path = index !== undefined ? leftMenu[index].path : null;
if (path) {
router.push(path);
window.sessionStorage.setItem('currentParent', index);
}
};
const toLinkSub = (index, name) => {
console.info('index', index);
console.info('currentChild', name);
currentCIndex.value = name;
window.sessionStorage.setItem('currentChild', name);
let path;
for (let i in leftMenu[index].children) {
if (leftMenu[index].children[i].name === name) {
path = leftMenu[index].children[i].path;
}
}
if (path) {
console.info('path', path);
router.push(path);
}
};
const openList = (index) => {
currentIndex.value = index;
leftMenu[index].isOpen = !leftMenu[index].isOpen;
};
onMounted(() => {
currentIndex.value = window.sessionStorage.getItem('currentParent') ? Number(window.sessionStorage.getItem('currentParent')) : 0;
const currentMenu = window.sessionStorage.getItem('currentOpen');
if (currentMenu) {
for (let i in leftMenu) {
leftMenu[i].isOpen = i === currentMenu;
}
}
const currentChild = window.sessionStorage.getItem('currentChild');
if (currentChild && currentChild === 'main') {
currentCIndex.value = '';
} else if (currentChild) {
currentCIndex.value = currentChild;
}
});
</script>
<style lang="scss" scoped>
.fz {
transform: rotate(180deg);
}
.isOpen {
position: absolute;
right: -24px;
width: 20px;
height: 20px;
}
.active {
color: $color-main;
}
.smartFarm-left-menu-warp {
padding: 0 30px 0 10px;
width: 100%;
height: 100%;
.left-menu {
.left-menu-item {
padding: 16px 0;
width: 100%;
cursor: pointer;
&.active {
color: $color-main;
}
.item-img,
.item-title {
vertical-align: middle;
}
.item-img {
display: inline-block;
width: 32px;
height: 32px;
}
.item-title {
padding-left: 8px;
font-size: 18px;
font-weight: 400;
}
.item-children {
margin-top: 8px;
font-size: 16px;
text-align: center;
transition: transform 0.3s ease;
.dot {
display: inline-block;
margin-right: 15px;
width: 4px;
height: 4px;
border-radius: 90px;
background-color: black;
vertical-align: middle;
}
li {
margin: 5px auto;
height: 35px;
line-height: 35px;
}
}
}
}
}
</style>

View File

@ -1,17 +1,18 @@
<template>
<page-layout :menus="state.menus"> 物流 </page-layout>
<section>
<common>
<template #main> 物流 </template>
</common>
</section>
</template>
<script setup name="page-menu">
import { ref, reactive, watch } from 'vue';
import { getAssetsFile } from '@/utils';
import { useRoute, useRouter } from 'vue-router';
import warehouseLogisticsRoutes from '@/router/modules/warehouseLogistics';
import Common from '../components/common.vue';
const route = useRoute();
const router = useRouter();
const state = reactive({
menus: warehouseLogisticsRoutes[0].children,
});
</script>
<script setup></script>
<style lang="scss" scoped></style>

View File

@ -1,6 +1,19 @@
<template>
<page-layout :menus="state.menus">
<el-row :gutter="20">
<!-- <page-layout :menus="state.menus"> </page-layout>-->
<section>
<common>
<template #main>
<el-card shadow="none" style="border-radius: 14px">
<div class="tabs">
<div class="tab" style="color: rgba(153, 153, 153, 1)">仓储分类({{ data.title }})</div>
<div class="tab cursor" :class="{ active: currentTab === 0 }" @click.stop="currentTab = 0">普通仓库</div>
<div class="tab cursor" :class="{ active: currentTab === 1 }" @click.stop="currentTab = 1">恒温仓库</div>
<div class="tab cursor" :class="{ active: currentTab === 2 }" @click.stop="currentTab = 2">冷库</div>
<div class="tab cursor" :class="{ active: currentTab === 3 }" @click.stop="currentTab = 3">气调仓库</div>
<div class="tab">&nbsp;</div>
</div>
</el-card>
<el-row :gutter="20" style="margin-top: 10px">
<el-col v-for="(item, index) in state.data" :key="index" :span="12">
<el-card class="storage-card" shadow="hover">
<div class="storage-content">
@ -10,11 +23,12 @@
<h3 class="storage-title">{{ item.title }}</h3>
<div class="storage-desc">
<span>{{ item.description }}</span>
<i></i>
<img :src="getAssetsFile('images/warehouseLogistics/认证.png')" alt="" style="width: 20px" />
<img :src="getAssetsFile('images/warehouseLogistics/优先级.png')" alt="" style="width: 20px" />
</div>
<div class="storage-tags">
<el-tag effect="plain" round>延长仓储</el-tag>
<el-tag effect="plain" round>保鲜储存</el-tag>
<el-tag effect="plain" round style="background-color: rgba(37, 191, 130, 0.2); color: #25bf82">延长仓储</el-tag>
<el-tag effect="plain" round style="background-color: rgba(37, 191, 130, 0.2); color: #25bf82">保鲜储存</el-tag>
</div>
<div class="storage-location">
<el-icon><Location /></el-icon>
@ -28,26 +42,33 @@
<span class="price-amount">¥{{ item.price }}//</span>
</div>
<el-button type="success" class="contact-btn">
<el-icon><ChatDotRound /></el-icon>
<img :src="getAssetsFile('images/warehouseLogistics/messageBox.png')" alt="" style="height: 30px; margin-right: 5px" />
<span>联系卖家</span>
</el-button>
</div>
<div v-if="item.rank" class="rank-badge">
{{ item.rank }}
<!-- {{ item.rank }}-->
<img :src="getAssetsFile('images/warehouseLogistics/top' + item.rank + '.png')" alt="" style="width: 80px" />
</div>
</div>
</el-card>
</el-col>
</el-row>
<page-pagination :total="20" @current-change="currentChange" />
</page-layout>
</template>
</common>
</section>
</template>
<script setup name="page-menu">
import { ref, reactive, watch } from 'vue';
import { getAssetsFile } from '@/utils';
import { useRoute, useRouter } from 'vue-router';
import warehouseLogisticsRoutes from '@/router/modules/warehouseLogistics';
import Common from '../components/common.vue';
import { useGetCommonData } from '../../../store/modules/common';
import { storeToRefs } from 'pinia';
const store = useGetCommonData();
const { data } = storeToRefs(store);
const route = useRoute();
const router = useRouter();
@ -72,7 +93,7 @@ const state = reactive({
description: '绿鲜蔬选果蔬仓储中心',
location: '临沧市-耿马县',
price: '600.0',
rank: '',
rank: '2',
},
{
imageUrl: '/storage3.jpg',
@ -82,9 +103,35 @@ const state = reactive({
price: '600.0',
rank: '3',
},
{
imageUrl: '/storage3.jpg',
title: '果蔬保鲜仓储',
description: '绿鲜蔬选果蔬仓储中心 ',
location: '临沧市-耿马县',
price: '600.0',
rank: '',
},
{
imageUrl: '/storage3.jpg',
title: '果蔬保鲜仓储',
description: '绿鲜蔬选果蔬仓储中心 ',
location: '临沧市-耿马县',
price: '600.0',
rank: '',
},
{
imageUrl: '/storage3.jpg',
title: '果蔬保鲜仓储',
description: '绿鲜蔬选果蔬仓储中心 ',
location: '临沧市-耿马县',
price: '600.0',
rank: '',
},
],
});
const currentTab = ref(0);
const currentChange = (current) => {
state.query.current = current;
};
@ -97,6 +144,20 @@ const toLink = (row) => {
};
</script>
<style lang="scss" scoped>
.tabs {
height: 50px;
line-height: 50px;
display: flex;
font-size: 18px;
justify-content: space-between;
padding: 0 20px;
}
.cursor {
cursor: pointer;
}
.active {
color: rgba(37, 191, 130, 1);
}
.storage-card {
position: relative;
overflow: hidden;