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

数据分析权限优化,服务注册使用服务优化逻辑,流程设计优化校验

parent 8b79655c
......@@ -94,10 +94,8 @@ export default {
this.navList = this.userNav;
} else if (this.is_admin == 2) {
this.navList = this.userNav1;
this.$router.push({ name: "orgServiceDataAnalysis" });
} else if (this.is_admin == 1) {
this.navList = this.userNav2;
this.$router.push({ name: "superServiceDataAnalysis" });
}
},
},
......
......@@ -12,7 +12,7 @@
}}
</el-breadcrumb-item>
</el-breadcrumb>
<el-row class="in_analysis">
<el-row v-if="is_general_user" class="in_analysis">
<!-- 可横向铺满 -->
<el-col :span="6" class="in_left">
<el-row>
......@@ -276,11 +276,11 @@ export default {
BarChart,
ApassTable,
Graph,
Topology
Topology,
},
data: () => ({
overview: {
serviceTotal: 0
serviceTotal: 0,
},
left_1_state: 0,
left_2_state: 0,
......@@ -297,66 +297,66 @@ export default {
spRefLineStyles3: {
stroke: "#d14",
strokeOpacity: 0,
strokeDasharray: "2, 2"
strokeDasharray: "2, 2",
},
spCurveStyles2: {
stroke: "#274fee",
fill: "#274fee"
fill: "#274fee",
},
spCurveStyles3: {
stroke: "#e56600",
fill: "#e56600"
fill: "#e56600",
},
sparkline1: {
num:0,
up:0,
arr:[]
num: 0,
up: 0,
arr: [],
},
sparkline2: {
num:0,
up:0,
arr:[]
num: 0,
up: 0,
arr: [],
},
text: "服务总数",
single_data: {
num: 0,
color: "#25bdb1",
text: "共享"
text: "共享",
},
single_data1: {
num: 0,
color: "#f5ab4c",
text: "受限"
text: "受限",
},
single_data2: {
num: 0,
color: "#e15260",
text: "敏感"
text: "敏感",
},
line_data: {
xAxisData: [],
seriesData: [
{
name: "",
data: []
data: [],
},
{
name: "",
data: []
}
]
data: [],
},
],
},
das_data: {
data: 90,
text: "健康占比"
text: "健康占比",
},
bar_data: {
legendData: [],
seriesData: []
seriesData: [],
},
bar_data_org: {
legendData: [],
seriesData: []
seriesData: [],
},
toplistData: [], // 服务调用排名分析
toplistTargetValue: 0, // 服务调用排名分析 目标值
......@@ -366,148 +366,173 @@ export default {
count: 6,
percent: 75,
title: "0.1% 错误",
unit: ""
unit: "",
},
{
count: 2,
percent: 25,
title: "0.1 - 20% 错误",
unit: ""
unit: "",
},
{
count: 0,
percent: 0,
title: "20% 错误",
unit: ""
unit: "",
},
{
count: 0,
percent: 0,
title: "TCP连接",
unit: ""
unit: "",
},
{
count: 0,
percent: 0,
title: "Idle",
unit: ""
}
unit: "",
},
], // 服务状态统计
starlistData: [
{
star: 5,
count: 5,
unit: ""
unit: "",
},
{
star: 4,
count: 4,
unit: ""
unit: "",
},
{
star: 3,
count: 3,
unit: ""
unit: "",
},
{
star: 2,
count: 2,
unit: ""
unit: "",
},
{
star: 1,
count: 1,
unit: ""
}
unit: "",
},
], // 服务评分
starlistTotal: 15,
hotSearchHeader: [], // 热门搜索 表头
hotSearchData: [], // 热门搜索 数据
graph_arr: {
legend: {
data: []
data: [],
},
data: [],
series: [{ data: [] }, { data: [] }]
series: [{ data: [] }, { data: [] }],
},
topology_datas: {}
topology_datas: {},
is_general_user: false,
}),
mounted() {
this.getServiceOverview();
this.getServiceHealth();
this.getServiceTrend();
this.getServiceType();
this.getServiceSectorse();
this.getServiceOrg();
this.getServiceOpenness();
this.getServiceRequest();
this.getServiceOnlineState();
this.getServiceEstimated();
this.getServiceHotSearch();
this.checkAuthority();
this.hotSearchHeader = [
{
label: "服务排名",
type: "hot-index",
width: 100,
align: "center"
align: "center",
},
{
label: "服务名称",
prop: "name",
type: "button",
callback: this.detailHotSearch
callback: this.detailHotSearch,
},
{
label: "搜索次数",
prop: "count",
width: 100,
align: "center"
align: "center",
},
{
label: "日涨幅",
prop: "increases",
width: 100,
sortType: "0", // 0:升序 1:降序
align: "center"
}
align: "center",
},
];
this.getTopologyData();
},
methods: {
getServiceHotSearch(){
this.$api.dataAnalysis.getServiceHotSearch().then(response => {
checkAuthority() {
let is_admin = this.$store.state.userInfo.is_admin;
if (is_admin == 3 || is_admin == 4) {
this.is_general_user = true;
this.getServiceOverview();
this.getServiceHealth();
this.getServiceTrend();
this.getServiceType();
this.getServiceSectorse();
this.getServiceOrg();
this.getServiceOpenness();
this.getServiceRequest();
this.getServiceOnlineState();
this.getServiceEstimated();
this.getServiceHotSearch();
this.getTopologyData();
} else if (is_admin == 2) {
this.$router.push("/data_analysis/org_service");
} else if (is_admin == 1) {
this.$router.push("/data_analysis/super_service");
}
},
getServiceHotSearch() {
this.$api.dataAnalysis.getServiceHotSearch().then((response) => {
if (response.data.success == 1) {
let data = response.data.data
let data = response.data.data;
this.sparkline1 = {
num:data.search_user.count,
up:data.trend=='up'?data.search_user.per:data.trend=='down'?0-data.search_user.per:data.search_user.per,
arr:data.search_user_trend.seriesData
}
num: data.search_user.count,
up:
data.trend == "up"
? data.search_user.per
: data.trend == "down"
? 0 - data.search_user.per
: data.search_user.per,
arr: data.search_user_trend.seriesData,
};
this.sparkline2 = {
num:data.search_user_avg.count,
up:data.trend=='up'?data.search_user_avg.per:data.trend=='down'?0-data.search_user_avg.per:data.search_user_avg.per,
arr:data.search_user_avg_trend.seriesData
}
num: data.search_user_avg.count,
up:
data.trend == "up"
? data.search_user_avg.per
: data.trend == "down"
? 0 - data.search_user_avg.per
: data.search_user_avg.per,
arr: data.search_user_avg_trend.seriesData,
};
// top5_rank
this.hotSearchData = []
if(data.top5_rank&&data.top5_rank.length){
data.top5_rank.forEach((e,idx) => {
this.hotSearchData.push(
{
id:e.service_id,
hotIndex: top_rank,
name: e.service_name,
count: e.search_count,
increases: e.trend=='up'?e.search_user.per:e.trend=='down'?0-e.search_user.per:e.search_user.per
}
)
this.hotSearchData = [];
if (data.top5_rank && data.top5_rank.length) {
data.top5_rank.forEach((e, idx) => {
this.hotSearchData.push({
id: e.service_id,
hotIndex: top_rank,
name: e.service_name,
count: e.search_count,
increases:
e.trend == "up"
? e.search_user.per
: e.trend == "down"
? 0 - e.search_user.per
: e.search_user.per,
});
});
}
}
});
},
getServiceOverview() {
this.$api.dataAnalysis.getServiceOverview().then(response => {
this.$api.dataAnalysis.getServiceOverview().then((response) => {
if (response.data.success == 1) {
this.overview = response.data.data;
this.das_data.data = Math.round(
......@@ -520,7 +545,7 @@ export default {
});
},
getServiceHealth() {
this.$api.dataAnalysis.getServiceHealth().then(response => {
this.$api.dataAnalysis.getServiceHealth().then((response) => {
if (response.data.success == 1) {
this.mult_data_state = response.data.data.seriesData;
}
......@@ -529,7 +554,7 @@ export default {
getServiceTrend() {
this.$api.dataAnalysis
.getServiceTrend({ type: this.right_1_state })
.then(response => {
.then((response) => {
if (response.data.success == 1) {
this.graph_arr = response.data.data;
}
......@@ -538,7 +563,7 @@ export default {
getServiceType() {
this.$api.dataAnalysis
.getServiceType({ type: this.left_2_state })
.then(response => {
.then((response) => {
if (response.data.success == 1) {
this.mult_data = response.data.data.seriesData;
}
......@@ -547,7 +572,7 @@ export default {
getServiceSectorse() {
this.$api.dataAnalysis
.getServiceSectorse({ type: this.left_3_state })
.then(response => {
.then((response) => {
if (response.data.success == 1) {
this.bar_data = response.data.data;
}
......@@ -556,7 +581,7 @@ export default {
getServiceOrg() {
this.$api.dataAnalysis
.getServiceOrg({ type: this.left_3_state })
.then(response => {
.then((response) => {
if (response.data.success == 1) {
this.bar_data_org = response.data.data;
}
......@@ -565,7 +590,7 @@ export default {
getServiceOpenness() {
this.$api.dataAnalysis
.getServiceOpenness({ type: this.right_2_state })
.then(response => {
.then((response) => {
if (response.data.success == 1) {
this.single_data.num = response.data.data.shared;
this.single_data1.num = response.data.data.privacy;
......@@ -576,7 +601,7 @@ export default {
getServiceRequest() {
this.$api.dataAnalysis
.getServiceRequest({ type: this.right_0_state })
.then(response => {
.then((response) => {
if (response.data.success == 1) {
this.toplistData = response.data.data;
if (this.toplistData && this.toplistData.length != 0) {
......@@ -588,7 +613,7 @@ export default {
getServiceOnlineState() {
this.$api.dataAnalysis
.getServiceOnlineState({ type: this.center_3_state })
.then(response => {
.then((response) => {
if (response.data.success == 1) {
this.line_data = response.data.data;
console.log(this.line_data);
......@@ -599,9 +624,9 @@ export default {
this.$api.dataAnalysis
.getServiceEstimated({
type: this.right_3_state,
last_id: this.last_id
last_id: this.last_id,
})
.then(response => {
.then((response) => {
if (response.data.success == 1) {
this.commentlistData = response.data.data.concat(
this.commentlistData
......@@ -611,7 +636,7 @@ export default {
});
},
detailHotSearch(item) {
this.$router.push('/fwgl/0/0/servicedetail/'+item.id)
this.$router.push("/fwgl/0/0/servicedetail/" + item.id);
},
changeServiceTypeBtn(index) {
this.left_2_state = index;
......@@ -642,7 +667,7 @@ export default {
this.getServiceOnlineState();
},
getTopologyData() {
this.$api.workbench.getServiceTopology().then(response => {
this.$api.workbench.getServiceTopology().then((response) => {
this.topology_datas = response.data.elements;
});
},
......@@ -653,8 +678,8 @@ export default {
} else {
this.a();
}
}
}
},
},
};
</script>
<style scoped>
......
......@@ -127,7 +127,7 @@ export default {
{ max: 16, message: "不能超过16个字符", trigger: "blur" },
],
workplace: [
{ required: true, message: "请选择工作区域", trigger: "blur" },
{ required: true, message: "请选择工作区域", trigger: "change" },
],
desc: [
{ required: true, message: "请输入流程描述", trigger: "blur" },
......
......@@ -64,7 +64,7 @@
</el-select>
</el-input>
<el-button
v-if="activeBtn == 0 || activeBtn == 4"
v-if="activeBtn == 0 || activeBtn == 1 || activeBtn == 4"
@click="clickFwcs()"
class="fwcs_btn_fwcs"
>服务测试</el-button>
......@@ -135,7 +135,6 @@
v-model="skfwQqt"
:label="item.id"
>{{ item.name }}</el-radio>
<el-button v-if="activeBtn == 1" @click="clickFwcs()" class="fwcs_btn_fwcs">服务测试</el-button>
</div>
</div>
<div v-if="activeBtn == 4 && zhyyVal != 34">
......@@ -1022,7 +1021,6 @@ export default {
self.jcxxtx = true;
if (self.$store.state.znztParams) {
let data = this.$store.state.znztParams;
console.log(data);
self.form.name = data.name;
self.form.desc = data.descript;
self.form.area = Number(data.sectors);
......@@ -1033,7 +1031,6 @@ export default {
self.is_portal = true;
} else if (self.$store.state.appBuilderParams) {
let data = this.$store.state.appBuilderParams;
console.log(data);
self.form.name = data.name;
self.form.desc = data.descript;
self.form.area = Number(data.sectors);
......
......@@ -451,12 +451,12 @@ export default new Router({
component: () => import("@/pages/data-analysis/service-control"),
},
{
path: "/data_analysis/super_service", // 数据分析中心服务-组织
path: "/data_analysis/super_service", // 数据分析中心服务-超管
name: "superServiceDataAnalysis",
component: () => import("@/pages/data-analysis/super-service"),
},
{
path: "/data_analysis/super_application", // 数据分析中心应用-组织
path: "/data_analysis/super_application", // 数据分析中心应用-超管
name: "superApplicationDataAnalysis",
component: () => import("@/pages/data-analysis/super-application"),
},
......
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