Commit e54212db authored by 张俊's avatar 张俊

应ç”合并

parents 06a84822 9b53e9f0
<template>
<el-upload
ref="upload"
drag
action="/apaas/static/file/upload"
:data="{
......@@ -34,6 +35,11 @@ export default {
default: "",
},
},
data() {
return {
preUrl: "",
};
},
computed: {
fileList() {
let list = [];
......@@ -68,6 +74,7 @@ export default {
const filtType = this.getFileType(file.name);
if (filtType === "rar" || filtType === "zip") {
this.preUrl = this.url;
return true;
} else {
this.$message.error("仅支持rar和zip格式!");
......@@ -76,6 +83,21 @@ export default {
},
uploadSuccess({ 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 {
},
methods: {
translate() {
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 = "";
let content = this.richText || "";
if (title.match(/<h1(([\s\S])*?)<\/h1>/g)) {
pre_h1_index++;
pre_h2_index = 0;
pre_h3_index = 0;
level = 1;
id = `nav_${pre_h1_index}` + "_" + time;
if (content) {
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 = "";
newTitle = title.replace(/<h1/g, `<h1 id="${id}"`);
} else if (title.match(/<h2(([\s\S])*?)<\/h2>/g)) {
pre_h2_index++;
pre_h3_index = 0;
level = 2;
id = `nav_${pre_h1_index}_${pre_h2_index}` + "_" + time;
if (title.match(/<h1(([\s\S])*?)<\/h1>/g)) {
pre_h1_index++;
pre_h2_index = 0;
pre_h3_index = 0;
level = 1;
id = `nav_${pre_h1_index}` + "_" + 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}`;
newTitle = title.replace(/<h1/g, `<h1 id="${id}"`);
} else if (title.match(/<h2(([\s\S])*?)<\/h2>/g)) {
pre_h2_index++;
pre_h3_index = 0;
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 {
level,
id,
title: title.replace(/<\/?.+?>/g, ""),
};
})
.filter((item) => item.title);
content = content.replace(new RegExp(title), newTitle);
this.content = content;
this.navTree = newTitles;
this.curNav = (newTitles[0] && newTitles[0].id) || "";
return {
level,
id,
title: title.replace(/<\/?.+?>/g, ""),
};
})
.filter((item) => item.title);
this.content = content;
this.navTree = newTitles;
this.curNav = (newTitles[0] && newTitles[0].id) || "";
}
},
clickNav(item) {
let target = document.querySelector(`#${item.id}`);
......
......@@ -11,7 +11,7 @@
cellItem.approval_second_level != 0 ||
cellItem.pay_status == -1
"
class="cell_del_btn"
class="cell_del_btn"
@click="delOrder(cellItem.order_id)"
>
删除
......@@ -71,16 +71,24 @@
</el-col>
<el-col :span="5" class="cell_specification">
<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 v-else-if="cellItem.order_type == 2">
<div>
{{
cellItem.spec_app == 0
? "申请获取应用镜像部署权限:2000金币/月"
: "申请获取应用镜像开发权限:2000金币/月"
}}
</div>
<div>
{{
cellItem.spec_app == 0
? "申请获取应用镜像部署权限:" +
cellItem.single_money +
"金币/月"
: "申请获取应用镜像开发权限:" +
cellItem.single_money +
"金币/月"
}}
</div>
</div>
<div v-else-if="cellItem.order_type == 3">
<el-tooltip
......@@ -133,13 +141,17 @@
</el-col>
<el-col :span="3" class="cell_specification">
<div>
不限时长
{{
cellItem.duration != 0 && cellItem.duration_unit == 1
? cellItem.duration + "个月"
: cellItem.duration != 0 && cellItem.duration_unit == 2
? cellItem.duration + ""
: "不限时长"
}}
</div>
</el-col>
<el-col :span="3" class="cell_specification">
<div>
200金币
</div>
<div>{{ cellItem.total_money }}金币</div>
</el-col>
<el-col :span="3" class="approval_status">
<div>
......
......@@ -34,17 +34,33 @@
<span v-text="data.create_date"></span>
</li>
</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">
<span>&emsp;&emsp;格:</span>
<div class="btn_container_ddaw">
{{ data.price }} 金币/月
</div>
</div>
<div class="commodity_information">
<span>购买时长:</span>
<div class="btn_container">
<el-button
v-for="(item, index) in specifications"
:key="'specifications_' + index"
:type="item.value === specificationID ? 'primary' : 'default'"
@click="changeSpecification(item)"
>
{{ item.name }}
</el-button>
<el-input-number
v-model="duration"
:min="1"
:disabled="actionDisabled"
></el-input-number>
</div>
</div>
<div class="commodity_action">
......@@ -80,7 +96,13 @@ export default {
},
],
specificationID: 1,
duration: 1,
}),
computed: {
actionDisabled() {
return this.specifications.length == 0;
},
},
methods: {
changeSpecification({ value }) {
this.specificationID = value;
......@@ -244,6 +266,10 @@ export default {
.commodity_information > .btn_container > .el-input-number {
margin: 0 20px 15px 0;
}
.btn_container_ddaw {
line-height: 40px;
margin-left: 5px;
}
.commodity_action {
margin-top: 60px;
text-align: right;
......@@ -253,6 +279,55 @@ export default {
margin-left: 20px;
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>
......
......@@ -18,13 +18,21 @@
</div>
<div class="main_container">
<div class="main_container-left" v-if="data.cover">
<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>
<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>
<map-view
v-if="data.type === 'Map Service'"
:id="data.portal_id"
></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 class="main_container-right">
<ul class="service_base_info">
......@@ -53,54 +61,89 @@
<span v-text="data.descript"></span>
</li>
</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">
<span>&emsp;&emsp;格:</span>
<span v-if="actionDisabled" class="commodity_text">暂无</span>
<span>计次收费规格:</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">
<el-button
v-for="(item, index) in specifications"
v-for="(item, index) in data.serviceRequestSpcs.spcs_type_1"
:key="'spcs_' + index"
:type="item.id === specification.id ? 'primary' : 'default'"
@click="changeSpecification(item)"
@click="changeSpecification(item, 0)"
>
{{ item.name }}
{{ item.money }}金币/{{ item.spcs_count }}
</el-button>
</div>
</div>
<div class="commodity_information">
<span>规格说明:</span>
<span v-if="actionDisabled" class="commodity_text">暂无</span>
<span>时长收费规格:</span>
<span
v-else
v-if="
data.serviceRequestSpcs.spcs_type_2 &&
data.serviceRequestSpcs.spcs_type_2.length == 0
"
class="commodity_text"
v-text="(specification && specification.descript) || '-'"
></span>
</div>
<div class="commodity_information">
<span>购买方式:</span>
<span v-if="actionDisabled" class="commodity_text">暂无</span>
>暂无</span
>
<div v-else class="btn_container">
<el-button
v-for="(item, index) in types"
v-text="item.name"
:key="'type_' + index"
:type="item.value === type ? 'primary' : 'default'"
@click="changeType(item)"
v-for="(item, index) in data.serviceRequestSpcs.spcs_type_2"
:key="'spcs_' + index"
:type="item.id === specification.id ? 'primary' : 'default'"
@click="changeSpecification(item, 1)"
>
{{ item.money }}金币/月
</el-button>
</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">
<span>购买时长:</span>
<div class="btn_container">
<div v-if="showTime" class="btn_container">
<el-input-number
v-model="duration"
:min="1"
:disabled="actionDisabled"
></el-input-number>
</div>
<div v-else class="btn_container">
<el-button type="primary"> 不限时长 </el-button>
</div>
</div>
<div class=" commodity_action">
<div class="commodity_action">
<el-button
type="warning"
plain
......@@ -125,14 +168,14 @@
<script>
import helper from "@/services/helper.js";
import MapView from "./map-view";
import workflowsView from '@/components/work-flow/workflows-view'
import processView from '@/components/service-info/process-view'
import workflowsView from "@/components/work-flow/workflows-view";
import processView from "@/components/service-info/process-view";
export default {
components: {
MapView,
workflowsView,
processView
processView,
},
props: {
data: {
......@@ -145,39 +188,29 @@ export default {
type: 0, // 购买方式 1:按月,2:按年
specification: {}, // 规格
duration: 1, // 时长
showTime: false,
}),
computed: {
specifications() {
let specifications = (this.data.serviceRequestSpcs || []).filter(
(item) => item.type == this.type || item.type == 3
);
return specifications;
},
actionDisabled() {
return this.specifications.length == 0;
},
},
watch: {
specifications: {
handler() {
this.specification = this.specifications[0];
},
deep: true,
let a = this.data.serviceRequestSpcs;
return a.spcs_type_1.length == 0 && a.spcs_type_2.length == 0;
},
},
watch: {},
methods: {
dateTransform(datestr = "") {
return helper.dateStringTransform(datestr);
},
changeSpecification(specification) {
changeSpecification(specification, type) {
this.specification = specification;
if (type == 0) {
this.showTime = false;
} else if (type == 1) {
this.showTime = true;
}
},
changeType({ value }) {
this.type = value;
if (this.specifications.length > 0) {
this.specification = this.specifications[0];
}
},
addToCart() {
// console.log("addToCart");
......@@ -261,8 +294,10 @@ export default {
}
// 初始化规格
if (this.specifications.length > 0) {
this.specification = this.specifications[0];
if (this.data.serviceRequestSpcs.spcs_type_1.length > 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 {
margin-left: 20px;
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>
......
......@@ -53,12 +53,12 @@ export default {
if (response.data.success == 1) {
let arr = response.data.data[0].Child;
let shopArr = [];
arr.forEach((item) => {
if (item.visit_url == "/services_shop") {
shopArr = item.Child;
}
});
shopArr.forEach((item) => {
let asd = arr.find(item => {
return item.visit_url == "/services_shop"
})
shopArr = asd.Child;
if (shopArr && shopArr.length != 0) {
Array.from(shopArr).forEach((item) => {
let uri = item.visit_url.substring(6);
if (uri.indexOf("/") != -1) {
uri = uri.substring(0, uri.indexOf("/"));
......@@ -98,6 +98,7 @@ export default {
break;
}
});
}
this.menuList = shopArr;
}
});
......
......@@ -163,11 +163,11 @@ export default {
height: 116px;
float: left;
background-size: contain;
margin-right: 20px;
margin-right: 15px;
}
.info {
float: left;
width: 270px;
width: 230px;
}
.info p {
color: rgba(136, 144, 167, 1);
......
......@@ -79,5 +79,4 @@ export default {
.list_title span:nth-of-type(4){
margin-right: 124px;
}
</style>
This diff is collapsed.
......@@ -4,12 +4,14 @@
<div class="shopping_all_head">
<el-row>
<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 :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="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-row>
</div>
......@@ -40,31 +42,54 @@
<div class="shopping_cart_options">
<el-row>
<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 :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
v-else
@click="delSelectService"
class="shopping_cart_options_del_service_act"
>删除选中服务</span>
>删除选中服务</span
>
</el-col>
<el-col :span="15" class="shopping_cart_options_num">
{{ list.length }} 项服务,已选择
<span>{{ getNum }}</span>
<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 }} 项服务,已选择
<span class="dwa_djf">{{ getNum }}</span>
<span class="ckfymx_qian">账户余额:20,000 金币</span>
</p>
</div>
</div>
</el-col>
<el-col :span="4" class="shopping_cart_options_cell">
<el-button
v-if="getNum == 0"
:disabled="true"
class="shopping_cart_options_cell_btn"
>一键申请</el-button>
>一键申请</el-button
>
<el-button
v-else
@click="oneClickApplication"
class="shopping_cart_options_cell_btn_act"
>一键申请</el-button>
>一键申请</el-button
>
</el-col>
</el-row>
</div>
......@@ -97,6 +122,15 @@ export default {
);
return num;
},
getSumCoin() {
let sum = 0;
this.checkList.forEach((item, index) => {
if (item) {
sum += item.total_money;
}
});
return sum;
},
getCartState() {
return this.$store.state.cartState;
},
......@@ -129,7 +163,6 @@ export default {
this.$refs.shoppingList.setAllState(val);
},
changeState(val) {
console.log(val);
this.$set(this.checkList, val.index, val.state);
if (this.checkList.indexOf(false) == -1) {
this.checkShopAll = true;
......@@ -236,7 +269,7 @@ export default {
font-weight: 500;
color: #58617a;
}
.shopping_cart_options_num span {
.dwa_djf {
color: #e56600;
}
.shopping_cart_options_cell_btn {
......@@ -262,6 +295,52 @@ export default {
.shopping_list_page {
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>
.shopping_cart_options_cell .el-checkbox {
......
......@@ -51,6 +51,7 @@
:data="selectedTabsPage"
:size="size"
:height="height"
:max-height="maxheight"
:border="border"
@select="select"
@select-all="selectAll"
......@@ -204,6 +205,13 @@
<img src="@/assets/imgs/list_ic_hot.png" alt v-if="scope.row['hot']" />
{{ scope.row[item.prop] }}
</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 -->
<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>
......@@ -388,6 +396,10 @@ export default {
params: {
type: Object,
default: () => {}
},
maxheight: {
type: [String, Number],
default: ""
}
},
data() {
......
......@@ -88,6 +88,7 @@ export default {
],
descript: datas.descript,
serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail,
};
this.detailData = [
......
<template>
<div class="apply_container">
<info-list :list_arr="module_arr">
<apply-form :formInline="formInline" ref="apply_info" slot="apply_info"></apply-form>
<service-list ref="apply_service" slot="apply_service" :service_arr="service_arr"></service-list>
<apply-form
: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>
<div class="footout">
......@@ -30,6 +38,17 @@ export default {
applyForm,
serviceList,
},
computed: {
getSumCoin() {
let sum = 0;
this.service_arr.forEach((item, index) => {
if (item) {
sum += item.total_money;
}
});
return sum;
},
},
data() {
return {
formInline: {
......@@ -115,7 +134,6 @@ export default {
};
},
watch: {},
computed: {},
created() {
if (this.$route.query.service_id) {
this.get_one_service(this.$route.query);
......@@ -437,6 +455,7 @@ export default {
padding: 20px;
text-align: right;
margin: 20px 0;
position: relative;
}
.applybtn {
color: rgba(252, 239, 214, 1);
......@@ -449,6 +468,56 @@ export default {
border-radius: 8px;
margin-left: 20px;
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{
float: right;
......
......@@ -14,7 +14,6 @@
<service-tabs
:detail-data="detailData"
:specification-data="specificationData"
:provider-data="providerData"
:comments-data="commentsData"
:comments-url="commentsUrl"
......@@ -34,7 +33,6 @@ export default {
data: () => ({
baseInfo: null,
detailData: null,
specificationData: null,
providerData: null,
commentsData: null,
}),
......@@ -56,18 +54,6 @@ export default {
})
.then(({ data }) => {
let datas = data.data;
let specificationData =
(datas.serviceRequestSpcs &&
datas.serviceRequestSpcs.map((item) => ({
id: item.id,
type: item.type,
pv: item.pv,
count: item.count,
name: `访问次数:${item.pv}次/日 访问量:${item.count}次/日`,
descript: item.des,
}))) ||
[];
this.baseInfo = {
service_id: this.id,
app_id: 0,
......@@ -87,7 +73,8 @@ export default {
datas.data_service_type3_name,
],
descript: datas.descript,
serviceRequestSpcs: specificationData,
serviceRequestSpcs: datas.serviceRequestSpcs,
scoreDetail: datas.scoreDetail,
};
this.detailData = [
......@@ -184,7 +171,6 @@ export default {
},
},
];
this.specificationData = specificationData;
this.providerData = {
organization_name: datas.organization_name,
picture_path: datas.organization_picture,
......
......@@ -94,6 +94,7 @@ export default {
],
descript: datas.descript,
serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail,
};
this.detailData = [
......
......@@ -55,9 +55,12 @@ export default {
},
})
.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);
});
......@@ -100,7 +103,7 @@ export default {
);
this.detailData = detailData;
})
.catch(function(error) {
.catch(function (error) {
console.log(error);
});
......@@ -114,7 +117,7 @@ export default {
phone: data.data.phone,
};
})
.catch(function(error) {
.catch(function (error) {
console.log(error);
});
},
......
......@@ -89,6 +89,7 @@ export default {
],
descript: datas.descript,
serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail,
};
this.detailData = [
{
......
......@@ -8,9 +8,7 @@
<el-breadcrumb-item to="/technical_support/doc_manage">
开发文档
</el-breadcrumb-item>
<el-breadcrumb-item>
文档编辑 - {{ title }}
</el-breadcrumb-item>
<el-breadcrumb-item> 文档编辑 - {{ title }} </el-breadcrumb-item>
</el-breadcrumb>
</div>
......@@ -31,21 +29,26 @@
<script>
import wangE from "@/components/wangE";
export default {
components: {
wangE,
},
data() {
return {
title: "",
content: "",
};
},
components: {
wangE,
computed: {
id() {
return parseFloat(this.$route.params.id);
},
},
created() {
if (this.$route.params.id) {
if (this.id) {
this.$http
.get("/apaas/support/document/get", {
params: {
id: this.$route.params.id,
id: this.id,
},
})
.then(({ data }) => {
......@@ -63,13 +66,13 @@ export default {
submitAction() {
this.$http
.put("/apaas/support/document/put", {
id: parseFloat(this.$route.params.id),
id: this.id,
content: this.content,
})
.then(({ data }) => {
if (data.success === 1) {
this.$message.success("保存成功");
this.$router.push("/technical_support/doc_manage")
this.$router.push("/technical_support/doc_manage");
} else {
this.$message.error(data.errMsg || "保存失败");
}
......
......@@ -250,7 +250,10 @@ export default {
{ max: 20, message: "长度应小于20个字符", trigger: "change" },
],
},
detail: "",
detail: {
title: "",
content: "",
},
deleteDialogInfo: {
msg: "",
submit: null,
......@@ -269,6 +272,7 @@ export default {
this.$http
.get("/apaas/support/document/list", {
params: {
search: fullFilter.name,
style: fullFilter.type,
start: fullFilter.time && fullFilter.time[0],
end: fullFilter.time && fullFilter.time[1],
......@@ -347,6 +351,7 @@ export default {
style: 0,
title: "",
};
this.$refs.addForm && this.$refs.addForm.clearValidate();
this.$refs.addDialog.show();
},
AddCancelAction() {
......@@ -424,7 +429,7 @@ export default {
<style>
.doc_manage_detail_dialog .el-dialog__body {
padding: 10px;
padding: 15px;
}
.doc_manage_detail_dialog .el-dialog__footer {
display: none;
......
......@@ -21,20 +21,15 @@ export default {
sideNavBar,
},
data: () => ({
activePath: "",
navList: [],
}),
/* watch: {
"$route.fullPath"(path) {
this.initNavList();
},
}, */
methods: {
initNavList() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(({ data }) => {
if (data.success == 1) {
let menu = data.data[0].Child;
let nav = [];
let activePath = "";
for (let i = 0; i < menu.length; i++) {
let first = menu[i];
......@@ -83,8 +78,8 @@ export default {
if (children.length === 0) {
this.$set(nav[index], "disabled", true);
} else {
if (activePath === "") {
activePath = children[0].path;
if (this.activePath === "") {
this.activePath = children[0].path;
}
this.$set(nav[index], "path", children[0].path);
......@@ -97,9 +92,9 @@ export default {
});
this.navList = nav;
if (activePath && this.$route.params.id === undefined) {
this.$router.push(activePath);
} else if (activePath === "") {
if (this.activePath && this.$route.params.id === undefined) {
this.$router.push(this.activePath);
} else if (this.activePath === "") {
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 @@
:title="detailForm.type === 0 ? '新增' : '修改'"
>
<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
label="SDK类型"
prop="style_name"
......@@ -103,10 +103,6 @@
></el-input>
</el-form-item>
<el-form-item label="SDK包上传" prop="file_url">
<!-- <el-input
v-model="detailForm.file_url"
placeholder="支持扩展名:.rar .zip"
></el-input> -->
<apass-upload
v-model="detailForm.file_url"
tip="支持扩展名:.rar .zip"
......@@ -282,11 +278,23 @@ export default {
this.$refs.list.resetCurrentPage();
},
deleteSlection() {
this.deleteDialogInfo.msg = `确认删除要删除所选项吗?`;
this.deleteDialogInfo.submit = () => {
this.deleteRequest(this.selection.map((row) => row.id));
};
this.$refs.deleteDialog.show();
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.deleteRequest(ids);
};
this.$refs.deleteDialog.show();
} else {
this.$message.warning("您尚未选中任何SDK类型");
}
},
clearSelection() {
this.$refs.list.clearSelection();
......@@ -307,58 +315,60 @@ export default {
this.$refs.detailDialog.hide();
},
detailSubmitAction() {
if (this.detailForm.type === 0) {
this.$http
.post("/apaas/support/sdk/styles/create", {
style_name: this.detailForm.style_name,
version: this.detailForm.version,
file_url: this.detailForm.file_url,
})
.then(({ data }) => {
if (data.success === 1) {
this.$message.success("新增成功");
this.refreshPage();
this.$refs.detailDialog.hide();
} else {
this.$message.error("新增失败");
}
})
.catch((error) => {
console.log(error);
this.$message.error("新增失败");
});
} else {
this.$http
.put("/apaas/support/sdk/styles/put", {
id: this.detailForm.id,
style_name: this.detailForm.style_name,
version: this.detailForm.version,
file_url: this.detailForm.file_url,
})
.then(({ data }) => {
if (data.success === 1) {
this.$message.success("修改成功");
this.refreshPage();
this.$refs.detailDialog.hide();
} else {
this.$message.error("修改失败");
}
})
.catch((error) => {
console.log(error);
this.$message.error("修改失败");
});
}
this.$refs.detailForm.validate((valid) => {
if (valid) {
if (this.detailForm.type === 0) {
this.$http
.post("/apaas/support/sdk/styles/create", {
style_name: this.detailForm.style_name,
version: this.detailForm.version,
file_url: this.detailForm.file_url,
})
.then(({ data }) => {
if (data.success === 1) {
this.$message.success("新增成功");
this.refreshPage();
this.$refs.detailDialog.hide();
} else {
this.$message.error("新增失败");
}
})
.catch((error) => {
console.log(error);
this.$message.error("新增失败");
});
} else {
this.$http
.put("/apaas/support/sdk/styles/put", {
id: this.detailForm.id,
style_name: this.detailForm.style_name,
version: this.detailForm.version,
file_url: this.detailForm.file_url,
})
.then(({ data }) => {
if (data.success === 1) {
this.$message.success("修改成功");
this.refreshPage();
this.$refs.detailDialog.hide();
} else {
this.$message.error("修改失败");
}
})
.catch((error) => {
console.log(error);
this.$message.error("修改失败");
});
}
} else {
return false;
}
});
},
editItem(item) {
this.detailForm = {
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", {
params: {
id: item.id,
......@@ -366,9 +376,12 @@ export default {
})
.then(({ data }) => {
if (data.success === 1) {
this.detailForm = data.data;
this.detailForm = {
...data.data,
type: 1,
};
}
}); */
});
this.$refs.detailDialog.show();
},
deleteItem(item) {
......
......@@ -99,6 +99,7 @@ export default {
.main_container {
flex-grow: 1;
height: calc(100% - 53px);
overflow: hidden;
}
.download_action {
background-color: #fff;
......
......@@ -4,7 +4,7 @@
title="SDK中心"
imgSrc="tool_ic_kaifawendang"
:nav-list="navList"
:title-path="navList[0] && navList[0].path"
:title-path="activePath"
style="width: 250px;"
></side-nav-bar>
<div class="main_container">
......@@ -21,76 +21,52 @@ export default {
sideNavBar,
},
data: () => ({
activePath: "",
navList: [],
}),
methods: {
initNavList() {
let activePath = "";
let baseUrl = "/technical_support/sdk";
let 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.$http.get("/apaas/support/sdk/menus").then(({ data }) => {
if (data.success === 1) {
let baseUrl = "/technical_support/sdk";
let menu = data.data || [];
this.navList = data.map((item) => {
let children = item.children;
let nav = {
name: item.name,
path: `${baseUrl}/${item.name}`,
};
this.navList = menu.map((item) => {
let children = item.children || [];
if (children.length > 0) {
nav.children = children.map((v) => {
let path = `${baseUrl}/${item.name}/${v.id}`;
let nav = {
name: item.name,
path: `${baseUrl}/${item.name}`,
};
if (children.length > 0) {
nav.children = children.map((v) => {
let path = `${baseUrl}/${item.name}/${v.id}`;
if (activePath === "") {
activePath = path;
if (this.activePath === "") {
this.activePath = path;
}
return {
name: v.name,
path: path,
};
});
nav.open = true;
} else {
nav.disabled = true;
}
return {
name: v.name,
path: path,
};
return nav;
});
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() {
......
......@@ -269,23 +269,30 @@
<div v-if="orderDetail.order_type == 1">
<div>
<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 class="detail_service_specification_val"
>2000金币/月</span
>
</div>
</div>
<div v-else-if="orderDetail.order_type == 2">
<div>
<span class="detail_service_specification_gg">{{
orderDetail.spec_app == 0
? "申请获取应用镜像部署权限:"
: "申请获取应用镜像开发权限:"
}}</span>
<span class="detail_service_specification_val"
>2000金币/月</span
>
<span class="detail_service_specification_gg">
{{
orderDetail.spec_app == 0
? "申请获取应用镜像部署权限:"
: "申请获取应用镜像开发权限:"
}}
</span>
<span class="detail_service_specification_val">
{{ orderDetail.single_money }}金币/月
</span>
</div>
</div>
<div v-else-if="orderDetail.order_type == 3">
......@@ -314,20 +321,31 @@
<div>
<span class="detail_service_money_title">总价:</span>
<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>
</el-col>
</el-row>
</div>
<div v-if="orderDetail.order_type == 2">
<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 v-if="orderDetail.order_type == 2">
<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 v-if="orderDetail.order_type == 2">
<div class="detail_s_title">应用简介:</div>
......
This diff is collapsed.
......@@ -46,6 +46,9 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource=
checkNameSpaceCouldUse(params) {
return axios.get(`/apaas/service/v3/resource/apply/checkNs?namespace=${params.id}`)
},
getSpecifications() {
return axios.get(``)
},
// shopping cart
addShoppingCart(params) {
......@@ -77,7 +80,12 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource=
},
getGeneralOverview() {
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;
......@@ -257,6 +257,14 @@ export default new Router({
"@/pages/technical-support/sdk-manage/example/index"
),
}, // SDK示例管理
{
path: "/technical_support/sdk_manage/example/:id",
name: "technicalSupportSdkExampleDetail",
component: () =>
import(
"@/pages/technical-support/sdk-manage/example/detail"
),
}, // 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