Compare commits
4 Commits
54c95a835e
...
f56bcdba16
Author | SHA1 | Date | |
---|---|---|---|
f56bcdba16 | |||
fcc86d7608 | |||
2e8be43932 | |||
3ed137b757 |
13
main/.env.pre
Normal file
13
main/.env.pre
Normal file
@ -0,0 +1,13 @@
|
||||
# 本地环境
|
||||
VITE_APP_NAME = 'daimp-front-main'
|
||||
VITE_APP_TITLE = '数字农业产业管理平台'
|
||||
VITE_APP_SUB_OS = '//localhost:8090/sub-operation-service/'
|
||||
VITE_APP_SUB_OA = '//localhost:8090/sub-operation-admin/'
|
||||
VITE_APP_SUB_GAS = '//localhost:8090/sub-government-affairs-service/'
|
||||
VITE_APP_SUB_GAA = '//localhost:8090/sub-government-admin/'
|
||||
VITE_APP_SUB_GSS = '//localhost:8090/sub-government-screen-service/'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = ''
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = ''
|
9
sub-government-affairs-service/.env.pre
Normal file
9
sub-government-affairs-service/.env.pre
Normal file
@ -0,0 +1,9 @@
|
||||
# 本地环境
|
||||
VITE_APP_MIAN = 'daimp-front-main'
|
||||
VITE_APP_MIAN_URL = 'http://localhost:8090'
|
||||
VITE_APP_NAME = 'sub-government-affairs-service'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = ''
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = ''
|
@ -7,7 +7,7 @@
|
||||
"dev": "vite --mode development",
|
||||
"build": "vite build --mode production",
|
||||
"test": "vite build --mode test",
|
||||
"local": "vite build --mode local",
|
||||
"pre": "vite build --mode pre",
|
||||
"preview": "vite preview",
|
||||
"format": "prettier --write 'src/**/*.{vue,ts,tsx,js,jsx,css,less,scss,json,md}'",
|
||||
"eslint": "npx eslint --init",
|
||||
|
9
sub-government-screen-service/.env.pre
Normal file
9
sub-government-screen-service/.env.pre
Normal file
@ -0,0 +1,9 @@
|
||||
# 本地环境
|
||||
VITE_APP_MIAN = 'daimp-front-main'
|
||||
VITE_APP_MIAN_URL = 'http://localhost:8090'
|
||||
VITE_APP_NAME = 'sub-government-screen-service'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = ''
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = ''
|
@ -7,7 +7,7 @@
|
||||
"dev": "vite --mode development",
|
||||
"build": "vite build --mode production",
|
||||
"test": "vite build --mode test",
|
||||
"local": "vite build --mode local",
|
||||
"pre": "vite build --mode pre",
|
||||
"preview": "vite preview",
|
||||
"format": "prettier --write 'src/**/*.{vue,ts,tsx,js,jsx,css,less,scss,json,md}'",
|
||||
"eslint": "npx eslint --init",
|
||||
|
9
sub-operation-admin/.env.pre
Normal file
9
sub-operation-admin/.env.pre
Normal file
@ -0,0 +1,9 @@
|
||||
# 本地环境
|
||||
VITE_APP_MIAN = 'daimp-front-main'
|
||||
VITE_APP_MIAN_URL = 'http://localhost:8090'
|
||||
VITE_APP_NAME = 'sub-operation-admin'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = ''
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = ''
|
@ -1,9 +1,8 @@
|
||||
# 开发环境
|
||||
VITE_PORT = 9526
|
||||
VITE_MODE = 'DEV'
|
||||
VITE_PORT = 9527
|
||||
VITE_APP_MIAN = 'daimp-front-main'
|
||||
VITE_APP_MIAN_URL = 'http://localhost:9000'
|
||||
VITE_APP_NAME = 'sub-operation-service'
|
||||
VITE_APP_NAME = 'sub-operation-admin'
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
|
9
sub-operation-service/.env.pre
Normal file
9
sub-operation-service/.env.pre
Normal file
@ -0,0 +1,9 @@
|
||||
# 本地环境
|
||||
VITE_APP_MIAN = 'daimp-front-main'
|
||||
VITE_APP_MIAN_URL = 'http://localhost:8090'
|
||||
VITE_APP_NAME = 'sub-operation-admin'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = ''
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = ''
|
@ -1,7 +1,7 @@
|
||||
# 生产环境
|
||||
VITE_APP_MIAN = 'daimp-front-main'
|
||||
VITE_APP_MIAN_URL = 'http://47.109.205.240'
|
||||
VITE_APP_NAME = 'sub-operation-service'
|
||||
VITE_APP_NAME = 'sub-operation-admin'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = ''
|
||||
|
@ -1,7 +1,7 @@
|
||||
# 测试环境
|
||||
VITE_APP_MIAN = 'daimp-front-main'
|
||||
VITE_APP_MIAN_URL = 'http://192.168.18.99:88'
|
||||
VITE_APP_NAME = 'sub-operation-service'
|
||||
VITE_APP_NAME = 'sub-operation-admin'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = ''
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "sub-operation-service",
|
||||
"name": "sub-operation-admin",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
@ -7,7 +7,7 @@
|
||||
"dev": "vite --mode development",
|
||||
"build": "vite build --mode production",
|
||||
"test": "vite build --mode test",
|
||||
"local": "vite build --mode local",
|
||||
"pre": "vite build --mode pre",
|
||||
"preview": "vite preview",
|
||||
"format": "prettier --write 'src/**/*.{vue,ts,tsx,js,jsx,css,less,scss,json,md}'",
|
||||
"eslint": "npx eslint --init",
|
||||
@ -21,7 +21,7 @@
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"axios": "^1.6.5",
|
||||
"echarts": "^5.5.0",
|
||||
"echarts": "^5.6.0",
|
||||
"element-plus": "^2.7.2",
|
||||
"js-base64": "^3.7.6",
|
||||
"lodash": "^4.17.21",
|
||||
@ -31,6 +31,7 @@
|
||||
"pinia": "^2.1.7",
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
"screenfull": "^6.0.2",
|
||||
"splitpanes": "^4.0.3",
|
||||
"vue": "^3.3.11",
|
||||
"vue-router": "^4.2.5"
|
||||
},
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2024-01-24 18:54:01
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2025-04-12 15:22:39
|
||||
* @LastEditTime: 2025-02-28 11:31:12
|
||||
-->
|
||||
<template>
|
||||
<el-config-provider :size="size" :locale="zhCn">
|
||||
@ -23,45 +23,5 @@ const size = computed(() => SettingStore.themeConfig.globalComSize);
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './styles/style.scss';
|
||||
// @import '@/styles/iconfont.css';
|
||||
|
||||
body {
|
||||
div {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
--el-color-primary: #25bf82;
|
||||
--el-color-primary-light-3: #45dda1;
|
||||
--el-color-primary-light-5: #8cddbd;
|
||||
--el-color-primary-light-9: rgba(37, 191, 130, 0.1);
|
||||
--el-color-primary-light-8: rgba(37, 191, 130, 0.5);
|
||||
|
||||
.el-input {
|
||||
--el-input-focus-border-color: #25bf82;
|
||||
--el-input-focus-border: #25bf82;
|
||||
::v-deep() {
|
||||
.el-input__wrapper:focus,
|
||||
.el-input__wrapper:hover,
|
||||
.el-input__wrapper .is-focus {
|
||||
box-shadow: 0 0 0 1px $color-main !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-button--primary {
|
||||
--el-button-bg-color: #25bf82;
|
||||
--el-button-border-color: #25bf82;
|
||||
--el-button-outline-color: #45dda1;
|
||||
--el-button-active-color: #158b5c;
|
||||
--el-button-hover-bg-color: #45dda1;
|
||||
--el-button-hover-border-color: #45dda1;
|
||||
--el-button-active-bg-color: #158b5c;
|
||||
--el-button-active-border-color: #158b5c;
|
||||
--el-button-disabled-text-color: var(--el-color-white);
|
||||
--el-button-disabled-bg-color: #45dda1;
|
||||
--el-button-disabled-border-color: #45dda1;
|
||||
}
|
||||
|
||||
--el-menu-hover-text-color: #25bf82;
|
||||
--el-menu-hover-bg-color: fff;
|
||||
}
|
||||
@import './styles/style';
|
||||
</style>
|
||||
|
48
sub-operation-service/src/components/page-layout/index.vue
Normal file
48
sub-operation-service/src/components/page-layout/index.vue
Normal file
@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div class="page-layout">
|
||||
<div class="page-layout-left">
|
||||
<page-menu :menus="menus" />
|
||||
</div>
|
||||
<div class="page-layout-main">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="page-layout">
|
||||
const props = defineProps({
|
||||
menus: { type: Array, default: () => [] },
|
||||
showMenu: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page-layout {
|
||||
width: $width-main;
|
||||
margin: 0 auto;
|
||||
height: 100%;
|
||||
min-height: calc(100vh - 230px);
|
||||
@include flex-row();
|
||||
|
||||
&-left,
|
||||
&-main {
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
|
||||
border-radius: 8px;
|
||||
padding: 8px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
&-left {
|
||||
width: 240px;
|
||||
margin-right: 16px;
|
||||
background: $color-fff;
|
||||
}
|
||||
&-main {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
</style>
|
126
sub-operation-service/src/components/page-menu/index-bak.vue
Normal file
126
sub-operation-service/src/components/page-menu/index-bak.vue
Normal file
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<div class="page-menu">
|
||||
<div v-for="menu in menus" :key="menu.name" class="page-menu-item">
|
||||
<div class="menu" :class="isActive(menu) ? 'active' : ''" @click="todo(menu, true)">
|
||||
<span class="item-img"><img :src="getAssetsFile(menu.icon)" /></span>
|
||||
<span class="item-title">{{ menu.meta.title }}</span>
|
||||
<el-icon v-if="!isEmpty(menu?.children)">
|
||||
<template v-if="menu.toggle"><ArrowDownBold /></template>
|
||||
<template v-else><ArrowUpBold /></template>
|
||||
</el-icon>
|
||||
</div>
|
||||
<ul :class="`sub-menu ${menu?.toggle ? 'toggle' : ''}`">
|
||||
<li v-for="item in menu?.children" :key="item.name" :class="isActive(item) ? 'active' : ''" @click="todo(item, false)">
|
||||
<span class="sub-title">{{ item.meta.title }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="page-menu">
|
||||
import { isEmpty, getAssetsFile } from '@/utils';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
const props = defineProps({
|
||||
menus: { type: Array, default: () => [] },
|
||||
});
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const isActive = (row) => {
|
||||
return route.path === row.path;
|
||||
};
|
||||
|
||||
const todo = (row, toggle) => {
|
||||
if (toggle && !isEmpty(row.children)) {
|
||||
row.toggle = !row.toggle;
|
||||
return;
|
||||
}
|
||||
if (typeof row.event === 'function') {
|
||||
row.event(row);
|
||||
} else {
|
||||
router.push(row.path);
|
||||
}
|
||||
console.log(route.path, row.path);
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page-menu {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
&-item {
|
||||
width: 100%;
|
||||
@include flex-column();
|
||||
padding: 16px;
|
||||
cursor: pointer;
|
||||
|
||||
.menu {
|
||||
@include flex-row();
|
||||
align-items: center;
|
||||
|
||||
.item-img,
|
||||
.item-title {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.item-img {
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
.item-title {
|
||||
flex: 1;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
padding-left: 8px;
|
||||
@include ellipsis();
|
||||
}
|
||||
.el-icon {
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: $color-primary;
|
||||
}
|
||||
}
|
||||
|
||||
.sub-menu {
|
||||
padding: 10px 0;
|
||||
display: block;
|
||||
|
||||
&.toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
li {
|
||||
padding: 16px;
|
||||
@include flex-row();
|
||||
align-items: center;
|
||||
|
||||
&::before {
|
||||
@include icon-space();
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 3px;
|
||||
background-color: #000;
|
||||
margin-right: 22px;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
font-size: 16px;
|
||||
@include ellipsis();
|
||||
}
|
||||
|
||||
&.active {
|
||||
&::before {
|
||||
background-color: $color-primary;
|
||||
}
|
||||
|
||||
color: $color-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
91
sub-operation-service/src/components/page-menu/index.vue
Normal file
91
sub-operation-service/src/components/page-menu/index.vue
Normal file
@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<div class="page-menu">
|
||||
<el-scrollbar wrap-class="page-menu-scrollbar">
|
||||
<el-menu
|
||||
class="page-menu__menu"
|
||||
background-color="#fff"
|
||||
text-color="#000"
|
||||
active-text-color="#25bf82"
|
||||
:collapse-transition="true"
|
||||
:unique-opened="true"
|
||||
:default-active="active"
|
||||
:default-openeds="openeds"
|
||||
>
|
||||
<SubItem v-for="item in menus" :key="item.path" :item="item" />
|
||||
</el-menu>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="page-menu">
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { findParentRoute } from '@/utils/router';
|
||||
import { isEmpty } from '@/utils';
|
||||
import SubItem from '@/layouts/component/Menu/SubItem';
|
||||
|
||||
const props = defineProps({
|
||||
menus: { type: Array, default: () => [] },
|
||||
});
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const openeds = computed(() => {
|
||||
const item = findParentRoute(props.menus, route.path);
|
||||
return !isEmpty(item) ? [item.path] : [];
|
||||
});
|
||||
|
||||
const active = computed(() => {
|
||||
const item = findParentRoute(props.menus, route.path);
|
||||
return !isEmpty(item) ? item.path : '';
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page-menu {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #ffffff;
|
||||
transition: width 0.28s;
|
||||
&-scrollbar {
|
||||
height: calc(100vh - 60px) !important;
|
||||
}
|
||||
:deep(.el-scrollbar__wrap) {
|
||||
height: calc(100vh - 60px) !important;
|
||||
}
|
||||
&__menu {
|
||||
border-right: 0;
|
||||
:deep(.el-menu-item),
|
||||
:deep(.el-sub-menu__title) {
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
|
||||
&:hover {
|
||||
background-color: #fff;
|
||||
color: $color-primary;
|
||||
}
|
||||
}
|
||||
:deep(.el-menu-item) {
|
||||
@include flex-row();
|
||||
align-items: center;
|
||||
padding: 0 16px !important;
|
||||
}
|
||||
:deep(.el-sub-menu .el-menu-item) {
|
||||
font-size: 16px;
|
||||
padding-left: 50px !important;
|
||||
&:hover {
|
||||
.icon-dot {
|
||||
background-color: $color-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.el-sub-menu .el-icon) {
|
||||
font-size: 20px;
|
||||
}
|
||||
:deep(.el-menu-item.is-active) {
|
||||
background-color: #fff;
|
||||
}
|
||||
&:not(.el-menu--collapse) {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="page-pagination">
|
||||
<el-pagination
|
||||
background
|
||||
hide-on-single-page
|
||||
:page-size="size"
|
||||
:layout="layout"
|
||||
:total="total"
|
||||
@current-change="emit('current-change', $event)"
|
||||
@size-change="emit('size-change', $event)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="page-pagination">
|
||||
const props = defineProps({
|
||||
layout: {
|
||||
type: String,
|
||||
default: 'prev, pager, next',
|
||||
},
|
||||
size: {
|
||||
type: Number,
|
||||
default: 10,
|
||||
},
|
||||
total: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['current-change', 'size-change']);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page-pagination {
|
||||
width: 100%;
|
||||
padding: 50px 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
@ -26,7 +26,7 @@
|
||||
<div class="layout-header-bottom-left">
|
||||
<div class="layout-header-bottom-search">
|
||||
<div class="title">
|
||||
<img :src="getAssetsFile('images/logo.png')?.href ?? ''" />
|
||||
<img :src="getAssetsFile('images/logo.png')" />
|
||||
</div>
|
||||
<div class="search-warp">
|
||||
<el-input v-model="keyword" placeholder="请输入关键词进行搜索"></el-input>
|
||||
@ -48,9 +48,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout-header-menu">
|
||||
<el-menu ellipsis class="layout-header-bottom-menu" mode="horizontal" :default-active="defaultActive">
|
||||
<el-menu ellipsis class="layout-header-bottom-menu" mode="horizontal">
|
||||
<app-link v-for="(item, index) in meuns" :key="index" :to="item.path">
|
||||
<el-menu-item active-text-color="#25BF82" :index="item.key">{{ item.label }}</el-menu-item>
|
||||
<el-menu-item active-text-color="#25BF82">{{ item.label }}</el-menu-item>
|
||||
</app-link>
|
||||
</el-menu>
|
||||
</div>
|
||||
@ -59,27 +59,13 @@
|
||||
</template>
|
||||
|
||||
<script setup name="layout-header">
|
||||
import { computed, ref, onMounted } from 'vue';
|
||||
import { useSettingStore } from '@/store/modules/setting';
|
||||
import { usePermissionStore } from '@/store/modules/permission';
|
||||
import { ref } from 'vue';
|
||||
import { qrImg } from './base64img';
|
||||
import AppLink from '../Menu/Link.vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { isEmpty, getAssetsFile } from '@/utils';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { getAssetsFile } from '@/utils';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const SettingStore = useSettingStore();
|
||||
const PermissionStore = usePermissionStore();
|
||||
const cacheRoutes = computed(() => PermissionStore.keepAliveRoutes);
|
||||
const isReload = computed(() => SettingStore.isReload);
|
||||
|
||||
const isSubApp = computed(() => route.path.includes('sub'));
|
||||
const defaultActive = ref('');
|
||||
onMounted(() => {
|
||||
defaultActive.value = route.meta.headerActive;
|
||||
console.log('route', defaultActive.value);
|
||||
});
|
||||
|
||||
const keyword = ref('');
|
||||
|
||||
@ -87,37 +73,30 @@ const meuns = ref([
|
||||
{
|
||||
label: '智慧种植',
|
||||
path: '/sub-operation-service/ecommerce',
|
||||
key: '0',
|
||||
},
|
||||
{
|
||||
label: '农事服务',
|
||||
path: '/sub-operation-service/farmingService',
|
||||
key: 'farmingService',
|
||||
path: '/sub-operation-service/ecommerce',
|
||||
},
|
||||
{
|
||||
label: '涉农金融',
|
||||
path: '/sub-operation-service/ecommerce',
|
||||
key: '1',
|
||||
},
|
||||
{
|
||||
label: '电商交易',
|
||||
path: '/sub-operation-service/ecommerce',
|
||||
key: 'ecommerce',
|
||||
},
|
||||
{
|
||||
label: '分拣包装',
|
||||
path: '/sub-operation-service/ecommerce',
|
||||
key: '3',
|
||||
},
|
||||
{
|
||||
label: '仓储物流',
|
||||
path: '/sub-operation-service/ecommerce',
|
||||
key: '4',
|
||||
},
|
||||
{
|
||||
label: '公共品牌运营',
|
||||
path: '/sub-operation-service/ecommerce',
|
||||
key: '5',
|
||||
},
|
||||
]);
|
||||
|
||||
@ -136,10 +115,6 @@ const toUserCenter = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
div {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.layout-header-warp {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
@ -150,9 +125,6 @@ div {
|
||||
.el-menu {
|
||||
justify-content: space-around;
|
||||
border: none !important;
|
||||
.is-active {
|
||||
color: $color-main !important;
|
||||
}
|
||||
}
|
||||
.el-menu-item {
|
||||
font-size: 24px;
|
||||
@ -163,6 +135,7 @@ div {
|
||||
}
|
||||
.el-menu-item:active {
|
||||
background: none !important;
|
||||
color: $color-main;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -258,12 +231,10 @@ div {
|
||||
height: 50px;
|
||||
font-size: 18px;
|
||||
width: 100%;
|
||||
::v-deep() {
|
||||
.el-input__wrapper {
|
||||
:deep(.el-input__wrapper) {
|
||||
padding-right: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-button {
|
||||
position: absolute;
|
||||
|
@ -6,11 +6,8 @@
|
||||
</template>
|
||||
|
||||
<script setup name="layout">
|
||||
import { useSettingStore } from '@/store/modules/setting';
|
||||
|
||||
import Header from './component/Header';
|
||||
import Main from './component/Main';
|
||||
const SettingStore = useSettingStore();
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -1,15 +1,4 @@
|
||||
import * as components from '../../../main/src/components';
|
||||
|
||||
// const modules = import.meta.glob('../../../main/src/components/**/**.vue');
|
||||
// const components = Object.keys(modules).reduce((acc, path) => {
|
||||
// const component = modules[path].default || modules[path];
|
||||
// const componentName = path
|
||||
// .split('/')
|
||||
// .pop()
|
||||
// .replace(/\.\w+$/, '');
|
||||
// acc[componentName] = component;
|
||||
// return acc;
|
||||
// }, {});
|
||||
import * as components from '#/components';
|
||||
|
||||
// 全局注册组件
|
||||
export const registerGlobalComponents = (app) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { renderWithQiankun, qiankunWindow } from 'vite-plugin-qiankun/dist/helper';
|
||||
|
||||
export const registerMicroApps = (app) => {
|
||||
export const registerMicroApps = async (app) => {
|
||||
const initQiankun = () => {
|
||||
renderWithQiankun({
|
||||
bootstrap() {
|
||||
@ -18,8 +18,9 @@ export const registerMicroApps = (app) => {
|
||||
},
|
||||
});
|
||||
};
|
||||
const render = ({ container }) => {
|
||||
app.mount(container ? container : '#app');
|
||||
const render = async ({ container }) => {
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
app.mount(container ? container.querySelector('#app') : '#app');
|
||||
};
|
||||
qiankunWindow.__POWERED_BY_QIANKUN__ ? initQiankun() : render({});
|
||||
};
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2023-06-20 11:48:41
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2025-04-12 14:48:27
|
||||
* @LastEditTime: 2025-04-14 09:27:05
|
||||
*/
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
import Layout from '@/layouts/index.vue';
|
||||
@ -28,7 +28,7 @@ export const constantRoutes = [
|
||||
name: 'layout',
|
||||
component: Layout,
|
||||
redirect: '/sub-operation-service/ecommerce',
|
||||
meta: { title: '首页' },
|
||||
meta: { title: '运营服务' },
|
||||
children: [
|
||||
{
|
||||
path: '/sub-operation-service/home',
|
||||
|
@ -0,0 +1,81 @@
|
||||
import Layout from '@/layouts/index.vue';
|
||||
import Views from '@/layouts/Views.vue';
|
||||
|
||||
export default [
|
||||
{
|
||||
path: '/sub-operation-service/warehouseLogistics',
|
||||
name: 'warehouseLogistics',
|
||||
component: Layout,
|
||||
redirect: '/sub-operation-service/warehouse',
|
||||
meta: { title: '仓储物流', icon: '' },
|
||||
children: [
|
||||
{
|
||||
path: '/sub-operation-service/warehouse',
|
||||
component: Views,
|
||||
name: 'warehouse',
|
||||
redirect: '/sub-operation-service/warehouse-list',
|
||||
meta: { title: '仓储', icon: 'images/ecommerce/menu1.png' },
|
||||
children: [
|
||||
{
|
||||
path: '/sub-operation-service/warehouse-list',
|
||||
component: () => import('@/views/warehouseLogistics/warehouse/index.vue'),
|
||||
name: 'warehouse-list',
|
||||
meta: { title: '仓储列表', icon: '' },
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/sub-operation-service/warehouse-detail',
|
||||
component: () => import('@/views/warehouseLogistics/warehouse/detail.vue'),
|
||||
name: 'warehouse-detail',
|
||||
meta: { title: '仓储详情', icon: '' },
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/sub-operation-service/logistics',
|
||||
component: Views,
|
||||
name: 'logistics',
|
||||
redirect: '/sub-operation-service/logistics-list',
|
||||
meta: { title: '物流', icon: 'images/ecommerce/menu1.png' },
|
||||
children: [
|
||||
{
|
||||
path: '/sub-operation-service/logistics-list',
|
||||
component: () => import('@/views/warehouseLogistics/logistics/index.vue'),
|
||||
name: 'logistics-list',
|
||||
meta: { title: '物流列表', icon: '' },
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/sub-operation-service/logistics-detail',
|
||||
component: () => import('@/views/warehouseLogistics/logistics/detail.vue'),
|
||||
name: 'logistics-detail',
|
||||
meta: { title: '物流详情', icon: '' },
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
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: '' },
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
@ -18,24 +18,24 @@
|
||||
max-height: calc(100vh - 130px);
|
||||
}
|
||||
|
||||
.txt-ellipsis{
|
||||
.txt-ellipsis {
|
||||
display: -webkit-inline-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
white-space: normal
|
||||
white-space: normal;
|
||||
}
|
||||
.clamp1{
|
||||
.clamp1 {
|
||||
line-clamp: 1;
|
||||
-webkit-line-clamp: 1;
|
||||
line-height: 1.5;
|
||||
max-height: calc(1.5em * 1);
|
||||
}
|
||||
|
||||
.clamp2{
|
||||
.clamp2 {
|
||||
line-clamp: 2;
|
||||
-webkit-line-clamp: 2;
|
||||
line-height: 1.5;
|
||||
max-height: calc(1.5em * 2);
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<page-layout :menus="state.menus"> 详情 </page-layout>
|
||||
</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';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const state = reactive({
|
||||
menus: warehouseLogisticsRoutes[0].children,
|
||||
query: {},
|
||||
data: {},
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<page-layout :menus="state.menus"> 物流 </page-layout>
|
||||
</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';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const state = reactive({
|
||||
menus: warehouseLogisticsRoutes[0].children,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<page-layout :menus="state.menus"> test1 </page-layout>
|
||||
</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';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const state = reactive({
|
||||
menus: warehouseLogisticsRoutes[0].children,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<page-layout :menus="state.menus"> test2 </page-layout>
|
||||
</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';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const state = reactive({
|
||||
menus: warehouseLogisticsRoutes[0].children,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<page-layout :menus="state.menus"> 详情123 </page-layout>
|
||||
</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';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const state = reactive({
|
||||
menus: warehouseLogisticsRoutes[0].children,
|
||||
query: {},
|
||||
data: {},
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<page-layout :menus="state.menus">
|
||||
<el-row :gutter="20">
|
||||
<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>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="storage-tags">
|
||||
<el-tag effect="plain" round>延长仓储</el-tag>
|
||||
<el-tag effect="plain" round>保鲜储存</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">
|
||||
<el-icon><ChatDotRound /></el-icon>
|
||||
<span>联系卖家</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-if="item.rank" class="rank-badge">
|
||||
{{ item.rank }}
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<page-pagination :total="20" @current-change="currentChange" />
|
||||
</page-layout>
|
||||
</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';
|
||||
|
||||
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: '',
|
||||
},
|
||||
{
|
||||
imageUrl: '/storage3.jpg',
|
||||
title: '果蔬保鲜仓储',
|
||||
description: '绿鲜蔬选果蔬仓储中心 ',
|
||||
location: '临沧市-耿马县',
|
||||
price: '600.0',
|
||||
rank: '3',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
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>
|
||||
.storage-card {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 24px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.storage-content {
|
||||
@include flex-column();
|
||||
gap: 16px;
|
||||
|
||||
&-top {
|
||||
@include flex-row();
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.storage-image {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin-right: 16px;
|
||||
border-radius: 8px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.storage-info {
|
||||
padding-right: 50px;
|
||||
flex: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.storage-title,
|
||||
.storage-desc,
|
||||
.storage-tags,
|
||||
.storage-location {
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.storage-title {
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #000;
|
||||
@include ellipsis();
|
||||
}
|
||||
|
||||
.storage-desc {
|
||||
font-size: 16px;
|
||||
color: #999;
|
||||
@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: #000;
|
||||
}
|
||||
|
||||
.storage-price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&-left {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.price-label {
|
||||
font-size: 16px;
|
||||
color: #999;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.price-amount {
|
||||
color: $color-primary;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.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>
|
@ -2,8 +2,8 @@
|
||||
* @Descripttion:
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2022-09-18 21:24:29
|
||||
* @LastEditors: zenghua.wang “1048523306@qq.com”
|
||||
* @LastEditTime: 2025-01-20 10:51:23
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2025-04-14 09:02:04
|
||||
*/
|
||||
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
@ -55,6 +55,7 @@ export default defineConfig(({ command, mode }) => {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src'),
|
||||
'#': resolve(__dirname, '../main/src'),
|
||||
},
|
||||
extensions: ['.js', '.vue', '.json', '.ts'],
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user