移植apilogs,新增备注字段

This commit is contained in:
hyt 2024-05-14 10:08:39 +08:00
parent 9e65c2808e
commit a7e9dbce9f
20 changed files with 1631 additions and 1175 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

View File

@ -0,0 +1,242 @@
<!-- 柱状图折线图 -->
<template>
<div style="width: 100%">
<span class="Breadcrumbs" v-if="Breadcrumbs">
<div v-for="(item, index) in breadcrumbsList" :key="index">
<span class="title">{{ item.title }}</span>
<span class="Separator" v-show="index + 1 != breadcrumbsList.length"
>/</span
>
</div>
</span>
<div :style="proportion" ref="echarts" id="echarts"></div>
</div>
</template>
<script>
import echarts from 'echarts'
export default {
data() {
return {
myEcharts: null,
option: {},
sidebarRetract: null,
breadcrumbsList: [
{
title: "首页",
},
{
title: "活动管理",
},
],
};
},
components: {},
computed: {},
mounted() {
this.myEcharts = echarts.init(this.$refs.echarts);
this.getEcharts();
window.addEventListener("resize", this.change);
},
watch: {
"$store.getters.sidebarRetract": {
deep: true,
handler(val) {
this.change();
},
},
DataCollection: {
deep: true,
handler(newVal, oldVal) {
this.getEcharts();
},
},
},
props: {
//
Breadcrumbs: {
type: Boolean,
default: false,
},
//
proportion: {
type: Object,
default: () => {
return {
width: "700px",
height: "700px",
};
},
},
//
title: {
type: String,
default: "",
},
//
DataCollection: {
type: Object,
require: true,
default: () => {
return {};
},
},
// // ['', '']
// columnHeader: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// },
// // ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
// Dimension: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// },
// series: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// }
},
methods: {
change() {
this.myEcharts.resize();
},
getEcharts() {
let _this = this;
const colors = [
"#224ef5",
"#e33722",
"#ffcc2c",
"#C1232B",
"#B5C334",
"#FCCE10",
"#E87C25",
"#27727B",
"#FE8463",
"#9BCA63",
"#FAD860",
"#F3A43B",
"#60C0DD",
"#D7504B",
"#C6E579",
"#F4E001",
"#F0805A",
"#26C0C0",
"#FAD860",
"#F3A43B",
"#60C0DD",
"#D7504B",
"#C6E579",
"#F4E001",
"#F0805A",
"#26C0C0",
];
this.option = {
color: colors,
title: {
text: "", //
subtext: "",
},
tooltip: {
trigger: "axis",
},
grid: {
left: "2%",
right: "2%",
bottom: "10%",
top: "2%",
containLabel: true,
},
legend: {
data: this.DataCollection.title,
align: "right",
right: 5,
textStyle: {
color: "#000",
},
itemWidth: 10,
itemHeight: 10,
itemGap: 35,
x: "center",
y: "bottom",
padding: [20, 0, 0, 0],
},
toolbox: {
show: false,
feature: {
mark: { show: true }, //
dataView: { show: true, readOnly: false }, //线
magicType: { show: true, type: ["line", "bar"] }, //
restore: { show: true }, //
saveAsImage: { show: true }, //
},
},
calculable: true,
xAxis: [
{
type: "category",
axisLabel: { interval: 0, rotate: 60 },
data: this.DataCollection.parameter,
},
],
yAxis: [
{
type: "value",
axisLine: {
show: true,
lineStyle: {
color: "#000",
},
},
"splitLine": {
"lineStyle": {
"type": "dashed", // 线
"color": "#ccc", // 线
"length": 10, // 线
"interval": 5 // 线
}
}
},
],
series: this.DataCollection.series,
};
this.myEcharts.setOption(this.option);
this.myEcharts.on("click", function (params) {
_this.echartsClick(params);
});
},
echartsClick(e) {
console.log("点击", e);
},
},
};
</script>
<style scoped lang="scss">
.Breadcrumbs {
margin: 10px 0 10px 10px;
display: flex;
font-size: 13px;
.title {
cursor: pointer;
}
.Separator {
display: inline-block;
margin: 0 9px;
color: #c0c4cc;
font-weight: 700;
}
}
</style>

View File

@ -0,0 +1,252 @@
<!-- 柱状图折线图 -->
<template>
<div style="width: 100%">
<span class="Breadcrumbs" v-if="Breadcrumbs">
<div v-for="(item, index) in breadcrumbsList" :key="index">
<span class="title">{{ item.title }}</span>
<span class="Separator" v-show="index + 1 != breadcrumbsList.length"
>/</span
>
</div>
</span>
<div :style="proportion" ref="echarts" id="echarts"></div>
</div>
</template>
<script>
import echarts from 'echarts'
export default {
data() {
return {
myEcharts: null,
option: {},
sidebarRetract: null,
breadcrumbsList: [
{
title: "首页",
},
{
title: "活动管理",
},
],
};
},
components: {},
computed: {},
mounted() {
this.myEcharts = echarts.init(this.$refs.echarts);
this.getEcharts();
window.addEventListener("resize", this.change);
},
watch: {
"$store.getters.sidebarRetract": {
deep: true,
handler(val) {
this.change();
},
},
DataCollection: {
deep: true,
handler(newVal, oldVal) {
this.getEcharts();
},
},
},
props: {
//
Breadcrumbs: {
type: Boolean,
default: false,
},
//
proportion: {
type: Object,
default: () => {
return {
width: "700px",
height: "700px",
};
},
},
//
title: {
type: String,
default: "",
},
//
DataCollection: {
type: Object,
require: true,
default: () => {
return {};
},
},
// // ['', '']
// columnHeader: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// },
// // ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
// Dimension: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// },
// series: {
// type: Array,
// required: true,
// default: () => {
// return []
// }
// }
},
methods: {
change() {
this.myEcharts.resize();
},
getEcharts() {
let _this = this;
const colors = [
"#224ef5",
"#e33722",
"#ffcc2c",
"#C1232B",
"#B5C334",
"#FCCE10",
"#E87C25",
"#27727B",
"#FE8463",
"#9BCA63",
"#FAD860",
"#F3A43B",
"#60C0DD",
"#D7504B",
"#C6E579",
"#F4E001",
"#F0805A",
"#26C0C0",
"#FAD860",
"#F3A43B",
"#60C0DD",
"#D7504B",
"#C6E579",
"#F4E001",
"#F0805A",
"#26C0C0",
];
this.option = {
color: colors,
title: {
text: "", //
subtext: "",
},
tooltip: {
trigger: "axis",
},
grid: {
left: "2%",
right: "2%",
bottom: "10%",
top: "2%",
containLabel: true,
},
legend: {
data: this.DataCollection.title,
align: "right",
right: 5,
textStyle: {
color: "#fff",
},
itemWidth: 10,
itemHeight: 10,
itemGap: 35,
x: "center",
y: "bottom",
padding: [20, 0, 0, 0],
},
toolbox: {
show: false,
feature: {
mark: { show: true }, //
dataView: { show: true, readOnly: false }, //线
magicType: { show: true, type: ["line", "bar"] }, //
restore: { show: true }, //
saveAsImage: { show: true }, //
},
},
calculable: true,
xAxis: [
{
type: "category",
axisLabel: { interval: 0, rotate: 60,color:'#01E5EB' },
axisLine: {
show: true,
lineStyle: {
color: "#01E5EB",
},
},
data: this.DataCollection.parameter,
},
],
yAxis: [
{
type: "value",
axisLine: {
show: true,
lineStyle: {
color: "#01E5EB",
},
},
axisLabel:{
color:'#01E5EB'
},
"splitLine": {
"lineStyle": {
"type": "dashed", // 线
"color": "#5679ac", // 线
"length": 10, // 线
"interval": 5 // 线
}
}
},
],
series: this.DataCollection.series,
};
this.myEcharts.setOption(this.option);
this.myEcharts.on("click", function (params) {
_this.echartsClick(params);
});
},
echartsClick(e) {
console.log("点击", e);
},
},
};
</script>
<style scoped lang="scss">
.Breadcrumbs {
margin: 10px 0 10px 10px;
display: flex;
font-size: 13px;
.title {
cursor: pointer;
}
.Separator {
display: inline-block;
margin: 0 9px;
color: #c0c4cc;
font-weight: 700;
}
}
</style>

