fix:CN-971 1.卡片中标题、id和描述的布局跟设计图不符,设计图中描述跟id之间有较大的间隔,用来区分head和描述。
2.翻页到非第一页,编辑知识库,点cancel或save后,返回到编辑前页数
This commit is contained in:
@@ -415,7 +415,8 @@
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
font-weight: 400;
|
||||
margin-bottom:6px;
|
||||
margin-bottom:16px;
|
||||
line-height: 12px;
|
||||
}
|
||||
.card-desc {
|
||||
//font-family: NotoSansSChineseRegular;
|
||||
|
||||
@@ -60,7 +60,6 @@ export default {
|
||||
const { query } = useRoute()
|
||||
const pageSize = ref(defaultPageSize)
|
||||
const currentPageNo = ref(props.storePageNoOnUrl ? (query.pageNo || (props.pageObj.pageNo || 1)) : (props.pageObj.pageNo || 1))
|
||||
|
||||
return {
|
||||
pageSize,
|
||||
currentPageNo
|
||||
|
||||
@@ -129,10 +129,12 @@ export default {
|
||||
this.$emit('delete', data)
|
||||
},
|
||||
edit (id) {
|
||||
const pageNo = this.$router.currentRoute.value.query.pageNo
|
||||
this.$router.push({
|
||||
path: '/knowledgeBase/edit',
|
||||
query: {
|
||||
t: +new Date(),
|
||||
pageNoForTable: pageNo || 1,
|
||||
id: id
|
||||
}
|
||||
})
|
||||
|
||||
@@ -20,7 +20,7 @@ export default {
|
||||
pageObj: { // 分页对象
|
||||
pageNo: 1,
|
||||
pageSize: defaultPageSize,
|
||||
total: 0
|
||||
total: null//total为0时,elment分页组件pagination,修改当前页无效。修改为null即可解决此问题
|
||||
},
|
||||
/* 工具参数 */
|
||||
tools: {
|
||||
|
||||
@@ -411,7 +411,8 @@ export default {
|
||||
timer: null,
|
||||
isShowUploadTips: false,
|
||||
isPreviewChange: false,
|
||||
isClick: false
|
||||
isClick: false,
|
||||
pageNoForTable: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -602,6 +603,7 @@ export default {
|
||||
this.isPreviewChange = true
|
||||
},
|
||||
cancel () {
|
||||
const self = this
|
||||
if (this.isPreviewChange) {
|
||||
this.$confirm(this.$t('tip.leavePage'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
@@ -614,13 +616,19 @@ export default {
|
||||
}).then(() => {
|
||||
this.$router.push({
|
||||
path: '/knowledgeBase',
|
||||
query: {
|
||||
pageNo: self.pageNoForTable ? Number(self.pageNoForTable) : 1,
|
||||
t: +new Date()
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: '/knowledgeBase',
|
||||
query: {
|
||||
pageNo: self.pageNoForTable ? Number(self.pageNoForTable) : 1,
|
||||
t: +new Date()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -680,6 +688,7 @@ export default {
|
||||
d.itemList = Array.from(d.itemList)
|
||||
})
|
||||
postData.remark = this.editObject.remark
|
||||
const self = this
|
||||
if (!this.editObject.id) {
|
||||
axios.post(this.url, postData).then(response => {
|
||||
if (response.data.code === 200) {
|
||||
@@ -690,7 +699,10 @@ export default {
|
||||
})
|
||||
this.$router.push({
|
||||
path: '/knowledgeBase',
|
||||
query: {
|
||||
pageNo: self.pageNoForTable ? Number(self.pageNoForTable) : 1,
|
||||
t: +new Date()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.errorMsgHandler(response)
|
||||
@@ -712,7 +724,10 @@ export default {
|
||||
})
|
||||
this.$router.push({
|
||||
path: '/knowledgeBase',
|
||||
query: {
|
||||
pageNo: self.pageNoForTable ? Number(self.pageNoForTable) : 1,
|
||||
t: +new Date()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.errorMsgHandler(response)
|
||||
@@ -852,6 +867,8 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
const pageNo = this.$router.currentRoute.value.query.pageNoForTable
|
||||
this.pageNoForTable = pageNo || 1
|
||||
const div = document.getElementsByClassName('el-upload-dragger')[0]
|
||||
const self = this
|
||||
div.addEventListener('click', function (event) {
|
||||
@@ -886,7 +903,10 @@ export default {
|
||||
this.$message.error(this.errorMsgHandler(e))
|
||||
this.$router.push({
|
||||
path: '/knowledgeBase',
|
||||
query: {
|
||||
pageNo: self.pageNoForTable ? Number(self.pageNoForTable) : 1,
|
||||
t: +new Date()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user