Commit 9e3a9c17 authored by 徐一鸣's avatar 徐一鸣

服务超市详情调试

parent 92c54c96
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div class="main_container"> <div class="main_container">
<div class="main_container-left" v-if="data.cover"> <div class="main_container-left" v-if="data.cover">
<img :src="data.cover" width="460" /> <img :src="data.cover" width="100%" />
</div> </div>
<div class="main_container-right"> <div class="main_container-right">
<ul class="service_base_info"> <ul class="service_base_info">
...@@ -199,9 +199,14 @@ export default { ...@@ -199,9 +199,14 @@ export default {
margin-top: 25px; margin-top: 25px;
} }
.main_container-left { .main_container-left {
width: 466px;
padding: 3px; padding: 3px;
background-color: #f9fafc; background-color: #f9fafc;
margin-right: 30px; margin-right: 30px;
font-size: 0;
}
.main_container-left img {
width: 100%;
} }
.main_container-right { .main_container-right {
flex-grow: 1; flex-grow: 1;
......
...@@ -180,9 +180,9 @@ export default { ...@@ -180,9 +180,9 @@ export default {
this.specificationData = specificationData; this.specificationData = specificationData;
this.providerData = { this.providerData = {
organization_name: datas.organization_name, organization_name: datas.organization_name,
picture_path: datas.picture_path, picture_path: datas.userInfo.picture_path,
user_name: "张先生", user_name: datas.userInfo.user_name,
phone: "010-66666666", phone: datas.userInfo.phone,
}; };
this.commentsData = datas.scoreDetail; this.commentsData = datas.scoreDetail;
}) })
......
...@@ -3,20 +3,21 @@ ...@@ -3,20 +3,21 @@
<div class="apass_breadcrumb"> <div class="apass_breadcrumb">
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item to="/shop">服务超市</el-breadcrumb-item> <el-breadcrumb-item to="/shop">服务超市</el-breadcrumb-item>
<el-breadcrumb-item to="/shop/space_time_service_list"> <el-breadcrumb-item to="/shop/space_time_service_list/6">
时空服务 时空服务
</el-breadcrumb-item> </el-breadcrumb-item>
<el-breadcrumb-item>服务详情信息</el-breadcrumb-item> <el-breadcrumb-item>服务详情信息</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<service-info :data="baseInfo"></service-info> <service-info :data="baseInfo" v-if="baseInfo"></service-info>
<service-tabs <service-tabs
detail-url="skfw" :detail-data="detailData"
specification-url="skfw" :specification-data="specificationData"
provider-url="skfw" :provider-data="providerData"
comments-url="skfw" :comments-data="commentsData"
:comments-url="commentsUrl"
></service-tabs> ></service-tabs>
</div> </div>
</template> </template>
...@@ -32,34 +33,118 @@ export default { ...@@ -32,34 +33,118 @@ export default {
}, },
data: () => ({ data: () => ({
baseInfo: null, baseInfo: null,
detailData: null,
specificationData: null,
providerData: null,
commentsData: null,
}), }),
computed: { computed: {
id() { id() {
return this.$route.params.id; return this.$route.params.id;
}, },
}, },
methods: { computed: {
getDataFromApi(_url) { id() {
return new Promise((resolve, reject) => { return this.$route.params.id;
this.$http },
.get(_url) commentsUrl() {
.then((response) => { return `/apaas/serviceapp/v3/servicemarket/estimates?serviceId=${this.id}`;
resolve(response.body);
})
.catch(function(error) {
reject(error);
});
});
}, },
},
methods: {
init() { init() {
this.getDataFromApi(`/static/serviceBaseInfo.json`).then( this.$http
({ skfw }) => { .get("/apaas/serviceapp/v3/servicemarket/detail", {
this.baseInfo = skfw; params: {
}, serviceId: this.id,
(error) => { },
})
.then(({ data }) => {
let datas = data.data;
let specificationData = datas.serviceRequestSpcs.map((item) => ({
id: item.id,
type: item.type,
name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
descript: item.des,
}));
this.baseInfo = {
service_id: this.id,
app_id: 0,
name: datas.name,
type: "Map Service",
openness: datas.openness,
view_count: datas.view_count,
apply_count: datas.apply_count,
cover: datas.cover,
organization_name: datas.organization_name,
create_time: datas.create_time,
update_date: datas.update_date,
sectors_name: datas.sectors_name,
data_service_type3_str: datas.data_service_type3_str,
descript: datas.descript,
serviceRequestSpcs: specificationData,
};
this.detailData = [
{
name: "获取流程",
type: "step",
value: ["服务申请", "信息填写", "审核确认", "服务获取"],
},
{
name: "服务描述",
type: "text",
value: datas.descript,
},
{
name: "服务属性", // TODO: replace
type: "list",
value: [
{
name: "大小",
value: "66kb",
},
{
name: "API",
value: "Java",
},
{
name: "用途",
value: "即用型",
},
{
name: "空间范围",
value:
"111.8915040799999, 114.25605481900004, 28.762848204000022",
},
{
name: "标签",
value: "T003 智能地图 T001",
},
{
name: "制作单位",
value: "贵州省应急管理应急管理厅",
},
{
name: "离线模式",
value: "禁用",
},
],
},
];
this.specificationData = specificationData;
this.providerData = {
organization_name: datas.organization_name,
picture_path: datas.userInfo.picture_path,
user_name: datas.userInfo.user_name,
phone: datas.userInfo.phone,
};
this.commentsData = datas.scoreDetail;
})
.catch(function(error) {
console.log(error); console.log(error);
} });
);
}, },
}, },
mounted() { mounted() {
......
...@@ -3,20 +3,21 @@ ...@@ -3,20 +3,21 @@
<div class="apass_breadcrumb"> <div class="apass_breadcrumb">
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item to="/shop">服务超市</el-breadcrumb-item> <el-breadcrumb-item to="/shop">服务超市</el-breadcrumb-item>
<el-breadcrumb-item to="/shop/comprehensive_app_list"> <el-breadcrumb-item to="/shop/comprehensive_app_list/11">
综合服务 综合服务
</el-breadcrumb-item> </el-breadcrumb-item>
<el-breadcrumb-item>服务详情信息</el-breadcrumb-item> <el-breadcrumb-item>服务详情信息</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<service-info :data="baseInfo"></service-info> <service-info :data="baseInfo" v-if="baseInfo"></service-info>
<service-tabs <service-tabs
detail-url="zhyyfw" :detail-data="detailData"
specification-url="zhyyfw" :specification-data="specificationData"
provider-url="zhyyfw" :provider-data="providerData"
comments-url="zhyyfw" :comments-data="commentsData"
:comments-url="commentsUrl"
></service-tabs> ></service-tabs>
</div> </div>
</template> </template>
...@@ -32,34 +33,112 @@ export default { ...@@ -32,34 +33,112 @@ export default {
}, },
data: () => ({ data: () => ({
baseInfo: null, baseInfo: null,
detailData: null,
specificationData: null,
providerData: null,
commentsData: null,
}), }),
computed: { computed: {
id() { id() {
return this.$route.params.id; return this.$route.params.id;
}, },
}, },
methods: { computed: {
getDataFromApi(_url) { id() {
return new Promise((resolve, reject) => { return this.$route.params.id;
this.$http },
.get(_url) commentsUrl() {
.then((response) => { return `/apaas/serviceapp/v3/servicemarket/estimates?serviceId=${this.id}`;
resolve(response.body);
})
.catch(function(error) {
reject(error);
});
});
}, },
},
methods: {
init() { init() {
this.getDataFromApi(`/static/serviceBaseInfo.json`).then( this.$http
({ zhyyfw }) => { .get("/apaas/serviceapp/v3/servicemarket/detail", {
this.baseInfo = zhyyfw; params: {
}, serviceId: this.id,
(error) => { },
})
.then(({ data }) => {
let datas = data.data;
let specificationData = datas.serviceRequestSpcs.map((item) => ({
id: item.id,
type: item.type,
name: `访问次数:${item.pv}/日 访问量:${item.count}/日`,
descript: item.des,
}));
this.baseInfo = {
service_id: this.id,
app_id: 0,
name: datas.name,
openness: datas.openness,
view_count: datas.view_count,
apply_count: datas.apply_count,
cover: datas.cover,
organization_name: datas.organization_name,
create_time: datas.create_time,
update_date: datas.update_date,
sectors_name: datas.sectors_name,
data_service_type3_str: datas.data_service_type3_str,
descript: datas.descript,
serviceRequestSpcs: specificationData,
};
this.detailData = [
{
name: "获取流程",
type: "step",
value: ["服务申请", "信息填写", "审核确认", "服务获取"],
},
{
name: "服务描述",
type: "text",
value: datas.descript,
},
{
name: "微服务响应列表", // TODO: replace
type: "table",
value: {
datas: [
{
name: "apaas-mapvideos-1",
description: "地图视频融合应用服务",
},
{
name: "apaas-mapvideos-2",
description: "地图视频融合应用服务",
},
{
name: "apaas-mapvideos-3",
description: "地图视频融合应用服务",
},
],
columns: [
{
prop: "name",
label: "微服务名称",
},
{
prop: "description",
label: "微服务描述",
},
],
},
},
];
this.specificationData = specificationData;
this.providerData = {
organization_name: datas.organization_name,
picture_path: datas.userInfo.picture_path,
user_name: datas.userInfo.user_name,
phone: datas.userInfo.phone,
};
this.commentsData = datas.scoreDetail;
})
.catch(function(error) {
console.log(error); console.log(error);
} });
);
}, },
}, },
mounted() { mounted() {
......
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