Commit 08a35704e96e19fffedb86103d55401859ada401
1 parent
986d1328
v3.6.0 增加字典标签样式回显
Showing
22 changed files
with
101 additions
and
126 deletions
yudao-ui-admin/src/components/DictTag/index.vue
| 1 | <template> | 1 | <template> |
| 2 | - <div> | 2 | + <span> |
| 3 | <template v-for="(dict, index) in this.getDictDatas2(type, value)"> | 3 | <template v-for="(dict, index) in this.getDictDatas2(type, value)"> |
| 4 | <!-- 默认样式 --> | 4 | <!-- 默认样式 --> |
| 5 | - <span v-if="dict.colorType === 'default' || dict.colorType === '' || dict.color === undefined" :key="dict.value" :index="index" | 5 | + <span v-if="dict.colorType === 'default' || dict.colorType === '' || dict.colorType === undefined" :key="dict.value" :index="index" |
| 6 | :class="dict.cssClass">{{ dict.label }}</span> | 6 | :class="dict.cssClass">{{ dict.label }}</span> |
| 7 | <!-- Tag 样式 --> | 7 | <!-- Tag 样式 --> |
| 8 | <el-tag v-else :key="dict.value" :index="index" :type="dict.colorType" :class="dict.cssClass"> | 8 | <el-tag v-else :key="dict.value" :index="index" :type="dict.colorType" :class="dict.cssClass"> |
| 9 | {{ dict.label }} | 9 | {{ dict.label }} |
| 10 | </el-tag> | 10 | </el-tag> |
| 11 | </template> | 11 | </template> |
| 12 | - </div> | 12 | + </span> |
| 13 | </template> | 13 | </template> |
| 14 | 14 | ||
| 15 | <script> | 15 | <script> |
yudao-ui-admin/src/store/modules/dict.js
| @@ -33,7 +33,9 @@ const actions = { | @@ -33,7 +33,9 @@ const actions = { | ||
| 33 | // 处理 dictValue 层级 | 33 | // 处理 dictValue 层级 |
| 34 | dictDataMap[dictData.dictType].push({ | 34 | dictDataMap[dictData.dictType].push({ |
| 35 | value: dictData.value, | 35 | value: dictData.value, |
| 36 | - label: dictData.label | 36 | + label: dictData.label, |
| 37 | + colorType: dictData.colorType, | ||
| 38 | + cssClass: dictData.cssClass, | ||
| 37 | }) | 39 | }) |
| 38 | }) | 40 | }) |
| 39 | // 存储到 Store 中 | 41 | // 存储到 Store 中 |
yudao-ui-admin/src/utils/dict.js
| @@ -95,6 +95,7 @@ export function getDictDatas2(dictType, values) { | @@ -95,6 +95,7 @@ export function getDictDatas2(dictType, values) { | ||
| 95 | results.push(dict); | 95 | results.push(dict); |
| 96 | } | 96 | } |
| 97 | } | 97 | } |
| 98 | + // debugger | ||
| 98 | return results; | 99 | return results; |
| 99 | } | 100 | } |
| 100 | 101 | ||
| @@ -119,3 +120,5 @@ export function getDictDataLabel(dictType, value) { | @@ -119,3 +120,5 @@ export function getDictDataLabel(dictType, value) { | ||
| 119 | return dict ? dict.label : ''; | 120 | return dict ? dict.label : ''; |
| 120 | } | 121 | } |
| 121 | 122 | ||
| 123 | +export class getDictDataL { | ||
| 124 | +} |
yudao-ui-admin/src/views/bpm/form/index.vue
| @@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
| 27 | <el-table-column label="表单名" align="center" prop="name" /> | 27 | <el-table-column label="表单名" align="center" prop="name" /> |
| 28 | <el-table-column label="开启状态" align="center" prop="status"> | 28 | <el-table-column label="开启状态" align="center" prop="status"> |
| 29 | <template slot-scope="scope"> | 29 | <template slot-scope="scope"> |
| 30 | - <span>{{ getDictDataLabel(DICT_TYPE.COMMON_STATUS, scope.row.status) }}</span> | 30 | + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> |
| 31 | </template> | 31 | </template> |
| 32 | </el-table-column> | 32 | </el-table-column> |
| 33 | <el-table-column label="备注" align="center" prop="remark" /> | 33 | <el-table-column label="备注" align="center" prop="remark" /> |
yudao-ui-admin/src/views/bpm/oa/leave/detail.vue
| @@ -4,7 +4,9 @@ | @@ -4,7 +4,9 @@ | ||
| 4 | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> | 4 | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| 5 | <el-form-item label="开始时间:" prop="startTime"> {{parseTime(form.startTime, '{y}-{m}-{d}')}} </el-form-item> | 5 | <el-form-item label="开始时间:" prop="startTime"> {{parseTime(form.startTime, '{y}-{m}-{d}')}} </el-form-item> |
| 6 | <el-form-item label="结束时间:" prop="endTime"> {{parseTime(form.endTime, '{y}-{m}-{d}')}} </el-form-item> | 6 | <el-form-item label="结束时间:" prop="endTime"> {{parseTime(form.endTime, '{y}-{m}-{d}')}} </el-form-item> |
| 7 | - <el-form-item label="请假类型:" prop="type">{{ typeFormat(form) }}</el-form-item> | 7 | + <el-form-item label="请假类型:" prop="type"> |
| 8 | + <dict-tag :type="DICT_TYPE.BPM_OA_LEAVE_TYPE" :value="form.type"/> | ||
| 9 | + </el-form-item> | ||
| 8 | <el-form-item label="原因:" prop="reason"> {{ form.reason }}</el-form-item> | 10 | <el-form-item label="原因:" prop="reason"> {{ form.reason }}</el-form-item> |
| 9 | </el-form> | 11 | </el-form> |
| 10 | </div> | 12 | </div> |
| @@ -12,7 +14,7 @@ | @@ -12,7 +14,7 @@ | ||
| 12 | 14 | ||
| 13 | <script> | 15 | <script> |
| 14 | import { getLeave} from "@/api/bpm/leave" | 16 | import { getLeave} from "@/api/bpm/leave" |
| 15 | -import {getDictDatas, DICT_TYPE, getDictDataLabel} from '@/utils/dict' | 17 | +import {getDictDatas, DICT_TYPE} from '@/utils/dict' |
| 16 | export default { | 18 | export default { |
| 17 | name: "LeaveDetail", | 19 | name: "LeaveDetail", |
| 18 | components: { | 20 | components: { |
| @@ -46,9 +48,6 @@ export default { | @@ -46,9 +48,6 @@ export default { | ||
| 46 | this.form = response.data; | 48 | this.form = response.data; |
| 47 | }); | 49 | }); |
| 48 | }, | 50 | }, |
| 49 | - typeFormat(row) { | ||
| 50 | - return getDictDataLabel(DICT_TYPE.BPM_OA_LEAVE_TYPE, row.type) | ||
| 51 | - } | ||
| 52 | } | 51 | } |
| 53 | }; | 52 | }; |
| 54 | </script> | 53 | </script> |
yudao-ui-admin/src/views/bpm/oa/leave/index.vue
| @@ -39,7 +39,11 @@ | @@ -39,7 +39,11 @@ | ||
| 39 | <!-- 列表 --> | 39 | <!-- 列表 --> |
| 40 | <el-table v-loading="loading" :data="list"> | 40 | <el-table v-loading="loading" :data="list"> |
| 41 | <el-table-column label="申请编号" align="center" prop="id" /> | 41 | <el-table-column label="申请编号" align="center" prop="id" /> |
| 42 | - <el-table-column label="状态" align="center" prop="result" :formatter="resultFormat" /> | 42 | + <el-table-column label="状态" align="center" prop="result"> |
| 43 | + <template slot-scope="scope"> | ||
| 44 | + <dict-tag :type="DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT" :value="scope.row.result"/> | ||
| 45 | + </template> | ||
| 46 | + </el-table-column> | ||
| 43 | <el-table-column label="开始时间" align="center" prop="startTime" width="180"> | 47 | <el-table-column label="开始时间" align="center" prop="startTime" width="180"> |
| 44 | <template slot-scope="scope"> | 48 | <template slot-scope="scope"> |
| 45 | <span>{{ parseTime(scope.row.startTime) }}</span> | 49 | <span>{{ parseTime(scope.row.startTime) }}</span> |
| @@ -50,7 +54,11 @@ | @@ -50,7 +54,11 @@ | ||
| 50 | <span>{{ parseTime(scope.row.endTime) }}</span> | 54 | <span>{{ parseTime(scope.row.endTime) }}</span> |
| 51 | </template> | 55 | </template> |
| 52 | </el-table-column> | 56 | </el-table-column> |
| 53 | - <el-table-column label="请假类型" align="center" prop="type" :formatter="typeFormat" /> | 57 | + <el-table-column label="请假类型" align="center" prop="type"> |
| 58 | + <template slot-scope="scope"> | ||
| 59 | + <dict-tag :type="DICT_TYPE.BPM_OA_LEAVE_TYPE" :value="scope.row.type"/> | ||
| 60 | + </template> | ||
| 61 | + </el-table-column> | ||
| 54 | <el-table-column label="原因" align="center" prop="reason" /> | 62 | <el-table-column label="原因" align="center" prop="reason" /> |
| 55 | <el-table-column label="申请时间" align="center" prop="applyTime" width="180"> | 63 | <el-table-column label="申请时间" align="center" prop="applyTime" width="180"> |
| 56 | <template slot-scope="scope"> | 64 | <template slot-scope="scope"> |
yudao-ui-admin/src/views/bpm/processInstance/index.vue
| @@ -76,20 +76,7 @@ | @@ -76,20 +76,7 @@ | ||
| 76 | </el-table-column> | 76 | </el-table-column> |
| 77 | <el-table-column label="结果" align="center" prop="result"> | 77 | <el-table-column label="结果" align="center" prop="result"> |
| 78 | <template slot-scope="scope"> | 78 | <template slot-scope="scope"> |
| 79 | - <span> | ||
| 80 | - <el-tag type="primary" v-if="scope.row.result === 1"> <!-- 进行中 --> | ||
| 81 | - {{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, scope.row.result) }} | ||
| 82 | - </el-tag> | ||
| 83 | - <el-tag type="success" v-if="scope.row.result === 2"> <!-- 通过 --> | ||
| 84 | - {{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, scope.row.result) }} | ||
| 85 | - </el-tag> | ||
| 86 | - <el-tag type="danger" v-if="scope.row.result === 3"> <!-- 不通过 --> | ||
| 87 | - {{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, scope.row.result) }} | ||
| 88 | - </el-tag> | ||
| 89 | - <el-tag type="info" v-if="scope.row.result === 4"> <!-- 撤回 --> | ||
| 90 | - {{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, scope.row.result) }} | ||
| 91 | - </el-tag> | ||
| 92 | - </span> | 79 | + <dict-tag :type="DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT" :value="scope.row.result"/> |
| 93 | </template> | 80 | </template> |
| 94 | </el-table-column> | 81 | </el-table-column> |
| 95 | <el-table-column label="提交时间" align="center" prop="createTime" width="180"> | 82 | <el-table-column label="提交时间" align="center" prop="createTime" width="180"> |
yudao-ui-admin/src/views/bpm/task/done.vue
| @@ -24,20 +24,7 @@ | @@ -24,20 +24,7 @@ | ||
| 24 | <el-table-column label="流程发起人" align="center" prop="processInstance.startUserNickname" width="120" /> | 24 | <el-table-column label="流程发起人" align="center" prop="processInstance.startUserNickname" width="120" /> |
| 25 | <el-table-column label="结果" align="center" prop="result"> | 25 | <el-table-column label="结果" align="center" prop="result"> |
| 26 | <template slot-scope="scope"> | 26 | <template slot-scope="scope"> |
| 27 | - <span> | ||
| 28 | - <el-tag type="primary" v-if="scope.row.result === 1"> <!-- 进行中 --> | ||
| 29 | - {{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, scope.row.result) }} | ||
| 30 | - </el-tag> | ||
| 31 | - <el-tag type="success" v-if="scope.row.result === 2"> <!-- 通过 --> | ||
| 32 | - {{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, scope.row.result) }} | ||
| 33 | - </el-tag> | ||
| 34 | - <el-tag type="danger" v-if="scope.row.result === 3"> <!-- 不通过 --> | ||
| 35 | - {{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, scope.row.result) }} | ||
| 36 | - </el-tag> | ||
| 37 | - <el-tag type="info" v-if="scope.row.result === 4"> <!-- 撤回 --> | ||
| 38 | - {{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, scope.row.result) }} | ||
| 39 | - </el-tag> | ||
| 40 | - </span> | 27 | + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.result"/> |
| 41 | </template> | 28 | </template> |
| 42 | </el-table-column> | 29 | </el-table-column> |
| 43 | <el-table-column label="审批意见" align="center" prop="comment" width="200" /> | 30 | <el-table-column label="审批意见" align="center" prop="comment" width="200" /> |
yudao-ui-admin/src/views/system/dept/index.vue
| @@ -25,9 +25,13 @@ | @@ -25,9 +25,13 @@ | ||
| 25 | <el-table v-loading="loading" :data="deptList" row-key="id" default-expand-all | 25 | <el-table v-loading="loading" :data="deptList" row-key="id" default-expand-all |
| 26 | :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> | 26 | :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> |
| 27 | <el-table-column prop="name" label="部门名称" width="260"></el-table-column> | 27 | <el-table-column prop="name" label="部门名称" width="260"></el-table-column> |
| 28 | - <el-table-column prop="status" label="负责人" :formatter="userNicknameFormat" width="120"/> | 28 | + <el-table-column prop="leader" label="负责人" :formatter="userNicknameFormat" width="120"/> |
| 29 | <el-table-column prop="sort" label="排序" width="200"></el-table-column> | 29 | <el-table-column prop="sort" label="排序" width="200"></el-table-column> |
| 30 | - <el-table-column prop="status" label="状态" :formatter="statusFormat" width="100"/> | 30 | + <el-table-column prop="status" label="状态" width="100"> |
| 31 | + <template slot-scope="scope"> | ||
| 32 | + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> | ||
| 33 | + </template> | ||
| 34 | + </el-table-column> | ||
| 31 | <el-table-column label="创建时间" align="center" prop="createTime" width="200"> | 35 | <el-table-column label="创建时间" align="center" prop="createTime" width="200"> |
| 32 | <template slot-scope="scope"> | 36 | <template slot-scope="scope"> |
| 33 | <span>{{ parseTime(scope.row.createTime) }}</span> | 37 | <span>{{ parseTime(scope.row.createTime) }}</span> |
| @@ -105,7 +109,7 @@ import Treeselect from "@riophae/vue-treeselect"; | @@ -105,7 +109,7 @@ import Treeselect from "@riophae/vue-treeselect"; | ||
| 105 | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; | 109 | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| 106 | 110 | ||
| 107 | import {CommonStatusEnum} from '@/utils/constants' | 111 | import {CommonStatusEnum} from '@/utils/constants' |
| 108 | -import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict' | 112 | +import { getDictDatas, DICT_TYPE } from '@/utils/dict' |
| 109 | import {listSimpleUsers} from "@/api/system/user"; | 113 | import {listSimpleUsers} from "@/api/system/user"; |
| 110 | 114 | ||
| 111 | export default { | 115 | export default { |
| @@ -199,10 +203,6 @@ export default { | @@ -199,10 +203,6 @@ export default { | ||
| 199 | children: node.children | 203 | children: node.children |
| 200 | }; | 204 | }; |
| 201 | }, | 205 | }, |
| 202 | - // 字典状态字典翻译 | ||
| 203 | - statusFormat(row, column) { | ||
| 204 | - return getDictDataLabel(DICT_TYPE.COMMON_STATUS, row.status) | ||
| 205 | - }, | ||
| 206 | // 用户昵称展示 | 206 | // 用户昵称展示 |
| 207 | userNicknameFormat(row, column) { | 207 | userNicknameFormat(row, column) { |
| 208 | if (!row.leaderUserId) { | 208 | if (!row.leaderUserId) { |
yudao-ui-admin/src/views/system/dict/data.vue
| @@ -108,7 +108,7 @@ import { listData, getData, delData, addData, updateData, exportData } from "@/a | @@ -108,7 +108,7 @@ import { listData, getData, delData, addData, updateData, exportData } from "@/a | ||
| 108 | import { listAllSimple, getType } from "@/api/system/dict/type"; | 108 | import { listAllSimple, getType } from "@/api/system/dict/type"; |
| 109 | 109 | ||
| 110 | import { CommonStatusEnum } from '@/utils/constants' | 110 | import { CommonStatusEnum } from '@/utils/constants' |
| 111 | -import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict' | 111 | +import { getDictDatas, DICT_TYPE } from '@/utils/dict' |
| 112 | 112 | ||
| 113 | export default { | 113 | export default { |
| 114 | name: "Data", | 114 | name: "Data", |
yudao-ui-admin/src/views/system/dict/index.vue
| @@ -44,7 +44,11 @@ | @@ -44,7 +44,11 @@ | ||
| 44 | </router-link> | 44 | </router-link> |
| 45 | </template> | 45 | </template> |
| 46 | </el-table-column> | 46 | </el-table-column> |
| 47 | - <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" /> | 47 | + <el-table-column label="状态" align="center" prop="status"> |
| 48 | + <template slot-scope="scope"> | ||
| 49 | + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> | ||
| 50 | + </template> | ||
| 51 | + </el-table-column> | ||
| 48 | <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> | 52 | <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> |
| 49 | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> | 53 | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
| 50 | <template slot-scope="scope"> | 54 | <template slot-scope="scope"> |
| @@ -94,7 +98,7 @@ | @@ -94,7 +98,7 @@ | ||
| 94 | import { listType, getType, delType, addType, updateType, exportType } from "@/api/system/dict/type"; | 98 | import { listType, getType, delType, addType, updateType, exportType } from "@/api/system/dict/type"; |
| 95 | 99 | ||
| 96 | import { CommonStatusEnum } from '@/utils/constants' | 100 | import { CommonStatusEnum } from '@/utils/constants' |
| 97 | -import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict' | 101 | +import { getDictDatas, DICT_TYPE } from '@/utils/dict' |
| 98 | 102 | ||
| 99 | export default { | 103 | export default { |
| 100 | name: "Dict", | 104 | name: "Dict", |
| @@ -161,10 +165,6 @@ export default { | @@ -161,10 +165,6 @@ export default { | ||
| 161 | this.loading = false; | 165 | this.loading = false; |
| 162 | }); | 166 | }); |
| 163 | }, | 167 | }, |
| 164 | - // 字典状态字典翻译 | ||
| 165 | - statusFormat(row, column) { | ||
| 166 | - return getDictDataLabel(DICT_TYPE.COMMON_STATUS, row.status) | ||
| 167 | - }, | ||
| 168 | // 取消按钮 | 168 | // 取消按钮 |
| 169 | cancel() { | 169 | cancel() { |
| 170 | this.open = false; | 170 | this.open = false; |
yudao-ui-admin/src/views/system/loginlog/index.vue
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | <el-table-column label="访问编号" align="center" prop="id" /> | 37 | <el-table-column label="访问编号" align="center" prop="id" /> |
| 38 | <el-table-column label="日志类型" align="center" prop="logType"> | 38 | <el-table-column label="日志类型" align="center" prop="logType"> |
| 39 | <template slot-scope="scope"> | 39 | <template slot-scope="scope"> |
| 40 | - <span>{{ getDictDataLabel(DICT_TYPE.SYSTEM_LOGIN_TYPE, scope.row.logType) }}</span> | 40 | + <dict-tag :type="DICT_TYPE.SYSTEM_LOGIN_TYPE" :value="scope.row.logType" /> |
| 41 | </template> | 41 | </template> |
| 42 | </el-table-column> | 42 | </el-table-column> |
| 43 | <el-table-column label="用户名称" align="center" prop="username" /> | 43 | <el-table-column label="用户名称" align="center" prop="username" /> |
| @@ -45,8 +45,7 @@ | @@ -45,8 +45,7 @@ | ||
| 45 | <el-table-column label="userAgent" align="center" prop="userAgent" width="400" :show-overflow-tooltip="true" /> | 45 | <el-table-column label="userAgent" align="center" prop="userAgent" width="400" :show-overflow-tooltip="true" /> |
| 46 | <el-table-column label="结果" align="center" prop="status"> | 46 | <el-table-column label="结果" align="center" prop="status"> |
| 47 | <template slot-scope="scope"> | 47 | <template slot-scope="scope"> |
| 48 | - <span v-if="scope.row.result === 0">成功</span> | ||
| 49 | - <span v-if="scope.row.result > 0">失败:{{ getDictDataLabel(DICT_TYPE.SYSTEM_LOGIN_RESULT, scope.row.result) }} </span> | 48 | + <dict-tag :type="DICT_TYPE.SYSTEM_LOGIN_RESULT" :value="scope.row.result" /> |
| 50 | </template> | 49 | </template> |
| 51 | </el-table-column> | 50 | </el-table-column> |
| 52 | <el-table-column label="登录日期" align="center" prop="loginTime" width="180"> | 51 | <el-table-column label="登录日期" align="center" prop="loginTime" width="180"> |
| @@ -109,10 +108,6 @@ export default { | @@ -109,10 +108,6 @@ export default { | ||
| 109 | } | 108 | } |
| 110 | ); | 109 | ); |
| 111 | }, | 110 | }, |
| 112 | - // 登录状态字典翻译 | ||
| 113 | - statusFormat(row, column) { | ||
| 114 | - return this.selectDictLabel(this.statusOptions, row.status); | ||
| 115 | - }, | ||
| 116 | /** 搜索按钮操作 */ | 111 | /** 搜索按钮操作 */ |
| 117 | handleQuery() { | 112 | handleQuery() { |
| 118 | this.queryParams.pageNo = 1; | 113 | this.queryParams.pageNo = 1; |
yudao-ui-admin/src/views/system/menu/index.vue
| @@ -34,7 +34,11 @@ | @@ -34,7 +34,11 @@ | ||
| 34 | <el-table-column prop="sort" label="排序" width="60"></el-table-column> | 34 | <el-table-column prop="sort" label="排序" width="60"></el-table-column> |
| 35 | <el-table-column prop="permission" label="权限标识" :show-overflow-tooltip="true"></el-table-column> | 35 | <el-table-column prop="permission" label="权限标识" :show-overflow-tooltip="true"></el-table-column> |
| 36 | <el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column> | 36 | <el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column> |
| 37 | - <el-table-column prop="status" label="状态" :formatter="statusFormat" width="80"></el-table-column> | 37 | + <el-table-column prop="status" label="状态" width="80"> |
| 38 | + <template slot-scope="scope"> | ||
| 39 | + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> | ||
| 40 | + </template> | ||
| 41 | + </el-table-column> | ||
| 38 | <el-table-column label="创建时间" align="center" prop="createTime"> | 42 | <el-table-column label="创建时间" align="center" prop="createTime"> |
| 39 | <template slot-scope="scope"> | 43 | <template slot-scope="scope"> |
| 40 | <span>{{ parseTime(scope.row.createTime) }}</span> | 44 | <span>{{ parseTime(scope.row.createTime) }}</span> |
| @@ -132,7 +136,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css"; | @@ -132,7 +136,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css"; | ||
| 132 | import IconSelect from "@/components/IconSelect"; | 136 | import IconSelect from "@/components/IconSelect"; |
| 133 | 137 | ||
| 134 | import { SystemMenuTypeEnum, CommonStatusEnum } from '@/utils/constants' | 138 | import { SystemMenuTypeEnum, CommonStatusEnum } from '@/utils/constants' |
| 135 | -import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict' | 139 | +import { getDictDatas, DICT_TYPE } from '@/utils/dict' |
| 136 | 140 | ||
| 137 | export default { | 141 | export default { |
| 138 | name: "Menu", | 142 | name: "Menu", |
| @@ -218,10 +222,6 @@ export default { | @@ -218,10 +222,6 @@ export default { | ||
| 218 | this.menuOptions.push(menu); | 222 | this.menuOptions.push(menu); |
| 219 | }); | 223 | }); |
| 220 | }, | 224 | }, |
| 221 | - // 菜单状态字典翻译 | ||
| 222 | - statusFormat(row, column) { | ||
| 223 | - return getDictDataLabel(DICT_TYPE.COMMON_STATUS, row.status) | ||
| 224 | - }, | ||
| 225 | // 取消按钮 | 225 | // 取消按钮 |
| 226 | cancel() { | 226 | cancel() { |
| 227 | this.open = false; | 227 | this.open = false; |
yudao-ui-admin/src/views/system/notice/index.vue
| @@ -29,8 +29,16 @@ | @@ -29,8 +29,16 @@ | ||
| 29 | <el-table v-loading="loading" :data="noticeList"> | 29 | <el-table v-loading="loading" :data="noticeList"> |
| 30 | <el-table-column label="序号" align="center" prop="id" width="100" /> | 30 | <el-table-column label="序号" align="center" prop="id" width="100" /> |
| 31 | <el-table-column label="公告标题" align="center" prop="title" :show-overflow-tooltip="true"/> | 31 | <el-table-column label="公告标题" align="center" prop="title" :show-overflow-tooltip="true"/> |
| 32 | - <el-table-column label="公告类型" align="center" prop="type" :formatter="typeFormat" width="100"/> | ||
| 33 | - <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" width="100"/> | 32 | + <el-table-column label="公告类型" align="center" prop="type" width="100"> |
| 33 | + <template slot-scope="scope"> | ||
| 34 | + <dict-tag :type="DICT_TYPE.SYSTEM_NOTICE_TYPE" :value="scope.row.type"/> | ||
| 35 | + </template> | ||
| 36 | + </el-table-column> | ||
| 37 | + <el-table-column label="状态" align="center" prop="status" width="100"> | ||
| 38 | + <template slot-scope="scope"> | ||
| 39 | + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> | ||
| 40 | + </template> | ||
| 41 | + </el-table-column> | ||
| 34 | <el-table-column label="创建者" align="center" prop="createBy" width="100" /> | 42 | <el-table-column label="创建者" align="center" prop="createBy" width="100" /> |
| 35 | <el-table-column label="创建时间" align="center" prop="createTime" width="100"> | 43 | <el-table-column label="创建时间" align="center" prop="createTime" width="100"> |
| 36 | <template slot-scope="scope"> | 44 | <template slot-scope="scope"> |
| @@ -102,7 +110,7 @@ import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api | @@ -102,7 +110,7 @@ import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api | ||
| 102 | import Editor from '@/components/Editor'; | 110 | import Editor from '@/components/Editor'; |
| 103 | 111 | ||
| 104 | import {CommonStatusEnum} from '@/utils/constants' | 112 | import {CommonStatusEnum} from '@/utils/constants' |
| 105 | -import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict' | 113 | +import { getDictDatas, DICT_TYPE } from '@/utils/dict' |
| 106 | 114 | ||
| 107 | export default { | 115 | export default { |
| 108 | name: "Notice", | 116 | name: "Notice", |
| @@ -163,14 +171,6 @@ export default { | @@ -163,14 +171,6 @@ export default { | ||
| 163 | this.loading = false; | 171 | this.loading = false; |
| 164 | }); | 172 | }); |
| 165 | }, | 173 | }, |
| 166 | - // 公告状态字典翻译 | ||
| 167 | - statusFormat(row, column) { | ||
| 168 | - return getDictDataLabel(DICT_TYPE.COMMON_STATUS, row.status) | ||
| 169 | - }, | ||
| 170 | - // 公告状态字典翻译 | ||
| 171 | - typeFormat(row, column) { | ||
| 172 | - return getDictDataLabel(DICT_TYPE.SYSTEM_NOTICE_TYPE, row.type) | ||
| 173 | - }, | ||
| 174 | // 取消按钮 | 174 | // 取消按钮 |
| 175 | cancel() { | 175 | cancel() { |
| 176 | this.open = false; | 176 | this.open = false; |
yudao-ui-admin/src/views/system/operatelog/index.vue
| @@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
| 45 | <el-table-column label="操作名" align="center" prop="name" width="180" /> | 45 | <el-table-column label="操作名" align="center" prop="name" width="180" /> |
| 46 | <el-table-column label="操作类型" align="center" prop="type"> | 46 | <el-table-column label="操作类型" align="center" prop="type"> |
| 47 | <template slot-scope="scope"> | 47 | <template slot-scope="scope"> |
| 48 | - <span>{{ getDictDataLabel(DICT_TYPE.SYSTEM_OPERATE_TYPE, scope.row.type) }}</span> | 48 | + <dict-tag :type="DICT_TYPE.SYSTEM_OPERATE_TYPE" :value="scope.row.type"/> |
| 49 | </template> | 49 | </template> |
| 50 | </el-table-column> | 50 | </el-table-column> |
| 51 | <el-table-column label="操作人" align="center" prop="userNickname" /> | 51 | <el-table-column label="操作人" align="center" prop="userNickname" /> |
| @@ -72,13 +72,8 @@ | @@ -72,13 +72,8 @@ | ||
| 72 | </el-table-column> | 72 | </el-table-column> |
| 73 | </el-table> | 73 | </el-table> |
| 74 | 74 | ||
| 75 | - <pagination | ||
| 76 | - v-show="total>0" | ||
| 77 | - :total="total" | ||
| 78 | - :page.sync="queryParams.pageNo" | ||
| 79 | - :limit.sync="queryParams.pageSize" | ||
| 80 | - @pagination="getList" | ||
| 81 | - /> | 75 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" |
| 76 | + @pagination="getList" /> | ||
| 82 | 77 | ||
| 83 | <!-- 操作日志详细 --> | 78 | <!-- 操作日志详细 --> |
| 84 | <el-dialog title="访问日志详细" :visible.sync="open" width="700px" append-to-body> | 79 | <el-dialog title="访问日志详细" :visible.sync="open" width="700px" append-to-body> |
| @@ -95,7 +90,8 @@ | @@ -95,7 +90,8 @@ | ||
| 95 | </el-col> | 90 | </el-col> |
| 96 | <el-col :span="24"> | 91 | <el-col :span="24"> |
| 97 | <el-form-item label="操作信息:"> | 92 | <el-form-item label="操作信息:"> |
| 98 | - {{ form.module }} | {{ form.name }} | {{ getDictDataLabel(DICT_TYPE.SYSTEM_OPERATE_TYPE, form.type) }} | 93 | + {{ form.module }} | {{ form.name }} |
| 94 | + <dict-tag :type="DICT_TYPE.SYSTEM_OPERATE_TYPE" :value="form.type"/> | ||
| 99 | <br /> {{ form.content }} | 95 | <br /> {{ form.content }} |
| 100 | <br /> {{ form.exts }} | 96 | <br /> {{ form.exts }} |
| 101 | </el-form-item> | 97 | </el-form-item> |
| @@ -184,14 +180,6 @@ export default { | @@ -184,14 +180,6 @@ export default { | ||
| 184 | } | 180 | } |
| 185 | ); | 181 | ); |
| 186 | }, | 182 | }, |
| 187 | - // 操作日志状态字典翻译 | ||
| 188 | - statusFormat(row, column) { | ||
| 189 | - return this.selectDictLabel(this.statusOptions, row.status); | ||
| 190 | - }, | ||
| 191 | - // 操作日志类型字典翻译 | ||
| 192 | - typeFormat(row, column) { | ||
| 193 | - return this.selectDictLabel(this.typeOptions, row.businessType); | ||
| 194 | - }, | ||
| 195 | /** 搜索按钮操作 */ | 183 | /** 搜索按钮操作 */ |
| 196 | handleQuery() { | 184 | handleQuery() { |
| 197 | this.queryParams.pageNo = 1; | 185 | this.queryParams.pageNo = 1; |
yudao-ui-admin/src/views/system/post/index.vue
| @@ -35,7 +35,11 @@ | @@ -35,7 +35,11 @@ | ||
| 35 | <el-table-column label="岗位编码" align="center" prop="code" /> | 35 | <el-table-column label="岗位编码" align="center" prop="code" /> |
| 36 | <el-table-column label="岗位名称" align="center" prop="name" /> | 36 | <el-table-column label="岗位名称" align="center" prop="name" /> |
| 37 | <el-table-column label="岗位排序" align="center" prop="sort" /> | 37 | <el-table-column label="岗位排序" align="center" prop="sort" /> |
| 38 | - <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" /> | 38 | + <el-table-column label="状态" align="center" prop="status"> |
| 39 | + <template slot-scope="scope"> | ||
| 40 | + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> | ||
| 41 | + </template> | ||
| 42 | + </el-table-column> | ||
| 39 | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> | 43 | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
| 40 | <template slot-scope="scope"> | 44 | <template slot-scope="scope"> |
| 41 | <span>{{ parseTime(scope.row.createTime) }}</span> | 45 | <span>{{ parseTime(scope.row.createTime) }}</span> |
| @@ -88,7 +92,7 @@ | @@ -88,7 +92,7 @@ | ||
| 88 | import { listPost, getPost, delPost, addPost, updatePost, exportPost } from "@/api/system/post"; | 92 | import { listPost, getPost, delPost, addPost, updatePost, exportPost } from "@/api/system/post"; |
| 89 | 93 | ||
| 90 | import {CommonStatusEnum} from '@/utils/constants' | 94 | import {CommonStatusEnum} from '@/utils/constants' |
| 91 | -import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict' | 95 | +import { getDictDatas, DICT_TYPE } from '@/utils/dict' |
| 92 | 96 | ||
| 93 | export default { | 97 | export default { |
| 94 | name: "Post", | 98 | name: "Post", |
| @@ -152,10 +156,6 @@ export default { | @@ -152,10 +156,6 @@ export default { | ||
| 152 | this.loading = false; | 156 | this.loading = false; |
| 153 | }); | 157 | }); |
| 154 | }, | 158 | }, |
| 155 | - // 岗位状态字典翻译 | ||
| 156 | - statusFormat(row, column) { | ||
| 157 | - return getDictDataLabel(DICT_TYPE.COMMON_STATUS, row.status) | ||
| 158 | - }, | ||
| 159 | // 取消按钮 | 159 | // 取消按钮 |
| 160 | cancel() { | 160 | cancel() { |
| 161 | this.open = false; | 161 | this.open = false; |
yudao-ui-admin/src/views/system/role/index.vue
| @@ -40,7 +40,11 @@ | @@ -40,7 +40,11 @@ | ||
| 40 | <el-table-column label="角色编号" prop="id" width="120" /> | 40 | <el-table-column label="角色编号" prop="id" width="120" /> |
| 41 | <el-table-column label="角色名称" prop="name" :show-overflow-tooltip="true" width="150" /> | 41 | <el-table-column label="角色名称" prop="name" :show-overflow-tooltip="true" width="150" /> |
| 42 | <el-table-column label="角色标识" prop="code" :show-overflow-tooltip="true" width="150" /> | 42 | <el-table-column label="角色标识" prop="code" :show-overflow-tooltip="true" width="150" /> |
| 43 | - <el-table-column label="角色类型" prop="type" :formatter="typeFormat" width="80"></el-table-column> | 43 | + <el-table-column label="角色类型" prop="type" width="80"> |
| 44 | + <template slot-scope="scope"> | ||
| 45 | + <dict-tag :type="DICT_TYPE.SYSTEM_ROLE_TYPE" :value="scope.row.type"/> | ||
| 46 | + </template> | ||
| 47 | + </el-table-column> | ||
| 44 | <el-table-column label="显示顺序" prop="sort" width="100" /> | 48 | <el-table-column label="显示顺序" prop="sort" width="100" /> |
| 45 | <el-table-column label="状态" align="center" width="100"> | 49 | <el-table-column label="状态" align="center" width="100"> |
| 46 | <template slot-scope="scope"> | 50 | <template slot-scope="scope"> |
| @@ -180,7 +184,7 @@ import {listSimpleMenus} from "@/api/system/menu"; | @@ -180,7 +184,7 @@ import {listSimpleMenus} from "@/api/system/menu"; | ||
| 180 | import {assignRoleMenu, listRoleMenus, assignRoleDataScope} from "@/api/system/permission"; | 184 | import {assignRoleMenu, listRoleMenus, assignRoleDataScope} from "@/api/system/permission"; |
| 181 | import {listSimpleDepts} from "@/api/system/dept"; | 185 | import {listSimpleDepts} from "@/api/system/dept"; |
| 182 | import {CommonStatusEnum, SystemDataScopeEnum} from "@/utils/constants"; | 186 | import {CommonStatusEnum, SystemDataScopeEnum} from "@/utils/constants"; |
| 183 | -import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"; | 187 | +import {DICT_TYPE, getDictDatas} from "@/utils/dict"; |
| 184 | 188 | ||
| 185 | export default { | 189 | export default { |
| 186 | name: "Role", | 190 | name: "Role", |
| @@ -287,10 +291,6 @@ export default { | @@ -287,10 +291,6 @@ export default { | ||
| 287 | : CommonStatusEnum.ENABLE; | 291 | : CommonStatusEnum.ENABLE; |
| 288 | }); | 292 | }); |
| 289 | }, | 293 | }, |
| 290 | - // 角色类型字典翻译 | ||
| 291 | - typeFormat(row, column) { | ||
| 292 | - return getDictDataLabel(DICT_TYPE.SYSTEM_ROLE_TYPE, row.type) | ||
| 293 | - }, | ||
| 294 | // 取消按钮 | 294 | // 取消按钮 |
| 295 | cancel() { | 295 | cancel() { |
| 296 | this.open = false; | 296 | this.open = false; |
yudao-ui-admin/src/views/system/sms/smsChannel.vue
| @@ -37,12 +37,12 @@ | @@ -37,12 +37,12 @@ | ||
| 37 | <el-table-column label="短信签名" align="center" prop="signature" /> | 37 | <el-table-column label="短信签名" align="center" prop="signature" /> |
| 38 | <el-table-column label="渠道编码" align="center" prop="code"> | 38 | <el-table-column label="渠道编码" align="center" prop="code"> |
| 39 | <template slot-scope="scope"> | 39 | <template slot-scope="scope"> |
| 40 | - <span>{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, scope.row.code) }}</span> | 40 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE" :value="scope.row.code"/> |
| 41 | </template> | 41 | </template> |
| 42 | </el-table-column>> | 42 | </el-table-column>> |
| 43 | <el-table-column label="启用状态" align="center" prop="status"> | 43 | <el-table-column label="启用状态" align="center" prop="status"> |
| 44 | <template slot-scope="scope"> | 44 | <template slot-scope="scope"> |
| 45 | - <span>{{ getDictDataLabel(DICT_TYPE.COMMON_STATUS, scope.row.status) }}</span> | 45 | + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> |
| 46 | </template> | 46 | </template> |
| 47 | </el-table-column>> | 47 | </el-table-column>> |
| 48 | <el-table-column label="备注" align="center" prop="remark" /> | 48 | <el-table-column label="备注" align="center" prop="remark" /> |
yudao-ui-admin/src/views/system/sms/smsLog.vue
| @@ -67,33 +67,33 @@ | @@ -67,33 +67,33 @@ | ||
| 67 | <template slot-scope="scope"> | 67 | <template slot-scope="scope"> |
| 68 | <div>{{ scope.row.mobile }}</div> | 68 | <div>{{ scope.row.mobile }}</div> |
| 69 | <div v-if="scope.row.userType && scope.row.userId"> | 69 | <div v-if="scope.row.userType && scope.row.userId"> |
| 70 | - {{ getDictDataLabel(DICT_TYPE.USER_TYPE, scope.row.userType) + '(' + scope.row.userId + ')' }} | 70 | + <dict-tag :type="DICT_TYPE.USER_TYPE" :value="scope.row.userType"/>{{ '(' + scope.row.userId + ')' }} |
| 71 | </div> | 71 | </div> |
| 72 | </template> | 72 | </template> |
| 73 | </el-table-column> | 73 | </el-table-column> |
| 74 | <el-table-column label="短信内容" align="center" prop="templateContent" width="300" /> | 74 | <el-table-column label="短信内容" align="center" prop="templateContent" width="300" /> |
| 75 | <el-table-column label="发送状态" align="center" width="180"> | 75 | <el-table-column label="发送状态" align="center" width="180"> |
| 76 | <template slot-scope="scope"> | 76 | <template slot-scope="scope"> |
| 77 | - <div>{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_SEND_STATUS, scope.row.sendStatus) }}</div> | 77 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_SEND_STATUS" :value="scope.row.sendStatus"/> |
| 78 | <div>{{ parseTime(scope.row.sendTime) }}</div> | 78 | <div>{{ parseTime(scope.row.sendTime) }}</div> |
| 79 | </template> | 79 | </template> |
| 80 | </el-table-column> | 80 | </el-table-column> |
| 81 | <el-table-column label="接收状态" align="center" width="180"> | 81 | <el-table-column label="接收状态" align="center" width="180"> |
| 82 | <template slot-scope="scope"> | 82 | <template slot-scope="scope"> |
| 83 | - <div>{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS, scope.row.receiveStatus) }}</div> | 83 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS" :value="scope.row.receiveStatus"/> |
| 84 | <div>{{ parseTime(scope.row.receiveTime) }}</div> | 84 | <div>{{ parseTime(scope.row.receiveTime) }}</div> |
| 85 | </template> | 85 | </template> |
| 86 | </el-table-column> | 86 | </el-table-column> |
| 87 | <el-table-column label="短信渠道" align="center" width="120"> | 87 | <el-table-column label="短信渠道" align="center" width="120"> |
| 88 | <template slot-scope="scope"> | 88 | <template slot-scope="scope"> |
| 89 | <div>{{ formatChannelSignature(scope.row.channelId) }}</div> | 89 | <div>{{ formatChannelSignature(scope.row.channelId) }}</div> |
| 90 | - <div>【{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, scope.row.channelCode) }}】</div> | 90 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE" :value="scope.row.channelCode"/> |
| 91 | </template> | 91 | </template> |
| 92 | </el-table-column> | 92 | </el-table-column> |
| 93 | <el-table-column label="模板编号" align="center" prop="templateId" /> | 93 | <el-table-column label="模板编号" align="center" prop="templateId" /> |
| 94 | <el-table-column label="短信类型" align="center" prop="templateType"> | 94 | <el-table-column label="短信类型" align="center" prop="templateType"> |
| 95 | <template slot-scope="scope"> | 95 | <template slot-scope="scope"> |
| 96 | - <span>{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE, scope.row.templateType) }}</span> | 96 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE" :value="scope.row.templateType"/> |
| 97 | </template> | 97 | </template> |
| 98 | </el-table-column> | 98 | </el-table-column> |
| 99 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | 99 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| @@ -116,15 +116,14 @@ | @@ -116,15 +116,14 @@ | ||
| 116 | </el-col> | 116 | </el-col> |
| 117 | <el-col :span="24"> | 117 | <el-col :span="24"> |
| 118 | <el-form-item label="短信渠道:"> | 118 | <el-form-item label="短信渠道:"> |
| 119 | - {{ | ||
| 120 | - formatChannelSignature(form.channelId) | ||
| 121 | - }}【{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, form.channelCode) }}】 | 119 | + {{formatChannelSignature(form.channelId) }} |
| 120 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE" :value="form.channelCode"/> | ||
| 122 | </el-form-item> | 121 | </el-form-item> |
| 123 | </el-col> | 122 | </el-col> |
| 124 | <el-col :span="24"> | 123 | <el-col :span="24"> |
| 125 | <el-form-item label="短信模板:"> | 124 | <el-form-item label="短信模板:"> |
| 126 | - {{ form.templateId }} | {{ form.templateCode }} | | ||
| 127 | - {{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE, form.templateType) }} | 125 | + {{ form.templateId }} | {{ form.templateCode }} |
| 126 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE" :value="form.templateType"/> | ||
| 128 | </el-form-item> | 127 | </el-form-item> |
| 129 | </el-col> | 128 | </el-col> |
| 130 | <el-col :span="24"> | 129 | <el-col :span="24"> |
| @@ -132,7 +131,9 @@ | @@ -132,7 +131,9 @@ | ||
| 132 | </el-col> | 131 | </el-col> |
| 133 | <el-col :span="24"> | 132 | <el-col :span="24"> |
| 134 | <el-form-item label="用户信息:">{{ form.mobile }} | 133 | <el-form-item label="用户信息:">{{ form.mobile }} |
| 135 | - <span v-if="form.userType && form.userId"> | {{ getDictDataLabel(DICT_TYPE.USER_TYPE, form.userType) }} | {{ form.userId }}</span> | 134 | + <span v-if="form.userType && form.userId"> |
| 135 | + <dict-tag :type="DICT_TYPE.USER_TYPE" :value="form.userType"/>({{ form.userId }}) | ||
| 136 | + </span> | ||
| 136 | </el-form-item> | 137 | </el-form-item> |
| 137 | </el-col> | 138 | </el-col> |
| 138 | <el-col :span="24"> | 139 | <el-col :span="24"> |
| @@ -145,7 +146,9 @@ | @@ -145,7 +146,9 @@ | ||
| 145 | <el-form-item label="创建时间:">{{ parseTime(form.createTime) }}</el-form-item> | 146 | <el-form-item label="创建时间:">{{ parseTime(form.createTime) }}</el-form-item> |
| 146 | </el-col> | 147 | </el-col> |
| 147 | <el-col :span="24"> | 148 | <el-col :span="24"> |
| 148 | - <el-form-item label="发送状态:">{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_SEND_STATUS, form.sendStatus) }}</el-form-item> | 149 | + <el-form-item label="发送状态:"> |
| 150 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_SEND_STATUS" :value="form.sendStatus"/> | ||
| 151 | + </el-form-item> | ||
| 149 | </el-col> | 152 | </el-col> |
| 150 | <el-col :span="24"> | 153 | <el-col :span="24"> |
| 151 | <el-form-item label="发送时间:">{{ parseTime(form.sendTime) }}</el-form-item> | 154 | <el-form-item label="发送时间:">{{ parseTime(form.sendTime) }}</el-form-item> |
| @@ -164,7 +167,9 @@ | @@ -164,7 +167,9 @@ | ||
| 164 | <el-form-item label="API 请求编号:">{{ form.apiRequestId }}</el-form-item> | 167 | <el-form-item label="API 请求编号:">{{ form.apiRequestId }}</el-form-item> |
| 165 | </el-col> | 168 | </el-col> |
| 166 | <el-col :span="24"> | 169 | <el-col :span="24"> |
| 167 | - <el-form-item label="接收状态:">{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS, form.receiveStatus) }}</el-form-item> | 170 | + <el-form-item label="接收状态:"> |
| 171 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS" :value="form.receiveStatus"/> | ||
| 172 | + </el-form-item> | ||
| 168 | </el-col> | 173 | </el-col> |
| 169 | <el-col :span="24"> | 174 | <el-col :span="24"> |
| 170 | <el-form-item label="接收时间:">{{ parseTime(form.receiveTime) }}</el-form-item> | 175 | <el-form-item label="接收时间:">{{ parseTime(form.receiveTime) }}</el-form-item> |
yudao-ui-admin/src/views/system/sms/smsTemplate.vue
| @@ -58,12 +58,12 @@ | @@ -58,12 +58,12 @@ | ||
| 58 | <el-table-column label="模板内容" align="center" prop="content" width="300" /> | 58 | <el-table-column label="模板内容" align="center" prop="content" width="300" /> |
| 59 | <el-table-column label="短信类型" align="center" prop="type"> | 59 | <el-table-column label="短信类型" align="center" prop="type"> |
| 60 | <template slot-scope="scope"> | 60 | <template slot-scope="scope"> |
| 61 | - <span>{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE, scope.row.type) }}</span> | 61 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE" :value="scope.row.type"/> |
| 62 | </template> | 62 | </template> |
| 63 | </el-table-column> | 63 | </el-table-column> |
| 64 | <el-table-column label="开启状态" align="center" prop="status"> | 64 | <el-table-column label="开启状态" align="center" prop="status"> |
| 65 | <template slot-scope="scope"> | 65 | <template slot-scope="scope"> |
| 66 | - <span>{{ getDictDataLabel(DICT_TYPE.COMMON_STATUS, scope.row.status) }}</span> | 66 | + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> |
| 67 | </template> | 67 | </template> |
| 68 | </el-table-column> | 68 | </el-table-column> |
| 69 | <el-table-column label="备注" align="center" prop="remark" /> | 69 | <el-table-column label="备注" align="center" prop="remark" /> |
| @@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
| 71 | <el-table-column label="短信渠道" align="center" width="120"> | 71 | <el-table-column label="短信渠道" align="center" width="120"> |
| 72 | <template slot-scope="scope"> | 72 | <template slot-scope="scope"> |
| 73 | <div>{{ formatChannelSignature(scope.row.channelId) }}</div> | 73 | <div>{{ formatChannelSignature(scope.row.channelId) }}</div> |
| 74 | - <div>【{{ getDictDataLabel(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE, scope.row.channelCode) }}】</div> | 74 | + <dict-tag :type="DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE" :value="scope.row.channelCode"/> |
| 75 | </template> | 75 | </template> |
| 76 | </el-table-column> | 76 | </el-table-column> |
| 77 | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> | 77 | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
yudao-ui-admin/src/views/system/tenant/index.vue
| @@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
| 49 | <el-table-column label="联系手机" align="center" prop="contactMobile" /> | 49 | <el-table-column label="联系手机" align="center" prop="contactMobile" /> |
| 50 | <el-table-column label="租户状态" align="center" prop="status"> | 50 | <el-table-column label="租户状态" align="center" prop="status"> |
| 51 | <template slot-scope="scope"> | 51 | <template slot-scope="scope"> |
| 52 | - <span>{{ getDictDataLabel(DICT_TYPE.COMMON_STATUS, scope.row.status) }}</span> | 52 | + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/> |
| 53 | </template> | 53 | </template> |
| 54 | </el-table-column> | 54 | </el-table-column> |
| 55 | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> | 55 | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
更新日志.md
| @@ -35,6 +35,7 @@ | @@ -35,6 +35,7 @@ | ||
| 35 | * 【新增】前端的表格右侧工具栏组件支持显隐列,具体可见【用户管理】功能 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/20e34e35a3bdc48e6a4c58e3849aa729bd18efe5) | 35 | * 【新增】前端的表格右侧工具栏组件支持显隐列,具体可见【用户管理】功能 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/20e34e35a3bdc48e6a4c58e3849aa729bd18efe5) |
| 36 | * 【新增】前端的菜单导航显示风格 TopNav(false 为 左侧导航菜单,true 为顶部导航菜单),支持布局的保存与重置 [commit1](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/4bf5b04d542014a49c5a41b20935cef35033a518) [commit2](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/cff4391f2d7830770731c0034085c0f77ea8c68e) | 36 | * 【新增】前端的菜单导航显示风格 TopNav(false 为 左侧导航菜单,true 为顶部导航菜单),支持布局的保存与重置 [commit1](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/4bf5b04d542014a49c5a41b20935cef35033a518) [commit2](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/cff4391f2d7830770731c0034085c0f77ea8c68e) |
| 37 | * 【新增】前端的网页标题支持根据选择的菜单,动态展示标题 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/7bf9a85263e0c44b2bc88485b83557c129583f5c) | 37 | * 【新增】前端的网页标题支持根据选择的菜单,动态展示标题 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/7bf9a85263e0c44b2bc88485b83557c129583f5c) |
| 38 | +* 【新增】字典标签样式回显,例如说开启的状态展示为 primary 蓝色,禁用的状态为 info 灰色 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/986d1328e0a0d37e2de2fb9d937faeed9d9bee7b) | ||
| 38 | * 【新增】前端的 iframe 组件,方便内嵌网页 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/4a8129bffa9e3928c56333e29f5874f55a079764) | 39 | * 【新增】前端的 iframe 组件,方便内嵌网页 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/4a8129bffa9e3928c56333e29f5874f55a079764) |
| 39 | 40 | ||
| 40 | ### 🐞 Bug Fixes | 41 | ### 🐞 Bug Fixes |