Merge branch 'huyt' of http://ufidahz.com.cn:9015/root/middleground_code_v2 into huyt
This commit is contained in:
commit
ee50442c66
|
@ -134,6 +134,12 @@ export default {
|
||||||
icon: "el-icon-data-line",
|
icon: "el-icon-data-line",
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "业务中心",
|
||||||
|
path: "/businessCenter",
|
||||||
|
icon: "el-icon-postcard",
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,33 +5,33 @@
|
||||||
:style="{ '--current-color': theme }"
|
:style="{ '--current-color': theme }"
|
||||||
>
|
>
|
||||||
<div class="newVersionSystem">
|
<div class="newVersionSystem">
|
||||||
<new-menu class="newMenuWidth" />
|
<new-menu class="newMenuWidth" :class="{'closeWidth':$route.path.includes('settingMenu')}"/>
|
||||||
<div class="newMenuAppMain">
|
<div class="newMenuAppMain">
|
||||||
<tags-view v-if="showTagsView" />
|
<tags-view v-if="showTagsView"/>
|
||||||
<app-main />
|
<app-main/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import router from "@/router";
|
import router from '@/router'
|
||||||
import RightPanel from "@/components/RightPanel";
|
import RightPanel from '@/components/RightPanel'
|
||||||
import notFound from "@/views/error/404";
|
import notFound from '@/views/error/404'
|
||||||
import {
|
import {
|
||||||
AppMain,
|
AppMain,
|
||||||
Navbar,
|
Navbar,
|
||||||
Settings,
|
Settings,
|
||||||
Sidebar,
|
Sidebar,
|
||||||
TagsView,
|
TagsView,
|
||||||
NewMenu,
|
NewMenu
|
||||||
} from "./components";
|
} from './components'
|
||||||
import ResizeMixin from "./mixin/ResizeHandler";
|
import ResizeMixin from './mixin/ResizeHandler'
|
||||||
import { mapState } from "vuex";
|
import { mapState } from 'vuex'
|
||||||
import variables from "@/assets/styles/variables.scss";
|
import variables from '@/assets/styles/variables.scss'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Layout",
|
name: 'Layout',
|
||||||
components: {
|
components: {
|
||||||
AppMain,
|
AppMain,
|
||||||
Navbar,
|
Navbar,
|
||||||
|
@ -40,7 +40,7 @@ export default {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
TagsView,
|
TagsView,
|
||||||
NewMenu,
|
NewMenu,
|
||||||
notFound,
|
notFound
|
||||||
},
|
},
|
||||||
mixins: [ResizeMixin],
|
mixins: [ResizeMixin],
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -53,34 +53,34 @@ export default {
|
||||||
conciseMenu: (state) => state.settings.conciseMenu,
|
conciseMenu: (state) => state.settings.conciseMenu,
|
||||||
needTagsView: (state) => state.settings.tagsView,
|
needTagsView: (state) => state.settings.tagsView,
|
||||||
showTagsView: (state) => state.settings.showTagsView,
|
showTagsView: (state) => state.settings.showTagsView,
|
||||||
fixedHeader: (state) => state.settings.fixedHeader,
|
fixedHeader: (state) => state.settings.fixedHeader
|
||||||
}),
|
}),
|
||||||
classObj() {
|
classObj() {
|
||||||
return {
|
return {
|
||||||
// hideSidebar: !this.sidebar.opened,
|
// hideSidebar: !this.sidebar.opened,
|
||||||
openSidebar: this.sidebar.opened,
|
openSidebar: this.sidebar.opened,
|
||||||
withoutAnimation: this.sidebar.withoutAnimation,
|
withoutAnimation: this.sidebar.withoutAnimation,
|
||||||
mobile: this.device === "mobile",
|
mobile: this.device === 'mobile'
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
variables() {
|
variables() {
|
||||||
return variables;
|
return variables
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
childrenType: false,
|
childrenType: false,
|
||||||
childrenWidth: "1200px",
|
childrenWidth: '1200px'
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
this.$store.dispatch("app/closeSideBar", {
|
this.$store.dispatch('app/closeSideBar', {
|
||||||
withoutAnimation: false,
|
withoutAnimation: false
|
||||||
});
|
})
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -94,25 +94,37 @@ export default {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// padding: 0 8px;
|
// padding: 0 8px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
|
|
||||||
&.mobile.openSidebar {
|
&.mobile.openSidebar {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.newVersionSystem {
|
.newVersionSystem {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.newMenuWidth {
|
.newMenuWidth {
|
||||||
width: 114px;
|
width: 114px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
transition: all .3s;
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.closeWidth {
|
||||||
|
width: 0px !important;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.newMenuAppMain {
|
.newMenuAppMain {
|
||||||
width: calc(100% - 114px);
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer-bg {
|
.drawer-bg {
|
||||||
background: #000;
|
background: #000;
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
|
@ -122,18 +134,21 @@ export default {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.defaultMuneStyle {
|
.defaultMuneStyle {
|
||||||
width: calc(100% - 160px);
|
width: calc(100% - 160px);
|
||||||
margin-left: 160px;
|
margin-left: 160px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// padding:10px;
|
// padding:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.conciseMenuStyle {
|
.conciseMenuStyle {
|
||||||
width: calc(100% - 70px);
|
width: calc(100% - 70px);
|
||||||
margin-left: 70px;
|
margin-left: 70px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-header {
|
.fixed-header {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -154,6 +169,7 @@ export default {
|
||||||
.mobile .fixed-header {
|
.mobile .fixed-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.webConcat {
|
.webConcat {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 50px;
|
top: 50px;
|
||||||
|
|
|
@ -145,6 +145,15 @@ export const constantRoutes = [{
|
||||||
title: "集成任务",
|
title: "集成任务",
|
||||||
icon: "dashboard",
|
icon: "dashboard",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "businessCenter",
|
||||||
|
component: () => import("@/views/newVersionView/businessCenter/index"),
|
||||||
|
name: "businessCenter",
|
||||||
|
meta: {
|
||||||
|
title: "业务中心",
|
||||||
|
icon: "dashboard",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,172 @@
|
||||||
|
/**
|
||||||
|
desc 应用管理
|
||||||
|
*/
|
||||||
|
<template>
|
||||||
|
<div class="workbench">
|
||||||
|
<h3 class="workbench-title">全部应用</h3>
|
||||||
|
<el-tabs>
|
||||||
|
<el-tab-pane
|
||||||
|
v-for="(item, index) in routeData"
|
||||||
|
:key="index"
|
||||||
|
:label="item.meta ? item.meta.title : ''"
|
||||||
|
v-if="item.meta"
|
||||||
|
>
|
||||||
|
<div class="menuContainer">
|
||||||
|
<div
|
||||||
|
v-for="(list, listIndex) in item.children"
|
||||||
|
class="menuBox"
|
||||||
|
@click="goRoute(item, list)"
|
||||||
|
v-if="!list.meta.hidden"
|
||||||
|
>
|
||||||
|
<img class="menuIcon" :src="list.meta.icon" v-if="list.meta.icon" />
|
||||||
|
<img class="menuIcon" src="../logo1.png" v-else />
|
||||||
|
<p class="menuContent">{{ list.meta.title }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { TagsView } from "@/layout/components";
|
||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ApplicationCenter",
|
||||||
|
components: {
|
||||||
|
TagsView,
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$store.dispatch("settings/changeSetting", {
|
||||||
|
key: "showTagsView",
|
||||||
|
value: true,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
routeData: [], //菜单数据
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let routeList = localStorage.getItem("routeList")
|
||||||
|
? JSON.parse(localStorage.getItem("routeList"))
|
||||||
|
: [];
|
||||||
|
this.routeData = this.OrganizeMenus(routeList);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goRoute(val, item) {
|
||||||
|
let routeData = this.$router.resolve({
|
||||||
|
path: item.path,
|
||||||
|
name: item.name,
|
||||||
|
query: { mdmCode: item.meta.mdmCode, viewType: item.meta.viewType },
|
||||||
|
});
|
||||||
|
window.open(routeData.href, "_self");
|
||||||
|
},
|
||||||
|
// 处理icon
|
||||||
|
handlerIcon(item) {
|
||||||
|
let str = "";
|
||||||
|
if (item.includes("?")) {
|
||||||
|
str = item.split("?")[1];
|
||||||
|
} else {
|
||||||
|
str = item;
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
},
|
||||||
|
handlerIconColor(item) {
|
||||||
|
let color = "";
|
||||||
|
if (item.includes("?")) {
|
||||||
|
color = item.split("?")[0];
|
||||||
|
} else {
|
||||||
|
color = "#1478F6";
|
||||||
|
}
|
||||||
|
return color;
|
||||||
|
},
|
||||||
|
// 整理菜单数据
|
||||||
|
OrganizeMenus(data) {
|
||||||
|
let arrData = [];
|
||||||
|
// 业务中心
|
||||||
|
let arrID = ["67f82a6e7f664c5a89b7fc7b8fc817b0"];
|
||||||
|
arrID.forEach((a) => {
|
||||||
|
data.forEach((b) => {
|
||||||
|
if (a === b.id) {
|
||||||
|
arrData.push(b);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
arrData.forEach((bItem) => {
|
||||||
|
if (bItem.children && bItem.children.length > 0) {
|
||||||
|
bItem.children.forEach((cItem) => {
|
||||||
|
if (cItem.meta.icon) {
|
||||||
|
this.getLogoUrl(cItem.meta.icon).then((res) => {
|
||||||
|
let imageUrl =
|
||||||
|
"data:image/png/jpg;base64," +
|
||||||
|
btoa(
|
||||||
|
new Uint8Array(res).reduce(
|
||||||
|
(el, byte) => el + String.fromCharCode(byte),
|
||||||
|
""
|
||||||
|
)
|
||||||
|
);
|
||||||
|
this.$set(cItem.meta, "icon", imageUrl);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return arrData;
|
||||||
|
},
|
||||||
|
getLogoUrl(id) {
|
||||||
|
return request({
|
||||||
|
url:
|
||||||
|
"/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + id,
|
||||||
|
method: "get",
|
||||||
|
responseType: "arraybuffer",
|
||||||
|
}).then((res) => {
|
||||||
|
return res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.workbench {
|
||||||
|
background: #fff;
|
||||||
|
padding: 15px;
|
||||||
|
//margin: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workbench-title {
|
||||||
|
margin: 15px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuContainer {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #fafafa;
|
||||||
|
padding: 10px 15px;
|
||||||
|
border-radius: 10px;
|
||||||
|
width: 200px;
|
||||||
|
margin: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuIcon {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
line-height: 36px;
|
||||||
|
border-radius: 12px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuContent {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -101,11 +101,11 @@ export default {
|
||||||
type: '7'
|
type: '7'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '采购订单',//原来叫银行账户
|
name: '采购类型',//原来叫银行账户
|
||||||
type: '8'
|
type: '8'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '销售订单',//原来叫资产类别
|
name: '销售类型',//原来叫资产类别
|
||||||
type: '9'
|
type: '9'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue