feat:【antd】【ele】代码风格统一
This commit is contained in:
@@ -14,7 +14,6 @@ const formData = ref<InfraApiAccessLogApi.ApiAccessLog>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 1,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<InfraApiErrorLogApi.ApiErrorLog>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 1,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ const formData = ref<InfraJobLogApi.JobLog>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 1,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ const nextTimes = ref<Date[]>([]); // 下一次执行时间
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 1,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ const afterSale = ref<MallAfterSaleApi.AfterSale>({
|
||||
logs: [],
|
||||
});
|
||||
|
||||
// TODO @xingyu:貌似 antd 相比 antd 来说,多了一个框?有啥办法只有 1 个么?
|
||||
const [OrderDescriptions] = useDescription({
|
||||
title: '订单信息',
|
||||
bordered: false,
|
||||
|
||||
@@ -60,6 +60,7 @@ const deliveryExpressList = ref<MallDeliveryExpressApi.SimpleDeliveryExpress[]>(
|
||||
const expressTrackList = ref<any[]>([]);
|
||||
const pickUpStore = ref<MallDeliveryPickUpStoreApi.PickUpStore | undefined>();
|
||||
|
||||
// TODO @xingyu:貌似 antd 相比 antd 来说,多了一个框?有啥办法只有 1 个么?
|
||||
const [OrderInfoDescriptions] = useDescription({
|
||||
title: '订单信息',
|
||||
bordered: false,
|
||||
@@ -337,7 +338,7 @@ onMounted(async () => {
|
||||
<OperateLogGrid table-title="操作日志">
|
||||
<template #userType="{ row }">
|
||||
<Tag v-if="row.userType === 0" color="default"> 系统 </Tag>
|
||||
<DictTag :type="DICT_TYPE.USER_TYPE" :value="row.userType" />
|
||||
<DictTag v-else :type="DICT_TYPE.USER_TYPE" :value="row.userType" />
|
||||
</template>
|
||||
</OperateLogGrid>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,6 @@ const formData = ref<PayNotifyApi.NotifyTask>();
|
||||
const [Description] = useDescription({
|
||||
bordered: true,
|
||||
column: 2,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ const formData = ref<PayOrderApi.Order>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 2,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ const formData = ref<PayRefundApi.Refund>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 2,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ const formData = ref<PayTransferApi.Transfer>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 2,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<SystemLoginLogApi.LoginLog>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 1,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<SystemMailLogApi.MailLog>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 2,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<SystemNotifyMessageApi.NotifyMessage>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 1,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<SystemNotifyMessageApi.NotifyMessage>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 1,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<SystemOperateLogApi.OperateLog>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 1,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<SystemSmsLogApi.SmsLog>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 2,
|
||||
class: 'mx-4',
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -16,9 +16,6 @@ const formData = ref<SystemSocialUserApi.SocialUser>();
|
||||
const [Descriptions] = useDescription({
|
||||
bordered: true,
|
||||
column: 1,
|
||||
size: 'middle',
|
||||
class: 'mx-4',
|
||||
labelStyle: { width: '185px' },
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
label: '请求时间',
|
||||
field: 'beginTime',
|
||||
render: (val, data) => {
|
||||
if (data?.beginTime && data?.endTime) {
|
||||
if (val && data?.endTime) {
|
||||
return `${formatDateTime(val)} ~ ${formatDateTime(data.endTime)}`;
|
||||
}
|
||||
return '';
|
||||
@@ -245,7 +245,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
render: (val, data) => {
|
||||
if (val === 0) {
|
||||
return '正常';
|
||||
} else if (data && data.resultMsg) {
|
||||
} else if (val > 0 && data?.resultMsg) {
|
||||
return `失败 | ${val} | ${data.resultMsg}`;
|
||||
}
|
||||
return '';
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<InfraApiAccessLogApi.ApiAccessLog>();
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 1,
|
||||
labelWidth: 110,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<InfraApiErrorLogApi.ApiErrorLog>();
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 1,
|
||||
labelWidth: 110,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ import { useDetailSchema } from '../data';
|
||||
const formData = ref<InfraJobLogApi.JobLog>();
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 1,
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ const nextTimes = ref<Date[]>([]); // 下一次执行时间
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 1,
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -95,9 +95,9 @@ onActivated(() => {
|
||||
|
||||
/** 初始化 */
|
||||
onMounted(() => {
|
||||
getOrderData();
|
||||
getProductData();
|
||||
getWalletRechargeData();
|
||||
loadOrderData();
|
||||
loadProductData();
|
||||
loadWalletRechargeData();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
getTradeStatisticsList,
|
||||
} from '#/api/mall/statistics/trade';
|
||||
import ShortcutDateRangePicker from '#/components/shortcut-date-range-picker/shortcut-date-range-picker.vue';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import { getTradeTrendChartOptions } from './trend-chart-options';
|
||||
|
||||
@@ -138,7 +139,7 @@ async function handleExport() {
|
||||
<template #icon>
|
||||
<IconifyIcon icon="lucide:download" />
|
||||
</template>
|
||||
导出
|
||||
{{ $t('page.action.export') }}
|
||||
</ElButton>
|
||||
</ShortcutDateRangePicker>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { $t } from '@vben/locales';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import * as AfterSaleApi from '#/api/mall/trade/afterSale/index';
|
||||
import { disagreeAfterSale } from '#/api/mall/trade/afterSale';
|
||||
|
||||
import { useDisagreeFormSchema } from '../data';
|
||||
|
||||
@@ -40,7 +40,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
try {
|
||||
const data =
|
||||
(await formApi.getValues()) as MallAfterSaleApi.DisagreeRequest;
|
||||
await AfterSaleApi.disagreeAfterSale(data);
|
||||
await disagreeAfterSale(data);
|
||||
// 关闭并提示
|
||||
await modalApi.close();
|
||||
emit('success');
|
||||
|
||||
@@ -93,18 +93,14 @@ async function handleBrokerageEnabledChange(
|
||||
})
|
||||
.then(async () => {
|
||||
// 更新推广资格
|
||||
const res = await updateBrokerageEnabled({
|
||||
await updateBrokerageEnabled({
|
||||
id: row.id!,
|
||||
enabled: newEnabled,
|
||||
});
|
||||
if (res) {
|
||||
// 提示并返回成功
|
||||
ElMessage.success($t('ui.actionMessage.operationSuccess'));
|
||||
handleRefresh();
|
||||
resolve(true);
|
||||
} else {
|
||||
reject(new Error('更新失败'));
|
||||
}
|
||||
// 提示并返回成功
|
||||
ElMessage.success($t('ui.actionMessage.operationSuccess'));
|
||||
handleRefresh();
|
||||
resolve(true);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(new Error('取消操作'));
|
||||
|
||||
@@ -18,9 +18,10 @@ import { useTabs } from '@vben/hooks';
|
||||
import { ElCard, ElLoading, ElMessage, ElTag } from 'element-plus';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import * as DeliveryExpressApi from '#/api/mall/trade/delivery/express';
|
||||
import * as DeliveryPickUpStoreApi from '#/api/mall/trade/delivery/pickUpStore';
|
||||
import { getSimpleDeliveryExpressList } from '#/api/mall/trade/delivery/express';
|
||||
import { getDeliveryPickUpStore } from '#/api/mall/trade/delivery/pickUpStore';
|
||||
import * as TradeOrderApi from '#/api/mall/trade/order';
|
||||
import { getExpressTrackList } from '#/api/mall/trade/order';
|
||||
import { useDescription } from '#/components/description';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
import { TableAction } from '#/components/table-action';
|
||||
@@ -169,12 +170,9 @@ async function getDetail() {
|
||||
|
||||
// 如果配送方式为快递,则查询物流公司
|
||||
if (res.deliveryType === DeliveryTypeEnum.EXPRESS.type) {
|
||||
deliveryExpressList.value =
|
||||
await DeliveryExpressApi.getSimpleDeliveryExpressList();
|
||||
deliveryExpressList.value = await getSimpleDeliveryExpressList();
|
||||
if (res.logisticsId) {
|
||||
expressTrackList.value = await TradeOrderApi.getExpressTrackList(
|
||||
res.id!,
|
||||
);
|
||||
expressTrackList.value = await getExpressTrackList(res.id!);
|
||||
expressTrackGridApi.setGridOptions({
|
||||
data: expressTrackList.value || [],
|
||||
});
|
||||
@@ -183,9 +181,7 @@ async function getDetail() {
|
||||
res.deliveryType === DeliveryTypeEnum.PICK_UP.type &&
|
||||
res.pickUpStoreId
|
||||
) {
|
||||
pickUpStore.value = await DeliveryPickUpStoreApi.getDeliveryPickUpStore(
|
||||
res.pickUpStoreId,
|
||||
);
|
||||
pickUpStore.value = await getDeliveryPickUpStore(res.pickUpStoreId);
|
||||
}
|
||||
} finally {
|
||||
loading.value = false;
|
||||
|
||||
@@ -90,7 +90,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
...getRangePickerDefaultProps(),
|
||||
clearable: true,
|
||||
placeholder: ['开始日期', '结束日期'],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -19,8 +19,6 @@ const formData = ref<PayNotifyApi.NotifyTask>();
|
||||
const [Description] = useDescription({
|
||||
border: true,
|
||||
column: 2,
|
||||
direction: 'horizontal',
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ const formData = ref<PayOrderApi.Order>();
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 2,
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ import { useDetailSchema } from '../data';
|
||||
const formData = ref<PayRefundApi.Refund>();
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 2,
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ import { useDetailSchema } from '../data';
|
||||
const formData = ref<PayTransferApi.Transfer>();
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 2,
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ import { useDetailSchema } from '../data';
|
||||
const formData = ref<SystemLoginLogApi.LoginLog>();
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 1,
|
||||
labelWidth: 110,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ import { useDetailSchema } from '../data';
|
||||
const formData = ref<SystemMailLogApi.MailLog>();
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 2,
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<SystemNotifyMessageApi.NotifyMessage>();
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 1,
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<SystemNotifyMessageApi.NotifyMessage>();
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 1,
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ const formData = ref<SystemOperateLogApi.OperateLog>();
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 1,
|
||||
labelWidth: 110,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -12,9 +12,8 @@ import { useDetailSchema } from '../data';
|
||||
const formData = ref<SystemSmsLogApi.SmsLog>();
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 2,
|
||||
direction: 'horizontal',
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@ const formData = ref<SystemSocialUserApi.SocialUser>();
|
||||
const [Descriptions] = useDescription({
|
||||
border: true,
|
||||
column: 1,
|
||||
size: 'large',
|
||||
labelWidth: 185,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user