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

so on

parent 4cccbbf6
......@@ -71,14 +71,22 @@
</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金币/月"
? "申请获取应用镜像部署权限:" +
cellItem.single_money +
"金币/月"
: "申请获取应用镜像开发权限:" +
cellItem.single_money +
"金币/月"
}}
</div>
</div>
......@@ -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,6 +34,19 @@
<span v-text="data.create_date"></span>
</li>
</ul>
<div class="and_wid">
<div class="dbn_wkdn">
&nbsp;&nbsp;格:
<span class="ndwa_indowa"> {{ specification && specification.single_money ? specification.single_money * duration : 0 }} </span>
<span class="kfdf_jffa">金币</span>
</div>
<div class="nmd_kwd">
月售:
<span class="ndwa_dn"> {{ data.mount_count }}</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>
<div class="btn_container">
......@@ -47,6 +60,16 @@
</el-button>
</div>
</div>
<div class="commodity_information">
<span>购买时长:</span>
<div class="btn_container">
<el-input-number
v-model="duration"
:min="1"
:disabled="actionDisabled"
></el-input-number>
</div>
</div>
<div class="commodity_action">
<el-button type="warning" plain @click="addToCart">
加入购物车
......@@ -80,7 +103,13 @@ export default {
},
],
specificationID: 1,
duration: 1,
}),
computed: {
actionDisabled() {
return this.specifications.length == 0;
},
},
methods: {
changeSpecification({ value }) {
this.specificationID = value;
......@@ -253,6 +282,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,15 +61,46 @@
<span v-text="data.descript"></span>
</li>
</ul>
<div class="and_wid">
<div class="dbn_wkdn">
&nbsp;&nbsp;格:<span class="ndwa_indowa">
{{ specification && specification.single_money ? specification.single_money : 0 }}
</span>
<span class="kfdf_jffa">金币</span>
</div>
<div class="nmd_kwd">
月售:<span class="ndwa_dn">{{ data.mount_count }}</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.spce_type_1 && data.spce_type_1.length == 0" class="commodity_text"
>暂无</span
>
<div v-else class="btn_container">
<el-button
v-for="(item, index) in data.spce_type_1"
:key="'spcs_' + index"
:type="item.id === specification.id ? 'primary' : 'default'"
@click="changeSpecification(item, 0)"
>
{{ item.name }}
</el-button>
</div>
</div>
<div class="commodity_information">
<span>时长收费规格:</span>
<span v-if="data.spce_type_2 && data.spce_type_2.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.spce_type_2"
:key="'spcs_' + index"
:type="item.id === specification.id ? 'primary' : 'default'"
@click="changeSpecification(item)"
@click="changeSpecification(item, 1)"
>
{{ item.name }}
</el-button>
......@@ -76,31 +115,21 @@
v-text="(specification && specification.descript) || '-'"
></span>
</div>
<div class="commodity_information">
<span>购买方式:</span>
<span v-if="actionDisabled" class="commodity_text">暂无</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)"
>
</el-button>
</div>
</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>
></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 +154,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,6 +174,7 @@ export default {
type: 0, // 购买方式 1:按月,2:按年
specification: {}, // 规格
duration: 1, // 时长
showTime: false,
}),
computed: {
specifications() {
......@@ -170,8 +200,13 @@ export default {
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;
......@@ -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;
}
});
......
This diff is collapsed.
......@@ -4,7 +4,9 @@
<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="5" class="shopping_all_head_item">规格</el-col>
......@@ -40,31 +42,38 @@
<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>
{{ list.length }} 项服务,已选择 <span>{{ getNum }}</span> 项,共
<span>{{ getSumCoin }}</span> 金币
</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 +106,15 @@ export default {
);
return num;
},
getSumCoin() {
let sum = 0;
this.checkList.forEach((item, index) => {
if (item) {
sum += 10;
}
});
return sum;
},
getCartState() {
return this.$store.state.cartState;
},
......@@ -129,7 +147,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;
......
......@@ -51,6 +51,7 @@
:data="selectedTabsPage"
:size="size"
:height="height"
:max-height="maxheight"
:border="border"
@select="select"
@select-all="selectAll"
......@@ -200,6 +201,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>
......@@ -380,6 +388,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 = [
......
......@@ -88,6 +88,7 @@ export default {
],
descript: datas.descript,
serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail,
};
this.detailData = [
......
......@@ -94,6 +94,7 @@ export default {
],
descript: datas.descript,
serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail,
};
this.detailData = [
......
......@@ -89,6 +89,7 @@ export default {
],
descript: datas.descript,
serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail,
};
this.detailData = [
{
......
......@@ -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">{{
<span class="detail_service_specification_gg">
{{
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 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>
......
......@@ -1146,8 +1146,12 @@ export default {
let request = this.$refs.fwcs_zhfw_www.getTableData().concat();
let arr = [];
request.pop();
request.forEach(item => {
arr.push({key: item.requestEncoding, val: item.requestValue, field_type: "text"})
request.forEach((item) => {
arr.push({
key: item.requestEncoding,
val: item.requestValue,
field_type: "text",
});
});
bodys = JSON.stringify(arr);
}
......@@ -1393,84 +1397,90 @@ export default {
}
},
registePt() {
console.log(this.jkwds);
// this.$refs.form.validate((valid) => {
// if (valid) {
// if (this.cover.length != 0) {
// let contentType = "";
// if (this.activeBtn == 1 && !this.is_portal) {
// this.addPortalItem();
// } else {
// if (this.activeBtn == 0 || this.activeBtn == 3) {
// contentType = this.sjfwQqt;
// } else if (this.activeBtn == 4) {
// if (this.activeZh == 1) {
// contentType = this.zhfwQqt;
// }
// }
// let query = {
// name: this.form.name,
// sectors: this.form.area,
// organization: this.form.origin,
// cover: this.cover[0],
// openness: this.form.resource,
// descript: this.form.desc,
// data_service_type1: this.btnList[this.activeBtn].id,
// data_service_type2:
// this.activeBtn == 0
// ? 12
// : this.activeBtn == 1
// ? this.skfwQqt
// : this.activeBtn == 4
// ? this.zhyyVal
// : 0,
// portal_id: this.portal_id,
// encode_method: this.form.code,
// doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "",
// urls: [
// {
// name: "",
// response_type:
// this.activeBtn == 3 ? this.gz_fhsjgs : "JSON",
// req_auth_mthod: 0,
// req_auth_token: this.tokenVal,
// method: this.select,
// url: this.serviceUrl,
// request_fields:
// this.dataType == "body"
// ? this.request_fields
// : this.body_fields,
// request_query_fields:
// this.dataType == "param"
// ? this.request_fields
// : 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.$router.push("/fwgl/" + this.$store.getters.level);
// } else {
// console.log(response.data.errMsg);
// this.$message.error(response.data.errMsg);
// }
// });
// }
// } else {
// this.$message.error("请上传服务封面");
// }
// } else {
// this.$message.error("请完善服务基本信息");
// }
// });
this.$refs.form.validate((valid) => {
if (valid) {
if (this.activeBtn == 3 && this.jkwds.length == 0) {
this.$message.error("请上传接口文档");
} else {
if (this.cover.length != 0) {
let contentType = "";
if (this.activeBtn == 1 && !this.is_portal) {
this.addPortalItem();
} else {
if (this.activeBtn == 0 || this.activeBtn == 3) {
contentType = this.sjfwQqt;
} else if (this.activeBtn == 4) {
if (this.activeZh == 1) {
contentType = this.zhfwQqt;
}
}
let query = {
name: this.form.name,
sectors: this.form.area,
organization: this.form.origin,
cover: this.cover[0],
openness: this.form.resource,
descript: this.form.desc,
data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2:
this.activeBtn == 0
? 12
: this.activeBtn == 1
? this.skfwQqt
: this.activeBtn == 4
? this.zhyyVal
: 0,
portal_id: this.portal_id,
encode_method: this.form.code,
doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "",
urls: [
{
name: "",
response_type:
this.activeBtn == 3 ? this.gz_fhsjgs : "JSON",
req_auth_mthod: 0,
req_auth_token: this.tokenVal,
method: this.select,
url: this.serviceUrl,
request_fields:
this.dataType == "body"
? this.request_fields
: this.body_fields,
request_query_fields:
this.dataType == "param"
? this.request_fields
: 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.$router.push("/fwgl/" + this.$store.getters.level);
} else {
console.log(response.data.errMsg);
this.$message.error(response.data.errMsg);
}
});
}
} else {
this.$message.error("请上传服务封面");
}
}
} else {
this.$message.error("请完善服务基本信息");
}
});
},
registeOne() {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.cover.length != 0) {
if (this.jkwds.length == 0) {
this.$message.error("请上传接口文档");
} else {
let urls = [];
this.liucheng_list.forEach((item) => {
urls.push({
......@@ -1504,6 +1514,7 @@ export default {
portal_id: this.portal_id,
encode_method: this.form.code,
urls: urls,
doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "",
};
this.$api.workbench.serviceAdd(query).then((response) => {
if (response.data.success == 1) {
......@@ -1514,6 +1525,7 @@ export default {
this.$message.error(response.data.errMsg);
}
});
}
} else {
this.$message.error("请上传服务封面");
}
......
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