Commit 156ce083 by 无尘

fix:修改接口

parent c8c04466
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>API网关管理平台</title><link href=./static/css/app.684ab058d7eaf126a1016f79e584c1a4.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 src=//web-1251519181.file.myqcloud.com/components/input.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.01.js></script><script type=text/javascript src=./static/js/manifest.75f6ac4f63ae25af792d.js></script><script type=text/javascript src=./static/js/vendor.71dc162eb690bf6a36a0.js></script><script type=text/javascript src=./static/js/app.60fa4926a5de78cca8e6.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.c32d57e3f01ce640774c1ac337b2e52d.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 src=//web-1251519181.file.myqcloud.com/components/input.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.01.js></script><script type=text/javascript src=./static/js/manifest.3f218dcb2d8a2340be59.js></script><script type=text/javascript src=./static/js/vendor.71dc162eb690bf6a36a0.js></script><script type=text/javascript src=./static/js/app.60fa4926a5de78cca8e6.js></script></body></html>
\ No newline at end of file \ No newline at end of file
webpackJsonp([4],{"3yRM":function(e,t){},"6yE4":function(e,t){},"7Jbw":function(e,t){},"ASE+":function(e,t){},SldL:function(e,t){!function(t){"use strict";var r,a=Object.prototype,n=a.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag",c="object"==typeof e,u=t.regeneratorRuntime;if(u)c&&(e.exports=u);else{(u=t.regeneratorRuntime=c?e.exports:{}).wrap=w;var d="suspendedStart",h="suspendedYield",g="executing",f="completed",p={},m={};m[o]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==a&&n.call(y,o)&&(m=y);var b=I.prototype=L.prototype=Object.create(m);S.prototype=b.constructor=I,I.constructor=S,I[l]=S.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,I):(e.__proto__=I,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(b),e},u.awrap=function(e){return{__await:e}},C(x.prototype),x.prototype[s]=function(){return this},u.AsyncIterator=x,u.async=function(e,t,r,a){var n=new x(w(e,t,r,a));return u.isGeneratorFunction(t)?n:n.next().then(function(e){return e.done?e.value:n.next()})},C(b),b[l]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var a=t.pop();if(a in e)return r.value=a,r.done=!1,r}return r.done=!0,r}},u.values=P,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,n){return s.type="throw",s.arg=e,t.next=a,n&&(t.method="next",t.arg=r),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;j(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:P(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=r),p}}}function w(e,t,r,a){var n=t&&t.prototype instanceof L?t:L,i=Object.create(n.prototype),o=new $(a||[]);return i._invoke=function(e,t,r){var a=d;return function(n,i){if(a===g)throw new Error("Generator is already running");if(a===f){if("throw"===n)throw i;return E()}for(r.method=n,r.arg=i;;){var o=r.delegate;if(o){var s=k(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=g;var l=_(e,t,r);if("normal"===l.type){if(a=r.done?f:h,l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=f,r.method="throw",r.arg=l.arg)}}}(e,r,o),i}function _(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function L(){}function S(){}function I(){}function C(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function x(e){var t;this._invoke=function(r,a){function i(){return new Promise(function(t,i){!function t(r,a,i,o){var s=_(e[r],e,a);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&n.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,i,o)},function(e){t("throw",e,i,o)}):Promise.resolve(c).then(function(e){l.value=e,i(l)},o)}o(s.arg)}(r,a,t,i)})}return t=t?t.then(i,i):i()}}function k(e,t){var a=e.iterator[t.method];if(a===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,k(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=_(a,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function t(){for(;++a<e.length;)if(n.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}return{next:E}}function E(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},UOoF:function(e,t){},X1wM:function(e,t){},Xxa5:function(e,t,r){e.exports=r("jyFz")},dAfO:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("bOdI"),n=r.n(a),i=r("Xxa5"),o=r.n(i),s=r("exGp"),l=r.n(s),c=r("319J"),u=r("P9l9"),d=r("jvWE"),h=r("PEkr"),g={props:{tableData:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{cancelBind:function(e){var t=this,r=this,a={id:e.openPlatformInterfaceId};Object(u.a)("/gateway-manage/platform/white/unbind",a).then(function(e){"0000"==e.data.code?t.$emit("getList"):t.$message.error(e.data.message)}).catch(function(e){r.$message.error({duration:1e3,message:e.message})})}},components:{}},f={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"20px"}},[r("div",{staticClass:"table-content"},[r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark",height:e.tableHeight}},[r("el-table-column",{attrs:{label:"项目名称",prop:"projectName"}}),e._v(" "),r("el-table-column",{attrs:{label:"分组",prop:"groupName"}}),e._v(" "),r("el-table-column",{attrs:{label:"接口名称",prop:"interfaceName"}}),e._v(" "),r("el-table-column",{attrs:{label:"绑定时间",prop:"bindTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.bindTime)))]),e._v(" "),r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.bindTime)))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("dm-delete",{attrs:{tips:"确定要解除绑定吗?"},on:{confirm:function(r){e.cancelBind(t.row)}}},[r("el-button",{attrs:{type:"text"}},[e._v("解除绑定")])],1)]}}])})],1)],1)])},staticRenderFns:[]};var p=r("VU/8")(g,f,!1,function(e){r("xU1Q")},"data-v-f1de626e",null).exports,m={props:{tableData:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{cancelBind:function(e){var t=this,r=this,a={id:e.openPlatformInterfaceId};Object(u.a)("/gateway-manage/platform/capacity/unbind",a).then(function(e){"0000"==e.data.code?t.$emit("getList"):t.$message.error(e.data.message)}).catch(function(e){r.$message.error({duration:1e3,message:e.message})})}},components:{}},v={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"20px"}},[r("div",{staticClass:"table-content"},[r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark",height:e.tableHeight}},[r("el-table-column",{attrs:{label:"项目名称",prop:"projectName"}}),e._v(" "),r("el-table-column",{attrs:{label:"分组",prop:"groupName"}}),e._v(" "),r("el-table-column",{attrs:{label:"接口名称",prop:"interfaceName"}}),e._v(" "),r("el-table-column",{attrs:{label:"绑定时间",prop:"bindTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.bindTime)))]),e._v(" "),r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.bindTime)))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("dm-delete",{attrs:{tips:"确定要接触绑定吗?"},on:{confirm:function(r){e.cancelBind(t.row)}}},[r("el-button",{attrs:{type:"text"}},[e._v("解除绑定")])],1)]}}])})],1)],1)])},staticRenderFns:[]};var y=r("VU/8")(m,v,!1,function(e){r("7Jbw")},"data-v-2c6d01f2",null).exports,b={props:{errorSettingId:{type:String,default:function(){return""}},errorCode:{type:String,default:function(){return""}},errorInfo:{type:String,default:function(){return""}}},data:function(){return{dialogVisible:!0,errorForm:{errorCode:"",errorInfo:""},modalRules:{errorCode:[{required:!0,message:"请输入错误码",trigger:"blur"}],errorInfo:[{required:!0,message:"请输入错误信息",trigger:"blur"}]}}},created:function(){this.dialogVisible=!0,this.errorForm.errorCode=this.errorCode,this.errorForm.errorInfo=this.errorInfo},methods:{submitForm:function(e){var t=this,r=this;this.$refs[e].validate(function(e){if(!e)return!1;var a="",n={errorCode:t.errorForm.errorCode,errorInfo:t.errorForm.errorInfo,errorType:2};t.errorSettingId?(n.errorSettingId=t.errorSettingId,a="/gateway-manage/update-error-setting"):a="/gateway-manage/create-error-setting",Object(u.b)(a,n).then(function(e){"0000"==e.data.code?(t.$emit("getList"),t.dialogVisible=!1,t.$emit("cancelNewCoce")):t.$message.error(e.data.message)}).catch(function(e){r.$message.error({duration:1e3,message:e.message})})})},cancelForm:function(e){this.$refs[e].resetFields(),this.$emit("cancelNewCoce")}}},w={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-dialog",{attrs:{title:e.errorSettingId?"编辑错误码":"新建错误码",visible:e.dialogVisible,width:"500px"},on:{"update:visible":function(t){e.dialogVisible=t},close:function(t){e.cancelForm("errorForm")}}},[r("el-form",{ref:"errorForm",staticStyle:{width:"450px"},attrs:{model:e.errorForm,rules:e.modalRules}},[r("el-form-item",{attrs:{label:"错误码","label-width":"90px",prop:"errorCode"}},[r("dm-input",{attrs:{byteType:1,type:"text",maxlength:20},model:{value:e.errorForm.errorCode,callback:function(t){e.$set(e.errorForm,"errorCode",t)},expression:"errorForm.errorCode"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"错误信息","label-width":"90px",prop:"errorInfo"}},[r("dm-input",{attrs:{byteType:1,type:"text",maxlength:20},model:{value:e.errorForm.errorInfo,callback:function(t){e.$set(e.errorForm,"errorInfo",t)},expression:"errorForm.errorInfo"}})],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.cancelForm("errorForm")}}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.submitForm("errorForm")}}},[e._v(e._s(e.errorSettingId?"保存":"新建"))])],1)],1)},staticRenderFns:[]};var _=r("VU/8")(b,w,!1,function(e){r("ASE+")},"data-v-1f51806f",null).exports,L={props:{tableData:{type:Array,default:function(){return[]}}},data:function(){return{showNewCode:!1,errorSettingId:"",errorInfo:"",errorCode:""}},methods:{getList:function(){this.$emit("getList")},edit:function(e){this.showNewCode=!0,this.errorSettingId=e.errorSettingId,this.errorCode=e.errorCode,this.errorInfo=e.errorInfo},cancelNewCoce:function(){this.showNewCode=!1},deleteList:function(e){var t=this,r={errorSettingId:e.errorSettingId};Object(u.b)("/gateway-manage/delete-error-setting",r).then(function(e){"0000"==e.data.code?t.$emit("getList"):t.$message.error(e.data.message)})}},components:{newErrorCode:_}},S={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"20px"}},[r("div",{staticClass:"table-content"},[r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark",height:e.tableHeight}},[r("el-table-column",{attrs:{label:"错误码",prop:"errorCode"}}),e._v(" "),r("el-table-column",{attrs:{label:"错误信息",prop:"errorInfo"}}),e._v(" "),r("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text"},on:{click:function(r){e.edit(t.row)}}},[e._v("编辑")]),e._v(" "),r("dm-delete",{attrs:{tips:"确定要删除吗?"},on:{confirm:function(r){e.deleteList(t.row)}}},[r("el-button",{attrs:{type:"text"}},[e._v("删除")])],1)]}}])})],1)],1),e._v(" "),e.showNewCode?r("newErrorCode",{attrs:{errorSettingId:e.errorSettingId,errorCode:e.errorCode,errorInfo:e.errorInfo},on:{getList:e.getList,cancelNewCoce:e.cancelNewCoce}}):e._e()],1)},staticRenderFns:[]};var I=r("VU/8")(L,S,!1,function(e){r("oPMN")},"data-v-78e39e8a",null).exports,C=r("BO1k"),x=r.n(C),k={props:{type:{type:String,default:function(){return 1}},sceneCode:{type:String,default:function(){return""}}},data:function(){return{dialogVisible:!0,checkedAll:!1,isIndeterminate:!1,rightList:[],leftSelectList:[],rightSelectList:[],props:{label:"name",children:"zones",isLeaf:"leaf"},loading:!1,projectList:[],refash:!1,btnLoading:!1}},created:function(){this.dialogVisible=!0},methods:{changeAllTree:function(e){e?(this.$refs.tree.setCheckedNodes(this.projectList),this.leftSelectList=this.$refs.tree.getCheckedNodes()):(this.$refs.tree.setCheckedKeys([]),this.leftSelectList=this.$refs.tree.getCheckedNodes())},handleCheckChange:function(e,t,r){this.leftSelectList=this.$refs.tree.getCheckedNodes();var a=0,n=!0,i=!1,o=void 0;try{for(var s,l=x()(this.leftSelectList);!(n=(s=l.next()).done);n=!0){var c=s.value;this.leftSelectList.every(function(e){return 0!==e.type})?a=1:0===c.type&&(a+=1)}}catch(e){i=!0,o=e}finally{try{!n&&l.return&&l.return()}finally{if(i)throw o}}this.isIndeterminate=a>0&&a<this.projectList.length,this.checkedAll=a===this.projectList.length},transferRight:function(){var e=this;this.rightList=this.leftSelectList.concat(this.rightList),this.rightList=this.rightList.filter(function(e,t,r){return r.indexOf(e)===t});for(var t=function(t){e.rightList.find(function(r){return r.id===e.rightList[t].parentId})&&e.rightList[t].leaf&&(e.rightList.splice(t,1),t=0),r=t},r=0;r<this.rightList.length;r++)t(r);this.$refs.tree.setCheckedKeys([]),this.leftSelectList=[],this.checkedAll=!1},transferLeft:function(){for(var e=0;e<this.rightSelectList.length;e++)for(var t=0;t<this.rightList.length;t++)this.rightSelectList[e].id===this.rightList[t].id&&(this.rightList.splice(t,1),t=0);this.rightSelectList=[]},loadNode:function(e,t){var r=this,a=this;if(0===e.level)return this.loading=!0,Object(u.a)("/gateway-manage/plugin/interface/tree",{}).then(function(e){if("0000"==e.data.code){r.loading=!1,e.data.result?r.projectList=e.data.result:r.projectList=[];var a=!0,n=!1,i=void 0;try{for(var o,s=x()(r.projectList);!(a=(o=s.next()).done);a=!0){var l=o.value;0===l.leafFlag?l.leaf=!1:l.leaf=!0,l.parentId=""}}catch(e){n=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(n)throw i}}return t(r.projectList)}r.$message.error(e.data.message)}).catch(function(e){a.$message.error({duration:1e3,message:e.message})}),t(this.projectList);if(e.level>2)return t([]);if(1===e.level||2===e.level){var n={type:e.level-1,id:e.data.id},i=[];Object(u.a)("/gateway-manage/plugin/interface/tree",n).then(function(t){if("0000"==t.data.code){i=t.data.result?t.data.result:[];var a=!0,n=!1,o=void 0;try{for(var s,l=x()(i);!(a=(s=l.next()).done);a=!0){var c=s.value;0===c.leafFlag?c.leaf=!1:c.leaf=!0,c.parentId=e.data.id}}catch(e){n=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(n)throw o}}}else r.$message.error(t.data.message)}).catch(function(e){a.$message.error({duration:1e3,message:e.message})}),setTimeout(function(){t(i)},2e3)}},handleSelectionChange:function(e){this.rightSelectList=e},submitForm:function(){var e=this,t=this;if(0===this.rightSelectList.length)return this.$message.error("请选择要绑定的API"),!1;var r=[],a=[],n=[],i=!0,o=!1,s=void 0;try{for(var l,c=x()(this.rightSelectList);!(i=(l=c.next()).done);i=!0){var d=l.value;0===d.type?r.push(d.id):1===d.type?a.push(d.id):2===d.type&&n.push(d.id)}}catch(e){o=!0,s=e}finally{try{!i&&c.return&&c.return()}finally{if(o)throw s}}var h={sceneCode:this.sceneCode};r.length&&(h.projectIds=r.join(",")),a.length&&(h.groupIds=a.join(",")),n.length&&(h.interfaceIds=n.join(","));var g="";"1"===this.type?g="/gateway-manage/platform/white/bind":"2"===this.type&&(g="/gateway-manage/platform/capacity/bind"),this.btnLoading=!0,Object(u.a)(g,h).then(function(t){"0000"==t.data.code?(e.dialogVisible=!1,e.$emit("getList"),e.btnLoading=!1):e.$message.error(t.data.message)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},closeDialog:function(){this.$emit("cancelBind")}}},N={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-dialog",{attrs:{title:"1"===e.type?"新建绑定白名单接口":"新建绑定能力接口",visible:e.dialogVisible,width:"600px"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.closeDialog}},[r("div",{staticClass:"dialog-body"},[r("div",{staticClass:"content"},[r("div",{staticClass:"left-content"},[r("div",{staticClass:"title"},[r("h3",[r("el-checkbox",{attrs:{indeterminate:e.isIndeterminate},on:{change:e.changeAllTree},model:{value:e.checkedAll,callback:function(t){e.checkedAll=t},expression:"checkedAll"}},[e._v("所有API")])],1)]),e._v(" "),r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"tree-content"},[r("el-tree",{ref:"tree",attrs:{props:e.props,load:e.loadNode,"node-key":"id",lazy:"","show-checkbox":""},on:{"check-change":e.handleCheckChange}})],1)]),e._v(" "),r("div",{staticClass:"left-center"},[r("el-button",{attrs:{type:"primary",disabled:e.leftSelectList.length<=0},on:{click:e.transferRight}},[e._v("转入"),r("i",{staticClass:"el-icon-arrow-right el-icon--right"})]),e._v(" "),r("el-button",{attrs:{type:"primary",disabled:e.rightSelectList.length<=0},on:{click:e.transferLeft}},[r("i",{staticClass:"el-icon-arrow-left el-icon--left"}),e._v("移除")])],1),e._v(" "),r("div",{staticClass:"right-content"},[r("div",{staticClass:"list-content table-transfer"},[[r("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:e.rightList,"tooltip-effect":"dark",height:"305"},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"50"}}),e._v(" "),r("el-table-column",{attrs:{label:"已选API",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.name))]}}])})],1)]],2)])])]),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.closeDialog}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{type:"primary",loading:e.btnLoading},on:{click:e.submitForm}},[e._v("确定")])],1)])},staticRenderFns:[]};var j=r("VU/8")(k,N,!1,function(e){r("6yE4"),r("UOoF")},"data-v-38497e12",null).exports,$={props:{tableData:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{},components:{}},P={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"20px"}},[r("div",{staticClass:"table-content"},[r("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark",height:e.tableHeight}},[r("el-table-column",{attrs:{label:"traceid",prop:"projectName"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.traceId||"--")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"应用",prop:"groupName"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.name||"--")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"请求时间",prop:"bindTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.requestTime)))]),e._v(" "),r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.requestTime)))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"商户",prop:"interfaceName"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.enterpriseName||"--")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"接口",prop:"interfaceName"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v(e._s(t.row.projectName||"--")+"-"+e._s(t.row.groupName||"--"))]),e._v(" "),r("div",[e._v(e._s(t.row.interfaceName||"--"))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"请求内容",prop:"interfaceName","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.requestParams||"--")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"返回内容",prop:"interfaceName","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.responseParams||"--")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"备注"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.remarks||"--")+"\n ")]}}])})],1)],1)])},staticRenderFns:[]};var E=r("VU/8")($,P,!1,function(e){r("3yRM")},"data-v-6c542f1c",null).exports,F={name:"envManage",components:{navBread:c.a,selectEnv:h.a,whiteList:p,capacityList:y,errorCodeList:I,bindTranser:j,newErrorCode:_,logList:E},data:function(){return{navPath:[{name:"插件管理",path:"/pluginManage"},{name:"开放平台",path:""}],activeName:"first",search:"",showdialog:!1,pluginId:"",sceneCode:"",pluginType:1,projectList:[],projectId:"",groupList:[],groupId:"",tableData:[],total:0,currentPage:1,pageSize:20,pageSizes:[20,40,60,80],showNewCode:!1,errorSettingId:"",showBinddialog:!1,type:"",loading:!1,logSearch:{requestDate:[],enterpriseId:"",searchValue:"",requestProjectId:"",requestGroupId:"",interfaceId:""},brandList:[],apiData:[],pickerOptions:{disabledDate:function(e){return e.getTime()>Date.now()-864e4}}}},methods:{changeDate:function(){this.currentPage=1,this.getList()},changeBrand:function(){this.currentPage=1,this.getList()},changeApi:function(){this.currentPage=1,this.getList()},changePro:function(){var e=this;return l()(o.a.mark(function t(){var r;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e,t.next=3,r.getGroupList();case 3:r.currentPage=1,r.getList();case 5:case"end":return t.stop()}},t,e)}))()},changeGroup:function(){this.getApiList()},searchEnterFun:Object(d.a)(function(){this.currentPage=1,this.getList()},200),clearSearch:function(){this.currentPage=1,this.getList()},handleClick:function(e,t){this.search="",this.projectId="",this.groupId="",this.logSearch={requestDate:[],enterpriseId:"",searchValue:"",requestProjectId:"",requestGroupId:"",interfaceId:""},this.getList()},goEnvList:function(){this.showdialog=!0,this.pluginId=this.pluginId},closeDialog:function(){this.showdialog=!1},getChange:function(){this.groupId="",this.getGroupList(),this.getList()},getSearchList:function(){"first"!==this.activeName&&"second"!==this.activeName||(this.currentPage=1,this.getGroupList(),this.getList())},handleSizeChange:function(e){this.pageSize=e,this.getList()},handleCurrentChange:function(e){this.currentPage=e,this.getList()},getList:function(){var e=this,t="",r={};"first"===e.activeName?(t="/gateway-manage/platform/white/list",r={projectId:e.projectId?e.projectId:null,groupId:e.groupId?e.groupId:null,search:e.search?e.search:null,sceneCode:e.sceneCode,currentPage:e.currentPage,pageSize:e.pageSize}):"second"===e.activeName?(t="/gateway-manage/platform/capacity/list",r={projectId:e.projectId?e.projectId:null,groupId:e.groupId?e.groupId:null,search:e.search?e.search:null,sceneCode:e.sceneCode,currentPage:e.currentPage,pageSize:e.pageSize}):"third"===e.activeName?(t="/gateway-manage/page-error-setting",r={errorType:2,pageNum:e.currentPage,pageSize:e.pageSize}):(t="/gateway-manage/page-log",e.logSearch.requestDate||(e.logSearch.requestDate=[]),r={startTime:e.logSearch.requestDate[0],endTime:e.logSearch.requestDate[1],enterpriseId:e.logSearch.enterpriseId,interfaceId:e.logSearch.interfaceId,paramSearch:e.logSearch.searchValue,sceneCode:e.sceneCode,pageNum:e.currentPage,pageSize:e.pageSize}),"first"===e.activeName||"second"===e.activeName?(e.loading=!0,Object(u.a)(t,r).then(function(t){"0000"==t.data.code?(e.loading=!1,t.data.result.result?(e.tableData=t.data.result.result,e.total=t.data.result.totalCount):(e.tableData=[],e.total=0)):(e.loading=!1,e.$message.error(t.data.message))}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})):(e.loading=!0,Object(u.b)(t,r).then(function(t){"0000"==t.data.code?(t.data.result.result?(e.tableData=t.data.result.result,e.total=t.data.result.totalCount):(e.tableData=[],e.total=0),e.loading=!1):(e.loading=!1,e.$message.error(t.data.message))}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})}))},getProjectList:function(){var e=this;Object(u.a)("/gateway-manage/plugin/interface/tree",{}).then(function(t){"0000"==t.data.code?t.data.result?e.projectList=t.data.result:e.projectList=[]:e.$message.error(t.data.message)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getGroupList:function(){var e=this,t={type:0,id:e.logSearch.requestProjectId||e.projectId};Object(u.a)("/gateway-manage/plugin/interface/tree",t).then(function(t){"0000"==t.data.code?t.data.result?e.groupList=t.data.result:e.groupList=[]:e.$message.error(t.data.message)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getApiList:function(){var e=this,t={projectId:e.logSearch.requestProjectId,interfaceGroupId:e.logSearch.requestGroupId,target:"-1",pageSize:500,pageNum:1};Object(u.a)("/gateway-manage/page-api",t).then(function(t){var r=t.data;"0000"!=r.code?errMsg.errorMsg(r):e.apiData=r.result.result}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},addCode:function(){this.showNewCode=!0,this.errorSettingId=""},cancelNewCoce:function(){this.showNewCode=!1},addBind:function(e){this.showBinddialog=!0,this.type=e},cancelBind:function(){this.showBinddialog=!1}},watch:n()({$route:{handler:function(e,t){},deep:!0}},"$route",function(e,t){this.pluginId=this.$route.query.pluginId,this.sceneCode=this.$route.query.sceneCode,this.getProjectList(),this.getList()}),created:function(){this.pluginId=this.$route.query.pluginId,this.sceneCode=this.$route.query.sceneCode,this.getProjectList(),this.getList()}},D={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"api-body-content border-box"},[r("div",{staticClass:"common-nav"},[r("nav-bread",{attrs:{navPath:e.navPath}}),e._v(" "),r("div",{staticClass:"change-env",on:{click:e.goEnvList}},[r("span",[e._v("切换环境")]),r("i",{staticClass:"iconfont iconicon-qihuan",on:{click:function(t){e.goEnvList(e.item)}}})])],1),e._v(" "),r("div",{staticClass:"api-body-main common-body-main border-box"},[r("div",{staticClass:"api-main-content border-box"},[r("div",{staticClass:"env-tab-wrap"},[r("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[r("div",{staticClass:"search-box"},[r("div",{staticClass:"left"},["second"===e.activeName||"first"===e.activeName?r("div",[r("el-input",{staticClass:"w-320",attrs:{placeholder:"请输入接口名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:function(t){e.getSearchList()}},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.getSearchList()}},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),e._v(" "),r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择项目",size:"small",clearable:""},on:{change:function(t){e.getChange()}},model:{value:e.projectId,callback:function(t){e.projectId=t},expression:"projectId"}},e._l(e.projectList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),e._v(" "),r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择分组",size:"small",clearable:"",disabled:""===e.projectId},on:{change:function(t){e.getSearchList()}},model:{value:e.groupId,callback:function(t){e.groupId=t},expression:"groupId"}},e._l(e.groupList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1):e._e()]),e._v(" "),r("div",["third"===e.activeName?r("el-button",{attrs:{type:"primary"},on:{click:e.addCode}},[e._v("新建错误码")]):e._e(),e._v(" "),"first"===e.activeName?r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.addBind("1")}}},[e._v("新建绑定")]):e._e(),e._v(" "),"second"===e.activeName?r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.addBind("2")}}},[e._v("新建绑定")]):e._e()],1)]),e._v(" "),r("el-tab-pane",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{label:"白名单接口",name:"first"}},["first"===e.activeName?r("whiteList",{attrs:{tableData:e.tableData},on:{getList:e.getList}}):e._e()],1),e._v(" "),r("el-tab-pane",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{label:"能力接口",name:"second"}},["second"===e.activeName?r("capacityList",{attrs:{tableData:e.tableData},on:{getList:e.getList}}):e._e()],1),e._v(" "),r("el-tab-pane",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{label:"错误码配置",name:"third"}},["third"===e.activeName?r("errorCodeList",{attrs:{tableData:e.tableData},on:{getList:e.getList}}):e._e()],1),e._v(" "),r("el-tab-pane",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{label:"日志",name:"four"}},[r("div",{staticClass:"log-search flex"},[r("el-date-picker",{staticStyle:{width:"280px"},attrs:{"picker-options":e.pickerOptions,type:"daterange",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd","start-placeholder":"开始日期","end-placeholder":"结束日期",editable:!1},on:{change:e.changeDate},model:{value:e.logSearch.requestDate,callback:function(t){e.$set(e.logSearch,"requestDate",t)},expression:"logSearch.requestDate"}}),r("el-input",{staticClass:"w-280 marginLeft10",attrs:{placeholder:"请输入traceid/请求内容/返回内容","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearSearch},nativeOn:{keyup:function(t){return r=t,e.searchEnterFun(r,e.searchValue);var r}},model:{value:e.logSearch.searchValue,callback:function(t){e.$set(e.logSearch,"searchValue",t)},expression:"logSearch.searchValue"}}),r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择商户",size:"small",clearable:""},on:{change:e.changeBrand},model:{value:e.logSearch.enterpriseId,callback:function(t){e.$set(e.logSearch,"enterpriseId",t)},expression:"logSearch.enterpriseId"}},e._l(e.brandList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择项目",size:"small",clearable:""},on:{change:e.changePro},model:{value:e.logSearch.requestProjectId,callback:function(t){e.$set(e.logSearch,"requestProjectId",t)},expression:"logSearch.requestProjectId"}},e._l(e.projectList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),e.logSearch.requestProjectId?r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择分组",size:"small",clearable:""},on:{change:e.changeGroup},model:{value:e.logSearch.requestGroupId,callback:function(t){e.$set(e.logSearch,"requestGroupId",t)},expression:"logSearch.requestGroupId"}},e._l(e.groupList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})):e._e(),e.logSearch.requestGroupId?r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择API",size:"small",clearable:""},on:{change:e.changeApi},model:{value:e.logSearch.interfaceId,callback:function(t){e.$set(e.logSearch,"interfaceId",t)},expression:"logSearch.interfaceId"}},e._l(e.apiData,function(e){return r("el-option",{key:e.interfaceId,attrs:{label:e.interfaceName,value:e.interfaceId}})})):e._e()],1),e._v(" "),r("log-list",{attrs:{tableData:e.tableData},on:{getList:e.getList}})],1)],1),e._v(" "),0!==e.total?r("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[r("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":e.pageSizes,"page-size":e.pageSize,layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])]),e._v(" "),e.showdialog?r("selectEnv",{attrs:{pluginId:e.pluginId,pluginType:e.pluginType},on:{closeDialog:e.closeDialog}}):e._e(),e._v(" "),e.showBinddialog?r("bindTranser",{attrs:{type:e.type,sceneCode:e.sceneCode},on:{cancelBind:e.cancelBind,getList:e.getList}}):e._e(),e._v(" "),e.showNewCode?r("newErrorCode",{attrs:{errorSettingId:e.errorSettingId},on:{getList:e.getList,cancelNewCoce:e.cancelNewCoce}}):e._e()],1)},staticRenderFns:[]};var O=r("VU/8")(F,D,!1,function(e){r("X1wM")},"data-v-2b88497a",null);t.default=O.exports},exGp:function(e,t,r){"use strict";t.__esModule=!0;var a,n=r("//Fk"),i=(a=n)&&a.__esModule?a:{default:a};t.default=function(e){return function(){var t=e.apply(this,arguments);return new i.default(function(e,r){return function a(n,o){try{var s=t[n](o),l=s.value}catch(e){return void r(e)}if(!s.done)return i.default.resolve(l).then(function(e){a("next",e)},function(e){a("throw",e)});e(l)}("next")})}}},jyFz:function(e,t,r){var a=function(){return this}()||Function("return this")(),n=a.regeneratorRuntime&&Object.getOwnPropertyNames(a).indexOf("regeneratorRuntime")>=0,i=n&&a.regeneratorRuntime;if(a.regeneratorRuntime=void 0,e.exports=r("SldL"),n)a.regeneratorRuntime=i;else try{delete a.regeneratorRuntime}catch(e){a.regeneratorRuntime=void 0}},oPMN:function(e,t){},xU1Q:function(e,t){}});
\ No newline at end of file
webpackJsonp([4],{"3yRM":function(e,t){},"6yE4":function(e,t){},"7Jbw":function(e,t){},"ASE+":function(e,t){},SldL:function(e,t){!function(t){"use strict";var r,a=Object.prototype,n=a.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag",c="object"==typeof e,u=t.regeneratorRuntime;if(u)c&&(e.exports=u);else{(u=t.regeneratorRuntime=c?e.exports:{}).wrap=_;var d="suspendedStart",h="suspendedYield",g="executing",f="completed",p={},m={};m[o]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==a&&n.call(y,o)&&(m=y);var b=I.prototype=L.prototype=Object.create(m);S.prototype=b.constructor=I,I.constructor=S,I[l]=S.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,I):(e.__proto__=I,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(b),e},u.awrap=function(e){return{__await:e}},C(x.prototype),x.prototype[s]=function(){return this},u.AsyncIterator=x,u.async=function(e,t,r,a){var n=new x(_(e,t,r,a));return u.isGeneratorFunction(t)?n:n.next().then(function(e){return e.done?e.value:n.next()})},C(b),b[l]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var a=t.pop();if(a in e)return r.value=a,r.done=!1,r}return r.done=!0,r}},u.values=P,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,n){return s.type="throw",s.arg=e,t.next=a,n&&(t.method="next",t.arg=r),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;j(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:P(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=r),p}}}function _(e,t,r,a){var n=t&&t.prototype instanceof L?t:L,i=Object.create(n.prototype),o=new $(a||[]);return i._invoke=function(e,t,r){var a=d;return function(n,i){if(a===g)throw new Error("Generator is already running");if(a===f){if("throw"===n)throw i;return E()}for(r.method=n,r.arg=i;;){var o=r.delegate;if(o){var s=k(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=g;var l=w(e,t,r);if("normal"===l.type){if(a=r.done?f:h,l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=f,r.method="throw",r.arg=l.arg)}}}(e,r,o),i}function w(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function L(){}function S(){}function I(){}function C(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function x(e){var t;this._invoke=function(r,a){function i(){return new Promise(function(t,i){!function t(r,a,i,o){var s=w(e[r],e,a);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&n.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,i,o)},function(e){t("throw",e,i,o)}):Promise.resolve(c).then(function(e){l.value=e,i(l)},o)}o(s.arg)}(r,a,t,i)})}return t=t?t.then(i,i):i()}}function k(e,t){var a=e.iterator[t.method];if(a===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,k(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=w(a,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function t(){for(;++a<e.length;)if(n.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}return{next:E}}function E(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},UOoF:function(e,t){},Xxa5:function(e,t,r){e.exports=r("jyFz")},dAfO:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("bOdI"),n=r.n(a),i=r("Xxa5"),o=r.n(i),s=r("exGp"),l=r.n(s),c=r("319J"),u=r("P9l9"),d=r("jvWE"),h=r("PEkr"),g={props:{tableData:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{cancelBind:function(e){var t=this,r=this,a={id:e.openPlatformInterfaceId};Object(u.a)("/gateway-manage/platform/white/unbind",a).then(function(e){"0000"==e.data.code?t.$emit("getList"):t.$message.error(e.data.message)}).catch(function(e){r.$message.error({duration:1e3,message:e.message})})}},components:{}},f={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"20px"}},[r("div",{staticClass:"table-content"},[r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark",height:e.tableHeight}},[r("el-table-column",{attrs:{label:"项目名称",prop:"projectName"}}),e._v(" "),r("el-table-column",{attrs:{label:"分组",prop:"groupName"}}),e._v(" "),r("el-table-column",{attrs:{label:"接口名称",prop:"interfaceName"}}),e._v(" "),r("el-table-column",{attrs:{label:"绑定时间",prop:"bindTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.bindTime)))]),e._v(" "),r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.bindTime)))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("dm-delete",{attrs:{tips:"确定要解除绑定吗?"},on:{confirm:function(r){e.cancelBind(t.row)}}},[r("el-button",{attrs:{type:"text"}},[e._v("解除绑定")])],1)]}}])})],1)],1)])},staticRenderFns:[]};var p=r("VU/8")(g,f,!1,function(e){r("xU1Q")},"data-v-f1de626e",null).exports,m={props:{tableData:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{cancelBind:function(e){var t=this,r=this,a={id:e.openPlatformInterfaceId};Object(u.a)("/gateway-manage/platform/capacity/unbind",a).then(function(e){"0000"==e.data.code?t.$emit("getList"):t.$message.error(e.data.message)}).catch(function(e){r.$message.error({duration:1e3,message:e.message})})}},components:{}},v={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"20px"}},[r("div",{staticClass:"table-content"},[r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark",height:e.tableHeight}},[r("el-table-column",{attrs:{label:"项目名称",prop:"projectName"}}),e._v(" "),r("el-table-column",{attrs:{label:"分组",prop:"groupName"}}),e._v(" "),r("el-table-column",{attrs:{label:"接口名称",prop:"interfaceName"}}),e._v(" "),r("el-table-column",{attrs:{label:"绑定时间",prop:"bindTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.bindTime)))]),e._v(" "),r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.bindTime)))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("dm-delete",{attrs:{tips:"确定要接触绑定吗?"},on:{confirm:function(r){e.cancelBind(t.row)}}},[r("el-button",{attrs:{type:"text"}},[e._v("解除绑定")])],1)]}}])})],1)],1)])},staticRenderFns:[]};var y=r("VU/8")(m,v,!1,function(e){r("7Jbw")},"data-v-2c6d01f2",null).exports,b={props:{errorSettingId:{type:String,default:function(){return""}},errorCode:{type:String,default:function(){return""}},errorInfo:{type:String,default:function(){return""}}},data:function(){return{dialogVisible:!0,errorForm:{errorCode:"",errorInfo:""},modalRules:{errorCode:[{required:!0,message:"请输入错误码",trigger:"blur"}],errorInfo:[{required:!0,message:"请输入错误信息",trigger:"blur"}]}}},created:function(){this.dialogVisible=!0,this.errorForm.errorCode=this.errorCode,this.errorForm.errorInfo=this.errorInfo},methods:{submitForm:function(e){var t=this,r=this;this.$refs[e].validate(function(e){if(!e)return!1;var a="",n={errorCode:t.errorForm.errorCode,errorInfo:t.errorForm.errorInfo,errorType:2};t.errorSettingId?(n.errorSettingId=t.errorSettingId,a="/gateway-manage/update-error-setting"):a="/gateway-manage/create-error-setting",Object(u.b)(a,n).then(function(e){"0000"==e.data.code?(t.$emit("getList"),t.dialogVisible=!1,t.$emit("cancelNewCoce")):t.$message.error(e.data.message)}).catch(function(e){r.$message.error({duration:1e3,message:e.message})})})},cancelForm:function(e){this.$refs[e].resetFields(),this.$emit("cancelNewCoce")}}},_={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-dialog",{attrs:{title:e.errorSettingId?"编辑错误码":"新建错误码",visible:e.dialogVisible,width:"500px"},on:{"update:visible":function(t){e.dialogVisible=t},close:function(t){e.cancelForm("errorForm")}}},[r("el-form",{ref:"errorForm",staticStyle:{width:"450px"},attrs:{model:e.errorForm,rules:e.modalRules}},[r("el-form-item",{attrs:{label:"错误码","label-width":"90px",prop:"errorCode"}},[r("dm-input",{attrs:{byteType:1,type:"text",maxlength:20},model:{value:e.errorForm.errorCode,callback:function(t){e.$set(e.errorForm,"errorCode",t)},expression:"errorForm.errorCode"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"错误信息","label-width":"90px",prop:"errorInfo"}},[r("dm-input",{attrs:{byteType:1,type:"text",maxlength:20},model:{value:e.errorForm.errorInfo,callback:function(t){e.$set(e.errorForm,"errorInfo",t)},expression:"errorForm.errorInfo"}})],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.cancelForm("errorForm")}}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.submitForm("errorForm")}}},[e._v(e._s(e.errorSettingId?"保存":"新建"))])],1)],1)},staticRenderFns:[]};var w=r("VU/8")(b,_,!1,function(e){r("ASE+")},"data-v-1f51806f",null).exports,L={props:{tableData:{type:Array,default:function(){return[]}}},data:function(){return{showNewCode:!1,errorSettingId:"",errorInfo:"",errorCode:""}},methods:{getList:function(){this.$emit("getList")},edit:function(e){this.showNewCode=!0,this.errorSettingId=e.errorSettingId,this.errorCode=e.errorCode,this.errorInfo=e.errorInfo},cancelNewCoce:function(){this.showNewCode=!1},deleteList:function(e){var t=this,r={errorSettingId:e.errorSettingId};Object(u.b)("/gateway-manage/delete-error-setting",r).then(function(e){"0000"==e.data.code?t.$emit("getList"):t.$message.error(e.data.message)})}},components:{newErrorCode:w}},S={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"20px"}},[r("div",{staticClass:"table-content"},[r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark",height:e.tableHeight}},[r("el-table-column",{attrs:{label:"错误码",prop:"errorCode"}}),e._v(" "),r("el-table-column",{attrs:{label:"错误信息",prop:"errorInfo"}}),e._v(" "),r("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text"},on:{click:function(r){e.edit(t.row)}}},[e._v("编辑")]),e._v(" "),r("dm-delete",{attrs:{tips:"确定要删除吗?"},on:{confirm:function(r){e.deleteList(t.row)}}},[r("el-button",{attrs:{type:"text"}},[e._v("删除")])],1)]}}])})],1)],1),e._v(" "),e.showNewCode?r("newErrorCode",{attrs:{errorSettingId:e.errorSettingId,errorCode:e.errorCode,errorInfo:e.errorInfo},on:{getList:e.getList,cancelNewCoce:e.cancelNewCoce}}):e._e()],1)},staticRenderFns:[]};var I=r("VU/8")(L,S,!1,function(e){r("oPMN")},"data-v-78e39e8a",null).exports,C=r("BO1k"),x=r.n(C),k={props:{type:{type:String,default:function(){return 1}},sceneCode:{type:String,default:function(){return""}}},data:function(){return{dialogVisible:!0,checkedAll:!1,isIndeterminate:!1,rightList:[],leftSelectList:[],rightSelectList:[],props:{label:"name",children:"zones",isLeaf:"leaf"},loading:!1,projectList:[],refash:!1,btnLoading:!1}},created:function(){this.dialogVisible=!0},methods:{changeAllTree:function(e){e?(this.$refs.tree.setCheckedNodes(this.projectList),this.leftSelectList=this.$refs.tree.getCheckedNodes()):(this.$refs.tree.setCheckedKeys([]),this.leftSelectList=this.$refs.tree.getCheckedNodes())},handleCheckChange:function(e,t,r){this.leftSelectList=this.$refs.tree.getCheckedNodes();var a=0,n=!0,i=!1,o=void 0;try{for(var s,l=x()(this.leftSelectList);!(n=(s=l.next()).done);n=!0){var c=s.value;this.leftSelectList.every(function(e){return 0!==e.type})?a=1:0===c.type&&(a+=1)}}catch(e){i=!0,o=e}finally{try{!n&&l.return&&l.return()}finally{if(i)throw o}}this.isIndeterminate=a>0&&a<this.projectList.length,this.checkedAll=a===this.projectList.length},transferRight:function(){var e=this;this.rightList=this.leftSelectList.concat(this.rightList),this.rightList=this.rightList.filter(function(e,t,r){return r.indexOf(e)===t});for(var t=function(t){e.rightList.find(function(r){return r.id===e.rightList[t].parentId})&&e.rightList[t].leaf&&(e.rightList.splice(t,1),t=0),r=t},r=0;r<this.rightList.length;r++)t(r);this.$refs.tree.setCheckedKeys([]),this.leftSelectList=[],this.checkedAll=!1},transferLeft:function(){for(var e=0;e<this.rightSelectList.length;e++)for(var t=0;t<this.rightList.length;t++)this.rightSelectList[e].id===this.rightList[t].id&&(this.rightList.splice(t,1),t=0);this.rightSelectList=[]},loadNode:function(e,t){var r=this,a=this;if(0===e.level)return this.loading=!0,Object(u.a)("/gateway-manage/plugin/interface/tree",{}).then(function(e){if("0000"==e.data.code){r.loading=!1,e.data.result?r.projectList=e.data.result:r.projectList=[];var a=!0,n=!1,i=void 0;try{for(var o,s=x()(r.projectList);!(a=(o=s.next()).done);a=!0){var l=o.value;0===l.leafFlag?l.leaf=!1:l.leaf=!0,l.parentId=""}}catch(e){n=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(n)throw i}}return t(r.projectList)}r.$message.error(e.data.message)}).catch(function(e){a.$message.error({duration:1e3,message:e.message})}),t(this.projectList);if(e.level>2)return t([]);if(1===e.level||2===e.level){var n={type:e.level-1,id:e.data.id},i=[];Object(u.a)("/gateway-manage/plugin/interface/tree",n).then(function(t){if("0000"==t.data.code){i=t.data.result?t.data.result:[];var a=!0,n=!1,o=void 0;try{for(var s,l=x()(i);!(a=(s=l.next()).done);a=!0){var c=s.value;0===c.leafFlag?c.leaf=!1:c.leaf=!0,c.parentId=e.data.id}}catch(e){n=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(n)throw o}}}else r.$message.error(t.data.message)}).catch(function(e){a.$message.error({duration:1e3,message:e.message})}),setTimeout(function(){t(i)},2e3)}},handleSelectionChange:function(e){this.rightSelectList=e},submitForm:function(){var e=this,t=this;if(0===this.rightSelectList.length)return this.$message.error("请选择要绑定的API"),!1;var r=[],a=[],n=[],i=!0,o=!1,s=void 0;try{for(var l,c=x()(this.rightSelectList);!(i=(l=c.next()).done);i=!0){var d=l.value;0===d.type?r.push(d.id):1===d.type?a.push(d.id):2===d.type&&n.push(d.id)}}catch(e){o=!0,s=e}finally{try{!i&&c.return&&c.return()}finally{if(o)throw s}}var h={sceneCode:this.sceneCode};r.length&&(h.projectIds=r.join(",")),a.length&&(h.groupIds=a.join(",")),n.length&&(h.interfaceIds=n.join(","));var g="";"1"===this.type?g="/gateway-manage/platform/white/bind":"2"===this.type&&(g="/gateway-manage/platform/capacity/bind"),this.btnLoading=!0,Object(u.a)(g,h).then(function(t){"0000"==t.data.code?(e.dialogVisible=!1,e.$emit("getList"),e.btnLoading=!1):e.$message.error(t.data.message)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},closeDialog:function(){this.$emit("cancelBind")}}},N={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-dialog",{attrs:{title:"1"===e.type?"新建绑定白名单接口":"新建绑定能力接口",visible:e.dialogVisible,width:"600px"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.closeDialog}},[r("div",{staticClass:"dialog-body"},[r("div",{staticClass:"content"},[r("div",{staticClass:"left-content"},[r("div",{staticClass:"title"},[r("h3",[r("el-checkbox",{attrs:{indeterminate:e.isIndeterminate},on:{change:e.changeAllTree},model:{value:e.checkedAll,callback:function(t){e.checkedAll=t},expression:"checkedAll"}},[e._v("所有API")])],1)]),e._v(" "),r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"tree-content"},[r("el-tree",{ref:"tree",attrs:{props:e.props,load:e.loadNode,"node-key":"id",lazy:"","show-checkbox":""},on:{"check-change":e.handleCheckChange}})],1)]),e._v(" "),r("div",{staticClass:"left-center"},[r("el-button",{attrs:{type:"primary",disabled:e.leftSelectList.length<=0},on:{click:e.transferRight}},[e._v("转入"),r("i",{staticClass:"el-icon-arrow-right el-icon--right"})]),e._v(" "),r("el-button",{attrs:{type:"primary",disabled:e.rightSelectList.length<=0},on:{click:e.transferLeft}},[r("i",{staticClass:"el-icon-arrow-left el-icon--left"}),e._v("移除")])],1),e._v(" "),r("div",{staticClass:"right-content"},[r("div",{staticClass:"list-content table-transfer"},[[r("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:e.rightList,"tooltip-effect":"dark",height:"305"},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"50"}}),e._v(" "),r("el-table-column",{attrs:{label:"已选API",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.name))]}}])})],1)]],2)])])]),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.closeDialog}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{type:"primary",loading:e.btnLoading},on:{click:e.submitForm}},[e._v("确定")])],1)])},staticRenderFns:[]};var j=r("VU/8")(k,N,!1,function(e){r("6yE4"),r("UOoF")},"data-v-38497e12",null).exports,$={props:{tableData:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{},components:{}},P={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"20px"}},[r("div",{staticClass:"table-content"},[r("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark",height:e.tableHeight}},[r("el-table-column",{attrs:{label:"traceid",prop:"projectName"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.traceId||"--")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"应用",prop:"groupName"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.name||"--")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"请求时间",prop:"bindTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.requestTime)))]),e._v(" "),r("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.requestTime)))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"商户",prop:"interfaceName"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.enterpriseName||"--")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"接口",prop:"interfaceName"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v(e._s(t.row.projectName||"--")+"-"+e._s(t.row.groupName||"--"))]),e._v(" "),r("div",[e._v(e._s(t.row.interfaceName||"--"))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"请求内容",prop:"interfaceName","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.requestParams||"--")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"返回内容",prop:"interfaceName","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.responseParams||"--")+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"备注"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.remarks||"--")+"\n ")]}}])})],1)],1)])},staticRenderFns:[]};var E=r("VU/8")($,P,!1,function(e){r("3yRM")},"data-v-6c542f1c",null).exports,F={name:"envManage",components:{navBread:c.a,selectEnv:h.a,whiteList:p,capacityList:y,errorCodeList:I,bindTranser:j,newErrorCode:w,logList:E},data:function(){return{navPath:[{name:"插件管理",path:"/pluginManage"},{name:"开放平台",path:""}],activeName:"first",search:"",showdialog:!1,pluginId:"",sceneCode:"",pluginType:1,projectList:[],projectId:"",groupList:[],groupId:"",tableData:[],total:0,currentPage:1,pageSize:20,pageSizes:[20,40,60,80],showNewCode:!1,errorSettingId:"",showBinddialog:!1,type:"",loading:!1,logSearch:{requestDate:[],enterpriseId:"",searchValue:"",requestProjectId:"",requestGroupId:"",interfaceId:""},brandList:[],apiData:[],pickerOptions:{disabledDate:function(e){return e.getTime()>Date.now()-864e4}}}},methods:{changeDate:function(){this.currentPage=1,this.getList()},changeBrand:function(){this.currentPage=1,this.getList()},changeApi:function(){this.currentPage=1,this.getList()},changePro:function(){var e=this;return l()(o.a.mark(function t(){var r;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e,t.next=3,r.getGroupList();case 3:r.currentPage=1,r.getList();case 5:case"end":return t.stop()}},t,e)}))()},changeGroup:function(){this.getApiList()},searchEnterFun:Object(d.a)(function(){this.currentPage=1,this.getList()},200),clearSearch:function(){this.currentPage=1,this.getList()},handleClick:function(e,t){this.search="",this.projectId="",this.groupId="",this.logSearch={requestDate:[],enterpriseId:"",searchValue:"",requestProjectId:"",requestGroupId:"",interfaceId:""},this.getList()},goEnvList:function(){this.showdialog=!0,this.pluginId=this.pluginId},closeDialog:function(){this.showdialog=!1},getChange:function(){this.groupId="",this.getGroupList(),this.getList()},getSearchList:function(){"first"!==this.activeName&&"second"!==this.activeName||(this.currentPage=1,this.getGroupList(),this.getList())},handleSizeChange:function(e){this.pageSize=e,this.getList()},handleCurrentChange:function(e){this.currentPage=e,this.getList()},getList:function(){var e=this,t="",r={};"first"===e.activeName?(t="/gateway-manage/platform/white/list",r={projectId:e.projectId?e.projectId:null,groupId:e.groupId?e.groupId:null,search:e.search?e.search:null,sceneCode:e.sceneCode,currentPage:e.currentPage,pageSize:e.pageSize}):"second"===e.activeName?(t="/gateway-manage/platform/capacity/list",r={projectId:e.projectId?e.projectId:null,groupId:e.groupId?e.groupId:null,search:e.search?e.search:null,sceneCode:e.sceneCode,currentPage:e.currentPage,pageSize:e.pageSize}):"third"===e.activeName?(t="/gateway-manage/page-error-setting",r={errorType:2,pageNum:e.currentPage,pageSize:e.pageSize}):(t="/gateway-manage/page-log",e.logSearch.requestDate||(e.logSearch.requestDate=[]),r={startTime:e.logSearch.requestDate[0],endTime:e.logSearch.requestDate[1],enterpriseId:e.logSearch.enterpriseId,interfaceId:e.logSearch.interfaceId,paramSearch:e.logSearch.searchValue,pageNum:e.currentPage,pageSize:e.pageSize}),"first"===e.activeName||"second"===e.activeName?(e.loading=!0,Object(u.a)(t,r).then(function(t){"0000"==t.data.code?(e.loading=!1,t.data.result.result?(e.tableData=t.data.result.result,e.total=t.data.result.totalCount):(e.tableData=[],e.total=0)):(e.loading=!1,e.$message.error(t.data.message))}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})):(e.loading=!0,Object(u.b)(t,r).then(function(t){"0000"==t.data.code?(t.data.result.result?(e.tableData=t.data.result.result,e.total=t.data.result.totalCount):(e.tableData=[],e.total=0),e.loading=!1):(e.loading=!1,e.$message.error(t.data.message))}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})}))},getProjectList:function(){var e=this;Object(u.a)("/gateway-manage/plugin/interface/tree",{}).then(function(t){"0000"==t.data.code?t.data.result?e.projectList=t.data.result:e.projectList=[]:e.$message.error(t.data.message)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getGroupList:function(){var e=this,t={type:0,id:e.logSearch.requestProjectId||e.projectId};Object(u.a)("/gateway-manage/plugin/interface/tree",t).then(function(t){"0000"==t.data.code?t.data.result?e.groupList=t.data.result:e.groupList=[]:e.$message.error(t.data.message)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getApiList:function(){var e=this,t={projectId:e.logSearch.requestProjectId,interfaceGroupId:e.logSearch.requestGroupId,target:"-1",pageSize:500,pageNum:1};Object(u.a)("/gateway-manage/page-api",t).then(function(t){var r=t.data;"0000"!=r.code?errMsg.errorMsg(r):e.apiData=r.result.result}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},addCode:function(){this.showNewCode=!0,this.errorSettingId=""},cancelNewCoce:function(){this.showNewCode=!1},addBind:function(e){this.showBinddialog=!0,this.type=e},cancelBind:function(){this.showBinddialog=!1}},watch:n()({$route:{handler:function(e,t){},deep:!0}},"$route",function(e,t){this.pluginId=this.$route.query.pluginId,this.sceneCode=this.$route.query.sceneCode,this.getProjectList(),this.getList()}),created:function(){this.pluginId=this.$route.query.pluginId,this.sceneCode=this.$route.query.sceneCode,this.getProjectList(),this.getList()}},D={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"api-body-content border-box"},[r("div",{staticClass:"common-nav"},[r("nav-bread",{attrs:{navPath:e.navPath}}),e._v(" "),r("div",{staticClass:"change-env",on:{click:e.goEnvList}},[r("span",[e._v("切换环境")]),r("i",{staticClass:"iconfont iconicon-qihuan",on:{click:function(t){e.goEnvList(e.item)}}})])],1),e._v(" "),r("div",{staticClass:"api-body-main common-body-main border-box"},[r("div",{staticClass:"api-main-content border-box"},[r("div",{staticClass:"env-tab-wrap"},[r("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[r("div",{staticClass:"search-box"},[r("div",{staticClass:"left"},["second"===e.activeName||"first"===e.activeName?r("div",[r("el-input",{staticClass:"w-320",attrs:{placeholder:"请输入接口名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:function(t){e.getSearchList()}},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.getSearchList()}},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),e._v(" "),r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择项目",size:"small",clearable:""},on:{change:function(t){e.getChange()}},model:{value:e.projectId,callback:function(t){e.projectId=t},expression:"projectId"}},e._l(e.projectList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),e._v(" "),r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择分组",size:"small",clearable:"",disabled:""===e.projectId},on:{change:function(t){e.getSearchList()}},model:{value:e.groupId,callback:function(t){e.groupId=t},expression:"groupId"}},e._l(e.groupList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1):e._e()]),e._v(" "),r("div",["third"===e.activeName?r("el-button",{attrs:{type:"primary"},on:{click:e.addCode}},[e._v("新建错误码")]):e._e(),e._v(" "),"first"===e.activeName?r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.addBind("1")}}},[e._v("新建绑定")]):e._e(),e._v(" "),"second"===e.activeName?r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.addBind("2")}}},[e._v("新建绑定")]):e._e()],1)]),e._v(" "),r("el-tab-pane",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{label:"白名单接口",name:"first"}},["first"===e.activeName?r("whiteList",{attrs:{tableData:e.tableData},on:{getList:e.getList}}):e._e()],1),e._v(" "),r("el-tab-pane",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{label:"能力接口",name:"second"}},["second"===e.activeName?r("capacityList",{attrs:{tableData:e.tableData},on:{getList:e.getList}}):e._e()],1),e._v(" "),r("el-tab-pane",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{label:"错误码配置",name:"third"}},["third"===e.activeName?r("errorCodeList",{attrs:{tableData:e.tableData},on:{getList:e.getList}}):e._e()],1),e._v(" "),r("el-tab-pane",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{label:"日志",name:"four"}},[r("div",{staticClass:"log-search flex"},[r("el-date-picker",{staticStyle:{width:"280px"},attrs:{"picker-options":e.pickerOptions,type:"daterange",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd","start-placeholder":"开始日期","end-placeholder":"结束日期",editable:!1},on:{change:e.changeDate},model:{value:e.logSearch.requestDate,callback:function(t){e.$set(e.logSearch,"requestDate",t)},expression:"logSearch.requestDate"}}),r("el-input",{staticClass:"w-280 marginLeft10",attrs:{placeholder:"请输入traceid/请求内容/返回内容","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearSearch},nativeOn:{keyup:function(t){return r=t,e.searchEnterFun(r,e.searchValue);var r}},model:{value:e.logSearch.searchValue,callback:function(t){e.$set(e.logSearch,"searchValue",t)},expression:"logSearch.searchValue"}}),r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择商户",size:"small",clearable:""},on:{change:e.changeBrand},model:{value:e.logSearch.enterpriseId,callback:function(t){e.$set(e.logSearch,"enterpriseId",t)},expression:"logSearch.enterpriseId"}},e._l(e.brandList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择项目",size:"small",clearable:""},on:{change:e.changePro},model:{value:e.logSearch.requestProjectId,callback:function(t){e.$set(e.logSearch,"requestProjectId",t)},expression:"logSearch.requestProjectId"}},e._l(e.projectList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),e.logSearch.requestProjectId?r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择分组",size:"small",clearable:""},on:{change:e.changeGroup},model:{value:e.logSearch.requestGroupId,callback:function(t){e.$set(e.logSearch,"requestGroupId",t)},expression:"logSearch.requestGroupId"}},e._l(e.groupList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})):e._e(),e.logSearch.requestGroupId?r("el-select",{staticClass:"w-140 marginLeft10",staticStyle:{display:"inline-block"},attrs:{placeholder:"请选择API",size:"small",clearable:""},on:{change:e.changeApi},model:{value:e.logSearch.interfaceId,callback:function(t){e.$set(e.logSearch,"interfaceId",t)},expression:"logSearch.interfaceId"}},e._l(e.apiData,function(e){return r("el-option",{key:e.interfaceId,attrs:{label:e.interfaceName,value:e.interfaceId}})})):e._e()],1),e._v(" "),r("log-list",{attrs:{tableData:e.tableData},on:{getList:e.getList}})],1)],1),e._v(" "),0!==e.total?r("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[r("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":e.pageSizes,"page-size":e.pageSize,layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])]),e._v(" "),e.showdialog?r("selectEnv",{attrs:{pluginId:e.pluginId,pluginType:e.pluginType},on:{closeDialog:e.closeDialog}}):e._e(),e._v(" "),e.showBinddialog?r("bindTranser",{attrs:{type:e.type,sceneCode:e.sceneCode},on:{cancelBind:e.cancelBind,getList:e.getList}}):e._e(),e._v(" "),e.showNewCode?r("newErrorCode",{attrs:{errorSettingId:e.errorSettingId},on:{getList:e.getList,cancelNewCoce:e.cancelNewCoce}}):e._e()],1)},staticRenderFns:[]};var O=r("VU/8")(F,D,!1,function(e){r("lUOW")},"data-v-2682781e",null);t.default=O.exports},exGp:function(e,t,r){"use strict";t.__esModule=!0;var a,n=r("//Fk"),i=(a=n)&&a.__esModule?a:{default:a};t.default=function(e){return function(){var t=e.apply(this,arguments);return new i.default(function(e,r){return function a(n,o){try{var s=t[n](o),l=s.value}catch(e){return void r(e)}if(!s.done)return i.default.resolve(l).then(function(e){a("next",e)},function(e){a("throw",e)});e(l)}("next")})}}},jyFz:function(e,t,r){var a=function(){return this}()||Function("return this")(),n=a.regeneratorRuntime&&Object.getOwnPropertyNames(a).indexOf("regeneratorRuntime")>=0,i=n&&a.regeneratorRuntime;if(a.regeneratorRuntime=void 0,e.exports=r("SldL"),n)a.regeneratorRuntime=i;else try{delete a.regeneratorRuntime}catch(e){a.regeneratorRuntime=void 0}},lUOW:function(e,t){},oPMN:function(e,t){},xU1Q:function(e,t){}});
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,f){for(var a,d,b,i=0,u=[];i<r.length;i++)d=r[i],t[d]&&u.push(t[d][0]),t[d]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=o(o.s=f[i]);return b};var r={},t={24: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],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,o.nc&&f.setAttribute("nonce",o.nc),f.src=o.p+"static/js/"+e+"."+{0:"9375e55c4a69923b85b0",1:"0ebe3ead93207dc78a78",2:"746c1aff28909fa81065",3:"ee2db5932cf0c94dec20",4:"6f91f4cfd9d5a029a91f",5:"9e039b3008bbf555db62",6:"e4fb3b8fe9848c1e3cdd",7:"b2a85a42ddd430235a63",8:"0774f888c4ec018000f4",9:"c98145195e68a6e13faf",10:"638039a7b39908980436",11:"f27d1de28264fbbe30ff",12:"ccbc18453e41490e2dba",13:"b109164d2be44afb7733",14:"9825bb69e60b8030c230",15:"6700988b665e14f99d41",16:"6e70f43452cbef826036",17:"8354f7b686256ddf47fb",18:"e7685f45ec4dd5b70ae4",19:"40fd9824f7542ed7f56d",20:"c163ea91d150e0ca1cb1",21:"55879284ad4d1f03fbe0"}[e]+".js";var a=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return f.onerror=f.onload=d,c.appendChild(f),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}}([]); !function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,f){for(var a,d,b,i=0,u=[];i<r.length;i++)d=r[i],t[d]&&u.push(t[d][0]),t[d]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=o(o.s=f[i]);return b};var r={},t={24: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],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,o.nc&&f.setAttribute("nonce",o.nc),f.src=o.p+"static/js/"+e+"."+{0:"9375e55c4a69923b85b0",1:"0ebe3ead93207dc78a78",2:"746c1aff28909fa81065",3:"ee2db5932cf0c94dec20",4:"1ceb7e330edf70719966",5:"9e039b3008bbf555db62",6:"e4fb3b8fe9848c1e3cdd",7:"b2a85a42ddd430235a63",8:"0774f888c4ec018000f4",9:"c98145195e68a6e13faf",10:"638039a7b39908980436",11:"f27d1de28264fbbe30ff",12:"ccbc18453e41490e2dba",13:"b109164d2be44afb7733",14:"9825bb69e60b8030c230",15:"6700988b665e14f99d41",16:"6e70f43452cbef826036",17:"8354f7b686256ddf47fb",18:"e7685f45ec4dd5b70ae4",19:"40fd9824f7542ed7f56d",20:"c163ea91d150e0ca1cb1",21:"55879284ad4d1f03fbe0"}[e]+".js";var a=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return f.onerror=f.onload=d,c.appendChild(f),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 \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-09-05 10:03:31 * @Date: 2019-09-05 10:03:31
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-05-18 15:55:02 * @LastEditTime: 2020-05-18 17:07:00
--> -->
<template> <template>
<div class="api-body-content border-box"> <div class="api-body-content border-box">
...@@ -275,6 +275,7 @@ export default { ...@@ -275,6 +275,7 @@ export default {
enterpriseId: that.logSearch.enterpriseId, enterpriseId: that.logSearch.enterpriseId,
interfaceId: that.logSearch.interfaceId, interfaceId: that.logSearch.interfaceId,
paramSearch: that.logSearch.searchValue, paramSearch: that.logSearch.searchValue,
sceneCode: that.sceneCode,
pageNum: that.currentPage, pageNum: that.currentPage,
pageSize: that.pageSize pageSize: that.pageSize
}; };
......
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