[update] 市场清单详情页增加收起展开

This commit is contained in:
lideqin
2024-09-30 15:55:22 +08:00
parent f661ddcc0f
commit 8693a9bffa
@@ -6,7 +6,15 @@
<a-button type="primary" ghost @click="clickHistoryVersion">{{ $t('standardRegulationLibrary.marketRegulationsList.historicalVersion') }}</a-button>
</template>
<div class="content-wrapper">
<a-row class="basic-info" v-if="ids.length <= 1">
<!-- 基本信息 -->
<div class="process-part-title">
<div>{{ $t('essentialInformation') }}</div>
<div class="process-part-title-right" @click="handleChangeShowBase">
<a-icon type="double-right" :class="showBaseFlag ? 'pack-up-btn' : 'unfold-btn'" />
{{ showBaseFlag ? '收起' : '展开' }}
</div>
</div>
<a-row class="basic-info" v-if="ids.length <= 1" v-show="showBaseFlag">
<!-- 适用市场 -->
<a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.countryRegion') }}</label>
@@ -133,8 +141,10 @@ export default {
* 48px:分页器的高度
* 48pxa-card的padding(上24+下24
* 54px:表头行的高度
* 88px: 两个标题高度
* 56px:外层组件标题区域
*/
return `calc(100vh - ${this.defaultHeight['user-info-height']} - ${this.defaultHeight['breadcrumb-height']} - ${this.defaultHeight.oneLineSearchHeight} - ${this.defaultHeight.oneLineOperationHeight} - 48px - 48px - 54px - ${this.isBackTitle ? '56px' : '0px'})`
return `calc(100vh - ${this.defaultHeight['user-info-height']} - ${this.defaultHeight['breadcrumb-height']} - ${this.defaultHeight.oneLineSearchHeight} - ${this.defaultHeight.oneLineOperationHeight} - 48px - 48px - 54px - ${this.isBackTitle ? '56px' : '0px'} - 88px - 56px)`
},
// 是否可以查看历史版本,当前用户是否是法规管理员或超级管理员
isCanLookHistory () {
@@ -552,7 +562,8 @@ export default {
},
disableMixinCreated: true,
historyVersions: [], // 历史版本数据
highlightKey: null
highlightKey: null,
showBaseFlag: true
}
},
beforeRouteUpdate (to, from, next) {
@@ -594,6 +605,10 @@ export default {
}
}
},
handleChangeShowBase () {
this.showBaseFlag = !this.showBaseFlag
this.$forceUpdate()
},
initData (ids) {
// 只有一条数据,需要获取基础信息
if (this.ids.length > 1) {
@@ -734,10 +749,10 @@ export default {
<style scoped lang="less">
.content-wrapper {
height: calc(100% - 52px);
height: calc(100%);
box-sizing: border-box;
overflow: auto;
padding: 32px 20px;
padding: 24px 20px;
}
.basic-info {
/deep/ .ant-col {
@@ -760,6 +775,25 @@ export default {
}
}
.process-part-title {
display: flex;
justify-content: space-between;
}
.process-part-title-right {
cursor: pointer;
font-size: 14px;
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
color: @primary-color;
}
.pack-up-btn {
transform: rotate(-90deg);
}
.unfold-btn {
transform: rotate(90deg);
}
/deep/ table tbody tr:hover>td {
background-color: transparent !important;
}