|
@@ -48,8 +48,8 @@
|
|
|
:total="tableList"
|
|
|
:column="baseModal && baseModal.column || []"
|
|
|
:table-height="baseModal && baseModal.tableHeight ? baseModal.tableHeight : 'auto' "
|
|
|
- @click.stop
|
|
|
size="mini"
|
|
|
+ @click.stop
|
|
|
@change="dmTableChange"
|
|
|
>
|
|
|
<!-- 改进项:级别 -->
|
|
@@ -143,21 +143,17 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
drawerData(v, o) {
|
|
|
- // if (JSON.stringify(v) !== JSON.stringify(o)) {
|
|
|
- // this.init()
|
|
|
- // }
|
|
|
this.init()
|
|
|
},
|
|
|
openDrawer(value) {
|
|
|
this.drawer = value
|
|
|
- if(this.drawer) {
|
|
|
- this.init()
|
|
|
+ if (this.drawer) {
|
|
|
+ this.init()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.drawer = false
|
|
|
- // this.handleClose()
|
|
|
},
|
|
|
methods: {
|
|
|
moment,
|
|
@@ -250,26 +246,26 @@ export default {
|
|
|
}
|
|
|
const paging = this.paging
|
|
|
this.baseModal.method({
|
|
|
- ...this.paging,
|
|
|
+ ...paging
|
|
|
// idList: this.drawerData,
|
|
|
// curIndex: this.paging.curIndex,
|
|
|
// pageSize: this.paging.pageSize
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
// 暴露处理返回值的函数,通过 this.baseModal 调用
|
|
|
- const {tableList, oldTableList, paging} = this.baseModal.setTableList({
|
|
|
+ const { tableList, oldTableList, paging } = this.baseModal.setTableList({
|
|
|
tableList: this.tableList, // 表格展示时使用的数据
|
|
|
oldTableList: this.oldTableList, // 假分页时使用的数据
|
|
|
paging: this.paging, // 分页数据和部分给接口传参
|
|
|
res
|
|
|
})
|
|
|
- if ( tableList ) {
|
|
|
- this.tableList = [ ...tableList ]
|
|
|
+ if (tableList) {
|
|
|
+ this.tableList = [...tableList]
|
|
|
}
|
|
|
- if ( oldTableList ) {
|
|
|
- this.oldTableList = [ ...oldTableList ]
|
|
|
+ if (oldTableList) {
|
|
|
+ this.oldTableList = [...oldTableList]
|
|
|
}
|
|
|
- if ( paging ) {
|
|
|
+ if (paging) {
|
|
|
this.paging = { ...paging }
|
|
|
}
|
|
|
this.loading = false
|
|
@@ -296,7 +292,7 @@ export default {
|
|
|
// 设置表头
|
|
|
// 表格跳转
|
|
|
dmTableChange({ column, row }) {
|
|
|
- if ( typeof this.baseModal.jumper === 'string' ) {
|
|
|
+ if (typeof this.baseModal.jumper === 'string') {
|
|
|
this.jumper(row, this.baseModal.jumper)
|
|
|
} else {
|
|
|
this.baseModal.jumper({ column, row })
|
|
@@ -318,7 +314,7 @@ export default {
|
|
|
const bizId_id = EncryptId(`${bizId}_${id}`)
|
|
|
const newTab = this.$router.resolve({ name: name + '详情', query: { bizId_id: bizId_id }})
|
|
|
window.open(newTab.href, '_blank')
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|