Commit e499f06e authored by 刘殿昕's avatar 刘殿昕

购物车,menu购物,服务超市路由根据后端调整,组件阶梯

parent e7514cbe
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<script> <script>
import listTable from "@/components/apass-table"; import listTable from "@/components/apass-table";
import ListPagination from "@/components/comments-pagination"; import ListPagination from "@/components/comments-pagination";
import ListFilter from "@/components/table-filter"; import ListFilter from "@/components/table/table-filter";
export default { export default {
components: { components: {
......
...@@ -23,17 +23,21 @@ ...@@ -23,17 +23,21 @@
:key="'shopping' + index" :key="'shopping' + index"
class="shop_list_cell shop_line" class="shop_list_cell shop_line"
> >
<img <img :src="item.service.cover" class="shop_img" />
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
class="shop_img"
/>
<div class="shop_cell_msgs"> <div class="shop_cell_msgs">
<p @click="getDetail(item.id)" class="shop_cell_name over_one">{{ item.name }}</p> <p
<p class="shop_cell_msg bover_one">{{ item.type }}</p> @click="getDetail(item.id)"
<p class="shop_cell_msg over_one">{{ item.creator }}</p> class="shop_cell_name over_one"
>{{ 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>
<p
class="shop_cell_msg over_one"
>{{ item.service_id == 0 ? item.application.org : item.service.organization_name }}</p>
</div> </div>
<div> <div>
<img @click="deleteItem(item.id)" src="../assets/imgs/ic_delete.png" alt /> <img @click.stop="deleteItem(item.id)" src="../assets/imgs/ic_delete.png" alt />
</div> </div>
</div> </div>
<div class="shop_footer"> <div class="shop_footer">
...@@ -99,23 +103,23 @@ export default { ...@@ -99,23 +103,23 @@ export default {
children: [ children: [
{ {
name: "数据服务", name: "数据服务",
path: "/shop/data_service_list" path: "/shop/service/5"
}, },
{ {
name: "时空服务", name: "时空服务",
path: "/shop/space_time_service_list" path: "/shop/service/6"
}, },
{ {
name: "视频服务", name: "视频服务",
path: "/shop/video_service_list" path: "/shop/service/7"
}, },
{ {
name: "感知服务", name: "感知服务",
path: "/shop/perception_service_list" path: "/shop/service/10"
}, },
{ {
name: "综合应用", name: "综合应用",
path: "/shop/comprehensive_app_list" path: "/shop/service/11"
}, },
{ {
name: "云资源服务", name: "云资源服务",
...@@ -123,7 +127,7 @@ export default { ...@@ -123,7 +127,7 @@ export default {
}, },
{ {
name: "应用商店", name: "应用商店",
path: "/shop/app_store_list" path: "/shop/service/12"
} }
] ]
} }
...@@ -136,45 +140,22 @@ export default { ...@@ -136,45 +140,22 @@ export default {
{ name: "关于BD-aPaaS", path: "" }, { name: "关于BD-aPaaS", path: "" },
{ name: "退出登录", path: "" } { name: "退出登录", path: "" }
], ],
shopping_list: [ shopping_list: []
{
id: 0,
name: "水路货物周转量情况",
type: "基础数据服务",
creator: "贵州省交通运输厅0",
state: 1,
mapService: 1,
num: 2,
checkedSubscription: false,
specification: 1,
specificationApplication: 2
},
{
id: 1,
name: "水路货物周转量情况水路货物周水路货物周转量情况水路货物周",
type: "基础数据服务",
creator: "贵州省交通运输厅1",
state: 1,
num: 2,
checkedSubscription: false,
specification: 1,
specificationApplication: 2
},
{
id: 2,
name: "水路货物周转量情况水路货物周转量情况",
type: "基础数据服务",
creator: "贵州省交通运输厅2",
state: 1,
mapService: 1,
num: 2,
checkedSubscription: true,
specification: 1,
specificationApplication: 2
}
]
}; };
}, },
mounted() {
this.getList();
},
computed: {
getMenuCartState() {
return this.$store.state.menuCartState;
}
},
watch: {
getMenuCartState(newVal) {
this.getList();
}
},
methods: { methods: {
gotopage(n) { gotopage(n) {
this.$router.push(n); this.$router.push(n);
...@@ -182,9 +163,16 @@ export default { ...@@ -182,9 +163,16 @@ export default {
settlement() { settlement() {
this.$router.push({ name: "shoppingCart" }); this.$router.push({ name: "shoppingCart" });
}, },
deleteItem() {}, deleteItem(id) {
let query = [id];
this.$api.serviceShop.delShoppingCart(query).then(response => {
this.getList();
});
},
getDetail() { getDetail() {
// if you want goto detail page, you should give me the type at first // if you want goto detail page, you should give me the type at first
// at here, we will goto shopping cart
this.$router.push({ name: "shoppingCart" });
}, },
navAction(index, path) { navAction(index, path) {
this.$router.push(path); this.$router.push(path);
...@@ -202,6 +190,16 @@ export default { ...@@ -202,6 +190,16 @@ export default {
} }
this.now_menu = parent; this.now_menu = parent;
} }
},
getList() {
this.$api.serviceShop.getShoppingCart().then(response => {
if (response.data.success == "1") {
console.log(response.data.data);
this.shopping_list = response.data.data.valid.slice(0, 3);
} else {
console.log(response.data.message);
}
});
} }
} }
}; };
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div> <div>
<div class="head_flex"> <div class="head_flex">
<el-breadcrumb separator="/" class="bread_crumb1 bread_left"> <el-breadcrumb separator="/" class="bread_crumb1 bread_left">
<el-breadcrumb-item :to="{ path: '/shop' }">服务超市</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/shop' }">{{ $t('lang.serviceShop') }}</el-breadcrumb-item>
<el-breadcrumb-item>{{ name }}</el-breadcrumb-item> <el-breadcrumb-item>{{ name }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<div v-if="urlList" class="input_right"> <div v-if="urlList" class="input_right">
...@@ -35,10 +35,7 @@ ...@@ -35,10 +35,7 @@
:class="openList[index] == 'up' ? 'classification_line_hid':'classification_line_show'" :class="openList[index] == 'up' ? 'classification_line_hid':'classification_line_show'"
> >
<ul :id="item.id" class="classification_line_items_ul"> <ul :id="item.id" class="classification_line_items_ul">
<li <li class="classification_line_items_li" :key="'cda' + index">
class="classification_line_items_li"
:key="'cda' + index"
>
<div class="classification_span"> <div class="classification_span">
<span <span
@click="clickAll(index)" @click="clickAll(index)"
...@@ -180,8 +177,7 @@ export default { ...@@ -180,8 +177,7 @@ export default {
} }
], ],
activeBtn: 0, activeBtn: 0,
lists: [ lists: [],
],
filterLists: [ filterLists: [
{ {
id: 10, id: 10,
...@@ -237,9 +233,15 @@ export default { ...@@ -237,9 +233,15 @@ export default {
this.$api.serviceShop.getServiceShopFilter(query).then(response => { this.$api.serviceShop.getServiceShopFilter(query).then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
let data = response.data.data; let data = response.data.data;
this.filterLists[0].childDomains = data.serviceTypeInfo ? data.serviceTypeInfo : []; this.filterLists[0].childDomains = data.serviceTypeInfo
this.filterLists[1].childDomains = data.serviceDomain ? data.serviceDomain : []; ? data.serviceTypeInfo
this.filterLists[2].childDomains = data.organizations ? data.organizations : []; : [];
this.filterLists[1].childDomains = data.serviceDomain
? data.serviceDomain
: [];
this.filterLists[2].childDomains = data.organizations
? data.organizations
: [];
setTimeout(() => { setTimeout(() => {
this.judgeHeight(); this.judgeHeight();
}, 0); }, 0);
...@@ -344,7 +346,7 @@ export default { ...@@ -344,7 +346,7 @@ export default {
this.getShopList(); this.getShopList();
}, },
clickAll(item) { clickAll(item) {
console.log(item) console.log(item);
this.activeOptions[item] = []; this.activeOptions[item] = [];
this.activeChildOptions[item] = []; this.activeChildOptions[item] = [];
} }
......
...@@ -24,35 +24,35 @@ export default { ...@@ -24,35 +24,35 @@ export default {
{ {
id: 0, id: 0,
label: "数据服务", label: "数据服务",
router: "/shop/data_service_list", router: "/shop/service/5",
active: "tool_ic_shujufw_sel", active: "tool_ic_shujufw_sel",
default: "tool_ic_shujufw" default: "tool_ic_shujufw"
}, },
{ {
id: 1, id: 1,
label: "时空服务", label: "时空服务",
router: "/shop/space_time_service_list", router: "/shop/service/6",
active: "tool_ic_shikongfw_sel", active: "tool_ic_shikongfw_sel",
default: "tool_ic_shikongfw" default: "tool_ic_shikongfw"
}, },
{ {
id: 2, id: 2,
label: "视频服务", label: "视频服务",
router: "/shop/video_service_list", router: "/shop/service/7",
active: "tool_ic_shipinfw_sel", active: "tool_ic_shipinfw_sel",
default: "tool_ic_shipinfw" default: "tool_ic_shipinfw"
}, },
{ {
id: 3, id: 3,
label: "感知服务", label: "感知服务",
router: "/shop/perception_service_list", router: "/shop/service/10",
active: "tool_ic_ganzhifw_sel", active: "tool_ic_ganzhifw_sel",
default: "tool_ic_ganzhifw" default: "tool_ic_ganzhifw"
}, },
{ {
id: 4, id: 4,
label: "综合服务", label: "综合服务",
router: "/shop/comprehensive_app_list", router: "/shop/service/11",
active: "tool_ic_zongheyyfw_sel", active: "tool_ic_zongheyyfw_sel",
default: "tool_ic_zongheyyfw" default: "tool_ic_zongheyyfw"
}, },
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
{ {
id: 6, id: 6,
label: "应用商店", label: "应用商店",
router: "/shop/app_store_list", router: "/shop/service/12",
active: "tool_ic_yingyongsd_sel", active: "tool_ic_yingyongsd_sel",
default: "tool_ic_yingyongsd" default: "tool_ic_yingyongsd"
} }
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<script> <script>
import uploadFile from "@/components/upload_file"; import uploadFile from "@/components/upload_file";
import tableUm from "../table-um"; import tableUm from "@/components/table/table-um";
export default { export default {
props: ["data"], props: ["data"],
components: { components: {
......
...@@ -10,23 +10,29 @@ ...@@ -10,23 +10,29 @@
<el-col :span="9"> <el-col :span="9">
<div class="shopping_cell_item"> <div class="shopping_cell_item">
<img <img
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" :src="cellIsService ? cellItems.service.cover:cellItems.application.logo"
class="shopping_cell_img" class="shopping_cell_img"
/> />
<div class="shopping_cell_msg"> <div class="shopping_cell_msg">
<div class="shopping_cell_name"> <div class="shopping_cell_name">
{{ cellItems.name }} {{ cellItems.service.name }}
<span <span
v-if="cellItems.mapService" v-if="cellItems.service.data_service_type1_name == '时空服务'"
class="tags map_service" class="tags map_service"
>mapService</span> >mapService</span>
<span v-if="cellItems.state == 1" class="tags shared">共享</span> <span v-if="cellItems.service.openness == 1" class="tags shared">共享</span>
<span v-else-if="cellItems.state == 2" class="tags restricted">受限</span> <span v-else-if="cellItems.service.openness == 2" class="tags restricted">受限</span>
<span v-else class="tags sensitive">敏感</span> <span v-else class="tags sensitive">敏感</span>
</div> </div>
<div class="shopping_cell_msg_other"> <div class="shopping_cell_msg_other">
<div class="shopping_cell_type">{{ cellItems.type }}</div> <div
<div class="shopping_cell_creator">{{ cellItems.creator }}</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>
<div v-else class="shopping_cell_type">{{ cellItems.application.ywly }}</div>
<div
class="shopping_cell_creator"
>{{ cellIsService ? cellItems.service.organization_name:cellItems.application.org }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -34,39 +40,52 @@ ...@@ -34,39 +40,52 @@
<el-col :span="5"> <el-col :span="5">
<div class="shopping_cell_specification"> <div class="shopping_cell_specification">
<div class="shopping_cell_specification_val"> <div class="shopping_cell_specification_val">
<div <div class="shopping_cell_specification_val_specification">规格:{{ getSpecification }}</div>
class="shopping_cell_specification_val_specification"
>规格:{{ specificationBtns[cellItems.specification] }}</div>
<div <div
class="shopping_cell_specification_val_type" class="shopping_cell_specification_val_type"
>申请方式:{{ specificationApplicationBtns[cellItems.specificationApplication - 1] }}</div> >申请方式:{{ specificationApplicationBtns[cellItems.duration_method - 1].value }}</div>
<div class="shopping_cell_specification_edit"> <div class="shopping_cell_specification_edit">
<el-popover <el-popover
placement="right-start" placement="right-start"
width="280" width="280"
v-model="visible" v-model="visible"
@after-leave="setSpecificationPop" @show="setSpecificationPop"
> >
<div> <div>
<div class="shopping_cell_specification_title">规格:</div> <div v-if="cellIsService">
<div> <div class="shopping_cell_specification_title">规格:</div>
<el-button <div v-if="cellItems.service.request_spcs_info && cellItems.service.request_spcs_info.length != 0">
v-for="(item, index) in specificationBtns" <el-button
:key="'specification' + index" v-for="(item, index) in cellItems.service.request_spcs_info"
:class="specificationPop == index ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'" :key="'specification' + index"
size="mini" :class="specificationPop == item.id ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'"
@click="changeSpecification(index)" size="mini"
>{{ index + 1 + ". " + item }}</el-button> @click="changeSpecification(item.id)"
>{{ index + 1 + ". " + item.des }}</el-button>
</div>
<div class="no_option" v-else>暂无规格</div>
</div>
<div v-else>
<div class="shopping_cell_specification_title">规格:</div>
<div>
<el-button
v-for="(item, index) in appSpecificationBtns"
:key="'specification' + index"
:class="specificationPop == item.id ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'"
size="mini"
@click="changeSpecification(item.id)"
>{{ index + 1 + ". " + item.value }}</el-button>
</div>
</div> </div>
<div class="shopping_cell_specification_title">申请方式:</div> <div class="shopping_cell_specification_title">申请方式:</div>
<div> <div>
<el-button <el-button
v-for="(item, index) in specificationApplicationBtns" v-for="(item, index) in specificationApplicationBtns"
:key="'specification' + index" :key="'specification' + index"
:class="specificationApplicationPop == index ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'" :class="specificationApplicationPop == item.id ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'"
size="mini" size="mini"
@click="changeSpecificationApplication(index)" @click="changeSpecificationApplication(item.id)"
>{{ item }}购买</el-button> >{{ item.value }}购买</el-button>
</div> </div>
</div> </div>
<div class="pop_footer"> <div class="pop_footer">
...@@ -93,7 +112,7 @@ ...@@ -93,7 +112,7 @@
<el-col :span="4" class="shopping_cell_num"> <el-col :span="4" class="shopping_cell_num">
<el-input-number <el-input-number
:disabled="readOnly" :disabled="readOnly"
v-model="cellItems.num" v-model="cellItems.duration"
@change="changeNum" @change="changeNum"
size="mini" size="mini"
:min="1" :min="1"
...@@ -102,7 +121,7 @@ ...@@ -102,7 +121,7 @@
<el-col :span="4" class="shopping_cell_options"> <el-col :span="4" class="shopping_cell_options">
<el-checkbox <el-checkbox
v-if="!readOnly" v-if="!readOnly"
v-model="cellItems.checkedSubscription" v-model="cellItems.is_subscribe"
@change="changeSubscription" @change="changeSubscription"
>订阅该服务</el-checkbox> >订阅该服务</el-checkbox>
<div class="shopping_cell_options_del"> <div class="shopping_cell_options_del">
...@@ -126,6 +145,9 @@ export default { ...@@ -126,6 +145,9 @@ export default {
readOnly: { readOnly: {
type: Boolean, type: Boolean,
default: false default: false
},
cellIsService: {
type: Boolean
} }
}, },
watch: { watch: {
...@@ -146,34 +168,69 @@ export default { ...@@ -146,34 +168,69 @@ export default {
checkedSubscription: false, checkedSubscription: false,
visible: false, visible: false,
specificationPop: 1, specificationPop: 1,
specificationApplicationPop: 0, specificationApplicationPop: 1,
specificationBtns: [ // specificationBtns: [
"访问次数:20/日 访问量:100/日", // { id: 1, value: "访问次数:20/日 访问量:100/日" },
"访问次数:200/日 访问量:1000/日", // { id: 2, value: "访问次数:200/日 访问量:1000/日" },
"访问次数:无上限 访问量:无上限" // { id: 3, value: "访问次数:无上限 访问量:无上限" }
// ],
appSpecificationBtns: [
{ id: 1, value: "部署" },
{ id: 2, value: "开发" }
], ],
specificationApplicationBtns: ["按月", "按年"] specificationApplicationBtns: [
{ id: 1, value: "按月" },
{ id: 2, value: "按年" }
]
}), }),
computed: {}, computed: {
getSpecification() {
if (this.cellIsService) {
let arr = [];
if (
this.cellItems.service.request_spec_info &&
this.cellItems.service.request_spec_info.length != 0
) {
this.cellItems.service.request_spec_info.forEach(item => {
arr.push(item.id);
});
}
let num = arr.indexOf(this.cellItems.spec_id);
let specification = "";
if (num != -1) {
specification = this.cellItems.service.request_spec_info[num].value;
}
return specification;
} else {
if (this.cellItems.spec_id == 1) {
return "部署";
} else {
return "开发";
}
}
}
},
mounted() {},
methods: { methods: {
getState(val) { getState(val) {
this.$emit("changeState", { state: val, index: this.cellIndex }); this.$emit("changeState", { state: val, index: this.cellIndex });
}, },
changeSpecification(val) { changeSpecification(val) {
console.log(val);
this.specificationPop = val; this.specificationPop = val;
}, },
changeSpecificationApplication(val) { changeSpecificationApplication(val) {
this.specificationApplicationPop = val; this.specificationApplicationPop = val;
}, },
submitPop() { submitPop() {
this.cellItems.specification = this.specificationPop; this.cellItems.spec_id = this.specificationPop;
this.cellItems.specificationApplication = this.specificationApplicationPop; this.cellItems.duration_method = this.specificationApplicationPop;
this.visible = false; this.visible = false;
this.changeCellItem(); this.changeCellItem();
}, },
setSpecificationPop() { setSpecificationPop() {
this.specificationPop = this.cellItems.specification; this.specificationPop = this.cellItems.spec_id;
this.specificationApplicationPop = this.cellItems.specificationApplication; this.specificationApplicationPop = this.cellItems.duration_method;
}, },
changeSubscription(val) { changeSubscription(val) {
this.changeCellItem(); this.changeCellItem();
...@@ -193,8 +250,7 @@ export default { ...@@ -193,8 +250,7 @@ export default {
data: this.cellItems data: this.cellItems
}); });
} }
}, }
mounted() {}
}; };
</script> </script>
...@@ -349,6 +405,11 @@ export default { ...@@ -349,6 +405,11 @@ export default {
text-align: right; text-align: right;
margin: 30px 5px 5px; margin: 30px 5px 5px;
} }
.no_option {
text-align: center;
height: 40px;
line-height: 40px;
}
</style> </style>
<style> <style>
.shopping_cell_specification_edit .el-button { .shopping_cell_specification_edit .el-button {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
<div class="shopping_list shopping_list_fail"> <div class="shopping_list shopping_list_fail">
<div class="expired_service">已失效服务</div> <div class="expired_service">已失效服务</div>
<ShoppingCartList :readOnly="true" class="shopping_all_list" /> <ShoppingCartList :readOnly="true" :list="listIn" class="shopping_all_list" />
</div> </div>
<div class="shopping_list shopping_list_options"> <div class="shopping_list shopping_list_options">
<div class="shopping_cart_options"> <div class="shopping_cart_options">
...@@ -74,7 +74,8 @@ export default { ...@@ -74,7 +74,8 @@ export default {
data: () => ({ data: () => ({
checkShopAll: false, checkShopAll: false,
checkList: [], checkList: [],
list: [] list: [],
listIn: []
}), }),
mounted() { mounted() {
this.getList(); this.getList();
...@@ -93,11 +94,11 @@ export default { ...@@ -93,11 +94,11 @@ export default {
this.$api.serviceShop.getShoppingCart().then(response => { this.$api.serviceShop.getShoppingCart().then(response => {
if (response.data.success == "1") { if (response.data.success == "1") {
console.log(response.data.data); console.log(response.data.data);
this.list = response.data.data; this.list = response.data.data.valid;
this.listIn = response.data.data.invalid;
for (const index in this.list) { for (const index in this.list) {
this.checkList.push(false); this.checkList.push(false);
} }
console.log(this.checkList);
} else { } else {
console.log(response.data.message); console.log(response.data.message);
} }
...@@ -109,7 +110,6 @@ export default { ...@@ -109,7 +110,6 @@ export default {
changeState(val) { changeState(val) {
console.log(val); console.log(val);
this.$set(this.checkList, val.index, val.state); this.$set(this.checkList, val.index, val.state);
console.log(this.checkList);
if (this.checkList.indexOf(false) == -1) { if (this.checkList.indexOf(false) == -1) {
this.checkShopAll = true; this.checkShopAll = true;
} else { } else {
...@@ -117,24 +117,37 @@ export default { ...@@ -117,24 +117,37 @@ export default {
} }
}, },
delSelectService() { delSelectService() {
let query = [];
this.checkList.forEach((item, index) => { this.checkList.forEach((item, index) => {
if (item === true) { if (item === true) {
console.log(this.list[index]); query.push(this.list[index].id);
} }
}); });
this.$api.serviceShop.delShoppingCart(query).then(response => {
console.log(response);
this.getList()
});
}, },
changeCellMsg(val) { changeCellMsg(val) {
console.log(val); console.log(val);
}, },
deleteItem(val) { deleteItem(val) {
console.log(val); console.log(val);
let query = [val.data.id];
this.$api.serviceShop.delShoppingCart(query).then(response => {
console.log(response);
this.getList()
});
}, },
oneClickApplication() { oneClickApplication() {
let arr = [];
this.checkList.forEach((item, index) => { this.checkList.forEach((item, index) => {
if (item === true) { if (item === true) {
console.log(this.list[index]); arr.push(this.list[index]);
} }
}); });
this.$store.commit("setShoppingCart", arr);
this.$router.push({ name: "shopCarApply" });
} }
} }
}; };
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<ShoppingCartCell <ShoppingCartCell
v-for="(item, index) in list" v-for="(item, index) in list"
:cellItem="item" :cellItem="item"
:cellIsService="item.service_id == 0 ? false:true"
:cellIndex="index" :cellIndex="index"
:cellCheck="checkLists[index]" :cellCheck="checkLists[index]"
:key="item.id" :key="item.id"
...@@ -35,7 +36,9 @@ export default { ...@@ -35,7 +36,9 @@ export default {
}, },
checkList: { checkList: {
type: Array, type: Array,
default: ()=> {[]} default: () => {
[];
}
} }
}, },
watch: { watch: {
...@@ -57,14 +60,14 @@ export default { ...@@ -57,14 +60,14 @@ export default {
}, },
setAllState(val) { setAllState(val) {
for (let i = 0; i < this.checkLists.length; i++) { for (let i = 0; i < this.checkLists.length; i++) {
this.$set(this.checkLists, i, val) this.$set(this.checkLists, i, val);
} }
}, },
changeCellMsg(val) { changeCellMsg(val) {
this.$emit("changeCellMsg", val) this.$emit("changeCellMsg", val);
}, },
deleteItem(val) { deleteItem(val) {
this.$emit("deleteItem", val) this.$emit("deleteItem", val);
} }
} }
}; };
......
...@@ -178,9 +178,9 @@ ...@@ -178,9 +178,9 @@
</el-popover> </el-popover>
<!-- 排名图标替换 --> <!-- 排名图标替换 -->
<span v-else-if="item.type === 'rank'"> <span v-else-if="item.type === 'rank'">
<img src="../assets/imgs/list_ic_topone.png" alt v-if="scope.row[item.prop]==1" /> <img src="@/assets/imgs/list_ic_topone.png" alt v-if="scope.row[item.prop]==1" />
<img src="../assets/imgs/list_ic_toptwo.png" alt v-if="scope.row[item.prop]==2" /> <img src="@/assets/imgs/list_ic_toptwo.png" alt v-if="scope.row[item.prop]==2" />
<img src="../assets/imgs/list_ic_topthree.png" alt v-if="scope.row[item.prop]==3" /> <img src="@/assets/imgs/list_ic_topthree.png" alt v-if="scope.row[item.prop]==3" />
{{ [1,2,3].indexOf(scope.row[item.prop])!==-1?'':scope.row[item.prop] }} {{ [1,2,3].indexOf(scope.row[item.prop])!==-1?'':scope.row[item.prop] }}
</span> </span>
<!-- 服务添加图标 --> <!-- 服务添加图标 -->
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
v-else-if="item.type === 'hot'" v-else-if="item.type === 'hot'"
:style="scope.row['hot']?{marginLeft:'-10px'}:{paddingLeft:'2px'}" :style="scope.row['hot']?{marginLeft:'-10px'}:{paddingLeft:'2px'}"
> >
<img src="../assets/imgs/list_ic_hot.png" alt v-if="scope.row['hot']" /> <img src="@/assets/imgs/list_ic_hot.png" alt v-if="scope.row['hot']" />
{{ scope.row[item.prop] }} {{ scope.row[item.prop] }}
</span> </span>
<!-- others --> <!-- others -->
...@@ -248,12 +248,12 @@ ...@@ -248,12 +248,12 @@
<script> <script>
import services from "@/services"; import services from "@/services";
import TableInput from "@/components/table-input"; import TableInput from "@/components/table/table-input";
import TableSelect from "@/components/table-select"; import TableSelect from "@/components/table/table-select";
import helper from "@/services/helper"; import helper from "@/services/helper";
import DConfirm from "@/components/dialog-remove"; import DConfirm from "@/components/table/dialog-remove";
import TableUmhref from "@/components/table-umhref"; import TableUmhref from "@/components/table/table-umhref";
import TableFilter from "@/components/table-filter"; import TableFilter from "@/components/table/table-filter";
export default { export default {
components: { components: {
"v-apaas-table-input": TableInput, "v-apaas-table-input": TableInput,
......
...@@ -11,4 +11,7 @@ export const lang={ ...@@ -11,4 +11,7 @@ export const lang={
// unit of purchase duration // unit of purchase duration
byYear: "按年", byYear: "按年",
byMonth: "按月", byMonth: "按月",
// service shop menu item
serviceShop: "服务超市"
} }
\ No newline at end of file
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</template> </template>
<script> <script>
import cesTable from "@/components/table-um"; import cesTable from "@/components/table/table-um";
export default { export default {
data: () => ({ data: () => ({
headers: [ headers: [
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</template> </template>
<script> <script>
import CesTable from "@/components/table-um"; import CesTable from "@/components/table/table-um";
import BlockRadius from "@/components/block-radius"; import BlockRadius from "@/components/block-radius";
export default { export default {
components: { components: {
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<script> <script>
import BlockRadius from "@/components/block-radius"; import BlockRadius from "@/components/block-radius";
import ProcessCard from "@/components/process-card"; import ProcessCard from "@/components/process-card";
import TableUm from "@/components/table-um"; import TableUm from "@/components/table/table-um";
import InfoList from "@/components/infoList"; import InfoList from "@/components/infoList";
export default { export default {
components: { components: {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<script> <script>
import serviceHeader from '@/components/service-header' import serviceHeader from '@/components/service-header'
import infoList from '@/components/infoList' import infoList from '@/components/infoList'
import tableUm from '@/components/table-um' import tableUm from '@/components/table/table-um'
import processCard from '@/components/process-card' import processCard from '@/components/process-card'
export default { export default {
props: { props: {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<script> <script>
import serviceHeader from "@/components/service-header"; import serviceHeader from "@/components/service-header";
import infoList from "@/components/infoList"; import infoList from "@/components/infoList";
import tableUm from "@/components/table-um"; import tableUm from "@/components/table/table-um";
import processCard from "@/components/process-card"; import processCard from "@/components/process-card";
export default { export default {
props: {}, props: {},
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
<script> <script>
import infoList from "@/components/infoList"; import infoList from "@/components/infoList";
import tableUm from "@/components/table-um"; import tableUm from "@/components/table/table-um";
import codes from "@/components/codes"; import codes from "@/components/codes";
import norCard from "@/components/card"; import norCard from "@/components/card";
import exampleIcon from "@/pages/example/example_icon"; import exampleIcon from "@/pages/example/example_icon";
......
...@@ -349,7 +349,7 @@ ...@@ -349,7 +349,7 @@
<script> <script>
import BlockRadius from "@/components/block-radius"; import BlockRadius from "@/components/block-radius";
import CesTable from "@/components/table-um"; import CesTable from "@/components/table/table-um";
import Codes from "@/components/codes"; import Codes from "@/components/codes";
import uploadFile from "@/components/upload_file"; import uploadFile from "@/components/upload_file";
export default { export default {
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
<script> <script>
import uuidv1 from "uuid/v1"; import uuidv1 from "uuid/v1";
import tableUm from "@/components/table-um"; import tableUm from "@/components/table/table-um";
import { getRole } from "@/utils/common"; import { getRole } from "@/utils/common";
var echarts = require("echarts"); var echarts = require("echarts");
export default { export default {
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<script> <script>
import infoList from "@/components/infoList"; import infoList from "@/components/infoList";
import tableUm from "@/components/table-um"; import tableUm from "@/components/table/table-um";
import serviceHeader from "@/components/service-header"; import serviceHeader from "@/components/service-header";
import dialogAction from "@/components/dialog-action"; import dialogAction from "@/components/dialog-action";
import uploadFile from '@/components/upload_file' import uploadFile from '@/components/upload_file'
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<script> <script>
import serviceHeader from "@/components/service-header"; import serviceHeader from "@/components/service-header";
import infoList from "@/components/infoList"; import infoList from "@/components/infoList";
import tableUm from "@/components/table-um"; import tableUm from "@/components/table/table-um";
import processCard from "@/components/process-card"; import processCard from "@/components/process-card";
import { getRole } from "@/utils/common"; import { getRole } from "@/utils/common";
export default { export default {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<script> <script>
import serviceHeader from "@/components/service-header"; import serviceHeader from "@/components/service-header";
import infoList from "@/components/infoList"; import infoList from "@/components/infoList";
import tableUm from "@/components/table-um"; import tableUm from "@/components/table/table-um";
import processCard from "@/components/process-card"; import processCard from "@/components/process-card";
import {getRole} from "@/utils/common" import {getRole} from "@/utils/common"
export default { export default {
......
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
<script> <script>
import infoList from "@/components/infoList"; import infoList from "@/components/infoList";
import tableUm from "@/components/table-um"; import tableUm from "@/components/table/table-um";
import serviceHeader from "@/components/service-header"; import serviceHeader from "@/components/service-header";
import dialogAction from "@/components/dialog-action"; import dialogAction from "@/components/dialog-action";
import uploadFile from "@/components/upload_file"; import uploadFile from "@/components/upload_file";
......
...@@ -86,9 +86,9 @@ ...@@ -86,9 +86,9 @@
</template> </template>
<script> <script>
import tableFilter from "@/components/table-filter"; import tableFilter from "@/components/table/table-filter";
import appList from "@/components/app-list/app-list"; import appList from "@/components/app-list/app-list";
import cesTable from "@/components/table-um"; import cesTable from "@/components/table/table-um";
import dialogAction from "@/components/dialog-action"; import dialogAction from "@/components/dialog-action";
import commentsPagination from "@/components/comments-pagination"; import commentsPagination from "@/components/comments-pagination";
import { mapState } from "vuex"; import { mapState } from "vuex";
......
...@@ -15,6 +15,9 @@ serviceType2s=${params.serviceType2s}&dataDomains=${params.dataDomains}& ...@@ -15,6 +15,9 @@ serviceType2s=${params.serviceType2s}&dataDomains=${params.dataDomains}&
organizeIds=${params.organizeIds}&orderBy=${params.orderBy}& organizeIds=${params.organizeIds}&orderBy=${params.orderBy}&
Page=${params.Page}&Size=${params.Size}`); Page=${params.Page}&Size=${params.Size}`);
}, },
getAppList(params) {
return axios.get(``)
},
getServiceShopDetail(params) { getServiceShopDetail(params) {
return axios.get(`/apaas/serviceapp/v3/servicemarket/detail?serviceId=`) return axios.get(`/apaas/serviceapp/v3/servicemarket/detail?serviceId=`)
}, },
......
...@@ -114,32 +114,12 @@ export default new Router({ ...@@ -114,32 +114,12 @@ export default new Router({
{ {
path: "/shop", // 服务超市 path: "/shop", // 服务超市
name: "shop", name: "shop",
redirect: "/shop/data_service_list", redirect: "/shop/service",
component: () => import("@/pages/service_shop/shop"), component: () => import("@/pages/service_shop/shop"),
children: [ children: [
{ {
path: "/shop/data_service_list", // 数据服务列表页 path: "/shop/service/:id", // 数据服务、时空、视频、感知、综合、应用列表页
name: "shopDataList", name: "shopList",
component: () => import("@/pages/service_shop/shop_list"),
},
{
path: "/shop/space_time_service_list", // 时空服务列表页
name: "shopSpaceTimeList",
component: () => import("@/pages/service_shop/shop_list"),
},
{
path: "/shop/video_service_list", // 视频服务列表页
name: "shopVideoList",
component: () => import("@/pages/service_shop/shop_list"),
},
{
path: "/shop/perception_service_list", // 感知服务列表页
name: "shopPerceptionList",
component: () => import("@/pages/service_shop/shop_list"),
},
{
path: "/shop/comprehensive_app_list", // 综合应用列表页
name: "shopComAppList",
component: () => import("@/pages/service_shop/shop_list"), component: () => import("@/pages/service_shop/shop_list"),
}, },
{ {
...@@ -153,11 +133,6 @@ export default new Router({ ...@@ -153,11 +133,6 @@ export default new Router({
component: () => component: () =>
import("@/pages/service_shop/service_application_successfully"), import("@/pages/service_shop/service_application_successfully"),
}, },
{
path: "/shop/app_store_list", // 应用商店列表页
name: "shopAppStoreList",
component: () => import("@/pages/service_shop/shop_list"),
},
{ {
path: "/shop/shopping_cart", // 购物车页 path: "/shop/shopping_cart", // 购物车页
name: "shoppingCart", name: "shoppingCart",
......
...@@ -16,6 +16,8 @@ const store = new Vuex.Store({ ...@@ -16,6 +16,8 @@ const store = new Vuex.Store({
["应用仓库管理", "部署的应用", "应用审批管理"], // 组织管理员 ["应用仓库管理", "部署的应用", "应用审批管理"], // 组织管理员
["平台应用管理", "应用部署管理", "应用审批管理"], // 超级管理员 ["平台应用管理", "应用部署管理", "应用审批管理"], // 超级管理员
], // 应用管理列表,onlyRead ], // 应用管理列表,onlyRead
shoppingCart: [], //购物车
menuCartState: 0, //购物车操作都要修改这个值,menu监听这个值的变化实时获取购物车列表
}, },
modules: {}, modules: {},
mutations: { mutations: {
...@@ -25,6 +27,12 @@ const store = new Vuex.Store({ ...@@ -25,6 +27,12 @@ const store = new Vuex.Store({
serviceShopMenuAct(state, newValue) { serviceShopMenuAct(state, newValue) {
state.serviceShopMenu = newValue; state.serviceShopMenu = newValue;
}, },
setShoppingCart(state, newValue) {
state.shoppingCart = newValue;
},
setMenuCartState(state) {
state.menuCartState++;
}
}, },
}); });
......
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