Commit af7eba95 authored by 张俊's avatar 张俊

合并

parents b5df3aae 6d6037ba
......@@ -20,13 +20,15 @@
</el-rate>
</div>
<p class="comment-description" v-text="item.content"></p>
<p class="comment-time" v-text="item.add_time"></p>
<p class="comment-time" v-text="getTimeText(item.add_time || '')"></p>
</div>
</li>
</ul>
</template>
<script>
import helper from "@/services/helper.js";
export default {
props: {
data: {
......@@ -34,9 +36,11 @@ export default {
required: true,
},
},
data: () => ({}),
methods: {},
created() {},
methods: {
getTimeText(time) {
return helper.dateStringTransform(time);
},
},
};
</script>
......
<template>
<chart :options="bar()" class="bar" />
</template>
<script>
import { graphic } from "echarts/lib/export";
export default {
props: {
data: {
type: Object,
default: () => {
return {
xaxis: [],
data: []
};
}
},
bar_width: {
type: String,
default: "12px"
},
colors: {
type: Array,
default: () => {
return ["#274fee", "#274fee"];
}
},
bar_border_radius: {
type: Array,
default: () => {
return [10, 10, 10, 10];
}
},
show_split: {
typr: Boolean,
default: false
}
},
data: () => ({
navList: []
}),
mounted() {},
methods: {
bar() {
let self = this;
return {
xAxis: [
{
type: "category",
data: self.data.xaxis,
axisLabel: {
margin: 20,
color: "#0d1847",
textStyle: {
fontSize: 12
},
interval: 0,
rotate: 30,
formatter: function(value) {
let valueTxt = "";
if (value.length > 6) {
valueTxt = value.substring(0, 5) + "...";
} else {
valueTxt = value;
}
return valueTxt;
}
},
axisLine: {
lineStyle: {
color: "#f2f2f2"
}
},
axisTick: {
show: false
},
splitArea: {
show: self.show_split,
interval: 0,
areaStyle: {
color: ["#f4f5fd", "#fff"],
opacity: 0.5
}
}
}
],
yAxis: [
{
axisLabel: {
color: "#a9aec0",
textStyle: {
fontSize: 12
}
},
axisLine: {
lineStyle: {
color: "rgba(0, 0, 0, 0)"
}
},
axisTick: {
show: false
},
splitLine: {
lineStyle: {
color: "#f2f2f2",
type: "solid"
}
}
}
],
series: [
{
type: "bar",
data: self.data.data,
barWidth: self.bar_width,
itemStyle: {
normal: {
color: function(params) {
return new graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: self.colors[0] // 0% 处的颜色
},
{
offset: 1,
color: self.colors[1] // 100% 处的颜色
}
],
false
);
},
barBorderRadius: self.bar_border_radius
}
}
}
]
};
}
}
};
</script>
<style scoped>
.bar {
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
<template>
<ul class="comments_list">
<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" />
</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>
</p>
<div class="commnet-rate">
<el-rate
:colors="['#e69232', '#e69232', '#e69232']"
:value="item.score"
disabled
score-template="{value}"
>
</el-rate>
</div>
<p class="comment-description" v-text="item.content"></p>
</div>
</li>
</ul>
</template>
<script>
import helper from "@/services/helper.js";
export default {
props: {
data: {
type: Array,
required: true,
},
},
methods: {
getTimeText(time) {
return helper.dateStringTransform(time);
},
},
};
</script>
<style scoped>
.comments_list {
overflow-x: hidden;
overflow-y: auto;
}
.comment_card {
margin-right: 10px;
display: flex;
justify-content: flex-start;
align-items: flex-start;
padding: 10px 0;
border-top: 2px solid #f4f7fc;
}
.comment_card:nth-child(1) {
border-top: none;
}
.comment_card:last-child {
border-bottom: 2px solid #f4f7fc;
}
.comment-left {
flex-shrink: 0;
padding-top: 8px;
margin-right: 20px;
}
.comment-right {
flex-grow: 1;
line-height: 20px;
}
.comment-base {
padding-left: 3px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
color: #58617a;
}
.comment-user_name {
flex-grow: 1;
color: #58617a;
margin-right: 10px;
}
.comment-time {
flex-shrink: 0;
color: #8890a7;
}
.comment-description {
padding-left: 3px;
color: #242c43;
}
</style>
<style>
.comment-right > .commnet-rate .el-rate {
height: 20px;
}
.comment-right > .commnet-rate .el-rate__icon {
font-size: 20px;
margin-right: 0;
}
</style>
......@@ -10,14 +10,18 @@ export default {
type: Object,
default: () => {
return {
data: 40,
text: "模拟数据1.0"
data: 0,
text: ""
};
}
},
dangerousValue: {
type: String,
default: ""
},
is_word: {
type: Boolean,
default: false
}
},
data: () => ({
......@@ -31,6 +35,7 @@ export default {
title: [
{
text: self.data.data + "{a|%}",
show: !self.is_word,
x: "center",
y: "center",
textStyle: {
......@@ -47,6 +52,7 @@ export default {
},
{
text: self.data.text,
show: !self.is_word,
x: "center",
y: "58%",
textStyle: {
......@@ -54,6 +60,53 @@ export default {
fontWeight: "normal",
color: "#707693"
}
},
{
text: self.data.text,
show: self.is_word,
x: "center",
y: "74%",
textStyle: {
fontSize: 14,
fontWeight: "normal",
color: "#8890a7"
}
},
{
text: self.data.data + "%",
show: self.is_word,
x: "center",
y: "64%",
textStyle: {
fontSize: 20,
fontWeight: "normal",
color: "#242c43"
}
},
{
text:
self.data.data > 75
? ""
: self.data.data > 50
? ""
: self.data.data > 25
? ""
: "",
show: self.is_word,
x: "center",
y: "40%",
textStyle: {
fontSize: 36,
fontWeight: "normal",
color:
self.data.data > 75
? "#00beb2" //green
: self.data.data > 50
? "#ff7200" //yellow
: self.data.data > 25
? "#da4251" //red
: "#da4251" //red
}
}
],
angleAxis: {
......@@ -110,12 +163,12 @@ export default {
? "#f7f1d5"
: "#d5f7e8"
: self.data.data > 75
? "#f7f1d5"
? "#d5f7e8"
: self.data.data > 50
? "#ffd98f"
: self.data.data > 25
? "#d5f7e8"
: "#d5f7e8"
? "#f7f1d5"
: "#f7f1d5"
},
{
offset: 1,
......@@ -125,12 +178,12 @@ export default {
? "#da4251" // red
: "#00beb2" //green
: self.data.data > 75
? "#da4251" //red
? "#00beb2" //green
: self.data.data > 50
? "#ff7200" //yellow
: self.data.data > 25
? "#00beb2" //green
: "#00beb2" //green
? "#da4251" //red
: "#da4251" //red
}
])
}
......
......@@ -31,33 +31,7 @@ export default {
props: {
options: {
type: Array,
default: () => [
{
star: 5,
count: 5,
unit: "",
},
{
star: 4,
count: 4,
unit: "",
},
{
star: 3,
count: 3,
unit: "",
},
{
star: 2,
count: 10002,
unit: "",
},
{
star: 1,
count: 1,
unit: "",
},
],
default: () => [],
},
total: {
type: Number,
......@@ -74,7 +48,6 @@ export default {
<style scoped>
.star_list {
height: 100%;
overflow-x: hidden;
overflow-y: auto;
}
......
......@@ -33,43 +33,7 @@ export default {
props: {
options: {
type: Array,
default: () => [
{
name: "报警服务",
value: 2031,
logo:
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
unit: "",
},
{
name: "数据服务",
value: 2201,
logo:
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
unit: "",
},
{
name: "消息队列服务",
value: 1901,
logo:
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
unit: "",
},
{
name: "档案中心服务",
value: 1400,
logo:
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
unit: "",
},
{
name: "哈哈服务",
value: 1280,
logo:
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
unit: "",
},
],
default: () => [],
},
targetValue: {
type: Number,
......@@ -86,7 +50,6 @@ export default {
<style scoped>
.top_list {
height: 100%;
overflow-x: hidden;
overflow-y: auto;
}
......
<template>
<div class="block_radius">
<div v-if="show_header" class="block_header">
<div class="block_header_title">{{ title }}</div>
<div class="block_header_button_group">
<div
v-for="(item, index) in buttons_arr"
:key="index"
class="block_header_button"
:class="active_button == index ? 'active' : ''"
@click="changeButton(index)"
>{{ item }}</div>
</div>
</div>
<slot></slot>
</div>
</template>
<script>
export default {
props: {
show_header: {
type: Boolean,
default: false
},
buttons_arr: {
type: Array,
default: () => {
[];
}
},
title: {
type: String,
default: ""
}
},
components: {},
data: () => ({}),
data: () => ({
active_button: 0
}),
computed: {},
watch: {},
methods: {},
methods: {
changeButton(index) {
if (this.active_button != index) {
this.active_button = index;
this.$emit("changeButton", index);
}
}
},
mounted() {}
};
</script>
<style scoped>
.block_radius {
background-color: #fff;
border-radius: 10px;
padding: 20px;
margin-bottom: 20px;
background-color: #fff;
border-radius: 10px;
padding: 20px;
margin-bottom: 20px;
}
.block_header {
display: flex;
justify-content: space-between;
align-items: center;
}
.block_header_title {
font-size: 16px;
color: #707693;
padding-left: 16px;
position: relative;
}
.block_header_title::before {
position: absolute;
content: "";
width: 8px;
height: 8px;
background-color: #515fe7;
border-radius: 50%;
left: 0;
top: 8px;
}
.block_header_button_group {
background-color: #f4f7fc;
border-radius: 4px;
}
.block_header_button {
display: inline-block;
font-size: 12px;
padding: 2px 6px;
color: #8890a7;
cursor: pointer;
}
.block_header_button.active {
color: #f8f9fd;
background-color: #3f4f9c;
border-radius: 4px;
}
</style>
......@@ -2,7 +2,7 @@
<div class="com_card">
<div class="com_card_top">
<img
:src="cellData.cover"
:src="cellData.logo"
class="com_card_img"
/>
<div class="com_card_name_v">
......
......@@ -475,8 +475,8 @@ export default {
getAppArea() {
this.$api.serviceShop.getAppArea().then(response => {
if (response.data.success == 1) {
this.filterLists[1].childDomains = response.data.data;
this.refresh_app_1 = true;
this.filterLists[2].childDomains = response.data.data;
this.refresh_app_2 = true;
} else {
console.log(response.data.errMsg);
}
......@@ -485,8 +485,8 @@ export default {
getAppType() {
this.$api.serviceShop.getAppType().then(response => {
if (response.data.success == 1) {
this.filterLists[2].childDomains = response.data.data;
this.refresh_app_2 = true;
this.filterLists[1].childDomains = response.data.data;
this.refresh_app_1 = true;
} else {
console.log(response.data.errMsg);
}
......
......@@ -18,11 +18,19 @@
'margin-top': i < filterLength ? '0' : '10px',
}"
>
<a
:class="{ current: isCurrentFilter(item.prop, v) }"
@click.prevent="selectFilter(item.prop, v)"
v-text="v.name"
></a>
<el-tooltip
class="item"
effect="dark"
:content="v.name"
placement="top"
>
<a
class="text_clip"
:class="{ current: isCurrentFilter(item.prop, v) }"
@click.prevent="selectFilter(item.prop, v)"
v-text="v.name"
></a>
</el-tooltip>
</li>
<div
......@@ -189,6 +197,7 @@ export default {
display: block;
height: 30px;
width: 130px;
padding: 0 15px;
box-sizing: border-box;
border-radius: 12px;
text-align: center;
......
This diff is collapsed.
......@@ -166,12 +166,16 @@ export default {
data: [
{
name: "平台应用",
value: 0,
value: 2,
},
{
name: "开发者应用",
value: 1,
},
{
name: "未上架",
value: 0,
},
],
},
];
......@@ -1019,7 +1023,7 @@ export default {
},
].concat(
(response.body.data || []).map((v) => ({
name: v.text,
name: v.value,
value: v.value,
}))
);
......@@ -1145,7 +1149,11 @@ export default {
this.dialogInfo.sunbmitText = "";
this.dialogInfo.submit = () => {
this.$http
.delete(`/apaas/hubApi/market/del/${item.app_id}`)
.delete(`/apaas/hubApi/market/del/${item.app_id}`, {
params: {
apply_id: item.apply_id,
},
})
.then(({ data }) => {
if (data.success) {
this.$message({
......
......@@ -55,7 +55,7 @@ const workbench = {
// get service topology
getServiceTopology() {
return axios.get(`/awecloud/meshgraph/api/namespaces/graph?duration=60s&graphType=service&injectServiceNodes=false&appenders=deadNode,sidecarsCheck,serviceEntry,istio&namespaces=apaas-proxy`)
return axios.get(`/apaas/istio/v3/api/namespaces/graph`)
},
}
......
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