|
|
@@ -15,53 +15,62 @@
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
- <el-button v-hasPermi="['system:dict:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
|
|
- <el-button v-hasPermi="['system:dict:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
|
|
+ <el-button v-hasPermi="['system:dict:add']" type="primary" plain icon="Plus" @click="handleAdd">新增
|
|
|
+ </el-button>
|
|
|
+ <el-button v-hasPermi="['system:dict:export']" type="warning" plain icon="Download" @click="handleExport">
|
|
|
+ 导出
|
|
|
+ </el-button>
|
|
|
<el-button type="warning" plain icon="Close" @click="handleClose">关闭</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
</transition>
|
|
|
- <el-card shadow="hover">
|
|
|
- <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange" height="75vh">
|
|
|
-
|
|
|
- <el-table-column v-if="false" label="字典编码" align="center" prop="dictCode" />
|
|
|
- <el-table-column label="字典标签" align="center" prop="dictLabel">
|
|
|
- <template #default="scope">
|
|
|
+ <el-card shadow="hover" style="border: none">
|
|
|
+ <div class="table-content" style="height: calc(100vh - 225px)">
|
|
|
+ <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange" height="75vh">
|
|
|
+ <el-table-column v-if="false" label="字典编码" align="center" prop="dictCode"/>
|
|
|
+ <el-table-column label="字典标签" align="center" prop="dictLabel">
|
|
|
+ <template #default="scope">
|
|
|
<span
|
|
|
v-if="(scope.row.listClass === '' || scope.row.listClass === 'default') && (scope.row.cssClass === '' || scope.row.cssClass == null)"
|
|
|
- >{{ scope.row.dictLabel }}</span
|
|
|
- >
|
|
|
- <el-tag
|
|
|
- v-else
|
|
|
- :type="scope.row.listClass === 'primary' || scope.row.listClass === 'default' ? 'primary' : scope.row.listClass"
|
|
|
- :class="scope.row.cssClass"
|
|
|
- >{{ scope.row.dictLabel }}</el-tag
|
|
|
+ >{{ scope.row.dictLabel }}</span
|
|
|
>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="字典键值" align="center" prop="dictValue" />
|
|
|
- <el-table-column label="字典排序" align="center" prop="dictSort" />
|
|
|
- <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
|
|
- <template #default="scope">
|
|
|
- <span>{{ parseTime(scope.row.createTime) }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
|
|
- <template #default="scope">
|
|
|
- <el-tooltip content="修改" placement="top">
|
|
|
- <el-button v-hasPermi="['system:dict:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
|
|
|
- </el-tooltip>
|
|
|
- <el-tooltip content="删除" placement="top">
|
|
|
- <el-button v-hasPermi="['system:dict:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
-
|
|
|
- <pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" :total="total" @pagination="getList" />
|
|
|
+ <el-tag
|
|
|
+ v-else
|
|
|
+ :type="scope.row.listClass === 'primary' || scope.row.listClass === 'default' ? 'primary' : scope.row.listClass"
|
|
|
+ :class="scope.row.cssClass"
|
|
|
+ >{{ scope.row.dictLabel }}
|
|
|
+ </el-tag
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="字典键值" align="center" prop="dictValue"/>
|
|
|
+ <el-table-column label="字典排序" align="center" prop="dictSort"/>
|
|
|
+ <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ parseTime(scope.row.createTime) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tooltip content="修改" placement="top">
|
|
|
+ <el-button v-hasPermi="['system:dict:edit']" link type="primary" icon="Edit"
|
|
|
+ @click="handleUpdate(scope.row)">修改
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip content="删除" placement="top">
|
|
|
+ <el-button v-hasPermi="['system:dict:remove']" link type="primary" icon="Delete"
|
|
|
+ @click="handleDelete(scope.row)">删除
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
|
|
+ :total="total" @pagination="getList"/>
|
|
|
</el-card>
|
|
|
<!-- 添加或修改参数配置对话框 -->
|
|
|
<el-dialog v-model="dialog.visible" :title="dialog.title" width="500px" append-to-body>
|
|
|
@@ -107,13 +116,13 @@
|
|
|
|
|
|
<script setup name="Data" lang="ts">
|
|
|
import useDictStore from '@/store/modules/dict';
|
|
|
-import { optionselect as getDictOptionselect, getType } from '@/api/system/dict/type';
|
|
|
-import { listData, getData, delData, addData, updateData } from '@/api/system/dict/data';
|
|
|
-import { DictTypeVO } from '@/api/system/dict/type/types';
|
|
|
-import { DictDataForm, DictDataQuery, DictDataVO } from '@/api/system/dict/data/types';
|
|
|
-import { RouteLocationNormalized } from 'vue-router';
|
|
|
+import {getType, optionselect as getDictOptionselect} from '@/api/system/dict/type';
|
|
|
+import {addData, delData, getData, listData, updateData} from '@/api/system/dict/data';
|
|
|
+import {DictTypeVO} from '@/api/system/dict/type/types';
|
|
|
+import {DictDataForm, DictDataQuery, DictDataVO} from '@/api/system/dict/data/types';
|
|
|
+import {RouteLocationNormalized} from 'vue-router';
|
|
|
|
|
|
-const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const route = useRoute();
|
|
|
|
|
|
const dataList = ref<DictDataVO[]>([]);
|