CRMEB/crmeb/public/admin/system_static/js/chunk-47598180.02489890.js
2023-06-12 14:41:51 +08:00

1 line
50 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-47598180"],{"34b9":function(t,e,r){},3688:function(t,e,r){"use strict";var n=r("e4e4");r.n(n).a},"4e03":function(t,e,r){"use strict";var n=r("9085");r.n(n).a},"5d3e":function(t,e,r){"use strict";var n=r("34b9");r.n(n).a},"6c04":function(t,e,r){},9085:function(t,e,r){},9666:function(t,e,r){"use strict";r.r(e),r("a4d3"),r("e01a"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("159b"),r("131a");var n=r("0122"),a=r("c964"),o=r("f3f3"),i=r("fc11"),s=(r("b0c0"),r("a9e3"),r("fb6a"),r("7db0"),r("d3b7"),r("a434"),r("99af"),r("6b6c"));function l(t){return Object(s.a)({url:"system/route/".concat(t.id),method:"post",data:t})}function c(t){return Object(s.a)({url:"system/route/"+t,method:"delete"})}function u(t){return Object(s.a)({url:"system/route_cate/"+t,method:"delete"})}var d=r("95d5"),f=(r("e9c4"),r("d81d"),r("bc3a")),p=(f=r.n(f),r("d708"),r("c276")),m=r("e069"),h=f.a.create({baseURL:location.protocol+"//"+location.hostname,timeout:1e4}),v=(f.a.defaults.withCredentials=!0,h.interceptors.request.use((function(t){t.file?t.headers["Content-Type"]="multipart/form-data":t.headers["Content-Type"]="application/json;charset=UTF-8";try{if(t.headerItem)for(var e in t.headerItem)t.headers[e]=t.headerItem[e]}catch(t){}return Object(p.c)("token"),Object(p.c)("kefu_token"),t}),(function(t){return Promise.reject(t)})),h.interceptors.response.use((function(t){var e={};return t.data&&(e="string"==typeof t.data?JSON.parse(t.data):t.data),200!==(t.data?e.status:0)?Promise.reject(e||{msg:"未知错误"}):e}),(function(t){m.Message.error("接口异常")})),h),y=r("c2c6");f={name:"",props:{codes:{type:String,default:function(){return""}},readOnly:{type:Boolean,default:function(){return!1}},editorOptions:{type:Object,default:function(){return{selectOnLineNumbers:!0,roundedSelection:!1,readOnly:this.readOnly,cursorStyle:"line",automaticLayout:!1,glyphMargin:!0,useTabStops:!1,fontSize:28,autoIndent:!0}}}},data:function(){return{}},created:function(){},mounted:function(){var t=this;this.monacoEditor=y.editor.create(this.$refs.container,{value:this.codes,language:"json",theme:"vs",automaticLayout:!0,scrollbar:{verticalScrollbarSize:4,horizontalScrollbarSize:10},lineNumbersMinChars:5,editorOptions:this.editorOptions}),setTimeout((function(){t.monacoEditor.trigger("anyString","editor.action.formatDocument"),t.monacoEditor.setValue(t.monacoEditor.getValue())}),100)},methods:{}},r("4e03"),h=r("2877"),f=Object(h.a)(f,(function(){var t=this.$createElement;t=this._self._c||t;return t("div",{staticClass:"monaco-container"},[t("div",{ref:"container",staticClass:"monaco-editor"})])}),[],!1,null,"1bc47b4c",null).exports;function b(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */b=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(e){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o,i,s,l;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new k(n||[]);return a(e,"_invoke",{value:(o=t,i=r,s=n,l="suspendedStart",function(t,e){if("executing"===l)throw new Error("Generator is already running");if("completed"===l){if("throw"===t)throw e;return E()}for(s.method=t,s.arg=e;;){var r=s.delegate;if(r&&(r=function t(e,r){var n=r.method,a=e.iterator[n];return void 0===a?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f):(n=d(a,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,f):(a=n.arg,a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)))}(r,s),r)){if(r===f)continue;return r}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===l)throw l="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(l="executing",r=d(o,i,s),"normal"===r.type){if(l=s.done?"completed":"suspendedYield",r.arg===f)continue;return{value:r.arg,done:s.done}}"throw"===r.type&&(l="completed",s.method="throw",s.arg=r.arg)}})}),e}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function p(){}function m(){}function h(){}o={};var v=(c(o,i,(function(){return this})),Object.getPrototypeOf),y=(v=v&&v(v(T([]))),v&&v!==e&&r.call(v,i)&&(o=v),h.prototype=p.prototype=Object.create(o));function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){var o;a(this,"_invoke",{value:function(a,i){function s(){return new e((function(o,s){!function a(o,i,s,l){var c;o=d(t[o],t,i);if("throw"!==o.type)return(i=(c=o.arg).value)&&"object"==Object(n.a)(i)&&r.call(i,"__await")?e.resolve(i.__await).then((function(t){a("next",t,s,l)}),(function(t){a("throw",t,s,l)})):e.resolve(i).then((function(t){c.value=t,s(c)}),(function(t){return a("throw",t,s,l)}));l(o.arg)}(a,i,o,s)}))}return o=o?o.then(s,s):s()}})}function w(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 _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e,n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:E}}function E(){return{value:void 0,done:!0}}return a(y,"constructor",{value:m.prototype=h,configurable:!0}),a(h,"constructor",{value:m,configurable:!0}),m.displayName=c(h,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new x(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),c(y,l,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=T,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;0<=a;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},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),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,a=this.tryEntries[e];if(a.tryLoc===t)return"throw"===(r=a.completion).type&&(n=r.arg,_(a)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}r("310e");f={components:{MonacoEditor:f},props:{formValidate:{type:Object,default:function(){return{}}},requestTypeList:{type:Array,default:function(){return[]}},typeList:{type:Array,default:function(){return[]}},apiType:{type:String,default:"adminapi"}},data:function(){return{bodyType:"form-data",interfaceData:void 0,paramsType:"Params",editor:"",codes:"",jsonBody:""}},created:function(){this.interfaceData=this.formValidate,this.interfaceData.request_body=JSON.parse(JSON.stringify(this.interfaceData.request))},mounted:function(){this.$refs.zTable.getTableData().tableData.length||"adminapi"!=this.apiType||this.insertEvent("zTable",{attribute:"Authori-Zation",value:"Bearer "+Object(p.c)("token")})},methods:{handleChange:function(t,e,r){var n=this;return Object(a.a)(b().mark((function a(){var o,i,s,l;return b().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if("array"===t.value||"object"===t.value){a.next=13;break}if(!e.children.length){a.next=13;break}o=n.$refs[r].getTableData().tableData,i=e.children[0].parentId,s=n.$refs[r],l=0;case 6:if(l<o.length){if(o[l].parentId==i)return a.next=10,s.remove(o[l]);a.next=10}else a.next=13;break;case 10:l++,a.next=6;break;case 13:case"end":return a.stop()}}),a)})))()},insertCopy:function(){var t=this;this.$copyText(this.codes).then((function(e){t.$Message.success("复制成功")})).catch((function(e){t.$Message.error("复制失败")}))},requestData:function(){var t=this;return Object(a.a)(b().mark((function e(){var r,n,a,o,i;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.apiType+"/"+t.interfaceData.path,n=t.interfaceData.method,e.t0=t,e.next=5,t.$refs.xTable.getTableData().tableData;case 5:if(e.t1=e.sent,e.t1){e.next=8;break}e.t1=[];case 8:e.t2=e.t1,a=e.t0.filtersData.call(e.t0,e.t2),"json"!==t.bodyType?e.next=14:(e.t3=t.jsonBody,e.next=22);break;case 14:return e.t4=t,e.next=17,t.$refs.yTable.getTableData().tableData;case 17:if(e.t5=e.sent,e.t5){e.next=20;break}e.t5=[];case 20:e.t6=e.t5,e.t3=e.t4.filtersData.call(e.t4,e.t6);case 22:return o=e.t3,e.t7=t,e.next=26,t.$refs.zTable.getTableData().tableData;case 26:if(e.t8=e.sent,e.t8){e.next=29;break}e.t8=[];case 29:e.t9=e.t8,i=e.t7.filtersData.call(e.t7,e.t9),i=i,t.codes="",v({url:r,method:n,params:a,data:o,headerItem:i}).then((function(e){if(!e)return t.$Message.error("接口异常");t.codes=JSON.stringify(e)})).catch((function(e){if(!e)return t.$Message.error("接口异常");t.codes=JSON.stringify(e)}));case 35:case"end":return e.stop()}}),e)})))()},filtersData:function(t){var e=this;try{var r={};return t.map((function(t){if(!t.parentId)for(var n in t)!function(){var a,o;"attribute"==n&&("object"===t.type?(a={},t.children.map((function(t,r){a=e.filtersObj(t,1)})),r[t[n]]=a):"array"!==t.type?r[t[n]]=t.value||"":(o=[],t.children.map((function(t,r){o[r]=e.filtersObj(t)})),r[t[n]]=o))}()})),r}catch(t){}},filtersObj:function(t,e){var r,n=this,a={};for(r in t)!function(){var o,i;"attribute"==r&&("object"===t.type?(o={},t.children.map((function(e,r){o[t.attribute]=n.filtersObj(e)})),a=o):"array"!==t.type?e?a[t.attribute]=t.value||"":a[t[r]]=t.value||"":(i=[],t.children.map((function(t,e){i[e]=n.filtersObj(t)})),a[t[r]]=i))}();return a},changeTab:function(t){},insertEvent:function(t,e){var r=this;return Object(a.a)(b().mark((function n(){var a,i,s;return b().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=r.$refs[t],i="xTable"==t?{attribute:"",type:"string",must:0,value:"",trip:""}:"yTable"==t?{attribute:"",type:"string",value:"",must:0,trip:""}:"zTable"==t?(i={attribute:"",type:"",value:"",trip:""},Object(o.a)(Object(o.a)({},i),e)):"zaTable"==t?{attribute:"token",type:"string",value:"",must:0,trip:""}:{code:"",value:"",solution:""},n.next=4,a.insertAt(i,-1);case 4:return s=n.sent,s=s.row,n.next=8,a.setActiveCell(s,"name");case 8:case"end":return n.stop()}}),n)})))()},insertRow:function(t,e){var r=this;return Object(a.a)(b().mark((function n(){var a,o,i;return b().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=r.$refs[e],o="xTable"==e?{attribute:"",type:"string",must:0,value:"",trip:"",id:Date.now(),parentId:t.id}:{code:"",value:"",solution:"",id:Date.now(),parentId:t.id},n.next=4,a.insertAt(o,-1);case 4:return o=n.sent,i=o.row,n.next=8,a.setTreeExpand(t,!0);case 8:return n.next=10,a.setActiveRow(i);case 10:case"end":return n.stop()}}),n)})))()},removeRow:function(t,e){var r=this;return Object(a.a)(b().mark((function n(){var a;return b().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=r.$refs[e],n.next=3,a.remove(t);case 3:case"end":return n.stop()}}),n)})))()}}},r("3688"),r("b6e36"),f=Object(h.a)(f,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.interfaceData?r("div",{staticClass:"content"},[r("div",{staticClass:"head"},[r("Input",{scopedSlots:t._u([{key:"prepend",fn:function(){return[r("Select",{staticStyle:{width:"120px"},model:{value:t.interfaceData.method,callback:function(e){t.$set(t.interfaceData,"method",e)},expression:"interfaceData.method"}},t._l(t.requestTypeList,(function(e,n){return r("Option",{key:n,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)]},proxy:!0}],null,!1,46623443),model:{value:t.interfaceData.path,callback:function(e){t.$set(t.interfaceData,"path",e)},expression:"interfaceData.path"}}),r("Button",{staticClass:"ml20",attrs:{type:"primary"},on:{click:t.requestData}},[t._v("请求")]),t.codes?r("Button",{staticClass:"ml10 copy-btn",attrs:{type:"success"},on:{click:function(e){return t.insertCopy()}}},[t._v("复制结果")]):t._e()],1),r("div",{staticClass:"params"},[r("Tabs",{staticClass:"mt10",on:{"on-click":t.changeTab},model:{value:t.paramsType,callback:function(e){t.paramsType=e},expression:"paramsType"}},[r("TabPane",{attrs:{label:"Params",name:"Params"}}),r("TabPane",{attrs:{label:"Body",name:"Body"}}),r("TabPane",{attrs:{label:"Header",name:"Header"}})],1),r("div",{directives:[{name:"show",rawName:"v-show",value:"Params"===t.paramsType,expression:"paramsType === 'Params'"}]},[r("vxe-table",{ref:"xTable",staticClass:"mt10",attrs:{resizable:"","show-overflow":"","keep-source":"","row-id":"id","print-config":{},"export-config":{},"tree-config":{transform:!0,rowField:"id",parentField:"parentId"},data:t.interfaceData.request}},[r("vxe-column",{attrs:{field:"attribute",width:"150",title:"属性","tree-node":"","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("vxe-input",{attrs:{type:"text"},model:{value:n.attribute,callback:function(e){t.$set(n,"attribute",e)},expression:"row.attribute"}})]}}],null,!1,3650624218)}),r("vxe-column",{attrs:{field:"value",title:"参数值","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("vxe-input",{attrs:{type:"text"},model:{value:n.value,callback:function(e){t.$set(n,"value",e)},expression:"row.value"}})]}}],null,!1,3354968205)}),r("vxe-column",{attrs:{field:"type",title:"类型",width:"120","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("vxe-select",{attrs:{transfer:""},on:{change:function(e){t.handleChange(e,n,"xTable")}},model:{value:n.type,callback:function(e){t.$set(n,"type",e)},expression:"row.type"}},t._l(t.typeList,(function(t){return r("vxe-option",{key:t.value,attrs:{value:t.value,label:t.label}})})),1)]}}],null,!1,2121888576)}),r("vxe-column",{attrs:{title:"操作",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[["array","object"].includes(n.type)?r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.insertRow(n,"xTable")}}},[t._v("插入")]):t._e(),r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.removeRow(n,"xTable")}}},[t._v("删除")])]}}],null,!1,832755093)})],1),r("Button",{staticClass:"mt10",attrs:{type:"primary"},on:{click:function(e){return t.insertEvent("xTable")}}},[t._v("添加参数")])],1),r("div",{directives:[{name:"show",rawName:"v-show",value:"Body"===t.paramsType,expression:"paramsType === 'Body'"}]},[r("RadioGroup",{staticClass:"mt10",model:{value:t.bodyType,callback:function(e){t.bodyType=e},expression:"bodyType"}},[r("Radio",{attrs:{label:"form-data"}}),r("Radio",{attrs:{label:"json"}})],1),"form-data"==t.bodyType?r("vxe-table",{ref:"yTable",staticClass:"mt10",attrs:{resizable:"","show-overflow":"","keep-source":"","row-id":"id","print-config":{},"export-config":{},"tree-config":{transform:!0,rowField:"id",parentField:"parentId"},data:t.interfaceData.request_body}},[r("vxe-column",{attrs:{field:"attribute",width:"150",title:"属性","tree-node":"","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("vxe-input",{attrs:{type:"text"},model:{value:n.attribute,callback:function(e){t.$set(n,"attribute",e)},expression:"row.attribute"}})]}}],null,!1,3650624218)}),r("vxe-column",{attrs:{field:"value",title:"参数值","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("vxe-input",{attrs:{type:"text"},model:{value:n.value,callback:function(e){t.$set(n,"value",e)},expression:"row.value"}})]}}],null,!1,3354968205)}),r("vxe-column",{attrs:{field:"type",title:"类型",width:"120","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("vxe-select",{attrs:{transfer:""},on:{change:function(e){t.handleChange(e,n,"yTable")}},model:{value:n.type,callback:function(e){t.$set(n,"type",e)},expression:"row.type"}},t._l(t.typeList,(function(t){return r("vxe-option",{key:t.value,attrs:{value:t.value,label:t.label}})})),1)]}}],null,!1,3599903521)}),r("vxe-column",{attrs:{title:"操作",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[["array","object"].includes(n.type)?r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.insertRow(n,"yTable")}}},[t._v("插入")]):t._e(),r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.removeRow(n,"yTable")}}},[t._v("删除")])]}}],null,!1,2927461237)})],1):r("div",[r("Input",{attrs:{type:"textarea",rows:8,placeholder:"请求数据"},model:{value:t.jsonBody,callback:function(e){t.jsonBody=e},expression:"jsonBody"}})],1),"form-data"==t.bodyType?r("Button",{staticClass:"mt10",attrs:{type:"primary"},on:{click:function(e){return t.insertEvent("yTable")}}},[t._v("添加参数")]):t._e()],1),r("div",{directives:[{name:"show",rawName:"v-show",value:"Header"===t.paramsType,expression:"paramsType === 'Header'"}]},[r("vxe-table",{ref:"zTable",staticClass:"mt10",attrs:{resizable:"","show-overflow":"","keep-source":"","row-id":"id","print-config":{},"export-config":{},"tree-config":{transform:!0,rowField:"id",parentField:"parentId"},data:t.interfaceData.headerData}},[r("vxe-column",{attrs:{field:"attribute",width:"300",title:"属性","tree-node":"","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("vxe-input",{attrs:{type:"text"},model:{value:n.attribute,callback:function(e){t.$set(n,"attribute",e)},expression:"row.attribute"}})]}}],null,!1,3650624218)}),r("vxe-column",{attrs:{field:"value",title:"参数值","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("vxe-input",{attrs:{type:"text"},model:{value:n.value,callback:function(e){t.$set(n,"value",e)},expression:"row.value"}})]}}],null,!1,3354968205)}),r("vxe-column",{attrs:{title:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[["array","object"].includes(n.type)?r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.insertRow(n,"zTable")}}},[t._v("插入")]):t._e(),r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.removeRow(n,"zTable")}}},[t._v("删除")])]}}],null,!1,1494681813)})],1),r("Button",{staticClass:"mt10",attrs:{type:"primary"},on:{click:function(e){return t.insertEvent("zTable")}}},[t._v("添加参数")])],1)],1),t.codes?r("div",{staticClass:"res mt10 mb10"},[r("MonacoEditor",{attrs:{codes:t.codes,readOnly:!0}})],1):t._e()]):t._e()}),[],!1,null,"489b40a6",null).exports;var g=r("2f62");function x(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */x=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(e){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o,i,s,l;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new k(n||[]);return a(e,"_invoke",{value:(o=t,i=r,s=n,l="suspendedStart",function(t,e){if("executing"===l)throw new Error("Generator is already running");if("completed"===l){if("throw"===t)throw e;return E()}for(s.method=t,s.arg=e;;){var r=s.delegate;if(r&&(r=function t(e,r){var n=r.method,a=e.iterator[n];return void 0===a?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f):(n=d(a,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,f):(a=n.arg,a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)))}(r,s),r)){if(r===f)continue;return r}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===l)throw l="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(l="executing",r=d(o,i,s),"normal"===r.type){if(l=s.done?"completed":"suspendedYield",r.arg===f)continue;return{value:r.arg,done:s.done}}"throw"===r.type&&(l="completed",s.method="throw",s.arg=r.arg)}})}),e}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function p(){}function m(){}function h(){}o={};var v=(c(o,i,(function(){return this})),Object.getPrototypeOf),y=(v=v&&v(v(T([]))),v&&v!==e&&r.call(v,i)&&(o=v),h.prototype=p.prototype=Object.create(o));function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var o;a(this,"_invoke",{value:function(a,i){function s(){return new e((function(o,s){!function a(o,i,s,l){var c;o=d(t[o],t,i);if("throw"!==o.type)return(i=(c=o.arg).value)&&"object"==Object(n.a)(i)&&r.call(i,"__await")?e.resolve(i.__await).then((function(t){a("next",t,s,l)}),(function(t){a("throw",t,s,l)})):e.resolve(i).then((function(t){c.value=t,s(c)}),(function(t){return a("throw",t,s,l)}));l(o.arg)}(a,i,o,s)}))}return o=o?o.then(s,s):s()}})}function w(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 _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e,n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:E}}function E(){return{value:void 0,done:!0}}return a(y,"constructor",{value:m.prototype=h,configurable:!0}),a(h,"constructor",{value:m,configurable:!0}),m.displayName=c(h,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(g.prototype),c(g.prototype,s,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new g(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=T,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;0<=a;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},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),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,a=this.tryEntries[e];if(a.tryLoc===t)return"throw"===(r=a.completion).type&&(n=r.arg,_(a)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}g={name:"systemOutInterface",components:{VueTreeList:d.VueTreeList,debugging:f},data:function(){return{value:"",isEdit:!1,nameModal:!1,debuggingModal:!1,formValidate:{},grid:{xl:7,lg:7,md:12,sm:24,xs:24},ruleValidate:{title:[{message:"请输入正确的描述 (不能多于200位数)",trigger:"blur",max:200}]},loading:!1,intTypeList:[{value:"string",label:"String"},{value:"number",label:"Number"},{value:"boolean",label:"Boolean"},{value:"null",label:"Null"},{value:"any",label:"Any"}],typeList:[{value:"string",label:"String"},{value:"array",label:"Array"},{value:"object",label:"Object"},{value:"number",label:"Number"},{value:"boolean",label:"Boolean"},{value:"null",label:"Null"},{value:"any",label:"Any"}],requestTypeList:[{value:"GET",label:"GET"},{value:"POST",label:"POST"},{value:"DELETE",label:"DELETE"},{value:"PUT",label:"PUT"}],contextData:null,treeData:void 0,buttonProps:{type:"default",size:"small"},methodColor:"#fff",apiType:"adminapi",paramsId:0}},watch:(f={},Object(i.a)(f,"formValidate.method",{deep:!0,handler:function(t,e){t&&("GET"==(t=t.toUpperCase())?this.methodColor="#61affe":"POST"==t?this.methodColor="#49cc90":"PUT"==t?this.methodColor="#fca130":"DEL"!=t&&"DELETE"!=t||(this.methodColor="#f93e3e"))}}),Object(i.a)(f,"apiType",(function(t){t&&this.getInterfaceList("one")})),f),computed:Object(o.a)(Object(o.a)({},Object(g.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:50},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getInterfaceList("one")},methods:(f={syncRoute:function(){var t=this;this.$Modal.confirm({title:"立即同步",content:"同步之后,路由文件中新增的接口添加到接口列表中,路由文件中删除的路由会同步的在接口列表中删除",onOk:function(){var e;e=t.apiType,Object(s.a)({url:"system/route/sync_route/".concat(e),method:"get"}).then((function(e){t.getInterfaceList("one"),t.$Message.success(e.msg),t.$Modal.remove()}))}})},debugging:function(){this.debuggingModal=!0},onClicksss:function(t){},methodsColor:function(t){return t=t.toUpperCase(),"GET"==t?"#61affe":"POST"==t?"#49cc90":"PUT"==t?"#fca130":"DEL"==t||"DELETE"==t?"#f93e3e":void 0},insertBefore:function(t){},insertAfter:function(t){},moveInto:function(t){},addTableData:function(){return Object(a.a)(x().mark((function t(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$table.insertAt(newRow,-1);case 2:return e=t.sent,e=e.row,t.next=6,$table.setActiveCell(e,"name");case 6:case"end":return t.stop()}}),t)})))()},getInterfaceList:function(t){var e,r=this;try{e=this.apiType,Object(s.a)({url:"system/route/tree?app_name=".concat(e),method:"get"}).then((function(e){var n;e.data.length?(e.data[0].expand=!1,r.treeData=new d.Tree(e.data),r.$nextTick((function(a){t&&(n=(e.data[0].children&&e.data[0].children[0].children&&e.data[0].children[0].children.length?(document.querySelectorAll(".vtl-icon-caret-right")[0].click(),document.querySelectorAll(".vtl-icon-caret-right")[1].click(),e.data[0].children):(document.querySelectorAll(".vtl-icon-caret-right")[0].click(),e.data))[0].children[0],r.onClick(n))}))):(r.treeData=new d.Tree({}),r.formValidate={})})).catch((function(t){r.$Message.error(t)}))}catch(e){}},onClick:function(t){try{t.method&&(this.isEdit=!1,this.paramsId=t.id,this.getRoteData(t.id))}catch(t){}},getRoteData:function(t){var e=this;t=t,Object(s.a)({url:"system/route/".concat(t),method:"get"}).then((function(t){e.formValidate=t.data})).catch((function(t){e.$Message.error(t)}))},handleSubmit:function(){var t=this;return Object(a.a)(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.formValidate.name){e.next=4;break}return e.abrupt("return",t.$Message.warning("请输入接口名称"));case 4:if(t.formValidate.method){e.next=8;break}return e.abrupt("return",t.$Message.warning("请选择请求类型"));case 8:if(t.formValidate.path){e.next=10;break}return e.abrupt("return",t.$Message.warning("请输入路由地址"));case 10:return e.next=12,t.$refs.xTable.getTableData().tableData;case 12:return t.formValidate.request=e.sent,e.next=15,t.$refs.resTable.getTableData().tableData;case 15:return t.formValidate.response=e.sent,e.next=18,t.$refs.codeTable.getTableData().tableData;case 18:return t.formValidate.error_code=e.sent,t.formValidate.apiType=t.apiType,e.next=22,l(t.formValidate).then((function(e){t.isEdit=!1,t.$Message.success(e.msg),t.getRoteData(t.paramsId)})).catch((function(e){t.$Message.error(e)}));case 22:case"end":return e.stop()}}),e)})))()},insertEvent:function(t){var e=this;return Object(a.a)(x().mark((function r(){var n,a,o;return x().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.$refs[t],a="xTable"==t?{attribute:"",type:"",must:0,trip:""}:"resTable"==t?{attribute:"",type:"",trip:""}:{code:"",value:"",solution:""},r.next=4,n.insertAt(a,-1);case 4:return a=r.sent,o=a.row,r.next=8,n.setActiveCell(o,"name");case 8:case"end":return r.stop()}}),r)})))()},insertRow:function(t,e){var r=this;return Object(a.a)(x().mark((function n(){var a,o,i;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=r.$refs[e],o="xTable"==e?{attribute:"",type:"",must:0,trip:"",id:Date.now(),parentId:t.id}:"resTable"==e?{attribute:"",type:"",trip:"",id:Date.now(),parentId:t.id}:{code:"",value:"",solution:"",id:Date.now(),parentId:t.id},n.next=4,a.insertAt(o,-1);case 4:return o=n.sent,i=o.row,n.next=8,a.setTreeExpand(t,!0);case 8:return n.next=10,a.setActiveRow(i);case 10:case"end":return n.stop()}}),n)})))()},removeRow:function(t,e){var r=this;return Object(a.a)(x().mark((function n(){var a;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=r.$refs[e],n.next=3,a.remove(t);case 3:case"end":return n.stop()}}),n)})))()},add:function(){this.value="",this.formValidate.id=0,this.nameModal=!0},clickMenu:function(t,e){var r,n,a=this;1==t?(this.formValidate={},this.formValidate.cate_id=e?e.id:0,this.formValidate.id=0,this.isEdit=!0):2==t?this.$modalForm((r=e.id,n=this.apiType,Object(s.a)({url:"system/route_cate/".concat(r,"/edit?app_name=").concat(n),method:"get"}))).then((function(){return a.getInterfaceList()})):3==t?this.onDel(e):4==t&&this.$modalForm((r=this.apiType,Object(s.a)({url:"system/route_cate/create?app_name=".concat(r),method:"get"}))).then((function(){return a.getInterfaceList()}))},addFac:function(t){this.formValidate={id:t?t.id:0},this.isEdit=!0},asyncOK:function(){var t=this;l({id:this.formValidate.id||0,type:0,name:this.value}).then((function(e){t.$Message.success(e.msg),t.getInterfaceList()})).catch((function(e){t.$Message.error(e)}))},handleContextMenu:function(t,e,r){r.left=Number(r.left.slice(0,-2))+75+"px",this.contextData=t},handleContextCreateFolder:function(){},handleContextCreateFile:function(){},renderContent:function(t,e){var r=this,n=e.root,a=e.node,i=e.data;return t("span",{style:{display:"inline-block",width:"100%"}},[t("span",[t(resolveComponent("Icon"),{type:"ios-paper-outline",style:{marginRight:"8px"}}),t("span",i.title)]),t("span",{style:{display:"inline-block",float:"right",marginRight:"32px"}},[t(resolveComponent("Button"),Object(o.a)(Object(o.a)({},this.buttonProps),{},{icon:"ios-add",style:{marginRight:"8px"},onClick:function(){r.append(i)}})),t(resolveComponent("Button"),Object(o.a)(Object(o.a)({},this.buttonProps),{},{icon:"ios-remove",onClick:function(){r.remove(n,a,i)}}))])])},clickDir:function(t,e,r){this.navItem=t,this.pathname=t.pathname},append:function(t){var e=t.children||[];e.push({title:"appended node",expand:!0}),this.$set(t,"children",e)},remove:function(t,e,r){var n=t.find((function(t){return t===e})).parent;t=t.find((function(t){return t.nodeKey===n})).node,r=t.children.indexOf(r);t.children.splice(r,1)},onMouseOver:function(t,e,r,n,a){}},Object(i.a)(f,"onMouseOver",(function(t,e,r,n,a){})),Object(i.a)(f,"onDel",(function(t){var e=this,r=t.cate_id?c:u;this.$Modal.confirm({title:"警告",content:"<p>删除后无法恢复,请确认后删除!</p>",onOk:function(){r(t.id).then((function(r){e.$Message.success(r.msg),t.remove()})).catch((function(t){e.$Message.error(t)}))},onCancel:function(){}})})),Object(i.a)(f,"onChangeName",(function(t){var e=this;"blur"==t.eventType&&(t={name:t.newName,id:t.id},t=t,Object(s.a)({url:"setting/system_out_interface/edit_name",method:"PUT",data:t}).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t)})))})),Object(i.a)(f,"onAddNode",(function(t){})),Object(i.a)(f,"addNode",(function(){var t=new d.TreeNode({name:"new node",isLeaf:!1});this.data.children||(this.data.children=[]),this.data.addChildren(t)})),Object(i.a)(f,"getNewTree",(function(){this.newTree=function t(e){var r,n={};for(r in e)"children"!==r&&"parent"!==r&&(n[r]=e[r]);if(e.children&&0<e.children.length){n.children=[];for(var a=0,o=e.children.length;a<o;a++)n.children.push(t(e.children[a]))}return n}(this.data)})),f)},r("5d3e"),i=Object(h.a)(g,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",[r("div",{staticClass:"tabs"},[r("Tabs",{model:{value:t.apiType,callback:function(e){t.apiType=e},expression:"apiType"}},[r("TabPane",{attrs:{label:"管理端接口",name:"adminapi"}}),r("TabPane",{attrs:{label:"用户端接口",name:"api"}}),r("TabPane",{attrs:{label:"客服端接口",name:"kefuapi"}}),r("TabPane",{attrs:{label:"对外接口",name:"outapi"}})],1)],1),r("div",{staticClass:"main"},[r("div",{staticClass:"ivu-mt mr20 card-tree"},[r("div",{staticClass:"tree"},[r("div",{staticClass:"main-btn"},[r("Button",{staticClass:"mb5 mr10",staticStyle:{flex:"1"},attrs:{type:"primary",long:""},on:{click:function(e){return t.clickMenu(4)}}},[t._v("新增分类")]),r("Button",{staticClass:"mr10",attrs:{type:"success"},on:{click:function(e){return t.syncRoute()}}},[t._v("同步")])],1),r("vue-tree-list",{ref:"treeList",staticClass:"tree-list",attrs:{model:t.treeData,"default-tree-node-name":"默认文件夹","default-leaf-node-name":"默认接口名","default-expanded":!1,"expand-only-one":!0},on:{"change-name":t.onChangeName,"delete-node":t.onDel},scopedSlots:t._u([{key:"leafNameDisplay",fn:function(e){return[r("div"),r("div",{staticClass:"tree-node",class:{node:e.model.method,open:t.formValidate.path==e.model.path&&t.formValidate.method==e.model.method},on:{click:function(r){return r.stopPropagation(),t.onClick(e.model)}}},[r("span",{class:{open:t.formValidate.path==e.model.path&&t.formValidate.method==e.model.method}},[t._v(t._s(e.model.name))]),r("Dropdown",{attrs:{transfer:""},on:{"on-click":function(r){t.clickMenu(r,e.model)}},scopedSlots:t._u([{key:"list",fn:function(){return[r("DropdownMenu",[e.model.method?t._e():r("DropdownItem",{attrs:{name:"1"}},[t._v("新增接口")]),e.model.method?t._e():r("DropdownItem",{attrs:{name:"2"}},[t._v("编辑分类名")]),r("DropdownItem",{attrs:{name:"3"}},[t._v("删除")])],1)]},proxy:!0}],null,!0)},[r("a",{attrs:{href:"javascript:void(0)"}},[r("Icon",{staticClass:"add",attrs:{type:"ios-more"}})],1)])],1)]}},{key:"treeNodeIcon",fn:function(e){return[e.model.method?r("span",{staticClass:"req-method",style:{color:t.methodsColor(e.model.method),"font-weight":(e.model.pid,t.formValidate.pid,"500")}},[t._v(t._s(e.model.method))]):t._e()]}}])},[r("span",{staticClass:"icon",attrs:{slot:"addTreeNodeIcon"},slot:"addTreeNodeIcon"}),r("span",{staticClass:"icon",attrs:{slot:"addLeafNodeIcon"},slot:"addLeafNodeIcon"}),r("span",{staticClass:"icon",attrs:{slot:"editNodeIcon"},slot:"editNodeIcon"}),r("span",{staticClass:"icon",attrs:{slot:"delNodeIcon"},slot:"delNodeIcon"})])],1)]),r("Card",{staticClass:"ivu-mt right-card",attrs:{bordered:!1,"dis-hover":""}},[r("div",{staticClass:"data"},[r("div",{staticClass:"eidt-sub"},[r("div",{staticClass:"name"},[t._v("\n "+t._s(t.formValidate.name)+"\n ")]),r("div",[r("Button",{staticClass:"submission mr20",attrs:{type:"info"},on:{click:function(e){return t.debugging()}}},[t._v("调试")]),t.formValidate.id?r("Button",{staticClass:"submission mr20",attrs:{type:"primary"},on:{click:function(e){t.isEdit=!t.isEdit}}},[t._v(t._s(t.isEdit?"返回":"编辑"))]):t._e(),t.isEdit?r("Button",{staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("保存")]):t._e()],1)]),r("Form",{ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":100,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[r("Row",{attrs:{gutter:24,type:"flex"}},[r("Col",{attrs:{span:"24"}},[r("div",{staticClass:"title"},[t._v("接口信息")]),r("FormItem",{attrs:{label:"接口名称:",prop:"name"}},[t.isEdit?r("Input",{staticClass:"perW20",attrs:{type:"text",rows:4,placeholder:"请输入"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name","string"==typeof e?e.trim():e)},expression:"formValidate.name"}}):r("span",[t._v(t._s(t.formValidate.name||""))])],1),r("FormItem",{attrs:{label:"请求类型:",prop:"name"}},[t.isEdit?r("Select",{staticStyle:{width:"120px"},model:{value:t.formValidate.method,callback:function(e){t.$set(t.formValidate,"method",e)},expression:"formValidate.method"}},t._l(t.requestTypeList,(function(e,n){return r("Option",{key:n,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1):r("span",{staticClass:"req-method",style:"background-color:"+t.methodColor},[t._v(t._s(t.formValidate.method||""))])],1),r("FormItem",{attrs:{label:"功能描述:",prop:"name"}},[t.isEdit?r("Input",{staticClass:"perW20",attrs:{type:"textarea",rows:4,placeholder:"请输入"},model:{value:t.formValidate.describe,callback:function(e){t.$set(t.formValidate,"describe","string"==typeof e?e.trim():e)},expression:"formValidate.describe"}}):r("span",{staticClass:"text-area"},[t._v(t._s(t.formValidate.describe||"--"))])],1),t.isEdit?r("FormItem",{attrs:{label:"所属分类:",prop:"name"}},[r("el-cascader",{attrs:{size:"small",options:t.formValidate.cate_tree,props:{checkStrictly:!0,multiple:!1,emitPath:!1,value:"id",label:"name"},clearable:""},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1):t._e(),r("FormItem",{attrs:{label:"是否公共:",prop:"name"}},[t.isEdit?r("i-switch",{attrs:{"true-value":1,"false-value":0},scopedSlots:t._u([{key:"open",fn:function(){return[r("span",[t._v("是")])]},proxy:!0},{key:"close",fn:function(){return[r("span",[t._v("否")])]},proxy:!0}],null,!1,338315714),model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}}):r("span",{staticClass:"text-area"},[t._v(t._s(t.formValidate.type?"是":"否"))])],1)],1)],1),r("Row",{attrs:{gutter:24,type:"flex"}},[r("Col",{attrs:{span:"24"}},[r("div",{staticClass:"title"},[t._v("调用方式")]),r("FormItem",{attrs:{label:"路由地址:",prop:"path"}},[r("span",[t._v(t._s(t.formValidate.path||""))])]),r("FormItem",{attrs:{label:"文件地址:",prop:"path"}},[r("span",[t._v(t._s(t.formValidate.file_path||""))])]),r("FormItem",{attrs:{label:"方法名:",prop:"path"}},[r("span",[t._v(t._s(t.formValidate.action||""))])]),r("FormItem",{attrs:{label:"请求参数:"}},[r("vxe-table",{ref:"xTable",attrs:{resizable:"","show-overflow":"","keep-source":"","row-id":"id","print-config":{},"export-config":{},loading:t.loading,"tree-config":{transform:!0,rowField:"id",parentField:"parentId"},data:t.formValidate.request}},[r("vxe-column",{attrs:{field:"attribute",width:"300",title:"属性","tree-node":"","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t.isEdit?r("vxe-input",{attrs:{type:"text"},model:{value:n.attribute,callback:function(e){t.$set(n,"attribute",e)},expression:"row.attribute"}}):r("span",[t._v(t._s(n.attribute||""))])]}}])}),r("vxe-column",{attrs:{field:"type",title:"类型",width:"200","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t.isEdit?r("vxe-select",{attrs:{transfer:""},model:{value:n.type,callback:function(e){t.$set(n,"type",e)},expression:"row.type"}},t._l(t.typeList,(function(t){return r("vxe-option",{key:t.value,attrs:{value:t.value,label:t.label}})})),1):r("span",[t._v(t._s(n.type||""))])]}}])}),r("vxe-column",{attrs:{field:"must",title:"必填",width:"100","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t.isEdit?r("vxe-checkbox",{attrs:{"unchecked-value":"0","checked-value":"1"},model:{value:n.must,callback:function(e){t.$set(n,"must",e)},expression:"row.must"}}):r("span",[t._v(t._s("1"==n.must?"是":"否"))])]}}])}),r("vxe-column",{attrs:{field:"trip",title:"说明","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t.isEdit?r("vxe-input",{attrs:{type:"text"},model:{value:n.trip,callback:function(e){t.$set(n,"trip",e)},expression:"row.trip"}}):r("span",[t._v(t._s(n.trip||""))])]}}])}),t.isEdit?r("vxe-column",{attrs:{title:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return["array"===n.type||"object"===n.type?r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.insertRow(n,"xTable")}}},[t._v("插入")]):t._e(),r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.removeRow(n,"xTable")}}},[t._v("删除")])]}}],null,!1,3713135811)}):t._e()],1),t.isEdit?r("Button",{staticClass:"mt10",attrs:{type:"primary"},on:{click:function(e){return t.insertEvent("xTable")}}},[t._v("添加参数")]):t._e()],1),r("FormItem",{attrs:{label:"返回参数:"}},[r("vxe-table",{ref:"resTable",attrs:{resizable:"","show-overflow":"","keep-source":"","row-id":"id","print-config":{},"export-config":{},loading:t.loading,"tree-config":{transform:!0,rowField:"id",parentField:"parentId"},data:t.formValidate.response}},[r("vxe-column",{attrs:{field:"attribute",title:"属性",width:"300","tree-node":"","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t.isEdit?r("vxe-input",{attrs:{type:"text"},model:{value:n.attribute,callback:function(e){t.$set(n,"attribute",e)},expression:"row.attribute"}}):r("span",[t._v(t._s(n.attribute||""))])]}}])}),r("vxe-column",{attrs:{field:"type",title:"类型",width:"200","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t.isEdit?r("vxe-select",{attrs:{transfer:""},model:{value:n.type,callback:function(e){t.$set(n,"type",e)},expression:"row.type"}},t._l(t.typeList,(function(t){return r("vxe-option",{key:t.value,attrs:{value:t.value,label:t.label}})})),1):r("span",[t._v(t._s(n.type||""))])]}}])}),r("vxe-column",{attrs:{field:"trip",title:"说明","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t.isEdit?r("vxe-input",{attrs:{type:"text"},model:{value:n.trip,callback:function(e){t.$set(n,"trip",e)},expression:"row.trip"}}):r("span",[t._v(t._s(n.trip||""))])]}}])}),t.isEdit?r("vxe-column",{attrs:{title:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return["array"===n.type||"object"===n.type?r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.insertRow(n,"resTable")}}},[t._v("插入")]):t._e(),r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.removeRow(n,"resTable")}}},[t._v("删除")])]}}],null,!1,4059582339)}):t._e()],1),t.isEdit?r("Button",{staticClass:"mt10",attrs:{type:"primary"},on:{click:function(e){return t.insertEvent("resTable")}}},[t._v("添加参数")]):t._e()],1)],1)],1),r("Row",{attrs:{gutter:24,type:"flex"}},[r("Col",{attrs:{span:"24"}},[r("div",{staticClass:"title"},[t._v("调用示例")]),r("FormItem",{attrs:{label:"请求数据示例:",prop:"request_example"}},[t.isEdit?r("Input",{staticClass:"perW20",attrs:{type:"textarea",rows:4,placeholder:"请输入"},model:{value:t.formValidate.request_example,callback:function(e){t.$set(t.formValidate,"request_example","string"==typeof e?e.trim():e)},expression:"formValidate.request_example"}}):r("span",{staticClass:"text-area"},[t._v(t._s(t.formValidate.request_example||""))])],1),r("FormItem",{attrs:{label:"返回数据示例:",prop:"response_example"}},[t.isEdit?r("Input",{staticClass:"perW20",attrs:{type:"textarea",rows:4,placeholder:"请输入"},model:{value:t.formValidate.response_example,callback:function(e){t.$set(t.formValidate,"response_example","string"==typeof e?e.trim():e)},expression:"formValidate.response_example"}}):r("span",{staticClass:"text-area"},[t._v(t._s(t.formValidate.response_example||""))])],1),r("FormItem",{attrs:{label:"错误码:"}},[r("vxe-table",{ref:"codeTable",attrs:{resizable:"","show-overflow":"","keep-source":"","row-id":"id","is-tree-view":"","print-config":{},"export-config":{},loading:t.loading,"tree-config":{rowField:"id",parentField:"parentId"},data:t.formValidate.error_code}},[r("vxe-column",{attrs:{field:"code",title:"错误码","tree-node":"","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t.isEdit?r("vxe-input",{attrs:{type:"text"},model:{value:n.code,callback:function(e){t.$set(n,"code",e)},expression:"row.code"}}):r("span",[t._v(t._s(n.code||""))])]}}])}),r("vxe-column",{attrs:{field:"value",title:"错误码取值","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t.isEdit?r("vxe-input",{attrs:{type:"text"},model:{value:n.value,callback:function(e){t.$set(n,"value",e)},expression:"row.value"}}):r("span",[t._v(t._s(n.value||""))])]}}])}),r("vxe-column",{attrs:{field:"solution",title:"解决方案","edit-render":{}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t.isEdit?r("vxe-input",{attrs:{type:"text"},model:{value:n.solution,callback:function(e){t.$set(n,"solution",e)},expression:"row.solution"}}):r("span",[t._v(t._s(n.solution||""))])]}}])}),t.isEdit?r("vxe-column",{attrs:{title:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("vxe-button",{attrs:{type:"text",status:"primary"},on:{click:function(e){return t.removeRow(n,"codeTable")}}},[t._v("删除")])]}}],null,!1,3586511496)}):t._e()],1),t.isEdit?r("Button",{staticClass:"mt10",attrs:{type:"primary"},on:{click:function(e){return t.insertEvent("codeTable")}}},[t._v("添加参数")]):t._e()],1)],1)],1)],1)],1)])],1)]),r("Modal",{attrs:{title:"分组名称",loading:t.loading},on:{"on-ok":t.asyncOK},model:{value:t.nameModal,callback:function(e){t.nameModal=e},expression:"nameModal"}},[r("label",[t._v("分组名称:")]),r("Input",{staticStyle:{width:"85%"},attrs:{placeholder:"请输入分组名称"},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1),r("Drawer",{attrs:{title:t.formValidate.name,width:"70%","footer-hide":"",loading:t.loading},model:{value:t.debuggingModal,callback:function(e){t.debuggingModal=e},expression:"debuggingModal"}},[t.debuggingModal?r("debugging",{attrs:{formValidate:t.formValidate,typeList:t.intTypeList,requestTypeList:t.requestTypeList,apiType:t.apiType}}):t._e()],1)],1)}),[],!1,null,"0989f326",null),e.default=i.exports},b6e36:function(t,e,r){"use strict";var n=r("6c04");r.n(n).a},e4e4:function(t,e,r){}}]);