diff --git a/src/pages/workbench/fwgl/apply_service_detail.vue b/src/pages/workbench/fwgl/apply_service_detail.vue index 45f8b1e6f5f18e76284d7c5a8d27ea878e747607..712454f7d050210be7ad93a5b066f78b2c0e81c9 100644 --- a/src/pages/workbench/fwgl/apply_service_detail.vue +++ b/src/pages/workbench/fwgl/apply_service_detail.vue @@ -1128,6 +1128,15 @@ export default { if (data.data_service_type1_name != "基础支撑服务") { this.servicead_arr = this.servicead_arr.slice(0, 4); } + + if (data.service_apply_info.approval_status == 3) { + //审批通过 + this.servicead_arr.unshift({ + title: "Authorization:", + info: data.service_apply_info.apaas_token, + }); + } + console.log(data.service_apply_info); if (data.service_apply_info.approval_process) { data.service_apply_info.approval_process.forEach((e) => { diff --git a/src/pages/workbench/fwzc_fwcs.vue b/src/pages/workbench/fwzc_fwcs.vue index f0d1ad77c6f66ce998181db4c3a755165a25a4bd..99f7823feea0976ee9a4503ff4a8cbae3a396d57 100644 --- a/src/pages/workbench/fwzc_fwcs.vue +++ b/src/pages/workbench/fwzc_fwcs.vue @@ -62,8 +62,10 @@
- -
+
上传接口文档 (请上传所有服务地址完整接口文档): @@ -104,7 +106,51 @@ >{{ item.name }}
-
+
+
服务类型:
+ + + +
+
+ +

+ 说明:支持多个流程服务接口的注册,若流程服务包含多个接口,每个接口需分别注册为独立的服务地址才可使用。
+ 示例:http(s)://www.apaas.com(自有域名)/xxx,其中xxx为该流程服务的不同接口后缀,需分别进行单个接口的注册。
+ 比如:服务地址1:http(s)://www.apaas.com(自有域名)/create(用于新建流程实例) +
+           服务地址2:http(s)://www.apaas.com(自有域名)/query + (用于查询流程状态) +

+
+ + +
服务地址:
- +
授权方式:
+
+

注册说明:

+

1、服务提供方按需填写服务的地址、请求参数和返回参数进行正常注册。

+

2、服务被调用时,平台会提供一个动态token,由服务提供方访问身份认证地址,进行认证。由平台返回身份认证结果,由服务提供方依据结果判断是否可以提供服务。

+

3、详细流程和接口说明,请点击下载 服务注册说明

+
- -
Token:
- + +
+
Token名称:
+ +
Token值:
+ +
+
@@ -272,13 +338,137 @@
- +
+ + + + + +
+ + JSON + form-data + x-www-form-urlencoded + +
+
+ +
+
+ +
+
+ +
+
+ + + +
+
请求参数信息填写:
@@ -325,8 +515,8 @@ >
测试服务信息:
@@ -343,7 +533,8 @@ (activeBtn == 0 || activeBtn == 1 || activeBtn == 2 || - activeBtn == 3 ) && + activeBtn == 3 || + activeBtn == 4) && !resSuccess ">
测试服务信息:
@@ -373,6 +564,276 @@
+
+ + +
+
服务接口名称:
+
+ + + + + + +
+
服务地址{{ indexOne + 1 }}:
+
+ + + + + + 服务测试 +
+ + + + + +
+ + JSON + +
+ +
+ + + +
授权方式:
+ + + +
+

注册说明:

+

1、服务提供方按需填写服务的地址、请求参数和返回参数进行正常注册。

+

2、服务被调用时,平台会提供一个动态token,由服务提供方访问身份认证地址,进行认证。由平台返回身份认证结果,由服务提供方依据结果判断是否可以提供服务。

+

3、详细流程和接口说明,请点击下载 服务注册说明

+
+
+ +
+
+ +
+
Token名称:
+ +
Token值:
+ +
+
+
+
+ + + +
+
+
+
请求参数信息填写:
+ +
返回参数信息填写:
+ +
+
+
测试服务信息:
+
+
+  测试失败 +
+
+
+
+ +
+
+
@@ -547,7 +1008,8 @@ export default { serviceUrl: "", datasSj: [], sjfwQqt: "JSON", - sqfsVal: "", + sqfsVal: 0, + tokenName: "Authorization", tokenVal: "", noSearchUrl: "", resultShow: false, @@ -574,7 +1036,7 @@ export default { gisPortalSiteName + "/apaasplat/viewer/addPortalItem.html", btnList: [], - activeBtn: 0, + activeBtn: null, serviceUrl: "", select: "GET", optionType: [ @@ -689,8 +1151,13 @@ export default { emptyText: "暂无数据", resultShow: false, resSuccess: false, - optionsSq: [{ label: "Bearer Token", value: "Bearer" }], - sqfsVal: "", + optionsSq: [ + { label: "无授权", value: 0 }, + { label: "厂商静态token鉴权", value: 1 }, + { label: "动态token鉴权", value: 2 }, + ], + sqfsVal: 0, + tokenName: "Authorization", tokenVal: "", sjfwQqt: "JSON", zhfwQqt: "JSON", @@ -792,6 +1259,7 @@ export default { fwR: false, mapR: false, proR: false, + fwdesc: "/apaas/service/v3/service/manager/register/instruction", }; }, computed: {}, @@ -827,7 +1295,7 @@ export default { serviceUrl: "", datasSj: [], sjfwQqt: "JSON", - sqfsVal: "", + sqfsVal: 0, tokenVal: "", noSearchUrl: "", resultShow: false, @@ -867,7 +1335,7 @@ export default { this.noSearchUrl = enUrl; } this.serviceUrl = url; - if (this.activeBtn == 0 || this.activeBtn == 3) { + if (this.activeBtn == 0 || this.activeBtn == 2 || this.activeBtn == 3) { this.datasSj = arr; } else if (this.activeBtn == 4) { this.datasZh = arr; @@ -877,10 +1345,16 @@ export default { let headers = {}; let requestData = {}; let requestHeaderDataObj = {}; - if (this.activeBtn == 0 || this.activeBtn == 3) { - if (this.sqfsVal != "") { - headers.Authorization = []; - headers.Authorization[0] = this.sqfsVal + " " + this.tokenVal; + if (this.activeBtn == 0 || this.activeBtn == 2 || this.activeBtn == 3) { + if (this.sqfsVal == 1 || this.sqfsVal == 3) { + if (this.tokenName == "") { + this.$message.error("请输入token名称"); + return; + } + if (this.tokenVal == "") { + this.$message.error("请输入token值"); + return; + } } let request = this.$refs.fwcs_sjfw_qq.getTableData(); for (let i = 0; i < request.length; i++) { @@ -968,7 +1442,7 @@ export default { } let bodys = ""; let contentType = ""; - if (this.activeBtn == 0 || this.activeBtn == 3) { + if (this.activeBtn == 0 || this.activeBtn == 2 || this.activeBtn == 3) { bodys = this.$refs.jsonCodes ? this.$refs.jsonCodes.getCodesVal() : ""; contentType = this.sjfwQqt; } else if (this.activeBtn == 4) { @@ -1000,6 +1474,11 @@ export default { let query = { method: this.select, url: this.serviceUrl, + req_auth_mthod: this.sqfsVal, + req_auth_token: + this.sqfsVal == 1 || this.sqfsVal == 3 ? this.tokenVal : "", + req_auth_token_name: + this.sqfsVal == 1 || this.sqfsVal == 3 ? this.tokenName : "", headers: headers, params: requestData, body: bodys, @@ -1209,6 +1688,7 @@ export default { response_type: "JSON", req_auth_mthod: 0, req_auth_token: "", + req_auth_token_name: "", method: "GET", url: this.serviceUrl, request_fields: [], @@ -1236,6 +1716,7 @@ export default { response_type: "JSON", req_auth_mthod: 0, req_auth_token: "", + req_auth_token_name: "", method: "GET", url: this.serviceUrl, request_fields: [], @@ -1308,6 +1789,7 @@ export default { this.$refs.form.validate((valid) => { if (valid) { if ( + (this.activeBtn == 0 && this.jkwds.length == 0) || (this.activeBtn == 2 && this.jkwds.length == 0) || (this.activeBtn == 3 && this.jkwds.length == 0) ) { @@ -1359,8 +1841,10 @@ export default { name: "", response_type: this.activeBtn == 3 ? this.gz_fhsjgs : "JSON", - req_auth_mthod: 0, - req_auth_token: this.tokenVal, + req_auth_mthod: this.sqfsVal, + req_auth_token: this.sqfsVal == 1 ? this.tokenVal : "", + req_auth_token_name: + this.sqfsVal == 1 ? this.tokenName : "", method: this.select, url: this.serviceUrl, request_fields: @@ -1409,8 +1893,9 @@ export default { urls.push({ req_name: item.one_input, response_type: "JSON", - req_auth_mthod: 0, - req_auth_token: item.tokenVal, + req_auth_mthod: item.sqfsVal, + req_auth_token: item.sqfsVal == 1 ? item.tokenVal : "", + req_auth_token_name: item.sqfsVal == 1 ? item.tokenName : "", method: item.select, url: item.serviceUrl, request_fields: @@ -1541,7 +2026,6 @@ export default { } }); this.btnList = arr; - this.jczcfwRadios = this.btnList[0].childDomains; if ( this.btnList[0].childDomains && @@ -1553,9 +2037,9 @@ export default { skfwRadios = skfwRadios.filter(function (item) { return item.name != "地图" && item.name != "三维地图"; }); - this.skfwRadios = skfwRadios; this.skfwQqt = this.skfwRadios[0].id; + //this.optionsZhyy = this.btnList[4].childDomains; this.activeBtn = 0; } else { console.log(response.data.errMsg); @@ -1744,7 +2228,7 @@ export default { serviceUrl: "", datasSj: [], sjfwQqt: "JSON", - sqfsVal: "", + sqfsVal: 0, tokenVal: "", noSearchUrl: "", resultShow: false, @@ -1837,9 +2321,15 @@ export default { let headers = {}; let requestData = {}; let dataOne = this.liucheng_list[indexOne]; - if (dataOne.sqfsVal != "") { - headers.Authorization = []; - headers.Authorization[0] = dataOne.sqfsVal + " " + dataOne.tokenVal; + if (dataOne.sqfsVal == 1 || dataOne.sqfsVal == 3) { + if (dataOne.tokenName == "") { + this.$message.error("请输入token名称"); + return; + } + if (dataOne.tokenVal == "") { + this.$message.error("请输入token值"); + return; + } } let request = this.$refs["one_qqcs_" + indexOne][0].getTableData(); for (let i = 0; i < request.length; i++) { @@ -1870,6 +2360,11 @@ export default { let query = { method: dataOne.select, url: dataOne.serviceUrl, + req_auth_mthod: dataOne.sqfsVal, + req_auth_token: + dataOne.sqfsVal == 1 || dataOne.sqfsVal == 3 ? dataOne.tokenVal : "", + req_auth_token_name: + dataOne.sqfsVal == 1 || dataOne.sqfsVal == 3 ? dataOne.tokenName : "", headers: headers, params: requestData, body: bodys, @@ -2245,6 +2740,20 @@ export default { .cp_mb { padding: 0 0 16px 8px; } +.registration { + width: 430px; + margin: 10px auto; +} +.registration a { + color: #0000ff; + text-decoration: none; +} +.registration p { + line-height: 26px; +} +.registration p:nth-of-type(1) { + color: #0000ff; +} +