日志模板

This commit is contained in:
小陌 2023-12-26 22:21:54 +08:00
parent ae349f12de
commit dc872e4241
19 changed files with 325 additions and 292 deletions

2
dist/index.html vendored
View File

@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/><meta content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0" name="viewport"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/favicon.ico"><title>X-PHP</title><script>document.write("<script src='config.js'><\/script>");</script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/elicons.337a070a.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/modules.4fd5df59.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/app.3c63c6e7.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/modules.853ca01a.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/app.b015391d.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but X-PHP doesn't work properly without JavaScript enabled.</strong></noscript><div id="app" class="aminui"><div class="app-loading"><div class="app-loading__logo"></div><div class="app-loading__loader"></div></div></div></body><div id="versionCheck" class="versionCheck"><h2>当前浏览器内核版本过低</h2><p>当前版本:<span id="versionCheck-type">--</span> <span id="versionCheck-version">--</span></p><p>最低版本要求Chrome 71+、Firefox 65+、Safari 12+、Edge 97+。</p><p>请升级浏览器版本,或更换现代浏览器,如果你使用的是双核浏览器,请切换到极速/高速模式。</p></div><style>.app-loading {
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/><meta content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0" name="viewport"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/favicon.ico"><title>X-PHP</title><script>document.write("<script src='config.js'><\/script>");</script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/elicons.337a070a.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/modules.4fd5df59.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/app.9b427868.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/modules.853ca01a.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/app.b015391d.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but X-PHP doesn't work properly without JavaScript enabled.</strong></noscript><div id="app" class="aminui"><div class="app-loading"><div class="app-loading__logo"></div><div class="app-loading__loader"></div></div></div></body><div id="versionCheck" class="versionCheck"><h2>当前浏览器内核版本过低</h2><p>当前版本:<span id="versionCheck-type">--</span> <span id="versionCheck-version">--</span></p><p>最低版本要求Chrome 71+、Firefox 65+、Safari 12+、Edge 97+。</p><p>请升级浏览器版本,或更换现代浏览器,如果你使用的是双核浏览器,请切换到极速/高速模式。</p></div><style>.app-loading {
position: absolute;
top:0px;
left:0px;

4
dist/report.html vendored

File diff suppressed because one or more lines are too long

1
dist/static/css/491.f3dc0ec0.css vendored Normal file
View File

