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

Merge branch 'ldx' into dev

parents cfab0983 13b969e4
<template> <template>
<div class="menu"> <div class="menu">
<img src="../assets/imgs/home_img_logo.png" alt class="logo" /> <img src="../assets/imgs/home_img_logo.png" alt class="logo" />
<div <div style="float:right;cursor: pointer;position:relative;" class="user_hover">
style="float:right;cursor: pointer;position:relative;"
class="user_hover"
>
<span class="user">用户</span> <span class="user">用户</span>
<img src="../assets/imgs/home_ic_user.png" alt class="user_pic" /> <img src="../assets/imgs/home_ic_user.png" alt class="user_pic" />
<div class="user_menu"> <div class="user_menu">
...@@ -12,16 +9,11 @@ ...@@ -12,16 +9,11 @@
v-for="(item, index) in user_arr" v-for="(item, index) in user_arr"
:key="index + 700" :key="index + 700"
@click="gotopage(item.path)" @click="gotopage(item.path)"
> >{{ item.name }}</div>
{{ item.name }}
</div>
</div> </div>
<div class="sj"></div> <div class="sj"></div>
</div> </div>
<div <div style="float:right;cursor: pointer;position:relative;" class="shop_hover">
style="float:right;cursor: pointer;position:relative;"
class="shop_hover"
>
<div class="number">99+</div> <div class="number">99+</div>
<img src="../assets/imgs/home_ic_shop.png" alt class="car" /> <img src="../assets/imgs/home_ic_shop.png" alt class="car" />
<div class="shop_menu"> <div class="shop_menu">
...@@ -56,17 +48,11 @@ ...@@ -56,17 +48,11 @@
</p> </p>
</div> </div>
<div> <div>
<img <img @click.stop="deleteItem(item.id)" src="../assets/imgs/ic_delete.png" alt />
@click.stop="deleteItem(item.id)"
src="../assets/imgs/ic_delete.png"
alt
/>
</div> </div>
</div> </div>
<div class="shop_footer"> <div class="shop_footer">
<el-button @click="settlement" size="small" class="shop_settlement" <el-button @click="settlement" size="small" class="shop_settlement">去购物车申请结算</el-button>
>去购物车申请结算</el-button
>
</div> </div>
</div> </div>
<div class="shop_sj"></div> <div class="shop_sj"></div>
...@@ -81,24 +67,14 @@ ...@@ -81,24 +67,14 @@
:style="{ color: now_menu == index ? '#fff' : '' }" :style="{ color: now_menu == index ? '#fff' : '' }"
> >
{{ item.name }} {{ item.name }}
<div <div class="user_menu" v-if="item.children && item.children.length" style="left: 30px;">
class="user_menu"
v-if="item.children && item.children.length"
style="left: 30px;"
>
<div <div
v-for="(v, indexs) in item.children" v-for="(v, indexs) in item.children"
:key="indexs + 700" :key="indexs + 700"
@click.stop="gotoChildPage(v, index)" @click.stop="gotoChildPage(v, index)"
> >{{ v.name }}</div>
{{ v.name }}
</div>
</div> </div>
<div <div class="sj" v-if="item.children && item.children.length" style="left: 60px;"></div>
class="sj"
v-if="item.children && item.children.length"
style="left: 60px;"
></div>
<div class="bottom_show" v-if="now_menu == index"></div> <div class="bottom_show" v-if="now_menu == index"></div>
</div> </div>
</div> </div>
...@@ -116,21 +92,21 @@ export default { ...@@ -116,21 +92,21 @@ export default {
children: [ children: [
{ {
name: "服务注册", name: "服务注册",
path: "/fwzc/fwcs", path: "/fwzc/fwcs"
}, },
{ {
name: "服务管理", name: "服务管理",
path: "/fwgl/", path: "/fwgl/"
}, },
{ {
name: "应用管理", name: "应用管理",
path: "/yygl/", path: "/yygl/"
}, }
], ]
}, },
{ {
name: "技术支持", name: "技术支持",
path: "/xxx", path: "/xxx"
}, },
{ {
name: "服务超市", name: "服务超市",
...@@ -138,34 +114,34 @@ export default { ...@@ -138,34 +114,34 @@ export default {
children: [ children: [
{ {
name: "数据服务", name: "数据服务",
path: "/shop/data_service_list/5", path: "/shop/data_service_list/5"
}, },
{ {
name: "时空服务", name: "时空服务",
path: "/shop/space_time_service_list/6", path: "/shop/space_time_service_list/6"
}, },
{ {
name: "视频服务", name: "视频服务",
path: "/shop/video_service_list/7", path: "/shop/video_service_list/7"
}, },
{ {
name: "感知服务", name: "感知服务",
path: "/shop/perception_service_list/10", path: "/shop/perception_service_list/10"
}, },
{ {
name: "综合应用", name: "综合应用",
path: "/shop/comprehensive_app_list/11", path: "/shop/comprehensive_app_list/11"
}, },
{ {
name: "云资源服务", name: "云资源服务",
path: "/shop/cloud", path: "/shop/cloud"
}, },
{ {
name: "应用商店", name: "应用商店",
path: "/shop/app_store_list/12", path: "/shop/app_store_list/12"
}, }
], ]
}, }
], ],
now_menu: 2, now_menu: 2,
user_arr: [ user_arr: [
...@@ -173,34 +149,51 @@ export default { ...@@ -173,34 +149,51 @@ export default {
{ name: "消息通知", path: "/user/message" }, { name: "消息通知", path: "/user/message" },
{ name: "收银中心", path: "/authority" }, { name: "收银中心", path: "/authority" },
{ name: "关于BD-aPaaS", path: "/data_analysis" }, { name: "关于BD-aPaaS", path: "/data_analysis" },
{ name: "退出登录", path: "" }, { name: "退出登录", path: "logout" }
], ],
shopping_list: [], shopping_list: []
}; };
}, },
mounted() { mounted() {
this.getMenuIndex();
this.getList(); this.getList();
}, },
computed: { computed: {
getMenuCartState() { getMenuCartState() {
return this.$store.state.menuCartState; return this.$store.state.menuCartState;
}, }
}, },
watch: { watch: {
getMenuCartState(newVal) { getMenuCartState(newVal) {
this.getList(); this.getList();
}, }
}, },
methods: { methods: {
gotopage(n) { gotopage(n) {
if (n == "logout") {
let query = {
returnUrl: this.$route.path
};
this.$api.general.logout(query).then(response => {
if (response.data.success == 1) {
this.$message({
message: `登出成功`,
type: "success"
});
} else {
console.log(response.data.errMsg);
}
});
} else {
this.$router.push(n); this.$router.push(n);
}
}, },
settlement() { settlement() {
this.$router.push({ name: "shoppingCart" }); this.$router.push({ name: "shoppingCart" });
}, },
deleteItem(id) { deleteItem(id) {
let query = [id]; let query = [id];
this.$api.serviceShop.delShoppingCart(query).then((response) => { this.$api.serviceShop.delShoppingCart(query).then(response => {
this.getList(); this.getList();
}); });
}, },
...@@ -212,6 +205,7 @@ export default { ...@@ -212,6 +205,7 @@ export default {
navAction(index, path) { navAction(index, path) {
this.$router.push(path); this.$router.push(path);
this.now_menu = index; this.now_menu = index;
window.sessionStorage.setItem("menuIndex", index);
}, },
gotoChildPage(v, parent) { gotoChildPage(v, parent) {
if (v.path) { if (v.path) {
...@@ -224,10 +218,11 @@ export default { ...@@ -224,10 +218,11 @@ export default {
this.$router.push(v.path); this.$router.push(v.path);
} }
this.now_menu = parent; this.now_menu = parent;
window.sessionStorage.setItem("menuIndex", parent);
} }
}, },
getList() { getList() {
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.shopping_list = response.data.data.valid this.shopping_list = response.data.data.valid
...@@ -238,7 +233,12 @@ export default { ...@@ -238,7 +233,12 @@ export default {
} }
}); });
}, },
}, getMenuIndex() {
let index = window.sessionStorage.getItem("menuIndex");
console.log(index)
this.now_menu = index ? index : 2;
}
}
}; };
</script> </script>
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
default: "" default: ""
}, },
id: { id: {
type: [String,Number], type: [String, Number],
default: "" default: ""
}, },
name: { name: {
...@@ -51,6 +51,10 @@ export default { ...@@ -51,6 +51,10 @@ export default {
couldNotEdit: { couldNotEdit: {
type: Boolean, type: Boolean,
default: false default: false
},
hasDefault: {
type: Boolean,
default: false
} }
}, },
data: () => ({ data: () => ({
...@@ -58,10 +62,17 @@ export default { ...@@ -58,10 +62,17 @@ export default {
}), }),
mounted() { mounted() {
this.selectValue = this.item; this.selectValue = this.item;
if (this.selectValue == null || !this.selectValue || this.selectValue == "") { if (
this.selectValue == null ||
!this.selectValue ||
this.selectValue == ""
) {
if (this.selectArr && this.selectArr.length != 0) { if (this.selectArr && this.selectArr.length != 0) {
this.selectValue = "" if (this.hasDefault) {
// this.selectValue = this.selectArr[0].value;//去掉默认值 this.selectValue = this.selectArr[0].value;
} else {
this.selectValue = "";
}
} else { } else {
this.selectValue = ""; this.selectValue = "";
} }
......
...@@ -164,6 +164,7 @@ ...@@ -164,6 +164,7 @@
:name="scope.row.name" :name="scope.row.name"
:selectArr="item.selectArr" :selectArr="item.selectArr"
:rowId="scope.$index" :rowId="scope.$index"
:hasDefault="item.hasDefault"
:couldNotEdit="couldNotEdit" :couldNotEdit="couldNotEdit"
@changeInputValue="changeInputValue" @changeInputValue="changeInputValue"
></v-apaas-table-select> ></v-apaas-table-select>
......
...@@ -412,7 +412,8 @@ export default { ...@@ -412,7 +412,8 @@ export default {
selectArr: [ selectArr: [
{ label: "", value: "1" }, { label: "", value: "1" },
{ label: "", value: "0" } { label: "", value: "0" }
] ],
hasDefault: true
}, },
{ label: "字段说明", prop: "descript", type: "input", align: "left" } { label: "字段说明", prop: "descript", type: "input", align: "left" }
], ],
...@@ -720,7 +721,7 @@ export default { ...@@ -720,7 +721,7 @@ export default {
registe() { registe() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
if (this.cover.length == 0) { if (this.cover.length != 0) {
let query = { let query = {
name: this.form.name, name: this.form.name,
sectors: this.form.area, sectors: this.form.area,
...@@ -744,6 +745,7 @@ export default { ...@@ -744,6 +745,7 @@ export default {
this.$api.workbench.serviceAdd(query).then(response => { this.$api.workbench.serviceAdd(query).then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$message.success("服务注册成功"); this.$message.success("服务注册成功");
this.$router.push("/fwgl/" + this.$store.getters.level);
} else { } else {
console.log(response.data.errMsg); console.log(response.data.errMsg);
this.$message.error(response.data.errMsg); this.$message.error(response.data.errMsg);
......
...@@ -3,7 +3,9 @@ import qs from 'qs'; // 根据需求是否导入qs模块 ...@@ -3,7 +3,9 @@ import qs from 'qs'; // 根据需求是否导入qs模块
const general = { const general = {
// general api // general api
logout(params) {
return axios.get(`/iam/api/logout?ReturnUrl=${encodeURIComponent(params.returnUrl)}`);
},
} }
export default general; export default general;
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