Commit b267b2c347b4dc3df143a65e550e69c1efaebcd1

Authored by YunaiV
1 parent 08a35704

v3.6.0 增加字典标签样式回显

yudao-ui-admin/src/views/bpm/group/index.vue
... ... @@ -45,7 +45,7 @@
45 45 </el-table-column>
46 46 <el-table-column label="状态" align="center" prop="status">
47 47 <template slot-scope="scope">
48   - <span>{{ getDictDataLabel(DICT_TYPE.COMMON_STATUS, scope.row.status) }}</span>
  48 + <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
49 49 </template>
50 50 </el-table-column>
51 51 <el-table-column label="创建时间" align="center" prop="createTime" width="180">
... ...
yudao-ui-admin/src/views/infra/apiAccessLog/index.vue
... ... @@ -49,7 +49,7 @@
49 49 <el-table-column label="用户编号" align="center" prop="userId" />
50 50 <el-table-column label="用户类型" align="center" prop="userType">
51 51 <template slot-scope="scope">
52   - <span>{{ getDictDataLabel(DICT_TYPE.USER_TYPE, scope.row.userType) }}</span>
  52 + <dict-tag :type="DICT_TYPE.USER_TYPE" :value="scope.row.userType"/>
53 53 </template>
54 54 </el-table-column>>
55 55 <el-table-column label="应用名" align="center" prop="applicationName" />
... ... @@ -90,7 +90,7 @@
90 90 <el-form-item label="链路追踪:">{{ form.traceId }}</el-form-item>
91 91 <el-form-item label="应用名:">{{ form.applicationName }}</el-form-item>
92 92 <el-form-item label="用户信息:">
93   - {{ form.userId }} | {{ getDictDataLabel(DICT_TYPE.USER_TYPE, form.userType) }} | {{ form.userIp }} | {{ form.userAgent}}
  93 + {{ form.userId }} <dict-tag :type="DICT_TYPE.USER_TYPE" :value="form.userType"/> | {{ form.userIp }} | {{ form.userAgent}}
94 94 </el-form-item>
95 95 <el-form-item label="请求信息:">{{ form.requestMethod }} | {{ form.requestUrl }} </el-form-item>
96 96 <el-form-item label="请求参数:">{{ form.requestParams }}</el-form-item>
... ...
yudao-ui-admin/src/views/infra/apiErrorLog/index.vue
... ... @@ -49,7 +49,7 @@
49 49 <el-table-column label="用户编号" align="center" prop="userId" />
50 50 <el-table-column label="用户类型" align="center" prop="userType">
51 51 <template slot-scope="scope">
52   - <span>{{ getDictDataLabel(DICT_TYPE.USER_TYPE, scope.row.userType) }}</span>
  52 + <dict-tag :type="DICT_TYPE.USER_TYPE" :value="scope.row.userType"/>
53 53 </template>
54 54 </el-table-column>>
55 55 <el-table-column label="应用名" align="center" prop="applicationName" />
... ...
yudao-ui-admin/src/views/infra/config/index.vue
... ... @@ -57,7 +57,7 @@
57 57 <el-table-column label="参数键值" align="center" prop="value" />
58 58 <el-table-column label="系统内置" align="center" prop="type">
59 59 <template slot-scope="scope">
60   - <span>{{ getDictDataLabel(DICT_TYPE.INFRA_CONFIG_TYPE, scope.row.type) }}</span>
  60 + <dict-tag :type="DICT_TYPE.INFRA_CONFIG_TYPE" :value="scope.row.type" />
61 61 </template>
62 62 </el-table-column>
63 63 <el-table-column label="是否敏感" align="center" prop="sensitive">
... ...
yudao-ui-admin/src/views/infra/job/index.vue
... ... @@ -40,7 +40,7 @@
40 40 <el-table-column label="任务名称" align="center" prop="name" />
41 41 <el-table-column label="任务状态" align="center" prop="status">
42 42 <template slot-scope="scope">
43   - <span>{{ getDictDataLabel(DICT_TYPE.INFRA_JOB_STATUS, scope.row.status) }}</span>
  43 + <dict-tag :type="DICT_TYPE.INFRA_JOB_STATUS" :value="scope.row.status" />
44 44 </template>
45 45 </el-table-column>>
46 46 <el-table-column label="处理器的名字" align="center" prop="handlerName" />
... ... @@ -107,7 +107,9 @@
107 107 <el-col :span="24">
108 108 <el-form-item label="任务编号:">{{ form.id }}</el-form-item>
109 109 <el-form-item label="任务名称:">{{ form.name }}</el-form-item>
110   - <el-form-item label="任务名称:">{{ getDictDataLabel(DICT_TYPE.INFRA_JOB_STATUS, form.status) }}</el-form-item>
  110 + <el-form-item label="任务名称:">
  111 + <dict-tag :type="DICT_TYPE.INFRA_JOB_STATUS" :value="form.status" />
  112 + </el-form-item>
