diff --git a/src/views/modules/organize/deptofficer.vue b/src/views/modules/organize/deptofficer.vue index 7e06c54f..c5b51f20 100644 --- a/src/views/modules/organize/deptofficer.vue +++ b/src/views/modules/organize/deptofficer.vue @@ -2,6 +2,11 @@
+
+ + 返回 + +
@@ -67,11 +72,23 @@ export default { }, dataForm: { id: '' - } + }, + pidList: [] } }, + mounted () { + this.pidList = JSON.parse(this.$route.query.pidList) + this.dataForm.deptId = this.$route.query.deptId + }, components: { AddOrUpdate + }, + methods: { + backToDeptList () { + this.$emit('refreshDataList') + this.$parent.selectComponent = 'Metasysdept' + this.$router.push({ path: '/organize-organizedeptroute', query: { pidList: JSON.stringify(this.pidList) } }) + } } } diff --git a/src/views/modules/organize/metasysdept.vue b/src/views/modules/organize/metasysdept.vue index 9d303afd..c364d056 100644 --- a/src/views/modules/organize/metasysdept.vue +++ b/src/views/modules/organize/metasysdept.vue @@ -2,7 +2,7 @@
-
+
返回 @@ -23,12 +23,12 @@ - + @@ -66,15 +66,14 @@ export default { pid: '', name: '' }, - backBtnVisible: true, - isOnclickFlag: false, pidList: [0] } }, mounted () { - this.dataForm.pid = this.$route.query.pid - if (this.$route.query.pid === undefined || this.pidList.length === 0) { - this.backBtnVisible = false + if (this.$route.query.pidList !== null && this.$route.query.pidList !== undefined) { + this.pidList = JSON.parse(this.$route.query.pidList) + this.dataForm.pid = this.pidList[this.pidList.length - 1] + } else { this.dataForm.pid = 0 } this.getDataList() @@ -86,27 +85,35 @@ export default { AddOrUpdate }, methods: { - manageHandle (deptId) { + manageHandle (deptId, pid) { this.$parent.selectComponent = 'Deptofficer' - this.$router.push({ path: '/organize-organizedeptroute', query: { deptId: deptId } }) + this.$router.push({ path: '/organize-organizedeptroute', query: { pidList: JSON.stringify(this.pidList), deptId: deptId } }) }, lookHandle (id, pid) { - this.pidList.push(pid) + this.pidList.push(id) this.$parent.selectComponent = 'Metasysdept' - this.$router.push({ path: '/organize-organizedeptroute', query: { pid: id, pidList: this.pidList } }) + this.$router.push({ path: '/organize-organizedeptroute', query: { pidList: JSON.stringify(this.pidList) } }) + if (this.$route.query.pidList !== null && this.$route.query.pidList !== undefined) { + this.pidList = JSON.parse(this.$route.query.pidList) + this.dataForm.pid = this.pidList[this.pidList.length - 1] + } else { + this.dataForm.pid = 0 + } + this.getDataList() }, backToDeptList () { - this.pidList.splice(this.pidList.length - 1, 1) + var m = this.pidList.splice(this.pidList.length - 1, 1) + m.pop() this.$emit('refreshDataList') this.$parent.selectComponent = 'Metasysdept' - if (this.$route.query.backId !== undefined) { - this.$router.push({ path: '/organize-organizedeptroute', query: { pid: this.$route.query.pidList } }) - } - }, - isOnclick (row, column) { - if (row.typeKey === 'grid_party') { - this.isOnclickFlag = true + this.$router.push({ path: '/organize-organizedeptroute', query: { pidList: JSON.stringify(this.pidList) } }) + if (this.$route.query.pidList !== null && this.$route.query.pidList !== undefined) { + this.pidList = JSON.parse(this.$route.query.pidList) + this.dataForm.pid = this.pidList[this.pidList.length - 1] + } else { + this.dataForm.pid = 0 } + this.getDataList() } } }