From 2d5d518dfb73f3ca307d8c6c22553180957b719e Mon Sep 17 00:00:00 2001 From: zhangjun1 Date: Tue, 9 Jun 2020 18:24:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization-list/organization-card.vue | 4 +++- src/pages/authority/organizationedit.vue | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/components/organization-list/organization-card.vue b/src/components/organization-list/organization-card.vue index ef8b1ca..5aaaeac 100644 --- a/src/components/organization-list/organization-card.vue +++ b/src/components/organization-list/organization-card.vue @@ -53,12 +53,14 @@ export default { default: 0, }, }, + created(){ + }, methods: { deleteAction() { this.$emit("delete-action", this.data); }, intoDetail() { - this.$router.push(`${this.detailsUrl}${this.data.id}`); + this.$router.push(`${this.detailsUrl}${this.data.department_id}`); }, }, }; diff --git a/src/pages/authority/organizationedit.vue b/src/pages/authority/organizationedit.vue index af7b069..f0c86eb 100644 --- a/src/pages/authority/organizationedit.vue +++ b/src/pages/authority/organizationedit.vue @@ -155,6 +155,7 @@ export default { console.log(this.$route); if(this.$route.path.indexOf('add')!==-1){ this.edit_flag = 0 + this.get_now_user() } if(this.$route.path.indexOf('edit')!==-1){ this.edit_flag = 1 @@ -165,6 +166,21 @@ export default { this.get_user() } }, + get_now_user(){ + this.$http + .get(`/apaas/backmgt/user/getCurrentUser`) + .then(response => { + console.log(response); + let data = response.data.data + this.form={ + person:data.user_name, + date:data.create_date.replace('T',' ').replace('Z',' '), + } + }) + .catch((response)=> { + + }); + }, get_user(){ this.$http .get(`/apaas/backmgt/department/detail?department_id=${this.$route.params.id}`) -- 2.26.0