2025-05-01 16:57:58 +08:00
|
|
|
|
<template>
|
2026-06-18 16:49:15 +08:00
|
|
|
|
<div class="welcome">
|
|
|
|
|
|
<HeaderBar />
|
|
|
|
|
|
<div class="main-wrapper">
|
|
|
|
|
|
<el-card class="main-card" shadow="never">
|
|
|
|
|
|
<div class="operation-header">
|
|
|
|
|
|
<h2 class="page-title">{{ $t('dictManagement.pageTitle') }}</h2>
|
|
|
|
|
|
<div class="right-operations">
|
|
|
|
|
|
<el-input :placeholder="$t('dictManagement.searchPlaceholder')" v-model="search" class="search-input"
|
|
|
|
|
|
@keyup.enter.native="handleSearch" clearable />
|
|
|
|
|
|
<CustomButton icon="el-icon-search" type="confirm" @click="handleSearch">
|
|
|
|
|
|
{{ $t('dictManagement.search') }}
|
|
|
|
|
|
</CustomButton>
|
|
|
|
|
|
</div>
|
2025-05-01 16:57:58 +08:00
|
|
|
|
</div>
|
2026-06-18 16:49:15 +08:00
|
|
|
|
<div class="content-panel">
|
|
|
|
|
|
<!-- 左侧字典类型列表 -->
|
|
|
|
|
|
<div class="dict-type-panel">
|
|
|
|
|
|
<div class="dict-type-header">
|
|
|
|
|
|
<h4 class="dict-type-title">{{ $t('dictManagement.dictTypeCategory') }}</h4>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<el-button icon="el-icon-plus" size="mini" @click="showAddDictTypeDialog" />
|
|
|
|
|
|
<el-button icon="el-icon-delete" size="mini" @click="batchDeleteDictType" />
|
|
|
|
|
|
</div>
|
2025-05-01 16:57:58 +08:00
|
|
|
|
</div>
|
2026-06-18 16:49:15 +08:00
|
|
|
|
<div class="dict-type-checkbox" v-loading="dictTypeLoading">
|
|
|
|
|
|
<el-checkbox class="dict-type-all" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">{{ $t('common.selectAll') }}</el-checkbox>
|
|
|
|
|
|
<el-checkbox-group v-model="checkedDictTypesIds" @change="handleDictTypeSelectionChange">
|
|
|
|
|
|
<div
|
|
|
|
|
|
class="dict-type-item"
|
|
|
|
|
|
:class="{ 'dict-type-active': selectedDictType?.id === item.id }"
|
|
|
|
|
|
v-for="item in dictTypeList"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-checkbox :label="item.dictName" :key="item.id">
|
|
|
|
|
|
</el-checkbox>
|
|
|
|
|
|
<div class="dict-type-item-content" @click="handleDictTypeRowClick(item)">
|
|
|
|
|
|
<span class="dict-type-name">{{item.dictName}}</span>
|
|
|
|
|
|
<el-button class="dict-type-edit-btn" type="text" icon="el-icon-edit" size="mini" @click.stop="editDictType(item)"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-checkbox-group>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- 右侧字典数据列表 -->
|
|
|
|
|
|
<div class="content-area">
|
|
|
|
|
|
<CustomTable :data="dictDataList" :columns="tableColumns" :loading="dictDataLoading" :show-selection="true"
|
|
|
|
|
|
:show-operations="true" :operations-label="$t('dictManagement.operation')" :total="total"
|
|
|
|
|
|
:current-page="currentPage" :page-size="pageSize" :page-size-options="pageSizeOptions"
|
|
|
|
|
|
@size-change="handlePageSizeChange" @page-change="goToPage">
|
|
|
|
|
|
<template slot="selection" slot-scope="scope">
|
|
|
|
|
|
<el-checkbox v-model="scope.row.selected"></el-checkbox>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template slot="operations" slot-scope="scope">
|
|
|
|
|
|
<el-button type="text" size="mini" @click="editDictData(scope.row)">
|
|
|
|
|
|
{{ $t('dictManagement.edit') }}
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
<el-button type="text" size="mini" @click="deleteDictData(scope.row)">
|
|
|
|
|
|
{{ $t('dictManagement.delete') }}
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template slot="footer-btns">
|
|
|
|
|
|
<div class="ctrl_btn">
|
|
|
|
|
|
<CustomButton :icon="isAllDictDataSelected ? 'el-icon-circle-close' : 'el-icon-circle-check'"
|
|
|
|
|
|
size="small" @click="selectAllDictData">
|
|
|
|
|
|
{{ isAllDictDataSelected ? $t('dictManagement.deselectAll') : $t('dictManagement.selectAll') }}
|
|
|
|
|
|
</CustomButton>
|
2026-06-23 14:54:45 +08:00
|
|
|
|
<CustomButton type="add" icon="el-icon-plus" size="small" @click="showAddDictDataDialog">
|
2026-06-18 16:49:15 +08:00
|
|
|
|
{{ $t('dictManagement.addDictData') }}
|
|
|
|
|
|
</CustomButton>
|
|
|
|
|
|
<CustomButton size="small" type="delete" icon="el-icon-delete" @click="batchDeleteDictData">
|
|
|
|
|
|
{{ $t('dictManagement.batchDeleteDictData') }}
|
|
|
|
|
|
</CustomButton>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</CustomTable>
|
|
|
|
|
|
</div>
|
2025-05-01 16:57:58 +08:00
|
|
|
|
</div>
|
2026-06-18 16:49:15 +08:00
|
|
|
|
</el-card>
|
2025-05-01 16:57:58 +08:00
|
|
|
|
</div>
|
2026-06-18 16:49:15 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 使用字典类型编辑弹框组件 -->
|
|
|
|
|
|
<DictTypeDialog :visible.sync="dictTypeDialogVisible" :title="dictTypeDialogTitle" :dictTypeData="dictTypeForm"
|
|
|
|
|
|
@save="saveDictType" />
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 使用字典数据编辑弹框组件 -->
|
|
|
|
|
|
<DictDataDialog :visible.sync="dictDataDialogVisible" :title="dictDataDialogTitle" :dictData="dictDataForm"
|
|
|
|
|
|
:dictTypeId="selectedDictType?.id" @save="saveDictData" />
|
|
|
|
|
|
<el-footer style="flex-shrink:unset;">
|
|
|
|
|
|
<version-footer />
|
|
|
|
|
|
</el-footer>
|
|
|
|
|
|
</div>
|
2025-05-01 16:57:58 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import dictApi from '@/apis/module/dict'
|
|
|
|
|
|
import DictDataDialog from '@/components/DictDataDialog.vue'
|
|
|
|
|
|
import DictTypeDialog from '@/components/DictTypeDialog.vue'
|
|
|
|
|
|
import HeaderBar from '@/components/HeaderBar.vue'
|
|
|
|
|
|
import VersionFooter from '@/components/VersionFooter.vue'
|
2026-06-18 16:49:15 +08:00
|
|
|
|
import CustomButton from '@/components/CustomButton.vue'
|
|
|
|
|
|
import CustomTable from '@/components/CustomTable.vue'
|
2025-05-01 16:57:58 +08:00
|
|
|
|
export default {
|
2026-06-18 16:49:15 +08:00
|
|
|
|
name: 'DictManagement',
|
|
|
|
|
|
components: {
|
|
|
|
|
|
HeaderBar,
|
|
|
|
|
|
DictTypeDialog,
|
|
|
|
|
|
DictDataDialog,
|
|
|
|
|
|
VersionFooter,
|
|
|
|
|
|
CustomButton,
|
|
|
|
|
|
CustomTable
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
// 字典类型相关
|
|
|
|
|
|
dictTypeList: [],
|
|
|
|
|
|
dictTypeLoading: false,
|
|
|
|
|
|
selectedDictType: null,
|
|
|
|
|
|
selectedDictTypes: [],
|
|
|
|
|
|
dictTypeDialogVisible: false,
|
|
|
|
|
|
dictTypeDialogTitle: '新增字典类型',
|
|
|
|
|
|
dictTypeForm: {
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
dictName: '',
|
|
|
|
|
|
dictType: ''
|
|
|
|
|
|
},
|
2025-05-01 16:57:58 +08:00
|
|
|
|
|
2026-06-18 16:49:15 +08:00
|
|
|
|
// 字典数据相关
|
|
|
|
|
|
dictDataList: [],
|
|
|
|
|
|
dictDataLoading: false,
|
|
|
|
|
|
isAllDictDataSelected: false,
|
|
|
|
|
|
dictDataDialogVisible: false,
|
|
|
|
|
|
dictDataDialogTitle: '新增字典数据',
|
|
|
|
|
|
dictDataForm: {
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
dictTypeId: null,
|
|
|
|
|
|
dictLabel: '',
|
|
|
|
|
|
dictValue: '',
|
|
|
|
|
|
sort: 0
|
|
|
|
|
|
},
|
|
|
|
|
|
search: '',
|
|
|
|
|
|
pageSizeOptions: [10, 20, 50, 100],
|
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
tableColumns: [],
|
|
|
|
|
|
isIndeterminate: false,
|
|
|
|
|
|
checkAll: false,
|
|
|
|
|
|
checkedDictTypesIds: []
|
2025-05-01 16:57:58 +08:00
|
|
|
|
}
|
2026-06-18 16:49:15 +08:00
|
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
|
|
|
this.initTableColumns()
|
|
|
|
|
|
this.loadDictTypeList()
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
handleCheckAllChange(val) {
|
|
|
|
|
|
// 根据当前实际选中状态决定是全选还是取消全选
|
|
|
|
|
|
const isAllSelected = this.checkedDictTypesIds.length === this.dictTypeList.length;
|
|
|
|
|
|
if (isAllSelected) {
|
|
|
|
|
|
// 已全选,取消全选
|
|
|
|
|
|
this.checkedDictTypesIds = [];
|
|
|
|
|
|
this.checkAll = false;
|
|
|
|
|
|
this.selectedDictTypes = [];
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// 未全选,执行全选
|
|
|
|
|
|
this.checkedDictTypesIds = this.dictTypeList.map(item => item.dictName);
|
|
|
|
|
|
this.checkAll = true;
|
|
|
|
|
|
this.selectedDictTypes = [...this.dictTypeList];
|
|
|
|
|
|
}
|
|
|
|
|
|
// 重置 indeterminate 状态
|
|
|
|
|
|
this.isIndeterminate = false;
|
|
|
|
|
|
},
|
|
|
|
|
|
handleDictTypeSelectionChange(checkedIds) {
|
|
|
|
|
|
// 更新选中的字典类型列表
|
|
|
|
|
|
this.selectedDictTypes = this.dictTypeList.filter(item => checkedIds.includes(item.dictName));
|
|
|
|
|
|
// 部分选中时 checkAll 为 true,isIndeterminate 为 true 显示半选状态
|
|
|
|
|
|
this.checkAll = checkedIds.length > 0;
|
|
|
|
|
|
this.isIndeterminate = checkedIds.length > 0 && checkedIds.length < this.dictTypeList.length;
|
|
|
|
|
|
},
|
|
|
|
|
|
initTableColumns() {
|
|
|
|
|
|
this.tableColumns = [
|
|
|
|
|
|
{
|
|
|
|
|
|
prop: 'dictLabel',
|
|
|
|
|
|
label: this.$t('dictManagement.dictLabel'),
|
|
|
|
|
|
align: 'center'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
prop: 'dictValue',
|
|
|
|
|
|
label: this.$t('dictManagement.dictValue'),
|
|
|
|
|
|
align: 'center'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
prop: 'sort',
|
|
|
|
|
|
label: this.$t('dictManagement.sort'),
|
|
|
|
|
|
align: 'center'
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
// 字典类型相关方法
|
|
|
|
|
|
loadDictTypeList() {
|
|
|
|
|
|
this.dictTypeLoading = true
|
|
|
|
|
|
dictApi.getDictTypeList({
|
|
|
|
|
|
page: 1,
|
|
|
|
|
|
limit: 100,
|
|
|
|
|
|
dictName: this.search
|
|
|
|
|
|
}, ({ data }) => {
|
|
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.dictTypeList = data.data.list
|
|
|
|
|
|
if (this.dictTypeList.length > 0) {
|
|
|
|
|
|
this.selectedDictType = this.dictTypeList[0]
|
|
|
|
|
|
this.loadDictDataList(this.dictTypeList[0].id)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.dictTypeLoading = false
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
handleDictTypeRowClick(row) {
|
|
|
|
|
|
this.selectedDictType = row
|
|
|
|
|
|
this.loadDictDataList(row.id)
|
|
|
|
|
|
},
|
|
|
|
|
|
showAddDictTypeDialog() {
|
|
|
|
|
|
this.dictTypeDialogTitle = this.$t('dictManagement.addDictType')
|
|
|
|
|
|
this.dictTypeForm = {
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
dictName: '',
|
|
|
|
|
|
dictType: ''
|
|
|
|
|
|
}
|
|
|
|
|
|
this.dictTypeDialogVisible = true
|
|
|
|
|
|
},
|
|
|
|
|
|
editDictType(row) {
|
|
|
|
|
|
this.dictTypeDialogTitle = this.$t('dictManagement.editDictType')
|
|
|
|
|
|
this.dictTypeForm = { ...row }
|
|
|
|
|
|
this.dictTypeDialogVisible = true
|
|
|
|
|
|
},
|
|
|
|
|
|
saveDictType(formData) {
|
|
|
|
|
|
const api = formData.id ? dictApi.updateDictType : dictApi.addDictType
|
|
|
|
|
|
api(formData, ({ data }) => {
|
|
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.$message.success(this.$t('dictManagement.saveSuccess'))
|
|
|
|
|
|
this.dictTypeDialogVisible = false
|
|
|
|
|
|
this.loadDictTypeList()
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
batchDeleteDictType() {
|
|
|
|
|
|
if (this.selectedDictTypes.length === 0) {
|
|
|
|
|
|
this.$message.warning(this.$t('dictManagement.selectDictTypeToDelete'))
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.$confirm(this.$t('dictManagement.confirmDeleteDictType'), this.$t('dictManagement.confirm'), {
|
|
|
|
|
|
confirmButtonText: this.$t('dictManagement.confirm'),
|
|
|
|
|
|
cancelButtonText: this.$t('dictManagement.cancel'),
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
const ids = this.selectedDictTypes.map(item => item.id)
|
|
|
|
|
|
dictApi.deleteDictType(ids, ({ data }) => {
|
|
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.$message.success(this.$t('dictManagement.deleteSuccess'))
|
|
|
|
|
|
this.loadDictTypeList()
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 字典数据相关方法
|
|
|
|
|
|
loadDictDataList(dictTypeId) {
|
|
|
|
|
|
if (!dictTypeId) return
|
|
|
|
|
|
this.dictDataLoading = true
|
|
|
|
|
|
dictApi.getDictDataList({
|
|
|
|
|
|
dictTypeId,
|
|
|
|
|
|
page: this.currentPage,
|
|
|
|
|
|
limit: this.pageSize,
|
|
|
|
|
|
dictLabel: this.search,
|
|
|
|
|
|
dictValue: ''
|
|
|
|
|
|
}, ({ data }) => {
|
|
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.dictDataList = data.data.list.map(item => ({
|
|
|
|
|
|
...item,
|
|
|
|
|
|
selected: false
|
|
|
|
|
|
}))
|
|
|
|
|
|
this.total = data.data.total
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(data.msg || this.$t('dictManagement.getDictDataFailed'))
|
|
|
|
|
|
}
|
|
|
|
|
|
this.dictDataLoading = false
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
selectAllDictData() {
|
|
|
|
|
|
this.isAllDictDataSelected = !this.isAllDictDataSelected
|
|
|
|
|
|
this.dictDataList.forEach(row => {
|
|
|
|
|
|
row.selected = this.isAllDictDataSelected
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
showAddDictDataDialog() {
|
|
|
|
|
|
if (!this.selectedDictType) {
|
|
|
|
|
|
this.$message.warning(this.$t('dictManagement.selectDictTypeFirst'))
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
this.dictDataDialogTitle = this.$t('dictManagement.addDictData')
|
|
|
|
|
|
this.dictDataForm = {
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
dictTypeId: this.selectedDictType.id,
|
|
|
|
|
|
dictLabel: '',
|
|
|
|
|
|
dictValue: '',
|
|
|
|
|
|
sort: 0
|
|
|
|
|
|
}
|
|
|
|
|
|
this.dictDataDialogVisible = true
|
|
|
|
|
|
},
|
|
|
|
|
|
editDictData(row) {
|
|
|
|
|
|
this.dictDataDialogTitle = this.$t('dictManagement.editDictData')
|
|
|
|
|
|
this.dictDataForm = { ...row }
|
|
|
|
|
|
this.dictDataDialogVisible = true
|
|
|
|
|
|
},
|
|
|
|
|
|
saveDictData(formData) {
|
|
|
|
|
|
const api = formData.id ? dictApi.updateDictData : dictApi.addDictData
|
|
|
|
|
|
api(formData, ({ data }) => {
|
|
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.$message.success(this.$t('dictManagement.saveSuccess'))
|
|
|
|
|
|
this.dictDataDialogVisible = false
|
|
|
|
|
|
this.loadDictDataList(formData.dictTypeId)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
deleteDictData(row) {
|
|
|
|
|
|
this.$confirm(this.$t('dictManagement.confirmDeleteDictData'), this.$t('dictManagement.confirm'), {
|
|
|
|
|
|
confirmButtonText: this.$t('dictManagement.confirm'),
|
|
|
|
|
|
cancelButtonText: this.$t('dictManagement.cancel'),
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
dictApi.deleteDictData([row.id], ({ data }) => {
|
|
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.$message.success(this.$t('dictManagement.deleteSuccess'))
|
|
|
|
|
|
this.loadDictDataList(row.dictTypeId)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
batchDeleteDictData() {
|
|
|
|
|
|
const selectedRows = this.dictDataList.filter(row => row.selected)
|
|
|
|
|
|
if (selectedRows.length === 0) {
|
|
|
|
|
|
this.$message.warning(this.$t('dictManagement.selectDictDataToDelete'))
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.$confirm(this.$t('dictManagement.confirmBatchDeleteDictData', { count: selectedRows.length }), this.$t('dictManagement.confirm'), {
|
|
|
|
|
|
confirmButtonText: this.$t('dictManagement.confirm'),
|
|
|
|
|
|
cancelButtonText: this.$t('dictManagement.cancel'),
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
const ids = selectedRows.map(item => item.id)
|
|
|
|
|
|
dictApi.deleteDictData(ids, ({ data }) => {
|
|
|
|
|
|
if (data.code === 0) {
|
|
|
|
|
|
this.$message.success(this.$t('dictManagement.deleteSuccess'))
|
|
|
|
|
|
this.loadDictDataList(this.selectedDictType.id)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
handleSearch() {
|
|
|
|
|
|
if (!this.selectedDictType) {
|
|
|
|
|
|
this.$message.warning(this.$t('dictManagement.selectDictTypeFirst'))
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
this.currentPage = 1
|
|
|
|
|
|
this.loadDictDataList(this.selectedDictType.id)
|
|
|
|
|
|
},
|
|
|
|
|
|
handlePageSizeChange(val) {
|
|
|
|
|
|
this.pageSize = val
|
|
|
|
|
|
this.currentPage = 1
|
|
|
|
|
|
this.loadDictDataList(this.selectedDictType?.id)
|
|
|
|
|
|
},
|
|
|
|
|
|
goToPage(page) {
|
|
|
|
|
|
if (page !== this.currentPage) {
|
|
|
|
|
|
this.currentPage = page
|
|
|
|
|
|
this.loadDictDataList(this.selectedDictType?.id)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-05-01 16:57:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.welcome {
|
2026-06-18 16:49:15 +08:00
|
|
|
|
min-width: 900px;
|
|
|
|
|
|
min-height: 506px;
|
|
|
|
|
|
height: 100vh;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
background-size: cover;
|
|
|
|
|
|
background: linear-gradient(to bottom right, #dce8ff, #e4eeff, #e6cbfd) center;
|
|
|
|
|
|
-webkit-background-size: cover;
|
|
|
|
|
|
-o-background-size: cover;
|
|
|
|
|
|
overflow: hidden;
|
2025-05-01 16:57:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.main-wrapper {
|
2026-06-18 16:49:15 +08:00
|
|
|
|
height: calc(100vh - 63px - 35px);
|
|
|
|
|
|
padding: 20px 22px 0;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
box-sizing: border-box;
|
2025-05-01 16:57:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.content-panel {
|
2026-06-18 16:49:15 +08:00
|
|
|
|
flex: 1;
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
min-height: 0;
|
2025-05-01 16:57:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.dict-type-panel {
|
2026-06-18 16:49:15 +08:00
|
|
|
|
width: 340px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
box-shadow: 0 0 12px rgba(74, 124, 253, 0.12);
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
.dict-type-checkbox {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
padding: 16px 10px;
|
2025-05-01 16:57:58 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-06-18 16:49:15 +08:00
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
.dict-type-all {
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
::v-deep .el-checkbox-group {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
.el-checkbox__label {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.dict-type-item {
|
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
|
padding-right: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
background: #4998ff;
|
|
|
|
|
|
.dict-type-name, .dict-type-edit-btn {
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.dict-type-item-content {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
padding: 8px 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
}
|
|
|
|
|
|
.dict-type-name {
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.dict-type-edit-btn {
|
|
|
|
|
|
color: #303133;
|
|
|
|
|
|
padding: 6px 10px;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.dict-type-active {
|
|
|
|
|
|
background-color: #4998ff;
|
|
|
|
|
|
.dict-type-name, .dict-type-edit-btn {
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-05-01 16:57:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.dict-type-header {
|
2026-06-18 16:49:15 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
padding: 10px 16px;
|
|
|
|
|
|
border-bottom: 1px solid #ebeef5;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
.dict-type-title {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
}
|
|
|
|
|
|
> div {
|
|
|
|
|
|
.el-button {
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
padding: 7px 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-05-01 16:57:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.content-area {
|
2026-06-18 16:49:15 +08:00
|
|
|
|
flex: 1;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
min-width: 600px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
padding: 0 0 20px;
|
|
|
|
|
|
box-sizing: border-box;
|
2025-05-01 16:57:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-18 16:49:15 +08:00
|
|
|
|
.main-card {
|
|
|
|
|
|
background: white;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
border-radius: 15px;
|
|
|
|
|
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
overflow: hidden;
|
2025-05-01 16:57:58 +08:00
|
|
|
|
|
2026-06-18 16:49:15 +08:00
|
|
|
|
::v-deep .el-card__body {
|
2026-03-17 10:30:43 +08:00
|
|
|
|
padding: 0;
|
2025-05-01 16:57:58 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow: hidden;
|
2026-06-18 16:49:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.operation-header {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
padding: 16px 20px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.page-title {
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-operations {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.search-input {
|
|
|
|
|
|
width: 240px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ctrl_btn {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-table .el-button--text) {
|
|
|
|
|
|
color: #7079aa;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-table .el-button--text:hover) {
|
|
|
|
|
|
color: #5a64b5;
|
2025-05-01 16:57:58 +08:00
|
|
|
|
}
|
2025-05-08 17:57:11 +08:00
|
|
|
|
|
|
|
|
|
|
:deep(.el-checkbox__inner) {
|
2026-06-18 16:49:15 +08:00
|
|
|
|
background-color: #ffffff !important;
|
|
|
|
|
|
border-color: #cccccc !important;
|
2025-05-08 17:57:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-checkbox__inner:hover) {
|
2026-06-18 16:49:15 +08:00
|
|
|
|
border-color: #cccccc !important;
|
2025-05-08 17:57:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
|
2026-06-18 16:49:15 +08:00
|
|
|
|
background-color: #5f70f3 !important;
|
|
|
|
|
|
border-color: #5f70f3 !important;
|
2025-05-08 17:57:11 +08:00
|
|
|
|
}
|
2026-06-18 16:49:15 +08:00
|
|
|
|
</style>
|