提交 b267b2c3 编写于 作者: 公众号-芋道源码's avatar 公众号-芋道源码

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

上级 08a35704
......@@ -45,7 +45,7 @@
</el-table-column>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<span>{{ getDictDataLabel(DICT_TYPE.COMMON_STATUS, scope.row.status) }}</span>
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
......
......@@ -49,7 +49,7 @@
<el-table-column label="用户编号" align="center" prop="userId" />
<el-table-column label="用户类型" align="center" prop="userType">
<template slot-scope="scope">
<span>{{ getDictDataLabel(DICT_TYPE.USER_TYPE, scope.row.userType) }}</span>
<dict-tag :type="DICT_TYPE.USER_TYPE" :value="scope.row.userType"/>
</template>
</el-table-column>>
<el-table-column label="应用名" align="center" prop="applicationName" />
......@@ -90,7 +90,7 @@
<el-form-item label="链路追踪:">{{ form.traceId }}</el-form-item>
<el-form-item label="应用名:">{{ form.applicationName }}</el-form-item>
<el-form-item label="用户信息:">
{{ form.userId }} | {{ getDictDataLabel(DICT_TYPE.USER_TYPE, form.userType) }} | {{ form.userIp }} | {{ form.userAgent}}
{{ form.userId }} <dict-tag :type="DICT_TYPE.USER_TYPE" :value="form.userType"/> | {{ form.userIp }} | {{ form.userAgent}}
</el-form-item>
<el-form-item label="请求信息:">{{ form.requestMethod }} | {{ form.requestUrl }} </el-form-item>
<el-form-item label="请求参数:">{{ form.requestParams }}</el-form-item>
......
......@@ -49,7 +49,7 @@
<el-table-column label="用户编号" align="center" prop="userId" />
<el-table-column label="用户类型" align="center" prop="userType">
<template slot-scope="scope">
<span>{{ getDictDataLabel(DICT_TYPE.USER_TYPE, scope.row.userType) }}</span>
<dict-tag :type="DICT_TYPE.USER_TYPE" :value="scope.row.userType"/>
</template>
</el-table-column>>
<el-table-column label="应用名" align="center" prop="applicationName" />
......
......@@ -57,7 +57,7 @@
<el-table-column label="参数键值" align="center" prop="value" />
<el-table-column label="系统内置" align="center" prop="type">
<template slot-scope="scope">
<span>{{ getDictDataLabel(DICT_TYPE.INFRA_CONFIG_TYPE, scope.row.type) }}</span>
<dict-tag :type="DICT_TYPE.INFRA_CONFIG_TYPE" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="是否敏感" align="center" prop="sensitive">
......
......@@ -40,7 +40,7 @@
<el-table-column label="任务名称" align="center" prop="name" />
<el-table-column label="任务状态" align="center" prop="status">
<template slot-scope="scope">
<span>{{ getDictDataLabel(DICT_TYPE.INFRA_JOB_STATUS, scope.row.status) }}</span>
<dict-tag :type="DICT_TYPE.INFRA_JOB_STATUS" :value="scope.row.status" />
</template>
</el-table-column>>
<el-table-column label="处理器的名字" align="center" prop="handlerName" />
......@@ -107,7 +107,9 @@
<el-col :span="24">
<el-form-item label="任务编号:">{{ form.id }}</el-form-item>
<el-form-item label="任务名称:">{{ form.name }}</el-form-item>
<el-form-item label="任务名称:">{{ getDictDataLabel(DICT_TYPE.INFRA_JOB_STATUS, form.status) }}</el-form-item>
<el-form-item label="任务名称:">
<dict-tag :type="DICT_TYPE.INFRA_JOB_STATUS" :value="form.status" />
</el-form-item>
<el-form-item label="处理器的名字:">{{ form.handlerName }}</el-form-item>
<el-form-item label="处理器的参数:">{{ form.handlerParam }}</el-form-item>
<el-form-item label="cron表达式:">{{ form.cronExpression }}</el-form-item>
......
......@@ -49,7 +49,7 @@
</el-table-column>
<el-table-column label="任务状态" align="center" prop="status">
<template slot-scope="scope">
<span>{{ getDictDataLabel(DICT_TYPE.INFRA_JOB_LOG_STATUS, scope.row.status) }}</span>
<dict-tag :type="DICT_TYPE.INFRA_JOB_LOG_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......@@ -75,7 +75,9 @@
<el-form-item label="第几次执行:">{{ form.executeIndex }}</el-form-item>
<el-form-item label="执行时间:">{{ parseTime(form.beginTime) + ' ~ ' + parseTime(form.endTime) }}</el-form-item>
<el-form-item label="执行时长:">{{ parseTime(form.duration) + ' 毫秒' }}</el-form-item>
<el-form-item label="任务状态:">{{ getDictDataLabel(DICT_TYPE.INFRA_JOB_LOG_STATUS, form.status) }}</el-form-item>
<el-form-item label="任务状态:">
<dict-tag :type="DICT_TYPE.INFRA_JOB_LOG_STATUS" :value="form.status" />
</el-form-item>
<el-form-item label="执行结果:">{{ form.result }}</el-form-item>
</el-col>
</el-row>
......
......@@ -72,9 +72,9 @@
<el-table-column prop="keyTemplate" label="Key 模板" width="200" />
<el-table-column prop="keyType" label="Key 类型" width="100" />
<el-table-column prop="valueType" label="Value 类型" />
<el-table-column prop="timeoutType" label="超时时间" width="150">
<el-table-column prop="timeoutType" label="超时时间" width="200">
<template slot-scope="scope">
{{ getDictDataLabel(DICT_TYPE.INFRA_REDIS_TIMEOUT_TYPE, scope.row.timeoutType) }}
<dict-tag :type="DICT_TYPE.INFRA_REDIS_TIMEOUT_TYPE" :value="scope.row.timeoutType" />
<span v-if="scope.row.timeout > 0">({{ scope.row.timeout / 1000 }} 秒)</span>
</template>
</el-table-column>
......
......@@ -135,8 +135,9 @@
</el-table-column>
<el-table-column label="支付状态" align="center" prop="status">
<template slot-scope="scope">
<span>{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_STATUS, scope.row.status) }}</span>
<dict-tag :type="DICT_TYPE.PAY_ORDER_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<!-- <el-table-column label="退款状态" align="center" prop="refundStatus">-->
<!-- <template slot-scope="scope">-->
......@@ -145,7 +146,7 @@
<!-- </el-table-column>-->
<el-table-column label="回调状态" align="center" prop="notifyStatus" width="100">
<template slot-scope="scope">
<span>{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS, scope.row.notifyStatus) }}</span>
<dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="scope.row.notifyStatus" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
......@@ -200,14 +201,10 @@
{{ parseFloat(orderDetail.channelFeeRate / 100, 2) }}%
</el-descriptions-item>
<el-descriptions-item label="支付状态">
<el-tag :type="statusType" size="small">
{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_STATUS, orderDetail.status) }}
</el-tag>
<dict-tag :type="DICT_TYPE.PAY_ORDER_STATUS" :value="orderDetail.status" />
</el-descriptions-item>
<el-descriptions-item label="回调状态">
<el-tag :type="notifyStatusType" size="small">
{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS, orderDetail.notifyStatus) }}
</el-tag>
<dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="orderDetail.notifyStatus" />
</el-descriptions-item>
<el-descriptions-item label="回调地址">{{ orderDetail.notifyUrl }}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{ parseTime(orderDetail.createTime) }}</el-descriptions-item>
......@@ -220,9 +217,7 @@
<el-descriptions-item label="支付渠道">{{ orderDetail.channelCodeName }}</el-descriptions-item>
<el-descriptions-item label="支付IP">{{ orderDetail.userIp }}</el-descriptions-item>
<el-descriptions-item label="退款状态">
<el-tag :type="refundStatusType" size="small">
{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_REFUND_STATUS, orderDetail.refundStatus) }}
</el-tag>
<dict-tag :type="DICT_TYPE.PAY_ORDER_REFUND_STATUS" :value="orderDetail.refundStatus" />
</el-descriptions-item>
<el-descriptions-item label="退款次数">{{ orderDetail.refundTimes }}</el-descriptions-item>
<el-descriptions-item label="退款金额">
......@@ -341,12 +336,6 @@ export default {
// 订单退款状态字典数据集合
payOrderRefundDictDatum: getDictDatas(DICT_TYPE.PAY_ORDER_REFUND_STATUS),
orderDetail: JSON.parse(JSON.stringify(defaultOrderDetail)),
// el-tag订单状态type值
statusType: '',
// el-tag订单回调通知状态type值
notifyStatusType: '',
// el-tag订单退款状态type值
refundStatusType: '',
};
},
created() {
......@@ -416,40 +405,6 @@ export default {
if (response.data.payOrderExtension === null) {
this.orderDetail.payOrderExtension = Object.assign(defaultOrderDetail.payOrderExtension, {});
}
switch (this.orderDetail.status) {
case PayOrderStatusEnum.WAITING.status:
this.statusType = "info";
break;
case PayOrderStatusEnum.SUCCESS.status:
this.statusType = "success";
break;
case PayOrderStatusEnum.CLOSED.status:
this.statusType = "danger";
break;
}
switch (this.orderDetail.notifyStatus) {
case PayOrderNotifyStatusEnum.NO.status:
this.notifyStatusType = "info";
break;
case PayOrderNotifyStatusEnum.SUCCESS.status:
this.notifyStatusType = "success";
break;
case PayOrderNotifyStatusEnum.FAILURE.status:
this.notifyStatusType = "danger";
break;
}
switch (this.orderDetail.refundStatus) {
case PayOrderRefundStatusEnum.NO.status:
this.refundStatusType = "success";
break;
case PayOrderRefundStatusEnum.SOME.status:
this.refundStatusType = "warning";
break;
case PayOrderRefundStatusEnum.ALL.status:
this.refundStatusType = "danger";
break;
}
this.open = true;
});
......
......@@ -145,23 +145,17 @@
</el-table-column>
<el-table-column label="退款类型" align="center" prop="type" width="80">
<template v-slot="scope">
<el-tag :type="findByRefundTypeGetStyle(scope.row.type)">
{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_REFUND_STATUS, scope.row.type) }}
</el-tag>
<dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_TYPE" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="退款状态" align="center" prop="status">
<template v-slot="scope">
<el-tag :type="findByRefundStatusGetStyle(scope.row.status)">
{{ getDictDataLabel(DICT_TYPE.PAY_REFUND_ORDER_STATUS, scope.row.status) }}
</el-tag>
<dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="回调状态" align="center" prop="notifyStatus">
<template v-slot="scope">
<el-tag :type="findByRefundStatusGetStyle(scope.row.notifyStatus)">
{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS, scope.row.notifyStatus) }}
</el-tag>
<dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="scope.row.notifyStatus" />
</template>
</el-table-column>
<el-table-column label="退款原因" align="center" prop="reason" width="140" :show-overflow-tooltip="true"/>
......@@ -211,14 +205,12 @@
<el-tag class="tag-purple" size="mini">{{ parseFloat(refundDetail.refundAmount / 100).toFixed(2) }}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="退款类型">
<el-tag size="mini" :type="findByRefundTypeGetStyle(refundDetail.type)">
{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_REFUND_STATUS, refundDetail.type) }}
</el-tag>
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_TYPE" :value="refundDetail.type" />
</template>
</el-descriptions-item>
<el-descriptions-item label="退款状态">
<el-tag size="mini" :type="findByRefundStatusGetStyle(refundDetail.status)">
{{ getDictDataLabel(DICT_TYPE.PAY_REFUND_ORDER_STATUS, refundDetail.status) }}
</el-tag>
<dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_STATUS" :value="refundDetail.status" />
</el-descriptions-item>
<el-descriptions-item label="创建时间">{{ parseTime(refundDetail.createTime) }}</el-descriptions-item>
<el-descriptions-item label="退款成功时间">{{ parseTime(refundDetail.successTime) }}</el-descriptions-item>
......@@ -235,9 +227,7 @@
</el-descriptions-item>
<el-descriptions-item label="回调地址">{{ refundDetail.notifyUrl }}</el-descriptions-item>
<el-descriptions-item label="回调状态">
<el-tag size="mini" :type="findByRefundStatusGetStyle(refundDetail.notifyStatus)">
{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS, refundDetail.notifyStatus) }}
</el-tag>
<dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="refundDetail.notifyStatus" />
</el-descriptions-item>
<el-descriptions-item label="回调时间">{{ parseTime(refundDetail.notifyTime) }}</el-descriptions-item>
</el-descriptions>
......
......@@ -46,11 +46,11 @@
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="类型" align="center" prop="type" width="80">
<template slot-scope="scope">
<span>{{ getDictDataLabel(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE, scope.row.type) }}</span>
<dict-tag :type="DICT_TYPE.SYSTEM_ERROR_CODE_TYPE" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="应用名" align="center" prop="applicationName" width="200" />
<el-table-column label="错误码编码" align="center" prop="code" width="100" />
<el-table-column label="错误码编码" align="center" prop="code" width="120" />
<el-table-column label="错误码提示" align="center" prop="message" width="300" />
<el-table-column label="备注" align="center" prop="memo" width="200" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
......
......@@ -35,7 +35,7 @@
<el-table v-loading="loading" :data="list">
<el-table-column label="访问编号" align="center" prop="id" />
<el-table-column label="日志类型" align="center" prop="logType">
<el-table-column label="日志类型" align="center" prop="logType" width="120">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.SYSTEM_LOGIN_TYPE" :value="scope.row.logType" />
</template>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册