Compare commits
18 Commits
24.04.demo
...
dev-23.02
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ee7631d25 | ||
|
|
28c0b3aebf | ||
|
|
b178941f01 | ||
|
|
ecd82b08c7 | ||
|
|
23c88ae447 | ||
|
|
9b2f2f5e21 | ||
|
|
d8de1e5d69 | ||
|
|
502d098413 | ||
|
|
a8a84b6abb | ||
|
|
da9eeae556 | ||
|
|
4125a88bba | ||
|
|
317693e2da | ||
|
|
be79109487 | ||
|
|
b99a20725a | ||
|
|
c40941fa60 | ||
|
|
6fba2c6116 | ||
|
|
2609c2e721 | ||
|
|
158a143d76 |
@@ -91,11 +91,11 @@ build_release_image:
|
|||||||
- echo '提交的版本是'
|
- echo '提交的版本是'
|
||||||
- echo $CI_COMMIT_REF_NAME
|
- echo $CI_COMMIT_REF_NAME
|
||||||
- echo "docker build"
|
- echo "docker build"
|
||||||
- sudo docker build --no-cache -t cn-ui-$CI_COMMIT_REF_NAME:$CI_COMMIT_TAG .
|
- sudo docker build --no-cache -t cn-ui:$CI_COMMIT_TAG .
|
||||||
- echo "docker tag"
|
- echo "docker tag"
|
||||||
- sudo docker tag cn-ui-$CI_COMMIT_REF_NAME:$CI_COMMIT_TAG 192.168.40.153:9080/cyber-narrator/cn-ui-$CI_COMMIT_REF_NAME:$CI_COMMIT_TAG
|
- sudo docker tag cn-ui:$CI_COMMIT_TAG 192.168.40.153:9080/cyber-narrator/cn-ui:$CI_COMMIT_TAG
|
||||||
- echo "docker push"
|
- echo "docker push"
|
||||||
- sudo docker push 192.168.40.153:9080/cyber-narrator/cn-ui-$CI_COMMIT_REF_NAME:$CI_COMMIT_TAG
|
- sudo docker push 192.168.40.153:9080/cyber-narrator/cn-ui:$CI_COMMIT_TAG
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
@@ -94,6 +94,7 @@
|
|||||||
}
|
}
|
||||||
.el-collapse-item {
|
.el-collapse-item {
|
||||||
min-height: 58px;
|
min-height: 58px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.el-collapse-item__header {
|
.el-collapse-item__header {
|
||||||
height: unset;
|
height: unset;
|
||||||
|
|||||||
@@ -101,6 +101,13 @@ export default {
|
|||||||
this.tableData = response.data.list
|
this.tableData = response.data.list
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
// TODO 回到顶部
|
// TODO 回到顶部
|
||||||
|
} else {
|
||||||
|
console.error(response)
|
||||||
|
if (response.message) {
|
||||||
|
this.$message.error(response.message)
|
||||||
|
} else {
|
||||||
|
this.$message.error('Something went wrong...')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -215,9 +222,15 @@ export default {
|
|||||||
if (this.$refs.dataTable.loadingTableId === u.id) { // 列表单个下载
|
if (this.$refs.dataTable.loadingTableId === u.id) { // 列表单个下载
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (localStorage.getItem(storageKey.s3Enable) == 1) {
|
||||||
if (u.state !== 1 || u.upload !== 1) {
|
if (u.state !== 1 || u.upload !== 1) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (u.state !== 1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
let fileName = ''
|
let fileName = ''
|
||||||
let url = ''
|
let url = ''
|
||||||
let params = {}
|
let params = {}
|
||||||
@@ -277,9 +290,15 @@ export default {
|
|||||||
if (this.$refs.dataTable.loadingPreviewId === u.id) { // 列表单个下载
|
if (this.$refs.dataTable.loadingPreviewId === u.id) { // 列表单个下载
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (localStorage.getItem(storageKey.s3Enable) == 1) {
|
||||||
if (u.state !== 1 || u.upload !== 1) {
|
if (u.state !== 1 || u.upload !== 1) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (u.state !== 1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
const params = {
|
const params = {
|
||||||
id: u.id
|
id: u.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -878,7 +878,7 @@ export async function getDnsMapData (type) {
|
|||||||
}
|
}
|
||||||
export function handleSpecialValue (value) {
|
export function handleSpecialValue (value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
value.replace(/\'/g, "\\\\'")
|
value = value.replace(/\'/g, "\\\\'")
|
||||||
.replace(/\"/g, '\\"')
|
.replace(/\"/g, '\\"')
|
||||||
.replace(/\&/g, '%26')
|
.replace(/\&/g, '%26')
|
||||||
}
|
}
|
||||||
@@ -1146,3 +1146,20 @@ export function getLineIndexUnit (type, show) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export function getLineIndexUnit2 (type) {
|
||||||
|
if (type.indexOf('total') > -1) {
|
||||||
|
return 0
|
||||||
|
} else if (type.indexOf('inbound') > -1) {
|
||||||
|
return 1
|
||||||
|
} else if (type.indexOf('outbound') > -1) {
|
||||||
|
return 2
|
||||||
|
} else if (type.indexOf('internal') > -1) {
|
||||||
|
return 3
|
||||||
|
} else if (type.indexOf('through') > -1) {
|
||||||
|
return 4
|
||||||
|
} else if (type.indexOf('other') > -1) {
|
||||||
|
return 5
|
||||||
|
} else {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -370,17 +370,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup (props) {
|
setup (props) {
|
||||||
const { currentRoute } = useRouter()
|
const dateRangeValue = 60
|
||||||
|
|
||||||
function isEntityDetail (r) {
|
|
||||||
return r.indexOf('entityDetail') > -1
|
|
||||||
}
|
|
||||||
const dateRangeValue = isEntityDetail(currentRoute.value.path) ? 60 * 24 : 60
|
|
||||||
const { startTime, endTime } = getNowTime(dateRangeValue)
|
const { startTime, endTime } = getNowTime(dateRangeValue)
|
||||||
// entity详情内的chart时间工具不是公共的,需要单独定义
|
// entity详情内的chart时间工具不是公共的,需要单独定义
|
||||||
const chartTimeFilter = ref({ startTime, endTime, dateRangeValue })
|
const chartTimeFilter = ref({ startTime, endTime, dateRangeValue })
|
||||||
// 复制一份prop中需要被组件v-model的内容,避免报错
|
// 复制一份prop中需要被组件v-model的内容,避免报错
|
||||||
const copyOrderPieTable = props.orderPieTable
|
const copyOrderPieTable = ref(props.orderPieTable)
|
||||||
return {
|
return {
|
||||||
chartTimeFilter,
|
chartTimeFilter,
|
||||||
chartTableTopOptions,
|
chartTableTopOptions,
|
||||||
|
|||||||
@@ -107,11 +107,8 @@ export default {
|
|||||||
const { params } = useRoute()
|
const { params } = useRoute()
|
||||||
panelType = props.entity ? props.entity.type : panelTypeAndRouteMapping[params.typeName]
|
panelType = props.entity ? props.entity.type : panelTypeAndRouteMapping[params.typeName]
|
||||||
|
|
||||||
function isEntityDetail (t) {
|
|
||||||
return [4, 5, 6].indexOf(t) > -1
|
|
||||||
}
|
|
||||||
// date
|
// date
|
||||||
const dateRangeValue = isEntityDetail(panelType) ? 60 * 24 : 60
|
const dateRangeValue = 60
|
||||||
const { startTime, endTime } = getNowTime(dateRangeValue)
|
const { startTime, endTime } = getNowTime(dateRangeValue)
|
||||||
const timeFilter = ref({ startTime, endTime, dateRangeValue })
|
const timeFilter = ref({ startTime, endTime, dateRangeValue })
|
||||||
|
|
||||||
|
|||||||
@@ -239,19 +239,16 @@ export default {
|
|||||||
panelType = props.entity ? props.entity.type : panelTypeAndRouteMapping[params.typeName]
|
panelType = props.entity ? props.entity.type : panelTypeAndRouteMapping[params.typeName]
|
||||||
}
|
}
|
||||||
|
|
||||||
function isEntityDetail (t) {
|
|
||||||
return [4, 5, 6].indexOf(t) > -1
|
|
||||||
}
|
|
||||||
// 获取url携带的range、startTime、endTime
|
// 获取url携带的range、startTime、endTime
|
||||||
const rangeParam = query.range
|
const rangeParam = query.range
|
||||||
const startTimeParam = query.startTime
|
const startTimeParam = query.startTime
|
||||||
const endTimeParam = query.endTime
|
const endTimeParam = query.endTime
|
||||||
// 若url携带了,使用携带的值,否则使用默认值。
|
// 若url携带了,使用携带的值,否则使用默认值。
|
||||||
|
|
||||||
const dateRangeValue = rangeParam ? parseInt(query.range) : (isEntityDetail(panelType) ? 60 * 24 : 60)
|
const dateRangeValue = rangeParam ? parseInt(query.range) : 60
|
||||||
const timeFilter = ref({ dateRangeValue })
|
const timeFilter = ref({ dateRangeValue })
|
||||||
if (!startTimeParam || !endTimeParam) {
|
if (!startTimeParam || !endTimeParam) {
|
||||||
const { startTime, endTime } = getNowTime(isEntityDetail(panelType) ? 60 * 24 : 60)
|
const { startTime, endTime } = getNowTime(60)
|
||||||
timeFilter.value.startTime = startTime
|
timeFilter.value.startTime = startTime
|
||||||
timeFilter.value.endTime = endTime
|
timeFilter.value.endTime = endTime
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="link-direction-grid">
|
<div class="link-direction-grid">
|
||||||
<!--左侧链路出入口-->
|
<!--左侧链路出入口-->
|
||||||
<popover-content :isNoData="isLinkNoData" :gridData="linkGridData" :showError="isLinkShowError" :content="linkErrorMsg" style="width: 900px;"/>
|
<popover-content :title="$t('linkMonitor.egressLink') + ' & ' + $t('linkMonitor.ingressLink')" :isNoData="isLinkNoData" :gridData="linkGridData" :showError="isLinkShowError" :content="linkErrorMsg" style="width: 900px;"/>
|
||||||
|
|
||||||
<!--右侧链路下一跳-->
|
<!--右侧链路下一跳-->
|
||||||
<popover-content :isNoData="isNextNoData" :gridData="nextGridData" :showError="isNextShowError" :content="nextErrorMsg" />
|
<popover-content :title="$t('linkMonitor.nextHopInternetOfGrid')" :isNoData="isNextNoData" :gridData="nextGridData" :showError="isNextShowError" :content="nextErrorMsg" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="link-statistical-dimension" style="position: relative">
|
<div class="link-statistical-dimension" style="position: relative">
|
||||||
<div class="dimension-title" v-if="gridData.length>3">{{ $t('linkMonitor.egressLink') }} & {{ $t('linkMonitor.ingressLink') }}</div>
|
<div class="dimension-title">{{title}}</div>
|
||||||
<div class="dimension-title" v-else>{{ $t('linkMonitor.nextHopInternetOfGrid') }}</div>
|
|
||||||
|
|
||||||
<chart-no-data v-if="isNoData" :test-id="`noData${gridData.length}`"></chart-no-data>
|
<chart-no-data v-if="isNoData" :test-id="`noData${gridData.length}`"></chart-no-data>
|
||||||
|
|
||||||
@@ -156,7 +155,8 @@ export default {
|
|||||||
gridData: Array,
|
gridData: Array,
|
||||||
isNoData: Boolean,
|
isNoData: Boolean,
|
||||||
showError: Boolean,
|
showError: Boolean,
|
||||||
content: String
|
content: String,
|
||||||
|
title: String
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
ChartError,
|
ChartError,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import ChartNoData from '@/views/charts/charts/ChartNoData'
|
|||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import chartMixin from '@/views/charts2/chart-mixin'
|
import chartMixin from '@/views/charts2/chart-mixin'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { getLineType, getLineIndexUnit, overwriteUrl, urlParamsHandler } from '@/utils/tools'
|
import { getLineType, getLineIndexUnit, getLineIndexUnit2, overwriteUrl, urlParamsHandler } from '@/utils/tools'
|
||||||
import ChartError from '@/components/common/Error'
|
import ChartError from '@/components/common/Error'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -215,6 +215,7 @@ export default {
|
|||||||
{ name: this.$t('overall.packetRetrans'), show: true, positioning: 0, data: [], unitType: unitTypes.percent, index: 4 }
|
{ name: this.$t('overall.packetRetrans'), show: true, positioning: 0, data: [], unitType: unitTypes.percent, index: 4 }
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
|
console.info(res.data.result)
|
||||||
this.initData(res.data.result, val)
|
this.initData(res.data.result, val)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -226,6 +227,7 @@ export default {
|
|||||||
this.isNoData = false
|
this.isNoData = false
|
||||||
this.showError = true
|
this.showError = true
|
||||||
this.errorMsg = e.message
|
this.errorMsg = e.message
|
||||||
|
console.error(e)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.toggleLoading(false)
|
this.toggleLoading(false)
|
||||||
})
|
})
|
||||||
@@ -265,6 +267,7 @@ export default {
|
|||||||
{ name: this.$t('overall.packetRetrans'), show: true, positioning: 0, data: [], unitType: unitTypes.percent, index: 4 }
|
{ name: this.$t('overall.packetRetrans'), show: true, positioning: 0, data: [], unitType: unitTypes.percent, index: 4 }
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
|
console.info(npmLineData)
|
||||||
this.initData(npmLineData, val)
|
this.initData(npmLineData, val)
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
@@ -282,7 +285,7 @@ export default {
|
|||||||
if (echartsData.length > 0) {
|
if (echartsData.length > 0) {
|
||||||
const dom = document.getElementById('chart-line')
|
const dom = document.getElementById('chart-line')
|
||||||
!this.myChart && (this.myChart = echarts.init(dom))
|
!this.myChart && (this.myChart = echarts.init(dom))
|
||||||
this.chartOption = trafficLineChartOption
|
this.chartOption = _.cloneDeep(trafficLineChartOption)
|
||||||
const chartOption = this.chartOption.series[0]
|
const chartOption = this.chartOption.series[0]
|
||||||
this.chartOption.series = echartsData.map((t) => {
|
this.chartOption.series = echartsData.map((t) => {
|
||||||
this.chartOption.yAxis[0].axisLabel.formatter = (value) => {
|
this.chartOption.yAxis[0].axisLabel.formatter = (value) => {
|
||||||
@@ -301,7 +304,7 @@ export default {
|
|||||||
color: chartColor3[t.positioning],
|
color: chartColor3[t.positioning],
|
||||||
width: 1
|
width: 1
|
||||||
},
|
},
|
||||||
stack: t.name !== 'network.total' ? 'network.total' : '',
|
stack: t.name !== this.$t('network.total') ? this.$t('network.total') : '',
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
opacity: 0.1,
|
opacity: 0.1,
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
@@ -393,18 +396,32 @@ export default {
|
|||||||
if (data !== undefined && data.length > 0) {
|
if (data !== undefined && data.length > 0) {
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
item.type = getLineType(item.type)
|
item.type = getLineType(item.type)
|
||||||
|
if (['Bits/s', 'Packets/s', 'Sessions/s'].indexOf(val) > -1) {
|
||||||
|
if (item.type === val) {
|
||||||
|
lineData = Object.keys((item)).map(t => {
|
||||||
|
return {
|
||||||
|
...item[t],
|
||||||
|
index: getLineIndexUnit2(t, false),
|
||||||
|
key: t
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (item.type === val) {
|
if (item.type === val) {
|
||||||
lineData = Object.keys((item)).map(t => {
|
lineData = Object.keys((item)).map(t => {
|
||||||
return {
|
return {
|
||||||
...item[t],
|
...item[t],
|
||||||
index: getLineIndexUnit(item.type, false),
|
index: getLineIndexUnit(item.type, false),
|
||||||
unit: getLineIndexUnit(item.type, true)
|
unit: getLineIndexUnit(item.type, true),
|
||||||
|
key: t
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
lineData.splice(0, 1)
|
lineData.splice(0, 1)
|
||||||
|
console.info(lineData)
|
||||||
const tabs = _.cloneDeep(this.tabs)
|
const tabs = _.cloneDeep(this.tabs)
|
||||||
const npmQuantity = _.cloneDeep(this.npmQuantity)
|
const npmQuantity = _.cloneDeep(this.npmQuantity)
|
||||||
if (val === 'Sessions/s') {
|
if (val === 'Sessions/s') {
|
||||||
@@ -419,7 +436,7 @@ export default {
|
|||||||
})
|
})
|
||||||
this.tabs = tabs
|
this.tabs = tabs
|
||||||
this.echartsInit(this.tabs)
|
this.echartsInit(this.tabs)
|
||||||
} else if (val !== 'Bits/s' && val !== 'Packets/s' && val !== 'Sessions/s') {
|
} else if (val !== 'Bits/s' && val !== 'Packets/s') {
|
||||||
this.legendInit(lineData, npmQuantity, true)
|
this.legendInit(lineData, npmQuantity, true)
|
||||||
} else {
|
} else {
|
||||||
this.legendInit(lineData, tabs, false)
|
this.legendInit(lineData, tabs, false)
|
||||||
@@ -431,8 +448,8 @@ export default {
|
|||||||
npmData[d.index].data = d.values
|
npmData[d.index].data = d.values
|
||||||
npmData[d.index].analysis = d.analysis
|
npmData[d.index].analysis = d.analysis
|
||||||
} else {
|
} else {
|
||||||
npmData[i].data = d.values
|
npmData[d.index].data = d.values
|
||||||
npmData[i].analysis = d.analysis
|
npmData[d.index].analysis = d.analysis
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (show) {
|
if (show) {
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ export default {
|
|||||||
setup () {
|
setup () {
|
||||||
const { params } = useRoute()
|
const { params } = useRoute()
|
||||||
const pageType = params.typeName
|
const pageType = params.typeName
|
||||||
const dateRangeValue = 60 * 24
|
const dateRangeValue = 60
|
||||||
const { startTime, endTime } = getNowTime(dateRangeValue)
|
const { startTime, endTime } = getNowTime(dateRangeValue)
|
||||||
const timeFilter = ref({ startTime, endTime, dateRangeValue })
|
const timeFilter = ref({ startTime, endTime, dateRangeValue })
|
||||||
|
|
||||||
|
|||||||
@@ -717,7 +717,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup () {
|
setup () {
|
||||||
const dateRangeValue = 60 * 24
|
const dateRangeValue = 60
|
||||||
const { startTime, endTime } = getNowTime(dateRangeValue)
|
const { startTime, endTime } = getNowTime(dateRangeValue)
|
||||||
const timeFilter = ref({ startTime, endTime, dateRangeValue })
|
const timeFilter = ref({ startTime, endTime, dateRangeValue })
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -79,6 +79,13 @@ export default {
|
|||||||
if (response.data.code === 200) {
|
if (response.data.code === 200) {
|
||||||
this.object = response.data.data.list[0]
|
this.object = response.data.data.list[0]
|
||||||
}
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
console.error(e)
|
||||||
|
if (e.response.data && e.response.data.message) {
|
||||||
|
this.$message.error(e.response.data.message)
|
||||||
|
} else {
|
||||||
|
this.$message.error('Something went wrong...')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
del (row) {
|
del (row) {
|
||||||
@@ -96,6 +103,13 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(response.data.message)
|
this.$message.error(response.data.message)
|
||||||
}
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
console.error(e)
|
||||||
|
if (e.response.data && e.response.data.message) {
|
||||||
|
this.$message.error(e.response.data.message)
|
||||||
|
} else {
|
||||||
|
this.$message.error('Something went wrong...')
|
||||||
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.tools.loading = false
|
this.tools.loading = false
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="edit-knowledge-base__header">{{$t('overall.create')}}</div>
|
<div class="edit-knowledge-base__header">{{$t('overall.create')}}</div>
|
||||||
<div class="edit-knowledge-base__body">
|
<div class="edit-knowledge-base__body">
|
||||||
<el-steps direction="vertical" :active="activeStep">
|
<el-steps direction="vertical" :active="activeStep">
|
||||||
<el-step v-for="(height, index) in stepHeights" :style="`flex-basis: ${height}px;`" :key="index"></el-step>
|
<el-step v-for="(height, index) in stepHeights" :style="`flex-basis: ${height}px; flex-shrink: 0;`" :key="index"></el-step>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-collapse v-model="activeCollapses">
|
<el-collapse v-model="activeCollapses">
|
||||||
<el-collapse-item name="0">
|
<el-collapse-item name="0">
|
||||||
@@ -298,7 +298,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel () {
|
cancel () {
|
||||||
history.back()
|
this.$router.push({
|
||||||
|
path: '/knowledgeBase',
|
||||||
|
t: +new Date()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
save () {
|
save () {
|
||||||
if (this.blockOperation.save) { return }
|
if (this.blockOperation.save) { return }
|
||||||
@@ -354,6 +357,13 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(response.data.message)
|
this.$message.error(response.data.message)
|
||||||
}
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
console.error(e)
|
||||||
|
if (e.response.data && e.response.data.message) {
|
||||||
|
this.$message.error(e.response.data.message)
|
||||||
|
} else {
|
||||||
|
this.$message.error('Something went wrong...')
|
||||||
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.blockOperation.save = false
|
this.blockOperation.save = false
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user