首页+侧边栏

This commit is contained in:
朱菊兰 2024-08-05 15:34:57 +08:00
vanhempi ad0acc0f22
commit 38145f08ac
22 muutettua tiedostoa jossa 308 lisäystä ja 314 poistoa

Näytä tiedosto

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title></title>
<g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="栏" transform="translate(-383.000000, -639.000000)" fill="#FFFFFF" fill-rule="nonzero">
<g id="制度流程" transform="translate(383.000000, 639.000000)">
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
<path d="M4.37117174,17.071929 L2.37885068,17.071929 C2.0028361,17.071929 1.69692899,17.3771995 1.69692899,17.7524526 L1.69692899,19.7475474 C1.69692899,20.1227781 2.00283612,20.428071 2.37885068,20.428071 L4.37117174,20.428071 C4.74718632,20.428071 5.05307101,20.1228005 5.05307101,19.7475474 L5.05307101,17.7524526 C5.05307101,17.3771996 4.74718632,17.071929 4.37117174,17.071929 Z M7.36536289,6.40073051 L21.8846371,6.40073051 C22.2245029,6.40073051 22.5,6.06492662 22.5,5.65073051 C22.5,5.2365344 22.2245029,4.90073051 21.8846371,4.90073051 L7.36536289,4.90073051 C7.02549709,4.90073051 6.75,5.23653442 6.75,5.65073054 C6.75,6.06492665 7.02549711,6.40073051 7.36536289,6.40073051 Z M3.14077284,5.95492436 L2.03265569,4.84248673 C1.8767502,4.68597337 1.62348469,4.6854806 1.46697133,4.84138609 C1.4665023,4.8418533 1.46603442,4.84232168 1.46556772,4.84279121 L1.18448184,5.12557972 C1.0295067,5.28149361 1.02939503,5.5332514 1.1842318,5.6893027 L2.85590574,7.37408916 C3.01150401,7.53090793 3.26476807,7.53189735 3.42158685,7.37629907 C3.42263304,7.37526103 3.42367349,7.3742172 3.42470814,7.37316765 L5.7220224,5.04277966 C5.87599957,4.88658572 5.87547971,4.63552909 5.72085699,4.47997417 L5.4403523,4.19777835 C5.28461275,4.04109986 5.0313479,4.04033871 4.87466942,4.19607825 C4.87370895,4.19703297 4.87275333,4.19799256 4.8718026,4.19895698 L3.14077284,5.95492436 L3.14077284,5.95492436 Z M21.8846371,11.25 L7.36536289,11.25 C7.02549709,11.25 6.75,11.5857972 6.75,11.999985 C6.75,12.4141729 7.02552167,12.75 7.36536289,12.75 L21.8846371,12.75 C22.2245029,12.75 22.5,12.4142028 22.5,11.999985 C22.5,11.5857672 22.2245029,11.25 21.8846371,11.25 Z M21.8846371,17.972656 L7.36536289,17.972656 C7.02549709,17.972656 6.75,18.30843 6.75,18.722656 C6.75,19.1368821 7.02552167,19.472656 7.36536289,19.472656 L21.8846371,19.472656 C22.2245029,19.472656 22.5,19.1368821 22.5,18.722656 C22.5,18.30843 22.2245029,17.972656 21.8846371,17.972656 Z M4.37117174,10.321929 L2.37885068,10.321929 C2.0028361,10.321929 1.69692899,10.6271975 1.69692899,11.0024481 L1.69692899,12.9975519 C1.69692899,13.3727801 2.00283612,13.678071 2.37885068,13.678071 L4.37117174,13.678071 C4.74718632,13.678071 5.05307101,13.3728025 5.05307101,12.9975519 L5.05307101,11.0024481 C5.05307101,10.6271975 4.74718632,10.321929 4.37117174,10.321929 Z" id="形状"></path>
</g>
</g>
</g>
</svg>

After

Leveys:  |  Korkeus:  |  Koko: 2.9 KiB

Näytä tiedosto

@ -80,7 +80,7 @@
.submenu-title-noDropdown, .submenu-title-noDropdown,
.el-submenu__title { .el-submenu__title {
&:hover { &:hover {
background-color: rgba(0, 0, 0, 0.06) !important; background-color: #0b58ff !important;
} }
} }

