Commit e54212db authored by 张俊's avatar 张俊

应ç”合并

parents 06a84822 9b53e9f0
<template> <template>
<el-upload <el-upload
ref="upload"
drag drag
action="/apaas/static/file/upload" action="/apaas/static/file/upload"
:data="{ :data="{
...@@ -34,6 +35,11 @@ export default { ...@@ -34,6 +35,11 @@ export default {
default: "", default: "",
}, },
}, },
data() {
return {
preUrl: "",
};
},
computed: { computed: {
fileList() { fileList() {
let list = []; let list = [];
...@@ -68,6 +74,7 @@ export default { ...@@ -68,6 +74,7 @@ export default {
const filtType = this.getFileType(file.name); const filtType = this.getFileType(file.name);
if (filtType === "rar" || filtType === "zip") { if (filtType === "rar" || filtType === "zip") {
this.preUrl = this.url;
return true; return true;
} else { } else {
this.$message.error("仅支持rar和zip格式!"); this.$message.error("仅支持rar和zip格式!");
...@@ -76,6 +83,21 @@ export default { ...@@ -76,6 +83,21 @@ export default {
}, },
uploadSuccess({ data }) { uploadSuccess({ data }) {
this.$emit("change", data); this.$emit("change", data);
// 替换文件后要把旧文件删除掉
if (this.preUrl) {
this.$http
.delete("/apaas/static/file/delete", {
params: {
url: this.preUrl,
},
})
.then(({ data }) => {
if (data.success === 1) {
this.preUrl = "";
}
});
}
}, },
}, },
}; };
......
...@@ -65,7 +65,9 @@ export default { ...@@ -65,7 +65,9 @@ export default {
}, },
methods: { methods: {
translate() { translate() {
let content = this.richText; let content = this.richText || "";
if (content) {
let titles = let titles =
content.match( content.match(
/<h1(([\s\S])*?)<\/h1>|<h2(([\s\S])*?)<\/h2>|<h3(([\s\S])*?)<\/h3>/g /<h1(([\s\S])*?)<\/h1>|<h2(([\s\S])*?)<\/h2>|<h3(([\s\S])*?)<\/h3>/g
...@@ -116,6 +118,7 @@ export default { ...@@ -116,6 +118,7 @@ export default {
this.content = content; this.content = content;
this.navTree = newTitles; this.navTree = newTitles;
this.curNav = (newTitles[0] && newTitles[0].id) || ""; this.curNav = (newTitles[0] && newTitles[0].id) || "";
}
}, },
clickNav(item) { clickNav(item) {
let target = document.querySelector(`#${item.id}`); let target = document.querySelector(`#${item.id}`);
......
...@@ -71,14 +71,22 @@ ...@@ -71,14 +71,22 @@
</el-col> </el-col>
<el-col :span="5" class="cell_specification"> <el-col :span="5" class="cell_specification">
<div v-if="cellItem.order_type == 1"> <div v-if="cellItem.order_type == 1">
<div>计次收费:200金币/1000次.时长收费:2000金币/月</div> <div>
{{ cellItem.spec_type == 1 ? "计次收费" : "时长收费" }}
{{ cellItem.single_money }}金币/
{{ cellItem.spec_type == 1 ? cellItem.spec_count + "" : "" }}
</div>
</div> </div>
<div v-else-if="cellItem.order_type == 2"> <div v-else-if="cellItem.order_type == 2">
<div> <div>
{{ {{
cellItem.spec_app == 0 cellItem.spec_app == 0
? "申请获取应用镜像部署权限:2000金币/月" ? "申请获取应用镜像部署权限:" +
: "申请获取应用镜像开发权限:2000金币/月" cellItem.single_money +
"金币/月"
: "申请获取应用镜像开发权限:" +
cellItem.single_money +
"金币/月"
}} }}
</div> </div>
</div> </div>
...@@ -133,13 +141,17 @@ ...@@ -133,13 +141,17 @@
</el-col> </el-col>
<el-col :span="3" class="cell_specification"> <el-col :span="3" class="cell_specification">
<div> <div>
不限时长 {{
cellItem.duration != 0 && cellItem.duration_unit == 1
? cellItem.duration + "个月"
: cellItem.duration != 0 && cellItem.duration_unit == 2
? cellItem.duration + ""
: "不限时长"
}}
</div> </div>
</el-col> </el-col>
<el-col :span="3" class="cell_specification"> <el-col :span="3" class="cell_specification">
<div> <div>{{ cellItem.total_money }}金币</div>
200金币
</div>
</el-col> </el-col>
<el-col :span="3" class="approval_status"> <el-col :span="3" class="approval_status">
<div> <div>
......
...@@ -34,17 +34,33 @@ ...@@ -34,17 +34,33 @@
<span v-text="data.create_date"></span> <span v-text="data.create_date"></span>
</li> </li>
</ul> </ul>
<div class="and_wid">
<div class="dbn_wkdn">
&nbsp;&nbsp;格:
<span class="ndwa_indowa"> {{ data.price * duration }} </span>
<span class="kfdf_jffa">金币</span>
</div>
<div class="nmd_kwd">
月售:
<span class="ndwa_dn"> {{ data.sale }}</span>
<img src="@/assets/imgs/shop_ic_star.png" class="dwin_diwa" />
<span class="dn_wjd"> {{ data.star }} </span>
</div>
</div>
<div class="commodity_information"> <div class="commodity_information">
<span>&emsp;&emsp;格:</span> <span>&emsp;&emsp;格:</span>
<div class="btn_container_ddaw">
{{ data.price }} 金币/月
</div>
</div>
<div class="commodity_information">
<span>购买时长:</span>
<div class="btn_container"> <div class="btn_container">
<el-button <el-input-number
v-for="(item, index) in specifications" v-model="duration"
:key="'specifications_' + index" :min="1"
:type="item.value === specificationID ? 'primary' : 'default'" :disabled="actionDisabled"
@click="changeSpecification(item)" ></el-input-number>
>
{{ item.name }}
</el-button>
</div> </div>
</div> </div>
<div class="commodity_action"> <div class="commodity_action">
...@@ -80,7 +96,13 @@ export default { ...@@ -80,7 +96,13 @@ export default {
}, },
], ],
specificationID: 1, specificationID: 1,
duration: 1,
}), }),
computed: {
actionDisabled() {
return this.specifications.length == 0;
},
},
methods: { methods: {
changeSpecification({ value }) { changeSpecification({ value }) {
this.specificationID = value; this.specificationID = value;
...@@ -244,6 +266,10 @@ export default { ...@@ -244,6 +266,10 @@ export default {
.commodity_information > .btn_container > .el-input-number { .commodity_information > .btn_container > .el-input-number {
margin: 0 20px 15px 0; margin: 0 20px 15px 0;
} }
.btn_container_ddaw {
line-height: 40px;
margin-left: 5px;
}
.commodity_action { .commodity_action {
margin-top: 60px; margin-top: 60px;
text-align: right; text-align: right;
...@@ -253,6 +279,55 @@ export default { ...@@ -253,6 +279,55 @@ export default {
margin-left: 20px; margin-left: 20px;
font-size: 16px; font-size: 16px;
} }
.and_wid {
background-color: #f9fafc;
border-radius: 8px;
padding: 20px;
display: flex;
justify-content: space-between;
margin-top: 20px;
align-items: center;
}
.dbn_wkdn {
color: #8890a7;
font-size: 14px;
}
.ndwa_indowa {
color: #e56600;
font-size: 26px;
font-weight: bold;
}
.kfdf_jffa {
color: #e56600;
font-size: 14px;
}
.nmd_kwd {
color: #8890a7;
}
.ndwa_dn {
color: #242c43;
}
.dn_wjd {
color: #ea7d19;
font-size: 18px;
position: relative;
}
.dwin_diwa {
width: 14px;
height: 14px;
margin-left: 20px;
margin-right: 4px;
position: relative;
}
.dn_wjd::after {
content: "";
position: absolute;
width: 2px;
height: 16px;
background-color: #e3e5ef;
top: 5px;
left: -35px;
}
</style> </style>
<style> <style>
......
...@@ -18,13 +18,21 @@ ...@@ -18,13 +18,21 @@
</div> </div>
<div class="main_container"> <div class="main_container">
<div class="main_container-left" v-if="data.cover"> <div class="main_container-left" v-if="data.cover">
<img :src="data.cover" width="100%" v-if="data.type!=='workflow'" /> <img :src="data.cover" width="100%" v-if="data.type !== 'workflow'" />
<workflows-view :zoom="0.6" :id="parseInt(data.workflows_id)" :hideDetail="true" v-if="data.type=='workflow'"></workflows-view> <workflows-view
:zoom="0.6"
:id="parseInt(data.workflows_id)"
:hideDetail="true"
v-if="data.type == 'workflow'"
></workflows-view>
<map-view <map-view
v-if="data.type === 'Map Service'" v-if="data.type === 'Map Service'"
:id="data.portal_id" :id="data.portal_id"
></map-view> ></map-view>
<process-view :id="parseInt(data.workflows_id)" v-if="data.type=='workflow'"></process-view> <process-view
:id="parseInt(data.workflows_id)"
v-if="data.type == 'workflow'"
></process-view>
</div> </div>
<div class="main_container-right"> <div class="main_container-right">
<ul class="service_base_info"> <ul class="service_base_info">
...@@ -53,54 +61,89 @@ ...@@ -53,54 +61,89 @@
<span v-text="data.descript"></span> <span v-text="data.descript"></span>
</li> </li>
</ul> </ul>
<div class="and_wid">
<div class="dbn_wkdn">
&nbsp;&nbsp;格:<span class="ndwa_indowa">
{{
specification && specification.money
? specification.money * (showTime ? duration : 1)
: 0
}}
</span>
<span class="kfdf_jffa">金币</span>
</div>
<div class="nmd_kwd">
月售:<span class="ndwa_dn">{{ data.month_sale }}</span
><img src="@/assets/imgs/shop_ic_star.png" class="dwin_diwa" />
<span class="dn_wjd">{{ data.scoreDetail.avgScore }}</span>
</div>
</div>
<div class="commodity_information"> <div class="commodity_information">
<span>&emsp;&emsp;格:</span> <span>计次收费规格:</span>
<span v-if="actionDisabled" class="commodity_text">暂无</span> <span
v-if="
data.serviceRequestSpcs.spcs_type_1 &&
data.serviceRequestSpcs.spcs_type_1.length == 0
"
class="commodity_text"
>暂无</span
>
<div v-else class="btn_container"> <div v-else class="btn_container">
<el-button <el-button
v-for="(item, index) in specifications" v-for="(item, index) in data.serviceRequestSpcs.spcs_type_1"
:key="'spcs_' + index" :key="'spcs_' + index"
:type="item.id === specification.id ? 'primary' : 'default'" :type="item.id === specification.id ? 'primary' : 'default'"
@click="changeSpecification(item)" @click="changeSpecification(item, 0)"
> >
{{ item.name }} {{ item.money }}金币/{{ item.spcs_count }}
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="commodity_information"> <div class="commodity_information">
<span>规格说明:</span> <span>时长收费规格:</span>
<span v-if="actionDisabled" class="commodity_text">暂无</span>
<span <span
v-else v-if="
data.serviceRequestSpcs.spcs_type_2 &&
data.serviceRequestSpcs.spcs_type_2.length == 0
"
class="commodity_text" class="commodity_text"
v-text="(specification && specification.descript) || '-'" >暂无</span
></span> >
</div>
<div class="commodity_information">
<span>购买方式:</span>
<span v-if="actionDisabled" class="commodity_text">暂无</span>
<div v-else class="btn_container"> <div v-else class="btn_container">
<el-button <el-button
v-for="(item, index) in types" v-for="(item, index) in data.serviceRequestSpcs.spcs_type_2"
v-text="item.name" :key="'spcs_' + index"
:key="'type_' + index" :type="item.id === specification.id ? 'primary' : 'default'"
:type="item.value === type ? 'primary' : 'default'" @click="changeSpecification(item, 1)"
@click="changeType(item)"
> >
{{ item.money }}金币/月
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="commodity_information">
<span>规格说明:</span>
<span v-if="actionDisabled" class="commodity_text">暂无</span>
<span
v-else
class="commodity_text"
v-text="(specification && specification.descript) || '-'"
></span>
</div>
<div class="commodity_information"> <div class="commodity_information">
<span>购买时长:</span> <span>购买时长:</span>
<div class="btn_container"> <div v-if="showTime" class="btn_container">
<el-input-number <el-input-number
v-model="duration" v-model="duration"
:min="1" :min="1"
:disabled="actionDisabled" :disabled="actionDisabled"
></el-input-number> ></el-input-number>
</div>
<div v-else class="btn_container">
<el-button type="primary"> 不限时长 </el-button>
</div> </div>
</div> </div>
<div class=" commodity_action"> <div class="commodity_action">
<el-button <el-button
type="warning" type="warning"
plain plain
...@@ -125,14 +168,14 @@ ...@@ -125,14 +168,14 @@
<script> <script>
import helper from "@/services/helper.js"; import helper from "@/services/helper.js";
import MapView from "./map-view"; import MapView from "./map-view";
import workflowsView from '@/components/work-flow/workflows-view' import workflowsView from "@/components/work-flow/workflows-view";
import processView from '@/components/service-info/process-view' import processView from "@/components/service-info/process-view";
export default { export default {
components: { components: {
MapView, MapView,
workflowsView, workflowsView,
processView processView,
}, },
props: { props: {
data: { data: {
...@@ -145,39 +188,29 @@ export default { ...@@ -145,39 +188,29 @@ export default {
type: 0, // 购买方式 1:按月,2:按年 type: 0, // 购买方式 1:按月,2:按年
specification: {}, // 规格 specification: {}, // 规格
duration: 1, // 时长 duration: 1, // 时长
showTime: false,
}), }),
computed: { computed: {
specifications() {
let specifications = (this.data.serviceRequestSpcs || []).filter(
(item) => item.type == this.type || item.type == 3
);
return specifications;
},
actionDisabled() { actionDisabled() {
return this.specifications.length == 0; let a = this.data.serviceRequestSpcs;
}, return a.spcs_type_1.length == 0 && a.spcs_type_2.length == 0;
},
watch: {
specifications: {
handler() {
this.specification = this.specifications[0];
},
deep: true,
}, },
}, },
watch: {},
methods: { methods: {
dateTransform(datestr = "") { dateTransform(datestr = "") {
return helper.dateStringTransform(datestr); return helper.dateStringTransform(datestr);
}, },
changeSpecification(specification) { changeSpecification(specification, type) {
this.specification = specification; this.specification = specification;
if (type == 0) {
this.showTime = false;
} else if (type == 1) {
this.showTime = true;
}
}, },
changeType({ value }) { changeType({ value }) {
this.type = value; this.type = value;
if (this.specifications.length > 0) {
this.specification = this.specifications[0];
}
}, },
addToCart() { addToCart() {
// console.log("addToCart"); // console.log("addToCart");
...@@ -261,8 +294,10 @@ export default { ...@@ -261,8 +294,10 @@ export default {
} }
// 初始化规格 // 初始化规格
if (this.specifications.length > 0) { if (this.data.serviceRequestSpcs.spcs_type_1.length > 0) {
this.specification = this.specifications[0]; this.specification = this.data.serviceRequestSpcs.spcs_type_1[0];
} else if (this.data.serviceRequestSpcs.spcs_type_2.length > 0) {
this.specification = this.data.serviceRequestSpcs.spcs_type_2[0];
} }
}, },
}; };
...@@ -408,6 +443,55 @@ export default { ...@@ -408,6 +443,55 @@ export default {
margin-left: 20px; margin-left: 20px;
font-size: 16px; font-size: 16px;
} }
.and_wid {
background-color: #f9fafc;
border-radius: 8px;
padding: 20px;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
}
.dbn_wkdn {
color: #8890a7;
font-size: 14px;
}
.ndwa_indowa {
color: #e56600;
font-size: 26px;
font-weight: bold;
}
.kfdf_jffa {
color: #e56600;
font-size: 14px;
}
.nmd_kwd {
color: #8890a7;
}
.ndwa_dn {
color: #242c43;
}
.dn_wjd {
color: #ea7d19;
font-size: 18px;
position: relative;
}
.dwin_diwa {
width: 14px;
height: 14px;
margin-left: 20px;
margin-right: 4px;
position: relative;
}
.dn_wjd::after {
content: "";
position: absolute;
width: 2px;
height: 16px;
background-color: #e3e5ef;
top: 5px;
left: -35px;
}
</style> </style>
<style> <style>
......
...@@ -53,12 +53,12 @@ export default { ...@@ -53,12 +53,12 @@ export default {
if (response.data.success == 1) { if (response.data.success == 1) {
let arr = response.data.data[0].Child; let arr = response.data.data[0].Child;
let shopArr = []; let shopArr = [];
arr.forEach((item) => { let asd = arr.find(item => {
if (item.visit_url == "/services_shop") { return item.visit_url == "/services_shop"
shopArr = item.Child; })
} shopArr = asd.Child;
}); if (shopArr && shopArr.length != 0) {
shopArr.forEach((item) => { Array.from(shopArr).forEach((item) => {
let uri = item.visit_url.substring(6); let uri = item.visit_url.substring(6);
if (uri.indexOf("/") != -1) { if (uri.indexOf("/") != -1) {
uri = uri.substring(0, uri.indexOf("/")); uri = uri.substring(0, uri.indexOf("/"));
...@@ -98,6 +98,7 @@ export default { ...@@ -98,6 +98,7 @@ export default {
break; break;
} }
}); });
}
this.menuList = shopArr; this.menuList = shopArr;
} }
}); });
......
...@@ -163,11 +163,11 @@ export default { ...@@ -163,11 +163,11 @@ export default {
height: 116px; height: 116px;
float: left; float: left;
background-size: contain; background-size: contain;
margin-right: 20px; margin-right: 15px;
} }
.info { .info {
float: left; float: left;
width: 270px; width: 230px;
} }
.info p { .info p {
color: rgba(136, 144, 167, 1); color: rgba(136, 144, 167, 1);
......
...@@ -79,5 +79,4 @@ export default { ...@@ -79,5 +79,4 @@ export default {
.list_title span:nth-of-type(4){ .list_title span:nth-of-type(4){
margin-right: 124px; margin-right: 124px;
} }
</style> </style>
This diff is collapsed.
...@@ -2,43 +2,74 @@ ...@@ -2,43 +2,74 @@
<div class="shopping_cell"> <div class="shopping_cell">
<el-row class="shopping_cell_row"> <el-row class="shopping_cell_row">
<el-col :span="2" class="shopping_cell_check"> <el-col :span="2" class="shopping_cell_check">
<el-checkbox v-if="!readOnly" v-model="checkedItem" @change="getState"></el-checkbox> <el-checkbox
v-if="!readOnly"
v-model="checkedItem"
@change="getState"
></el-checkbox>
<div v-else class="shopping_cell_expired"> <div v-else class="shopping_cell_expired">
<span>已下架</span> <span>已下架</span>
</div> </div>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="8">
<div class="shopping_cell_item"> <div class="shopping_cell_item">
<img <img
:src="cellIsService ? cellItems.service.cover:cellItems.application.logo" :src="
cellIsService
? cellItems.service.cover
: cellItems.application.logo
"
class="shopping_cell_img" class="shopping_cell_img"
/> />
<div class="shopping_cell_msg"> <div class="shopping_cell_msg">
<div class="shopping_cell_name"> <div class="shopping_cell_name">
{{ cellIsService ? cellItems.service.name:cellItems.application.app_name }} {{
cellIsService
? cellItems.service.name
: cellItems.application.app_name
}}
<span <span
v-if="cellIsService && cellItems.service.data_service_type1_name == '时空服务'" v-if="
cellIsService &&
cellItems.service.data_service_type1_name == '时空服务'
"
class="tags map_service" class="tags map_service"
>mapService</span> >
<span v-if="cellIsService && cellItems.service.openness == 1" class="tags shared">共享</span> mapService
</span>
<span
v-if="cellIsService && cellItems.service.openness == 1"
class="tags shared"
>
共享
</span>
<span <span
v-else-if="cellIsService && cellItems.service.openness == 2" v-else-if="cellIsService && cellItems.service.openness == 2"
class="tags restricted" class="tags restricted"
>受限</span> >
受限
</span>
<span <span
v-else-if="cellIsService && cellItems.service.openness == 3" v-else-if="cellIsService && cellItems.service.openness == 3"
class="tags sensitive" class="tags sensitive"
>敏感</span> >
敏感
</span>
</div> </div>
<div class="shopping_cell_msg_other"> <div class="shopping_cell_msg_other">
<div <div v-if="cellIsService" class="shopping_cell_type">
v-if="cellIsService" {{ cellItems.service.sectors_name }}
class="shopping_cell_type" </div>
>{{ cellItems.service.sectors_name }}</div> <div v-else class="shopping_cell_type">
<div v-else class="shopping_cell_type">{{ cellItems.application.ywly_name }}</div> {{ cellItems.application.ywly_name }}
<div </div>
class="shopping_cell_creator" <div class="shopping_cell_creator">
>{{ cellIsService ? cellItems.service.organization_name:cellItems.application.org_name }}</div> {{
cellIsService
? cellItems.service.organization_name
: cellItems.application.org_name
}}
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -46,11 +77,9 @@ ...@@ -46,11 +77,9 @@
<el-col :span="5"> <el-col :span="5">
<div class="shopping_cell_specification"> <div class="shopping_cell_specification">
<div class="shopping_cell_specification_val"> <div class="shopping_cell_specification_val">
<div class="shopping_cell_specification_val_specification">规格:{{ getSpecification }}</div> <div class="shopping_cell_specification_val_specification">
<div 计次收费:{{ getSpecification }}
class="shopping_cell_specification_val_type" </div>
v-if="cellIsService"
>申请方式:{{ 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"
...@@ -62,21 +91,34 @@ ...@@ -62,21 +91,34 @@
<div v-if="cellIsService"> <div v-if="cellIsService">
<div class="shopping_cell_specification_title">规格:</div> <div class="shopping_cell_specification_title">规格:</div>
<div <div
v-if="cellItems.service.request_spcs_info && cellItems.service.request_spcs_info.length != 0" v-if="
cellItems.service.request_spcs_info &&
cellItems.service.request_spcs_info.length != 0
"
> >
<el-button <el-button
v-for="(item, index) in cellItems.service.request_spcs_info" v-for="(item, index) in cellItems.service
.request_spcs_info"
:key="'specification' + index" :key="'specification' + index"
:class="specificationPop == item.id ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'" :class="
specificationPop == item.id
? 'shopping_cell_specification_btn active'
: 'shopping_cell_specification_btn'
"
size="mini" size="mini"
@click="changeSpecification(item.id)" @click="changeSpecification(item.id)"
> >
{{ index + 1 + ". " + "访问次数:" + {{
index +
1 +
". " +
"访问次数:" +
item.pv + item.pv +
"/日," + "/日," +
"访问量:" + "访问量:" +
item.count + item.count +
"/日" }} "/日"
}}
</el-button> </el-button>
</div> </div>
<div class="no_option" v-else>暂无规格</div> <div class="no_option" v-else>暂无规格</div>
...@@ -87,22 +129,18 @@ ...@@ -87,22 +129,18 @@
<el-button <el-button
v-for="(item, index) in appSpecificationBtns" v-for="(item, index) in appSpecificationBtns"
:key="'specification' + index" :key="'specification' + index"
:class="specificationPop == item.id ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'" :class="
specificationPop == item.id
? 'shopping_cell_specification_btn active'
: 'shopping_cell_specification_btn'
"
size="mini" size="mini"
@click="changeSpecification(item.id)" @click="changeSpecification(item)"
>{{ index + 1 + ". " + item.value }}</el-button> >
{{ index + 1 + ". " + item.value }}
</el-button>
</div> </div>
</div> </div>
<div v-if="cellIsService" class="shopping_cell_specification_title">申请方式:</div>
<div v-if="cellIsService">
<el-button
v-for="(item, index) in specificationApplicationBtns"
:key="'specification' + index"
:class="specificationApplicationPop == item.id ? 'shopping_cell_specification_btn active' : 'shopping_cell_specification_btn'"
size="mini"
@click="changeSpecificationApplication(item.id)"
>{{ item.value }}购买</el-button>
</div>
</div> </div>
<div class="pop_footer"> <div class="pop_footer">
<el-button <el-button
...@@ -110,12 +148,16 @@ ...@@ -110,12 +148,16 @@
size="mini" size="mini"
type="text" type="text"
@click="visible = false" @click="visible = false"
>取消</el-button> >
取消
</el-button>
<el-button <el-button
class="shopping_cell_specification_submit" class="shopping_cell_specification_submit"
size="mini" size="mini"
@click="submitPop" @click="submitPop"
>确定</el-button> >
确定
</el-button>
</div> </div>
<el-button v-if="!readOnly" circle size="mini" slot="reference"> <el-button v-if="!readOnly" circle size="mini" slot="reference">
<img :src="specificationEdit" /> <img :src="specificationEdit" />
...@@ -126,18 +168,8 @@ ...@@ -126,18 +168,8 @@
</div> </div>
</el-col> </el-col>
<el-col :span="3" class="shopping_cell_num"> <el-col :span="3" class="shopping_cell_num">
<div v-if="cellIsService"> <div v-if="cellIsService && specificationPop.spec_type == 1">不限时长</div>
<el-input-number <div v-else>
:disabled="readOnly"
v-model="cellItems.duration"
@change="changeNum"
size="mini"
:min="1"
></el-input-number>
</div>
</el-col>
<el-col :span="2" class="shopping_cell_num">
<div v-if="cellIsService">
<el-input-number <el-input-number
:disabled="readOnly" :disabled="readOnly"
v-model="cellItems.duration" v-model="cellItems.duration"
...@@ -146,13 +178,17 @@ ...@@ -146,13 +178,17 @@
:min="1" :min="1"
></el-input-number> ></el-input-number>
</div> </div>
</el-col> </el-col>
<el-col :span="3" class="shopping_cell_num"> 200000000金币 </el-col>
<el-col :span="3" class="shopping_cell_options"> <el-col :span="3" class="shopping_cell_options">
<el-checkbox <el-checkbox
v-if="!readOnly" v-if="!readOnly"
v-model="cellItems.is_subscribe" v-model="cellItems.is_subscribe"
@change="changeSubscription" @change="changeSubscription"
>订阅该服务</el-checkbox> >
订阅该服务
</el-checkbox>
<div class="shopping_cell_options_del"> <div class="shopping_cell_options_del">
<el-button @click="delCellItem" size="mini">删除</el-button> <el-button @click="delCellItem" size="mini">删除</el-button>
</div> </div>
......
...@@ -4,12 +4,14 @@ ...@@ -4,12 +4,14 @@
<div class="shopping_all_head"> <div class="shopping_all_head">
<el-row> <el-row>
<el-col :span="2" class="shopping_all_head_item"> <el-col :span="2" class="shopping_all_head_item">
<el-checkbox v-model="checkShopAll" @change="checkAll">全选</el-checkbox> <el-checkbox v-model="checkShopAll" @change="checkAll"
>全选</el-checkbox
>
</el-col> </el-col>
<el-col :span="9" class="shopping_all_head_item">服务信息</el-col> <el-col :span="8" class="shopping_all_head_item">服务信息</el-col>
<el-col :span="5" class="shopping_all_head_item">规格</el-col> <el-col :span="5" class="shopping_all_head_item">规格</el-col>
<el-col :span="3" class="shopping_all_head_item">购买时长</el-col> <el-col :span="3" class="shopping_all_head_item">购买时长</el-col>
<el-col :span="2" class="shopping_all_head_item">小计</el-col> <el-col :span="3" class="shopping_all_head_item">小计</el-col>
<el-col :span="3" class="shopping_all_head_item">操作</el-col> <el-col :span="3" class="shopping_all_head_item">操作</el-col>
</el-row> </el-row>
</div> </div>
...@@ -40,31 +42,54 @@ ...@@ -40,31 +42,54 @@
<div class="shopping_cart_options"> <div class="shopping_cart_options">
<el-row> <el-row>
<el-col :span="2" class="shopping_cart_options_cell"> <el-col :span="2" class="shopping_cart_options_cell">
<el-checkbox v-model="checkShopAll" @change="checkAll">全选</el-checkbox> <el-checkbox v-model="checkShopAll" @change="checkAll"
>全选</el-checkbox
>
</el-col> </el-col>
<el-col :span="3" class="shopping_cart_options_del"> <el-col :span="3" class="shopping_cart_options_del">
<span v-if="getNum == 0" class="shopping_cart_options_del_service">删除选中服务</span> <span v-if="getNum == 0" class="shopping_cart_options_del_service"
>删除选中服务</span
>
<span <span
v-else v-else
@click="delSelectService" @click="delSelectService"
class="shopping_cart_options_del_service_act" class="shopping_cart_options_del_service_act"
>删除选中服务</span> >删除选中服务</span
>
</el-col> </el-col>
<el-col :span="15" class="shopping_cart_options_num"> <el-col :span="15" class="shopping_cart_options_num">
<div class="fyzj">
<p class="fyzj_p">
<span v-if="getSumCoin > 20000" class="yebz">
余额不足,请联系超级管理员进行充值
</span>
费用总计:<span class="fyzj_span">
{{ getSumCoin }}
</span>
<span class="fyzj_qian">金币</span>
</p>
<div class="ckfymx">
<p class="ckfymx_a">
{{ list.length }} 项服务,已选择 {{ list.length }} 项服务,已选择
<span>{{ getNum }}</span> <span class="dwa_djf">{{ getNum }}</span>
<span class="ckfymx_qian">账户余额:20,000 金币</span>
</p>
</div>
</div>
</el-col> </el-col>
<el-col :span="4" class="shopping_cart_options_cell"> <el-col :span="4" class="shopping_cart_options_cell">
<el-button <el-button
v-if="getNum == 0" v-if="getNum == 0"
:disabled="true" :disabled="true"
class="shopping_cart_options_cell_btn" class="shopping_cart_options_cell_btn"
>一键申请</el-button> >一键申请</el-button
>
<el-button <el-button
v-else v-else
@click="oneClickApplication" @click="oneClickApplication"
class="shopping_cart_options_cell_btn_act" class="shopping_cart_options_cell_btn_act"
>一键申请</el-button> >一键申请</el-button
>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -97,6 +122,15 @@ export default { ...@@ -97,6 +122,15 @@ export default {
); );
return num; return num;
}, },
getSumCoin() {
let sum = 0;
this.checkList.forEach((item, index) => {
if (item) {
sum += item.total_money;
}
});
return sum;
},
getCartState() { getCartState() {
return this.$store.state.cartState; return this.$store.state.cartState;
}, },
...@@ -129,7 +163,6 @@ export default { ...@@ -129,7 +163,6 @@ export default {
this.$refs.shoppingList.setAllState(val); this.$refs.shoppingList.setAllState(val);
}, },
changeState(val) { changeState(val) {
console.log(val);
this.$set(this.checkList, val.index, val.state); this.$set(this.checkList, val.index, val.state);
if (this.checkList.indexOf(false) == -1) { if (this.checkList.indexOf(false) == -1) {
this.checkShopAll = true; this.checkShopAll = true;
...@@ -236,7 +269,7 @@ export default { ...@@ -236,7 +269,7 @@ export default {
font-weight: 500; font-weight: 500;
color: #58617a; color: #58617a;
} }
.shopping_cart_options_num span { .dwa_djf {
color: #e56600; color: #e56600;
} }
.shopping_cart_options_cell_btn { .shopping_cart_options_cell_btn {
...@@ -262,6 +295,52 @@ export default { ...@@ -262,6 +295,52 @@ export default {
.shopping_list_page { .shopping_list_page {
padding: 10px 20px 0; padding: 10px 20px 0;
} }
.fyzj_item {
position: relative;
}
.fyzj {
color: #242c43;
font-size: 18px;
margin-right: 10px;
text-align: right;
position: relative;
top: 8px;
line-height: 26px;
}
.fyzj_p {
margin-bottom: 6px;
}
.fyzj_span {
color: #e56600;
font-size: 24px;
font-weight: bold;
}
.fyzj_qian {
color: #e56600;
font-size: 14px;
}
.ckfymx {
color: #58617a;
font-size: 14px;
}
.ckfymx_a {
color: #58617a;
}
.ckfymx_qian {
display: inline-block;
margin-left: 20px;
position: relative;
color: #a9aec0;
}
.ckfymx_qian::after {
content: "";
position: absolute;
width: 1px;
height: 16px;
background: #bcc1d0;
left: -10px;
top: 2px;
}
</style> </style>
<style> <style>
.shopping_cart_options_cell .el-checkbox { .shopping_cart_options_cell .el-checkbox {
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
:data="selectedTabsPage" :data="selectedTabsPage"
:size="size" :size="size"
:height="height" :height="height"
:max-height="maxheight"
:border="border" :border="border"
@select="select" @select="select"
@select-all="selectAll" @select-all="selectAll"
...@@ -204,6 +205,13 @@ ...@@ -204,6 +205,13 @@
<img src="@/assets/imgs/list_ic_hot.png" alt v-if="scope.row['hot']" /> <img src="@/assets/imgs/list_ic_hot.png" alt v-if="scope.row['hot']" />
{{ scope.row[item.prop] }} {{ scope.row[item.prop] }}
</span> </span>
<span
v-else-if="item.type === 'html'"
class="table_html"
v-html="
item.getHtml ? item.getHtml(scope.row) : scope.row[item.prop]
"
></span>
<!-- others --> <!-- others -->
<span v-else-if="item.type === 'click'" style="cursor: pointer;color: #274fee;" @click="gotopage(item.url,scope.row[item.id])">{{ scope.row[item.prop] }}</span> <span v-else-if="item.type === 'click'" style="cursor: pointer;color: #274fee;" @click="gotopage(item.url,scope.row[item.id])">{{ scope.row[item.prop] }}</span>
<span v-else>{{ scope.row[item.prop] }}</span> <span v-else>{{ scope.row[item.prop] }}</span>
...@@ -388,6 +396,10 @@ export default { ...@@ -388,6 +396,10 @@ export default {
params: { params: {
type: Object, type: Object,
default: () => {} default: () => {}
},
maxheight: {
type: [String, Number],
default: ""
} }
}, },
data() { data() {
......
...@@ -88,6 +88,7 @@ export default { ...@@ -88,6 +88,7 @@ export default {
], ],
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: specificationData, serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail,
}; };
this.detailData = [ this.detailData = [
......
<template> <template>
<div class="apply_container"> <div class="apply_container">
<info-list :list_arr="module_arr"> <info-list :list_arr="module_arr">
<apply-form :formInline="formInline" ref="apply_info" slot="apply_info"></apply-form> <apply-form
<service-list ref="apply_service" slot="apply_service" :service_arr="service_arr"></service-list> :formInline="formInline"
ref="apply_info"
slot="apply_info"
></apply-form>
<service-list
ref="apply_service"
slot="apply_service"
:service_arr="service_arr"
></service-list>
</info-list> </info-list>
<div class="footout"> <div class="footout">
...@@ -30,6 +38,17 @@ export default { ...@@ -30,6 +38,17 @@ export default {
applyForm, applyForm,
serviceList, serviceList,
}, },
computed: {
getSumCoin() {
let sum = 0;
this.service_arr.forEach((item, index) => {
if (item) {
sum += item.total_money;
}
});
return sum;
},
},
data() { data() {
return { return {
formInline: { formInline: {
...@@ -115,7 +134,6 @@ export default { ...@@ -115,7 +134,6 @@ export default {
}; };
}, },
watch: {}, watch: {},
computed: {},
created() { created() {
if (this.$route.query.service_id) { if (this.$route.query.service_id) {
this.get_one_service(this.$route.query); this.get_one_service(this.$route.query);
...@@ -437,6 +455,7 @@ export default { ...@@ -437,6 +455,7 @@ export default {
padding: 20px; padding: 20px;
text-align: right; text-align: right;
margin: 20px 0; margin: 20px 0;
position: relative;
} }
.applybtn { .applybtn {
color: rgba(252, 239, 214, 1); color: rgba(252, 239, 214, 1);
...@@ -449,6 +468,56 @@ export default { ...@@ -449,6 +468,56 @@ export default {
border-radius: 8px; border-radius: 8px;
margin-left: 20px; margin-left: 20px;
cursor: pointer; cursor: pointer;
position: absolute;
top: 20px;
right: 20px;
}
.fyzj_item {
position: relative;
}
.fyzj {
color: #242c43;
font-size: 18px;
margin-right: 10px;
text-align: right;
position: relative;
top: -8px;
right: 210px;
line-height: 26px;
}
.fyzj_p {
margin-bottom: 6px;
}
.fyzj_span {
color: #e56600;
font-size: 24px;
font-weight: bold;
}
.fyzj_qian {
color: #e56600;
font-size: 14px;
}
.ckfymx {
color: #58617a;
font-size: 14px;
}
.ckfymx_a {
color: #58617a;
}
.ckfymx_qian {
display: inline-block;
margin-left: 20px;
position: relative;
color: #a9aec0;
}
.ckfymx_qian::after {
content: "";
position: absolute;
width: 1px;
height: 16px;
background: #bcc1d0;
left: -10px;
top: 2px;
} }
.count_money{ .count_money{
float: right; float: right;
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
<service-tabs <service-tabs
:detail-data="detailData" :detail-data="detailData"
:specification-data="specificationData"
:provider-data="providerData" :provider-data="providerData"
:comments-data="commentsData" :comments-data="commentsData"
:comments-url="commentsUrl" :comments-url="commentsUrl"
...@@ -34,7 +33,6 @@ export default { ...@@ -34,7 +33,6 @@ export default {
data: () => ({ data: () => ({
baseInfo: null, baseInfo: null,
detailData: null, detailData: null,
specificationData: null,
providerData: null, providerData: null,
commentsData: null, commentsData: null,
}), }),
...@@ -56,18 +54,6 @@ export default { ...@@ -56,18 +54,6 @@ export default {
}) })
.then(({ data }) => { .then(({ data }) => {
let datas = data.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 = { this.baseInfo = {
service_id: this.id, service_id: this.id,
app_id: 0, app_id: 0,
...@@ -87,7 +73,8 @@ export default { ...@@ -87,7 +73,8 @@ export default {
datas.data_service_type3_name, datas.data_service_type3_name,
], ],
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: specificationData, serviceRequestSpcs: datas.serviceRequestSpcs,
scoreDetail: datas.scoreDetail,
}; };
this.detailData = [ this.detailData = [
...@@ -184,7 +171,6 @@ export default { ...@@ -184,7 +171,6 @@ export default {
}, },
}, },
]; ];
this.specificationData = specificationData;
this.providerData = { this.providerData = {
organization_name: datas.organization_name, organization_name: datas.organization_name,
picture_path: datas.organization_picture, picture_path: datas.organization_picture,
......
...@@ -94,6 +94,7 @@ export default { ...@@ -94,6 +94,7 @@ export default {
], ],
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: specificationData, serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail,
}; };
this.detailData = [ this.detailData = [
......
...@@ -55,9 +55,12 @@ export default { ...@@ -55,9 +55,12 @@ export default {
}, },
}) })
.then(({ data }) => { .then(({ data }) => {
this.$api.serviceShop.getExtendedInfo({ id: this.id }).then((response) => {
this.baseInfo = data.data; this.baseInfo = data.data;
this.baseInfo = Object.assign(this.baseInfo, response.data.data);
});
}) })
.catch(function(error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
...@@ -100,7 +103,7 @@ export default { ...@@ -100,7 +103,7 @@ export default {
); );
this.detailData = detailData; this.detailData = detailData;
}) })
.catch(function(error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
...@@ -114,7 +117,7 @@ export default { ...@@ -114,7 +117,7 @@ export default {
phone: data.data.phone, phone: data.data.phone,
}; };
}) })
.catch(function(error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
}, },
......
...@@ -89,6 +89,7 @@ export default { ...@@ -89,6 +89,7 @@ export default {
], ],
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: specificationData, serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail,
}; };
this.detailData = [ this.detailData = [
{ {
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
<el-breadcrumb-item to="/technical_support/doc_manage"> <el-breadcrumb-item to="/technical_support/doc_manage">
开发文档 开发文档
</el-breadcrumb-item> </el-breadcrumb-item>
<el-breadcrumb-item> <el-breadcrumb-item> 文档编辑 - {{ title }} </el-breadcrumb-item>
文档编辑 - {{ title }}
</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
...@@ -31,21 +29,26 @@ ...@@ -31,21 +29,26 @@
<script> <script>
import wangE from "@/components/wangE"; import wangE from "@/components/wangE";
export default { export default {
components: {
wangE,
},
data() { data() {
return { return {
title: "", title: "",
content: "", content: "",
}; };
}, },
components: { computed: {
wangE, id() {
return parseFloat(this.$route.params.id);
},
}, },
created() { created() {
if (this.$route.params.id) { if (this.id) {
this.$http this.$http
.get("/apaas/support/document/get", { .get("/apaas/support/document/get", {
params: { params: {
id: this.$route.params.id, id: this.id,
}, },
}) })
.then(({ data }) => { .then(({ data }) => {
...@@ -63,13 +66,13 @@ export default { ...@@ -63,13 +66,13 @@ export default {
submitAction() { submitAction() {
this.$http this.$http
.put("/apaas/support/document/put", { .put("/apaas/support/document/put", {
id: parseFloat(this.$route.params.id), id: this.id,
content: this.content, content: this.content,
}) })
.then(({ data }) => { .then(({ data }) => {
if (data.success === 1) { if (data.success === 1) {
this.$message.success("保存成功"); this.$message.success("保存成功");
this.$router.push("/technical_support/doc_manage") this.$router.push("/technical_support/doc_manage");
} else { } else {
this.$message.error(data.errMsg || "保存失败"); this.$message.error(data.errMsg || "保存失败");
} }
......
...@@ -250,7 +250,10 @@ export default { ...@@ -250,7 +250,10 @@ export default {
{ max: 20, message: "长度应小于20个字符", trigger: "change" }, { max: 20, message: "长度应小于20个字符", trigger: "change" },
], ],
}, },
detail: "", detail: {
title: "",
content: "",
},
deleteDialogInfo: { deleteDialogInfo: {
msg: "", msg: "",
submit: null, submit: null,
...@@ -269,6 +272,7 @@ export default { ...@@ -269,6 +272,7 @@ export default {
this.$http this.$http
.get("/apaas/support/document/list", { .get("/apaas/support/document/list", {
params: { params: {
search: fullFilter.name,
style: fullFilter.type, style: fullFilter.type,
start: fullFilter.time && fullFilter.time[0], start: fullFilter.time && fullFilter.time[0],
end: fullFilter.time && fullFilter.time[1], end: fullFilter.time && fullFilter.time[1],
...@@ -347,6 +351,7 @@ export default { ...@@ -347,6 +351,7 @@ export default {
style: 0, style: 0,
title: "", title: "",
}; };
this.$refs.addForm && this.$refs.addForm.clearValidate();
this.$refs.addDialog.show(); this.$refs.addDialog.show();
}, },
AddCancelAction() { AddCancelAction() {
...@@ -424,7 +429,7 @@ export default { ...@@ -424,7 +429,7 @@ export default {
<style> <style>
.doc_manage_detail_dialog .el-dialog__body { .doc_manage_detail_dialog .el-dialog__body {
padding: 10px; padding: 15px;
} }
.doc_manage_detail_dialog .el-dialog__footer { .doc_manage_detail_dialog .el-dialog__footer {
display: none; display: none;
......
...@@ -21,20 +21,15 @@ export default { ...@@ -21,20 +21,15 @@ export default {
sideNavBar, sideNavBar,
}, },
data: () => ({ data: () => ({
activePath: "",
navList: [], navList: [],
}), }),
/* watch: {
"$route.fullPath"(path) {
this.initNavList();
},
}, */
methods: { methods: {
initNavList() { initNavList() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(({ data }) => { this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
let menu = data.data[0].Child; let menu = data.data[0].Child;
let nav = []; let nav = [];
let activePath = "";
for (let i = 0; i < menu.length; i++) { for (let i = 0; i < menu.length; i++) {
let first = menu[i]; let first = menu[i];
...@@ -83,8 +78,8 @@ export default { ...@@ -83,8 +78,8 @@ export default {
if (children.length === 0) { if (children.length === 0) {
this.$set(nav[index], "disabled", true); this.$set(nav[index], "disabled", true);
} else { } else {
if (activePath === "") { if (this.activePath === "") {
activePath = children[0].path; this.activePath = children[0].path;
} }
this.$set(nav[index], "path", children[0].path); this.$set(nav[index], "path", children[0].path);
...@@ -97,9 +92,9 @@ export default { ...@@ -97,9 +92,9 @@ export default {
}); });
this.navList = nav; this.navList = nav;
if (activePath && this.$route.params.id === undefined) { if (this.activePath && this.$route.params.id === undefined) {
this.$router.push(activePath); this.$router.push(this.activePath);
} else if (activePath === "") { } else if (this.activePath === "") {
this.$message.error("您尚未创建任何文档"); this.$message.error("您尚未创建任何文档");
} }
}); });
......
<template>
<div class="doc_manage_container">
<div class="apass_breadcrumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item to="/technical_support">
技术支持
</el-breadcrumb-item>
<el-breadcrumb-item to="/technical_support/sdk_manage/example">
SDK管理
</el-breadcrumb-item>
<el-breadcrumb-item>
SDK示例编辑 - {{ detail.example_name }}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="editpage">
<wang-e v-model="detail.content"></wang-e>
<div class="apaas_button">
<el-button type="defalut" size="mini" @click="cancelAction">
取消
</el-button>
<el-button type="primary" size="mini" @click="submitAction">
保存
</el-button>
</div>
</div>
</div>
</template>
<script>
import wangE from "@/components/wangE";
export default {
components: {
wangE,
},
data() {
return {
detail: {},
};
},
computed: {
id() {
return parseFloat(this.$route.params.id);
},
},
created() {
if (this.id) {
this.$http
.get("/apaas/support/sdk/example/detail", {
params: {
id: this.id,
},
})
.then(({ data }) => {
if (data.success === 1) {
this.detail = data.data;
}
});
}
},
methods: {
cancelAction() {
this.$router.push("/technical_support/sdk_manage");
},
submitAction() {
this.$http
.put("/apaas/support/sdk/example/put", {
id: this.id,
style_id: this.detail.style_id,
example_name: this.detail.example_name,
content: this.detail.content,
})
.then(({ data }) => {
if (data.success === 1) {
this.$message.success("保存成功");
this.$router.push("/technical_support/sdk_manage/example");
} else {
this.$message.error(data.errMsg || "保存失败");
}
})
.catch((error) => {
console.log(error);
this.$message.error("保存失败");
});
},
},
};
</script>
<style scoped>
.doc_manage_container {
height: 100%;
padding: 0 20px 30px;
box-sizing: border-box;
}
.main_container {
height: calc(100% - 53px);
background-color: #fff;
border-radius: 10px;
}
.editpage {
background-color: #fff;
height: calc(100% - 45px);
margin-bottom: 20px;
box-shadow: 0px 3px 6px 0px #f4f7fc;
border-radius: 12px;
}
.editpage .wangeditor_class {
height: calc(100% - 100px);
padding: 0 20px;
box-sizing: border-box;
}
.apaas_button {
border-top: 1px solid #e3e5ef;
box-sizing: border-box;
text-align: right;
padding-top: 30px;
}
.apaas_button .el-button + .el-button {
margin-right: 30px;
}
</style>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
:title="detailForm.type === 0 ? '新增' : '修改'" :title="detailForm.type === 0 ? '新增' : '修改'"
> >
<div class="add_content" slot="content"> <div class="add_content" slot="content">
<el-form ref="addForm" :model="detailForm" :rules="detailFormRules"> <el-form ref="detailForm" :model="detailForm" :rules="detailFormRules">
<el-form-item <el-form-item
label="SDK类型" label="SDK类型"
prop="style_name" prop="style_name"
...@@ -103,10 +103,6 @@ ...@@ -103,10 +103,6 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="SDK包上传" prop="file_url"> <el-form-item label="SDK包上传" prop="file_url">
<!-- <el-input
v-model="detailForm.file_url"
placeholder="支持扩展名:.rar .zip"
></el-input> -->
<apass-upload <apass-upload
v-model="detailForm.file_url" v-model="detailForm.file_url"
tip="支持扩展名:.rar .zip" tip="支持扩展名:.rar .zip"
...@@ -282,11 +278,23 @@ export default { ...@@ -282,11 +278,23 @@ export default {
this.$refs.list.resetCurrentPage(); this.$refs.list.resetCurrentPage();
}, },
deleteSlection() { deleteSlection() {
this.deleteDialogInfo.msg = `确认删除要删除所选项吗?`; if (this.selection.length) {
let names = [];
let ids = [];
this.selection.forEach((item) => {
names.push(item.style_name);
ids.push(item.id);
});
this.deleteDialogInfo.msg = `您确认要删除${names.join("")}吗?`;
this.deleteDialogInfo.submit = () => { this.deleteDialogInfo.submit = () => {
this.deleteRequest(this.selection.map((row) => row.id)); this.deleteRequest(ids);
}; };
this.$refs.deleteDialog.show(); this.$refs.deleteDialog.show();
} else {
this.$message.warning("您尚未选中任何SDK类型");
}
}, },
clearSelection() { clearSelection() {
this.$refs.list.clearSelection(); this.$refs.list.clearSelection();
...@@ -307,6 +315,8 @@ export default { ...@@ -307,6 +315,8 @@ export default {
this.$refs.detailDialog.hide(); this.$refs.detailDialog.hide();
}, },
detailSubmitAction() { detailSubmitAction() {
this.$refs.detailForm.validate((valid) => {
if (valid) {
if (this.detailForm.type === 0) { if (this.detailForm.type === 0) {
this.$http this.$http
.post("/apaas/support/sdk/styles/create", { .post("/apaas/support/sdk/styles/create", {
...@@ -349,16 +359,16 @@ export default { ...@@ -349,16 +359,16 @@ export default {
this.$message.error("修改失败"); this.$message.error("修改失败");
}); });
} }
} else {
return false;
}
});
}, },
editItem(item) { editItem(item) {
this.detailForm = { this.detailForm = {
type: 1, type: 1,
id: item.id,
style_name: item.style_name,
version: item.version,
file_url: item.file_url,
}; };
/* this.$http this.$http
.get("/apaas/support/sdk/styles/detail", { .get("/apaas/support/sdk/styles/detail", {
params: { params: {
id: item.id, id: item.id,
...@@ -366,9 +376,12 @@ export default { ...@@ -366,9 +376,12 @@ export default {
}) })
.then(({ data }) => { .then(({ data }) => {
if (data.success === 1) { if (data.success === 1) {
this.detailForm = data.data; this.detailForm = {
...data.data,
type: 1,
};
} }
}); */ });
this.$refs.detailDialog.show(); this.$refs.detailDialog.show();
}, },
deleteItem(item) { deleteItem(item) {
......
...@@ -99,6 +99,7 @@ export default { ...@@ -99,6 +99,7 @@ export default {
.main_container { .main_container {
flex-grow: 1; flex-grow: 1;
height: calc(100% - 53px); height: calc(100% - 53px);
overflow: hidden;
} }
.download_action { .download_action {
background-color: #fff; background-color: #fff;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
title="SDK中心" title="SDK中心"
imgSrc="tool_ic_kaifawendang" imgSrc="tool_ic_kaifawendang"
:nav-list="navList" :nav-list="navList"
:title-path="navList[0] && navList[0].path" :title-path="activePath"
style="width: 250px;" style="width: 250px;"
></side-nav-bar> ></side-nav-bar>
<div class="main_container"> <div class="main_container">
...@@ -21,45 +21,19 @@ export default { ...@@ -21,45 +21,19 @@ export default {
sideNavBar, sideNavBar,
}, },
data: () => ({ data: () => ({
activePath: "",
navList: [], navList: [],
}), }),
methods: { methods: {
initNavList() { initNavList() {
let activePath = ""; this.$http.get("/apaas/support/sdk/menus").then(({ data }) => {
if (data.success === 1) {
let baseUrl = "/technical_support/sdk"; let baseUrl = "/technical_support/sdk";
let data = [ let menu = data.data || [];
{
name: "JavaScript SDK", this.navList = menu.map((item) => {
id: 1, let children = item.children || [];
children: [
{
name: "在地图上添加图层",
id: 101,
},
{
name: "测测测自己创建测",
id: 102,
},
],
},
{
name: "Android SDK",
id: 2,
children: [
{
name: "Android",
id: 201,
},
{
name: "测测测自己创建测",
id: 202,
},
],
},
];
this.navList = data.map((item) => {
let children = item.children;
let nav = { let nav = {
name: item.name, name: item.name,
path: `${baseUrl}/${item.name}`, path: `${baseUrl}/${item.name}`,
...@@ -69,8 +43,8 @@ export default { ...@@ -69,8 +43,8 @@ export default {
nav.children = children.map((v) => { nav.children = children.map((v) => {
let path = `${baseUrl}/${item.name}/${v.id}`; let path = `${baseUrl}/${item.name}/${v.id}`;
if (activePath === "") { if (this.activePath === "") {
activePath = path; this.activePath = path;
} }
return { return {
...@@ -86,11 +60,13 @@ export default { ...@@ -86,11 +60,13 @@ export default {
return nav; return nav;
}); });
if (activePath && this.$route.params.id === undefined) { if (this.activePath && this.$route.params.id === undefined) {
this.$router.push(activePath); this.$router.push(this.activePath);
} else if (activePath === "") { } else if (this.activePath === "") {
this.$message.error("您尚未创建任何SDK文档"); this.$message.error("您尚未创建任何SDK文档");
} }
}
});
}, },
}, },
mounted() { mounted() {
......
...@@ -269,23 +269,30 @@ ...@@ -269,23 +269,30 @@
<div v-if="orderDetail.order_type == 1"> <div v-if="orderDetail.order_type == 1">
<div> <div>
<span class="detail_service_specification_gg"> <span class="detail_service_specification_gg">
{{ orderDetail.spec_app == 0 ? "计次收费:" : "时长收费:" }} {{ orderDetail.spec_type == 0 ? "计次收费:" : "时长收费:" }}
</span>
<span class="detail_service_specification_val">
{{ orderDetail.single_money }}金币/
{{
orderDetail.spec_type == 1
? orderDetail.spec_count + ""
: ""
}}
</span> </span>
<span class="detail_service_specification_val"
>2000金币/月</span
>
</div> </div>
</div> </div>
<div v-else-if="orderDetail.order_type == 2"> <div v-else-if="orderDetail.order_type == 2">
<div> <div>
<span class="detail_service_specification_gg">{{ <span class="detail_service_specification_gg">
{{
orderDetail.spec_app == 0 orderDetail.spec_app == 0
? "申请获取应用镜像部署权限:" ? "申请获取应用镜像部署权限:"
: "申请获取应用镜像开发权限:" : "申请获取应用镜像开发权限:"
}}</span> }}
<span class="detail_service_specification_val" </span>
>2000金币/月</span <span class="detail_service_specification_val">
> {{ orderDetail.single_money }}金币/月
</span>
</div> </div>
</div> </div>
<div v-else-if="orderDetail.order_type == 3"> <div v-else-if="orderDetail.order_type == 3">
...@@ -314,20 +321,31 @@ ...@@ -314,20 +321,31 @@
<div> <div>
<span class="detail_service_money_title">总价:</span> <span class="detail_service_money_title">总价:</span>
<span class="detail_service_specification_val" <span class="detail_service_specification_val"
>12793017230金币</span >{{ orderDetail.total_money }}金币</span
>
<span
v-if="
orderDetail.apply_type == 1 &&
orderDetail.amounts_payable - orderDetail.total_money > 0
"
class="adhekadwn"
> >
<span v-if="1" class="adhekadwn">(升级费用:3000金币,原规格抵扣:1000金币)</span> (升级费用:
{{ orderDetail.amounts_payable }}金币,原规格抵扣:
{{ orderDetail.amounts_payable - orderDetail.total_money }}
金币)
</span>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div v-if="orderDetail.order_type == 2"> <div v-if="orderDetail.order_type == 2">
<div class="detail_s_title">业务领域:</div> <div class="detail_s_title">业务领域:</div>
<div class="detail_app_scence">{{ orderDetail.app_desc }}</div> <div class="detail_app_scence">{{ orderDetail.business_area }}</div>
</div> </div>
<div v-if="orderDetail.order_type == 2"> <div v-if="orderDetail.order_type == 2">
<div class="detail_s_title">上线时间:</div> <div class="detail_s_title">上线时间:</div>
<div class="detail_app_scence">{{ orderDetail.app_func }}</div> <div class="detail_app_scence">{{ helper.dateStringTransform(orderDetail.app_create_date) }}</div>
</div> </div>
<div v-if="orderDetail.order_type == 2"> <div v-if="orderDetail.order_type == 2">
<div class="detail_s_title">应用简介:</div> <div class="detail_s_title">应用简介:</div>
......
...@@ -1146,8 +1146,12 @@ export default { ...@@ -1146,8 +1146,12 @@ export default {
let request = this.$refs.fwcs_zhfw_www.getTableData().concat(); let request = this.$refs.fwcs_zhfw_www.getTableData().concat();
let arr = []; let arr = [];
request.pop(); request.pop();
request.forEach(item => { request.forEach((item) => {
arr.push({key: item.requestEncoding, val: item.requestValue, field_type: "text"}) arr.push({
key: item.requestEncoding,
val: item.requestValue,
field_type: "text",
});
}); });
bodys = JSON.stringify(arr); bodys = JSON.stringify(arr);
} }
...@@ -1393,84 +1397,90 @@ export default { ...@@ -1393,84 +1397,90 @@ export default {
} }
}, },
registePt() { registePt() {
console.log(this.jkwds); this.$refs.form.validate((valid) => {
// this.$refs.form.validate((valid) => { if (valid) {
// if (valid) { if (this.activeBtn == 3 && this.jkwds.length == 0) {
// if (this.cover.length != 0) { this.$message.error("请上传接口文档");
// let contentType = ""; } else {
// if (this.activeBtn == 1 && !this.is_portal) { if (this.cover.length != 0) {
// this.addPortalItem(); let contentType = "";
// } else { if (this.activeBtn == 1 && !this.is_portal) {
// if (this.activeBtn == 0 || this.activeBtn == 3) { this.addPortalItem();
// contentType = this.sjfwQqt; } else {
// } else if (this.activeBtn == 4) { if (this.activeBtn == 0 || this.activeBtn == 3) {
// if (this.activeZh == 1) { contentType = this.sjfwQqt;
// contentType = this.zhfwQqt; } else if (this.activeBtn == 4) {
// } if (this.activeZh == 1) {
// } contentType = this.zhfwQqt;
// let query = { }
// name: this.form.name, }
// sectors: this.form.area, let query = {
// organization: this.form.origin, name: this.form.name,
// cover: this.cover[0], sectors: this.form.area,
// openness: this.form.resource, organization: this.form.origin,
// descript: this.form.desc, cover: this.cover[0],
// data_service_type1: this.btnList[this.activeBtn].id, openness: this.form.resource,
// data_service_type2: descript: this.form.desc,
// this.activeBtn == 0 data_service_type1: this.btnList[this.activeBtn].id,
// ? 12 data_service_type2:
// : this.activeBtn == 1 this.activeBtn == 0
// ? this.skfwQqt ? 12
// : this.activeBtn == 4 : this.activeBtn == 1
// ? this.zhyyVal ? this.skfwQqt
// : 0, : this.activeBtn == 4
// portal_id: this.portal_id, ? this.zhyyVal
// encode_method: this.form.code, : 0,
// doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "", portal_id: this.portal_id,
// urls: [ encode_method: this.form.code,
// { doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "",
// name: "", urls: [
// response_type: {
// this.activeBtn == 3 ? this.gz_fhsjgs : "JSON", name: "",
// req_auth_mthod: 0, response_type:
// req_auth_token: this.tokenVal, this.activeBtn == 3 ? this.gz_fhsjgs : "JSON",
// method: this.select, req_auth_mthod: 0,
// url: this.serviceUrl, req_auth_token: this.tokenVal,
// request_fields: method: this.select,
// this.dataType == "body" url: this.serviceUrl,
// ? this.request_fields request_fields:
// : this.body_fields, this.dataType == "body"
// request_query_fields: ? this.request_fields
// this.dataType == "param" : this.body_fields,
// ? this.request_fields request_query_fields:
// : this.param_fields, this.dataType == "param"
// response_fields: this.response_fields, ? this.request_fields
// content_type: contentType, : this.param_fields,
// }, response_fields: this.response_fields,
// ], content_type: contentType,
// }; },
// this.$api.workbench.serviceAdd(query).then((response) => { ],
// if (response.data.success == 1) { };
// this.$message.success("服务注册成功"); this.$api.workbench.serviceAdd(query).then((response) => {
// this.$router.push("/fwgl/" + this.$store.getters.level); if (response.data.success == 1) {
// } else { this.$message.success("服务注册成功");
// console.log(response.data.errMsg); this.$router.push("/fwgl/" + this.$store.getters.level);
// this.$message.error(response.data.errMsg); } else {
// } console.log(response.data.errMsg);
// }); this.$message.error(response.data.errMsg);
// } }
// } else { });
// this.$message.error("请上传服务封面"); }
// } } else {
// } else { this.$message.error("请上传服务封面");
// this.$message.error("请完善服务基本信息"); }
// } }
// }); } else {
this.$message.error("请完善服务基本信息");
}
});
}, },
registeOne() { registeOne() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (this.cover.length != 0) { if (this.cover.length != 0) {
if (this.jkwds.length == 0) {
this.$message.error("请上传接口文档");
} else {
let urls = []; let urls = [];
this.liucheng_list.forEach((item) => { this.liucheng_list.forEach((item) => {
urls.push({ urls.push({
...@@ -1504,6 +1514,7 @@ export default { ...@@ -1504,6 +1514,7 @@ export default {
portal_id: this.portal_id, portal_id: this.portal_id,
encode_method: this.form.code, encode_method: this.form.code,
urls: urls, urls: urls,
doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "",
}; };
this.$api.workbench.serviceAdd(query).then((response) => { this.$api.workbench.serviceAdd(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
...@@ -1514,6 +1525,7 @@ export default { ...@@ -1514,6 +1525,7 @@ export default {
this.$message.error(response.data.errMsg); this.$message.error(response.data.errMsg);
} }
}); });
}
} else { } else {
this.$message.error("请上传服务封面"); this.$message.error("请上传服务封面");
} }
......
...@@ -46,6 +46,9 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource= ...@@ -46,6 +46,9 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource=
checkNameSpaceCouldUse(params) { checkNameSpaceCouldUse(params) {
return axios.get(`/apaas/service/v3/resource/apply/checkNs?namespace=${params.id}`) return axios.get(`/apaas/service/v3/resource/apply/checkNs?namespace=${params.id}`)
}, },
getSpecifications() {
return axios.get(``)
},
// shopping cart // shopping cart
addShoppingCart(params) { addShoppingCart(params) {
...@@ -77,7 +80,12 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource= ...@@ -77,7 +80,12 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource=
}, },
getGeneralOverview() { getGeneralOverview() {
return axios.get(`/apaas/service/v3/statistics/other/index`); return axios.get(`/apaas/service/v3/statistics/other/index`);
} },
// app
getExtendedInfo(params) {
return axios.get(`/apaas/hubApi/market/extendedInfo?id=${params.id}`);
},
} }
export default serviceShop; export default serviceShop;
...@@ -257,6 +257,14 @@ export default new Router({ ...@@ -257,6 +257,14 @@ export default new Router({
"@/pages/technical-support/sdk-manage/example/index" "@/pages/technical-support/sdk-manage/example/index"
), ),
}, // SDK示例管理 }, // SDK示例管理
{
path: "/technical_support/sdk_manage/example/:id",
name: "technicalSupportSdkExampleDetail",
component: () =>
import(
"@/pages/technical-support/sdk-manage/example/detail"
),
}, // SDK示例详情
], ],
}, // SDK管理 }, // SDK管理
], ],
......
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