完善数据字典管理,更新相应的权限字符串

This commit is contained in:
zhoumingfa
2025-04-08 20:28:59 +08:00
parent e7927bb948
commit 8bb9f173eb
11 changed files with 68 additions and 56 deletions

View File

@@ -9,7 +9,7 @@
-->
<template>
<a-modal :open="visible" :title="form.dictDataId ? '编辑字典值' : '添加字典值'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
<br/>
<br />
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 16 }">
<a-form-item label="字典项名称" name="dataLabel">
<a-input v-model:value="form.dataLabel" placeholder="请输入 字典项名称" />
@@ -21,7 +21,7 @@
<a-input-number style="width: 100%" v-model:value="form.sortOrder" :min="0" :max="1000" />
</a-form-item>
<a-form-item label="备注" name="remark">
<textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none"></textarea>
<a-textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none" />
</a-form-item>
</a-form>
</a-modal>

View File

@@ -33,14 +33,20 @@
<a-row class="smart-table-btn-block">
<div class="smart-table-operate-block">
<a-button @click="addOrUpdateData" type="primary">
<a-button @click="addOrUpdateData" type="primary" v-privilege="'support:dictData:add'">
<template #icon>
<PlusOutlined />
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger :disabled="selectedRowKeyList.length === 0">
<a-button
@click="confirmBatchDelete"
type="primary"
danger
:disabled="selectedRowKeyList.length === 0"
v-privilege="'support:dictData:delete'"
>
<template #icon>
<DeleteOutlined />
</template>
@@ -69,7 +75,7 @@
/>
</template>
<template v-if="column.dataIndex === 'action'">
<a-button @click="addOrUpdateData(record)" type="link">编辑</a-button>
<a-button @click="addOrUpdateData(record)" type="link" v-privilege="'support:dictData:update'">编辑</a-button>
</template>
</template>
</a-table>

View File

@@ -9,7 +9,7 @@
-->
<template>
<a-modal :open="visible" :title="form.dictId ? '编辑字典' : '添加字典'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
<br/>
<br />
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }">
<a-form-item label="字典编码" name="dictCode">
<a-input v-model:value="form.dictCode" placeholder="请输入编码" />
@@ -19,7 +19,7 @@
</a-form-item>
<a-form-item label="备注" name="remark">
<textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none"></textarea>
<a-textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none" />
</a-form-item>
</a-form>
</a-modal>

View File

@@ -45,13 +45,7 @@
新建
</a-button>
<a-button
@click="confirmBatchDelete"
v-privilege="'support:dict:batchDelete'"
type="primary"
danger
:disabled="selectedRowKeyList.length === 0"
>
<a-button @click="confirmBatchDelete" v-privilege="'support:dict:delete'" type="primary" danger :disabled="selectedRowKeyList.length === 0">
<template #icon>
<DeleteOutlined />
</template>
@@ -87,7 +81,7 @@
</template>
<template v-else-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button @click="addOrUpdateDict(record)" v-privilege="'support:dict:edit'" type="link">编辑</a-button>
<a-button @click="addOrUpdateDict(record)" v-privilege="'support:dict:update'" type="link">编辑</a-button>
</div>
</template>
</template>