main
liuyiliang 1 year ago
parent 0cee748c48
commit f177c16761
  1. 18
      src/page/index/index.vue
  2. 16
      src/page/index/logo.vue
  3. 71
      src/page/index/sidebar/index.vue
  4. 32
      src/page/index/sidebar/sidebarItem.vue
  5. 22
      src/page/index/tags.vue
  6. 107
      src/page/index/top-menu.vue
  7. 128
      src/page/index/top/index.vue
  8. 79
      src/page/index/top/top-navigation.vue
  9. 1
      src/styles/element-ui.scss
  10. 24
      src/styles/media.scss
  11. 4
      src/styles/sidebar.scss
  12. 21
      src/styles/tags.scss
  13. 3
      src/styles/top.scss
  14. 13
      src/views/smart/workorder.vue
  15. 22
      src/views/smart/workorderDetail.vue

@ -7,11 +7,13 @@
</div>
<div class="avue-layout">
<!-- 主菜单-->
<top-menu :switchMenu="switchMenu"/>
<div class="avue-left">
<!-- 左侧导航栏 -->
<sidebar />
<sidebar ref="sidebar"/>
</div>
<div class="avue-main">
<div class="avue-main" style="height:87vh">
<!-- 顶部标签卡 -->
<tags />
<!-- 主体视图层 -->
@ -37,6 +39,7 @@ import tags from "./tags";
import top from "./top/";
import sidebar from "./sidebar/";
import admin from "@/util/admin";
import topMenu from "./top-menu";
// import { validatenull } from "@/util/validate";
// import { calcDate } from "@/util/date.js";
// import { getStore } from "@/util/store.js";
@ -44,7 +47,8 @@ export default {
components: {
top,
tags,
sidebar
sidebar,
topMenu
},
name: "index",
data() {
@ -98,7 +102,15 @@ export default {
});
}
}, 10000);*/
},
switchMenu(code) {
this.$refs.sidebar.someMethod(code);
}
}
};
</script>
<style>
.avue-layout {
background-color: #050F22;
}
</style>

