|
@@ -2,36 +2,36 @@
|
|
<!-- 搜索工作栏 -->
|
|
<!-- 搜索工作栏 -->
|
|
<ContentWrap>
|
|
<ContentWrap>
|
|
<el-form
|
|
<el-form
|
|
- class="-mb-15px"
|
|
|
|
- :model="queryParams"
|
|
|
|
ref="queryFormRef"
|
|
ref="queryFormRef"
|
|
:inline="true"
|
|
:inline="true"
|
|
|
|
+ :model="queryParams"
|
|
|
|
+ class="-mb-15px"
|
|
label-width="68px"
|
|
label-width="68px"
|
|
>
|
|
>
|
|
<el-form-item label="字典名称" prop="name">
|
|
<el-form-item label="字典名称" prop="name">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.name"
|
|
v-model="queryParams.name"
|
|
- placeholder="请输入字典名称"
|
|
|
|
|
|
+ class="!w-240px"
|
|
clearable
|
|
clearable
|
|
|
|
+ placeholder="请输入字典名称"
|
|
@keyup.enter="handleQuery"
|
|
@keyup.enter="handleQuery"
|
|
- class="!w-240px"
|
|
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="字典类型" prop="type">
|
|
<el-form-item label="字典类型" prop="type">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.type"
|
|
v-model="queryParams.type"
|
|
- placeholder="请输入字典类型"
|
|
|
|
|
|
+ class="!w-240px"
|
|
clearable
|
|
clearable
|
|
|
|
+ placeholder="请输入字典类型"
|
|
@keyup.enter="handleQuery"
|
|
@keyup.enter="handleQuery"
|
|
- class="!w-240px"
|
|
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="状态" prop="status">
|
|
<el-form-item label="状态" prop="status">
|
|
<el-select
|
|
<el-select
|
|
v-model="queryParams.status"
|
|
v-model="queryParams.status"
|
|
- placeholder="请选择字典状态"
|
|
|
|
- clearable
|
|
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
|
|
+ clearable
|
|
|
|
+ placeholder="请选择字典状态"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
|
@@ -44,33 +44,41 @@
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="queryParams.createTime"
|
|
v-model="queryParams.createTime"
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
- type="daterange"
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
+ type="daterange"
|
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
|
|
- <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
|
|
|
+ <el-button @click="handleQuery">
|
|
|
|
+ <Icon class="mr-5px" icon="ep:search" />
|
|
|
|
+ 搜索
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button @click="resetQuery">
|
|
|
|
+ <Icon class="mr-5px" icon="ep:refresh" />
|
|
|
|
+ 重置
|
|
|
|
+ </el-button>
|
|
<el-button
|
|
<el-button
|
|
- type="primary"
|
|
|
|
|
|
+ v-hasPermi="['system:dict:create']"
|
|
plain
|
|
plain
|
|
|
|
+ type="primary"
|
|
@click="openForm('create')"
|
|
@click="openForm('create')"
|
|
- v-hasPermi="['system:dict:create']"
|
|
|
|
>
|
|
>
|
|
- <Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
|
|
|
+ <Icon class="mr-5px" icon="ep:plus" />
|
|
|
|
+ 新增
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
- type="success"
|
|
|
|
|
|
+ v-hasPermi="['system:dict:export']"
|
|
|
|
+ :loading="exportLoading"
|
|
plain
|
|
plain
|
|
|
|
+ type="success"
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
- :loading="exportLoading"
|
|
|
|
- v-hasPermi="['system:dict:export']"
|
|
|
|
>
|
|
>
|
|
- <Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
|
|
|
+ <Icon class="mr-5px" icon="ep:download" />
|
|
|
|
+ 导出
|
|
</el-button>
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -79,29 +87,29 @@
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<ContentWrap>
|
|
<ContentWrap>
|
|
<el-table v-loading="loading" :data="list">
|
|
<el-table v-loading="loading" :data="list">
|
|
- <el-table-column label="字典编号" align="center" prop="id" />
|
|
|
|
- <el-table-column label="字典名称" align="center" prop="name" show-overflow-tooltip />
|
|
|
|
- <el-table-column label="字典类型" align="center" prop="type" width="300" />
|
|
|
|
- <el-table-column label="状态" align="center" prop="status">
|
|
|
|
|
|
+ <el-table-column align="center" label="字典编号" prop="id" />
|
|
|
|
+ <el-table-column align="center" label="字典名称" prop="name" show-overflow-tooltip />
|
|
|
|
+ <el-table-column align="center" label="字典类型" prop="type" width="300" />
|
|
|
|
+ <el-table-column align="center" label="状态" prop="status">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="备注" align="center" prop="remark" />
|
|
|
|
|
|
+ <el-table-column align="center" label="备注" prop="remark" />
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="创建时间"
|
|
|
|
:formatter="dateFormatter"
|
|
:formatter="dateFormatter"
|
|
align="center"
|
|
align="center"
|
|
|
|
+ label="创建时间"
|
|
prop="createTime"
|
|
prop="createTime"
|
|
width="180"
|
|
width="180"
|
|
/>
|
|
/>
|
|
- <el-table-column label="操作" align="center">
|
|
|
|
|
|
+ <el-table-column align="center" label="操作">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-hasPermi="['system:dict:update']"
|
|
link
|
|
link
|
|
type="primary"
|
|
type="primary"
|
|
@click="openForm('update', scope.row.id)"
|
|
@click="openForm('update', scope.row.id)"
|
|
- v-hasPermi="['system:dict:update']"
|
|
|
|
>
|
|
>
|
|
修改
|
|
修改
|
|
</el-button>
|
|
</el-button>
|
|
@@ -109,10 +117,10 @@
|
|
<el-button link type="primary">数据</el-button>
|
|
<el-button link type="primary">数据</el-button>
|
|
</router-link>
|
|
</router-link>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-hasPermi="['system:dict:delete']"
|
|
link
|
|
link
|
|
type="danger"
|
|
type="danger"
|
|
@click="handleDelete(scope.row.id)"
|
|
@click="handleDelete(scope.row.id)"
|
|
- v-hasPermi="['system:dict:delete']"
|
|
|
|
>
|
|
>
|
|
删除
|
|
删除
|
|
</el-button>
|
|
</el-button>
|
|
@@ -121,9 +129,9 @@
|
|
</el-table>
|
|
</el-table>
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
<Pagination
|
|
<Pagination
|
|
- :total="total"
|
|
|
|
- v-model:page="queryParams.pageNo"
|
|
|
|
v-model:limit="queryParams.pageSize"
|
|
v-model:limit="queryParams.pageSize"
|
|
|
|
+ v-model:page="queryParams.pageNo"
|
|
|
|
+ :total="total"
|
|
@pagination="getList"
|
|
@pagination="getList"
|
|
/>
|
|
/>
|
|
</ContentWrap>
|
|
</ContentWrap>
|
|
@@ -132,12 +140,13 @@
|
|
<DictTypeForm ref="formRef" @success="getList" />
|
|
<DictTypeForm ref="formRef" @success="getList" />
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts" name="SystemDictType">
|
|
|
|
-import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
|
|
|
|
+<script lang="ts" name="SystemDictType" setup>
|
|
|
|
+import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
import * as DictTypeApi from '@/api/system/dict/dict.type'
|
|
import * as DictTypeApi from '@/api/system/dict/dict.type'
|
|
import DictTypeForm from './DictTypeForm.vue'
|
|
import DictTypeForm from './DictTypeForm.vue'
|
|
import download from '@/utils/download'
|
|
import download from '@/utils/download'
|
|
|
|
+
|
|
const message = useMessage() // 消息弹窗
|
|
const message = useMessage() // 消息弹窗
|
|
const { t } = useI18n() // 国际化
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|