增加主数据中心、应用管理、集成任务模块

This commit is contained in:
曹瑞 2024-08-28 12:19:44 +08:00
parent 9b288bab59
commit bdd67aecc0
6 changed files with 577 additions and 6 deletions

View File

@ -115,6 +115,26 @@ export default {
show: true,
},
],
permissionsMenu: [
{
title: "主数据中心",
path: "/MasterDataCenter",
icon: "el-icon-coin",
show: false,
},
{
title: "应用管理",
path: "/ApplicationCenter",
icon: "el-icon-menu",
show: false,
},
{
title: "集成任务",
path: "/IntegrationTaskCenter",
icon: "el-icon-data-line",
show: false,
},
],
};
},
created() {
@ -157,10 +177,18 @@ export default {
}
return type;
},
// 线
//
DetermineMenuPermission() {
this.menuData = [];
this.menuData = [...this.fixedMenu];
let routeList = localStorage.getItem("routeList")
? localStorage.getItem("routeList")
: null;
this.permissionsMenu.forEach((aItem) => {
if (routeList != null && routeList.includes(aItem.title)) {
aItem.show = true;
}
});
this.menuData = [...this.fixedMenu, ...this.permissionsMenu];
},
//
jumpRoute(item) {
@ -406,7 +434,6 @@ export default {
background: #1478f6;
color: #ffffff;
text-align: center;
}
}
}

View File

@ -104,7 +104,8 @@ export const constantRoutes = [{
icon: 'dashboard'
// affix: true,
}
},{
},
{
path: "Workbench",
component: () => import("@/views/newVersionView/Workbench/index"),
name: "Workbench",
@ -113,6 +114,33 @@ export const constantRoutes = [{
icon: "dashboard",
},
},
{
path: "MasterDataCenter",
component: () => import("@/views/newVersionView/MasterDataCenter/index"),
name: "MasterDataCenter",
meta: {
title: "主数据中心",
icon: "dashboard",
},
},
{
path: "ApplicationCenter",
component: () => import("@/views/newVersionView/ApplicationCenter/index"),
name: "ApplicationCenter",
meta: {
title: "应用管理",
icon: "dashboard",
},
},
{
path: "IntegrationTaskCenter",
component: () => import("@/views/newVersionView/IntegrationTaskCenter/index"),
name: "IntegrationTaskCenter",
meta: {
title: "集成任务",
icon: "dashboard",
},
},
]
},
{

View File

@ -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 = ["51928849267a463799cc4a336a6bee71"];
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>

View File

@ -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 = ["5f1182ffd4c1451291a211c4a820fb6b"];
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>

View File

@ -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: "MasterDataCenter",
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 = ["973fa79b42e64c9e968e9a5b1295c486"];
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>

View File

@ -40,9 +40,9 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://hzya.ufyct.com:9067/`,
// target: `http://ufidahz.com.cn:9067/`,
target: `http://ufidahz.com.cn:9067/`,
// target: `http://127.0.0.1:9081/`,
target: `http://192.168.2.78:9999`,
// target: `http://192.168.2.78:9999`,
// target: `http://192.168.2.85:9999`,
// target: `http://192.168.2.78:8080`,
// target: `http://192.168.2.78:9999`,