@ -13,9 +13,8 @@
<span class="avue-logo_title"
key="1">
<div>
<img src="favicon.ico"
width="30"
alt="">{{website.indexTitle}}</div>
新疆甘泉堡源荷储一体化控制系统
</div>
</span>
</template>
</transition-group>
@ -52,10 +51,10 @@ export default {
position: fixed;
top: 0;
left: 0;
width: 240px;
width: 400px;
height: 64px;
line-height: 64px;
background-color: #20222a;
background: linear-gradient(to right, #053B7F, #050F22);
font-size: 20px;
overflow: hidden;
box-sizing: border-box;
@ -65,8 +64,8 @@ export default {
&_title {
display: block;
text-align: center;
font-weight: 300;
font-size: 16px;
font-weight: bold;
font-size: x-large;
div {
display: flex;
align-items: center;
@ -86,4 +85,7 @@ export default {
color: #fff;
}
}
.avue-logo_title {
color: #ffffff
}
</style>

@ -1,19 +1,21 @@
<template>
<div class="avue-sidebar">
<div class="avue-sidebar" >
<logo></logo>
<el-scrollbar style="height:100%">
<div v-if="validatenull(menu)"
class="avue-sidebar--tip">{{$t('menuTip')}}</div>
<el-menu unique-opened
<!-- <div v-if="validatenull(menu)"-->
<!-- class="avue-sidebar&#45;&#45;tip">{{$t('menuTip')}}</div>-->
<el-menu v-show="!isHome"
unique-opened
:default-active="nowTagValue"
mode="vertical"
:show-timeout="200"
:collapse="keyCollapse">
<sidebar-item :menu="menu"
<sidebar-item :menu="menuData"
:screen="screen"
first
:props="website.menu.props"
:collapse="keyCollapse"></sidebar-item>
:collapse="keyCollapse"
:code="code"></sidebar-item>
</el-menu>
</el-scrollbar>
</div>
@ -27,9 +29,21 @@ export default {
name: "sidebar",
components: { sidebarItem, logo },
data() {
return {};
return {
code: null,
hideMenu: false,
menuData: [],
isHome: true
};
},
created() {
// this.menuData = this.code ? this.menu : this.someMethod('system');
let menuList = window.sessionStorage.getItem('daf-menuAll');
let code = 'system';
if (this.code) {
code = this.code;
}
this.menuData = this.findChildrenByCode(JSON.parse(menuList).content, code);
this.$store.dispatch("GetMenu").then(data => {
if (data.length === 0) return;
this.$router.$avueRouter.formatRoutes(data, true);
@ -42,7 +56,48 @@ export default {
}
},
mounted() {},
methods: {}
methods: {
someMethod(code) {
let sidebar = document.querySelector('.avue-left');
let mainContent = document.querySelector('.avue-main');
let newWidth = '240px';
sidebar.style.width = newWidth;
mainContent.style.width = `calc(100% - ${newWidth})`;
mainContent.style.left = newWidth;
mainContent.style.position = 'absolute';
this.isHome = false;
this.code = code;
if (code) {
let menuList = window.sessionStorage.getItem('daf-menuAll');
if (menuList) {
let children = this.findChildrenByCode(JSON.parse(menuList).content, code);
this.menuData = children;
}
} else {
let sidebar = document.querySelector('.avue-left');
let mainContent = document.querySelector('.avue-main');
let newWidth = '0px';
sidebar.style.width = newWidth;
mainContent.style.width = `calc(100% - ${newWidth})`;
mainContent.style.left = newWidth;
mainContent.style.position = 'unset';
this.isHome = true;
}
},
findChildrenByCode(data, targetCode) {
for (const item of data) {
if (item.code === targetCode) {
return item.children;
}
// children
const result = this.findChildrenByCode(item.children, targetCode);
if (result) {
return result;
}
}
return null; //
}
}
};
</script>
<style lang="scss" scoped>

@ -6,7 +6,7 @@
@click="open(item)"
:key="item[labelKey]"
:class="{'is-active':vaildAvtive(item)}">
<i :class="item[iconKey]"></i>
<i class="el-icon-star-off"></i>
<span slot="title"
:alt="item[pathKey]">{{generateTitle(item)}}</span>
</el-menu-item>
@ -14,7 +14,7 @@
:index="item[pathKey]"
:key="item[labelKey]">
<template slot="title">
<i :class="item[iconKey]"></i>
<i class="el-icon-menu"></i>
<span slot="title"
:class="{'el-menu--display':collapse && first}">{{generateTitle(item)}}</span>
</template>
@ -24,7 +24,7 @@
:class="{'is-active':vaildAvtive(child)}"
v-if="validatenull(child[childrenKey])"
:key="child[labelKey]">
<i :class="child[iconKey]"></i>
<i class="el-icon-star-off"></i>
<span slot="title">{{generateTitle(child)}}</span>
</el-menu-item>
<sidebar-item v-else
@ -46,7 +46,8 @@ export default {
name: "sidebarItem",
data() {
return {
config: config
config: config,
menuData: []
};
},
props: {
@ -68,9 +69,21 @@ export default {
},
collapse: {
type: Boolean
}
},
// code: {
// type: String
// },
},
created() {},
watch: {
// code(newCode, oldCode) {
// let menuList = this.menu;
// let children = this.findChildrenByCode(menuList, newCode);
// // alert("sidebar-"+ newCode + "" + JSON.stringify(children));
// this.menuData = children;
// this.updateCurrMenu(children);
// }
},
mounted() {},
computed: {
...mapGetters(["roles"]),
@ -111,6 +124,7 @@ export default {
return validatenull(val);
},
open(item) {
let menuData = this.menu;
if (this.screen <= 1) this.$store.commit("SET_COLLAPSE");
this.$router.$avueRouter.group = item.group;
this.$router.$avueRouter.meta = item.meta;
@ -122,7 +136,13 @@ export default {
}),
query: item.query
});
}
this.$nextTick(() => {
this.updateCurrMenu(menuData);
})
},
updateCurrMenu(data) {
this.menu = data;
},
}
};
</script>

@ -25,17 +25,17 @@
</el-tab-pane>
</el-tabs>
<el-dropdown class="avue-tags__menu">
<el-button type="primary"
size="mini">
{{$t('tagsView.menu')}}
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="closeOthersTags">{{$t('tagsView.closeOthers')}}</el-dropdown-item>
<el-dropdown-item @click.native="closeAllTags">{{$t('tagsView.closeAll')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-dropdown class="avue-tags__menu">-->
<!-- <el-button type="primary"-->
<!-- size="mini">-->
<!-- {{$t('tagsView.menu')}}-->
<!-- <i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
<!-- </el-button>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item @click.native="closeOthersTags">{{$t('tagsView.closeOthers')}}</el-dropdown-item>-->
<!-- <el-dropdown-item @click.native="closeAllTags">{{$t('tagsView.closeAll')}}</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
</div>
</div>

@ -0,0 +1,107 @@
<template>
<div class="my-menu">
<el-row>
<el-col :span="2" v-for="(item, index) in data" :key="index">
<center>
<el-link
:underline="false"
@click="toggleUnderline(index, item.path)"
style="margin-top: 10px;font-weight: bold;"
:class="{ 'link-underline': item.isUnderlined }"
>
{{ item.name }}
</el-link>
</center>
</el-col>
</el-row>
</div>
</template>
<script>
import { mapGetters } from "vuex";
export default {
props: {
switchMenu: {
type: Function,
required: true,
}
},
data() {
return {
data: [
// {name: '', isUnderlined: true, path: "/wel/index"},
// {name: '', isUnderlined: false, code: "leger"},
// {name: '', isUnderlined: false, code: "inspection"},
// {name: '', isUnderlined: false, code: "smart"},
// {name: '', isUnderlined: false, code: "spares"},
// {name: '', isUnderlined: false, code: "workorder"},
// {name: '', isUnderlined: false, code: "release"}
]
};
},
computed: {
...mapGetters(["menu"]),
},
created() {
setTimeout(() => {
let menuList = window.sessionStorage.getItem('daf-menuAll');
this.data.push({name: '首页', isUnderlined: true, path: "/wel/index"});
if (menuList) {
for (var index = 0; index < JSON.parse(menuList).content.length; index++) {
this.data.push({
name: JSON.parse(menuList).content[index].name,
code: JSON.parse(menuList).content[index].code,
isUnderlined: false
})
}
}
}, 500);
},
watch: {
},
methods: {
toggleUnderline(index) {
this.data.forEach(item => {
item.isUnderlined = false;
});
this.data[index].isUnderlined = true;
if (this.data[index].path) {
if (this.data[index].path) {
this.$router.push({path: this.data[index].path});
}
}
this.goSwitchMenu(this.data[index].code);
},
goSwitchMenu(code) {
this.switchMenu(code);
}
},
};
</script>
<style>
.my-menu {
left: 20px;
position: relative;
width: 1100px;
height: 40px;
z-index: 1028;
}
.my-menu .el-link.el-link--default {
color: #FFFFFF;
}
.link-underline {
font-weight: bold;
color: #FFFFFF !important;
}
.link-underline::after {
content: '';
position: absolute;
left: 0;
bottom: -5px;
width: 100%;
height: 2px;
background-color: #FFFFFF;
}
</style>

@ -4,71 +4,14 @@
<div class="avue-breadcrumb"
:class="[{ 'avue-breadcrumb--active': isCollapse }]"
v-if="showCollapse">
<i class="icon-navicon"
@click="setCollapse"></i>
</div>
</div>
<div class="top-bar__title">
<div class="top-bar__item top-bar__item--show"
v-if="showMenu">
<top-menu></top-menu>
</div>
<span class="top-bar__item"
v-if="showSearch">
<top-search></top-search>
<span class="top-bar__item">
<top-navigation></top-navigation>
</span>
</div>
<div class="top-bar__right">
<el-tooltip v-if="showColor"
effect="dark"
:content="$t('navbar.color')"
placement="bottom">
<div class="top-bar__item">
<top-color></top-color>
</div>
</el-tooltip>
<el-tooltip v-if="showDebug"
effect="dark"
:content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')"
placement="bottom">
<div class="top-bar__item">
<top-logs></top-logs>
</div>
</el-tooltip>
<el-tooltip v-if="showLock"
effect="dark"
:content="$t('navbar.lock')"
placement="bottom">
<div class="top-bar__item">
<top-lock></top-lock>
</div>
</el-tooltip>
<el-tooltip v-if="showTheme"
effect="dark"
:content="$t('navbar.theme')"
placement="bottom">
<div class="top-bar__item top-bar__item--show">
<top-theme></top-theme>
</div>
</el-tooltip>
<el-tooltip effect="dark"
:content="$t('navbar.language')"
placement="bottom">
<div class="top-bar__item top-bar__item--show">
<top-lang></top-lang>
</div>
</el-tooltip>
<el-tooltip v-if="showFullScren"
effect="dark"
:content="isFullScren?$t('navbar.screenfullF'):$t('navbar.screenfull')"
placement="bottom">
<div class="top-bar__item">
<i :class="isFullScren?'icon-tuichuquanping':'icon-quanping'"
@click="handleScreen"></i>
</div>
</el-tooltip>
<!-- <img class="top-bar__img" :src="userInfo.avatar">-->
<img class="top-bar__img" src="favicon.ico">
<el-dropdown>
<span class="el-dropdown-link">
{{userInfo.userName}}
@ -78,14 +21,18 @@
<el-dropdown-item>
<router-link to="/">{{$t('navbar.dashboard')}}</router-link>
</el-dropdown-item>
<el-dropdown-item>
<router-link to="/info/index">{{$t('navbar.userinfo')}}</router-link>
</el-dropdown-item>
<!-- <el-dropdown-item>-->
<!-- <router-link to="/info/index">{{$t('navbar.userinfo')}}</router-link>-->
<!-- </el-dropdown-item>-->
<el-dropdown-item @click.native="logout"
divided>{{$t('navbar.logOut')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="el-time-plus">
<i class="el-icon-s-home" style="font-size: initial;margin: 5px;" @click="goHomePage"></i>
<span>{{time}}</span>
</div>
</div>
</template>
<script>
@ -94,10 +41,12 @@ import { fullscreenToggel, listenfullscreen } from "@/util/util";
import topLock from "./top-lock";
import topMenu from "./top-menu";
import topSearch from "./top-search";
import topNavigation from "./top-navigation";
import topTheme from "./top-theme";
import topLogs from "./top-logs";
import topColor from "./top-color";
import topLang from "./top-lang";
import { dateFormat } from "@/util/date";
export default {
components: {
topLock,
@ -106,14 +55,19 @@ export default {
topTheme,
topLogs,
topColor,
topLang
topLang,
topNavigation
},
name: "top",
data() {
return {};
return {
time: ""
};
},
filters: {},
created() {},
created() {
this.getTime();
},
mounted() {
listenfullscreen(this.setScreen);
},
@ -159,10 +113,54 @@ export default {
this.$router.push({ path: "/login" });
});
});
},
getTime() {
setInterval(() => {
this.time = dateFormat(new Date());
}, 1000);
},
goHomePage() {
this.$router.push({path: "/wel/index"});
}
}
};
</script>
<style lang="scss" scoped>
.my-autocomplete {
li {
line-height: normal;
padding: 7px;
.icon {
margin-right: 5px;
display: inline-block;
vertical-align: middle;
}
.name {
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
vertical-align: middle;
}
.addr {
padding-top: 5px;
width: 100%;
font-size: 12px;
color: #b4b4b4;
}
.highlighted .addr {
color: #ddd;
}
}
}
.el-dropdown {
color: #ffffff;
}
.el-time-plus {
margin-top: -10px;
color: rgb(255, 255, 255);
font-size: xx-small;
float: right;
}
</style>

@ -0,0 +1,79 @@
<template>
<div>
<div class="my-navigation">
<el-row >
<el-col :span="2" v-for="(item, index) in data" :key="index">
<el-link
:underline="false"
@click="toggleUnderline(index)"
:class="{ 'link-underline': item.isUnderlined }"
>
{{ item.name }}
</el-link>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
export default {
data() {
return {
time: "",
data: [
{name: '运行监视', isUnderlined: false},
{name: '综合报警', isUnderlined: false},
{name: '多能分析', isUnderlined: false},
{name: '智能巡视', isUnderlined: false},
{name: '数字李生', isUnderlined: false},
{name: '双碳管理', isUnderlined: false},
{name: '视频监控', isUnderlined: false},
{name: '报表管理', isUnderlined: false},
{name: '智慧交易', isUnderlined: false},
{name: '智慧运维', isUnderlined: true},
{name: '智能安防', isUnderlined: false}
]
};
},
computed: {
},
created() {
},
methods: {
toggleUnderline(index) {
this.data.forEach(item => {
item.isUnderlined = false;
});
this.data[index].isUnderlined = !this.data[index].isUnderlined;
}
},
};
</script>
<style>
.my-navigation {
margin-top: 27px;
left: 140px;
position: relative;
width: 850px;
}
.my-navigation .el-link.el-link--default {
color: #BEC1D9;
}
.link-underline {
font-weight: bold;
color: #FFFFFF !important;
}
.link-underline::after {
content: '';
position: absolute;
left: 0;
bottom: -5px;
width: 100%;
height: 2px;
background-color: #FFFFFF;
}
</style>

@ -16,6 +16,7 @@
}
.el-menu {
width: 240px;
border-right: none !important;
}

