fix:CN-971 1.卡片中标题、id和描述的布局跟设计图不符,设计图中描述跟id之间有较大的间隔,用来区分head和描述。

2.翻页到非第一页,编辑知识库,点cancel或save后,返回到编辑前页数
This commit is contained in:
hyx
2023-05-15 11:42:21 +08:00
parent 3ba67d4826
commit 5ba4c612b2
6 changed files with 34 additions and 12 deletions

View File

@@ -415,7 +415,8 @@
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
font-weight: 400; font-weight: 400;
margin-bottom:6px; margin-bottom:16px;
line-height: 12px;
} }
.card-desc { .card-desc {
//font-family: NotoSansSChineseRegular; //font-family: NotoSansSChineseRegular;

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="pagination"> <div class="pagination" >
<el-pagination <el-pagination
ref="page" ref="page"
@size-change="size" @size-change="size"
@@ -60,7 +60,6 @@ export default {
const { query } = useRoute() const { query } = useRoute()
const pageSize = ref(defaultPageSize) const pageSize = ref(defaultPageSize)
const currentPageNo = ref(props.storePageNoOnUrl ? (query.pageNo || (props.pageObj.pageNo || 1)) : (props.pageObj.pageNo || 1)) const currentPageNo = ref(props.storePageNoOnUrl ? (query.pageNo || (props.pageObj.pageNo || 1)) : (props.pageObj.pageNo || 1))
return { return {
pageSize, pageSize,
currentPageNo currentPageNo

View File

@@ -129,10 +129,12 @@ export default {
this.$emit('delete', data) this.$emit('delete', data)
}, },
edit (id) { edit (id) {
const pageNo = this.$router.currentRoute.value.query.pageNo
this.$router.push({ this.$router.push({
path: '/knowledgeBase/edit', path: '/knowledgeBase/edit',
query: { query: {
t: +new Date(), t: +new Date(),
pageNoForTable: pageNo || 1,
id: id id: id
} }
}) })

View File

@@ -20,7 +20,7 @@ export default {
pageObj: { // 分页对象 pageObj: { // 分页对象
pageNo: 1, pageNo: 1,
pageSize: defaultPageSize, pageSize: defaultPageSize,
total: 0 total: null//total为0时elment分页组件pagination,修改当前页无效。修改为null即可解决此问题
}, },
/* 工具参数 */ /* 工具参数 */
tools: { tools: {

View File

@@ -58,9 +58,9 @@ export const panelTypeAndRouteMapping = {
networkOverviewDrillDown: 13, networkOverviewDrillDown: 13,
networkAppPerformance: 2, networkAppPerformance: 2,
dnsServiceInsights: 3, dnsServiceInsights: 3,
/* ipEntityDetail: 4, /* ipEntityDetail: 4,
domainEntityDetail: 5, domainEntityDetail: 5,
appEntityDetail: 6,*/ appEntityDetail: 6, */
ipEntityDetail: 21, ipEntityDetail: 21,
domainEntityDetail: 22, domainEntityDetail: 22,
appEntityDetail: 23, appEntityDetail: 23,

View File

@@ -411,7 +411,8 @@ export default {
timer: null, timer: null,
isShowUploadTips: false, isShowUploadTips: false,
isPreviewChange: false, isPreviewChange: false,
isClick: false isClick: false,
pageNoForTable: 1
} }
}, },
methods: { methods: {
@@ -602,6 +603,7 @@ export default {
this.isPreviewChange = true this.isPreviewChange = true
}, },
cancel () { cancel () {
const self = this
if (this.isPreviewChange) { if (this.isPreviewChange) {
this.$confirm(this.$t('tip.leavePage'), { this.$confirm(this.$t('tip.leavePage'), {
confirmButtonText: this.$t('tip.confirm'), confirmButtonText: this.$t('tip.confirm'),
@@ -614,13 +616,19 @@ export default {
}).then(() => { }).then(() => {
this.$router.push({ this.$router.push({
path: '/knowledgeBase', path: '/knowledgeBase',
t: +new Date() query: {
pageNo: self.pageNoForTable ? Number(self.pageNoForTable) : 1,
t: +new Date()
}
}) })
}).catch(() => {}) }).catch(() => {})
} else { } else {
this.$router.push({ this.$router.push({
path: '/knowledgeBase', path: '/knowledgeBase',
t: +new Date() query: {
pageNo: self.pageNoForTable ? Number(self.pageNoForTable) : 1,
t: +new Date()
}
}) })
} }
}, },
@@ -680,6 +688,7 @@ export default {
d.itemList = Array.from(d.itemList) d.itemList = Array.from(d.itemList)
}) })
postData.remark = this.editObject.remark postData.remark = this.editObject.remark
const self = this
if (!this.editObject.id) { if (!this.editObject.id) {
axios.post(this.url, postData).then(response => { axios.post(this.url, postData).then(response => {
if (response.data.code === 200) { if (response.data.code === 200) {
@@ -690,7 +699,10 @@ export default {
}) })
this.$router.push({ this.$router.push({
path: '/knowledgeBase', path: '/knowledgeBase',
t: +new Date() query: {
pageNo: self.pageNoForTable ? Number(self.pageNoForTable) : 1,
t: +new Date()
}
}) })
} else { } else {
this.errorMsgHandler(response) this.errorMsgHandler(response)
@@ -712,7 +724,10 @@ export default {
}) })
this.$router.push({ this.$router.push({
path: '/knowledgeBase', path: '/knowledgeBase',
t: +new Date() query: {
pageNo: self.pageNoForTable ? Number(self.pageNoForTable) : 1,
t: +new Date()
}
}) })
} else { } else {
this.errorMsgHandler(response) this.errorMsgHandler(response)
@@ -852,6 +867,8 @@ export default {
} }
}, },
mounted () { mounted () {
const pageNo = this.$router.currentRoute.value.query.pageNoForTable
this.pageNoForTable = pageNo || 1
const div = document.getElementsByClassName('el-upload-dragger')[0] const div = document.getElementsByClassName('el-upload-dragger')[0]
const self = this const self = this
div.addEventListener('click', function (event) { div.addEventListener('click', function (event) {
@@ -886,7 +903,10 @@ export default {
this.$message.error(this.errorMsgHandler(e)) this.$message.error(this.errorMsgHandler(e))
this.$router.push({ this.$router.push({
path: '/knowledgeBase', path: '/knowledgeBase',
t: +new Date() query: {
pageNo: self.pageNoForTable ? Number(self.pageNoForTable) : 1,
t: +new Date()
}
}) })
}) })
} }