mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
v1.9 优化数据权限界面间距比较大问题
This commit is contained in:
parent
9e2379c0fe
commit
ee7ccad3f9
@ -27,7 +27,6 @@ export function listStaffCommunity(params) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
communityId: getCommunityId()
|
|
||||||
}
|
}
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
resolve(response.data)
|
resolve(response.data)
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="data-privilege-staff">
|
<div class="data-privilege-staff">
|
||||||
|
|
||||||
<el-form :inline="true" :model="searchForm">
|
<el-form :inline="true" :model="searchForm" class="text-right">
|
||||||
<el-form-item :label="$t('dataPrivilege.staffName')">
|
<el-form-item >
|
||||||
<el-input v-model="searchForm.staffName" :placeholder="$t('dataPrivilege.inputStaffName')" clearable>
|
<el-input v-model="searchForm.staffName" :placeholder="$t('dataPrivilege.inputStaffName')" clearable>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('dataPrivilege.phone')">
|
<el-form-item >
|
||||||
<el-input v-model="searchForm.tel" :placeholder="$t('dataPrivilege.inputPhone')" clearable>
|
<el-input v-model="searchForm.tel" :placeholder="$t('dataPrivilege.inputPhone')" clearable>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -132,7 +132,7 @@ export default {
|
|||||||
this.$refs.deleteDataPrivilegeStaff.open(row)
|
this.$refs.deleteDataPrivilegeStaff.open(row)
|
||||||
},
|
},
|
||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
this.$router.push(`/staff/detail/${row.staffId}`)
|
this.$router.push(`/views/staff/staffDetail?staffId=${row.staffId}`)
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pagination.size = val
|
this.pagination.size = val
|
||||||
@ -150,6 +150,7 @@ export default {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.data-privilege-staff {
|
.data-privilege-staff {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
padding-top:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-card {
|
.search-card {
|
||||||
|
|||||||
@ -99,6 +99,7 @@ export default {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.data-privilege-unit {
|
.data-privilege-unit {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-bar {
|
.action-bar {
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="isEdit ? $t('role.editRole') : $t('role.addRole')" :visible.sync="visible" width="50%"
|
<el-dialog :title="isEdit ? $t('role.editRole') : $t('role.addRole')" :visible.sync="visible" width="40%"
|
||||||
@close="resetForm">
|
@close="resetForm">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-alert v-if="errorInfo" :title="errorInfo" type="error" show-icon />
|
<el-alert v-if="errorInfo" :title="errorInfo" type="error" show-icon />
|
||||||
|
|
||||||
<el-form-item :label="$t('role.name')" prop="name">
|
<el-form-item :label="$t('role.name')" prop="name">
|
||||||
<el-input v-model="form.name" :placeholder="$t('role.nameRequired')" />
|
<el-input v-model="form.name" :placeholder="$t('role.requiredName')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('role.description')" prop="description">
|
<el-form-item :label="$t('role.description')" prop="description">
|
||||||
<el-input v-model="form.description" type="textarea" :placeholder="$t('role.descLength')" :rows="4" />
|
<el-input v-model="form.description" type="textarea" :placeholder="$t('role.descriptionLength')" :rows="4" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { savePrivilegeGroup, updatePrivilegeGroup } from '@/api/role/roleApi'
|
import { savePrivilegeGroup, updatePrivilegeGroup } from '@/api/role/roleApi'
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.el-alert {
|
.el-alert {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|||||||
@ -1,95 +1,72 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="$t('role.edit')" :visible.sync="visible" width="40%" @close="resetForm">
|
||||||
:title="$t('role.edit')"
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
:visible.sync="visible"
|
<el-form-item :label="$t('role.name')" prop="name">
|
||||||
width="50%"
|
<el-input v-model="form.name" :placeholder="$t('role.requiredName')" />
|
||||||
@close="resetForm"
|
</el-form-item>
|
||||||
>
|
|
||||||
<el-form
|
<el-form-item :label="$t('role.description')" prop="description">
|
||||||
ref="form"
|
<el-input v-model="form.description" type="textarea" :placeholder="$t('role.descriptionLength')" />
|
||||||
:model="form"
|
</el-form-item>
|
||||||
:rules="rules"
|
</el-form>
|
||||||
label-width="120px"
|
|
||||||
>
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-form-item
|
<el-button @click="visible = false">{{ $t('role.cancel') }}</el-button>
|
||||||
:label="$t('role.name')"
|
<el-button type="primary" @click="submitForm">{{ $t('role.save') }}</el-button>
|
||||||
prop="name"
|
</span>
|
||||||
>
|
</el-dialog>
|
||||||
<el-input
|
</template>
|
||||||
v-model="form.name"
|
|
||||||
:placeholder="$t('role.requiredName')"
|
<script>
|
||||||
/>
|
import { updatePrivilegeGroup } from '@/api/role/roleApi'
|
||||||
</el-form-item>
|
|
||||||
|
export default {
|
||||||
<el-form-item
|
name: 'EditPrivilegeGroup',
|
||||||
:label="$t('role.description')"
|
data() {
|
||||||
prop="description"
|
return {
|
||||||
>
|
visible: false,
|
||||||
<el-input
|
form: {
|
||||||
v-model="form.description"
|
pgId: '',
|
||||||
type="textarea"
|
name: '',
|
||||||
:placeholder="$t('role.descriptionLength')"
|
description: ''
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="visible = false">{{ $t('role.cancel') }}</el-button>
|
|
||||||
<el-button type="primary" @click="submitForm">{{ $t('role.save') }}</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { updatePrivilegeGroup } from '@/api/role/roleApi'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'EditPrivilegeGroup',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
visible: false,
|
|
||||||
form: {
|
|
||||||
pgId: '',
|
|
||||||
name: '',
|
|
||||||
description: ''
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: [
|
|
||||||
{ required: true, message: this.$t('role.requiredName'), trigger: 'blur' },
|
|
||||||
{ min: 2, max: 10, message: this.$t('role.nameLength'), trigger: 'blur' }
|
|
||||||
],
|
|
||||||
description: [
|
|
||||||
{ max: 200, message: this.$t('role.descriptionLength'), trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
show(role) {
|
|
||||||
this.form = {
|
|
||||||
pgId: role.pgId,
|
|
||||||
name: role.name,
|
|
||||||
description: role.description
|
|
||||||
}
|
|
||||||
this.visible = true
|
|
||||||
},
|
},
|
||||||
submitForm() {
|
rules: {
|
||||||
this.$refs.form.validate(async valid => {
|
name: [
|
||||||
if (valid) {
|
{ required: true, message: this.$t('role.requiredName'), trigger: 'blur' },
|
||||||
try {
|
{ min: 2, max: 10, message: this.$t('role.nameLength'), trigger: 'blur' }
|
||||||
await updatePrivilegeGroup(this.form)
|
],
|
||||||
this.$message.success(this.$t('role.updateSuccess'))
|
description: [
|
||||||
this.$emit('success')
|
{ max: 200, message: this.$t('role.descriptionLength'), trigger: 'blur' }
|
||||||
this.visible = false
|
]
|
||||||
} catch (error) {
|
|
||||||
this.$message.error(error.message)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
resetForm() {
|
|
||||||
this.$refs.form.resetFields()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
show(role) {
|
||||||
|
this.form = {
|
||||||
|
pgId: role.pgId,
|
||||||
|
name: role.name,
|
||||||
|
description: role.description
|
||||||
|
}
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
this.$refs.form.validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
try {
|
||||||
|
await updatePrivilegeGroup(this.form)
|
||||||
|
this.$message.success(this.$t('role.updateSuccess'))
|
||||||
|
this.$emit('success')
|
||||||
|
this.visible = false
|
||||||
|
} catch (error) {
|
||||||
|
this.$message.error(error.message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.$refs.form.resetFields()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
}
|
||||||
|
</script>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="data-privilege-container">
|
<div class="data-privilege-container padding">
|
||||||
<el-row class="data-privilege-wrapper">
|
<el-row class="data-privilege-wrapper">
|
||||||
<el-col :span="4" class="left-panel">
|
<el-col :span="4" class="left-panel">
|
||||||
<data-privilege-div ref="dataPrivilegeDiv" @switch-data-privilege="handleSwitchDataPrivilege" />
|
<data-privilege-div ref="dataPrivilegeDiv" @switch-data-privilege="handleSwitchDataPrivilege" />
|
||||||
@ -7,8 +7,8 @@
|
|||||||
<el-col :span="20" class="right-panel">
|
<el-col :span="20" class="right-panel">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="text-left">
|
<div slot="header" class="text-left">
|
||||||
<h5>{{ $t('dataPrivilege.title') }}: {{ currentDataPrivilege.name }}</h5>
|
<span>{{ $t('dataPrivilege.title') }}: {{ currentDataPrivilege.name }}</span>
|
||||||
<p>{{ currentDataPrivilege.description }}</p>
|
<div>{{ currentDataPrivilege.description }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-wrapper">
|
<div class="tab-wrapper">
|
||||||
<el-tabs v-model="activeTab" @tab-click="handleTabClick(activeTab)">
|
<el-tabs v-model="activeTab" @tab-click="handleTabClick(activeTab)">
|
||||||
@ -83,8 +83,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.data-privilege-container {
|
.data-privilege-container {
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.data-privilege-wrapper {
|
.data-privilege-wrapper {
|
||||||
|
|||||||
@ -66,7 +66,9 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
this.getSystemInfo()
|
this.getSystemInfo()
|
||||||
this.refreshCaptcha();
|
setTimeout(() => {
|
||||||
|
this.refreshCaptcha();
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user