From e32be3b5a59a76ceab55629f03a50c33f2cc2c27 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 28 Apr 2021 17:09:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/back-button/index.vue | 46 +++ .../src/components/business/LayoutContent.vue | 42 ++- frontend/src/styles/common/mixins.scss | 19 +- frontend/src/styles/mixin.scss | 6 + frontend/src/views/system/user/form.vue | 262 ++++++++++++++++++ frontend/src/views/system/user/index.vue | 37 +-- 6 files changed, 386 insertions(+), 26 deletions(-) create mode 100644 frontend/src/components/back-button/index.vue create mode 100644 frontend/src/views/system/user/form.vue diff --git a/frontend/src/components/back-button/index.vue b/frontend/src/components/back-button/index.vue new file mode 100644 index 0000000000..6d72ad6009 --- /dev/null +++ b/frontend/src/components/back-button/index.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/frontend/src/components/business/LayoutContent.vue b/frontend/src/components/business/LayoutContent.vue index daabdb6ee3..b1365a2d95 100644 --- a/frontend/src/components/business/LayoutContent.vue +++ b/frontend/src/components/business/LayoutContent.vue @@ -1,17 +1,45 @@ diff --git a/frontend/src/styles/common/mixins.scss b/frontend/src/styles/common/mixins.scss index 13c38117a0..91ed5a95f8 100644 --- a/frontend/src/styles/common/mixins.scss +++ b/frontend/src/styles/common/mixins.scss @@ -1,9 +1,16 @@ @mixin flex-row($justify: flex-start, $align: stretch) { - display: flex; - @if $justify != flex-start { - justify-content: $justify; + display: flex; + @if $justify != flex-start { + justify-content: $justify; + } + @if $align != stretch { + align-items: $align; + } } - @if $align != stretch { - align-items: $align; + + @mixin variant($color, $background-color, $border-color) { + color: $color; + background-color: $background-color; + border-color: $border-color; } -} + \ No newline at end of file diff --git a/frontend/src/styles/mixin.scss b/frontend/src/styles/mixin.scss index f6e60a40ff..a02e67210f 100644 --- a/frontend/src/styles/mixin.scss +++ b/frontend/src/styles/mixin.scss @@ -36,4 +36,10 @@ align-items: $align; } } + +@mixin variant($color, $background-color, $border-color) { + color: $color; + background-color: $background-color; + border-color: $border-color; + } diff --git a/frontend/src/views/system/user/form.vue b/frontend/src/views/system/user/form.vue new file mode 100644 index 0000000000..520684236f --- /dev/null +++ b/frontend/src/views/system/user/form.vue @@ -0,0 +1,262 @@ + + + diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue index ce174d998b..76fd8e07e9 100644 --- a/frontend/src/views/system/user/index.vue +++ b/frontend/src/views/system/user/index.vue @@ -13,7 +13,6 @@ - @@ -108,7 +107,6 @@ - import LayoutContent from '@/components/business/LayoutContent' import ComplexTable from '@/components/business/complex-table' -// import conditionTable from '@/components/business/condition-table' -// import CustomCondition from './CustomCondtion' -// import { GridButton } from '@/components/GridButton' + import { checkPermission } from '@/utils/permission' import { formatCondition } from '@/utils/index' import { PHONE_REGEX } from '@/utils/validate' @@ -305,23 +301,28 @@ export default { this.paginationConfig.total = response.data.itemCount }) }, - create() { - this.depts = null - this.formType = 'add' - this.form = Object.assign({}, this.defaultForm) - this.dialogVisible = true + this.$router.push({ name: '用户表单' }) }, + // create() { + // this.depts = null + // this.formType = 'add' + // this.form = Object.assign({}, this.defaultForm) + // this.dialogVisible = true + // }, edit(row) { - this.depts = null - this.formType = 'modify' - this.dialogVisible = true - this.form = Object.assign({}, row) - if (this.form.deptId === 0) { - this.form.deptId = null - } - this.initDeptTree() + this.$router.push({ name: '用户表单', params: row }) }, + // edit(row) { + // this.depts = null + // this.formType = 'modify' + // this.dialogVisible = true + // this.form = Object.assign({}, row) + // if (this.form.deptId === 0) { + // this.form.deptId = null + // } + // this.initDeptTree() + // }, editPassword(row) { this.editPasswordVisible = true const tempForm = Object.assign({}, row)