You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
36 KiB
1 lines
36 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f67aa52c"],{"08e6":function(e,t,s){"use strict";var i=s("79af"),a=s.n(i);a.a},"09f4":function(e,t,s){"use strict";s.d(t,"a",(function(){return n})),Math.easeInOutQuad=function(e,t,s,i){return e/=i/2,e<1?s/2*e*e+t:(e--,-s/2*(e*(e-2)-1)+t)};var i=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function n(e,t,s){var n=r(),o=e-n,c=20,l=0;t="undefined"===typeof t?500:t;var u=function e(){l+=c;var r=Math.easeInOutQuad(l,n,o,t);a(r),l<t?i(e):s&&"function"===typeof s&&s()};u()}},1771:function(e,t,s){"use strict";s.d(t,"f",(function(){return c})),s.d(t,"c",(function(){return l})),s.d(t,"d",(function(){return u})),s.d(t,"b",(function(){return d})),s.d(t,"a",(function(){return m})),s.d(t,"e",(function(){return p}));s("caad"),s("d3b7"),s("ac1f"),s("8a79"),s("2532"),s("3ca3"),s("1276"),s("2ca0"),s("498a"),s("ddb0"),s("2b3d");var i=s("5530"),a=s("b85c"),r=s("c2cf"),n=s("ebb5"),o=void 0,c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"authority";"string"===typeof e&&(e=[e]),e&&e.length>0&&r["a"].enums({codes:e},s).then((function(s){var i,r=s.data,n=Object(a["a"])(e);try{for(n.s();!(i=n.n()).done;){var o=i.value;t[o]=r.data[o]}}catch(c){n.e(c)}finally{n.f()}}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t,"authority")},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t,"msgs")},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"===typeof e&&(e=[e]),e&&e.length>0&&n["a"].list({codes:e}).then((function(s){var i,r=s.data,n=Object(a["a"])(e);try{for(n.s();!(i=n.n()).done;){var o=i.value;t[o]=r.data[o]}}catch(c){n.e(c)}finally{n.f()}}))},m=function(e){console.log(e,12);var t=e.data,s=t.type;if(s&&s.includes("application/json")){var i=new FileReader;i.onload=function(e){if(2===e.target.readyState){var t=JSON.parse(e.target.result);o.$message({message:t.msg,type:"warning"})}},i.readAsText(t)}else{var a=e.headers["content-disposition"],r="下载文件.zip";if(a)for(var n=a.split(";"),c=0;c<n.length;c++){var l=n[c];if(null!==l&&""!==l){var u=l.split("=");if(null!==u&&u.length>0&&"filename"===u[0].trim().toLowerCase()){r=decodeURI(u[1]);break}}}(r.startsWith("'")||r.startsWith('"'))&&(r.endsWith("'")||r.endsWith('"'))&&(r=r.substring(1,r.length-1));var d=new Blob([t]),m=document.createElement("a");m.href=window.URL.createObjectURL(d),m.download=r,m.click(),window.URL.revokeObjectURL(m.href)}},p=function(e){var t={size:10,current:1,sort:"id",order:"descending",model:{},map:{},timeRange:null};return e?Object(i["a"])(Object(i["a"])({},t),e):t}},"27ae":function(e,t,s){(function(s){var i,a;(function(t,s){e.exports=s(t)})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof s?s:this,(function(s){"use strict";s=s||{};var r,n=s.Base64,o="2.6.4",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},s=0,i=e.length;s<i;s++)t[e.charAt(s)]=s;return t}(c),u=String.fromCharCode,d=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?u(192|t>>>6)+u(128|63&t):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|63&t)}t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|63&t)},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(e){return e.replace(m,d)},f=function(e){var t=[0,2,1][e.length%3],s=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),i=[c.charAt(s>>>18),c.charAt(s>>>12&63),t>=2?"=":c.charAt(s>>>6&63),t>=1?"=":c.charAt(63&s)];return i.join("")},h=s.btoa&&"function"==typeof s.btoa?function(e){return s.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,f)},b=function(e){return h(p(String(e)))},v=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},y=function(e,t){return t?v(b(e)):b(e)},g=function(e){return y(e,!0)};s.Uint8Array&&(r=function(e,t){for(var s="",i=0,a=e.length;i<a;i+=3){var r=e[i],n=e[i+1],o=e[i+2],l=r<<16|n<<8|o;s+=c.charAt(l>>>18)+c.charAt(l>>>12&63)+("undefined"!=typeof n?c.charAt(l>>>6&63):"=")+("undefined"!=typeof o?c.charAt(63&l):"=")}return t?v(s):s});var w,A=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,_=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),s=t-65536;return u(55296+(s>>>10))+u(56320+(1023&s));case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},x=function(e){return e.replace(A,_)},$=function(e){var t=e.length,s=t%4,i=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),a=[u(i>>>16),u(i>>>8&255),u(255&i)];return a.length-=[0,0,2,1][s],a.join("")},O=s.atob&&"function"==typeof s.atob?function(e){return s.atob(e)}:function(e){return e.replace(/\S{1,4}/g,$)},S=function(e){return O(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},C=function(e){return x(O(e))},P=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},j=function(e){return C(P(e))};s.Uint8Array&&(w=function(e){return Uint8Array.from(S(P(e)),(function(e){return e.charCodeAt(0)}))});var q=function(){var e=s.Base64;return s.Base64=n,e};if(s.Base64={VERSION:o,atob:S,btoa:h,fromBase64:j,toBase64:y,utob:p,encode:y,encodeURI:g,btou:x,decode:j,noConflict:q,fromUint8Array:r,toUint8Array:w},"function"===typeof Object.defineProperty){var k=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};s.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",k((function(){return j(this)}))),Object.defineProperty(String.prototype,"toBase64",k((function(e){return y(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",k((function(){return y(this,!0)})))}}return s["Meteor"]&&(Base64=s.Base64),e.exports?e.exports.Base64=s.Base64:(i=[],a=function(){return s.Base64}.apply(t,i),void 0===a||(e.exports=a)),{Base64:s.Base64}}))}).call(this,s("c8ba"))},"4fad":function(e,t,s){var i=s("23e7"),a=s("6f53").entries;i({target:"Object",stat:!0},{entries:function(e){return a(e)}})},"6f53":function(e,t,s){var i=s("83ab"),a=s("df75"),r=s("fc6a"),n=s("d1e7").f,o=function(e){return function(t){var s,o=r(t),c=a(o),l=c.length,u=0,d=[];while(l>u)s=c[u++],i&&!n.call(o,s)||d.push(e?[s,o[s]]:o[s]);return d}};e.exports={entries:o(!0),values:o(!1)}},"79af":function(e,t,s){},"8a79":function(e,t,s){"use strict";var i=s("23e7"),a=s("06cf").f,r=s("50c4"),n=s("5a34"),o=s("1d80"),c=s("ab13"),l=s("c430"),u="".endsWith,d=Math.min,m=c("endsWith"),p=!l&&!m&&!!function(){var e=a(String.prototype,"endsWith");return e&&!e.writable}();i({target:"String",proto:!0,forced:!p&&!m},{endsWith:function(e){var t=String(o(this));n(e);var s=arguments.length>1?arguments[1]:void 0,i=r(t.length),a=void 0===s?i:d(r(s),i),c=String(e);return u?u.call(t,c,a):t.slice(a-c.length,a)===c}})},9256:function(e,t,s){"use strict";s("99af"),s("4160"),s("caad"),s("4fad"),s("d3b7"),s("159b");var i=s("5530"),a=s("bc3a"),r=s.n(a),n=s("5c96"),o=s("5657");s("27ae");function c(e,t){"ECONNABORTED"===e.code?Object(n["Message"])({message:"请求超时"}):e.response&&e.response.data?Object(n["Message"])({message:e.response.data}):e.message&&Object(n["Message"])({message:e.message}),t(e)}function l(e,t){e.data.isError&&(4e4===e.data.code||40001===e.data.code||40002===e.data.code||40003===e.data.code||40005===e.data.code||40006===e.data.code||40008===e.data.code?n["MessageBox"].alert(e.data.msg,"提醒",{confirmButtonText:"确定",callback:function(){window.location.hash="/login"}}):n["Message"].error(e.data.msg)),t(e)}r.a.interceptors.request.use((function(e){var t=!1!==e.headers["X-isToken"]||e.headers["X-isToken"],s=o["a"].get("TOKEN","");s&&t&&(e.headers.token="Bearer "+s);var i="ceres_admin_web",a="ceres_admin_web";return e.headers["Authorization"]="Basic ".concat("".concat(i,":").concat(a)),e}),(function(e){return Promise.reject(e)})),r.a.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)}));var u=function(e){console.log(e,"opts");var t={ts:Date.now()},s=e.method.toUpperCase(),a={method:s,url:"".concat("https://pos.admin.api.lotus-wallet.com").concat(e.url),responseType:e.responseType||"",timeout:2e4},n=["PUT","POST","PATCH"];n.includes(s)?a.data=e.data||{}:a.params=Object(i["a"])(Object(i["a"])({},t),e.data||{}),e.formData&&(a.transformRequest=[function(e){var t=new FormData;return e&&Object.entries(e).forEach((function(e){t.append(e[0],e[1])})),t}]);var o=new Promise((function(e,t){r()(a).then((function(t){l(t,e)})).catch((function(e){c(e,t)}))}));return o};t["a"]=u},a44a:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"app-container"},[s("div",{staticClass:"filter-container"},[s("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.systemApi.code")},model:{value:e.queryParams.model.code,callback:function(t){e.$set(e.queryParams.model,"code",t)},expression:"queryParams.model.code"}}),s("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.systemApi.name")},model:{value:e.queryParams.model.name,callback:function(t){e.$set(e.queryParams.model,"name",t)},expression:"queryParams.model.name"}}),s("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.systemApi.serviceId")},model:{value:e.queryParams.model.serviceId,callback:function(t){e.$set(e.queryParams.model,"serviceId",t)},expression:"queryParams.model.serviceId"}}),s("el-date-picker",{staticClass:"filter-item search-item date-range-item",attrs:{"range-separator":null,"start-placeholder":e.$t("table.createTime"),format:"yyyy-MM-dd HH:mm:ss",type:"datetimerange","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.queryParams.timeRange,callback:function(t){e.$set(e.queryParams,"timeRange",t)},expression:"queryParams.timeRange"}}),s("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("table.search")))]),s("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"warning"},on:{click:e.reset}},[e._v(e._s(e.$t("table.reset")))]),s("el-button",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["systemApi:add"],expression:"['systemApi:add']"}],staticClass:"filter-item",attrs:{plain:"",type:"danger"},on:{click:e.add}},[e._v(" "+e._s(e.$t("table.add"))+" ")]),s("el-button",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["systemApi:add"],expression:"['systemApi:add']"}],staticClass:"filter-item",attrs:{plain:"",type:"danger"},on:{click:e.scan}},[e._v(" 扫描接口 ")]),s("el-dropdown",{directives:[{name:"has-any-permission",rawName:"v-has-any-permission",value:["systemApi:delete","systemApi:export"],expression:"['systemApi:delete','systemApi:export']"}],staticClass:"filter-item",attrs:{trigger:"click"}},[s("el-button",[e._v(" "+e._s(e.$t("table.more"))+" "),s("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[s("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["systemApi:delete"],expression:"['systemApi:delete']"}],nativeOn:{click:function(t){return e.batchDelete(t)}}},[e._v(" "+e._s(e.$t("table.delete"))+" ")]),s("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["systemApi:export"],expression:"['systemApi:export']"}],nativeOn:{click:function(t){return e.exportExcel(t)}}},[e._v(" "+e._s(e.$t("table.export"))+" ")]),s("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["systemApi:export"],expression:"['systemApi:export']"}],nativeOn:{click:function(t){return e.exportExcelPreview(t)}}},[e._v(" "+e._s(e.$t("table.exportPreview"))+" ")])],1)],1)],1),s("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],key:e.tableKey,ref:"table",staticStyle:{width:"100%"},attrs:{data:e.tableData.records,border:"",fit:"","row-key":"id"},on:{"cell-click":e.cellClick,"filter-change":e.filterChange,"selection-change":e.onSelectChange,"sort-change":e.sortChange}},[s("el-table-column",{attrs:{align:"center",type:"selection",width:"40px","reserve-selection":!0}}),s("el-table-column",{attrs:{label:e.$t("table.systemApi.code"),"show-overflow-tooltip":!0,align:"center",prop:"code"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.code))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.systemApi.name"),"show-overflow-tooltip":!0,align:"left","min-width":"120px",prop:"name"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.name))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.systemApi.describe"),"show-overflow-tooltip":!0,align:"left","min-width":"120px",prop:"describe"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.describe))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.systemApi.requestMethod"),"show-overflow-tooltip":!0,align:"left","min-width":"80px",prop:"requestMethod"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.requestMethod))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.systemApi.serviceId"),"show-overflow-tooltip":!0,align:"center","min-width":"180px",prop:"serviceId"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.serviceId))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.systemApi.path"),"show-overflow-tooltip":!0,align:"left","min-width":"200px",prop:"path"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.path))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.systemApi.status"),"show-overflow-tooltip":!0,align:"center",prop:"status",width:"70px"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("el-badge",{staticClass:"status-item",attrs:{type:t.row.status?"success":"danger","is-dot":""}}),s("span",[e._v(e._s(t.row.status?e.$t("common.status.valid"):e.$t("common.status.invalid")))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.systemApi.isAuth"),"show-overflow-tooltip":!0,align:"center",prop:"isAuth",width:"70px"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.isAuth?e.$t("common.yes"):e.$t("common.no")))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.systemApi.isOpen"),"show-overflow-tooltip":!0,align:"center",prop:"isOpen",width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.isOpen?e.$t("common.yes"):e.$t("common.no")))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.systemApi.isPersist"),"show-overflow-tooltip":!0,align:"center",prop:"isOpen",width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.isPersist?e.$t("common.yes"):e.$t("common.no")))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.createTime"),sortable:"custom","show-overflow-tooltip":!0,align:"center",prop:"className",width:"170px"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.createTime))])]}}])}),s("el-table-column",{attrs:{label:e.$t("table.operation"),"column-key":"operation",align:"center","class-name":"small-padding fixed-width",fixed:"right",width:"110px"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[s("i",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["systemApi:update"],expression:"['systemApi:update']"}],staticClass:"el-icon-edit table-operation",staticStyle:{color:"#2db7f5"},on:{click:function(t){return e.edit(i)}}}),s("i",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["systemApi:delete"],expression:"['systemApi:delete']"}],staticClass:"el-icon-delete table-operation",staticStyle:{color:"#f50"},on:{click:function(t){return e.singleDelete(i)}}}),s("i",{staticClass:"el-icon-view table-operation",staticStyle:{color:"#87d068"},on:{click:function(t){return e.onView(i)}}})]}}])})],1),s("pagination",{directives:[{name:"show",rawName:"v-show",value:e.tableData.total>0,expression:"tableData.total>0"}],attrs:{limit:e.queryParams.size,page:e.queryParams.current,total:Number(e.tableData.total)},on:{"update:limit":function(t){return e.$set(e.queryParams,"size",t)},"update:page":function(t){return e.$set(e.queryParams,"current",t)},pagination:e.fetch}}),s("el-drawer",{attrs:{"before-close":e.closeDrawer,visible:e.drawer,direction:"rtl"},on:{"update:visible":function(t){e.drawer=t}},model:{value:e.currentRow,callback:function(t){e.currentRow=t},expression:"currentRow"}},[s("div",{staticClass:"clearfix",attrs:{slot:"title"},slot:"title"},[e._v(e._s(e.currentRow.path))]),s("el-scrollbar",{staticStyle:{height:"100%"}},[s("el-card",{staticClass:"box-card"},[s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.code"))+":")]),s("aside",[e._v(e._s(e.currentRow.code))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.name"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.name))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.describe"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.describe))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.requestMethod"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.requestMethod))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.contentType"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.contentType))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.serviceId"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.serviceId))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.path"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.path))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.status"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.status?"是":"否"))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.isPersist"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.isPersist?"是":"否"))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.isAuth"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.isAuth?"是":"否"))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.isOpen"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.isOpen?"是":"否"))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.isPersist"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.isPersist?"是":"否"))])]),s("div",{staticClass:"box-item"},[s("span",{staticClass:"field-label"},[e._v(e._s(e.$t("table.systemApi.className"))+":")]),s("aside",{},[e._v(e._s(e.currentRow.className+"."+e.currentRow.methodName))])])])],1)],1),s("system-api-edit",{ref:"edit",attrs:{"dialog-visible":e.dialog.isVisible,type:e.dialog.type},on:{close:e.editClose,success:e.editSuccess}}),s("system-api-scan",{ref:"scan",attrs:{"dialog-visible":e.dialogScan.isVisible,type:e.dialogScan.type},on:{close:e.scanClose,success:e.editSuccess}}),s("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:"预览",width:"80%",top:"50px",visible:e.preview.isVisible},on:{"update:visible":function(t){return e.$set(e.preview,"isVisible",t)}}},[s("el-scrollbar",[s("div",{domProps:{innerHTML:e._s(e.preview.context)}})])],1)],1)},a=[],r=(s("c740"),s("4160"),s("caad"),s("d81d"),s("d3b7"),s("ac1f"),s("2532"),s("841c"),s("1276"),s("159b"),s("5530")),n=s("333d"),o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-dialog",{attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:e.title,type:e.type,visible:e.isVisible,width:e.width,top:"50px"},on:{"update:visible":function(t){e.isVisible=t}}},[s("el-form",{ref:"form",attrs:{model:e.systemApi,rules:e.rules,"label-position":"right","label-width":"100px"}},[s("el-form-item",{attrs:{label:e.$t("table.systemApi.serviceId"),prop:"serviceId"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{disabled:"view"===e.type,placeholder:"",value:""},model:{value:e.systemApi.serviceId,callback:function(t){e.$set(e.systemApi,"serviceId",t)},expression:"systemApi.serviceId"}},e._l(e.serviceList,(function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),s("el-form-item",{attrs:{label:e.$t("table.systemApi.code"),prop:"code"}},[s("el-input",{attrs:{disabled:"view"===e.type||"edit"===e.type},model:{value:e.systemApi.code,callback:function(t){e.$set(e.systemApi,"code",t)},expression:"systemApi.code"}})],1),s("el-form-item",{attrs:{label:e.$t("table.systemApi.name"),prop:"name"}},[s("el-input",{attrs:{disabled:"view"===e.type},model:{value:e.systemApi.name,callback:function(t){e.$set(e.systemApi,"name",t)},expression:"systemApi.name"}})],1),s("el-form-item",{attrs:{label:e.$t("table.systemApi.path"),prop:"path"}},[s("el-input",{attrs:{disabled:"view"===e.type},model:{value:e.systemApi.path,callback:function(t){e.$set(e.systemApi,"path",t)},expression:"systemApi.path"}})],1),s("el-form-item",{attrs:{label:e.$t("table.systemApi.status"),prop:"status"}},[s("el-radio-group",{attrs:{border:"true",size:"small"},model:{value:e.systemApi.status,callback:function(t){e.$set(e.systemApi,"status",t)},expression:"systemApi.status"}},[s("el-radio-button",{attrs:{label:!0}},[e._v(e._s(e.$t("common.status.valid")))]),s("el-radio-button",{attrs:{label:!1}},[e._v(e._s(e.$t("common.status.invalid")))])],1),s("aside",{staticClass:"tips"},[e._v('禁用:提示"请求地址,禁止访问!";')])],1),s("el-form-item",{attrs:{label:e.$t("table.systemApi.isAuth"),prop:"isAuth"}},[s("el-radio-group",{attrs:{size:"small"},model:{value:e.systemApi.isAuth,callback:function(t){e.$set(e.systemApi,"isAuth",t)},expression:"systemApi.isAuth"}},[s("el-radio-button",{attrs:{label:!0}},[e._v(e._s(e.$t("common.yes")))]),s("el-radio-button",{attrs:{label:!1}},[e._v(e._s(e.$t("common.no")))])],1),s("aside",{staticClass:"tips"},[e._v('是:未认证登录,提示"认证失败,请重新登录!";否: 不需要认证登录')])],1),s("el-form-item",{attrs:{label:e.$t("table.systemApi.describe"),prop:"describe"}},[s("el-input",{model:{value:e.systemApi.describe,callback:function(t){e.$set(e.systemApi,"describe",t)},expression:"systemApi.describe"}})],1)],1),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(t){e.isVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),s("el-button",{attrs:{plain:"",type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("common.confirm")))])],1)],1)},c=[],l=(s("542c"),s("9256")),u={page:{method:"POST",url:"/systemApi/page"},update:{method:"PUT",url:"/systemApi"},save:{method:"POST",url:"/systemApi"},delete:{method:"DELETE",url:"/systemApi"},preview:{method:"POST",url:"/systemApi/preview"},export:{method:"POST",url:"/systemApi/export"},import:{method:"POST",url:"/systemApi/import"}},d={page:function(e){return Object(l["a"])(Object(r["a"])(Object(r["a"])({},u.page),{},{data:e}))},scan:function(e){return Object(l["a"])({method:"GET",url:"/".concat(e,"/systemApiScan")})},save:function(e){return Object(l["a"])(Object(r["a"])(Object(r["a"])({},u.save),{},{data:e}))},update:function(e){return Object(l["a"])(Object(r["a"])(Object(r["a"])({},u.update),{},{data:e}))},delete:function(e){return Object(l["a"])(Object(r["a"])(Object(r["a"])({},u.delete),{},{data:e}))},preview:function(e){return Object(l["a"])(Object(r["a"])(Object(r["a"])({},u.preview),{},{data:e}))},export:function(e){return Object(l["a"])(Object(r["a"])(Object(r["a"])({},u.export),{},{responseType:"blob",data:e}))},import:function(e){return Object(l["a"])(Object(r["a"])(Object(r["a"])({},u.import),{},{data:e}))}},m={name:"SystemApiEdit",components:{},props:{dialogVisible:{type:Boolean,default:!1},type:{type:String,default:"add"}},data:function(){return{remoteSystemApiLoading:!1,systemApi:this.initSystemApi(),screenWidth:0,width:this.initWidth(),orgList:[],systemApiList:[],rules:{name:[{required:!0,message:this.$t("rules.require"),trigger:"blur"},{min:1,max:255,message:this.$t("rules.range4to10"),trigger:"blur"}],status:{required:!0,message:this.$t("rules.require"),trigger:"blur"},serviceId:[{required:!0,message:this.$t("rules.require"),trigger:"blur"},{min:1,max:50,message:this.$t("rules.range4to10"),trigger:"blur"}]},serviceList:[{id:"ceres-authority-server",name:"权限服务"},{id:"ceres-file-server",name:"文件服务"},{id:"ceres-msgs-server",name:"消息服务"},{id:"ceres-demo-server",name:"演示服务"},{id:"ceres-order-server",name:"订单服务"}]}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}},title:function(){return"add"===this.type?this.$t("common.add"):this.$t("common.edit")}},watch:{},mounted:function(){var e=this;window.onresize=function(){return function(){e.width=e.initWidth()}()}},methods:{initSystemApi:function(){return{id:"",code:"",describe:"",requestMethod:"",contentType:"",serviceId:"",path:"",status:!0,isOpen:!0,isAuth:!1}},initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<991?"90%":this.screenWidth<1400?"45%":"800px"},loadListOptions:function(e){var t=e.callback;t()},setSystemApi:function(e,t){var s=this;s.orgList=t,e&&(s.systemApi=Object(r["a"])({},e))},close:function(){this.$emit("close")},reset:function(){this.$refs.form.clearValidate(),this.$refs.form.resetFields(),this.systemApi=this.initSystemApi()},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;e.editSubmit()}))},editSubmit:function(){var e=this;"add"===e.type?e.save():e.update()},save:function(){var e=this;d.save(this.systemApi).then((function(t){var s=t.data;s.isSuccess&&(e.isVisible=!1,e.$message({message:e.$t("tips.createSuccess"),type:"success"}),e.$emit("success"))}))},update:function(){var e=this;d.update(this.systemApi).then((function(t){var s=t.data;s.isSuccess&&(e.isVisible=!1,e.$message({message:e.$t("tips.updateSuccess"),type:"success"}),e.$emit("success"))}))}}},p=m,f=(s("08e6"),s("2877")),h=Object(f["a"])(p,o,c,!1,null,"9b2b491e",null),b=h.exports,v=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-dialog",{attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:e.title,type:e.type,visible:e.isVisible,width:e.width,top:"50px"},on:{"update:visible":function(t){e.isVisible=t}}},[s("el-form",{ref:"form",attrs:{model:e.systemApi,rules:e.rules,"label-position":"right","label-width":"100px"}},[s("el-form-item",{attrs:{label:e.$t("table.systemApi.serviceId"),prop:"serviceId"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{disabled:"view"===e.type,placeholder:"",value:""},model:{value:e.systemApi.serviceId,callback:function(t){e.$set(e.systemApi,"serviceId",t)},expression:"systemApi.serviceId"}},e._l(e.serviceList,(function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(t){e.isVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),s("el-button",{attrs:{plain:"",type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("common.confirm")))])],1)],1)},y=[],g={name:"SystemApiScan",components:{},props:{dialogVisible:{type:Boolean,default:!1},type:{type:String,default:"add"}},data:function(){return{screenWidth:0,width:this.initWidth(),rules:{},systemApi:{serviceId:"authority"},serviceList:[{id:"authority",name:"权限服务"},{id:"file",name:"文件服务"},{id:"msgs",name:"消息服务"},{id:"demo",name:"演示服务"},{id:"order",name:"订单服务"}]}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}},title:function(){return"扫描Rest接口"}},watch:{},mounted:function(){var e=this;window.onresize=function(){return function(){e.width=e.initWidth()}()}},methods:{initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<991?"90%":this.screenWidth<1400?"45%":"800px"},close:function(){this.$emit("close")},reset:function(){this.$refs.form.clearValidate(),this.$refs.form.resetFields(),this.serviceId="authority"},submitForm:function(){var e=this;d.scan(this.systemApi.serviceId).then((function(t){var s=t.data;s.isSuccess&&e.$message({message:"扫描成功,请稍后刷新数据",type:"success"})}))}}},w=g,A=(s("bff7"),Object(f["a"])(w,v,y,!1,null,"5cd749d4",null)),_=A.exports,x=s("a888"),$=s("1771"),O={name:"SystemApi",directives:{elDragDialog:x["a"]},components:{Pagination:n["a"],SystemApiEdit:b,SystemApiScan:_},filters:{},data:function(){return{dialogScan:{isVisible:!1,type:"add"},dialog:{isVisible:!1,type:"add"},preview:{isVisible:!1,context:""},tableKey:0,loading:!1,queryParams:Object($["e"])({model:{}}),selection:[],tableData:{total:0},drawer:!1,currentRow:{}}},computed:{},mounted:function(){this.fetch()},methods:{onSelectChange:function(e){this.selection=e},exportExcelPreview:function(){var e=this;this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出接口数据",d.preview(this.queryParams).then((function(t){var s=t.data;e.preview.isVisible=!0,e.preview.context=s.data}))},exportExcel:function(){this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出接口数据",d.export(this.queryParams).then((function(e){Object($["a"])(e)}))},fetch:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.loading=!0,this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.current=t.current?t.current:this.queryParams.current,this.queryParams.size=t.size?t.size:this.queryParams.size,d.page(this.queryParams).then((function(t){var s=t.data;s.isSuccess&&(e.tableData=s.data)})).finally((function(){return e.loading=!1}))},singleDelete:function(e){this.$refs.table.clearSelection(),this.$refs.table.toggleRowSelection(e,!0),this.batchDelete()},batchDelete:function(){var e=this;if(this.selection.length){var t=this.selection.findIndex((function(e){return e.isPersist}));t>-1?this.$message({message:"不能删除内置数据",type:"warning"}):this.$confirm(this.$t("tips.confirmDelete"),this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){var t=e.selection.map((function(e){return e.id}));e.delete(t)})).catch((function(){e.clearSelections()}))}else this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},clearSelections:function(){this.$refs.table.clearSelection()},delete:function(e){var t=this;d.delete({ids:e}).then((function(e){var s=e.data;s.isSuccess&&t.$message({message:t.$t("tips.deleteSuccess"),type:"success"}),t.search()}))},search:function(){this.fetch(Object(r["a"])({},this.queryParams))},reset:function(){this.queryParams={},this.$refs.table.clearSort(),this.$refs.table.clearFilter(),this.search()},sortChange:function(e){this.queryParams.sort=e.prop,this.queryParams.order=e.order,this.queryParams.sort&&this.search()},filterChange:function(e){for(var t in e)if(t.includes(".")){var s={};s[t.split(".")[1]]=e[t][0],this.queryParams.model[t.split(".")[0]]=s}else this.queryParams.model[t]=e[t][0];this.search()},onView:function(e){this.currentRow=e,this.drawer=!0},closeDrawer:function(e){e(),this.currentRow={}},cellClick:function(e,t){var s=this;if("operation"!==t["columnKey"]){var i=!1;this.selection.forEach((function(t){t.id===e.id&&(i=!0,s.$refs.table.toggleRowSelection(e))})),i||this.$refs.table.toggleRowSelection(e,!0)}},editClose:function(){this.dialog.isVisible=!1},scanClose:function(){this.dialogScan.isVisible=!1},editSuccess:function(){this.search()},add:function(){this.dialog.type="add",this.dialog.isVisible=!0,this.$refs.edit.setSystemApi(!1)},scan:function(){this.dialogScan.type="add",this.dialogScan.isVisible=!0},edit:function(e){this.$refs.edit.setSystemApi(e),this.dialog.type="edit",this.dialog.isVisible=!0}}},S=O,C=(s("ab68"),Object(f["a"])(S,i,a,!1,null,"b768e4dc",null));t["default"]=C.exports},a698:function(e,t,s){},a888:function(e,t,s){"use strict";s("99af"),s("caad"),s("ac1f"),s("2532"),s("5319");var i={bind:function(e,t,s){var i=e.querySelector(".el-dialog__header"),a=e.querySelector(".el-dialog");i.style.cssText+=";cursor:move;",a.style.cssText+=";top:0px;";var r=function(){return window.document.currentStyle?function(e,t){return e.currentStyle[t]}:function(e,t){return getComputedStyle(e,!1)[t]}}();i.onmousedown=function(e){var t=e.clientX-i.offsetLeft,n=e.clientY-i.offsetTop,o=a.offsetWidth,c=a.offsetHeight,l=document.body.clientWidth,u=document.body.clientHeight,d=a.offsetLeft,m=l-a.offsetLeft-o,p=a.offsetTop,f=u-a.offsetTop-c,h=r(a,"left"),b=r(a,"top");h.includes("%")?(h=+document.body.clientWidth*(+h.replace(/\%/g,"")/100),b=+document.body.clientHeight*(+b.replace(/\%/g,"")/100)):(h=+h.replace(/\px/g,""),b=+b.replace(/\px/g,"")),document.onmousemove=function(e){var i=e.clientX-t,r=e.clientY-n;-i>d?i=-d:i>m&&(i=m),-r>p?r=-p:r>f&&(r=f),a.style.cssText+=";left:".concat(i+h,"px;top:").concat(r+b,"px;"),s.child.$emit("dragDialog")},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null}}}},a=function(e){e.directive("el-drag-dialog",i)};window.Vue&&(window["el-drag-dialog"]=i,Vue.use(a)),i.install=a;t["a"]=i},a906:function(e,t,s){},ab68:function(e,t,s){"use strict";var i=s("a698"),a=s.n(i);a.a},bff7:function(e,t,s){"use strict";var i=s("a906"),a=s.n(i);a.a},c2cf:function(e,t,s){"use strict";var i=s("5530"),a=s("9256"),r={enums:{method:"GET",url:"/enums"}};t["a"]={uploadFile:"".concat("https://pos.admin.api.lotus-wallet.com","/attachment/upload"),enums:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},r.enums),{},{data:e}))}}},ebb5:function(e,t,s){"use strict";var i=s("5530"),a=s("9256"),r={page:{method:"POST",url:"/dictionaryItem/page"},update:{method:"PUT",url:"/dictionaryItem"},save:{method:"POST",url:"/dictionaryItem"},delete:{method:"DELETE",url:"/dictionaryItem"},list:{method:"GET",url:"/dictionaryItem/codes"},preview:{method:"POST",url:"/dictionaryItem/preview"},export:{method:"POST",url:"/dictionaryItem/export"},import:{method:"POST",url:"/dictionaryItem/import"}};t["a"]={page:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},r.page),{},{data:e}))},save:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},r.save),{},{data:e}))},update:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},r.update),{},{data:e}))},delete:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},r.delete),{},{data:e}))},list:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},r.list),{},{data:e}))},preview:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},r.preview),{},{data:e}))},export:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},r.export),{},{responseType:"blob",data:e}))},import:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},r.import),{},{data:e}))}}}}]); |