fix: 修复更新数据没更新页面问题
This commit is contained in:
@@ -5,4 +5,5 @@ dist-ssr
|
||||
/node_modules/
|
||||
/.vscode/
|
||||
/.idea/
|
||||
/dist/
|
||||
/dist/
|
||||
/.git/
|
||||
@@ -1,71 +1,72 @@
|
||||
<template>
|
||||
<a-card
|
||||
class="general-card"
|
||||
title="workplace.announcement"
|
||||
:header-style="{ paddingBottom: '0' }"
|
||||
:body-style="{ padding: '15px 20px 13px 20px' }"
|
||||
>
|
||||
<template #extra>
|
||||
<a-link>{{ 'workplace.viewMore' }}</a-link>
|
||||
</template>
|
||||
<div>
|
||||
<div v-for="(item, idx) in list" :key="idx" class="item">
|
||||
<a-tag :color="item.type" size="small">{{ item.label }}</a-tag>
|
||||
<span class="item-content">
|
||||
{{ item.content }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const list = [
|
||||
{
|
||||
type: 'orangered',
|
||||
label: '活动',
|
||||
content: '内容最新优惠活动',
|
||||
},
|
||||
{
|
||||
type: 'cyan',
|
||||
label: '消息',
|
||||
content: '新增内容尚未通过审核,详情请点击查看。',
|
||||
},
|
||||
{
|
||||
type: 'blue',
|
||||
label: '通知',
|
||||
content: '当前产品试用期即将结束,如需续费请点击查看。',
|
||||
},
|
||||
{
|
||||
type: 'blue',
|
||||
label: '通知',
|
||||
content: '1月新系统升级计划通知',
|
||||
},
|
||||
{
|
||||
type: 'cyan',
|
||||
label: '消息',
|
||||
content: '新增内容已经通过审核,详情请点击查看。',
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
margin-bottom: 4px;
|
||||
.item-content {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-left: 4px;
|
||||
color: var(--color-text-2);
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<a-card
|
||||
class="general-card"
|
||||
title="workplace.announcement"
|
||||
:header-style="{ paddingBottom: '0' }"
|
||||
:body-style="{ padding: '15px 20px 13px 20px' }"
|
||||
>
|
||||
<template #extra>
|
||||
<a-link>{{ 'workplace.viewMore' }}</a-link>
|
||||
</template>
|
||||
<div>
|
||||
<div v-for="(item, idx) in list" :key="idx" class="item">
|
||||
<a-tag :color="item.type" size="small">{{ item.label }}</a-tag>
|
||||
<span class="item-content">
|
||||
{{ item.content }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const list = [
|
||||
{
|
||||
type: 'orangered',
|
||||
label: '活动',
|
||||
content: '内容最新优惠活动',
|
||||
},
|
||||
{
|
||||
type: 'cyan',
|
||||
label: '消息',
|
||||
content: '新增内容尚未通过审核,详情请点击查看。',
|
||||
},
|
||||
{
|
||||
type: 'blue',
|
||||
label: '通知',
|
||||
content: '当前产品试用期即将结束,如需续费请点击查看。',
|
||||
},
|
||||
{
|
||||
type: 'blue',
|
||||
label: '通知',
|
||||
content: '1月新系统升级计划通知',
|
||||
},
|
||||
{
|
||||
type: 'cyan',
|
||||
label: '消息',
|
||||
content: '新增内容已经通过审核,详情请点击查看。',
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
margin-bottom: 4px;
|
||||
|
||||
.item-content {
|
||||
flex: 1;
|
||||
margin-left: 4px;
|
||||
overflow: hidden;
|
||||
color: var(--color-text-2);
|
||||
font-size: 13px;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
text-overflow: ellipsis;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<a-col class="banner">
|
||||
<a-col :span="8">
|
||||
<a-typography-title :heading="5" style="margin-top: 0">
|
||||
{{ userInfo.name }}
|
||||
{{ userInfo.name }}
|
||||
</a-typography-title>
|
||||
</a-col>
|
||||
<a-divider class="panel-border" />
|
||||
@@ -24,7 +24,7 @@
|
||||
<style scoped lang="less">
|
||||
.banner {
|
||||
width: 100%;
|
||||
padding: 20px 20px 0 20px;
|
||||
padding: 20px 20px 0;
|
||||
background-color: var(--color-bg-2);
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
@@ -118,6 +118,11 @@
|
||||
if (newValue) {
|
||||
fetchRoadData();
|
||||
fetchRoadPoolData();
|
||||
if (props.deployId === 0) {
|
||||
formData.value = generateFormData();
|
||||
} else {
|
||||
fetchLatestData(props.deployId);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -129,24 +134,11 @@
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.deployId,
|
||||
(newValue: number) => {
|
||||
if (isNumber(newValue)) {
|
||||
if (newValue === 0) {
|
||||
formData.value = generateFormData();
|
||||
} else {
|
||||
fetchLatestData(newValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const onSubmit = async (): Promise<boolean> => {
|
||||
formData.value.merchantUid = props.uid;
|
||||
try {
|
||||
if (props.deployId !== 0) {
|
||||
updateMerchantDeploy({ id: props.deployId, ...formData.value });
|
||||
await updateMerchantDeploy({ id: props.deployId, ...formData.value });
|
||||
} else {
|
||||
await addMerchantDeploy(formData.value);
|
||||
}
|
||||
|
||||
@@ -74,8 +74,13 @@
|
||||
const columns: TableColumnData[] = [
|
||||
{
|
||||
title: '实际面额',
|
||||
dataIndex: 'label',
|
||||
slotName: 'label',
|
||||
dataIndex: 'factLabel',
|
||||
slotName: 'factLabel',
|
||||
},
|
||||
{
|
||||
title: '展示面额',
|
||||
dataIndex: 'showLabel',
|
||||
slotName: 'showLabel',
|
||||
},
|
||||
{
|
||||
title: '折扣率',
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</template>
|
||||
</a-button>
|
||||
</template>
|
||||
<a-space direction="vertical" size="medium" fill>
|
||||
<a-space direction="vertical" fill>
|
||||
<div v-for="(data, index) in renderData" :key="index">
|
||||
<a-descriptions bordered>
|
||||
<template #title>
|
||||
@@ -49,6 +49,8 @@
|
||||
v-for="(rate, rateIndex) in data.singleRoadPlatformRate"
|
||||
:key="rateIndex"
|
||||
class="platformrate"
|
||||
:column="4"
|
||||
layout="inline-horizontal"
|
||||
:bordered="false"
|
||||
>
|
||||
<a-descriptions-item label="展示面额">
|
||||
@@ -139,7 +141,6 @@
|
||||
return {
|
||||
props,
|
||||
renderData,
|
||||
AddDeploy,
|
||||
state,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user