Commit 10a05d3b authored by 徐一鸣's avatar 徐一鸣

应用详情信息

parent f7dc396c
<template>
<div class="application_info" v-if="data">
<div class="application_title">
<span class="application_name" v-text="data.name"></span>
</div>
<div class="main_container">
<div class="main_container-left" v-if="data.img">
<img :src="data.img" width="460" />
</div>
<div class="main_container-right">
<ul class="application_base_info">
<li>
<span>应用开发者:</span>
<span v-text="data.providedBy"> </span>
</li>
<li>
<span>上线时间:</span>
<span v-text="data.publishTime"></span>
</li>
<li>
<span>部署次数:</span>
<span v-text="data.acquireCount"></span>
</li>
<li>
<span>应用类型:</span>
<span v-html="data.serviceType"></span>
</li>
<li>
<span>业务领域:</span>
<span v-text="data.dataField"></span>
</li>
</ul>
<div class="commodity_information">
<span>&emsp;&emsp;格:</span>
<div class="btn_container">
<el-button
v-for="(item, index) in data.specifications"
:key="'specifications_' + index"
:type="
item.value === commodityData.specification
? 'primary'
: 'default'
"
@click="changeSpecification(item)"
>
{{ item.name }}
</el-button>
</div>
</div>
<div class="commodity_action">
<el-button type="warning" plain @click="addToCart">
加入购物车
</el-button>
<el-button type="warning" @click="applyImmediately">
立即申请
</el-button>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
data: {
type: Object,
default: () => null,
},
},
data: () => ({
commodityData: {
specification: 0,
},
}),
computed: {
specificationDescription() {
let obj =
this.data.specifications[this.commodityData.specification] || {};
return obj.description || "";
},
},
methods: {
changeSpecification({ value }) {
this.commodityData.specification = value;
},
addToCart() {
console.log("addToCart");
console.log(this.commodityData);
},
applyImmediately() {
console.log("applyImmediately");
console.log(this.commodityData);
},
},
};
</script>
<style scoped>
.application_info {
padding: 20px;
background-color: #fff;
margin-bottom: 20px;
}
.main_container {
display: flex;
justify-content: flex-start;
align-items: flex-start;
margin-top: 25px;
}
.main_container-left {
padding: 3px;
background-color: #f9fafc;
margin-right: 30px;
}
.main_container-right {
flex-grow: 1;
}
.application_title {
display: flex;
justify-content: flex-start;
align-items: center;
}
.application_title > .application_name {
font-size: 22px;
font-weight: bold;
color: #0d1847;
line-height: 36px;
}
.application_base_info {
padding: 18px;
background-color: #f9fafc;
}
.application_base_info > li,
.commodity_information {
display: flex;
justify-content: flex-start;
align-items: flex-start;
font-size: 14px;
color: #242c43;
line-height: 20px;
}
.application_base_info > li:not(:first-child) {
margin-top: 18px;
}
.application_base_info > li > span:first-child,
.commodity_information > span:first-child {
flex-shrink: 0;
white-space: nowrap;
color: #8890a7;
}
.application_base_info > li > span:nth-child(2) {
color: #242c43;
}
.commodity_information {
margin-top: 30px;
}
.commodity_information > span:nth-child(2) {
color: #58617a;
}
.commodity_information > span:first-child {
line-height: 40px;
}
.commodity_information > .commodity_text {
flex-grow: 1;
padding: 13px 18px;
background-color: #f9fafc;
border-radius: 5px;
}
.commodity_information > .btn_container {
margin-bottom: -15px;
}
.commodity_information > .btn_container > .el-button,
.commodity_information > .btn_container > .el-input-number {
margin: 0 20px 15px 0;
}
.commodity_action {
margin-top: 50px;
text-align: right;
}
.commodity_action > .el-button {
width: 220px;
margin-left: 20px;
}
.application_info .el-button--primary {
background-color: #515fe7;
border-color: #515fe7;
}
.application_info .el-button--warning.is-plain {
background-color: #fcefd6;
border-color: #fac266;
color: #e56600;
}
.application_info .el-button--warning {
background-color: #e56600;
border-color: #e56600;
}
</style>
<template>
<div class="sevice_info" v-if="data">
<div class="service_info" v-if="data">
<div class="service_title">
<span class="service_name" v-text="data.name"></span>
<span
class="service_type"
v-if="data.type"
v-text="data.type"
></span>
<span class="service_type" v-if="data.type" v-text="data.type"></span>
<span class="service_level" v-text="data.openLevel"></span>
<span class="service_access_info">
<img :src="require('@/assets/imgs/icon_liulan.png')" />
......@@ -41,7 +37,7 @@
</li>
<li>
<span>服务类型:</span>
<span v-html="data.serviceType.join('&emsp;')"></span>
<span v-html="data.serviceType"></span>
</li>
<li>
<span>资源摘要:</span>
......@@ -147,7 +143,7 @@ export default {
</script>
<style scoped>
.sevice_info {
.service_info {
padding: 20px;
background-color: #fff;
margin-bottom: 20px;
......@@ -270,16 +266,16 @@ export default {
width: 220px;
margin-left: 20px;
}
.sevice_info .el-button--primary {
.service_info .el-button--primary {
background-color: #515fe7;
border-color: #515fe7;
}
.sevice_info .el-button--warning.is-plain {
.service_info .el-button--warning.is-plain {
background-color: #fcefd6;
border-color: #fac266;
color: #e56600;
}
.sevice_info .el-button--warning {
.service_info .el-button--warning {
background-color: #e56600;
border-color: #e56600;
}
......
<template>
<div class="service_tab-comments">
<div class="service_tab-comments" v-if="data">
<comments-score :data="data.baseInfo"></comments-score>
<comments-list :data="data.list"></comments-list>
<comments-pagination
......@@ -25,12 +25,13 @@ export default {
commentsPagination,
},
props: {
data: {
type: Object,
url: {
type: String,
required: true,
},
},
data: () => ({
data: null,
pageSizes: [10, 50, 100],
pageSize: 10,
currentPage: 1,
......@@ -43,15 +44,24 @@ export default {
changeCurrentPage(value) {
this.currentPage = value;
},
init() {
this.$http
.get("/static/serviceInfo.json")
.then((response) => {
this.data = response.body[this.url].comments;
})
.catch(function(error) {
console.log(error);
});
},
},
mounted() {
this.init();
},
created() {},
};
</script>
<style scoped>
.service_tab-comments {
padding: 35px 20px 20px !important;
}
.service_tab-comments > .comments_score,
.service_tab-comments > .comments_list {
padding: 0 30px;
......
<template>
<ul class="service_tab-detail">
<ul class="service_tab-detail" v-if="data">
<li
class="detail-item"
v-for="(item, index) in data"
......@@ -54,14 +54,29 @@ export default {
serviceSteps,
},
props: {
data: {
type: Array,
url: {
type: String,
required: true,
},
},
data: () => ({}),
methods: {},
created() {},
data: () => ({
data: null,
}),
methods: {
init() {
this.$http
.get("/static/serviceInfo.json")
.then((response) => {
this.data = response.body[this.url].detail;
})
.catch(function(error) {
console.log(error);
});
},
},
mounted() {
this.init();
},
};
</script>
......
<template>
<div class="service_tab-provider">
<div class="service_tab-provider" v-if="data">
<div class="provider-left">
<el-avatar shape="square" :size="156" fit="cover" :src="data.img" />
</div>
......@@ -22,14 +22,29 @@
<script>
export default {
props: {
data: {
type: Object,
url: {
type: String,
required: true,
},
},
data: () => ({}),
methods: {},
created() {},
data: () => ({
data: null,
}),
methods: {
init() {
this.$http
.get("/static/serviceInfo.json")
.then((response) => {
this.data = response.body[this.url].provider;
})
.catch(function(error) {
console.log(error);
});
},
},
mounted() {
this.init();
},
};
</script>
......
<template>
<div class="service_tab-specification">
<div class="service_tab-specification" v-if="data">
<div class="specification_header">
<p>申请方式:</p>
<type-group v-model="type" :types="types"></type-group>
......@@ -19,12 +19,13 @@ export default {
typeGroup,
},
props: {
data: {
type: Array,
url: {
type: String,
required: true,
},
},
data: () => ({
data: null,
type: "",
types: [],
}),
......@@ -33,15 +34,29 @@ export default {
return this.types.length > 0 ? this.data[this.type].data : [];
},
},
mounted() {
this.types = this.data.map((item, index) => ({
name: item.name,
value: index,
}));
methods: {
init() {
this.$http
.get("/static/serviceInfo.json")
.then((response) => {
this.data = response.body[this.url].specification;
this.types = this.data.map((item, index) => ({
name: item.name,
value: index,
}));
if (this.types.length) {
this.type = 0;
}
if (this.types.length) {
this.type = 0;
}
})
.catch(function(error) {
console.log(error);
});
},
},
mounted() {
this.init();
},
};
</script>
......
......@@ -2,31 +2,31 @@
<el-tabs
class="service_info_tab"
type="border-card"
v-model="serviceTabsActiveName"
v-model="tabName"
:stretch="true"
>
<el-tab-pane label="服务详情信息" name="first" v-if="detail">
<el-tab-pane label="服务详情信息" name="detail" v-if="detailUrl">
<service-tab-detail
class="service_info"
:data="detail"
:url="detailUrl"
></service-tab-detail>
</el-tab-pane>
<el-tab-pane label="规格定价" name="second" v-if="specification">
<el-tab-pane label="规格定价" name="specification" v-if="specificationUrl">
<service-tab-specification
class="service_info"
:data="specification"
:url="specificationUrl"
></service-tab-specification>
</el-tab-pane>
<el-tab-pane label="提供机构" name="third" v-if="provider">
<el-tab-pane label="提供机构" name="provider" v-if="providerUrl">
<service-tab-provider
class="service_info"
:data="provider"
:url="providerUrl"
></service-tab-provider>
</el-tab-pane>
<el-tab-pane label="服务评价信息" name="fourth" v-if="comments">
<el-tab-pane label="服务评价信息" name="comments" v-if="commentsUrl">
<service-tab-comments
class="service_info"
:data="comments"
:url="commentsUrl"
></service-tab-comments>
</el-tab-pane>
</el-tabs>
......@@ -46,50 +46,27 @@ export default {
serviceTabComments,
},
props: {
type: {
detailUrl: {
type: String,
required: true,
default: () => "",
},
},
data: () => ({
serviceTabsActiveName: "first",
detail: null, // 服务详情信息
specification: null, // 规格定价
provider: null, // 提供机构
comments: null, // 服务评价信息
}),
methods: {
getDataFromApi(_url) {
return new Promise((resolve, reject) => {
this.$http
.get(_url)
.then((response) => {
resolve(response.body);
})
.catch(function(error) {
reject(error);
});
});
specificationUrl: {
type: String,
default: () => "",
},
init() {
this.getDataFromApi(`/static/serviceInfo.json`).then(
(data) => {
let _data = data[this.type];
this.detail = _data.detail;
this.specification = _data.specification;
this.provider = _data.provider;
this.comments = _data.comments;
},
(error) => {
console.log(error);
}
);
providerUrl: {
type: String,
default: () => "",
},
commentsUrl: {
type: String,
default: () => "",
},
},
created() {
this.init();
},
data: () => ({
tabName: "detail",
}),
methods: {},
};
</script>
......@@ -103,6 +80,9 @@ export default {
padding: 35px 40px 40px;
box-sizing: border-box;
}
.service_tab-comments {
padding: 35px 20px 20px !important;
}
</style>
<style>
......
......@@ -10,7 +10,12 @@
<service-info :data="baseInfo"></service-info>
<service-tabs type="sjfw"></service-tabs>
<service-tabs
detail-url="sjfw"
specification-url="sjfw"
provider-url="sjfw"
comments-url="sjfw"
></service-tabs>
</div>
</template>
......
......@@ -10,7 +10,12 @@
<service-info :data="baseInfo"></service-info>
<service-tabs type="skfw"></service-tabs>
<service-tabs
detail-url="skfw"
specification-url="skfw"
provider-url="skfw"
comments-url="skfw"
></service-tabs>
</div>
</template>
......
......@@ -3,30 +3,35 @@
<div class="sevice_breadcrumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item>服务超市</el-breadcrumb-item>
<el-breadcrumb-item>数据服务</el-breadcrumb-item>
<el-breadcrumb-item>服务详情信息</el-breadcrumb-item>
<el-breadcrumb-item>应用商店</el-breadcrumb-item>
<el-breadcrumb-item>应用详情信息</el-breadcrumb-item>
</el-breadcrumb>
</div>
<!-- <servive-commodity-info
:service-data="serviceData"
></servive-commodity-info>
<application-info :data="baseInfo"></application-info>
<servive-tabs-info type="sjfw"></servive-tabs-info> -->
<service-tabs
detail-url="yysd"
provider-url="yysd"
comments-url="yysd"
></service-tabs>
</div>
</template>
<script>
// import serviveCommodityInfo from "@/components/servive-commodity-info";
// import serviveTabsInfo from "@/components/servive-tabs-info";
import applicationInfo from "@/components/application-info";
import serviceTabs from "@/components/service-tabs";
export default {
components: {
// serviveCommodityInfo,
// serviveTabsInfo,
applicationInfo,
serviceTabs,
},
data: () => ({
serviceData: null,
baseInfo: null,
detailData: null,
specification: null,
provider: null,
}),
methods: {
getDataFromApi(_url) {
......@@ -42,9 +47,9 @@ export default {
});
},
init() {
this.getDataFromApi(`/static/serviceDetail.json`).then(
this.getDataFromApi(`/static/serviceBaseInfo.json`).then(
({ yysd }) => {
this.serviceData = yysd;
this.baseInfo = yysd;
},
(error) => {
console.log(error);
......
......@@ -10,7 +10,12 @@
<service-info :data="baseInfo"></service-info>
<service-tabs type="zhyyfw"></service-tabs>
<service-tabs
detail-url="zhyyfw"
specification-url="zhyyfw"
provider-url="zhyyfw"
comments-url="zhyyfw"
></service-tabs>
</div>
</template>
......
......@@ -8,7 +8,7 @@
"publishTime": "2020-03-12 18:31:12",
"updatedTime": "2020-03-12 18:31:12",
"dataField": "经济建设",
"serviceType": ["专题数据服务", "企业专题数据服务"],
"serviceType": "专题数据服务 企业专题数据服务",
"resourceSummary": "提供水路货物周转量排名和同比增长的专题数据服务",
"specifications": [
{
......@@ -49,7 +49,7 @@
"publishTime": "2020-03-12 18:31:12",
"updatedTime": "2020-03-12 18:31:12",
"dataField": "经济建设",
"serviceType": ["时空云服务", "专题地图服务"],
"serviceType": "时空云服务 专题地图服务",
"resourceSummary": "提供贵州应急资源空间分布展示的专题地图服务,与MO地图合作进行地图资源的摘录和某新服务。",
"specifications": [
{
......@@ -89,7 +89,7 @@
"publishTime": "2020-03-12 18:31:12",
"updatedTime": "2020-03-12 18:31:12",
"dataField": "经济建设",
"serviceType": ["综合应用服务"],
"serviceType": "综合应用服务",
"resourceSummary": "提供视频监控的空间分布展示和视频监控直播的服务,MOUMOU监控服务和直播服务的新服务。",
"specifications": [
{
......@@ -120,40 +120,20 @@
]
},
"yysd": {
"img": "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
"name": "mapvideos V1.0",
"openLevel": "共享",
"viewCount": "99999",
"acquireCount": "9999",
"providedBy": "北京比格数据",
"publishTime": "2020-03-12 18:31:12",
"updatedTime": "2020-03-12 18:31:12",
"acquireCount": "9999",
"serviceType": "综合应用服务",
"dataField": "经济建设",
"serviceType": ["综合应用服务"],
"resourceSummary": "提供视频监控的空间分布展示和视频监控直播的服务,MOUMOU监控服务和直播服务的新服务。",
"specifications": [
{
"name": "访问次数:20/日 访问量:100/日",
"value": 0,
"description": "用户服务申请通过审核确认后,每日可对应急地图进行20次免费访问"
},
{
"name": "访问次数:200/日 访问量:1000/日",
"value": 1,
"description": "用户服务申请通过审核确认后,每日可对应急地图进行200次免费访问"
},
{
"name": "访问次数:无上限 访问量:无上限",
"value": 2,
"description": "用户服务申请通过审核确认后,每日可对应急地图进行免费访问"
}
],
"ways": [
{
"name": "按月购买",
"name": "申请获取应用镜像部署权限",
"value": 0
},
{
"name": "按年购买",
"name": "申请获取应用二次开发权限(需要先行升级为开发者用户)",
"value": 1
}
]
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment