+
-
+
测试服务信息:

测试成功
-
-

测试失败
-
-
+
+

测试失败
+
@@ -232,9 +231,9 @@
开放程度:
-
-
-
+ 共享
+ 受限
+ 敏感
@@ -302,13 +301,14 @@ export default {
],
sjfw_fhcstx: [
{ label: "字段编码", prop: "name", type: "", align: "left" },
- { label: "字段类型", prop: "field_type", type: "popover", align: "left" },
+ { label: "字段类型", prop: "field_type", type: "", align: "left" },
{ label: "字段名称", prop: "label", type: "input", align: "left" },
{ label: "字段说明", prop: "descript", type: "input", align: "left" }
],
url: "",
- emptyText: "暂时没数据",
+ emptyText: "暂无数据",
resultShow: false,
+ resSuccess: false,
optionsSq: [{ label: "Bearer Token", value: "Bearer" }],
sqfsVal: "",
tokenVal: "",
@@ -354,110 +354,11 @@ export default {
{ label: "其他", value: 10 }
],
optionsOrganization: [],
- datasQqcs: [
- {
- name: "name",
- field_type: "string",
- label: "",
- descript: "",
- example: "lisi",
- children: null
- },
- {
- name: "age",
- field_type: "float",
- label: "",
- descript: "",
- example: "22.00",
- children: null
- },
- {
- name: "childs",
- field_type: "array",
- label: "",
- descript: "",
- example: "",
- children: [
- {
- name: "",
- field_type: "object",
- label: "",
- descript: "",
- example: "",
- children: [
- {
- name: "name",
- field_type: "string",
- label: "",
- descript: "",
- example: "lili",
- children: null
- },
- {
- name: "age",
- field_type: "float",
- label: "",
- descript: "",
- example: "2.00",
- children: null
- }
- ]
- }
- ]
- }
- ],
- datasFhcs: [
- {
- name: "name",
- field_type: "string",
- label: "",
- descript: "",
- example: "lisi",
- children: null
- },
- {
- name: "age",
- field_type: "float",
- label: "",
- descript: "",
- example: "22.00",
- children: null
- },
- {
- name: "childs",
- field_type: "array",
- label: "",
- descript: "",
- example: "",
- children: [
- {
- name: "",
- field_type: "object",
- label: "",
- descript: "",
- example: "",
- children: [
- {
- name: "name",
- field_type: "string",
- label: "",
- descript: "",
- example: "lili",
- children: null
- },
- {
- name: "age",
- field_type: "float",
- label: "",
- descript: "",
- example: "2.00",
- children: null
- }
- ]
- }
- ]
- }
- ]
+ datasQqcs: [],
+ datasFhcs: [],
+ request_fields: [],
+ response_fields: [],
+ cover: ""
}),
computed: {},
watch: {},
@@ -469,33 +370,33 @@ export default {
this.serviceUrl = "";
},
clickFwcs() {
- this.resultShow = true;
let headers = {};
- if (this.sqfsVal != "") {
- headers.Authorization = [];
- headers.Authorization[0] = this.sqfsVal + " " + this.tokenVal;
- }
- let request = this.$refs.fwcs_sjfw_qq.getTableData();
- console.log(request);
let requestData = {};
- for (let i = 0; i < request.length; i++) {
- if (
- request[i] &&
- request[i].requestEncoding &&
- request[i].requestValue &&
- request[i].requestEncoding != "" &&
- request[i].requestValue != ""
- ) {
+ if (this.activeBtn == 0) {
+ if (this.sqfsVal != "") {
+ headers.Authorization = [];
+ headers.Authorization[0] = this.sqfsVal + " " + this.tokenVal;
+ }
+ let request = this.$refs.fwcs_sjfw_qq.getTableData();
+ for (let i = 0; i < request.length; i++) {
if (
- Object.keys(requestData).indexOf(request[i].requestEncoding) == -1
+ request[i] &&
+ request[i].requestEncoding &&
+ request[i].requestValue &&
+ request[i].requestEncoding != "" &&
+ request[i].requestValue != ""
) {
- requestData[request[i].requestEncoding] = [];
- requestData[request[i].requestEncoding][0] =
- request[i].requestValue;
- } else {
- requestData[request[i].requestEncoding].push(
- request[i].requestValue
- );
+ if (
+ Object.keys(requestData).indexOf(request[i].requestEncoding) == -1
+ ) {
+ requestData[request[i].requestEncoding] = [];
+ requestData[request[i].requestEncoding][0] =
+ request[i].requestValue;
+ } else {
+ requestData[request[i].requestEncoding].push(
+ request[i].requestValue
+ );
+ }
}
}
}
@@ -518,7 +419,11 @@ export default {
this.datasQqcs = data.param_fields;
}
this.datasFhcs = data.response_fields;
+ this.resSuccess = true;
+ this.resultShow = true;
} else {
+ this.resSuccess = false;
+ this.resultShow = true;
console.log(response.data.console.error);
}
})
@@ -532,17 +437,50 @@ export default {
},
resetSjfw() {},
nextJcxx() {
+ this.request_fields = this.$refs.fwcs_sjfw_qqcs.getTableData();
+ this.response_fields = this.$refs.fwcs_sjfw_fhcs.getTableData();
this.jcxxtx = true;
},
// edit form
getNewList(val) {
- console.log(val);
+ this.cover = val;
},
previous() {
this.jcxxtx = false;
},
registe() {
- console.log("submit!");
+ let query = {
+ name: this.form.name,
+ sectors: this.form.area,
+ organization: this.form.origin,
+ cover: this.cover,
+ openness: this.form.resource,
+ descript: this.form.desc,
+ data_service_type1: this.activeBtn,
+ data_service_type2:
+ this.activeBtn == 1
+ ? this.skfwRadios
+ : this.activeBtn == 4
+ ? this.zhyyVal
+ : 0,
+ encode_method: this.form.code,
+ method: this.select,
+ url: this.serviceUrl,
+ request_fields: this.request_fields,
+ response_fields: this.response_fields
+ };
+ let url = `/apaas/service/v3/service/manager`;
+ this.$http
+ .post(url, query)
+ .then(response => {
+ if (response.data.success == 1) {
+ } else {
+ console.log(response.data.console.error);
+ }
+ })
+ .catch(function(response) {
+ console.log("unkonw error");
+ });
}
},
mounted() {}