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
28 KiB
1 lines
28 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0d374088"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,r,n){return e/=n/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var n=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 o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,r){var i=o(),s=e-i,c=20,l=0;t="undefined"===typeof t?500:t;var u=function e(){l+=c;var o=Math.easeInOutQuad(l,i,s,t);a(o),l<t?n(e):r&&"function"===typeof r&&r()};u()}},1771:function(e,t,r){"use strict";r.d(t,"f",(function(){return c})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"a",(function(){return p})),r.d(t,"e",(function(){return m}));r("caad"),r("d3b7"),r("ac1f"),r("8a79"),r("2532"),r("3ca3"),r("1276"),r("2ca0"),r("498a"),r("ddb0"),r("2b3d");var n=r("5530"),a=r("b85c"),o=r("c2cf"),i=r("ebb5"),s=void 0,c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"authority";"string"===typeof e&&(e=[e]),e&&e.length>0&&o["a"].enums({codes:e},r).then((function(r){var n,o=r.data,i=Object(a["a"])(e);try{for(i.s();!(n=i.n()).done;){var s=n.value;t[s]=o.data[s]}}catch(c){i.e(c)}finally{i.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&&i["a"].list({codes:e}).then((function(r){var n,o=r.data,i=Object(a["a"])(e);try{for(i.s();!(n=i.n()).done;){var s=n.value;t[s]=o.data[s]}}catch(c){i.e(c)}finally{i.f()}}))},p=function(e){console.log(e,12);var t=e.data,r=t.type;if(r&&r.includes("application/json")){var n=new FileReader;n.onload=function(e){if(2===e.target.readyState){var t=JSON.parse(e.target.result);s.$message({message:t.msg,type:"warning"})}},n.readAsText(t)}else{var a=e.headers["content-disposition"],o="下载文件.zip";if(a)for(var i=a.split(";"),c=0;c<i.length;c++){var l=i[c];if(null!==l&&""!==l){var u=l.split("=");if(null!==u&&u.length>0&&"filename"===u[0].trim().toLowerCase()){o=decodeURI(u[1]);break}}}(o.startsWith("'")||o.startsWith('"'))&&(o.endsWith("'")||o.endsWith('"'))&&(o=o.substring(1,o.length-1));var d=new Blob([t]),p=document.createElement("a");p.href=window.URL.createObjectURL(d),p.download=o,p.click(),window.URL.revokeObjectURL(p.href)}},m=function(e){var t={size:10,current:1,sort:"id",order:"descending",model:{},map:{},timeRange:null};return e?Object(n["a"])(Object(n["a"])({},t),e):t}},"27ae":function(e,t,r){(function(r){var n,a;(function(t,r){e.exports=r(t)})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof r?r:this,(function(r){"use strict";r=r||{};var o,i=r.Base64,s="2.6.4",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},r=0,n=e.length;r<n;r++)t[e.charAt(r)]=r;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)},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,m=function(e){return e.replace(p,d)},f=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),n=[c.charAt(r>>>18),c.charAt(r>>>12&63),t>=2?"=":c.charAt(r>>>6&63),t>=1?"=":c.charAt(63&r)];return n.join("")},h=r.btoa&&"function"==typeof r.btoa?function(e){return r.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(m(String(e)))},g=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},v=function(e,t){return t?g(b(e)):b(e)},w=function(e){return v(e,!0)};r.Uint8Array&&(o=function(e,t){for(var r="",n=0,a=e.length;n<a;n+=3){var o=e[n],i=e[n+1],s=e[n+2],l=o<<16|i<<8|s;r+=c.charAt(l>>>18)+c.charAt(l>>>12&63)+("undefined"!=typeof i?c.charAt(l>>>6&63):"=")+("undefined"!=typeof s?c.charAt(63&l):"=")}return t?g(r):r});var y,O=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,x=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),r=t-65536;return u(55296+(r>>>10))+u(56320+(1023&r));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))}},P=function(e){return e.replace(O,x)},_=function(e){var t=e.length,r=t%4,n=(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(n>>>16),u(n>>>8&255),u(255&n)];return a.length-=[0,0,2,1][r],a.join("")},j=r.atob&&"function"==typeof r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/\S{1,4}/g,_)},T=function(e){return j(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},S=function(e){return P(j(e))},q=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},C=function(e){return S(q(e))};r.Uint8Array&&(y=function(e){return Uint8Array.from(T(q(e)),(function(e){return e.charCodeAt(0)}))});var k=function(){var e=r.Base64;return r.Base64=i,e};if(r.Base64={VERSION:s,atob:T,btoa:h,fromBase64:C,toBase64:v,utob:m,encode:v,encodeURI:w,btou:P,decode:C,noConflict:k,fromUint8Array:o,toUint8Array:y},"function"===typeof Object.defineProperty){var L=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",L((function(){return C(this)}))),Object.defineProperty(String.prototype,"toBase64",L((function(e){return v(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",L((function(){return v(this,!0)})))}}return r["Meteor"]&&(Base64=r.Base64),e.exports?e.exports.Base64=r.Base64:(n=[],a=function(){return r.Base64}.apply(t,n),void 0===a||(e.exports=a)),{Base64:r.Base64}}))}).call(this,r("c8ba"))},"4fad":function(e,t,r){var n=r("23e7"),a=r("6f53").entries;n({target:"Object",stat:!0},{entries:function(e){return a(e)}})},"6f53":function(e,t,r){var n=r("83ab"),a=r("df75"),o=r("fc6a"),i=r("d1e7").f,s=function(e){return function(t){var r,s=o(t),c=a(s),l=c.length,u=0,d=[];while(l>u)r=c[u++],n&&!i.call(s,r)||d.push(e?[r,s[r]]:s[r]);return d}};e.exports={entries:s(!0),values:s(!1)}},"80a0":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("div",{staticClass:"filter-container"},[r("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.optLog.userName")},model:{value:e.queryParams.model.userName,callback:function(t){e.$set(e.queryParams.model,"userName",t)},expression:"queryParams.model.userName"}}),r("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.optLog.requestIp")},model:{value:e.queryParams.model.requestIp,callback:function(t){e.$set(e.queryParams.model,"requestIp",t)},expression:"queryParams.model.requestIp"}}),r("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"}}),r("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("table.search")))]),r("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"warning"},on:{click:e.reset}},[e._v(e._s(e.$t("table.reset")))]),r("el-dropdown",{directives:[{name:"has-any-permission",rawName:"v-has-any-permission",value:["optLog:delete","optLog:export"],expression:"['optLog:delete','optLog:export']"}],staticClass:"filter-item",attrs:{trigger:"click"}},[r("el-button",[e._v(" "+e._s(e.$t("table.more"))+" "),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["optLog:delete"],expression:"['optLog:delete']"}],nativeOn:{click:function(t){return e.batchDelete(t)}}},[e._v(e._s(e.$t("table.delete"))+" ")]),r("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["optLog:export"],expression:"['optLog:export']"}],nativeOn:{click:function(t){return e.exportExcel(t)}}},[e._v(e._s(e.$t("table.export"))+" ")]),r("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["optLog:export"],expression:"['optLog:export']"}],nativeOn:{click:function(t){return e.exportExcelPreview(t)}}},[e._v(" "+e._s(e.$t("table.exportPreview"))+" ")])],1)],1),r("el-dropdown",{directives:[{name:"has-any-permission",rawName:"v-has-any-permission",value:["optLog:delete"],expression:"['optLog:delete']"}],staticClass:"filter-item",attrs:{trigger:"click"}},[r("el-button",[e._v(" 清理日志 "),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",{nativeOn:{click:function(t){return e.clear(1)}}},[e._v(" 保留一个月 ")]),r("el-dropdown-item",{nativeOn:{click:function(t){return e.clear(2)}}},[e._v(" 保留三个月 ")]),r("el-dropdown-item",{nativeOn:{click:function(t){return e.clear(3)}}},[e._v(" 保留六个月 ")]),r("el-dropdown-item",{nativeOn:{click:function(t){return e.clear(4)}}},[e._v(" 保留一年 ")]),r("el-dropdown-item",{nativeOn:{click:function(t){return e.clear(5)}}},[e._v(" 保留一千条 ")]),r("el-dropdown-item",{nativeOn:{click:function(t){return e.clear(6)}}},[e._v(" 保留一万条 ")]),r("el-dropdown-item",{nativeOn:{click:function(t){return e.clear(7)}}},[e._v(" 保留三万条 ")]),r("el-dropdown-item",{nativeOn:{click:function(t){return e.clear(8)}}},[e._v(" 保留十万条 ")]),r("el-dropdown-item",{nativeOn:{click:function(t){return e.clear(9)}}},[e._v(" 清空所有 ")])],1)],1)],1),r("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:{"filter-change":e.filterChange,"selection-change":e.onSelectChange,"sort-change":e.sortChange,"cell-click":e.cellClick}},[r("el-table-column",{attrs:{align:"center",type:"selection",width:"40px","reserve-selection":!0}}),r("el-table-column",{attrs:{label:e.$t("table.optLog.userName"),"show-overflow-tooltip":!0,align:"center",prop:"userName",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.userName))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.optLog.requestUri"),"show-overflow-tooltip":!0,align:"left","min-width":"120px",prop:"requestUri"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.requestUri))])]}}])}),r("el-table-column",{attrs:{"filter-multiple":!1,filters:e.httpMethodFilters,label:e.$t("table.optLog.httpMethod"),"show-overflow-tooltip":!0,align:"center","column-key":"httpMethod",prop:"httpMethod",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.httpMethod.desc))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.optLog.requestIp"),"show-overflow-tooltip":!0,align:"center",prop:"requestIp",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.requestIp))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.optLog.description"),"show-overflow-tooltip":!0,align:"center","min-width":"100px",prop:"description"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.description))])]}}])}),r("el-table-column",{attrs:{"filter-multiple":!1,filters:e.typeFilters,label:e.$t("table.optLog.type"),"show-overflow-tooltip":!0,align:"center","column-key":"type",prop:"type",width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[r("el-badge",{staticClass:"item",attrs:{type:t.row.type&&"OPT"==t.row.type.code?"success":"danger","is-dot":""}}),e._v(" "+e._s(t.row.type.desc)+" ")],1)]}}])}),r("el-table-column",{attrs:{label:e.$t("table.optLog.actionMethod"),"show-overflow-tooltip":!0,align:"center","min-width":"120px",prop:"actionMethod"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.classPath+"."+t.row.actionMethod))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.optLog.startTime"),"show-overflow-tooltip":!0,align:"center",prop:"startTime",sortable:"custom",width:"170px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.startTime))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.optLog.consumingTime"),"show-overflow-tooltip":!0,align:"center",prop:"consumingTime",width:"110px"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[r("el-tag",{attrs:{type:e._f("timeFilter")(n.consumingTime)}},[e._v(e._s(e.transTime(n.consumingTime)))])]}}])}),r("el-table-column",{attrs:{formatter:e.uaForamt,label:"终端 | 浏览器",prop:"ua",width:"120"}}),r("el-table-column",{attrs:{label:e.$t("table.operation"),"column-key":"operation",align:"center","class-name":"small-padding fixed-width",width:"110px"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[r("i",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["optLog:delete"],expression:"['optLog:delete']"}],staticClass:"el-icon-delete table-operation",staticStyle:{color:"#f50"},on:{click:function(t){return e.singleDelete(n)}}}),r("i",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["optLog:view"],expression:"['optLog:view']"}],staticClass:"el-icon-view table-operation",staticStyle:{color:"#87d068"},on:{click:function(t){return e.onView(n)}}}),r("el-link",{directives:[{name:"has-no-permission",rawName:"v-has-no-permission",value:["optLog:delete","optLog:view"],expression:"['optLog:delete','optLog:view']"}],staticClass:"no-perm"},[e._v(e._s(e.$t("tips.noPermission"))+" ")])]}}])})],1),r("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}}),r("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"}},[r("div",{staticClass:"clearfix",attrs:{slot:"title"},slot:"title"},[r("el-badge",{staticClass:"item",attrs:{type:e.currentRow.type&&"OPT"==e.currentRow.type.code?"success":"danger","is-dot":""}}),e._v(" "+e._s(e.currentRow.type?e.currentRow.type.desc:"")+" "+e._s(e.currentRow.requestUri)+" ")],1),r("el-scrollbar",{staticStyle:{height:"100%"}},[r("el-card",{staticClass:"box-card"},[r("div",{staticClass:"box-item"},[r("span",{staticClass:"field-label"},[e._v("执行方法:")]),r("aside",[e._v(e._s(e.currentRow.classPath+"."+e.currentRow.actionMethod+"()"))])]),r("div",{staticClass:"box-item"},[r("span",{staticClass:"field-label"},[e._v("请求参数:")]),r("aside",{},[e._v(e._s(e.currentRow.params))])]),r("div",{staticClass:"box-item"},[r("span",{staticClass:"field-label"},[e._v("响应信息:")]),r("aside",{},[r("pre",{staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(e.currentRow.result?JSON.stringify(JSON.parse(e.currentRow.result),null,4):""))])])]),e.currentRow.type&&"EX"===e.currentRow.type["code"]?r("div",{staticClass:"box-item"},[r("span",{staticClass:"field-label"},[e._v("错误信息:")]),r("aside",[e._v(e._s(e.currentRow.exDetail))])]):e._e()])],1)],1),r("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)}}},[r("el-scrollbar",[r("div",{domProps:{innerHTML:e._s(e.preview.context)}})])],1)],1)},a=[],o=(r("4160"),r("caad"),r("d81d"),r("d3b7"),r("ac1f"),r("2532"),r("841c"),r("1276"),r("159b"),r("5530")),i=r("333d"),s=r("fa7d"),c=r("9256"),l={page:{method:"POST",url:"/optLog/page"},delete:{method:"DELETE",url:"/optLog"},clear:{method:"DELETE",url:"/optLog/clear"},preview:{method:"POST",url:"/optLog/preview"},export:{method:"POST",url:"/optLog/export"},import:{method:"POST",url:"/optLog/import"}},u={page:function(e){return Object(c["a"])(Object(o["a"])(Object(o["a"])({},l.page),{},{data:e}))},delete:function(e){return Object(c["a"])(Object(o["a"])(Object(o["a"])({},l.delete),{},{data:e}))},clear:function(e){return Object(c["a"])(Object(o["a"])(Object(o["a"])({},l.clear),{},{data:e}))},preview:function(e){return Object(c["a"])(Object(o["a"])(Object(o["a"])({},l.preview),{},{data:e}))},export:function(e){return Object(c["a"])(Object(o["a"])(Object(o["a"])({},l.export),{},{responseType:"blob",data:e}))},import:function(e){return Object(c["a"])(Object(o["a"])(Object(o["a"])({},l.import),{},{data:e}))}},d=r("a888"),p=r("1771"),m={name:"OptLog",directives:{elDragDialog:d["a"]},components:{Pagination:i["a"]},filters:{timeFilter:function(e){return e<500?"success":e<1e3?"":e<1500?"warning":"danger"}},data:function(){return{tableKey:0,loading:!1,preview:{isVisible:!1,context:""},queryParams:Object(p["e"])({model:{type:{key:null},httpMethod:{key:null}}}),selection:[],tableData:{},enums:{LogType:{},HttpMethod:{}},drawer:!1,currentRow:{}}},computed:{typeFilters:function(){return Object(s["a"])(this.enums.LogType)},httpMethodFilters:function(){return Object(s["a"])(this.enums.HttpMethod)}},mounted:function(){Object(p["c"])(["LogType","HttpMethod"],this.enums),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="导出操作日志",u.preview(this.queryParams).then((function(t){var r=t.data;e.preview.isVisible=!0,e.preview.context=r.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="导出操作日志",u.export(this.queryParams).then((function(e){Object(p["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,u.page(this.queryParams).then((function(t){var r=t.data;r.isSuccess&&(e.tableData=r.data)})).finally((function(){return e.loading=!1}))},clear:function(e){var t=this;this.$confirm("确认要清除日志吗?",this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){u.clear({type:e}).then((function(e){var r=e.data;r.isSuccess&&t.$message({message:t.$t("tips.deleteSuccess"),type:"success"}),t.search()}))})).catch((function(){}))},singleDelete:function(e){this.$refs.table.clearSelection(),this.$refs.table.toggleRowSelection(e,!0),this.batchDelete()},batchDelete:function(){var e=this;this.selection.length?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()})):this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},clearSelections:function(){this.$refs.table.clearSelection()},delete:function(e){var t=this;u.delete({ids:e}).then((function(e){var r=e.data;r.isSuccess&&t.$message({message:t.$t("tips.deleteSuccess"),type:"success"}),t.search()}))},search:function(){this.fetch(Object(o["a"])({},this.queryParams))},reset:function(){this.queryParams=Object(p["e"])({model:{type:{key:null},httpMethod:{key:null}}}),this.$refs.table.clearSort(),this.$refs.table.clearFilter(),this.search()},transTime:function(e){return"".concat(e," ms")},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 r={};r[t.split(".")[1]]=e[t][0],this.queryParams.model[t.split(".")[0]]=r}else this.queryParams.model[t]=e[t][0];this.search()},cellClick:function(e,t){var r=this;if("operation"!==t["columnKey"]){var n=!1;this.selection.forEach((function(t){t.id===e.id&&(n=!0,r.$refs.table.toggleRowSelection(e))})),n||this.$refs.table.toggleRowSelection(e,!0)}},onView:function(e){this.currentRow=e,this.drawer=!0},closeDrawer:function(e){e(),this.currentRow={}},uaForamt:function(e){var t=Object(s["c"])(e.ua);return t.terminal+" | "+t.browser}}},f=m,h=(r("cde1"),r("2877")),b=Object(h["a"])(f,n,a,!1,null,"34a1d448",null);t["default"]=b.exports},"8a79":function(e,t,r){"use strict";var n=r("23e7"),a=r("06cf").f,o=r("50c4"),i=r("5a34"),s=r("1d80"),c=r("ab13"),l=r("c430"),u="".endsWith,d=Math.min,p=c("endsWith"),m=!l&&!p&&!!function(){var e=a(String.prototype,"endsWith");return e&&!e.writable}();n({target:"String",proto:!0,forced:!m&&!p},{endsWith:function(e){var t=String(s(this));i(e);var r=arguments.length>1?arguments[1]:void 0,n=o(t.length),a=void 0===r?n:d(o(r),n),c=String(e);return u?u.call(t,c,a):t.slice(a-c.length,a)===c}})},9256:function(e,t,r){"use strict";r("99af"),r("4160"),r("caad"),r("4fad"),r("d3b7"),r("159b");var n=r("5530"),a=r("bc3a"),o=r.n(a),i=r("5c96"),s=r("5657");r("27ae");function c(e,t){"ECONNABORTED"===e.code?Object(i["Message"])({message:"请求超时"}):e.response&&e.response.data?Object(i["Message"])({message:e.response.data}):e.message&&Object(i["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?i["MessageBox"].alert(e.data.msg,"提醒",{confirmButtonText:"确定",callback:function(){window.location.hash="/login"}}):i["Message"].error(e.data.msg)),t(e)}o.a.interceptors.request.use((function(e){var t=!1!==e.headers["X-isToken"]||e.headers["X-isToken"],r=s["a"].get("TOKEN","");r&&t&&(e.headers.token="Bearer "+r);var n="ceres_admin_web",a="ceres_admin_web";return e.headers["Authorization"]="Basic ".concat("".concat(n,":").concat(a)),e}),(function(e){return Promise.reject(e)})),o.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()},r=e.method.toUpperCase(),a={method:r,url:"".concat("https://pos.admin.api.lotus-wallet.com").concat(e.url),responseType:e.responseType||"",timeout:2e4},i=["PUT","POST","PATCH"];i.includes(r)?a.data=e.data||{}:a.params=Object(n["a"])(Object(n["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 s=new Promise((function(e,t){o()(a).then((function(t){l(t,e)})).catch((function(e){c(e,t)}))}));return s};t["a"]=u},"9fac":function(e,t,r){},a888:function(e,t,r){"use strict";r("99af"),r("caad"),r("ac1f"),r("2532"),r("5319");var n={bind:function(e,t,r){var n=e.querySelector(".el-dialog__header"),a=e.querySelector(".el-dialog");n.style.cssText+=";cursor:move;",a.style.cssText+=";top:0px;";var o=function(){return window.document.currentStyle?function(e,t){return e.currentStyle[t]}:function(e,t){return getComputedStyle(e,!1)[t]}}();n.onmousedown=function(e){var t=e.clientX-n.offsetLeft,i=e.clientY-n.offsetTop,s=a.offsetWidth,c=a.offsetHeight,l=document.body.clientWidth,u=document.body.clientHeight,d=a.offsetLeft,p=l-a.offsetLeft-s,m=a.offsetTop,f=u-a.offsetTop-c,h=o(a,"left"),b=o(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 n=e.clientX-t,o=e.clientY-i;-n>d?n=-d:n>p&&(n=p),-o>m?o=-m:o>f&&(o=f),a.style.cssText+=";left:".concat(n+h,"px;top:").concat(o+b,"px;"),r.child.$emit("dragDialog")},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null}}}},a=function(e){e.directive("el-drag-dialog",n)};window.Vue&&(window["el-drag-dialog"]=n,Vue.use(a)),n.install=a;t["a"]=n},c2cf:function(e,t,r){"use strict";var n=r("5530"),a=r("9256"),o={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(n["a"])(Object(n["a"])({},o.enums),{},{data:e}))}}},cde1:function(e,t,r){"use strict";var n=r("9fac"),a=r.n(n);a.a},ebb5:function(e,t,r){"use strict";var n=r("5530"),a=r("9256"),o={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(n["a"])(Object(n["a"])({},o.page),{},{data:e}))},save:function(e){return Object(a["a"])(Object(n["a"])(Object(n["a"])({},o.save),{},{data:e}))},update:function(e){return Object(a["a"])(Object(n["a"])(Object(n["a"])({},o.update),{},{data:e}))},delete:function(e){return Object(a["a"])(Object(n["a"])(Object(n["a"])({},o.delete),{},{data:e}))},list:function(e){return Object(a["a"])(Object(n["a"])(Object(n["a"])({},o.list),{},{data:e}))},preview:function(e){return Object(a["a"])(Object(n["a"])(Object(n["a"])({},o.preview),{},{data:e}))},export:function(e){return Object(a["a"])(Object(n["a"])(Object(n["a"])({},o.export),{},{responseType:"blob",data:e}))},import:function(e){return Object(a["a"])(Object(n["a"])(Object(n["a"])({},o.import),{},{data:e}))}}},fa7d:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o}));r("c975"),r("b680"),r("ac1f"),r("466d");var n=function(e){var t={terminal:"",browser:"",terminalType:{}};return t.terminalType={trident:e.indexOf("Trident")>-1,presto:e.indexOf("Presto")>-1,webKit:e.indexOf("AppleWebKit")>-1,gecko:e.indexOf("Gecko")>-1&&-1===e.indexOf("KHTML"),mobile:!!e.match(/AppleWebKit.*Mobile.*/),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,iPhone:e.indexOf("iPhone")>-1,iPad:e.indexOf("iPad")>-1,webApp:-1===e.indexOf("Safari"),weixin:e.indexOf("MicroMessenger")>-1,qq:" qq"===e.match(/\sQQ/i)},t.terminalType.ios||t.terminalType.iPhone||t.terminalType.iPad?t.terminal="苹果":t.terminalType.android?t.terminal="安卓":t.terminal="PC",/msie/i.test(e)&&!/opera/.test(e)?t.browser="IE":/firefox/i.test(e)?t.browser="Firefox":/chrome/i.test(e)&&/webkit/i.test(e)&&/mozilla/i.test(e)?t.browser="Chrome":/opera/i.test(e)?t.browser="Opera":/iPad/i.test(e)?t.browser="iPad":!/webkit/i.test(e)||/chrome/i.test(e)&&/webkit/i.test(e)&&/mozilla/i.test(e)?t.browser="未知":t.browser="Safari",t},a=function(e){var t=[];if(e)for(var r in e)t.push({text:e[r],value:r});return t},o=function(e){if(e){var t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),t.className="oInput",t.style.display="none"}}}}]); |