View File

@ -38,7 +38,11 @@ import nodeWrap from '@/components/nodeWrap'
import { delTreeChildren } from '@/utils/util' import { delTreeChildren } from '@/utils/util'
Vue.use(nodeWrap) Vue.use(nodeWrap)
Vue.component('NodeWrap', nodeWrap) // 初始化组件 Vue.component('NodeWrap', nodeWrap) // 初始化组件
// 柱状图、折线图组件
import BarChart from "@/components/Echarts/BarChart";
import BarChartBlack from "@/components/Echarts/BarChartBlack.vue";
Vue.component("BarChart", BarChart);
Vue.component("BarChartBlack", BarChartBlack);
import followWorkShow from '@/components/nodeWrapShow' import followWorkShow from '@/components/nodeWrapShow'
Vue.use(followWorkShow) Vue.use(followWorkShow)
Vue.component('FollowWorkShow', followWorkShow) // 初始化组件 Vue.component('FollowWorkShow', followWorkShow) // 初始化组件

View File

@ -38,6 +38,11 @@ const tableColumnData = [
prop: 'createTime', prop: 'createTime',
tooltip: true, tooltip: true,
}, },
{
label: '备注',
prop: 'remark',
tooltip: true,
},
] ]
const tableVersionColumn = [ const tableVersionColumn = [
{ {

View File

@ -115,8 +115,6 @@ export default {
prop: "status", prop: "status",
tag: "elSelect", tag: "elSelect",
options: [ options: [
{id: "1", label: "待发送"},
{id: "2", label: "发送中"},
{id: "3", label: "发送成功"}, {id: "3", label: "发送成功"},
{id: "4", label: "发送失败"}, {id: "4", label: "发送失败"},
], ],
@ -292,6 +290,11 @@ export default {
this.$vmNews("请选择接受者api") this.$vmNews("请选择接受者api")
return return
} }
if (!data.status) {
this.$vmNews("请选择状态")
return
}
this.resetTable(); this.resetTable();
}, },
async initSelect() { async initSelect() {

View File

@ -1,46 +1,46 @@
<template> <template>
<div> <div>
<base-right-dialog <base-right-dialog
ref="baseRightDialog" ref="baseRightDialog"
:footerShow="true" :footerShow="true"
:dialogVisible.sync="dialogVisible" :dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 消息管理日志'" :title="dialogTitle + ' 消息管理日志'"
@handleClose="handleDialogClose" @handleClose="handleDialogClose"
:type="dialogType" :type="dialogType"
:submitShow="submitShow" :submitShow="submitShow"
:size="'65%'" :size="'65%'"
@handleConfirmClick="handleConfirmClick" @handleConfirmClick="handleConfirmClick"
> >
<base-form <base-form
ref="basicsForm" ref="basicsForm"
:formRow="formRow" :formRow="formRow"
:isFunBtn="false" :isFunBtn="false"
:rules="basicsRules" :rules="basicsRules"
class="dialog_form" class="dialog_form"
:spanWidth="`120px`" :spanWidth="`120px`"
:loading="vLoading" :loading="vLoading"
style="padding-bottom:20px;" style="padding-bottom:20px;"
> >
<div slot="sourceData" class="code-json-editor"> <div slot="sourceData" class="code-json-editor">
<vue-json-editor <vue-json-editor
class="editor" class="editor"
v-model="sourceData" v-model="sourceData"
:showBtns="false" :showBtns="false"
:mode="'code'" :mode="'code'"
@json-change="onSourceDataJsonChange" @json-change="onSourceDataJsonChange"
@json-save="onSourceDataSave" @json-save="onSourceDataSave"
@has-error="onSourceDataError" @has-error="onSourceDataError"
/> />
</div> </div>
<div slot="targetData" class="code-json-editor"> <div slot="targetData" class="code-json-editor">
<vue-json-editor <vue-json-editor
class="editor" class="editor"
v-model="targetData" v-model="targetData"
:showBtns="false" :showBtns="false"
:mode="'code'" :mode="'code'"
@json-change="onTargetDataChange" @json-change="onTargetDataChange"
@json-save="onTargetDataSave" @json-save="onTargetDataSave"
@has-error="onTargetDataError" @has-error="onTargetDataError"
/> />
</div> </div>
</base-form> </base-form>
@ -106,11 +106,11 @@ export default {
id: id, id: id,
}; };
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", "sysMessageManageLogService",
"messageManage", "messageManage",
"thirdInterfacequeryEntity", "thirdInterfacequeryEntity",
"", "",
params params
); );
if (res.status == "200") { if (res.status == "200") {
this.$nextTick(() => { this.$nextTick(() => {
@ -184,11 +184,11 @@ export default {
// //
async messageLogUpdateDto(params) { async messageLogUpdateDto(params) {
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", "sysMessageManageLogService",
"messageManage", "messageManage",
"updateEntity", "updateEntity",
"", "",
params params
); );
if (res.status == "200") { if (res.status == "200") {
this.handleDialogClose(); this.handleDialogClose();
@ -219,11 +219,11 @@ export default {
pageNum: 1, pageNum: 1,
}; };
let res = await authApi( let res = await authApi(
"appApiService", "appApiService",
"appApi", "appApi",
"queryPage", "queryPage",
"", "",
params params
); );
if (res.status == "200") { if (res.status == "200") {
// this.formRow[1].elCol[1].options = res.attribute.list; // this.formRow[1].elCol[1].options = res.attribute.list;
@ -247,7 +247,7 @@ export default {
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep textarea.el-textarea__inner { ::v-deep textarea.el-textarea__inner {
min-height: 150px !important; min-height: 150px !important;
} }
.dialogList { .dialogList {
padding: 16px 0; padding: 16px 0;

File diff suppressed because it is too large Load Diff

View File

@ -239,6 +239,7 @@
v-model="logDialog" v-model="logDialog"
@confirm="logConfirm" @confirm="logConfirm"
:width="'80%'" :width="'80%'"
:footerShow="false"
> >
<div> <div>
<logTableChunk v-if="logDialog" :receiveApi="receiveApi"></logTableChunk> <logTableChunk v-if="logDialog" :receiveApi="receiveApi"></logTableChunk>
@ -686,7 +687,8 @@ export default {
} }
// json // json
let bodyIn = JSON.parse(res.attribute.api.bodyIn) let bodyIn = JSON.parse(res.attribute.api.bodyIn)
let bodyFlag = bodyIn[0].parameterType !== "complex" console.log(bodyIn, 'bodyIn')
let bodyFlag = bodyIn[0] && bodyIn[0].parameterType !== "complex"
let queryObj = {}; let queryObj = {};
let headerObj = {}; let headerObj = {};
let bodyObj let bodyObj
@ -704,6 +706,7 @@ export default {
bodyObj[item.interfaceKey] = item.interfaceValue === null ? "" : item.interfaceValue; bodyObj[item.interfaceKey] = item.interfaceValue === null ? "" : item.interfaceValue;
} }
}) })
console.log(1,res.attribute.api)
// //
if (res.attribute.api.needLogin == 1) { if (res.attribute.api.needLogin == 1) {
this.getDebugInfoHandle( this.getDebugInfoHandle(
@ -731,7 +734,7 @@ export default {
this.$set(json, "query", {}); this.$set(json, "query", {});
} }
if ( if (
JSON.parse(res.attribute.api.bodyIn) JSON.parse(res.attribute.api.bodyIn).length
) { ) {
if (!bodyFlag) { if (!bodyFlag) {
this.DebugDataHandle(bodyObj, bodyIn[0].children) this.DebugDataHandle(bodyObj, bodyIn[0].children)
@ -986,7 +989,7 @@ export default {
computed: { computed: {
// //
funWidth() { funWidth() {
return this.mainFunData.length * 70; return this.mainFunData.length * 90;
}, },
}, },
components: { components: {

View File

@ -250,6 +250,7 @@ export default {
}, },
authDataHandle(obj, arr) { authDataHandle(obj, arr) {
arr.forEach((item) => { arr.forEach((item) => {
console.log(item, 'item')
if (item.parameterType === "authport") { if (item.parameterType === "authport") {
obj[item.parameterName] = this.authDataReturn(item.example); obj[item.parameterName] = this.authDataReturn(item.example);
} }
@ -297,12 +298,16 @@ export default {
// //
async init() { async init() {
//url //url
console.log(1)
this.getApiModuleApiHanlde(0, false, this.stepOneForm.destinationAddress) this.getApiModuleApiHanlde(0, false, this.stepOneForm.destinationAddress)
console.log(222)
if (this.stepZeroForm.needLogin === '1') { if (this.stepZeroForm.needLogin === '1') {
this.getApiModuleApiHanlde(this.stepZeroForm.authenticationPort, true) this.getApiModuleApiHanlde(this.stepZeroForm.authenticationPort, true)
console.log(333)
} }
}, },
async getApiModuleApiHanlde(id, flag, address = {}) { async getApiModuleApiHanlde(id, flag, address = {}) {
console.log(11123)
const res = await getApiModuleApi( const res = await getApiModuleApi(
{ {
tl: "sysApplicationService", tl: "sysApplicationService",
@ -311,12 +316,15 @@ export default {
}, },
{id: id, appId: this.$route.query.id} {id: id, appId: this.$route.query.id}
); );
console.log(77)
let tempUrl = res.attribute.app.interfaceAddress ? res.attribute.app.interfaceAddress : "" let tempUrl = res.attribute.app.interfaceAddress ? res.attribute.app.interfaceAddress : ""
if (flag) { if (flag) {
console.log(tempUrl, 'tempUrl')
this.authMethod = res.attribute.api.requestMethod == 1 ? 'post' : 'get'; this.authMethod = res.attribute.api.requestMethod == 1 ? 'post' : 'get';
this.authInterfaceAddress = tempUrl + res.attribute.api.destinationAddress; this.authInterfaceAddress = tempUrl + res.attribute.api.destinationAddress;
let bodyIn = JSON.parse(res.attribute.api.bodyIn) let bodyIn = JSON.parse(res.attribute.api.bodyIn)
let bodyFlag = bodyIn[0].parameterType !== "complex" console.log(bodyIn, '1')
let bodyFlag = bodyIn[0] && bodyIn[0].parameterType !== "complex"
let headerObj = {} let headerObj = {}
let bodyObj let bodyObj
let queryObj = {} let queryObj = {}
@ -343,7 +351,8 @@ export default {
this.$set(this.authInfo, 'query', deepClone(queryObj)) this.$set(this.authInfo, 'query', deepClone(queryObj))
this.$set(this.authInfo, 'body', deepClone(bodyObj)) this.$set(this.authInfo, 'body', deepClone(bodyObj))
} else { } else {
let bodyFlag = this.bodyEntTableInfo[0].parameterType !== "complex" console.log(88, this.bodyEntTableInfo)
let bodyFlag = this.bodyEntTableInfo.length && this.bodyEntTableInfo[0].parameterType !== "complex"
let headerObj = {} let headerObj = {}
let bodyObj let bodyObj
let queryObj = {} let queryObj = {}
@ -362,19 +371,26 @@ export default {
this.interfaceAddress = tempUrl + address; this.interfaceAddress = tempUrl + address;
this.headerDisposeHandle(headerObj, this.headersTableInfo) this.headerDisposeHandle(headerObj, this.headersTableInfo)
this.queryDisposeHandle(queryObj, this.queryTableInfo) this.queryDisposeHandle(queryObj, this.queryTableInfo)
if (!bodyFlag) { if (this.bodyEntTableInfo.length) {
this.bodyDisposeHandle(bodyObj, this.bodyEntTableInfo[0].children) if (!bodyFlag) {
this.bodyDisposeHandle(bodyObj, this.bodyEntTableInfo[0].children)
} else {
this.bodyDisposeHandle(bodyObj[0], this.bodyEntTableInfo[0].children)
}
} else { } else {
this.bodyDisposeHandle(bodyObj[0], this.bodyEntTableInfo[0].children) bodyObj = {}
} }
this.$set(this.resultInfo, 'headers', deepClone(headerObj)) this.$set(this.resultInfo, 'headers', deepClone(headerObj))
this.$set(this.resultInfo, 'query', deepClone(queryObj)) this.$set(this.resultInfo, 'query', deepClone(queryObj))
this.$set(this.resultInfo, 'body', deepClone(bodyObj)) this.$set(this.resultInfo, 'body', deepClone(bodyObj))
console.log(33)
} }
}, },
headerDisposeHandle(header, arr) { headerDisposeHandle(header, arr) {
arr.forEach(item => { arr.forEach(item => {
console.log(item, 'item3')
if (item.parameterType === "authport") { if (item.parameterType === "authport") {
header[item.parameterName] = ""; header[item.parameterName] = "";
} else { } else {
@ -441,11 +457,13 @@ export default {
// }); // });
// }, // },
jsonParseHandle(parameterType, example, concreteType = false) { jsonParseHandle(parameterType, example, concreteType = false) {
console.log(parameterType, 'parameterType1')
let parameterTypeDist = { let parameterTypeDist = {
authport: "", authport: "",
fundamentallist: [example], fundamentallist: [example],
}[parameterType] }[parameterType]
return parameterTypeDist || (()=>{ return parameterTypeDist || (() => {
if (concreteType === "Number" && this.isNumberOrFloat(example)) return example * 1; if (concreteType === "Number" && this.isNumberOrFloat(example)) return example * 1;
if (example === "false" || example === "true") return JSON.parse(example) if (example === "false" || example === "true") return JSON.parse(example)
return example return example
@ -458,6 +476,7 @@ export default {
}, },
bodyDisposeHandle(obj, arr) { bodyDisposeHandle(obj, arr) {
arr.forEach((item) => { arr.forEach((item) => {
console.log(item, 'item2')
const {parameterName, concreteType, parameterType, example, children} = item; const {parameterName, concreteType, parameterType, example, children} = item;
if (parameterName && concreteType) { if (parameterName && concreteType) {
if (!["Object", "ObjectCom", "Map"].includes(concreteType)) { if (!["Object", "ObjectCom", "Map"].includes(concreteType)) {

View File

@ -124,11 +124,11 @@ export default {
}, },
methods: { methods: {
onSubmitHandle(){ onSubmitHandle(){
} }
}, },
}; };
</script> </script>
<style> <style>
</style> </style>

View File

@ -7,63 +7,70 @@ const tableColumnData = [
{ {
label: '发送者应用', label: '发送者应用',
prop: 'sendAppName', prop: 'sendAppName',
tooltip: true, tooltip: true
}, },
{ {
label: '源数据', label: '源数据',
prop: 'sourceData', prop: 'sourceData',
tooltip: true, tooltip: true
}, },
{ {
label: '目标数据', label: '目标数据',
prop: 'targetData', prop: 'targetData',
tooltip: true, tooltip: true
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
tooltip: true, tooltip: true
}, },
{ {
label: '错误状态', label: '错误状态',
prop: 'errorStatus', prop: 'errorStatus',
tooltip: true, tooltip: true
}, },
{ {
label: '返回信息', label: '返回信息',
prop: 'returnData', prop: 'returnData',
tooltip: true, tooltip: true
}, {
label: '创建时间',
prop: 'createTime',
tooltip: true,
},
]
const tableVersionColumn = [
{
label: '接收者名称',
prop: 'receiveName',
},
{
label: '接收者编码',
prop: 'receiveCode',
},
{
label: '接收者应用',
prop: 'receiveApp',
},
{
label: '接收者',
prop: 'receiveApi',
},
{
label: '数据类型',
prop: 'dataType',
}, },
{ {
label: '备注', label: '备注',
prop: 'remark', prop: 'remark',
tooltip: true
}, },
{
label: '创建时间',
prop: 'createTime',
tooltip: true
},
]
const tableVersionColumn = [
{
label: '接收者名称',
prop: 'receiveName'
},
{
label: '接收者编码',
prop: 'receiveCode'
},
{
label: '接收者应用',
prop: 'receiveApp'
},
{
label: '接收者',
prop: 'receiveApi'
},
{
label: '数据类型',
prop: 'dataType'
},
{
label: '备注',
prop: 'remark'
}
] ]
// 基本信息内容 // 基本信息内容
@ -85,7 +92,7 @@ const formRow = [
disabled: true, disabled: true,
options: [], options: [],
optionValue: 'id', optionValue: 'id',
optionLabel: 'name', optionLabel: 'name'
}, { }, {
label: '发送者', label: '发送者',
prop: 'sendApi', prop: 'sendApi',
@ -93,7 +100,7 @@ const formRow = [
disabled: true, disabled: true,
options: [], options: [],
optionValue: 'id', optionValue: 'id',
optionLabel: 'apiName', optionLabel: 'apiName'
}] }]
}, },
{ {
@ -104,7 +111,7 @@ const formRow = [
disabled: true, disabled: true,
options: [], options: [],
optionValue: 'id', optionValue: 'id',
optionLabel: 'name', optionLabel: 'name'
}, { }, {
label: '接收者', label: '接收者',
prop: 'receiveApi', prop: 'receiveApi',
@ -112,7 +119,7 @@ const formRow = [
disabled: true, disabled: true,
options: [], options: [],
optionValue: 'id', optionValue: 'id',
optionLabel: 'apiName', optionLabel: 'apiName'
}] }]
}, },
{ {
@ -120,8 +127,8 @@ const formRow = [
label: '源数据', label: '源数据',
prop: 'sourceData', prop: 'sourceData',
tag: 'elSlot', tag: 'elSlot',
slotName: "sourceData", slotName: 'sourceData',
span: 24, span: 24
}] }]
}, },
{ {
@ -129,8 +136,8 @@ const formRow = [
label: '目标数据', label: '目标数据',
prop: 'targetData', prop: 'targetData',
tag: 'elSlot', tag: 'elSlot',
slotName: "targetData", slotName: 'targetData',
span: 24, span: 24
}] }]
}, },
{ {
@ -141,12 +148,12 @@ const formRow = [
disabled: true, disabled: true,
span: 24, span: 24,
options: [ options: [
{value: "1", label: "待发送"}, { value: '1', label: '待发送' },
{value: "2", label: "发送中"}, { value: '2', label: '发送中' },
{value: "3", label: "发送成功"}, { value: '3', label: '发送成功' },
{value: "4", label: "发送失败"}, { value: '4', label: '发送失败' }
], ]
},] }]
}, },
{ {
elCol: [{ elCol: [{
@ -156,10 +163,10 @@ const formRow = [
disabled: true, disabled: true,
span: 24, span: 24,
options: [ options: [
{value: "1", label: "需要重新发送"}, { value: '1', label: '需要重新发送' },
{value: "2", label: "不需要重新发送"}, { value: '2', label: '不需要重新发送' }
], ]
},] }]
}, },
{ {
elCol: [{ elCol: [{
@ -168,9 +175,9 @@ const formRow = [
tag: 'elInput', tag: 'elInput',
type: 'textarea', type: 'textarea',
disabled: true, disabled: true,
span: 24, span: 24
}] }]
}, }
] ]
const basicsRules = { const basicsRules = {
@ -183,7 +190,7 @@ const basicsRules = {
required: true, required: true,
message: '请输入目标数据', message: '请输入目标数据',
trigger: 'blur' trigger: 'blur'
}], }]
} }
// 查看 // 查看
@ -196,8 +203,8 @@ const formRowShow = [
disabled: true, disabled: true,
options: [], options: [],
optionValue: 'id', optionValue: 'id',
optionLabel: 'name', optionLabel: 'name'
},] }]
}, },
{ {
elCol: [{ elCol: [{
@ -206,7 +213,7 @@ const formRowShow = [
tag: 'elInput', tag: 'elInput',
disabled: true, disabled: true,
type: 'textarea', type: 'textarea',
span: 24, span: 24
}] }]
}, },
{ {
@ -216,7 +223,7 @@ const formRowShow = [
tag: 'elInput', tag: 'elInput',
disabled: true, disabled: true,
type: 'textarea', type: 'textarea',
span: 24, span: 24
}] }]
}, },
{ {
@ -227,12 +234,12 @@ const formRowShow = [
disabled: true, disabled: true,
span: 24, span: 24,
options: [ options: [
{value: "1", label: "待发送"}, { value: '1', label: '待发送' },
{value: "2", label: "发送中"}, { value: '2', label: '发送中' },
{value: "3", label: "发送成功"}, { value: '3', label: '发送成功' },
{value: "4", label: "发送失败"}, { value: '4', label: '发送失败' }
], ]
},] }]
}, },
{ {
elCol: [{ elCol: [{
@ -242,10 +249,10 @@ const formRowShow = [
disabled: true, disabled: true,
span: 24, span: 24,
options: [ options: [
{value: "1", label: "需要重新发送"}, { value: '1', label: '需要重新发送' },
{value: "2", label: "不需要重新发送"}, { value: '2', label: '不需要重新发送' }
], ]
},] }]
}, },
{ {
elCol: [{ elCol: [{
@ -254,9 +261,9 @@ const formRowShow = [
tag: 'elInput', tag: 'elInput',
type: 'textarea', type: 'textarea',
disabled: true, disabled: true,
span: 24, span: 24
}] }]
}, }
] ]
export default { export default {
tableColumnData, tableColumnData,

View File

@ -1,26 +1,29 @@
<template> <template>
<div> <div>
<base-layout <base-layout
ref="baseLayout" ref="baseLayout"
@onFuncBtn="onFuncBtn" :showTitle="false"
:querySwitch="true" :searchShow="false"
:searchList="requirementList" @onFuncBtn="onFuncBtn"
@search="handleSearchEvent" :querySwitch="true"
:isPage="true" :searchList="requirementList"
@pageChange="handlePageChange" @search="handleSearchEvent"
:bodyHight="''" :isPage="true"
@pageChange="handlePageChange"
@onElSelect="onElSelect"
:bodyHight="''"
> >
<div slot="main" slot-scope="{ tableHeight }"> <div slot="main" slot-scope="{ tableHeight }">
<base-table <base-table
ref="baseTable" ref="baseTable"
:showIndex="true" :showIndex="true"
:funWidth="215" :funWidth="215"
:funData="funData" :funData="funData"
@onFunc="onFunc" @onFunc="onFunc"
:tabLoading.sync="tabLoading" :tabLoading.sync="tabLoading"
:tableHeight="'50vh'" :tableHeight="'40vh'"
:tableData="tableData" :tableData="tableData"
:tableColumn="tableColumnData" :tableColumn="tableColumnData"
> >
<template v-slot:status="{ row }"> <template v-slot:status="{ row }">
<div style="width: 100%"> <div style="width: 100%">
@ -35,7 +38,7 @@
<div style="width: 100%"> <div style="width: 100%">
<span>{{ <span>{{
row.errorStatus === "1" ? "需要重新发送" : "不需要重新发送" row.errorStatus === "1" ? "需要重新发送" : "不需要重新发送"
}}</span> }}</span>
</div> </div>
</template> </template>
</base-table> </base-table>
@ -83,13 +86,21 @@ export default {
optionValue: "id", optionValue: "id",
optionLabel: "name", optionLabel: "name",
}, },
{
placeholder: "开始日期",
prop: "createTimeStart",
tag: "elDatePicker",
},
{
placeholder: "结束日期",
prop: "createTimeEnd",
tag: "elDatePicker",
},
{ {
placeholder: "状态", placeholder: "状态",
prop: "status", prop: "status",
tag: "elSelect", tag: "elSelect",
options: [ options: [
{id: "1", label: "待发送"},
{id: "2", label: "发送中"},
{id: "3", label: "发送成功"}, {id: "3", label: "发送成功"},
{id: "4", label: "发送失败"}, {id: "4", label: "发送失败"},
], ],
@ -100,6 +111,21 @@ export default {
optionValue: "id", optionValue: "id",
optionLabel: "label", optionLabel: "label",
}, },
{
placeholder: "源数据",
prop: "sourceData",
tag: "elInput",
},
{
placeholder: "目标数据",
prop: "targetData",
tag: "elInput",
},
{
placeholder: "返回信息",
prop: "returnData",
tag: "elInput",
},
], //list ], //list
tabLoading: false, tabLoading: false,
tableColumnData: configData.tableColumnData, // tableColumnData: configData.tableColumnData, //
@ -112,7 +138,7 @@ export default {
tableData: [], // tableData: [], //
pageModel: { pageModel: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 100,
}, },
queryModel: { queryModel: {
theme: "", theme: "",
@ -121,29 +147,48 @@ export default {
receiveApp: "", receiveApp: "",
receiveApi: "", receiveApi: "",
status: "", status: "",
targetData: '',
sourceData: '',
returnData: ''
}, },
}; };
}, },
created() { created() {
this.GetMessageLogTableData(); // this.GetMessageLogTableData();
this.initSelect() this.initSelect()
}, },
methods: { methods: {
async onElSelect(event, index, indexItem, model, row) {
console.log(event, index, indexItem, model, row)
if (row.placeholder === '接受者应用') {
this.$set(this.queryModel, 'receiveApi', '')
this.$set(this.$refs.baseLayout.ruleForm, 'receiveApi', "")
if (event) {
const res = await authApi('sysApplicationService', 'application', 'thirdInterfacequeryAppApi', '', {
appId: event
})
if (res.status == 200) {
this.requirementList[2].options = res.attribute
}
} else {
this.requirementList[2].options = []
}
}
},
// //
async GetMessageLogTableData() { async GetMessageLogTableData() {
this.tabLoading = true; this.tabLoading = true;
let param = { let param = {
...this.pageModel, ...this.pageModel,
...this.queryModel, ...this.queryModel,
receiveApp: this.$route.query.id,
receiveApi: this.receiveApi
}; };
let res = await authApi( let res = await authApi(
"sysApplicationService", "sysApplicationService",
"application", "application",
"queryAppApiLog", "thirdInterfacequeryAppApiLog",
"", "",
param param
); );
this.tabLoading = false; this.tabLoading = false;
console.log(res, 112312312) console.log(res, 112312312)
@ -181,16 +226,16 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.openLoading("detail"); this.openLoading("detail");
this.messageResendData(row.id); this.messageResendData(row.id);
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: "info", type: "info",
message: "取消重新发送", message: "取消重新发送",
});
}); });
});
} }
}, },
async messageResendData(id) { async messageResendData(id) {
@ -198,11 +243,11 @@ export default {
id: id, id: id,
}; };
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", "sysMessageManageLogService",
"messageManage", "messageManage",
"resendData", "resendData",
"", "",
param param
); );
if (res.status == "200") { if (res.status == "200") {
this.$vmNews("重新发送成功!", "success"); this.$vmNews("重新发送成功!", "success");
@ -218,24 +263,40 @@ export default {
// //
handleSearchEvent(form) { handleSearchEvent(form) {
let data = this.$refs.baseLayout.ruleForm; let data = this.$refs.baseLayout.ruleForm;
this.queryModel.theme = data.theme; data.receiveApp = this.$route.query.id;
this.queryModel.sendApp = data.sendApp; data.receiveApi = this.receiveApi;
this.queryModel.sendApi = data.sendApi; this.queryModel = {...data}
this.queryModel.receiveApp = data.receiveApp; // if (!data.sendApp) {
this.queryModel.receiveApi = data.receiveApi; // this.$vmNews("")
this.queryModel.status = data.status; // return
// }
// if (!data.receiveApp) {
// this.$vmNews("")
// return
// }
// if (!data.receiveApi) {
// this.$vmNews("api")
// return
// }
if (!data.status) {
this.$vmNews("请选择状态")
return
}
this.resetTable(); this.resetTable();
}, },
async initSelect() { async initSelect() {
const res = await getApiModuleApi({ const res = await getApiModuleApi({
tl: "sysApplicationService", tl: "sysApplicationService",
as: "application", as: "application",
dj: "queryApp" dj: "thirdInterfacequeryApp"
}, { }, {
"pageNum": 1, "pageNum": 1,
"pageSize": 999 "pageSize": 999
}) })
console.log(res, 'res')
this.requirementList[0].options = res.attribute.list this.requirementList[0].options = res.attribute.list
this.requirementList[1].options = res.attribute.list
}, },
// async onElSelect(val, b, c, d, row) { // async onElSelect(val, b, c, d, row) {
// if (row.prop === 'sendApp') { // if (row.prop === 'sendApp') {
@ -258,9 +319,12 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped lang="scss">
.clickTitle { .clickTitle {
color: #409eff; color: #409eff;
cursor: pointer; cursor: pointer;
} }
::v-deep .el-dialog__body{
padding: 0px !important;
}
</style> </style>

View File

@ -1,46 +1,46 @@
<template> <template>
<div> <div>
<base-right-dialog <base-right-dialog
ref="baseRightDialog" ref="baseRightDialog"
:footerShow="true" :footerShow="true"
:dialogVisible.sync="dialogVisible" :dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 消息管理日志'" :title="dialogTitle + ' 消息管理日志'"
@handleClose="handleDialogClose" @handleClose="handleDialogClose"
:type="dialogType" :type="dialogType"
:submitShow="submitShow" :submitShow="submitShow"
:size="'65%'" :size="'65%'"
@handleConfirmClick="handleConfirmClick" @handleConfirmClick="handleConfirmClick"
> >
<base-form <base-form
ref="basicsForm" ref="basicsForm"
:formRow="formRow" :formRow="formRow"
:isFunBtn="false" :isFunBtn="false"
:rules="basicsRules" :rules="basicsRules"
class="dialog_form" class="dialog_form"
:spanWidth="`120px`" :spanWidth="`120px`"
:loading="vLoading" :loading="vLoading"
style="padding-bottom:20px;" style="padding-bottom:20px;"
> >
<div slot="sourceData" class="code-json-editor"> <div slot="sourceData" class="code-json-editor">
<vue-json-editor <vue-json-editor
class="editor" class="editor"
v-model="sourceData" v-model="sourceData"
:showBtns="false" :showBtns="false"
:mode="'code'" :mode="'code'"
@json-change="onSourceDataJsonChange" @json-change="onSourceDataJsonChange"
@json-save="onSourceDataSave" @json-save="onSourceDataSave"
@has-error="onSourceDataError" @has-error="onSourceDataError"
/> />
</div> </div>
<div slot="targetData" class="code-json-editor"> <div slot="targetData" class="code-json-editor">
<vue-json-editor <vue-json-editor
class="editor" class="editor"
v-model="targetData" v-model="targetData"
:showBtns="false" :showBtns="false"
:mode="'code'" :mode="'code'"
@json-change="onTargetDataChange" @json-change="onTargetDataChange"
@json-save="onTargetDataSave" @json-save="onTargetDataSave"
@has-error="onTargetDataError" @has-error="onTargetDataError"
/> />
</div> </div>
</base-form> </base-form>
@ -81,7 +81,7 @@ export default {
methods: { methods: {
openDialog(type, row) { openDialog(type, row) {
this.querysysAppService(); this.querysysAppService();
this.querysysAppApiService(); // this.querysysAppApiService();
this.formRow = configData.formRow; this.formRow = configData.formRow;
this.submitShow = true; this.submitShow = true;
// //
@ -106,11 +106,11 @@ export default {
id: id, id: id,
}; };
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", "sysMessageManageLogService",
"messageManage", "messageManage",
"queryEntity", "thirdInterfacequeryEntity",
"", "",
params params
); );
if (res.status == "200") { if (res.status == "200") {
this.$nextTick(() => { this.$nextTick(() => {
@ -184,11 +184,11 @@ export default {
// //
async messageLogUpdateDto(params) { async messageLogUpdateDto(params) {
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", "sysMessageManageLogService",
"messageManage", "messageManage",
"updateEntity", "updateEntity",
"", "",
params params
); );
if (res.status == "200") { if (res.status == "200") {
this.handleDialogClose(); this.handleDialogClose();
@ -201,7 +201,7 @@ export default {
const res = await getApiModuleApi({ const res = await getApiModuleApi({
tl: "sysApplicationService", tl: "sysApplicationService",
as: "application", as: "application",
dj: "queryApp" dj: "thirdInterfacequeryApp"
}, { }, {
"pageNum": 1, "pageNum": 1,
"pageSize": 999 "pageSize": 999
@ -219,11 +219,11 @@ export default {
pageNum: 1, pageNum: 1,
}; };
let res = await authApi( let res = await authApi(
"appApiService", "appApiService",
"appApi", "appApi",
"queryPage", "queryPage",
"", "",
params params
); );
if (res.status == "200") { if (res.status == "200") {
// this.formRow[1].elCol[1].options = res.attribute.list; // this.formRow[1].elCol[1].options = res.attribute.list;
@ -247,7 +247,7 @@ export default {
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep textarea.el-textarea__inner { ::v-deep textarea.el-textarea__inner {
min-height: 150px !important; min-height: 150px !important;
} }
.dialogList { .dialogList {
padding: 16px 0; padding: 16px 0;

View File

@ -1,99 +1,493 @@
<template> <template>
<div class="app-container home"> <div class="home">
<div class="dashboard-editor-container"> <!--上面块运行情况-->
<panel-group @handleSetLineChartData="handleSetLineChartData" /> <div class="operationInfo">
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> <!-- 异常日志-->
<line-chart :chart-data="lineChartData" /> <div class="errLogs">
</el-row> <div class="title">异常日志</div>
<el-row :gutter="32"> <div class="errorInfo">
<el-col :xs="24" :sm="24" :lg="8"> <div class="img">
<div class="chart-wrapper"> <img src="@/assets/images/index_v2_error.png"/>
<raddar-chart />
</div> </div>
</el-col> <div class="num">{{ errorNum }}</div>
<el-col :xs="24" :sm="24" :lg="8"> </div>
<div class="chart-wrapper"> <!-- 轮播图-->
<pie-chart /> <div class="swiper">
<el-carousel height="150px" arrow="never" :loop="true">
<el-carousel-item v-for="(item,index) in errList" :key="index">
<div class="errList">
<div class="errItem" v-for="row in errList[index]">
<div class="img">
<img :src="row.imgUrl" alt="" @error="handleImageError(row)"/>
</div>
<div class="num">
{{ row.num }}
</div>
</div>
</div>
</el-carousel-item>
</el-carousel>
</div>
</div>
<!-- 接口运行情况-->
<div class="apiInfo">
<div class="title">接口运行情况</div>
<div class="table">
<div class="tableTitle">
<div class="app">应用</div>
<div class="total">总数</div>
<div class="start">启动</div>
<div class="stop">停用</div>
</div> </div>
</el-col> <div class="content" @mouseenter="mouseenterHandle" @mouseleave="mouseleaveHandle">
<el-col :xs="24" :sm="24" :lg="8"> <div class="tableContent" ref="refcontent">
<div class="chart-wrapper"> <div class="line" v-for="(row,index) in this.apiInfoTableData" :key="index">
<bar-chart /> <div class="app">
<img :src="row.imgUrl" alt="" @error="handleImageError(row)"/>
</div>
<div class="total">{{ row.num ? row.num : 0 }}</div>
<div class="start">{{ row.normalNum ? row.normalNum : 0 }}</div>
<div class="stop">{{ row.abnormalNum ? row.abnormalNum : 0 }}</div>
</div>
</div>
</div> </div>
</el-col>
</el-row> </div>
</div>
<!-- 任务运行情况-->
<div class="taskInfo">
<div class="title">任务运行情况</div>
<div class="taskInfoList">
<div class="total">
<div class="text">总任务</div>
<div class="num">{{ taskTotal }}</div>
</div>
<div class="start">
<div class="text">运行中</div>
<div class="num">{{ taskStart }}</div>
</div>
<div class="stop">
<div class="text">停止</div>
<div class="num">{{ taskStop }}</div>
</div>
</div>
</div>
</div>
<!-- 柱状图-->
<div class="echarts">
<div class="title">数据接入</div>
<div class="form">
<BarChart :proportion="proportion" :DataCollection="echartsData"></BarChart>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import PanelGroup from './dashboard/PanelGroup'
import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
const lineChartData = { import request from "@/utils/request";
newVisitis: { import {authApi} from "@/api/apis/auth";
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145]
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130]
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130]
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
}
}
export default { export default {
name: 'Index', name: 'Index',
components: { components: {},
PanelGroup,
LineChart,
RaddarChart,
PieChart,
BarChart
},
data() { data() {
return { return {
lineChartData: lineChartData.newVisitis //echats
proportion: {
width: "100%",
height: "40vh",
},
//echarts
echartsData: {
"title": [
"正常",
"异常",
],
"parameter": [],
"series": [
{
"name": "正常",
"type": "bar",
"data": [],
"barWidth": "10%",
"barGap": "0"
},
{
"name": "异常",
"type": "bar",
"data": [],
"barWidth": "10%",
"barGap": "0"
},
]
},
errorNum: 4,//
errList: [],//
apiInfoTableData: [],//
taskTotal: 19,//
taskStart: 20,//
taskStop: 21,//
} }
}, },
mounted() { mounted() {
this.init()
}, },
methods: { methods: {
handleSetLineChartData(type) { //
this.lineChartData = lineChartData[type] async init() {
this.getErrorLogs()
this.getApiInfo()
this.getTaskInfo()
this.getTableData()
},
//
imgHandle(arr = []) {
arr.map(el => {
return request({
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + el.path,
method: "get",
responseType: 'arraybuffer'
}).then((res) => {
let tempImgUrl =
"data:image/png/jpg;base64," + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ""));
this.$set(el, 'imgUrl', tempImgUrl)
})
})
},
// 使
handleImageError(row = {}) {
row.imgUrl = require('@/assets/images/defaultIcon.png')
},
//
mouseenterHandle() {
this.$refs.refcontent.style.animationPlayState = 'paused'
},
mouseleaveHandle() {
this.$refs.refcontent.style.animationPlayState = ''
},
//
async getErrorLogs() {
const res = await authApi('homeService', 'app', 'appErrorNum', '', {})
if (res.status === '200') {
this.errList = []
//
this.imgHandle(res.attribute)
let tempIndex = 0 //
let tempArr = [] //
console.log(res.attribute, '异常日志')
this.errorNum = 0
res.attribute.some((item, index) => {
this.errorNum += item.num * 1
tempArr.push(item)
tempIndex++
if (tempIndex === 3) {
this.errList.push(tempArr)
tempIndex = 0
tempArr = []
}
if (index === res.attribute.length - 1 && tempIndex !== 0) {
this.errList.push(tempArr)
return true
}
})
console.log(this.errList, 'errList')
}
},
//
async getApiInfo() {
const res = await authApi('homeService', 'app', 'appApiNum', '', {})
if (res.status === '200') {
this.apiInfoTableData = []
this.imgHandle(res.attribute)
this.apiInfoTableData = res.attribute
if (this.apiInfoTableData.length >= 4) {
this.apiInfoTableData = [...this.apiInfoTableData, ...this.apiInfoTableData]
//
this.$refs.refcontent.classList.add('movego')
this.$refs.refcontent.style.animationDuration = `${this.apiInfoTableData.length}s`
}
console.log(this.apiInfoTableData, 'this.apiInfoTableData')
}
},
//
async getTaskInfo() {
const res = await authApi('homeService', 'app', 'taskNum', '', {})
console.log(res, '任务运行情况')
this.taskTotal = res.attribute.num ? res.attribute.num : 0
this.taskStart = res.attribute.normalNum ? res.attribute.normalNum : 0
this.taskStop = res.attribute.abnormalNum ? res.attribute.abnormalNum : 0
},
//
async getTableData() {
let tempDate = []
let normalNumData = []
let abnormalNumData = []
const res = await authApi('homeService', 'app', 'sevenNum', '', {})
res.attribute.forEach(item => {
tempDate.push(item.name)
normalNumData.push(item.normalNum ? item.normalNum : 0)
abnormalNumData.push(item.abnormalNum ? item.abnormalNum : 0)
})
//echarts
//
this.echartsData.parameter = tempDate
//
this.echartsData.series[0].data = normalNumData
//
this.echartsData.series[1].data = abnormalNumData
console.log(res, '数据接入')
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dashboard-editor-container { .home {
padding: 32px; //background: url(~@/assets/images/index_v2_bgc.png) no-repeat;
background-color: #FBFBFB; padding: 1vh .5vw 1vh;
position: relative; background-color: #fcfcfc;
height: 100%; display: flex;
overflow: auto; flex-direction: column;
//
.operationInfo {
.chart-wrapper { flex: 1;
background: #fff; display: flex;
padding: 16px 16px 0; //
margin-bottom: 32px; .errLogs {
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* 轻盈的阴影效果 */
background-color: #fff;
padding: 8px;
//background: url(~@/assets/images/index_v2_border.png) no-repeat;
//background-size: 100% 100%;
flex: 1;
height: 100%;
> .errorInfo {
display: flex;
justify-content: center;
align-items: center;
height: 7vh;
> .img {
margin-right: 20px;
width: 5vw;
height: 100%;
img {
width: 5vw;
height: 7vh;
}
}
> .num {
width: 5vw;
font-size: 3vw;
color: #000;
font-weight: 700;
text-align: center;
}
}
> .swiper {
margin-top: 3vh;
.errList {
margin-top: 20px;
display: flex;
justify-content: space-around;
> .errItem {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-right: .5px #ccc solid;
> .img {
width: 3vw;
height: 3vw;
border-radius: 8px;
overflow: hidden;
display: flex;
align-items: center;
img {
width: 100%;
}
}
> .num {
margin-top: 10px;
width: 4vw;
text-align: center;
color: #000;
font-weight: 700;
font-size: 1.5vw;
}
&:nth-last-child(1) {
border-right: 0px;
}
}
}
}
}
//
.apiInfo {
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* 轻盈的阴影效果 */
background-color: #fff;
padding: 8px;
//background: url(~@/assets/images/index_v2_border.png) no-repeat;
//background-size: 100% 100%;
flex: 1;
margin: 0 10px;
height: 100%;
display: flex;
flex-direction: column;
> .table {
padding: 0 15px;
> .tableTitle {
display: flex;
justify-content: space-around;
padding-bottom: 10px;
border-bottom: #ccc 1px solid;
> div {
display: flex;
color: #000;
font-size: 20px;
}
}
.content {
height: 22vh;
overflow: hidden;
> .tableContent {
> .line {
padding: 15px 0;
display: flex;
justify-content: space-around;
align-items: center;
border-bottom: 1px #ccc dashed;
> div {
color: #000;
font-size: 32px;
flex: 1;
text-align: center;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
img {
width: 3vw;
}
}
}
}
}
}
}
.taskInfo {
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* 轻盈的阴影效果 */
background-color: #fff;
padding: 8px;
//background: url(~@/assets/images/index_v2_border.png) no-repeat;
//background-size: 100% 100%;
flex: 1;
height: 100%;
> .taskInfoList {
display: flex;
justify-content: space-around;
> div {
border-radius: 16px;
width: 28%;
height: 23vh;
display: flex;
font-weight: 700;
flex-direction: column;
align-items: center;
font-size: 34px;
color: #fff;
.text{
margin-top: 5vh;
}
.num{
margin-top: 5vh;
}
}
> .total {
background-color: #1d46ee;
}
> .start {
background-color: #7ad756;
}
> .stop {
background-color: #e76e3e;
}
}
}
}
//
.title {
//background: url(~@/assets/images/index_v2_title.png) no-repeat;
//background-size: 100% 100%;
width: 20vw;
height: 6vh;
color: #000;
line-height: 6vh;
padding-left: 1vw;
font-size: 24px;
font-weight: 700;
}
.echarts {
flex: 2;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* 轻盈的阴影效果 */
margin-top: 10px;
background-color: #fff;
.form{
margin-top: 5vh;
}
} }
} }
@media (max-width:1024px) { //
.chart-wrapper { @keyframes move {
padding: 8px; 0% {
transform: translateY(0);
} }
100% {
transform: translateY(-51%);
}
}
.movego {
animation: move 80s linear infinite;
} }
</style> </style>