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

Merge branch 'ldx' into dev

parents d69c0742 4edd56c2
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
data: () => ({}), data: () => ({}),
computed: { computed: {
totalPages() { totalPages() {
return Math.ceil(this.total / this.pageSize) || 1; return Math.floor(this.total / this.pageSize) + 1 || 1;
}, },
preDisabled() { preDisabled() {
return this.currentPage === 1; return this.currentPage === 1;
......
...@@ -10,7 +10,11 @@ ...@@ -10,7 +10,11 @@
@change="uploadImg($event,1)" @change="uploadImg($event,1)"
/> />
</div> </div>
<el-image class="list_img_item" :src="item.url" :fit="fit"></el-image> <el-image class="list_img_item" :src="item.url" :fit="fit">
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
</el-image>
</div> </div>
<div class="add_img" v-if="fileArr.length <= max - 1"> <div class="add_img" v-if="fileArr.length <= max - 1">
<div class="add_pic"> <div class="add_pic">
...@@ -242,6 +246,7 @@ export default { ...@@ -242,6 +246,7 @@ export default {
.list_img_item { .list_img_item {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #efefef;
} }
.img_replace { .img_replace {
position: absolute; position: absolute;
...@@ -259,4 +264,12 @@ export default { ...@@ -259,4 +264,12 @@ export default {
.cropper_dia .el-dialog { .cropper_dia .el-dialog {
width: 860px; width: 860px;
} }
.list_img_item .image-slot {
height: 100%;
font-size: 40px;
color: #ccc;
display: flex;
align-items: center;
justify-content: center;
}
</style> </style>
<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">{{ userInfo.user_name }}</span> <span class="user">{{ userInfo.user_name }}</span>
<img <img
class="user_pic" class="user_pic"
...@@ -17,9 +14,7 @@ ...@@ -17,9 +14,7 @@
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>
...@@ -28,8 +23,10 @@ ...@@ -28,8 +23,10 @@
class="shop_hover" class="shop_hover"
@click="gotopage('/shop/shopping_cart')" @click="gotopage('/shop/shopping_cart')"
> >
<div class="number">{{shopping_list.length>=100?'99+':shopping_list.length}}</div> <div class="car">
<img src="../assets/imgs/home_ic_shop.png" alt class="car" /> <el-badge v-if="menuCartNum != 0" :value="menuCartNum" :max="99" class="number"></el-badge>
<img src="../assets/imgs/home_ic_shop.png" alt class="car_img" />
</div>
<div class="shop_menu"> <div class="shop_menu">
<div class="shop_list_title">最近加入的服务:</div> <div class="shop_list_title">最近加入的服务:</div>
<div <div
...@@ -62,17 +59,11 @@ ...@@ -62,17 +59,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>
...@@ -87,24 +78,14 @@ ...@@ -87,24 +78,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 class="sj" v-if="item.children && item.children.length" style="left: 60px;"></div>
<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>
...@@ -122,21 +103,21 @@ export default { ...@@ -122,21 +103,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: "服务超市",
...@@ -144,34 +125,34 @@ export default { ...@@ -144,34 +125,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: [
...@@ -179,9 +160,10 @@ export default { ...@@ -179,9 +160,10 @@ 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: "logout" }, { name: "退出登录", path: "logout" }
], ],
shopping_list: [], shopping_list: [],
menuCartNum: 0
}; };
}, },
mounted() { mounted() {
...@@ -194,12 +176,12 @@ export default { ...@@ -194,12 +176,12 @@ export default {
}, },
userInfo() { userInfo() {
return this.$store.state.userInfo || {}; return this.$store.state.userInfo || {};
}, }
}, },
watch: { watch: {
getMenuCartState(newVal) { getMenuCartState(newVal) {
this.getList(); this.getList();
}, }
}, },
methods: { methods: {
gotopage(n) { gotopage(n) {
...@@ -215,7 +197,7 @@ export default { ...@@ -215,7 +197,7 @@ export default {
}, },
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();
}); });
}, },
...@@ -244,9 +226,11 @@ export default { ...@@ -244,9 +226,11 @@ export default {
} }
}, },
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); this.menuCartNum = response.data.data.valid
? response.data.data.valid.length
: 0;
this.shopping_list = response.data.data.valid this.shopping_list = response.data.data.valid
? response.data.data.valid.slice(0, 3) ? response.data.data.valid.slice(0, 3)
: []; : [];
...@@ -259,8 +243,8 @@ export default { ...@@ -259,8 +243,8 @@ export default {
let index = window.sessionStorage.getItem("menuIndex"); let index = window.sessionStorage.getItem("menuIndex");
console.log(index); console.log(index);
this.now_menu = index ? index : 2; this.now_menu = index ? index : 2;
}, }
}, }
}; };
</script> </script>
...@@ -286,22 +270,27 @@ export default { ...@@ -286,22 +270,27 @@ export default {
margin-right: 15px; margin-right: 15px;
margin-top: 30px; margin-top: 30px;
} }
.number { .car {
float: right; float: right;
margin-right: 43px; width: 50px;
margin-top: 30px; text-align: center;
width: 40px; position: relative;
height: 22px; }
.number {
position: absolute;
background-color: #e56600; background-color: #e56600;
border-radius: 11px; border-radius: 11px;
color: #fcefd6; color: #fcefd6;
line-height: 22px; line-height: 18px;
height: 20px;
text-align: center; text-align: center;
left: 38px;
top: 26px;
z-index: 2;
} }
.car { .car_img {
float: right; position: relative;
margin-right: 15px; top: 7px;
margin-top: 30px;
} }
.menu_box { .menu_box {
float: right; float: right;
...@@ -355,6 +344,7 @@ export default { ...@@ -355,6 +344,7 @@ export default {
} }
.shop_hover { .shop_hover {
height: 100%; height: 100%;
margin-right: 50px;
} }
.shop_hover:hover .shop_menu { .shop_hover:hover .shop_menu {
display: block; display: block;
...@@ -388,6 +378,7 @@ export default { ...@@ -388,6 +378,7 @@ export default {
background-color: #fff; background-color: #fff;
position: absolute; position: absolute;
top: 72px; top: 72px;
left: 20px;
transform: rotate(45deg); transform: rotate(45deg);
display: none; display: none;
} }
...@@ -448,3 +439,11 @@ export default { ...@@ -448,3 +439,11 @@ export default {
white-space: nowrap; white-space: nowrap;
} }
</style> </style>
<style>
.number .el-badge__content {
background-color: #e56600;
border: 0;
line-height: 18px;
padding: 0 7px;
}
</style>
\ No newline at end of file
<template> <template>
<div class="order_cell"> <div class="order_cell">
<div class="order_cell_head"> <div class="order_cell_head">
<div class="application_time">申请时间:{{ helper.dateFormat(cellItem.applytime) }}</div> <div class="application_time">申请时间:{{ helper.dateStringTransform(cellItem.applytime) }}</div>
<div class="order_number">订单编号:{{ cellItem.orderid }}</div> <div class="order_number">订单编号:{{ cellItem.orderid }}</div>
<div class="cell_del_btn" @click="delOrder(cellItem.orderid)">删除</div> <div class="cell_del_btn" @click="delOrder(cellItem.orderid)">删除</div>
</div> </div>
...@@ -17,25 +17,33 @@ ...@@ -17,25 +17,33 @@
<span v-if="cellItem.mapService" class="tags map_service">mapService</span> <span v-if="cellItem.mapService" class="tags map_service">mapService</span>
<span v-if="cellItem.openness == 1" class="tags shared">共享</span> <span v-if="cellItem.openness == 1" class="tags shared">共享</span>
<span v-else-if="cellItem.openness == 2" class="tags restricted">受限</span> <span v-else-if="cellItem.openness == 2" class="tags restricted">受限</span>
<span v-else class="tags sensitive">敏感</span> <span v-else-if="cellItem.openness == 3" class="tags sensitive">敏感</span>
</div> </div>
<div class="cell_msg_other"> <div class="cell_msg_other">
<div class="cell_type">{{ cellItem.sectors }}</div> <div class="cell_type">{{ cellItem.sector }}</div>
<div class="cell_creator">{{ cellItem.organization }}</div> <div class="cell_creator">{{ cellItem.src_organization }}</div>
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="6" class="cell_specification"> <el-col :span="6" class="cell_specification">
<div> <div>
<div>规格:访问次数:{{ cellItem.pv }},访问量:{{ cellItem.count }}</div> <div>规格:日访问次数:{{ cellItem.spec_svc_count }}次,日访问量:{{ cellItem.spec_svc_pv }}</div>
<div class="cell_specification_type">申请方式:{{ cellItem.durationunit == 1 ? $t('lang.byYear') : $t('lang.byMonth') }}</div> <div
class="cell_specification_type"
>申请方式:{{ cellItem.duration_unit == 1 ? $t('lang.byYear') : $t('lang.byMonth') }}</div>
</div> </div>
</el-col> </el-col>
<el-col :span="4" class="approval_status"> <el-col :span="4" class="approval_status">
<div> <div>
<div>已获取</div> <div v-if="cellItem.approval_first_level == 0 && cellItem.pay_status != -1">待审核</div>
<div
v-if="cellItem.approval_first_level == 1&& cellItem.approval_second_level == 0 && cellItem.pay_status != -1"
>审核中</div>
<div v-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1">审核通过</div>
<div v-if="cellItem.approval_first_level == -1 && cellItem.pay_status != -1">审核未通过</div>
<div v-if="cellItem.pay_status == -1">订单已取消</div>
<el-popover <el-popover
v-if="cellItem.getStatus == 1" v-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1 && cellItem.is_estimated == 0"
placement="right-start" placement="right-start"
width="300" width="300"
v-model="visible" v-model="visible"
...@@ -46,7 +54,6 @@ ...@@ -46,7 +54,6 @@
<el-rate <el-rate
v-model="serviceRate" v-model="serviceRate"
:colors="colors" :colors="colors"
allow-half
show-score show-score
score-template="{value}" score-template="{value}"
></el-rate> ></el-rate>
...@@ -57,7 +64,7 @@ ...@@ -57,7 +64,7 @@
type="textarea" type="textarea"
placeholder="请输入内容" placeholder="请输入内容"
v-model="textarea" v-model="textarea"
maxlength="200" maxlength="500"
show-word-limit show-word-limit
:autosize="{ minRows: 6, maxRows: 10 }" :autosize="{ minRows: 6, maxRows: 10 }"
></el-input> ></el-input>
...@@ -69,12 +76,12 @@ ...@@ -69,12 +76,12 @@
<div class="approval_status_btn" slot="reference">服务评价</div> <div class="approval_status_btn" slot="reference">服务评价</div>
</el-popover> </el-popover>
<div <div
v-else-if="cellItem.getStatus == 2 && !showMsgBox" v-else-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1 && cellItem.is_estimated == 1 && !showMsgBox"
class="approval_status_btn" class="approval_status_btn"
@click="showMsgBox = true" @click="getMessage"
>查看评价</div> >查看评价</div>
<div <div
v-else-if="cellItem.getStatus == 2 && showMsgBox" v-else-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1 && cellItem.is_estimated == 1 && showMsgBox"
class="approval_status_btn" class="approval_status_btn"
@click="showMsgBox = false" @click="showMsgBox = false"
>收起评价</div> >收起评价</div>
...@@ -82,8 +89,12 @@ ...@@ -82,8 +89,12 @@
</el-col> </el-col>
<el-col :span="4" class="cell_option"> <el-col :span="4" class="cell_option">
<div> <div>
<el-button size="madium" class="cell_option_btn" @click="viewDetail(cellItem.id)">查看详情</el-button> <el-button
<div class="cell_option_spec">再次申请</div> size="madium"
class="cell_option_btn"
@click="viewDetail(cellItem.order_id)"
>查看详情</el-button>
<div class="cell_option_spec" @click="nextApply">再次申请</div>
</div> </div>
</el-col> </el-col>
<el-collapse-transition> <el-collapse-transition>
...@@ -91,7 +102,7 @@ ...@@ -91,7 +102,7 @@
<div class="msg_title">服务评分:</div> <div class="msg_title">服务评分:</div>
<div class="msg_rate"> <div class="msg_rate">
<el-rate <el-rate
v-model="cellItem.evaluationRate" v-model="message.score"
disabled disabled
show-score show-score
text-color="#ff9900" text-color="#ff9900"
...@@ -99,7 +110,7 @@ ...@@ -99,7 +110,7 @@
></el-rate> ></el-rate>
</div> </div>
<div class="msg_title">评价详情:</div> <div class="msg_title">评价详情:</div>
<div class="msg_text">{{ cellItem.evaluationText }}</div> <div class="msg_text">{{ message.content }}</div>
</el-col> </el-col>
</el-collapse-transition> </el-collapse-transition>
</el-row> </el-row>
...@@ -123,18 +134,129 @@ export default { ...@@ -123,18 +134,129 @@ export default {
colors: ["#99A9BF", "#F7BA2A", "#FF9900"], colors: ["#99A9BF", "#F7BA2A", "#FF9900"],
serviceRate: 0, serviceRate: 0,
textarea: "", textarea: "",
showMsgBox: false showMsgBox: false,
helper: helper,
message: {}
}), }),
methods: { methods: {
addEvaluation() { addEvaluation() {
console.log(this.serviceRate, this.textarea); if (this.cellItem.order_type == 1) {
let query = {
service_id: this.cellItem.service_id,
content: this.textarea,
score: this.serviceRate,
apply_id: this.cellItem.apply_id
};
this.$api.user.addServiceEvaluation(query).then(response => {
if (response.data.success == 1) {
this.$message({
message: "评价订单成功",
type: "success"
});
this.visible = false;
this.$emit("updateList");
} else {
this.$message({
message: "评价订单失败",
type: "error"
});
}
});
} else if (this.cellItem.order_type == 2) {
let query = {
app: this.cellItem.app_id,
content: this.textarea,
score: this.serviceRate,
apply_id: this.cellItem.apply_id
};
this.$api.user.addServiceEvaluation(query).then(response => {
if (response.data.success == 1) {
this.$message({
message: "评价订单成功",
type: "success"
});
this.visible = false; this.visible = false;
this.$emit("updateList");
} else {
this.$message({
message: "评价订单失败",
type: "error"
});
}
});
}
}, },
viewDetail(val) { viewDetail(val) {
this.$router.push("/user/order_detail/" + val) this.$router.push("/user/order_detail/" + val);
}, },
delOrder() { delOrder() {
this.$api.user.delOrder({ id: this.cellItem.order_id }).then(response => {
if (response.data.success == 1) {
this.$message({
message: "删除订单成功",
type: "success"
});
this.$emit("updateList");
} else {
this.$message({
message: "删除订单失败",
type: "error"
});
}
});
},
nextApply() {
let query = {};
if (this.cellItem.order_type == 1) {
query = {
service_id: parseFloat(this.cellItem.service_id),
spec_id: this.cellItem.svc_spec_id,
duration: this.cellItem.duration,
duration_unit: this.cellItem.duration_unit
};
} else if (this.cellItem.order_type == 2) {
query = {
app_id: parseFloat(this.cellItem.app_id),
spec_id: this.cellItem.spec_app,
duration: this.cellItem.duration,
duration_unit: this.cellItem.duration_unit
};
}
this.$router.push({
path: "/shop/shop_car_apply",
query: query
});
},
getMessage() {
if (this.cellItem.order_type == 1) {
this.$api.user
.getServiceEvaluation({ apply_id: this.cellItem.apply_id })
.then(response => {
if (response.data.success == 1) {
this.message = response.data.data;
this.showMsgBox = true;
} else {
this.$message({
message: "获取评价失败",
type: "error"
});
}
});
} else if (this.cellItem.order_type == 2) {
this.$api.user
.getAppEvaluation({ apply_id: this.cellItem.apply_id })
.then(response => {
if (response.data.success == 1) {
this.message = response.data.data;
this.showMsgBox = true;
} else {
this.$message({
message: "获取评价失败",
type: "error"
});
}
});
}
} }
} }
}; };
...@@ -287,6 +409,7 @@ export default { ...@@ -287,6 +409,7 @@ export default {
} }
.cell_option_spec { .cell_option_spec {
margin-top: 15px; margin-top: 15px;
cursor: pointer;
} }
.pop_rate { .pop_rate {
padding: 0 0 0 50px; padding: 0 0 0 50px;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
:class="item.state ? 'btn_actice':''" :class="item.state ? 'btn_actice':''"
round round
@click="btnClick(index)" @click="btnClick(index)"
>{{ item.label }}</el-button> >{{ item.name }}</el-button>
</div> </div>
<div class="input_right"> <div class="input_right">
<el-input <el-input
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
></el-input> ></el-input>
</div> </div>
</div> </div>
<order-list :datas="datas"></order-list> <order-list :datas="datas" @updateList="updateList"></order-list>
<!-- 分页 --> <!-- 分页 -->
<section class="order_pagination"> <section class="order_pagination">
<div class="order_page_total">{{ pagination.total }} 个条目</div> <div class="order_page_total">{{ pagination.total }} 个条目</div>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
:disabled="pagination.page == 1" :disabled="pagination.page == 1"
></el-button> ></el-button>
&nbsp;&nbsp;{{ pagination.page }}页 / 共{{ &nbsp;&nbsp;{{ pagination.page }}页 / 共{{
Math.ceil(pagination.total / pagination.rowsPerPage) Math.floor(pagination.total / pagination.rowsPerPage) + 1
}} }}
<el-button <el-button
icon="el-icon-arrow-right" icon="el-icon-arrow-right"
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
@click="handleCurrentChange(1)" @click="handleCurrentChange(1)"
:disabled=" :disabled="
pagination.page >= pagination.page >=
Math.ceil(pagination.total / pagination.rowsPerPage) Math.floor(pagination.total / pagination.rowsPerPage) + 1
" "
></el-button> ></el-button>
</div> </div>
...@@ -94,16 +94,7 @@ export default { ...@@ -94,16 +94,7 @@ export default {
{ value: "5", label: "已取消" } { value: "5", label: "已取消" }
], ],
activeName: "0", activeName: "0",
buttonList: [ buttonList: [],
{ value: 0, label: "全部", state: false },
{ value: 1, label: "数据服务", state: false },
{ value: 2, label: "时空服务", state: false },
{ value: 3, label: "视频服务", state: false },
{ value: 4, label: "感知服务", state: false },
{ value: 5, label: "综合服务", state: false },
{ value: 6, label: "云资源", state: false },
{ value: 7, label: "应用镜像", state: false }
],
search: "", search: "",
pagination: { pagination: {
rowsPerPage: 10, rowsPerPage: 10,
...@@ -127,9 +118,24 @@ export default { ...@@ -127,9 +118,24 @@ export default {
datas: [] datas: []
}), }),
mounted() { mounted() {
this.getBtns();
this.getData(); this.getData();
}, },
methods: { methods: {
getBtns() {
this.$api.user.getOrderBtnTypes().then(response => {
if (response.data.success == 1) {
let buttonList = response.data.data;
buttonList.forEach(item => {
item.state = false;
});
buttonList.unshift({ id: "", name: "全部", state: false });
buttonList.push({ id: "cloud", name: "云资源", state: false });
buttonList.push({ id: "app", name: "应用镜像", state: false });
this.buttonList = buttonList;
}
});
},
tabClick() { tabClick() {
this.getData(); this.getData();
}, },
...@@ -154,20 +160,37 @@ export default { ...@@ -154,20 +160,37 @@ export default {
}, },
getData() { getData() {
let arr = []; let arr = [];
let service = 0;
let app = 0;
let resource = 0;
this.buttonList.forEach(item => { this.buttonList.forEach(item => {
if (item.state == true) { if (item.state == true) {
arr.push(item.value); if (item.id == "cloud") {
resource = 1;
} else if (item.id == "app") {
app = 1;
} else {
service = 1;
arr.push(item.id);
}
} }
}); });
if (arr.length == 0) {
service = 1;
app = 1;
resource = 1;
}
let params = { let params = {
select: this.search, select: this.search,
page: this.pagination.page, page: this.pagination.page,
limit: this.pagination.rowsPerPage, limit: this.pagination.rowsPerPage,
status: this.activeName, status: this.activeName,
types: arr types: arr,
service: service,
app: app,
resource: resource
}; };
this.$api.user.orderList(params).then(response => { this.$api.user.orderList(params).then(response => {
console.log(response);
this.datas = response.data.data; this.datas = response.data.data;
this.pagination.total = response.data.total; this.pagination.total = response.data.total;
}); });
...@@ -179,6 +202,9 @@ export default { ...@@ -179,6 +202,9 @@ export default {
handleCurrentChange(val) { handleCurrentChange(val) {
this.pagination.page += val; this.pagination.page += val;
this.getData(); this.getData();
},
updateList() {
this.getData();
} }
} }
}; };
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-row class="order_th"> <el-row class="order_th">
<el-col :span="10">服务信息</el-col> <el-col :span="10">服务信息</el-col>
<el-col :span="6">规格</el-col> <el-col :span="6">规格</el-col>
<el-col :span="4">审批状态</el-col> <el-col :span="4">申请状态</el-col>
<el-col :span="4">操作</el-col> <el-col :span="4">操作</el-col>
</el-row> </el-row>
</div> </div>
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
:disabled="pagination.page == 1" :disabled="pagination.page == 1"
></el-button> ></el-button>
&nbsp;&nbsp;{{ pagination.page }}页 / 共{{ &nbsp;&nbsp;{{ pagination.page }}页 / 共{{
Math.ceil(pagination.total / pagination.rowsPerPage) Math.floor(pagination.total / pagination.rowsPerPage) + 1
}} }}
<el-button <el-button
icon="el-icon-arrow-right" icon="el-icon-arrow-right"
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
@click="handleCurrentChange(1)" @click="handleCurrentChange(1)"
:disabled=" :disabled="
pagination.page >= pagination.page >=
Math.ceil(pagination.total / pagination.rowsPerPage) Math.floor(pagination.total / pagination.rowsPerPage) + 1
" "
></el-button> ></el-button>
</div> </div>
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<div <div
class="shopping_cell_specification_val_type" class="shopping_cell_specification_val_type"
v-if="cellIsService" v-if="cellIsService"
>申请方式:{{ specificationApplicationBtns[cellItems.duration_method - 1].value }}</div> >申请方式:{{ cellItems.duration_method == 1 ? "按月":"按年" }}</div>
<div class="shopping_cell_specification_edit"> <div class="shopping_cell_specification_edit">
<el-popover <el-popover
placement="right-start" placement="right-start"
...@@ -167,6 +167,18 @@ export default { ...@@ -167,6 +167,18 @@ export default {
immediate: true, // 这句重要 immediate: true, // 这句重要
handler(val) { handler(val) {
this.cellItems = val; this.cellItems = val;
if (this.cellIsService) {
if (this.cellItems.service.buy_method == 1) {
this.specificationApplicationBtns = [{ id: 1, value: "按月" }];
} else if (this.cellItems.service.buy_method == 2) {
this.specificationApplicationBtns = [{ id: 2, value: "按年" }];
} else {
this.specificationApplicationBtns = [
{ id: 1, value: "按月" },
{ id: 2, value: "按年" }
];
}
}
} }
} }
}, },
...@@ -178,11 +190,6 @@ export default { ...@@ -178,11 +190,6 @@ export default {
visible: false, visible: false,
specificationPop: 1, specificationPop: 1,
specificationApplicationPop: 1, specificationApplicationPop: 1,
// specificationBtns: [
// { id: 1, value: "访问次数:20/日 访问量:100/日" },
// { id: 2, value: "访问次数:200/日 访问量:1000/日" },
// { id: 3, value: "访问次数:无上限 访问量:无上限" }
// ],
appSpecificationBtns: [ appSpecificationBtns: [
{ id: 1, value: "部署" }, { id: 1, value: "部署" },
{ id: 2, value: "开发" } { id: 2, value: "开发" }
...@@ -196,18 +203,26 @@ export default { ...@@ -196,18 +203,26 @@ export default {
getSpecification() { getSpecification() {
if (this.cellIsService) { if (this.cellIsService) {
let arr = []; let arr = [];
console.log(
this.cellItems.service.request_spcs_info
);
if ( if (
this.cellItems.service.request_spec_info && this.cellItems.service.request_spcs_info &&
this.cellItems.service.request_spec_info.length != 0 this.cellItems.service.request_spcs_info.length != 0
) { ) {
this.cellItems.service.request_spec_info.forEach(item => { console.log("sss");
let requestArr = this.cellItems.service.request_spcs_info;
requestArr.forEach(item => {
console.log(item);
arr.push(item.id); arr.push(item.id);
}); });
} }
console.log(arr);
let num = arr.indexOf(this.cellItems.spec_id); let num = arr.indexOf(this.cellItems.spec_id);
console.log(num);
let specification = ""; let specification = "";
if (num != -1) { if (num != -1) {
specification = this.cellItems.service.request_spec_info[num].des; specification = this.cellItems.service.request_spcs_info[num].des;
} }
return specification; return specification;
} else { } else {
...@@ -254,9 +269,21 @@ export default { ...@@ -254,9 +269,21 @@ export default {
}); });
}, },
delCellItem() { delCellItem() {
this.$emit("deleteItem", { this.$api.serviceShop
index: this.cellIndex, .delShoppingCart([this.cellItems.id])
data: this.cellItems .then(request => {
if (request.data.success == 1) {
this.$message({
message: this.cellIsService ? "删除该服务成功" : "删除该应用成功",
type: "success"
});
this.$emit("updateList");
} else {
this.$message({
message: this.cellIsService ? "删除该服务失败" : "删除该应用失败",
type: "error"
});
}
}); });
} }
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
@changeCellMsg="changeCellMsg" @changeCellMsg="changeCellMsg"
@deleteItem="deleteItem" @deleteItem="deleteItem"
class="shopping_all_list" class="shopping_all_list"
@updateList="updateList"
/> />
</div> </div>
<div class="shopping_list shopping_list_fail"> <div class="shopping_list shopping_list_fail">
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
:list="listIn" :list="listIn"
:checkList="checkListIn" :checkList="checkListIn"
class="shopping_all_list" class="shopping_all_list"
@updateList="updateList"
/> />
</div> </div>
<div class="shopping_list shopping_list_options"> <div class="shopping_list shopping_list_options">
...@@ -101,10 +103,12 @@ export default { ...@@ -101,10 +103,12 @@ export default {
if (response.data.success == "1") { if (response.data.success == "1") {
this.list = response.data.data.valid; this.list = response.data.data.valid;
this.listIn = response.data.data.invalid; this.listIn = response.data.data.invalid;
for (const index in this.list) { this.checkList = [];
this.checkListIn = [];
for (let index in this.list) {
this.checkList.push(false); this.checkList.push(false);
} }
for (const index in this.listIn) { for (let index in this.listIn) {
this.checkListIn.push(false); this.checkListIn.push(false);
} }
} else { } else {
...@@ -133,6 +137,7 @@ export default { ...@@ -133,6 +137,7 @@ export default {
}); });
this.$api.serviceShop.delShoppingCart(query).then(response => { this.$api.serviceShop.delShoppingCart(query).then(response => {
console.log(response); console.log(response);
this.$store.commit("setMenuCartState");
this.getList(); this.getList();
}); });
}, },
...@@ -144,6 +149,7 @@ export default { ...@@ -144,6 +149,7 @@ export default {
let query = [val.data.id]; let query = [val.data.id];
this.$api.serviceShop.delShoppingCart(query).then(response => { this.$api.serviceShop.delShoppingCart(query).then(response => {
console.log(response); console.log(response);
this.$store.commit("setMenuCartState");
this.getList(); this.getList();
}); });
}, },
...@@ -158,6 +164,10 @@ export default { ...@@ -158,6 +164,10 @@ export default {
window.sessionStorage.setItem("shoppingCart", JSON.stringify(arr)); window.sessionStorage.setItem("shoppingCart", JSON.stringify(arr));
// this.$store.commit("setShoppingCart", arr); // this.$store.commit("setShoppingCart", arr);
this.$router.push({ name: "shopCarApply" }); this.$router.push({ name: "shopCarApply" });
},
updateList() {
this.$store.commit("setMenuCartState");
this.getList();
} }
} }
}; };
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
@changeState="changeState" @changeState="changeState"
@changeCellMsg="changeCellMsg" @changeCellMsg="changeCellMsg"
@deleteItem="deleteItem" @deleteItem="deleteItem"
@updateList="updateList"
/> />
</div> </div>
</div> </div>
...@@ -65,6 +66,9 @@ export default { ...@@ -65,6 +66,9 @@ export default {
}, },
deleteItem(val) { deleteItem(val) {
this.$emit("deleteItem", val); this.$emit("deleteItem", val);
},
updateList() {
this.$emit("updateList")
} }
} }
}; };
......
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
:disabled="pagination.page == 1" :disabled="pagination.page == 1"
></el-button> ></el-button>
&nbsp;&nbsp;第{{ pagination.page }}页 / 共{{ &nbsp;&nbsp;第{{ pagination.page }}页 / 共{{
Math.ceil(pagination.total / pagination.rowsPerPage) Math.floor(pagination.total / pagination.rowsPerPage) + 1
}}页 }}页
<el-button <el-button
icon="el-icon-arrow-right" icon="el-icon-arrow-right"
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
@click="handleCurrentChange(1)" @click="handleCurrentChange(1)"
:disabled=" :disabled="
pagination.page >= pagination.page >=
Math.ceil(pagination.total / pagination.rowsPerPage) Math.floor(pagination.total / pagination.rowsPerPage) + 1
" "
></el-button> ></el-button>
</div> </div>
......
...@@ -81,7 +81,14 @@ ...@@ -81,7 +81,14 @@
</el-form-item> </el-form-item>
<el-form-item prop="detail"> <el-form-item prop="detail">
<div class="form_item_title">菜单描述:</div> <div class="form_item_title">菜单描述:</div>
<el-input v-model="formDetail.detail" @input="changeSave"></el-input> <el-input
v-model="formDetail.detail"
type="textarea"
:autosize="{ minRows: 4, maxRows: 10}"
maxlength="500"
show-word-limit
@input="changeSave"
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="menu_order"> <el-form-item prop="menu_order">
<div class="form_item_title">菜单排序:</div> <div class="form_item_title">菜单排序:</div>
...@@ -107,22 +114,6 @@ ...@@ -107,22 +114,6 @@
import helper from "@/services/helper.js"; import helper from "@/services/helper.js";
export default { export default {
data() { data() {
var validateMenuName = (rule, value, callback) => {
if (value == "") {
callback(new Error("请填写菜单名称"));
} else if (value.length > 8) {
callback(new Error("菜单名称不超过8位"));
} else {
callback();
}
};
var validatePageUrl = (rule, value, callback) => {
if (value == "") {
callback(new Error("请填写菜单访问地址"));
} else {
callback();
}
};
return { return {
checkText: "", checkText: "",
treeData: [], treeData: [],
...@@ -150,8 +141,22 @@ export default { ...@@ -150,8 +141,22 @@ export default {
create_date: "" create_date: ""
}, },
rules: { rules: {
menu_name: [{ validator: validateMenuName, trigger: "input" }], menu_name: [
visit_url: [{ validator: validatePageUrl, trigger: "input" }], { required: true, message: "请填写菜单名称", trigger: "blur" },
{ min: 0, max: 8, message: "菜单名称不超过8位", trigger: "blur" }
],
visit_url: [
{ required: true, message: "请填写菜单访问地址", trigger: "blur" },
{
min: 0,
max: 30,
message: "访问地址长度不超过30个字",
trigger: "blur"
}
],
team_name: [
{ min: 0, max: 16, message: "菜单组别不超过16个字", trigger: "blur" }
]
}, },
nodeId: "", nodeId: "",
previousSibling: false, previousSibling: false,
...@@ -175,7 +180,6 @@ export default { ...@@ -175,7 +180,6 @@ export default {
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
}, },
nodeClick(data, node) { nodeClick(data, node) {
console.log(data, node);
this.canSave = false; this.canSave = false;
if (this.nodeId.indexOf("new") > -1) { if (this.nodeId.indexOf("new") > -1) {
let result = this.formStaged.some(item => { let result = this.formStaged.some(item => {
...@@ -193,7 +197,6 @@ export default { ...@@ -193,7 +197,6 @@ export default {
this.formStaged.push({ id: this.nodeId, data: this.formDetail }); this.formStaged.push({ id: this.nodeId, data: this.formDetail });
} }
this.nodeId = data.menu_id; this.nodeId = data.menu_id;
console.log(node);
if (node.previousSibling != undefined) { if (node.previousSibling != undefined) {
this.previousSibling = true; this.previousSibling = true;
} else { } else {
...@@ -221,9 +224,8 @@ export default { ...@@ -221,9 +224,8 @@ export default {
this.formDetail.create_date = helper.dateStringTransform( this.formDetail.create_date = helper.dateStringTransform(
this.formDetail.create_date this.formDetail.create_date
); );
this.formContrast = response.data.data; this.formContrast = Object.assign({}, this.formDetail);
} else { } else {
this.ruleFormIcon.username = false;
this.$message({ this.$message({
message: response.data.errMsg, message: response.data.errMsg,
type: "error" type: "error"
...@@ -313,6 +315,10 @@ export default { ...@@ -313,6 +315,10 @@ export default {
this.$api.authority.getMenuList().then(response => { this.$api.authority.getMenuList().then(response => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.treeData = response.data.data; this.treeData = response.data.data;
this.nodeId = "";
this.previousSibling = false;
this.nextSibling = false;
this.canSave = false;
} else { } else {
console.log(response.data.errMsg); console.log(response.data.errMsg);
} }
...@@ -579,6 +585,15 @@ export default { ...@@ -579,6 +585,15 @@ export default {
padding: 0 15px; padding: 0 15px;
color: #242c43; color: #242c43;
} }
.left_station .el-textarea__inner {
background-color: #f7f8f9;
border-radius: 8px;
border: solid 1px #e3e5ef;
color: #242c43;
}
.left_station .el-textarea .el-input__count {
background-color: #f7f8f9;
}
.left_station .is-disabled .el-input__inner { .left_station .is-disabled .el-input__inner {
background-color: #e3e4e6; background-color: #e3e4e6;
border-radius: 8px; border-radius: 8px;
......
...@@ -9,27 +9,43 @@ ...@@ -9,27 +9,43 @@
<div class="detail_head"> <div class="detail_head">
<div class="detail_head_cell detail_head_status border_right"> <div class="detail_head_cell detail_head_status border_right">
<p class="detail_head_cell_title">申请状态</p> <p class="detail_head_cell_title">申请状态</p>
<p class="detail_head_cell_val blue">已获取</p> <p
class="detail_head_cell_val blue"
v-if="orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1"
>待审核</p>
<p
class="detail_head_cell_val blue"
v-if="orderDetail.approval_first_level == 1&& orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1"
>审核中</p>
<p
class="detail_head_cell_val blue"
v-if="orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1"
>审核通过</p>
<p
class="detail_head_cell_val blue"
v-if="orderDetail.approval_first_level == -1 && orderDetail.pay_status != -1"
>审核未通过</p>
<p class="detail_head_cell_val blue" v-if="orderDetail.pay_status == -1">订单已取消</p>
</div> </div>
<div class="detail_head_cell detail_head_no border_right"> <div class="detail_head_cell detail_head_no border_right">
<p class="detail_head_cell_title">订单编号</p> <p class="detail_head_cell_title">订单编号</p>
<p class="detail_head_cell_val">202004241502000001</p> <p class="detail_head_cell_val">{{ orderDetail.order_id }}</p>
</div> </div>
<div class="detail_head_cell detail_head_time"> <div class="detail_head_cell detail_head_time">
<p class="detail_head_cell_title">申请时间</p> <p class="detail_head_cell_title">申请时间</p>
<p class="detail_head_cell_val">2020-04-24 15:02:00</p> <p class="detail_head_cell_val">{{ helper.dateStringTransform(orderDetail.add_time) }}</p>
</div> </div>
<div class="btn_group"> <div class="btn_group">
<el-popover placement="right-start" width="300" v-model="visible" trigger="click"> <el-popover
v-if="orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1 && orderDetail.is_estimated == 0"
placement="right-start"
width="300"
v-model="visible"
trigger="click"
>
<p>服务评价:</p> <p>服务评价:</p>
<div class="pop_rate"> <div class="pop_rate">
<el-rate <el-rate v-model="serviceRate" :colors="colors" show-score score-template="{value}"></el-rate>
v-model="serviceRate"
:colors="colors"
allow-half
show-score
score-template="{value}"
></el-rate>
</div> </div>
<p>填写评价:</p> <p>填写评价:</p>
<div class="evaluation_text"> <div class="evaluation_text">
...@@ -48,6 +64,12 @@ ...@@ -48,6 +64,12 @@
</div> </div>
<el-button class="evaluation" slot="reference">服务评价</el-button> <el-button class="evaluation" slot="reference">服务评价</el-button>
</el-popover> </el-popover>
<el-button
v-else-if="orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1 && orderDetail.is_estimated == 1 && !showMsgBox"
class="approval_status_btn"
@click="getMessage"
>查看评价</el-button>
<el-button class="approval_status_btn" @click="showMsgBox = false">收起评价</el-button>
<el-button class="again" @click="goto('/user/order_list')">再次申请</el-button> <el-button class="again" @click="goto('/user/order_list')">再次申请</el-button>
</div> </div>
</div> </div>
...@@ -111,6 +133,7 @@ import BlockRadius from "@/components/block-radius"; ...@@ -111,6 +133,7 @@ import BlockRadius from "@/components/block-radius";
import ProcessCard from "@/components/process-card"; import ProcessCard from "@/components/process-card";
import TableUm from "@/components/table/table-um"; import TableUm from "@/components/table/table-um";
import InfoList from "@/components/infoList"; import InfoList from "@/components/infoList";
import helper from "@/services/helper.js";
export default { export default {
components: { components: {
BlockRadius, BlockRadius,
...@@ -119,10 +142,13 @@ export default { ...@@ -119,10 +142,13 @@ export default {
InfoList InfoList
}, },
data: () => ({ data: () => ({
helper: helper,
visible: false, visible: false,
colors: ["#99A9BF", "#F7BA2A", "#FF9900"], colors: ["#99A9BF", "#F7BA2A", "#FF9900"],
serviceRate: 0, serviceRate: 0,
textarea: "", textarea: "",
orderDetail: {},
showMsgBox: false,
approval_arr1: [ approval_arr1: [
{ {
title: "一级审批", title: "一级审批",
...@@ -218,7 +244,6 @@ export default { ...@@ -218,7 +244,6 @@ export default {
} }
], ],
list_arr: [ list_arr: [
{ {
title: "申请人:", title: "申请人:",
info: "李子维" info: "李子维"
...@@ -236,16 +261,28 @@ export default { ...@@ -236,16 +261,28 @@ export default {
info: "xxxx文件名称.txt", info: "xxxx文件名称.txt",
url: "www.baidu.com", url: "www.baidu.com",
type: "down" type: "down"
}, }
] ]
}), }),
mounted() {}, mounted() {
this.getOrderDetail();
},
methods: { methods: {
addEvaluation() { addEvaluation() {
console.log(this.serviceRate, this.textarea); console.log(this.serviceRate, this.textarea);
this.visible = false; this.visible = false;
}, },
download() {} download() {},
getOrderDetail() {
this.$api.user
.getOrderDetail({ order_id: this.$route.params.id })
.then(response => {
if (response.data.success == 1) {
} else {
console.log(response.data.errMsg);
}
});
}
} }
}; };
</script> </script>
...@@ -463,6 +500,10 @@ export default { ...@@ -463,6 +500,10 @@ export default {
.detail_s_val { .detail_s_val {
padding: 0 0 0 20px; padding: 0 0 0 20px;
} }
.approval_status_btn {
background-color: #e1e4fb;
color: #626de9;
}
</style> </style>
<style> <style>
.pop_rate .el-rate__icon { .pop_rate .el-rate__icon {
......
...@@ -4,7 +4,29 @@ import qs from 'qs'; // 根据需求是否导入qs模块 ...@@ -4,7 +4,29 @@ import qs from 'qs'; // 根据需求是否导入qs模块
const user = { const user = {
// order // order
orderList(params) { orderList(params) {
return axios.get(`/apaas/serviceapp/v3/order/list?serviceName=${params.select}&orderStatus=${params.status}&serviceTypes=${params.types.join(',')}&Page=${params.page}&Size=${params.limit}`); return axios.get(`/apaas/serviceapp/v3/order/list?filter_by=${params.select}&order_status=${params.status}&service_types=${params.types.join(',')}
&service=${params.service}&app=${params.app}&resource=${params.resource}&page=${params.page}&size=${params.limit}`);
},
getOrderBtnTypes() {
return axios.get(`/apaas/serviceapp/v3/order/domains`);
},
delOrder(params) {
return axios.delete(`/order/del?order_id=${params.id}`);
},
addServiceEvaluation(params) {
return axios.post(`/apaas/serviceapp/v3/order/estimate`, params);
},
getServiceEvaluation(params) {
return axios.get(`/apaas/serviceapp/v3/order/estimate?apply_id=${params.apply_id}`);
},
addAppEvaluation(params) {
return axios.post(`/apaas/serviceapp/v3/order/appEstimate`, params);
},
getAppEvaluation(params) {
return axios.get(`/apaas/serviceapp/v3/order/appEstimate?applyId=${params.apply_id}`);
},
getOrderDetail(params) {
return axios.get(`/apaas/serviceapp/v3/order/orderInfo?order_id=${params.order_id}`);
}, },
// user info // user info
......
...@@ -36,6 +36,10 @@ module.exports.dateFormat = function (fmt, timestamp) { ...@@ -36,6 +36,10 @@ module.exports.dateFormat = function (fmt, timestamp) {
} }
module.exports.dateStringTransform = function (date) { module.exports.dateStringTransform = function (date) {
/*
input: 2020-06-12T16:38:11+08:00
output: 2020-06-12 16:38:11
*/
if (String(date).indexOf("T") != -1) { if (String(date).indexOf("T") != -1) {
let arr = date.split("T"); let arr = date.split("T");
let t = arr[1]; let t = arr[1];
......
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