Commit cc98c8d6 by Jaxon

feat: 督导数据业务开发

1 parent 385cdb1e
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.00027 11.9392L4.70044 8.63934L5.64325 7.69653L8.00027 10.0536L10.3573 7.69653L11.3001 8.63934L8.00027 11.9392ZM8.00027 8.29855L4.70044 4.99872L5.64325 4.05591L8.00027 6.41293L10.3573 4.05591L11.3001 4.99872L8.00027 8.29855Z" fill="black" fill-opacity="0.4"/>
</svg>
......@@ -16,6 +16,16 @@
</div>
<div class="title-info-wrapper">
<slot name="title-info">
<div v-for="item in titleInfoSchema"
:key="item.key"
class="info-item-wrapper">
<div class="value">
77
</div>
<div class="label">
交付数
</div>
</div>
</slot>
<slot name="title-info-icon">
<van-icon color="#000000E5"
......@@ -85,8 +95,12 @@
</van-row>
<div v-if="showMoreToggle"
class="toggle-wrapper"
:class="{ 'is-expanded': expanded }"
@click.stop="onToggleMore">
{{ expanded ? '收起2项售后成交指标' : '已隐藏2项售后成交指标' }}
<svg-icon class="toggle-icon"
name="show-more"
size="16px" />
</div>
</div>
</template>
......@@ -124,10 +138,13 @@ export default {
},
computed: {
defaultSchema() {
return this.schema.filter(item => !item.isMore);
return this.schema.filter(item => (!item.isMore && !item.titleInfo));
},
moreSchema() {
return this.schema.filter(item => item.isMore);
return this.schema.filter(item => item.isMore && !item.titleInfo);
},
titleInfoSchema() {
return this.schema.filter(item => item.titleInfo);
},
showMoreToggle() {
return this.hasMore && this.moreSchema.length > 0;
......@@ -159,7 +176,7 @@ export default {
updateMoreHeight() {
this.$nextTick(() => {
const moreMeasureInner = this.$refs.moreMeasureInner;
this.moreHeight = moreMeasureInner ? moreMeasureInner.clientHeight : 0;
this.moreHeight = moreMeasureInner ? moreMeasureInner.clientHeight + 28 : 0;
});
},
},
......@@ -172,7 +189,6 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
.statistics-item-wrapper {
background-color: white;
padding: 8px;
......@@ -182,9 +198,6 @@ export default {
position: relative;
transition: background 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
padding-bottom: 14px;
&.is-expand {
padding-bottom: 42px;
}
&.is-tap {
&:active {
background: rgb(252, 252, 252);
......@@ -193,16 +206,17 @@ export default {
> .title-wrapper {
display: flex;
align-items: center;
padding: 8px 16px;
padding: 8px;
border-bottom: 1px solid #eeeef0;
overflow: hidden;
.title-label-wrapper {
flex-shrink: 0;
width: 45%;
width: calc(50% - 16px);
font-weight: 500;
font-size: 14px;
line-height: 22px;
color: rgba(0, 0, 0, 0.9);
margin-right: 16px;
.sub-label {
font-weight: 400;
font-size: 10px;
......@@ -217,7 +231,23 @@ export default {
align-items: center;
justify-content: flex-end;
overflow: hidden;
margin-left: 16px;
.info-item-wrapper {
text-align: center;
margin-right: 12px;
.value {
font-family: numberBold;
font-weight: 700;
font-size: 20px;
line-height: 20px;
color: var(--themeColor);
}
.label {
font-weight: 400;
font-size: 10px;
line-height: 16px;
color: #00000042;
}
}
.sub-label {
font-weight: 400;
......@@ -264,7 +294,7 @@ export default {
}
.value {
margin-top: 4px;
font-family: D-numberNor;
font-family: numberNor;
font-weight: 500;
font-size: 16px;
line-height: 20px;
......@@ -273,7 +303,13 @@ export default {
}
}
.toggle-wrapper {
background-image: linear-gradient(top, rgba(255, 255, 255, 0.2) 15%, rgba(255, 255, 255, 0.6) 30%, #ffffff 100%);
background-image: linear-gradient(
top,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 0.5) 15%,
rgba(255, 255, 255, 0.7) 30%,
#ffffff 100%
);
padding: 6px 0;
position: absolute;
left: 0;
......@@ -283,6 +319,18 @@ export default {
font-size: 12px;
line-height: 20px;
color: #00000066;
display: flex;
align-items: center;
justify-content: center;
.toggle-icon {
transform: rotate(0);
transition: transform 300ms ease;
}
&.is-expanded {
.toggle-icon {
transform: rotate(-180deg);
}
}
}
.more-collapse {
......
......@@ -41,6 +41,24 @@ export const staticInfoList = [
export const supervisorSchemaList = [
{
name: "brandType",
label: "交付数",
col: 8,
titleInfo: true,
},
{
name: "brandType2",
label: "触客数",
col: 8,
titleInfo: true,
},
{
name: "brandType3",
label: "总产值(万)",
col: 8,
titleInfo: true,
},
{
name: "brandType",
label: "总产值",
col: 8,
style: "margin-bottom: 4px",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!