Commit 3a175488 authored by 刘殿昕's avatar 刘殿昕

Merge branch 'ldx' into dev

parents 43e277ee 4f146238
...@@ -6,38 +6,41 @@ ...@@ -6,38 +6,41 @@
{{ item.title }} {{ item.title }}
</p> </p>
<p v-if="!(item.prop && item.prop == 'title')"> <p v-if="!(item.prop && item.prop == 'title')">
<span v-if="item.type == 'url'" style="white-space:pre-wrap;" <span v-if="item.type == 'url'" style="white-space:pre-wrap;">
>访问地址: <a :href="item.info" target="_blank">{{ item.info }}</a></span 访问地址:
> <a :href="item.info" target="_blank">{{ item.info }}</a>
<span v-else v-html="item.info" style="white-space:pre-wrap;"></span> </span>
<span v-if="item.type && item.type == 'down'" class="filebtn" @click="download(item.url)" <span v-else v-html="helper.downloadFileFormat(item.info)" style="white-space:pre-wrap;"></span>
>下载文件</span <span
> v-if="item.type && item.type == 'down'"
class="filebtn"
@click="download(item.url)"
>下载文件</span>
</p> </p>
<slot <slot v-if="item.type && item.type == 'solt'" :name="item.solt_name"></slot>
v-if="item.type && item.type == 'solt'"
:name="item.solt_name"
></slot>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import helper from "@/services/helper";
export default { export default {
data() { data() {
return {}; return {
helper: helper
};
}, },
props: ["list_arr"], props: ["list_arr"],
mounted() { mounted() {
console.log(this.$slots); console.log(this.$slots);
}, },
methods:{ methods: {
download(val){ download(val) {
// this.$emit('download',val) // this.$emit('download',val)
console.log(val); console.log(val);
const a = document.createElement('a'); // 创建a标签 const a = document.createElement("a"); // 创建a标签
a.setAttribute('download', '');// download属性 a.setAttribute("download", ""); // download属性
a.setAttribute('href', val);// href链接 a.setAttribute("href", val); // href链接
a.click();// 自执行点击事件 a.click(); // 自执行点击事件
} }
} }
}; };
......
...@@ -23,18 +23,25 @@ ...@@ -23,18 +23,25 @@
</div> </div>
</el-col> </el-col>
<el-col :span="6" class="cell_specification"> <el-col :span="6" class="cell_specification">
<div> <div v-if="cellItem.order_type == 1">
<div>规格:日访问次数:{{ cellItem.spec_svc_count }}次,日访问量:{{ cellItem.spec_svc_pv }}</div> <div>规格:日访问次数:{{ cellItem.spec_svc_count }}次,日访问量:{{ cellItem.spec_svc_pv }}</div>
<div <div
class="cell_specification_type" class="cell_specification_type"
>申请方式:{{ cellItem.duration_unit == 1 ? $t('lang.byMonth') : $t('lang.byYear') }}</div> >申请方式:{{ cellItem.duration_unit == 1 ? $t('lang.byMonth') : $t('lang.byYear') }}</div>
</div> </div>
<div v-else-if="cellItem.order_type == 2">
<div>规格:{{ cellItem.spec_app == 0 ? "申请获取应用镜像部署权限" : "申请获取应用镜像开发权限" }}</div>
</div>
<div v-else-if="cellItem.order_type == 3">
<div>规格:CPU 2核,内存 4GB,容器组 8个;数据盘 3块,每块数据盘容量 2GB</div>
<div class="cell_specification_type">单个容器组:CPU最高 4核,默认 2核;内存最高 8 GB,默认 4GB</div>
</div>
</el-col> </el-col>
<el-col :span="4" class="approval_status"> <el-col :span="4" class="approval_status">
<div> <div>
<div v-if="cellItem.approval_first_level == 0 && cellItem.pay_status != -1">待审核</div> <div v-if="cellItem.approval_first_level == 0 && cellItem.pay_status != -1">待审核</div>
<div <div
v-if="cellItem.approval_first_level == 1&& cellItem.approval_second_level == 0 && cellItem.pay_status != -1" v-if="cellItem.approval_first_level == 1 && cellItem.approval_second_level == 0 && cellItem.pay_status != -1"
>审核中</div> >审核中</div>
<div v-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1">审核通过</div> <div v-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1">审核通过</div>
<div v-if="cellItem.approval_first_level == -1 && cellItem.pay_status != -1">审核未通过</div> <div v-if="cellItem.approval_first_level == -1 && cellItem.pay_status != -1">审核未通过</div>
......
...@@ -58,7 +58,7 @@ import helper from "@/services/helper"; ...@@ -58,7 +58,7 @@ import helper from "@/services/helper";
export default { export default {
props: { props: {
item: { item: {
type: [String,Number], type: [String, Number],
default: "" default: ""
}, },
header: { header: {
...@@ -95,7 +95,8 @@ export default { ...@@ -95,7 +95,8 @@ export default {
anotherData: { anotherData: {
directory: "file" directory: "file"
}, },
inputTextUp: "" inputTextUp: "",
helper: helper
}), }),
mounted() { mounted() {
this.inputText = this.item; this.inputText = this.item;
...@@ -118,7 +119,7 @@ export default { ...@@ -118,7 +119,7 @@ export default {
url: response.data, url: response.data,
name: response.data name: response.data
}); });
this.inputTextUp = file.name; this.inputTextUp = helper.downloadFileFormat(file.name);
this.$emit("changeUpFile", { this.$emit("changeUpFile", {
rowId: this.rowId, rowId: this.rowId,
header: this.header, header: this.header,
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<div class="detail_title">{{ orderDetail.order_type == 1 ? "服务" : "应用"}}信息</div> <div class="detail_title">{{ orderDetail.order_type == 1 ? "服务" : "应用"}}信息</div>
<div class="detail_service"> <div class="detail_service">
<el-row class="detail_service_row"> <el-row class="detail_service_row">
<el-col :span="10" class="detail_service_msg"> <el-col :span="10" v-if="orderDetail.order_type == 1" class="detail_service_msg">
<img :src="orderDetail.cover" class="detail_service_msg_img" /> <img :src="orderDetail.cover" class="detail_service_msg_img" />
<div class="detail_service_msg_right"> <div class="detail_service_msg_right">
<div class="detail_service_name"> <div class="detail_service_name">
...@@ -105,8 +105,28 @@ ...@@ -105,8 +105,28 @@
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="10" v-else-if="orderDetail.order_type == 2" class="detail_service_msg">
<img :src="orderDetail.cover" class="detail_service_msg_img" />
<div class="detail_service_msg_right">
<div class="detail_service_name">
<span>{{ orderDetail.name }}</span>
</div>
<div class="detail_service_msg_other">
<div class="detail_service_type">{{ orderDetail.sector }}</div>
<div class="detail_service_creator">{{ orderDetail.src_organization }}</div>
</div>
</div>
</el-col>
<el-col :span="10" v-else-if="orderDetail.order_type == 3" class="detail_service_msg">
<img :src="orderDetail.cover" class="detail_service_msg_img" />
<div class="detail_service_msg_right">
<div class="detail_service_name_cloud">
<span>{{ orderDetail.name }}</span>
</div>
</div>
</el-col>
<el-col :span="8" class="detail_service_specification"> <el-col :span="8" class="detail_service_specification">
<div> <div v-if="orderDetail.order_type == 1">
<div> <div>
<span class="detail_service_specification_gg">规格:</span> <span class="detail_service_specification_gg">规格:</span>
<span <span
...@@ -120,6 +140,18 @@ ...@@ -120,6 +140,18 @@
>{{orderDetail.duration_unit == 1 ? "按月" : "按年"}}</span> >{{orderDetail.duration_unit == 1 ? "按月" : "按年"}}</span>
</div> </div>
</div> </div>
<div v-else-if="orderDetail.order_type == 2">
<div>
<span class="detail_service_specification_gg">规格:</span>
<span class="detail_service_specification_val">申请获取应用镜像部署权限</span>
</div>
</div>
<div v-else-if="orderDetail.order_type == 3">
<div>
<span class="detail_service_specification_gg">类型:</span>
<span class="detail_service_specification_val">申请新的工作区域</span>
</div>
</div>
</el-col> </el-col>
<el-col :span="6" class="detail_service_time"> <el-col :span="6" class="detail_service_time">
<div> <div>
...@@ -131,10 +163,64 @@ ...@@ -131,10 +163,64 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div v-if="orderDetail.order_type == 2">
<div class="detail_s_title">应用简介:</div>
<div class="detail_app_scence">{{ orderDetail.scene }}</div>
</div>
<div v-if="orderDetail.order_type == 2">
<div class="detail_s_title">功能简介:</div>
<div class="detail_app_scence">{{ orderDetail.scene }}</div>
</div>
<div v-if="orderDetail.order_type == 1 || orderDetail.order_type == 2">
<div class="detail_s_title">应用场景:</div> <div class="detail_s_title">应用场景:</div>
<div class="detail_app_scence">{{ orderDetail.scene }}</div> <div class="detail_app_scence">{{ orderDetail.scene }}</div>
</div>
<div v-if="orderDetail.order_type == 3">
<div class="detail_s_title">工作区域描述:</div>
<div class="detail_app_scence">{{ orderDetail.scene }}</div>
</div>
<div v-if="orderDetail.order_type == 3" class="params_block">
<span class="params_block_title">申请规格:</span>
<div class="params_block_item">
<div class="params_block_item_in">
<span class="params_block_item_title">CPU:</span>
<span class="params_block_item_val">2核</span>
</div>
<div class="params_block_item_in">
<span class="params_block_item_title">内存:</span>
<span class="params_block_item_val">4GB</span>
</div>
<div class="params_block_item_in">
<span class="params_block_item_title">容器组:</span>
<span class="params_block_item_val">2核</span>
</div>
<div class="params_block_item_in">
<span class="params_block_item_title">数据盘:</span>
<span class="params_block_item_val">2核</span>
</div>
</div>
<span class="params_block_title margin_top_20">单个容器组规格:</span>
<div class="params_block_item">
<div class="params_block_item_in">
<span class="params_block_item_title">CPU:</span>
<p class="params_block_item_val">
<span class="val_has_2">最高&nbsp;2核</span>
<span class="val_has_2">默认&nbsp;2核</span>
</p>
</div>
<div class="params_block_item_in">
<span class="params_block_item_title">CPU:</span>
<p class="params_block_item_val">
<span class="val_has_2">最高&nbsp;2核</span>
<span class="val_has_2">默认&nbsp;2核</span>
</p>
</div>
</div>
</div>
<div v-if="orderDetail.order_type == 1">
<div class="detail_s_title">申请内容:</div> <div class="detail_s_title">申请内容:</div>
<table-um :headers="header_arr" :datas="data"></table-um> <table-um :headers="header_arr" :datas="data"></table-um>
</div>
<div class="detail_title">申请人信息</div> <div class="detail_title">申请人信息</div>
<info-list @download="download" :list_arr="list_arr" class="detail_s_val"></info-list> <info-list @download="download" :list_arr="list_arr" class="detail_s_val"></info-list>
<process-card :data="approval_arr1" class="detail_s_val"></process-card> <process-card :data="approval_arr1" class="detail_s_val"></process-card>
...@@ -512,6 +598,19 @@ export default { ...@@ -512,6 +598,19 @@ export default {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
font-size: 16px; font-size: 16px;
} }
.detail_service_name_cloud {
width: 100%;
line-height: 24px;
margin-top: 50px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 16px;
}
.detail_service_msg_other { .detail_service_msg_other {
position: absolute; position: absolute;
bottom: 2px; bottom: 2px;
...@@ -598,6 +697,42 @@ export default { ...@@ -598,6 +697,42 @@ export default {
background-color: #e1e4fb; background-color: #e1e4fb;
color: #626de9; color: #626de9;
} }
.params_block {
background-color: #f8f9fd;
border-radius: 8px;
margin: 10px 0;
padding: 20px;
font-size: 14px;
line-height: 22px;
}
.params_block_title {
padding-left: 10px;
color: #242c43;
}
.params_block_item {
padding: 10px 0 0 0;
}
.params_block_item_in {
display: flex;
justify-content: space-between;
margin-bottom: 5px;
}
.params_block_item_title {
color: #8890a7;
width: 120px;
text-align: right;
}
.params_block_item_val {
color: #242c43;
width: calc(100% - 130px);
}
.val_has_2 {
margin-right: 20px;
}
.margin_top_20 {
display: block;
margin-top: 20px;
}
</style> </style>
<style> <style>
.pop_rate .el-rate__icon { .pop_rate .el-rate__icon {
......
...@@ -40,23 +40,10 @@ ...@@ -40,23 +40,10 @@
<div class="menu_text"> <div class="menu_text">
<p>{{ item.text }}</p> <p>{{ item.text }}</p>
<p <p
:style=" :style="{ color: item.color }"
index == menu_arr[now_user].length - 1 ||
(now_user == 1 && index == 0) ||
(now_user == 2 && index == 0)
? { color: item.color, marginRight: '-20px' }
: { color: item.color }
"
>
<span style="font-size:36px">{{ item.num }}</span>
<span
v-if="
index == menu_arr[now_user].length - 1 ||
(now_user == 1 && index == 0) ||
(now_user == 2 && index == 0)
"
></span
> >
<span style="font-size:36px">{{ helper.numberFormat(item.num, 2) }}</span>
<span v-if="item.num > 10000"></span>
</p> </p>
</div> </div>
</div> </div>
...@@ -70,15 +57,12 @@ ...@@ -70,15 +57,12 @@
style="margin-top:20px;margin-bottom:10px;font-size:18px;color: #0d1847;font-weight:600;padding-left:20px;" style="margin-top:20px;margin-bottom:10px;font-size:18px;color: #0d1847;font-weight:600;padding-left:20px;"
> >
云资源概况分析 云资源概况分析
<img <img style="vertical-align:-9px;" src="@/assets/imgs/home_btn_enter.png" alt />
style="vertical-align:-9px;"
src="@/assets/imgs/home_btn_enter.png"
alt
/>
</p> </p>
<div class="data_charts"> <div class="data_charts">
<div class="data_charts_left" style="width:100%;"> <div class="data_charts_left" style="width:100%;">
<p><span></span> <p>
<span></span>
服务健康状态 服务健康状态
<el-select style="float:right;" v-model="fw_value" placeholder="请选择"> <el-select style="float:right;" v-model="fw_value" placeholder="请选择">
<el-option <el-option
...@@ -110,9 +94,7 @@ ...@@ -110,9 +94,7 @@
<div class="online_tool"> <div class="online_tool">
<p <p
style="margin-top:20px;margin-bottom:10px;font-size:18px;color: #0d1847;font-weight:600;height:28px;padding-left:20px;" style="margin-top:20px;margin-bottom:10px;font-size:18px;color: #0d1847;font-weight:600;height:28px;padding-left:20px;"
> >在线组件工具</p>
在线组件工具
</p>
<div class="online_contain"> <div class="online_contain">
<div <div
v-for="(item, index) in online_tool_arr" v-for="(item, index) in online_tool_arr"
...@@ -134,15 +116,13 @@ ...@@ -134,15 +116,13 @@
style="margin-top:20px;margin-bottom:10px;font-size:18px;color: #0d1847;font-weight:600;padding-left:20px;" style="margin-top:20px;margin-bottom:10px;font-size:18px;color: #0d1847;font-weight:600;padding-left:20px;"
> >
数据资产看板 数据资产看板
<img <img style="vertical-align:-9px;" src="@/assets/imgs/home_btn_enter.png" alt />
style="vertical-align:-9px;"
src="@/assets/imgs/home_btn_enter.png"
alt
/>
</p> </p>
<div class="data_charts" style="width:100%;"> <div class="data_charts" style="width:100%;">
<div class="data_charts_left"> <div class="data_charts_left">
<p><span></span> 服务健康状态</p> <p>
<span></span> 服务健康状态
</p>
<div :id="health" class="health"></div> <div :id="health" class="health"></div>
</div> </div>
<div class="data_charts_left" style="width:420px;margin-left:40px;"> <div class="data_charts_left" style="width:420px;margin-left:40px;">
...@@ -160,7 +140,9 @@ ...@@ -160,7 +140,9 @@
<div :id="fwyy" class="fwyy"></div> <div :id="fwyy" class="fwyy"></div>
</div> </div>
<div class="data_charts_right"> <div class="data_charts_right">
<p><span></span> 服务运营分析</p> <p>
<span></span> 服务运营分析
</p>
<div :id="yy_asy" class="yy_asy"></div> <div :id="yy_asy" class="yy_asy"></div>
</div> </div>
</div> </div>
...@@ -174,23 +156,25 @@ ...@@ -174,23 +156,25 @@
style="margin-top:20px;margin-bottom:10px;font-size:18px;color: #0d1847;font-weight:600;padding-left:20px;" style="margin-top:20px;margin-bottom:10px;font-size:18px;color: #0d1847;font-weight:600;padding-left:20px;"
> >
数据资产看板 数据资产看板
<img <img style="vertical-align:-9px;" src="@/assets/imgs/home_btn_enter.png" alt />
style="vertical-align:-9px;"
src="@/assets/imgs/home_btn_enter.png"
alt
/>
</p> </p>
<div class="data_charts" style="width:100%;"> <div class="data_charts" style="width:100%;">
<div class="data_charts_left" style="width:590px;"> <div class="data_charts_left" style="width:590px;">
<p><span></span> 服务运营分析</p> <p>
<span></span> 服务运营分析
</p>
<div :id="yy_asy" class="yy_asy" style="width:590px;"></div> <div :id="yy_asy" class="yy_asy" style="width:590px;"></div>
</div> </div>
<div class="data_charts_left" style="width:285px;"> <div class="data_charts_left" style="width:285px;">
<p><span></span> 服务类型分析</p> <p>
<span></span> 服务类型分析
</p>
<div :id="fwlx_asy" class="health" style="width:265px;"></div> <div :id="fwlx_asy" class="health" style="width:265px;"></div>
</div> </div>
<div class="data_charts_left" style="width:285px;"> <div class="data_charts_left" style="width:285px;">
<p><span></span> 应用类型分析</p> <p>
<span></span> 应用类型分析
</p>
<div :id="yylx_asy" class="health" style="width:265px;"></div> <div :id="yylx_asy" class="health" style="width:265px;"></div>
</div> </div>
</div> </div>
...@@ -223,9 +207,7 @@ ...@@ -223,9 +207,7 @@
: {} : {}
" "
@click="change_now_type(index)" @click="change_now_type(index)"
> >{{ item }}</div>
{{ item }}
</div>
<div class="myservice_btn" v-if="now_user == 0||now_user == 4" @click="gotozc()"> <div class="myservice_btn" v-if="now_user == 0||now_user == 4" @click="gotozc()">
<img src="@/assets/imgs/home_ic_release.png" alt />&nbsp; 服务注册 <img src="@/assets/imgs/home_ic_release.png" alt />&nbsp; 服务注册
</div> </div>
...@@ -271,9 +253,7 @@ ...@@ -271,9 +253,7 @@
: {} : {}
" "
@click="change_now_app(index)" @click="change_now_app(index)"
> >{{ item }}</div>
{{ item }}
</div>
</div> </div>
<el-scrollbar class="myapp_contain" v-if="now_user == 0||now_user == 4"> <el-scrollbar class="myapp_contain" v-if="now_user == 0||now_user == 4">
<div <div
...@@ -313,16 +293,17 @@ import uuidv1 from "uuid/v1"; ...@@ -313,16 +293,17 @@ import uuidv1 from "uuid/v1";
import tableUm from "@/components/table/table-um"; import tableUm from "@/components/table/table-um";
import ListPagination from "@/components/comments-pagination"; import ListPagination from "@/components/comments-pagination";
import helper from "@/services/helper.js"; import helper from "@/services/helper.js";
import dashBoard from '../../components/e-charts/dashboard' import dashBoard from "../../components/e-charts/dashboard";
import { formatDateTime_date } from "@/utils/common"; import { formatDateTime_date } from "@/utils/common";
import { mapGetters,mapState } from 'vuex' import { mapGetters, mapState } from "vuex";
import {getCookie} from '../../services/cookie' import { getCookie } from "../../services/cookie";
var echarts = require("echarts"); var echarts = require("echarts");
export default { export default {
data() { data() {
return { return {
service_data:[], helper: helper,
app_data:[], service_data: [],
app_data: [],
listTotal: 0, listTotal: 0,
currentPage: 1, currentPage: 1,
listTotal1: 0, listTotal1: 0,
...@@ -330,16 +311,16 @@ export default { ...@@ -330,16 +311,16 @@ export default {
pageSize: 5, pageSize: 5,
person: "", person: "",
login_time: "", login_time: "",
detailsUrl:[ detailsUrl: [
['/fwgl/0/0/servicedetail/','/fwgl/0/1/applyserviceedit/'], ["/fwgl/0/0/servicedetail/", "/fwgl/0/1/applyserviceedit/"],
['/fwgl/1/0/servicedetail/','/fwgl/1/1/approvalserviceedit/'], ["/fwgl/1/0/servicedetail/", "/fwgl/1/1/approvalserviceedit/"],
['/fwgl/2/0/servicedetail/','/fwgl/2/1/approvalserviceedit/'], ["/fwgl/2/0/servicedetail/", "/fwgl/2/1/approvalserviceedit/"]
],//服务跳转链接 ], //服务跳转链接
detailsUrl1:[ detailsUrl1: [
['/yygl/0/0/detail/','/yygl/0/1/deploydetail/'], ["/yygl/0/0/detail/", "/yygl/0/1/deploydetail/"],
['/yygl/1/0/detail/','/yygl/1/2/approvaldetail/'], ["/yygl/1/0/detail/", "/yygl/1/2/approvaldetail/"],
['/yygl/2/0/detail/','/yygl/2/2/approvaldetail/'], ["/yygl/2/0/detail/", "/yygl/2/2/approvaldetail/"]
],//应用跳转链接 ], //应用跳转链接
now_user: 2, //0:普通用户,1:组织管理员,2:超级管理员 now_user: 2, //0:普通用户,1:组织管理员,2:超级管理员
now_type: 0, now_type: 0,
now_app: 0, now_app: 0,
...@@ -352,14 +333,18 @@ export default { ...@@ -352,14 +333,18 @@ export default {
fw_options: [ fw_options: [
{ {
value: 0, value: 0,
label: "服务总数", label: "服务总数"
}, },
{ {
value: 1, value: 1,
label: "应用总数", label: "应用总数"
}, }
],
app_url_arr: [
["/apaas/hubApi/market/list", "/apaas/hubApi/market/deployList"],
["/apaas/hubApi/market/list", "/apaas/hubApi/market/applyList"],
["/apaas/hubApi/market/list", "/apaas/hubApi/market/applyList"]
], ],
app_url_arr: [['/apaas/hubApi/market/list','/apaas/hubApi/market/deployList'], ["/apaas/hubApi/market/list", "/apaas/hubApi/market/applyList"], ["/apaas/hubApi/market/list", "/apaas/hubApi/market/applyList"]],
app_head: [ app_head: [
[], [],
[ [
...@@ -369,33 +354,33 @@ export default { ...@@ -369,33 +354,33 @@ export default {
label: "应用名称", label: "应用名称",
width: "90px", width: "90px",
align: "left", align: "left",
type:'href', type: "href",
id:'app_id' id: "app_id"
}, },
{ {
prop: "type_name", prop: "type_name",
label: "应用类型", label: "应用类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "version", prop: "version",
label: "应用版本", label: "应用版本",
width: "80px", width: "80px",
align: "center", align: "center"
}, },
{ {
prop: "create_date", prop: "create_date",
label: "应用创建时间", label: "应用创建时间",
width: "160px", width: "160px",
align: "center", align: "center"
}, },
{ {
prop: "deploy_times", prop: "deploy_times",
label: "被部署次数", label: "被部署次数",
width: "100px", width: "100px",
align: "center", align: "center"
}, }
], ],
[ [
{ {
...@@ -403,34 +388,34 @@ export default { ...@@ -403,34 +388,34 @@ export default {
label: "应用名称", label: "应用名称",
width: "90px", width: "90px",
align: "left", align: "left",
type:'href', type: "href",
id:'id' id: "id"
}, },
{ {
prop: "type_name", prop: "type_name",
label: "应用类型", label: "应用类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "version", prop: "version",
label: "应用版本", label: "应用版本",
width: "80px", width: "80px",
align: "center", align: "center"
}, },
{ {
prop: "time", prop: "time",
label: "应用审批时间", label: "应用审批时间",
width: "160px", width: "160px",
align: "center", align: "center"
}, },
{ {
prop: "apply_status", prop: "apply_status",
label: "审批状态", label: "审批状态",
width: "100px", width: "100px",
align: "center", align: "center"
}, }
], ]
], ],
[ [
[ [
...@@ -439,33 +424,33 @@ export default { ...@@ -439,33 +424,33 @@ export default {
label: "应用名称", label: "应用名称",
width: "90px", width: "90px",
align: "left", align: "left",
type:'href', type: "href",
id:'app_id' id: "app_id"
}, },
{ {
prop: "type_name", prop: "type_name",
label: "应用类型", label: "应用类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "version", prop: "version",
label: "应用版本", label: "应用版本",
width: "80px", width: "80px",
align: "center", align: "center"
}, },
{ {
prop: "create_date", prop: "create_date",
label: "应用创建时间", label: "应用创建时间",
width: "160px", width: "160px",
align: "center", align: "center"
}, },
{ {
prop: "deploy_times", prop: "deploy_times",
label: "被部署次数", label: "被部署次数",
width: "100px", width: "100px",
align: "center", align: "center"
}, }
], ],
[ [
{ {
...@@ -473,44 +458,52 @@ export default { ...@@ -473,44 +458,52 @@ export default {
label: "应用名称", label: "应用名称",
width: "90px", width: "90px",
align: "left", align: "left",
type:'href', type: "href",
id:'id' id: "id"
}, },
{ {
prop: "type_name", prop: "type_name",
label: "应用类型", label: "应用类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "version", prop: "version",
label: "应用版本", label: "应用版本",
width: "80px", width: "80px",
align: "center", align: "center"
}, },
{ {
prop: "time", prop: "time",
label: "应用审批时间", label: "应用审批时间",
width: "160px", width: "160px",
align: "center", align: "center"
}, },
{ {
prop: "apply_status", prop: "apply_status",
label: "审批状态", label: "审批状态",
width: "100px", width: "100px",
align: "center", align: "center"
}, }
], ]
], ]
], ],
service_url_arr: [ service_url_arr: [
[ [
"/apaas/service/v3/service/manager/list", "/apaas/service/v3/service/manager/list",
"/apaas/service/v3/service/apply/service/list", "/apaas/service/v3/service/apply/service/list",
"/apaas/service/v3/service/manager/list"
],
[
"/apaas/service/v3/service/manager/list", "/apaas/service/v3/service/manager/list",
"/apaas/service/v3/service/approval/applied/list",
"nor_cloud"
], ],
["/apaas/service/v3/service/manager/list", "/apaas/service/v3/service/approval/applied/list", "nor_cloud"], [
["/apaas/service/v3/service/manager/list", "/apaas/service/v3/service/approval/applied/list", "nor_cloud_manage"], "/apaas/service/v3/service/manager/list",
"/apaas/service/v3/service/approval/applied/list",
"nor_cloud_manage"
]
], ],
service_head: [ service_head: [
[ [
...@@ -520,27 +513,27 @@ export default { ...@@ -520,27 +513,27 @@ export default {
label: "服务名称", label: "服务名称",
width: "250px", width: "250px",
align: "left", align: "left",
type:'href', type: "href",
id:'id', id: "id"
}, },
{ {
prop: "data_service_type1_name", prop: "data_service_type1_name",
label: "服务类型", label: "服务类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "create_time", prop: "create_time",
label: "注册发布时间", label: "注册发布时间",
width: "200px", width: "200px",
align: "center", align: "center"
}, },
{ {
prop: "request_count", prop: "request_count",
label: "被调用次数", label: "被调用次数",
width: "110px", width: "110px",
align: "center", align: "center"
}, }
], ],
[ [
{ {
...@@ -548,92 +541,92 @@ export default { ...@@ -548,92 +541,92 @@ export default {
label: "服务名称", label: "服务名称",
width: "250px", width: "250px",
align: "left", align: "left",
type:'href', type: "href",
id:'id', id: "id"
}, },
{ {
prop: "data_service_type1_name", prop: "data_service_type1_name",
label: "服务类型", label: "服务类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "apply_time", prop: "apply_time",
label: "申请时间", label: "申请时间",
width: "200px", width: "200px",
align: "center", align: "center"
}, },
{ {
prop: "approval_status", prop: "approval_status",
label: "申请审批状态", label: "申请审批状态",
width: "110px", width: "110px",
align: "center", align: "center"
}, }
], ],
[ [
{ {
prop: "fwmc", prop: "fwmc",
label: "服务名称", label: "服务名称",
width: "250px", width: "250px",
align: "left", align: "left"
}, },
{ {
prop: "fwlx", prop: "fwlx",
label: "服务类型", label: "服务类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "spsj", prop: "spsj",
label: "审批时间", label: "审批时间",
width: "200px", width: "200px",
align: "center", align: "center"
}, },
{ {
prop: "spzt", prop: "spzt",
label: "审批状态", label: "审批状态",
width: "110px", width: "110px",
align: "center", align: "center"
}, }
], ],
[ [
{ {
prop: "gzqy", prop: "gzqy",
label: "工作区域", label: "工作区域",
width: "150px", width: "150px",
align: "left", align: "left"
}, },
{ {
prop: "wlhj", prop: "wlhj",
label: "网络环境", label: "网络环境",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "cpu", prop: "cpu",
label: "CPU(核)", label: "CPU(核)",
width: "90px", width: "90px",
align: "center", align: "center"
}, },
{ {
prop: "ncgb", prop: "ncgb",
label: "内存(GB)", label: "内存(GB)",
width: "90px", width: "90px",
align: "center", align: "center"
}, },
{ {
prop: "zyzlgb", prop: "zyzlgb",
label: "资源总量(GB)", label: "资源总量(GB)",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "sqzt", prop: "sqzt",
label: "申请状态", label: "申请状态",
width: "110px", width: "110px",
align: "center", align: "center"
}, }
], ]
], ],
[ [
[ [
...@@ -642,27 +635,27 @@ export default { ...@@ -642,27 +635,27 @@ export default {
label: "服务名称", label: "服务名称",
width: "140px", width: "140px",
align: "left", align: "left",
type:'href', type: "href",
id:'id' id: "id"
}, },
{ {
prop: "data_service_type1_name", prop: "data_service_type1_name",
label: "服务类型", label: "服务类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "create_time", prop: "create_time",
label: "注册发布时间", label: "注册发布时间",
width: "180px", width: "180px",
align: "center", align: "center"
}, },
{ {
prop: "request_count", prop: "request_count",
label: "被调用次数", label: "被调用次数",
width: "110px", width: "110px",
align: "center", align: "center"
}, }
], ],
[ [
{ {
...@@ -670,58 +663,58 @@ export default { ...@@ -670,58 +663,58 @@ export default {
label: "服务名称", label: "服务名称",
width: "140px", width: "140px",
align: "left", align: "left",
type:'href', type: "href",
id:'service_apply_info.id' id: "service_apply_info.id"
}, },
{ {
prop: "data_service_type1_name", prop: "data_service_type1_name",
label: "服务类型", label: "服务类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "approval_time", prop: "approval_time",
label: "审批时间", label: "审批时间",
width: "180px", width: "180px",
align: "center", align: "center"
}, },
{ {
prop: "approval_status", prop: "approval_status",
label: "审批状态", label: "审批状态",
width: "110px", width: "110px",
align: "center", align: "center"
}, }
], ],
[ [
{ {
prop: "gzqy", prop: "gzqy",
label: "工作区域", label: "工作区域",
width: "100px", width: "100px",
align: "left", align: "left"
}, },
{ {
prop: "wlhj", prop: "wlhj",
label: "网络环境", label: "网络环境",
width: "90px", width: "90px",
align: "center", align: "center"
}, },
{ {
prop: "cpu", prop: "cpu",
label: "CPU(核)", label: "CPU(核)",
width: "80px", width: "80px",
align: "center", align: "center"
}, },
{ {
prop: "ncgb", prop: "ncgb",
label: "内存(GB)", label: "内存(GB)",
width: "80px", width: "80px",
align: "center", align: "center"
}, },
{ {
prop: "zyzlgb", prop: "zyzlgb",
label: "资源总量(GB)", label: "资源总量(GB)",
width: "110px", width: "110px",
align: "center", align: "center"
}, },
{ {
prop: "sqzt", prop: "sqzt",
...@@ -732,14 +725,14 @@ export default { ...@@ -732,14 +725,14 @@ export default {
btnList: [ btnList: [
{ {
label: "分配", label: "分配",
type: "distribut", type: "distribut"
}, },
{ {
label: "已分配", label: "已分配"
}, }
], ]
}, }
], ]
], ],
[ [
[ [
...@@ -748,83 +741,83 @@ export default { ...@@ -748,83 +741,83 @@ export default {
label: "服务名称", label: "服务名称",
width: "140px", width: "140px",
align: "left", align: "left",
type:'href', type: "href",
id:'id' id: "id"
}, },
{ {
prop: "data_service_type1_name", prop: "data_service_type1_name",
label: "服务类型", label: "服务类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "create_time", prop: "create_time",
label: "注册发布时间", label: "注册发布时间",
width: "180px", width: "180px",
align: "center", align: "center"
}, },
{ {
prop: "request_count", prop: "request_count",
label: "被调用次数", label: "被调用次数",
width: "110px", width: "110px",
align: "center", align: "center"
}, }
], ],
[ [
{ {
prop: "name", prop: "name",
label: "服务名称", label: "服务名称",
width: "140px", width: "140px",
type:'href', type: "href",
id:'service_apply_info.id', id: "service_apply_info.id",
align: "left", align: "left"
}, },
{ {
prop: "data_service_type1_name", prop: "data_service_type1_name",
label: "服务类型", label: "服务类型",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "approval_time", prop: "approval_time",
label: "审批时间", label: "审批时间",
width: "180px", width: "180px",
align: "center", align: "center"
}, },
{ {
prop: "approval_status", prop: "approval_status",
label: "审批状态", label: "审批状态",
width: "110px", width: "110px",
align: "center", align: "center"
}, }
], ],
[ [
{ {
prop: "sszz", prop: "sszz",
label: "所属组织", label: "所属组织",
width: "170px", width: "170px",
align: "left", align: "left"
}, },
{ {
prop: "cpu", prop: "cpu",
label: "CPU使用量(核)", label: "CPU使用量(核)",
width: "120px", width: "120px",
align: "center", align: "center"
}, },
{ {
prop: "ncgb", prop: "ncgb",
label: "内存使用量(GB)", label: "内存使用量(GB)",
width: "130px", width: "130px",
align: "center", align: "center"
}, },
{ {
prop: "gzqysl", prop: "gzqysl",
label: "工作区域数量(个)", label: "工作区域数量(个)",
width: "130px", width: "130px",
align: "center", align: "center"
}, }
], ]
], ]
], ],
fw_value: 0, fw_value: 0,
menu_arr: [ menu_arr: [
...@@ -835,7 +828,7 @@ export default { ...@@ -835,7 +828,7 @@ export default {
bg: "#e6ebfe", bg: "#e6ebfe",
color: "#515fe7", color: "#515fe7",
type: "service_count", type: "service_count",
num: "", num: ""
}, },
{ {
text: "应用总数", text: "应用总数",
...@@ -843,7 +836,7 @@ export default { ...@@ -843,7 +836,7 @@ export default {
bg: "#e5f4fe", bg: "#e5f4fe",
color: "#38aef9", color: "#38aef9",
type: "app_count", type: "app_count",
num: "", num: ""
}, },
{ {
text: "收益总额", text: "收益总额",
...@@ -851,8 +844,8 @@ export default { ...@@ -851,8 +844,8 @@ export default {
bg: "#fcefd6", bg: "#fcefd6",
color: "#ea7d19", color: "#ea7d19",
type: "earnings_money", type: "earnings_money",
num: "", num: ""
}, }
], ],
[ [
{ {
...@@ -861,7 +854,7 @@ export default { ...@@ -861,7 +854,7 @@ export default {
bg: "#e6ebfe", bg: "#e6ebfe",
color: "#515fe7", color: "#515fe7",
type: "org_user", type: "org_user",
num: "", num: ""
}, },
{ {
text: "服务总数", text: "服务总数",
...@@ -869,7 +862,7 @@ export default { ...@@ -869,7 +862,7 @@ export default {
bg: "#e5f4fe", bg: "#e5f4fe",
color: "#38aef9", color: "#38aef9",
type: "service_count", type: "service_count",
num: "", num: ""
}, },
{ {
text: "应用总数", text: "应用总数",
...@@ -877,7 +870,7 @@ export default { ...@@ -877,7 +870,7 @@ export default {
bg: "#e7fdfc", bg: "#e7fdfc",
color: "#25bdb1", color: "#25bdb1",
type: "app_count", type: "app_count",
num: "", num: ""
}, },
{ {
text: "交易总额", text: "交易总额",
...@@ -885,8 +878,8 @@ export default { ...@@ -885,8 +878,8 @@ export default {
bg: "#fcefd6", bg: "#fcefd6",
color: "#ea7d19", color: "#ea7d19",
type: "trade_money", type: "trade_money",
num: "", num: ""
}, }
], ],
[ [
{ {
...@@ -895,7 +888,7 @@ export default { ...@@ -895,7 +888,7 @@ export default {
bg: "#e6ebfe", bg: "#e6ebfe",
color: "#515fe7", color: "#515fe7",
type: "total_user", type: "total_user",
num: "", num: ""
}, },
{ {
text: "服务总数", text: "服务总数",
...@@ -903,7 +896,7 @@ export default { ...@@ -903,7 +896,7 @@ export default {
bg: "#e5f4fe", bg: "#e5f4fe",
color: "#38aef9", color: "#38aef9",
type: "service_count", type: "service_count",
num: "", num: ""
}, },
{ {
text: "应用总数", text: "应用总数",
...@@ -911,7 +904,7 @@ export default { ...@@ -911,7 +904,7 @@ export default {
bg: "#e7fdfc", bg: "#e7fdfc",
color: "#25bdb1", color: "#25bdb1",
type: "app_count", type: "app_count",
num: "", num: ""
}, },
{ {
text: "交易总额", text: "交易总额",
...@@ -919,79 +912,79 @@ export default { ...@@ -919,79 +912,79 @@ export default {
bg: "#fcefd6", bg: "#fcefd6",
color: "#ea7d19", color: "#ea7d19",
type: "trade_money", type: "trade_money",
num: "", num: ""
}, }
], ]
], ],
online_tool_arr: [ online_tool_arr: [
{ {
text: "智能绘图", text: "智能绘图",
pic: require("@/assets/imgs/home_tool_ic_znht.png"), pic: require("@/assets/imgs/home_tool_ic_znht.png"),
bg: "#e5f4fe", bg: "#e5f4fe",
color: "#38aef9", color: "#38aef9"
}, },
{ {
text: "数据开发", text: "数据开发",
pic: require("@/assets/imgs/home_tool_ic_sjkf.png"), pic: require("@/assets/imgs/home_tool_ic_sjkf.png"),
bg: "#e6ebfe", bg: "#e6ebfe",
color: "#515fe7", color: "#515fe7"
}, },
{ {
text: "模型工场", text: "模型工场",
pic: require("@/assets/imgs/home_tool_ic_mxgc.png"), pic: require("@/assets/imgs/home_tool_ic_mxgc.png"),
bg: "#e6ebfe", bg: "#e6ebfe",
color: "#515fe7", color: "#515fe7"
}, },
{ {
text: "流程设计", text: "流程设计",
pic: require("@/assets/imgs/home_tool_ic_lcsj.png"), pic: require("@/assets/imgs/home_tool_ic_lcsj.png"),
bg: "#e6ebfe", bg: "#e6ebfe",
color: "#515fe7", color: "#515fe7"
}, },
{ {
text: "可视化报表", text: "可视化报表",
pic: require("@/assets/imgs/home_tool_ic_kshbb.png"), pic: require("@/assets/imgs/home_tool_ic_kshbb.png"),
bg: "#fff2e2", bg: "#fff2e2",
color: "#ea7d19", color: "#ea7d19"
}, },
{ {
text: "模板应用", text: "模板应用",
pic: require("@/assets/imgs/home_tool_ic_mbyy.png"), pic: require("@/assets/imgs/home_tool_ic_mbyy.png"),
bg: "#fff2e2", bg: "#fff2e2",
color: "#ea7d19", color: "#ea7d19"
}, },
{ {
text: "应用创新", text: "应用创新",
pic: require("@/assets/imgs/home_tool_ic_yycx.png"), pic: require("@/assets/imgs/home_tool_ic_yycx.png"),
bg: "#e7fdfc", bg: "#e7fdfc",
color: "#25bdb1", color: "#25bdb1"
}, }
], ],
service_arr: [ service_arr: [
["服务列表", "申请服务", "云资源"], ["服务列表", "申请服务", "云资源"],
["服务列表", "服务审批", "云资源管理"], ["服务列表", "服务审批", "云资源管理"],
["服务列表", "服务审批", "云资源管理"], ["服务列表", "服务审批", "云资源管理"]
], ],
apptype_arr: [ apptype_arr: [
["应用仓库", "部署的应用"], ["应用仓库", "部署的应用"],
["应用仓库", "应用审批"], ["应用仓库", "应用审批"],
["应用仓库", "应用审批"], ["应用仓库", "应用审批"]
], ],
app_arr: [], app_arr: [],
service_app_count:{}, service_app_count: {},
manage_arr: [ manage_arr: [
{ {
pic: require("@/assets/imgs/home_tool_ic_organize.png"), pic: require("@/assets/imgs/home_tool_ic_organize.png"),
text: "组织管理", text: "组织管理",
role: 1, role: 1,
url:'', url: ""
}, },
{ {
pic: require("@/assets/imgs/home_tool_ic_quanxian.png"), pic: require("@/assets/imgs/home_tool_ic_quanxian.png"),
text: "权限管理", text: "权限管理",
role: 2, role: 2,
url:'/authority/organization' url: "/authority/organization"
}, }
// { // {
// pic: require("@/assets/imgs/home_tool_ic_quanxian.png"), // pic: require("@/assets/imgs/home_tool_ic_quanxian.png"),
// text: "容器管理", // text: "容器管理",
...@@ -1002,50 +995,47 @@ export default { ...@@ -1002,50 +995,47 @@ export default {
// text: "数据管控", // text: "数据管控",
// role: 2, // role: 2,
// }, // },
], ]
}; };
}, },
components: { components: {
tableUm, tableUm,
ListPagination, ListPagination,
dashBoard, dashBoard
}, },
computed: { computed: {
...mapGetters([ ...mapGetters(["level"]),
'level', ...mapState(["userInfo"])
]),
...mapState(['userInfo']),
},
created() {
}, },
created() {},
mounted() { mounted() {
console.log(this.level); console.log(this.level);
if(this.userInfo){ if (this.userInfo) {
this.now_user = this.level this.now_user = this.level;
this.manage_arr[0].url = '/authority/organization/detail/'+this.userInfo.department_id this.manage_arr[0].url =
this.init_func() "/authority/organization/detail/" + this.userInfo.department_id;
}else{ this.init_func();
this.getCurrentUser() } else {
this.getCurrentUser();
} }
}, },
methods: { methods: {
gotopage(id,deploy){ gotopage(id, deploy) {
if(deploy){ if (deploy) {
this.$router.push(this.detailsUrl1[0][1]+deploy) this.$router.push(this.detailsUrl1[0][1] + deploy);
}else{ } else {
this.$router.push(this.detailsUrl1[0][0]+id) this.$router.push(this.detailsUrl1[0][0] + id);
} }
}, },
change_now_app(val){ change_now_app(val) {
this.now_app = val this.now_app = val;
this.currentPage1 = 1 this.currentPage1 = 1;
this.get_app_list() this.get_app_list();
}, },
change_now_type(val){ change_now_type(val) {
this.now_type = val this.now_type = val;
this.currentPage = 1 this.currentPage = 1;
this.get_service_list() this.get_service_list();
}, },
changeCurrentPage(value) { changeCurrentPage(value) {
this.currentPage = value; this.currentPage = value;
...@@ -1055,75 +1045,96 @@ export default { ...@@ -1055,75 +1045,96 @@ export default {
this.currentPage1 = value; this.currentPage1 = value;
this.get_app_list(); this.get_app_list();
}, },
get_app_list(){ get_app_list() {
this.$http this.$http
.get(`${this.app_url_arr[this.now_user][this.now_app]}?page=${this.currentPage1}&limit=${this.now_user==0||this.now_user==4?10000:this.pageSize}`) .get(
.then((response) => { `${this.app_url_arr[this.now_user][this.now_app]}?page=${
if(!response.data.success){ this.currentPage1
return }&limit=${
this.now_user == 0 || this.now_user == 4 ? 10000 : this.pageSize
}`
)
.then(response => {
if (!response.data.success) {
return;
} }
let data = response.data.data; let data = response.data.data;
if(this.now_user==0||this.now_user==4){ if (this.now_user == 0 || this.now_user == 4) {
this.app_arr = data; this.app_arr = data;
}else{ } else {
this.app_data = data this.app_data = data;
this.app_data.forEach(e => { this.app_data.forEach(e => {
if(e.create_date){ if (e.create_date) {
e.create_date = e.create_date.split('.')[0].replace('T'," ") e.create_date = e.create_date.split(".")[0].replace("T", " ");
} }
}); });
this.listTotal1 = response.data.total this.listTotal1 = response.data.total;
} }
}) });
}, },
get_service_list(){ get_service_list() {
this.$http this.$http
.get(`${this.service_url_arr[this.now_user][this.now_type]}?page=${this.currentPage}&size=${this.pageSize}`) .get(
.then((response) => { `${this.service_url_arr[this.now_user][this.now_type]}?page=${
this.currentPage
}&size=${this.pageSize}`
)
.then(response => {
console.log(response); console.log(response);
if(!response.data.success){ if (!response.data.success) {
return return;
} }
let data = response.data.data; let data = response.data.data;
this.service_data = data.data this.service_data = data.data;
this.service_data.forEach(e => { this.service_data.forEach(e => {
if(e.create_time){ if (e.create_time) {
e.create_time = e.create_time.split('+')[0].replace('T'," ") e.create_time = e.create_time.split("+")[0].replace("T", " ");
} }
if(e.service_apply_info&&e.service_apply_info.approval_time){ if (e.service_apply_info && e.service_apply_info.approval_time) {
e.approval_time = helper.dateStringTransform(e.service_apply_info.approval_time) e.approval_time = helper.dateStringTransform(
}else{ e.service_apply_info.approval_time
e.approval_time = '' );
} else {
e.approval_time = "";
} }
if(e.service_apply_info&&e.service_apply_info.apply_time){ if (e.service_apply_info && e.service_apply_info.apply_time) {
e.apply_time = helper.dateStringTransform(e.service_apply_info.apply_time) e.apply_time = helper.dateStringTransform(
}else{ e.service_apply_info.apply_time
e.apply_time = '' );
} else {
e.apply_time = "";
} }
if(e.service_apply_info&&e.service_apply_info.approval_status){ if (e.service_apply_info && e.service_apply_info.approval_status) {
if(this.now_user!==0&&this.now_user!==4){ if (this.now_user !== 0 && this.now_user !== 4) {
e.approval_status = ["-", "已审批", "待审批"][e.service_apply_info.approval_status] e.approval_status = ["-", "已审批", "待审批"][
}else{ e.service_apply_info.approval_status
e.approval_status = ["-", "待审批", "审批中", "审批通过", "审批未通过"][e.service_apply_info.approval_status] ];
} else {
e.approval_status = [
"-",
"待审批",
"审批中",
"审批通过",
"审批未通过"
][e.service_apply_info.approval_status];
} }
}else{ } else {
e.approval_status = '' e.approval_status = "";
} }
}); });
this.listTotal = data.total this.listTotal = data.total;
}) })
.catch(function(response) {}); .catch(function(response) {});
}, },
init_func(){ init_func() {
this.getInfoData(); this.getInfoData();
this.get_service_list() this.get_service_list();
this.get_app_list() this.get_app_list();
this.getUserData(); this.getUserData();
if (this.now_user == 0||this.now_user == 4) { if (this.now_user == 0 || this.now_user == 4) {
this.getHealth(); this.getHealth();
// this.getoperatingdata(); // this.getoperatingdata();
} else if (this.now_user == 1) { } else if (this.now_user == 1) {
...@@ -1143,10 +1154,10 @@ export default { ...@@ -1143,10 +1154,10 @@ export default {
console.log(data.data); console.log(data.data);
console.log("--- user info ---"); 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;
console.log(this.level); console.log(this.level);
this.init_func() this.init_func();
} else { } else {
console.log(data.errMsg); console.log(data.errMsg);
} }
...@@ -1163,12 +1174,15 @@ export default { ...@@ -1163,12 +1174,15 @@ export default {
}, },
getUserData() { getUserData() {
this.person = this.userInfo.user_name; this.person = this.userInfo.user_name;
this.login_time = decodeURIComponent(getCookie('lastLogin')).replace('+',' '); this.login_time = decodeURIComponent(getCookie("lastLogin")).replace(
"+",
" "
);
}, },
getoperatingdata() { getoperatingdata() {
this.$http this.$http
.get("/apaas/service/v3/workplace/statistics/business") .get("/apaas/service/v3/workplace/statistics/business")
.then((response) => { .then(response => {
console.log(response); console.log(response);
let data = response.data.data; let data = response.data.data;
this.init_yy( this.init_yy(
...@@ -1180,29 +1194,41 @@ export default { ...@@ -1180,29 +1194,41 @@ export default {
}) })
.catch(function(response) {}); .catch(function(response) {});
}, },
change_service_app(val){ change_service_app(val) {
console.log(val); console.log(val);
if(val == 0){ if (val == 0) {
this.init_fwyy(this.service_app_count.serviceData.xAxisData, this.service_app_count.serviceData.seriesData,val); this.init_fwyy(
}else{ this.service_app_count.serviceData.xAxisData,
this.init_fwyy(this.service_app_count.appData.xAxisData, this.service_app_count.appData.seriesData,val); this.service_app_count.serviceData.seriesData,
val
);
} else {
this.init_fwyy(
this.service_app_count.appData.xAxisData,
this.service_app_count.appData.seriesData,
val
);
} }
}, },
getappusedata() { getappusedata() {
this.$http this.$http
.get("/apaas/service/v3/workplace/statistics/serviceapp/count/trend") .get("/apaas/service/v3/workplace/statistics/serviceapp/count/trend")
.then((response) => { .then(response => {
console.log(response); console.log(response);
let data = response.data.data; let data = response.data.data;
this.service_app_count = data this.service_app_count = data;
this.init_fwyy(this.service_app_count.serviceData.xAxisData, this.service_app_count.serviceData.seriesData,this.fw_value); this.init_fwyy(
this.service_app_count.serviceData.xAxisData,
this.service_app_count.serviceData.seriesData,
this.fw_value
);
}) })
.catch(function(response) {}); .catch(function(response) {});
}, },
getfwlxdata() { getfwlxdata() {
this.$http this.$http
.get("/apaas/service/v3/workplace/statistics/service/type") .get("/apaas/service/v3/workplace/statistics/service/type")
.then((response) => { .then(response => {
console.log(response); console.log(response);
let data = response.data.data; let data = response.data.data;
this.init_fwlx_asy(data.seriesData); this.init_fwlx_asy(data.seriesData);
...@@ -1212,9 +1238,9 @@ export default { ...@@ -1212,9 +1238,9 @@ export default {
getyylxdata() { getyylxdata() {
this.$http this.$http
.get("/apaas/hubApi/index/appTypesAnalysis") .get("/apaas/hubApi/index/appTypesAnalysis")
.then((response) => { .then(response => {
console.log(response); console.log(response);
if(response.data.success){ if (response.data.success) {
let data = response.data.data; let data = response.data.data;
this.init_yylx_asy(data.series[0].data); this.init_yylx_asy(data.series[0].data);
} }
...@@ -1224,10 +1250,14 @@ export default { ...@@ -1224,10 +1250,14 @@ export default {
getHealth() { getHealth() {
this.$http this.$http
.get("/apaas/service/v3/workplace/statistics/health/status") .get("/apaas/service/v3/workplace/statistics/health/status")
.then((response) => { .then(response => {
console.log(response); console.log(response);
let data = response.data.data; let data = response.data.data;
var temp = Math.round(data.seriesData[0].value/(data.seriesData[0].value+data.seriesData[1].value)*100) var temp = Math.round(
(data.seriesData[0].value /
(data.seriesData[0].value + data.seriesData[1].value)) *
100
);
console.log(temp); console.log(temp);
this.init_health(temp); this.init_health(temp);
}) })
...@@ -1236,16 +1266,12 @@ export default { ...@@ -1236,16 +1266,12 @@ export default {
getInfoData() { getInfoData() {
this.$http this.$http
.get("/apaas/service/v3/workplace/statistics/basic") .get("/apaas/service/v3/workplace/statistics/basic")
.then((response) => { .then(response => {
console.log(response); console.log(response);
let data = response.data.data; let data = response.data.data;
this.menu_arr[this.now_user].forEach((e, idx) => { this.menu_arr[this.now_user].forEach((e, idx) => {
if (data[e.type]||data[e.type]==0) { if (data[e.type] || data[e.type] == 0) {
this.$set( this.$set(this.menu_arr[this.now_user][idx], "num", data[e.type]);
this.menu_arr[this.now_user][idx],
"num",
data[e.type]
);
} }
}); });
}) })
...@@ -1257,7 +1283,7 @@ export default { ...@@ -1257,7 +1283,7 @@ export default {
}, },
manage_func(n) { manage_func(n) {
console.log(n); console.log(n);
this.$router.push(n) this.$router.push(n);
}, },
init_health(num) { init_health(num) {
var options = { var options = {
...@@ -1266,15 +1292,15 @@ export default { ...@@ -1266,15 +1292,15 @@ export default {
textStyle: { textStyle: {
color: "#000", color: "#000",
fontSize: 40, fontSize: 40,
fontWeight: 200, fontWeight: 200
}, },
subtext: "健康占比", subtext: "健康占比",
subtextStyle: { subtextStyle: {
color: "#c9cedd", color: "#c9cedd"
}, },
itemGap: -10, // 主副标题距离 itemGap: -10, // 主副标题距离
left: "center", left: "center",
top: "center", top: "center"
}, },
angleAxis: { angleAxis: {
max: 100, // 满分 max: 100, // 满分
...@@ -1282,37 +1308,37 @@ export default { ...@@ -1282,37 +1308,37 @@ export default {
startAngle: 90, startAngle: 90,
// 隐藏刻度线 // 隐藏刻度线
axisLine: { axisLine: {
show: false, show: false
}, },
axisTick: { axisTick: {
show: false, show: false
}, },
axisLabel: { axisLabel: {
show: false, show: false
}, },
splitLine: { splitLine: {
show: false, show: false
}, }
}, },
radiusAxis: { radiusAxis: {
type: "category", type: "category",
// 隐藏刻度线 // 隐藏刻度线
axisLine: { axisLine: {
show: false, show: false
}, },
axisTick: { axisTick: {
show: false, show: false
}, },
axisLabel: { axisLabel: {
show: false, show: false
}, },
splitLine: { splitLine: {
show: false, show: false
}, }
}, },
polar: { polar: {
center: ["50%", "50%"], center: ["50%", "50%"],
radius: "140%", //图形大小 radius: "140%" //图形大小
}, },
series: [ series: [
{ {
...@@ -1326,17 +1352,17 @@ export default { ...@@ -1326,17 +1352,17 @@ export default {
normal: { normal: {
color: "#e56600", color: "#e56600",
shadowColor: "rgba(0, 0, 0, 0.2)", shadowColor: "rgba(0, 0, 0, 0.2)",
shadowBlur: 20, shadowBlur: 20
}, }
}, }
}, }
], ],
coordinateSystem: "polar", coordinateSystem: "polar",
roundCap: true, roundCap: true,
barWidth: 10, barWidth: 10,
barGap: "-100%", // 两环重叠 barGap: "-100%", // 两环重叠
z: 2, z: 2
}, },
{ {
// 灰色环 // 灰色环
...@@ -1348,17 +1374,17 @@ export default { ...@@ -1348,17 +1374,17 @@ export default {
itemStyle: { itemStyle: {
color: "#c9cedd", color: "#c9cedd",
shadowColor: "rgba(0, 0, 0, 0.2)", shadowColor: "rgba(0, 0, 0, 0.2)",
shadowBlur: 20, shadowBlur: 20
}, }
}, }
], ],
coordinateSystem: "polar", coordinateSystem: "polar",
roundCap: true, roundCap: true,
barWidth: 10, barWidth: 10,
barGap: "-100%", // 两环重叠 barGap: "-100%", // 两环重叠
z: 1, z: 1
}, }
], ]
}; };
window[this.health] = echarts.init(document.getElementById(this.health)); window[this.health] = echarts.init(document.getElementById(this.health));
window[this.health].setOption(options, true); window[this.health].setOption(options, true);
...@@ -1383,28 +1409,28 @@ export default { ...@@ -1383,28 +1409,28 @@ export default {
white: { white: {
color: "#ddd", color: "#ddd",
align: "center", align: "center",
padding: [3, 0], padding: [3, 0]
}, }
}; };
var placeHolderStyle = { var placeHolderStyle = {
normal: { normal: {
label: { label: {
show: false, show: false
}, },
labelLine: { labelLine: {
show: false, show: false
}, },
color: "rgba(0, 0, 0, 0)", color: "rgba(0, 0, 0, 0)",
borderColor: "rgba(0, 0, 0, 0)", borderColor: "rgba(0, 0, 0, 0)",
borderWidth: 0, borderWidth: 0
}, }
}; };
var data = []; var data = [];
var color = ["#515fe7", "#36a5ec", "#da9f2a", "#23b2a7", "#d46002"]; var color = ["#515fe7", "#36a5ec", "#da9f2a", "#23b2a7", "#d46002"];
var legendarr = []; var legendarr = [];
var temp2_data = 0 var temp2_data = 0;
data_val.forEach(e => { data_val.forEach(e => {
temp2_data = temp2_data + e.value temp2_data = temp2_data + e.value;
}); });
for (var i = 0; i < data_val.length; i++) { for (var i = 0; i < data_val.length; i++) {
data.push( data.push(
...@@ -1416,14 +1442,14 @@ export default { ...@@ -1416,14 +1442,14 @@ export default {
borderWidth: 5, borderWidth: 5,
shadowBlur: 20, shadowBlur: 20,
borderColor: color[i], borderColor: color[i],
shadowColor: color[i], shadowColor: color[i]
}, }
}, }
}, },
{ {
value: temp2_data/10, value: temp2_data / 10,
name: "", name: "",
itemStyle: placeHolderStyle, itemStyle: placeHolderStyle
} }
); );
legendarr.push(data_val[i].name); legendarr.push(data_val[i].name);
...@@ -1455,18 +1481,18 @@ export default { ...@@ -1455,18 +1481,18 @@ export default {
return ""; return "";
} }
}, },
rich: rich, rich: rich
}, }
}, }
},
data: data,
}, },
data: data
}
]; ];
var options = { var options = {
color: color, color: color,
tooltip: { tooltip: {
show: false, show: false
}, },
legend: { legend: {
bottom: -5, bottom: -5,
...@@ -1475,13 +1501,13 @@ export default { ...@@ -1475,13 +1501,13 @@ export default {
itemHeight: 10, itemHeight: 10,
orient: "horizontal", orient: "horizontal",
data: legendarr, data: legendarr,
backgroundColor: "#f4f7fc", backgroundColor: "#f4f7fc"
}, },
toolbox: { toolbox: {
show: false, show: false
}, },
series: seriesObj, series: seriesObj
}; };
return options; return options;
}, },
...@@ -1494,28 +1520,28 @@ export default { ...@@ -1494,28 +1520,28 @@ export default {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
axisPointer: { axisPointer: {
type: "cross", type: "cross"
}, }
}, },
grid: { grid: {
top: "20", top: "20",
bottom: "45", bottom: "45"
}, },
legend: { legend: {
data: ["服务调用总数", "应用部署总数", "收益总额"], data: ["服务调用总数", "应用部署总数", "收益总额"],
bottom: 0, bottom: 0,
itemWidth: 10, itemWidth: 10,
itemHeight: 10, itemHeight: 10,
backgroundColor: "#f4f7fc", backgroundColor: "#f4f7fc"
}, },
xAxis: [ xAxis: [
{ {
type: "category", type: "category",
axisTick: { axisTick: {
alignWithLabel: true, alignWithLabel: true
},
data: xarr,
}, },
data: xarr
}
], ],
yAxis: [ yAxis: [
{ {
...@@ -1525,9 +1551,9 @@ export default { ...@@ -1525,9 +1551,9 @@ export default {
position: "right", position: "right",
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: colors[1], color: colors[1]
}, }
}, }
}, },
{ {
type: "value", type: "value",
...@@ -1536,10 +1562,10 @@ export default { ...@@ -1536,10 +1562,10 @@ export default {
position: "left", position: "left",
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: colors[1], color: colors[1]
}, }
}, }
}, }
], ],
series: [ series: [
{ {
...@@ -1549,9 +1575,9 @@ export default { ...@@ -1549,9 +1575,9 @@ export default {
data: service, data: service,
itemStyle: { itemStyle: {
barBorderRadius: 6, barBorderRadius: 6,
color: colors[2], color: colors[2]
}, },
barWidth: 12, barWidth: 12
}, },
{ {
name: "应用部署总数", name: "应用部署总数",
...@@ -1560,9 +1586,9 @@ export default { ...@@ -1560,9 +1586,9 @@ export default {
data: app, data: app,
itemStyle: { itemStyle: {
barBorderRadius: 6, barBorderRadius: 6,
color: colors[0], color: colors[0]
}, },
barWidth: 12, barWidth: 12
}, },
{ {
name: "收益总额", name: "收益总额",
...@@ -1570,59 +1596,59 @@ export default { ...@@ -1570,59 +1596,59 @@ export default {
yAxisIndex: 0, yAxisIndex: 0,
data: get, data: get,
itemStyle: { itemStyle: {
color: colors[0], color: colors[0]
}, },
symbol: "circle", symbol: "circle"
}, }
], ]
}; };
window[this.yy_asy] = echarts.init(document.getElementById(this.yy_asy)); window[this.yy_asy] = echarts.init(document.getElementById(this.yy_asy));
window[this.yy_asy].setOption(options, true); window[this.yy_asy].setOption(options, true);
}, },
init_fwyy(xarr, yarr,n) { init_fwyy(xarr, yarr, n) {
var dataname = ["服务总数", "应用总数"]; var dataname = ["服务总数", "应用总数"];
var options = { var options = {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
axisPointer: { axisPointer: {
label: { label: {
backgroundColor: "#fff", backgroundColor: "#fff"
}, }
}, }
}, },
legend: { legend: {
data: [dataname[n]], data: [dataname[n]],
itemWidth: 14, itemWidth: 14,
itemHeight: 10, itemHeight: 10,
bottom: 0, bottom: 0
}, },
grid: { grid: {
borderColor: "#f2f2f2", borderColor: "#f2f2f2",
top: 20, top: 20,
bottom: 45, bottom: 45,
right: 0, right: 0
}, },
xAxis: { xAxis: {
type: "category", type: "category",
axisTick: { show: false }, axisTick: { show: false },
axisLine: { show: false }, axisLine: { show: false },
nameTextStyle: { nameTextStyle: {
color: "#0d1847", color: "#0d1847"
}, },
data: xarr, data: xarr
}, },
yAxis: { yAxis: {
type: "value", type: "value",
axisLine: { axisLine: {
show: false, show: false,
lineStyle: { lineStyle: {
color: "#c9cedd", color: "#c9cedd"
}, }
}, },
axisTick: { show: false }, axisTick: { show: false },
nameTextStyle: { nameTextStyle: {
color: "#f2f2f2", color: "#f2f2f2"
}, }
}, },
series: [ series: [
{ {
...@@ -1633,27 +1659,27 @@ export default { ...@@ -1633,27 +1659,27 @@ export default {
sampling: "average", sampling: "average",
symbol: "circle", symbol: "circle",
itemStyle: { itemStyle: {
color: "#0a92c4", color: "#0a92c4"
}, },
areaStyle: { areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ {
offset: 0, offset: 0,
color: "#0a92c4", color: "#0a92c4"
}, },
{ {
offset: 1, offset: 1,
color: "#ffe", color: "#ffe"
}, }
]), ])
}, }
}, }
], ]
}; };
window[this.fwyy] = echarts.init(document.getElementById(this.fwyy)); window[this.fwyy] = echarts.init(document.getElementById(this.fwyy));
window[this.fwyy].setOption(options, true); window[this.fwyy].setOption(options, true);
}, }
}, }
}; };
</script> </script>
......
...@@ -54,3 +54,27 @@ module.exports.dateStringTransform = function (date) { ...@@ -54,3 +54,27 @@ module.exports.dateStringTransform = function (date) {
return date; return date;
} }
} }
module.exports.downloadFileFormat = function (fileUrl) {
/*
input: /apaas/static/docs/image/images/1234.png
output: 1234.png
*/
if (fileUrl != "") {
return fileUrl.substring(fileUrl.lastIndexOf("/") + 1);
} else {
return "";
}
}
module.exports.numberFormat = function (num, decimals) {
/*
input: 10000 1000
output: 10 1000
*/
if (num > 10000) {
return Math.floor(num / 10000).toFixed(decimals);
} else {
return num;
}
}
\ No newline at end of file
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