feat: asset详细视图 切换部分 以及 左侧菜单部分的添加

This commit is contained in:
zhangyu
2021-10-09 16:47:38 +08:00
parent 0e3f7dad19
commit 46930a8878
9 changed files with 496 additions and 7 deletions

View File

@@ -0,0 +1,51 @@
export default {
props: {},
data () {
return {
detailType: 'list',
detailViewRightObj: {}
}
},
methods: {
changeDetailType (flag) {
if (this.detailType === flag) {
return
}
this.detailType = flag
this.pageObj.pageNo = 1
if (flag === 'list') {
this.getTableData()
} else {
this.getDetail()
}
},
searchDetail (params) {
this.getDetail()
},
getDetail () {
const params = {
pageNo: this.pageObj.pageNo,
pageSize: 50
}
this.tools.loading = true
this.$get(this.url, { ...params }).then(response => {
this.tools.loading = false
if (response.code === 200) {
this.tableData = response.data.list
this.detailViewRightObj = this.tableData[0]
this.pageObj.total = response.data.total
this.pageObj.pages = response.data.pages
if (!this.scrollbarWrap) {
this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap)
})
}
}
})
},
detailViewRightShow (item) {
this.detailViewRightObj = item
}
}
}