Browse Source

Merge branch 'master' of ssh://101.201.226.163:50022/binbin0314/datang-admin

master
aBin 3 years ago
parent
commit
c52b58dacd
  1. 12
      src/components/News/addOrEdit.vue
  2. 8
      src/components/News/index.vue

12
src/components/News/addOrEdit.vue

@ -178,11 +178,13 @@
if(!this.formLabelAlign.publishTime){
this.formLabelAlign.publishTime = new Date()
}
if(!code) return
this.formLabelAlign.showPage.splice(0, 1, code.slice(0, 2))
this.formLabelAlign.showPage.splice(1, 1, code)
if(code === '0204'){
this.formLabelAlign.showPage = ['02', '0203']
if(this.showAdd){
if(!code) return
this.formLabelAlign.showPage.splice(0, 1, code.slice(0, 2))
this.formLabelAlign.showPage.splice(1, 1, code)
if(code === '0204'){
this.formLabelAlign.showPage = ['02', '0203']
}
}
},

8
src/components/News/index.vue

@ -147,7 +147,8 @@
showAdd: true,
detailContent: null,
keys: [],
loading: true
loading: true,
options: {}
}
},
@ -160,6 +161,7 @@
* 获取详情列表
*/
getList(options) {
this.options = options;
const { pageNum, pageSize, showPage } = this;
const params = {
pageNum,
@ -291,7 +293,7 @@
this.showModal = false
if(type){
this.keys = []
this.getList()
this.getList(this.options)
}
},
@ -310,7 +312,7 @@
DELETE_DETAIL(params).then((res) => {
if(res.code === 200){
Alert.success('删除成功');
this.getList()
this.getList(this.options)
}else{
Alert.fail(res.msg || '删除失败');
}

Loading…
Cancel
Save