projects/mes-test #132

Manually merged
gtz217 merged 281 commits from projects/mes-test into projects/mes 2023-11-30 09:11:34 +08:00
32 changed files with 738 additions and 44 deletions
Showing only changes of commit 26100af90a - Show all commits

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>exit</title>
<g id="7能源管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="系统退出" transform="translate(-1783.000000, -56.000000)" fill="#000000" fill-rule="nonzero">
<g id="exit" transform="translate(1783.000000, 56.000000)">
<rect id="矩形" opacity="0" x="0" y="0" width="16" height="16"></rect>
<path d="M12.0719591,1.5140625 C12.3862828,1.52338993 12.6391466,1.78322084 12.6391466,2.1015625 C12.6391466,2.41990416 12.3862828,2.67973507 12.0690068,2.68910609 L3.64375,2.6890625 L3.54375,2.7890625 L3.54375,13.26875 L3.64375,13.36875 L12.0690068,13.3687064 C12.3862828,13.3780774 12.6391466,13.6379083 12.6391466,13.95625 C12.6391466,14.2745917 12.3862828,14.5344226 12.0690068,14.5437936 L3.0890625,14.5437936 C2.69272847,14.5437936 2.36875,14.2197715 2.36875,13.8234375 L2.36875,2.234375 C2.36875,1.83804097 2.69272847,1.5140625 3.0890625,1.5140625 Z M10.8144607,5.05039818 C11.0425957,4.82226311 11.4167793,4.82226311 11.6449143,5.05039818 L14.2074143,7.61289818 C14.4357222,7.84120602 14.4353075,8.21522958 14.2060583,8.44314597 L11.6433518,11.0058518 C11.4152168,11.2339869 11.0410332,11.2339869 10.8128982,11.0058518 C10.5847631,10.7777168 10.5847631,10.4035332 10.8128982,10.1753982 L12.1519607,8.83633568 L12.08125,8.665625 L7.1640625,8.665625 C6.81403169,8.665625 6.5265625,8.37857547 6.5265625,8.028125 C6.5265625,7.67809419 6.81361203,7.390625 7.1640625,7.390625 L12.0828125,7.390625 L12.1535232,7.21991432 L10.8144607,5.88085182 C10.5863256,5.65271675 10.5863256,5.27853325 10.8144607,5.05039818 Z" id="形状结合"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 17</title>
<g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.695141">
<g id="最新参考" transform="translate(-1780.000000, -57.000000)" fill="#000000" fill-rule="nonzero">
<g id="编组-4" transform="translate(1772.000000, 48.000000)">
<g id="编组-17" transform="translate(8.000000, 9.000000)">
<rect id="矩形备份-2" opacity="0" x="0" y="0" width="16" height="16"></rect>
<g id="文档" transform="translate(2.436519, 1.472460)">
<path d="M9.61879642,0.990942446 C9.83682412,0.990942446 10.0548518,1.18867806 10.0548518,1.38641367 L10.0548518,11.6686655 C10.0548518,11.8664011 9.83682412,12.0641367 9.61879642,12.0641367 L3.60123204,12.0641367 L1.02850524,9.69130935 L1.02850524,1.38641367 C1.02850524,1.18867806 1.24653294,0.990942446 1.46456063,0.990942446 L9.61879642,0.990942446 M9.61879642,0.2 L1.50816617,0.2 C0.810477546,0.2 0.2,0.753659712 0.2,1.38641367 L0.2,10.0076863 L3.25238773,12.8550791 L9.61879642,12.8550791 C10.316485,12.8550791 10.9269626,12.3014194 10.9269626,11.6686655 L10.9269626,1.38641367 C10.9269626,0.753659712 10.316485,0.2 9.61879642,0.2 Z" id="形状"></path>
<path d="M9.61879642,0 C10.4228194,0 11.1269626,0.638607809 11.1269626,1.38641367 L11.1269626,11.6686655 C11.1269626,12.4164713 10.4228194,13.0550791 9.61879642,13.0550791 L3.25238773,13.0550791 L3.11596256,13.0013261 L0.0635748259,10.1539333 L0,10.0076863 L0,1.38641367 C0,0.638607809 0.704143212,0 1.50816617,0 L9.61879642,0 Z M9.61879642,0.4 L1.50816617,0.4 C0.91681188,0.4 0.4,0.868711615 0.4,1.38641367 L0.4,9.921 L3.331,12.6550791 L9.61879642,12.6550791 C10.1707271,12.6550791 10.657723,12.2467792 10.7202028,11.7714283 L10.7269626,11.6686655 L10.7269626,1.38641367 C10.7269626,0.868711615 10.2101507,0.4 9.61879642,0.4 Z M9.61879642,0.790942446 C9.94315845,0.790942446 10.2548518,1.07362615 10.2548518,1.38641367 L10.2548518,11.6686655 C10.2548518,11.981453 9.94315845,12.2641367 9.61879642,12.2641367 L3.60123204,12.2641367 L3.46563766,12.2111542 L0.892910861,9.83832691 L0.828505241,9.69130935 L0.828505241,1.38641367 C0.828505241,1.07362615 1.1401986,0.790942446 1.46456063,0.790942446 L9.61879642,0.790942446 Z M9.69667678,1.08901006 L1.38668992,1.08901006 C1.27286315,1.08901006 1.14612572,1.20395189 1.14612572,1.28821491 L1.14561083,9.66174324 L3.64342649,11.9659298 L9.69667678,11.9660691 C9.79153243,11.9660691 9.8953538,11.8862484 9.92732605,11.8108781 L9.93724098,11.7668642 L9.93724098,1.28821491 C9.93724098,1.20395189 9.81050356,1.08901006 9.69667678,1.08901006 Z" id="形状"></path>
<path d="M4.54092961,3.67913093 L2.25985278,3.67913093 C2.22052387,3.67913093 2.22052387,3.65291165 2.22052387,3.65291165 L2.22052387,2.91877199 C2.22052387,2.89255271 2.22052387,2.89255271 2.25985278,2.89255271 L4.54092961,2.89255271 C4.58025852,2.89255271 4.58025852,2.89255271 4.58025852,2.91877199 L4.58025852,3.65291165 L4.54092961,3.67913093 Z M8.86710981,5.44893192 L2.25985278,5.44893192 C2.22052387,5.44893192 2.22052387,5.44893192 2.22052387,5.40960301 L2.22052387,4.70168261 C2.22052387,4.6623537 2.22052387,4.6623537 2.25985278,4.6623537 L8.86710981,4.6623537 C8.90643872,4.6623537 8.90643872,4.6623537 8.90643872,4.70168261 L8.90643872,5.40960301 L8.86710981,5.44893192 Z M8.86710981,7.41537746 L2.25985278,7.41537746 C2.22052387,7.41537746 2.22052387,7.41537746 2.22052387,7.37604855 L2.22052387,6.66812815 C2.22052387,6.62879924 2.22052387,6.62879924 2.25985278,6.62879924 L8.86710981,6.62879924 C8.90643872,6.62879924 8.90643872,6.62879924 8.90643872,6.66812815 L8.90643872,7.37604855 L8.86710981,7.41537746 Z" id="形状"></path>
<path d="M8.86710981,6.44841431 C9.00606257,6.44841431 9.08682365,6.5291754 9.08682365,6.66812815 L9.08682365,7.37604855 L9.03399013,7.50359996 L8.99466122,7.54292887 L8.86710981,7.59576239 L2.25985278,7.59576239 C2.12090003,7.59576239 2.04013894,7.51500131 2.04013894,7.37604855 L2.04013894,6.66812815 C2.04013894,6.5291754 2.12090003,6.44841431 2.25985278,6.44841431 L8.86710981,6.44841431 Z M8.72520451,6.80870958 L2.40090881,6.80870958 L2.40090881,7.23441802 L8.72520451,7.23441802 L8.72520451,6.80870958 Z M8.86710981,4.48196877 C9.00606257,4.48196877 9.08682365,4.56272985 9.08682365,4.70168261 L9.08682365,5.40960301 L9.03399013,5.53715441 L8.99466122,5.57648333 L8.86710981,5.62931685 L2.25985278,5.62931685 C2.12090003,5.62931685 2.04013894,5.54855576 2.04013894,5.40960301 L2.04013894,4.70168261 C2.04013894,4.56272985 2.12090003,4.48196877 2.25985278,4.48196877 L8.86710981,4.48196877 Z M8.72520451,4.84251382 L2.40090881,4.84251382 L2.40090881,5.26822226 L8.72520451,5.26822226 L8.72520451,4.84251382 Z M4.54092961,2.71216778 C4.66811215,2.71216778 4.76064346,2.77385532 4.76064346,2.91877199 L4.76064346,3.65291165 L4.68031808,3.80300099 L4.64098917,3.82922026 L4.54092961,3.85951586 L2.25985278,3.85951586 C2.18859958,3.85951586 2.12331983,3.83050264 2.08113204,3.77425225 C2.04130723,3.6964836 2.04130723,3.6964836 2.04013894,3.65291165 L2.04013894,2.91877199 C2.04013894,2.77385532 2.13267025,2.71216778 2.25985278,2.71216778 L4.54092961,2.71216778 Z M4.39957385,3.07293764 L2.40090881,3.07293764 L2.40090881,3.49864608 L4.39957385,3.49864608 L4.39957385,3.07293764 Z" id="形状"></path>
<path d="M3.50158987,12.5394187 L3.50158987,9.83587533 L0.88525753,9.83587533 L0.88525753,8.96376455 L3.93764526,8.96376455 C4.19927849,8.96376455 4.37370065,9.1381867 4.37370065,9.39981994 L4.37370065,12.5394187 L3.50158987,12.5394187 Z" id="路径"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
src/assets/images/cnbm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -35,7 +35,7 @@ export default {
const first = matched[0]
if (!this.isDashboard(first)) {
matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
matched = [{ path: '/', meta: { title: '首页' }}].concat(matched)
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)

View File

@ -5,8 +5,12 @@
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<div class="right-menu">
<template v-if="device!=='mobile'">
<div style="padding-top: 5px; padding-right: 38px;">
<navbar-right :blackTitle='true'/>
</div>
<!-- <div class="right-menu"> -->
<!-- <template v-if="device!=='mobile'"> -->
<!-- <search id="header-search" class="right-menu-item" /> -->
<!-- 站内信 -->
@ -18,27 +22,27 @@
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip> -->
</template>
<!-- </template> -->
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
<!-- <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper"> -->
<!-- <img :src="avatar" class="user-avatar"> -->
<span v-if="nickname" class="user-nickname">{{ nickname }}</span>
<!-- <span v-if="nickname" class="user-nickname">{{ nickname }}</span>
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link>
</router-link> -->
<!-- <el-dropdown-item @click.native="setting = true">
<span>布局设置</span>
</el-dropdown-item> -->
<el-dropdown-item divided @click.native="logout">
<!-- <el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</el-dropdown> -->
<!-- </div> -->
</div>
</template>
@ -51,7 +55,8 @@ import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
import NotifyMessage from '@/layout/components/Message'
import {getPath} from "@/utils/ruoyi";
// import {getPath} from "@/utils/ruoyi";
import NavbarRight from './NavbarRight.vue'
export default {
components: {
@ -61,7 +66,8 @@ export default {
Screenfull,
SizeSelect,
Search,
NotifyMessage
NotifyMessage,
NavbarRight
},
computed: {
...mapGetters([

View File

@ -0,0 +1,111 @@
<template>
<div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
<div class="time-msg">
<div class="line1">{{timeZone}}&nbsp;&nbsp;&nbsp;&nbsp;{{topTime}}</div>
<div class="line2">{{topDate}}</div>
</div>
<div class="base-msg">
<div class="avatar">
<el-dropdown>
<img :src="require(`../../assets/images/choicepart/avatar.png`)" alt="" width="32" height="32" />
<el-dropdown-menu slot="dropdown">
<el-dropdown-item><svg-icon icon-class="helpbtn"/>帮助文档</el-dropdown-item>
<el-dropdown-item @click.native="logout"><svg-icon icon-class="exitbtn"/>退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="use-msg">
<div class="line1">{{nickname}}</div>
<div class="line2">{{dept}}</div>
</div>
</div>
</div>
</template>
<script>
import moment from 'moment'
import { getUser } from "@/api/system/user.js";
import {getPath} from "@/utils/ruoyi";
export default {
name: 'navRight',
data() {
return {
topDate: '',
topTime: '',
timeZone: '',
timer: '',
dept:' ',
nickname: this.$store.getters.nickname
}
},
props: {
blackTitle: {
type: Boolean,
default: () => {
return false
}
}
},
mounted() {
this.getUserMsg()
this.getTime()
},
beforeDestroy() {
clearInterval(this.timer)
},
methods: {
getTime() {
let _this = this
this.timer = setInterval(function () {
_this.topDate = moment().format('YYYY/MM/DD')
let temp = moment().format('A-hh:mm').split('-')
_this.timeZone = temp[0]
_this.topTime = temp[1]
}, 1000)
},
getUserMsg() {
let id = this.$store.getters.userId
getUser(id).then(res => {
this.dept = res.data.dept ? res.data.dept.name : ''
})
},
async logout() {
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = getPath('/');
})
}).catch(() => {});
}
}
}
</script>
<style lang='scss' scoped>
.right-msg {
float: right;
height: 100%;
font-size: 14px;
// color: #fff;
// padding-top: 15px;
// padding-right: 38px;
.time-msg {
display: inline-block;
margin-right: 30px;
}
.base-msg {
display: inline-block;
.avatar {
display: inline-block;
margin-right: 10px;
}
.use-msg {
display: inline-block;
}
}
.line1 {
height: 19px;
}
.line2 {
height: 19px;
opacity: 0.65;
}
}
</style>

View File

@ -0,0 +1,96 @@
<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>

View File

@ -0,0 +1,71 @@
<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>

View File

@ -28,7 +28,7 @@
mode="vertical">
<!-- 根据 sidebarRouters 路由生成菜单 -->
<sidebar-item
v-for="(route, index) in sidebarRouters"
v-for="(route, index) in routeList"
:key="route.path + index"
:item="route"
:base-path="route.path" />
@ -47,7 +47,12 @@ export default {
components: { SidebarItem, Logo },
computed: {
...mapState(['settings']),
...mapGetters(['sidebarRouters', 'sidebar']),
...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']),
routeList() {
// return [this.partList[this.choicepart]]
// return [this.sidebarRouters[29]]
return [this.sidebarRouters[this.choicepart]]
},
activeMenu() {
const route = this.$route;
const { meta, path } = route;

View File

@ -71,17 +71,23 @@ export const constantRoutes = [
},
{
path: '/',
component: Layout,
// redirect: 'core/base/factory',
// children: [{
// path: 'index',
// redirect: 'core/base/factory',
// component: (resolve) => require(['@/views/index'], resolve),
// name: '首页',
// meta: { title: '首页', icon: 'dashboard', affix: true }
// }
// ]
component: () => import('@/views/choicePart'),
hidden: true,
meta: { requireToken: true }
},
// {
// path: '/',
// component: Layout,
// // redirect: 'core/base/factory',
// // children: [{
// // path: 'index',
// // redirect: 'core/base/factory',
// // component: (resolve) => require(['@/views/index'], resolve),
// // name: '首页',
// // meta: { title: '首页', icon: 'dashboard', affix: true }
// // }
// // ]
// },
{
path: '/user',
component: Layout,

View File

@ -17,6 +17,7 @@ const getters = {
topbarRouters:state => state.permission.topbarRouters,
defaultRoutes:state => state.permission.defaultRoutes,
sidebarRouters:state => state.permission.sidebarRouters,
choicepart: state => state.app.choicepart,
// 数据字典
dict_datas: state => state.dict.dictDatas
}

View File

@ -8,6 +8,7 @@ const state = {
},
device: "desktop",
size: localStorage.getItem("size") || "medium",
choicepart: localStorage.getItem('choicepart') || null
};
const mutations = {
@ -38,6 +39,10 @@ const mutations = {
SET_SIDEBAR_HIDE: (state, status) => {
state.sidebar.hide = status;
},
SET_CHOICEPART: (state, choicepart) => {
state.choicepart = choicepart
localStorage.setItem('choicepart', choicepart)
}
};
const actions = {
@ -56,6 +61,9 @@ const actions = {
toggleSideBarHide({ commit }, status) {
commit("SET_SIDEBAR_HIDE", status);
},
setChoicepart({ commit }, choicepart) {
commit('SET_CHOICEPART', choicepart)
}
};
export default {

View File

@ -0,0 +1,24 @@
<template>
<div class="navbar">
<div style="color: #fff;font-size: 22px; float: left; letter-spacing: 1px; font-weight: 500; padding-left: 24px; marginTop: 13px">
<img src="../../../assets/images/cnbm.png" style="width: 26px; height: 26px; position: relative; top: 6px; marginRight: 14px" alt="">
MES
</div>
<div style="padding-top: 15px; padding-right: 38px;">
<navbar-right />
</div>
</div>
</template>
<script>
import NavbarRight from '../../../layout/components/NavbarRight.vue'
export default {
name: 'Navbar',
components: { NavbarRight }
}
</script>
<style lang='scss' scoped>
.navbar {
height: 64px;
background: rgba(8, 17, 50, 0.25);
}
</style>

View File

@ -0,0 +1,312 @@
<template>
<div class="choicepart-container">
<navbar />
<div class="choicepart-wrapper">
<div class="choicepart-box" id="choicepartBox" :style="'transform:scale('+scale+');width:1574px;height:538px;'">
<div class="choicepart-line1">
<div
v-for="(item, index) in menuArr1"
:key="index"
class="choicepart-item"
@click="handelClick(item, item.choicepart)"
:style="{opacity: item.visible?1:0.4, pointerEvents:item.visible?'auto':'none'}"
>
<div>
<img :src="require(`../../assets/images/choicepart/${item.name}.png`)" alt="">
</div>
<div class="choicepart-item-title">{{item.meta.title}}</div>
</div>
</div>
<div class="choicepart-line2">
<div
v-for="(item, index) in menuArr2"
:key="index"
class="choicepart-item"
@click="handelClick(item, item.choicepart)"
:style="{opacity: item.visible?1:0.4, pointerEvents:item.visible?'auto':'none'}"
>
<div>
<img :src="require(`../../assets/images/choicepart/${item.name}.png`)" alt="">
</div>
<div class="choicepart-item-title">{{item.meta.title}}</div>
</div>
</div>
</div>
</div>
<div class="choicepart-footer">&copy; 中建材智能自动化研究院有限公司</div>
</div>
</template>
<script>
import Navbar from './components/Navbar.vue'
import { debounce } from '@/utils/debounce'
export default {
components: { Navbar },
name: 'choicePart',
data() {
return {
boxReset: '',
scale: 1,
menuArr1: [
{
name: 'Core',
title: '基础核心',
visible: false,
meta: {
title: ''
}
},
{
name: 'Order',
title: '订单管理',
visible: false,
meta: {
title: ''
}
},
{
name: 'Equipment',
title: '设备管理',
visible: false,
meta: {
title: ''
}
},
{
name: 'Group',
title: '班组管理',
visible: false,
meta: {
title: ''
}
},
{
name: 'Quality',
title: '质量管理',
visible: false,
meta: {
title: ''
}
},
{
name: 'Warehouse',
title: '仓库管理',
visible: false,
meta: {
title: ''
}
},
{
name: 'Energy',
title: '能源管理',
visible: false,
meta: {
title: ''
}
}
],
menuArr2: [
{
name: 'Packaging',
title: '包装管理',
visible: false,
meta: {
title: ''
}
},
{
name: 'Material',
title: '物料管理',
visible: false,
meta: {
title: ''
}
},
{
name: 'Extend',
title: '工艺管理',
visible: false,
meta: {
title: ''
}
},
{
name: 'Delivery',
title: '成品发货',
visible: false,
meta: {
title: ''
}
},
{
name: 'Report',
title: '报表管理',
visible: false,
meta: {
title: ''
}
},
{
name: 'System',
title: '系统管理',
visible: false,
meta: {
title: ''
}
}
],
}
},
// computed:{
// ...mapGetters(['sidebarRouters'])
// },
mounted() {
this.getMsg()
this.boxReset = debounce(() => {
this.resetSize()
}, 300)
this.boxReset()
window.addEventListener('resize', () => {
this.boxReset()
})
},
methods: {
getMsg() {
let menuList = this.$store.state.permission.sidebarRouters
console.log(menuList)
if (menuList.length > 0) {
for (let i = 0; i < menuList.length; i ++) {
for (let k = 0; k < 7; k++) {
if (menuList[i].name === this.menuArr1[k].name) {
this.menuArr1[k].visible = true
this.menuArr1[k].id = menuList[i].id
this.menuArr1[k].choicepart = i
this.menuArr1[k].children = menuList[i].children
this.menuArr1[k].meta = menuList[i].meta
}
}
for (let j = 0; j < 6; j++) {
if (menuList[i].name === this.menuArr2[j].name) {
this.menuArr2[j].visible = true
this.menuArr2[j].id = menuList[i].id
this.menuArr2[j].choicepart = i
this.menuArr2[j].children = menuList[i].children
this.menuArr2[j].meta = menuList[i].meta
}
}
}
}
console.log(this.menuArr1)
console.log(this.menuArr2)
},
handelClick(item, index) {
// this.$router.push({name: 'SystemUser'})
this.$store.dispatch('app/setChoicepart', index)
this.toRouter(item)
// if (item.meta.unuse) {
// this.$message.warning(this.$t(''))
// } else {
// this.toRouter(item)
// }
},
toRouter(item) {
console.log(item)
if (item.children) {
this.toRouter(item.children[0])
} else {
this.$router.push({ name: item.name })
}
},
resetSize() {
let choicepartBox = document.querySelector('#choicepartBox')
let rw = parseFloat(window.innerWidth)
let rh = parseFloat(window.innerHeight)
let bw = parseFloat(choicepartBox.style.width)
let bh = parseFloat(choicepartBox.style.height)
let wx = 0.82/(bw / rw)
let hx = 0.56/(bh / rh)
this.scale = wx > hx ? hx : wx
}
}
}
</script>
<style lang='scss' scoped>
.choicepart-container {
position: relative;
width: 100%;
height: 100%;
background: url('../../assets/images/choicepart/choicepart-back.png') repeat;
background-size: 100% 100%;
.choicepart-wrapper {
width: 100vw;
height: calc(100vh - 94px);
display: flex;
justify-content: center;
align-items: center;
}
.choicepart-box {
// border: 1px solid red;
.choicepart-line1 {
width: 100%;
margin-bottom: 80px;
display: flex;
flex-flow: row nowrap;
}
.choicepart-line2 {
width: 100%;
display: flex;
flex-flow: row nowrap;
justify-content: center;
}
.choicepart-item {
width: 184px;
height: 224px;
background: url('../../assets/images/choicepart/choice-item-back.png') no-repeat;
background-size: 100% 100%;
border-radius: 5px;
overflow: hidden;
cursor: pointer;
position: relative;
margin: 0 20px;
img {
width: 184px;
height: 224px;
}
.choicepart-item-title {
overflow: hidden;
padding: 0 10px;
text-overflow: ellipsis;
white-space: nowrap;
position: absolute;
bottom: 0;
left: 2px;
right: 2px;
text-align: center;
color: #fff;
font-size: 16px;
line-height: 40px;
height: 40px;
letter-spacing: 2px;
background-color: rgba($color: #0b58ff, $alpha: 0.45);
}
}
.choicepart-item:hover {
.choicepart-item-title {
background-color: rgba($color: #0b58ff, $alpha: 1);
}
}
}
.choicepart-footer {
position: absolute;
width: 100%;
color: #C7C7C7;
user-select: none;
font-size: 12px;
letter-spacing: 1px;
height: 30px;
display: grid;
place-content: center;
bottom: 0;
opacity: 0.5;
}
}
</style>

View File

@ -34,7 +34,7 @@
<el-button type="primary" size="small" plain v-show="showSetting" @click="cancelSetting">取消</el-button>
</el-form-item>
<el-form-item label="请先选择查询的班组" class="rightItem">
<el-button type="primary" size="small" :disabled="jumpDisabled" @click="toOtherPage('1')">班组上下片查询</el-button>
<!-- <el-button type="primary" size="small" :disabled="jumpDisabled" @click="toOtherPage('1')">班组上下片查询</el-button> -->
<el-button type="primary" size="small" :disabled="jumpDisabled" @click="toOtherPage('2')">班组能源查询</el-button>
<el-button type="primary" size="small" :disabled="jumpDisabled" @click="toOtherPage('3')">班组检测查询</el-button>
</el-form-item>
@ -286,22 +286,18 @@ export default {
case '1':
this.$router.push({
path: '/core/enhance/product-line-24h?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime,
// name: 'ProductionLineData',
// params: { startTime: this.chooseObj.startTime, endTime: this.chooseObj.endTime }
})
break;
case '2': //
this.$router.push({
path: '/energy/monitoring/energy-report-search?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime
// name: 'EnergyReportSearch',
// params: { startTime: this.chooseObj.startTime, endTime: this.chooseObj.endTime }
})
break;
default:
this.$router.push({
path: '/quality/monitoring/quality-statistics',
path: '/quality/base/quality-inspection-data/detection-information/statistical-data?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime,
// name: 'QualityStatistics',
params: { startTime: this.chooseObj.startTime, endTime: this.chooseObj.endTime }
// params: { startTime: this.chooseObj.startTime, endTime: this.chooseObj.endTime }
})
}
}

View File

@ -6,9 +6,24 @@
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
<el-tabs v-model="activeName" @tab-click="handleClick">
<base-table
:page="1"
:limit="5000"
:table-props="tableProps"
:table-data="list"
:max-height="tableH"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="250"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<!-- <el-tabs v-model="activeName" @tab-click="toggleTab">
<el-tab-pane label="数据列表" name="dataList">
<!-- 列表 -->
<base-table
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
@ -26,7 +41,7 @@
/>
</base-table>
</el-tab-pane>
<el-tab-pane label="柱状图" name="barChart">
<el-tab-pane label="环形图" name="barChart">
<div class="boxTitle">
<span class="blueTitle"></span>
<span>各订单环形图</span>
@ -36,7 +51,7 @@
style="width: 182px; height: 180px;"
></div>
</el-tab-pane>
</el-tabs>
</el-tabs> -->
</div>
</template>
<script>
@ -147,14 +162,15 @@ export default {
activeName: 'dataList',
//
queryParams: {
pageNo: 1,
pageSize: 20,
// pageNo: 1,
// pageSize: 5000,
name: null,
startProduceTime: []
},
tableProps,
list: [],
tableH: this.tableHeight(270),
// tableH: this.tableHeight(270),
tableH: this.tableHeight(230),
total: 0,
tableBtn: [
this.$auth.hasPermi('base:order-completion-monitoring:orderDet')
@ -175,12 +191,13 @@ export default {
btnName: '发货详情'
}
: undefined
].filter((v) => v),
].filter((v) => v)
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(270)
// this.tableH = this.tableHeight(270)
this.tableH = this.tableHeight(230)
})
this.getOrderList()
this.getPage()
@ -332,16 +349,25 @@ export default {
console.log(val)
switch (val.type) {
case 'orderDetail':
this.$router.push({
path: '/base/coreWorkOrder/detail?orderId='+val.data.orderid
})
break
case 'qualityDetail':
this.$router.push({
path: '/quality/base/quality-inspection-data/detection-information/statistical-data?woIdString='+val.data.woIdString,
})
break
default:
this.$router.push({
path: '/delivery/delivery-log?orderId='+encodeURI(val.data.name)
})
}
},
toggleTab() {
if (this.activeName === 'barChart') {
this.getPieChart()
}
}
}
}