@ -0,0 +1 @@
.x-page-header[data-v-dcd32f46]{border-bottom:1px solid hsla(0,0%,92%,.761);padding:10px 20px}.x-page-header .x-page-header__icon[data-v-dcd32f46]{width:40px}.message-header[data-v-dcd32f46]{margin-left:28px;height:60px}.message-header .title-icon[data-v-dcd32f46]{width:30px;height:30px;margin-right:10px;border-radius:4px}.message-header .title[data-v-dcd32f46]{font-size:16px;font-weight:600}.message-body[data-v-dcd32f46],.message-content[data-v-dcd32f46]{position:relative;height:100%}.message-body-side[data-v-dcd32f46]{padding:0 0;width:180px;font-size:14px;background-color:#fff;position:absolute;top:0;left:0;bottom:0;z-index:100;border-right:1px solid #e6e6e6;overflow-y:auto}.message-body-side .side-item[data-v-dcd32f46]{position:relative;height:50px;line-height:50px;padding:0 20px;font-size:13px;cursor:pointer}.message-body-side .side-item i[data-v-dcd32f46]{color:#999}.message-body-content[data-v-dcd32f46]{margin-left:180px;height:100%;overflow:hidden}@media(max-width:767px){.message-body-side[data-v-dcd32f46]{width:0;transition:all .1s;overflow-y:hidden}.message-body-content[data-v-dcd32f46]{margin-left:0;transition:all .1s}}

1
dist/static/css/68.ea6bcc1b.css vendored Normal file
View File

@ -0,0 +1 @@
.container[data-v-fa217f6a]{border:1px solid var(--el-border-color-light);border-radius:4px;background-color:var(--el-fill-color-blank);overflow:hidden}.el-aside[data-v-fa217f6a]{background-color:#fff}

1
dist/static/css/763.51e388fc.css vendored Normal file
View File

@ -0,0 +1 @@
.container[data-v-00d842c9]{border:1px solid var(--el-border-color-light);border-radius:4px;background-color:var(--el-fill-color-blank);overflow:hidden}

View File

@ -1 +0,0 @@
.x-menu-item[data-v-6f16ea6a]{padding:12px 20px;position:relative;cursor:pointer;display:flex;align-items:center}.x-menu-item__icon[data-v-6f16ea6a]{display:inline-block;font-size:12px;border-radius:4px;background-color:#edf2f6;color:#bac5d8;height:1.3em;text-align:center;padding:2px;width:1.3em;line-height:1.3em}.x-menu-item__label[data-v-6f16ea6a]{color:var(--el-text-color-primary);font-size:13px;margin-left:5px}.x-menu-item.is-select .x-menu-item__icon[data-v-6f16ea6a]{color:#fff}.x-menu-item.is-select[data-v-6f16ea6a],.x-menu-item[data-v-6f16ea6a]:hover{background-color:var(--el-menu-background)}.x-menu-item[data-v-6f16ea6a]:before{content:" ";position:absolute;left:0;top:0;bottom:0;width:2px;background-color:var(--background-color);opacity:0}.x-menu-item.is-select[data-v-6f16ea6a]:before{opacity:1}.el-badge .el-badge__content[data-v-6f16ea6a]{border:none;top:0}.el-badge[data-v-6f16ea6a]{position:absolute;right:10px;top:12px}.x-page-header[data-v-dcd32f46]{border-bottom:1px solid hsla(0,0%,92%,.761);padding:10px 20px}.x-page-header .x-page-header__icon[data-v-dcd32f46]{width:40px}.message-header[data-v-dcd32f46]{margin-left:28px;height:60px}.message-header .title-icon[data-v-dcd32f46]{width:30px;height:30px;margin-right:10px;border-radius:4px}.message-header .title[data-v-dcd32f46]{font-size:16px;font-weight:600}.message-body[data-v-dcd32f46],.message-content[data-v-dcd32f46]{position:relative;height:100%}.message-body-side[data-v-dcd32f46]{padding:0 0;width:180px;font-size:14px;background-color:#fff;position:absolute;top:0;left:0;bottom:0;z-index:100;border-right:1px solid #e6e6e6;overflow-y:auto}.message-body-side .side-item[data-v-dcd32f46]{position:relative;height:50px;line-height:50px;padding:0 20px;font-size:13px;cursor:pointer}.message-body-side .side-item i[data-v-dcd32f46]{color:#999}.message-body-content[data-v-dcd32f46]{margin-left:180px;height:100%;overflow:hidden}@media(max-width:767px){.message-body-side[data-v-dcd32f46]{width:0;transition:all .1s;overflow-y:hidden}.message-body-content[data-v-dcd32f46]{margin-left:0;transition:all .1s}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[335],{2335:function(e,t,a){a.r(t),a.d(t,{default:function(){return g}});var l=a(6252),n=a(3577);const r={class:"left-panel"},i={class:"right-panel"},o={class:"right-panel-search"};function u(e,t,a,u,c,s){const d=(0,l.up)("el-tree"),p=(0,l.up)("el-aside"),h=(0,l.up)("el-date-picker"),m=(0,l.up)("el-input"),g=(0,l.up)("el-button"),f=(0,l.up)("el-header"),w=(0,l.up)("xEcharts"),y=(0,l.up)("el-table-column"),k=(0,l.up)("xTable"),C=(0,l.up)("el-main"),b=(0,l.up)("el-container"),_=(0,l.up)("info"),W=(0,l.up)("el-drawer");return(0,l.wg)(),(0,l.iD)(l.HY,null,[(0,l.Wm)(b,null,{default:(0,l.w5)((()=>[(0,l.Wm)(p,{width:"210px"},{default:(0,l.w5)((()=>[(0,l.Wm)(d,{ref:"typeList",class:"menu","node-key":"label",data:c.typeList,"default-expand-all":!0,onNodeClick:s.nodeClick,"current-node-key":c.current,"highlight-current":!0,"expand-on-click-node":!1},null,8,["data","onNodeClick","current-node-key"])])),_:1}),(0,l.Wm)(b,null,{default:(0,l.w5)((()=>[(0,l.Wm)(C,{class:"nopadding"},{default:(0,l.w5)((()=>[(0,l.Wm)(b,null,{default:(0,l.w5)((()=>[(0,l.Wm)(f,null,{default:(0,l.w5)((()=>[(0,l._)("div",r,[(0,l.Wm)(h,{modelValue:c.date,"onUpdate:modelValue":t[0]||(t[0]=e=>c.date=e),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])]),(0,l._)("div",i,[(0,l._)("div",o,[(0,l.Wm)(m,{modelValue:c.search.keyword,"onUpdate:modelValue":t[1]||(t[1]=e=>c.search.keyword=e),placeholder:"输入关键词",clearable:""},null,8,["modelValue"]),(0,l.Wm)(g,{type:"primary",icon:"el-icon-search",onClick:s.upsearch},null,8,["onClick"])])])])),_:1}),"object"===typeof c.chartoption&&Object.keys(c.chartoption).length>0?((0,l.wg)(),(0,l.j4)(f,{key:0,style:{height:"120px"}},{default:(0,l.w5)((()=>[(0,l.Wm)(w,{height:"100%",option:c.chartoption},null,8,["option"])])),_:1})):(0,l.kq)("",!0),(0,l.Wm)(C,{class:"nopadding"},{default:(0,l.w5)((()=>[(0,l.Wm)(k,{ref:"table",api:c.api,params:c.search,tableColumn:c.tableColumn,stripe:"",highlightCurrentRow:"",onRowClick:s.rowClick},{default:(0,l.w5)((()=>[(0,l.Wm)(y,{type:"index",width:"60",align:"center"},{default:(0,l.w5)((e=>[(0,l._)("span",null,(0,n.zw)(e.$index+(c.currentPage-1)*c.limit+1),1)])),_:1})])),_:1},8,["api","params","tableColumn","onRowClick"])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),(0,l.Wm)(W,{modelValue:c.infoDrawer,"onUpdate:modelValue":t[2]||(t[2]=e=>c.infoDrawer=e),title:"日志详情",size:700,"destroy-on-close":""},{default:(0,l.w5)((()=>[(0,l.Wm)(_,{ref:"info"},null,512)])),_:1},8,["modelValue"])],64)}var c=a(6359),s=a(7015),d=a(9399),p={name:"log",components:{info:c["default"],columnItem:d.Z,xEcharts:s.Z},data(){return{infoDrawer:!1,chartoption:{},typeList:[],date:[],data:[],search:{keyword:this.$route.query.keyword||"",type:this.$route.query.type||""},api:"",current:"",config:{},tableColumn:{},column:"default",currentPage:1,limit:20}},mounted(){this.getType()},watch:{current(){this.search.type=this.current,this.getCurrent()}},methods:{changeURLArg(e,t,a){var l=t+"=([^&]*)";if(""===a)return e=e.replace(new RegExp("&?"+l,"gi"),""),e=e.replace(new RegExp("\\??"+l+"&?","gi"),"?"),e;var n=t+"="+a;if(e.match(l)){var r="("+t+"=)([^&]*)";return r=e.replace(new RegExp(r,"gi"),n),r}return e.match("[?]")?e+"&"+n:e+"?"+n},nodeClick(e){if(e.disabled)return!1;this.current=e.label,this.column=e.column||"column"},getType(){this.$http.get("log/admin/types",{type:this.search.type},{cacheparameters:!0}).then((e=>{200==e.code&&Object.assign(this.$data,e.data)}))},getCurrent(){this.tableColumn=this.config[this.column]||this.config.default,this.api||(this.api="log/admin/lists"),this.$refs.table.reload(this.search);var e=this.changeURLArg(window.location.href,"type",this.current);e=this.changeURLArg(e,"keyword",this.search.keyword),history.replaceState(Object.assign({},window.history.state,{url:e}),"null",e)},upsearch(){this.getCurrent()},rowClick(e){this.infoDrawer=!0,this.$nextTick((()=>{this.$refs.info.setData(e)}))}}},h=a(3744);const m=(0,h.Z)(p,[["render",u]]);var g=m}}]);

1
dist/static/js/491.8b221595.js vendored Normal file
View File

@ -0,0 +1 @@
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[491],{6491:function(e,i,a){a.r(i),a.d(i,{default:function(){return p}});var s=a(6252);const t={class:"message-body"},l={class:"message-content"},n={class:"message-body-side"},o={class:"message-body-flexbox"},c={class:"message-body-item"},d={class:"message-body-content"};function u(e,i,a,u,r,h){const m=(0,s.up)("x-page-header"),g=(0,s.up)("x-menu-item"),b=(0,s.up)("table2"),p=(0,s.Q2)("loading");return(0,s.wg)(),(0,s.iD)("div",t,[(0,s.wy)(((0,s.wg)(),(0,s.iD)("div",l,[(0,s._)("div",n,[(0,s._)("div",o,[(0,s.Wm)(m,{title:r.title,icon:r.icon},null,8,["title","icon"])]),(0,s._)("div",c,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(r.items,((e,i)=>((0,s.wg)(),(0,s.j4)(g,{key:i,label:e.label,num:e.num,icon:e.icon,"icon-color":e.color,select:r.search[r.key]==e.value,onClick:i=>h.sideClick(e)},null,8,["label","num","icon","icon-color","select","onClick"])))),128))])]),(0,s._)("div",d,[(0,s.Wm)(b,{ref:"table",onChildLoaded:h.getChildData},null,8,["onChildLoaded"])])])),[[p,r.loading]])])}var r=a(9501),h=a(5016),m={name:"table_3",components:{table2:h["default"],xMenuItem:r.Z},data(){return{loading:!0,icon:"",title:"",items:[],key:"",search:{}}},methods:{sideClick(e){this.info=e,this.search[this.key||"type"]=e.value,this.$refs.table.filterChange(this.search)},getChildData(e){Object.assign(this.$data,e),this.loading=!1}}},g=a(3744);const b=(0,g.Z)(m,[["render",u],["__scopeId","data-v-dcd32f46"]]);var p=b}}]);

