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,57 +65,60 @@ export default { ...@@ -65,57 +65,60 @@ export default {
}, },
methods: { methods: {
translate() { translate() {
let content = this.richText; let content = this.richText || "";
let titles =
content.match(
/<h1(([\s\S])*?)<\/h1>|<h2(([\s\S])*?)<\/h2>|<h3(([\s\S])*?)<\/h3>/g
) || [];
let time = new Date().getTime();
let pre_h1_index = 0;
let pre_h2_index = 0;
let pre_h3_index = 0;
let newTitles = titles
.map((title, index) => {
let newTitle = title;
let level = 0;
let id = "";
if (title.match(/<h1(([\s\S])*?)<\/h1>/g)) { if (content) {
pre_h1_index++; let titles =
pre_h2_index = 0; content.match(
pre_h3_index = 0; /<h1(([\s\S])*?)<\/h1>|<h2(([\s\S])*?)<\/h2>|<h3(([\s\S])*?)<\/h3>/g
level = 1; ) || [];
id = `nav_${pre_h1_index}` + "_" + time; let time = new Date().getTime();
let pre_h1_index = 0;
let pre_h2_index = 0;
let pre_h3_index = 0;
let newTitles = titles
.map((title, index) => {
let newTitle = title;
let level = 0;
let id = "";
newTitle = title.replace(/<h1/g, `<h1 id="${id}"`); if (title.match(/<h1(([\s\S])*?)<\/h1>/g)) {
} else if (title.match(/<h2(([\s\S])*?)<\/h2>/g)) { pre_h1_index++;
pre_h2_index++; pre_h2_index = 0;
pre_h3_index = 0; pre_h3_index = 0;
level = 2; level = 1;
id = `nav_${pre_h1_index}_${pre_h2_index}` + "_" + time; id = `nav_${pre_h1_index}` + "_" + time;
newTitle = title.replace(/<h2/g, `<h2 id="${id}"`); newTitle = title.replace(/<h1/g, `<h1 id="${id}"`);
} else if (title.match(/<h3(([\s\S])*?)<\/h3>/g)) { } else if (title.match(/<h2(([\s\S])*?)<\/h2>/g)) {
pre_h3_index++; pre_h2_index++;
level = 3; pre_h3_index = 0;
id = `nav_${pre_h1_index}_${pre_h2_index}_${pre_h3_index}`; level = 2;
id = `nav_${pre_h1_index}_${pre_h2_index}` + "_" + time;
newTitle = title.replace(/<h3/g, `<h3 id="${id}"`) + "_" + time; newTitle = title.replace(/<h2/g, `<h2 id="${id}"`);
} } else if (title.match(/<h3(([\s\S])*?)<\/h3>/g)) {
pre_h3_index++;
level = 3;
id = `nav_${pre_h1_index}_${pre_h2_index}_${pre_h3_index}`;
content = content.replace(new RegExp(title), newTitle); newTitle = title.replace(/<h3/g, `<h3 id="${id}"`) + "_" + time;
}
return { content = content.replace(new RegExp(title), newTitle);
level,
id,
title: title.replace(/<\/?.+?>/g, ""),
};
})
.filter((item) => item.title);
this.content = content; return {
this.navTree = newTitles; level,
this.curNav = (newTitles[0] && newTitles[0].id) || ""; id,
title: title.replace(/<\/?.+?>/g, ""),
};
})
.filter((item) => item.title);
this.content = content;
this.navTree = newTitles;
this.curNav = (newTitles[0] && newTitles[0].id) || "";
}
}, },
clickNav(item) { clickNav(item) {
let target = document.querySelector(`#${item.id}`); let target = document.querySelector(`#${item.id}`);
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
cellItem.approval_second_level != 0 || cellItem.approval_second_level != 0 ||
cellItem.pay_status == -1 cellItem.pay_status == -1
" "
class="cell_del_btn" class="cell_del_btn"
@click="delOrder(cellItem.order_id)" @click="delOrder(cellItem.order_id)"
> >
删除 删除
...@@ -71,16 +71,24 @@ ...@@ -71,16 +71,24 @@
</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 +
}} "金币/月"
</div> : "申请获取应用镜像开发权限:" +
cellItem.single_money +
"金币/月"
}}
</div>
</div> </div>
<div v-else-if="cellItem.order_type == 3"> <div v-else-if="cellItem.order_type == 3">
<el-tooltip <el-tooltip
...@@ -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.
...@@ -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">
{{ list.length }} 项服务,已选择 <div class="fyzj">
<span>{{ getNum }}</span> <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 }} 项服务,已选择
<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.baseInfo = data.data; this.$api.serviceShop.getExtendedInfo({ id: this.id }).then((response) => {
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) {
this.deleteDialogInfo.submit = () => { let names = [];
this.deleteRequest(this.selection.map((row) => row.id)); let ids = [];
};
this.$refs.deleteDialog.show(); this.selection.forEach((item) => {
names.push(item.style_name);
ids.push(item.id);
});
this.deleteDialogInfo.msg = `您确认要删除${names.join("")}吗?`;
this.deleteDialogInfo.submit = () => {
this.deleteRequest(ids);
};
this.$refs.deleteDialog.show();
} else {
this.$message.warning("您尚未选中任何SDK类型");
}
}, },
clearSelection() { clearSelection() {
this.$refs.list.clearSelection(); this.$refs.list.clearSelection();
...@@ -307,58 +315,60 @@ export default { ...@@ -307,58 +315,60 @@ export default {
this.$refs.detailDialog.hide(); this.$refs.detailDialog.hide();
}, },
detailSubmitAction() { detailSubmitAction() {
if (this.detailForm.type === 0) { this.$refs.detailForm.validate((valid) => {
this.$http if (valid) {
.post("/apaas/support/sdk/styles/create", { if (this.detailForm.type === 0) {
style_name: this.detailForm.style_name, this.$http
version: this.detailForm.version, .post("/apaas/support/sdk/styles/create", {
file_url: this.detailForm.file_url, style_name: this.detailForm.style_name,
}) version: this.detailForm.version,
.then(({ data }) => { file_url: this.detailForm.file_url,
if (data.success === 1) { })
this.$message.success("新增成功"); .then(({ data }) => {
this.refreshPage(); if (data.success === 1) {
this.$refs.detailDialog.hide(); this.$message.success("新增成功");
} else { this.refreshPage();
this.$message.error("新增失败"); this.$refs.detailDialog.hide();
} } else {
}) this.$message.error("新增失败");
.catch((error) => { }
console.log(error); })
this.$message.error("新增失败"); .catch((error) => {
}); console.log(error);
} else { this.$message.error("新增失败");
this.$http });
.put("/apaas/support/sdk/styles/put", { } else {
id: this.detailForm.id, this.$http
style_name: this.detailForm.style_name, .put("/apaas/support/sdk/styles/put", {
version: this.detailForm.version, id: this.detailForm.id,
file_url: this.detailForm.file_url, style_name: this.detailForm.style_name,
}) version: this.detailForm.version,
.then(({ data }) => { file_url: this.detailForm.file_url,
if (data.success === 1) { })
this.$message.success("修改成功"); .then(({ data }) => {
this.refreshPage(); if (data.success === 1) {
this.$refs.detailDialog.hide(); this.$message.success("修改成功");
} else { this.refreshPage();
this.$message.error("修改失败"); this.$refs.detailDialog.hide();
} } else {
}) this.$message.error("修改失败");
.catch((error) => { }
console.log(error); })
this.$message.error("修改失败"); .catch((error) => {
}); console.log(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,76 +21,52 @@ export default { ...@@ -21,76 +21,52 @@ export default {
sideNavBar, sideNavBar,
}, },
data: () => ({ data: () => ({
activePath: "",
navList: [], navList: [],
}), }),
methods: { methods: {
initNavList() { initNavList() {
let activePath = ""; this.$http.get("/apaas/support/sdk/menus").then(({ data }) => {
let baseUrl = "/technical_support/sdk"; if (data.success === 1) {
let data = [ let baseUrl = "/technical_support/sdk";
{ let menu = data.data || [];
name: "JavaScript SDK",
id: 1,
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) => { this.navList = menu.map((item) => {
let children = item.children; let children = item.children || [];
let nav = {
name: item.name,
path: `${baseUrl}/${item.name}`,
};
if (children.length > 0) { let nav = {
nav.children = children.map((v) => { name: item.name,
let path = `${baseUrl}/${item.name}/${v.id}`; path: `${baseUrl}/${item.name}`,
};
if (children.length > 0) {
nav.children = children.map((v) => {
let path = `${baseUrl}/${item.name}/${v.id}`;
if (activePath === "") { if (this.activePath === "") {
activePath = path; this.activePath = path;
}
return {
name: v.name,
path: path,
};
});
nav.open = true;
} else {
nav.disabled = true;
} }
return { return nav;
name: v.name,
path: path,
};
}); });
nav.open = true;
} else {
nav.disabled = true;
}
return nav; if (this.activePath && this.$route.params.id === undefined) {
this.$router.push(this.activePath);
} else if (this.activePath === "") {
this.$message.error("您尚未创建任何SDK文档");
}
}
}); });
if (activePath && this.$route.params.id === undefined) {
this.$router.push(activePath);
} else if (activePath === "") {
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" }}
>2000金币/月</span </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>
......
This diff is collapsed.
...@@ -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