Näytä tiedosto

@ -37,14 +37,14 @@ $base-sub-menu-hover:#001528;
*/ */
$base-menu-color: #fff; $base-menu-color: #fff;
$base-menu-color-active:#fff; $base-menu-color-active:#fff;
$base-menu-background:#001529; $base-menu-background:#1E1651;
$base-logo-title-color: #ffffff; $base-logo-title-color: #ffffff;
$base-menu-light-color:rgba(0,0,0,.70); $base-menu-light-color:rgba(0,0,0,.70);
$base-menu-light-background:#ffffff; $base-menu-light-background:#ffffff;
$base-logo-light-title-color: #001529; $base-logo-light-title-color: #001529;
$base-sub-menu-background:#0B253F; $base-sub-menu-background:#15063C;
$base-sub-menu-hover:#0b50ff; $base-sub-menu-hover:#0b50ff;

Näytä tiedosto

@ -53,8 +53,6 @@ export default {
return { return {
// //
visibleNumber: 5, visibleNumber: 5,
// index
// currentIndex: undefined,
}; };
}, },
computed: { computed: {
@ -140,10 +138,10 @@ export default {
methods: { methods: {
// //
setVisibleNumber() { setVisibleNumber() {
const width = window.innerWidth - 800; const width = window.innerWidth - 700;
console.log(width); console.log(width);
console.log('window.innerWidth:', window.innerWidth); console.log('window.innerWidth:', window.innerWidth);
this.visibleNumber = parseInt(width / 100); this.visibleNumber = parseInt(width / 120);
console.log('this.visibleNumber:', this.visibleNumber); console.log('this.visibleNumber:', this.visibleNumber);
}, },
// //
@ -181,6 +179,7 @@ export default {
}, },
// //
activeRoutes(key) { activeRoutes(key) {
this.$store.dispatch('app/setChoicepart', key);
const routes = []; const routes = [];
if (this.childrenMenus && this.childrenMenus.length > 0) { if (this.childrenMenus && this.childrenMenus.length > 0) {
this.childrenMenus.map((item) => { this.childrenMenus.map((item) => {

Näytä tiedosto

@ -1,66 +1,66 @@
<template> <template>
<section class="app-main"> <section class="app-main">
<transition name="fade-transform" mode="out-in"> <transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews"> <keep-alive :include="cachedViews">
<router-view v-if="!$route.meta.link" :key="key" /> <router-view v-if="!$route.meta.link" :key="key" />
</keep-alive> </keep-alive>
</transition> </transition>
<iframe-toggle /> <iframe-toggle />
</section> </section>
</template> </template>
<script> <script>
import iframeToggle from "./IframeToggle/index" import iframeToggle from './IframeToggle/index';
export default { export default {
name: 'AppMain', name: 'AppMain',
components: { iframeToggle }, components: { iframeToggle },
computed: { computed: {
cachedViews() { cachedViews() {
return this.$store.state.tagsView.cachedViews return this.$store.state.tagsView.cachedViews;
}, },
key() { key() {
return this.$route.path return this.$route.path;
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-main { .app-main {
/* 48= navbar 48 */ /* 48= navbar 48 */
min-height: calc(100vh - 56px); // min-height: calc(100vh - 84px);
min-width: calc(100vh - 280px); min-width: calc(100vh - 280px);
position: relative; position: relative;
overflow: visible; overflow: visible;
margin: 8px 14px 0px 16px; margin: 8px 14px 0px 16px;
border-radius: 8px; border-radius: 8px;
background-color: #fff; background-color: #fff;
} }
.fixed-header + .app-main { .fixed-header + .app-main {
padding-top: 56px; padding-top: 84px;
} }
.hasTagsView { .hasTagsView {
.app-main { .app-main {
/* 84 = navbar + tags-view = 50 + 34 */ /* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 120px - 8px); min-height: calc(100vh - 164px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.fixed-header + .app-main { .fixed-header + .app-main {
padding-top: 90px; padding-top: 90px;
} }
} }
</style> </style>
<style lang="scss"> <style lang="scss">
// fix css style bug in open el-dialog // fix css style bug in open el-dialog
.el-popup-parent--hidden { .el-popup-parent--hidden {
.fixed-header { .fixed-header {
padding-right: 17px; padding-right: 17px;
} }
} }
</style> </style>

Näytä tiedosto

@ -17,7 +17,9 @@ export default {
const vnodes = [] const vnodes = []
if (icon) { if (icon) {
vnodes.push(<svg-icon icon-class={icon}/>) vnodes.push(<svg-icon style="font-size: 18px;margin-right: 10px;vertical-align: middle;" icon-class={icon}/>)
} else {
vnodes.push(<span style="display: inline-block; width: 10px;"/>)
} }
if (title) { if (title) {

Näytä tiedosto

@ -4,7 +4,7 @@
:class="{ collapse: collapse }" :class="{ collapse: collapse }"
:style="{ :style="{
backgroundColor: backgroundColor:
sideTheme === 'theme-dark' ? '#1f2d3d' : variables.menuLightBackground, sideTheme === 'theme-dark' ? '#1E1651' : variables.menuLightBackground,
}"> }">
<!-- sideTheme === 'theme-dark' <!-- sideTheme === 'theme-dark'
? variables.menuBackground ? variables.menuBackground

Näytä tiedosto

@ -1,96 +0,0 @@
<template>
<div v-if="!item.hidden">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
</el-menu-item>
</app-link>
</template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
<template slot="title">
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
</template>
<sidebar-item
v-for="(child, index) in item.children"
:key="child.path + index"
:is-nest="true"
:item="child"
:base-path="resolvePath(child.path)"
class="nest-menu"
/>
</el-submenu>
</div>
</template>
<script>
import path from 'path'
import { isExternal } from '@/utils/validate'
import Item from './Item'
import AppLink from './Link'
import FixiOSBug from './FixiOSBug'
export default {
name: 'SidebarItem',
components: { Item, AppLink },
mixins: [FixiOSBug],
props: {
// route object
item: {
type: Object,
required: true
},
isNest: {
type: Boolean,
default: false
},
basePath: {
type: String,
default: ''
}
},
data() {
this.onlyOneChild = null
return {}
},
methods: {
hasOneShowingChild(children = [], parent) {
if (!children) {
children = [];
}
const showingChildren = children.filter(item => {
if (item.hidden) {
return false
} else {
// Temp set(will be used if only has one showing child)
this.onlyOneChild = item
return true
}
})
// When there is only one child router, the child router is displayed by default
if (showingChildren.length === 1) {
return true
}
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
return true
}
return false
},
resolvePath(routePath) {
if (isExternal(routePath)) {
return routePath
}
if (isExternal(this.basePath)) {
return this.basePath
}
return path.resolve(this.basePath, routePath)
}
}
}
</script>

Näytä tiedosto

@ -1,96 +1,107 @@
<template> <template>
<div v-if="!item.hidden"> <div v-if="!item.hidden">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"> <template
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)"> v-if="
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> hasOneShowingChild(item.children, item) &&
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" /> (!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
</el-menu-item> !item.alwaysShow
</app-link> ">
</template> <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item
:index="resolvePath(onlyOneChild.path)"
:class="{ 'submenu-title-noDropdown': !isNest }">
<item icon="menuIcon" :title="onlyOneChild.meta.title" />
</el-menu-item>
</app-link>
</template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body> <el-submenu
<template slot="title"> v-else
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" /> ref="subMenu"
</template> :index="resolvePath(item.path)"
<sidebar-item popper-append-to-body>
v-for="(child, index) in item.children" <template slot="title">
:key="child.path + index" <item v-if="item.meta" icon="menuIcon" :title="item.meta.title" />
:is-nest="true" </template>
:item="child" <sidebar-item-sub
:base-path="resolvePath(child.path)" v-for="(child, index) in item.children"
class="nest-menu" :key="child.path + index"
/> :is-nest="true"
</el-submenu> :item="child"
</div> :base-path="resolvePath(child.path)"
class="nest-menu" />
</el-submenu>
</div>
</template> </template>
<script> <script>
import path from 'path' import path from 'path';
import { isExternal } from '@/utils/validate' import { isExternal } from '@/utils/validate';
import Item from './Item' import Item from './Item';
import AppLink from './Link' import AppLink from './Link';
import FixiOSBug from './FixiOSBug' import FixiOSBug from './FixiOSBug';
import SidebarItemSub from './SidebarItemSub';
export default { export default {
name: 'SidebarItem', name: 'SidebarItem',
components: { Item, AppLink }, components: { Item, AppLink, SidebarItemSub },
mixins: [FixiOSBug], mixins: [FixiOSBug],
props: { props: {
// route object // route object
item: { item: {
type: Object, type: Object,
required: true required: true,
}, },
isNest: { isNest: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
basePath: { basePath: {
type: String, type: String,
default: '' default: '',
} },
}, },
data() { data() {
this.onlyOneChild = null this.onlyOneChild = null;
return {} return {};
}, },
methods: { methods: {
hasOneShowingChild(children = [], parent) { hasOneShowingChild(children = [], parent) {
if (!children) { if (!children) {
children = []; children = [];
} }
const showingChildren = children.filter(item => { const showingChildren = children.filter((item) => {
if (item.hidden) { if (item.hidden) {
return false return false;
} else { } else {
// Temp set(will be used if only has one showing child) // Temp set(will be used if only has one showing child)
this.onlyOneChild = item this.onlyOneChild = item;
return true return true;
} }
}) });
// When there is only one child router, the child router is displayed by default // When there is only one child router, the child router is displayed by default
if (showingChildren.length === 1) { if (showingChildren.length === 1) {
return true return true;
} }
// Show parent if there are no child router to display // Show parent if there are no child router to display
if (showingChildren.length === 0) { if (showingChildren.length === 0) {
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true } this.onlyOneChild = { ...parent, path: '', noShowingChildren: true };
return true return true;
} }
return false return false;
}, },
resolvePath(routePath) { resolvePath(routePath) {
if (isExternal(routePath)) { if (isExternal(routePath)) {
return routePath return routePath;
} }
if (isExternal(this.basePath)) { if (isExternal(this.basePath)) {
return this.basePath return this.basePath;
} }
return path.resolve(this.basePath, routePath) return path.resolve(this.basePath, routePath);
} },
} },
} };
</script> </script>

Näytä tiedosto

@ -0,0 +1,106 @@
<template>
<div v-if="!item.hidden">
<template
v-if="
hasOneShowingChild(item.children, item) &&
(!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
!item.alwaysShow
">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item
:index="resolvePath(onlyOneChild.path)"
:class="{ 'submenu-title-noDropdown': !isNest }">
<item icon="" :title="onlyOneChild.meta.title" />
</el-menu-item>
</app-link>
</template>
<el-submenu
v-else
ref="subMenu"
:index="resolvePath(item.path)"
popper-append-to-body>
<template slot="title">
<item v-if="item.meta" icon="" :title="item.meta.title" />
</template>
<sidebar-item-sub
v-for="(child, index) in item.children"
:key="child.path + index"
:is-nest="true"
:item="child"
:base-path="resolvePath(child.path)"
class="nest-menu" />
</el-submenu>
</div>
</template>
<script>
import path from 'path';
import { isExternal } from '@/utils/validate';
import Item from './Item';
import AppLink from './Link';
import FixiOSBug from './FixiOSBug';
export default {
name: 'SidebarItemSub',
components: { Item, AppLink },
mixins: [FixiOSBug],
props: {
// route object
item: {
type: Object,
required: true,
},
isNest: {
type: Boolean,
default: false,
},
basePath: {
type: String,
default: '',
},
},
data() {
this.onlyOneChild = null;
return {};
},
methods: {
hasOneShowingChild(children = [], parent) {
if (!children) {
children = [];
}
const showingChildren = children.filter((item) => {
if (item.hidden) {
return false;
} else {
// Temp set(will be used if only has one showing child)
this.onlyOneChild = item;
return true;
}
});
// When there is only one child router, the child router is displayed by default
if (showingChildren.length === 1) {
return true;
}
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
this.onlyOneChild = { ...parent, path: '', noShowingChildren: true };
return true;
}
return false;
},
resolvePath(routePath) {
if (isExternal(routePath)) {
return routePath;
}
if (isExternal(this.basePath)) {
return this.basePath;
}
return path.resolve(this.basePath, routePath);
},
},
};
</script>

Näytä tiedosto

@ -1,71 +0,0 @@
<template>
<div
:class="{ 'has-logo': showLogo }"
:style="{
backgroundColor:
settings.sideTheme === 'theme-dark'
? variables.menuBackground
: variables.menuLightBackground,
}">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="
settings.sideTheme === 'theme-dark'
? variables.menuBackground
: variables.menuLightBackground
"
:text-color="
settings.sideTheme === 'theme-dark'
? variables.menuColor
: variables.menuLightColor
"
:unique-opened="true"
active-text-color="#fff"
:collapse-transition="false"
mode="vertical">
<!-- 根据 sidebarRouters 路由生成菜单 -->
<sidebar-item
v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path" />
</el-menu>
</el-scrollbar>
</div>
</template>
<script>
import { mapGetters, mapState } from 'vuex';
import Logo from './Logo';
import SidebarItem from './SidebarItem';
import variables from '@/assets/styles/variables.scss';
export default {
components: { SidebarItem, Logo },
computed: {
...mapState(['settings']),
...mapGetters(['sidebarRouters', 'sidebar']),
activeMenu() {
const route = this.$route;
const { meta, path } = route;
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu;
}
return path;
},
showLogo() {
return this.$store.state.settings.sidebarLogo;
},
variables() {
return variables;
},
isCollapse() {
return !this.sidebar.opened;
},
},
};
</script>

Näytä tiedosto

@ -1,6 +1,7 @@
<template> <template>
<div <div
:class="{ 'has-logo': showLogo }" :class="{ 'has-logo': showLogo }"
class="left-menu-box"
:style="{ :style="{
backgroundColor: backgroundColor:
settings.sideTheme === 'theme-dark' settings.sideTheme === 'theme-dark'
@ -72,3 +73,10 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss">
.left-menu-box {
.el-menu-item.is-active {
background-color: #0b58ff !important;
}
}
</style>

Näytä tiedosto

@ -1,11 +1,11 @@
export default { export default {
data() { data() {
return { return {
tableH: this.tableHeight(260), tableH: this.tableHeight(296),
}; };
}, },
created() { created() {
this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260); this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(296);
window.addEventListener('resize', this._setTableHeight); window.addEventListener('resize', this._setTableHeight);
}, },
destroyed() { destroyed() {
@ -13,7 +13,7 @@ export default {
}, },
methods: { methods: {
_setTableHeight() { _setTableHeight() {
this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260); this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(296);
// this.tableH = this.tableHeight(260); // this.tableH = this.tableHeight(260);
}, },
}, },

Näytä tiedosto

@ -23,11 +23,15 @@ const permission = {
state.topbarRouters = routes state.topbarRouters = routes
}, },
SET_SIDEBAR_ROUTERS: (state, routes) => { SET_SIDEBAR_ROUTERS: (state, routes) => {
console.log('=========:',routes) console.log('==SET_SIDEBAR_ROUTERS==:',routes)
state.sidebarRouters = routes state.sidebarRouters = routes
}, },
}, },
actions: { actions: {
// 生成路由 // 生成路由
GenerateRoutes({commit}) { GenerateRoutes({commit}) {
return new Promise(resolve => { return new Promise(resolve => {

Näytä tiedosto

@ -141,7 +141,7 @@ export default {
const width = window.innerWidth - 700; const width = window.innerWidth - 700;
console.log(width); console.log(width);
console.log('window.innerWidth:', window.innerWidth); console.log('window.innerWidth:', window.innerWidth);
this.visibleNumber = parseInt(width / 120); this.visibleNumber = parseInt(width / 110);
console.log('this.visibleNumber:', this.visibleNumber); console.log('this.visibleNumber:', this.visibleNumber);
}, },
// //

Näytä tiedosto

@ -141,7 +141,7 @@ export default {
const width = window.innerWidth - 700; const width = window.innerWidth - 700;
console.log(width); console.log(width);
console.log('window.innerWidth:', window.innerWidth); console.log('window.innerWidth:', window.innerWidth);
this.visibleNumber = parseInt(width / 120); this.visibleNumber = parseInt(width / 110);
console.log('this.visibleNumber:', this.visibleNumber); console.log('this.visibleNumber:', this.visibleNumber);
}, },
// //
@ -207,6 +207,9 @@ export default {
.homemenu-container.el-menu.el-menu--horizontal > .el-submenu.is-active { .homemenu-container.el-menu.el-menu--horizontal > .el-submenu.is-active {
--theme: none !important; --theme: none !important;
} }
.homemenu-container.el-menu.el-menu--horizontal > .el-menu-item.is-active {
border-bottom: none !important;
}
.homemenu-container.el-menu--horizontal > .el-menu-item { .homemenu-container.el-menu--horizontal > .el-menu-item {
float: left; float: left;
height: 84px !important; height: 84px !important;

Näytä tiedosto

@ -434,3 +434,11 @@ export default {
} }
} }
</style> </style>
<style lang="scss">
.home-page {
.el-progress-bar__inner {
background-image: url('~@/assets/img/home-progress-bg.png');
background-size: cover;
}
}
</style>

Näytä tiedosto

@ -70,7 +70,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getList(); // this.getList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */

Näytä tiedosto

@ -24,7 +24,7 @@ export default {
}, },
data() { data() {
return { return {
heightNum: 200, heightNum: 236,
nameData: [], nameData: [],
list: [], list: [],
}; };

Näytä tiedosto

@ -45,7 +45,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.currentDataContainer { .currentDataContainer {
width: 100%; width: 100%;
min-height: calc(100vh - 120px - 8px); min-height: calc(100vh - 164px);
background: rgba(242, 244, 249, 1); background: rgba(242, 244, 249, 1);
.topBox { .topBox {
.el-menu { .el-menu {
@ -79,10 +79,11 @@ export default {
} }
} }
.bottomBox { .bottomBox {
min-height: calc(100vh - 184px); height: calc(100vh - 220px);
background: #fff; background: #fff;
padding: 16px; padding: 16px;
border-radius: 8px; border-radius: 8px;
overflow-y: auto;
} }
} }
</style> </style>

Näytä tiedosto

@ -48,7 +48,7 @@
</div> </div>
</div> </div>
<!-- side bar --> <!-- side bar -->
<div class="side-bar__left" style="width: 240px; height: 100%"> <div class="side-bar__left">
<el-tree <el-tree
class="custom-tree-class" class="custom-tree-class"
:data="currentFactory?.children" :data="currentFactory?.children"
@ -87,6 +87,7 @@
:table-props="table.tableProps" :table-props="table.tableProps"
:table-data="table.dataManager?.dataList ?? []" :table-data="table.dataManager?.dataList ?? []"
:span-method="spanMethod" :span-method="spanMethod"
:max-height="tableH"
@emitFun="(val) => handleEmitFun(table, val)"></base-table> @emitFun="(val) => handleEmitFun(table, val)"></base-table>
<pagination <pagination
:key="table.key + '__pagination'" :key="table.key + '__pagination'"
@ -115,9 +116,11 @@
<script> <script>
// import Graph from './graph.vue'; // import Graph from './graph.vue';
import { getWorkOrderList, getTreeData } from '@/api/quality/deviceParameters'; import { getWorkOrderList, getTreeData } from '@/api/quality/deviceParameters';
import tableHeightMixin from '@/mixins/tableHeightMixin';
export default { export default {
name: 'EquipmentProcessAmount', name: 'EquipmentProcessAmount',
// components: { Graph }, // components: { Graph },
mixins: [tableHeightMixin],
props: {}, props: {},
data() { data() {
const now = new Date(); const now = new Date();
@ -578,6 +581,10 @@ export default {
</script> </script>
<style scoped> <style scoped>
.side-bar__left {
width: 240px;
height: calc(100% - 70px);
}
.side-bar__left >>> .is-current { .side-bar__left >>> .is-current {
padding: 0; padding: 0;
color: #111; color: #111;

Näytä tiedosto

@ -81,7 +81,7 @@ export default {
mixins: [tableHeightMixin], mixins: [tableHeightMixin],
data() { data() {
return { return {
heightNum: 220, heightNum: 256,
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:packaging-print-log:update`) this.$auth.hasPermi(`base:packaging-print-log:update`)