style: 修改前端样式

This commit is contained in:
sunxiaolong
2024-02-03 15:35:55 +08:00
parent b8ad6e9872
commit ead6dbb93a
2 changed files with 44 additions and 14 deletions

View File

@@ -9,6 +9,12 @@ export type merchantDeployRate = {
linkID: string;
};
export type simpleArray = {
label: string;
value: any;
isLink?: boolean;
};
export type merchantDeployRecord = {
id: number;
status: string;

View File

@@ -43,31 +43,27 @@
</template>
<a-descriptions-item label="平台净利率" :span="3">
<a-descriptions
v-for="(rate, rateIndex) in data.singleRoadPlatformRate"
:key="rateIndex"
class="platformrate"
:column="4"
layout="inline-horizontal"
:bordered="false"
>
<a-descriptions-item label="卡片面值">
{{ rate.showLabel }}
</a-descriptions-item>
<a-descriptions-item label="淘宝售价">
{{ rate.factLabel }}
</a-descriptions-item>
<a-descriptions-item label="利率">
{{ rate.value }}
</a-descriptions-item>
<a-descriptions-item label="链接">
<a-descriptions-item
v-for="(rate, rateIndex) in singleRateConvrtToMap(
data.singleRoadPlatformRate
)"
:key="rateIndex"
:label="rate.label"
>
<a-space size="mini">
<span>
{{ rate.linkID }}
{{ rate.value }}
</span>
<a-button
v-if="rate.isLink"
size="small"
status="success"
@click="openLink(rate.linkID)"
@click="openLink(rate.value)"
>
<template #icon>
<icon-launch />
@@ -113,7 +109,9 @@
import {
deleteMerchantDeploy,
getmerchantDeployList,
merchantDeployRate,
merchantDeployRecord,
simpleArray,
} from '@/api/merchant-deploy';
import { defineComponent, reactive, ref } from 'vue';
import { isNumber } from '@/utils/is';
@@ -171,6 +169,31 @@
openLink(linkID: string) {
openTbLink(linkID);
},
singleRateConvrtToMap(items: merchantDeployRate[]): simpleArray[] {
// 创建一个新的数组
const itemArray: simpleArray[] = [];
items.forEach((item) => {
itemArray.push({
label: '淘宝售价',
value: item.factLabel,
});
itemArray.push({
label: '卡片面值',
value: item.showLabel,
});
itemArray.push({
label: '利率',
value: item.value,
});
itemArray.push({
label: '链接',
value: item.linkID,
isLink: true,
});
});
return itemArray;
},
},
});
</script>
@@ -185,6 +208,7 @@
border: 0;
td {
padding-left: 0 !important;
background-color: transparent !important;
border-right: 0 !important;
}