政务云资源对接

This commit is contained in:
a0049873 2022-11-18 15:37:00 +08:00
parent 938ad4cd9b
commit 8a02cc43b4
3 changed files with 56 additions and 18 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-04-01 19:19:40
* @LastEditors: Light
* @LastEditTime: 2022-11-18 09:16:13
* @LastEditTime: 2022-11-18 14:09:20
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
@ -526,10 +526,10 @@ export function getGisByArea(data) {
data,
})
}
export function getPolicyCloudService(params) {
export function getPolicyCloudService(data) {
return request({
url: '/resource/getPolicyCloudService',
method: 'get',
params,
method: 'post',
data,
})
}

View File

@ -2,36 +2,59 @@
* @Author: Light
* @Date: 2022-11-16 16:46:16
* @LastEditors: Light
* @LastEditTime: 2022-11-17 09:46:45
* @LastEditTime: 2022-11-18 15:35:25
* @Description: 政务云资源列表
-->
<template>
<div class="top">
<div>检索结果60</div>
<div>检索结果{{ props.governmentCloud.total }}</div>
<div>
使用声明:
附加增值服务委办局单位可以根据自身需求按需采购由采购单位付费
</div>
</div>
<div class="bottom">
<div
class="bottom"
v-for="(item, index) in props.governmentCloud.data"
:key="item.service_item_tier1 + index"
>
<div class="left"></div>
<div class="right">
<div class="title">
<div>
<div class="name">云主机</div>
<div class="type">基础服务</div>
<div class="name">{{ item.service_item_tier1 }}</div>
<div class="type">{{ item.service_type }}</div>
</div>
<div>年份2022</div>
<div>年份{{ item.year }}</div>
</div>
<div class="text">云主机配置</div>
<div class="text">{{ item.service_description }}</div>
<div class="info">
<div>一级条目主机服务</div>
<div>规格1H2G</div>
<div>一级条目{{ item.service_item_tier2 }}</div>
<div>规格{{ item.specification }}</div>
</div>
</div>
</div>
<a-pagination
v-model:current="current"
:pageSize="5"
:total="props.governmentCloud.total"
:showSizeChanger="false"
@change="changeCurrent"
show-less-items
/>
</template>
<script setup></script>
<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>
<style lang="less" scoped>
.top {
display: flex;

View File

@ -562,9 +562,13 @@
</div>
<div
class="infrastructrue-table"
:key="showKey"
v-if="!wrjFlag && selectType == '政务云资源'"
>
<GovernmentCloudResources></GovernmentCloudResources>
<GovernmentCloudResources
:governmentCloud="governmentCloud"
@getGovernmentCloud="getGovernmentCloud"
></GovernmentCloudResources>
</div>
<!-- 西海岸-无人机单兵设备 -->
<div class="infrastructrue-table" v-else-if="isXiHaiAn && wrjFlag">
@ -1553,6 +1557,7 @@
}
const emits = defineEmits(['add'])
const selectType = ref('政务云资源')
const showKey = ref(0)
//
let tableHeight = ref('600')
//tab
@ -1783,7 +1788,9 @@
clickList.value[indexFather].content = [name]
}
if (!isXiHaiAn) {
getGovernmentCloud()
getGovernmentCloud(1)
governmentCloud.current = 1
showKey.value++
}
}
// labelCode
@ -2313,9 +2320,17 @@
} else {
}
}
const getGovernmentCloud = () => {
getPolicyCloudService().then((res) => {
const governmentCloud = reactive({ data: [], total: 0, current: 1 })
const getGovernmentCloud = (page) => {
getPolicyCloudService({
limit: 5,
page: page || 1,
name: '',
type: clickList.value[1].content[0],
}).then((res) => {
console.log('获取政务云资源======》', res.data.data)
governmentCloud.data = res.data.data.list
governmentCloud.total = res.data.data.total
})
}
// tab