1
dist/static/js/68.8c112e48.js vendored Normal file
View File

@ -0,0 +1 @@
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[68],{68:function(e,t,a){a.r(t),a.d(t,{default:function(){return f}});var l=a(6252),n=a(3577);const i={class:"left-panel"},r={class:"right-panel"},o={class:"right-panel-search"};function c(e,t,a,c,u,s){const p=(0,l.up)("x-page-header"),d=(0,l.up)("x-menu-item"),h=(0,l.up)("el-aside"),m=(0,l.up)("el-date-picker"),g=(0,l.up)("el-input"),f=(0,l.up)("el-button"),w=(0,l.up)("el-header"),y=(0,l.up)("xEcharts"),k=(0,l.up)("el-table-column"),C=(0,l.up)("xTable"),b=(0,l.up)("el-main"),x=(0,l.up)("el-container"),_=(0,l.up)("info"),W=(0,l.up)("el-drawer");return(0,l.wg)(),(0,l.iD)(l.HY,null,[(0,l.Wm)(x,null,{default:(0,l.w5)((()=>[(0,l.Wm)(h,{width:"210px"},{default:(0,l.w5)((()=>[(0,l.Wm)(p,{title:"日志",icon:"el-icon-Calendar",style:{padding:"10px 16px"}}),((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(u.typeList,((e,t)=>((0,l.wg)(),(0,l.j4)(d,{key:t,label:e.label,num:e.num,icon:e.icon,"icon-color":e.color,select:u.search.type==e.value,onClick:t=>s.sideClick(e)},null,8,["label","num","icon","icon-color","select","onClick"])))),128))])),_:1}),(0,l.Wm)(x,{style:{padding:"10px 10px 6px 10px"}},{default:(0,l.w5)((()=>[(0,l.Wm)(b,{class:"nopadding"},{default:(0,l.w5)((()=>[(0,l.Wm)(x,{class:"container"},{default:(0,l.w5)((()=>[(0,l.Wm)(w,null,{default:(0,l.w5)((()=>[(0,l._)("div",i,[(0,l.Wm)(m,{modelValue:u.date,"onUpdate:modelValue":t[0]||(t[0]=e=>u.date=e),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])]),(0,l._)("div",r,[(0,l._)("div",o,[(0,l.Wm)(g,{modelValue:u.search.keyword,"onUpdate:modelValue":t[1]||(t[1]=e=>u.search.keyword=e),placeholder:"输入关键词",clearable:""},null,8,["modelValue"]),(0,l.Wm)(f,{type:"primary",icon:"el-icon-search",onClick:s.upsearch},null,8,["onClick"])])])])),_:1}),"object"===typeof u.chartoption&&Object.keys(u.chartoption).length>0?((0,l.wg)(),(0,l.j4)(w,{key:0,style:{height:"120px"}},{default:(0,l.w5)((()=>[(0,l.Wm)(y,{height:"100%",option:u.chartoption},null,8,["option"])])),_:1})):(0,l.kq)("",!0),(0,l.Wm)(b,{class:"nopadding"},{default:(0,l.w5)((()=>[(0,l.Wm)(C,{ref:"table",api:u.api,params:u.search,tableColumn:u.tableColumn,stripe:"",highlightCurrentRow:"",onRowClick:s.rowClick},{default:(0,l.w5)((()=>[(0,l.Wm)(k,{type:"index",width:"60",align:"center"},{default:(0,l.w5)((e=>[(0,l._)("span",null,(0,n.zw)(e.$index+(u.currentPage-1)*u.limit+1),1)])),_:1})])),_:1},8,["api","params","tableColumn","onRowClick"])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),(0,l.Wm)(W,{modelValue:u.infoDrawer,"onUpdate:modelValue":t[2]||(t[2]=e=>u.infoDrawer=e),title:"日志详情",size:700,"destroy-on-close":""},{default:(0,l.w5)((()=>[(0,l.Wm)(_,{ref:"info"},null,512)])),_:1},8,["modelValue"])],64)}var u=a(6359),s=a(7015),p=a(9399),d=a(9501),h={name:"log",components:{info:u["default"],columnItem:p.Z,xMenuItem:d.Z,xEcharts:s.Z},data(){return{infoDrawer:!1,chartoption:{},typeList:[],date:[],data:[],search:{keyword:this.$route.query.keyword||"",type:this.$route.query.type||""},api:"",current:"",config:{},tableColumn:{},column:"default",currentPage:1,limit:20}},mounted(){this.getType()},watch:{current(){this.search.type=this.current,this.getCurrent()}},methods:{sideClick(e){this.info=e,this.search.type=e.value,this.current=e.value,this.column=e.column||"column"},changeURLArg(e,t,a){var l=t+"=([^&]*)";if(""===a)return e=e.replace(new RegExp("&?"+l,"gi"),""),e=e.replace(new RegExp("\\??"+l+"&?","gi"),"?"),e;var n=t+"="+a;if(e.match(l)){var i="("+t+"=)([^&]*)";return i=e.replace(new RegExp(i,"gi"),n),i}return e.match("[?]")?e+"&"+n:e+"?"+n},nodeClick(e){if(e.disabled)return!1;this.current=e.label,this.column=e.column||"column"},getType(){this.$http.get("log/admin/types",{type:this.search.type},{cacheparameters:!0}).then((e=>{200==e.code&&Object.assign(this.$data,e.data)}))},getCurrent(){this.tableColumn=this.config[this.column]||this.config.default,this.api||(this.api="log/admin/lists"),this.$refs.table.reload(this.search);var e=this.changeURLArg(window.location.href,"type",this.current);e=this.changeURLArg(e,"keyword",this.search.keyword),history.replaceState(Object.assign({},window.history.state,{url:e}),"null",e)},upsearch(){this.getCurrent()},rowClick(e){this.infoDrawer=!0,this.$nextTick((()=>{this.$refs.info.setData(e)}))}}},m=a(3744);const g=(0,m.Z)(h,[["render",c],["__scopeId","data-v-fa217f6a"]]);var f=g}}]);

1
dist/static/js/763.dd16f633.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[872],{9872:function(e,l,n){n.r(l),n.d(l,{default:function(){return C}});var t=n(6252);const a={class:"message-body"},s={class:"message-content"},o={class:"message-body-side"},i={class:"message-body-flexbox"},c={class:"message-body-item"},r={class:"message-body-content"};function d(e,l,n,d,u,m){const g=(0,t.up)("x-page-header"),b=(0,t.up)("x-menu-item"),h=(0,t.up)("table2"),p=(0,t.Q2)("loading");return(0,t.wg)(),(0,t.iD)("div",a,[(0,t.wy)(((0,t.wg)(),(0,t.iD)("div",s,[(0,t._)("div",o,[(0,t._)("div",i,[(0,t.Wm)(g,{title:u.title,icon:u.icon},null,8,["title","icon"])]),(0,t._)("div",c,[((0,t.wg)(!0),(0,t.iD)(t.HY,null,(0,t.Ko)(u.items,((e,l)=>((0,t.wg)(),(0,t.j4)(b,{key:l,label:e.label,num:e.num,icon:e.icon,"icon-color":e.color,select:u.search[u.key]==e.value,onClick:l=>m.sideClick(e)},null,8,["label","num","icon","icon-color","select","onClick"])))),128))])]),(0,t._)("div",r,[(0,t.Wm)(h,{ref:"table",onChildLoaded:m.getChildData},null,8,["onChildLoaded"])])])),[[p,u.loading]])])}var u=n(3577);const m={class:"x-menu-item__label"};function g(e,l,n,a,s,o){const i=(0,t.up)("el-icon"),c=(0,t.up)("el-badge");return(0,t.wg)(),(0,t.iD)("div",{class:(0,u.C_)([{"is-select":n.select},"x-menu-item"]),style:(0,u.j5)(s.beforeStyles)},[(0,t.Wm)(i,{style:(0,u.j5)({backgroundColor:n.select?n.iconColor||"var(--el-color-primary)":"#edf2f6"}),class:(0,u.C_)(["x-menu-item__icon",e.iconClass])},{default:(0,t.w5)((()=>[((0,t.wg)(),(0,t.j4)((0,t.LL)(n.icon)))])),_:1},8,["style","class"]),(0,t._)("span",m,(0,u.zw)(n.label),1),n.num>0?((0,t.wg)(),(0,t.j4)(c,{key:0,max:999,value:n.num},null,8,["value"])):(0,t.kq)("",!0)],6)}var b={name:"xMenuItem",components:{},props:{icon:String,iconColor:String,label:String,name:String,num:[String,Number],select:Boolean},data(){return{beforeStyles:{"--background-color":this.iconColor||"var(--el-color-primary)"}}},computed:{},watch:{},mounted(){},methods:{}},h=n(3744);const p=(0,h.Z)(b,[["render",g],["__scopeId","data-v-6f16ea6a"]]);var _=p,f=n(5016),v={name:"table_3",components:{table2:f["default"],xMenuItem:_},data(){return{loading:!0,icon:"",title:"",items:[],key:"",search:{}}},methods:{sideClick(e){this.info=e,this.search[this.key||"type"]=e.value,this.$refs.table.filterChange(this.search)},getChildData(e){Object.assign(this.$data,e),this.loading=!1}}};const y=(0,h.Z)(v,[["render",d],["__scopeId","data-v-dcd32f46"]]);var C=y}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/static/js/xChunks.75bfaa6d.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -61,6 +61,8 @@ export default {
color: var(--el-text-color-primary);
font-size: 13px;
margin-left: 5px;
width: calc(100% - 20px);
overflow: hidden;
}
&.is-select {

View File

@ -1,11 +1,12 @@
<template>
<el-container>
<el-aside width="210px">
<el-tree ref="typeList" class="menu" node-key="label" :data="typeList" :default-expand-all="true" @node-click="nodeClick" :current-node-key="current" :highlight-current="true" :expand-on-click-node="false"> </el-tree>
<x-page-header title="日志" icon="el-icon-Calendar" style="padding: 10px 16px;"></x-page-header>
<x-menu-item v-for="(item, index) in typeList" :key="index" :label="item.label" :num="item.num" :icon="item.icon" :icon-color="item.color" :select="search.type == item.value" @click="sideClick(item)" />
</el-aside>
<el-container>
<el-container style="padding: 10px 10px 6px 10px">
<el-main class="nopadding">
<el-container>
<el-container class="container">
<el-header>
<div class="left-panel">
<el-date-picker v-model="date" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
@ -24,7 +25,7 @@
<xTable ref="table" :api="api" :params="search" :tableColumn="tableColumn" stripe highlightCurrentRow @row-click="rowClick">
<el-table-column type="index" width="60" align="center">
<template #default="scope">
<span>{{scope.$index+(currentPage - 1) * limit + 1}}</span>
<span>{{ scope.$index + (currentPage - 1) * limit + 1 }}</span>
</template>
</el-table-column>
</xTable>
@ -40,15 +41,17 @@
</template>
<script>
import info from './info'
import xEcharts from '@/components/xEcharts'
import columnItem from '@/components/xTable/columnItem'
import info from './info'
import xEcharts from '@/components/xEcharts'
import columnItem from '@/components/xTable/columnItem'
import xMenuItem from '@/components/xMenu/item'
export default {
export default {
name: 'log',
components: {
info,
columnItem,
xMenuItem,
xEcharts
},
data() {
@ -60,15 +63,15 @@
data: [],
search: {
keyword: this.$route.query.keyword || '',
type:this.$route.query.type || ''
type: this.$route.query.type || ''
},
api: '',
current : '',
config : {},
tableColumn : {},
column : 'default',
currentPage:1,
limit:20,
current: '',
config: {},
tableColumn: {},
column: 'default',
currentPage: 1,
limit: 20,
}
},
mounted() {
@ -77,12 +80,18 @@
watch: {
//props
current(){
current() {
this.search.type = this.current;
this.getCurrent();
},
},
methods: {
sideClick(item) {
this.info = item
this.search.type = item.value;
this.current = item.value;
this.column = item.column || 'column';
},
changeURLArg(url, arg, arg_val) {
var pattern = arg + '=([^&]*)';
if (arg_val === '') {
@ -102,43 +111,54 @@
return url + '?' + replaceText;
},
//
nodeClick(data){
nodeClick(data) {
if (data.disabled) {
return false;
}
this.current = data.label;
this.column = data.column || 'column';
},
getType(){
this.$http.get('log/admin/types', {type:this.search.type}, { cacheparameters: true }).then((res) => {
getType() {
this.$http.get('log/admin/types', { type: this.search.type }, { cacheparameters: true }).then((res) => {
if (res.code == 200) {
Object.assign(this.$data, res.data);
}
});
},
getCurrent(){
getCurrent() {
this.tableColumn = this.config[this.column] || this.config.default;
if (!this.api) {
this.api = 'log/admin/lists'
}
this.$refs.table.reload(this.search)
var url = this.changeURLArg(window.location.href, 'type', this.current )
url = this.changeURLArg(url, 'keyword', this.search.keyword )
history.replaceState(Object.assign({},window.history.state,{url: url}), 'null', url);
var url = this.changeURLArg(window.location.href, 'type', this.current)
url = this.changeURLArg(url, 'keyword', this.search.keyword)
history.replaceState(Object.assign({}, window.history.state, { url: url }), 'null', url);
},
upsearch(){
upsearch() {
this.getCurrent()
},
rowClick(row){
rowClick(row) {
this.infoDrawer = true
this.$nextTick(() => {
this.$refs.info.setData(row)
})
}
}
}
}
</script>
<style>
<style scoped>
.container {
border: 1px solid var(--el-border-color-light);
border-radius: 4px;
background-color: var(--el-fill-color-blank);
;
overflow: hidden;
}
.el-aside {
background-color: white;
}
</style>

View File

@ -1,5 +1,6 @@
<template>
<el-container>
<el-container style="padding: 10px 10px 6px 10px">
<el-container class="container">
<el-header>
<div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
@ -17,8 +18,8 @@
<el-table-column label="ID" prop="id" width="50"></el-table-column>
<el-table-column label="" prop="status" width="38">
<template #default="scope">
<x-status-indicator v-if="scope.row.status==1" pulse type="success"></x-status-indicator>
<x-status-indicator v-if="scope.row.status==0" pulse type="info"></x-status-indicator>
<x-status-indicator v-if="scope.row.status == 1" pulse type="success"></x-status-indicator>
<x-status-indicator v-if="scope.row.status == 0" pulse type="info"></x-status-indicator>
</template>
</el-table-column>
<el-table-column label="名称" prop="title" minWidth="100">
@ -86,14 +87,15 @@
</xTable>
</el-main>
</el-container>
</el-container>
<column-dialog v-if="dialog.column" ref="column" @success="handleSuccess" @closed="dialog.column=false"></column-dialog>
<column-dialog v-if="dialog.column" ref="column" @success="handleSuccess" @closed="dialog.column = false"></column-dialog>
</template>
<script>
import columnDialog from './column'
import columnDialog from './column'
export default {
export default {
name: 'tablegen',
components: {
columnDialog,
@ -107,7 +109,7 @@
selection: [],
search: {
keyword: "",
status:'0',
status: '0',
}
}
},
@ -115,36 +117,36 @@
},
methods: {
open(o){
open(o) {
window.open(o.apartmentposter)
},
//
tabChange(status){
tabChange(status) {
this.search.status = status;
this.$refs.table.reload(this.search)
},
//
upsearch(){
upsearch() {
this.$refs.table.reload(this.search)
},
//
add(){
add() {
this.dialog.column = true
this.$nextTick(() => {
this.$refs.column.open()
})
},
//
table_edit(row){
table_edit(row) {
this.dialog.column = true
this.$nextTick(() => {
this.$refs.column.open('edit').setData(row)
})
},
//
async table_copy(row){
var res = await this.$http.post('table/copy', {id: row.id});
if(res.code == 200){
async table_copy(row) {
var res = await this.$http.post('table/copy', { id: row.id });
if (res.code == 200) {
this.$refs.table.reload({})
if (res.data) {
@ -152,23 +154,23 @@
}
this.$message.success("复制成功")
return ;
return;
}
this.$alert(res.message, "提示", {type: 'error'})
this.$alert(res.message, "提示", { type: 'error' })
},
//
async table_del(row, index){
var res = await this.$http.post('table/delete', {id: row.id});
if(res.code == 200){
async table_del(row, index) {
var res = await this.$http.post('table/delete', { id: row.id });
if (res.code == 200) {
// OR /
this.$refs.table.tableData.splice(index, 1);
this.$message.success("删除成功")
return ;
return;
}
this.$alert(res.message, "提示", {type: 'error'})
this.$alert(res.message, "提示", { type: 'error' })
},
//
async batch_del(){
async batch_del() {
this.$confirm(`确定下架选中的 ${this.selection.length} 项吗?`, '提示', {
type: 'warning'
}).then(() => {
@ -187,16 +189,23 @@
})
},
//
selectionChange(selection){
selectionChange(selection) {
this.selection = selection;
},
//
async handleSuccess(){
async handleSuccess() {
this.$refs.table.reload({})
}
}
}
}
</script>
<style>
<style scoped>
.container {
border: 1px solid var(--el-border-color-light);
border-radius: 4px;
background-color: var(--el-fill-color-blank);
;
overflow: hidden;
}
</style>