111 113 <el-form-item label="处理器的名字:">{{ form.handlerName }}</el-form-item>
112 114 <el-form-item label="处理器的参数:">{{ form.handlerParam }}</el-form-item>
113 115 <el-form-item label="cron表达式:">{{ form.cronExpression }}</el-form-item>
... ...
yudao-ui-admin/src/views/infra/job/log.vue
... ... @@ -49,7 +49,7 @@
49 49 </el-table-column>
50 50 <el-table-column label="任务状态" align="center" prop="status">
51 51 <template slot-scope="scope">
52   - <span>{{ getDictDataLabel(DICT_TYPE.INFRA_JOB_LOG_STATUS, scope.row.status) }}</span>
  52 + <dict-tag :type="DICT_TYPE.INFRA_JOB_LOG_STATUS" :value="scope.row.status" />
53 53 </template>
54 54 </el-table-column>
55 55 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
... ... @@ -75,7 +75,9 @@
75 75 <el-form-item label="第几次执行:">{{ form.executeIndex }}</el-form-item>
76 76 <el-form-item label="执行时间:">{{ parseTime(form.beginTime) + ' ~ ' + parseTime(form.endTime) }}</el-form-item>
77 77 <el-form-item label="执行时长:">{{ parseTime(form.duration) + ' 毫秒' }}</el-form-item>
78   - <el-form-item label="任务状态:">{{ getDictDataLabel(DICT_TYPE.INFRA_JOB_LOG_STATUS, form.status) }}</el-form-item>
  78 + <el-form-item label="任务状态:">
  79 + <dict-tag :type="DICT_TYPE.INFRA_JOB_LOG_STATUS" :value="form.status" />
  80 + </el-form-item>
79 81 <el-form-item label="执行结果:">{{ form.result }}</el-form-item>
80 82 </el-col>
81 83 </el-row>
... ...
yudao-ui-admin/src/views/infra/redis/index.vue
... ... @@ -72,9 +72,9 @@
72 72 <el-table-column prop="keyTemplate" label="Key 模板" width="200" />
73 73 <el-table-column prop="keyType" label="Key 类型" width="100" />
74 74 <el-table-column prop="valueType" label="Value 类型" />
75   - <el-table-column prop="timeoutType" label="超时时间" width="150">
  75 + <el-table-column prop="timeoutType" label="超时时间" width="200">
76 76 <template slot-scope="scope">
77   - {{ getDictDataLabel(DICT_TYPE.INFRA_REDIS_TIMEOUT_TYPE, scope.row.timeoutType) }}
  77 + <dict-tag :type="DICT_TYPE.INFRA_REDIS_TIMEOUT_TYPE" :value="scope.row.timeoutType" />
78 78 <span v-if="scope.row.timeout > 0">({{ scope.row.timeout / 1000 }} 秒)</span>
79 79 </template>
80 80 </el-table-column>
... ...
yudao-ui-admin/src/views/pay/order/index.vue
... ... @@ -135,8 +135,9 @@
135 135 </el-table-column>
136 136 <el-table-column label="支付状态" align="center" prop="status">
137 137 <template slot-scope="scope">
138   - <span>{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_STATUS, scope.row.status) }}</span>
  138 + <dict-tag :type="DICT_TYPE.PAY_ORDER_STATUS" :value="scope.row.status" />
139 139 </template>
  140 +
140 141 </el-table-column>
141 142 <!-- <el-table-column label="退款状态" align="center" prop="refundStatus">-->
142 143 <!-- <template slot-scope="scope">-->
... ... @@ -145,7 +146,7 @@
145 146 <!-- </el-table-column>-->
146 147 <el-table-column label="回调状态" align="center" prop="notifyStatus" width="100">
147 148 <template slot-scope="scope">
148   - <span>{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS, scope.row.notifyStatus) }}</span>
  149 + <dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="scope.row.notifyStatus" />
149 150 </template>
150 151 </el-table-column>
151 152 <el-table-column label="创建时间" align="center" prop="createTime" width="100">
... ... @@ -200,14 +201,10 @@
200 201 {{ parseFloat(orderDetail.channelFeeRate / 100, 2) }}%
201 202 </el-descriptions-item>
202 203 <el-descriptions-item label="支付状态">
203   - <el-tag :type="statusType" size="small">
204   - {{ getDictDataLabel(DICT_TYPE.PAY_ORDER_STATUS, orderDetail.status) }}
205   - </el-tag>
  204 + <dict-tag :type="DICT_TYPE.PAY_ORDER_STATUS" :value="orderDetail.status" />