@ -10,7 +10,7 @@
.avue-contail {
width: 100%;
height: 100%;
background: #f0f2f5;
background: #050F23;
background-size: 100%;
background-repeat: no-repeat;
}
@ -20,7 +20,7 @@
position: fixed;
left: 0;
top: 0;
width: 240px;
width: 0px;
height: 100%;
z-index: 1025;
}
@ -46,17 +46,31 @@
box-sizing: border-box;
}
//.avue-main {
// position: absolute;
// left: 240px;
// padding: 0;
// padding-bottom: 20px;
// width: calc(100% - 240px);
// height: calc(100% - 70px);
// box-sizing: border-box;
// overflow: hidden;
//}
.avue-main {
position: absolute;
left: 240px;
position: unset;
left: 0px;
padding: 0;
padding-bottom: 20px;
width: calc(100% - 240px);
width: 100%;
height: calc(100% - 70px);
box-sizing: border-box;
overflow: hidden;
}
.el-card__body {
background-color: aliceblue;
}
.avue-view {
padding-bottom: 22px;
width: 100%;

@ -33,12 +33,12 @@
}
.avue-sidebar {
margin-top: 100px;
user-select: none;
position: relative;
padding-top: 60px;
height: 100%;
position: relative;
background-color: #20222a;
background-color: #09172b;
transition: width .2s;
box-sizing: border-box;
box-shadow: 2px 0 6px rgba(0,21,41,.35);

@ -7,8 +7,8 @@
margin-bottom: 10px;
box-sizing: border-box;
overflow: hidden;
border-top: 1px solid #f6f6f6;
background-color: #fff;
//border-top: 1px solid #f6f6f6;
background-color: #050F23;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
.el-tabs--card>.el-tabs__header {
margin: 0;
@ -90,3 +90,20 @@
box-sizing: border-box;
}
}
.avue-tags .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
color: #ffffff;
//border-bottom: 3px solid #ffffff00;
background-color: #064291;
border: 1px solid #ffff;
border-radius: 4px;
}
.avue-tags .el-tabs--card > .el-tabs__header .el-tabs__item {
line-height: 27px;
height: 30px;
}
.el-tabs__nav-scroll {
margin-top: 12px;
}

