Merge branch 'dev-3.4' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.4
This commit is contained in:
@@ -439,20 +439,36 @@ input,
|
|||||||
textarea {
|
textarea {
|
||||||
font-family: Inter-Regular !important;
|
font-family: Inter-Regular !important;
|
||||||
}
|
}
|
||||||
.message-next {
|
.custom-message{
|
||||||
vertical-align: bottom;
|
display: flex;
|
||||||
float: unset;
|
align-items: center;
|
||||||
font-size: 10px;
|
.message-right {
|
||||||
margin-left: 190px;
|
padding-right: 128px;
|
||||||
.message-next-continue {
|
position: relative;
|
||||||
color: $--color-text-primary;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
}
|
||||||
.message-next-content {
|
.message-right.hidden{
|
||||||
color: $--color-text-link;
|
display: none;
|
||||||
font-weight: 600;
|
}
|
||||||
|
.message-next {
|
||||||
|
width: 86px;
|
||||||
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
|
text-align: center;
|
||||||
|
border:1px solid $--message-success-font-color;
|
||||||
|
border-radius: 4px;
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: auto;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
span{
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.document-copy-block {
|
.document-copy-block {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
|
|||||||
@@ -374,3 +374,13 @@
|
|||||||
.meta-option-box {
|
.meta-option-box {
|
||||||
color: $--color-text-regular;
|
color: $--color-text-regular;
|
||||||
}
|
}
|
||||||
|
.el-range-input{
|
||||||
|
background: $--background-color-empty;
|
||||||
|
}
|
||||||
|
.ql-toolbar {
|
||||||
|
line-height: 22px;
|
||||||
|
.ql-picker-options{
|
||||||
|
background-color: $--background-color-empty;
|
||||||
|
color: $--color-text-primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -571,3 +571,11 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
background-color: $--table-body-background-color;
|
background-color: $--table-body-background-color;
|
||||||
}
|
}
|
||||||
|
.el-checkbox.is-disabled{
|
||||||
|
line-height: 1;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
.el-checkbox__input.is-disabled{
|
||||||
|
line-height: 1;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
&>.bottom-panel{
|
&>.bottom-panel{
|
||||||
padding: 15px 10px 10px 10px !important;
|
padding: 15px 10px 0px 10px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sub-top-tools .top-tool-btn-txt .nz-icon{
|
.sub-top-tools .top-tool-btn-txt .nz-icon{
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
color: #60BEFF;
|
color: #60BEFF;
|
||||||
font-size: 13px
|
font-size: 13px
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-dropdown-btn:hover {
|
.panel-dropdown-btn:hover {
|
||||||
color: #409EFF;
|
color: #409EFF;
|
||||||
}
|
}
|
||||||
@@ -150,6 +150,15 @@
|
|||||||
button:hover {
|
button:hover {
|
||||||
background: $--background-color-empty;
|
background: $--background-color-empty;
|
||||||
}
|
}
|
||||||
|
.footer__btn {
|
||||||
|
background-color: $--color-primary;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.footer__btn.footer__btn--light {
|
||||||
|
background-color: $--button-light-hover-background-color;
|
||||||
|
border: 1px solid $--button-light-border-color;
|
||||||
|
color: $--button-light-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.date-range-panel{
|
.date-range-panel{
|
||||||
.el-button--primary{
|
.el-button--primary{
|
||||||
|
|||||||
@@ -4,10 +4,13 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
background: $--background-color-empty;
|
background: $--background-color-empty;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-bottom: 5px;
|
margin-top: -5px;
|
||||||
|
flex-wrap: wrap;
|
||||||
.panel-variables-content{
|
.panel-variables-content{
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
.variable-key{
|
.variable-key{
|
||||||
border: 1px solid $--border-color-light;
|
border: 1px solid $--border-color-light;
|
||||||
@@ -15,18 +18,27 @@
|
|||||||
background: $--background-color-2;
|
background: $--background-color-2;
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
border-radius: 4px 0 0 4px;
|
border-radius: 4px 0 0 4px;
|
||||||
|
max-width: 120px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.choose-box {
|
.choose-box {
|
||||||
overflow: hidden;
|
width: 150px;
|
||||||
width: calc(100% - 7px);
|
//position: relative;
|
||||||
white-space: nowrap;
|
}
|
||||||
max-width: 200px;
|
.choose-box .no-select {
|
||||||
text-overflow: ellipsis;
|
width: 150px;
|
||||||
padding-right: 5px;
|
|
||||||
height: 30px;
|
|
||||||
border: 1px solid $--border-color-light;
|
border: 1px solid $--border-color-light;
|
||||||
|
background: $--background-color-empty;
|
||||||
|
box-sizing: border-box;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
padding-right: 5px;
|
||||||
|
height: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.nz-icon-arrow-down6{
|
.nz-icon-arrow-down6{
|
||||||
@@ -34,6 +46,13 @@
|
|||||||
color: $--color-text-secondary;
|
color: $--color-text-secondary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.choose-box .is-select{
|
||||||
|
width: 200px;
|
||||||
|
z-index: 1;
|
||||||
|
height: 32px;
|
||||||
|
position: relative;
|
||||||
|
//left: 0;
|
||||||
|
}
|
||||||
.choose-box-content{
|
.choose-box-content{
|
||||||
flex: 1;
|
flex: 1;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -46,8 +65,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.panel-variables{
|
.panel-variables{
|
||||||
min-width: 180px;
|
width: 200px;
|
||||||
max-width: 220px;
|
.pop-list {
|
||||||
|
max-height: 360px;
|
||||||
|
}
|
||||||
.el-dropdown-menu__item {
|
.el-dropdown-menu__item {
|
||||||
padding: 0 5px 0 20px;
|
padding: 0 5px 0 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -215,16 +215,16 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: Capitalize;
|
text-transform: Capitalize;
|
||||||
}
|
}
|
||||||
.pipeline-option {
|
|
||||||
i {
|
|
||||||
color: $--color-text-regular;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.el-input-group__append {
|
.el-input-group__append {
|
||||||
background-color: $--border-color-light;
|
background-color: $--border-color-light;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.pipeline-option {
|
||||||
|
i {
|
||||||
|
color: $--color-text-regular;
|
||||||
|
}
|
||||||
|
}
|
||||||
.sub-label {
|
.sub-label {
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
<panel-chart
|
<panel-chart
|
||||||
:ref="'chart-fullscreen' + fullscreen.chartInfo.id"
|
:ref="'chart-fullscreen' + fullscreen.chartInfo.id"
|
||||||
:chart-info="fullscreen.chartInfo"
|
:chart-info="fullscreen.chartInfo"
|
||||||
|
:variablesInit="variablesInit"
|
||||||
:from="from"
|
:from="from"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:is-fullscreen="true"
|
:is-fullscreen="true"
|
||||||
@@ -121,6 +122,10 @@ export default {
|
|||||||
default: () => {
|
default: () => {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
variablesInit: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -97,6 +97,10 @@ export default {
|
|||||||
},
|
},
|
||||||
dataJson: { // 导出的html的数据
|
dataJson: { // 导出的html的数据
|
||||||
type: Object
|
type: Object
|
||||||
|
},
|
||||||
|
variablesInit: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -148,6 +152,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 参数 isRefresh 标识是否是刷新操作
|
// 参数 isRefresh 标识是否是刷新操作
|
||||||
getChartData (isRefresh, params) { // 获取chart的数据前的准备 主要用于处理时间参数
|
getChartData (isRefresh, params) { // 获取chart的数据前的准备 主要用于处理时间参数
|
||||||
|
if (!this.variablesInit) { // 变量未加载完成 不请求数据
|
||||||
|
return
|
||||||
|
}
|
||||||
this.chartData = []
|
this.chartData = []
|
||||||
this.myVariables = []
|
this.myVariables = []
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ export default {
|
|||||||
// labelLoading:{},
|
// labelLoading:{},
|
||||||
that: {},
|
that: {},
|
||||||
detailList: Boolean,
|
detailList: Boolean,
|
||||||
alertTableDialog: Boolean
|
alertTableDialog: Boolean,
|
||||||
|
isTopoInfo: Boolean
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -31,9 +32,10 @@ export default {
|
|||||||
const leftOffSetView = this.detailList ? -80 : 10
|
const leftOffSetView = this.detailList ? -80 : 10
|
||||||
const leftOffSet = this.detailList ? -80 : 10
|
const leftOffSet = this.detailList ? -80 : 10
|
||||||
const topOffSet = this.detailList ? 60 : 22
|
const topOffSet = this.detailList ? 60 : 22
|
||||||
|
const topoOffset = this.isTopoInfo ? 155 : 0
|
||||||
if (position.top + this.heightList > clientHeight) {
|
if (position.top + this.heightList > clientHeight) {
|
||||||
return {
|
return {
|
||||||
left: `${position.left + position.width + leftOffSet}px`,
|
left: `${position.left + position.width + leftOffSet - topoOffset}px`,
|
||||||
top: `${position.top - this.heightList + topOffSet}px`
|
top: `${position.top - this.heightList + topOffSet}px`
|
||||||
}
|
}
|
||||||
} else if (this.alertTableDialog) {
|
} else if (this.alertTableDialog) {
|
||||||
@@ -47,7 +49,7 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
left: `${position.left + position.width + leftOffSetView}px`,
|
left: `${position.left + position.width + leftOffSetView - topoOffset}px`,
|
||||||
top: `${position.top}px`
|
top: `${position.top}px`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,31 +174,31 @@ export default {
|
|||||||
},
|
},
|
||||||
asset: {
|
asset: {
|
||||||
panel: [
|
panel: [
|
||||||
{ prop: 'panelTab', name: this.$t('overall.detail'), active: true },
|
{ prop: 'panelTab', name: this.$t('overall.dashboard'), active: true },
|
||||||
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
||||||
{ prop: 'endpointTab', name: this.$t('asset.endpoint'), active: false },
|
{ prop: 'endpointTab', name: this.$t('asset.endpoint'), active: false },
|
||||||
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label'), active: false }
|
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label'), active: false }
|
||||||
],
|
],
|
||||||
alertMessage: [
|
alertMessage: [
|
||||||
{ prop: 'panelTab', name: this.$t('overall.detail'), active: false },
|
{ prop: 'panelTab', name: this.$t('overall.dashboard'), active: false },
|
||||||
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: true },
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: true },
|
||||||
{ prop: 'endpointTab', name: this.$t('asset.endpoint'), active: false },
|
{ prop: 'endpointTab', name: this.$t('asset.endpoint'), active: false },
|
||||||
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label'), active: false }
|
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label'), active: false }
|
||||||
],
|
],
|
||||||
endpoint: [
|
endpoint: [
|
||||||
{ prop: 'panelTab', name: this.$t('overall.detail'), active: false },
|
{ prop: 'panelTab', name: this.$t('overall.dashboard'), active: false },
|
||||||
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
||||||
{ prop: 'endpointTab', name: this.$t('asset.endpoint'), active: true },
|
{ prop: 'endpointTab', name: this.$t('asset.endpoint'), active: true },
|
||||||
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label'), active: false }
|
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label'), active: false }
|
||||||
],
|
],
|
||||||
log: [
|
log: [
|
||||||
{ prop: 'panelTab', name: this.$t('overall.detail'), active: false },
|
{ prop: 'panelTab', name: this.$t('overall.dashboard'), active: false },
|
||||||
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
||||||
{ prop: 'endpointTab', name: this.$t('asset.endpoint'), active: false },
|
{ prop: 'endpointTab', name: this.$t('asset.endpoint'), active: false },
|
||||||
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label'), active: true }
|
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label'), active: true }
|
||||||
],
|
],
|
||||||
alertMessageSub: [
|
alertMessageSub: [
|
||||||
{ prop: 'panelTab', name: this.$t('overall.detail'), active: false },
|
{ prop: 'panelTab', name: this.$t('overall.dashboard'), active: false },
|
||||||
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false },
|
||||||
{ prop: 'endpointTab', name: this.$t('asset.endpoint'), active: false },
|
{ prop: 'endpointTab', name: this.$t('asset.endpoint'), active: false },
|
||||||
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label'), active: false },
|
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label'), active: false },
|
||||||
@@ -214,7 +214,7 @@ export default {
|
|||||||
},
|
},
|
||||||
endpoint: {
|
endpoint: {
|
||||||
endpointTabTitle: [
|
endpointTabTitle: [
|
||||||
{ prop: 'panelTab', name: this.$t('overall.detail') },
|
{ prop: 'panelTab', name: this.$t('overall.dashboard') },
|
||||||
{ prop: 'endpointAlertMessage', name: this.$t('overall.alert') },
|
{ prop: 'endpointAlertMessage', name: this.$t('overall.alert') },
|
||||||
{ prop: 'Metrics', name: this.$t('overall.metric') },
|
{ prop: 'Metrics', name: this.$t('overall.metric') },
|
||||||
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label') }
|
{ prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label') }
|
||||||
@@ -272,7 +272,7 @@ export default {
|
|||||||
const config = this.obj.configs.find(c => c.type === 'logs')
|
const config = this.obj.configs.find(c => c.type === 'logs')
|
||||||
const hasLog = config && config.enable === 1
|
const hasLog = config && config.enable === 1
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{ prop: 'panelTab', name: this.$t('overall.detail') },
|
{ prop: 'panelTab', name: this.$t('overall.dashboard') },
|
||||||
{ prop: 'endpointAlertMessage', name: this.$t('overall.alert') },
|
{ prop: 'endpointAlertMessage', name: this.$t('overall.alert') },
|
||||||
{ prop: 'Metrics', name: this.$t('overall.metric') }
|
{ prop: 'Metrics', name: this.$t('overall.metric') }
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -99,6 +99,7 @@
|
|||||||
<div id="tableList" class="table-list" style="padding-top: 0;overflow: hidden">
|
<div id="tableList" class="table-list" style="padding-top: 0;overflow: hidden">
|
||||||
<div id="dashboardScrollbar" class="table-list-box">
|
<div id="dashboardScrollbar" class="table-list-box">
|
||||||
<div class="box-content" ref="dashboardScrollbar" v-my-loading="chartListLoading" style="overflow-y: auto;display: flex;flex-direction: column">
|
<div class="box-content" ref="dashboardScrollbar" v-my-loading="chartListLoading" style="overflow-y: auto;display: flex;flex-direction: column">
|
||||||
|
<panel-variables :labelArrs="variables" :time-range="searchTime" @getPanelData="getPanelData"></panel-variables>
|
||||||
<chart-list
|
<chart-list
|
||||||
ref="chartList"
|
ref="chartList"
|
||||||
name="panel"
|
name="panel"
|
||||||
@@ -113,6 +114,7 @@
|
|||||||
@on-remove-chart="delChart"
|
@on-remove-chart="delChart"
|
||||||
@on-add-group-item-chart="addGroupItem"
|
@on-add-group-item-chart="addGroupItem"
|
||||||
@refreshPanel="refreshPanel"
|
@refreshPanel="refreshPanel"
|
||||||
|
:variablesInit="variablesInit"
|
||||||
:loading="chartListLoading"
|
:loading="chartListLoading"
|
||||||
:chart-detail-info="chartDetailInfo"
|
:chart-detail-info="chartDetailInfo"
|
||||||
></chart-list>
|
></chart-list>
|
||||||
@@ -158,6 +160,7 @@ import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin
|
|||||||
import { randomcolor } from '@/components/common/js/radomcolor/randomcolor'
|
import { randomcolor } from '@/components/common/js/radomcolor/randomcolor'
|
||||||
import htmlToPdfMixin from '@/components/common/mixin/htmlToPdfMixin'
|
import htmlToPdfMixin from '@/components/common/mixin/htmlToPdfMixin'
|
||||||
import exportHtmlMixin from '@/components/common/mixin/exportHtml'
|
import exportHtmlMixin from '@/components/common/mixin/exportHtml'
|
||||||
|
import panelVariables from "@/components/common/panel/panelVariables";
|
||||||
export default {
|
export default {
|
||||||
name: 'panelTabNew',
|
name: 'panelTabNew',
|
||||||
mixins: [subDataListMixin, detailViewRightMixin, htmlToPdfMixin, exportHtmlMixin],
|
mixins: [subDataListMixin, detailViewRightMixin, htmlToPdfMixin, exportHtmlMixin],
|
||||||
@@ -275,7 +278,9 @@ export default {
|
|||||||
panelDataList: [],
|
panelDataList: [],
|
||||||
batchDeleteObjs: [],
|
batchDeleteObjs: [],
|
||||||
nowTimeType: {},
|
nowTimeType: {},
|
||||||
chartDetailInfo: {}
|
chartDetailInfo: {},
|
||||||
|
variables: [],
|
||||||
|
variablesInit: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -283,7 +288,8 @@ export default {
|
|||||||
chartList,
|
chartList,
|
||||||
nzBottomDataList,
|
nzBottomDataList,
|
||||||
topToolMoreOptions,
|
topToolMoreOptions,
|
||||||
chartTempBox
|
chartTempBox,
|
||||||
|
panelVariables // 处理panel变量的组件
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 刷新
|
// 刷新
|
||||||
@@ -544,10 +550,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 公用操作
|
// 公用操作
|
||||||
getTableData (linkId) {
|
getTableData (linkId) {
|
||||||
|
this.variablesInit = false
|
||||||
if (this.from === this.fromRoute.alertRule) {
|
if (this.from === this.fromRoute.alertRule) {
|
||||||
|
this.variablesInit = true
|
||||||
this.getData(this.filter)
|
this.getData(this.filter)
|
||||||
} else {
|
} else {
|
||||||
if (this.from === this.fromRoute.chartTemp) {
|
if (this.from === this.fromRoute.chartTemp) {
|
||||||
|
this.variablesInit = true
|
||||||
if (this.obj.type === 'group') {
|
if (this.obj.type === 'group') {
|
||||||
this.$get('/visual/panel/chart', { ids: this.obj.id }).then(res => {
|
this.$get('/visual/panel/chart', { ids: this.obj.id }).then(res => {
|
||||||
this.panelDataList = res.data.list
|
this.panelDataList = res.data.list
|
||||||
@@ -564,11 +573,13 @@ export default {
|
|||||||
this.getData(this.filter)
|
this.getData(this.filter)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$get('visual/panel', { type: this.from, link: linkId }).then(response => {
|
this.$get('visual/panel', { type: this.from, link: linkId || this.obj.id }).then(response => {
|
||||||
|
console.log(response)
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.panelData = response.data.list
|
this.panelData = response.data.list
|
||||||
if (this.panelData.length > 0) {
|
if (this.panelData.length > 0) {
|
||||||
this.showPanel.id = this.filter.panelId = this.panelData[0].id
|
this.showPanel.id = this.filter.panelId = this.panelData[0].id
|
||||||
|
this.variables = this.$loadsh.get(this.panelData, '[0].param.variables')
|
||||||
this.getData(this.filter)
|
this.getData(this.filter)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -787,6 +798,10 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.exportToHtml(this.obj.name)
|
this.exportToHtml(this.obj.name)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
getPanelData () {
|
||||||
|
this.variablesInit = true
|
||||||
|
this.$refs.chartList.onScroll(this.scrollbarWrap.scrollTop)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.inputDateQuery = this.handlerTableData(this.tableData)
|
this.inputDateQuery = this.handlerTableData(this.tableData)
|
||||||
this.pageObj.total = this.tableData.length
|
this.pageObj.total = this.tableData.length
|
||||||
if (!this.scrollbarWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export default {
|
|||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
detailViewRightShow (item) {
|
detailViewRightShow (item) {
|
||||||
this.detailViewRightObj = item
|
this.detailViewRightObj = this.$loadsh.cloneDeep(item)
|
||||||
},
|
},
|
||||||
orderDetail (order, orderType) {
|
orderDetail (order, orderType) {
|
||||||
if (orderType === 'ascending') {
|
if (orderType === 'ascending') {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import i18n from '@/components/common/i18n'
|
||||||
|
import { getUUID } from '../js/common'
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -7,7 +9,8 @@ export default {
|
|||||||
params: {},
|
params: {},
|
||||||
emit: ''
|
emit: ''
|
||||||
},
|
},
|
||||||
closeMessage: ''
|
closeMessage: null,
|
||||||
|
uuid: getUUID()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -18,25 +21,55 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
messageShow (msg, route, params, showNext = false, nextText = 'setup.next', emit) {
|
// 开启计时器 对message赋值
|
||||||
|
coutTime (msg, showNext, nextText, second) {
|
||||||
|
if (!this.closeMessage) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
this.closeMessage.message =
|
||||||
|
`<div class="custom-message">
|
||||||
|
<div class="message-left">${msg}</div>
|
||||||
|
<div class="message-right ${showNext ? '' : 'hidden'}">
|
||||||
|
<span>,${i18n.t('tip.clickNext')}${i18n.t(nextText)}</span>
|
||||||
|
<span id="assetAdd${this.uuid}" class="message-next">${i18n.t('tip.next')}
|
||||||
|
<span>(${second}s)</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>`
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const assetAdd = document.getElementById(`assetAdd${this.uuid}`)
|
||||||
|
assetAdd.addEventListener('click', this.saveNext)
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
--second
|
||||||
|
if (second === 0) {
|
||||||
|
this.closeMessage.close()
|
||||||
|
} else {
|
||||||
|
this.coutTime(msg, showNext, nextText, second)
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
},
|
||||||
|
messageShow (msg, route, params, showNext = false, nextText = '', emit) {
|
||||||
|
// 如果存在弹框 则先清理掉
|
||||||
this.messageParams.route = route
|
this.messageParams.route = route
|
||||||
this.messageParams.params = params
|
this.messageParams.params = params
|
||||||
this.messageParams.emit = emit
|
this.messageParams.emit = emit
|
||||||
this.closeMessage = this.$message({
|
this.closeMessage = this.$message({
|
||||||
duration: showNext ? 5000 : 2000,
|
duration: showNext ? 30000 : 3000,
|
||||||
dangerouslyUseHTMLString: true,
|
dangerouslyUseHTMLString: true,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: `<div>${msg} <span class="message-next ${showNext ? '' : 'hidden'}"><span class="message-next-continue">${this.$t('overall.continue')}</span> <span id="assetAdd" class="message-next-content">${this.$t(nextText)}</span></span></div>`,
|
message: '',
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
const assetAdd = document.getElementById('assetAdd')
|
const assetAdd = document.getElementById(`assetAdd${this.uuid}`)
|
||||||
assetAdd.removeEventListener('click', this.saveNext)
|
assetAdd.removeEventListener('click', this.saveNext)
|
||||||
this.closeMessage = ''
|
this.closeMessage = null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const assetAdd = document.getElementById('assetAdd')
|
// 对message赋值
|
||||||
assetAdd.addEventListener('click', this.saveNext)
|
this.coutTime(msg, showNext, nextText, 30)
|
||||||
},
|
},
|
||||||
saveNext () {
|
saveNext () {
|
||||||
|
this.closeMessage.close()
|
||||||
if (!this.messageParams.route) {
|
if (!this.messageParams.route) {
|
||||||
this.$store.dispatch(this.messageParams.emit, this.messageParams.params)
|
this.$store.dispatch(this.messageParams.emit, this.messageParams.params)
|
||||||
return
|
return
|
||||||
@@ -45,7 +78,6 @@ export default {
|
|||||||
path: this.messageParams.route,
|
path: this.messageParams.route,
|
||||||
query: this.messageParams.params
|
query: this.messageParams.params
|
||||||
})
|
})
|
||||||
this.closeMessage.close()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed () {
|
destroyed () {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
:key="key"
|
:key="key"
|
||||||
@click="handleShortcutClick(shortcut)">{{shortcut.text}}</button>
|
@click="handleShortcutClick(shortcut)">{{shortcut.text}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="el-picker-panel__body" style="min-width: auto">
|
<div class="el-picker-panel__body" style="min-width: 100%">
|
||||||
<div class="el-date-range-picker__time-header" v-if="showTime">
|
<div class="el-date-range-picker__time-header" v-if="showTime">
|
||||||
<span class="el-date-range-picker__editors-wrap">
|
<span class="el-date-range-picker__editors-wrap">
|
||||||
<span class="el-date-range-picker__time-picker-wrap">
|
<span class="el-date-range-picker__time-picker-wrap">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="" class="panel-variables-box">
|
<div style="" class="panel-variables-box">
|
||||||
<div v-for="(item,index) in labelArr" :key="index" v-if="item.show" class="panel-variables-content" style="display: flex">
|
<div v-for="(item,index) in labelArr" :key="index" v-if="item.show" class="panel-variables-content" style="display: flex">
|
||||||
<div class="variable-key">{{item.name}}</div>
|
<div class="variable-key" :title="item.name">{{item.name}}</div>
|
||||||
<el-popover
|
<el-popover
|
||||||
trigger="manual"
|
trigger="manual"
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
@@ -15,12 +15,12 @@
|
|||||||
</li>
|
</li>
|
||||||
<ul class="pop-list">
|
<ul class="pop-list">
|
||||||
<el-checkbox-group v-model="item.checked" @change="(value)=>{checkedChange(item,value)}" v-if="item.multi">
|
<el-checkbox-group v-model="item.checked" @change="(value)=>{checkedChange(item,value)}" v-if="item.multi">
|
||||||
<li class="el-dropdown-menu__item" v-for="value in labelValue[item.name]" :key="value.value">
|
<li class="el-dropdown-menu__item" v-for="value in labelValue[item.name]" :key="value.value" :title="value.value">
|
||||||
<el-checkbox :label="value.value" >{{value.label}}</el-checkbox>
|
<el-checkbox :label="value.value" >{{value.label}}</el-checkbox>
|
||||||
</li>
|
</li>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<li class="el-dropdown-menu__item" v-for="(value, j) in labelValue[item.name]" :key="j" @click="selectLabelValue(item,value)">
|
<li class="el-dropdown-menu__item" v-for="(value, j) in labelValue[item.name]" :key="j" @click="selectLabelValue(item,value)" :title="value.value">
|
||||||
<div class="el-dropdown-menu__item-label" :class="value.value === item.checked[0] && !item.checkAll ? 'checked': ''">
|
<div class="el-dropdown-menu__item-label" :class="value.value === item.checked[0] && !item.checkAll ? 'checked': ''">
|
||||||
{{value.label}}
|
{{value.label}}
|
||||||
</div>
|
</div>
|
||||||
@@ -29,10 +29,12 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
<div slot="reference" class="choose-box" @click="triggerVisible(item)">
|
<div slot="reference" class="choose-box" @click="triggerVisible(item)">
|
||||||
<div class="choose-box-content">
|
<div class="no-select" :class="item.visible? 'is-select': ''">
|
||||||
{{item.checked.map(value=> labelValue[item.name].find(labelObj=>labelObj.value === value).label).join(' + ')}}
|
<div class="choose-box-content" :title="item.checked.map(value=> labelValue[item.name].find(labelObj=>labelObj.value === value).label).join(' + ')">
|
||||||
|
{{item.checked.map(value=> labelValue[item.name].find(labelObj=>labelObj.value === value).label).join(' + ')}}
|
||||||
|
</div>
|
||||||
|
<i class="nz-icon nz-icon-arrow-down6"/>
|
||||||
</div>
|
</div>
|
||||||
<i class="nz-icon nz-icon-arrow-down6"/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
@@ -95,7 +97,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const arrPromise = []
|
const arrPromise = []
|
||||||
this.labelValue = {}
|
this.labelValue = {}
|
||||||
this.labelArr.forEach((item, index) => { // 根据变量的type类型 以及 expression 对应的值 查询不同的接口
|
this.labelArr.forEach((item, index) => { // 根据变量的type类型 以及 expression 对应的值 查询不同的接口
|
||||||
this.labelValue[item.name] = []
|
this.labelValue[item.name] = []
|
||||||
if (item.type === 'custom') {
|
if (item.type === 'custom') {
|
||||||
arrPromise.push('')
|
arrPromise.push('')
|
||||||
@@ -151,7 +153,6 @@ export default {
|
|||||||
const reg = isRegExp(this.labelArr[index].regex) ? eval(this.labelArr[index].regex) : new RegExp(this.labelArr[index].regex, 'g')
|
const reg = isRegExp(this.labelArr[index].regex) ? eval(this.labelArr[index].regex) : new RegExp(this.labelArr[index].regex, 'g')
|
||||||
let arr = []
|
let arr = []
|
||||||
response.forEach(label => {
|
response.forEach(label => {
|
||||||
// console.log(reg.test(label.label))
|
|
||||||
if (reg.test(label.label)) {
|
if (reg.test(label.label)) {
|
||||||
const str = label.label.match(reg)
|
const str = label.label.match(reg)
|
||||||
if (str.groups) {
|
if (str.groups) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<HighlightText :queries="filterPanel" :highlightClass="'highlight-keyword'" style="vertical-align: middle" :title="node.label + ' (' + data.chartNum +' charts)' ">{{node.label}}</HighlightText>
|
<HighlightText :queries="filterPanel" :highlightClass="'highlight-keyword'" style="vertical-align: middle" :title="node.label + ' (' + data.chartNum +' charts)' ">{{node.label}}</HighlightText>
|
||||||
<el-row class="block-col-2" style="margin-left:10px;margin-right:8px">
|
<el-row class="block-col-2" style="margin-left:10px;margin-right:8px">
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-dropdown v-if="!panelLock" placement="bottom-end" trigger="click" style="margin-right:10px">
|
<el-dropdown placement="bottom-end" trigger="click" style="margin-right:10px">
|
||||||
<span class="el-dropdown-link tree--operation" @click.stop><i class="nz-icon nz-icon-more1"></i></span>
|
<span class="el-dropdown-link tree--operation" @click.stop><i class="nz-icon nz-icon-more1"></i></span>
|
||||||
<el-dropdown-menu class="right-box-select-top" slot="dropdown" v-has="['main_edit', 'main_delete']">
|
<el-dropdown-menu class="right-box-select-top" slot="dropdown" v-has="['main_edit', 'main_delete']">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<HighlightText :queries="filterPanel" :highlightClass="'highlight-keyword'" style="vertical-align: middle" :title="node.label + ' (' + data.chartNum +' charts)' ">{{node.label}}</HighlightText>
|
<HighlightText :queries="filterPanel" :highlightClass="'highlight-keyword'" style="vertical-align: middle" :title="node.label + ' (' + data.chartNum +' charts)' ">{{node.label}}</HighlightText>
|
||||||
<el-row class="block-col-2" style="margin-left:10px;margin-right:8px">
|
<el-row class="block-col-2" style="margin-left:10px;margin-right:8px">
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-dropdown v-if="!panelLock" placement="bottom-end" trigger="click" style="margin-right:10px">
|
<el-dropdown placement="bottom-end" trigger="click" style="margin-right:10px">
|
||||||
<span class="el-dropdown-link tree--operation" @click.stop><i class="nz-icon nz-icon-more1"></i></span>
|
<span class="el-dropdown-link tree--operation" @click.stop><i class="nz-icon nz-icon-more1"></i></span>
|
||||||
<el-dropdown-menu class="right-box-select-top" slot="dropdown" v-has="['main_edit', 'main_delete']">
|
<el-dropdown-menu class="right-box-select-top" slot="dropdown" v-has="['main_edit', 'main_delete']">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
|
|||||||
@@ -1,133 +1,145 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dropdown trigger="click" :size="size">
|
<div>
|
||||||
<button id="more" :class="triggerButtonClass" :title="$t('overall.more')">
|
<el-dropdown trigger="click" :size="size">
|
||||||
<i class="nz-icon nz-icon-more2"></i>
|
<button id="more" :class="triggerButtonClass" :title="$t('overall.more')">
|
||||||
</button>
|
<i class="nz-icon nz-icon-more2"></i>
|
||||||
<el-dropdown-menu slot="dropdown" class="right-box-select-top right-public-box-dropdown-top">
|
</button>
|
||||||
<el-dropdown-item v-if="showLock">
|
<el-dropdown-menu slot="dropdown" class="right-box-select-top right-public-box-dropdown-top">
|
||||||
<div @click="panelLock=!panelLock" id="panel-lock"><i :class="{'nz-icon nz-icon-lock':!panelLock,'nz-icon nz-icon-unlock':panelLock}"></i>{{!panelLock ? $t("overall.locked") : $t("overall.unlocked")}}</div>
|
<el-dropdown-item v-if="showLock">
|
||||||
</el-dropdown-item>
|
<div @click="editPanel" id="edit-bottom-panel"><i class="nz-icon nz-icon-edit"></i>{{$t('overall.edit')}}</div>
|
||||||
<!-- import、export之前的内容 -->
|
</el-dropdown-item>
|
||||||
<slot name="before"></slot>
|
<el-dropdown-item v-if="showLock">
|
||||||
<el-dropdown-item v-has="permissions.import" v-if="importUrl">
|
<div @click="panelLock=!panelLock" id="panel-lock"><i :class="{'nz-icon nz-icon-lock':!panelLock,'nz-icon nz-icon-unlock':panelLock}"></i>{{!panelLock ? $t("overall.locked") : $t("overall.unlocked")}}</div>
|
||||||
<div id="chart-import" @click="showImportBox(1)"><i class="nz-icon nz-icon-upload"></i>{{$t('overall.importExcel')}}</div>
|
</el-dropdown-item>
|
||||||
</el-dropdown-item>
|
<!-- import、export之前的内容 -->
|
||||||
<el-dropdown-item v-has="permissions.export" v-if="exportUrl">
|
<slot name="before"></slot>
|
||||||
<div id="chart-export" @click="showImportBox(2)"><i class="nz-icon nz-icon-download1"></i>{{$t('overall.exportExcel')}}</div>
|
<el-dropdown-item v-has="permissions.import" v-if="importUrl">
|
||||||
</el-dropdown-item>
|
<div id="chart-import" @click="showImportBox(1)"><i class="nz-icon nz-icon-upload"></i>{{$t('overall.importExcel')}}</div>
|
||||||
<!-- import、export之后的内容 -->
|
</el-dropdown-item>
|
||||||
<slot name="after"></slot>
|
<el-dropdown-item v-has="permissions.export" v-if="exportUrl">
|
||||||
</el-dropdown-menu>
|
<div id="chart-export" @click="showImportBox(2)"><i class="nz-icon nz-icon-download1"></i>{{$t('overall.exportExcel')}}</div>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<!-- import、export之后的内容 -->
|
||||||
|
<slot name="after"></slot>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="importBox.type!=3" destroy-on-close :show-close="true" :title="importBox.title" :visible.sync="importBox.show" :width="importBox.width" append-to-body class="nz-dialog" @close="closeDialog">
|
<el-dialog :close-on-click-modal="importBox.type!=3" destroy-on-close :show-close="true" :title="importBox.title" :visible.sync="importBox.show" :width="importBox.width" append-to-body class="nz-dialog" @close="closeDialog">
|
||||||
<div v-if="importBox.type == 1">
|
<div v-if="importBox.type == 1">
|
||||||
<div class="upload-body">
|
<div class="upload-body">
|
||||||
<el-upload :id="id+'-xlsx-input-file'" ref="uploadExcel" :auto-upload="false" :file-list="importFileList" :on-change="importChange" accept=".xlsx,.xls" action="" class="upload-demo" drag>
|
<el-upload :id="id+'-xlsx-input-file'" ref="uploadExcel" :auto-upload="false" :file-list="importFileList" :on-change="importChange" accept=".xlsx,.xls" action="" class="upload-demo" drag>
|
||||||
<div slot="tip" class="el-upload__tip" >{{$t('overall.importTip')}}</div>
|
<div slot="tip" class="el-upload__tip" >{{$t('overall.importTip')}}</div>
|
||||||
<i class="nz-icon nz-icon-upload"></i>
|
<i class="nz-icon nz-icon-upload"></i>
|
||||||
<div class="el-upload__text">{{$t('overall.dragFileTip')}},{{$t('overall.or')}} <em>{{$t('overall.clickUpload')}}</em></div>
|
<div class="el-upload__text">{{$t('overall.dragFileTip')}},{{$t('overall.or')}} <em>{{$t('overall.clickUpload')}}</em></div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
|
||||||
<div slot="footer" class="footer">
|
|
||||||
<div class="el-message-box__btns" style="text-align: right;">
|
|
||||||
<button :id="id+'-xlsx-import-template'" class="el-button el-button--default el-button--small" @click="downloadTemplate">
|
|
||||||
<span>{{$t('overall.template')}}</span>
|
|
||||||
</button>
|
|
||||||
<button :id="id+'-xlsx-import-add'" :class="{'nz-btn-disabled':prevent_opt.import}" :disabled="prevent_opt.import" class="nz-btn el-button el-button--default el-button--small" @click="importExcel">
|
|
||||||
<span>{{$t('overall.importExcel')}}</span>
|
|
||||||
</button>
|
|
||||||
<button :id="id+'-xlsx-import-esc'" class="el-button el-button--default el-button--small" @click="closeDialog">
|
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div slot="footer" class="footer">
|
||||||
</div>
|
<div class="el-message-box__btns" style="text-align: right;">
|
||||||
<div v-if="importBox.type == 2">
|
<button :id="id+'-xlsx-import-template'" class="el-button el-button--default el-button--small" @click="downloadTemplate">
|
||||||
<div class="upload-body" style="height: 200px">
|
<span>{{$t('overall.template')}}</span>
|
||||||
<div class="export-box">
|
</button>
|
||||||
<span class="export-title">Records</span>
|
<button :id="id+'-xlsx-import-add'" :class="{'nz-btn-disabled':prevent_opt.import}" :disabled="prevent_opt.import" class="nz-btn el-button el-button--default el-button--small" @click="importExcel">
|
||||||
<el-radio-group v-model="importBox.record" size="small">
|
<span>{{$t('overall.importExcel')}}</span>
|
||||||
<el-radio-button :label="item.value" v-for="(item,index) in recordArr" :key="index" :disabled="item.value==='records'&&!deleteObjs.length">{{item.name}}</el-radio-button>
|
</button>
|
||||||
</el-radio-group>
|
<button :id="id+'-xlsx-import-esc'" class="el-button el-button--default el-button--small" @click="closeDialog">
|
||||||
</div>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
<div class="export-box">
|
</button>
|
||||||
<span class="export-title">File format</span>
|
|
||||||
<el-radio-group v-model="importBox.format" size="small">
|
|
||||||
<el-radio-button :label="item.value" v-for="(item,index) in formatArr" :key="index">{{item.name}}</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div slot="footer" class="footer">
|
|
||||||
<div class="el-message-box__btns">
|
|
||||||
<button :id="id+'-xlsx-import-export'" class="nz-btn nz-btn-size-normal nz-btn-style-normal-new" @click="exportData">
|
|
||||||
<span style="text-transform:Capitalize">{{$t('overall.exportExcel')}}</span>
|
|
||||||
</button>
|
|
||||||
<button :id="id+'-xlsx-import-close'" class="nz-btn el-button el-button--default el-button--small" @click="closeDialog">
|
|
||||||
<span>{{$t('overall.close')}}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="importBox.type==3">
|
|
||||||
<div class="upload-body result-body">
|
|
||||||
<div v-if="importResult&&importResult.failNum">
|
|
||||||
<div class="result-title-top">
|
|
||||||
<div class="">
|
|
||||||
<i class="nz-icon nz-icon-import-success"/>
|
|
||||||
<span>{{$t('overall.result.successNum',{successNum:importResult.successNum})}}</span><br/>
|
|
||||||
</div>
|
|
||||||
<div class="">
|
|
||||||
<i class="nz-icon nz-icon-import-failed"/>
|
|
||||||
<span>{{$t('overall.result.failedNum',{failedNum:importResult.failNum,total:importResult.totalNum})}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
</div>
|
||||||
<div v-if="importResult&&importResult.failDetail" class="result-detail">
|
</div>
|
||||||
<div style="height: 100%; overflow: auto">
|
<div v-if="importBox.type == 2">
|
||||||
<template v-for="(item, index) in importResult.failDetail">
|
<div class="upload-body" style="height: 200px">
|
||||||
<div :key="index" class="import-result-block">
|
<div class="export-box">
|
||||||
<div class="import-result-item">
|
<span class="export-title">Records</span>
|
||||||
<div class="line-num">{{$t('overall.result.line',[item.lineNo])}}</div>
|
<el-radio-group v-model="importBox.record" size="small">
|
||||||
<div class="line-content" :title="item.errorMsg">{{item.errorMsg}}</div>
|
<el-radio-button :label="item.value" v-for="(item,index) in recordArr" :key="index" :disabled="item.value==='records'&&!deleteObjs.length">{{item.name}}</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div class="export-box">
|
||||||
|
<span class="export-title">File format</span>
|
||||||
|
<el-radio-group v-model="importBox.format" size="small">
|
||||||
|
<el-radio-button :label="item.value" v-for="(item,index) in formatArr" :key="index">{{item.name}}</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="footer">
|
||||||
|
<div class="el-message-box__btns">
|
||||||
|
<button :id="id+'-xlsx-import-export'" class="nz-btn nz-btn-size-normal nz-btn-style-normal-new" @click="exportData">
|
||||||
|
<span style="text-transform:Capitalize">{{$t('overall.exportExcel')}}</span>
|
||||||
|
</button>
|
||||||
|
<button :id="id+'-xlsx-import-close'" class="nz-btn el-button el-button--default el-button--small" @click="closeDialog">
|
||||||
|
<span>{{$t('overall.close')}}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="importBox.type==3">
|
||||||
|
<div class="upload-body result-body">
|
||||||
|
<div v-if="importResult&&importResult.failNum">
|
||||||
|
<div class="result-title-top">
|
||||||
|
<div class="">
|
||||||
|
<i class="nz-icon nz-icon-import-success"/>
|
||||||
|
<span>{{$t('overall.result.successNum',{successNum:importResult.successNum})}}</span><br/>
|
||||||
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<i class="nz-icon nz-icon-import-failed"/>
|
||||||
|
<span>{{$t('overall.result.failedNum',{failedNum:importResult.failNum,total:importResult.totalNum})}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div v-if="importResult&&importResult.failDetail" class="result-detail">
|
||||||
|
<div style="height: 100%; overflow: auto">
|
||||||
|
<template v-for="(item, index) in importResult.failDetail">
|
||||||
|
<div :key="index" class="import-result-block">
|
||||||
|
<div class="import-result-item">
|
||||||
|
<div class="line-num">{{$t('overall.result.line',[item.lineNo])}}</div>
|
||||||
|
<div class="line-content" :title="item.errorMsg">{{item.errorMsg}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
</template>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div v-else class="result-success-box">
|
||||||
<div v-else class="result-success-box">
|
<div>
|
||||||
<div>
|
<i class="nz-icon nz-icon-import-success"/>
|
||||||
<i class="nz-icon nz-icon-import-success"/>
|
</div>
|
||||||
|
<div class="result-success-txt">{{$t('overall.result.successfully')}}</div>
|
||||||
|
<div class="result-success-txt">
|
||||||
|
{{$t('overall.result.imported')}}
|
||||||
|
<span style="color: #333333" v-if="importResult">{{importResult.successNum}}</span>
|
||||||
|
{{$t('overall.result.records')}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="result-success-txt">{{$t('overall.result.successfully')}}</div>
|
</div>
|
||||||
<div class="result-success-txt">
|
<div slot="footer" class="footer">
|
||||||
{{$t('overall.result.imported')}}
|
<div class="el-message-box__btns">
|
||||||
<span style="color: #333333" v-if="importResult">{{importResult.successNum}}</span>
|
<button :id="id+'-xlsx-import-rollback'" class="nz-btn nz-btn-size-normal nz-btn-style-error" @click="rollbackImport">
|
||||||
{{$t('overall.result.records')}}
|
<span>{{$t('overall.rollbackImport')}}</span>
|
||||||
|
</button>
|
||||||
|
<button :id="id+'-xlsx-import-close'" class="nz-btn el-button el-button--default el-button--small" @click="closeDialog">
|
||||||
|
<span>{{$t('overall.close')}}</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="footer">
|
</el-dialog>
|
||||||
<div class="el-message-box__btns">
|
</el-dropdown>
|
||||||
<button :id="id+'-xlsx-import-rollback'" class="nz-btn nz-btn-size-normal nz-btn-style-error" @click="rollbackImport">
|
<transition name="right-box">
|
||||||
<span>{{$t('overall.rollbackImport')}}</span>
|
<panel-box v-if="rightBox.panel.show" ref="panelBox" :obj="panel" @close="closePanelBox" :isBottom="true" :panelType="params.from"></panel-box>
|
||||||
</button>
|
</transition>
|
||||||
<button :id="id+'-xlsx-import-close'" class="nz-btn el-button el-button--default el-button--small" @click="closeDialog">
|
</div>
|
||||||
<span>{{$t('overall.close')}}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</el-dropdown>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import panelBox from '@/components/common/rightBox/panelBox'
|
||||||
let timeout
|
let timeout
|
||||||
export default {
|
export default {
|
||||||
name: 'topToolMoreOptions',
|
name: 'topToolMoreOptions',
|
||||||
|
components: {
|
||||||
|
panelBox
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -179,7 +191,12 @@ export default {
|
|||||||
{ name: 'CSV', value: 2 },
|
{ name: 'CSV', value: 2 },
|
||||||
{ name: 'JSON', value: 3 }
|
{ name: 'JSON', value: 3 }
|
||||||
],
|
],
|
||||||
suffix: '.xlsx'
|
suffix: '.xlsx',
|
||||||
|
panel: {},
|
||||||
|
rightBox: { // 面板弹出框相关
|
||||||
|
panel: { show: false },
|
||||||
|
loading: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -528,7 +545,57 @@ export default {
|
|||||||
},
|
},
|
||||||
formatNum (num) {
|
formatNum (num) {
|
||||||
return num > 9 ? num : '0' + num
|
return num > 9 ? num : '0' + num
|
||||||
}
|
},
|
||||||
|
editPanel () {
|
||||||
|
this.$get('visual/panel/' + this.params.panelId).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.panel = res.data
|
||||||
|
if (!this.$loadsh.get(this.panel, 'param.report', '')) {
|
||||||
|
this.panel = {
|
||||||
|
...this.panel,
|
||||||
|
param: {
|
||||||
|
report: {
|
||||||
|
enable: false,
|
||||||
|
range: {
|
||||||
|
unit: 'day'
|
||||||
|
},
|
||||||
|
schedule: {
|
||||||
|
type: '2',
|
||||||
|
repeat: 1,
|
||||||
|
nums: [],
|
||||||
|
stime: '',
|
||||||
|
etime: ''
|
||||||
|
},
|
||||||
|
receivers: []
|
||||||
|
},
|
||||||
|
chartShare: 'none'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.panel.param.report.schedule.type = this.panel.param.report.schedule.type + ''
|
||||||
|
const startTime = this.$loadsh.get(this.panel, 'param.report.schedule.stime', '')
|
||||||
|
if (startTime !== '') {
|
||||||
|
this.panel.param.report.schedule.stime = this.utcTimeToTimezoneStr(this.panel.param.report.schedule.stime, 'YYYY-MM-DD HH:mm:ss')
|
||||||
|
} else {
|
||||||
|
this.panel.param.report.schedule.stime = ''
|
||||||
|
}
|
||||||
|
const endTime = this.$loadsh.get(this.panel, 'param.report.schedule.etime', '')
|
||||||
|
if (endTime !== '') {
|
||||||
|
this.panel.param.report.schedule.etime = this.utcTimeToTimezoneStr(this.panel.param.report.schedule.etime, 'YYYY-MM-DD HH:mm:ss')
|
||||||
|
} else {
|
||||||
|
this.panel.param.report.schedule.etime = ''
|
||||||
|
}
|
||||||
|
this.rightBox.panel.show = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// this.panel = Object.assign({}, u)panelType
|
||||||
|
},
|
||||||
|
closePanelBox (refresh) {
|
||||||
|
this.rightBox.panel.show = false
|
||||||
|
if (refresh) {
|
||||||
|
this.$emit('afterImport')
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
panelLock: {
|
panelLock: {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<template v-slot:default="slotProps">
|
<template v-slot:default="slotProps">
|
||||||
<endpoint-table
|
<endpoint-table
|
||||||
style="height: 100%"
|
style="height: 100%"
|
||||||
|
:isTopoInfo="true"
|
||||||
ref="dataTable"
|
ref="dataTable"
|
||||||
:orderByFa="orderBy"
|
:orderByFa="orderBy"
|
||||||
v-my-loading="tools.loading"
|
v-my-loading="tools.loading"
|
||||||
|
|||||||
@@ -479,9 +479,9 @@ export default {
|
|||||||
chartData: {},
|
chartData: {},
|
||||||
chartGetData: [],
|
chartGetData: [],
|
||||||
penLineType: [
|
penLineType: [
|
||||||
{ d: 'M5 19 a50,100 0 0,1 40,0', 'stroke-dasharray': '', name: this.$t('project.topology.curve'), id: 'curve' , strokeColor: theme == 'light' ? 'black' : '#BEBEBE'},
|
{ d: 'M5 19 a50,100 0 0,1 40,0', 'stroke-dasharray': '', name: this.$t('project.topology.curve'), id: 'curve', strokeColor: theme == 'light' ? 'black' : '#BEBEBE' },
|
||||||
{ d: 'M5 8 l20 0 l0 12 l20 0', 'stroke-dasharray': '', name: this.$t('project.topology.polyline'), id: 'polyline' , strokeColor: theme == 'light' ? 'black' : '#BEBEBE'},
|
{ d: 'M5 8 l20 0 l0 12 l20 0', 'stroke-dasharray': '', name: this.$t('project.topology.polyline'), id: 'polyline', strokeColor: theme == 'light' ? 'black' : '#BEBEBE' },
|
||||||
{ d: 'M5 14 l40 0', 'stroke-dasharray': '', name: this.$t('project.topology.line'), id: 'line' , strokeColor: theme == 'light' ? 'black' : '#BEBEBE'}
|
{ d: 'M5 14 l40 0', 'stroke-dasharray': '', name: this.$t('project.topology.line'), id: 'line', strokeColor: theme == 'light' ? 'black' : '#BEBEBE' }
|
||||||
// {d:'M5 20 C0,8 50,0 85,0',"stroke-dasharray":"",name:'mind', strokeColor: theme == 'light' ? 'black' : '#BEBEBE'},
|
// {d:'M5 20 C0,8 50,0 85,0',"stroke-dasharray":"",name:'mind', strokeColor: theme == 'light' ? 'black' : '#BEBEBE'},
|
||||||
],
|
],
|
||||||
lineName: 'curve',
|
lineName: 'curve',
|
||||||
@@ -617,11 +617,12 @@ export default {
|
|||||||
// getTopology(this.topologyIndex).fitView(30)
|
// getTopology(this.topologyIndex).fitView(30)
|
||||||
},
|
},
|
||||||
shrink (n) {
|
shrink (n) {
|
||||||
setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
const domRect = document.getElementById('topology-canvas' + this.topologyIndex).getBoundingClientRect()
|
const domRect = document.getElementById('topology-canvas' + this.topologyIndex).getBoundingClientRect()
|
||||||
getTopology(this.topologyIndex).canvasPos = domRect
|
getTopology(this.topologyIndex).canvasPos = domRect
|
||||||
getTopology(this.topologyIndex).resize()
|
getTopology(this.topologyIndex).resize()
|
||||||
getTopology(this.topologyIndex).centerView()
|
getTopology(this.topologyIndex).centerView()
|
||||||
|
clearTimeout(timer)
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -722,16 +723,18 @@ export default {
|
|||||||
getTopology(this.topologyIndex).resize()
|
getTopology(this.topologyIndex).resize()
|
||||||
getTopology(this.topologyIndex).centerView()
|
getTopology(this.topologyIndex).centerView()
|
||||||
this.penToolTipScale = getTopology(this.topologyIndex).data.scale
|
this.penToolTipScale = getTopology(this.topologyIndex).data.scale
|
||||||
setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
getTopology(this.topologyIndex) && getTopology(this.topologyIndex).data.pens.forEach(item => {
|
getTopology(this.topologyIndex) && getTopology(this.topologyIndex).data.pens.forEach(item => {
|
||||||
if (item.animatePlay) {
|
if (item.animatePlay) {
|
||||||
item.stopAnimate()
|
item.stopAnimate()
|
||||||
setTimeout(() => {
|
const timer1 = setTimeout(() => {
|
||||||
item.startAnimate()
|
item.startAnimate()
|
||||||
|
clearTimeout(timer1)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, 100)
|
})
|
||||||
})
|
clearTimeout(timer)
|
||||||
|
}, 100)
|
||||||
// if(this.fromPrev){
|
// if(this.fromPrev){
|
||||||
// getTopology(this.topologyIndex).scaleTo(data.scale/2)
|
// getTopology(this.topologyIndex).scaleTo(data.scale/2)
|
||||||
// }
|
// }
|
||||||
@@ -777,6 +780,7 @@ export default {
|
|||||||
if (!document.getElementById('topology-canvas' + this.topologyIndexF)) {
|
if (!document.getElementById('topology-canvas' + this.topologyIndexF)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
data = this.$loadsh.cloneDeep(data)
|
||||||
if (!getTopology(this.topologyIndex)) {
|
if (!getTopology(this.topologyIndex)) {
|
||||||
let canvas = new Topology('topology-canvas' + this.topologyIndexF, canvasOptions)
|
let canvas = new Topology('topology-canvas' + this.topologyIndexF, canvasOptions)
|
||||||
canvas.open(data)
|
canvas.open(data)
|
||||||
@@ -1133,8 +1137,9 @@ export default {
|
|||||||
this.popDataShowUpdate('', false, node)
|
this.popDataShowUpdate('', false, node)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
this.popDataShowUpdate(tool.id, false, node)
|
this.popDataShowUpdate(tool.id, false, node)
|
||||||
|
clearTimeout(timer)
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1166,8 +1171,9 @@ export default {
|
|||||||
/* topology 方法 */
|
/* topology 方法 */
|
||||||
onDrag (event, node) {
|
onDrag (event, node) {
|
||||||
this.dragFlag = false
|
this.dragFlag = false
|
||||||
setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
this.dragFlag = true
|
this.dragFlag = true
|
||||||
|
clearTimeout(timer)
|
||||||
}, 100)
|
}, 100)
|
||||||
event.dataTransfer.setData('Text', JSON.stringify({ ...node.data, data: { imageId: node.data.imageId } }))
|
event.dataTransfer.setData('Text', JSON.stringify({ ...node.data, data: { imageId: node.data.imageId } }))
|
||||||
},
|
},
|
||||||
@@ -1182,8 +1188,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data: { imageId: node.data.imageId }
|
data: { imageId: node.data.imageId }
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
this.dragFlag = true
|
this.dragFlag = true
|
||||||
|
clearTimeout(timer)
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1305,7 +1312,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.chartData = { ...data.data, ...this.chartGetData.find(item => item.id === data.id) }
|
this.chartData = { ...data.data, ...this.chartGetData.find(item => item.id === data.id) }
|
||||||
this.tooltipPosition.show = false
|
this.tooltipPosition.show = false
|
||||||
setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
this.tooltipPosition.show = true
|
this.tooltipPosition.show = true
|
||||||
let ePosition = window.ePosition
|
let ePosition = window.ePosition
|
||||||
let boxWidth = document.getElementsByClassName('page')[0].offsetWidth
|
let boxWidth = document.getElementsByClassName('page')[0].offsetWidth
|
||||||
@@ -1329,6 +1336,7 @@ export default {
|
|||||||
boxWidth = null
|
boxWidth = null
|
||||||
boxHeight = null
|
boxHeight = null
|
||||||
})
|
})
|
||||||
|
clearTimeout(timer)
|
||||||
}, 100)
|
}, 100)
|
||||||
break
|
break
|
||||||
case 'moveOutNode':
|
case 'moveOutNode':
|
||||||
@@ -1350,7 +1358,7 @@ export default {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
// 右侧输入框编辑状态时点击编辑区域其他元素,onMessage执行后才执行onUpdateProps方法,通过setTimeout让onUpdateProps先执行
|
// 右侧输入框编辑状态时点击编辑区域其他元素,onMessage执行后才执行onUpdateProps方法,通过setTimeout让onUpdateProps先执行
|
||||||
setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case 'node':
|
case 'node':
|
||||||
case 'addNode':
|
case 'addNode':
|
||||||
@@ -1534,6 +1542,7 @@ export default {
|
|||||||
// }
|
// }
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
clearTimeout(timer)
|
||||||
}, 0)
|
}, 0)
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1892,7 +1901,7 @@ export default {
|
|||||||
this.showNoData = false
|
this.showNoData = false
|
||||||
this.topoScreenState = JSON.parse(JSON.stringify(this.topoScreen))
|
this.topoScreenState = JSON.parse(JSON.stringify(this.topoScreen))
|
||||||
this.$store.commit('setShowTopoScreen', true)
|
this.$store.commit('setShowTopoScreen', true)
|
||||||
setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
getTopology(this.topologyIndex).lock(0)
|
getTopology(this.topologyIndex).lock(0)
|
||||||
getTopology(this.topologyIndex).data.pens.forEach((item, index) => { // 停止动画 以及赋值默认data
|
getTopology(this.topologyIndex).data.pens.forEach((item, index) => { // 停止动画 以及赋值默认data
|
||||||
if (item.animatePlay) {
|
if (item.animatePlay) {
|
||||||
@@ -1939,6 +1948,7 @@ export default {
|
|||||||
const dom = document.getElementById('topology-canvas' + this.topologyIndexF)
|
const dom = document.getElementById('topology-canvas' + this.topologyIndexF)
|
||||||
const domRect = dom ? dom.getBoundingClientRect() : {}
|
const domRect = dom ? dom.getBoundingClientRect() : {}
|
||||||
getTopology(this.topologyIndex).canvasPos = domRect
|
getTopology(this.topologyIndex).canvasPos = domRect
|
||||||
|
clearTimeout(timer)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -2143,7 +2153,7 @@ export default {
|
|||||||
/* tools 方法 */
|
/* tools 方法 */
|
||||||
|
|
||||||
winResize () {
|
winResize () {
|
||||||
setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
let domRect = document.getElementById('topology-canvas' + this.topologyIndex).getBoundingClientRect()
|
let domRect = document.getElementById('topology-canvas' + this.topologyIndex).getBoundingClientRect()
|
||||||
getTopology(this.topologyIndex).canvasPos = domRect
|
getTopology(this.topologyIndex).canvasPos = domRect
|
||||||
if (this.fromOverView) {
|
if (this.fromOverView) {
|
||||||
@@ -2168,6 +2178,7 @@ export default {
|
|||||||
getTopology(this.topologyIndex).centerView()
|
getTopology(this.topologyIndex).centerView()
|
||||||
this.getNodesArr()
|
this.getNodesArr()
|
||||||
domRect = null
|
domRect = null
|
||||||
|
clearTimeout(timer)
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
contextmenuNone () {
|
contextmenuNone () {
|
||||||
|
|||||||
@@ -744,7 +744,7 @@ export default {
|
|||||||
this.$put(this.url, params).then(res => {
|
this.$put(this.url, params).then(res => {
|
||||||
this.prevent_opt.save = false
|
this.prevent_opt.save = false
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.messageShow(this.$t('tip.saveSuccess'), '/endpoint', { assetId: res.data.id }, false, 'guide.addEndpoint')
|
this.messageShow(this.$t('tip.saveSuccess'), '/endpoint', { assetId: res.data.id }, false, 'tip.endpoint')
|
||||||
this.esc(true)
|
this.esc(true)
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg)
|
this.$message.error(res.msg)
|
||||||
@@ -754,7 +754,7 @@ export default {
|
|||||||
this.$post(this.url, params).then(res => {
|
this.$post(this.url, params).then(res => {
|
||||||
this.prevent_opt.save = false
|
this.prevent_opt.save = false
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.messageShow(this.$t('tip.saveSuccess'), '/endpoint', { assetId: res.data.id }, true, 'guide.addEndpoint')
|
this.messageShow(this.$t('tip.saveSuccess'), '/endpoint', { assetId: res.data.id }, true, 'tip.endpoint')
|
||||||
this.esc(true)
|
this.esc(true)
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg)
|
this.$message.error(res.msg)
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ export default {
|
|||||||
this.$put('/dc', param).then(response => {
|
this.$put('/dc', param).then(response => {
|
||||||
this.prevent_opt.save = false
|
this.prevent_opt.save = false
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.messageShow(this.$t('tip.saveSuccess'), '', { dcId: response.data.id, cabinetBoxShow: true }, false, 'overall.createCabinet', 'addCabinet')
|
this.messageShow(this.$t('tip.saveSuccess'), '', { dcId: response.data.id, cabinetBoxShow: true }, false, 'tip.cabinet', 'addCabinet')
|
||||||
this.esc(true)
|
this.esc(true)
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(response.msg)
|
this.$message.error(response.msg)
|
||||||
@@ -147,7 +147,7 @@ export default {
|
|||||||
this.$post('/dc', param).then(response => {
|
this.$post('/dc', param).then(response => {
|
||||||
this.prevent_opt.save = false
|
this.prevent_opt.save = false
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.messageShow(this.$t('tip.saveSuccess'), '', { dcId: response.data.id, cabinetBoxShow: true }, true, 'overall.createCabinet', 'addCabinet')
|
this.messageShow(this.$t('tip.saveSuccess'), '', { dcId: response.data.id, cabinetBoxShow: true }, true, 'tip.cabinet', 'addCabinet')
|
||||||
this.esc(true)
|
this.esc(true)
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(response.msg)
|
this.$message.error(response.msg)
|
||||||
|
|||||||
@@ -935,7 +935,7 @@ export default {
|
|||||||
this.$put('monitor/module', params).then(response => {
|
this.$put('monitor/module', params).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
// this.$message({ duration: 1000, type: 'success', message: this.$t('tip.saveSuccess') })
|
// this.$message({ duration: 1000, type: 'success', message: this.$t('tip.saveSuccess') })
|
||||||
this.messageShow(this.$t('tip.saveSuccess'), '/endpoint', { projectId: this.editModule.projectId, moduleId: response.data.id }, false, 'guide.addEndpoint')
|
this.messageShow(this.$t('tip.saveSuccess'), '/endpoint', { projectId: this.editModule.projectId, moduleId: response.data.id }, false, 'tip.endpoint')
|
||||||
this.$store.commit('setReloadFacade')
|
this.$store.commit('setReloadFacade')
|
||||||
this.esc(true)
|
this.esc(true)
|
||||||
} else {
|
} else {
|
||||||
@@ -946,7 +946,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$post('monitor/module', params).then(response => {
|
this.$post('monitor/module', params).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.messageShow(this.$t('tip.saveSuccess'), '/endpoint', { projectId: this.editModule.projectId, moduleId: response.data.id }, true, 'guide.addEndpoint')
|
this.messageShow(this.$t('tip.saveSuccess'), '/endpoint', { projectId: this.editModule.projectId, moduleId: response.data.id }, true, 'tip.endpoint')
|
||||||
this.$store.commit('setReloadFacade')
|
this.$store.commit('setReloadFacade')
|
||||||
this.esc(true)
|
this.esc(true)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<div class="container__form">
|
<div class="container__form">
|
||||||
<el-form ref="form" :model="editPanel" :rules="rules" label-position = "top" label-width="120px" size="small">
|
<el-form ref="form" :model="editPanel" :rules="rules" label-position = "top" label-width="120px" size="small">
|
||||||
<el-form-item :label='$t("overall.name")' prop="name">
|
<el-form-item :label='$t("overall.name")' prop="name">
|
||||||
<el-input id="dc-box-input-name" v-model="editPanel.name" maxlength="64" placeholder="" show-word-limit size="small"></el-input>
|
<el-input id="dc-box-input-name" v-model="editPanel.name" maxlength="64" placeholder="" show-word-limit size="small" :disabled="isBottom"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--remark-->
|
<!--remark-->
|
||||||
<el-form-item :label='$t("overall.remark")' class="range-time" prop="remark">
|
<el-form-item :label='$t("overall.remark")' class="range-time" prop="remark">
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
v-model="editPanel.param.report.schedule.repeat"
|
v-model="editPanel.param.report.schedule.repeat"
|
||||||
id="chart-box-title"
|
id="chart-box-title"
|
||||||
v-if="isShow === 3 ? true :false">
|
v-if="isShow === 3 ? true :false">
|
||||||
<template slot="append">{{ $t("backup.week") }}</template>
|
<template slot="append">{{ $t("el.datepicker.week") }}</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-input
|
<el-input
|
||||||
size="small"
|
size="small"
|
||||||
@@ -317,6 +317,14 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
obj: {
|
obj: {
|
||||||
type: Object
|
type: Object
|
||||||
|
},
|
||||||
|
isBottom: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
panelType: {
|
||||||
|
type: String,
|
||||||
|
default: 'dashboard'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [editRigthBox],
|
mixins: [editRigthBox],
|
||||||
@@ -506,7 +514,7 @@ export default {
|
|||||||
...this.editPanel,
|
...this.editPanel,
|
||||||
id: this.editPanel.id ? this.editPanel.id : '',
|
id: this.editPanel.id ? this.editPanel.id : '',
|
||||||
name: this.editPanel.name,
|
name: this.editPanel.name,
|
||||||
type: 'dashboard',
|
type: this.panelType,
|
||||||
remark: this.editPanel.remark,
|
remark: this.editPanel.remark,
|
||||||
param: {
|
param: {
|
||||||
report: {
|
report: {
|
||||||
@@ -612,12 +620,7 @@ export default {
|
|||||||
this.editPanel = JSON.parse(JSON.stringify(n))
|
this.editPanel = JSON.parse(JSON.stringify(n))
|
||||||
// 如果是空数组 则添加一条变量数据
|
// 如果是空数组 则添加一条变量数据
|
||||||
if (!this.editPanel.param.variables || !this.editPanel.param.variables.length) {
|
if (!this.editPanel.param.variables || !this.editPanel.param.variables.length) {
|
||||||
const temp = [{
|
const temp = []
|
||||||
show: true,
|
|
||||||
type: 'query',
|
|
||||||
multi: false,
|
|
||||||
allOption: false
|
|
||||||
}]
|
|
||||||
this.$set(this.editPanel.param, 'variables', temp)
|
this.$set(this.editPanel.param, 'variables', temp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default {
|
|||||||
this.$put('monitor/project', this.editProject).then(response => {
|
this.$put('monitor/project', this.editProject).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
// this.$message({ duration: 1000, type: 'success', message: this.$t('tip.saveSuccess') })
|
// this.$message({ duration: 1000, type: 'success', message: this.$t('tip.saveSuccess') })
|
||||||
this.messageShow(this.$t('tip.saveSuccess'), '/module', { projectId: response.data.id }, false, 'overall.createModule')
|
this.messageShow(this.$t('tip.saveSuccess'), '/module', { projectId: response.data.id }, false, 'tip.module')
|
||||||
this.$store.commit('projectListChange')
|
this.$store.commit('projectListChange')
|
||||||
this.$store.commit('setProject', this.project)
|
this.$store.commit('setProject', this.project)
|
||||||
this.esc(true)
|
this.esc(true)
|
||||||
@@ -84,7 +84,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$post('monitor/project', this.editProject).then(response => {
|
this.$post('monitor/project', this.editProject).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.messageShow(this.$t('tip.saveSuccess'), '/module', { projectId: response.data.id }, true, 'overall.createModule')
|
this.messageShow(this.$t('tip.saveSuccess'), '/module', { projectId: response.data.id }, true, 'tip.module')
|
||||||
this.$store.commit('projectListChange')
|
this.$store.commit('projectListChange')
|
||||||
this.esc(true)
|
this.esc(true)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -153,11 +153,11 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.editCredential.type === 3) {
|
if (this.editCredential.type === 3) {
|
||||||
if (this.editCredential.config.authProtocol && !this.editCredential.config.privProtocol) {
|
if (this.editCredential.config.authProtocol && !this.editCredential.config.privProtocol) {
|
||||||
this.editCredential.securityLevel = 'authNoPriv'
|
this.editCredential.config.securityLevel = 'authNoPriv'
|
||||||
} else if (this.editCredential.config.authProtocol && this.editCredential.config.privProtocol) {
|
} else if (this.editCredential.config.authProtocol && this.editCredential.config.privProtocol) {
|
||||||
this.editCredential.securityLevel = 'authPriv'
|
this.editCredential.config.securityLevel = 'authPriv'
|
||||||
} else {
|
} else {
|
||||||
this.editCredential.securityLevel = 'noAuthNoPriv'
|
this.editCredential.config.securityLevel = 'noAuthNoPriv'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const param = JSON.parse(JSON.stringify(this.editCredential))
|
const param = JSON.parse(JSON.stringify(this.editCredential))
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
<span class="active-icon gray-bg inline-block"></span>
|
<span class="active-icon gray-bg inline-block"></span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<nz-tooltip :that="scope.row.configs[1]" v-if="scope.row.configs[1] && scope.row.configs[1].loading && scope.row.configs[1].state > 1" :type="'configs[1]'">
|
<nz-tooltip :that="scope.row.configs[1]" v-if="scope.row.configs[1] && scope.row.configs[1].loading && scope.row.configs[1].state > 1" :type="'configs[1]'" :isTopoInfo="isTopoInfo">
|
||||||
<div name="default">
|
<div name="default">
|
||||||
<div v-html="suspendedStr(scope.row.configs[1].state)"></div>
|
<div v-html="suspendedStr(scope.row.configs[1].state)"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -220,6 +220,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
isTopoInfo: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
endpointTab: Boolean,
|
endpointTab: Boolean,
|
||||||
loading: Boolean
|
loading: Boolean
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -750,7 +750,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -94,6 +94,7 @@
|
|||||||
<panel-variables :labelArrs="variables" :time-range="searchTime" @getPanelData="getPanelData"></panel-variables>
|
<panel-variables :labelArrs="variables" :time-range="searchTime" @getPanelData="getPanelData"></panel-variables>
|
||||||
<chart-list
|
<chart-list
|
||||||
ref="chartList"
|
ref="chartList"
|
||||||
|
:variablesInit="variablesInit"
|
||||||
name="panel"
|
name="panel"
|
||||||
:panelId="showPanel.id"
|
:panelId="showPanel.id"
|
||||||
:class="{'show-top':showTopBtn, 'is-dashboard': true}"
|
:class="{'show-top':showTopBtn, 'is-dashboard': true}"
|
||||||
@@ -673,7 +674,7 @@ export default {
|
|||||||
this.filter.value = this.searchTime[2]
|
this.filter.value = this.searchTime[2]
|
||||||
this.filter.id = this.$refs.pickTime.$refs.timePicker.showTime.id
|
this.filter.id = this.$refs.pickTime.$refs.timePicker.showTime.id
|
||||||
// this.getTableData()
|
// this.getTableData()
|
||||||
this.variablesInit && this.getData(this.filter)
|
this.getData(this.filter)
|
||||||
const param = {
|
const param = {
|
||||||
panelId: this.panelId,
|
panelId: this.panelId,
|
||||||
nowTimeType: JSON.stringify(this.nowTimeType),
|
nowTimeType: JSON.stringify(this.nowTimeType),
|
||||||
@@ -753,7 +754,7 @@ export default {
|
|||||||
if (!this.showPanel.id) {
|
if (!this.showPanel.id) {
|
||||||
this.showPanel = response.data.list[0]
|
this.showPanel = response.data.list[0]
|
||||||
this.filter.panelId = this.showPanel.id
|
this.filter.panelId = this.showPanel.id
|
||||||
this.variablesInit && this.getData(this.filter)
|
this.getData(this.filter)
|
||||||
isInitData = true
|
isInitData = true
|
||||||
} else {
|
} else {
|
||||||
handler(response.data.list)
|
handler(response.data.list)
|
||||||
@@ -767,7 +768,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
if (!isInitData && (this.panel.id === '' || this.panel.id === this.showPanel.id)) {
|
if (!isInitData && (this.panel.id === '' || this.panel.id === this.showPanel.id)) {
|
||||||
this.variablesInit && this.getData(this.filter)
|
this.getData(this.filter)
|
||||||
}
|
}
|
||||||
this.$store.state.showPanel.id = 0
|
this.$store.state.showPanel.id = 0
|
||||||
this.$store.state.showPanel.name = ''
|
this.$store.state.showPanel.name = ''
|
||||||
@@ -1029,7 +1030,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getPanelData () {
|
getPanelData () {
|
||||||
this.variablesInit = true
|
this.variablesInit = true
|
||||||
this.getData(this.filter)
|
this.$refs.chartList.onScroll(this.scrollbarWrap.scrollTop)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
|||||||
@@ -668,7 +668,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -1,22 +1,40 @@
|
|||||||
|
import { getUUID } from './components/common/js/common'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
const CancelToken = axios.CancelToken // 申明CancelToken
|
const CancelToken = axios.CancelToken // 申明CancelToken
|
||||||
|
|
||||||
export const requestsArr = []
|
export const requestsArr = []
|
||||||
axios.interceptors.request.use(config => {
|
// 清除掉请求完成的实例 防止占用内存
|
||||||
const source = CancelToken.source() // 申明CancelToken,也可new CancelToken.source()实例一个
|
const removePending = (config) => {
|
||||||
config.cancelToken = source.token // 讲实例对象的token赋予该请求
|
if (!config) {
|
||||||
requestsArr.push(source) // 将该实例添加到队列中
|
return false
|
||||||
const token = localStorage.getItem('nz-token')
|
|
||||||
if (token) {
|
|
||||||
config.headers.Authorization = token // 请求头token
|
|
||||||
}
|
}
|
||||||
const lang = localStorage.getItem('nz-language')
|
for (const i in requestsArr) {
|
||||||
if (lang) {
|
if (requestsArr[i].id === config.id) {
|
||||||
config.headers.Language = lang // 请求头token
|
requestsArr.splice(i, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
axios.interceptors.request.use(
|
||||||
|
config => {
|
||||||
|
const source = CancelToken.source() // 申明CancelToken,也可new CancelToken.source()实例一个
|
||||||
|
config.cancelToken = source.token // 将实例对象的token赋予该请求
|
||||||
|
const id = getUUID() // 添加唯一识别id 在请求完成时清除requestsArr
|
||||||
|
config.id = id
|
||||||
|
requestsArr.push({
|
||||||
|
id,
|
||||||
|
cancel: source.cancel
|
||||||
|
}) // 将该实例添加到队列中
|
||||||
|
const token = localStorage.getItem('nz-token')
|
||||||
|
if (token) {
|
||||||
|
config.headers.Authorization = token // 请求头token
|
||||||
|
}
|
||||||
|
const lang = localStorage.getItem('nz-language')
|
||||||
|
if (lang) {
|
||||||
|
config.headers.Language = lang // 请求头token
|
||||||
|
}
|
||||||
|
return config
|
||||||
|
}, err => {
|
||||||
|
Promise.reject(err)
|
||||||
}
|
}
|
||||||
return config
|
|
||||||
},
|
|
||||||
err => Promise.reject(err)
|
|
||||||
)
|
)
|
||||||
const accountErrorCode = [518003, 518004, 518005, 518006, 518007, 518008] // 账号锁定等
|
const accountErrorCode = [518003, 518004, 518005, 518006, 518007, 518008] // 账号锁定等
|
||||||
const licenceErrorCode = [711001]
|
const licenceErrorCode = [711001]
|
||||||
@@ -66,9 +84,13 @@ axios.interceptors.response.use(
|
|||||||
} else {
|
} else {
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
|
// 请求完成在数组中移除
|
||||||
|
removePending(response.config)
|
||||||
return response
|
return response
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
// 请求完成在数组中移除
|
||||||
|
removePending(error.config)
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user