206 205 </el-descriptions-item>
207 206 <el-descriptions-item label="回调状态">
208   - <el-tag :type="notifyStatusType" size="small">
209   - {{ getDictDataLabel(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS, orderDetail.notifyStatus) }}
210   - </el-tag>
  207 + <dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="orderDetail.notifyStatus" />
211 208 </el-descriptions-item>
212 209 <el-descriptions-item label="回调地址">{{ orderDetail.notifyUrl }}</el-descriptions-item>
213 210 <el-descriptions-item label="创建时间">{{ parseTime(orderDetail.createTime) }}</el-descriptions-item>
... ... @@ -220,9 +217,7 @@
220 217 <el-descriptions-item label="支付渠道">{{ orderDetail.channelCodeName }}</el-descriptions-item>
221 218 <el-descriptions-item label="支付IP">{{ orderDetail.userIp }}</el-descriptions-item>
222 219 <el-descriptions-item label="退款状态">
223   - <el-tag :type="refundStatusType" size="small">
224   - {{ getDictDataLabel(DICT_TYPE.PAY_ORDER_REFUND_STATUS, orderDetail.refundStatus) }}
225   - </el-tag>
  220 + <dict-tag :type="DICT_TYPE.PAY_ORDER_REFUND_STATUS" :value="orderDetail.refundStatus" />
226 221 </el-descriptions-item>
227 222 <el-descriptions-item label="退款次数">{{ orderDetail.refundTimes }}</el-descriptions-item>
228 223 <el-descriptions-item label="退款金额">
... ... @@ -341,12 +336,6 @@ export default {
341 336 // 订单退款状态字典数据集合
342 337 payOrderRefundDictDatum: getDictDatas(DICT_TYPE.PAY_ORDER_REFUND_STATUS),
343 338 orderDetail: JSON.parse(JSON.stringify(defaultOrderDetail)),
344   - // el-tag订单状态type值
345   - statusType: '',
346   - // el-tag订单回调通知状态type值
347   - notifyStatusType: '',
348   - // el-tag订单退款状态type值
349   - refundStatusType: '',
350 339 };
351 340 },
352 341 created() {
... ... @@ -416,40 +405,6 @@ export default {
416 405 if (response.data.payOrderExtension === null) {
417 406 this.orderDetail.payOrderExtension = Object.assign(defaultOrderDetail.payOrderExtension, {});
418 407 }
419   - switch (this.orderDetail.status) {
420   - case PayOrderStatusEnum.WAITING.status:
421   - this.statusType = "info";
422   - break;
423   - case PayOrderStatusEnum.SUCCESS.status:
424   - this.statusType = "success";
425   - break;
426   - case PayOrderStatusEnum.CLOSED.status:
427   - this.statusType = "danger";
428   - break;
429   - }
430   - switch (this.orderDetail.notifyStatus) {
431   - case PayOrderNotifyStatusEnum.NO.status:
432   - this.notifyStatusType = "info";
433   - break;
434   - case PayOrderNotifyStatusEnum.SUCCESS.status:
435   - this.notifyStatusType = "success";
436   - break;
437   - case PayOrderNotifyStatusEnum.FAILURE.status:
438   - this.notifyStatusType = "danger";
439   - break;
440   - }
441   -
442   - switch (this.orderDetail.refundStatus) {
443   - case PayOrderRefundStatusEnum.NO.status:
444   - this.refundStatusType = "success";
445   - break;
446   - case PayOrderRefundStatusEnum.SOME.status:
447   - this.refundStatusType = "warning";
448   - break;
449   - case PayOrderRefundStatusEnum.ALL.status:
450   - this.refundStatusType = "danger";
451   - break;
452   - }
453 408 this.open = true;
454 409 });
455 410  
... ...
yudao-ui-admin/src/views/pay/refund/index.vue
... ... @@ -145,23 +145,17 @@
145 145 </el-table-column>
146 146 <el-table-column label="退款类型" align="center" prop="type" width="80">
147 147 <template v-slot="scope">
148   - <el-tag :type="findByRefundTypeGetStyle(scope.row.type)">
149   - {{ getDictDataLabel(DICT_TYPE.PAY_ORDER_REFUND_STATUS, scope.row.type) }}
150   - </el-tag>
  148 + <dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_TYPE" :value="scope.row.type" />
