Commit 4f146238 authored by 刘殿昕's avatar 刘殿昕

helper下载、数字,订单列表,详情云样式

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