Commit 40864ab0 authored by 张俊's avatar 张俊

Merge branch 'dev' of https://cloud.wodcloud.com/git/apaas/apaas-v3-ui into dev

parents 41fe88e8 4626f482
......@@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Beagle aPaaS Platform v3.0</title>
<link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico" />
<!-- <link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico" /> -->
<style>
body{
background-color: #f6f7fb;
......
......@@ -261,15 +261,15 @@ div {
}
.el-tabs__item {
font-size: 16px;
font-size: 14px;
color: #8890a7;
line-height: 24px !important;
line-height: 14px !important;
font-weight: bold;
}
.el-tabs__nav-scroll .el-tabs__item {
line-height: 38px !important;
height: 44px !important;
line-height: 14px !important;
height: 38px !important;
}
.el-tabs__item:hover {
......@@ -499,7 +499,7 @@ border-radius:8px;
margin-left: 35px;
} */
.el-input__inner {
border-radius: 8px;
border-radius: 6px;
}
.el-input-group__append,
......
......@@ -84,7 +84,6 @@
:header="listHeader"
:data="listData"
:padding-left="listPaddingLeft"
:select="listSelect"
@select="selectAction"
></list-table>
</div>
......@@ -149,19 +148,21 @@ export default {
type: String,
default: () => "请输入关键字",
},
listSelect: {
type: Boolean,
default: false,
pageSize: {
type: Number,
default: () => 10,
},
pageSizes: {
type: Array,
default: () => [10, 20, 50],
},
},
data: () => ({
showListFilter: false,
filter: {},
searchValue: "",
pageSize: 10,
currentPage: 1,
timer: null,
pageSizes: [10, 20, 50],
selectFilter: [],
}),
watch: {
......@@ -241,6 +242,7 @@ export default {
},
},
mounted() {
console.log(this.pageSize);
this.initOtherFilter();
this.listAction();
},
......
<template>
<div class="block_radius">
<div class="block_radius" :style="'border-radius:' + borRadius + 'px;padding:' + paddingNum + 'px;'">
<div v-if="show_header" class="block_header">
<div class="block_header_title">{{ title }}</div>
<div class="block_header_button_group">
......@@ -32,6 +32,14 @@ export default {
title: {
type: String,
default: ""
},
borRadius: {
type: Number,
default: 10,
},
paddingNum: {
type: Number,
default: 20,
}
},
components: {},
......@@ -56,7 +64,6 @@ export default {
.block_radius {
background-color: #fff;
box-shadow: 0px 3px 6px 0px rgba(15, 19, 65, 0.05);
border-radius: 10px;
padding: 20px;
margin-bottom: 20px;
}
......
......@@ -93,10 +93,10 @@ a {
text-align: center;
color: #e6ebfe;
background-color: #515fe7;
border-radius: 8px;
border-radius: 6px;
display: inline-block;
font-size: 14px;
margin-left: 20px;
margin-left: 8px;
cursor: pointer;
}
</style>
<template>
<div class="menu">
<img src="../assets/imgs/home_img_logo.png" alt class="logo" />
<img src="../assets/imgs/nav-logo.png" alt class="logo" />
<div
style="float: right; cursor: pointer; position: relative"
class="user_hover"
......@@ -320,7 +320,7 @@ export default {
}
.logo {
float: left;
margin: 15px 0 0 40px;
margin: 22px 0 0 40px;
cursor: pointer;
}
.user {
......
......@@ -41,16 +41,16 @@ export default {
this.$emit("delete-action", item);
},
pageResize() {
let listWidth = this.$refs.container.clientWidth;
this.rowNum = Math.floor(listWidth / 310);
// let listWidth = this.$refs.container.clientWidth;
// this.rowNum = Math.floor(listWidth / 310);
},
},
mounted() {
this.pageResize();
window.addEventListener("resize", this.pageResize);
// this.pageResize();
// window.addEventListener("resize", this.pageResize);
},
destroyed() {
window.removeEventListener("resize", this.pageResize);
// window.removeEventListener("resize", this.pageResize);
},
};
</script>
......
......@@ -306,7 +306,8 @@ export default {
.info_detail p {
color: #8890a7;
}
.info_detail span {
.info_detail span,
.info_detail a {
color: #242c43;
font-weight: 600;
margin-right: 48px;
......
<template>
<div class="service_info apaas_button" v-if="data">
<div class="service_info apaas_button" v-if="data && showItem">
<div class="service_title">
<span class="service_name" v-text="data.name"></span>
<span class="service_type" v-if="data.type" v-text="data.type"></span>
......@@ -89,7 +89,13 @@
class="commodity_text"
>暂无</span
>
<div v-else class="btn_container">
<div
v-else-if="
data.serviceRequestSpcs.spcs_type_1 &&
data.serviceRequestSpcs.spcs_type_1.length != 0
"
class="btn_container"
>
<el-button
v-for="(item, index) in data.serviceRequestSpcs.spcs_type_1"
:key="'spcs_' + index"
......@@ -191,6 +197,7 @@ export default {
specification: {}, // 规格
duration: 1, // 时长
showTime: false,
showItem: false,
}),
computed: {
actionDisabled() {
......@@ -268,10 +275,15 @@ export default {
mounted() {
// 初始化购买方式
if (this.data.serviceRequestSpcs && this.data.serviceRequestSpcs.length) {
if (!this.data.serviceRequestSpcs.spcs_type_1) {
this.data.serviceRequestSpcs.spcs_type_1 = [];
}
if (!this.data.serviceRequestSpcs.spcs_type_2) {
this.data.serviceRequestSpcs.spcs_type_2 = [];
}
let types = Array.from(
new Set(this.data.serviceRequestSpcs.map((item) => item.type))
);
if (types.indexOf(3) > -1) {
this.types = [
{
......@@ -316,6 +328,7 @@ export default {
) {
this.specification = this.data.serviceRequestSpcs.spcs_type_2[0];
}
this.showItem = true;
},
};
</script>
......
<template>
<div class="com_card">
<div class="com_card_top">
<img :src="cellData.logo" class="com_card_img" />
<div class="com_card_name_v">
<div class="com_card_msg_name">{{ cellData.app_name }}</div>
<div class="com_card_msg_version">V{{ cellData.version }}</div>
<div class="com_cell">
<div class="com_cell_up" @click="goUrl(cellData.app_id)">
<div class="com_cell_up_img_init">
<img :src="cellData.logo" class="com_cell_up_img" />
</div>
<div class="com_cell_up_right">
<div class="up_title">
<div class="up_tit_name_in">
<span class="up_tit_name" :title="cellData.app_name + ' ( V' + cellData.version + ' )'">
{{ cellData.app_name }} ( V{{ cellData.version }} )
</span>
</div>
<div class="com_card_msg">
<div class="com_card_msg_tit">
<img :src="require('@/assets/imgs/icon_shijian.png')" />&nbsp;上线时间
</div>
<div class="com_card_msg_num">{{ helper.dateStringTransform(cellData.create_date) }}</div>
<div class="up_rate">
<el-rate
v-model="cellData.score"
disabled
show-score
text-color="#ea7d19"
score-template="{value}"
></el-rate>
<p class="get_num">
本月获取:
<span class="com_cell_right_time">
{{ cellData.deploy_times }}
</span>
<span class="ci"></span>
</p>
</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.deploy_times }}</div>
<div class="get_detail">
<img src="@/assets/imgs/shop_ic_enter.png" />
</div>
<div class="com_card_btn">
<el-button size="medium" class="btn_1" @click="addShop(cellData.app_id)">加入购物车</el-button>
<el-button size="medium" class="btn_2" @click="goUrl(cellData.app_id)">查看详情</el-button>
</div>
<div class="com_cell_down">
<p class="com_detail">
{{ cellData.yyjj }}
</p>
<el-row :gutter="16">
<el-col :span="14" class="com_other">
<span class="name_title">应用类型:</span>
{{ cellData.type_name }}
&nbsp;&nbsp;{{ cellData.data_service_type2_name }} &nbsp;&nbsp;{{
cellData.data_service_type3_name
}}
</el-col>
<el-col :span="10" class="com_other">
<span class="name_title">业务领域:</span>
{{ cellData.ywly_name }}
</el-col>
<el-col :span="14" class="com_other">
<span class="name_title">上线时间:</span>
{{ helper.dateStringTransform(cellData.create_date) }}
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import helper from "@/services/helper.js";
// if you meet date which like 2020-06-05T00:00:00+08:00, use helper.dateStringTransform()
export default {
components: {},
props: {
url: { type: String, default: "" },
cellData: { type: Object, default: {} },
},
data: () => ({
helper: helper,
}),
data: () => ({ helper: helper }),
computed: {},
watch: {},
methods: {
......@@ -45,129 +76,136 @@ export default {
this.$router.push(this.url + "/" + parame);
}
},
addShop(id) {
let query = {
service_id: 0, // 0表示不是服务
app_id: parseFloat(id),
spec_id: 1,
duration: 1,
duration_method: 1,
is_subscribe: 0, // 是否订阅
};
this.$api.serviceShop
.addShoppingCart(query)
.then(({ data }) => {
if (data.success == 1) {
this.$message({
message: data.errMsg,
type: "success",
});
this.$store.commit("setMenuCartState");
} else {
this.$message({
message: data.errMsg,
type: "warning",
});
}
})
.catch((error) => {
this.$message({
message: `添加购物车失败`,
type: "warning",
});
});
},
},
mounted() {},
};
</script>
<style scoped>
.com_card {
width: 290px;
height: 266px;
padding: 20px;
border-radius: 16px;
background-color: #fff;
border: solid 2px transparent;
-webkit-box-shadow: 0px 3px 10px 0px rgba(3, 10, 37, 0.15);
box-shadow: 0px 3px 10px 0px rgba(3, 10, 37, 0.15);
}
.com_card:hover {
border: solid 2px #b4c0f5;
}
.com_card_top {
.com_cell {
width: 496px;
height: 208px;
background-color: #ffffff;
box-shadow: 0px 3px 6px 0px rgba(15, 19, 65, 0.04);
border-radius: 8px;
border: solid 1px #e3e4ef;
margin-bottom: 24px;
}
.com_cell_up {
height: 88px;
background-color: #f9fafc;
border-radius: 8px 8px 0px 0px;
padding: 16px;
display: flex;
justify-content: space-between;
margin-bottom: 28px;
position: relative;
cursor: pointer;
}
.com_card_name_v {
width: calc(100% - 80px);
.com_cell_up_img_init {
width: 56px;
height: 56px;
margin-right: 16px;
flex: 0 0 auto;
}
.com_card_img {
width: 60px;
height: 60px;
border-radius: 8px;
border: 3px solid #f6f7fb;
.com_cell_up_img {
width: 100%;
height: 100%;
border-radius: 4px;
}
.com_card_msg {
margin-top: 20px;
display: flex;
justify-content: space-between;
.com_cell_up_right {
flex: 1 1 auto;
}
.com_card_msg_name {
font-size: 18px;
font-weight: 700;
.up_title {
font-size: 16px;
margin-top: 4px;
margin-bottom: 12px;
display: flex;
align-items: center;
}
.up_tit_name_in {
max-width: calc(100% - 150px);
display: inline-block;
}
.up_tit_name {
width: 100%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.com_card_msg_version {
font-size: 14px;
color: #8890a7;
.up_tit_name:hover {
text-decoration: underline;
}
.com_card_msg_tit {
color: #8890a7;
font-size: 16px;
.up_rate {
margin-top: 12px;
display: flex;
}
.com_card_msg_num {
color: #8890a7;
.get_num {
margin-left: 40px;
font-size: 14px;
position: relative;
top: 2px;
color: #58617a;
}
.com_cell_right_time {
color: #ea7d19;
}
.com_card_msg_num1 {
.ci {
color: #242c43;
font-size: 16px;
font-weight: bold;
}
.com_card_btn {
margin-top: 35px;
display: flex;
justify-content: space-between;
}
.btn_1 {
width: 110px;
padding: 10px;
background-color: #d0d5e7;
border: solid 2px #a5afd6;
color: #0f2683;
}
.btn_1:hover {
background-color: #d5daec;
border: solid 2px #a5afd6;
color: #0f2683;
}
.btn_2 {
width: 110px;
padding: 10px;
background-color: #0f2683;
color: #f8f9fd;
}
.btn_2:hover {
background-color: #1d3694;
color: #f8f9fd;
.get_detail {
position: absolute;
top: 26px;
right: 16px;
}
.tags {
display: inline-block;
margin-left: 8px;
padding: 2px 8px 3px;
font-size: 12px;
font-weight: 500;
line-height: 12px;
border-radius: 4px;
position: relative;
top: 1px;
}
.map_service {
background-color: #626de9;
border: solid 1px #626de9;
color: #fff;
}
.shared {
background-color: #e7fdfc;
border: solid 1px #8bd6d0;
color: #25bdb1;
}
.restricted {
background-color: #fffee8;
border: solid 1px #e4c884;
color: #ef9433;
}
.sensitive {
background-color: #ffefef;
border: solid 1px #d7a4a9;
color: #e15260;
}
.com_cell_down {
padding: 12px 16px 0 16px;
}
.com_detail {
color: #8890a7;
font-size: 14px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
height: 50px;
}
.com_other {
color: #58617a;
margin-bottom: 6px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.name_title {
color: #8890a7;
}
</style>
\ No newline at end of file
<template>
<div class="com_cell">
<div class="com_cell_img_box">
<img :src="cellData.cover" class="com_cell_img" />
<div class="com_cell_up" @click="goUrl(cellData.id)">
<div class="com_cell_up_img_init">
<img :src="cellData.cover" class="com_cell_up_img" />
</div>
<div class="com_cell_message">
<div class="com_cell_msg_title">
<div class="com_cell_up_right">
<div class="up_title">
<div class="up_tit_name_in">
<span class="up_tit_name" :title="cellData.name">
{{ cellData.name }}
</span>
</div>
<span
v-if="cellData.data_service_type1 == 6"
class="tags map_service"
>mapService</span>
>
mapService
</span>
<span v-if="cellData.openness == 1" class="tags shared">共享</span>
<span v-else-if="cellData.openness == 2" class="tags restricted">受限</span>
<span v-else-if="cellData.openness == 2" class="tags restricted">
受限
</span>
<span v-else class="tags sensitive">敏感</span>
</div>
<div class="message_block">
<div class="com_cell_item">
<div class="com_cell_data_detail">
<span class="detail_span">{{ cellData.descript }}</span>
</div>
</div>
<div class="com_cell_item">
<span class="com_cell_item_title">服务类型:</span>
<span
class="com_cell_data"
>{{ cellData.data_service_type1_name }}&nbsp;&nbsp;{{ cellData.data_service_type2_name }}&nbsp;&nbsp;{{ cellData.data_service_type3_name }}</span>
<span class="com_cell_item_title left_blank">数据领域:</span>
<span class="com_cell_data">{{ cellData.sectors_name }}</span>
</div>
<div class="com_cell_item">
<span class="com_cell_item_title">更新时间:</span>
<span class="com_cell_data">{{ helper.dateStringTransform(cellData.update_date) }}</span>
</div>
</div>
</div>
<div class="com_cell_right">
<div class="up_rate">
<el-rate
v-model="cellData.score"
disabled
show-score
text-color="#58617a"
text-color="#ea7d19"
score-template="{value}"
></el-rate>
<div class="com_cell_right_text">
<span class="com_cell_right_time_tit">本月获取次数:</span>
<span class="com_cell_right_time">{{ cellData.apply_num }}</span>
<p class="get_num">
本月获取:
<span class="com_cell_right_time">
{{ cellData.apply_num }}
</span>
<span class="ci"></span>
</p>
</div>
</div>
<div class="get_detail">
<img src="@/assets/imgs/shop_ic_enter.png" />
</div>
</div>
<el-button class="com_cell_right_btn" @click="goUrl(cellData.id)">查看详情</el-button>
<div class="com_cell_down">
<p class="com_detail">
{{ cellData.descript }}
</p>
<el-row :gutter="16">
<el-col :span="14" class="com_other">
<span class="name_title">服务类型:</span>
{{ cellData.data_service_type1_name }}
&nbsp;&nbsp;{{ cellData.data_service_type2_name }} &nbsp;&nbsp;{{
cellData.data_service_type3_name
}}
</el-col>
<el-col :span="10" class="com_other">
<span class="name_title">服务领域:</span>
{{ cellData.sectors_name }}
</el-col>
<el-col :span="14" class="com_other">
<span class="name_title">更新时间:</span>
{{ helper.dateStringTransform(cellData.update_date) }}
</el-col>
</el-row>
</div>
</div>
</template>
......@@ -76,94 +94,87 @@ export default {
<style scoped>
.com_cell {
width: 496px;
height: 208px;
background-color: #ffffff;
box-shadow: 0px 3px 6px 0px rgba(15, 19, 65, 0.04);
border-radius: 12px 12px 8px 8px;
border: solid 1px #e3e4ef;
margin-bottom: 24px;
}
.com_cell_up {
height: 88px;
background-color: #f9fafc;
border-radius: 12px 12px 0px 0px;
padding: 16px;
display: flex;
justify-content: space-between;
padding: 20px 10px;
border-bottom: 2px #f4f7fc solid;
}
.com_cell_img_box {
width: 200px;
height: 200px;
border-radius: 12px;
overflow: hidden;
border: 4px #f4f7fc solid;
position: relative;
cursor: pointer;
}
.com_cell_up_img_init {
width: 56px;
height: 56px;
margin-right: 16px;
flex: 0 0 auto;
}
.com_cell_img {
.com_cell_up_img {
width: 100%;
height: 100%;
border-radius: 4px;
}
.com_cell_message {
padding-left: 20px;
width: calc(100% - 500px);
}
.com_cell_msg_title {
color: #0d1847;
font-size: 18px;
line-height: 30px;
font-weight: 700;
margin-bottom: 10px;
.com_cell_up_right {
flex: 1 1 auto;
}
.com_cell_item {
font-size: 14px;
line-height: 28px;
margin-top: 1px;
color: #8890a7;
.up_title {
font-size: 16px;
margin-top: 4px;
display: flex;
align-self: start;
}
.com_cell_item_title {
/* width: 80px; */
align-items: center;
}
.com_cell_data {
.up_tit_name_in {
max-width: calc(100% - 150px);
display: inline-block;
color: #242c43;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.com_cell_data_detail {
color: #242c43;
height: 78px;
font-size: 16px;
}
.detail_span {
.up_tit_name {
width: 100%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
overflow: hidden;
}
.com_cell_right {
width: 300px;
padding: 25px 0 0 50px;
.up_tit_name:hover {
text-decoration: underline;
}
.com_cell_right_text {
font-size: 16px;
margin-top: 25px;
.up_rate {
margin-top: 12px;
display: flex;
}
.com_cell_right_time_tit {
color: #8890a7;
.get_num {
margin-left: 40px;
font-size: 14px;
color: #58617a;
}
.com_cell_right_time {
color: #ea7d19;
}
.ci {
color: #242c43;
}
.com_cell_right_btn {
background-color: #0f2683;
color: #f8f9fd;
width: 220px;
height: 40px;
border-radius: 20px;
margin-top: 25px;
.get_detail {
position: absolute;
top: 26px;
right: 16px;
}
.tags {
display: inline-block;
margin-left: 10px;
padding: 2px 10px 3px;
margin-left: 8px;
padding: 2px 8px 3px;
font-size: 12px;
font-weight: 500;
line-height: 12px;
border-radius: 4px;
position: relative;
top: -1px;
top: 1px;
}
.map_service {
background-color: #626de9;
......@@ -185,24 +196,27 @@ export default {
border: solid 1px #d7a4a9;
color: #e15260;
}
.message_block {
width: 80%;
padding: 10px 20px;
background-color: #f8f9fd;
border-radius: 10px;
.com_cell_down {
padding: 12px 16px 0 16px;
}
.left_blank {
margin-left: 20px;
.com_detail {
color: #8890a7;
font-size: 14px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
height: 50px;
}
</style>
<style>
.com_cell_right .el-rate__text {
display: inline-block;
margin-left: 10px;
font-size: 32px;
font-weight: 700;
.com_other {
color: #58617a;
margin-bottom: 6px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.com_cell_right .el-rate__icon {
font-size: 28px;
.name_title {
color: #8890a7;
}
</style>
\ No newline at end of file
<template>
<div>
<div v-if="urlFilter=='app'" ref="commodityList" class="commodity_card">
<div ref="commodityCardIn" class="commodity_card_list">
<div
<div v-if="urlFilter == 'app'" ref="commodityList" class="commodity_card">
<commodity-card
v-for="item in datas"
:key="item.id"
: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>
></commodity-card>
</div>
<div v-else class="commodity_cell">
<commodity-cell v-for="item in datas" :cellData="item" :url="url" :key="item.id"></commodity-cell>
<commodity-cell
v-for="item in datas"
:cellData="item"
:url="url"
:key="item.id"
></commodity-cell>
</div>
<!-- 分页 -->
<section class="com-pagination" v-if="paginationShow">
......@@ -46,9 +46,8 @@
@click="handleCurrentChange(-1)"
:disabled="pagination.page == 1"
></el-button>
&nbsp;&nbsp;{{ pagination.page }}页 / 共{{
Math.ceil((total == 0 ? 1 : total) / pagination.rowsPerPage)
}}
&nbsp;&nbsp;{{ pagination.page }}页 / 共
{{ Math.ceil((total == 0 ? 1 : total) / pagination.rowsPerPage) }}
<el-button
icon="el-icon-arrow-right"
circle
......@@ -128,30 +127,11 @@ export default {
refreshData() {
this.$emit("refresh", this.pagination);
},
pageResize() {
let listWidth = this.$refs.commodityCardIn.clientWidth;
let rowCardNum = Math.floor(listWidth / 310);
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";
}
// console.log(this.$refs.commodityCardIn);
},
},
mounted() {},
watch: {
datas: {
handler(val) {
if (this.urlFilter == "app") {
setTimeout(() => {
this.pageResize();
window.onresize = () => {
this.pageResize();
};
}, 0);
}
},
handler(val) {},
},
url: {
handler() {
......@@ -194,6 +174,9 @@ export default {
align-items: center;
}
.commodity_card {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.commodity_card_list {
width: 100%;
......@@ -206,6 +189,11 @@ export default {
.commodity_card_item_in {
margin: 0 auto;
}
.commodity_cell {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
</style>
<style>
.com_page_control .el-button {
......
......@@ -10,9 +10,7 @@
<div class="head_flex">
<el-breadcrumb separator="/" class="bread_crumb1 bread_left">
<el-breadcrumb-item :to="{ path: '/shop' }">
{{
$t("lang.service_shop")
}}
{{ $t("lang.service_shop") }}
</el-breadcrumb-item>
<el-breadcrumb-item>{{ name }}</el-breadcrumb-item>
</el-breadcrumb>
......@@ -25,22 +23,27 @@
></el-input>
</div>
</div>
<block-radius>
<block-radius :borRadius="12">
<!-- filter -->
<div v-if="urlFilter" class="classification">
<div v-for="(item, index) in filterLists" :key="'cd' + index" class="classification_line">
<div
v-for="(item, index) in filterLists"
:key="'cd' + index"
class="classification_line"
>
<div
class="classification_line_if"
v-if="item.childDomains && item.childDomains.length != 0"
>
<div class="classification_line_title">{{ item.name }}</div>
<div
<div class="classification_line_title">{{ item.name }}<span class="maohao"></span></div>
<!-- <div
:class="
index == filterLists.length - 1
? 'classification_line_items'
: 'classification_line_items classification_line_items_border'
"
>
> -->
<div class="classification_line_items">
<div
:class="
openList[index] == 'up'
......@@ -58,7 +61,8 @@
? 'classification_act'
: ''
"
>全部</span>
>全部</span
>
</div>
</li>
<li
......@@ -80,7 +84,8 @@
? 'classification_act'
: ''
"
>{{ items.name }}</span>
>{{ items.name }}</span
>
<!-- if item have children, we will use an arrow to prompt -->
<i
v-if="
......@@ -115,9 +120,15 @@
@click="clickOpen(index)"
>
<span v-if="openList[index] == 'down'">收起</span>
<span v-if="openList[index] == 'up'">展开</span>
<i v-if="openList[index] == 'down'" class="el-icon-caret-top"></i>
<i v-if="openList[index] == 'up'" class="el-icon-caret-bottom"></i>
<span v-if="openList[index] == 'up'">更多</span>
<i
v-if="openList[index] == 'down'"
class="el-icon-caret-top"
></i>
<i
v-if="openList[index] == 'up'"
class="el-icon-caret-bottom"
></i>
</div>
</div>
<!-- filter children -->
......@@ -145,7 +156,8 @@
? 'classification_act'
: ''
"
>{{ itemChildren.name }}</span>
>{{ itemChildren.name }}</span
>
</div>
</li>
</ul>
......@@ -154,38 +166,46 @@
</div>
</div>
</div>
<div
class="gray_line"
v-if="
filterLists[0].childDomains.length != 0 ||
filterLists[1].childDomains.length != 0 ||
filterLists[2].childDomains.length != 0
"
></div>
</block-radius>
<!-- filter button -->
<div class="btn_group">
<el-button
<div
v-for="(item, index) in buttonFilter"
:key="item.name"
size="small"
:class="index == activeBtn ? 'button_filter_act' : 'button_filter'"
:class="
index == activeBtn
? 'button_filter 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>
>
{{ item.name }}
</div>
<!-- <div v-if="urlFilter == 'app'" class="btn_right_check">
<el-checkbox v-model="couldTwice" @change="changeTwice">
支持二次开发
</el-checkbox>
</div> -->
</div>
<!-- <div
class="gray_line"
v-if="
filterLists[0].childDomains.length != 0 ||
filterLists[1].childDomains.length != 0 ||
filterLists[2].childDomains.length != 0
"
></div> -->
<!-- the list -->
<commodity-list
:datas="lists && lists.length != 0 ? lists : []"
:total="total"
:url="url"
:urlFilter="urlFilter"
:paginationShow="true"
:paginationShow="false"
:pageSizeShow="true"
@refresh="getNewList"
></commodity-list>
</block-radius>
</div>
</template>
......@@ -266,19 +286,22 @@ export default {
},
],
page: 1,
limit: 10,
limit: 20,
couldTwice: false,
refresh_app_1: false,
refresh_app_2: false,
refresh_app_3: false,
time_app: null,
times: null,
isKaiGuan: true,
}),
mounted() {
window.addEventListener("resize", this.judgeHeight);
window.addEventListener("scroll", this.menu, true);
},
destroyed() {
window.removeEventListener("resize", this.judgeHeight);
window.removeEventListener("scroll", this.menu, true);
},
watch: {
urlFilter: {
......@@ -333,7 +356,41 @@ export default {
},
},
methods: {
menu() {
if (this.isKaiGuan) {
let scroll =
this.getScrollTop() + this.getWindowHeight() - this.getScrollHeight();
if (scroll > -10) {
if (
(this.total != 0 && this.page * this.limit < this.total) ||
this.total == 0
) {
this.page++;
this.getShopList();
}
}
}
},
//滚动条在Y轴上的滚动距离
getScrollTop() {
var documentScrollTop = 0;
documentScrollTop = document.documentElement.scrollTop;
return documentScrollTop;
},
//文档的总高度
getScrollHeight() {
var documentScrollHeight = 0;
documentScrollHeight = document.documentElement.scrollHeight;
return documentScrollHeight;
},
//浏览器视口的高度
getWindowHeight() {
var windowHeight = 0;
windowHeight = document.documentElement.clientHeight;
return windowHeight;
},
getShopList() {
this.isKaiGuan = false;
if (this.urlFilter == "app") {
let query = {
online_state: this.activeOptions[0].join(","),
......@@ -355,8 +412,12 @@ export default {
};
this.$api.serviceShop.getAppList(query).then((response) => {
if (response.data.success == "1") {
this.lists = response.data.data;
this.lists =
this.page == 1
? response.data.data
: this.lists.concat(response.data.data);
this.total = response.data.total;
this.isKaiGuan = true;
} else {
console.log(response.data.errMsg);
}
......@@ -375,8 +436,12 @@ export default {
};
this.$api.serviceShop.getServiceShopList(query).then((response) => {
if (response.data.success == "1") {
this.lists = response.data.data;
this.lists =
this.page == 1
? response.data.data
: this.lists.concat(response.data.data);
this.total = response.data.total;
this.isKaiGuan = true;
} else {
console.log(response.data.errMsg);
}
......@@ -492,6 +557,7 @@ export default {
},
clickButtonFilter(index) {
this.activeBtn = index;
this.page = 1;
this.getShopList();
},
clickChildren(id, index, fatherId) {
......@@ -508,23 +574,27 @@ export default {
this.getFilterValue();
},
getFilterValue() {
this.page = 1;
this.getShopList();
},
// search debonce 500ms
searchVal() {
if (this.times !== null) clearTimeout(this.times);
this.times = setTimeout(() => {
this.page = 1;
this.getShopList();
}, 500);
},
getNewList(val) {
this.page = val.page;
this.limit = val.rowsPerPage;
console.log(val);
this.page = 1;
this.limit = 20;
this.getShopList();
},
clickAll(item) {
this.$set(this.activeOptions, item, []);
this.$set(this.activeChildOptions, item, []);
this.page = 1;
this.getShopList();
},
changeTwice() {
......@@ -567,12 +637,18 @@ export default {
.head_flex {
display: flex;
justify-content: space-between;
position: relative;
height: 40px;
top: -14px;
}
.bread_left {
width: 300px;
}
.input_right {
width: 360px;
position: relative;
height: 36px;
top: 6px;
}
.gray_line {
width: 100%;
......@@ -590,10 +666,11 @@ export default {
}
.classification_line_title {
display: inline-block;
width: 130px;
width: 90px;
padding: 15px 0;
text-align: right;
text-align: left;
color: #8890a7;
font-size: 12px;
}
.classification_line_items {
width: calc(100% - 130px);
......@@ -602,7 +679,7 @@ export default {
border-bottom: 1px #e9ecf3 solid;
}
.classification_line_hid {
height: 50px;
height: 46px;
width: 100%;
overflow: hidden;
display: inline-flex;
......@@ -621,7 +698,7 @@ export default {
.classification_line_items_li {
display: inline-block;
padding: 15px 20px;
font-size: 14px;
font-size: 12px;
}
.classification_line_items_li_act {
background-color: #fbfbfb;
......@@ -634,14 +711,27 @@ export default {
cursor: pointer;
}
.classification_act {
font-weight: 700;
color: #515fe7;
color: #fff;
position: relative;
z-index: 1;
}
.classification_act::after {
content: "";
position: absolute;
width: calc(100% + 16px);
height: calc(100% + 8px);
background-color: #3f4f9c;
border-radius: 3px;
top: -4px;
left: -8px;
z-index: -1;
}
.classification_line_items_open {
display: inline-block;
width: 60px;
padding: 15px 0;
cursor: pointer;
font-size: 12px;
}
.classification_children_ul {
display: inline-block;
......@@ -655,31 +745,31 @@ export default {
color: #58617a;
}
.button_filter {
background-color: #e6eefe;
color: #626de9;
border: 1px solid #e6eefe;
color: #8890a7;
font-size: 12px;
display: inline-block;
margin-right: 31px;
position: relative;
}
.button_filter:hover {
border: 1px solid rgb(198, 226, 255);
.button_filter::after {
content: "";
width: 1px;
height: 16px;
background-color: #e3e5ef;
position: absolute;
right: -15px;
}
.button_filter:focus {
border: 1px solid rgb(58, 142, 230);
.button_filter:nth-child(4):after {
content: "";
width: 0;
}
.button_filter_act {
background-color: #515fe7;
border: 1px solid #515fe7;
color: #f8f9fd;
font-size: 12px;
}
.button_filter_act:hover {
border: 1px solid #414fd7;
}
.button_filter_act:focus {
border: 1px solid #313fc7;
color: #515fe7;
}
.btn_group {
margin-top: 15px;
margin-bottom: 15px;
margin-left: 15px;
position: relative;
}
.btn_right_check {
......@@ -690,7 +780,8 @@ export default {
</style>
<style>
.head_flex .input_right .el-input__inner {
border-radius: 20px;
border-radius: 6px;
border: solid 1px #e7eaf6;
}
.head_flex .input_right .el-input--prefix .el-input__inner {
padding-left: 40px;
......
......@@ -65,32 +65,32 @@ export default {
}
switch (uri) {
case "data_service_list":
item.active = "tool_ic_shujufw_sel";
item.default = "tool_ic_shujufw";
item.active = "shop_tool_ic_sjfw_sel";
item.default = "shop_tool_ic_sjfw";
break;
case "space_time_service_list":
item.active = "tool_ic_shikongfw_sel";
item.default = "tool_ic_shikongfw";
item.active = "shop_tool_ic_skfw_sel";
item.default = "shop_tool_ic_skfw";
break;
case "video_service_list":
item.active = "tool_ic_shipinfw_sel";
item.default = "tool_ic_shipinfw";
item.active = "shop_tool_ic_spfw_sel";
item.default = "shop_tool_ic_spfw";
break;
case "perception_service_list":
item.active = "tool_ic_ganzhifw_sel";
item.default = "tool_ic_ganzhifw";
item.active = "shop_tool_ic_ganzhifw_sel";
item.default = "shop_tool_ic_ganzhifw";
break;
case "comprehensive_app_list":
item.active = "tool_ic_zongheyyfw_sel";
item.default = "tool_ic_zongheyyfw";
item.active = "shop_tool_ic_zhyyfw_sel";
item.default = "shop_tool_ic_zhyyfw";
break;
case "cloud":
item.active = "tool_ic_yunziyuanfw_sel";
item.default = "tool_ic_yunziyuanfw";
item.active = "shop_tool_ic_yzyfw_sel";
item.default = "shop_tool_ic_yzyfw";
break;
case "app_store_list":
item.active = "tool_ic_yingyongsd_sel";
item.default = "tool_ic_yingyongsd";
item.active = "shop_ic_yysd_sel";
item.default = "shop_ic_yysd";
break;
default:
item.active = "1";
......@@ -111,37 +111,48 @@ export default {
.service_shop_menu {
background-color: #0d1847;
position: fixed;
top: 58px;
left: 0;
width: 180px;
height: 100%;
padding-top: 30px;
top: 76px;
left: calc(50% - 600px);
width: 176px;
padding: 8px;
background-color: #ffffff;
box-shadow: 0px 3px 6px 0px
rgba(15, 19, 65, 0.04);
border-radius: 8px;
}
.service_shop_menu_list > li {
padding: 16px 10px 8px 22px;
border-left: 5px solid #0d1847;
box-sizing: border-box;
height: 40px;
padding: 8px 0 0 22px;
margin-bottom: 16px;
font-size: 15px;
line-height: 24px;
cursor: pointer;
}
.service_shop_menu_list > li:nth-last-child(1) {
margin-bottom: 0;
}
.service_shop_menu_list > li:hover,
.service_shop_menu_list > li.current {
border-left: 5px solid #e56600;
background-color: #182665;
color: #e6ebfe;
background-color: rgba(242, 246, 253, 0.4);
color: #515fe7;
}
.menu_img {
width: 25px;
width: 24px;
margin-right: 6px;
}
.menu_item {
position: relative;
color: #6573ae;
font-weight: bold;
font-size: 15px;
color: #96a0c5;
top: -6px;
}
.menu_item_active {
position: relative;
color: #e6ebfe;
font-weight: bold;
font-size: 15px;
color: #515fe7;
top: -6px;
}
</style>
<template>
<div>
<div class="shop_cloud">
<el-breadcrumb separator="/" class="bread_crumb1 bread_left">
<el-breadcrumb-item :to="{ path: '/shop' }">服务超市</el-breadcrumb-item>
<el-breadcrumb-item>{{ name }}</el-breadcrumb-item>
</el-breadcrumb>
<block-radius>
<block-radius :paddingNum="24">
<el-form
ref="form"
:inline="true"
......@@ -12,8 +12,8 @@
:model="form"
class="form_block"
>
<el-row>
<el-col :span="12">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item class="form_item">
<div class="form_item_title">申请组织:</div>
<el-input
......@@ -24,7 +24,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="form_item" prop="link_man">
<el-form-item class="form_item nobottom" prop="link_man">
<div class="form_item_title">部门联系人:</div>
<el-input
v-model="form.link_man"
......@@ -33,7 +33,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="form_item" prop="phone">
<el-form-item class="form_item nobottom" prop="phone">
<div class="form_item_title">联系电话:</div>
<el-input
v-model="form.phone"
......@@ -44,13 +44,11 @@
</el-row>
</el-form>
</block-radius>
<block-radius>
<block-radius :paddingNum="24">
<el-tabs v-model="activeName" class="cloud_form" @tab-click="tabClick">
<el-tab-pane label="申请新的工作区域" name="0">
<el-row>
<el-col :span="24">
<el-form ref="formNew" :model="formNew" :rules="ruleNew">
<el-row>
<el-row :gutter="24">
<el-col :span="24">
<div class="form_title">基本信息</div>
</el-col>
......@@ -72,8 +70,8 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="workplacedesc" class="form_item">
<el-col :span="24">
<el-form-item prop="workplacedesc" class="form_item nobottom">
<div class="form_item_title">描述信息:</div>
<el-input
type="textarea"
......@@ -85,7 +83,7 @@
<el-col :span="24">
<div class="form_title">工作区域申请规格</div>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item prop="cpu" class="form_item input_has_right">
<div class="form_item_title">CPU:</div>
<el-select
......@@ -103,11 +101,8 @@
<div class="input_right input_right_top"></div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
prop="memory"
class="form_item input_has_right"
>
<el-col :span="8">
<el-form-item prop="memory" class="form_item input_has_right">
<div class="form_item_title">内存:</div>
<el-select
v-model="formNew.memory"
......@@ -124,7 +119,7 @@
<div class="input_right input_right_top">GB</div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item
prop="containerGroup"
class="form_item input_has_right"
......@@ -143,8 +138,8 @@
<el-col :span="24">
<div class="form_item_title">数据盘(可选):</div>
</el-col>
<el-col :span="6">
<el-form-item class="form_item input_has_right">
<el-col :span="8">
<el-form-item class="form_item input_has_right nobottom">
<el-input-number
v-model="formNew.dataDisk"
controls-position="right"
......@@ -155,8 +150,8 @@
<div class="input_right"></div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="form_item input_has_right">
<el-col :span="8">
<el-form-item class="form_item input_has_right nobottom">
<el-input-number
v-model="formNew.perDataDisk"
controls-position="right"
......@@ -170,13 +165,10 @@
<el-col :span="24">
<div class="form_title">单个容器组规格</div>
</el-col>
<el-col :span="12">
<el-col :span="24">
<div class="form_item_title">CPU:</div>
</el-col>
<el-col :span="12">
<div class="form_item_title">内存:</div>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item
prop="perCPUs"
class="form_item input_has_left_right"
......@@ -187,12 +179,12 @@
controls-position="right"
:min="0"
:max="10"
placeholder="请选择CPU最高使用量"
placeholder="CPU最高使用量"
></el-input-number>
<div class="input_right"></div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item
prop="perCPU"
class="form_item input_has_left_right"
......@@ -203,15 +195,18 @@
controls-position="right"
:min="0"
:max="10"
placeholder="请选择CPU默认使用量"
placeholder="CPU默认使用量"
></el-input-number>
<div class="input_right"></div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="24">
<div class="form_item_title">内存:</div>
</el-col>
<el-col :span="8">
<el-form-item
prop="perRAMs"
class="form_item input_has_left_right"
class="form_item input_has_left_right nobottom"
>
<div class="input_left">最高</div>
<el-input-number
......@@ -219,15 +214,15 @@
controls-position="right"
:min="0"
:max="10"
placeholder="请选择内存最高使用量"
placeholder="内存最高使用量"
></el-input-number>
<div class="input_right">GB</div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item
prop="perRAM"
class="form_item input_has_left_right"
class="form_item input_has_left_right nobottom"
>
<div class="input_left">默认</div>
<el-input-number
......@@ -235,7 +230,7 @@
controls-position="right"
:min="0"
:max="10"
placeholder="请选择内存默认使用量"
placeholder="内存默认使用量"
></el-input-number>
<div class="input_right">GB</div>
</el-form-item>
......@@ -243,7 +238,7 @@
<el-col :span="24">
<div class="form_title">其他信息</div>
</el-col>
<el-col :span="12">
<el-col :span="16">
<el-form-item
prop="appDuration"
class="form_item input_has_right"
......@@ -291,12 +286,10 @@
</el-col>
</el-row>
</el-form>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="调整现有工作区域" name="1">
<el-row>
<el-col :span="12">
<el-row :gutter="24">
<el-col :span="16">
<div class="select_title">选择要进行调整的工作区域:</div>
<div class="form_item">
<el-select
......@@ -315,10 +308,8 @@
</el-col>
</el-row>
<div v-show="formShow">
<el-row>
<el-col :span="24">
<el-form ref="formOld" :model="formOld" :rules="ruleOld">
<el-row>
<el-row :gutter="24">
<el-col :span="24">
<div class="form_title">工作区域规格调整</div>
</el-col>
......@@ -351,11 +342,8 @@
</div>
</div>
</el-col>
<el-col :span="6">
<el-form-item
prop="cpu"
class="form_item input_has_right"
>
<el-col :span="8">
<el-form-item prop="cpu" class="form_item input_has_right">
<div class="form_item_title">申请CPU调整为:</div>
<el-select
v-model="formOld.cpu"
......@@ -371,11 +359,8 @@
<div class="input_right input_right_top"></div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
prop="memory"
class="form_item input_has_right"
>
<el-col :span="8">
<el-form-item prop="memory" class="form_item input_has_right">
<div class="form_item_title">申请内存调整为:</div>
<el-select
v-model="formOld.memory"
......@@ -392,7 +377,7 @@
<div class="input_right input_right_top">GB</div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item
prop="containerGroup"
class="form_item input_has_right"
......@@ -408,9 +393,9 @@
<div class="input_right"></div>
</el-form-item>
</el-col>
<el-col :span="12" v-if="dataDiskList.length != 0">
<el-col :span="24" v-if="dataDiskList.length != 0">
<el-form-item class="form_item input_has_right">
<div class="form_item_title">调整数据盘:</div>
<div class="form_item_title_1">调整数据盘:</div>
<table-um
ref="apply_service_state_table"
:headers="dataDiskHeaders"
......@@ -418,11 +403,13 @@
:datas="dataDiskList"
@primary-del="delItem"
:maxheight="260"
size="small"
class="disk__table"
></table-um>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item class="form_item">
<el-form-item class="form_item nobottom">
<div class="form_item_title">增加数据盘:</div>
<!-- <el-select v-model="formOld.store_type" placeholder="请选择数据盘类型">
<el-option
......@@ -434,8 +421,8 @@
</el-select>-->
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="form_item input_has_right">
<el-col :span="8">
<el-form-item class="form_item input_has_right nobottom">
<el-input-number
v-model="formOld.dataDisk"
controls-position="right"
......@@ -446,8 +433,8 @@
<div class="input_right"></div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="form_item input_has_right">
<el-col :span="8">
<el-form-item class="form_item input_has_right nobottom">
<el-input-number
v-model="formOld.perDataDisk"
controls-position="right"
......@@ -481,8 +468,8 @@
最高&nbsp;{{ item.max }}&nbsp;{{
item.title == "CPU" ? "" : "GB"
}}
&nbsp;&nbsp;&nbsp;&nbsp;
</span>
<br />
<span class="now_rqz_card_val">
默认&nbsp;{{ item.default }}&nbsp;{{
item.title == "CPU" ? "" : "GB"
......@@ -492,13 +479,10 @@
</div>
</div>
</el-col>
<el-col :span="12">
<el-col :span="24">
<div class="form_item_title">CPU:</div>
</el-col>
<el-col :span="12">
<div class="form_item_title">内存:</div>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item
prop="perCPUs"
class="form_item input_has_left_right"
......@@ -514,7 +498,7 @@
<div class="input_right"></div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item
prop="perCPU"
class="form_item input_has_left_right"
......@@ -530,10 +514,13 @@
<div class="input_right"></div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="24">
<div class="form_item_title">内存:</div>
</el-col>
<el-col :span="8">
<el-form-item
prop="perRAMs"
class="form_item input_has_left_right"
class="form_item input_has_left_right nobottom"
>
<div class="input_left">最高</div>
<el-input-number
......@@ -546,10 +533,10 @@
<div class="input_right">GB</div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item
prop="perRAM"
class="form_item input_has_left_right"
class="form_item input_has_left_right nobottom"
>
<div class="input_left">默认</div>
<el-input-number
......@@ -564,6 +551,7 @@
</el-col>
<el-col :span="24">
<div class="form_title">其他信息</div>
</el-col>
<el-col :span="24">
<div class="now_spec">当前规格:</div>
<div class="now_spec_card_time">
......@@ -577,17 +565,14 @@
>
<span class="now_spec_card_time_val">
{{
helper.dateStringTransform(
paramsOld.cloud_end_time
)
helper.dateStringTransform(paramsOld.cloud_end_time)
}}
</span>
</div>
</div>
</el-col>
</el-col>
<el-col :span="12">
<el-form-item class="form_item input_has_right_select">
<el-col :span="16">
<el-form-item class="form_item input_has_right">
<div class="form_item_title">申请续期:</div>
<el-input-number
v-model="formOld.appDuration"
......@@ -595,18 +580,7 @@
:min="1"
:max="1000"
></el-input-number>
<el-select
v-model="formOld.durType"
class="input_right_select"
placeholder="请选择续期时长"
>
<el-option
v-for="item in durationOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<div class="input_right"></div>
</el-form-item>
</el-col>
<el-col :span="22">
......@@ -624,13 +598,12 @@
:readOnly="false"
:drag="true"
@getNewList="getNewListOld"
class="up_f"
></upload-file>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-col>
</el-row>
</div>
</el-tab-pane>
</el-tabs>
......@@ -918,7 +891,9 @@
<div class="dia_block_item_in">
<span class="dia_block_item_title">内存:</span>
<p class="dia_block_item_val">
<span class="val_has_2">om=[] </span>
<span class="val_has_2">
最高&nbsp;{{ diaForm.perRAMs }}GB
</span>
<span class="val_has_2">
默认&nbsp;{{ diaForm.perRAM }}GB
</span>
......@@ -1322,11 +1297,7 @@ export default {
{ value: "8", label: "8" },
{ value: "16", label: "16" },
],
optionsRAM: [
{ value: "8", label: "8" },
{ value: "16", label: "16" },
{ value: "32", label: "32" },
],
optionsRAM: [],
options_store_type: [
{ value: "nfs-client", label: "nfs-client" },
{ value: "rook-ceph-block", label: "rook-ceph-block" },
......@@ -1851,8 +1822,9 @@ export default {
}
.form_title {
font-size: 16px;
line-height: 16px;
font-weight: bold;
margin: 10px 0;
margin: 32px 0 24px;
padding: 0 0 0 15px;
position: relative;
color: #58617a;
......@@ -1865,14 +1837,22 @@ export default {
background-color: #515fe7;
border-radius: 2px;
left: 0;
top: 2px;
top: -1px;
}
.form_item {
width: calc(100% - 20px);
width: calc(100%);
}
.form_item_title {
padding: 0 15px;
line-height: 40px;
margin: 0 0 12px;
line-height: 14px;
font-size: 14px;
color: #58617a;
}
.form_item_title_1 {
margin: 0;
line-height: 14px;
font-size: 14px;
color: #58617a;
}
.input_has_right {
position: relative;
......@@ -1885,7 +1865,7 @@ export default {
background-color: #edeef4;
border: 1px #e3e5ef solid;
color: #8890a7;
border-radius: 0 8px 8px 0;
border-radius: 0 6px 6px 0;
position: absolute;
right: 0;
}
......@@ -1900,7 +1880,7 @@ export default {
background-color: #edeef4;
border: 1px #e3e5ef solid;
color: #8890a7;
border-radius: 8px 0 0 8px;
border-radius: 6px 0 0 6px;
position: absolute;
left: 0;
}
......@@ -1912,26 +1892,28 @@ export default {
right: 0;
}
.select_title {
padding: 20px 15px;
padding: 32px 0 12px;
font-size: 16px;
line-height: 16px;
font-weight: bold;
color: #242c43;
color: #58617a;
}
.now_spec {
padding: 10px 15px;
padding: 0 0 12px;
}
.now_spec_cards {
margin-bottom: 24px;
}
.now_spec_card {
display: inline-block;
width: 165px;
height: 50px;
width: 194px;
height: 40px;
background-color: #f7f8f9;
border-radius: 8px;
line-height: 50px;
border-radius: 6px;
line-height: 40px;
padding: 0 20px;
position: relative;
margin-right: 20px;
margin-right: 24px;
}
.now_spec_card_title {
color: #6573ae;
......@@ -1945,15 +1927,15 @@ export default {
}
.now_spec_card_img {
position: relative;
top: 2px;
top: 1px;
}
.now_rqz_card {
display: inline-block;
width: 193px;
height: 78px;
width: 304px;
height: 40px;
background-color: #f7f8f9;
border-radius: 8px;
line-height: 78px;
border-radius: 6px;
line-height: 40px;
padding: 0 20px;
position: relative;
margin-right: 20px;
......@@ -1965,28 +1947,29 @@ export default {
.now_rqz_card_val_div {
color: #0d1847;
position: absolute;
line-height: 30px;
line-height: 40px;
right: 20px;
top: 9px;
top: 0;
}
.now_rqz_card_val {
}
.now_rqz_card_img {
position: relative;
top: 2px;
top: 1px;
}
.now_spec_card_time {
width: 381px;
height: 50px;
height: 40px;
background-color: #f7f8f9;
border-radius: 8px;
line-height: 50px;
border-radius: 6px;
line-height: 40px;
padding: 0 20px;
position: relative;
margin-bottom: 24px;
}
.now_spec_card_time_img {
position: relative;
top: 2px;
top: 1px;
}
.now_spec_card_time_title {
color: #6573ae;
......@@ -2072,7 +2055,7 @@ export default {
margin-right: 20px;
}
.doc_template {
margin: 0 0 10px 20px;
margin: 0 0 12px;
}
.up_f {
width: calc(50% - 10px);
......@@ -2206,6 +2189,9 @@ export default {
.clear_xxx {
clear: both;
}
.disk__table {
margin-bottom: 0;
}
</style>
<style>
.form_block .el-input .el-input__inner {
......@@ -2227,7 +2213,7 @@ export default {
color: #242c43;
}
.cloud_form .input_right_top {
top: 40px;
top: 26px;
}
.cloud_form .el-select {
width: 100%;
......@@ -2255,17 +2241,20 @@ export default {
}
.cloud_form .el-textarea .el-textarea__inner {
background-color: #f7f8f9;
border-radius: 8px;
border-radius: 6px;
color: #242c43;
}
.form_item .el-form-item__content {
width: 100%;
}
.form_item.el-form-item {
margin-bottom: 12px;
margin-bottom: 24px;
}
.form_item.el-form-item.nobottom {
margin-bottom: 0;
}
.input_has_right .el-input__inner {
border-radius: 8px 0 0 8px;
border-radius: 6px 0 0 6px;
color: #242c43;
}
.cloud_form .input_has_right_select .el-input-number {
......@@ -2281,20 +2270,20 @@ export default {
border-color: #0f2683;
}
.input_has_right_select .el-input__inner {
border-radius: 8px 0 0 8px;
border-radius: 6px 0 0 6px;
color: #242c43;
}
.input_has_right_select .input_right_select.el-select .el-input {
width: 100px;
background-color: #0f2683;
color: #ffffff;
border-radius: 0 8px 8px 0;
border-radius: 0 6px 6px 0;
}
.input_has_right_select
.input_right_select.el-select
.el-input
.el-input__inner {
border-radius: 0 8px 8px 0;
border-radius: 0 6px 6px 0;
color: #ffffff;
}
.input_right_select .el-input .el-input__inner {
......@@ -2305,7 +2294,7 @@ export default {
.cloud_form .el-input-number .el-input-number__decrease {
border-bottom: 0;
border-left: 0;
width: 40px;
width: 29px;
}
.cloud_dia .el-dialog__header {
border-bottom: 1px solid #edf0ff;
......@@ -2320,10 +2309,11 @@ export default {
.cloud_form .el-input__prefix,
.el-input__suffix {
text-align: right;
right: 2px;
}
.cloud_form .el-input-number.is-controls-right .el-input__inner {
padding-left: 15px;
padding-right: 40px;
padding-right: 32px;
}
.up_f .el-upload {
width: 100%;
......@@ -2331,4 +2321,7 @@ export default {
.up_f .el-upload-dragger {
width: 100%;
}
.shop_cloud .el-tabs__header {
margin: 0;
}
</style>
......@@ -2,6 +2,8 @@
<div class="organization_list">
<apass-list
@list-action="initDatas"
:page-size="20"
:page-sizes="[20, 50]"
search-placeholder="请输入关键字"
:list-total="listTotal"
>
......
......@@ -2,14 +2,10 @@
<div>
<el-breadcrumb separator="/" class="bread_crumb1">
<el-breadcrumb-item :to="{ path: '/data_analysis' }">
{{
$t("lang.data_analysis")
}}
{{ $t("lang.data_analysis") }}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
$t("lang.service_data_analysis")
}}
{{ $t("lang.service_data_analysis") }}
</el-breadcrumb-item>
</el-breadcrumb>
<el-row v-if="is_general_user" class="in_analysis">
......@@ -17,14 +13,26 @@
<el-col :span="6" class="in_left">
<el-row>
<el-col :span="24" class="in_block">
<block-radius :show_header="true" title="服务总体概况" class="block">
<block-radius
:show_header="true"
title="服务总体概况"
class="block"
>
<div class="left_1">
<div ref="left_1_l" class="left_1_l">
<img :src="require('@/assets/imgs/data_img_service.gif')" class="left_1_img" />
<img
:src="require('@/assets/imgs/data_img_service.gif')"
class="left_1_img"
/>
<div class="left_1_title">服务总数</div>
<div class="left_1_num">{{ overview.serviceTotal }}</div>
</div>
<dashboard ref="left_1_r" :data="das_data" :is_word="true" class="left_1_r"></dashboard>
<dashboard
ref="left_1_r"
:data="das_data"
:is_word="true"
class="left_1_r"
></dashboard>
</div>
</block-radius>
</el-col>
......@@ -41,14 +49,14 @@
class="block-radius-content"
:data="mult_data_state"
:show_center_data="false"
:bar_width="10 "
:bar_width="10"
></multiple-circle>
<starlist
v-else
class="block-radius-content"
:options="linelistData"
:show_star="false"
style="margin-top: 30px;height: calc(100% - 51px);"
style="margin-top: 30px; height: calc(100% - 51px)"
></starlist>
</block-radius>
</el-col>
......@@ -60,7 +68,11 @@
@changeButton="changeServiceTypeBtn"
class="block"
>
<multiple-circle class="block-radius-content" :data="mult_data" :text="text"></multiple-circle>
<multiple-circle
class="block-radius-content"
:data="mult_data"
:text="text"
></multiple-circle>
</block-radius>
</el-col>
<el-col :span="24" class="in_block">
......@@ -84,7 +96,11 @@
</block-radius>
</el-col>
<el-col :span="24" class="in_block">
<block-radius :show_header="true" title="服务热门搜索" class="block">
<block-radius
:show_header="true"
title="服务热门搜索"
class="block"
>
<div class="block-radius-content service-hot-search">
<div class="left-content">
<div class="hot-line">
......@@ -92,20 +108,36 @@
<div class="hot-line-chart">
<!-- 折线图 -->
<p class="sparkline-text">
<span>{{sparkline1.num}}</span>
<span>{{ sparkline1.num }}</span>
<span
:style="sparkline1.up>0?{backgroundColor:'#e7fdfc',color:'#25bdb1'}:{backgroundColor:'#fbe8e8',color:'#e15260'}"
:style="
sparkline1.up > 0
? { backgroundColor: '#e7fdfc', color: '#25bdb1' }
: { backgroundColor: '#fbe8e8', color: '#e15260' }
"
>
{{sparkline1.up>0?sparkline1.up:0-sparkline1.up}}%
{{
sparkline1.up > 0
? sparkline1.up
: 0 - sparkline1.up
}}%
<img
v-if="sparkline1.up>0"
v-if="sparkline1.up > 0"
src="../../assets/imgs/icon_up.png"
alt
/>
<img v-if="sparkline1.up<0" src="../../assets/imgs/icon_down.png" alt />
<img
v-if="sparkline1.up < 0"
src="../../assets/imgs/icon_down.png"
alt
/>
</span>
</p>
<sparkline :indicatorStyles="spIndicatorStyles1" width="220" height="42">
<sparkline
:indicatorStyles="spIndicatorStyles1"
width="220"
height="42"
>
<sparklineCurve
:refLineStyles="spRefLineStyles3"
:refLineType="false"
......@@ -121,20 +153,36 @@
<div class="hot-line-chart">
<!-- 折线图 -->
<p class="sparkline-text sparkline-text-user">
<span>{{sparkline2.num}}</span>
<span>{{ sparkline2.num }}</span>
<span
:style="sparkline2.up>0?{backgroundColor:'#e7fdfc',color:'#25bdb1'}:{backgroundColor:'#fbe8e8',color:'#e15260'}"
:style="
sparkline2.up > 0
? { backgroundColor: '#e7fdfc', color: '#25bdb1' }
: { backgroundColor: '#fbe8e8', color: '#e15260' }
"
>
{{sparkline2.up>0?sparkline2.up:0-sparkline2.up}}%
{{
sparkline2.up > 0
? sparkline2.up
: 0 - sparkline2.up
}}%
<img
v-if="sparkline2.up>0"
v-if="sparkline2.up > 0"
src="../../assets/imgs/icon_up.png"
alt
/>
<img v-if="sparkline2.up<0" src="../../assets/imgs/icon_down.png" alt />
<img
v-if="sparkline2.up < 0"
src="../../assets/imgs/icon_down.png"
alt
/>
</span>
</p>
<sparkline :indicatorStyles="spIndicatorStyles1" width="220" height="42">
<sparkline
:indicatorStyles="spIndicatorStyles1"
width="220"
height="42"
>
<sparklineCurve
:refLineStyles="spRefLineStyles3"
:refLineType="false"
......@@ -165,7 +213,10 @@
:buttons_arr="['近14天', '近30天']"
@changeButton="changeServeiceTotalChangeBtn"
>
<line-chart class="block-radius-content" :data="line_data"></line-chart>
<line-chart
class="block-radius-content"
:data="line_data"
></line-chart>
</block-radius>
</el-col>
</el-row>
......@@ -206,9 +257,18 @@
@changeButton="changeOpenessBtnindex"
class="block"
>
<single-circle class="block-radius-content single-charts" :data="single_data"></single-circle>
<single-circle class="block-radius-content single-charts" :data="single_data1"></single-circle>
<single-circle class="block-radius-content single-charts" :data="single_data2"></single-circle>
<single-circle
class="block-radius-content single-charts"
:data="single_data"
></single-circle>
<single-circle
class="block-radius-content single-charts"
:data="single_data1"
></single-circle>
<single-circle
class="block-radius-content single-charts"
:data="single_data2"
></single-circle>
</block-radius>
</el-col>
<el-col :span="24" class="in_block">
......@@ -229,7 +289,7 @@
class="block-radius-content"
:options="starlistData"
:total="starlistTotal"
style="margin-top: 30px;height: calc(100% - 51px);"
style="margin-top: 30px; height: calc(100% - 51px)"
></starlist>
</block-radius>
</el-col>
......@@ -237,13 +297,24 @@
</el-col>
<!-- 不可横向铺满,一般为最后一行 -->
<el-col :span="6" class="in_block">
<block-radius :show_header="true" title="服务来源机构分析" class="block">
<BarChart :data="bar_data_org" :x_router="30" :colors="['#e56600', '#e56600']" />
<block-radius
:show_header="true"
title="服务来源机构分析"
class="block"
>
<BarChart
:data="bar_data_org"
:x_router="30"
:colors="['#e56600', '#e56600']"
/>
</block-radius>
</el-col>
<el-col :span="18" class="in_block default">
<block-radius class="block">
<img :src="require('@/assets/imgs/data_img_default.gif')" class="default_img" />
<img
:src="require('@/assets/imgs/data_img_default.gif')"
class="default_img"
/>
</block-radius>
</el-col>
</el-row>
......@@ -291,7 +362,12 @@ export default {
right_2_state: 0,
right_3_state: 0,
last_id: 0,
mult_data_state: [],
mult_data_state: [
{ name: "健康", value: 0 },
{ name: "未使用", value: 0 },
{ name: "故障", value: 0 },
{ name: "警告", value: 0 },
],
mult_data: [],
spIndicatorStyles1: false,
spRefLineStyles3: {
......@@ -547,7 +623,25 @@ export default {
getServiceHealth() {
this.$api.dataAnalysis.getServiceHealth().then((response) => {
if (response.data.success == 1) {
this.mult_data_state = response.data.data.seriesData;
let data = response.data.data.seriesData;
let jk = data.find((item) => {
return item.name == "健康";
});
let wsy = data.find((item) => {
return item.name == "未使用";
});
let gz = data.find((item) => {
return item.name == "故障";
});
let jg = data.find((item) => {
return item.name == "警告";
});
this.mult_data_state = [
{ name: "健康", value: jk.value },
{ name: "未使用", value: wsy.value },
{ name: "故障", value: gz.value },
{ name: "警告", value: jg.value },
];
}
});
},
......
......@@ -315,10 +315,10 @@ export default {
right_3_state: 0,
last_id: 0,
mult_data_state: [
{ name: "正常", value: 0 },
{ name: "警告", value: 0 },
{ name: "错误", value: 0 },
{ name: "健康", value: 0 },
{ name: "未使用", value: 0 },
{ name: "故障", value: 0 },
{ name: "警告", value: 0 },
],
mult_data: [
{ name: "数据服务", value: 0 },
......@@ -535,7 +535,25 @@ export default {
getServiceHealth() {
this.$api.dataAnalysis.getServiceHealth().then((response) => {
if (response.data.success == 1) {
this.mult_data_state = response.data.data.seriesData;
let data = response.data.data.seriesData;
let jk = data.find((item) => {
return item.name == "健康";
});
let wsy = data.find((item) => {
return item.name == "未使用";
});
let gz = data.find((item) => {
return item.name == "故障";
});
let jg = data.find((item) => {
return item.name == "警告";
});
this.mult_data_state = [
{ name: "健康", value: jk.value },
{ name: "未使用", value: wsy.value },
{ name: "故障", value: gz.value },
{ name: "警告", value: jg.value },
];
}
});
},
......
......@@ -309,10 +309,10 @@ export default {
right_3_state: 0,
last_id: 0,
mult_data_state: [
{ name: "正常", value: 0 },
{ name: "警告", value: 0 },
{ name: "错误", value: 0 },
{ name: "健康", value: 0 },
{ name: "未使用", value: 0 },
{ name: "故障", value: 0 },
{ name: "警告", value: 0 },
],
mult_data: [
{ name: "数据服务", value: 0 },
......@@ -529,7 +529,25 @@ export default {
getServiceHealth() {
this.$api.dataAnalysis.getServiceHealth().then((response) => {
if (response.data.success == 1) {
this.mult_data_state = response.data.data.seriesData;
let data = response.data.data.seriesData;
let jk = data.find((item) => {
return item.name == "健康";
});
let wsy = data.find((item) => {
return item.name == "未使用";
});
let gz = data.find((item) => {
return item.name == "故障";
});
let jg = data.find((item) => {
return item.name == "警告";
});
this.mult_data_state = [
{ name: "健康", value: jk.value },
{ name: "未使用", value: wsy.value },
{ name: "故障", value: gz.value },
{ name: "警告", value: jg.value },
];
}
});
},
......
<template>
<div>
<div class="shop_list_cont">
<el-container>
<el-aside width="180px">
<el-aside width="176px">
<service-shop-menu></service-shop-menu>
</el-aside>
<el-main>
<el-main class="main_init">
<shop-cloud name="云资源服务"></shop-cloud>
</el-main>
</el-container>
......@@ -25,4 +25,12 @@ export default {
};
</script>
<style scoped>
.shop_list_cont {
width: 1200px;
margin: 0 auto;
position: relative;
}
.main_init {
padding: 2px 0 16px 16px;
}
</style>
\ No newline at end of file
<template>
<div>
<div class="shop_list_cont">
<el-container>
<el-aside width="180px">
<el-aside width="176px">
<service-shop-menu></service-shop-menu>
</el-aside>
<el-main>
<el-main class="main_init">
<service-list
:filterNames="filterNames"
:name="name"
......@@ -123,4 +123,12 @@ export default {
background: url("~@/assets/imgs/img_default_quesheng.png") no-repeat center
center;
}
.shop_list_cont {
width: 1200px;
margin: 0 auto;
position: relative;
}
.main_init {
padding: 16px 0 16px 16px;
}
</style>
\ No newline at end of file
......@@ -103,7 +103,7 @@ export default {
name: "请求参数",
type: "table",
value: {
datas: this.getTableData(datas.req_fields),
datas: this.getTableData(datas.req_query),
columns: [
{
prop: "name",
......
......@@ -14,7 +14,6 @@
<service-tabs
:detail-data="detailData"
:specification-data="specificationData"
:provider-data="providerData"
:comments-data="commentsData"
:comments-url="commentsUrl"
......@@ -34,7 +33,6 @@ export default {
data: () => ({
baseInfo: null,
detailData: null,
specificationData: null,
providerData: null,
commentsData: null,
}),
......@@ -61,17 +59,6 @@ export default {
})
.then(({ data }) => {
let datas = data.data;
let specificationData =
(datas.serviceRequestSpcs &&
datas.serviceRequestSpcs.map((item) => ({
id: item.id,
type: item.type,
pv: item.pv,
count: item.count,
name: `访问次数:${item.pv}次/日 访问量:${item.count}次/日`,
descript: item.des,
}))) ||
[];
this.baseInfo = {
portal_id: datas.portal_id || "", // 时空服务id
......@@ -93,9 +80,9 @@ export default {
datas.data_service_type3_name,
],
descript: datas.descript,
serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail,
month_sale: data.month_sale,
serviceRequestSpcs: datas.serviceRequestSpcs,
};
this.detailData = [
......@@ -145,7 +132,6 @@ export default {
],
}, */
];
this.specificationData = specificationData;
this.providerData = {
organization_name: datas.organization_name,
picture_path: datas.organization_picture,
......
......@@ -14,7 +14,6 @@
<service-tabs
:detail-data="detailData"
:specification-data="specificationData"
:provider-data="providerData"
:comments-data="commentsData"
:comments-url="commentsUrl"
......@@ -34,7 +33,6 @@ export default {
data: () => ({
baseInfo: null,
detailData: null,
specificationData: null,
providerData: null,
commentsData: null,
}),
......@@ -56,18 +54,6 @@ export default {
})
.then(({ data }) => {
let datas = data.data;
let specificationData =
(datas.serviceRequestSpcs &&
datas.serviceRequestSpcs.map((item) => ({
id: item.id,
type: item.type,
pv: item.pv,
count: item.count,
name: `访问次数:${item.pv}次/日 访问量:${item.count}次/日`,
descript: item.des,
}))) ||
[];
this.baseInfo = {
service_id: this.id,
app_id: 0,
......@@ -88,7 +74,7 @@ export default {
datas.data_service_type3_name,
],
descript: datas.descript,
serviceRequestSpcs: specificationData,
serviceRequestSpcs: datas.serviceRequestSpcs,
scoreDetail: datas.scoreDetail,
month_sale: data.month_sale,
};
......@@ -141,7 +127,6 @@ export default {
value: datas.workflows_id,
});
}
this.specificationData = specificationData;
this.providerData = {
organization_name: datas.organization_name,
picture_path: datas.organization_picture,
......
......@@ -176,7 +176,7 @@ export default {
{
label: "流程编号",
prop: "workflows_code",
width: 180,
width: 130,
},
{
label: "流程名称",
......@@ -188,7 +188,7 @@ export default {
label: "服务领域",
prop: "sector_name",
align: "center",
width: 240,
width: 200,
},
{
label: "创建时间",
......@@ -206,7 +206,7 @@ export default {
return ["未部署", "已部署", "已发布"][item.state || 0];
},
align: "center",
width: 180,
width: 80,
},
{
label: "工作区域",
......
......@@ -16,20 +16,33 @@
:style="
now_service == index ? { borderBottom: '4px solid #f5ab4c' } : {}
"
>{{ item }}</div>
>
{{ item }}
</div>
</div>
<div class="type_box_select">
<info-list :list_arr="process_in_up_arr" v-if="now_service == 1&&process_in_up">
<info-list
:list_arr="process_in_up_arr"
v-if="now_service == 1 && process_in_up"
>
<div slot="service_port" class="service_port">
<el-select v-model="port_select" placeholder="" @change="change_port">
<el-select
v-model="port_select"
placeholder=""
@change="change_port"
>
<el-option
v-for="item in port_options"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
<div class="port_bg_box" style="padding:20px;background-color:#f8f9fd;margin-top:10px;">
<div
class="port_bg_box"
style="padding:20px;background-color:#f8f9fd;margin-top:10px;"
>
<info-list :list_arr="port_solt_arr">
<table-um
:headers="req_solt_header_arr"
......@@ -37,33 +50,52 @@
:stripe="true"
slot="request_table"
></table-um>
<v-apaas-code :datas="req_solt_code_arr" slot="request_code" :readOnly="true"></v-apaas-code>
<v-apaas-code
:datas="req_solt_code_arr"
slot="request_code"
:readOnly="true"
></v-apaas-code>
<table-um
:headers="res_solt_header_arr"
:datas="res_solt_data"
:stripe="true"
slot="response_table"
></table-um>
<v-apaas-code :datas="res_solt_code_arr" slot="response_code" :readOnly="true"></v-apaas-code>
<v-apaas-code
:datas="res_solt_code_arr"
slot="response_code"
:readOnly="true"
></v-apaas-code>
</info-list>
</div>
</div>
</info-list>
<info-list :list_arr="perception_solt_arr" v-if="now_service == 1&&perception_in">
<info-list
:list_arr="perception_solt_arr"
v-if="now_service == 1 && perception_in"
>
<table-um
:headers="perception_req_solt_header_arr"
:datas="req_solt_data"
:stripe="true"
slot="request_table"
></table-um>
<v-apaas-code :datas="req_solt_code_arr" slot="request_code" :readOnly="true"></v-apaas-code>
<v-apaas-code
:datas="req_solt_code_arr"
slot="request_code"
:readOnly="true"
></v-apaas-code>
<table-um
:headers="perception_res_solt_header_arr"
:datas="res_solt_data"
:stripe="true"
slot="response_table"
></table-um>
<v-apaas-code :datas="res_solt_code_arr" slot="response_code" :readOnly="true"></v-apaas-code>
<v-apaas-code
:datas="res_solt_code_arr"
slot="response_code"
:readOnly="true"
></v-apaas-code>
</info-list>
<info-list
v-else
......@@ -87,11 +119,16 @@
:datas="res_table_arr"
slot="apply_table"
></table-um>
<v-apaas-code :datas="res_code_arr" slot="res_code" :readOnly="true"></v-apaas-code>
<process-card :data="use_approval_arr" slot="approval"></process-card>
<v-apaas-code
:datas="res_code_arr"
slot="res_code"
:readOnly="true"
></v-apaas-code>
<process-card
:data="use_approval_arr"
slot="approval"
></process-card>
</info-list>
</div>
</div>
</div>
......@@ -116,18 +153,17 @@ export default {
data() {
return {
use_approval_arr: [],
process_in_up:false,//是否是服务注册产生的
perception_in:false,//是否是感知服务
service_apply_type:1,//服务申请的方式,1:计次收费2:时长收费
port_select:'',
req_solt_code_arr:'',
res_solt_code_arr:'',
perception_req_solt_code_arr:'',
perception_res_solt_code_arr:'',
req_solt_data:[],
res_solt_data:[],
perception_req_solt_data:[],
perception_res_solt_data:[],
process_in_up: false, //是否是服务注册产生的
perception_in: false, //是否是感知服务
port_select: "",
req_solt_code_arr: "",
res_solt_code_arr: "",
perception_req_solt_code_arr: "",
perception_res_solt_code_arr: "",
req_solt_data: [],
res_solt_data: [],
perception_req_solt_data: [],
perception_res_solt_data: [],
req_solt_header_arr: [
{
prop: "name",
......@@ -262,8 +298,8 @@ export default {
width: 240,
},
],
port_options:[],
port_solt_arr:[
port_options: [],
port_solt_arr: [
{
title: "服务地址:",
info: "",
......@@ -301,7 +337,7 @@ export default {
solt_name: "response_code",
},
],
perception_solt_arr:[
perception_solt_arr: [
{
title: "接口文档:",
info: "",
......@@ -339,9 +375,9 @@ export default {
info: "",
type: "solt",
solt_name: "response_code",
}
},
],
process_in_up_arr:[
process_in_up_arr: [
{
title: "接口文档:",
info: "",
......@@ -353,7 +389,7 @@ export default {
info: "",
type: "solt",
solt_name: "service_port",
}
},
],
approval_arr: [
{
......@@ -477,7 +513,7 @@ export default {
service_header_arr: {
id: "",
isMap: false,
isProcess:false,
isProcess: false,
name: "",
first: [
{
......@@ -493,6 +529,10 @@ export default {
name: "服务到期时间",
text: "",
},
{
name: "可用调用次数",
text: "",
},
],
second: [
{
......@@ -652,7 +692,7 @@ export default {
},
], // 响应参数-header
res_table_arr: [], // 响应参数
res_code_arr: ""
res_code_arr: "",
};
},
watch: {},
......@@ -662,16 +702,16 @@ export default {
},
mounted() {},
methods: {
change_port(val){
this.port_options.forEach(e => {
if(e.value == val){
this.$set(this.port_solt_arr[0],'info',e.value)
this.$set(this.port_solt_arr[1],'info',e.req_type)
this.$set(this.port_solt_arr[2],'info',e.encode_method)
this.req_solt_data = e.req_fields
this.res_solt_data = e.res_fields
this.req_solt_code_arr = e.req_fields_example
this.res_solt_code_arr = e.res_fields_example
change_port(val) {
this.port_options.forEach((e) => {
if (e.value == val) {
this.$set(this.port_solt_arr[0], "info", e.value);
this.$set(this.port_solt_arr[1], "info", e.req_type);
this.$set(this.port_solt_arr[2], "info", e.encode_method);
this.req_solt_data = e.req_fields;
this.res_solt_data = e.res_fields;
this.req_solt_code_arr = e.req_fields_example;
this.res_solt_code_arr = e.res_fields_example;
}
});
},
......@@ -727,77 +767,106 @@ export default {
: "#e15260"
);
this.$set(this.service_header_arr["second"][0], "text", data.service_apply_info.urls[0].req_url);
this.$set(
this.service_header_arr["second"][0],
"text",
data.service_apply_info.urls[0].req_url
);
this.$set(this.service_header_arr, "url", data.cover);
//判断是否是服务注册出来的流程服务
if(data.data_service_type2 == 24&&data.workflows_id==0){
this.process_in_up = true
this.$set(this.process_in_up_arr[0],'info',data.doc_file.split('/')[data.doc_file.split('/').length-1])
this.$set(this.process_in_up_arr[0],'url',data.doc_file)
var temp_port_arr = []
data.urls.forEach(e => {
if (data.data_service_type2 == 24 && data.workflows_id == 0) {
this.process_in_up = true;
this.$set(
this.process_in_up_arr[0],
"info",
data.doc_file.split("/")[data.doc_file.split("/").length - 1]
);
this.$set(this.process_in_up_arr[0], "url", data.doc_file);
var temp_port_arr = [];
data.urls.forEach((e) => {
temp_port_arr.push({
label:e.req_name,
value:e.req_url,
able:e.state==-1?false:true,
...e
})
label: e.req_name,
value: e.req_url,
able: e.state == -1 ? false : true,
...e,
});
this.port_options = temp_port_arr
if(this.port_options[0]){
this.port_select = this.port_options[0].value
this.$set(this.port_solt_arr[0],'info',this.port_options[0].value)
this.$set(this.port_solt_arr[1],'info',this.port_options[0].req_type)
this.$set(this.port_solt_arr[2],'info',this.port_options[0].encode_method)
this.req_solt_data = this.port_options[0].req_fields
this.res_solt_data = this.port_options[0].res_fields
this.req_solt_code_arr = this.port_options[0].req_fields_example
this.res_solt_code_arr = this.port_options[0].res_fields_example
});
this.port_options = temp_port_arr;
if (this.port_options[0]) {
this.port_select = this.port_options[0].value;
this.$set(
this.port_solt_arr[0],
"info",
this.port_options[0].value
);
this.$set(
this.port_solt_arr[1],
"info",
this.port_options[0].req_type
);
this.$set(
this.port_solt_arr[2],
"info",
this.port_options[0].encode_method
);
this.req_solt_data = this.port_options[0].req_fields;
this.res_solt_data = this.port_options[0].res_fields;
this.req_solt_code_arr = this.port_options[0].req_fields_example;
this.res_solt_code_arr = this.port_options[0].res_fields_example;
}
}else{
this.process_in_up = false
} else {
this.process_in_up = false;
}
if(data.service_data_type_1 == 10){
this.perception_in = true
this.$set(this.perception_solt_arr[0],'info',data.doc_file.split('/')[data.doc_file.split('/').length-1])
this.$set(this.perception_solt_arr[1],'info',data.urls[0].req_url)
this.$set(this.perception_solt_arr[2],'info',data.urls[0].encode_method)
this.req_solt_data = data.urls[0].req_fields
this.res_solt_data = data.urls[0].res_fields
this.req_solt_code_arr = data.urls[0].req_fields_example
this.res_solt_code_arr = data.urls[0].res_fields_example
}else{
this.perception_in = false
if (data.service_data_type_1 == 10) {
this.perception_in = true;
this.$set(
this.perception_solt_arr[0],
"info",
data.doc_file.split("/")[data.doc_file.split("/").length - 1]
);
this.$set(
this.perception_solt_arr[1],
"info",
data.urls[0].req_url
);
this.$set(
this.perception_solt_arr[2],
"info",
data.urls[0].encode_method
);
this.req_solt_data = data.urls[0].req_fields;
this.res_solt_data = data.urls[0].res_fields;
this.req_solt_code_arr = data.urls[0].req_fields_example;
this.res_solt_code_arr = data.urls[0].res_fields_example;
} else {
this.perception_in = false;
}
if(this.service_apply_type==1){
if (data.service_apply_info.spcs_type == 1) {
this.$set(this.service_header_arr["first"][2], "text", "不限时长");
this.$set(
this.service_header_arr["first"][2],
this.service_header_arr["first"][3],
"text",
data.service_apply_info.service_end_time == "0001-01-01T00:00:00Z"
? "-"
: data.service_apply_info.service_end_time
.replace("T", " ")
.split("+")[0]
data.service_apply_info.spcs_count
);
this.$set(this.service_header_arr["first"][2],'name','可调用次数')
}else{
} else {
this.$set(
this.service_header_arr["first"][2],
"text",
data.service_apply_info.service_end_time == "0001-01-01T00:00:00Z"
? "-"
: data.service_apply_info.service_end_time
.replace("T", " ")
data.service_apply_info.service_end_time
.replace(/T|Z/g, " ")
.split("+")[0]
);
this.$set(this.service_header_arr["first"][3], "text", "不限次数");
}
if(this.process_in_up){
var temp_sj = this.service_header_arr.first.pop()
this.service_header_arr.second = []
this.service_header_arr.second.push(temp_sj)
if (this.process_in_up) {
var temp_sj = this.service_header_arr.first.pop();
this.service_header_arr.second = [];
this.service_header_arr.second.push(temp_sj);
}
this.$set(this.list_arr[0], "info", data.descript);
this.$set(this.list_arr[1], "info", data.data_service_type2_name);
......@@ -857,16 +926,17 @@ export default {
"url",
data.service_apply_info.apply_file
);
this.$set(
this.apply_arr[6],
"info",
"访问次数:" +
data.service_apply_info.request_spcs.pv +
"/日," +
"访问量:" +
data.service_apply_info.request_spcs.count +
"/日"
);
let spcs = "";
if (data.service_apply_info.spcs_type === 1) {
spcs = `${data.service_apply_info.single_money}金币/${data.service_apply_info.spcs_count}次`;
} else {
spcs = `${data.service_apply_info.single_money}金币/${
data.service_apply_info.duration_unit == 1 ? "" : ""
}`;
}
this.$set(this.apply_arr[6], "info", spcs);
this.$set(
this.apply_arr[7],
"info",
......@@ -876,7 +946,9 @@ export default {
this.$set(
this.apply_arr[8],
"info",
data.service_apply_info.apply_time.replace("T", " ").split("+")[0]
data.service_apply_info.apply_time
.replace(/T|Z/g, " ")
.split("+")[0]
);
this.$set(
this.apply_arr[9],
......@@ -938,7 +1010,7 @@ export default {
}
this.res_data = JSON.parse(data.res_fields);
})
.catch(function (response) {});
.catch(function(response) {});
},
},
};
......
......@@ -417,14 +417,16 @@
class="reset"
v-if="activeBtn == 0 && resSuccess"
@click="resetSjfw"
>重置</el-button
>
重置
</el-button>
<el-button
:disabled="!resSuccess"
:class="resSuccess ? 'next' : ''"
@click="nextJcxx"
>下一步</el-button
>
下一步
</el-button>
</div>
</block-radius>
<div v-if="activeBtn == 4 && zhyyVal == 24">
......@@ -1058,6 +1060,7 @@ export default {
this.jkwds = [];
},
getUrl(enUrl) {
enUrl = enUrl.replace(/\s*/g, "");
let url = decodeURI(enUrl);
let arr = [];
if (url.indexOf("?") != -1) {
......@@ -1226,6 +1229,15 @@ export default {
) {
if (this.jkwds.length == 0) {
this.$message.error("请上传接口文档");
} else {
if (
this.activeBtn == 2 ||
(this.activeBtn == 4 && this.zhyyVal == 22)
) {
this.request_fields = [];
this.response_fields = [];
this.jcxxtx = true;
this.getOrganization();
} else {
let requestData = this.$refs.fwcs_sjfw_qqcs.getTableData();
let responseData = this.$refs.fwcs_sjfw_fhcs.getTableData();
......@@ -1244,6 +1256,7 @@ export default {
this.$message.error("请完善返回参数信息中的字段名称");
}
}
}
} else {
let requestData = this.$refs.fwcs_sjfw_qqcs.getTableData();
let responseData = this.$refs.fwcs_sjfw_fhcs.getTableData();
......@@ -1343,13 +1356,22 @@ export default {
data_service_type1: 6,
data_service_type2: this.skfwQqt,
encode_method: this.form.code,
portal_id: this.portal_id,
doc_file: "",
urls: [
{
name: "",
response_type: "JSON",
req_auth_mthod: 0,
req_auth_token: "",
method: "GET",
url: this.serviceUrl,
request_fields: [],
request_query_fields: [],
response_fields: [],
content_type: "json",
portal_id: this.portal_id,
content_type: "JSON",
},
],
};
} else if (this.is_map == 4) {
query = {
......@@ -1362,13 +1384,21 @@ export default {
data_service_type1: 21,
data_service_type2: 34,
encode_method: this.form.code,
portal_id: this.portal_id,
urls: [
{
name: "",
response_type: "JSON",
req_auth_mthod: 0,
req_auth_token: "",
method: "GET",
url: this.serviceUrl,
request_fields: [],
request_query_fields: [],
response_fields: [],
content_type: "json",
portal_id: this.portal_id,
content_type: "JSON",
},
],
};
}
this.$api.workbench.serviceAdd(query).then((response) => {
......@@ -1429,7 +1459,10 @@ export default {
registePt() {
this.$refs.form.validate((valid) => {
if (valid) {
if ((this.activeBtn == 2 && this.jkwds.length == 0) || (this.activeBtn == 3 && this.jkwds.length == 0)) {
if (
(this.activeBtn == 2 && this.jkwds.length == 0) ||
(this.activeBtn == 3 && this.jkwds.length == 0)
) {
this.$message.error("请上传接口文档");
} else {
if (this.cover.length != 0) {
......@@ -1437,7 +1470,11 @@ export default {
if (this.activeBtn == 1 && !this.is_portal) {
this.addPortalItem();
} else {
if (this.activeBtn == 0 || this.activeBtn == 2 || this.activeBtn == 3) {
if (
this.activeBtn == 0 ||
this.activeBtn == 2 ||
this.activeBtn == 3
) {
contentType = this.sjfwQqt;
} else if (this.activeBtn == 4) {
if (this.activeZh == "1") {
......@@ -1840,6 +1877,7 @@ export default {
});
},
getUrlOne(enUrl, indexOne) {
enUrl = enUrl.replace(/\s*/g, "");
let url = decodeURI(enUrl);
let arr = [];
if (url.indexOf("?") != -1) {
......
......@@ -11,6 +11,9 @@ Router.prototype.push = function push(location, onResolve, onReject) {
};
export default new Router({
scrollBehavior (to, from, savedPosition) {
return { x: 0, y: 0 }
},
routes: [
{
path: "/",
......
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