Commit 23c72226 by 无尘

fix: 修改参数

parent 12be2c95
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>API网关管理平台</title><link href=./static/css/app.81708ea45054ec4ddb66911c9a624c0f.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.4b775c128b30bc98fa30.js></script><script type=text/javascript src=./static/js/vendor.bb8c036d7dd62f4cb37a.js></script><script type=text/javascript src=./static/js/app.434c40aceca40251eccb.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>API网关管理平台</title><link href=./static/css/app.0b5fd48b58f3162d8f3e4a615530c6b3.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.15b78cbf256c053bf487.js></script><script type=text/javascript src=./static/js/vendor.bb8c036d7dd62f4cb37a.js></script><script type=text/javascript src=./static/js/app.434c40aceca40251eccb.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([2],{"2Aa9":function(t,e){},"7Y4+":function(t,e){},Bpvt:function(t,e){},GUiu:function(t,e){},IHMK:function(t,e){},LQqq:function(t,e){},MKab:function(t,e){},SldL:function(t,e){!function(e){"use strict";var a,r=Object.prototype,s=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",n=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag",c="object"==typeof t,p=e.regeneratorRuntime;if(p)c&&(t.exports=p);else{(p=e.regeneratorRuntime=c?t.exports:{}).wrap=D;var u="suspendedStart",d="suspendedYield",f="executing",b="completed",y={},h={};h[o]=function(){return this};var m=Object.getPrototypeOf,v=m&&m(m(K([])));v&&v!==r&&s.call(v,o)&&(h=v);var _=w.prototype=k.prototype=Object.create(h);C.prototype=_.constructor=w,w.constructor=C,w[l]=C.displayName="GeneratorFunction",p.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},p.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l in t||(t[l]="GeneratorFunction")),t.prototype=Object.create(_),t},p.awrap=function(t){return{__await:t}},x(I.prototype),I.prototype[n]=function(){return this},p.AsyncIterator=I,p.async=function(t,e,a,r){var s=new I(D(t,e,a,r));return p.isGeneratorFunction(e)?s:s.next().then(function(t){return t.done?t.value:s.next()})},x(_),_[l]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},p.keys=function(t){var e=[];for(var a in t)e.push(a);return e.reverse(),function a(){for(;e.length;){var r=e.pop();if(r in t)return a.value=r,a.done=!1,a}return a.done=!0,a}},p.values=K,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=a)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,s){return n.type="throw",n.arg=t,e.next=r,s&&(e.method="next",e.arg=a),!!s}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],n=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),O(a),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===t){var r=a.completion;if("throw"===r.type){var s=r.arg;O(a)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:K(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=a),y}}}function D(t,e,a,r){var s=e&&e.prototype instanceof k?e:k,i=Object.create(s.prototype),o=new F(r||[]);return i._invoke=function(t,e,a){var r=u;return function(s,i){if(r===f)throw new Error("Generator is already running");if(r===b){if("throw"===s)throw i;return j()}for(a.method=s,a.arg=i;;){var o=a.delegate;if(o){var n=T(o,a);if(n){if(n===y)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(r===u)throw r=b,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r=f;var l=g(t,e,a);if("normal"===l.type){if(r=a.done?b:d,l.arg===y)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(r=b,a.method="throw",a.arg=l.arg)}}}(t,a,o),i}function g(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(t){return{type:"throw",arg:t}}}function k(){}function C(){}function w(){}function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function I(t){var e;this._invoke=function(a,r){function i(){return new Promise(function(e,i){!function e(a,r,i,o){var n=g(t[a],t,r);if("throw"!==n.type){var l=n.arg,c=l.value;return c&&"object"==typeof c&&s.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,i,o)},function(t){e("throw",t,i,o)}):Promise.resolve(c).then(function(t){l.value=t,i(l)},o)}o(n.arg)}(a,r,e,i)})}return e=e?e.then(i,i):i()}}function T(t,e){var r=t.iterator[e.method];if(r===a){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=a,T(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var s=g(r,t.iterator,e.arg);if("throw"===s.type)return e.method="throw",e.arg=s.arg,e.delegate=null,y;var i=s.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=a),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function $(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach($,this),this.reset(!0)}function K(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(s.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=a,e.done=!0,e};return i.next=i}}return{next:j}}function j(){return{value:a,done:!0}}}(function(){return this}()||Function("return this")())},Xxa5:function(t,e,a){t.exports=a("jyFz")},"Yns/":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("319J"),s=a("fZjL"),i=a.n(s),o=a("Xxa5"),n=a.n(o),l=a("mvHQ"),c=a.n(l),p=a("exGp"),u=a.n(p),d=a("Kkt8"),f=a("l46T"),b=a("P9l9"),y=a("TUB1"),h=a("LlAa"),m={name:"create-base",components:{limitTextarea:d.a,limitInput:f.a},data:function(){return{apiInfoData:{interfaceId:"",interfaceVersionId:"",interfaceName:"",target:"1",optType:"get",interfaceUrl:"",interfaceDescribe:""},rules:{interfaceName:[{required:!0,message:"请输入API名称",trigger:"blur"}],interfaceUrl:[{required:!0,message:"请输入请求路径",trigger:"blur"}]}}},methods:{submitForm:function(t){var e=this;e.$refs[t].validate(function(a){if(!a)return!1;e.blurInterfaceUrl(t)})},blurInterfaceUrl:function(t){var e=this,a={update:!!e.$route.query.interfaceId,interfaceUrl:e.apiInfoData.interfaceUrl};Object(b.a)("/gateway-manage/is-exist-interface-url",a).then(function(a){var r=a.data;if("0000"==r.code)return r.result?(y.a.showmsg("接口已存在","warning"),!1):void("baseForm"==t&&(e.$emit("submitNext",e.apiInfoData),e.$store.dispatch("saveBaseInfo",e.apiInfoData)));h.a.errorMsg(r)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},handleQuery:function(t,e,a){var r={type:"object",level:1,properties:{}};for(var s in e.frontParams.properties)e.frontParams.properties[s].frontOriginType==a&&this.$set(r.properties,e.frontParams.properties[s].currentKey,e.frontParams.properties[s]);return r},handleBack:function(t,e,a){var r={type:"object",level:1,properties:{}};for(var s in e.endParams.properties)e.endParams.properties[s].backendOriginType==a&&this.$set(r.properties,e.endParams.properties[s].rootKey,e.endParams.properties[s]);return r},handleConst:function(t,e){var a={type:"object",level:1,properties:{}};for(var r in e.endParams.properties)1==e.endParams.properties[r].constFlag&&this.$set(a.properties,e.endParams.properties[r].currentKey,e.endParams.properties[r]);return a},handleFontData:function(t){var e=this;return u()(n.a.mark(function a(){var r,s,i;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r=e,s=JSON.parse(c()(t)),i={protocol:s.protocol,requestType:s.requestType,frontBodyType:s.frontBodyType||"json",frontParams:{},headerData:{},queryData:{},bodyJsonData:{},bodyFormData:{}},a.next=5,r.handleQuery(i,s,"query");case 5:return i.queryData=a.sent,a.next=8,r.handleQuery(i,s,"header");case 8:if(i.headerData=a.sent,"POST"!=s.requestType||"form"!=s.frontBodyType){a.next=13;break}return a.next=12,r.handleQuery(i,s,"body");case 12:i.bodyFormData=a.sent;case 13:if("POST"!=s.requestType||"json"!=s.frontBodyType){a.next=17;break}return a.next=16,r.handleQuery(i,s,"body");case 16:i.bodyJsonData=a.sent;case 17:r.$store.dispatch("saveFrontInfo",i);case 18:case"end":return a.stop()}},a,e)}))()},handleBackData:function(t){var e=this;return u()(n.a.mark(function a(){var r,s,i;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r=e,s=JSON.parse(c()(t)),i={interfaceType:String(s.interfaceType),version:s.version,backendHttpPath:s.backendHttpPath||"",dubboInterface:s.dubboInterface||"",dubboMethod:s.dubboMethod||"",dubboVersion:s.dubboVersion||"",proxyCode:s.proxyCode||"",timeout:2e4,backHeaderData:{},backQueryData:{},backBodyJsonData:{},backBodyFormData:{},constData:{}},a.next=5,r.handleQuery(i,s,"query");case 5:return i.backQueryData=a.sent,a.next=8,r.handleQuery(i,s,"header");case 8:if(i.backHeaderData=a.sent,"POST"!=s.requestType||"form"!=s.frontBodyType){a.next=13;break}return a.next=12,r.handleQuery(i,s,"body");case 12:i.backBodyFormData=a.sent;case 13:if("POST"!=s.requestType||"json"!=s.frontBodyType){a.next=17;break}return a.next=16,r.handleQuery(i,s,"body");case 16:i.backBodyJsonData=a.sent;case 17:return a.next=19,r.handleConst(i,s);case 19:i.constData=a.sent,r.$store.dispatch("saveBackInfo",i);case 21:case"end":return a.stop()}},a,e)}))()},handleResultData:function(t){var e=JSON.parse(c()(t)),a={resultParams:e.resultParams,sucReturn:e.sucReturn,errReturn:e.errReturn,errCode:e.errCode};this.$store.dispatch("saveResultInfo",a)},getData:function(){var t=this,e={interfaceId:t.$route.query.interfaceId,interfaceVersionId:t.$route.query.interfaceVersionId};Object(b.a)("/gateway-manage/get-api",e).then(function(e){var a=e.data;if("0000"==a.code)return a.result.frontParams=JSON.parse(a.result.frontParams),a.result.endParams=JSON.parse(a.result.endParams),a.result.errCode=JSON.parse(a.result.errCode),a.result.resultParams=JSON.parse(a.result.resultParams),t.apiInfoData.interfaceId=a.result.interfaceId,t.apiInfoData.interfaceVersionId=a.result.interfaceVersionId,t.apiInfoData.interfaceName=a.result.interfaceName,t.apiInfoData.target=String(a.result.target),t.apiInfoData.optType=a.result.optType,t.apiInfoData.interfaceUrl=a.result.interfaceUrl,t.apiInfoData.interfaceDescribe=a.result.interfaceDescribe,t.handleFontData(a.result),t.handleBackData(a.result),t.handleResultData(a.result),!1;h.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},mounted:function(){this.$route.query.interfaceId&&!i()(this.$store.state.baseInfo).length&&this.getData(),i()(this.$store.state.baseInfo).length&&(this.apiInfoData=this.$store.state.baseInfo)}},v={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"base-info-show border-box"},[a("el-form",{ref:"baseForm",attrs:{"label-width":"104px",model:t.apiInfoData,rules:t.rules}},[a("el-form-item",{attrs:{label:"API名称:",prop:"interfaceName"}},[a("limitInput",{attrs:{inputWidth:329,inputValue:t.apiInfoData.interfaceName,holder:"请输入API名称",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"interfaceName",e)}}})],1),t._v(" "),a("el-form-item",{attrs:{label:"API类型:",prop:"target"}},[a("el-radio-group",{model:{value:t.apiInfoData.target,callback:function(e){t.$set(t.apiInfoData,"target",e)},expression:"apiInfoData.target"}},[a("el-radio",{attrs:{label:"1"}},[t._v("公开")]),t._v(" "),a("el-radio",{attrs:{label:"0"}},[t._v("私有")])],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"访问类型:",prop:"optType"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.apiInfoData.optType,callback:function(e){t.$set(t.apiInfoData,"optType",e)},expression:"apiInfoData.optType"}},[a("el-option",{attrs:{label:"list",value:"list"}}),t._v(" "),a("el-option",{attrs:{label:"delete",value:"delete"}}),t._v(" "),a("el-option",{attrs:{label:"update",value:"update"}}),t._v(" "),a("el-option",{attrs:{label:"get",value:"get"}}),t._v(" "),a("el-option",{attrs:{label:"search",value:"search"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"请求路径:",prop:"interfaceUrl"}},[a("el-input",{staticClass:"w-329",on:{blur:t.blurInterfaceUrl},model:{value:t.apiInfoData.interfaceUrl,callback:function(e){t.$set(t.apiInfoData,"interfaceUrl",e)},expression:"apiInfoData.interfaceUrl"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"描述:"}},[a("limit-textarea",{attrs:{inputWidth:500,inputValue:t.apiInfoData.interfaceDescribe,holder:"",getByType:"word",maxLength:100},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"interfaceDescribe",e)}}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitForm("baseForm")}}},[t._v("下一步")])],1)],1)],1)},staticRenderFns:[]};var _=a("VU/8")(m,v,!1,function(t){a("rzMK")},"data-v-3c8acab2",null).exports,D={name:"header-param",props:{itemData:{type:Object,default:function(){return{}}},frontOriginType:{type:String,default:function(){return""}}},data:function(){return{trData:{type:"object",properties:{name:{frontOriginType:this.frontOriginType,type:"string",currentKey:"name",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0}}},keyLength:1}},methods:{blurKey:function(t,e){t.currentKey!=e&&(this.$set(this.itemData.properties,t.currentKey,t),this.$delete(this.itemData.properties,e))},handleDel:function(t,e,a){this.$delete(this.itemData.properties,e)},toAddItem:function(){var t=this.keyLength++;this.$set(this.itemData.properties,"field"+t,{frontOriginType:this.frontOriginType,backendOriginType:this.frontOriginType,type:"string",currentKey:"field"+t,isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0})}},watch:{itemData:function(t,e){this.trData=JSON.parse(c()(t))}},mounted:function(){this.trData=JSON.parse(c()(this.itemData))}},g={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[t._m(0),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[a("div",{staticClass:"table-content"},[t._l(t.itemData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{on:{blur:function(a){t.blurKey(e,r)}},model:{value:e.currentKey,callback:function(a){t.$set(e,"currentKey",a)},expression:"itemValue.currentKey"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数类型"},model:{value:e.type,callback:function(a){t.$set(e,"type",a)},expression:"itemValue.type"}},[a("el-option",{attrs:{label:"string",value:"string"}}),t._v(" "),a("el-option",{attrs:{label:"number",value:"number"}}),t._v(" "),a("el-option",{attrs:{label:"boolean",value:"boolean"}})],1)],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-checkbox",{model:{value:e.check,callback:function(a){t.$set(e,"check",a)},expression:"itemValue.check"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.defaultVal,callback:function(a){t.$set(e,"defaultVal",a)},expression:"itemValue.defaultVal"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.example,callback:function(a){t.$set(e,"example",a)},expression:"itemValue.example"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.description,callback:function(a){t.$set(e,"description",a)},expression:"itemValue.description"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e,r,s)}}},[t._v("删除")])],1)])])])])]})],2)])]),t._v(" "),a("div",{staticClass:"add-line text-center",on:{click:t.toAddItem}},[a("i",{staticClass:"el-icon-circle-plus-outline color-5584FF"}),a("span",{staticClass:"color-5584FF font-14 p-l-4"},[t._v("添加行")])])])},staticRenderFns:[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("必选")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("默认值")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_5 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("示例")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_6 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("描述")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_7 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("操作")])])])])])])}]};var k=a("VU/8")(D,g,!1,function(t){a("Bpvt")},"data-v-6dd1ac00",null).exports,C={name:"body-row",props:{itemData:{type:Object,default:function(){return{}}},frontOriginType:{type:String,default:function(){return""}}},data:function(){return{trData:{},keyLength:1}},methods:{blurKey:function(t,e){t.currentKey!=e&&(this.$set(this.itemData.properties,t.currentKey,t),this.$delete(this.itemData.properties,e))},handleDel:function(t,e,a,r){this.handleDelData(this.itemData,t,e)},handleDelData:function(t,e,a){this.handleObjData(t,e,a)},handleObjData:function(t,e,a){for(var r in t)t[r]==e&&this.$delete(t.properties,a)},changeType:function(t,e,a,r){"string"!=t&&"boolean"!=t&&"number"!=t&&"object"!=t||(e.properties={},e.hasOwnProperty("items")&&this.$delete(e,"items")),"array"==t&&this.$set(e,"items",{parentKey:a,level:parseInt(r)+1,frontOriginType:this.frontOriginType,backendOriginType:this.frontOriginType,type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}),this.$forceUpdate()},handleAdd:function(t,e,a,r){var s=this.keyLength++;if("array"==t.type)return this.$set(t.items.properties,"field"+s,{parentKey:e,level:parseInt(r)+1,frontOriginType:this.frontOriginType,backendOriginType:this.frontOriginType,type:"string",currentKey:"field"+s,isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}),this.$forceUpdate(),!1;this.$set(t.properties,"field"+s,{parentKey:e,level:parseInt(r)+1,frontOriginType:this.frontOriginType,backendOriginType:this.frontOriginType,type:"string",currentKey:"field"+s,isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}),this.$forceUpdate()}},watch:{itemData:function(t,e){t&&(this.trData=JSON.parse(c()(t)))}},mounted:function(){this.trData=JSON.parse(c()(this.itemData))}},w={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t._l(t.itemData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{attrs:{disabled:2==e.level},on:{blur:function(a){t.blurKey(e,r)}},model:{value:e.currentKey,callback:function(a){t.$set(e,"currentKey",a)},expression:"itemValue.currentKey"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数类型"},on:{change:function(a){t.changeType(e.type,e,e.currentKey,e.level)}},model:{value:e.type,callback:function(a){t.$set(e,"type",a)},expression:"itemValue.type"}},[a("el-option",{attrs:{label:"string",value:"string"}}),t._v(" "),a("el-option",{attrs:{label:"number",value:"number"}}),t._v(" "),a("el-option",{attrs:{label:"boolean",value:"boolean"}}),t._v(" "),a("el-option",{attrs:{label:"object",value:"object"}}),t._v(" "),a("el-option",{attrs:{label:"array",value:"array"}})],1)],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-checkbox",{model:{value:e.check,callback:function(a){t.$set(e,"check",a)},expression:"itemValue.check"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.defaultVal,callback:function(a){t.$set(e,"defaultVal",a)},expression:"itemValue.defaultVal"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.example,callback:function(a){t.$set(e,"example",a)},expression:"itemValue.example"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.description,callback:function(a){t.$set(e,"description",a)},expression:"itemValue.description"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},["array"==e.type||"object"==e.type?a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleAdd(e,e.currentKey,s,e.level)}}},[t._v("添加子属性")]):t._e(),t._v(" "),2!=e.level?a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e.parentKey,e.currentKey,s,e.level)}}},[t._v("删除")]):t._e()],1)])])])]),t._v(" "),"array"==e.type&&Object.keys(e.items.properties).length?a("body-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e.items}}):t._e(),t._v(" "),"object"==e.type&&Object.keys(e.properties).length?a("body-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e}}):t._e()]})],2)},staticRenderFns:[]};var x=a("VU/8")(C,w,!1,function(t){a("MKab")},"data-v-3544daa6",null).exports,I={name:"create-front",components:{limitTextarea:d.a,limitInput:f.a,headerParam:k,bodyParam:x},data:function(){return{apiInfoData:{protocol:"http",requestType:"GET",frontBodyType:"json",frontParams:{},headerData:{},queryData:{},bodyJsonData:{},bodyFormData:{}},headerData:{type:"object",level:1,properties:{header:{level:2,currentKey:"header",frontOriginType:"header",backendOriginType:"header",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}},required:[]},queryData:{type:"object",level:1,properties:{query:{level:2,currentKey:"query",frontOriginType:"query",backendOriginType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}},required:[]},bodyJsonData:{type:"object",level:1,properties:{root:{level:2,currentKey:"root",frontOriginType:"body",backendOriginType:"body",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}},required:[]},bodyFormData:{type:"object",level:1,properties:{root:{level:2,currentKey:"root",frontOriginType:"body",backendOriginType:"body",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}},required:[]},rules:{requestType:[{required:!0,message:"请选择请求方法",trigger:"blur"}]}}},methods:{refreshData:function(t){this.frontData=t},submitback:function(){this.$emit("submitBack")},submitForm:function(t){var e=this;e.$refs[t].validate(function(t){if(!t)return!1;e.handleData()})},handleData:function(){if("POST"==this.apiInfoData.requestType&&"json"==this.frontOriginType){if(i()(this.bodyFormData.properties.root.properties).length)for(var t in this.bodyFormData.properties.root.required=[],this.bodyFormData.properties.root.properties)this.bodyFormData.properties.root.properties[t].check&&this.bodyFormData.properties.root.required.push(t);this.apiInfoData.bodyJsonData=this.bodyJsonData}else this.apiInfoData.bodyJsonData={};if("POST"==this.apiInfoData.requestType&&"form"==this.frontOriginType){if(i()(this.bodyFormData.properties).length)for(var e in this.bodyFormData.required=[],this.bodyFormData.properties)this.bodyFormData.properties[e].check&&this.bodyFormData.required.push(e);this.apiInfoData.bodyFormData=this.bodyFormData}else this.apiInfoData.bodyFormData={};if(i()(this.headerData.properties).length)for(var a in this.headerData.required=[],this.headerData.properties)this.headerData.properties[a].check&&this.headerData.required.push(a);if(i()(this.queryData.properties).length)for(var r in this.queryData.required=[],this.queryData.properties)this.queryData.properties[r].check&&this.queryData.required.push(r);this.apiInfoData.headerData=this.headerData,this.apiInfoData.queryData=this.queryData,this.$store.dispatch("saveFrontInfo",this.apiInfoData),this.$emit("submitNext",this.apiInfoData)},handleStoreData:function(){this.apiInfoData=JSON.parse(c()(this.$store.state.frontInfo)),this.headerData=this.apiInfoData.headerData,this.queryData=this.apiInfoData.queryData,this.bodyJsonData=this.apiInfoData.bodyJsonData,this.bodyFormData=this.apiInfoData.bodyFormData}},mounted:function(){console.log(this.$store),this.$route.query.interfaceId&&this.handleStoreData()}},T={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"base-info-show border-box"},[a("el-form",{ref:"baseForm",attrs:{"label-width":"104px",model:t.apiInfoData,rules:t.rules}},[a("el-form-item",{attrs:{label:"协议:",prop:"protocol"}},[t._v(t._s(t.apiInfoData.protocol))]),t._v(" "),a("el-form-item",{attrs:{label:"请求方法:",prop:"requestType"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.apiInfoData.requestType,callback:function(e){t.$set(t.apiInfoData,"requestType",e)},expression:"apiInfoData.requestType"}},[a("el-option",{attrs:{label:"GET",value:"GET"}}),t._v(" "),a("el-option",{attrs:{label:"POST",value:"POST"}})],1)],1),t._v(" "),a("el-form-item",{staticClass:"color-303133 font-w-700",attrs:{label:"参数配置"}}),t._v(" "),a("el-form-item",{attrs:{label:"参数位置:"}},[a("div",{staticClass:"font-14 color-303133"},[t._v("header")])]),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("header-param",{ref:"frontHeaderTable",attrs:{itemData:t.headerData,frontOriginType:"header"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"参数位置:"}},[a("div",{staticClass:"font-14 color-303133"},[t._v("query")])]),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("header-param",{ref:"frontQueryTable",attrs:{itemData:t.queryData,frontOriginType:"query"}})],1),t._v(" "),"POST"==t.apiInfoData.requestType?a("el-form-item",{attrs:{label:"参数位置:"}},[a("div",{staticClass:"font-14 color-303133"},[t._v("body")]),t._v(" "),a("div",{staticClass:"font-14 color-303133"},[a("el-radio",{attrs:{label:"json"},model:{value:t.frontOriginType,callback:function(e){t.frontOriginType=e},expression:"frontOriginType"}},[t._v("json")]),t._v(" "),a("el-radio",{attrs:{label:"form"},model:{value:t.frontOriginType,callback:function(e){t.frontOriginType=e},expression:"frontOriginType"}},[t._v("form")])],1)]):t._e(),t._v(" "),"POST"==t.apiInfoData.requestType&&"json"==t.apiInfoData.frontBodyType?a("el-form-item",{attrs:{label:""}},[a("div",{staticClass:"body-param-wrap"},[a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("必选")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("默认值")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_5 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("示例")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_6 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("描述")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_7 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("操作")])])])])])]),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[a("div",{staticClass:"table-content"},[a("body-param",{ref:"frontBodyJsonTable",attrs:{itemData:t.bodyJsonData,frontOriginType:"body"},on:{refreshData:t.refreshData}})],1)])])])]):t._e(),t._v(" "),"POST"==t.apiInfoData.requestType&&"form"==t.apiInfoData.frontBodyType?a("el-form-item",{attrs:{label:""}},[a("header-param",{ref:"frontBodyFormTable",attrs:{itemData:t.bodyFormData,frontOriginType:"body"}})],1):t._e(),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.submitback}},[t._v("上一步")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitForm("baseForm")}}},[t._v("下一步")])],1)],1)],1)},staticRenderFns:[]};var $=a("VU/8")(I,T,!1,function(t){a("ocv2")},"data-v-2c902429",null).exports,O={name:"back-table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{trData:{}}},watch:{itemData:function(t,e){this.trData=t}},mounted:function(){this.trData=this.itemData}},F={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t._l(t.itemData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==e.type||"array"==e.type?a("div",{staticClass:"cell"},[a("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[t._v(t._s(r))])]),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[t._v(t._s(e.frontOriginType))])]),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[t._v(t._s(e.type))])])])])]),t._v(" "),"array"==e.type&&Object.keys(e.items.properties).length?a("back-table-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e.items}}):t._e(),t._v(" "),"object"==e.type&&Object.keys(e.properties).length?a("back-table-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e}}):t._e()]})],2)},staticRenderFns:[]};var K=a("VU/8")(O,F,!1,function(t){a("GUiu")},"data-v-a1d428da",null).exports,j={name:"back-table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}},interfaceType:{type:String,default:function(){return"0"}}},data:function(){return{trData:{}}},methods:{blurKey:function(t,e){t.rootKey!=e&&(this.$set(this.itemData.properties,t.rootKey,t),this.$delete(this.itemData.properties,e))},changeCheck:function(t,e){if("object"==t.type&&i()(t.properties).length)for(var a in t.properties)t.properties[a].isRootKey=!1;if("array"==t.type&&i()(t.items.properties).length)for(var r in t.items.properties)t.items.properties[r].isRootKey=!1}},watch:{itemData:function(t,e){this.trData=JSON.parse(c()(t))}},mounted:function(){this.trData=JSON.parse(c()(this.itemData))}},S={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t._l(t.itemData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==e.type||"array"==e.type?a("div",{staticClass:"cell"},[a("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-checkbox",{attrs:{disabled:t.itemData.isRootKey},on:{change:function(a){t.changeCheck(e,r)}},model:{value:e.isRootKey,callback:function(a){t.$set(e,"isRootKey",a)},expression:"itemValue.isRootKey"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{staticClass:"w-110",attrs:{placeholder:"请输入参数名"},on:{blur:function(a){t.blurKey(e,r)}},model:{value:e.rootKey,callback:function(a){t.$set(e,"rootKey",a)},expression:"itemValue.rootKey"}})],1)]),t._v(" "),"0"==t.interfaceType?a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数位置"},model:{value:e.backendOriginType,callback:function(a){t.$set(e,"backendOriginType",a)},expression:"itemValue.backendOriginType"}},[a("el-option",{attrs:{label:"header",value:"header"}}),t._v(" "),a("el-option",{attrs:{label:"query",value:"query"}}),t._v(" "),a("el-option",{attrs:{label:"body",value:"body"}})],1)],1)]):t._e(),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[t._v(t._s(e.type))])]),t._v(" "),a("td",{staticClass:"el-table_1_column_4",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{staticClass:"w-110",attrs:{placeholder:"请输入参数值"},model:{value:e.defaultVal,callback:function(a){t.$set(e,"defaultVal",a)},expression:"itemValue.defaultVal"}})],1)]),t._v(" "),"1"==t.interfaceType?a("td",{staticClass:"el-table_1_column_4",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{staticClass:"w-110",attrs:{placeholder:"请输入包路径"},model:{value:e.objectClass,callback:function(a){t.$set(e,"objectClass",a)},expression:"itemValue.objectClass"}})],1)]):t._e(),t._v(" "),"1"==t.interfaceType?a("td",{staticClass:"el-table_1_column_4",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{staticClass:"w-110",attrs:{placeholder:"请输入排序"},model:{value:e.sort,callback:function(a){t.$set(e,"sort",a)},expression:"itemValue.sort"}})],1)]):t._e()])])]),t._v(" "),"array"==e.type?a("back-table-row",{key:s+"122"+r,staticClass:"el-table__row child-row",attrs:{itemData:e.items}}):t._e(),t._v(" "),"object"==e.type?a("back-table-row",{key:s+"122"+r,staticClass:"el-table__row child-row",attrs:{itemData:e}}):t._e()]})],2)},staticRenderFns:[]};var q=a("VU/8")(j,S,!1,function(t){a("LQqq")},"data-v-2c20c13c",null).exports,V={name:"back-constant",props:{itemData:{type:Object,default:function(){return{}}},interfaceType:{type:[String,Number],default:function(){return"0"}}},data:function(){return{trData:{type:"object",properties:{name:{backendOriginType:"query",type:"string",currentKey:"name",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0}}},keyLength:1}},methods:{blurKey:function(t,e){t.currentKey!=e&&(this.$set(this.itemData.properties,t.currentKey,t),this.$delete(this.itemData.properties,e))},handleDel:function(t,e,a){this.$delete(this.trData.properties,e)},toAddItem:function(){var t=this.keyLength++;this.$set(this.trData.properties,"field"+t,{backendOriginType:"query",type:"string",currentKey:"field"+t,isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0})}},watch:{itemData:function(t,e){this.trData=JSON.parse(c()(t))},interfaceType:function(t,e){this.backType=t}},mounted:function(){this.trData=JSON.parse(c()(this.itemData))}},B={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[t._m(0),t._v(" "),"0"==t.interfaceType?a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数位置")])]):t._e(),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3)])])])]),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[a("div",{staticClass:"table-content"},[t._l(t.trData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{attrs:{placeholder:"请输入参数名"},model:{value:e.currentKey,callback:function(a){t.$set(e,"currentKey",a)},expression:"itemValue.currentKey"}})],1)]),t._v(" "),"0"==t.interfaceType?a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数位置"},model:{value:e.backendOriginType,callback:function(a){t.$set(e,"backendOriginType",a)},expression:"itemValue.backendOriginType"}},[a("el-option",{attrs:{label:"header",value:"header"}}),t._v(" "),a("el-option",{attrs:{label:"query",value:"query"}}),t._v(" "),a("el-option",{attrs:{label:"body",value:"body"}})],1)],1)]):t._e(),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数类型"},model:{value:e.type,callback:function(a){t.$set(e,"type",a)},expression:"itemValue.type"}},[a("el-option",{attrs:{label:"string",value:"string"}}),t._v(" "),a("el-option",{attrs:{label:"number",value:"number"}}),t._v(" "),a("el-option",{attrs:{label:"boolean",value:"boolean"}})],1)],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.defaultVal,callback:function(a){t.$set(e,"defaultVal",a)},expression:"itemValue.defaultVal"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e,r,s)}}},[t._v("删除")])],1)])])])])]})],2)])]),t._v(" "),a("div",{staticClass:"add-line text-center",on:{click:t.toAddItem}},[a("i",{staticClass:"el-icon-circle-plus-outline color-5584FF"}),a("span",{staticClass:"color-5584FF font-14 p-l-4"},[t._v("添加常量参数")])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[this._v("参数名")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[this._v("参数类型")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[this._v("参数值")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("th",{staticClass:"el-table_1_column_7 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[this._v("操作")])])}]};var P=a("VU/8")(V,B,!1,function(t){a("7Y4+")},"data-v-1740ad15",null).exports,N={name:"create-backend",components:{limitTextarea:d.a,limitInput:f.a,backTableLeft:K,backConstant:P,backTableRight:q},data:function(){var t=this;return{apiInfoData:{interfaceType:"0",version:"",backendHttpPath:"",dubboInterface:"",dubboMethod:"",dubboVersion:"",proxyCode:"",timeout:2e4},backHeaderData:{},backQueryData:{},backBodyJsonData:{},backBodyFormData:{},rules:{version:[{required:!0,message:"请输入API版本号",trigger:"blur"}],backendHttpPath:[{required:!0,validator:function(e,a,r){""===a&&"0"==t.apiInfoData.interfaceType?r(new Error("请输入请求路径")):r()},trigger:"blur"}],timeout:[{required:!0,message:"请输入超时时长",trigger:"blur"}],dubboInterface:[{required:!0,validator:function(e,a,r){""===a&&"1"==t.apiInfoData.interfaceType?r(new Error("请输入dubbo接口名称")):r()},trigger:"blur"}],dubboMethod:[{required:!0,validator:function(e,a,r){""===a&&"1"==t.apiInfoData.interfaceType?r(new Error("请输入dubbo请求方法")):r()},trigger:"blur"}],dubboVersion:[{required:!0,validator:function(e,a,r){""===a&&"1"==t.apiInfoData.interfaceType?r(new Error("请输入请求版本号")):r()},trigger:"blur"}],proxyCode:[{required:!0,validator:function(e,a,r){""===a&&"1"==t.apiInfoData.interfaceType?r(new Error("请选择注册中心地址")):r()},trigger:"blur"}]},envSetOptions:[],constData:{type:"object",level:1,properties:{root:{level:2,currentKey:"root",constFlag:!0,backendOriginType:"header",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}}}}},methods:{changeType:function(t){var e=this;e.$nextTick(function(){e.$refs.backForm.resetFields(),e.apiInfoData.interfaceType=t})},submitback:function(){this.$emit("submitBack")},submitForm:function(t){var e=this;e.$refs[t].validate(function(t){if(!t)return!1;e.handlebackData()})},handlebackData:function(){this.apiInfoData.backHeaderData=this.backHeaderData,this.apiInfoData.backQueryData=this.backQueryData,this.apiInfoData.backBodyJsonData=this.backBodyJsonData,this.apiInfoData.backBodyFormData=this.backBodyFormData,this.apiInfoData.constData=this.constData,this.$emit("submitNext",this.apiInfoData),this.$store.dispatch("saveBackInfo",this.apiInfoData)},getEnvSetData:function(){var t=this,e={search:t.searchValue,pageNum:t.currentPage,pageSize:100};Object(b.b)("/gateway-manage/page-proxy",e).then(function(e){var a=e.data;if("0000"==a.code)return t.envSetOptions=a.result.result||[],void(t.totalCount=a.result.totalCount);h.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},handleFrontData:function(){var t=JSON.parse(c()(this.$store.state.frontInfo));if(i()(t.headerData).length){for(var e in t.headerData.properties)t.headerData.properties[e].isRootKey=!0,t.headerData.properties[e].rootKey=e,t.headerData.properties[e].backendOriginType=t.headerData.properties[e].frontOriginType,t.headerData.properties[e].isBackendField=1,t.headerData.properties[e].objectClass="",t.headerData.properties[e].sort=0;this.backHeaderData=JSON.parse(c()(t.headerData)),this.frontHeaderData=JSON.parse(c()(t.headerData))}if(i()(t.queryData).length){for(var a in t.queryData.properties)t.queryData.properties[a].isRootKey=!0,t.queryData.properties[a].rootKey=a,t.queryData.properties[a].backendOriginType=t.queryData.properties[a].frontOriginType,t.queryData.properties[a].isBackendField=1,t.queryData.properties[a].objectClass="",t.queryData.properties[a].sort=0;this.backQueryData=JSON.parse(c()(t.queryData)),this.frontQueryData=JSON.parse(c()(t.queryData))}if(i()(t.bodyFormData).length){for(var r in t.bodyFormData.properties)t.bodyFormData.properties[r].isRootKey=!0,t.bodyFormData.properties[r].rootKey=r,t.bodyFormData.properties[r].backendOriginType=t.bodyFormData.properties[r].frontOriginType,t.bodyFormData.properties[r].isBackendField=1,t.bodyFormData.properties[r].objectClass="",t.bodyFormData.properties[r].sort=0;this.backBodyFormData=JSON.parse(c()(t.bodyFormData)),this.frontBodyFormData=JSON.parse(c()(t.bodyFormData))}if(i()(t.bodyJsonData).length){for(var s in t.bodyJsonData.properties)t.bodyJsonData.properties[s].isRootKey=!0,t.bodyJsonData.properties[s].rootKey=s,t.bodyJsonData.properties[s].backendOriginType=t.bodyJsonData.properties[s].frontOriginType,t.bodyJsonData.properties[s].isBackendField=1,t.bodyJsonData.properties[s].objectClass="",t.bodyJsonData.properties[s].sort=0;this.backBodyJsonData=JSON.parse(c()(t.bodyJsonData)),this.frontBodyJsonData=JSON.parse(c()(t.bodyJsonData))}this.$forceUpdate()},handleStoreData:function(){this.apiInfoData=JSON.parse(c()(this.$store.state.backInfo))}},mounted:function(){this.getEnvSetData(),this.handleFrontData(),this.$route.query.interfaceId&&this.handleStoreData()}},J={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"back-info-show border-box"},[a("el-form",{ref:"backForm",attrs:{"label-width":"129px",model:t.apiInfoData,rules:t.rules}},[a("el-form-item",{attrs:{label:"后端服务:",prop:"interfaceType"}},[a("el-radio-group",{on:{change:t.changeType},model:{value:t.apiInfoData.interfaceType,callback:function(e){t.$set(t.apiInfoData,"interfaceType",e)},expression:"apiInfoData.interfaceType"}},[a("el-radio",{attrs:{label:"0"}},[t._v("http")]),t._v(" "),a("el-radio",{attrs:{label:"1"}},[t._v("dubbo")])],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"API版本号",prop:"version"}},[a("limitInput",{attrs:{inputWidth:329,inputValue:t.apiInfoData.version,holder:"请输入API版本号",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"version",e)}}})],1),t._v(" "),1==t.apiInfoData.interfaceType?a("el-form-item",{attrs:{label:"dubbo接口名称:",prop:"dubboInterface"}},[a("limitInput",{attrs:{inputWidth:329,inputValue:t.apiInfoData.dubboInterface,holder:"请输入dubbo接口名称",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"dubboInterface",e)}}})],1):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?a("el-form-item",{attrs:{label:"dubbo请求方法:",prop:"dubboMethod"}},[a("limitInput",{attrs:{inputWidth:329,inputValue:t.apiInfoData.dubboMethod,holder:"请输入dubbo请求方法",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"dubboMethod",e)}}})],1):t._e(),t._v(" "),0==t.apiInfoData.interfaceType?a("el-form-item",{attrs:{label:"请求路径:",prop:"backendHttpPath"}},[a("el-input",{staticClass:"w-329",model:{value:t.apiInfoData.backendHttpPath,callback:function(e){t.$set(t.apiInfoData,"backendHttpPath",e)},expression:"apiInfoData.backendHttpPath"}})],1):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?a("el-form-item",{attrs:{label:"注册中心地址:",prop:"proxyCode"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.apiInfoData.proxyCode,callback:function(e){t.$set(t.apiInfoData,"proxyCode",e)},expression:"apiInfoData.proxyCode"}},t._l(t.envSetOptions,function(t){return a("el-option",{key:t.proxyCode,attrs:{label:t.proxyName,value:t.proxyCode}})}))],1):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?a("el-form-item",{attrs:{label:"请求版本号",prop:"dubboVersion"}},[a("limitInput",{attrs:{inputWidth:329,inputValue:t.apiInfoData.dubboVersion,holder:"请输入请求版本号",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"dubboVersion",e)}}})],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"超时时长:",prop:"timeout"}},[a("el-input-number",{attrs:{"controls-position":"right",min:1,max:1e9},model:{value:t.apiInfoData.timeout,callback:function(e){t.$set(t.apiInfoData,"timeout",e)},expression:"apiInfoData.timeout"}})],1),t._v(" "),a("el-form-item",{staticClass:"color-303133 font-w-700",attrs:{label:"参数配置"}},[a("div",{staticClass:"back-data-wrap font-0"},[a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition inline-block vertical-top",staticStyle:{width:"30%","table-layout":"fixed"}},[a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[a("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"})]),t._v(" "),a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数位置")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数类型")])])])])])]),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none back-table-left"},[a("div",{staticClass:"table-content"},[t.backHeaderData.properties&&Object.keys(t.backHeaderData.properties).length?a("back-table-left",{attrs:{itemData:t.frontHeaderData}}):t._e(),t._v(" "),t.backQueryData.properties&&Object.keys(t.backQueryData.properties).length?a("back-table-left",{attrs:{itemData:t.frontQueryData}}):t._e(),t._v(" "),t.backBodyJsonData.properties&&Object.keys(t.backBodyJsonData.properties).length?a("back-table-left",{attrs:{itemData:t.frontBodyJsonData}}):t._e(),t._v(" "),t.backBodyFormData.properties&&Object.keys(t.backBodyFormData.properties).length?a("back-table-left",{attrs:{itemData:t.frontBodyFormData}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition inline-block vertical-top",staticStyle:{width:"70%","table-layout":"fixed"}},[a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[a("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"})]),t._v(" "),a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("是否后端参数")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数名映射")])]),t._v(" "),0==t.apiInfoData.interfaceType?a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数位置")])]):t._e(),t._v(" "),a("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数值")])]),t._v(" "),1==t.apiInfoData.interfaceType?a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("包路径")])]):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("排序")])]):t._e()])])])]),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[a("div",{staticClass:"table-content"},[t.backHeaderData.properties&&Object.keys(t.backHeaderData.properties).length?a("back-table-right",{attrs:{itemData:t.backHeaderData,interfaceType:t.apiInfoData.interfaceType}}):t._e(),t._v(" "),t.backQueryData.properties&&Object.keys(t.backQueryData.properties).length?a("back-table-right",{attrs:{itemData:t.backQueryData,interfaceType:t.apiInfoData.interfaceType}}):t._e(),t._v(" "),t.backBodyJsonData.properties&&Object.keys(t.backBodyJsonData.properties).length?a("back-table-right",{attrs:{itemData:t.backBodyJsonData,interfaceType:t.apiInfoData.interfaceType}}):t._e(),t._v(" "),t.backBodyFormData.properties&&Object.keys(t.backBodyFormData.properties).length?a("back-table-right",{attrs:{itemData:t.backBodyFormData,interfaceType:t.apiInfoData.interfaceType}}):t._e()],1)])])]),t._v(" "),a("div",{staticClass:"constant-wrap"},[a("back-constant",{attrs:{itemData:t.constData,interfaceType:t.apiInfoData.interfaceType}})],1)]),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.submitback}},[t._v("上一步")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitForm("backForm")}}},[t._v("下一步")])],1)],1)],1)},staticRenderFns:[]};var R=a("VU/8")(N,J,!1,function(t){a("iFfM")},"data-v-260362f9",null).exports,E=a("woOf"),L=a.n(E),U={name:"body-row",props:{itemData:{type:Object,default:function(){return{}}}},data:function(){return{trData:{},keyLength:1}},methods:{blurKey:function(t,e){t.currentKey!=e&&(this.$set(this.itemData.properties,t.currentKey,t),this.$delete(this.itemData.properties,e))},updateKey:function(t){for(var e in t)e!=t[e].currentKey&&(t[e].pkey=t[t[e].currentKey]=t[e],this.$delete(t,e)),t[e]&&"object"==t[e].type&&i()(t[e].properties).length&&this.updateKey(t[e].properties),t[e]&&"array"==t[e].type&&i()(t[e].items.properties).length&&this.updateKey(t[e].items.properties)},handleDel:function(t,e,a,r){var s=this;return u()(n.a.mark(function a(){var r;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r=s,a.next=3,r.updateKey(r.itemData.properties);case 3:if(t){a.next=6;break}return r.$delete(r.itemData.properties,e),a.abrupt("return",!1);case 6:r.handleDelData(r.itemData,t,e);case 7:case"end":return a.stop()}},a,s)}))()},handleDelData:function(t,e,a){this.handleObjData(t,e,a)},handleObjData:function(t,e,a){for(var r in t)t[r]==e&&this.$delete(t.properties,a)},changeType:function(t,e,a,r){"string"!=t&&"boolean"!=t&&"number"!=t&&"object"!=t||(e.properties={},e.hasOwnProperty("items")&&this.$delete(e,"items")),"array"==t&&this.$set(e,"items",{parentKey:a,level:parseInt(r)+1,type:"string",defaultVal:"val",description:"描述",example:"示例",properties:{}}),this.$forceUpdate()},handleAdd:function(t,e,a,r){var s=this.keyLength++;if("array"==t.type)return this.$set(t.items.properties,"field"+s,{parentKey:e,level:parseInt(r)+1,type:"string",currentKey:"field"+s,defaultVal:"val",description:"描述",example:"示例",properties:{}}),this.$forceUpdate(),!1;this.$set(t.properties,"field"+s,{parentKey:e,level:parseInt(r)+1,type:"string",currentKey:"field"+s,defaultVal:"val",description:"描述",example:"示例",properties:{}}),this.$forceUpdate()}},watch:{itemData:function(t,e){t&&(this.trData=JSON.parse(c()(t)))}},mounted:function(){this.trData=JSON.parse(c()(this.itemData))}},A={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t._l(t.itemData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{attrs:{disabled:"array"==e.type||"object"==e.type},on:{blur:function(a){t.blurKey(e,r)}},model:{value:e.currentKey,callback:function(a){t.$set(e,"currentKey",a)},expression:"itemValue.currentKey"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数类型"},on:{change:function(a){t.changeType(e.type,e,e.currentKey,e.level)}},model:{value:e.type,callback:function(a){t.$set(e,"type",a)},expression:"itemValue.type"}},[a("el-option",{attrs:{label:"string",value:"string"}}),t._v(" "),a("el-option",{attrs:{label:"number",value:"number"}}),t._v(" "),a("el-option",{attrs:{label:"boolean",value:"boolean"}}),t._v(" "),a("el-option",{attrs:{label:"object",value:"object"}}),t._v(" "),a("el-option",{attrs:{label:"array",value:"array"}})],1)],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.example,callback:function(a){t.$set(e,"example",a)},expression:"itemValue.example"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},["array"==e.type||"object"==e.type?a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleAdd(e,e.currentKey,s,e.level)}}},[t._v("添加子属性")]):t._e(),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e.parentKey,e.currentKey,s,e.level)}}},[t._v("删除")])],1)])])])]),t._v(" "),"array"==e.type&&Object.keys(e.items.properties).length?a("body-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e.items}}):t._e(),t._v(" "),"object"==e.type&&Object.keys(e.properties).length?a("body-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e}}):t._e()]})],2)},staticRenderFns:[]};var H=a("VU/8")(U,A,!1,function(t){a("IHMK")},"data-v-5f9cf3ef",null).exports,M=a("jvWE"),Q={name:"create-front",components:{limitTextarea:d.a,limitInput:f.a,headerParam:k,resultTable:H},data:function(){return{apiInfoData:{resultParams:{},sucReturn:"",errReturn:"",errCode:[{error_code:"",error_info:"",orig_error_code:""}]},errOptions:[],resultParams:{type:"object",level:1,properties:{root:{level:2,currentKey:"root",type:"object",defaultVal:"val",description:"描述",example:"示例",properties:{}}}},rules:{sucReturn:[{required:!0,message:"请输入成功返回示例",trigger:"blur"}],errReturn:[{required:!0,message:"请输入失败返回示例",trigger:"blur"}]},keyLength:1}},methods:{remoteMethod:function(t){""!==t?this.getErrcodeData(t):this.errOptions=[]},toAddItem:function(){var t=this.keyLength++;this.$set(this.resultParams.properties,"field"+t,{level:2,parentKey:"",type:"string",currentKey:"field"+t,defaultVal:"val",description:"描述",example:"示例",properties:{}})},delErrorCode:function(t){this.apiInfoData.errCode.splice(t,1)},addErrCodeItem:function(){this.apiInfoData.errCode.push({error_code:"",error_info:"",orig_error_code:""})},submitback:function(){this.$emit("submitBack")},submitForm:Object(M.a)(function(t){var e=this;e.$refs[t].validate(function(t){if(!t)return!1;e.handleFrontBackData()})},500),handleFrontData:function(){var t={type:"object",level:1,properties:{},required:[]},e=JSON.parse(c()(this.$store.state.frontInfo));return t.properties=L()(e.queryData.properties,e.headerData.properties),t},handleBackData:function(){var t={type:"object",level:1,properties:{},required:[]},e=JSON.parse(c()(this.$store.state.backInfo));return t.properties=L()(e.backQueryData.properties,e.backHeaderData.properties,e.constData.properties),t},handleFrontBackData:function(){var t=this;return u()(n.a.mark(function e(){var a,r,s;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=t,e.next=3,a.handleFrontData();case 3:return r=e.sent,e.next=6,a.handleBackData();case 6:return s=e.sent,e.next=9,a.toPostApi(r,s);case 9:case"end":return e.stop()}},e,t)}))()},toPostApi:function(t,e){var a=this,r={interfaceName:a.$store.state.baseInfo.interfaceName,interfaceGroupId:a.$route.query.interfaceGroupId,interfaceUrl:a.$store.state.baseInfo.interfaceUrl,interfaceDescribe:a.$store.state.baseInfo.interfaceDescribe,projectId:a.$route.query.projectId,target:a.$store.state.baseInfo.target,optType:a.$store.state.baseInfo.optType,protocol:a.$store.state.frontInfo.protocol,requestType:a.$store.state.frontInfo.requestType,frontParams:c()(t),interfaceType:a.$store.state.backInfo.interfaceType,version:a.$store.state.backInfo.version,backendHttpPath:a.$store.state.backInfo.backendHttpPath,dubboInterface:a.$store.state.backInfo.dubboInterface,dubboMethod:a.$store.state.backInfo.dubboMethod,dubboVersion:a.$store.state.backInfo.dubboVersion,proxyCode:a.$store.state.backInfo.proxyCode,timeout:a.$store.state.backInfo.timeout,endParams:c()(e),resultParams:c()(a.resultParams),sucReturn:a.apiInfoData.sucReturn,errReturn:a.apiInfoData.errReturn,errCode:c()(a.apiInfoData.errCode),interfaceId:a.$store.state.baseInfo.interfaceId,interfaceVersionId:a.$store.state.baseInfo.interfaceVersionId};Object(b.b)(a.$store.state.baseInfo.interfaceId?"/gateway-manage/update-api":"/gateway-manage/create-api",r).then(function(t){var e=t.data;if("0000"==e.code)return y.a.showmsg("保存成功","success"),a.$store.dispatch("clearApiData"),void a.$router.push("/apiList");h.a.errorMsg(e)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},getErrcodeData:function(t){var e=this,a={pageNum:1,pageSize:100,search:t};Object(b.b)("/gateway-manage/page-error-setting",a).then(function(t){var a=t.data;"0000"!=a.code?h.a.errorMsg(a):e.errOptions=a.result.result||[]}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},handleStoreData:function(){this.apiInfoData=JSON.parse(c()(this.$store.state.resultInfo))}},mounted:function(){console.log(this.$store),this.$route.query.interfaceId&&this.handleStoreData()}},G={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"result-info-show border-box"},[a("el-form",{ref:"resultForm",attrs:{"label-width":"114px",model:t.apiInfoData,rules:t.rules}},[a("el-form-item",{attrs:{label:"返回类型:"}},[t._v("json")]),t._v(" "),a("el-form-item",{attrs:{label:"返回参数:"}},[a("div",{staticClass:"body-param-wrap"},[a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_5 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("示例值")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_7 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("操作")])])])])])]),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[a("div",{staticClass:"table-content"},[a("result-table",{ref:"resultBodyTable",attrs:{itemData:t.resultParams},on:{refreshData:t.refreshData}}),t._v(" "),a("div",{staticClass:"add-line text-center",on:{click:t.toAddItem}},[a("i",{staticClass:"el-icon-circle-plus-outline color-5584FF"}),a("span",{staticClass:"color-5584FF font-14 p-l-4"},[t._v("添加行")])])],1)])])])]),t._v(" "),a("el-form-item",{attrs:{label:"错误码映射:"}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.apiInfoData.errCode}},[a("el-table-column",{attrs:{label:"原始错误码"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"cell"},[a("el-input",{attrs:{placeholder:"请输入原始错误码"},model:{value:e.row.orig_error_code,callback:function(a){t.$set(e.row,"orig_error_code",a)},expression:"scope.row.orig_error_code"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"错误码映射"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"cell"},[a("el-select",{attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入映射错误码","remote-method":t.remoteMethod,loading:t.loading},model:{value:e.row.error_code,callback:function(a){t.$set(e.row,"error_code",a)},expression:"scope.row.error_code"}},t._l(t.errOptions,function(t){return a("el-option",{key:t.errorCode,attrs:{label:t.errorCode,value:t.errorCode}})}))],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"错误信息"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"cell"},[a("el-input",{attrs:{placeholder:"请输入错误信息"},model:{value:e.row.error_info,callback:function(a){t.$set(e.row,"error_info",a)},expression:"scope.row.error_info"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"cell"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.delErrorCode(e.$index)}}},[t._v("删除")])],1)]}}])})],1),t._v(" "),a("div",{staticClass:"add-line add-err-line text-center",on:{click:t.addErrCodeItem}},[a("i",{staticClass:"el-icon-circle-plus-outline color-5584FF"}),a("span",{staticClass:"color-5584FF font-14 p-l-4"},[t._v("添加错误码配置")])])],1),t._v(" "),a("el-form-item",{attrs:{label:"成功返回示例:",prop:"sucReturn"}},[a("el-input",{staticClass:"w-389",attrs:{type:"textarea",rows:3,placeholder:"请输入内容"},model:{value:t.apiInfoData.sucReturn,callback:function(e){t.$set(t.apiInfoData,"sucReturn",e)},expression:"apiInfoData.sucReturn"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"失败返回示例:",prop:"errReturn"}},[a("el-input",{staticClass:"w-389",attrs:{type:"textarea",rows:3,placeholder:"请输入内容"},model:{value:t.apiInfoData.errReturn,callback:function(e){t.$set(t.apiInfoData,"errReturn",e)},expression:"apiInfoData.errReturn"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.submitback}},[t._v("上一步")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitForm("resultForm")}}},[t._v("完 成")])],1)],1)],1)},staticRenderFns:[]};var W=a("VU/8")(Q,G,!1,function(t){a("2Aa9")},"data-v-8464c182",null).exports,z={name:"createApi",components:{navBread:r.a,createBase:_,createFront:$,createBackend:R,createResult:W},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:"API列表",path:"/apiList"},{name:"创建API",path:""}],activeStep:1,stepData:[{stepName:"基础信息"},{stepName:"前端配置"},{stepName:"后端配置"},{stepName:"定义返回"}],projectId:this.$route.query.projectId,interfaceGroupId:this.$route.query.interfaceGroupId}},methods:{submitNext:function(){this.activeStep++},submitBack:function(){this.activeStep--}},watch:{$route:{handler:function(t,e){},deep:!0}},mounted:function(){this.$emit("showTab",22)},beforeDestroy:function(){this.$store.dispatch("clearApiData")}},Y={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:t.navPath}})],1),t._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"create-api-body"},[a("div",{staticClass:"create-api-step font-0"},t._l(t.stepData,function(e,r){return a("div",{key:r+e.stepName,class:["api-step-cell inline-block border-box",r+1==t.activeStep?"active-step":""],style:{width:100/t.stepData.length+"%","max-width":100/t.stepData.length+"%"}},[a("div",{staticClass:"api-step-cell_inner border-box"},[r<t.stepData.length-1?a("div",{staticClass:"api-step-cell_line"}):t._e(),t._v(" "),a("div",{staticClass:"api-step-cell_title"},[a("div",{staticClass:"el-step__icon is-text inline-block"},[a("div",{staticClass:"el-step__icon-inner font-14"},[t._v(t._s(r+1))])]),t._v(" "),a("div",{staticClass:"api-step-cell_txt p-lr-10 bg-fff inline-block font-16"},[t._v(t._s(e.stepName))])])])])})),t._v(" "),"1"==t.activeStep?a("div",{staticClass:"create-api-base"},[a("create-base",{on:{submitNext:t.submitNext}})],1):t._e(),t._v(" "),"2"==t.activeStep?a("div",{staticClass:"create-api-front"},[a("create-front",{on:{submitBack:t.submitBack,submitNext:t.submitNext}})],1):t._e(),t._v(" "),"3"==t.activeStep?a("div",{staticClass:"create-api-back"},[a("create-backend",{on:{submitBack:t.submitBack,submitNext:t.submitNext}})],1):t._e(),t._v(" "),"4"==t.activeStep?a("div",{staticClass:"create-api-result"},[a("create-result",{on:{submitBack:t.submitBack,submitNext:t.submitNext}})],1):t._e()])])])])},staticRenderFns:[]};var X=a("VU/8")(z,Y,!1,function(t){a("mwK1")},"data-v-1123ed54",null);e.default=X.exports},exGp:function(t,e,a){"use strict";e.__esModule=!0;var r,s=a("//Fk"),i=(r=s)&&r.__esModule?r:{default:r};e.default=function(t){return function(){var e=t.apply(this,arguments);return new i.default(function(t,a){return function r(s,o){try{var n=e[s](o),l=n.value}catch(t){return void a(t)}if(!n.done)return i.default.resolve(l).then(function(t){r("next",t)},function(t){r("throw",t)});t(l)}("next")})}}},iFfM:function(t,e){},jyFz:function(t,e,a){var r=function(){return this}()||Function("return this")(),s=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=s&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=a("SldL"),s)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},mwK1:function(t,e){},ocv2:function(t,e){},rzMK:function(t,e){}});
\ No newline at end of file
webpackJsonp([2],{ADzW:function(t,e){},Bpvt:function(t,e){},DNlE:function(t,e){},GUiu:function(t,e){},IHMK:function(t,e){},MKab:function(t,e){},SldL:function(t,e){!function(e){"use strict";var a,r=Object.prototype,s=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",n=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag",c="object"==typeof t,p=e.regeneratorRuntime;if(p)c&&(t.exports=p);else{(p=e.regeneratorRuntime=c?t.exports:{}).wrap=D;var u="suspendedStart",d="suspendedYield",f="executing",b="completed",y={},h={};h[o]=function(){return this};var m=Object.getPrototypeOf,v=m&&m(m(j([])));v&&v!==r&&s.call(v,o)&&(h=v);var _=w.prototype=k.prototype=Object.create(h);C.prototype=_.constructor=w,w.constructor=C,w[l]=C.displayName="GeneratorFunction",p.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},p.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l in t||(t[l]="GeneratorFunction")),t.prototype=Object.create(_),t},p.awrap=function(t){return{__await:t}},x(I.prototype),I.prototype[n]=function(){return this},p.AsyncIterator=I,p.async=function(t,e,a,r){var s=new I(D(t,e,a,r));return p.isGeneratorFunction(e)?s:s.next().then(function(t){return t.done?t.value:s.next()})},x(_),_[l]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},p.keys=function(t){var e=[];for(var a in t)e.push(a);return e.reverse(),function a(){for(;e.length;){var r=e.pop();if(r in t)return a.value=r,a.done=!1,a}return a.done=!0,a}},p.values=j,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=a)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,s){return n.type="throw",n.arg=t,e.next=r,s&&(e.method="next",e.arg=a),!!s}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],n=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),O(a),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===t){var r=a.completion;if("throw"===r.type){var s=r.arg;O(a)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=a),y}}}function D(t,e,a,r){var s=e&&e.prototype instanceof k?e:k,i=Object.create(s.prototype),o=new F(r||[]);return i._invoke=function(t,e,a){var r=u;return function(s,i){if(r===f)throw new Error("Generator is already running");if(r===b){if("throw"===s)throw i;return K()}for(a.method=s,a.arg=i;;){var o=a.delegate;if(o){var n=T(o,a);if(n){if(n===y)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(r===u)throw r=b,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r=f;var l=g(t,e,a);if("normal"===l.type){if(r=a.done?b:d,l.arg===y)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(r=b,a.method="throw",a.arg=l.arg)}}}(t,a,o),i}function g(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(t){return{type:"throw",arg:t}}}function k(){}function C(){}function w(){}function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function I(t){var e;this._invoke=function(a,r){function i(){return new Promise(function(e,i){!function e(a,r,i,o){var n=g(t[a],t,r);if("throw"!==n.type){var l=n.arg,c=l.value;return c&&"object"==typeof c&&s.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,i,o)},function(t){e("throw",t,i,o)}):Promise.resolve(c).then(function(t){l.value=t,i(l)},o)}o(n.arg)}(a,r,e,i)})}return e=e?e.then(i,i):i()}}function T(t,e){var r=t.iterator[e.method];if(r===a){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=a,T(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var s=g(r,t.iterator,e.arg);if("throw"===s.type)return e.method="throw",e.arg=s.arg,e.delegate=null,y;var i=s.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=a),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function $(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach($,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(s.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=a,e.done=!0,e};return i.next=i}}return{next:K}}function K(){return{value:a,done:!0}}}(function(){return this}()||Function("return this")())},VbG7:function(t,e){},WleN:function(t,e){},Xxa5:function(t,e,a){t.exports=a("jyFz")},"Yns/":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("319J"),s=a("fZjL"),i=a.n(s),o=a("Xxa5"),n=a.n(o),l=a("mvHQ"),c=a.n(l),p=a("exGp"),u=a.n(p),d=a("Kkt8"),f=a("l46T"),b=a("P9l9"),y=a("TUB1"),h=a("LlAa"),m={name:"create-base",components:{limitTextarea:d.a,limitInput:f.a},data:function(){return{apiInfoData:{interfaceId:"",interfaceVersionId:"",interfaceName:"",target:"1",optType:"get",interfaceUrl:"",interfaceDescribe:""},rules:{interfaceName:[{required:!0,message:"请输入API名称",trigger:"blur"}],interfaceUrl:[{required:!0,message:"请输入请求路径",trigger:"blur"}]}}},methods:{submitForm:function(t){var e=this;e.$refs[t].validate(function(a){if(!a)return!1;e.blurInterfaceUrl(t)})},blurInterfaceUrl:function(t){var e=this,a={update:!!e.$route.query.interfaceId,interfaceUrl:e.apiInfoData.interfaceUrl};Object(b.a)("/gateway-manage/is-exist-interface-url",a).then(function(a){var r=a.data;if("0000"==r.code)return r.result?(y.a.showmsg("接口已存在","warning"),!1):void("baseForm"==t&&(e.$emit("submitNext",e.apiInfoData),e.$store.dispatch("saveBaseInfo",e.apiInfoData)));h.a.errorMsg(r)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},handleQuery:function(t,e,a){var r={type:"object",level:1,properties:{}};for(var s in e.frontParams.properties)e.frontParams.properties[s].frontOriginType==a&&this.$set(r,e.frontParams.properties[s].currentKey,e.frontParams.properties[s]);return r},handleBack:function(t,e,a){var r={type:"object",level:1,properties:{}};for(var s in e.endParams.properties)e.endParams.properties[s].backendOriginType==a&&this.$set(r,e.endParams.properties[s].rootKey,e.endParams.properties[s]);return r},handleConst:function(t,e){var a={type:"object",level:1,properties:{}};for(var r in e.endParams.properties)1==e.endParams.properties[r].constFlag&&this.$set(a,e.endParams.properties[r].currentKey,e.endParams.properties[r]);return a},handleFontData:function(t){var e=this;return u()(n.a.mark(function a(){var r,s,i;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r=e,s=JSON.parse(c()(t)),i={protocol:s.protocol,requestType:s.requestType,frontBodyType:s.frontBodyType||"json",frontParams:{},headerData:{},queryData:{},bodyJsonData:{},bodyFormData:{}},a.next=5,r.handleQuery(i,s,"query");case 5:return i.queryData=a.sent,a.next=8,r.handleQuery(i,s,"header");case 8:if(i.headerData=a.sent,"POST"!=s.requestType||"form"!=s.frontBodyType){a.next=13;break}return a.next=12,r.handleQuery(i,s,"body");case 12:i.bodyFormData=a.sent;case 13:if("POST"!=s.requestType||"json"!=s.frontBodyType){a.next=17;break}return a.next=16,r.handleQuery(i,s,"body");case 16:i.bodyJsonData=a.sent;case 17:r.$store.dispatch("saveFrontInfo",i);case 18:case"end":return a.stop()}},a,e)}))()},handleBackData:function(t){var e=this;return u()(n.a.mark(function a(){var r,s,i;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r=e,s=JSON.parse(c()(t)),i={interfaceType:String(s.interfaceType),version:s.version,backendHttpPath:s.backendHttpPath||"",dubboInterface:s.dubboInterface||"",dubboMethod:s.dubboMethod||"",dubboVersion:s.dubboVersion||"",proxyCode:s.proxyCode||"",timeout:2e4,backHeaderData:{},backQueryData:{},backBodyJsonData:{},backBodyFormData:{},constData:{}},a.next=5,r.handleQuery(i,s,"query");case 5:return i.backQueryData=a.sent,a.next=8,r.handleQuery(i,s,"header");case 8:if(i.backHeaderData=a.sent,"POST"!=s.requestType||"form"!=s.frontBodyType){a.next=13;break}return a.next=12,r.handleQuery(i,s,"body");case 12:i.backBodyFormData=a.sent;case 13:if("POST"!=s.requestType||"json"!=s.frontBodyType){a.next=17;break}return a.next=16,r.handleQuery(i,s,"body");case 16:i.backBodyJsonData=a.sent;case 17:return a.next=19,r.handleConst(i,s);case 19:i.constData=a.sent,r.$store.dispatch("saveBackInfo",i);case 21:case"end":return a.stop()}},a,e)}))()},handleResultData:function(t){var e=JSON.parse(c()(t)),a={resultParams:e.resultParams,sucReturn:e.sucReturn,errReturn:e.errReturn,errCode:e.errCode};this.$store.dispatch("saveResultInfo",a)},getData:function(){var t=this,e={interfaceId:t.$route.query.interfaceId,interfaceVersionId:t.$route.query.interfaceVersionId};Object(b.a)("/gateway-manage/get-api",e).then(function(e){var a=e.data;if("0000"==a.code)return a.result.frontParams=JSON.parse(a.result.frontParams),a.result.endParams=JSON.parse(a.result.endParams),a.result.errCode=JSON.parse(a.result.errCode),a.result.resultParams=JSON.parse(a.result.resultParams),t.apiInfoData.interfaceId=a.result.interfaceId,t.apiInfoData.interfaceVersionId=a.result.interfaceVersionId,t.apiInfoData.interfaceName=a.result.interfaceName,t.apiInfoData.target=String(a.result.target),t.apiInfoData.optType=a.result.optType,t.apiInfoData.interfaceUrl=a.result.interfaceUrl,t.apiInfoData.interfaceDescribe=a.result.interfaceDescribe,t.handleFontData(a.result),t.handleBackData(a.result),t.handleResultData(a.result),!1;h.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},mounted:function(){this.$route.query.interfaceId&&!i()(this.$store.state.baseInfo).length&&this.getData(),i()(this.$store.state.baseInfo).length&&(this.apiInfoData=this.$store.state.baseInfo)}},v={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"base-info-show border-box"},[a("el-form",{ref:"baseForm",attrs:{"label-width":"104px",model:t.apiInfoData,rules:t.rules}},[a("el-form-item",{attrs:{label:"API名称:",prop:"interfaceName"}},[a("limitInput",{attrs:{inputWidth:329,inputValue:t.apiInfoData.interfaceName,holder:"请输入API名称",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"interfaceName",e)}}})],1),t._v(" "),a("el-form-item",{attrs:{label:"API类型:",prop:"target"}},[a("el-radio-group",{model:{value:t.apiInfoData.target,callback:function(e){t.$set(t.apiInfoData,"target",e)},expression:"apiInfoData.target"}},[a("el-radio",{attrs:{label:"1"}},[t._v("公开")]),t._v(" "),a("el-radio",{attrs:{label:"0"}},[t._v("私有")])],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"访问类型:",prop:"optType"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.apiInfoData.optType,callback:function(e){t.$set(t.apiInfoData,"optType",e)},expression:"apiInfoData.optType"}},[a("el-option",{attrs:{label:"list",value:"list"}}),t._v(" "),a("el-option",{attrs:{label:"delete",value:"delete"}}),t._v(" "),a("el-option",{attrs:{label:"update",value:"update"}}),t._v(" "),a("el-option",{attrs:{label:"get",value:"get"}}),t._v(" "),a("el-option",{attrs:{label:"search",value:"search"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"请求路径:",prop:"interfaceUrl"}},[a("el-input",{staticClass:"w-329",on:{blur:t.blurInterfaceUrl},model:{value:t.apiInfoData.interfaceUrl,callback:function(e){t.$set(t.apiInfoData,"interfaceUrl",e)},expression:"apiInfoData.interfaceUrl"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"描述:"}},[a("limit-textarea",{attrs:{inputWidth:500,inputValue:t.apiInfoData.interfaceDescribe,holder:"",getByType:"word",maxLength:100},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"interfaceDescribe",e)}}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitForm("baseForm")}}},[t._v("下一步")])],1)],1)],1)},staticRenderFns:[]};var _=a("VU/8")(m,v,!1,function(t){a("VbG7")},"data-v-36ebdc33",null).exports,D={name:"header-param",props:{itemData:{type:Object,default:function(){return{}}},frontOriginType:{type:String,default:function(){return""}}},data:function(){return{trData:{type:"object",properties:{name:{frontOriginType:this.frontOriginType,type:"string",currentKey:"name",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0}}},keyLength:1}},methods:{blurKey:function(t,e){t.currentKey!=e&&(this.$set(this.itemData.properties,t.currentKey,t),this.$delete(this.itemData.properties,e))},handleDel:function(t,e,a){this.$delete(this.itemData.properties,e)},toAddItem:function(){var t=this.keyLength++;this.$set(this.itemData.properties,"field"+t,{frontOriginType:this.frontOriginType,backendOriginType:this.frontOriginType,type:"string",currentKey:"field"+t,isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0})}},watch:{itemData:function(t,e){this.trData=JSON.parse(c()(t))}},mounted:function(){this.trData=JSON.parse(c()(this.itemData))}},g={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[t._m(0),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[a("div",{staticClass:"table-content"},[t._l(t.itemData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{on:{blur:function(a){t.blurKey(e,r)}},model:{value:e.currentKey,callback:function(a){t.$set(e,"currentKey",a)},expression:"itemValue.currentKey"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数类型"},model:{value:e.type,callback:function(a){t.$set(e,"type",a)},expression:"itemValue.type"}},[a("el-option",{attrs:{label:"string",value:"string"}}),t._v(" "),a("el-option",{attrs:{label:"number",value:"number"}}),t._v(" "),a("el-option",{attrs:{label:"boolean",value:"boolean"}})],1)],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-checkbox",{model:{value:e.check,callback:function(a){t.$set(e,"check",a)},expression:"itemValue.check"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.defaultVal,callback:function(a){t.$set(e,"defaultVal",a)},expression:"itemValue.defaultVal"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.example,callback:function(a){t.$set(e,"example",a)},expression:"itemValue.example"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.description,callback:function(a){t.$set(e,"description",a)},expression:"itemValue.description"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e,r,s)}}},[t._v("删除")])],1)])])])])]})],2)])]),t._v(" "),a("div",{staticClass:"add-line text-center",on:{click:t.toAddItem}},[a("i",{staticClass:"el-icon-circle-plus-outline color-5584FF"}),a("span",{staticClass:"color-5584FF font-14 p-l-4"},[t._v("添加行")])])])},staticRenderFns:[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("必选")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("默认值")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_5 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("示例")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_6 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("描述")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_7 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("操作")])])])])])])}]};var k=a("VU/8")(D,g,!1,function(t){a("Bpvt")},"data-v-6dd1ac00",null).exports,C={name:"body-row",props:{itemData:{type:Object,default:function(){return{}}},frontOriginType:{type:String,default:function(){return""}}},data:function(){return{trData:{},keyLength:1}},methods:{blurKey:function(t,e){t.currentKey!=e&&(this.$set(this.itemData.properties,t.currentKey,t),this.$delete(this.itemData.properties,e))},handleDel:function(t,e,a,r){this.handleDelData(this.itemData,t,e)},handleDelData:function(t,e,a){this.handleObjData(t,e,a)},handleObjData:function(t,e,a){for(var r in t)t[r]==e&&this.$delete(t.properties,a)},changeType:function(t,e,a,r){"string"!=t&&"boolean"!=t&&"number"!=t&&"object"!=t||(e.properties={},e.hasOwnProperty("items")&&this.$delete(e,"items")),"array"==t&&this.$set(e,"items",{parentKey:a,level:parseInt(r)+1,frontOriginType:this.frontOriginType,backendOriginType:this.frontOriginType,type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}),this.$forceUpdate()},handleAdd:function(t,e,a,r){var s=this.keyLength++;if("array"==t.type)return this.$set(t.items.properties,"field"+s,{parentKey:e,level:parseInt(r)+1,frontOriginType:this.frontOriginType,backendOriginType:this.frontOriginType,type:"string",currentKey:"field"+s,isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}),this.$forceUpdate(),!1;this.$set(t.properties,"field"+s,{parentKey:e,level:parseInt(r)+1,frontOriginType:this.frontOriginType,backendOriginType:this.frontOriginType,type:"string",currentKey:"field"+s,isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}),this.$forceUpdate()}},watch:{itemData:function(t,e){t&&(this.trData=JSON.parse(c()(t)))}},mounted:function(){this.trData=JSON.parse(c()(this.itemData))}},w={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t._l(t.itemData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{attrs:{disabled:2==e.level},on:{blur:function(a){t.blurKey(e,r)}},model:{value:e.currentKey,callback:function(a){t.$set(e,"currentKey",a)},expression:"itemValue.currentKey"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数类型"},on:{change:function(a){t.changeType(e.type,e,e.currentKey,e.level)}},model:{value:e.type,callback:function(a){t.$set(e,"type",a)},expression:"itemValue.type"}},[a("el-option",{attrs:{label:"string",value:"string"}}),t._v(" "),a("el-option",{attrs:{label:"number",value:"number"}}),t._v(" "),a("el-option",{attrs:{label:"boolean",value:"boolean"}}),t._v(" "),a("el-option",{attrs:{label:"object",value:"object"}}),t._v(" "),a("el-option",{attrs:{label:"array",value:"array"}})],1)],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-checkbox",{model:{value:e.check,callback:function(a){t.$set(e,"check",a)},expression:"itemValue.check"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.defaultVal,callback:function(a){t.$set(e,"defaultVal",a)},expression:"itemValue.defaultVal"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.example,callback:function(a){t.$set(e,"example",a)},expression:"itemValue.example"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.description,callback:function(a){t.$set(e,"description",a)},expression:"itemValue.description"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},["array"==e.type||"object"==e.type?a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleAdd(e,e.currentKey,s,e.level)}}},[t._v("添加子属性")]):t._e(),t._v(" "),2!=e.level?a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e.parentKey,e.currentKey,s,e.level)}}},[t._v("删除")]):t._e()],1)])])])]),t._v(" "),"array"==e.type&&Object.keys(e.items.properties).length?a("body-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e.items}}):t._e(),t._v(" "),"object"==e.type&&Object.keys(e.properties).length?a("body-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e}}):t._e()]})],2)},staticRenderFns:[]};var x=a("VU/8")(C,w,!1,function(t){a("MKab")},"data-v-3544daa6",null).exports,I={name:"create-front",components:{limitTextarea:d.a,limitInput:f.a,headerParam:k,bodyParam:x},data:function(){return{apiInfoData:{protocol:"http",requestType:"GET",frontBodyType:"json",frontParams:{},headerData:{},queryData:{},bodyJsonData:{},bodyFormData:{}},headerData:{type:"object",level:1,properties:{header:{level:2,currentKey:"header",frontOriginType:"header",backendOriginType:"header",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}},required:[]},queryData:{type:"object",level:1,properties:{query:{level:2,currentKey:"query",frontOriginType:"query",backendOriginType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}},required:[]},bodyJsonData:{type:"object",level:1,properties:{root:{level:2,currentKey:"root",frontOriginType:"body",backendOriginType:"body",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}},required:[]},bodyFormData:{type:"object",level:1,properties:{root:{level:2,currentKey:"root",frontOriginType:"body",backendOriginType:"body",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}},required:[]},rules:{requestType:[{required:!0,message:"请选择请求方法",trigger:"blur"}]}}},methods:{refreshData:function(t){this.frontData=t},submitback:function(){this.$emit("submitBack")},submitForm:function(t){var e=this;e.$refs[t].validate(function(t){if(!t)return!1;e.handleData()})},handleData:function(){if("POST"==this.apiInfoData.requestType&&"json"==this.frontOriginType){if(i()(this.bodyFormData.properties.root.properties).length)for(var t in this.bodyFormData.properties.root.properties)this.bodyFormData.properties.root.properties[t].check&&this.bodyFormData.properties.root.required.push(t);this.apiInfoData.bodyJsonData=this.bodyJsonData}else this.apiInfoData.bodyJsonData={};if("POST"==this.apiInfoData.requestType&&"form"==this.frontOriginType){if(i()(this.bodyFormData.properties).length)for(var e in this.bodyFormData.properties)this.bodyFormData.properties[e].check&&this.bodyFormData.required.push(e);this.apiInfoData.bodyFormData=this.bodyFormData}else this.apiInfoData.bodyFormData={};if(i()(this.headerData.properties).length)for(var a in this.headerData.properties)this.headerData.properties[a].check&&this.headerData.required.push(a);if(i()(this.queryData.properties).length)for(var r in this.queryData.properties)this.queryData.properties[r].check&&this.queryData.required.push(r);this.apiInfoData.headerData=this.headerData,this.apiInfoData.queryData=this.queryData,this.$store.dispatch("saveFrontInfo",this.apiInfoData),this.$emit("submitNext",this.apiInfoData)},handleStoreData:function(){this.apiInfoData=JSON.parse(c()(this.$store.state.frontInfo))}},mounted:function(){console.log(this.$store),this.$route.query.interfaceId&&this.handleStoreData()}},T={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"base-info-show border-box"},[a("el-form",{ref:"baseForm",attrs:{"label-width":"104px",model:t.apiInfoData,rules:t.rules}},[a("el-form-item",{attrs:{label:"协议:",prop:"protocol"}},[t._v(t._s(t.apiInfoData.protocol))]),t._v(" "),a("el-form-item",{attrs:{label:"请求方法:",prop:"requestType"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.apiInfoData.requestType,callback:function(e){t.$set(t.apiInfoData,"requestType",e)},expression:"apiInfoData.requestType"}},[a("el-option",{attrs:{label:"GET",value:"GET"}}),t._v(" "),a("el-option",{attrs:{label:"POST",value:"POST"}})],1)],1),t._v(" "),a("el-form-item",{staticClass:"color-303133 font-w-700",attrs:{label:"参数配置"}}),t._v(" "),a("el-form-item",{attrs:{label:"参数位置:"}},[a("div",{staticClass:"font-14 color-303133"},[t._v("header")])]),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("header-param",{ref:"frontHeaderTable",attrs:{itemData:t.headerData,frontOriginType:"header"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"参数位置:"}},[a("div",{staticClass:"font-14 color-303133"},[t._v("query")])]),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("header-param",{ref:"frontQueryTable",attrs:{itemData:t.queryData,frontOriginType:"query"}})],1),t._v(" "),"POST"==t.apiInfoData.requestType?a("el-form-item",{attrs:{label:"参数位置:"}},[a("div",{staticClass:"font-14 color-303133"},[t._v("body")]),t._v(" "),a("div",{staticClass:"font-14 color-303133"},[a("el-radio",{attrs:{label:"json"},model:{value:t.frontOriginType,callback:function(e){t.frontOriginType=e},expression:"frontOriginType"}},[t._v("json")]),t._v(" "),a("el-radio",{attrs:{label:"form"},model:{value:t.frontOriginType,callback:function(e){t.frontOriginType=e},expression:"frontOriginType"}},[t._v("form")])],1)]):t._e(),t._v(" "),"POST"==t.apiInfoData.requestType&&"json"==t.apiInfoData.frontBodyType?a("el-form-item",{attrs:{label:""}},[a("div",{staticClass:"body-param-wrap"},[a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("必选")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("默认值")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_5 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("示例")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_6 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("描述")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_7 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("操作")])])])])])]),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[a("div",{staticClass:"table-content"},[a("body-param",{ref:"frontBodyJsonTable",attrs:{itemData:t.bodyJsonData,frontOriginType:"body"},on:{refreshData:t.refreshData}})],1)])])])]):t._e(),t._v(" "),"POST"==t.apiInfoData.requestType&&"form"==t.apiInfoData.frontBodyType?a("el-form-item",{attrs:{label:""}},[a("header-param",{ref:"frontBodyFormTable",attrs:{itemData:t.bodyFormData,frontOriginType:"body"}})],1):t._e(),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.submitback}},[t._v("上一步")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitForm("baseForm")}}},[t._v("下一步")])],1)],1)],1)},staticRenderFns:[]};var $=a("VU/8")(I,T,!1,function(t){a("n0Fh")},"data-v-e76db872",null).exports,O={name:"back-table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{trData:{}}},watch:{itemData:function(t,e){this.trData=t}},mounted:function(){this.trData=this.itemData}},F={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t._l(t.itemData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==e.type||"array"==e.type?a("div",{staticClass:"cell"},[a("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[t._v(t._s(r))])]),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[t._v(t._s(e.frontOriginType))])]),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[t._v(t._s(e.type))])])])])]),t._v(" "),"array"==e.type&&Object.keys(e.items.properties).length?a("back-table-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e.items}}):t._e(),t._v(" "),"object"==e.type&&Object.keys(e.properties).length?a("back-table-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e}}):t._e()]})],2)},staticRenderFns:[]};var j=a("VU/8")(O,F,!1,function(t){a("GUiu")},"data-v-a1d428da",null).exports,K={name:"back-table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}},interfaceType:{type:String,default:function(){return"0"}}},data:function(){return{trData:{}}},methods:{blurKey:function(t,e){t.rootKey!=e&&(this.$set(this.itemData.properties,t.rootKey,t),this.$delete(this.itemData.properties,e))},changeCheck:function(t,e){if("object"==t.type&&i()(t.properties).length)for(var a in t.properties)t.properties[a].isRootKey=!1;if("array"==t.type&&i()(t.items.properties).length)for(var r in t.items.properties)t.items.properties[r].isRootKey=!1}},watch:{itemData:function(t,e){this.trData=JSON.parse(c()(t))}},mounted:function(){this.trData=JSON.parse(c()(this.itemData))}},S={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t._l(t.itemData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==e.type||"array"==e.type?a("div",{staticClass:"cell"},[a("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-checkbox",{attrs:{disabled:t.itemData.isRootKey},on:{change:function(a){t.changeCheck(e,r)}},model:{value:e.isRootKey,callback:function(a){t.$set(e,"isRootKey",a)},expression:"itemValue.isRootKey"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{staticClass:"w-110",attrs:{placeholder:"请输入参数名"},on:{blur:function(a){t.blurKey(e,r)}},model:{value:e.rootKey,callback:function(a){t.$set(e,"rootKey",a)},expression:"itemValue.rootKey"}})],1)]),t._v(" "),"0"==t.interfaceType?a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数位置"},model:{value:e.backendOriginType,callback:function(a){t.$set(e,"backendOriginType",a)},expression:"itemValue.backendOriginType"}},[a("el-option",{attrs:{label:"header",value:"header"}}),t._v(" "),a("el-option",{attrs:{label:"query",value:"query"}}),t._v(" "),a("el-option",{attrs:{label:"body",value:"body"}})],1)],1)]):t._e(),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[t._v(t._s(e.type))])]),t._v(" "),a("td",{staticClass:"el-table_1_column_4",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{staticClass:"w-110",attrs:{placeholder:"请输入参数值"},model:{value:e.defaultVal,callback:function(a){t.$set(e,"defaultVal",a)},expression:"itemValue.defaultVal"}})],1)]),t._v(" "),"1"==t.interfaceType?a("td",{staticClass:"el-table_1_column_4",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{staticClass:"w-110",attrs:{placeholder:"请输入包路径"},model:{value:e.objectClass,callback:function(a){t.$set(e,"objectClass",a)},expression:"itemValue.objectClass"}})],1)]):t._e(),t._v(" "),"1"==t.interfaceType?a("td",{staticClass:"el-table_1_column_4",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{staticClass:"w-110",attrs:{placeholder:"请输入排序"},model:{value:e.sort,callback:function(a){t.$set(e,"sort",a)},expression:"itemValue.sort"}})],1)]):t._e()])])]),t._v(" "),"array"==e.type?a("back-table-row",{key:s+"122"+r,staticClass:"el-table__row child-row",attrs:{itemData:e.items}}):t._e(),t._v(" "),"object"==e.type?a("back-table-row",{key:s+"122"+r,staticClass:"el-table__row child-row",attrs:{itemData:e}}):t._e()]})],2)},staticRenderFns:[]};var V=a("VU/8")(K,S,!1,function(t){a("ADzW")},"data-v-31d4c0d0",null).exports,q={name:"back-constant",props:{itemData:{type:Object,default:function(){return{}}},interfaceType:{type:String,default:function(){return"0"}}},data:function(){return{trData:{type:"object",properties:{name:{originType:this.originType,type:"string",currentKey:"name",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0}}},keyLength:1}},methods:{handleDel:function(t,e,a){this.$delete(this.trData.properties,e)},toAddItem:function(){var t=this.keyLength++;this.$set(this.trData.properties,"field"+t,{originType:this.originType,type:"string",currentKey:"field"+t,isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0})}},watch:{itemData:function(t,e){this.trData=JSON.parse(c()(t))},interfaceType:function(t,e){this.backType=t}},mounted:function(){this.trData=JSON.parse(c()(this.itemData))}},B={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[t._m(0),t._v(" "),"0"==t.interfaceType?a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数位置")])]):t._e(),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3)])])])]),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[a("div",{staticClass:"table-content"},[t._l(t.trData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{attrs:{placeholder:"请输入参数名"},model:{value:e.currentKey,callback:function(a){t.$set(e,"currentKey",a)},expression:"itemValue.currentKey"}})],1)]),t._v(" "),"0"==t.interfaceType?a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数位置"},model:{value:e.originType,callback:function(a){t.$set(e,"originType",a)},expression:"itemValue.originType"}},[a("el-option",{attrs:{label:"header",value:"header"}}),t._v(" "),a("el-option",{attrs:{label:"query",value:"query"}}),t._v(" "),a("el-option",{attrs:{label:"body",value:"body"}})],1)],1)]):t._e(),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数类型"},model:{value:e.type,callback:function(a){t.$set(e,"type",a)},expression:"itemValue.type"}},[a("el-option",{attrs:{label:"string",value:"string"}}),t._v(" "),a("el-option",{attrs:{label:"number",value:"number"}}),t._v(" "),a("el-option",{attrs:{label:"boolean",value:"boolean"}})],1)],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.defaultVal,callback:function(a){t.$set(e,"defaultVal",a)},expression:"itemValue.defaultVal"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e,r,s)}}},[t._v("删除")])],1)])])])])]})],2)])]),t._v(" "),a("div",{staticClass:"add-line text-center",on:{click:t.toAddItem}},[a("i",{staticClass:"el-icon-circle-plus-outline color-5584FF"}),a("span",{staticClass:"color-5584FF font-14 p-l-4"},[t._v("添加常量参数")])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[this._v("参数名")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[this._v("参数类型")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[this._v("参数值")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("th",{staticClass:"el-table_1_column_7 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[this._v("操作")])])}]};var P=a("VU/8")(q,B,!1,function(t){a("jgmr")},"data-v-0121cd59",null).exports,N={name:"create-backend",components:{limitTextarea:d.a,limitInput:f.a,backTableLeft:j,backConstant:P,backTableRight:V},data:function(){var t=this;return{apiInfoData:{interfaceType:"0",version:"",backendHttpPath:"",dubboInterface:"",dubboMethod:"",dubboVersion:"",proxyCode:"",timeout:2e4},backHeaderData:{},backQueryData:{},backBodyJsonData:{},backBodyFormData:{},rules:{version:[{required:!0,message:"请输入API版本号",trigger:"blur"}],backendHttpPath:[{required:!0,validator:function(e,a,r){""===a&&"0"==t.apiInfoData.interfaceType?r(new Error("请输入请求路径")):r()},trigger:"blur"}],timeout:[{required:!0,message:"请输入超时时长",trigger:"blur"}],dubboInterface:[{required:!0,validator:function(e,a,r){""===a&&"1"==t.apiInfoData.interfaceType?r(new Error("请输入dubbo接口名称")):r()},trigger:"blur"}],dubboMethod:[{required:!0,validator:function(e,a,r){""===a&&"1"==t.apiInfoData.interfaceType?r(new Error("请输入dubbo请求方法")):r()},trigger:"blur"}],dubboVersion:[{required:!0,validator:function(e,a,r){""===a&&"1"==t.apiInfoData.interfaceType?r(new Error("请输入请求版本号")):r()},trigger:"blur"}],proxyCode:[{required:!0,validator:function(e,a,r){""===a&&"1"==t.apiInfoData.interfaceType?r(new Error("请选择注册中心地址")):r()},trigger:"blur"}]},envSetOptions:[],constData:{type:"object",level:1,properties:{root:{level:2,currentKey:"root",constFlag:!0,originType:"header",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",example:"示例",check:!0,properties:{}}}}}},methods:{changeType:function(t){var e=this;e.$nextTick(function(){e.$refs.backForm.resetFields(),e.apiInfoData.interfaceType=t})},submitback:function(){this.$emit("submitBack")},submitForm:function(t){var e=this;e.$refs[t].validate(function(t){if(!t)return!1;e.handlebackData()})},handlebackData:function(){this.apiInfoData.backHeaderData=this.backHeaderData,this.apiInfoData.backQueryData=this.backQueryData,this.apiInfoData.backBodyJsonData=this.backBodyJsonData,this.apiInfoData.backBodyFormData=this.backBodyFormData,this.apiInfoData.constData=this.constData,this.$emit("submitNext",this.apiInfoData),this.$store.dispatch("saveBackInfo",this.apiInfoData)},getEnvSetData:function(){var t=this,e={search:t.searchValue,pageNum:t.currentPage,pageSize:100};Object(b.b)("/gateway-manage/page-proxy",e).then(function(e){var a=e.data;if("0000"==a.code)return t.envSetOptions=a.result.result||[],void(t.totalCount=a.result.totalCount);h.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},handleFrontData:function(){var t=JSON.parse(c()(this.$store.state.frontInfo));if(i()(t.headerData).length){for(var e in t.headerData.properties)t.headerData.properties[e].isRootKey=!0,t.headerData.properties[e].rootKey=e,t.headerData.properties[e].backendOriginType=t.headerData.properties[e].frontOriginType,t.headerData.properties[e].isBackendField=1,t.headerData.properties[e].objectClass="",t.headerData.properties[e].sort=0;this.backHeaderData=JSON.parse(c()(t.headerData)),this.frontHeaderData=JSON.parse(c()(t.headerData))}if(i()(t.queryData).length){for(var a in t.queryData.properties)t.queryData.properties[a].isRootKey=!0,t.queryData.properties[a].rootKey=a,t.queryData.properties[a].backendOriginType=t.queryData.properties[a].frontOriginType,t.queryData.properties[a].isBackendField=1,t.queryData.properties[a].objectClass="",t.queryData.properties[a].sort=0;this.backQueryData=JSON.parse(c()(t.queryData)),this.frontQueryData=JSON.parse(c()(t.queryData))}if(i()(t.bodyFormData).length){for(var r in t.bodyFormData.properties)t.bodyFormData.properties[r].isRootKey=!0,t.bodyFormData.properties[r].rootKey=r,t.bodyFormData.properties[r].backendOriginType=t.bodyFormData.properties[r].frontOriginType,t.bodyFormData.properties[r].isBackendField=1,t.bodyFormData.properties[r].objectClass="",t.bodyFormData.properties[r].sort=0;this.backBodyFormData=JSON.parse(c()(t.bodyFormData)),this.frontBodyFormData=JSON.parse(c()(t.bodyFormData))}if(i()(t.bodyJsonData).length){for(var s in t.bodyJsonData.properties)t.bodyJsonData.properties[s].isRootKey=!0,t.bodyJsonData.properties[s].rootKey=s,t.bodyJsonData.properties[s].backendOriginType=t.bodyJsonData.properties[s].frontOriginType,t.bodyJsonData.properties[s].isBackendField=1,t.bodyJsonData.properties[s].objectClass="",t.bodyJsonData.properties[s].sort=0;this.backBodyJsonData=JSON.parse(c()(t.bodyJsonData)),this.frontBodyJsonData=JSON.parse(c()(t.bodyJsonData))}this.$forceUpdate()},handleStoreData:function(){this.apiInfoData=JSON.parse(c()(this.$store.state.backInfo))}},mounted:function(){this.getEnvSetData(),this.handleFrontData(),this.$route.query.interfaceId&&this.handleStoreData()}},R={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"back-info-show border-box"},[a("el-form",{ref:"backForm",attrs:{"label-width":"129px",model:t.apiInfoData,rules:t.rules}},[a("el-form-item",{attrs:{label:"后端服务:",prop:"interfaceType"}},[a("el-radio-group",{on:{change:t.changeType},model:{value:t.apiInfoData.interfaceType,callback:function(e){t.$set(t.apiInfoData,"interfaceType",e)},expression:"apiInfoData.interfaceType"}},[a("el-radio",{attrs:{label:"0"}},[t._v("http")]),t._v(" "),a("el-radio",{attrs:{label:"1"}},[t._v("dubbo")])],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"API版本号",prop:"version"}},[a("limitInput",{attrs:{inputWidth:329,inputValue:t.apiInfoData.version,holder:"请输入API版本号",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"version",e)}}})],1),t._v(" "),1==t.apiInfoData.interfaceType?a("el-form-item",{attrs:{label:"dubbo接口名称:",prop:"dubboInterface"}},[a("limitInput",{attrs:{inputWidth:329,inputValue:t.apiInfoData.dubboInterface,holder:"请输入dubbo接口名称",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"dubboInterface",e)}}})],1):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?a("el-form-item",{attrs:{label:"dubbo请求方法:",prop:"dubboMethod"}},[a("limitInput",{attrs:{inputWidth:329,inputValue:t.apiInfoData.dubboMethod,holder:"请输入dubbo请求方法",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"dubboMethod",e)}}})],1):t._e(),t._v(" "),0==t.apiInfoData.interfaceType?a("el-form-item",{attrs:{label:"请求路径:",prop:"backendHttpPath"}},[a("el-input",{staticClass:"w-329",model:{value:t.apiInfoData.backendHttpPath,callback:function(e){t.$set(t.apiInfoData,"backendHttpPath",e)},expression:"apiInfoData.backendHttpPath"}})],1):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?a("el-form-item",{attrs:{label:"注册中心地址:",prop:"proxyCode"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.apiInfoData.proxyCode,callback:function(e){t.$set(t.apiInfoData,"proxyCode",e)},expression:"apiInfoData.proxyCode"}},t._l(t.envSetOptions,function(t){return a("el-option",{key:t.proxyCode,attrs:{label:t.proxyName,value:t.proxyCode}})}))],1):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?a("el-form-item",{attrs:{label:"请求版本号",prop:"dubboVersion"}},[a("limitInput",{attrs:{inputWidth:329,inputValue:t.apiInfoData.dubboVersion,holder:"请输入请求版本号",getByType:"word",maxLength:20},on:{"update:inputValue":function(e){t.$set(t.apiInfoData,"dubboVersion",e)}}})],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"超时时长:",prop:"timeout"}},[a("el-input-number",{attrs:{"controls-position":"right",min:1,max:1e9},model:{value:t.apiInfoData.timeout,callback:function(e){t.$set(t.apiInfoData,"timeout",e)},expression:"apiInfoData.timeout"}})],1),t._v(" "),a("el-form-item",{staticClass:"color-303133 font-w-700",attrs:{label:"参数配置"}},[a("div",{staticClass:"back-data-wrap font-0"},[a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition inline-block vertical-top",staticStyle:{width:"30%","table-layout":"fixed"}},[a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[a("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"})]),t._v(" "),a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数位置")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数类型")])])])])])]),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none back-table-left"},[a("div",{staticClass:"table-content"},[t.backHeaderData.properties&&Object.keys(t.backHeaderData.properties).length?a("back-table-left",{attrs:{itemData:t.frontHeaderData}}):t._e(),t._v(" "),t.backQueryData.properties&&Object.keys(t.backQueryData.properties).length?a("back-table-left",{attrs:{itemData:t.frontQueryData}}):t._e(),t._v(" "),t.backBodyJsonData.properties&&Object.keys(t.backBodyJsonData.properties).length?a("back-table-left",{attrs:{itemData:t.frontBodyJsonData}}):t._e(),t._v(" "),t.backBodyFormData.properties&&Object.keys(t.backBodyFormData.properties).length?a("back-table-left",{attrs:{itemData:t.frontBodyFormData}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition inline-block vertical-top",staticStyle:{width:"70%","table-layout":"fixed"}},[a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[a("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"})]),t._v(" "),a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("是否后端参数")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数名映射")])]),t._v(" "),0==t.apiInfoData.interfaceType?a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数位置")])]):t._e(),t._v(" "),a("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数值")])]),t._v(" "),1==t.apiInfoData.interfaceType?a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("包路径")])]):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("排序")])]):t._e()])])])]),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[a("div",{staticClass:"table-content"},[t.backHeaderData.properties&&Object.keys(t.backHeaderData.properties).length?a("back-table-right",{attrs:{itemData:t.backHeaderData,interfaceType:t.apiInfoData.interfaceType}}):t._e(),t._v(" "),t.backQueryData.properties&&Object.keys(t.backQueryData.properties).length?a("back-table-right",{attrs:{itemData:t.backQueryData,interfaceType:t.apiInfoData.interfaceType}}):t._e(),t._v(" "),t.backBodyJsonData.properties&&Object.keys(t.backBodyJsonData.properties).length?a("back-table-right",{attrs:{itemData:t.backBodyJsonData,interfaceType:t.apiInfoData.interfaceType}}):t._e(),t._v(" "),t.backBodyFormData.properties&&Object.keys(t.backBodyFormData.properties).length?a("back-table-right",{attrs:{itemData:t.backBodyFormData,interfaceType:t.apiInfoData.interfaceType}}):t._e()],1)])])]),t._v(" "),a("div",{staticClass:"constant-wrap"},[a("back-constant",{attrs:{itemData:t.constData,interfaceType:t.apiInfoData.interfaceType}})],1)]),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.submitback}},[t._v("上一步")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitForm("backForm")}}},[t._v("下一步")])],1)],1)],1)},staticRenderFns:[]};var J=a("VU/8")(N,R,!1,function(t){a("WleN")},"data-v-0d408573",null).exports,E=a("woOf"),L=a.n(E),U={name:"body-row",props:{itemData:{type:Object,default:function(){return{}}}},data:function(){return{trData:{},keyLength:1}},methods:{blurKey:function(t,e){t.currentKey!=e&&(this.$set(this.itemData.properties,t.currentKey,t),this.$delete(this.itemData.properties,e))},updateKey:function(t){for(var e in t)e!=t[e].currentKey&&(t[e].pkey=t[t[e].currentKey]=t[e],this.$delete(t,e)),t[e]&&"object"==t[e].type&&i()(t[e].properties).length&&this.updateKey(t[e].properties),t[e]&&"array"==t[e].type&&i()(t[e].items.properties).length&&this.updateKey(t[e].items.properties)},handleDel:function(t,e,a,r){var s=this;return u()(n.a.mark(function a(){var r;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r=s,a.next=3,r.updateKey(r.itemData.properties);case 3:if(t){a.next=6;break}return r.$delete(r.itemData.properties,e),a.abrupt("return",!1);case 6:r.handleDelData(r.itemData,t,e);case 7:case"end":return a.stop()}},a,s)}))()},handleDelData:function(t,e,a){this.handleObjData(t,e,a)},handleObjData:function(t,e,a){for(var r in t)t[r]==e&&this.$delete(t.properties,a)},changeType:function(t,e,a,r){"string"!=t&&"boolean"!=t&&"number"!=t&&"object"!=t||(e.properties={},e.hasOwnProperty("items")&&this.$delete(e,"items")),"array"==t&&this.$set(e,"items",{parentKey:a,level:parseInt(r)+1,type:"string",defaultVal:"val",description:"描述",example:"示例",properties:{}}),this.$forceUpdate()},handleAdd:function(t,e,a,r){var s=this.keyLength++;if("array"==t.type)return this.$set(t.items.properties,"field"+s,{parentKey:e,level:parseInt(r)+1,type:"string",currentKey:"field"+s,defaultVal:"val",description:"描述",example:"示例",properties:{}}),this.$forceUpdate(),!1;this.$set(t.properties,"field"+s,{parentKey:e,level:parseInt(r)+1,type:"string",currentKey:"field"+s,defaultVal:"val",description:"描述",example:"示例",properties:{}}),this.$forceUpdate()}},watch:{itemData:function(t,e){t&&(this.trData=JSON.parse(c()(t)))}},mounted:function(){this.trData=JSON.parse(c()(this.itemData))}},A={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t._l(t.itemData.properties,function(e,r,s){return[a("table",{key:s+r+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("tbody",[a("tr",{staticClass:"el-table__row"},[a("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{attrs:{disabled:"array"==e.type||"object"==e.type},on:{blur:function(a){t.blurKey(e,r)}},model:{value:e.currentKey,callback:function(a){t.$set(e,"currentKey",a)},expression:"itemValue.currentKey"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-select",{attrs:{placeholder:"请选择参数类型"},on:{change:function(a){t.changeType(e.type,e,e.currentKey,e.level)}},model:{value:e.type,callback:function(a){t.$set(e,"type",a)},expression:"itemValue.type"}},[a("el-option",{attrs:{label:"string",value:"string"}}),t._v(" "),a("el-option",{attrs:{label:"number",value:"number"}}),t._v(" "),a("el-option",{attrs:{label:"boolean",value:"boolean"}}),t._v(" "),a("el-option",{attrs:{label:"object",value:"object"}}),t._v(" "),a("el-option",{attrs:{label:"array",value:"array"}})],1)],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},[a("el-input",{model:{value:e.example,callback:function(a){t.$set(e,"example",a)},expression:"itemValue.example"}})],1)]),t._v(" "),a("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[a("div",{staticClass:"cell"},["array"==e.type||"object"==e.type?a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleAdd(e,e.currentKey,s,e.level)}}},[t._v("添加子属性")]):t._e(),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){t.handleDel(e.parentKey,e.currentKey,s,e.level)}}},[t._v("删除")])],1)])])])]),t._v(" "),"array"==e.type&&Object.keys(e.items.properties).length?a("body-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e.items}}):t._e(),t._v(" "),"object"==e.type&&Object.keys(e.properties).length?a("body-row",{key:s+"122"+r,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:e}}):t._e()]})],2)},staticRenderFns:[]};var H=a("VU/8")(U,A,!1,function(t){a("IHMK")},"data-v-5f9cf3ef",null).exports,Q=a("jvWE"),M={name:"create-front",components:{limitTextarea:d.a,limitInput:f.a,headerParam:k,resultTable:H},data:function(){return{apiInfoData:{resultParams:{},sucReturn:"",errReturn:"",errCode:[{error_code:"",error_info:"",orig_error_code:""}]},errOptions:[],resultParams:{type:"object",level:1,properties:{root:{level:2,currentKey:"root",type:"object",defaultVal:"val",description:"描述",example:"示例",properties:{}}}},rules:{sucReturn:[{required:!0,message:"请输入成功返回示例",trigger:"blur"}],errReturn:[{required:!0,message:"请输入失败返回示例",trigger:"blur"}]},keyLength:1}},methods:{remoteMethod:function(t){""!==t?this.getErrcodeData(t):this.errOptions=[]},toAddItem:function(){var t=this.keyLength++;this.$set(this.resultParams.properties,"field"+t,{level:2,parentKey:"",type:"string",currentKey:"field"+t,defaultVal:"val",description:"描述",example:"示例",properties:{}})},delErrorCode:function(t){this.apiInfoData.errCode.splice(t,1)},addErrCodeItem:function(){this.apiInfoData.errCode.push({error_code:"",error_info:"",orig_error_code:""})},submitback:function(){this.$emit("submitBack")},submitForm:Object(Q.a)(function(t){var e=this;e.$refs[t].validate(function(t){if(!t)return!1;e.handleFrontBackData()})},500),handleFrontData:function(){var t={type:"object",level:1,properties:{},required:[]},e=JSON.parse(c()(this.$store.state.frontInfo));return t.properties=L()(e.queryData.properties,e.headerData.properties),t},handleBackData:function(){var t={type:"object",level:1,properties:{},required:[]},e=JSON.parse(c()(this.$store.state.backInfo));return t.properties=L()(e.backQueryData.properties,e.backHeaderData.properties,e.constData.properties),t},handleFrontBackData:function(){var t=this;return u()(n.a.mark(function e(){var a,r,s;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=t,e.next=3,a.handleFrontData();case 3:return r=e.sent,e.next=6,a.handleBackData();case 6:return s=e.sent,e.next=9,a.toPostApi(r,s);case 9:case"end":return e.stop()}},e,t)}))()},toPostApi:function(t,e){var a=this,r={interfaceName:a.$store.state.baseInfo.interfaceName,interfaceGroupId:a.$route.query.interfaceGroupId,interfaceUrl:a.$store.state.baseInfo.interfaceUrl,interfaceDescribe:a.$store.state.baseInfo.interfaceDescribe,projectId:a.$route.query.projectId,target:a.$store.state.baseInfo.target,optType:a.$store.state.baseInfo.optType,protocol:a.$store.state.frontInfo.protocol,requestType:a.$store.state.frontInfo.requestType,frontParams:c()(t),interfaceType:a.$store.state.backInfo.interfaceType,version:a.$store.state.backInfo.version,backendHttpPath:a.$store.state.backInfo.backendHttpPath,dubboInterface:a.$store.state.backInfo.dubboInterface,dubboMethod:a.$store.state.backInfo.dubboMethod,dubboVersion:a.$store.state.backInfo.dubboVersion,timeout:a.$store.state.backInfo.timeout,endParams:c()(e),resultParams:c()(a.resultParams),sucReturn:a.apiInfoData.sucReturn,errReturn:a.apiInfoData.errReturn,errCode:c()(a.apiInfoData.errCode),interfaceId:a.$store.state.baseInfo.interfaceId,interfaceVersionId:a.$store.state.baseInfo.interfaceVersionId};Object(b.b)(a.$store.state.baseInfo.interfaceId?"/gateway-manage/update-api":"/gateway-manage/create-api",r).then(function(t){var e=t.data;if("0000"==e.code)return y.a.showmsg("保存成功","success"),a.$store.dispatch("clearApiData"),void a.$router.push("/apiList");h.a.errorMsg(e)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},getErrcodeData:function(t){var e=this,a={pageNum:1,pageSize:100,search:t};Object(b.b)("/gateway-manage/page-error-setting",a).then(function(t){var a=t.data;"0000"!=a.code?h.a.errorMsg(a):e.errOptions=a.result.result||[]}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},handleStoreData:function(){this.apiInfoData=JSON.parse(c()(this.$store.state.resultInfo))}},mounted:function(){console.log(this.$store),this.$route.query.interfaceId&&this.handleStoreData()}},G={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"result-info-show border-box"},[a("el-form",{ref:"resultForm",attrs:{"label-width":"114px",model:t.apiInfoData,rules:t.rules}},[a("el-form-item",{attrs:{label:"返回类型:"}},[t._v("json")]),t._v(" "),a("el-form-item",{attrs:{label:"返回参数:"}},[a("div",{staticClass:"body-param-wrap"},[a("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[a("div",{staticClass:"el-table__header-wrapper"},[a("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[a("thead",{staticClass:"has-gutter"},[a("tr",{},[a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_5 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("示例值")])]),t._v(" "),a("th",{staticClass:"el-table_1_column_7 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[t._v("操作")])])])])])]),t._v(" "),a("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[a("div",{staticClass:"table-content"},[a("result-table",{ref:"resultBodyTable",attrs:{itemData:t.resultParams},on:{refreshData:t.refreshData}}),t._v(" "),a("div",{staticClass:"add-line text-center",on:{click:t.toAddItem}},[a("i",{staticClass:"el-icon-circle-plus-outline color-5584FF"}),a("span",{staticClass:"color-5584FF font-14 p-l-4"},[t._v("添加行")])])],1)])])])]),t._v(" "),a("el-form-item",{attrs:{label:"错误码映射:"}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.apiInfoData.errCode}},[a("el-table-column",{attrs:{label:"原始错误码"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"cell"},[a("el-input",{attrs:{placeholder:"请输入原始错误码"},model:{value:e.row.orig_error_code,callback:function(a){t.$set(e.row,"orig_error_code",a)},expression:"scope.row.orig_error_code"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"错误码映射"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"cell"},[a("el-select",{attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入映射错误码","remote-method":t.remoteMethod,loading:t.loading},model:{value:e.row.error_code,callback:function(a){t.$set(e.row,"error_code",a)},expression:"scope.row.error_code"}},t._l(t.errOptions,function(t){return a("el-option",{key:t.errorCode,attrs:{label:t.errorCode,value:t.errorCode}})}))],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"错误信息"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"cell"},[a("el-input",{attrs:{placeholder:"请输入错误信息"},model:{value:e.row.error_info,callback:function(a){t.$set(e.row,"error_info",a)},expression:"scope.row.error_info"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"cell"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.delErrorCode(e.$index)}}},[t._v("删除")])],1)]}}])})],1),t._v(" "),a("div",{staticClass:"add-line add-err-line text-center",on:{click:t.addErrCodeItem}},[a("i",{staticClass:"el-icon-circle-plus-outline color-5584FF"}),a("span",{staticClass:"color-5584FF font-14 p-l-4"},[t._v("添加错误码配置")])])],1),t._v(" "),a("el-form-item",{attrs:{label:"成功返回示例:",prop:"sucReturn"}},[a("el-input",{staticClass:"w-389",attrs:{type:"textarea",rows:3,placeholder:"请输入内容"},model:{value:t.apiInfoData.sucReturn,callback:function(e){t.$set(t.apiInfoData,"sucReturn",e)},expression:"apiInfoData.sucReturn"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"失败返回示例:",prop:"errReturn"}},[a("el-input",{staticClass:"w-389",attrs:{type:"textarea",rows:3,placeholder:"请输入内容"},model:{value:t.apiInfoData.errReturn,callback:function(e){t.$set(t.apiInfoData,"errReturn",e)},expression:"apiInfoData.errReturn"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.submitback}},[t._v("上一步")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitForm("resultForm")}}},[t._v("完 成")])],1)],1)],1)},staticRenderFns:[]};var W=a("VU/8")(M,G,!1,function(t){a("qwFl")},"data-v-79d57b5e",null).exports,z={name:"createApi",components:{navBread:r.a,createBase:_,createFront:$,createBackend:J,createResult:W},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:"API列表",path:"/apiList"},{name:"创建API",path:""}],activeStep:1,stepData:[{stepName:"基础信息"},{stepName:"前端配置"},{stepName:"后端配置"},{stepName:"定义返回"}],projectId:this.$route.query.projectId,interfaceGroupId:this.$route.query.interfaceGroupId}},methods:{submitNext:function(){this.activeStep++},submitBack:function(){this.activeStep--}},watch:{$route:{handler:function(t,e){},deep:!0}},mounted:function(){this.$emit("showTab",22)},beforeDestroy:function(){this.$store.dispatch("clearData")}},Y={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:t.navPath}})],1),t._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box"},[a("div",{staticClass:"api-main-content border-box"},[a("div",{staticClass:"create-api-body"},[a("div",{staticClass:"create-api-step font-0"},t._l(t.stepData,function(e,r){return a("div",{key:r+e.stepName,class:["api-step-cell inline-block border-box",r+1==t.activeStep?"active-step":""],style:{width:100/t.stepData.length+"%","max-width":100/t.stepData.length+"%"}},[a("div",{staticClass:"api-step-cell_inner border-box"},[r<t.stepData.length-1?a("div",{staticClass:"api-step-cell_line"}):t._e(),t._v(" "),a("div",{staticClass:"api-step-cell_title"},[a("div",{staticClass:"el-step__icon is-text inline-block"},[a("div",{staticClass:"el-step__icon-inner font-14"},[t._v(t._s(r+1))])]),t._v(" "),a("div",{staticClass:"api-step-cell_txt p-lr-10 bg-fff inline-block font-16"},[t._v(t._s(e.stepName))])])])])})),t._v(" "),"1"==t.activeStep?a("div",{staticClass:"create-api-base"},[a("create-base",{on:{submitNext:t.submitNext}})],1):t._e(),t._v(" "),"2"==t.activeStep?a("div",{staticClass:"create-api-front"},[a("create-front",{on:{submitBack:t.submitBack,submitNext:t.submitNext}})],1):t._e(),t._v(" "),"3"==t.activeStep?a("div",{staticClass:"create-api-back"},[a("create-backend",{on:{submitBack:t.submitBack,submitNext:t.submitNext}})],1):t._e(),t._v(" "),"4"==t.activeStep?a("div",{staticClass:"create-api-result"},[a("create-result",{on:{submitBack:t.submitBack,submitNext:t.submitNext}})],1):t._e()])])])])},staticRenderFns:[]};var X=a("VU/8")(z,Y,!1,function(t){a("DNlE")},"data-v-cd2ba118",null);e.default=X.exports},exGp:function(t,e,a){"use strict";e.__esModule=!0;var r,s=a("//Fk"),i=(r=s)&&r.__esModule?r:{default:r};e.default=function(t){return function(){var e=t.apply(this,arguments);return new i.default(function(t,a){return function r(s,o){try{var n=e[s](o),l=n.value}catch(t){return void a(t)}if(!n.done)return i.default.resolve(l).then(function(t){r("next",t)},function(t){r("throw",t)});t(l)}("next")})}}},jgmr:function(t,e){},jyFz:function(t,e,a){var r=function(){return this}()||Function("return this")(),s=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=s&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=a("SldL"),s)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},n0Fh:function(t,e){},qwFl:function(t,e){}});
\ No newline at end of file
webpackJsonp([3],{"/ZYZ":function(t,a){},"20o2":function(t,a){},"3QDq":function(t,a){},"4rDX":function(t,a){},"7xIC":function(t,a){},"87en":function(t,a){},QJK8:function(t,a){},"T/Hj":function(t,a){},ej2L:function(t,a){},r4m9:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var s=e("319J"),i=e("mvHQ"),o=e.n(i),l={name:"base-info-show",props:{apiData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{apiInfoData:{}}},watch:{apiData:function(t,a){this.apiInfoData=t}},mounted:function(){this.apiInfoData=this.apiData}},r={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"base-info-show border-box"},[e("el-form",{attrs:{"label-width":"104px",model:t.apiInfoData}},[e("el-form-item",{attrs:{label:"API名称:"}},[t._v("\n "+t._s(t.apiInfoData.interfaceName)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"API类型:"}},[t._v("\n "+t._s(1==t.apiInfoData.target?"公开":"私有")+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"访问类型:"}},[t._v("\n "+t._s(t.apiInfoData.requestType)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"描述:"}},[t._v("\n "+t._s(t.apiInfoData.interfaceDescribe)+"\n ")])],1)],1)},staticRenderFns:[]};var n=e("VU/8")(l,r,!1,function(t){e("tKOC")},"data-v-52b0b3b9",null).exports,c={name:"table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{trData:{protocol:"http",interfaceUrl:"/",requestType:"post",frontParams:{type:"object",properties:{name:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,required:[],properties:{nameId:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}}},id:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}},required:[]}}}},watch:{itemData:function(t,a){this.trData=t}},mounted:function(){this.trData=this.itemData}},d={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[t._l(t.itemData,function(a,s,i){return[e("table",{key:i+s+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("tbody",[e("tr",{staticClass:"el-table__row"},[e("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==a.type||"array"==a.type?e("div",{staticClass:"cell"},[e("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),e("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(s))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.type))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[e("el-checkbox",{attrs:{disabled:"true"},model:{value:a.check,callback:function(e){t.$set(a,"check",e)},expression:"itemValue.check"}})],1)]),t._v(" "),e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.defaultVal))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.description))])])])])]),t._v(" "),"array"==a.type?e("table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a.items.properties}}):t._e(),t._v(" "),"object"==a.type?e("table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a.properties}}):t._e()]})],2)},staticRenderFns:[]};var p={name:"frontend-info-show",components:{tableTr:e("VU/8")(c,d,!1,function(t){e("87en")},"data-v-abec1a40",null).exports},props:{apiData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{apiInfoData:{protocol:"http",interfaceUrl:"/",requestType:"post",frontParams:{type:"object",properties:{name:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,required:[],properties:{nameId:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,properties:{age:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0},email:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}}}}},id:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}},required:[]}}}},watch:{apiData:function(t,a){this.apiInfoData=t}},mounted:function(){this.apiInfoData=this.apiData}},u={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"frontend-info-show border-box"},[e("el-form",{attrs:{"label-width":"104px",model:t.apiInfoData}},[e("el-form-item",{attrs:{label:"协议:"}},[t._v("\n "+t._s(t.apiInfoData.protocol)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"请求路径:"}},[t._v("\n "+t._s(t.apiInfoData.interfaceUrl)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"请求方法:"}},[t._v("\n "+t._s(t.apiInfoData.requestType)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"参数配置:"}},[e("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[e("div",{staticClass:"el-table__header-wrapper"},[e("table",{staticClass:"el-table__header",staticStyle:{width:"100%"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("thead",{staticClass:"has-gutter"},[e("tr",{},[e("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"})]),t._v(" "),e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("必选")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("示例")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_5 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("描述")])])])])])]),t._v(" "),e("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[e("div",{staticClass:"table-content"},[e("table-tr",{attrs:{itemData:t.apiInfoData.frontParams.properties}})],1)])])])],1)],1)},staticRenderFns:[]};var f=e("VU/8")(p,u,!1,function(t){e("7xIC")},"data-v-3e0bcf0f",null).exports,_={name:"back-table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{trData:{}}},watch:{itemData:function(t,a){this.trData=t}},mounted:function(){this.trData=this.itemData}},b={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[t._l(t.itemData.properties,function(a,s,i){return[e("table",{key:i+s+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("tbody",[e("tr",{staticClass:"el-table__row"},[e("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==a.type||"array"==a.type?e("div",{staticClass:"cell"},[e("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),e("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(s))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.originType))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.type))])])])])]),t._v(" "),"array"==a.type&&Object.keys(a.items.properties).length?e("back-table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a.items}}):t._e(),t._v(" "),"object"==a.type&&Object.keys(a.properties).length?e("back-table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a}}):t._e()]})],2)},staticRenderFns:[]};var m=e("VU/8")(_,b,!1,function(t){e("3QDq")},"data-v-4a2a093e",null).exports,v={name:"back-table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{trData:{}}},watch:{itemData:function(t,a){this.trData=t}},mounted:function(){this.trData=this.itemData}},h={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[t._l(t.itemData.properties,function(a,s,i){return[e("table",{key:i+s+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("tbody",[e("tr",{staticClass:"el-table__row"},[e("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==a.type||"array"==a.type?e("div",{staticClass:"cell"},[e("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),e("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(s))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.type))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.type))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_4",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.defaultVal))])])])])]),t._v(" "),"array"==a.type&&Object.keys(a.items.properties).length?e("back-table-row",{key:i+"122"+s,staticClass:"el-table__row child-row",attrs:{itemData:a.items}}):t._e(),t._v(" "),"object"==a.type&&Object.keys(a.properties).length?e("back-table-row",{key:i+"123"+s,staticClass:"el-table__row child-row",attrs:{itemData:a}}):t._e()]})],2)},staticRenderFns:[]};var y={name:"backend-info-show",components:{backTableTr:m,backTableRight:e("VU/8")(v,h,!1,function(t){e("T/Hj")},"data-v-42f39627",null).exports},props:{apiData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{apiInfoData:{protocol:"http",interfaceUrl:"/",requestType:"post",endParams:{type:"object",properties:{name:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,required:[],properties:{nameId:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,properties:{age:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0},email:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}}}}},id:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}},required:[]}}}},watch:{apiData:function(t,a){this.apiInfoData=t}},mounted:function(){this.apiInfoData=this.apiData}},g={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"backend-info-show border-box"},[e("el-form",{attrs:{"label-width":"104px",model:t.apiInfoData}},[e("el-form-item",{attrs:{label:"后端服务:"}},[t._v("\n "+t._s(0==t.apiInfoData.interfaceType?"http":"dubbo")+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"环境:"}},[t._v("\n "+t._s(t.apiInfoData.protocol)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"API版本号:"}},[t._v("\n "+t._s(t.apiInfoData.version)+"\n ")]),t._v(" "),0==t.apiInfoData.interfaceType?e("el-form-item",{attrs:{label:"请求路径:"}},[t._v("\n "+t._s(t.apiInfoData.backendHttpPath)+"\n ")]):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?e("el-form-item",{attrs:{label:"dubbo接口名称:"}},[t._v("\n "+t._s(t.apiInfoData.dubboInterface)+"\n ")]):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?e("el-form-item",{attrs:{label:"dubbo请求方法:"}},[t._v("\n "+t._s(t.apiInfoData.dubboMethod)+"\n ")]):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?e("el-form-item",{attrs:{label:"注册中心地址:"}},[t._v("\n "+t._s(t.apiInfoData.proxyCode)+"\n ")]):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?e("el-form-item",{attrs:{label:"请求版本号:"}},[t._v("\n "+t._s(t.apiInfoData.dubboVersion)+"\n ")]):t._e(),t._v(" "),e("el-form-item",{attrs:{label:"超时时长:"}},[t._v("\n "+t._s(t.apiInfoData.timeout)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"参数映射:"}},[e("div",{staticClass:"table-wrap-body font-0"},[e("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition inline-block vertical-top",staticStyle:{width:"30%","table-layout":"fixed"}},[e("div",{staticClass:"el-table__header-wrapper"},[e("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("thead",{staticClass:"has-gutter"},[e("tr",{},[e("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"})]),t._v(" "),e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数位置")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数类型")])])])])])]),t._v(" "),e("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[e("div",{staticClass:"table-content"},[e("back-table-tr",{attrs:{itemData:t.apiInfoData.endParams}})],1)])]),t._v(" "),e("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition inline-block vertical-top",staticStyle:{width:"70%","table-layout":"fixed"}},[e("div",{staticClass:"el-table__header-wrapper"},[e("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("thead",{staticClass:"has-gutter"},[e("tr",{},[e("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"})]),t._v(" "),e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数名映射")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数类型映射")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("包名")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数值")])])])])])]),t._v(" "),e("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[e("div",{staticClass:"table-content"},[e("back-table-right",{attrs:{itemData:t.apiInfoData.endParams}})],1)])])])])],1)],1)},staticRenderFns:[]};var C=e("VU/8")(y,g,!1,function(t){e("20o2")},"data-v-827ba08a",null).exports,w={name:"table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{trData:{protocol:"http",interfaceUrl:"/",requestType:"post",frontParams:{type:"object",properties:{name:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,required:[],properties:{nameId:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}}},id:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}},required:[]}}}},watch:{itemData:function(t,a){this.trData=t}},mounted:function(){this.trData=this.itemData}},D={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[t._l(t.itemData.properties,function(a,s,i){return[e("table",{key:i+s+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("tbody",[e("tr",{staticClass:"el-table__row"},[e("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==a.type||"array"==a.type?e("div",{staticClass:"cell"},[e("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),e("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(s))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.type))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.defaultVal))])])])])]),t._v(" "),"array"==a.type&&Object.keys(a.items.properties).length?e("table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a.items}}):t._e(),t._v(" "),"object"==a.type&&Object.keys(a.properties).length?e("table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a}}):t._e()]})],2)},staticRenderFns:[]};var k={name:"back-info-show",components:{backInfoTable:e("VU/8")(w,D,!1,function(t){e("zR8Z")},"data-v-72eb4927",null).exports},props:{apiData:{type:[Object,Array],default:function(){return{interfaceName:"1",interfaceType:"http",requestType:"GET",interfaceDescribe:"test",errCode:[{errorCode:"1",errorInfo:"添加成功"}]}}}},data:function(){return{apiInfoData:{interfaceName:"1",interfaceType:"http",requestType:"GET",interfaceDescribe:"test",errCode:[{errorCode:"1",errorInfo:"添加成功"}],resultParams:{type:"object",properties:{name:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,required:[],properties:{nameId:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,properties:{age:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0},email:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}}}}},id:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}},required:[]}}}},watch:{apiData:function(t,a){this.apiInfoData=t}},mounted:function(){this.apiInfoData=this.apiData}},I={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"back-info-show border-box"},[e("el-form",{attrs:{"label-width":"104px",model:t.apiInfoData}},[e("el-form-item",{attrs:{label:"返回参数:"}},[e("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[e("div",{staticClass:"el-table__header-wrapper"},[e("table",{staticClass:"el-table__header",staticStyle:{width:"100%"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("thead",{staticClass:"has-gutter"},[e("tr",{},[e("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"})]),t._v(" "),e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("示例")])])])])])]),t._v(" "),e("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[e("div",{staticClass:"table-content"},[e("back-info-table",{attrs:{itemData:t.apiInfoData.resultParams}})],1)])])]),t._v(" "),e("el-form-item",{attrs:{label:"错误码:"}},[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.apiInfoData.errCode}},[e("el-table-column",{attrs:{prop:"orig_error_code",label:"错误码"}}),t._v(" "),e("el-table-column",{attrs:{prop:"error_code",label:"映射错误码"}}),t._v(" "),e("el-table-column",{attrs:{prop:"error_info",label:"错误信息"}})],1)],1),t._v(" "),e("el-form-item",{attrs:{label:"成功返回示例:"}},[e("div",{staticClass:"common-back-pre"},[e("pre",[t._v(" "+t._s(t.apiInfoData.sucReturn)+"\n ")])])]),t._v(" "),e("el-form-item",{attrs:{label:"失败返回示例:"}},[e("div",{staticClass:"common-back-pre"},[e("pre",[t._v(" "+t._s(t.apiInfoData.errReturn)+"\n ")])])])],1)],1)},staticRenderFns:[]};var x=e("VU/8")(k,I,!1,function(t){e("4rDX")},"data-v-1bb778e8",null).exports,S=e("znuk"),j=e("P9l9"),T=e("LlAa"),V=e("TUB1"),q={name:"go-history",props:{historyShow:{type:Boolean,default:!1},apiData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{customDialog:!1,selectVersion:"",tableData:[],pageSize:20,currentPage:1,totalCount:0}},methods:{handleClose:function(t){t(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.$emit("hideHistoryDialog")},customConfirm:function(){if(!this.selectVersion)return this.$message.error({duration:1e3,message:"请选择回退版本"}),!1;this.postEditData()},postEditData:function(){var t=this,a={interfaceVersionId:t.apiData.interfaceVersionId,target:t.selectVersion};Object(j.a)("/gateway-manage/reset-api",a).then(function(a){var e=a.data;if("0000"==e.code)return V.a.showmsg("回退成功","success"),void t.setData();T.a.errorMsg(e)}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})},setData:function(t){this.$emit("hideHistoryDialog")},handleSizeChange:function(t){this.pageSize=t,this.getData()},handleCurrentChange:function(t){this.currentPage=t,this.getData()},handleShow:function(t,a){this.$router.push("/apiListManageShow")},getData:function(){var t=this,a={pageNum:t.currentPage,pageSize:t.pageSize,sceneCode:t.apiData.sceneCode,interfaceId:t.apiData.interfaceId};Object(j.a)("/gateway-manage/page-api-publish-record",a).then(function(a){var e=a.data;if(1==e.errorCode)return t.tableData=e.result.result||[],void(t.totalCount=e.result.totalCount);T.a.errorMsg(e)}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})}},watch:{$route:{handler:function(t,a){},deep:!0},historyShow:function(t,a){this.customDialog=t}},mounted:function(){this.customDialog=this.historyShow,this.getData()}},R={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[e("el-dialog",{staticClass:"edit-dialog",attrs:{title:"选择回退版本",visible:t.customDialog,width:"600px","before-close":t.handleClose},on:{"update:visible":function(a){t.customDialog=a}}},[e("div",{staticClass:"table-wrap"},[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData}},[e("el-table-column",{attrs:{label:"","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-radio",{attrs:{label:a.row.interfaceVersionId},model:{value:t.selectVersion,callback:function(a){t.selectVersion=a},expression:"selectVersion"}})]}}])}),t._v(" "),e("el-table-column",{attrs:{prop:"version",label:"发布版本","show-overflow-tooltip":""}}),t._v(" "),e("el-table-column",{attrs:{label:"发布备注","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[t._v("\n "+t._s(a.row.remark)+"\n ")]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"发布时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(a.row.createTime)))]),t._v(" "),e("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(a.row.createTime)))])]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){t.handleShow(a.$index,a.row)}}},[t._v("查看")])]}}])})],1),t._v(" "),t.totalCount?e("div",{staticClass:"pagination text-right m-t-14"},[e("el-pagination",{attrs:{small:"","page-size":t.pageSize,"current-page":t.currentPage,layout:"prev, pager, next",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1),t._v(" "),e("div",{staticClass:"dialog-footer",staticStyle:{"padding-bottom":"10px"},attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.customCancel}},[t._v("取 消")]),t._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(a){t.customConfirm("syncForm")}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var K=e("VU/8")(q,R,!1,function(t){e("yZKR")},"data-v-9eb6071a",null).exports,P={name:"api-version-show",components:{baseInfoShow:n,frontendInfoShow:f,backendInfoShow:C,backInfoShow:x,publishSet:S.a,goHistory:K},data:function(){return{apiData:{interfaceId:"",interfaceName:"",interfaceGroupId:"",interfaceUrl:"",interfaceDescribe:"",projectId:"",optType:"",sucReturn:"",errReturn:"",errCode:[],frontParams:{},endParams:{},target:"",requestType:"POST",protocol:"http",version:"",interfaceType:"HTTP",dubboMethod:"",dubboInterface:"",httpPath:"",proxyCode:"",resultParams:"",backendRequestType:"",timeout:43087112},activeInfo:0,editRow:{},publishShow:!1,historyShow:!1}},methods:{handlePublish:function(){this.publishShow=!0,this.editRow=JSON.parse(o()(this.apiData))},hidePublishDialog:function(t){this.publishShow=!1,this.editRow={},t&&(this.apiData.status=2)},handleGoHistory:function(){this.historyShow=!0},hideHistoryDialog:function(){this.historyShow=!1},handleDel:function(){var t=this;t.$confirm("确认删除此版本吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.postDelData()}).catch(function(){})},postDelData:function(){var t=this,a={interfaceVersionId:t.apiData.interfaceVersionId};Object(j.b)("/gateway-manage/delete-api-version",a).then(function(a){var e=a.data;if("0000"==e.code)return V.a.showmsg("删除成功","success"),void t.$router.push("/apiListManage?interfaceId="+t.$route.query.interfaceId+"&interfaceName="+t.$route.query.interfaceName);T.a.errorMsg(e)}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})},handleGoBack:function(){var t=this;t.$confirm("确认将【当前版本】回滚到【已发布版本号】吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.postGoBack()}).catch(function(){})},postGoBack:function(){var t=this,a={interfaceVersionId:t.apiData.interfaceVersionId};Object(j.a)("/gateway-manage/rollback-api",a).then(function(t){var a=t.data;"0000"!=a.code?T.a.errorMsg(a):V.a.showmsg("回滚成功","success")}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})},goAuthor:function(t,a){this.activeInfo=a,this.$el.querySelector(t).scrollIntoView()},getData:function(){var t=this,a={interfaceVersionId:t.$route.query.interfaceVersionId,interfaceId:t.$route.query.interfaceId};Object(j.a)("/gateway-manage/get-api",a).then(function(a){var e=a.data;if("0000"==e.code)return e.result.frontParams=JSON.parse(e.result.frontParams),e.result.endParams=JSON.parse(e.result.endParams),e.result.errCode=JSON.parse(e.result.errCode),e.result.resultParams=JSON.parse(e.result.resultParams),void(t.apiData=e.result||{});T.a.errorMsg(e)}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})},init:function(){document.getElementsByClassName("api-body-content")[0].addEventListener("scroll",this.scroll)},scroll:function(){var t=this,a=document.querySelectorAll(".api-body-content")[0].scrollTop;document.querySelectorAll(".info-wrap").forEach(function(e,s){a>=e.offsetTop&&(t.activeInfo=s)})}},mounted:function(){var t=this;t.getData(),t.$nextTick(function(){t.init()})},destroyed:function(){document.getElementsByClassName("api-body-content")[0].removeEventListener("scroll",this.scroll)}},F={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"api-version-content border-box"},[e("div",{staticClass:"api-version-body"},[e("div",{staticClass:"operate-btns"},[e("el-button",{attrs:{disabled:2==t.apiData.status||3==t.apiData.status,type:"primary",plain:""},on:{click:t.handlePublish}},[t._v("发布")]),t._v(" "),e("el-button",{attrs:{disabled:2==t.apiData.status||3==t.apiData.status,type:"primary",plain:""},on:{click:t.handleDel}},[t._v("删除")]),t._v(" "),e("el-button",{attrs:{disabled:2==t.apiData.status||3==t.apiData.status,type:"primary",plain:""},on:{click:t.handleGoHistory}},[t._v("回退")]),t._v(" "),e("el-button",{attrs:{disabled:2==t.apiData.status||3==t.apiData.status,type:"primary",plain:""},on:{click:t.handleGoBack}},[t._v("回滚")])],1),t._v(" "),e("div",{staticClass:"anchor-wrap"},[e("div",{staticClass:"el-tabs el-tabs--right"},[e("div",{staticClass:"el-tabs__header is-right"},[e("div",{staticClass:"el-tabs__nav-wrap is-right"},[e("div",{staticClass:"el-tabs__nav-scroll"},[e("div",{staticClass:"el-tabs__nav is-right",staticStyle:{transform:"translateY(0px)"},attrs:{role:"tablist"}},[e("div",{staticClass:"el-tabs__active-bar is-right",style:{transform:"translateY("+24*t.activeInfo+"px)",height:"24px"}}),t._v(" "),e("div",{class:["el-tabs__item h-24 is-right",0==t.activeInfo?"is-active":""],attrs:{id:"tab-0"},on:{click:function(a){t.goAuthor("#base",0)}}},[t._v("基础配置")]),t._v(" "),e("div",{class:["el-tabs__item h-24 is-right",1==t.activeInfo?"is-active":""],attrs:{id:"tab-1"},on:{click:function(a){t.goAuthor("#frontend",1)}}},[t._v("前端配置")]),t._v(" "),e("div",{class:["el-tabs__item h-24 is-right",2==t.activeInfo?"is-active":""],attrs:{id:"tab-2"},on:{click:function(a){t.goAuthor("#backend",2)}}},[t._v("后端配置")]),t._v(" "),e("div",{class:["el-tabs__item h-24 is-right",3==t.activeInfo?"is-active":""],attrs:{id:"tab-3"},on:{click:function(a){t.goAuthor("#result",3)}}},[t._v("返回结果")])])])])])])]),t._v(" "),e("div",{staticClass:"base-info-wrap info-wrap",attrs:{id:"base"}},[e("div",{staticClass:"commont-info-title font-14 color-303133"},[t._v("基础信息")]),t._v(" "),e("base-info-show",{attrs:{apiData:t.apiData}})],1),t._v(" "),e("div",{staticClass:"frontend-set-wrap info-wrap",attrs:{id:"frontend"}},[e("div",{staticClass:"commont-info-title font-14 color-303133 m-t-47"},[t._v("前端配置")]),t._v(" "),e("frontend-info-show",{attrs:{apiData:t.apiData}})],1),t._v(" "),e("div",{staticClass:"backend-set-wrap info-wrap",attrs:{id:"backend"}},[e("div",{staticClass:"commont-info-title font-14 color-303133 m-t-47"},[t._v("后端配置")]),t._v(" "),e("backend-info-show",{attrs:{apiData:t.apiData}})],1),t._v(" "),e("div",{staticClass:"back-result-wrap info-wrap",attrs:{id:"result"}},[e("div",{staticClass:"commont-info-title font-14 color-303133 m-t-47"},[t._v("返回结果")]),t._v(" "),e("back-info-show",{attrs:{apiData:t.apiData}})],1)]),t._v(" "),e("go-history",{attrs:{apiData:t.apiData,historyShow:t.historyShow},on:{hideHistoryDialog:t.hideHistoryDialog}}),t._v(" "),e("publish-set",{attrs:{editRow:t.editRow,publishShow:t.publishShow},on:{hidePublishDialog:t.hidePublishDialog}})],1)},staticRenderFns:[]};var $=e("VU/8")(P,F,!1,function(t){e("ej2L")},"data-v-4a8c4ec3",null).exports,B={name:"apiListManageShow",components:{navBread:s.a,apiVersionShow:$},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:"API列表",path:"/apiList"},{name:"管理",path:"/apiListManage"},{name:"查看",path:""}]}},methods:{getData:function(){var t=this,a={project:t.repProjectName,router:t.pathName,requestProject:t.repProjectName};Object(j.a)("/haoban-manage-web/menu-detail",a).then(function(a){var e=a.data;if(1==e.errorCode)return e.result?void 0:void t.$message.error({duration:1e3,message:"暂无数据"});t.$message.error({duration:1e3,message:e.message})}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})}},watch:{$route:{handler:function(t,a){},deep:!0}},mounted:function(){this.$emit("showTab",22)}},O={render:function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:this.navPath}})],1),this._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box",staticStyle:{height:"auto"}},[a("div",{staticClass:"api-main-content border-box"},[a("api-version-show")],1)])])},staticRenderFns:[]};var N=e("VU/8")(B,O,!1,function(t){e("/ZYZ")},"data-v-aace81b4",null);a.default=N.exports},tKOC:function(t,a){},yZKR:function(t,a){},zR8Z:function(t,a){},znuk:function(t,a,e){"use strict";var s=e("mvHQ"),i=e.n(s),o=e("Kkt8"),l=e("P9l9"),r=e("TUB1"),n=e("LlAa"),c={name:"publish-set",components:{limitTextarea:o.a},props:{publishShow:{type:Boolean,default:!1},editRow:{type:Object,default:function(){return{interfaceVersionId:"",version:"",status:"",description:"",proxyType:"",defaultFlag:!1,sceneCode:"",sceneName:"",remark:""}}}},data:function(){return{customDialog:!1,formData:{interfaceVersionId:"",version:"",status:"",description:"",proxyType:"",defaultFlag:!1,sceneCode:"",sceneName:"",remark:""},rules:{}}},methods:{handleClose:function(t){t(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.$emit("hidePublishDialog")},customConfirm:function(t){var a=this;a.$refs[t].validate(function(t){if(!t)return!1;a.postEditData()})},postEditData:function(){var t=this,a={interfaceVersionId:t.formData.interfaceVersionId,defaultFlag:t.formData.defaultFlag?"1":"0",remark:t.formData.remark};Object(l.a)("/gateway-manage/publish-api",a).then(function(a){var e=a.data;if("0000"==e.code)return r.a.showmsg("发布成功","success"),void t.setData();n.a.errorMsg(e)}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})},setData:function(t){this.$emit("hidePublishDialog",!0)}},watch:{publishShow:function(t,a){this.customDialog=t},editRow:function(t,a){this.formData=JSON.parse(i()(t)),this.formData.defaultFlag=1==t.defaultFlag}},mounted:function(){this.customDialog=this.publishShow,this.formData=JSON.parse(i()(this.editRow)),this.formData.defaultFlag=1==this.editRow.defaultFlag}},d={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[e("el-dialog",{staticClass:"edit-dialog",attrs:{title:"发布",visible:t.customDialog,width:"600px","before-close":t.handleClose},on:{"update:visible":function(a){t.customDialog=a}}},[e("div",{staticClass:"edit-dialog-body"},[e("el-form",{ref:"publishForm",attrs:{model:t.formData,"label-width":"160px",rules:t.rules}},[e("el-form-item",{attrs:{label:"API名称:"}},[t._v("\n "+t._s(t.$route.query.interfaceName)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"发布环境:"}},[t._v("\n "+t._s(t.formData.sceneName)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"设置为默认版本:"}},[e("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.formData.defaultFlag,callback:function(a){t.$set(t.formData,"defaultFlag",a)},expression:"formData.defaultFlag"}})],1),t._v(" "),e("el-form-item",{attrs:{label:"备注:"}},[e("limit-textarea",{attrs:{inputWidth:370,inputValue:t.formData.remark,holder:"请输入备注内容",getByType:"word",maxLength:100},on:{"update:inputValue":function(a){t.$set(t.formData,"remark",a)}}})],1)],1)],1),t._v(" "),e("div",{staticClass:"dialog-footer",staticStyle:{"padding-bottom":"10px"},attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.customCancel}},[t._v("取 消")]),t._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(a){t.customConfirm("publishForm")}}},[t._v("发 布")])],1)])],1)},staticRenderFns:[]};var p=e("VU/8")(c,d,!1,function(t){e("QJK8")},"data-v-3f15a434",null);a.a=p.exports}});
\ No newline at end of file
webpackJsonp([3],{"/3P6":function(t,a){},"/ZYZ":function(t,a){},"4rDX":function(t,a){},PFn6:function(t,a){},QJK8:function(t,a){},nUlq:function(t,a){},nXhg:function(t,a){},nyOv:function(t,a){},r4m9:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var s=e("319J"),i=e("mvHQ"),l=e.n(i),o={name:"base-info-show",props:{apiData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{apiInfoData:{}}},watch:{apiData:function(t,a){this.apiInfoData=t}},mounted:function(){this.apiInfoData=this.apiData}},r={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"base-info-show border-box"},[e("el-form",{attrs:{"label-width":"104px",model:t.apiInfoData}},[e("el-form-item",{attrs:{label:"API名称:"}},[t._v("\n "+t._s(t.apiInfoData.interfaceName)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"API类型:"}},[t._v("\n "+t._s(1==t.apiInfoData.target?"公开":"私有")+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"访问类型:"}},[t._v("\n "+t._s(t.apiInfoData.requestType)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"描述:"}},[t._v("\n "+t._s(t.apiInfoData.interfaceDescribe)+"\n ")])],1)],1)},staticRenderFns:[]};var n=e("VU/8")(o,r,!1,function(t){e("tKOC")},"data-v-52b0b3b9",null).exports,c={name:"table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{trData:{protocol:"http",interfaceUrl:"/",requestType:"post",frontParams:{type:"object",properties:{name:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,required:[],properties:{nameId:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}}},id:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}},required:[]}}}},watch:{itemData:function(t,a){this.trData=t}},mounted:function(){this.trData=this.itemData}},d={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[t._l(t.itemData,function(a,s,i){return[e("table",{key:i+s+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("tbody",[e("tr",{staticClass:"el-table__row"},[e("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==a.type||"array"==a.type?e("div",{staticClass:"cell"},[e("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),e("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(s))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.frontOriginType))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.type))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[e("el-checkbox",{attrs:{disabled:"true"},model:{value:a.check,callback:function(e){t.$set(a,"check",e)},expression:"itemValue.check"}})],1)]),t._v(" "),e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.defaultVal))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.description))])])])])]),t._v(" "),"array"==a.type?e("table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a.items.properties}}):t._e(),t._v(" "),"object"==a.type?e("table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a.properties}}):t._e()]})],2)},staticRenderFns:[]};var p={name:"frontend-info-show",components:{tableTr:e("VU/8")(c,d,!1,function(t){e("nXhg")},"data-v-c35f6f24",null).exports},props:{apiData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{apiInfoData:{protocol:"http",interfaceUrl:"/",requestType:"post",frontParams:{type:"object",properties:{name:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,required:[],properties:{}}},required:[]}}}},watch:{apiData:function(t,a){this.apiInfoData=t}},mounted:function(){this.apiInfoData=this.apiData}},u={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"frontend-info-show border-box"},[e("el-form",{attrs:{"label-width":"104px",model:t.apiInfoData}},[e("el-form-item",{attrs:{label:"协议:"}},[t._v("\n "+t._s(t.apiInfoData.protocol)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"请求路径:"}},[t._v("\n "+t._s(t.apiInfoData.interfaceUrl)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"请求方法:"}},[t._v("\n "+t._s(t.apiInfoData.requestType)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"参数配置:"}},[e("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[e("div",{staticClass:"el-table__header-wrapper"},[e("table",{staticClass:"el-table__header",staticStyle:{width:"100%"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("thead",{staticClass:"has-gutter"},[e("tr",{},[e("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"})]),t._v(" "),e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数位置")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("必选")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("示例")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_5 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("描述")])])])])])]),t._v(" "),e("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[e("div",{staticClass:"table-content"},[e("table-tr",{attrs:{itemData:t.apiInfoData.frontParams.properties}})],1)])])])],1)],1)},staticRenderFns:[]};var f=e("VU/8")(p,u,!1,function(t){e("nUlq")},"data-v-1501fee1",null).exports,_={name:"back-table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{trData:{}}},watch:{itemData:function(t,a){this.trData=t}},mounted:function(){this.trData=this.itemData}},b={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[t._l(t.itemData.properties,function(a,s,i){return[a.constFlag?t._e():e("table",{key:i+s+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("tbody",[e("tr",{staticClass:"el-table__row"},[e("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==a.type||"array"==a.type?e("div",{staticClass:"cell"},[e("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),e("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(s))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.frontOriginType))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.type))])])])])]),t._v(" "),"array"==a.type&&Object.keys(a.items.properties).length?e("back-table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a.items}}):t._e(),t._v(" "),"object"==a.type&&Object.keys(a.properties).length?e("back-table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a}}):t._e()]})],2)},staticRenderFns:[]};var v=e("VU/8")(_,b,!1,function(t){e("yJzj")},"data-v-027d4bf3",null).exports,m={name:"back-table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}},interfaceType:{type:[String,Number],default:function(){return"0"}}},data:function(){return{trData:{}}},watch:{itemData:function(t,a){this.trData=t}},mounted:function(){this.trData=this.itemData}},h={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[t._l(t.itemData.properties,function(a,s,i){return[a.constFlag?t._e():e("table",{key:i+s+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("tbody",[e("tr",{staticClass:"el-table__row"},[e("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==a.type||"array"==a.type?e("div",{staticClass:"cell"},[e("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),e("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(s))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.type))])]),t._v(" "),1==t.interfaceType?e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.objectClass))])]):t._e(),t._v(" "),e("td",{staticClass:"el-table_1_column_4",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.defaultVal))])])])])]),t._v(" "),"array"==a.type&&Object.keys(a.items.properties).length?e("back-table-row",{key:i+"122"+s,staticClass:"el-table__row child-row",attrs:{itemData:a.items}}):t._e(),t._v(" "),"object"==a.type&&Object.keys(a.properties).length?e("back-table-row",{key:i+"123"+s,staticClass:"el-table__row child-row",attrs:{itemData:a}}):t._e()]})],2)},staticRenderFns:[]};var y=e("VU/8")(m,h,!1,function(t){e("nyOv")},"data-v-7d4da8b6",null).exports,C={name:"back-constant",props:{itemData:{type:Object,default:function(){return{}}},interfaceType:{type:[String,Number],default:function(){return"0"}}},data:function(){return{trData:{}}},watch:{itemData:function(t,a){this.trData=JSON.parse(l()(t))}},mounted:function(){this.trData=JSON.parse(l()(this.itemData))}},g={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[e("div",{staticClass:"el-table__header-wrapper"},[e("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("thead",{staticClass:"has-gutter"},[e("tr",{},[t._m(0),t._v(" "),"0"==t.interfaceType?e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数位置")])]):t._e(),t._v(" "),t._m(1),t._v(" "),t._m(2)])])])]),t._v(" "),e("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[e("div",{staticClass:"table-content"},[t._l(t.itemData.properties,function(a,s,i){return[a.constFlag?e("table",{key:i+s+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("tbody",[e("tr",{staticClass:"el-table__row"},[e("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v("\n "+t._s(a.currentKey)+"\n ")])]),t._v(" "),"0"==t.interfaceType?e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v("\n "+t._s(a.backendOriginType)+"\n ")])]):t._e(),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v("\n "+t._s(a.type)+"\n ")])]),t._v(" "),e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v("\n "+t._s(a.defaultVal)+"\n ")])])])])]):t._e()]})],2)])])])},staticRenderFns:[function(){var t=this.$createElement,a=this._self._c||t;return a("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[this._v("参数名")])])},function(){var t=this.$createElement,a=this._self._c||t;return a("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[this._v("参数类型")])])},function(){var t=this.$createElement,a=this._self._c||t;return a("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[a("div",{staticClass:"cell"},[this._v("参数值")])])}]};var w={name:"backend-info-show",components:{backTableTr:v,backTableRight:y,backConstTable:e("VU/8")(C,g,!1,function(t){e("tDqN")},"data-v-1590b8ba",null).exports},props:{apiData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{apiInfoData:{protocol:"http",interfaceUrl:"/",requestType:"post",endParams:{type:"object",properties:{name:{backendOriginType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,required:[],properties:{nameId:{backendOriginType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,properties:{age:{backendOriginType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}}}}}},required:[]}}}},watch:{apiData:function(t,a){this.apiInfoData=t}},mounted:function(){this.apiInfoData=this.apiData}},D={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"backend-info-show border-box"},[e("el-form",{attrs:{"label-width":"104px",model:t.apiInfoData}},[e("el-form-item",{attrs:{label:"后端服务:"}},[t._v("\n "+t._s(0==t.apiInfoData.interfaceType?"http":"dubbo")+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"环境:"}},[t._v("\n "+t._s(t.apiInfoData.protocol)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"API版本号:"}},[t._v("\n "+t._s(t.apiInfoData.version)+"\n ")]),t._v(" "),0==t.apiInfoData.interfaceType?e("el-form-item",{attrs:{label:"请求路径:"}},[t._v("\n "+t._s(t.apiInfoData.backendHttpPath)+"\n ")]):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?e("el-form-item",{attrs:{label:"dubbo接口名称:"}},[t._v("\n "+t._s(t.apiInfoData.dubboInterface)+"\n ")]):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?e("el-form-item",{attrs:{label:"dubbo请求方法:"}},[t._v("\n "+t._s(t.apiInfoData.dubboMethod)+"\n ")]):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?e("el-form-item",{attrs:{label:"注册中心地址:"}},[t._v("\n "+t._s(t.apiInfoData.proxyCode)+"\n ")]):t._e(),t._v(" "),1==t.apiInfoData.interfaceType?e("el-form-item",{attrs:{label:"请求版本号:"}},[t._v("\n "+t._s(t.apiInfoData.dubboVersion)+"\n ")]):t._e(),t._v(" "),e("el-form-item",{attrs:{label:"超时时长:"}},[t._v("\n "+t._s(t.apiInfoData.timeout)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"参数映射:"}},[e("div",{staticClass:"table-wrap-body font-0"},[e("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition inline-block vertical-top",staticStyle:{width:"30%","table-layout":"fixed"}},[e("div",{staticClass:"el-table__header-wrapper"},[e("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("thead",{staticClass:"has-gutter"},[e("tr",{},[e("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"})]),t._v(" "),e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数位置")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数类型")])])])])])]),t._v(" "),e("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[e("div",{staticClass:"table-content"},[e("back-table-tr",{attrs:{itemData:t.apiInfoData.endParams}})],1)])]),t._v(" "),e("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition inline-block vertical-top",staticStyle:{width:"70%","table-layout":"fixed"}},[e("div",{staticClass:"el-table__header-wrapper"},[e("table",{staticClass:"el-table__header",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("thead",{staticClass:"has-gutter"},[e("tr",{},[e("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"})]),t._v(" "),e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数名映射")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数类型映射")])]),t._v(" "),1==t.apiInfoData.interfaceType?e("th",{staticClass:"el-table_1_column_3 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("包名")])]):t._e(),t._v(" "),e("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数值")])])])])])]),t._v(" "),e("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[e("div",{staticClass:"table-content"},[e("back-table-right",{attrs:{interfaceType:t.apiInfoData.interfaceType,itemData:t.apiInfoData.endParams}})],1)])])])]),t._v(" "),e("el-form-item",{attrs:{label:"常量参数:"}},[e("back-const-table",{attrs:{itemData:t.apiInfoData.endParams,interfaceType:t.apiInfoData.interfaceType}})],1)],1)],1)},staticRenderFns:[]};var k=e("VU/8")(w,D,!1,function(t){e("/3P6")},"data-v-951b5f1c",null).exports,I={name:"table-row",props:{itemData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{trData:{protocol:"http",interfaceUrl:"/",requestType:"post",frontParams:{type:"object",properties:{name:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,required:[],properties:{nameId:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}}},id:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}},required:[]}}}},watch:{itemData:function(t,a){this.trData=t}},mounted:function(){this.trData=this.itemData}},S={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[t._l(t.itemData.properties,function(a,s,i){return[e("table",{key:i+s+121,staticClass:"el-table__body",staticStyle:{width:"100%","table-layout":"fixed"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("tbody",[e("tr",{staticClass:"el-table__row"},[e("td",{staticClass:"el-table_1_column_1",staticStyle:{width:"36px"},attrs:{rowspan:"1",colspan:"1"}},["object"==a.type||"array"==a.type?e("div",{staticClass:"cell"},[e("i",{staticClass:"el-icon-minus"})]):t._e()]),t._v(" "),e("td",{staticClass:"el-table_1_column_1",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(s))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_2",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.type))])]),t._v(" "),e("td",{staticClass:"el-table_1_column_3",attrs:{rowspan:"1",colspan:"1"}},[e("div",{staticClass:"cell"},[t._v(t._s(a.defaultVal))])])])])]),t._v(" "),"array"==a.type&&Object.keys(a.items.properties).length?e("table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a.items}}):t._e(),t._v(" "),"object"==a.type&&Object.keys(a.properties).length?e("table-row",{key:i+"122"+s,staticClass:"el-table__row",staticStyle:{"padding-left":"10px"},attrs:{itemData:a}}):t._e()]})],2)},staticRenderFns:[]};var x={name:"back-info-show",components:{backInfoTable:e("VU/8")(I,S,!1,function(t){e("zR8Z")},"data-v-72eb4927",null).exports},props:{apiData:{type:[Object,Array],default:function(){return{interfaceName:"1",interfaceType:"http",requestType:"GET",interfaceDescribe:"test",errCode:[{errorCode:"1",errorInfo:"添加成功"}]}}}},data:function(){return{apiInfoData:{interfaceName:"1",interfaceType:"http",requestType:"GET",interfaceDescribe:"test",errCode:[{errorCode:"1",errorInfo:"添加成功"}],resultParams:{type:"object",properties:{name:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,required:[],properties:{nameId:{originType:"query",type:"object",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0,properties:{age:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0},email:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}}}}},id:{originType:"query",type:"string",isBackendField:0,defaultVal:"val",isRootKey:0,rootKey:"",objectClass:"",description:"描述",check:!0}},required:[]}}}},watch:{apiData:function(t,a){this.apiInfoData=t}},mounted:function(){this.apiInfoData=this.apiData}},T={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"back-info-show border-box"},[e("el-form",{attrs:{"label-width":"104px",model:t.apiInfoData}},[e("el-form-item",{attrs:{label:"返回参数:"}},[e("div",{staticClass:"el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition",staticStyle:{width:"100%","table-layout":"fixed"}},[e("div",{staticClass:"el-table__header-wrapper"},[e("table",{staticClass:"el-table__header",staticStyle:{width:"100%"},attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[e("thead",{staticClass:"has-gutter"},[e("tr",{},[e("th",{staticClass:"el-table_1_column_1 is-leaf",staticStyle:{width:"36px"},attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"})]),t._v(" "),e("th",{staticClass:"el-table_1_column_1 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数名")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_2 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("参数类型")])]),t._v(" "),e("th",{staticClass:"el-table_1_column_4 is-leaf",attrs:{colspan:"1",rowspan:"1"}},[e("div",{staticClass:"cell"},[t._v("示例")])])])])])]),t._v(" "),e("div",{staticClass:"el-table__body-wrapper is-scrolling-none"},[e("div",{staticClass:"table-content"},[e("back-info-table",{attrs:{itemData:t.apiInfoData.resultParams}})],1)])])]),t._v(" "),e("el-form-item",{attrs:{label:"错误码:"}},[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.apiInfoData.errCode}},[e("el-table-column",{attrs:{prop:"orig_error_code",label:"错误码"}}),t._v(" "),e("el-table-column",{attrs:{prop:"error_code",label:"映射错误码"}}),t._v(" "),e("el-table-column",{attrs:{prop:"error_info",label:"错误信息"}})],1)],1),t._v(" "),e("el-form-item",{attrs:{label:"成功返回示例:"}},[e("div",{staticClass:"common-back-pre"},[e("pre",[t._v(" "+t._s(t.apiInfoData.sucReturn)+"\n ")])])]),t._v(" "),e("el-form-item",{attrs:{label:"失败返回示例:"}},[e("div",{staticClass:"common-back-pre"},[e("pre",[t._v(" "+t._s(t.apiInfoData.errReturn)+"\n ")])])])],1)],1)},staticRenderFns:[]};var j=e("VU/8")(x,T,!1,function(t){e("4rDX")},"data-v-1bb778e8",null).exports,V=e("znuk"),P=e("P9l9"),$=e("LlAa"),q=e("TUB1"),F={name:"go-history",props:{historyShow:{type:Boolean,default:!1},apiData:{type:[Object,Array],default:function(){return{}}}},data:function(){return{customDialog:!1,selectVersion:"",tableData:[],pageSize:20,currentPage:1,totalCount:0}},methods:{handleClose:function(t){t(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.$emit("hideHistoryDialog")},customConfirm:function(){if(!this.selectVersion)return this.$message.error({duration:1e3,message:"请选择回退版本"}),!1;this.postEditData()},postEditData:function(){var t=this,a={interfaceVersionId:t.apiData.interfaceVersionId,target:t.selectVersion};Object(P.a)("/gateway-manage/reset-api",a).then(function(a){var e=a.data;if("0000"==e.code)return q.a.showmsg("回退成功","success"),void t.setData();$.a.errorMsg(e)}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})},setData:function(t){this.$emit("hideHistoryDialog")},handleSizeChange:function(t){this.pageSize=t,this.getData()},handleCurrentChange:function(t){this.currentPage=t,this.getData()},handleShow:function(t,a){this.$router.push("/apiListManageShow")},getData:function(){var t=this,a={pageNum:t.currentPage,pageSize:t.pageSize,sceneCode:t.apiData.sceneCode,interfaceId:t.apiData.interfaceId};Object(P.a)("/gateway-manage/page-api-publish-record",a).then(function(a){var e=a.data;if(1==e.errorCode)return t.tableData=e.result.result||[],void(t.totalCount=e.result.totalCount);$.a.errorMsg(e)}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})}},watch:{$route:{handler:function(t,a){},deep:!0},historyShow:function(t,a){this.customDialog=t}},mounted:function(){this.customDialog=this.historyShow,this.getData()}},R={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[e("el-dialog",{staticClass:"edit-dialog",attrs:{title:"选择回退版本",visible:t.customDialog,width:"600px","before-close":t.handleClose},on:{"update:visible":function(a){t.customDialog=a}}},[e("div",{staticClass:"table-wrap"},[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData}},[e("el-table-column",{attrs:{label:"","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-radio",{attrs:{label:a.row.interfaceVersionId},model:{value:t.selectVersion,callback:function(a){t.selectVersion=a},expression:"selectVersion"}})]}}])}),t._v(" "),e("el-table-column",{attrs:{prop:"version",label:"发布版本","show-overflow-tooltip":""}}),t._v(" "),e("el-table-column",{attrs:{label:"发布备注","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[t._v("\n "+t._s(a.row.remark)+"\n ")]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"发布时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(a.row.createTime)))]),t._v(" "),e("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(a.row.createTime)))])]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){t.handleShow(a.$index,a.row)}}},[t._v("查看")])]}}])})],1),t._v(" "),t.totalCount?e("div",{staticClass:"pagination text-right m-t-14"},[e("el-pagination",{attrs:{small:"","page-size":t.pageSize,"current-page":t.currentPage,layout:"prev, pager, next",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1),t._v(" "),e("div",{staticClass:"dialog-footer",staticStyle:{"padding-bottom":"10px"},attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.customCancel}},[t._v("取 消")]),t._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(a){t.customConfirm("syncForm")}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var O=e("VU/8")(F,R,!1,function(t){e("yZKR")},"data-v-9eb6071a",null).exports,K={name:"api-version-show",components:{baseInfoShow:n,frontendInfoShow:f,backendInfoShow:k,backInfoShow:j,publishSet:V.a,goHistory:O},data:function(){return{apiData:{interfaceId:"",interfaceName:"",interfaceGroupId:"",interfaceUrl:"",interfaceDescribe:"",projectId:"",optType:"",sucReturn:"",errReturn:"",errCode:[],frontParams:{},endParams:{},target:"",requestType:"POST",protocol:"http",version:"",interfaceType:"HTTP",dubboMethod:"",dubboInterface:"",httpPath:"",proxyCode:"",resultParams:"",backendRequestType:"",timeout:43087112},activeInfo:0,editRow:{},publishShow:!1,historyShow:!1}},methods:{handlePublish:function(){this.publishShow=!0,this.editRow=JSON.parse(l()(this.apiData))},hidePublishDialog:function(t){this.publishShow=!1,this.editRow={},t&&(this.apiData.status=2)},handleGoHistory:function(){this.historyShow=!0},hideHistoryDialog:function(){this.historyShow=!1},handleDel:function(){var t=this;t.$confirm("确认删除此版本吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.postDelData()}).catch(function(){})},postDelData:function(){var t=this,a={interfaceVersionId:t.apiData.interfaceVersionId};Object(P.b)("/gateway-manage/delete-api-version",a).then(function(a){var e=a.data;if("0000"==e.code)return q.a.showmsg("删除成功","success"),void t.$router.push("/apiListManage?interfaceId="+t.$route.query.interfaceId+"&interfaceName="+t.$route.query.interfaceName);$.a.errorMsg(e)}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})},handleGoBack:function(){var t=this;t.$confirm("确认将【当前版本】回滚到【已发布版本号】吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.postGoBack()}).catch(function(){})},postGoBack:function(){var t=this,a={interfaceVersionId:t.apiData.interfaceVersionId};Object(P.a)("/gateway-manage/rollback-api",a).then(function(t){var a=t.data;"0000"!=a.code?$.a.errorMsg(a):q.a.showmsg("回滚成功","success")}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})},goAuthor:function(t,a){this.activeInfo=a,this.$el.querySelector(t).scrollIntoView()},getData:function(){var t=this,a={interfaceVersionId:t.$route.query.interfaceVersionId,interfaceId:t.$route.query.interfaceId};Object(P.a)("/gateway-manage/get-api",a).then(function(a){var e=a.data;if("0000"==e.code)return e.result.frontParams=JSON.parse(e.result.frontParams),e.result.endParams=JSON.parse(e.result.endParams),e.result.errCode=JSON.parse(e.result.errCode),e.result.resultParams=JSON.parse(e.result.resultParams),void(t.apiData=e.result||{});$.a.errorMsg(e)}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})},init:function(){document.getElementsByClassName("api-body-content")[0].addEventListener("scroll",this.scroll)},scroll:function(){var t=this,a=document.querySelectorAll(".api-body-content")[0].scrollTop;document.querySelectorAll(".info-wrap").forEach(function(e,s){a>=e.offsetTop&&(t.activeInfo=s)})}},mounted:function(){var t=this;t.getData(),t.$nextTick(function(){t.init()})},destroyed:function(){document.getElementsByClassName("api-body-content")[0].removeEventListener("scroll",this.scroll)}},B={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"api-version-content border-box"},[e("div",{staticClass:"api-version-body"},[e("div",{staticClass:"operate-btns"},[e("el-button",{attrs:{disabled:2==t.apiData.status||3==t.apiData.status,type:"primary",plain:""},on:{click:t.handlePublish}},[t._v("发布")]),t._v(" "),e("el-button",{attrs:{disabled:2==t.apiData.status||3==t.apiData.status,type:"primary",plain:""},on:{click:t.handleDel}},[t._v("删除")]),t._v(" "),e("el-button",{attrs:{disabled:2==t.apiData.status||3==t.apiData.status,type:"primary",plain:""},on:{click:t.handleGoHistory}},[t._v("回退")]),t._v(" "),e("el-button",{attrs:{disabled:2==t.apiData.status||3==t.apiData.status,type:"primary",plain:""},on:{click:t.handleGoBack}},[t._v("回滚")])],1),t._v(" "),e("div",{staticClass:"anchor-wrap"},[e("div",{staticClass:"el-tabs el-tabs--right"},[e("div",{staticClass:"el-tabs__header is-right"},[e("div",{staticClass:"el-tabs__nav-wrap is-right"},[e("div",{staticClass:"el-tabs__nav-scroll"},[e("div",{staticClass:"el-tabs__nav is-right",staticStyle:{transform:"translateY(0px)"},attrs:{role:"tablist"}},[e("div",{staticClass:"el-tabs__active-bar is-right",style:{transform:"translateY("+24*t.activeInfo+"px)",height:"24px"}}),t._v(" "),e("div",{class:["el-tabs__item h-24 is-right",0==t.activeInfo?"is-active":""],attrs:{id:"tab-0"},on:{click:function(a){t.goAuthor("#base",0)}}},[t._v("基础配置")]),t._v(" "),e("div",{class:["el-tabs__item h-24 is-right",1==t.activeInfo?"is-active":""],attrs:{id:"tab-1"},on:{click:function(a){t.goAuthor("#frontend",1)}}},[t._v("前端配置")]),t._v(" "),e("div",{class:["el-tabs__item h-24 is-right",2==t.activeInfo?"is-active":""],attrs:{id:"tab-2"},on:{click:function(a){t.goAuthor("#backend",2)}}},[t._v("后端配置")]),t._v(" "),e("div",{class:["el-tabs__item h-24 is-right",3==t.activeInfo?"is-active":""],attrs:{id:"tab-3"},on:{click:function(a){t.goAuthor("#result",3)}}},[t._v("返回结果")])])])])])])]),t._v(" "),e("div",{staticClass:"base-info-wrap info-wrap",attrs:{id:"base"}},[e("div",{staticClass:"commont-info-title font-14 color-303133"},[t._v("基础信息")]),t._v(" "),e("base-info-show",{attrs:{apiData:t.apiData}})],1),t._v(" "),e("div",{staticClass:"frontend-set-wrap info-wrap",attrs:{id:"frontend"}},[e("div",{staticClass:"commont-info-title font-14 color-303133 m-t-47"},[t._v("前端配置")]),t._v(" "),e("frontend-info-show",{attrs:{apiData:t.apiData}})],1),t._v(" "),e("div",{staticClass:"backend-set-wrap info-wrap",attrs:{id:"backend"}},[e("div",{staticClass:"commont-info-title font-14 color-303133 m-t-47"},[t._v("后端配置")]),t._v(" "),e("backend-info-show",{attrs:{apiData:t.apiData}})],1),t._v(" "),e("div",{staticClass:"back-result-wrap info-wrap",attrs:{id:"result"}},[e("div",{staticClass:"commont-info-title font-14 color-303133 m-t-47"},[t._v("返回结果")]),t._v(" "),e("back-info-show",{attrs:{apiData:t.apiData}})],1)]),t._v(" "),e("go-history",{attrs:{apiData:t.apiData,historyShow:t.historyShow},on:{hideHistoryDialog:t.hideHistoryDialog}}),t._v(" "),e("publish-set",{attrs:{editRow:t.editRow,publishShow:t.publishShow},on:{hidePublishDialog:t.hidePublishDialog}})],1)},staticRenderFns:[]};var N=e("VU/8")(K,B,!1,function(t){e("PFn6")},"data-v-0df317c4",null).exports,E={name:"apiListManageShow",components:{navBread:s.a,apiVersionShow:N},data:function(){return{navPath:[{name:"API管理",path:"/apiProgram"},{name:"API列表",path:"/apiList"},{name:"管理",path:"/apiListManage"},{name:"查看",path:""}]}},methods:{getData:function(){var t=this,a={project:t.repProjectName,router:t.pathName,requestProject:t.repProjectName};Object(P.a)("/haoban-manage-web/menu-detail",a).then(function(a){var e=a.data;if(1==e.errorCode)return e.result?void 0:void t.$message.error({duration:1e3,message:"暂无数据"});t.$message.error({duration:1e3,message:e.message})}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})}},watch:{$route:{handler:function(t,a){},deep:!0}},mounted:function(){this.$emit("showTab",22)}},A={render:function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"api-body-content border-box"},[a("div",{staticClass:"common-nav"},[a("nav-bread",{attrs:{navPath:this.navPath}})],1),this._v(" "),a("div",{staticClass:"api-body-main common-body-main border-box",staticStyle:{height:"auto"}},[a("div",{staticClass:"api-main-content border-box"},[a("api-version-show")],1)])])},staticRenderFns:[]};var U=e("VU/8")(E,A,!1,function(t){e("/ZYZ")},"data-v-aace81b4",null);a.default=U.exports},tDqN:function(t,a){},tKOC:function(t,a){},yJzj:function(t,a){},yZKR:function(t,a){},zR8Z:function(t,a){},znuk:function(t,a,e){"use strict";var s=e("mvHQ"),i=e.n(s),l=e("Kkt8"),o=e("P9l9"),r=e("TUB1"),n=e("LlAa"),c={name:"publish-set",components:{limitTextarea:l.a},props:{publishShow:{type:Boolean,default:!1},editRow:{type:Object,default:function(){return{interfaceVersionId:"",version:"",status:"",description:"",proxyType:"",defaultFlag:!1,sceneCode:"",sceneName:"",remark:""}}}},data:function(){return{customDialog:!1,formData:{interfaceVersionId:"",version:"",status:"",description:"",proxyType:"",defaultFlag:!1,sceneCode:"",sceneName:"",remark:""},rules:{}}},methods:{handleClose:function(t){t(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.$emit("hidePublishDialog")},customConfirm:function(t){var a=this;a.$refs[t].validate(function(t){if(!t)return!1;a.postEditData()})},postEditData:function(){var t=this,a={interfaceVersionId:t.formData.interfaceVersionId,defaultFlag:t.formData.defaultFlag?"1":"0",remark:t.formData.remark};Object(o.a)("/gateway-manage/publish-api",a).then(function(a){var e=a.data;if("0000"==e.code)return r.a.showmsg("发布成功","success"),void t.setData();n.a.errorMsg(e)}).catch(function(a){t.$message.error({duration:1e3,message:a.message})})},setData:function(t){this.$emit("hidePublishDialog",!0)}},watch:{publishShow:function(t,a){this.customDialog=t},editRow:function(t,a){this.formData=JSON.parse(i()(t)),this.formData.defaultFlag=1==t.defaultFlag}},mounted:function(){this.customDialog=this.publishShow,this.formData=JSON.parse(i()(this.editRow)),this.formData.defaultFlag=1==this.editRow.defaultFlag}},d={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[e("el-dialog",{staticClass:"edit-dialog",attrs:{title:"发布",visible:t.customDialog,width:"600px","before-close":t.handleClose},on:{"update:visible":function(a){t.customDialog=a}}},[e("div",{staticClass:"edit-dialog-body"},[e("el-form",{ref:"publishForm",attrs:{model:t.formData,"label-width":"160px",rules:t.rules}},[e("el-form-item",{attrs:{label:"API名称:"}},[t._v("\n "+t._s(t.$route.query.interfaceName)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"发布环境:"}},[t._v("\n "+t._s(t.formData.sceneName)+"\n ")]),t._v(" "),e("el-form-item",{attrs:{label:"设置为默认版本:"}},[e("el-switch",{attrs:{"active-text":"","inactive-text":""},model:{value:t.formData.defaultFlag,callback:function(a){t.$set(t.formData,"defaultFlag",a)},expression:"formData.defaultFlag"}})],1),t._v(" "),e("el-form-item",{attrs:{label:"备注:"}},[e("limit-textarea",{attrs:{inputWidth:370,inputValue:t.formData.remark,holder:"请输入备注内容",getByType:"word",maxLength:100},on:{"update:inputValue":function(a){t.$set(t.formData,"remark",a)}}})],1)],1)],1),t._v(" "),e("div",{staticClass:"dialog-footer",staticStyle:{"padding-bottom":"10px"},attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.customCancel}},[t._v("取 消")]),t._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(a){t.customConfirm("publishForm")}}},[t._v("发 布")])],1)])],1)},staticRenderFns:[]};var p=e("VU/8")(c,d,!1,function(t){e("QJK8")},"data-v-3f15a434",null);a.a=p.exports}});
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,d,i,u=0,b=[];u<r.length;u++)d=r[u],t[d]&&b.push(t[d][0]),t[d]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,a);b.length;)b.shift()();if(a)for(u=0;u<a.length;u++)i=o(o.s=a[u]);return i};var r={},t={21:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"8d33a005548cc91f2535",1:"0ebe3ead93207dc78a78",2:"60335f8876960ffe9161",3:"90cd20f184165abb5d81",4:"dbac6029f8f49f9aed96",5:"e704f35bae2785ada05b",6:"03233da003452ba92dd2",7:"4cb82e13df0c0c5b4b13",8:"b7ed0abeb26ad276c2a5",9:"56e39a7db187d5965631",10:"638039a7b39908980436",11:"80fde13c3f372ead3f07",12:"3b9c756b15cf547445f5",13:"818eee5a82f374d898fc",14:"9825bb69e60b8030c230",15:"cb7b875c24b40e9cb6e0",16:"59c1113679bef2e96538",17:"180df87ba95cffdf25b7",18:"37321ffca9347a60b988"}[e]+".js";var f=setTimeout(d,12e4);function d(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=d,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,o,a){for(var f,b,d,i=0,u=[];i<r.length;i++)b=r[i],t[b]&&u.push(t[b][0]),t[b]=0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(e[f]=o[f]);for(n&&n(r,o,a);u.length;)u.shift()();if(a)for(i=0;i<a.length;i++)d=c(c.s=a[i]);return d};var r={},t={21:0};function c(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,c){n=t[e]=[r,c]});n[2]=r;var o=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,c.nc&&a.setAttribute("nonce",c.nc),a.src=c.p+"static/js/"+e+"."+{0:"8d33a005548cc91f2535",1:"0ebe3ead93207dc78a78",2:"b615c0825625ca5c07be",3:"76c04489edeb65a5f020",4:"dbac6029f8f49f9aed96",5:"e704f35bae2785ada05b",6:"03233da003452ba92dd2",7:"4cb82e13df0c0c5b4b13",8:"b7ed0abeb26ad276c2a5",9:"56e39a7db187d5965631",10:"638039a7b39908980436",11:"80fde13c3f372ead3f07",12:"3b9c756b15cf547445f5",13:"818eee5a82f374d898fc",14:"9825bb69e60b8030c230",15:"cb7b875c24b40e9cb6e0",16:"59c1113679bef2e96538",17:"180df87ba95cffdf25b7",18:"37321ffca9347a60b988"}[e]+".js";var f=setTimeout(b,12e4);function b(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=b,o.appendChild(a),r},c.m=e,c.c=r,c.d=function(e,n,r){c.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},c.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(n,"a",n),n},c.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},c.p="./",c.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
...@@ -322,7 +322,7 @@ export default { ...@@ -322,7 +322,7 @@ export default {
height: 440px; height: 440px;
} }
.backend-set-wrap { .backend-set-wrap {
height: 510px; min-height: 510px;
} }
.back-result-wrap { .back-result-wrap {
} }
......
<!--
<back-const-table :itemData="itemData" :interfaceType="interfaceType"></back-const-table>
import backConstTable from '@/components/api/back-const-table.vue';
-->
<template>
<div>
<div class="el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition" style="width: 100%; table-layout: fixed;">
<div class="el-table__header-wrapper">
<table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 100%; table-layout: fixed;">
<thead class="has-gutter">
<tr class="">
<th colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf">
<div class="cell">参数名</div>
</th>
<th v-if="interfaceType == '0'" colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
<div class="cell">参数位置</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
<div class="cell">参数类型</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_4 is-leaf">
<div class="cell">参数值</div>
</th>
</tr>
</thead>
</table>
</div>
<div class="el-table__body-wrapper is-scrolling-none">
<div class="table-content">
<template v-for="(itemValue, itemName, index) in itemData.properties">
<table v-if="itemValue.constFlag" cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%; table-layout: fixed;" :key="index + itemName + 121">
<tbody>
<tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_1_column_1">
<div class="cell">
{{ itemValue.currentKey }}
</div>
</td>
<td v-if="interfaceType == '0'" rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell">
{{ itemValue.backendOriginType }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell">
{{ itemValue.type }}
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_3">
<div class="cell">
{{ itemValue.defaultVal }}
</div>
</td>
</tr>
</tbody>
</table>
</template>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'back-constant',
props: {
itemData: {
type: Object,
default() {
return {};
}
},
interfaceType: {
type: [String, Number],
default() {
return '0';
}
}
},
data() {
return {
trData: {}
};
},
watch: {
itemData: function(newData, oldData) {
const that = this;
that.trData = JSON.parse(JSON.stringify(newData));
}
},
mounted() {
const that = this;
// console.log(that.itemData);
that.trData = JSON.parse(JSON.stringify(that.itemData));
}
};
</script>
<style lang="less" scoped>
.w-320 {
width: 320px;
}
.m-t-14 {
margin-top: 14px;
}
.add-line {
height: 48px;
line-height: 48px;
border-bottom: 1px solid #e4e7ed;
cursor: pointer;
}
.el-table th {
padding: 7px 0;
}
</style>
...@@ -6,7 +6,7 @@ import backTableRight from '@/components/api/back-table-right.vue'; ...@@ -6,7 +6,7 @@ import backTableRight from '@/components/api/back-table-right.vue';
<template> <template>
<div> <div>
<template v-for="(itemValue, itemName, index) in itemData.properties"> <template v-for="(itemValue, itemName, index) in itemData.properties">
<table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%;table-layout: fixed;" :key="index + itemName + 121"> <table v-if="!itemValue.constFlag" cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%;table-layout: fixed;" :key="index + itemName + 121">
<tbody> <tbody>
<tr class="el-table__row"> <tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_1_column_1" style="width: 36px;"> <td rowspan="1" colspan="1" class="el-table_1_column_1" style="width: 36px;">
...@@ -18,8 +18,8 @@ import backTableRight from '@/components/api/back-table-right.vue'; ...@@ -18,8 +18,8 @@ import backTableRight from '@/components/api/back-table-right.vue';
<td rowspan="1" colspan="1" class="el-table_1_column_2"> <td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell">{{ itemValue.type }}</div> <div class="cell">{{ itemValue.type }}</div>
</td> </td>
<td rowspan="1" colspan="1" class="el-table_1_column_3"> <td v-if="interfaceType == 1" rowspan="1" colspan="1" class="el-table_1_column_3">
<div class="cell">{{ itemValue.type }}</div> <div class="cell">{{ itemValue.objectClass }}</div>
</td> </td>
<td rowspan="1" colspan="1" class="el-table_1_column_4"> <td rowspan="1" colspan="1" class="el-table_1_column_4">
<div class="cell">{{ itemValue.defaultVal }}</div> <div class="cell">{{ itemValue.defaultVal }}</div>
...@@ -41,6 +41,12 @@ export default { ...@@ -41,6 +41,12 @@ export default {
default() { default() {
return {}; return {};
} }
},
interfaceType: {
type: [String, Number],
default() {
return '0';
}
} }
}, },
data() { data() {
......
...@@ -6,7 +6,7 @@ import backTableTr from '@/components/api/back-table-tr.vue'; ...@@ -6,7 +6,7 @@ import backTableTr from '@/components/api/back-table-tr.vue';
<template> <template>
<div> <div>
<template v-for="(itemValue, itemName, index) in itemData.properties"> <template v-for="(itemValue, itemName, index) in itemData.properties">
<table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%;table-layout: fixed;" :key="index + itemName + 121"> <table v-if="!itemValue.constFlag" cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 100%;table-layout: fixed;" :key="index + itemName + 121">
<tbody> <tbody>
<tr class="el-table__row"> <tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_1_column_1" style="width: 36px;"> <td rowspan="1" colspan="1" class="el-table_1_column_1" style="width: 36px;">
...@@ -16,7 +16,7 @@ import backTableTr from '@/components/api/back-table-tr.vue'; ...@@ -16,7 +16,7 @@ import backTableTr from '@/components/api/back-table-tr.vue';
<div class="cell">{{ itemName }}</div> <div class="cell">{{ itemName }}</div>
</td> </td>
<td rowspan="1" colspan="1" class="el-table_1_column_2"> <td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell">{{ itemValue.originType }}</div> <div class="cell">{{ itemValue.frontOriginType }}</div>
</td> </td>
<td rowspan="1" colspan="1" class="el-table_1_column_2"> <td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell">{{ itemValue.type }}</div> <div class="cell">{{ itemValue.type }}</div>
......
<!-- <!--
<backend-info-show></backend-info-show> <backend-info-show :apiData=""></backend-info-show>
import backendInfoShow from '@/components/api/backend-info-show.vue'; import backendInfoShow from '@/components/api/backend-info-show.vue';
--> -->
...@@ -76,7 +76,7 @@ import backendInfoShow from '@/components/api/backend-info-show.vue'; ...@@ -76,7 +76,7 @@ import backendInfoShow from '@/components/api/backend-info-show.vue';
<th colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf"> <th colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
<div class="cell">参数类型映射</div> <div class="cell">参数类型映射</div>
</th> </th>
<th colspan="1" rowspan="1" class="el-table_1_column_3 is-leaf"> <th v-if="apiInfoData.interfaceType == 1" colspan="1" rowspan="1" class="el-table_1_column_3 is-leaf">
<div class="cell">包名</div> <div class="cell">包名</div>
</th> </th>
<th colspan="1" rowspan="1" class="el-table_1_column_4 is-leaf"> <th colspan="1" rowspan="1" class="el-table_1_column_4 is-leaf">
...@@ -88,23 +88,28 @@ import backendInfoShow from '@/components/api/backend-info-show.vue'; ...@@ -88,23 +88,28 @@ import backendInfoShow from '@/components/api/backend-info-show.vue';
</div> </div>
<div class="el-table__body-wrapper is-scrolling-none"> <div class="el-table__body-wrapper is-scrolling-none">
<div class="table-content"> <div class="table-content">
<back-table-right :itemData="apiInfoData.endParams"></back-table-right> <back-table-right :interfaceType="apiInfoData.interfaceType" :itemData="apiInfoData.endParams"></back-table-right>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="常量参数:">
<back-const-table :itemData="apiInfoData.endParams" :interfaceType="apiInfoData.interfaceType"></back-const-table>
</el-form-item>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import backTableTr from '@/components/api/back-table-tr.vue'; import backTableTr from '@/components/api/back-table-tr.vue';
import backTableRight from '@/components/api/back-table-right.vue'; import backTableRight from '@/components/api/back-table-right.vue';
import backConstTable from '@/components/api/back-const-table.vue';
export default { export default {
name: 'backend-info-show', name: 'backend-info-show',
components: { components: {
backTableTr, backTableTr,
backTableRight backTableRight,
backConstTable
}, },
props: { props: {
apiData: { apiData: {
...@@ -124,7 +129,7 @@ export default { ...@@ -124,7 +129,7 @@ export default {
type: 'object', //object,array,string,number,boolean, type: 'object', //object,array,string,number,boolean,
properties: { properties: {
name: { name: {
originType: 'query', //来源类型 query,body,header backendOriginType: 'query', //来源类型 query,body,header
type: 'object', type: 'object',
isBackendField: 0, //是否后端字段 isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值 defaultVal: 'val', //默认值
...@@ -136,7 +141,7 @@ export default { ...@@ -136,7 +141,7 @@ export default {
required: [], required: [],
properties: { properties: {
nameId: { nameId: {
originType: 'query', //来源类型 query,body,header backendOriginType: 'query', //来源类型 query,body,header
type: 'object', type: 'object',
isBackendField: 0, //是否后端字段 isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值 defaultVal: 'val', //默认值
...@@ -147,18 +152,7 @@ export default { ...@@ -147,18 +152,7 @@ export default {
check: true, check: true,
properties: { properties: {
age: { age: {
originType: 'query', //来源类型 query,body,header backendOriginType: 'query', //来源类型 query,body,header
type: 'string',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
description: '描述',
check: true
},
email: {
originType: 'query', //来源类型 query,body,header
type: 'string', type: 'string',
isBackendField: 0, //是否后端字段 isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值 defaultVal: 'val', //默认值
...@@ -171,17 +165,6 @@ export default { ...@@ -171,17 +165,6 @@ export default {
} }
} }
} }
},
id: {
originType: 'query', //来源类型 query,body,header
type: 'string',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
description: '描述',
check: true
} }
}, },
required: [] required: []
......
...@@ -27,6 +27,9 @@ import frontInfoShow from '@/components/api/frontend-info-show.vue'; ...@@ -27,6 +27,9 @@ import frontInfoShow from '@/components/api/frontend-info-show.vue';
<th colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf"> <th colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf">
<div class="cell">参数名</div> <div class="cell">参数名</div>
</th> </th>
<th colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf">
<div class="cell">参数位置</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf"> <th colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
<div class="cell">参数类型</div> <div class="cell">参数类型</div>
</th> </th>
...@@ -88,54 +91,7 @@ export default { ...@@ -88,54 +91,7 @@ export default {
description: '描述', description: '描述',
check: true, check: true,
required: [], required: [],
properties: { properties: {}
nameId: {
originType: 'query', //来源类型 query,body,header
type: 'object',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
description: '描述',
check: true,
properties: {
age: {
originType: 'query', //来源类型 query,body,header
type: 'string',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
description: '描述',
check: true
},
email: {
originType: 'query', //来源类型 query,body,header
type: 'string',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
description: '描述',
check: true
}
}
}
}
},
id: {
originType: 'query', //来源类型 query,body,header
type: 'string',
isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段
rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo
description: '描述',
check: true
} }
}, },
required: [] required: []
......
...@@ -15,6 +15,9 @@ import tableTr from '@/components/api/table-tr.vue'; ...@@ -15,6 +15,9 @@ import tableTr from '@/components/api/table-tr.vue';
<td rowspan="1" colspan="1" class="el-table_1_column_1"> <td rowspan="1" colspan="1" class="el-table_1_column_1">
<div class="cell">{{ itemName }}</div> <div class="cell">{{ itemName }}</div>
</td> </td>
<td rowspan="1" colspan="1" class="el-table_1_column_1">
<div class="cell">{{ itemValue.frontOriginType }}</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_2"> <td rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell">{{ itemValue.type }}</div> <div class="cell">{{ itemValue.type }}</div>
</td> </td>
......
<!-- <!--
<back-constant :itemData="itemData" :originType="originType"></back-constant> <back-constant :itemData="itemData" :interfaceType="interfaceType"></back-constant>
import backConstant from '@/components/createApi/back-constant.vue'; import backConstant from '@/components/createApi/back-constant.vue';
--> -->
...@@ -42,7 +42,7 @@ import backConstant from '@/components/createApi/back-constant.vue'; ...@@ -42,7 +42,7 @@ import backConstant from '@/components/createApi/back-constant.vue';
</td> </td>
<td v-if="interfaceType == '0'" rowspan="1" colspan="1" class="el-table_1_column_2"> <td v-if="interfaceType == '0'" rowspan="1" colspan="1" class="el-table_1_column_2">
<div class="cell"> <div class="cell">
<el-select v-model="itemValue.originType" placeholder="请选择参数位置"> <el-select v-model="itemValue.backendOriginType" placeholder="请选择参数位置">
<el-option label="header" value="header"></el-option> <el-option label="header" value="header"></el-option>
<el-option label="query" value="query"></el-option> <el-option label="query" value="query"></el-option>
<el-option label="body" value="body"></el-option> <el-option label="body" value="body"></el-option>
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
} }
}, },
interfaceType: { interfaceType: {
type: String, type: [String, Number],
default() { default() {
return '0'; return '0';
} }
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
type: 'object', type: 'object',
properties: { properties: {
name: { name: {
originType: this.originType, //来源类型 query,body,header backendOriginType: 'query', //来源类型 query,body,header
type: 'string', type: 'string',
currentKey: 'name', currentKey: 'name',
isBackendField: 0, //是否后端字段 isBackendField: 0, //是否后端字段
...@@ -119,18 +119,35 @@ export default { ...@@ -119,18 +119,35 @@ export default {
}; };
}, },
methods: { methods: {
/**
* key 输入变化
*/
blurKey(obj, oldKey) {
const that = this;
if (obj.currentKey != oldKey) {
that.$set(that.itemData.properties, obj.currentKey, obj);
that.$delete(that.itemData.properties, oldKey);
}
// console.log(obj, that.itemData);
},
/**
* 删除
*/
handleDel(obj, itemKey, index) { handleDel(obj, itemKey, index) {
const that = this; const that = this;
// that.$emit('input', that.trData); // that.$emit('input', that.trData);
that.$delete(that.trData.properties, itemKey); that.$delete(that.trData.properties, itemKey);
}, },
/**
* 添加
*/
toAddItem() { toAddItem() {
const that = this; const that = this;
// console.log(that.trData.properties); // console.log(that.trData.properties);
let length = that.keyLength++; let length = that.keyLength++;
// console.log(Object.keys(that.trData.properties), length, that.trData.properties); // console.log(Object.keys(that.trData.properties), length, that.trData.properties);
that.$set(that.trData.properties, 'field' + length, { that.$set(that.trData.properties, 'field' + length, {
originType: that.originType, //来源类型 query,body,header backendOriginType: 'query', //来源类型 query,body,header
type: 'string', type: 'string',
currentKey: 'field' + length, currentKey: 'field' + length,
isBackendField: 0, //是否后端字段 isBackendField: 0, //是否后端字段
......
<!-- <!--
<back-table-right></back-table-right> <back-table-right :itemData="itemData" :interfaceType="interfaceType"></back-table-right>
import backTableRight from '@/components/createApi/back-table-right.vue'; import backTableRight from '@/components/createApi/back-table-right.vue';
--> -->
......
...@@ -215,7 +215,7 @@ export default { ...@@ -215,7 +215,7 @@ export default {
level: 2, level: 2,
currentKey: 'root', currentKey: 'root',
constFlag: true, constFlag: true,
originType: 'header', //来源类型 query,body,header backendOriginType: 'header', //来源类型 query,body,header
type: 'string', type: 'string',
isBackendField: 0, //是否后端字段 isBackendField: 0, //是否后端字段
defaultVal: 'val', //默认值 defaultVal: 'val', //默认值
......
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
}; };
for (let key in allData.frontParams.properties) { for (let key in allData.frontParams.properties) {
if (allData.frontParams.properties[key].frontOriginType == type) { if (allData.frontParams.properties[key].frontOriginType == type) {
that.$set(newObj, allData.frontParams.properties[key].currentKey, allData.frontParams.properties[key]); that.$set(newObj.properties, allData.frontParams.properties[key].currentKey, allData.frontParams.properties[key]);
} }
} }
return newObj; return newObj;
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
}; };
for (let key in allData.endParams.properties) { for (let key in allData.endParams.properties) {
if (allData.endParams.properties[key].backendOriginType == type) { if (allData.endParams.properties[key].backendOriginType == type) {
that.$set(newObj, allData.endParams.properties[key].rootKey, allData.endParams.properties[key]); that.$set(newObj.properties, allData.endParams.properties[key].rootKey, allData.endParams.properties[key]);
} }
} }
return newObj; return newObj;
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
}; };
for (let key in allData.endParams.properties) { for (let key in allData.endParams.properties) {
if (allData.endParams.properties[key].constFlag == true) { if (allData.endParams.properties[key].constFlag == true) {
that.$set(newObj, allData.endParams.properties[key].currentKey, allData.endParams.properties[key]); that.$set(newObj.properties, allData.endParams.properties[key].currentKey, allData.endParams.properties[key]);
} }
} }
return newObj; return newObj;
......
...@@ -245,6 +245,7 @@ export default { ...@@ -245,6 +245,7 @@ export default {
const that = this; const that = this;
if (that.apiInfoData.requestType == 'POST' && that.frontOriginType == 'json') { if (that.apiInfoData.requestType == 'POST' && that.frontOriginType == 'json') {
if (Object.keys(that.bodyFormData.properties.root.properties).length) { if (Object.keys(that.bodyFormData.properties.root.properties).length) {
that.bodyFormData.properties.root.required = [];
for (const key in that.bodyFormData.properties.root.properties) { for (const key in that.bodyFormData.properties.root.properties) {
if (that.bodyFormData.properties.root.properties[key].check) { if (that.bodyFormData.properties.root.properties[key].check) {
that.bodyFormData.properties.root.required.push(key); that.bodyFormData.properties.root.required.push(key);
...@@ -257,6 +258,7 @@ export default { ...@@ -257,6 +258,7 @@ export default {
} }
if (that.apiInfoData.requestType == 'POST' && that.frontOriginType == 'form') { if (that.apiInfoData.requestType == 'POST' && that.frontOriginType == 'form') {
if (Object.keys(that.bodyFormData.properties).length) { if (Object.keys(that.bodyFormData.properties).length) {
that.bodyFormData.required = [];
for (const key in that.bodyFormData.properties) { for (const key in that.bodyFormData.properties) {
if (that.bodyFormData.properties[key].check) { if (that.bodyFormData.properties[key].check) {
that.bodyFormData.required.push(key); that.bodyFormData.required.push(key);
...@@ -268,6 +270,7 @@ export default { ...@@ -268,6 +270,7 @@ export default {
that.apiInfoData.bodyFormData = {}; that.apiInfoData.bodyFormData = {};
} }
if (Object.keys(that.headerData.properties).length) { if (Object.keys(that.headerData.properties).length) {
that.headerData.required = [];
for (const key in that.headerData.properties) { for (const key in that.headerData.properties) {
if (that.headerData.properties[key].check) { if (that.headerData.properties[key].check) {
that.headerData.required.push(key); that.headerData.required.push(key);
...@@ -275,6 +278,7 @@ export default { ...@@ -275,6 +278,7 @@ export default {
} }
} }
if (Object.keys(that.queryData.properties).length) { if (Object.keys(that.queryData.properties).length) {
that.queryData.required = [];
for (const key in that.queryData.properties) { for (const key in that.queryData.properties) {
if (that.queryData.properties[key].check) { if (that.queryData.properties[key].check) {
that.queryData.required.push(key); that.queryData.required.push(key);
...@@ -289,6 +293,10 @@ export default { ...@@ -289,6 +293,10 @@ export default {
handleStoreData() { handleStoreData() {
const that = this; const that = this;
that.apiInfoData = JSON.parse(JSON.stringify(that.$store.state.frontInfo)); that.apiInfoData = JSON.parse(JSON.stringify(that.$store.state.frontInfo));
that.headerData = that.apiInfoData.headerData;
that.queryData = that.apiInfoData.queryData;
that.bodyJsonData = that.apiInfoData.bodyJsonData;
that.bodyFormData = that.apiInfoData.bodyFormData;
} }
}, },
mounted() { mounted() {
......
...@@ -276,6 +276,7 @@ export default { ...@@ -276,6 +276,7 @@ export default {
dubboInterface: that.$store.state.backInfo.dubboInterface, dubboInterface: that.$store.state.backInfo.dubboInterface,
dubboMethod: that.$store.state.backInfo.dubboMethod, // dubbo 请求方法 dubboMethod: that.$store.state.backInfo.dubboMethod, // dubbo 请求方法
dubboVersion: that.$store.state.backInfo.dubboVersion, // dubbo版本号 dubboVersion: that.$store.state.backInfo.dubboVersion, // dubbo版本号
proxyCode: that.$store.state.backInfo.proxyCode, // 注册中心地址
timeout: that.$store.state.backInfo.timeout, // 超时 timeout: that.$store.state.backInfo.timeout, // 超时
endParams: JSON.stringify(endParams), // 返回 endParams: JSON.stringify(endParams), // 返回
resultParams: JSON.stringify(that.resultParams), // 返回结果 resultParams: JSON.stringify(that.resultParams), // 返回结果
......
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
that.$emit('showTab', 22); that.$emit('showTab', 22);
}, },
beforeDestroy() { beforeDestroy() {
this.$store.dispatch('clearData'); this.$store.dispatch('clearApiData');
} }
}; };
</script> </script>
......
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