151 149 </template>
152 150 </el-table-column>
153 151 <el-table-column label="退款状态" align="center" prop="status">
154 152 <template v-slot="scope">
155   - <el-tag :type="findByRefundStatusGetStyle(scope.row.status)">
156   - {{ getDictDataLabel(DICT_TYPE.PAY_REFUND_ORDER_STATUS, scope.row.status) }}
157   - </el-tag>
  153 + <dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_STATUS" :value="scope.row.status" />
158 154 </template>
159 155 </el-table-column>
160 156 <el-table-column label="回调状态" align="center" prop="notifyStatus">
161 157 <template v-slot="scope">
162   - <el-tag :type="findByRefundStatusGetStyle(scope.row.notifyStatus)">
163   - {{ getDictDataLabel(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS, scope.row.notifyStatus) }}
164   - </el-tag>
  158 + <dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="scope.row.notifyStatus" />
165 159 </template>
166 160 </el-table-column>
167 161 <el-table-column label="退款原因" align="center" prop="reason" width="140" :show-overflow-tooltip="true"/>
... ... @@ -211,14 +205,12 @@
211 205 <el-tag class="tag-purple" size="mini">{{ parseFloat(refundDetail.refundAmount / 100).toFixed(2) }}</el-tag>
212 206 </el-descriptions-item>
213 207 <el-descriptions-item label="退款类型">
214   - <el-tag size="mini" :type="findByRefundTypeGetStyle(refundDetail.type)">
215   - {{ getDictDataLabel(DICT_TYPE.PAY_ORDER_REFUND_STATUS, refundDetail.type) }}
216   - </el-tag>
  208 + <template v-slot="scope">
  209 + <dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_TYPE" :value="refundDetail.type" />
  210 + </template>
217 211 </el-descriptions-item>
218 212 <el-descriptions-item label="退款状态">
219   - <el-tag size="mini" :type="findByRefundStatusGetStyle(refundDetail.status)">
220   - {{ getDictDataLabel(DICT_TYPE.PAY_REFUND_ORDER_STATUS, refundDetail.status) }}
221   - </el-tag>
  213 + <dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_STATUS" :value="refundDetail.status" />
222 214 </el-descriptions-item>
223 215 <el-descriptions-item label="创建时间">{{ parseTime(refundDetail.createTime) }}</el-descriptions-item>
224 216 <el-descriptions-item label="退款成功时间">{{ parseTime(refundDetail.successTime) }}</el-descriptions-item>
... ... @@ -235,9 +227,7 @@
235 227 </el-descriptions-item>
236 228 <el-descriptions-item label="回调地址">{{ refundDetail.notifyUrl }}</el-descriptions-item>
237 229 <el-descriptions-item label="回调状态">
238   - <el-tag size="mini" :type="findByRefundStatusGetStyle(refundDetail.notifyStatus)">
239   - {{ getDictDataLabel(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS, refundDetail.notifyStatus) }}
240   - </el-tag>
  230 + <dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="refundDetail.notifyStatus" />
241 231 </el-descriptions-item>
242 232 <el-descriptions-item label="回调时间">{{ parseTime(refundDetail.notifyTime) }}</el-descriptions-item>
243 233 </el-descriptions>
... ...
yudao-ui-admin/src/views/system/errorCode/index.vue
... ... @@ -46,11 +46,11 @@
46 46 <el-table-column label="编号" align="center" prop="id" />
47 47 <el-table-column label="类型" align="center" prop="type" width="80">
48 48 <template slot-scope="scope">
49   - <span>{{ getDictDataLabel(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE, scope.row.type) }}</span>
  49 + <dict-tag :type="DICT_TYPE.SYSTEM_ERROR_CODE_TYPE" :value="scope.row.type" />
50 50 </template>
51 51 </el-table-column>
52 52 <el-table-column label="应用名" align="center" prop="applicationName" width="200" />
53   - <el-table-column label="错误码编码" align="center" prop="code" width="100" />
  53 + <el-table-column label="错误码编码" align="center" prop="code" width="120" />
54 54 <el-table-column label="错误码提示" align="center" prop="message" width="300" />
55 55 <el-table-column label="备注" align="center" prop="memo" width="200" />
56 56 <el-table-column label="创建时间" align="center" prop="createTime" width="180">
... ...
yudao-ui-admin/src/views/system/loginlog/index.vue
... ... @@ -35,7 +35,7 @@
35 35  
36 36 <el-table v-loading="loading" :data="list">
37 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" width="120">
39 39 <template slot-scope="scope">
40 40 <dict-tag :type="DICT_TYPE.SYSTEM_LOGIN_TYPE" :value="scope.row.logType" />
41 41 </template>
... ...