Commit 0ccb7040 authored by 张俊's avatar 张俊

流程服务接口

parent cc9168c3
...@@ -621,7 +621,7 @@ export default { ...@@ -621,7 +621,7 @@ export default {
}, },
{ {
title: "支付总价:", title: "支付总价:",
info: "2000", info: "0",
}, },
{ {
title: "审批信息", title: "审批信息",
...@@ -729,6 +729,19 @@ export default { ...@@ -729,6 +729,19 @@ export default {
this.$set(this.service_header_arr["second"][0], "text", data.req_url); this.$set(this.service_header_arr["second"][0], "text", data.req_url);
this.$set(this.service_header_arr, "url", data.cover); this.$set(this.service_header_arr, "url", data.cover);
//判断是否是服务注册出来的流程服务
if(data.data_service_type2 == 24&&data.workflows_id==0){
this.process_in_up = true
}else{
this.process_in_up = false
}
if(data.service_data_type_1 == 10){
this.perception_in = true
}else{
this.perception_in = false
}
if(this.process_in_up){ if(this.process_in_up){
var temp_sj = this.service_header_arr.first.pop() var temp_sj = this.service_header_arr.first.pop()
this.service_header_arr.second = [] this.service_header_arr.second = []
...@@ -835,6 +848,11 @@ export default { ...@@ -835,6 +848,11 @@ export default {
"info", "info",
data.service_apply_info.apply_time.replace("T", " ").split("+")[0] data.service_apply_info.apply_time.replace("T", " ").split("+")[0]
); );
this.$set(
this.apply_arr[9],
"info",
data.service_apply_info.total_money
);
this.res_table_arr = JSON.parse( this.res_table_arr = JSON.parse(
data.service_apply_info.res_fields || "[]" data.service_apply_info.res_fields || "[]"
); );
......
...@@ -265,7 +265,7 @@ export default { ...@@ -265,7 +265,7 @@ export default {
}, },
{ {
title: "总价:", title: "总价:",
info: "2000", info: "",
}, },
] ]
}; };
...@@ -365,6 +365,7 @@ export default { ...@@ -365,6 +365,7 @@ export default {
this.$set(this.list_arr[6], "url", data.service_apply_info.apply_file); this.$set(this.list_arr[6], "url", data.service_apply_info.apply_file);
this.$set(this.list_arr[8], "info", data.service_apply_info.duration+(data.service_apply_info.duration_unit==1?'':'')); this.$set(this.list_arr[8], "info", data.service_apply_info.duration+(data.service_apply_info.duration_unit==1?'':''));
this.$set(this.list_arr[9], "info", "访问次数:"+(data.service_apply_info.request_spcs&&data.service_apply_info.request_spcs.pv||'-')+"次/日 访问量:"+(data.service_apply_info.request_spcs&&data.service_apply_info.request_spcs.count||'-')+"次/日"); this.$set(this.list_arr[9], "info", "访问次数:"+(data.service_apply_info.request_spcs&&data.service_apply_info.request_spcs.pv||'-')+"次/日 访问量:"+(data.service_apply_info.request_spcs&&data.service_apply_info.request_spcs.count||'-')+"次/日");
this.$set(this.list_arr[10], "info", data.service_apply_info.total_money);
this.id = data.service_apply_info.id this.id = data.service_apply_info.id
if(data.service_apply_info.approval_status!==0){ if(data.service_apply_info.approval_status!==0){
this.servicead_arr[this.now_user].splice(1,1) this.servicead_arr[this.now_user].splice(1,1)
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div class="type_box_select"> <div class="type_box_select">
<info-list <info-list
:list_arr="now_service == 0 ? list_arr : servicead_arr" :list_arr="now_service == 0 ? list_arr : servicead_arr"
v-if="now_service == 0 || (now_service == 1&&!workflows_id&&!perception_in)" v-if="now_service == 0 || (now_service == 1&&!workflows_id&&!perception_in&&!process_in_up)"
> >
<table-um <table-um
:headers="req_header_arr" :headers="req_header_arr"
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
<p v-if="now_service == 1&&(workflows_id&&!process_in_up)"> <p v-if="now_service == 1&&(workflows_id&&!process_in_up)">
流程服务接口说明见文档中心流程服务接口文档 流程服务接口说明见文档中心流程服务接口文档
</p> </p>
<info-list :list_arr="process_in_up_arr" v-if="now_service == 1&&workflows_id&&process_in_up"> <info-list :list_arr="process_in_up_arr" v-if="now_service == 1&&!workflows_id&&process_in_up">
<div slot="service_port" class="service_port"> <div slot="service_port" class="service_port">
<el-select v-model="port_select" placeholder=""> <el-select v-model="port_select" placeholder="" @change="change_port">
<el-option <el-option
v-for="item in port_options" v-for="item in port_options"
:key="item.value" :key="item.value"
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<div v-show="now_service == 2"> <div v-show="now_service == 2">
<p class="service_title"><span></span>服务运行概况</p> <p class="service_title"><span></span>服务运行概况</p>
<div class="service_port" style="margin-bottom:20px;" v-if="process_in_up"> <div class="service_port" style="margin-bottom:20px;" v-if="process_in_up">
<el-select v-model="port_select" placeholder="" ref="select_icon" @change="iconChange"> <el-select v-model="port_select_server" placeholder="" ref="select_icon" @change="iconChange">
<el-option <el-option
v-for="item in port_options" v-for="item in port_options"
:key="item.value" :key="item.value"
...@@ -170,12 +170,12 @@ ...@@ -170,12 +170,12 @@
<table-um <table-um
v-if="process_in_up" v-if="process_in_up"
:headers="header_process_arr" :headers="header_process_arr"
:datas="service_process_arr" :datas="service_use_arr"
></table-um> ></table-um>
<table-um <table-um
v-if="perception_in" v-if="perception_in"
:headers="header_gz_process_arr" :headers="header_gz_process_arr"
:datas="service_gz_process_arr" :datas="service_use_arr"
></table-um> ></table-um>
<list-pagination <list-pagination
:total="listTotal" :total="listTotal"
...@@ -225,6 +225,7 @@ ...@@ -225,6 +225,7 @@
:couldNotEdit="false" :couldNotEdit="false"
:radius="true" :radius="true"
:isIndex="true" :isIndex="true"
:limitEditLength="2"
:datas="service_size_data" :datas="service_size_data"
@changeTable="now_size_data" @changeTable="now_size_data"
></table-um> ></table-um>
...@@ -344,6 +345,7 @@ export default { ...@@ -344,6 +345,7 @@ export default {
pageSizes: [10, 50, 100], pageSizes: [10, 50, 100],
responseParamUrl: "", responseParamUrl: "",
codeExampleUrl: "", codeExampleUrl: "",
port_select_server:'',
yx_state: { yx_state: {
state: "", state: "",
averageTime: "", averageTime: "",
...@@ -360,20 +362,20 @@ export default { ...@@ -360,20 +362,20 @@ export default {
res_gz_solt_data:[], res_gz_solt_data:[],
service_gz_process_arr:[], service_gz_process_arr:[],
trans_all_obj:{ trans_all_obj:{
all:1123, all:0,
times:13215, times:0,
month:1312, month:0,
}, },
trans_log_arr:[ trans_log_arr:[
{ {
title: "应用交易概览", title: "服务交易概览",
info: "", info: "",
prop:'title', prop:'title',
type: "solt", type: "solt",
solt_name: "trans_all", solt_name: "trans_all",
}, },
{ {
title: "应用交易记录", title: "服务交易记录",
info: "", info: "",
prop:'title', prop:'title',
type: "solt", type: "solt",
...@@ -382,19 +384,19 @@ export default { ...@@ -382,19 +384,19 @@ export default {
], ],
trans_log_header:[ trans_log_header:[
{ {
prop: "dydw", prop: "department_name",
label: "申请单位", label: "申请单位",
minWidth: "20%", minWidth: "20%",
align: "left", align: "left",
}, },
{ {
prop: "dyyw", prop: "system_name",
label: "业务系统", label: "业务系统",
minWidth: "20%", minWidth: "20%",
align: "left", align: "left",
}, },
{ {
prop: "sqr", prop: "apply_username",
label: "申请人", label: "申请人",
minWidth: "20%", minWidth: "20%",
align: "center", align: "center",
...@@ -406,35 +408,25 @@ export default { ...@@ -406,35 +408,25 @@ export default {
align: "left", align: "left",
}, },
{ {
prop: "sqsc", prop: "duration_name",
label: "购买时长", label: "购买时长",
width: "110px", width: "110px",
align: "center", align: "center",
}, },
{ {
prop: "price", prop: "total_money",
label: "订单总价", label: "订单总价",
width: "150px", width: "150px",
align: "center", align: "center",
}, },
{ {
prop: "sqsj", prop: "trade_time",
label: "交易时间", label: "交易时间",
width: "160px", width: "160px",
align: "center", align: "center",
}, },
], ],
trans_log_data:[ trans_log_data:[],
{
dydw:'机关事务局',
dyyw:'业务系统',
sqr:'超管用户',
gg:'申请获取应用镜像部署权限(3000/月)',
sqsc:'1',
price:'3000金币',
sqsj:'2020-10-12 10:30:52'
}
],
res_solt_header_arr: [ res_solt_header_arr: [
{ {
prop: "name", prop: "name",
...@@ -460,7 +452,7 @@ export default { ...@@ -460,7 +452,7 @@ export default {
align: "left", align: "left",
}, },
{ {
prop: "is_must", prop: "example",
label: "字段示例数值", label: "字段示例数值",
align: "center", align: "center",
width: 240, width: 240,
...@@ -491,7 +483,7 @@ export default { ...@@ -491,7 +483,7 @@ export default {
align: "left", align: "left",
}, },
{ {
prop: "is_must", prop: "example",
label: "字段示例数值", label: "字段示例数值",
align: "center", align: "center",
width: 240, width: 240,
...@@ -849,25 +841,25 @@ export default { ...@@ -849,25 +841,25 @@ export default {
align: "center", align: "center",
}, },
{ {
prop: "type", prop: "spcs_type",
label: "规格类型", label: "规格类型",
minWidth: "33.33%", minWidth: "33.33%",
align: "center", align: "center",
}, },
{ {
prop: "pv", prop: "gg",
label: "规格", label: "规格",
minWidth: "33.33%", minWidth: "33.33%",
align: "center", align: "center",
}, },
{ {
prop: "pv", prop: "time",
label: "购买时长", label: "购买时长",
width: "200px", width: "200px",
align: "center", align: "center",
}, },
{ {
prop: "des", prop: "descript",
label: "规格说明", label: "规格说明",
minWidth: "33.33%", minWidth: "33.33%",
align: "left", align: "left",
...@@ -875,7 +867,7 @@ export default { ...@@ -875,7 +867,7 @@ export default {
], ],
edit_size_arr: [ edit_size_arr: [
{ {
prop: "type", prop: "spcs_type",
label: '规格类型<span title="计次收费规格:仅依据服务调用次数进行收费,不限时长。&#10;时长收费规格:按月为时间单位进行收费,每月使用次数不限。"><img style="margin-left:5px;vertical-align:-3px;" src="'+require('../../../assets/imgs/money_table_ico.png')+'" alt=""></span>', label: '规格类型<span title="计次收费规格:仅依据服务调用次数进行收费,不限时长。&#10;时长收费规格:按月为时间单位进行收费,每月使用次数不限。"><img style="margin-left:5px;vertical-align:-3px;" src="'+require('../../../assets/imgs/money_table_ico.png')+'" alt=""></span>',
width: "180px", width: "180px",
align: "center", align: "center",
...@@ -892,7 +884,7 @@ export default { ...@@ -892,7 +884,7 @@ export default {
] ]
}, },
{ {
prop: "count", prop: "money",
label: "价格/金币", label: "价格/金币",
width: "200px", width: "200px",
align: "center", align: "center",
...@@ -901,7 +893,7 @@ export default { ...@@ -901,7 +893,7 @@ export default {
{ {
prop: "pv", prop: "pv",
label: '调用次数<span title="该规格提供的服务调用次数。"><img style="margin-left:5px;vertical-align:-3px;" src="'+require('../../../assets/imgs/money_table_ico.png')+'" alt=""></span>', label: '调用次数<span title="该规格提供的服务调用次数。"><img style="margin-left:5px;vertical-align:-3px;" src="'+require('../../../assets/imgs/money_table_ico.png')+'" alt=""></span>',
width: "200px", width: "150px",
align: "center", align: "center",
type: "input", type: "input",
}, },
...@@ -918,7 +910,7 @@ export default { ...@@ -918,7 +910,7 @@ export default {
align: "left" align: "left"
}, },
{ {
prop: "des", prop: "descript",
label: "规格说明", label: "规格说明",
minWidth: "33.33%", minWidth: "33.33%",
align: "left", align: "left",
...@@ -976,8 +968,8 @@ export default { ...@@ -976,8 +968,8 @@ export default {
process_in_up_arr:[ process_in_up_arr:[
{ {
title: "接口文档:", title: "接口文档:",
info: "接口文档示例.docx", info: "",
url: "11111", url: "",
type: "down", type: "down",
}, },
{ {
...@@ -990,11 +982,11 @@ export default { ...@@ -990,11 +982,11 @@ export default {
port_solt_arr:[ port_solt_arr:[
{ {
title: "服务地址:", title: "服务地址:",
info: "12312312", info: "",
}, },
{ {
title: "请求方式:", title: "请求方式:",
info: "12123", info: "",
}, },
{ {
title: "编码格式:", title: "编码格式:",
...@@ -1059,19 +1051,7 @@ export default { ...@@ -1059,19 +1051,7 @@ export default {
solt_name: "response_code", solt_name: "response_code",
}, },
], ],
port_options:[ port_options:[],
{
label:'接口1',
value:'qweqweqsdfsdf',
able:true,
},
{
label:'接口2',
value:'qweqweqsdfsdfwer2w23',
able:false,
},
],
service_type_arr: [ service_type_arr: [
"数据服务", "数据服务",
"时空服务", "时空服务",
...@@ -1136,6 +1116,11 @@ export default { ...@@ -1136,6 +1116,11 @@ export default {
created() { created() {
if (this.userInfo) { if (this.userInfo) {
this.now_user = this.level; this.now_user = this.level;
if(this.now_user==1||this.now_user==2){
this.in_origin_ser = true
}else{
this.in_origin_ser = false
}
} else { } else {
this.getCurrentUser(); this.getCurrentUser();
} }
...@@ -1145,6 +1130,19 @@ export default { ...@@ -1145,6 +1130,19 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
change_port(val){
this.port_options.forEach(e => {
if(e.value == val){
this.$set(this.port_solt_arr[0],'info',e.value)
this.$set(this.port_solt_arr[1],'info',e.req_type)
this.$set(this.port_solt_arr[2],'info',e.encode_method)
this.req_solt_data = e.req_fields
this.res_solt_data = e.res_fields
this.req_solt_code_arr = e.req_fields_example
this.res_solt_code_arr = e.res_fields_example
}
});
},
changePageSize(value) { changePageSize(value) {
this.pageSize = value; this.pageSize = value;
this.currentPage = 1; this.currentPage = 1;
...@@ -1153,7 +1151,7 @@ export default { ...@@ -1153,7 +1151,7 @@ export default {
transchangePageSize(value) { transchangePageSize(value) {
this.transpageSize = value; this.transpageSize = value;
this.transcurrentPage = 1; this.transcurrentPage = 1;
this.get_trans_data()
}, },
changeCurrentPage(value) { changeCurrentPage(value) {
this.currentPage = value; this.currentPage = value;
...@@ -1161,7 +1159,7 @@ export default { ...@@ -1161,7 +1159,7 @@ export default {
}, },
transchangeCurrentPage(value) { transchangeCurrentPage(value) {
this.transcurrentPage = value; this.transcurrentPage = value;
this.get_trans_data()
}, },
iconChange (val) { iconChange (val) {
// el-select实际上是两层div包裹的input // el-select实际上是两层div包裹的input
...@@ -1186,6 +1184,8 @@ export default { ...@@ -1186,6 +1184,8 @@ export default {
inputDom.setAttribute('style', 'padding-left: 60px;'); inputDom.setAttribute('style', 'padding-left: 60px;');
// 将添加的标签放到input前面 // 将添加的标签放到input前面
dom.children[0].insertBefore(svgDom, inputDom); dom.children[0].insertBefore(svgDom, inputDom);
this.getData()
}, },
get_use_list() { get_use_list() {
this.service_use_arr = []; this.service_use_arr = [];
...@@ -1211,6 +1211,11 @@ export default { ...@@ -1211,6 +1211,11 @@ export default {
? `访问次数:${e.request_spcs.count}/日 访问量:${e.request_spcs.pv}/日` ? `访问次数:${e.request_spcs.count}/日 访问量:${e.request_spcs.pv}/日`
: "", : "",
sqsc: e.duration + ["", "个月", ""][e.duration_unit || 0], sqsc: e.duration + ["", "个月", ""][e.duration_unit || 0],
jkmc:'',
jkdz:'',
state:'',
time:'',
count:''
}); });
}); });
} }
...@@ -1229,6 +1234,11 @@ export default { ...@@ -1229,6 +1234,11 @@ export default {
if (data.success == 1) { if (data.success == 1) {
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level; this.now_user = this.level;
if(this.now_user==1||this.now_user==2){
this.in_origin_ser = true
}else{
this.in_origin_ser = false
}
console.log(this.level); console.log(this.level);
} else { } else {
console.log(data.errMsg); console.log(data.errMsg);
...@@ -1241,6 +1251,29 @@ export default { ...@@ -1241,6 +1251,29 @@ export default {
this.datas = response.data.elements; this.datas = response.data.elements;
}); });
}, },
get_trans_data(){
this.$http
.get(
`/apaas/service/v3/service/manager/service/trade/list?page=${this.currentPage}&size=${this.pageSize}&service_id=${this.$route.params.id}`
).then(res=>{
console.log(res);
// listTotal: 0,
if(res.data.success){
this.listTotal = res.data.total
var temp = res.data.data||[]
temp.forEach(e => {
if(e.spcs_type==1){
e.duration_name = '不限时长'
e.gg = `${e.spcs_count}次/ ${e.single_money} 元`
}else if(e.spcs_type==2){
e.duration_name = e.duration+''
e.gg = `${e.single_money} 元/月`
}
});
this.trans_log_data = temp
}
})
},
getServiceInfo() { getServiceInfo() {
this.$http this.$http
.get( .get(
...@@ -1250,7 +1283,7 @@ export default { ...@@ -1250,7 +1283,7 @@ export default {
.then((response) => { .then((response) => {
if (response.data.success === 1) { if (response.data.success === 1) {
let data = response.data.data; let data = response.data.data;
this.namespace = data.namespace; this.namespace = data.urls[0].namespace;
if(data.workflows_id){ if(data.workflows_id){
this.workflows_id = data.workflows_id this.workflows_id = data.workflows_id
}else{ }else{
...@@ -1303,8 +1336,55 @@ export default { ...@@ -1303,8 +1336,55 @@ export default {
"fixedurl", "fixedurl",
this.$route.path.replace("servicedetail", "serviceedit") this.$route.path.replace("servicedetail", "serviceedit")
); );
this.trans_all_obj={
all:data.sale_total_money,
times:data.sale_total,
month:data.sale_month_total,
}
//判断是否是服务注册出来的流程服务
if(data.data_service_type2 == 24&&data.workflows_id==0){
this.process_in_up = true
this.$set(this.process_in_up_arr[0],'info',data.doc_file.split('/')[data.doc_file.split('/').length-1])
this.$set(this.process_in_up_arr[0],'url',data.doc_file)
var temp_port_arr = []
data.urls.forEach(e => {
temp_port_arr.push({
label:e.req_name,
value:e.req_url,
able:e.state==-1?false:true,
...e
})
});
this.port_options = temp_port_arr
if(this.port_options[0]){
this.port_select = this.port_options[0].value
this.$set(this.port_solt_arr[0],'info',this.port_options[0].value)
this.$set(this.port_solt_arr[1],'info',this.port_options[0].req_type)
this.$set(this.port_solt_arr[2],'info',this.port_options[0].encode_method)
this.req_solt_data = this.port_options[0].req_fields
this.res_solt_data = this.port_options[0].res_fields
this.req_solt_code_arr = this.port_options[0].req_fields_example
this.res_solt_code_arr = this.port_options[0].res_fields_example
}
}else{
this.process_in_up = false
}
if(data.service_data_type_1 == 10){
this.perception_in = true
this.$set(this.gz_solt_arr[0],'info',data.urls[0].req_url)
this.$set(this.gz_solt_arr[1],'info',data.urls[0].encode_method)
this.req_gz_solt_data = data.urls[0].req_fields
this.res_gz_solt_data = data.urls[0].res_fields
this.req_solt_code_arr = data.urls[0].req_fields_example
this.res_solt_code_arr = data.urls[0].res_fields_example
}else{
this.perception_in = false
}
console.log(this.process_in_up,this.perception_in);
if(this.process_in_up){ if(this.process_in_up){
this.get_trans_data()
var temp_sj = this.service_header_arr.first.pop() var temp_sj = this.service_header_arr.first.pop()
this.service_header_arr.second = [] this.service_header_arr.second = []
this.service_header_arr.second.push(temp_sj) this.service_header_arr.second.push(temp_sj)
...@@ -1353,15 +1433,23 @@ export default { ...@@ -1353,15 +1433,23 @@ export default {
this.$set(this.servicead_arr[5], "info", "无响应示例"); this.$set(this.servicead_arr[5], "info", "无响应示例");
} }
// 接口详情信息 end // 接口详情信息 end
var temp = data.request_spcs_info||[]
this.service_size_data = data.request_spcs_info; temp.forEach((e,idx) => {
this.size_arr_down = data.request_spcs_info; e.index = idx+1
this.buy_type = data.request_spcs_info[0].type; if(e.spcs_type==1){
if (this.buy_type == 3) { e.gg = e.money+'/'+e.spcs_count
this.buy_style = [1, 2]; e.time = '不限时长'
} else { e.pv = e.spcs_count
this.buy_style = [this.buy_type]; e.d_price = e.money
}else if(e.spcs_type==1){
e.gg = e.money+'/月'
e.time = '1个月'
e.pv = '不限次数'
e.d_price = '-'
} }
});
this.service_size_data =temp;
this.size_arr_down =temp;
} else { } else {
this.$message({ this.$message({
message: response.data.errMsg, message: response.data.errMsg,
...@@ -1374,24 +1462,24 @@ export default { ...@@ -1374,24 +1462,24 @@ export default {
now_size_data(val) { now_size_data(val) {
console.log(val); console.log(val);
val.forEach(e => { val.forEach(e => {
if(e.type==1){ if(e.spcs_type==1){
if(e.pv=='不限次数'){ if(e.pv=='不限次数'){
e.pv = '' e.pv = ''
e.time = '' e.time = ''
e.des = '' e.descript = ''
e.count = '' e.money = ''
e.d_price = '' e.d_price = ''
} }
e.time = '不限时长' e.time = '不限时长'
e.des = '提供'+e.pv+'次服务,时长不限' e.descript = '提供'+e.pv+'次服务,时长不限'
if(e.count&&e.pv){ if(e.money&&e.pv){
e.d_price = parseInt(e.count/e.pv)+'金币/次' e.d_price = parseInt(e.money/e.pv)+'金币/次'
} }
}else if(e.type==2){ }else if(e.spcs_type==2){
e.pv = '不限次数' e.pv = '不限次数'
e.d_price = '-' e.d_price = '-'
e.time = '按月' e.time = '按月'
e.des = '每月不限调用次数' e.descript = '每月不限调用次数'
} }
}); });
...@@ -1406,38 +1494,41 @@ export default { ...@@ -1406,38 +1494,41 @@ export default {
.then((response) => { .then((response) => {
let data = response.data.data; let data = response.data.data;
console.log(data); console.log(data);
this.service_size_data = data.data; var temp = data.data||[]
this.buy_type = data.data[0].type; temp.forEach((e,idx) => {
if (this.buy_type == 3) { e.index = idx+1
this.buy_style = [1, 2]; if(e.spcs_type==1){
} else { e.gg = e.money+'/'+e.spcs_count
this.buy_style = [this.buy_type]; e.time = '不限时长'
e.pv = e.spcs_count
e.d_price = ''
}else if(e.spcs_type==1){
e.gg = e.money+'/月'
e.time = '1个月'
e.pv = '不限次数'
e.d_price = '-'
} }
});
this.service_size_data = temp;
}) })
.catch(function(response) {}); .catch(function(response) {});
}, },
change_service_size() { change_service_size() {
let temp = []; let temp = [];
this.size_arr_down.forEach((e) => { this.size_arr_down.forEach((e) => {
if (e.pv && e.count) { if (e.pv && e.money&&e.spcs_type) {
if (e.flag) { e.id = 0
e.id = 0;
}
if (this.buy_style.length == 0) {
this.$message.error("请选择申请时长");
return;
} else if (this.buy_style.length == 2) {
e.type = 3;
} else {
e.type = this.buy_style[0];
}
delete e.undefined; delete e.undefined;
delete e.flag; delete e.flag;
e.pv = parseInt(e.pv); e.spcs_count = e.spcs_type==1?parseInt(e.pv):0;
e.count = parseInt(e.count); e.money = parseFloat(e.money);
e.duration=1
e.duration_unit=1
temp.push(e); temp.push(e);
} }
}); });
console.log(this.size_arr_down);
this.$http this.$http
.post("/apaas/service/v3/service/manager/request/spcs/save", { .post("/apaas/service/v3/service/manager/request/spcs/save", {
service_id: parseInt(this.$route.params.id), service_id: parseInt(this.$route.params.id),
...@@ -1613,6 +1704,7 @@ export default { ...@@ -1613,6 +1704,7 @@ export default {
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
margin-bottom: 30px; margin-bottom: 30px;
margin-top: 20px;
} }
.savebtn { .savebtn {
margin-top: 50px; margin-top: 50px;
......
...@@ -1042,7 +1042,7 @@ export default { ...@@ -1042,7 +1042,7 @@ export default {
pic: require("@/assets/imgs/home_tool_ic_shuju.png"), pic: require("@/assets/imgs/home_tool_ic_shuju.png"),
text: "数据采集管理", text: "数据采集管理",
role: 2, role: 2,
url: "/data_acquisition/file" url: "https://apaas3.wodcloud.com/sjcj/ui/#/data_acquisition/file"
}, },
{ {
pic: require("@/assets/imgs/home_tool_ic_message.png"), pic: require("@/assets/imgs/home_tool_ic_message.png"),
...@@ -1441,7 +1441,11 @@ export default { ...@@ -1441,7 +1441,11 @@ export default {
}, },
manage_func(n) { manage_func(n) {
console.log(n); console.log(n);
if(n.indexOf('http')!==-1){
window.location.href = n
}else{
this.$router.push(n); this.$router.push(n);
}
}, },
init_health(num) { init_health(num) {
var options = { var options = {
......
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