From 3068d45ceaa6ea16ec1915d63555bbf2f5a62e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Fri, 9 Jul 2021 12:43:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E9=A1=B5=E9=9D=A2=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/table.vue | 26 ++++++--- src/components/table/wraper.vue | 6 +- src/pages/frame/view/login/Login.vue | 16 ++++- .../xunjian/task_managment/center/index.vue | 26 +++++++-- .../task_managment/center/progress.vue | 58 +++++++++++++++++++ src/utils/requestUtil.js | 14 ++--- 6 files changed, 121 insertions(+), 25 deletions(-) create mode 100644 src/pages/xunjian/task_managment/center/progress.vue diff --git a/src/components/table/table.vue b/src/components/table/table.vue index b61d4b2..c20272e 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -15,7 +15,7 @@ - + {{ newBtn.text || '新增' }} @@ -42,17 +42,18 @@ - + @@ -60,6 +61,8 @@ diff --git a/src/components/table/wraper.vue b/src/components/table/wraper.vue index efdb986..c0edf4a 100644 --- a/src/components/table/wraper.vue +++ b/src/components/table/wraper.vue @@ -9,7 +9,7 @@ 取消 - + 确认 @@ -35,6 +35,10 @@ export default { type: Function, default: EMPTY_FUN, }, + noFooter: { + type: Boolean, + default: false, + }, }, data: () => ({ loading: false, diff --git a/src/pages/frame/view/login/Login.vue b/src/pages/frame/view/login/Login.vue index b7c1b93..8a106e8 100644 --- a/src/pages/frame/view/login/Login.vue +++ b/src/pages/frame/view/login/Login.vue @@ -89,11 +89,23 @@ export default { checked: true, logging: false, form: this.$form.createForm(this), + back: null, }; }, created() { clearToken(); }, + + beforeRouteEnter(to, from, next) { + const { + query: { back }, + } = to; + const { fullPath } = from; + next((vm) => { + if (back) vm.back = fullPath; + }); + }, + computed: { applicationName() { return this.$store.state.settingModule.systemName; @@ -102,7 +114,7 @@ export default { methods: { onSubmit(e) { e.preventDefault(); - this.form.validateFields(async err => { + this.form.validateFields(async (err) => { if (!err) { this.logging = true; const userName = this.form.getFieldValue('userName'); @@ -113,7 +125,7 @@ export default { setToken(token); setUserId(userId); await setUserInfoByRequest(); - this.$router.replace('/'); + this.$router.replace(this.back ? this.back : '/'); } catch (error) { // todo } diff --git a/src/pages/xunjian/task_managment/center/index.vue b/src/pages/xunjian/task_managment/center/index.vue index 7cd9668..ae7f348 100644 --- a/src/pages/xunjian/task_managment/center/index.vue +++ b/src/pages/xunjian/task_managment/center/index.vue @@ -5,8 +5,10 @@ rowKey="jobId" :addBtn="addBtn" :selected.sync="selected" + ref="table" + :drawerWidth="800" > -