From cb075ea097bfda3d9440bfedfbe79c1107ba34b5 Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Fri, 6 Mar 2020 20:08:37 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E6=9E=B6=E6=9E=84=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metaSysDeptManagement-add-or-update.vue | 8 +++ .../modules/organize/sysdeptmanagement.vue | 62 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 src/views/modules/organize/sysdeptmanagement.vue diff --git a/src/views/modules/organize/metaSysDeptManagement-add-or-update.vue b/src/views/modules/organize/metaSysDeptManagement-add-or-update.vue index 981b7384..f63ecff1 100644 --- a/src/views/modules/organize/metaSysDeptManagement-add-or-update.vue +++ b/src/views/modules/organize/metaSysDeptManagement-add-or-update.vue @@ -66,6 +66,14 @@ :min="0" :label="$t('dept.sort')" style="width: 75%"> + + + - + - - @@ -62,8 +52,7 @@ export default { data () { return { mixinViewModuleOptions: { - getDataListURL: '/cloudAnalysis/metasysdept/page', - getDataListIsPage: true, + getDataListURL: '/cloudAnalysis/metasysdept/list', deleteURL: '/cloudAnalysis/metasysdept', deleteIsBatch: true }, @@ -76,16 +65,8 @@ export default { } }, mounted () { - 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() }, - created: function () { - }, components: { TableTreeColumn, AddOrUpdate @@ -93,35 +74,7 @@ export default { methods: { manageHandle (deptId, pid) { this.$parent.selectComponent = 'Deptofficer' - this.$router.push({ path: '/organize-organizedeptroute', query: { pidList: JSON.stringify(this.pidList), deptId: deptId } }) - }, - lookHandle (id, pid) { - this.page = 1 - this.pidList.push(id) - this.$parent.selectComponent = 'Metasysdept' - 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.page = 1 - var m = this.pidList.splice(this.pidList.length - 1, 1) - m.pop() - this.$emit('refreshDataList') - this.$parent.selectComponent = 'Metasysdept' - 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() + this.$router.push({ path: '/organize-organizedeptroute', query: { deptId: deptId } }) } } } diff --git a/src/views/modules/organize/sysdeptmanagement.vue b/src/views/modules/organize/sysdeptmanagement.vue index 2fcbeff6..63a567f4 100644 --- a/src/views/modules/organize/sysdeptmanagement.vue +++ b/src/views/modules/organize/sysdeptmanagement.vue @@ -48,7 +48,7 @@ export default { TableTreeColumn, AddOrUpdate }, - methods : { + methods: { active_text (value, row) { this.$http.put(`/cloudAnalysis/metaSysdeptManager`, row).then(({ data: res }) => { if (res.code !== 0) { From a2cf2446c833a914949af5ab9599251255f16f5b Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Fri, 6 Mar 2020 22:10:07 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9E=B6=E6=9E=84=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E5=90=8C=E6=AD=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/organize/sysdeptmanagement.vue | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/views/modules/organize/sysdeptmanagement.vue b/src/views/modules/organize/sysdeptmanagement.vue index 63a567f4..8e9957ed 100644 --- a/src/views/modules/organize/sysdeptmanagement.vue +++ b/src/views/modules/organize/sysdeptmanagement.vue @@ -8,6 +8,9 @@ {{ $t('query') }} + + 同步 + @@ -56,6 +59,27 @@ export default { } this.options = res.data.options }).catch(() => {}) + }, + deptUpdate () { + this.$confirm(this.$t('prompt.info', { 'handle': this.$t('update') }), this.$t('prompt.title'), { + confirmButtonText: this.$t('confirm'), + cancelButtonText: this.$t('cancel'), + type: 'warning' + }).then(() => { + this.$http.get(`/cloudAnalysis/metaSysdeptManager/deptUpdate`).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.getDataList() + } + }) + }).catch(() => { }) + }).catch(() => { }) } } } From f0098df4ad8bf0e6f2620a858ba9e9c6556f8695 Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Sat, 7 Mar 2020 11:29:47 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E6=9E=B6=E6=9E=84=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=97=20=E6=B7=BB=E5=8A=A0=E5=BA=8F=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/organize/sysdeptmanagement.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/modules/organize/sysdeptmanagement.vue b/src/views/modules/organize/sysdeptmanagement.vue index 8e9957ed..01016084 100644 --- a/src/views/modules/organize/sysdeptmanagement.vue +++ b/src/views/modules/organize/sysdeptmanagement.vue @@ -13,6 +13,11 @@ + + +