Commit ee7ccad3f9abe74c62c6d1c62efa4317cb62a3ce
1 parent
9e2379c0
v1.9 优化数据权限界面间距比较大问题
Showing
7 changed files
with
84 additions
and
105 deletions
src/api/staff/staffCommunityApi.js
| @@ -27,7 +27,6 @@ export function listStaffCommunity(params) { | @@ -27,7 +27,6 @@ export function listStaffCommunity(params) { | ||
| 27 | method: 'get', | 27 | method: 'get', |
| 28 | params: { | 28 | params: { |
| 29 | ...params, | 29 | ...params, |
| 30 | - communityId: getCommunityId() | ||
| 31 | } | 30 | } |
| 32 | }).then(response => { | 31 | }).then(response => { |
| 33 | resolve(response.data) | 32 | resolve(response.data) |
src/components/org/dataPrivilegeStaff.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="data-privilege-staff"> | 2 | <div class="data-privilege-staff"> |
| 3 | 3 | ||
| 4 | - <el-form :inline="true" :model="searchForm"> | ||
| 5 | - <el-form-item :label="$t('dataPrivilege.staffName')"> | 4 | + <el-form :inline="true" :model="searchForm" class="text-right"> |
| 5 | + <el-form-item > | ||
| 6 | <el-input v-model="searchForm.staffName" :placeholder="$t('dataPrivilege.inputStaffName')" clearable> | 6 | <el-input v-model="searchForm.staffName" :placeholder="$t('dataPrivilege.inputStaffName')" clearable> |
| 7 | </el-input> | 7 | </el-input> |
| 8 | </el-form-item> | 8 | </el-form-item> |
| 9 | - <el-form-item :label="$t('dataPrivilege.phone')"> | 9 | + <el-form-item > |
| 10 | <el-input v-model="searchForm.tel" :placeholder="$t('dataPrivilege.inputPhone')" clearable> | 10 | <el-input v-model="searchForm.tel" :placeholder="$t('dataPrivilege.inputPhone')" clearable> |
| 11 | </el-input> | 11 | </el-input> |
| 12 | </el-form-item> | 12 | </el-form-item> |
| @@ -132,7 +132,7 @@ export default { | @@ -132,7 +132,7 @@ export default { | ||
| 132 | this.$refs.deleteDataPrivilegeStaff.open(row) | 132 | this.$refs.deleteDataPrivilegeStaff.open(row) |
| 133 | }, | 133 | }, |
| 134 | handleDetail(row) { | 134 | handleDetail(row) { |
| 135 | - this.$router.push(`/staff/detail/${row.staffId}`) | 135 | + this.$router.push(`/views/staff/staffDetail?staffId=${row.staffId}`) |
| 136 | }, | 136 | }, |
| 137 | handleSizeChange(val) { | 137 | handleSizeChange(val) { |
| 138 | this.pagination.size = val | 138 | this.pagination.size = val |
| @@ -150,6 +150,7 @@ export default { | @@ -150,6 +150,7 @@ export default { | ||
| 150 | <style scoped> | 150 | <style scoped> |
| 151 | .data-privilege-staff { | 151 | .data-privilege-staff { |
| 152 | padding: 20px; | 152 | padding: 20px; |
| 153 | + padding-top:10px; | ||
| 153 | } | 154 | } |
| 154 | 155 | ||
| 155 | .search-card { | 156 | .search-card { |
src/components/org/dataPrivilegeUnit.vue
src/components/role/AddPrivilegeGroup.vue
| 1 | <template> | 1 | <template> |
| 2 | - <el-dialog :title="isEdit ? $t('role.editRole') : $t('role.addRole')" :visible.sync="visible" width="50%" | 2 | + <el-dialog :title="isEdit ? $t('role.editRole') : $t('role.addRole')" :visible.sync="visible" width="40%" |
| 3 | @close="resetForm"> | 3 | @close="resetForm"> |
| 4 | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | 4 | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| 5 | <el-alert v-if="errorInfo" :title="errorInfo" type="error" show-icon /> | 5 | <el-alert v-if="errorInfo" :title="errorInfo" type="error" show-icon /> |
| 6 | 6 | ||
| 7 | <el-form-item :label="$t('role.name')" prop="name"> | 7 | <el-form-item :label="$t('role.name')" prop="name"> |
| 8 | - <el-input v-model="form.name" :placeholder="$t('role.nameRequired')" /> | 8 | + <el-input v-model="form.name" :placeholder="$t('role.requiredName')" /> |
| 9 | </el-form-item> | 9 | </el-form-item> |
| 10 | 10 | ||
| 11 | <el-form-item :label="$t('role.description')" prop="description"> | 11 | <el-form-item :label="$t('role.description')" prop="description"> |
| 12 | - <el-input v-model="form.description" type="textarea" :placeholder="$t('role.descLength')" :rows="4" /> | 12 | + <el-input v-model="form.description" type="textarea" :placeholder="$t('role.descriptionLength')" :rows="4" /> |
| 13 | </el-form-item> | 13 | </el-form-item> |
| 14 | </el-form> | 14 | </el-form> |
| 15 | 15 | ||
| @@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
| 19 | </div> | 19 | </div> |
| 20 | </el-dialog> | 20 | </el-dialog> |
| 21 | </template> | 21 | </template> |
| 22 | - | 22 | + |
| 23 | <script> | 23 | <script> |
| 24 | import { savePrivilegeGroup, updatePrivilegeGroup } from '@/api/role/roleApi' | 24 | import { savePrivilegeGroup, updatePrivilegeGroup } from '@/api/role/roleApi' |
| 25 | 25 | ||
| @@ -86,7 +86,7 @@ export default { | @@ -86,7 +86,7 @@ export default { | ||
| 86 | 86 | ||
| 87 | } | 87 | } |
| 88 | </script> | 88 | </script> |
| 89 | - | 89 | + |
| 90 | <style lang="scss" scoped> | 90 | <style lang="scss" scoped> |
| 91 | .el-alert { | 91 | .el-alert { |
| 92 | margin-bottom: 20px; | 92 | margin-bottom: 20px; |
src/components/role/EditPrivilegeGroup.vue
| 1 | <template> | 1 | <template> |
| 2 | - <el-dialog | ||
| 3 | - :title="$t('role.edit')" | ||
| 4 | - :visible.sync="visible" | ||
| 5 | - width="50%" | ||
| 6 | - @close="resetForm" | ||
| 7 | - > | ||
| 8 | - <el-form | ||
| 9 | - ref="form" | ||
| 10 | - :model="form" | ||
| 11 | - :rules="rules" | ||
| 12 | - label-width="120px" | ||
| 13 | - > | ||
| 14 | - <el-form-item | ||
| 15 | - :label="$t('role.name')" | ||
| 16 | - prop="name" | ||
| 17 | - > | ||
| 18 | - <el-input | ||
| 19 | - v-model="form.name" | ||
| 20 | - :placeholder="$t('role.requiredName')" | ||
| 21 | - /> | ||
| 22 | - </el-form-item> | ||
| 23 | - | ||
| 24 | - <el-form-item | ||
| 25 | - :label="$t('role.description')" | ||
| 26 | - prop="description" | ||
| 27 | - > | ||
| 28 | - <el-input | ||
| 29 | - v-model="form.description" | ||
| 30 | - type="textarea" | ||
| 31 | - :placeholder="$t('role.descriptionLength')" | ||
| 32 | - /> | ||
| 33 | - </el-form-item> | ||
| 34 | - </el-form> | ||
| 35 | - | ||
| 36 | - <span slot="footer" class="dialog-footer"> | ||
| 37 | - <el-button @click="visible = false">{{ $t('role.cancel') }}</el-button> | ||
| 38 | - <el-button type="primary" @click="submitForm">{{ $t('role.save') }}</el-button> | ||
| 39 | - </span> | ||
| 40 | - </el-dialog> | ||
| 41 | - </template> | ||
| 42 | - | ||
| 43 | - <script> | ||
| 44 | - import { updatePrivilegeGroup } from '@/api/role/roleApi' | ||
| 45 | - | ||
| 46 | - export default { | ||
| 47 | - name: 'EditPrivilegeGroup', | ||
| 48 | - data() { | ||
| 49 | - return { | ||
| 50 | - visible: false, | ||
| 51 | - form: { | ||
| 52 | - pgId: '', | ||
| 53 | - name: '', | ||
| 54 | - description: '' | ||
| 55 | - }, | ||
| 56 | - rules: { | ||
| 57 | - name: [ | ||
| 58 | - { required: true, message: this.$t('role.requiredName'), trigger: 'blur' }, | ||
| 59 | - { min: 2, max: 10, message: this.$t('role.nameLength'), trigger: 'blur' } | ||
| 60 | - ], | ||
| 61 | - description: [ | ||
| 62 | - { max: 200, message: this.$t('role.descriptionLength'), trigger: 'blur' } | ||
| 63 | - ] | ||
| 64 | - } | 2 | + <el-dialog :title="$t('role.edit')" :visible.sync="visible" width="40%" @close="resetForm"> |
| 3 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | ||
| 4 | + <el-form-item :label="$t('role.name')" prop="name"> | ||
| 5 | + <el-input v-model="form.name" :placeholder="$t('role.requiredName')" /> | ||
| 6 | + </el-form-item> | ||
| 7 | + | ||
| 8 | + <el-form-item :label="$t('role.description')" prop="description"> | ||
| 9 | + <el-input v-model="form.description" type="textarea" :placeholder="$t('role.descriptionLength')" /> | ||
| 10 | + </el-form-item> | ||
| 11 | + </el-form> | ||
| 12 | + | ||
| 13 | + <span slot="footer" class="dialog-footer"> | ||
| 14 | + <el-button @click="visible = false">{{ $t('role.cancel') }}</el-button> | ||
| 15 | + <el-button type="primary" @click="submitForm">{{ $t('role.save') }}</el-button> | ||
| 16 | + </span> | ||
| 17 | + </el-dialog> | ||
| 18 | +</template> | ||
| 19 | + | ||
| 20 | +<script> | ||
| 21 | +import { updatePrivilegeGroup } from '@/api/role/roleApi' | ||
| 22 | + | ||
| 23 | +export default { | ||
| 24 | + name: 'EditPrivilegeGroup', | ||
| 25 | + data() { | ||
| 26 | + return { | ||
| 27 | + visible: false, | ||
| 28 | + form: { | ||
| 29 | + pgId: '', | ||
| 30 | + name: '', | ||
| 31 | + description: '' | ||
| 32 | + }, | ||
| 33 | + rules: { | ||
| 34 | + name: [ | ||
| 35 | + { required: true, message: this.$t('role.requiredName'), trigger: 'blur' }, | ||
| 36 | + { min: 2, max: 10, message: this.$t('role.nameLength'), trigger: 'blur' } | ||
| 37 | + ], | ||
| 38 | + description: [ | ||
| 39 | + { max: 200, message: this.$t('role.descriptionLength'), trigger: 'blur' } | ||
| 40 | + ] | ||
| 65 | } | 41 | } |
| 42 | + } | ||
| 43 | + }, | ||
| 44 | + methods: { | ||
| 45 | + show(role) { | ||
| 46 | + this.form = { | ||
| 47 | + pgId: role.pgId, | ||
| 48 | + name: role.name, | ||
| 49 | + description: role.description | ||
| 50 | + } | ||
| 51 | + this.visible = true | ||
| 66 | }, | 52 | }, |
| 67 | - methods: { | ||
| 68 | - show(role) { | ||
| 69 | - this.form = { | ||
| 70 | - pgId: role.pgId, | ||
| 71 | - name: role.name, | ||
| 72 | - description: role.description | ||
| 73 | - } | ||
| 74 | - this.visible = true | ||
| 75 | - }, | ||
| 76 | - submitForm() { | ||
| 77 | - this.$refs.form.validate(async valid => { | ||
| 78 | - if (valid) { | ||
| 79 | - try { | ||
| 80 | - await updatePrivilegeGroup(this.form) | ||
| 81 | - this.$message.success(this.$t('role.updateSuccess')) | ||
| 82 | - this.$emit('success') | ||
| 83 | - this.visible = false | ||
| 84 | - } catch (error) { | ||
| 85 | - this.$message.error(error.message) | ||
| 86 | - } | 53 | + submitForm() { |
| 54 | + this.$refs.form.validate(async valid => { | ||
| 55 | + if (valid) { | ||
| 56 | + try { | ||
| 57 | + await updatePrivilegeGroup(this.form) | ||
| 58 | + this.$message.success(this.$t('role.updateSuccess')) | ||
| 59 | + this.$emit('success') | ||
| 60 | + this.visible = false | ||
| 61 | + } catch (error) { | ||
| 62 | + this.$message.error(error.message) | ||
| 87 | } | 63 | } |
| 88 | - }) | ||
| 89 | - }, | ||
| 90 | - resetForm() { | ||
| 91 | - this.$refs.form.resetFields() | ||
| 92 | - } | 64 | + } |
| 65 | + }) | ||
| 66 | + }, | ||
| 67 | + resetForm() { | ||
| 68 | + this.$refs.form.resetFields() | ||
| 93 | } | 69 | } |
| 94 | } | 70 | } |
| 95 | - </script> | ||
| 96 | \ No newline at end of file | 71 | \ No newline at end of file |
| 72 | +} | ||
| 73 | +</script> | ||
| 97 | \ No newline at end of file | 74 | \ No newline at end of file |
src/views/org/dataPrivilegeManageList.vue
| 1 | <template> | 1 | <template> |
| 2 | - <div class="data-privilege-container"> | 2 | + <div class="data-privilege-container padding"> |
| 3 | <el-row class="data-privilege-wrapper"> | 3 | <el-row class="data-privilege-wrapper"> |
| 4 | <el-col :span="4" class="left-panel"> | 4 | <el-col :span="4" class="left-panel"> |
| 5 | <data-privilege-div ref="dataPrivilegeDiv" @switch-data-privilege="handleSwitchDataPrivilege" /> | 5 | <data-privilege-div ref="dataPrivilegeDiv" @switch-data-privilege="handleSwitchDataPrivilege" /> |
| @@ -7,8 +7,8 @@ | @@ -7,8 +7,8 @@ | ||
| 7 | <el-col :span="20" class="right-panel"> | 7 | <el-col :span="20" class="right-panel"> |
| 8 | <el-card class="box-card"> | 8 | <el-card class="box-card"> |
| 9 | <div slot="header" class="text-left"> | 9 | <div slot="header" class="text-left"> |
| 10 | - <h5>{{ $t('dataPrivilege.title') }}: {{ currentDataPrivilege.name }}</h5> | ||
| 11 | - <p>{{ currentDataPrivilege.description }}</p> | 10 | + <span>{{ $t('dataPrivilege.title') }}: {{ currentDataPrivilege.name }}</span> |
| 11 | + <div>{{ currentDataPrivilege.description }}</div> | ||
| 12 | </div> | 12 | </div> |
| 13 | <div class="tab-wrapper"> | 13 | <div class="tab-wrapper"> |
| 14 | <el-tabs v-model="activeTab" @tab-click="handleTabClick(activeTab)"> | 14 | <el-tabs v-model="activeTab" @tab-click="handleTabClick(activeTab)"> |
| @@ -83,8 +83,7 @@ export default { | @@ -83,8 +83,7 @@ export default { | ||
| 83 | 83 | ||
| 84 | <style lang="scss" scoped> | 84 | <style lang="scss" scoped> |
| 85 | .data-privilege-container { | 85 | .data-privilege-container { |
| 86 | - padding: 0; | ||
| 87 | - margin: 0; | 86 | + |
| 88 | height: 100%; | 87 | height: 100%; |
| 89 | 88 | ||
| 90 | .data-privilege-wrapper { | 89 | .data-privilege-wrapper { |
src/views/user/login/Login.vue
| @@ -66,7 +66,9 @@ export default { | @@ -66,7 +66,9 @@ export default { | ||
| 66 | created() { | 66 | created() { |
| 67 | localStorage.clear(); | 67 | localStorage.clear(); |
| 68 | this.getSystemInfo() | 68 | this.getSystemInfo() |
| 69 | - this.refreshCaptcha(); | 69 | + setTimeout(() => { |
| 70 | + this.refreshCaptcha(); | ||
| 71 | + }, 1000); | ||
| 70 | 72 | ||
| 71 | }, | 73 | }, |
| 72 | components: { | 74 | components: { |