1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

correcting design errors in the Record Access dialog box (#797)

* correcting design errors in the Record Access dialog box

* minimal changes

Co-authored-by: elsiosanchez <elsiosanche@gmail.com>
This commit is contained in:
Elsio Sanchez 2021-05-03 09:03:51 -04:00 committed by GitHub
parent 06d969cbb8
commit 1c5f4b7e00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 15 deletions

View File

@ -17,7 +17,6 @@
--> -->
<template> <template>
<el-dialog <el-dialog
:title="attributeEmbedded.name"
:visible="isVisibleDialog" :visible="isVisibleDialog"
show-close show-close
:before-close="closeDialog" :before-close="closeDialog"
@ -26,6 +25,14 @@
close-on-press-escape close-on-press-escape
close-on-click-modal close-on-click-modal
> >
<span slot="title">
{{ attributeEmbedded.name }}
<el-tooltip :content="lock ? $t('data.lockRecord') : $t('data.unlockRecord')" placement="top">
<el-button type="text" @click="lock = !lock">
<i :class="lock ? 'el-icon-unlock' : 'el-icon-lock'" style="font-size: 25px;color: black;" />
</el-button>
</el-tooltip>
</span>
<slot /> <slot />
</el-dialog> </el-dialog>
</template> </template>
@ -60,6 +67,11 @@ export default {
default: undefined default: undefined
} }
}, },
data() {
return {
lock: false
}
},
computed: { computed: {
isMobile() { isMobile() {
return this.$store.state.app.device === 'mobile' return this.$store.state.app.device === 'mobile'
@ -201,7 +213,12 @@ export default {
<style> <style>
.el-dialog__body { .el-dialog__body {
padding: 10px 20px; padding: 10px 20px;
max-height: 65vh; max-height: 75vh;
overflow: auto; overflow: auto;
} }
.el-dialog__header {
padding: 20px;
padding-bottom: 10px;
background: #dae6f38c;
}
</style> </style>

View File

@ -105,7 +105,7 @@ export default {
if (this.isMobile) { if (this.isMobile) {
return 80 return 80
} }
return 80 return 95
}, },
isVisibleDialog() { isVisibleDialog() {
return this.$store.state['process/index'].isVisibleDialog return this.$store.state['process/index'].isVisibleDialog

View File

@ -76,29 +76,25 @@
v-for="(element, index) in includedList" v-for="(element, index) in includedList"
:key="element.roleUuid" :key="element.roleUuid"
class="board-item" class="board-item"
style="height: 50%;padding-left: 0px;padding-right: 0px;" style="height: 50%;padding-left: 0px;padding-right: 0px;min-width: 550px;max-width: 100%;"
> >
<el-table <el-table
v-if="!isEmptyValue(includedList)" v-if="!isEmptyValue(includedList)"
:data="[includedList[index]]" :data="[includedList[index]]"
border border
:show-header="false" :show-header="false"
style="min-width: 120%;padding-left: 0%;padding-right: 0%;"
> >
<el-table-column <el-table-column
prop="roleName" prop="roleName"
min-width="150"
/> />
<el-table-column <el-table-column>
fixed="right"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ $t('data.recordAccess.isReadonly') }} <el-switch v-model="scope.row.isReadOnly" /> {{ $t('data.recordAccess.isReadonly') }} <el-switch v-model="scope.row.isReadOnly" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column>
fixed="right" <template slot-scope="scope" min-width="150">
>
<template slot-scope="scope">
{{ $t('data.recordAccess.isDependentEntities') }} <el-switch v-model="scope.row.isDependentEntities" /> {{ $t('data.recordAccess.isDependentEntities') }} <el-switch v-model="scope.row.isDependentEntities" />
</template> </template>
</el-table-column> </el-table-column>
@ -143,7 +139,6 @@ export default {
overflow: hidden; overflow: hidden;
background: #f0f0f0; background: #f0f0f0;
border-radius: 3px; border-radius: 3px;
.board-column-header { .board-column-header {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
@ -154,7 +149,6 @@ export default {
color: #fff; color: #fff;
border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0;
} }
.board-column-content { .board-column-content {
height: auto; height: auto;
overflow: hidden; overflow: hidden;
@ -164,7 +158,6 @@ export default {
justify-content: flex-start; justify-content: flex-start;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.board-item { .board-item {
cursor: pointer; cursor: pointer;
width: 100%; width: 100%;