Commit 2dbb5a24 authored by 徐一鸣's avatar 徐一鸣

申请的服务-详情页-申请的规格、申请时间字段显示异常

parent 4fc90ea0
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
:header="listHeader" :header="listHeader"
:data="listData" :data="listData"
:padding-left="listPaddingLeft" :padding-left="listPaddingLeft"
:select="listSelect"
@select="selectAction" @select="selectAction"
></list-table> ></list-table>
</div> </div>
......
...@@ -16,20 +16,33 @@ ...@@ -16,20 +16,33 @@
:style=" :style="
now_service == index ? { borderBottom: '4px solid #f5ab4c' } : {} now_service == index ? { borderBottom: '4px solid #f5ab4c' } : {}
" "
>{{ item }}</div> >
{{ item }}
</div>
</div> </div>
<div class="type_box_select"> <div class="type_box_select">
<info-list :list_arr="process_in_up_arr" v-if="now_service == 1&&process_in_up"> <info-list
:list_arr="process_in_up_arr"
v-if="now_service == 1 && process_in_up"
>
<div slot="service_port" class="service_port"> <div slot="service_port" class="service_port">
<el-select v-model="port_select" placeholder="" @change="change_port"> <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"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
<div class="port_bg_box" style="padding:20px;background-color:#f8f9fd;margin-top:10px;"> <div
class="port_bg_box"
style="padding:20px;background-color:#f8f9fd;margin-top:10px;"
>
<info-list :list_arr="port_solt_arr"> <info-list :list_arr="port_solt_arr">
<table-um <table-um
:headers="req_solt_header_arr" :headers="req_solt_header_arr"
...@@ -37,33 +50,52 @@ ...@@ -37,33 +50,52 @@
:stripe="true" :stripe="true"
slot="request_table" slot="request_table"
></table-um> ></table-um>
<v-apaas-code :datas="req_solt_code_arr" slot="request_code" :readOnly="true"></v-apaas-code> <v-apaas-code
:datas="req_solt_code_arr"
slot="request_code"
:readOnly="true"
></v-apaas-code>
<table-um <table-um
:headers="res_solt_header_arr" :headers="res_solt_header_arr"
:datas="res_solt_data" :datas="res_solt_data"
:stripe="true" :stripe="true"
slot="response_table" slot="response_table"
></table-um> ></table-um>
<v-apaas-code :datas="res_solt_code_arr" slot="response_code" :readOnly="true"></v-apaas-code> <v-apaas-code
:datas="res_solt_code_arr"
slot="response_code"
:readOnly="true"
></v-apaas-code>
</info-list> </info-list>
</div> </div>
</div> </div>
</info-list> </info-list>
<info-list :list_arr="perception_solt_arr" v-if="now_service == 1&&perception_in"> <info-list
:list_arr="perception_solt_arr"
v-if="now_service == 1 && perception_in"
>
<table-um <table-um
:headers="perception_req_solt_header_arr" :headers="perception_req_solt_header_arr"
:datas="req_solt_data" :datas="req_solt_data"
:stripe="true" :stripe="true"
slot="request_table" slot="request_table"
></table-um> ></table-um>
<v-apaas-code :datas="req_solt_code_arr" slot="request_code" :readOnly="true"></v-apaas-code> <v-apaas-code
:datas="req_solt_code_arr"
slot="request_code"
:readOnly="true"
></v-apaas-code>
<table-um <table-um
:headers="perception_res_solt_header_arr" :headers="perception_res_solt_header_arr"
:datas="res_solt_data" :datas="res_solt_data"
:stripe="true" :stripe="true"
slot="response_table" slot="response_table"
></table-um> ></table-um>
<v-apaas-code :datas="res_solt_code_arr" slot="response_code" :readOnly="true"></v-apaas-code> <v-apaas-code
:datas="res_solt_code_arr"
slot="response_code"
:readOnly="true"
></v-apaas-code>
</info-list> </info-list>
<info-list <info-list
v-else v-else
...@@ -87,11 +119,16 @@ ...@@ -87,11 +119,16 @@
:datas="res_table_arr" :datas="res_table_arr"
slot="apply_table" slot="apply_table"
></table-um> ></table-um>
<v-apaas-code :datas="res_code_arr" slot="res_code" :readOnly="true"></v-apaas-code> <v-apaas-code
<process-card :data="use_approval_arr" slot="approval"></process-card> :datas="res_code_arr"
slot="res_code"
:readOnly="true"
></v-apaas-code>
<process-card
:data="use_approval_arr"
slot="approval"
></process-card>
</info-list> </info-list>
</div> </div>
</div> </div>
</div> </div>
...@@ -116,18 +153,18 @@ export default { ...@@ -116,18 +153,18 @@ export default {
data() { data() {
return { return {
use_approval_arr: [], use_approval_arr: [],
process_in_up:false,//是否是服务注册产生的 process_in_up: false, //是否是服务注册产生的
perception_in:false,//是否是感知服务 perception_in: false, //是否是感知服务
service_apply_type:1,//服务申请的方式,1:计次收费2:时长收费 service_apply_type: 1, //服务申请的方式,1:计次收费2:时长收费
port_select:'', port_select: "",
req_solt_code_arr:'', req_solt_code_arr: "",
res_solt_code_arr:'', res_solt_code_arr: "",
perception_req_solt_code_arr:'', perception_req_solt_code_arr: "",
perception_res_solt_code_arr:'', perception_res_solt_code_arr: "",
req_solt_data:[], req_solt_data: [],
res_solt_data:[], res_solt_data: [],
perception_req_solt_data:[], perception_req_solt_data: [],
perception_res_solt_data:[], perception_res_solt_data: [],
req_solt_header_arr: [ req_solt_header_arr: [
{ {
prop: "name", prop: "name",
...@@ -262,8 +299,8 @@ export default { ...@@ -262,8 +299,8 @@ export default {
width: 240, width: 240,
}, },
], ],
port_options:[], port_options: [],
port_solt_arr:[ port_solt_arr: [
{ {
title: "服务地址:", title: "服务地址:",
info: "", info: "",
...@@ -301,7 +338,7 @@ export default { ...@@ -301,7 +338,7 @@ export default {
solt_name: "response_code", solt_name: "response_code",
}, },
], ],
perception_solt_arr:[ perception_solt_arr: [
{ {
title: "接口文档:", title: "接口文档:",
info: "", info: "",
...@@ -339,9 +376,9 @@ export default { ...@@ -339,9 +376,9 @@ export default {
info: "", info: "",
type: "solt", type: "solt",
solt_name: "response_code", solt_name: "response_code",
} },
], ],
process_in_up_arr:[ process_in_up_arr: [
{ {
title: "接口文档:", title: "接口文档:",
info: "", info: "",
...@@ -353,7 +390,7 @@ export default { ...@@ -353,7 +390,7 @@ export default {
info: "", info: "",
type: "solt", type: "solt",
solt_name: "service_port", solt_name: "service_port",
} },
], ],
approval_arr: [ approval_arr: [
{ {
...@@ -477,7 +514,7 @@ export default { ...@@ -477,7 +514,7 @@ export default {
service_header_arr: { service_header_arr: {
id: "", id: "",
isMap: false, isMap: false,
isProcess:false, isProcess: false,
name: "", name: "",
first: [ first: [
{ {
...@@ -652,7 +689,7 @@ export default { ...@@ -652,7 +689,7 @@ export default {
}, },
], // 响应参数-header ], // 响应参数-header
res_table_arr: [], // 响应参数 res_table_arr: [], // 响应参数
res_code_arr: "" res_code_arr: "",
}; };
}, },
watch: {}, watch: {},
...@@ -662,16 +699,16 @@ export default { ...@@ -662,16 +699,16 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
change_port(val){ change_port(val) {
this.port_options.forEach(e => { this.port_options.forEach((e) => {
if(e.value == val){ if (e.value == val) {
this.$set(this.port_solt_arr[0],'info',e.value) 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[1], "info", e.req_type);
this.$set(this.port_solt_arr[2],'info',e.encode_method) this.$set(this.port_solt_arr[2], "info", e.encode_method);
this.req_solt_data = e.req_fields this.req_solt_data = e.req_fields;
this.res_solt_data = e.res_fields this.res_solt_data = e.res_fields;
this.req_solt_code_arr = e.req_fields_example this.req_solt_code_arr = e.req_fields_example;
this.res_solt_code_arr = e.res_fields_example this.res_solt_code_arr = e.res_fields_example;
} }
}); });
}, },
...@@ -727,52 +764,84 @@ export default { ...@@ -727,52 +764,84 @@ export default {
: "#e15260" : "#e15260"
); );
this.$set(this.service_header_arr["second"][0], "text", data.service_apply_info.urls[0].req_url); this.$set(
this.service_header_arr["second"][0],
"text",
data.service_apply_info.urls[0].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){ if (data.data_service_type2 == 24 && data.workflows_id == 0) {
this.process_in_up = true 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.$set(this.process_in_up_arr[0],'url',data.doc_file) this.process_in_up_arr[0],
var temp_port_arr = [] "info",
data.urls.forEach(e => { 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({ temp_port_arr.push({
label:e.req_name, label: e.req_name,
value:e.req_url, value: e.req_url,
able:e.state==-1?false:true, able: e.state == -1 ? false : true,
...e ...e,
})
}); });
this.port_options = temp_port_arr });
if(this.port_options[0]){ this.port_options = temp_port_arr;
this.port_select = this.port_options[0].value if (this.port_options[0]) {
this.$set(this.port_solt_arr[0],'info',this.port_options[0].value) this.port_select = this.port_options[0].value;
this.$set(this.port_solt_arr[1],'info',this.port_options[0].req_type) this.$set(
this.$set(this.port_solt_arr[2],'info',this.port_options[0].encode_method) this.port_solt_arr[0],
this.req_solt_data = this.port_options[0].req_fields "info",
this.res_solt_data = this.port_options[0].res_fields this.port_options[0].value
this.req_solt_code_arr = this.port_options[0].req_fields_example );
this.res_solt_code_arr = this.port_options[0].res_fields_example 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{ } else {
this.process_in_up = false this.process_in_up = false;
} }
if(data.service_data_type_1 == 10){ if (data.service_data_type_1 == 10) {
this.perception_in = true this.perception_in = true;
this.$set(this.perception_solt_arr[0],'info',data.doc_file.split('/')[data.doc_file.split('/').length-1]) this.$set(
this.$set(this.perception_solt_arr[1],'info',data.urls[0].req_url) this.perception_solt_arr[0],
this.$set(this.perception_solt_arr[2],'info',data.urls[0].encode_method) "info",
this.req_solt_data = data.urls[0].req_fields data.doc_file.split("/")[data.doc_file.split("/").length - 1]
this.res_solt_data = data.urls[0].res_fields );
this.req_solt_code_arr = data.urls[0].req_fields_example this.$set(
this.res_solt_code_arr = data.urls[0].res_fields_example this.perception_solt_arr[1],
}else{ "info",
this.perception_in = false data.urls[0].req_url
);
this.$set(
this.perception_solt_arr[2],
"info",
data.urls[0].encode_method
);
this.req_solt_data = data.urls[0].req_fields;
this.res_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;
} }
if(this.service_apply_type==1){ if (this.service_apply_type == 1) {
this.$set( this.$set(
this.service_header_arr["first"][2], this.service_header_arr["first"][2],
"text", "text",
...@@ -782,8 +851,12 @@ export default { ...@@ -782,8 +851,12 @@ export default {
.replace("T", " ") .replace("T", " ")
.split("+")[0] .split("+")[0]
); );
this.$set(this.service_header_arr["first"][2],'name','可调用次数') this.$set(
}else{ this.service_header_arr["first"][2],
"name",
"可调用次数"
);
} else {
this.$set( this.$set(
this.service_header_arr["first"][2], this.service_header_arr["first"][2],
"text", "text",
...@@ -794,10 +867,10 @@ export default { ...@@ -794,10 +867,10 @@ export default {
.split("+")[0] .split("+")[0]
); );
} }
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 = [];
this.service_header_arr.second.push(temp_sj) this.service_header_arr.second.push(temp_sj);
} }
this.$set(this.list_arr[0], "info", data.descript); this.$set(this.list_arr[0], "info", data.descript);
this.$set(this.list_arr[1], "info", data.data_service_type2_name); this.$set(this.list_arr[1], "info", data.data_service_type2_name);
...@@ -857,16 +930,17 @@ export default { ...@@ -857,16 +930,17 @@ export default {
"url", "url",
data.service_apply_info.apply_file data.service_apply_info.apply_file
); );
this.$set(
this.apply_arr[6], let spcs = "";
"info", if (data.service_apply_info.spcs_type === 1) {
"访问次数:" + spcs = `${data.service_apply_info.single_money}金币/${data.service_apply_info.spcs_count}次`;
data.service_apply_info.request_spcs.pv + } else {
"/日," + spcs = `${data.service_apply_info.single_money}金币/${
"访问量:" + data.service_apply_info.duration_unit == 1 ? "" : ""
data.service_apply_info.request_spcs.count + }`;
"/日" }
); this.$set(this.apply_arr[6], "info", spcs);
this.$set( this.$set(
this.apply_arr[7], this.apply_arr[7],
"info", "info",
...@@ -876,7 +950,7 @@ export default { ...@@ -876,7 +950,7 @@ export default {
this.$set( this.$set(
this.apply_arr[8], this.apply_arr[8],
"info", "info",
data.service_apply_info.apply_time.replace("T", " ").split("+")[0] data.service_apply_info.apply_time.replace(/T|Z/g, " ").split("+")[0]
); );
this.$set( this.$set(
this.apply_arr[9], this.apply_arr[9],
...@@ -938,7 +1012,7 @@ export default { ...@@ -938,7 +1012,7 @@ export default {
} }
this.res_data = JSON.parse(data.res_fields); this.res_data = JSON.parse(data.res_fields);
}) })
.catch(function (response) {}); .catch(function(response) {});
}, },
}, },
}; };
......
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