hi-ucs/front/src/views/home/components/GovernmentCloudResources.vue

126 lines
3.3 KiB
Vue
Raw Normal View History

2022-11-18 10:30:24 +08:00
<!--
* @Author: Light
* @Date: 2022-11-16 16:46:16
* @LastEditors: Light
2022-11-21 11:15:40 +08:00
* @LastEditTime: 2022-11-18 15:35:25
2022-11-18 10:30:24 +08:00
* @Description: 政务云资源列表
-->
<template>
<div class="top">
2022-11-21 11:15:40 +08:00
<div>检索结果{{ props.governmentCloud.total }}</div>
2022-11-18 10:30:24 +08:00
<div>
使用声明:
附加增值服务委办局单位可以根据自身需求按需采购由采购单位付费
</div>
</div>
2022-11-21 11:15:40 +08:00
<div
class="bottom"
v-for="(item, index) in props.governmentCloud.data"
:key="item.service_item_tier1 + index"
>
2022-11-18 10:30:24 +08:00
<div class="left"></div>
<div class="right">
<div class="title">
<div>
2022-11-21 11:15:40 +08:00
<div class="name">{{ item.service_item_tier1 }}</div>
<div class="type">{{ item.service_type }}</div>
2022-11-18 10:30:24 +08:00
</div>
2022-11-21 11:15:40 +08:00
<div>年份{{ item.year }}</div>
2022-11-18 10:30:24 +08:00
</div>
2022-11-21 11:15:40 +08:00
<div class="text">{{ item.service_description }}</div>
2022-11-18 10:30:24 +08:00
<div class="info">
2022-11-21 11:15:40 +08:00
<div>一级条目{{ item.service_item_tier2 }}</div>
<div>规格{{ item.specification }}</div>
2022-11-18 10:30:24 +08:00
</div>
</div>
</div>
2022-11-21 11:15:40 +08:00
<a-pagination
v-model:current="current"
:pageSize="5"
:total="props.governmentCloud.total"
:showSizeChanger="false"
@change="changeCurrent"
show-less-items
/>
2022-11-18 10:30:24 +08:00
</template>
2022-11-21 11:15:40 +08:00
<script setup>
import { ref, defineProps, defineEmits } from 'vue'
const props = defineProps({
governmentCloud: { type: Object, default: null },
})
const emit = defineEmits(['getGovernmentCloud'])
const current = ref(props.governmentCloud.current)
const changeCurrent = (current) => {
console.log(current)
emit('getGovernmentCloud', current)
}
</script>
2022-11-18 10:30:24 +08:00
<style lang="less" scoped>
.top {
display: flex;
justify-content: space-between;
color: #333;
padding-bottom: 10px;
border-bottom: 1px #ccc solid;
}
.bottom {
margin-top: 20px;
padding-bottom: 20px;
display: flex;
justify-content: flex-start;
align-items: center;
border-bottom: 1px #ccc solid;
.left {
width: 110px;
height: 110px;
background: url('~@/assets/home/znsf_square.png') no-repeat;
background-size: 100%;
}
.right {
flex: 1;
margin-left: 20px;
.title {
display: flex;
justify-content: space-between;
div:nth-of-type(1) {
display: flex;
justify-content: flex-start;
align-items: center;
.name {
max-width: 400px;
height: 22px;
line-height: 24px;
overflow: hidden; //超出的文本隐藏
display: -webkit-box;
-webkit-line-clamp: 1; // 超出多少行
-webkit-box-orient: vertical;
font-size: 20px;
font-weight: 600;
}
.type {
margin-left: 10px;
padding: 1px 5px;
color: rgba(0, 88, 225, 0.8);
background-color: rgba(0, 135, 225, 0.1);
border-radius: 15px;
}
}
}
.text {
height: 50px;
overflow: hidden; //超出的文本隐藏
display: -webkit-box;
-webkit-line-clamp: 2; // 超出多少行
-webkit-box-orient: vertical;
}
.info {
display: flex;
justify-content: flex-start;
div:nth-of-type(1) {
margin-right: 50px;
}
}
}
}
</style>