Commit 9d030f39 authored by 张俊's avatar 张俊

Merge branch 'dev' of https://cloud.wodcloud.com/git/apaas/apaas-v3-ui into dev

parents 993f0a2b c5d39f66
...@@ -574,7 +574,7 @@ border-radius:8px; ...@@ -574,7 +574,7 @@ border-radius:8px;
.apaas_button .el-button--warning { .apaas_button .el-button--warning {
background-color: #e56600; background-color: #e56600;
border-color: #e56600; border-color: #e56600;
color: #fff; color: #fcefd6;
} }
.apaas_button .el-button.is-disabled, .apaas_button .el-button.is-disabled,
.apaas_button .el-button.is-disabled:focus, .apaas_button .el-button.is-disabled:focus,
......
src/assets/imgs/ic_xitong.png

1.12 KB | W: | H:

src/assets/imgs/ic_xitong.png

1.76 KB | W: | H:

src/assets/imgs/ic_xitong.png
src/assets/imgs/ic_xitong.png
src/assets/imgs/ic_xitong.png
src/assets/imgs/ic_xitong.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -101,11 +101,17 @@ export default { ...@@ -101,11 +101,17 @@ export default {
margin-right: 18px; margin-right: 18px;
cursor: pointer; cursor: pointer;
} }
.app_card > .app_card-icon .el-avatar--square {
border: 3px solid #f6f7fb;
border-radius: 8px;
overflow: hidden;
}
.app_card > .app_card-info { .app_card > .app_card-info {
width: calc(100% - 56px - 20px); width: calc(100% - 56px - 20px);
} }
.app_card-info > .app_card-name { .app_card-info > .app_card-name {
font-size: 18px; font-size: 18px;
font-weight: 600;
line-height: 32px; line-height: 32px;
color: #0d1847; color: #0d1847;
cursor: pointer; cursor: pointer;
......
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
border-left: 5px solid #0d1847; border-left: 5px solid #0d1847;
font-size: 14px; font-size: 14px;
line-height: 24px; line-height: 24px;
color: #e6ebfe; color: #6573ae;
cursor: pointer; cursor: pointer;
} }
.side_nav_bar_list > li:hover, .side_nav_bar_list > li:hover,
......
...@@ -20,21 +20,21 @@ ...@@ -20,21 +20,21 @@
</div> </div>
<p class="organization_card-text"> <p class="organization_card-text">
<span> <span>
<i class="el-icon-setting"></i> <img src="../../assets/imgs/ic_xitong.png" />
<span>业务系统数</span> <span>业务系统数</span>
</span> </span>
<span class="text_clip" v-text="data.systemUser"></span> <span class="text_clip" v-text="data.systemUser"></span>
</p> </p>
<p class="organization_card-text"> <p class="organization_card-text">
<span> <span>
<i class="el-icon-user"></i> <img src="../../assets/imgs/ic_guanliyuan.png" />
<span>组织管理员</span> <span>组织管理员</span>
</span> </span>
<span class="text_clip" v-text="data.orgAdmin"></span> <span class="text_clip" v-text="data.orgAdmin"></span>
</p> </p>
<p class="organization_card-text"> <p class="organization_card-text">
<span> <span>
<i class="el-icon-time"></i> <img src="../../assets/imgs/icon_shijian.png" />
<span>创建时间</span> <span>创建时间</span>
</span> </span>
<span class="text_clip" v-text="data.create_date"></span> <span class="text_clip" v-text="data.create_date"></span>
...@@ -102,11 +102,17 @@ export default { ...@@ -102,11 +102,17 @@ export default {
margin-right: 18px; margin-right: 18px;
cursor: pointer; cursor: pointer;
} }
.organization_card > .organization_card-icon .el-avatar--square {
border: 3px solid #f6f7fb;
border-radius: 8px;
overflow: hidden;
}
.organization_card > .organization_card-info { .organization_card > .organization_card-info {
width: calc(100% - 56px - 20px); width: calc(100% - 56px - 20px);
} }
.organization_card-info > .organization_card-name { .organization_card-info > .organization_card-name {
font-size: 18px; font-size: 18px;
font-weight: 600;
line-height: 32px; line-height: 32px;
color: #0d1847; color: #0d1847;
cursor: pointer; cursor: pointer;
...@@ -129,6 +135,12 @@ export default { ...@@ -129,6 +135,12 @@ export default {
.organization_card-text > span:nth-child(1) { .organization_card-text > span:nth-child(1) {
flex-shrink: 0; flex-shrink: 0;
color: #8890a7; color: #8890a7;
display: inline-flex;
justify-content: flex-start;
align-items: center;
}
.organization_card-text > span:nth-child(1) > img {
margin-right: 5px;
} }
</style> </style>
......
...@@ -214,6 +214,7 @@ export default { ...@@ -214,6 +214,7 @@ export default {
} }
.commodity_information > .btn_container > .el-button { .commodity_information > .btn_container > .el-button {
margin: 0 30px 15px 0; margin: 0 30px 15px 0;
border-width: 2px;
} }
.commodity_action { .commodity_action {
margin-top: 50px; margin-top: 50px;
...@@ -222,6 +223,7 @@ export default { ...@@ -222,6 +223,7 @@ export default {
.commodity_action > .el-button { .commodity_action > .el-button {
width: 220px; width: 220px;
margin-left: 20px; margin-left: 20px;
font-size: 16px;
} }
</style> </style>
...@@ -231,4 +233,23 @@ export default { ...@@ -231,4 +233,23 @@ export default {
background-color: #515fe7; background-color: #515fe7;
border-color: #515fe7; border-color: #515fe7;
} }
.application_info .el-input-number .el-input-number__decrease {
top: 2px;
left: 2px;
width: 38px;
line-height: 36px;
border-radius: 8px 0 0 8px;
border-right-width: 2px;
}
.application_info .el-input-number .el-input-number__increase {
top: 2px;
right: 2px;
width: 38px;
line-height: 36px;
border-radius: 0 8px 8px 0;
border-left-width: 2px;
}
.application_info .el-input-number .el-input__inner {
border-width: 2px;
}
</style> </style>
...@@ -386,6 +386,9 @@ export default { ...@@ -386,6 +386,9 @@ export default {
.commodity_information > .btn_container { .commodity_information > .btn_container {
margin-bottom: -15px; margin-bottom: -15px;
} }
.commodity_information > .btn_container > .el-button {
border-width: 2px;
}
.commodity_information > .btn_container > .el-button, .commodity_information > .btn_container > .el-button,
.commodity_information > .btn_container > .el-input-number { .commodity_information > .btn_container > .el-input-number {
margin: 0 20px 15px 0; margin: 0 20px 15px 0;
...@@ -397,6 +400,7 @@ export default { ...@@ -397,6 +400,7 @@ export default {
.commodity_action > .el-button { .commodity_action > .el-button {
width: 220px; width: 220px;
margin-left: 20px; margin-left: 20px;
font-size: 16px;
} }
</style> </style>
...@@ -406,4 +410,23 @@ export default { ...@@ -406,4 +410,23 @@ export default {
background-color: #515fe7; background-color: #515fe7;
border-color: #515fe7; border-color: #515fe7;
} }
.service_info .el-input-number .el-input-number__decrease {
top: 2px;
left: 2px;
width: 38px;
line-height: 36px;
border-radius: 8px 0 0 8px;
border-right-width: 2px;
}
.service_info .el-input-number .el-input-number__increase {
top: 2px;
right: 2px;
width: 38px;
line-height: 36px;
border-radius: 0 8px 8px 0;
border-left-width: 2px;
}
.service_info .el-input-number .el-input__inner {
border-width: 2px;
}
</style> </style>
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
border-left: 5px solid #0d1847; border-left: 5px solid #0d1847;
font-size: 14px; font-size: 14px;
line-height: 24px; line-height: 24px;
color: #e6ebfe; color: #6573ae;
cursor: pointer; cursor: pointer;
} }
.side_nav_bar_list > li:hover, .side_nav_bar_list > li:hover,
......
...@@ -35,16 +35,18 @@ ...@@ -35,16 +35,18 @@
onLineColor="#94a8c8" onLineColor="#94a8c8"
:origin="origin" :origin="origin"
> >
<template v-slot:node="{meta}"> <template v-slot:node="node">
<div <div
:class="{'flow-node-begin': nodeParams(meta.id).type == 1, 'flow-node-end': nodeParams(meta.id).type == 2, 'flow-node-default': nodeParams(meta.id).type == 3 && meta.id != nodeItem.id, 'flow-node-default-active': nodeParams(meta.id).type == 3 && meta.id == nodeItem.id }" :class="{'flow-node-begin': nodeParams(node.meta.id).type == 1, 'flow-node-end': nodeParams(node.meta.id).type == 2, 'flow-node-default': nodeParams(node.meta.id).type == 3 && node.meta.id != nodeItem.id, 'flow-node-default-active': nodeParams(node.meta.id).type == 3 && node.meta.id == nodeItem.id }"
:id="meta.id" :id="node.meta.id"
> >
<div <div
class="node_span" class="node_span"
@click="clickItem(meta.id)" @click="clickItem(node.meta.id)"
@blur="blurItem" @blur="blurItem"
>{{nodeParams(meta.id).name}}</div> :title="nodeParams(node.meta.id).name"
>{{nodeParams(node.meta.id).name}}</div>
<div class="node_del" @click="delNode(node.meta.node_id)"></div>
</div> </div>
</template> </template>
</super-flow> </super-flow>
...@@ -792,9 +794,42 @@ export default { ...@@ -792,9 +794,42 @@ export default {
self.dialog_general = true; self.dialog_general = true;
} }
}, },
showInterfacePlugin(query) { showInterfacePlugin() {
if (this.checkNodeCouldEdit()) { let self = this;
this.dialog_interface = true; if (self.checkNodeCouldEdit()) {
let meta = self.nodeParamsList.find((item) => {
return item.id == self.nodeItem.id;
});
if (meta) {
let index = meta.plugins.findIndex((item) => {
return item.plugin_type === 1;
});
if (index !== -1) {
let data = meta.plugins[index];
let arr0 = JSON.parse(data.body_fields);
let arr1 = JSON.parse(data.query_fields);
let arr_res = JSON.parse(data.response_fields);
self.serviceUrl = data.url;
self.activeName = "0";
self.sqfsVal = data.auth_method;
self.tokenVal = data.auth_token;
self.noSearchUrl = "";
self.datasQqcs = arr0.length != 0 ? arr0 : arr1;
self.datasFhcs = arr_res;
self.resSuccess = true;
self.resultShow = true;
self.dataType = arr0.length != 0 ? "body" : "param";
self.body_fields = arr0;
self.param_fields = arr1;
self.select = data.req_type;
self.getUrl(self.serviceUrl);
} else {
self.refleshItem();
}
} else {
self.refleshItem();
}
self.dialog_interface = true;
} }
}, },
nodeParams(id) { nodeParams(id) {
...@@ -825,7 +860,6 @@ export default { ...@@ -825,7 +860,6 @@ export default {
}); });
} }
} }
self.dialog_general = false; self.dialog_general = false;
}, },
clickTab() {}, clickTab() {},
...@@ -914,8 +948,8 @@ export default { ...@@ -914,8 +948,8 @@ export default {
this.$api.workbench.fwzcFwcs(query).then((response) => { this.$api.workbench.fwzcFwcs(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
let data = response.data.data; let data = response.data.data;
this.body_fields = data.body_fields; this.body_fields = data.body_fields || [];
this.param_fields = data.param_fields; this.param_fields = data.param_fields || [];
if (data.body_fields && data.body_fields.length != 0) { if (data.body_fields && data.body_fields.length != 0) {
this.datasQqcs = data.body_fields; this.datasQqcs = data.body_fields;
this.dataType = "body"; this.dataType = "body";
...@@ -933,7 +967,7 @@ export default { ...@@ -933,7 +967,7 @@ export default {
} }
}); });
}, },
interfaceCancel() { refleshItem() {
this.serviceUrl = ""; this.serviceUrl = "";
this.activeName = "0"; this.activeName = "0";
this.sqfsVal = ""; this.sqfsVal = "";
...@@ -949,6 +983,10 @@ export default { ...@@ -949,6 +983,10 @@ export default {
this.param_fields = []; this.param_fields = [];
this.request_fields = []; this.request_fields = [];
this.response_fields = []; this.response_fields = [];
this.select = 1;
},
interfaceCancel() {
this.refleshItem();
this.dialog_interface = false; this.dialog_interface = false;
}, },
interfaceSubmit() { interfaceSubmit() {
...@@ -1007,7 +1045,6 @@ export default { ...@@ -1007,7 +1045,6 @@ export default {
response_fields: JSON.stringify(self.response_fields), response_fields: JSON.stringify(self.response_fields),
}; };
} }
console.log(self.nodeParamsList);
self.interfaceCancel(); self.interfaceCancel();
} else if (this.requestRules != 0) { } else if (this.requestRules != 0) {
this.$message.error("请完善请求参数信息中的字段名称"); this.$message.error("请完善请求参数信息中的字段名称");
...@@ -1112,6 +1149,28 @@ export default { ...@@ -1112,6 +1149,28 @@ export default {
}); });
this.nodeParamsList[index].plugins.split(plugin_index, 1); this.nodeParamsList[index].plugins.split(plugin_index, 1);
}, },
delNode(item) {
console.log(item);
let obj = this.$refs.superFlow.toJSON();
let nodes = obj.nodeList;
let links = obj.linkList;
for (let i = 0; i < nodes.length; i++) {
console.log(nodes[i]);
if (nodes[i].id == item) {
nodes.splice(i, 1);
}
}
for (let i = 0; i < links.length; i++) {
console.log(links[i]);
if (links[i].startId == item || links[i].endId == item) {
links.splice(i, 1);
i--;
}
}
this.nodeList = nodes;
this.linkList = links;
console.log(this.nodeList, this.linkList);
},
}, },
}; };
</script> </script>
...@@ -1225,7 +1284,7 @@ export default { ...@@ -1225,7 +1284,7 @@ export default {
} }
.checked_item { .checked_item {
margin-top: 20px; margin-top: 20px;
cursor: pointer; cursor: default;
position: relative; position: relative;
&:hover { &:hover {
color: #515fe7; color: #515fe7;
...@@ -1236,6 +1295,7 @@ export default { ...@@ -1236,6 +1295,7 @@ export default {
} }
.checked_item_del { .checked_item_del {
position: absolute; position: absolute;
cursor: pointer;
width: 12px; width: 12px;
height: 12px; height: 12px;
top: -4px; top: -4px;
...@@ -1495,6 +1555,21 @@ export default { ...@@ -1495,6 +1555,21 @@ export default {
padding: 0 20px; padding: 0 20px;
} }
} }
.node_del {
width: 18px;
height: 18px;
background: url("~@/assets/imgs/lcsj_btn_node_delete.png") no-repeat center
center;
cursor: pointer;
display: none;
position: absolute;
top: -12px;
right: -12px;
z-index: 1999;
}
.super-flow__node:hover .node_del {
display: block;
}
</style> </style>
<style lang="less"> <style lang="less">
.super-flow { .super-flow {
...@@ -1518,6 +1593,7 @@ export default { ...@@ -1518,6 +1593,7 @@ export default {
border: solid 3px #109e93; border: solid 3px #109e93;
background-color: #25bdb1; background-color: #25bdb1;
color: #ffffff; color: #ffffff;
position: relative;
} }
.flow-node-end { .flow-node-end {
width: 100%; width: 100%;
...@@ -1528,6 +1604,7 @@ export default { ...@@ -1528,6 +1604,7 @@ export default {
background-color: #f78181; background-color: #f78181;
border: solid 3px #e86262; border: solid 3px #e86262;
color: #ffffff; color: #ffffff;
position: relative;
} }
.flow-node-default { .flow-node-default {
width: 100%; width: 100%;
...@@ -1537,6 +1614,7 @@ export default { ...@@ -1537,6 +1614,7 @@ export default {
border-radius: 8px; border-radius: 8px;
background-color: #fff; background-color: #fff;
border: solid 3px #b4c6f5; border: solid 3px #b4c6f5;
position: relative;
} }
.flow-node-default-active { .flow-node-default-active {
width: 100%; width: 100%;
...@@ -1548,6 +1626,7 @@ export default { ...@@ -1548,6 +1626,7 @@ export default {
box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.8); box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.8);
background-color: #515fe7; background-color: #515fe7;
color: #fff; color: #fff;
position: relative;
} }
} }
} }
......
...@@ -120,9 +120,6 @@ export default { ...@@ -120,9 +120,6 @@ export default {
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
console.log("--- user info ---");
console.log(data.data);
console.log("--- user info ---");
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level this.now_user = this.level
} else { } else {
......
...@@ -337,9 +337,6 @@ export default { ...@@ -337,9 +337,6 @@ export default {
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
console.log("--- user info ---");
console.log(data.data);
console.log("--- user info ---");
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level; this.now_user = this.level;
console.log(this.level); console.log(this.level);
......
...@@ -45,6 +45,9 @@ ...@@ -45,6 +45,9 @@
<ul class="notice_list"> <ul class="notice_list">
<li <li
class="notice_item" class="notice_item"
:class="{
gray: item.readed === 1,
}"
v-for="(item, index) in list" v-for="(item, index) in list"
:key="'item_' + index" :key="'item_' + index"
> >
...@@ -203,11 +206,12 @@ export default { ...@@ -203,11 +206,12 @@ export default {
refreshList() { refreshList() {
this.initList(); // 刷新列表 this.initList(); // 刷新列表
if (!this.unread) {
this.getMessage({ this.getMessage({
unread: true, unread: true,
}); });
} this.getMessage({
unread: false,
});
}, },
readAction(ids) { readAction(ids) {
this.$http this.$http
...@@ -306,8 +310,9 @@ export default { ...@@ -306,8 +310,9 @@ export default {
} }
.notice_header a { .notice_header a {
font-size: 14px; font-size: 14px;
font-weight: 600;
line-height: 24px; line-height: 24px;
color: #8890a7; color: #58617a;
cursor: pointer; cursor: pointer;
} }
.notice_header > div > * + * { .notice_header > div > * + * {
...@@ -387,6 +392,7 @@ export default { ...@@ -387,6 +392,7 @@ export default {
color: #242c43; color: #242c43;
} }
.notice_item > .notice_detail .notice_type { .notice_item > .notice_detail .notice_type {
font-weight: 600;
color: #58617a; color: #58617a;
margin-bottom: 10px; margin-bottom: 10px;
} }
...@@ -423,6 +429,10 @@ export default { ...@@ -423,6 +429,10 @@ export default {
.notice_item:hover .notice_action { .notice_item:hover .notice_action {
display: flex; display: flex;
} }
.notice_item.gray > .notice_detail .notice_type,
.notice_item.gray > .notice_detail .notice_content {
color: #8890a7;
}
.set_notice_btn { .set_notice_btn {
position: relative; position: relative;
} }
...@@ -446,3 +456,10 @@ export default { ...@@ -446,3 +456,10 @@ export default {
display: block; display: block;
} }
</style> </style>
<style>
.notice_container a,
.notice_container a:visited {
color: #515fe7;
}
</style>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
class="apaas_step" class="apaas_step"
> >
<div class="step_in"> <div class="step_in">
<WorkFlow ref="workFlow" class="work_flow" /> <WorkFlow ref="workFlow" :node_list="node_list" :link_list="link_list" :node_params_list="node_params_list" class="work_flow" />
<div class="btn_footer"> <div class="btn_footer">
<el-button class="cancel" @click="cancel">取消</el-button> <el-button class="cancel" @click="cancel">取消</el-button>
<div> <div>
...@@ -271,8 +271,8 @@ export default { ...@@ -271,8 +271,8 @@ export default {
this.basic_form.name = data.name; this.basic_form.name = data.name;
this.basic_form.workplace = data.workarea; this.basic_form.workplace = data.workarea;
this.basic_form.desc = data.describe; this.basic_form.desc = data.describe;
this.node_list = []; this.node_list = data.nodeList;
this.link_list = []; this.link_list = data.linkList;
this.node_params_list = []; this.node_params_list = [];
this.node_list.forEach((item) => { this.node_list.forEach((item) => {
item.meta.id = item.meta.id =
......
...@@ -287,9 +287,6 @@ export default { ...@@ -287,9 +287,6 @@ export default {
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
console.log("--- user info ---");
console.log(data.data);
console.log("--- user info ---");
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level this.now_user = this.level
this.get_service_info() this.get_service_info()
......
...@@ -73,7 +73,12 @@ ...@@ -73,7 +73,12 @@
</div> </div>
</div> </div>
<div class="admin_preview-right apaas_button"> <div class="admin_preview-right apaas_button">
<el-button type="primary" size="mini" @click="approveWorkspace"> <el-button
type="primary"
size="mini"
@click="approveWorkspace"
style="background-color: #515fe7;border-color: #515fe7;"
>
工作区域审批({{ cloud_admin.unapprove }} 工作区域审批({{ cloud_admin.unapprove }}
</el-button> </el-button>
<histogramScroll <histogramScroll
...@@ -396,6 +401,7 @@ export default { ...@@ -396,6 +401,7 @@ export default {
actionList: [ actionList: [
{ {
label: "删除", label: "删除",
class: "warn",
callback: this.deleteItem, callback: this.deleteItem,
disabledRule(item) { disabledRule(item) {
return item.service_apply_info.approval_status === 1; return item.service_apply_info.approval_status === 1;
...@@ -1307,25 +1313,25 @@ export default { ...@@ -1307,25 +1313,25 @@ export default {
name: "CPU使用量", name: "CPU使用量",
value: cloud.cpu_use, value: cloud.cpu_use,
total: cloud.cpu_total, total: cloud.cpu_total,
unit: "(核)", unit: "",
}, },
{ {
name: "内存使用量", name: "内存使用量",
value: cloud.memory_use, value: cloud.memory_use,
total: cloud.memory_total, total: cloud.memory_total,
unit: "(GB)", unit: "GB",
}, },
/* { /* {
name: "数据盘使用量", name: "数据盘使用量",
value: cloud.disk_use, value: cloud.disk_use,
total: cloud.disk_total, total: cloud.disk_total,
unit: "(GB)", unit: "GB",
}, */ }, */
{ {
name: "容器组使用量", name: "容器组使用量",
value: cloud.containers_use, value: cloud.containers_use,
total: cloud.containers_total, total: cloud.containers_total,
unit: "(个)", unit: "",
}, },
], ],
}; };
...@@ -1337,28 +1343,28 @@ export default { ...@@ -1337,28 +1343,28 @@ export default {
name: "CPU使用量", name: "CPU使用量",
value: cloud.cpu_use, value: cloud.cpu_use,
total: cloud.cpu_total, total: cloud.cpu_total,
unit: "(核)", unit: "",
}, },
{ {
name: "内存使用量", name: "内存使用量",
value: cloud.memory_use, value: cloud.memory_use,
total: cloud.memory_total, total: cloud.memory_total,
unit: "(GB)", unit: "GB",
}, },
/* { /* {
name: "数据盘使用量", name: "数据盘使用量",
value: cloud.disk_use, value: cloud.disk_use,
total: cloud.disk_total, total: cloud.disk_total,
unit: "(GB)", unit: "GB",
}, */ }, */
{ {
name: "容器组使用量", name: "容器组使用量",
value: cloud.containers_use, value: cloud.containers_use,
total: cloud.containers_total, total: cloud.containers_total,
unit: "(个)", unit: "",
}, },
], ],
cloumn: cloud.cloumn, // TODO: 柱状图 cloumn: cloud.cloumn, // 柱状图
unapprove: cloud.unapprove, // 审批数量 unapprove: cloud.unapprove, // 审批数量
}; };
} }
...@@ -1618,22 +1624,28 @@ export default { ...@@ -1618,22 +1624,28 @@ export default {
return { return {
title: [ title: [
{ {
text: percent + "%", text: percent + "{a|%}",
x: "center", x: "center",
y: "28%", y: "30%",
textStyle: { textStyle: {
fontSize: 34, fontSize: 36,
fontWeight: "100", fontWeight: "lighter",
color: ["#0d1847"], color: ["#0d1847"],
rich: {
a: {
fontSize: 14,
padding: [0, 0, 4, 0],
},
},
}, },
}, },
{ {
text: item.name, text: item.name,
x: "center", x: "center",
y: "55%", y: "58%",
textStyle: { textStyle: {
fontSize: 12, fontSize: 12,
fontWeight: "100", fontWeight: "normal",
color: "#707693", color: "#707693",
}, },
}, },
...@@ -1700,7 +1712,7 @@ export default { ...@@ -1700,7 +1712,7 @@ export default {
barMaxWidth: 10, barMaxWidth: 10,
name: "C", name: "C",
roundCap: true, roundCap: true,
color: "#ddd", color: "#f4f4f5",
barGap: "-100%", barGap: "-100%",
}, },
{ {
...@@ -1717,7 +1729,7 @@ export default { ...@@ -1717,7 +1729,7 @@ export default {
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
width: 0.5, width: 1,
color: [[1, "rgba(0,0,0,0)"]], color: [[1, "rgba(0,0,0,0)"]],
}, },
}, //仪表盘轴线 }, //仪表盘轴线
...@@ -1728,17 +1740,16 @@ export default { ...@@ -1728,17 +1740,16 @@ export default {
show: true, show: true,
splitNumber: 5, splitNumber: 5,
lineStyle: { lineStyle: {
color: "#e3e4ea", color: "#c9cee0",
width: 0.5, width: 1,
}, },
length: 3, length: 4,
}, //刻度样式 }, //刻度样式
splitLine: { splitLine: {
show: true, show: true,
length: 4, length: 6,
lineStyle: { lineStyle: {
color: "#e3e4ea", color: "#c9cee0",
width: 0.5,
}, },
}, //分隔线样式 }, //分隔线样式
detail: { detail: {
...@@ -1762,7 +1773,6 @@ export default { ...@@ -1762,7 +1773,6 @@ export default {
color: "#fff", color: "#fff",
}, },
}, },
data: [, percent], data: [, percent],
}, },
], ],
...@@ -1808,7 +1818,8 @@ export default { ...@@ -1808,7 +1818,8 @@ export default {
min-width: 1200px; min-width: 1200px;
} }
.cloud_title { .cloud_title {
margin-top: 15px; margin-top: 10px;
font-weight: 600;
} }
.cloud_title > span, .cloud_title > span,
.cloud_title > span::before { .cloud_title > span::before {
...@@ -1876,7 +1887,7 @@ export default { ...@@ -1876,7 +1887,7 @@ export default {
.admin_preview { .admin_preview {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: flex-start;
} }
.admin_preview > * { .admin_preview > * {
width: calc(50% - 10px); width: calc(50% - 10px);
...@@ -1896,3 +1907,9 @@ export default { ...@@ -1896,3 +1907,9 @@ export default {
z-index: 9; z-index: 9;
} }
</style> </style>
<style>
.service_management_list .header-container .cloud_title {
margin-top: 0;
}
</style>
...@@ -110,25 +110,25 @@ export default { ...@@ -110,25 +110,25 @@ export default {
name: "CPU使用量", name: "CPU使用量",
value: cloud.cpu_use, value: cloud.cpu_use,
total: cloud.cpu_total, total: cloud.cpu_total,
unit: "(核)", unit: "",
}, },
{ {
name: "内存使用量", name: "内存使用量",
value: cloud.memory_use, value: cloud.memory_use,
total: cloud.memory_total, total: cloud.memory_total,
unit: "(GB)", unit: "GB",
}, },
/* { /* {
name: "数据盘使用量", name: "数据盘使用量",
value: cloud.disk_use, value: cloud.disk_use,
total: cloud.disk_total, total: cloud.disk_total,
unit: "(GB)", unit: "GB",
}, */ }, */
{ {
name: "容器组使用量", name: "容器组使用量",
value: cloud.containers_use, value: cloud.containers_use,
total: cloud.containers_total, total: cloud.containers_total,
unit: "(个)", unit: "",
}, },
]; ];
}) })
...@@ -164,31 +164,50 @@ export default { ...@@ -164,31 +164,50 @@ export default {
let percent = parseFloat( let percent = parseFloat(
((item.value / item.total) * 100 || 0).toFixed(1) ((item.value / item.total) * 100 || 0).toFixed(1)
); );
let colors = ["#515fe7", "#e7ecfd"]; let colors = [];
if (this.level == 2) {
if (percent >= 80) { if (percent >= 80) {
colors = ["#e3606d", "#f6d0d0"]; colors = ["#e3606d", "#f6d0d0"];
} else {
colors = ["#515fe7", "#e7ecfd"];
}
} else {
if (percent >= 80) {
colors = ["#e3606d", "#f6d0d0"];
this.cloud_admin_warn = true;
} else if (percent >= 60) {
colors = ["#ef9535", "#fcefd8"];
} else {
colors = ["#515fe7", "#e7ecfd"];
}
} }
return { return {
title: [ title: [
{ {
text: percent + "%", text: percent + "{a|%}",
x: "center", x: "center",
y: "28%", y: "30%",
textStyle: { textStyle: {
fontSize: 34, fontSize: 36,
fontWeight: "100", fontWeight: "lighter",
color: ["#0d1847"], color: ["#0d1847"],
rich: {
a: {
fontSize: 14,
padding: [0, 0, 4, 0],
},
},
}, },
}, },
{ {
text: item.name, text: item.name,
x: "center", x: "center",
y: "55%", y: "58%",
textStyle: { textStyle: {
fontSize: 12, fontSize: 12,
fontWeight: "100", fontWeight: "normal",
color: "#707693", color: "#707693",
}, },
}, },
...@@ -255,7 +274,7 @@ export default { ...@@ -255,7 +274,7 @@ export default {
barMaxWidth: 10, barMaxWidth: 10,
name: "C", name: "C",
roundCap: true, roundCap: true,
color: "#ddd", color: "#f4f4f5",
barGap: "-100%", barGap: "-100%",
}, },
{ {
...@@ -272,7 +291,7 @@ export default { ...@@ -272,7 +291,7 @@ export default {
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
width: 0.5, width: 1,
color: [[1, "rgba(0,0,0,0)"]], color: [[1, "rgba(0,0,0,0)"]],
}, },
}, //仪表盘轴线 }, //仪表盘轴线
...@@ -283,17 +302,16 @@ export default { ...@@ -283,17 +302,16 @@ export default {
show: true, show: true,
splitNumber: 5, splitNumber: 5,
lineStyle: { lineStyle: {
color: "#e3e4ea", color: "#c9cee0",
width: 0.5, width: 1,
}, },
length: 3, length: 4,
}, //刻度样式 }, //刻度样式
splitLine: { splitLine: {
show: true, show: true,
length: 4, length: 6,
lineStyle: { lineStyle: {
color: "#e3e4ea", color: "#c9cee0",
width: 0.5,
}, },
}, //分隔线样式 }, //分隔线样式
detail: { detail: {
...@@ -317,7 +335,6 @@ export default { ...@@ -317,7 +335,6 @@ export default {
color: "#fff", color: "#fff",
}, },
}, },
data: [, percent], data: [, percent],
}, },
], ],
......
...@@ -604,9 +604,6 @@ export default { ...@@ -604,9 +604,6 @@ export default {
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
console.log("--- user info ---");
console.log(data.data);
console.log("--- user info ---");
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level; this.now_user = this.level;
console.log(this.level); console.log(this.level);
......
...@@ -245,9 +245,6 @@ export default { ...@@ -245,9 +245,6 @@ export default {
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
console.log("--- user info ---");
console.log(data.data);
console.log("--- user info ---");
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level this.now_user = this.level
console.log(this.level); console.log(this.level);
......
...@@ -1325,9 +1325,6 @@ export default { ...@@ -1325,9 +1325,6 @@ export default {
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
console.log("--- user info ---");
console.log(data.data);
console.log("--- user info ---");
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level; this.now_user = this.level;
this.manage_arr[0].url = data.data.department_id; this.manage_arr[0].url = data.data.department_id;
......
...@@ -426,9 +426,6 @@ export default { ...@@ -426,9 +426,6 @@ export default {
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
console.log("--- user info ---");
console.log(data.data);
console.log("--- user info ---");
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level; this.now_user = this.level;
this.getServiceInfo(); this.getServiceInfo();
......
...@@ -271,9 +271,6 @@ export default { ...@@ -271,9 +271,6 @@ export default {
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
console.log("--- user info ---");
console.log(data.data);
console.log("--- user info ---");
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level this.now_user = this.level
this.getheaderinfo(); this.getheaderinfo();
......
...@@ -630,9 +630,6 @@ export default { ...@@ -630,9 +630,6 @@ export default {
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
console.log("--- user info ---");
console.log(data.data);
console.log("--- user info ---");
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level; this.now_user = this.level;
console.log(this.level); console.log(this.level);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment