diff --git a/src/components/table/table.vue b/src/components/table/table.vue index b61d4b22e30ec109d3726d3795b09c5e1a0e993d..c20272ea9e84433e9d18f598ab75c9eb3add839c 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 efdb986a0c8bfe3b20f99d400244be9e341d2d69..c0edf4a8ab6ea9b18394cad95adc6f25b8b766d0 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 b7c1b93a34d7905caac7783e3cefc3acca8d9e46..8a106e8caf70637ec8e94d3b1b9f350f8519930b 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 7cd96688ddcd50aa18e98e9438fe756e0fca6c4a..ae7f348f112383a7987921bc7d0d85cba8883660 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" > -