@ -1,4 +1,5 @@
.avue-top {
background: linear-gradient(to right, #0C1C3B, #050F22);
padding: 0 20px;
position: relative;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
@ -34,7 +35,7 @@
.top-search {
line-height: 64px;
position: absolute !important;
left: 20px;
left: 120px;
top:0;
width: 400px !important;
.el-input__inner {

@ -197,13 +197,6 @@
{
label: "维护作业类型",
prop: "maintenanceTaskType",
search: true,
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=maintenance_job_type",
props: {
label: "dictValue",
value: "dictKey"
},
span: 8
},
{
@ -314,12 +307,6 @@
{
label: "工单完成",
prop: "handlingResult",
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=workorder_process_res",
props: {
label: "dictValue",
value: "dictKey"
},
},
{
label: "审核状态",

@ -218,14 +218,12 @@
}]
}, {
label: "维护作业类型",
type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=maintenance_job_type",
props: {
label: "dictValue",
value: "dictKey"
},
prop: "maintenanceTaskType",
span: 8
type: 'textarea',
minRows: 1,
maxRows: 3,
span: 8,
maxlength: 400
}, {
label: "用户状态",
prop: "userStatus",
@ -281,13 +279,11 @@
}, {
label: "处理结果",
prop: "handlingResult",
type: "select",
type: 'textarea',
minRows: 1,
maxRows: 3,
span: 8,
dicUrl: "/api/daf-system/dict/dictionary?code=workorder_process_res",
props: {
label: "dictValue",
value: "dictKey"
},
maxlength: 400
},
]

Loading…
Cancel
Save