Commit 9e2343f6 authored by 刘殿昕's avatar 刘殿昕

shop应用列表,修复服务测试数据联动

parent 171e766e
......@@ -31,7 +31,7 @@
>{{ item.service_id == 0 ? item.application.app_name : item.service.name }}</p>
<p
class="shop_cell_msg bover_one"
>{{ item.service_id == 0 ? item.application.ywly : item.service.sectors }}</p>
>{{ item.service_id == 0 ? item.application.ywly : item.service.sectors_name }}</p>
<p
class="shop_cell_msg over_one"
>{{ item.service_id == 0 ? item.application.org : item.service.organization_name }}</p>
......
......@@ -6,7 +6,7 @@
class="com_card_img"
/>
<div class="com_card_name_v">
<div class="com_card_msg_name">{{ cellData.title }}</div>
<div class="com_card_msg_name">{{ cellData.app_name }}</div>
<div class="com_card_msg_version">V{{ cellData.version }}</div>
</div>
</div>
......@@ -14,13 +14,13 @@
<div class="com_card_msg_tit">
<img :src="require('@/assets/imgs/icon_shijian.png')" />&nbsp;上线时间
</div>
<div class="com_card_msg_num">{{ cellData.onlineTime }}</div>
<div class="com_card_msg_num">{{ helper.dateStringTransform(cellData.create_date) }}</div>
</div>
<div class="com_card_msg">
<div class="com_card_msg_tit">
<img :src="require('@/assets/imgs/icon_huoqu1.png')" />&nbsp;部署次数
</div>
<div class="com_card_msg_num1">{{ cellData.num }}</div>
<div class="com_card_msg_num1">{{ cellData.deploy_times }}</div>
</div>
<div class="com_card_btn">
<el-button size="medium" class="btn_1" @click="addShop(cellData.id)">加入购物车</el-button>
......@@ -30,13 +30,16 @@
</template>
<script>
import helper from "@/services/helper.js";
export default {
components: {},
props: {
url: { type: String, default: "" },
cellData: { type: Object, default: {} }
},
data: () => ({}),
data: () => ({
helper: helper
}),
computed: {},
watch: {},
methods: {
......@@ -45,9 +48,7 @@ export default {
this.$router.push(this.url + "/" + parame);
}
},
addShop(id) {
}
addShop(id) {}
},
mounted() {}
};
......
<template>
<div>
<div v-if="name=='应用商店'" ref="commodityList" class="commodity_card">
<div v-if="urlFilter=='app'" ref="commodityList" class="commodity_card">
<div ref="commodityCardIn" class="commodity_card_list">
<div v-for="item in datas" :cellData="item" :url="url" :key="item.id" class="commodity_card_item">
<div
v-for="item in datas"
:cellData="item"
:url="url"
:key="item.id"
class="commodity_card_item"
>
<commodity-card class="commodity_card_item_in" :cellData="item" :url="url"></commodity-card>
</div>
</div>
......@@ -78,7 +84,7 @@ export default {
type: Boolean,
default: false
},
name: { type: String, default: "" }
urlFilter: { type: String, default: "" }
},
data: () => ({
pagination: {
......@@ -121,18 +127,25 @@ export default {
let cardArr = this.$refs.commodityCardIn.children;
// console.log(rowCardNum, listWidth / rowCardNum);
for (let i = 0; i < cardArr.length; i++) {
cardArr[i].style.width = (listWidth / rowCardNum) - 1 + "px";
cardArr[i].style.width = listWidth / rowCardNum - 1 + "px";
}
// console.log(this.$refs.commodityCardIn);
}
},
mounted() {
this.getTotal();
if (this.name == "应用商店") {
this.pageResize();
window.onresize = () => {
this.pageResize();
};
mounted() {},
watch: {
datas: {
handler(val) {
this.getTotal();
if (this.urlFilter == "app") {
setTimeout(() => {
this.pageResize();
window.onresize = () => {
this.pageResize();
};
}, 0);
}
}
}
}
};
......
......@@ -122,12 +122,15 @@
:class="index == activeBtn ? 'button_filter_act':'button_filter'"
@click="clickButtonFilter(index)"
>{{ item.name }}</el-button>
<div v-if="urlFilter == 'app'" class="btn_right_check">
<el-checkbox v-model="couldTwice" @change="changeTwice">支持二次开发</el-checkbox>
</div>
</div>
<!-- the list -->
<commodity-list
:datas="lists"
:datas="lists && lists.length != 0 ? lists : []"
:url="url"
:name="name"
:urlFilter="urlFilter"
:paginationShow="true"
:pageSizeShow="true"
@refresh="getNewList"
......@@ -150,7 +153,13 @@ export default {
default: ""
},
url: { type: String, default: "" },
name: { type: String, default: "" }
name: { type: String, default: "" },
filterNmaes: {
type: Array,
default: () => {
[];
}
}
},
data: () => ({
search: "",
......@@ -180,62 +189,129 @@ export default {
activeBtn: 0,
lists: [],
filterLists: [
{
id: 110,
name: "",
prop: "",
childDomains: []
},
{
id: 10,
name: "数据服务类型",
name: "",
prop: "serviceTypeInfo",
childDomains: []
},
{
id: 11,
name: "数据领域",
name: "",
prop: "serviceDomain",
childDomains: []
},
{
id: 100,
name: "数据来源机构",
name: "",
prop: "organizations",
childDomains: []
}
],
page: 1,
limit: 10
limit: 10,
couldTwice: false
}),
mounted() {},
watch: {
urlFilter: {
handler(val) {
if (val) {
if (val == "app") {
this.$set(this.filterLists, 0, {
id: 110,
name: "部署来源",
prop: "",
childDomains: [
{
id: 1,
name: "平台应用",
prop: "",
childDomains: null
},
{
id: 2,
name: "开发者应用",
prop: "",
childDomains: null
}
]
});
}
this.getShopFilter();
}
}
},
filterNmaes: {
handler(val) {
for (let i = 0; i < val.length; i++) {
this.filterLists[i + 1].name = val[i];
}
console.log(this.filterLists)
}
}
},
methods: {
getShopList() {
let query = {
serviceName: this.search,
serviceType1: this.urlFilter,
serviceType2s: this.activeOptions[0].join(","),
serviceType3s: this.activeChildOptions[0].join(","),
dataDomains: this.activeOptions[1].join(","),
organizeIds: this.activeOptions[2].join(","),
orderBy: this.activeBtn,
Page: this.page,
Size: this.limit
};
this.$api.serviceShop.getServiceShopList(query).then(response => {
if (response.data.success == "1") {
this.lists = response.data.data;
} else {
console.log(response.data.errMsg);
}
});
if (this.urlFilter == "app") {
let query = {
online_state: this.activeOptions[0].join(","),
appTypes: this.activeOptions[1].join(","),
businessArea: this.activeOptions[2].join(","),
orgSource: this.activeOptions[3].join(","),
developable: Number(this.couldTwice),
order:
this.activeBtn == 0
? "search_count"
: this.activeBtn == 1
? "create_date"
: this.activeBtn == 2
? "apply_times"
: "evaluation",
page: this.page,
limit: this.limit,
search: this.search
};
this.$api.serviceShop.getAppList(query).then(response => {
if (response.data.success == "1") {
this.lists = response.data.data;
} else {
console.log(response.data.errMsg);
}
});
} else {
let query = {
serviceName: this.search,
serviceType1: this.urlFilter,
serviceType2s: this.activeOptions[1].join(","),
serviceType3s: this.activeChildOptions[1].join(","),
dataDomains: this.activeOptions[2].join(","),
organizeIds: this.activeOptions[3].join(","),
orderBy: this.activeBtn,
Page: this.page,
Size: this.limit
};
this.$api.serviceShop.getServiceShopList(query).then(response => {
if (response.data.success == "1") {
this.lists = response.data.data;
} else {
console.log(response.data.errMsg);
}
});
}
},
getShopFilter() {
if (this.urlFilter == "app") {
this.getAppArea();
this.getAppType();
this.getAppOrg();
this.getShopList();
} else {
let query = {
type: this.urlFilter
......@@ -243,23 +319,23 @@ export default {
this.$api.serviceShop.getServiceShopFilter(query).then(response => {
if (response.data.success == 1) {
let data = response.data.data;
this.filterLists[0].childDomains = data.serviceTypeInfo
this.filterLists[1].childDomains = data.serviceTypeInfo
? data.serviceTypeInfo
: [];
this.filterLists[1].childDomains = data.serviceDomain
this.filterLists[2].childDomains = data.serviceDomain
? data.serviceDomain
: [];
this.filterLists[2].childDomains = data.organizations
this.filterLists[3].childDomains = data.organizations
? data.organizations
: [];
setTimeout(() => {
this.judgeHeight();
}, 0);
this.getShopList();
} else {
console.log(response.data.errMsg);
}
});
this.getShopList();
}
},
judgeHeight() {
......@@ -360,6 +436,36 @@ export default {
this.$set(this.activeOptions, item, []);
this.$set(this.activeChildOptions, item, []);
this.getShopList();
},
changeTwice() {
this.getShopList();
},
getAppArea() {
this.$api.serviceShop.getAppArea().then(response => {
if (response.data.success == 1) {
this.filterLists[1].childDomains = response.data.data;
} else {
console.log(response.data.errMsg);
}
});
},
getAppType() {
this.$api.serviceShop.getAppType().then(response => {
if (response.data.success == 1) {
this.filterLists[2].childDomains = response.data.data;
} else {
console.log(response.data.errMsg);
}
});
},
getAppOrg() {
this.$api.serviceShop.getAppOrg().then(response => {
if (response.data.success == 1) {
this.filterLists[3].childDomains = response.data.data;
} else {
console.log(response.data.errMsg);
}
});
}
}
};
......@@ -466,6 +572,12 @@ export default {
}
.btn_group {
margin-bottom: 15px;
position: relative;
}
.btn_right_check {
position: absolute;
right: 20px;
top: 10px;
}
</style>
<style>
......@@ -485,4 +597,15 @@ export default {
.input_right .el-input__inner:focus-within {
border: 1px solid #626de9;
}
.btn_right_check .el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: #626de9;
border-color: #626de9;
}
.btn_right_check .el-checkbox__input.is-checked + .el-checkbox__label {
color: #626de9;
}
.btn_right_check .el-checkbox__input.is-focus .el-checkbox__inner {
border-color: #626de9;
}
</style>
\ No newline at end of file
......@@ -28,7 +28,7 @@
<div
v-if="cellIsService"
class="shopping_cell_type"
>{{ cellItems.service.data_service_type1_name }}{{ cellItems.service.data_service_type2_name }}{{ cellItems.service.data_service_type3_name }}</div>
>{{ cellItems.service.sectors_name }}</div>
<div v-else class="shopping_cell_type">{{ cellItems.application.ywly }}</div>
<div
class="shopping_cell_creator"
......
......@@ -5,7 +5,7 @@
<service-shop-menu></service-shop-menu>
</el-aside>
<el-main>
<service-list :name="name" :url="url" :urlFilter="urlFilter"></service-list>
<service-list :filterNmaes="filterNmaes" :name="name" :url="url" :urlFilter="urlFilter"></service-list>
</el-main>
</el-container>
</div>
......@@ -22,7 +22,8 @@ export default {
data: () => ({
urlFilter: "",
url: "",
name: ""
name: "",
filterNmaes: []
}),
mounted() {
this.getVal(this.$route.path);
......@@ -37,36 +38,43 @@ export default {
this.name = "数据服务";
this.urlFilter = "5";
this.url = "/shop/sjfwDetail";
this.filterNmaes = ["数据服务类型", "数据领域", "数据来源机构"];
break;
case "space_time_service_list":
this.name = "时空服务";
this.urlFilter = "6";
this.url = "/shop/skfwDetail";
this.filterNmaes = ["数据服务类型", "数据领域", "数据来源机构"];
break;
case "video_service_list":
this.name = "视频服务";
this.urlFilter = "7";
this.url = "";
this.filterNmaes = [];
break;
case "perception_service_list":
this.name = "感知服务";
this.urlFilter = "10";
this.url = "";
this.filterNmaes = [];
break;
case "comprehensive_app_list":
this.name = "综合服务";
this.urlFilter = "";
this.urlFilter = "5";
this.url = "/shop/zhfwDetail";
this.filterNmaes = ["数据服务类型", "数据领域", "数据来源机构"];
break;
case "app_store_list":
this.name = "应用商店";
this.urlFilter = "app";
this.url = "/shop/yysdDetail";
this.filterNmaes = ["应用类型", "应用领域", "应用来源机构"];
break;
default:
this.name = "";
this.urlFilter = "";
this.url = "";
this.filterNmaes = [];
break;
}
}
......
......@@ -73,6 +73,7 @@
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
@changeTable="changeTable"
></ces-table>
</el-tab-pane>
<el-tab-pane label="请求体" name="1">
......@@ -197,7 +198,6 @@
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
@changeTable="changeTable"
></ces-table>
</div>
</el-tab-pane>
......@@ -465,7 +465,13 @@ export default {
{ label: "file", value: "file" }
]
},
{ label: "请求值", prop: "val", type: "upload", align: "center", uploadKey: "field_type" },
{
label: "请求值",
prop: "val",
type: "upload",
align: "center",
uploadKey: "field_type"
},
{
label: "操作",
type: "Button",
......@@ -944,13 +950,14 @@ export default {
.fwcs_tabs .el-tabs__header {
margin: 20px 0;
}
.zhyy_select .el-input__prefix, .el-input__suffix {
position: absolute;
top: 0;
right: 10px;
-webkit-transition: all .3s;
height: 100%;
color: #C0C4CC;
text-align: right;
.zhyy_select .el-input__prefix,
.el-input__suffix {
position: absolute;
top: 0;
right: 10px;
-webkit-transition: all 0.3s;
height: 100%;
color: #c0c4cc;
text-align: right;
}
</style>
......@@ -15,16 +15,10 @@ serviceType2s=${params.serviceType2s}&dataDomains=${params.dataDomains}&
organizeIds=${params.organizeIds}&orderBy=${params.orderBy}&
Page=${params.Page}&Size=${params.Size}`);
},
getAppList(params) {
return axios.get(``)
},
getServiceShopDetail(params) {
return axios.get(`/apaas/serviceapp/v3/servicemarket/detail?serviceId=`)
},
// service list application
getApparea() {
return axios.get(`/apaas/hubApi/market/businessAreas`)
},
getAppArea() {
return axios.get(`/apaas/hubApi/market/businessAreas`)
},
......@@ -36,7 +30,7 @@ Page=${params.Page}&Size=${params.Size}`);
},
getAppList(params) {
return axios.get(`/apaas/hubApi/market/list?online_state=${params.online_state}&appTypes=${params.appTypes}&
businessArea=${params.businessArea}&developable=${params.developable}&page=${params.page}&limit=${params.limit}&search=${params.search}`);
businessArea=${params.businessArea}&developable=${params.developable}&orgSource=${params.orgSource}&order=${params.order}&page=${params.page}&limit=${params.limit}&search=${params.search}`);
},
// shopping cart
addShoppingCart(params) {
......
......@@ -36,16 +36,17 @@ module.exports.dateFormat = function (fmt, timestamp) {
}
module.exports.dateStringTransform = function (date) {
let arr = date.split("T");
let d = arr[0];
let darr = d.split('-');
let t = arr[1];
let tarr = t.split('.000');
let marr = tarr[0].split(':');
let h = parseInt(marr[0]) >= 10 ? parseInt(marr[0]) : "0" + parseInt(marr[0]);
let m = parseInt(marr[1]) >= 10 ? parseInt(marr[1]) : "0" + parseInt(marr[1]);
let s = parseInt(marr[2]) >= 10 ? parseInt(marr[2]) : "0" + parseInt(marr[2]);
let dd = arr[0] + " " + h + ":" + m + ":" + s;
return dd;
if (String(date).indexOf("T") != -1) {
let arr = date.split("T");
let t = arr[1];
let tarr = t.split('.000');
let marr = tarr[0].split(':');
let h = parseInt(marr[0]) >= 10 ? parseInt(marr[0]) : "0" + parseInt(marr[0]);
let m = parseInt(marr[1]) >= 10 ? parseInt(marr[1]) : "0" + parseInt(marr[1]);
let s = parseInt(marr[2]) >= 10 ? parseInt(marr[2]) : "0" + parseInt(marr[2]);
let dd = arr[0] + " " + h + ":" + m + ":" + s;
return dd;
} else {
return date;
}
}
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