提交 de3e4429 authored 作者: lihuihui's avatar lihuihui

修改bug

上级 b6b82ec0
...@@ -89,6 +89,7 @@ export default { ...@@ -89,6 +89,7 @@ export default {
}, },
'objFn.paramsFn': { 'objFn.paramsFn': {
handler () { handler () {
console.log(11111)
this.getList() this.getList()
} }
} }
......
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
this.dialogVisible = true this.dialogVisible = true
}, },
gobackActiveList () { gobackActiveList () {
this.$router.push({ path: '/app/affairs-hall/hall' }) this.$router.push({ path: '/app/affairs-hall/hall', query: { index: 2 } })
}, },
onApplyFrom () { onApplyFrom () {
this.$refs.setApplyForm.validate((valid) => { this.$refs.setApplyForm.validate((valid) => {
......
...@@ -76,7 +76,9 @@ export default { ...@@ -76,7 +76,9 @@ export default {
this.VueEvent.$off('command-tablelist-x') this.VueEvent.$off('command-tablelist-x')
}, },
mounted () { mounted () {
this.getTapData() const i = this.$route.query.index || 0
this.tapParam[0].selectIndex = i
this.getTapData(i)
this.VueEvent.$on('command-tablelist-x', (_obj) => { this.VueEvent.$on('command-tablelist-x', (_obj) => {
if (_obj.command.command === 'activelist-show') { if (_obj.command.command === 'activelist-show') {
const rid = _obj.tableData[_obj.index - 1].formId const rid = _obj.tableData[_obj.index - 1].formId
...@@ -111,8 +113,9 @@ export default { ...@@ -111,8 +113,9 @@ export default {
this.dialogVisible = false this.dialogVisible = false
}, },
setmPage () { setmPage () {
console.log(111)
this.objFn = { this.objFn = {
paramsFn: (_this) => { return { affair_id: this.dataParam } }, paramsFn: (_this) => { return { affair_id: this.dataParam, action: Math.random() } },
nameAPI: 'getAffairsData', nameAPI: 'getAffairsData',
actionClass: 'Affairs', actionClass: 'Affairs',
// nameExcel: 'getStatSummaryExcel', // nameExcel: 'getStatSummaryExcel',
...@@ -165,8 +168,8 @@ export default { ...@@ -165,8 +168,8 @@ export default {
this.getData(data) this.getData(data)
}, },
getData (data) { getData (data) {
console.log(5555)
const n = parseInt(data.index) const n = parseInt(data.index)
this.dataParam = data.id
switch (n) { switch (n) {
case 0: case 0:
this.tableHead = [ this.tableHead = [
...@@ -204,22 +207,29 @@ export default { ...@@ -204,22 +207,29 @@ export default {
] ]
break break
} }
this.dataParam = data.id
this.setmPage() this.setmPage()
}, },
getTapData () { getTapData (index) {
const affairId = this.$route.query.id || '' index = index !== undefined ? index : 0
console.log(affairId, '=======') const affairId = this.$route.query.affairId || ''
// 获取事务类型 tap切换 // 获取事务类型 tap切换
cAction.Affairs.getAffairsType().then(data => { cAction.Affairs.getAffairsType().then(data => {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
console.log(this.tapParam[0])
this.tapParam[0].arrItem.push( this.tapParam[0].arrItem.push(
{ val: data[i].id, name: data[i].affair_name } { val: data[i].id, name: data[i].affair_name }
) )
} }
const param = { const param = {}
id: this.tapParam[0].arrItem[0].val, if (affairId === '') {
index: 0 param.id = this.tapParam[0].arrItem[index].val
param.index = index
} else {
param.id = affairId
param.index = 1
} }
this.tapIndex = index
this.getData(param) this.getData(param)
}).catch(e => { }).catch(e => {
this.$message.error(e.message) this.$message.error(e.message)
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
}, },
gobackActiveList () { gobackActiveList () {
this.$router.push({ path: '/app/affairs-hall/hall' }) this.$router.push({ path: '/app/affairs-hall/hall', query: { index: 0 } })
}, },
onApplyFrom () { onApplyFrom () {
this.$refs.setApplyForm.validate((valid) => { this.$refs.setApplyForm.validate((valid) => {
......
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
}, },
gobackActiveList () { gobackActiveList () {
this.$router.push({ path: '/app/affairs-hall/hall', query: { id: this.$route.query.id } }) this.$router.push({ path: '/app/affairs-hall/hall', query: { index: 1 } })
}, },
onApplyFrom () { onApplyFrom () {
this.$refs.setApplyForm.validate((valid) => { this.$refs.setApplyForm.validate((valid) => {
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
if (data.success) { if (data.success) {
this.$message({ type: 'success', message: '提交成功' }) this.$message({ type: 'success', message: '提交成功' })
setTimeout(() => { setTimeout(() => {
this.$router.push({ path: '/app/affairs-hall/hall' }) this.$router.push({ path: '/app/affairs-hall/hall', query: { index: 1 } })
}, 500) }, 500)
} }
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论