Commit 69ff4a9c authored by 刘殿昕's avatar 刘殿昕

我的服务接口,差俩,云服务升级id,感觉应用的字段名和服务不一样。。。。

parent a47b2b59
......@@ -10,8 +10,8 @@ export default {
type: Object,
default: () => {
return {
xaxis: [],
data: []
legendData: [],
seriesData: []
};
}
},
......@@ -56,7 +56,7 @@ export default {
xAxis: [
{
type: "category",
data: self.data.xaxis,
data: self.data.legendData,
axisLabel: {
margin: 20,
color: "#0d1847",
......@@ -84,13 +84,13 @@ export default {
show: false
},
splitArea: {
show: self.show_split,
interval: 0,
show: true,
areaStyle: {
color: ["#f4f5fd", "#fff"],
color: ["#fff", "#f8f9fd"],
opacity: 0.5
}
}
},
interval: 0
},
}
],
yAxis: [
......@@ -101,6 +101,7 @@ export default {
fontSize: 12
}
},
minInterval: 1,
axisLine: {
lineStyle: {
color: "rgba(0, 0, 0, 0)"
......@@ -120,7 +121,7 @@ export default {
series: [
{
type: "bar",
data: self.data.data,
data: self.data.seriesData,
barWidth: self.bar_width,
itemStyle: {
normal: {
......
<template>
<ul class="comments_list apass_scroll">
<li
class="comment_card"
v-for="(item, index) in data"
:key="'comment_' + index"
>
<li class="comment_card" v-for="(item, index) in data" :key="'comment_' + index">
<div class="comment-left">
<el-avatar :size="45" fit="cover" :src="item.picture_path" />
<el-avatar :size="45" fit="cover" :src="item.message" />
</div>
<div class="comment-right">
<p class="comment-base">
<span
class="comment-user_name text_clip"
v-text="item.user_name"
></span>
<span
class="comment-time text_clip"
v-text="getTimeText(item.add_time || '')"
></span>
<span class="comment-user_name text_clip" v-text="item.message"></span>
<span class="comment-time text_clip" v-text="getTimeText(item.add_time || '')"></span>
</p>
<div class="commnet-rate">
<el-rate
......@@ -25,10 +15,9 @@
:value="item.score"
disabled
score-template="{value}"
>
</el-rate>
></el-rate>
</div>
<p class="comment-description" v-text="item.content"></p>
<p class="comment-description" v-text="item.message"></p>
</div>
</li>
</ul>
......@@ -41,14 +30,48 @@ export default {
props: {
data: {
type: Array,
required: true,
},
required: true
}
},
methods: {
getTimeText(time) {
return helper.dateStringTransform(time);
},
autoScroll() {
if (this.timer) {
clearInterval(this.timer);
}
this.$el.scrollTop = 0;
this.timer = setInterval(() => {
let curScrollTop = this.$el.scrollTop + 50;
if (curScrollTop > this.$el.scrollHeight - this.$el.clientHeight) {
curScrollTop = 0;
}
this.$el.scrollTop = curScrollTop;
}, 1500);
},
mouseenter() {
if (this.timer) {
clearInterval(this.timer);
}
},
mouseleave() {
this.autoScroll();
}
},
mounted() {
this.autoScroll();
window.addEventListener("resize", () => {
this.autoScroll();
});
},
destroyed() {
if (this.timer) {
clearInterval(this.timer);
}
}
};
</script>
......
......@@ -10,13 +10,16 @@ export default {
type: Object,
default: () => {
return {
xaxis: [],
legend: {
data: []
},
data: [],
legend: []
series: [{ data: [] }, { data: [] }]
};
}
}
},
watch: {},
data: () => ({}),
mounted() {},
methods: {
......@@ -30,7 +33,7 @@ export default {
icon: "roundRect",
itemWidth: 10,
itemHeight: 10,
data: self.data.legend,
data: self.data.legend.data,
orient: "horizontal",
backgroundColor: "#f4f7fc"
},
......@@ -44,7 +47,7 @@ export default {
xAxis: [
{
type: "category",
data: self.data.xaxis,
data: self.data.data,
axisLine: {
lineStyle: {
color: "#f2f2f2"
......@@ -55,8 +58,7 @@ export default {
color: "#0d1847",
textStyle: {
fontSize: 12
},
interval: 0
}
},
boundaryGap: false
}
......@@ -67,6 +69,7 @@ export default {
axisTick: {
show: false
},
minInterval: 1,
axisLine: {
lineStyle: {
color: "rgba(0, 0, 0, 0)"
......@@ -88,9 +91,9 @@ export default {
],
series: [
{
name: self.data.legend[0],
name: self.data.legend.data[0],
type: "line",
data: self.data.data[0],
data: self.data.series[0].data,
symbolSize: 1,
symbol: "circle",
smooth: true,
......@@ -105,9 +108,9 @@ export default {
}
},
{
name: self.data.legend[1],
name: self.data.legend.data[1],
type: "line",
data: self.data.data[1],
data: self.data.series[1].data,
symbolSize: 1,
symbol: "circle",
smooth: true,
......
......@@ -80,7 +80,7 @@ export default {
show: true,
interval: 0,
areaStyle: {
color: ["#f4f5fd", "#fff"],
color: ["#fff", "#f8f9fd"],
opacity: 0.5,
},
},
......
......@@ -6,21 +6,48 @@
import uuidv1 from "uuid/v1";
var echarts = require("echarts");
export default {
props: ['data'],
props: {
data: {
type: Object,
default: () => {
return {
xAxisData: [],
seriesData: [
{
name: "",
data: []
},
{
name: "",
data: []
}
]
};
}
},
targetValue: {
type: Number,
default: () => 0
}
},
components: {},
data() {
return {
line: uuidv1(),
line: uuidv1()
};
},
watch: {},
watch: {
data() {
this.init_line_charts(this.data.xAxisData, this.data.seriesData);
}
},
computed: {},
created() {},
mounted() {
this.init_line_charts(this.data.xaxis,this.data.data)
this.init_line_charts(this.data.xAxisData, this.data.seriesData);
},
methods: {
init_line_charts(xAxisData,yarr) {
init_line_charts(xAxisData, yarr) {
let bgColor = "#fff";
let color = [
"#0090FF",
......@@ -28,7 +55,7 @@ export default {
"#FFC005",
"#FF515A",
"#8B5CFF",
"#00CA69",
"#00CA69"
];
const hexToRgba = (hex, opacity) => {
let rgbaColor = "";
......@@ -41,56 +68,54 @@ export default {
return rgbaColor;
};
var series = []
var series = [];
yarr.forEach((e,idx) => {
series.push(
{
name: e.name,
type: "line",
smooth: true,
showSymbol: false,
// symbolSize: 8,
zlevel: 3,
lineStyle: {
normal: {
color: color[idx],
shadowBlur: 5,
shadowColor: hexToRgba(color[idx], 0.5),
shadowOffsetY: 10,
},
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: hexToRgba(color[idx], 0.3),
},
{
offset: 1,
color: hexToRgba(color[idx], 0.1),
},
],
false
),
shadowColor: hexToRgba(color[idx], 0.1),
shadowBlur: 10,
},
},
emphasis: {
itemStyle: {
borderWidth: 5,
},
},
data: e.arr,
yarr.forEach((e, idx) => {
series.push({
name: e.name,
type: "line",
smooth: true,
showSymbol: false,
// symbolSize: 8,
zlevel: 3,
lineStyle: {
normal: {
color: color[idx],
shadowBlur: 5,
shadowColor: hexToRgba(color[idx], 0.5),
shadowOffsetY: 10
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: hexToRgba(color[idx], 0.3)
},
{
offset: 1,
color: hexToRgba(color[idx], 0.1)
}
],
false
),
shadowColor: hexToRgba(color[idx], 0.1),
shadowBlur: 10
}
},
emphasis: {
itemStyle: {
borderWidth: 5
}
},
)
data: e.data
});
});
var option = {
......@@ -104,23 +129,23 @@ export default {
itemHeight: 10,
icon: "roundRect",
orient: "horizontal",
backgroundColor: "#f4f7fc",
backgroundColor: "#f4f7fc"
},
tooltip: {
trigger: "axis",
axisPointer: {
lineStyle: {
color: "#c3caf8",
width: 2,
},
},
width: 2
}
}
},
grid: {
top: 10,
left:10,
right:30,
bottom:30,
containLabel: true,
left: 10,
right: 30,
bottom: 30,
containLabel: true
},
xAxis: [
{
......@@ -128,22 +153,24 @@ export default {
boundaryGap: false, //是否从起点开始画
axisLabel: {
textStyle: {
color: "#0d1847",
},
color: "#0d1847"
}
},
axisLine: {
lineStyle: {
color: "#D9D9D9",
},
color: "#D9D9D9"
}
},
splitArea: {
show: true,
areaStyle: {
color: ["#fff", "#f8f9fd"],
opacity: 0.5
},
interval: 0
},
data: xAxisData,
},
data: xAxisData
}
],
yAxis: [
{
......@@ -151,36 +178,37 @@ export default {
axisLabel: {
textStyle: {
color: "#a9aec0",
fontSize: 16,
},
fontSize: 16
}
},
nameTextStyle: {
color: "#666",
fontSize: 12,
lineHeight: 40,
lineHeight: 40
},
splitLine: {
lineStyle: {
color: "#f2f2f2",
},
color: "#f2f2f2"
}
},
minInterval: 1,
axisLine: {
// show: false,
lineStyle: {
color: "#e3e5ef",
},
color: "#e3e5ef"
}
},
axisTick: {
show: false,
},
},
show: false
}
}
],
series: series,
series: series
};
window[this.line] = echarts.init(document.getElementById(this.line));
window[this.line].setOption(option, true);
},
},
}
}
};
</script>
......
......@@ -32,7 +32,13 @@ export default {
yylx_asy: uuidv1()
};
},
watch: {},
watch: {
data: {
handler() {
this.init_yylx_asy(this.data, this.text);
}
}
},
computed: {},
created() {},
mounted() {
......@@ -107,7 +113,7 @@ export default {
type: "pie",
clockWise: false,
radius: [65, 68],
center: ["51%", "50%"],
center: ["50%", "50%"],
hoverAnimation: false,
itemStyle: {
normal: {
......@@ -117,8 +123,7 @@ export default {
color: "#58617a",
formatter: params => {
var percent = 0;
percent = ((params.value / total) * 100).toFixed(2);
percent = total != 0 ? ((params.value / total) * 100).toFixed(2) : 0;
if (params.name !== "") {
return percent + "%";
} else {
......
......@@ -6,37 +6,55 @@
import uuidv1 from "uuid/v1";
var echarts = require("echarts");
export default {
props: ['data'],
props: {
data: {
type: Object,
default: () => {
return {
num: 0,
color: "#e15260",
text: "敏感"
};
}
}
},
components: {},
data() {
return {
health: uuidv1(),
health: uuidv1()
};
},
watch: {},
watch: {
data: {
handler(val) {
console.log(val);
this.init_health(this.data.num, this.data.color, this.data.text);
}
}
},
computed: {},
created() {},
mounted() {
this.init_health(this.data.num,this.data.color,this.data.text);
this.init_health(this.data.num, this.data.color, this.data.text);
},
methods: {
init_health(num,color,text) {
init_health(num, color, text) {
var options = {
title: {
text: num + "%",
textStyle: {
color: "#000",
fontSize: 26,
fontWeight: 200,
fontWeight: 200
},
subtext: text,
subtextStyle: {
color: "#707693",
fontSize: 12,
fontSize: 12
},
itemGap: 0, // 主副标题距离
left: "center",
top: "center",
top: "center"
},
angleAxis: {
max: 100, // 满分
......@@ -44,37 +62,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: [
{
......@@ -88,17 +106,17 @@ export default {
normal: {
color: color,
shadowColor: "rgba(0, 0, 0, 0.2)",
shadowBlur: 20,
},
},
},
shadowBlur: 20
}
}
}
],
coordinateSystem: "polar",
roundCap: true,
barWidth: 8,
barGap: "-100%", // 两环重叠
z: 2,
z: 2
},
{
// 灰色环
......@@ -110,22 +128,22 @@ export default {
itemStyle: {
color: "#c9cedd",
shadowColor: "rgba(0, 0, 0, 0.2)",
shadowBlur: 20,
},
},
shadowBlur: 20
}
}
],
coordinateSystem: "polar",
roundCap: true,
barWidth: 8,
barGap: "-100%", // 两环重叠
z: 1,
},
],
z: 1
}
]
};
window[this.health] = echarts.init(document.getElementById(this.health));
window[this.health].setOption(options, true);
},
},
}
}
};
</script>
......
<template>
<div
class="top_list apass_scroll"
@mouseenter="mouseenter"
@mouseleave="mouseleave"
>
<div class="top_list apass_scroll" @mouseenter="mouseenter" @mouseleave="mouseleave">
<ul>
<li class="item_list" v-for="(option, index) in options" :key="index">
<div class="item_index">
<span v-text="'TOP' + (index + 1)"></span>
</div>
<div class="item_logo">
<el-avatar shape="square" :size="28" fit="cover" :src="option.logo" />
<el-avatar shape="square" :size="28" fit="cover" :src="option.cover" />
</div>
<div class="item_detail">
<p class="item_info">
<span class="text_clip">
{{ option.name }}
<span
class="text_clip is_link"
@click="getDetail(option.service_id, option.data_service_type1)"
>
{{ option.service_name }}
<i class="el-icon-arrow-right"></i>
</span>
<span v-text="option.value + (option.unit || '次')"></span>
<span
v-text="helper.numberFormat(option.request_count, 2) + (option.request_count > 10000 ? '万次' : '次')"
></span>
</p>
<el-progress
class="item_progress"
:percentage="getPercent(option.value)"
:percentage="getPercent(option.request_count)"
:show-text="false"
color="#e56600"
></el-progress>
......@@ -33,30 +34,36 @@
</template>
<script>
import helper from "@/services/helper";
export default {
props: {
options: {
type: Array,
default: () => [],
default: () => []
},
targetValue: {
type: Number,
default: () => 1000,
},
default: () => 0
}
},
data() {
return {
timer: null,
helper
};
},
watch: {
text() {
this.autoScroll();
},
}
},
methods: {
getPercent(value) {
return Math.min((value / this.targetValue) * 100, 100);
if (value == 0) {
return 0;
} else {
return Math.min((value / this.targetValue) * 100, 100);
}
},
autoScroll() {
if (this.timer) {
......@@ -81,10 +88,28 @@ export default {
mouseleave() {
this.autoScroll();
},
getDetail(id, type) {
switch (type) {
case 5:
this.$router.push(`/shop/sjfwDetail/${id}`);
break;
case 6:
this.$router.push(`/shop/skfwDetail/${id}`);
break;
case 21:
this.$router.push(`/shop/zhfwDetail/${id}`);
break;
default:
this.$message({
message: "查看详情失败",
type: "warning"
});
break;
}
}
},
mounted() {
this.autoScroll();
window.addEventListener("resize", () => {
this.autoScroll();
});
......@@ -93,7 +118,7 @@ export default {
if (this.timer) {
clearInterval(this.timer);
}
},
}
};
</script>
......@@ -151,4 +176,7 @@ export default {
.item_progress {
margin-top: 6px;
}
.is_link {
cursor: pointer;
}
</style>
......@@ -10,6 +10,7 @@
访问地址:
<a :href="item.info" target="_blank">{{ item.info }}</a>
</span>
<span v-else-if="item.type == 'time'">{{ helper.dateStringTransform(item.info) }}</span>
<span v-else v-html="item.info" style="white-space:pre-wrap;"></span>
<span
v-if="item.type && item.type == 'down' && item.url != ''"
......
......@@ -4,10 +4,10 @@
<li v-for="(item, index) in menuList" :key="index" @click="active(item.visit_url)">
<img
v-if="item.visit_url == actives"
:src="item.active != '' ? require('../assets/imgs/' + item.active + '.png') : ''"
:src="item.active != '' ? require('@/assets/imgs/' + item.active + '.png') : ''"
class="menu_img"
/>
<img v-else :src="require('../assets/imgs/' + item.default + '.png')" class="menu_img" />
<img v-else :src="require('@/assets/imgs/' + item.default + '.png')" class="menu_img" />
<span
:class="item.visit_url == actives ? 'menu_item_active':'menu_item'"
>{{ item.menu_name }}</span>
......
......@@ -255,7 +255,7 @@
v-for="(item, index) in workSpaceOptions"
:key="index"
:label="item.namespace"
:value="index"
:value="id"
></el-option>
</el-select>
</div>
......@@ -1046,7 +1046,7 @@ export default {
});
} else {
let query = {
resource_id: this.paramsOld.id,
resource_id: this.workSpace,
resource_apply: {
apply_file: this.formOld.apply_file,
cpu: Number(this.formOld.cpu),
......
......@@ -280,7 +280,7 @@ export default {
label: "时空服务"
},
{
id: "level2",
id: "level3",
x: legendX,
y: legendBeginY + legendYPadding * 2,
type: "image",
......@@ -289,7 +289,7 @@ export default {
label: "视频服务"
},
{
id: "level2",
id: "level4",
x: legendX,
y: legendBeginY + legendYPadding * 3,
type: "image",
......@@ -298,7 +298,7 @@ export default {
label: "感知服务"
},
{
id: "level2",
id: "level5",
x: legendX,
y: legendBeginY + legendYPadding * 4,
type: "image",
......
This diff is collapsed.
......@@ -12,7 +12,7 @@
</template>
<script>
import ServiceShopMenu from "@/components/service_shop_menu";
import ServiceShopMenu from "@/components/service-list/service_shop_menu";
import ShopCloud from "@/components/shop-cloud/shop-cloud";
export default {
components: {
......
......@@ -12,7 +12,7 @@
</template>
<script>
import ServiceShopMenu from "@/components/service_shop_menu";
import ServiceShopMenu from "@/components/service-list/service_shop_menu";
import ServiceList from "@/components/service-list/service_list";
export default {
components: {
......
......@@ -258,6 +258,7 @@ export default {
arr: [
{
title: "审批时间:",
type: "time",
info: ""
},
{
......@@ -280,6 +281,7 @@ export default {
arr: [
{
title: "审批时间:",
type: "time",
info: ""
},
{
......@@ -302,6 +304,7 @@ export default {
arr: [
{
title: "审批时间:",
type: "time",
info: ""
},
{
......
import workbench from '@/request/api/workbench';
import serviceShop from '@/request/api/service_shop';
import serviceShop from '@/request/api/service-shop';
import user from '@/request/api/user';
import authority from '@/request/api/authority';
import general from '@/request/api/general';
import dataAnalysis from '@/request/api/data-analysis';
export default {
workbench,
serviceShop,
user,
authority,
general
general,
dataAnalysis
}
\ No newline at end of file
import axios from '@/request/http'; // 导入http中创建的axios实例
import qs from 'qs'; // 根据需求是否导入qs模块
const dataAnalysis = {
// Data Analysis
// service
getServiceOverview() {
return axios.get(`/apaas/service/v3/statistics/normal/service/basic`);
},
getServiceHealth() {
return axios.get(`/apaas/service/v3/statistics/normal/service/health`);
},
getServiceTrend(params) {
return axios.get(`/apaas/service/v3/statistics/normal/service/trend?type=${params.type == 0 ? 'week' : 'mon'}`);
},
getServiceType(params) {
return axios.get(`/apaas/service/v3/statistics/normal/service/type/${params.type == 0 ? 'register' : 'apply'}`);
},
getServiceSectorse(params) {
return axios.get(`/apaas/service/v3/statistics/normal/service/sectors/${params.type == 0 ? 'register' : 'apply'}`);
},
getServiceOrg() {
return axios.get(`/apaas/service/v3/statistics/normal/service/org`);
},
getServiceOpenness(params) {
return axios.get(`/apaas/service/v3/statistics/normal/service/openness/${params.type == 0 ? 'register' : 'apply'}`);
},
getServiceRequest(params) {
return axios.get(`/apaas/service/v3/statistics/normal/service/request/${params.type == 0 ? 'register' : 'apply'}`);
},
getServiceOnlineState(params) {
return axios.get(`/apaas/service/v3/statistics/normal/service/onlinestate/${params.type == 0 ? 'day14' : 'day30'}`);
},
getServiceEstimated(params) {
return axios.get(`/apaas/service/v3/statistics/normal/service/estimated/${params.type == 0 ? 'all' : 'scoremap'}?last_id=${params.last_id}`);
},
}
export default dataAnalysis;
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