Browse Source

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

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

2
src/components/News/addOrEdit.vue

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

8
src/components/News/index.vue

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

Loading…
Cancel
Save