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",
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
title: "业务中心",
|
||||
path: "/businessCenter",
|
||||
icon: "el-icon-postcard",
|
||||
show: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
|
|
|
@ -5,33 +5,33 @@
|
|||
:style="{ '--current-color': theme }"
|
||||
>
|
||||
<div class="newVersionSystem">
|
||||
<new-menu class="newMenuWidth" />
|
||||
<new-menu class="newMenuWidth" :class="{'closeWidth':$route.path.includes('settingMenu')}"/>
|
||||
<div class="newMenuAppMain">
|
||||
<tags-view v-if="showTagsView" />
|
||||
<app-main />
|
||||
<tags-view v-if="showTagsView"/>
|
||||
<app-main/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import router from "@/router";
|
||||
import RightPanel from "@/components/RightPanel";
|
||||
import notFound from "@/views/error/404";
|
||||
import router from '@/router'
|
||||
import RightPanel from '@/components/RightPanel'
|
||||
import notFound from '@/views/error/404'
|
||||
import {
|
||||
AppMain,
|
||||
Navbar,
|
||||
Settings,
|
||||
Sidebar,
|
||||
TagsView,
|
||||
NewMenu,
|
||||
} from "./components";
|
||||
import ResizeMixin from "./mixin/ResizeHandler";
|
||||
import { mapState } from "vuex";
|
||||
import variables from "@/assets/styles/variables.scss";
|
||||
NewMenu
|
||||
} from './components'
|
||||
import ResizeMixin from './mixin/ResizeHandler'
|
||||
import { mapState } from 'vuex'
|
||||
import variables from '@/assets/styles/variables.scss'
|
||||
|
||||
export default {
|
||||
name: "Layout",
|
||||
name: 'Layout',
|
||||
components: {
|
||||
AppMain,
|
||||
Navbar,
|
||||
|
@ -40,7 +40,7 @@ export default {
|
|||
Sidebar,
|
||||
TagsView,
|
||||
NewMenu,
|
||||
notFound,
|
||||
notFound
|
||||
},
|
||||
mixins: [ResizeMixin],
|
||||
computed: {
|
||||
|
@ -53,34 +53,34 @@ export default {
|
|||
conciseMenu: (state) => state.settings.conciseMenu,
|
||||
needTagsView: (state) => state.settings.tagsView,
|
||||
showTagsView: (state) => state.settings.showTagsView,
|
||||
fixedHeader: (state) => state.settings.fixedHeader,
|
||||
fixedHeader: (state) => state.settings.fixedHeader
|
||||
}),
|
||||
classObj() {
|
||||
return {
|
||||
// hideSidebar: !this.sidebar.opened,
|
||||
openSidebar: this.sidebar.opened,
|
||||
withoutAnimation: this.sidebar.withoutAnimation,
|
||||
mobile: this.device === "mobile",
|
||||
};
|
||||
mobile: this.device === 'mobile'
|
||||
}
|
||||
},
|
||||
variables() {
|
||||
return variables;
|
||||
},
|
||||
return variables
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
childrenType: false,
|
||||
childrenWidth: "1200px",
|
||||
};
|
||||
childrenWidth: '1200px'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClickOutside() {
|
||||
this.$store.dispatch("app/closeSideBar", {
|
||||
withoutAnimation: false,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
this.$store.dispatch('app/closeSideBar', {
|
||||
withoutAnimation: false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -94,25 +94,37 @@ export default {
|
|||
width: 100%;
|
||||
// padding: 0 8px;
|
||||
background: #ffffff;
|
||||
|
||||
&.mobile.openSidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.newVersionSystem {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.newMenuWidth {
|
||||
width: 114px;
|
||||
background-color: #fff;
|
||||
transition: all .3s;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.closeWidth {
|
||||
width: 0px !important;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.newMenuAppMain {
|
||||
width: calc(100% - 114px);
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.drawer-bg {
|
||||
background: #000;
|
||||
opacity: 0.3;
|
||||
|
@ -122,18 +134,21 @@ export default {
|
|||
position: absolute;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.defaultMuneStyle {
|
||||
width: calc(100% - 160px);
|
||||
margin-left: 160px;
|
||||
height: 100%;
|
||||
// padding:10px;
|
||||
}
|
||||
|
||||
.conciseMenuStyle {
|
||||
width: calc(100% - 70px);
|
||||
margin-left: 70px;
|
||||
padding: 10px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.fixed-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
@ -154,6 +169,7 @@ export default {
|
|||
.mobile .fixed-header {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.webConcat {
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
|
|
|
@ -145,6 +145,15 @@ export const constantRoutes = [{
|
|||
title: "集成任务",
|
||||
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'
|
||||
},
|
||||
{
|
||||
name: '采购订单',//原来叫银行账户
|
||||
name: '采购类型',//原来叫银行账户
|
||||
type: '8'
|
||||
},
|
||||
{
|
||||
name: '销售订单',//原来叫资产类别
|
||||
name: '销售类型',//原来叫资产类别
|
||||
type: '9'
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue