优化 TABLE
This commit is contained in:
parent
dc872e4241
commit
9b44122b45
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -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.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 {
|
||||
<!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.355889f1.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.13582ee2.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
4
dist/report.html
vendored
File diff suppressed because one or more lines are too long
1
dist/static/css/383.575c7c34.css
vendored
1
dist/static/css/383.575c7c34.css
vendored
@ -1 +0,0 @@
|
||||
.dis-f[data-v-4176f032]{display:flex}.flex-1[data-v-4176f032]{flex:1}.al-item[data-v-4176f032]{align-items:center}.tran-width[data-v-4176f032]{transition:width .2s linear}.hid-box[data-v-4176f032]{width:100%;overflow:hidden;position:relative;overflow-y:scroll}.tab-list-box[data-v-4176f032]{width:100%;height:60px;font-size:16px;color:#525967;position:relative;z-index:666}.tab-box[data-v-4176f032]{height:100%;width:100px;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0 10px;transition:all .3s linear;border-bottom:1px solid transparent}.click-tab[data-v-4176f032]{color:#409eff;border-bottom:2px solid #409eff}.tab-box[data-v-4176f032]:hover{color:#409eff}.tab-info-box-hid[data-v-4176f032]{width:0!important}.tab-info-box[data-v-4176f032]{min-width:100%;min-height:100%;background:#fff;position:absolute;top:0;left:0}
|
1
dist/static/css/472.165ff2be.css
vendored
Normal file
1
dist/static/css/472.165ff2be.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.xlogin .el-input__wrapper{padding:1px 1px}.xlogin .el-input__inner{--el-input-inner-height:auto;padding:4px 10px}code[data-v-398cc4e3]{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px;clear:both;display:initial;cursor:pointer}.el-alert[data-v-398cc4e3]{margin:10px 0 10px}.el-alert[data-v-398cc4e3]:first-child{margin:0}.text[data-v-398cc4e3]{font-size:18px;font-weight:700;height:38px;line-height:38px;color:#000}.link[data-v-398cc4e3]{color:#3b6ff1;cursor:pointer}.x-update[data-v-398cc4e3]{width:100%;height:calc(100% - 102px);padding:15px 20px 20px;background:#fff;overflow:auto}.title-wrap[data-v-398cc4e3]{display:flex;padding:0 15px}.title-wrap .el-icon-setting[data-v-398cc4e3]{width:30px;height:30px;margin-right:12px;border-radius:6px;line-height:30px;text-align:center;background:#2362fb;color:#fff;font-size:18px}.title-wrap .title[data-v-398cc4e3]{font-size:16px;font-weight:700}.title-wrap .description[data-v-398cc4e3]{height:22px;line-height:22px;color:#a2a2a2;font-size:13px}.login-wrap[data-v-398cc4e3]{display:flex;height:40px;align-items:center}.login-wrap .face[data-v-398cc4e3]{width:40px;height:40px;border-radius:50%;overflow:hidden}.login-wrap .face img[data-v-398cc4e3]{width:100%}.login-wrap .name[data-v-398cc4e3]{margin:0 8px}.login-wrap .phone[data-v-398cc4e3]{margin-right:8px}.warning-box[data-v-398cc4e3]{margin-top:10px;margin-bottom:10px}.login-box[data-v-398cc4e3]{max-width:800px;background:#f8f8f8;padding:22px;display:flex;border-radius:6px;justify-content:space-between}.login-box .face[data-v-398cc4e3]{width:40px;height:40px;margin-right:14px;border-radius:50%;overflow:hidden;line-height:40px;background:var(--el-color-primary);font-size:12px;color:#fff;text-align:center;flex-grow:0}.login-box .face img[data-v-398cc4e3]{width:100%}.login-box .info[data-v-398cc4e3]{flex-grow:1;color:#a2a2a2;font-size:12px;line-height:20px}.login-box .name[data-v-398cc4e3]{height:22px;line-height:22px;font-weight:700;font-size:16px;color:#000;margin-right:10px}.login-box .login-box-title[data-v-398cc4e3]{height:22px;line-height:22px;font-weight:700;font-size:16px;color:#333;cursor:pointer}.login-box .login-box-title p[data-v-398cc4e3]{height:28px;font-size:14px;color:#a2a2a2;line-height:28px;font-weight:400}.login-box .el-button[data-v-398cc4e3]{height:31px}.last-time[data-v-398cc4e3]{margin:16px 0;padding:16px 0 0}.version a[data-v-398cc4e3]{color:#3b6ff1}.version button[data-v-398cc4e3]{display:block}.data-back[data-v-398cc4e3]{margin-top:40px}.data-back .link[data-v-398cc4e3]{margin-left:20px}.box[data-v-398cc4e3]{width:820px;border-radius:6px;padding:14px;margin-top:20px;background:#fafafa}.box .database-wrap[data-v-398cc4e3]{margin-top:20px}.box .way[data-v-398cc4e3]{margin:14px 0}.box .back-success[data-v-398cc4e3]{color:#f56c6c;height:30px;line-height:30px;font-size:18px;margin-top:12px}.box .explain[data-v-398cc4e3]{margin-top:14px;line-height:22px;font-size:12px;color:#aaa}.box .explain img[data-v-398cc4e3]{width:16px;vertical-align:middle}.custom[data-v-398cc4e3]{width:200px}.custom p[data-v-398cc4e3]{width:200px;margin:14px 0}.custom1[data-v-398cc4e3]{width:200px;margin-top:14px}.el-dialog[data-v-398cc4e3]{padding-left:25px;padding-right:25px;border-radius:6px}.el-dialog .el-dialog__title .description[data-v-398cc4e3]{font-size:14px;color:#a2a2a2;font-weight:400}.login-form .el-button[data-v-398cc4e3]{width:100%;font-size:16px;height:45px}.form-item.password[data-v-398cc4e3]{margin-top:8px}.form-item p[data-v-398cc4e3]{margin-bottom:8px}.form-item .el-input input[data-v-398cc4e3]{height:47px;background:#f8f8f8}.forget[data-v-398cc4e3]{height:40px;line-height:40px;text-align:right;color:#2362fb}.register[data-v-398cc4e3]{margin-top:20px;text-align:center;color:#2362fb;font-size:16px}.time[data-v-398cc4e3]{display:flex}.time .el-input[data-v-398cc4e3]{width:246px;margin-left:108px}.p-contianer[data-v-398cc4e3]{margin-top:30px;border-top:none}.p-contianer .p-bar[data-v-398cc4e3]{margin-right:0}.update-wrap[data-v-398cc4e3]{margin-top:20px}
|
1
dist/static/css/485.aa70cfc0.css
vendored
Normal file
1
dist/static/css/485.aa70cfc0.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.container[data-v-0d7cfddc]{border:1px solid var(--el-border-color-light);border-radius:4px;background-color:var(--el-fill-color-blank);overflow:hidden}.el-aside[data-v-0d7cfddc]{background-color:#fff}
|
1
dist/static/css/491.f3dc0ec0.css
vendored
1
dist/static/css/491.f3dc0ec0.css
vendored
@ -1 +0,0 @@
|
||||
.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 +1 @@
|
||||
.container .el-header{padding:0 20px}.container .el-tabs__header{margin:0}@media (max-width:992px){.adminui-main>.el-container>.el-container>.el-header .right-panel[data-v-6c12f8f6]{display:block;margin-top:0}}.container[data-v-6c12f8f6]{border:1px solid var(--el-border-color-light);border-radius:4px;background-color:var(--el-fill-color-blank);overflow:hidden}
|
||||
.container .el-header{padding:0 20px}.container .el-tabs__header{margin:0}@media (max-width:992px){.adminui-main>.el-container>.el-container>.el-header .right-panel[data-v-afb09b50]{display:block;margin-top:0}}.container[data-v-afb09b50]{border:1px solid var(--el-border-color-light);border-radius:4px;background-color:var(--el-fill-color-blank);overflow:hidden}
|
1
dist/static/css/68.ea6bcc1b.css
vendored
1
dist/static/css/68.ea6bcc1b.css
vendored
@ -1 +0,0 @@
|
||||
.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/797.03c34bc7.css
vendored
1
dist/static/css/797.03c34bc7.css
vendored
@ -1 +0,0 @@
|
||||
.xlogin .el-input__wrapper{padding:1px 1px}.xlogin .el-input__inner{--el-input-inner-height:auto;padding:4px 10px}code[data-v-3a1638a9]{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px;clear:both;display:initial;cursor:pointer}.el-alert[data-v-3a1638a9]{margin:10px 0 10px}.el-alert[data-v-3a1638a9]:first-child{margin:0}.text[data-v-3a1638a9]{font-size:18px;font-weight:700;height:38px;line-height:38px;color:#000}.link[data-v-3a1638a9]{color:#3b6ff1;cursor:pointer}.x-update[data-v-3a1638a9]{width:100%;height:calc(100% - 102px);padding:15px 20px 20px;background:#fff;overflow:auto}.title-wrap[data-v-3a1638a9]{display:flex;padding:0 15px}.title-wrap .el-icon-setting[data-v-3a1638a9]{width:30px;height:30px;margin-right:12px;border-radius:6px;line-height:30px;text-align:center;background:#2362fb;color:#fff;font-size:18px}.title-wrap .title[data-v-3a1638a9]{font-size:16px;font-weight:700}.title-wrap .description[data-v-3a1638a9]{height:22px;line-height:22px;color:#a2a2a2;font-size:13px}.login-wrap[data-v-3a1638a9]{display:flex;height:40px;align-items:center}.login-wrap .face[data-v-3a1638a9]{width:40px;height:40px;border-radius:50%;overflow:hidden}.login-wrap .face img[data-v-3a1638a9]{width:100%}.login-wrap .name[data-v-3a1638a9]{margin:0 8px}.login-wrap .phone[data-v-3a1638a9]{margin-right:8px}.warning-box[data-v-3a1638a9]{margin-top:10px;margin-bottom:10px}.login-box[data-v-3a1638a9]{max-width:800px;background:#f8f8f8;padding:22px;display:flex;border-radius:6px;justify-content:space-between}.login-box .face[data-v-3a1638a9]{width:40px;height:40px;margin-right:14px;border-radius:50%;overflow:hidden;line-height:40px;background:#2362fb;font-size:12px;color:#fff;text-align:center;flex-grow:0}.login-box .face img[data-v-3a1638a9]{width:100%}.login-box .info[data-v-3a1638a9]{flex-grow:1;color:#a2a2a2;font-size:12px;line-height:20px}.login-box .name[data-v-3a1638a9]{height:22px;line-height:22px;font-weight:700;font-size:16px;color:#000;margin-right:10px}.login-box .login-box-title[data-v-3a1638a9]{height:22px;line-height:22px;font-weight:700;font-size:16px;color:#333;cursor:pointer}.login-box .login-box-title p[data-v-3a1638a9]{height:28px;font-size:14px;color:#a2a2a2;line-height:28px;font-weight:400}.login-box .el-button[data-v-3a1638a9]{height:31px}.last-time[data-v-3a1638a9]{margin:16px 0;padding:16px 0 0}.version a[data-v-3a1638a9]{color:#3b6ff1}.version button[data-v-3a1638a9]{display:block}.data-back[data-v-3a1638a9]{margin-top:40px}.data-back .link[data-v-3a1638a9]{margin-left:20px}.box[data-v-3a1638a9]{width:820px;border-radius:6px;padding:14px;margin-top:20px;background:#fafafa}.box .database-wrap[data-v-3a1638a9]{margin-top:20px}.box .way[data-v-3a1638a9]{margin:14px 0}.box .back-success[data-v-3a1638a9]{color:#f56c6c;height:30px;line-height:30px;font-size:18px;margin-top:12px}.box .explain[data-v-3a1638a9]{margin-top:14px;line-height:22px;font-size:12px;color:#aaa}.box .explain img[data-v-3a1638a9]{width:16px;vertical-align:middle}.custom[data-v-3a1638a9]{width:200px}.custom p[data-v-3a1638a9]{width:200px;margin:14px 0}.custom1[data-v-3a1638a9]{width:200px;margin-top:14px}.el-dialog[data-v-3a1638a9]{padding-left:25px;padding-right:25px;border-radius:6px}.el-dialog .el-dialog__title .description[data-v-3a1638a9]{font-size:14px;color:#a2a2a2;font-weight:400}.login-form .el-button[data-v-3a1638a9]{width:100%;font-size:16px;height:45px}.form-item.password[data-v-3a1638a9]{margin-top:8px}.form-item p[data-v-3a1638a9]{margin-bottom:8px}.form-item .el-input input[data-v-3a1638a9]{height:47px;background:#f8f8f8}.forget[data-v-3a1638a9]{height:40px;line-height:40px;text-align:right;color:#2362fb}.register[data-v-3a1638a9]{margin-top:20px;text-align:center;color:#2362fb;font-size:16px}.time[data-v-3a1638a9]{display:flex}.time .el-input[data-v-3a1638a9]{width:246px;margin-left:108px}.p-contianer[data-v-3a1638a9]{margin-top:30px;border-top:none}.p-contianer .p-bar[data-v-3a1638a9]{margin-right:0}.update-wrap[data-v-3a1638a9]{margin-top:20px}
|
1
dist/static/css/819.b1a5705f.css
vendored
Normal file
1
dist/static/css/819.b1a5705f.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.dis-f[data-v-60337e11]{display:flex}.flex-1[data-v-60337e11]{flex:1}.al-item[data-v-60337e11]{align-items:center}.tran-width[data-v-60337e11]{transition:width .2s linear}.hid-box[data-v-60337e11]{width:100%;overflow:hidden;position:relative;overflow-y:scroll}.tab-list-box[data-v-60337e11]{width:100%;height:60px;font-size:16px;color:#525967;position:relative;z-index:666}.tab-box[data-v-60337e11]{height:100%;width:100px;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0 10px;transition:all .3s linear;border-bottom:1px solid transparent}.click-tab[data-v-60337e11]{border-bottom:2px solid var(--el-color-primary)}.click-tab[data-v-60337e11],.tab-box[data-v-60337e11]:hover{color:var(--el-color-primary)}.tab-info-box-hid[data-v-60337e11]{width:0!important}.tab-info-box[data-v-60337e11]{min-width:100%;min-height:100%;background:#fff;position:absolute;top:0;left:0}
|
1
dist/static/css/873.d70f6a21.css
vendored
Normal file
1
dist/static/css/873.d70f6a21.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.x-page-header[data-v-03db4287]{border-bottom:1px solid hsla(0,0%,92%,.761);padding:10px 20px}.x-page-header .x-page-header__icon[data-v-03db4287]{width:40px}.message-header[data-v-03db4287]{margin-left:28px;height:60px}.message-header .title-icon[data-v-03db4287]{width:30px;height:30px;margin-right:10px;border-radius:4px}.message-header .title[data-v-03db4287]{font-size:16px;font-weight:600}.message-body[data-v-03db4287],.message-content[data-v-03db4287]{position:relative;height:100%}.message-body-side[data-v-03db4287]{padding:0 0;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-03db4287]{position:relative;height:50px;line-height:50px;padding:0 20px;font-size:13px;cursor:pointer}.message-body-side .side-item i[data-v-03db4287]{color:#999}.message-body-content[data-v-03db4287]{height:100%;overflow:hidden}@media(max-width:767px){.message-body-side[data-v-03db4287]{width:0!important;transition:all .1s;overflow-y:hidden}.message-body-content[data-v-03db4287]{margin-left:0!important;transition:all .1s}}
|
1
dist/static/css/app.13582ee2.css
vendored
Normal file
1
dist/static/css/app.13582ee2.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/static/css/app.b015391d.css
vendored
1
dist/static/css/app.b015391d.css
vendored
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/15.d015b660.js
vendored
1
dist/static/js/15.d015b660.js
vendored
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/485.53a8a895.js
vendored
Normal file
1
dist/static/js/485.53a8a895.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[485],{485:function(e,t,a){a.r(t),a.d(t,{default:function(){return g}});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,s,u){const p=(0,l.up)("x-page-header"),h=(0,l.up)("x-menu-item"),d=(0,l.up)("el-aside"),m=(0,l.up)("el-date-picker"),f=(0,l.up)("el-input"),g=(0,l.up)("el-button"),w=(0,l.up)("el-header"),y=(0,l.up)("xEcharts"),b=(0,l.up)("el-table-column"),k=(0,l.up)("xTable"),C=(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)(d,{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)(s.typeList,((e,t)=>((0,l.wg)(),(0,l.j4)(h,{key:t,label:e.label,num:e.num,icon:e.icon,"icon-color":e.color,select:s.search.type==e.value,onClick:t=>u.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)(C,{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:s.date,"onUpdate:modelValue":t[0]||(t[0]=e=>s.date=e),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])]),(0,l._)("div",r,[(0,l._)("div",o,[(0,l.Wm)(f,{modelValue:s.search.keyword,"onUpdate:modelValue":t[1]||(t[1]=e=>s.search.keyword=e),placeholder:"输入关键词",clearable:""},null,8,["modelValue"]),(0,l.Wm)(g,{type:"primary",icon:"el-icon-search",onClick:u.upsearch},null,8,["onClick"])])])])),_:1}),"object"===typeof s.chartoption&&Object.keys(s.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:s.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:s.api,params:s.search,tableColumn:s.tableColumn,stripe:"",highlightCurrentRow:"",onRowClick:u.rowClick},{default:(0,l.w5)((()=>[(0,l.Wm)(b,{type:"index",width:"60",align:"center"},{default:(0,l.w5)((e=>[(0,l._)("span",null,(0,n.zw)(e.$index+(s.currentPage-1)*s.limit+1),1)])),_:1})])),_:1},8,["api","params","tableColumn","onRowClick"])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),(0,l.Wm)(W,{modelValue:s.infoDrawer,"onUpdate:modelValue":t[2]||(t[2]=e=>s.infoDrawer=e),title:"日志详情",size:700,"destroy-on-close":""},{default:(0,l.w5)((()=>[(0,l.Wm)(_,{ref:"info"},null,512)])),_:1},8,["modelValue"])],64)}var s=a(6359),u=a(7015),p=a(8492),h=a(8046),d={name:"log",components:{info:s["default"],columnItem:p.Z,xMenuItem:h.Z,xEcharts:u.Z},data(){return{infoDrawer:!1,chartoption:{},typeList:[],date:[],data:[],search:{},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.$route.query.type},{cacheparameters:!0}).then((e=>{if(200==e.code){Object.assign(this.$data,e.data);for(const e in this.search)Object.prototype.hasOwnProperty.call(this.$route.query,e)&&(this.search[e]=this.$route.query[e])}}))},getCurrent(){this.tableColumn=this.config[this.column]||this.config.default,this.api||(this.api="log/admin/lists"),this.$refs.table.reload(this.search);let e=window.location.href;for(const[t,a]of Object.entries(this.search))e=this.changeURLArg(e,t,a);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 f=(0,m.Z)(d,[["render",c],["__scopeId","data-v-0d7cfddc"]]);var g=f}}]);
|
1
dist/static/js/491.8b221595.js
vendored
1
dist/static/js/491.8b221595.js
vendored
@ -1 +0,0 @@
|
||||
"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/582.7871cb6e.js
vendored
Normal file
1
dist/static/js/582.7871cb6e.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/static/js/68.8c112e48.js
vendored
1
dist/static/js/68.8c112e48.js
vendored
@ -1 +0,0 @@
|
||||
"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 +1 @@
|
||||
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[78],{7078:function(e,n,t){t.r(n),t.d(n,{default:function(){return o}});var u=t(6252);function a(e,n,t,a,r,c){const s=(0,u.up)("table2");return(0,u.wg)(),(0,u.j4)(s,{name:"user"})}var r=t(5016),c={name:"user",components:{table2:r["default"]},data(){return{}},computed:{},watch:{},mounted(){},methods:{}},s=t(3744);const d=(0,s.Z)(c,[["render",a]]);var o=d}}]);
|
||||
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[78],{7078:function(e,n,t){t.r(n),t.d(n,{default:function(){return o}});var u=t(6252);function a(e,n,t,a,r,c){const s=(0,u.up)("table2");return(0,u.wg)(),(0,u.j4)(s,{name:"user"})}var r=t(596),c={name:"user",components:{table2:r["default"]},data(){return{}},computed:{},watch:{},mounted(){},methods:{}},s=t(3744);const d=(0,s.Z)(c,[["render",a]]);var o=d}}]);
|
@ -1 +1 @@
|
||||
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[383],{4383:function(a,e,t){t.r(e),t.d(e,{default:function(){return b}});var i=t(6252),l=t(3577);const n={class:"dis-f",style:{"flex-direction":"column",height:"100%"}},s={class:"left-panel tab-list-box dis-f al-item"},c=["onClick"],d={class:"right-panel"},o={key:0,class:"right-panel-search"},p={class:"flex-1 dis-f"},u={class:"hid-box tran-width"},r={class:"tab-info-box tab-info-box-hid"};function m(a,e,t,m,h,k){const f=(0,i.up)("el-button"),g=(0,i.up)("el-header"),v=(0,i.up)("InstalledApplist"),b=(0,i.up)("plugin-market"),_=(0,i.up)("el-container");return(0,i.wg)(),(0,i.iD)("div",n,[(0,i.Wm)(_,null,{default:(0,i.w5)((()=>[(0,i.Wm)(g,null,{default:(0,i.w5)((()=>[(0,i._)("div",s,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(h.tabList,((a,e)=>((0,i.wg)(),(0,i.iD)("div",{key:e,class:(0,l.C_)(["tab-box",{"click-tab":a.type===h.activeName}]),onClick:e=>k.changeTab(a.type)},(0,l.zw)(a.title),11,c)))),128))]),(0,i._)("div",d,["market"==h.activeName?((0,i.wg)(),(0,i.iD)("div",o,[(0,i.Wm)(f,{type:"primary",size:"small",onClick:e[0]||(e[0]=a=>k.cleanCache()),loading:h.updateloading,icon:"el-icon-opportunity"},{default:(0,i.w5)((()=>[(0,i.Uk)("更新列表")])),_:1},8,["loading"])])):(0,i.kq)("",!0)])])),_:1}),(0,i._)("div",p,[(0,i._)("div",u,[(0,i._)("div",r,["manage"==h.activeName?((0,i.wg)(),(0,i.j4)(v,{key:0})):(0,i.kq)("",!0),"market"==h.activeName?((0,i.wg)(),(0,i.j4)(b,{key:1,ref:"market"},null,512)):(0,i.kq)("",!0)])])])])),_:1})])}var h=t(7440),k=t(8084),f={data(){return{activeName:"manage",updateloading:!1,tabList:[{title:"插件管理",type:"manage"},{title:"插件市场",type:"market"}]}},components:{pluginMarket:h["default"],InstalledApplist:k["default"]},mounted(){},methods:{changeTab(a){this.activeName=a},cleanCache(){this.updateloading=!0,this.$http.post("admin/application/cleanCache",{},{cacheparameters:!0}).then((a=>{200==a.code&&(this.$refs.market.loaddata(),this.updateloading=!1)}))}}},g=t(3744);const v=(0,g.Z)(f,[["render",m],["__scopeId","data-v-4176f032"]]);var b=v}}]);
|
||||
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[819],{9819:function(a,e,t){t.r(e),t.d(e,{default:function(){return b}});var i=t(6252),l=t(3577);const n={class:"dis-f",style:{"flex-direction":"column",height:"100%"}},s={class:"left-panel tab-list-box dis-f al-item"},c=["onClick"],d={class:"right-panel"},o={key:0,class:"right-panel-search"},p={class:"flex-1 dis-f"},u={class:"hid-box tran-width"},r={class:"tab-info-box tab-info-box-hid"};function m(a,e,t,m,h,k){const g=(0,i.up)("el-button"),f=(0,i.up)("el-header"),v=(0,i.up)("InstalledApplist"),b=(0,i.up)("plugin-market"),_=(0,i.up)("el-container");return(0,i.wg)(),(0,i.iD)("div",n,[(0,i.Wm)(_,null,{default:(0,i.w5)((()=>[(0,i.Wm)(f,null,{default:(0,i.w5)((()=>[(0,i._)("div",s,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(h.tabList,((a,e)=>((0,i.wg)(),(0,i.iD)("div",{key:e,class:(0,l.C_)(["tab-box",{"click-tab":a.type===h.activeName}]),onClick:e=>k.changeTab(a.type)},(0,l.zw)(a.title),11,c)))),128))]),(0,i._)("div",d,["market"==h.activeName?((0,i.wg)(),(0,i.iD)("div",o,[(0,i.Wm)(g,{type:"primary",size:"small",onClick:e[0]||(e[0]=a=>k.cleanCache()),loading:h.updateloading,icon:"el-icon-opportunity"},{default:(0,i.w5)((()=>[(0,i.Uk)("更新列表")])),_:1},8,["loading"])])):(0,i.kq)("",!0)])])),_:1}),(0,i._)("div",p,[(0,i._)("div",u,[(0,i._)("div",r,["manage"==h.activeName?((0,i.wg)(),(0,i.j4)(v,{key:0})):(0,i.kq)("",!0),"market"==h.activeName?((0,i.wg)(),(0,i.j4)(b,{key:1,ref:"market"},null,512)):(0,i.kq)("",!0)])])])])),_:1})])}var h=t(7440),k=t(9725),g={data(){return{activeName:"manage",updateloading:!1,tabList:[{title:"插件管理",type:"manage"},{title:"插件市场",type:"market"}]}},components:{pluginMarket:h["default"],InstalledApplist:k["default"]},mounted(){},methods:{changeTab(a){this.activeName=a},cleanCache(){this.updateloading=!0,this.$http.post("admin/application/cleanCache",{},{cacheparameters:!0}).then((a=>{200==a.code&&(this.$refs.market.loaddata(),this.updateloading=!1)}))}}},f=t(3744);const v=(0,f.Z)(g,[["render",m],["__scopeId","data-v-60337e11"]]);var b=v}}]);
|
1
dist/static/js/873.35155abf.js
vendored
Normal file
1
dist/static/js/873.35155abf.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[873],{7873:function(e,t,i){i.r(t),i.d(t,{default:function(){return b}});var s=i(6252),a=i(3577);const l={class:"message-body"},n={class:"message-content"},o={class:"message-body-flexbox"},d={class:"message-body-item"};function c(e,t,i,c,h,u){const r=(0,s.up)("x-page-header"),m=(0,s.up)("x-menu-item"),g=(0,s.up)("table2"),b=(0,s.Q2)("loading");return(0,s.wg)(),(0,s.iD)("div",l,[(0,s.wy)(((0,s.wg)(),(0,s.iD)("div",n,[(0,s._)("div",{class:"message-body-side",style:(0,a.j5)({width:h.width+"px"})},[(0,s._)("div",o,[(0,s.Wm)(r,{title:h.title,icon:h.icon},null,8,["title","icon"])]),(0,s._)("div",d,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(h.items,((e,t)=>((0,s.wg)(),(0,s.j4)(m,{key:t,label:e.label,num:e.num,icon:e.icon,"icon-color":e.color,select:h.search[h.key]==e.value,onClick:t=>u.sideClick(e)},null,8,["label","num","icon","icon-color","select","onClick"])))),128))])],4),(0,s._)("div",{class:"message-body-content",style:(0,a.j5)({"margin-left":h.width+"px"})},[(0,s.Wm)(g,{ref:"table",onChildLoaded:u.getChildData},null,8,["onChildLoaded"])],4)])),[[b,h.loading]])])}var h=i(8046),u=i(596),r={name:"table_3",components:{table2:u["default"],xMenuItem:h.Z},data(){return{loading:!0,icon:"",width:180,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}}},m=i(3744);const g=(0,m.Z)(r,[["render",c],["__scopeId","data-v-03db4287"]]);var b=g}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -63,6 +63,7 @@ export default {
|
||||
margin-left: 5px;
|
||||
width: calc(100% - 20px);
|
||||
overflow: hidden;
|
||||
white-space:nowrap
|
||||
}
|
||||
|
||||
&.is-select {
|
||||
|
@ -1,125 +1,113 @@
|
||||
<template>
|
||||
<div style="display: flex;">
|
||||
<el-badge v-if="item.status && item.status.key && row[item.status.key]" is-dot class="item" :type="item.status.type || 'primary'" style="width: 10px;cursor: pointer;line-height: 38px;"></el-badge>
|
||||
<x-avatar v-if="item.columntype=='avatar' || item.component=='avatar'" :name="item.name" :options="item.options" :data="row"></x-avatar>
|
||||
<el-badge v-else-if="item.columntype=='badge' || item.columntype=='imagegroup'" :value="getType(row[item.name])" @click="handleClick(row, item)" :type="item.options.type || 'warning'"></el-badge>
|
||||
<el-image v-else-if="item.columntype=='image'" :preview-src-list="[getImg(row[item.name])]" :preview-teleported="true" hide-on-click-modal="true" lazy="true" style="max-width: 60px; height: 26px; border-radius: 2px;" fit="cover" :src="getImg(row[item.name])">
|
||||
<el-badge v-if="item.status && item.status.key && row[item.status.key]" is-dot class="item" :type="item.status.type || 'primary'" style="width: 10px;cursor: pointer;margin-top: 10px;"></el-badge>
|
||||
<x-avatar v-if="item.columntype == 'avatar' || item.component == 'avatar'" :name="item.name" :options="item.options" :data="row"></x-avatar>
|
||||
<el-badge v-else-if="item.columntype == 'badge' || item.columntype == 'imagegroup'" :value="getType(row[item.name])" @click="handleClick(row, item)" v-bind="item.options"></el-badge>
|
||||
<el-image v-else-if="item.columntype == 'image'" :preview-src-list="[getImg(row[item.name])]" :preview-teleported="true" hide-on-click-modal="true" lazy="true" style="max-width: 60px; height: 26px; border-radius: 2px;" fit="cover" :src="getImg(row[item.name])">
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
无图
|
||||
</div>
|
||||
</template>
|
||||
<div class="image-slot">
|
||||
无图
|
||||
</div>
|
||||
</template>
|
||||
</el-image>
|
||||
<input v-else-if="item.columntype=='input'" @click="handleClick(row, item)" style="cursor: pointer; " class="el-input__inner" type="text" readonly :value="row[item.name]">
|
||||
<p v-else-if="item.columntype=='status'">
|
||||
<input v-else-if="item.columntype == 'input'" @click="handleClick(row, item)" style="cursor: pointer; " class="el-input__inner" type="text" readonly :value="row[item.name]">
|
||||
<p v-else-if="item.columntype == 'status'">
|
||||
<template v-for="{ value, type = 'success', label } in item.options.items">
|
||||
<x-status-indicator
|
||||
:key="value"
|
||||
pulse
|
||||
:type="type || 'success'"
|
||||
:label="label"
|
||||
@click="handleClick(row, item)"
|
||||
v-if="value == row[item.name]"></x-status-indicator>
|
||||
</template>
|
||||
</p>
|
||||
|
||||
<p v-else-if="item.columntype=='button' && item.options.items && item.options.items.length>0">
|
||||
<template v-for="op in item.options.items">
|
||||
<el-button
|
||||
@click="handleClick(row, op.options || item)"
|
||||
:key="op.value"
|
||||
:type="op.type || 'warning'"
|
||||
:size="op.size || 'small'"
|
||||
:link="op.link"
|
||||
:icon="op.icon"
|
||||
:circle="op.circle || false"
|
||||
v-if="value === row[item.name]">
|
||||
{{ op.label }}
|
||||
</el-button>
|
||||
<x-status-indicator :key="value" pulse :type="type || 'success'" :label="label" @click="handleClick(row, item)" v-if="value == row[item.name]"></x-status-indicator>
|
||||
</template>
|
||||
</p>
|
||||
|
||||
<p v-else-if="item.columntype=='button'">
|
||||
<el-button
|
||||
@click="handleClick(row, item)"
|
||||
:type="item.options.type || 'warning'"
|
||||
:size="item.options.size || 'small'"
|
||||
:circle="item.options.circle || false"
|
||||
:icon="item.options.icon"> {{ row[item.name] }} </el-button>
|
||||
<p v-else-if="item.columntype == 'button' && item.options.items && item.options.items.length > 0">
|
||||
<template v-for="op in item.options.items">
|
||||
<el-button @click="handleClick(row, op.options || item)" :key="op.value" :type="op.type || 'warning'" :size="op.size || 'small'" :link="op.link" :icon="op.icon" :circle="op.circle || false" v-if="op.value == row[item.name]">
|
||||
{{ op.label }}
|
||||
</el-button>
|
||||
</template>
|
||||
</p>
|
||||
|
||||
<p v-else-if="item.columntype=='tag' || item.columntype=='time'" @click="handleClick(row, item)" v-time.tip="row[item.name]"></p>
|
||||
<p v-else-if="item.columntype == 'button'">
|
||||
<el-button @click="handleClick(row, item)" :type="item.options.type || 'warning'" :size="item.options.size || 'small'" :circle="item.options.circle || false" :icon="item.options.icon"> {{ row[item.name] }} </el-button>
|
||||
</p>
|
||||
|
||||
<p v-else-if="item.columntype == 'tag' || item.columntype == 'time'" @click="handleClick(row, item)" v-time.tip="row[item.name]"></p>
|
||||
|
||||
<slot v-else :name="item.name">
|
||||
{{ item.columntype=='select' && item.options && item.options.items ? getNameByValue( row[item.name], item.options.items ) : row[item.name] }}
|
||||
{{ item.columntype == 'select' && item.options && item.options.items ? getNameByValue(row[item.name], item.options.items) : row[item.name] }}
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
.el-badge{
|
||||
display: inherit;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
name: 'XTableColumnItem',
|
||||
props: {
|
||||
item: { type: Object, default: () => {} },
|
||||
row: { type: Object, default: () => {} },
|
||||
export default {
|
||||
name: 'XTableColumnItem',
|
||||
props: {
|
||||
item: {
|
||||
type: Object, default: () => ({
|
||||
options: {}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleClick(row, item){
|
||||
row: { type: Object, default: () => { } },
|
||||
},
|
||||
methods: {
|
||||
handleClick(row, item) {
|
||||
|
||||
// 打开新窗口链接
|
||||
if (item.open && item.open.name && row[item.open.name]?.trim()) {
|
||||
window.open(row[item.open.name], "_blank");
|
||||
return ;
|
||||
}
|
||||
// 打开编辑层
|
||||
else if (item.update && (item.update.url || item.update.name)) {
|
||||
this.$emit('xtableupdate', row, {
|
||||
name:item.update.name || item.name,
|
||||
remoteurl: item.update.url || 'table/getUpdate?name='+item.update.name
|
||||
}, item.update.type || 'dialog', 'update');
|
||||
return ;
|
||||
}
|
||||
// 打开表格
|
||||
else if (item.table && (item.table.url || item.table.name)) {
|
||||
this.$emit('xtableupdate', row, {
|
||||
name:item.table.name || item.name,
|
||||
remoteurl: item.table.url || 'table/get?name='+item.table.name
|
||||
}, item.table.type || 'dialog', 'table');
|
||||
return ;
|
||||
}else if(item.http && item.http.url && item.http.key && String(row[item.http.key])?.trim()){
|
||||
// 打开新窗口链接
|
||||
if (item.open && item.open.name && row[item.open.name]?.trim()) {
|
||||
window.open(row[item.open.name], "_blank");
|
||||
return;
|
||||
}
|
||||
// 打开编辑层
|
||||
else if (item.update && (item.update.url || item.update.name)) {
|
||||
this.$emit('xtableupdate', row, {
|
||||
name: item.update.name || item.name,
|
||||
remoteurl: item.update.url || 'table/getUpdate?name=' + item.update.name
|
||||
}, item.update.type || 'dialog', 'update');
|
||||
return;
|
||||
}
|
||||
// 打开表格
|
||||
else if (item.table && (item.table.url || item.table.name)) {
|
||||
this.$emit('xtableupdate', row, {
|
||||
name: item.table.name || item.name,
|
||||
remoteurl: item.table.url || 'table/get?name=' + item.table.name
|
||||
}, item.table.type || 'dialog', 'table');
|
||||
return;
|
||||
} else if (item.http && item.http.url && item.http.key && String(row[item.http.key])?.trim()) {
|
||||
|
||||
this.$confirm( item.http.title || '确定要执行?', '提示', { type: item.http.type || 'warning' }).then(() => {
|
||||
const loading = this.$loading();
|
||||
this.$http.post(item.http.url, {[item.http.key]: row[item.http.key]}).then((res) => {
|
||||
loading.close();
|
||||
if (res.code == 200 ) {
|
||||
this.$message.success(res.message || '操作成功')
|
||||
return;
|
||||
}
|
||||
this.$alert(res.message || '操作失败', "提示", {type: 'error'});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$confirm(item.http.title || '确定要执行?', '提示', { type: item.http.type || 'warning' }).then(() => {
|
||||
const loading = this.$loading();
|
||||
this.$http.post(item.http.url, { [item.http.key]: row[item.http.key] }).then((res) => {
|
||||
loading.close();
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.message || '操作成功')
|
||||
return;
|
||||
}
|
||||
this.$alert(res.message || '操作失败', "提示", { type: 'error' });
|
||||
});
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
getType(value) {
|
||||
if (Array.isArray(value)) {
|
||||
return value.length;
|
||||
}
|
||||
return value;
|
||||
},
|
||||
getNameByValue (value, degrees) {
|
||||
const degree = degrees.find(degree => degree.value == value);
|
||||
return degree ? (degree.name?degree.name:degree.label) : value;
|
||||
},
|
||||
getImg(o){
|
||||
if (!o) {
|
||||
return ;
|
||||
}
|
||||
return typeof o === 'string'? o : o.url;
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getType(value) {
|
||||
if (Array.isArray(value)) {
|
||||
return value.length;
|
||||
}
|
||||
return value;
|
||||
},
|
||||
getNameByValue(value, degrees) {
|
||||
const degree = degrees.find(degree => degree.value == value);
|
||||
return degree ? (degree.name ? degree.name : degree.label) : value;
|
||||
},
|
||||
getImg(o) {
|
||||
if (!o) {
|
||||
return;
|
||||
}
|
||||
return typeof o === 'string' ? o : o.url;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 通栏布局 -->
|
||||
<template v-if="layout=='header'">
|
||||
<template v-if="layout == 'header'">
|
||||
<header class="adminui-header" v-show="layoutHeader">
|
||||
<div class="adminui-header-left">
|
||||
<div class="logo-bar">
|
||||
@ -8,8 +8,10 @@
|
||||
<span>{{ $config.APP_NAME }}</span>
|
||||
</div>
|
||||
<ul v-if="!ismobile" class="nav">
|
||||
<li v-for="item in menu" :key="item" :class="pmenu.path==item.path?'active':''" @click="showMenu(item)">
|
||||
<el-icon><component :is="item.meta.icon || 'el-icon-menu'" /></el-icon>
|
||||
<li v-for="item in menu" :key="item" :class="pmenu.path == item.path ? 'active' : ''" @click="showMenu(item)">
|
||||
<el-icon>
|
||||
<component :is="item.meta.icon || 'el-icon-menu'" />
|
||||
</el-icon>
|
||||
<span>{{ item.meta.title }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
@ -19,7 +21,7 @@
|
||||
</div>
|
||||
</header>
|
||||
<section class="aminui-wrapper">
|
||||
<div v-if="!ismobile && nextMenu.length>0" :class="menuIsCollapse?'aminui-side isCollapse':'aminui-side'">
|
||||
<div v-if="!ismobile && nextMenu.length > 0" :class="menuIsCollapse ? 'aminui-side isCollapse' : 'aminui-side'">
|
||||
<div v-if="!menuIsCollapse" class="adminui-side-top" style="height:35px; line-height:35px">
|
||||
<h2 style="text-align: center;">{{ pmenu.meta.title }}</h2>
|
||||
</div>
|
||||
@ -31,7 +33,7 @@
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="adminui-side-bottom" @click="$store.commit('TOGGLE_menuIsCollapse')">
|
||||
<el-icon><el-icon-expand v-if="menuIsCollapse"/><el-icon-fold v-else /></el-icon>
|
||||
<el-icon><el-icon-expand v-if="menuIsCollapse" /><el-icon-fold v-else /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<Side-m v-if="ismobile"></Side-m>
|
||||
@ -39,10 +41,10 @@
|
||||
<!-- <Topbar v-if="!ismobile"></Topbar> -->
|
||||
<Tags ref="tags" v-if="!ismobile && layoutTags"></Tags>
|
||||
<div class="adminui-main" id="adminui-main">
|
||||
<router-view v-show="$route.meta.type!='iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
<component :is="Component" :key="$route.fullPath" v-if="$store.state.keepAlive.routeShow"/>
|
||||
</keep-alive>
|
||||
<router-view v-show="$route.meta.type != 'iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
<component :is="Component" :key="$route.fullPath" v-if="$store.state.keepAlive.routeShow" />
|
||||
</keep-alive>
|
||||
</router-view>
|
||||
<iframe-view></iframe-view>
|
||||
</div>
|
||||
@ -51,7 +53,7 @@
|
||||
</template>
|
||||
|
||||
<!-- 经典布局 -->
|
||||
<template v-else-if="layout=='menu'">
|
||||
<template v-else-if="layout == 'menu'">
|
||||
<header class="adminui-header" v-show="layoutHeader">
|
||||
<div class="adminui-header-left">
|
||||
<div class="logo-bar">
|
||||
@ -64,7 +66,7 @@
|
||||
</div>
|
||||
</header>
|
||||
<section class="aminui-wrapper">
|
||||
<div v-if="!ismobile" :class="menuIsCollapse?'aminui-side isCollapse':'aminui-side'">
|
||||
<div v-if="!ismobile" :class="menuIsCollapse ? 'aminui-side isCollapse' : 'aminui-side'">
|
||||
<div class="adminui-side-scroll">
|
||||
<el-scrollbar>
|
||||
<el-menu :default-active="active" router :collapse="menuIsCollapse" :unique-opened="$config.MENU_UNIQUE_OPENED">
|
||||
@ -73,7 +75,7 @@
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="adminui-side-bottom" @click="$store.commit('TOGGLE_menuIsCollapse')">
|
||||
<el-icon><el-icon-expand v-if="menuIsCollapse"/><el-icon-fold v-else /></el-icon>
|
||||
<el-icon><el-icon-expand v-if="menuIsCollapse" /><el-icon-fold v-else /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<Side-m v-if="ismobile"></Side-m>
|
||||
@ -81,10 +83,10 @@
|
||||
<Topbar v-if="!ismobile"></Topbar>
|
||||
<!-- <Tags ref="tags" v-if="!ismobile && layoutTags"></Tags> -->
|
||||
<div class="adminui-main" id="adminui-main">
|
||||
<router-view v-show="$route.meta.type!='iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
<component :is="Component" :key="$route.fullPath" v-if="$store.state.keepAlive.routeShow"/>
|
||||
</keep-alive>
|
||||
<router-view v-show="$route.meta.type != 'iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
<component :is="Component" :key="$route.fullPath" v-if="$store.state.keepAlive.routeShow" />
|
||||
</keep-alive>
|
||||
</router-view>
|
||||
<iframe-view></iframe-view>
|
||||
</div>
|
||||
@ -93,7 +95,7 @@
|
||||
</template>
|
||||
|
||||
<!-- 功能坞布局 -->
|
||||
<template v-else-if="layout=='dock'">
|
||||
<template v-else-if="layout == 'dock'">
|
||||
<header class="adminui-header" v-show="layoutHeader">
|
||||
<div class="adminui-header-left">
|
||||
<div class="logo-bar">
|
||||
@ -115,10 +117,10 @@
|
||||
<div class="aminui-body el-container">
|
||||
<Tags ref="tags" v-if="!ismobile && layoutTags"></Tags>
|
||||
<div class="adminui-main" id="adminui-main">
|
||||
<router-view v-show="$route.meta.type!='iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
<component :is="Component" :key="$route.fullPath" v-if="$store.state.keepAlive.routeShow"/>
|
||||
</keep-alive>
|
||||
<router-view v-show="$route.meta.type != 'iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
<component :is="Component" :key="$route.fullPath" v-if="$store.state.keepAlive.routeShow" />
|
||||
</keep-alive>
|
||||
</router-view>
|
||||
<iframe-view></iframe-view>
|
||||
</div>
|
||||
@ -138,16 +140,17 @@
|
||||
<div class="adminui-side-split-scroll">
|
||||
<el-scrollbar>
|
||||
<ul>
|
||||
<li v-for="item in menu" :key="item" :class="pmenu.path==item.path?'active':''"
|
||||
@click="showMenu(item)">
|
||||
<el-icon><component :is="item.meta.icon || el-icon-menu" /></el-icon>
|
||||
<li v-for="item in menu" :key="item" :class="pmenu.path == item.path ? 'active' : ''" @click="showMenu(item)">
|
||||
<el-icon>
|
||||
<component :is="item.meta.icon || el-icon-menu" />
|
||||
</el-icon>
|
||||
<p>{{ item.meta.title }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!ismobile && nextMenu.length>0 || !pmenu.component" :class="menuIsCollapse?'aminui-side isCollapse':'aminui-side'">
|
||||
<div v-if="!ismobile && nextMenu.length > 0 || !pmenu.component" :class="menuIsCollapse ? 'aminui-side isCollapse' : 'aminui-side'">
|
||||
<div v-if="!menuIsCollapse" class="adminui-side-top">
|
||||
<h2>{{ pmenu.meta.title }}</h2>
|
||||
</div>
|
||||
@ -159,7 +162,7 @@
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="adminui-side-bottom" @click="$store.commit('TOGGLE_menuIsCollapse')">
|
||||
<el-icon><el-icon-expand v-if="menuIsCollapse"/><el-icon-fold v-else /></el-icon>
|
||||
<el-icon><el-icon-expand v-if="menuIsCollapse" /><el-icon-fold v-else /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<Side-m v-if="ismobile"></Side-m>
|
||||
@ -169,10 +172,10 @@
|
||||
</Topbar>
|
||||
<Tags ref="tags" v-if="!$route.meta.hideTags && !ismobile && layoutTags"></Tags>
|
||||
<div class="adminui-main" id="adminui-main">
|
||||
<router-view v-show="$route.meta.type!='iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
<component :is="Component" :key="$route.fullPath" v-if="$store.state.keepAlive.routeShow"/>
|
||||
</keep-alive>
|
||||
<router-view v-show="$route.meta.type != 'iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
<component :is="Component" :key="$route.fullPath" v-if="$store.state.keepAlive.routeShow" />
|
||||
</keep-alive>
|
||||
</router-view>
|
||||
<iframe-view></iframe-view>
|
||||
</div>
|
||||
@ -189,135 +192,138 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SideM from './components/sideM.vue';
|
||||
import Topbar from './components/topbar.vue';
|
||||
import Tags from './components/tags.vue';
|
||||
import NavMenu from './components/NavMenu.vue';
|
||||
import userbar from './components/userbar.vue';
|
||||
import setting from './components/setting.vue';
|
||||
import iframeView from './components/iframeView.vue';
|
||||
import autoExit from './other/autoExit.js';
|
||||
import logo from '@/assets/img/logo.png';
|
||||
import SideM from './components/sideM.vue';
|
||||
import Topbar from './components/topbar.vue';
|
||||
import Tags from './components/tags.vue';
|
||||
import NavMenu from './components/NavMenu.vue';
|
||||
import userbar from './components/userbar.vue';
|
||||
import setting from './components/setting.vue';
|
||||
import iframeView from './components/iframeView.vue';
|
||||
import autoExit from './other/autoExit.js';
|
||||
import logo from '@/assets/img/logo.png';
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
SideM,
|
||||
Topbar,
|
||||
Tags,
|
||||
NavMenu,
|
||||
userbar,
|
||||
setting,
|
||||
iframeView,
|
||||
autoExit
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
SideM,
|
||||
Topbar,
|
||||
Tags,
|
||||
NavMenu,
|
||||
userbar,
|
||||
setting,
|
||||
iframeView,
|
||||
autoExit
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
settingDialog: false,
|
||||
menu: [],
|
||||
nextMenu: [],
|
||||
pmenu: {},
|
||||
active: '',
|
||||
appLogo: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
ismobile() {
|
||||
return this.$store.state.global.ismobile
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
settingDialog: false,
|
||||
menu: [],
|
||||
nextMenu: [],
|
||||
pmenu: {},
|
||||
active: '',
|
||||
appLogo: ''
|
||||
}
|
||||
layout() {
|
||||
return this.$store.state.global.layout
|
||||
},
|
||||
computed:{
|
||||
ismobile(){
|
||||
return this.$store.state.global.ismobile
|
||||
},
|
||||
layout(){
|
||||
return this.$store.state.global.layout
|
||||
},
|
||||
layoutHeader(){
|
||||
return this.$store.state.global.layoutHeader
|
||||
},
|
||||
layoutTags(){
|
||||
return this.$store.state.global.layoutTags
|
||||
},
|
||||
menuIsCollapse(){
|
||||
return this.$store.state.global.menuIsCollapse
|
||||
}
|
||||
layoutHeader() {
|
||||
return this.$store.state.global.layoutHeader
|
||||
},
|
||||
created() {
|
||||
this.appLogo = this.$tool.data.get("appLogo") || (this.$config.APP_LOGO || logo);
|
||||
this.onLayoutResize();
|
||||
window.addEventListener('resize', this.onLayoutResize);
|
||||
var menu = this.$router.x_getMenu();
|
||||
this.menu = this.filterUrl(menu);
|
||||
layoutTags() {
|
||||
return this.$store.state.global.layoutTags
|
||||
},
|
||||
menuIsCollapse() {
|
||||
return this.$store.state.global.menuIsCollapse
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.appLogo = this.$tool.data.get("appLogo") || (this.$config.APP_LOGO || logo);
|
||||
this.onLayoutResize();
|
||||
window.addEventListener('resize', this.onLayoutResize);
|
||||
var menu = this.$router.x_getMenu();
|
||||
this.menu = this.filterUrl(menu);
|
||||
this.showThis()
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.showThis()
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.showThis()
|
||||
layout: {
|
||||
handler(val) {
|
||||
document.body.setAttribute('data-layout', val)
|
||||
},
|
||||
layout: {
|
||||
handler(val){
|
||||
document.body.setAttribute('data-layout', val)
|
||||
},
|
||||
immediate: true,
|
||||
immediate: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openSetting() {
|
||||
this.settingDialog = true;
|
||||
},
|
||||
onLayoutResize() {
|
||||
this.$store.commit("SET_ismobile", document.body.clientWidth < 992)
|
||||
},
|
||||
//路由监听高亮
|
||||
showThis() {
|
||||
this.pmenu = this.$route.meta.breadcrumb ? this.$route.meta.breadcrumb[0] : {}
|
||||
this.nextMenu = this.filterUrl(this.pmenu.children);
|
||||
this.$nextTick(() => {
|
||||
this.active = this.$route.meta.active || this.$route.fullPath;
|
||||
if (this.active && !this.active.startsWith('/')) {
|
||||
this.active = '/' + this.active;
|
||||
}
|
||||
})
|
||||
},
|
||||
//点击显示
|
||||
showMenu(route) {
|
||||
this.pmenu = route;
|
||||
this.nextMenu = this.filterUrl(route.children);
|
||||
if ((!route.children || route.children.length == 0) && (route.meta.type == 'iframe' || route.component)) {
|
||||
this.$router.push({ path: route.path })
|
||||
return;
|
||||
}
|
||||
|
||||
if (route.children.length > 0) {
|
||||
this.getchildren(route.children[0]);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openSetting(){
|
||||
this.settingDialog = true;
|
||||
},
|
||||
onLayoutResize(){
|
||||
this.$store.commit("SET_ismobile", document.body.clientWidth < 992)
|
||||
},
|
||||
//路由监听高亮
|
||||
showThis(){
|
||||
this.pmenu = this.$route.meta.breadcrumb ? this.$route.meta.breadcrumb[0] : {}
|
||||
this.nextMenu = this.filterUrl(this.pmenu.children);
|
||||
this.$nextTick(()=>{
|
||||
this.active = this.$route.meta.active || this.$route.fullPath;
|
||||
})
|
||||
},
|
||||
//点击显示
|
||||
showMenu(route) {
|
||||
this.pmenu = route;
|
||||
this.nextMenu = this.filterUrl(route.children);
|
||||
if((!route.children || route.children.length == 0) && ( route.meta.type=='iframe' || route.component)){
|
||||
this.$router.push({path: route.path})
|
||||
return ;
|
||||
}
|
||||
|
||||
if (route.children.length > 0) {
|
||||
this.getchildren(route.children[0]);
|
||||
}
|
||||
},
|
||||
|
||||
getchildren(o){
|
||||
if (o && o.children && o.children.length > 0) {
|
||||
return this.getchildren(o.children[0]);
|
||||
}
|
||||
this.$router.push({path:o.path})
|
||||
},
|
||||
|
||||
//转换外部链接的路由
|
||||
filterUrl(map){
|
||||
var newMap = []
|
||||
map && map.forEach(item => {
|
||||
item.meta = item.meta?item.meta:{};
|
||||
//处理隐藏
|
||||
if(item.meta.hidden || item.meta.type == "button" ){
|
||||
return false
|
||||
}
|
||||
//处理http
|
||||
if(item.meta.type=='iframe'){
|
||||
item.path = `/i/${item.name}`;
|
||||
}
|
||||
//递归循环
|
||||
if(item.children && item.children.length > 0){
|
||||
item.children = this.filterUrl(item.children)
|
||||
}
|
||||
newMap.push(item)
|
||||
})
|
||||
return newMap;
|
||||
},
|
||||
//退出最大化
|
||||
exitMaximize(){
|
||||
document.getElementById('app').classList.remove('main-maximize')
|
||||
getchildren(o) {
|
||||
if (o && o.children && o.children.length > 0) {
|
||||
return this.getchildren(o.children[0]);
|
||||
}
|
||||
this.$router.push({ path: o.path })
|
||||
},
|
||||
|
||||
//转换外部链接的路由
|
||||
filterUrl(map) {
|
||||
var newMap = []
|
||||
map && map.forEach(item => {
|
||||
item.meta = item.meta ? item.meta : {};
|
||||
//处理隐藏
|
||||
if (item.meta.hidden || item.meta.type == "button") {
|
||||
return false
|
||||
}
|
||||
//处理http
|
||||
if (item.meta.type == 'iframe') {
|
||||
item.path = `/i/${item.name}`;
|
||||
}
|
||||
//递归循环
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children = this.filterUrl(item.children)
|
||||
}
|
||||
newMap.push(item)
|
||||
})
|
||||
return newMap;
|
||||
},
|
||||
//退出最大化
|
||||
exitMaximize() {
|
||||
document.getElementById('app').classList.remove('main-maximize')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -106,12 +106,12 @@ export default {
|
||||
}
|
||||
|
||||
.click-tab {
|
||||
color: #409eff;
|
||||
border-bottom: 2px solid #409eff;
|
||||
color: var(--el-color-primary);
|
||||
border-bottom: 2px solid var(--el-color-primary);
|
||||
}
|
||||
|
||||
.tab-box:hover {
|
||||
color: #409eff;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.tab-info-box-hid {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="dis-f warp pos-r" ref="tabBox" style="width:100%">
|
||||
<div class="dis-f warp pos-r" ref="tabBox" style="width:100%">
|
||||
<el-table :data="data" style="width:100%" v-loading="loading">
|
||||
<el-table-column label="">
|
||||
<template #default="scope">
|
||||
@ -7,9 +7,9 @@
|
||||
<img @click="installPlugin(scope.row)" :src="scope.row.upgradeicon" v-if="scope.row.upgradeicon" class="img" alt="">
|
||||
<img @click="installPlugin(scope.row)" :src="scope.row.icon" v-else-if="scope.row.icon" class="img" alt="">
|
||||
<div class="info-box">
|
||||
<el-text :tag=" scope.row.isdelete==1 ? 'del':'info'" class="title">{{ scope.row.name }}</el-text>
|
||||
<el-text :tag="scope.row.isdelete == 1 ? 'del' : 'info'" class="title">{{ scope.row.name }}</el-text>
|
||||
<div>
|
||||
<el-text :tag=" scope.row.isdelete==1 ? 'del':'info'" class="info-text">{{ scope.row.description }}</el-text>
|
||||
<el-text :tag="scope.row.isdelete == 1 ? 'del' : 'info'" class="info-text">{{ scope.row.description }}</el-text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -22,7 +22,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="目录" width="120">
|
||||
<template #default="scope">
|
||||
<el-text :tag=" scope.row.isdelete==1 ? 'del':'b'" type="danger">{{ scope.row.app }}</el-text>
|
||||
<el-text :tag="scope.row.isdelete == 1 ? 'del' : 'b'" type="danger">{{ scope.row.app }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="安装时间" width="180">
|
||||
@ -32,7 +32,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="80">
|
||||
<template #default="scope">
|
||||
<el-switch v-model="scope.row.status" v-if="!scope.row.disabled" :before-change="()=>changeStatus(scope.row)" :loading="scope.row.changeStatusloading||false" />
|
||||
<el-switch v-model="scope.row.status" v-if="!scope.row.disabled" :before-change="() => changeStatus(scope.row)" :loading="scope.row.changeStatusloading || false" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200" fixed="right" align="right">
|
||||
@ -64,134 +64,134 @@ import { ElMessageBox } from 'element-plus';
|
||||
|
||||
export default {
|
||||
components: { popInfo },
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
loading:false,
|
||||
popShow: false,
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loaddata();
|
||||
},
|
||||
methods: {
|
||||
installPlugin(o) {
|
||||
this.info = o;
|
||||
this.popShow = true;
|
||||
},
|
||||
closePlugin(refresh = false){
|
||||
this.info = {};
|
||||
this.popShow = false;
|
||||
if (refresh===true) {
|
||||
this.loaddata();
|
||||
|
||||
// // 重新加载菜单
|
||||
// this.$api.system.index.get().then((response) => {
|
||||
// this.$tool.data.set('menu', response.data.menu);
|
||||
// });
|
||||
// this.$router.x_getMenu();
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
loading: false,
|
||||
popShow: false,
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
loaddata(){
|
||||
this.loading = true;
|
||||
this.$http.get('admin/application/installedApplist').then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code == 200) {
|
||||
this.data = res.data;
|
||||
mounted() {
|
||||
this.loaddata();
|
||||
},
|
||||
methods: {
|
||||
installPlugin(o) {
|
||||
this.info = o;
|
||||
this.popShow = true;
|
||||
},
|
||||
closePlugin(refresh = false) {
|
||||
this.info = {};
|
||||
this.popShow = false;
|
||||
if (refresh === true) {
|
||||
this.loaddata();
|
||||
|
||||
// // 重新加载菜单
|
||||
// this.$api.system.index.get().then((response) => {
|
||||
// this.$tool.data.set('menu', response.data.menu);
|
||||
// });
|
||||
// this.$router.x_getMenu();
|
||||
}
|
||||
});
|
||||
},
|
||||
upgrade(o){
|
||||
return ElMessageBox.confirm('正在将应用<'+ o.name + '>升级到'+o.upgradeversion, '此操作不可逆, 如已二次开发请谨慎操作', {
|
||||
type: 'info',
|
||||
closeOnClickModal: false,
|
||||
confirmButtonText: '确认操作',
|
||||
}).then(() => {
|
||||
o.changeStatusloading = true;
|
||||
return this.$http.post('admin/application/upgrade', {app:o.app, upgradeversion:o.upgradeversion}).then((res) => {
|
||||
o.changeStatusloading = false;
|
||||
},
|
||||
loaddata() {
|
||||
this.loading = true;
|
||||
this.$http.get('admin/application/installedApplist').then((res) => {
|
||||
this.loading = false;
|
||||
if (res.code == 200) {
|
||||
this.data = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
upgrade(o) {
|
||||
return ElMessageBox.confirm('正在将应用<' + o.name + '>升级到' + o.upgradeversion, '此操作不可逆, 如已二次开发请谨慎操作', {
|
||||
type: 'info',
|
||||
closeOnClickModal: false,
|
||||
confirmButtonText: '确认操作',
|
||||
}).then(() => {
|
||||
o.changeStatusloading = true;
|
||||
return this.$http.post('admin/application/upgrade', { app: o.app, upgradeversion: o.upgradeversion }).then((res) => {
|
||||
o.changeStatusloading = false;
|
||||
|
||||
// 请先确认身份
|
||||
if (res.code == 205) {
|
||||
this.$message.warning(res.message || "请前往在线升级频道登录X-PHP后进行升级");
|
||||
if (res.url) {
|
||||
this.$router.replace({
|
||||
path: res.url
|
||||
})
|
||||
// 请先确认身份
|
||||
if (res.code == 205) {
|
||||
this.$message.warning(res.message || "请前往在线升级频道登录X-PHP后进行升级");
|
||||
if (res.url) {
|
||||
this.$router.replace({
|
||||
path: res.url
|
||||
})
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (res.code == 200) {
|
||||
this.loaddata();
|
||||
this.$message.success(res.message || "操作成功")
|
||||
return true;
|
||||
}
|
||||
this.$alert(res.message, "提示", { type: 'error' });
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}).catch(() => { })
|
||||
},
|
||||
changeStatus(o) {
|
||||
return ElMessageBox.confirm((o.status ? '关闭应用会导致相关调用失效' : '打开应用(' + o.name + ')') + ', 确认执行?', '正在' + (o.status ? '关闭' : '打开') + '应用', {
|
||||
type: 'error',
|
||||
closeOnClickModal: false,
|
||||
confirmButtonText: '确认操作',
|
||||
}).then(() => {
|
||||
o.changeStatusloading = true;
|
||||
return this.$http.post('admin/application/status', { app: o.app, status: o.status ? 0 : 1 }).then((res) => {
|
||||
o.changeStatusloading = false;
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.message || "操作成功")
|
||||
return true;
|
||||
}
|
||||
this.$alert(res.message, "提示", { type: 'error' });
|
||||
return false;
|
||||
});
|
||||
}).catch(() => { })
|
||||
},
|
||||
uninstall(item, index) {
|
||||
|
||||
if (res.code == 200) {
|
||||
this.loaddata();
|
||||
this.$message.success(res.message || "操作成功")
|
||||
return true;
|
||||
}
|
||||
this.$alert(res.message, "提示", {type: 'error'});
|
||||
return false;
|
||||
});
|
||||
}).catch(() => {})
|
||||
ElMessageBox.confirm('当前操作不可逆,可能会造成无法访问或数据清空.', '正在卸载应用', {
|
||||
type: 'error',
|
||||
closeOnClickModal: false,
|
||||
confirmButtonText: '确认卸载',
|
||||
}).then(() => {
|
||||
this.$http.post('admin/application/uninstall', { app: item.app }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
||||
this.data.splice(index, 1)
|
||||
// // 重新加载菜单
|
||||
// this.$api.system.index.get().then((response) => {
|
||||
// this.$tool.data.set('menu', response.data.menu);
|
||||
// });
|
||||
// this.$router.x_getMenu();
|
||||
|
||||
this.$message.success(res.message || "操作成功")
|
||||
return true;
|
||||
}
|
||||
this.$alert(res.message, "提示", { type: 'error' });
|
||||
});
|
||||
|
||||
}).catch(() => { })
|
||||
|
||||
},
|
||||
},
|
||||
changeStatus(o){
|
||||
return ElMessageBox.confirm((o.status?'关闭应用会导致相关调用失效':'打开应用('+ o.name +')') + ', 确认执行?', '正在'+ (o.status?'关闭':'打开') + '应用', {
|
||||
type: 'error',
|
||||
closeOnClickModal: false,
|
||||
confirmButtonText: '确认操作',
|
||||
}).then(() => {
|
||||
o.changeStatusloading = true;
|
||||
return this.$http.post('admin/application/status', {app:o.app, status:o.status?0:1}).then((res) => {
|
||||
o.changeStatusloading = false;
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.message || "操作成功")
|
||||
return true;
|
||||
}
|
||||
this.$alert(res.message, "提示", {type: 'error'});
|
||||
return false;
|
||||
});
|
||||
}).catch(() => {})
|
||||
},
|
||||
uninstall(item, index) {
|
||||
|
||||
ElMessageBox.confirm('当前操作不可逆,可能会造成无法访问或数据清空.', '正在卸载应用', {
|
||||
type: 'error',
|
||||
closeOnClickModal: false,
|
||||
confirmButtonText: '确认卸载',
|
||||
}).then(() => {
|
||||
this.$http.post('admin/application/uninstall', {app:item.app}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
||||
this.data.splice(index, 1)
|
||||
// // 重新加载菜单
|
||||
// this.$api.system.index.get().then((response) => {
|
||||
// this.$tool.data.set('menu', response.data.menu);
|
||||
// });
|
||||
// this.$router.x_getMenu();
|
||||
|
||||
this.$message.success(res.message || "操作成功")
|
||||
return true;
|
||||
}
|
||||
this.$alert(res.message, "提示", {type: 'error'});
|
||||
});
|
||||
|
||||
}).catch(() => {})
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pop-box {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.pop-box{
|
||||
position: fixed;
|
||||
top:0;
|
||||
left:0;
|
||||
z-index:999;
|
||||
background: rgba(0,0,0,.5);
|
||||
width:100vw;
|
||||
height:100vh;
|
||||
}
|
||||
code {
|
||||
padding: 2px 4px;
|
||||
font-size: 90%;
|
||||
@ -202,6 +202,7 @@ code {
|
||||
display: initial;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dis-f {
|
||||
display: flex;
|
||||
}
|
||||
@ -278,7 +279,8 @@ code {
|
||||
.tool-box {
|
||||
font-size: 20px;
|
||||
}
|
||||
.tool-box .icon{
|
||||
|
||||
.tool-box .icon {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="tab-box dis-f al-item" @click="props.installPlugin" :class="[
|
||||
props.windowType === 1 ? 'tab-box-two' : props.windowType === 2 ? 'tab-box-one' : '',
|
||||
props.windowType === 1 ? ((props.tabI + 1) % 2) ? 'mg-r-25' : '' :
|
||||
props.windowType === 2 ? '' : ((props.tabI + 1) % 3) ? 'mg-r-25' : '']">
|
||||
props.windowType === 2 ? '' : ((props.tabI + 1) % 3) ? 'mg-r-25' : '']">
|
||||
<img :src="item.icon" class="img" alt="">
|
||||
<div class="info-box">
|
||||
<div class="title">
|
||||
@ -18,7 +18,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="installed" v-if="item.installed">
|
||||
<span><el-icon><component :is="'el-icon-Select'" /></el-icon></span>
|
||||
<span><el-icon>
|
||||
<component :is="'el-icon-Select'" />
|
||||
</el-icon></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -27,16 +29,15 @@
|
||||
import { defineProps } from 'vue'
|
||||
let props = defineProps({
|
||||
item: Object,
|
||||
installPlugin:Function,
|
||||
windowType:Number,
|
||||
tabI:Number
|
||||
installPlugin: Function,
|
||||
windowType: Number,
|
||||
tabI: Number
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.tab-box .installed{
|
||||
background-color: #54cbffd4;
|
||||
.tab-box .installed {
|
||||
background-color: var(--el-color-primary-light-3);
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
@ -44,12 +45,12 @@ background-color: #54cbffd4;
|
||||
bottom: 0px;
|
||||
transform: rotate(315deg);
|
||||
box-shadow: 0 0 10px #8888888a;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.tab-box .installed span {
|
||||
border: 1px solid #54cbffd4;
|
||||
.tab-box .installed span {
|
||||
border: 1px solid var(--el-color-primary-light-3);
|
||||
transform: rotate(45deg);
|
||||
color: #fff;
|
||||
display: block;
|
||||
@ -58,16 +59,18 @@ background-color: #54cbffd4;
|
||||
padding: 0px 35px;
|
||||
text-align: center;
|
||||
text-shadow: 0 0 1px #44444463;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.dis-f {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.al-item {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mg-r-25 {
|
||||
margin-right: 25px;
|
||||
}
|
||||
@ -136,5 +139,4 @@ background-color: #54cbffd4;
|
||||
.tab-box:hover {
|
||||
transform: translateY(-6px);
|
||||
box-shadow: 0 10px 12px 0 rgba(0, 0, 0, .1);
|
||||
}
|
||||
</style>
|
||||
}</style>
|
||||
|
@ -61,10 +61,7 @@ export default {
|
||||
typeList: [],
|
||||
date: [],
|
||||
data: [],
|
||||
search: {
|
||||
keyword: this.$route.query.keyword || '',
|
||||
type: this.$route.query.type || ''
|
||||
},
|
||||
search: {},
|
||||
api: '',
|
||||
current: '',
|
||||
config: {},
|
||||
@ -119,9 +116,15 @@ export default {
|
||||
this.column = data.column || 'column';
|
||||
},
|
||||
getType() {
|
||||
this.$http.get('log/admin/types', { type: this.search.type }, { cacheparameters: true }).then((res) => {
|
||||
this.$http.get('log/admin/types', { type: this.$route.query.type }, { cacheparameters: true }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Object.assign(this.$data, res.data);
|
||||
// 替换search值
|
||||
for (const key in this.search) {
|
||||
if (Object.prototype.hasOwnProperty.call(this.$route.query, key)) {
|
||||
this.search[key] = this.$route.query[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -132,8 +135,10 @@ export default {
|
||||
}
|
||||
|
||||
this.$refs.table.reload(this.search)
|
||||
var url = this.changeURLArg(window.location.href, 'type', this.current)
|
||||
url = this.changeURLArg(url, 'keyword', this.search.keyword)
|
||||
let url = window.location.href;
|
||||
for (const [key, value] of Object.entries(this.search)) {
|
||||
url = this.changeURLArg(url, key, value)
|
||||
}
|
||||
history.replaceState(Object.assign({}, window.history.state, { url: url }), 'null', url);
|
||||
},
|
||||
upsearch() {
|
||||
|
@ -1,32 +1,32 @@
|
||||
<template>
|
||||
<el-container>
|
||||
<el-header v-if="this.date || dateGroup.length>0">
|
||||
<el-header v-if="this.date || dateGroup.length > 0">
|
||||
<div class="left-panel">
|
||||
<el-radio-group v-model="dateType" v-if="dateGroup.length>0" @change="changedateGroup" style="margin-right: 15px;">
|
||||
<el-radio-group v-model="dateType" v-if="dateGroup.length > 0" @change="changedateGroup" style="margin-right: 15px;">
|
||||
<el-radio-button v-for="item in dateGroup" :key="item.value" :label="item.text" :name="item.value"></el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker class="hidden-sm-and-down" v-if="this.date" @change="changedate" format="YYYY-MM-DD HH:mm" v-model="date" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-card shadow="never" v-if="statistic.length>0">
|
||||
<el-card shadow="never" v-if="statistic.length > 0" class="xcard">
|
||||
<div class="number-data">
|
||||
<div class="item" v-for="(s, index) in statistic" :key="index">
|
||||
<x-statistic :title="s.title" :value="s.value" :description="s.description" :tips="s.tips" groupSeparator>
|
||||
<x-trend v-model="s.trend" v-if="s.trend"></x-trend>
|
||||
</x-statistic>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chart" v-if="chartList.length>0">
|
||||
<div class="chart" v-if="chartList.length > 0">
|
||||
<el-row>
|
||||
<el-col :span="c.span || 12" v-for="(c,index) in chartList" :key="index">
|
||||
<xEcharts :height=" c.height ? Number(c.height)?Number(c.height)+'px':c.height : '250px'" :option="c.option"></xEcharts>
|
||||
<el-col :span="c.span || 12" v-for="(c, index) in chartList" :key="index">
|
||||
<xEcharts :height="c.height ? Number(c.height) ? Number(c.height) + 'px' : c.height : '250px'" :option="c.option"></xEcharts>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card shadow="never" v-if="table && table.column.length>0" style="margin-bottom: 0px;">
|
||||
<xTable stripe ref="table" :data="table.data" :api="table.api" :tableColumn="table.column" :hideDo="table.hideDo || true" :hidePagination="table.hidePagination || true" show-summary :height="table.height || 'auto'">
|
||||
<el-card shadow="never" v-if="table && table.column.length > 0" class="xcard">
|
||||
<xTable ref="table" :data="table.data" :api="table.api" :tableColumn="table.column" :hideDo="table.hideDo || true" :hidePagination="table.hidePagination || true" :height="table.height || 'auto'">
|
||||
<el-table-column type="index" width="50" fixed />
|
||||
</xTable>
|
||||
</el-card>
|
||||
@ -35,98 +35,147 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import xEcharts from '@/components/xEcharts';
|
||||
import xStatistic from '@/components/xStatistic';
|
||||
export default {
|
||||
name: 'chartlist',
|
||||
components: {
|
||||
xEcharts,
|
||||
xStatistic,
|
||||
},
|
||||
props: {
|
||||
name: { type: String, default: "" },
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
dateGroup: [
|
||||
import xEcharts from '@/components/xEcharts';
|
||||
import xStatistic from '@/components/xStatistic';
|
||||
export default {
|
||||
name: 'chartlist',
|
||||
components: {
|
||||
xEcharts,
|
||||
xStatistic,
|
||||
},
|
||||
props: {
|
||||
name: { type: String, default: "" },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dateGroup: [
|
||||
|
||||
],
|
||||
chartList: [
|
||||
],
|
||||
chartList: [
|
||||
|
||||
],
|
||||
statistic: [
|
||||
|
||||
],
|
||||
table: {
|
||||
api:null,
|
||||
height:0,
|
||||
data:[],
|
||||
column:[],
|
||||
},
|
||||
dateType: '',
|
||||
date: null,
|
||||
statName: this.$route.meta.tablename,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
//监听从props里拿到值了
|
||||
date(){
|
||||
],
|
||||
statistic: [
|
||||
|
||||
],
|
||||
table: {
|
||||
api: null,
|
||||
height: 0,
|
||||
data: [],
|
||||
column: [],
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
const now = new Date();
|
||||
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
||||
lastDay.setHours(23, 59, 0, 0);
|
||||
this.date = [new Date(now.getFullYear(), now.getMonth(), 1, 0, 0), lastDay];
|
||||
dateType: '',
|
||||
date: null,
|
||||
statName: this.$route.meta.tablename,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
//监听从props里拿到值了
|
||||
date() {
|
||||
|
||||
if (this.name) {
|
||||
this.statName = this.name || this.$route.meta.tablename;
|
||||
}
|
||||
this.loaddata();
|
||||
},
|
||||
methods: {
|
||||
changedateGroup(){
|
||||
this.dateGroup.forEach((item) => {
|
||||
if (this.dateType === item.text) {
|
||||
this.date = item.value;
|
||||
this.loaddata();
|
||||
}
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
const now = new Date();
|
||||
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
||||
lastDay.setHours(23, 59, 0, 0);
|
||||
this.date = [new Date(now.getFullYear(), now.getMonth(), 1, 0, 0), lastDay];
|
||||
|
||||
},
|
||||
changedate(){
|
||||
this.loaddata()
|
||||
},
|
||||
loaddata(){
|
||||
//判断是否开启自定义列
|
||||
if(this.statName) {
|
||||
this.$http.get('stat/admin/get', { name: this.statName,date:this.date }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Object.assign(this.$data, res.data);
|
||||
this.dateType = '';
|
||||
this.dateGroup.forEach((item) => {
|
||||
if (new Date(item.value[0]).getTime()==new Date(this.date[0]).getTime() && new Date(item.value[1]).getTime()==new Date(this.date[1]).getTime()) {
|
||||
this.dateType = item.text;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
if (this.name) {
|
||||
this.statName = this.name || this.$route.meta.tablename;
|
||||
}
|
||||
this.loaddata();
|
||||
},
|
||||
methods: {
|
||||
changedateGroup() {
|
||||
this.dateGroup.forEach((item) => {
|
||||
if (this.dateType === item.text) {
|
||||
this.date = item.value;
|
||||
this.loaddata();
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
changedate() {
|
||||
this.loaddata()
|
||||
},
|
||||
loaddata() {
|
||||
//判断是否开启自定义列
|
||||
if (this.statName) {
|
||||
this.$http.get('stat/admin/get', { name: this.statName, date: this.date }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
Object.assign(this.$data, res.data);
|
||||
this.dateType = '';
|
||||
this.dateGroup.forEach((item) => {
|
||||
if (new Date(item.value[0]).getTime() == new Date(this.date[0]).getTime() && new Date(item.value[1]).getTime() == new Date(this.date[1]).getTime()) {
|
||||
this.dateType = item.text;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-card {margin-bottom: 15px;}
|
||||
.number-data {display: flex;}
|
||||
.number-data .item {flex:1;border-right: 1px solid #f0f0f0;padding:0 20px;}
|
||||
.number-data .item:last-child {border: 0;}
|
||||
.number-data .item h2 {font-size: 12px;color: #787a7d;font-weight: normal;display: flex;align-items: center;}
|
||||
.number-data .item h2 i {margin-left: 5px;color: #8cc5ff;cursor: pointer;}
|
||||
.number-data .item p {font-size: 20px;color: #121315;margin-top: 10px;}
|
||||
.chart {border-top: 1px solid #f0f0f0;margin-top: 20px;padding-top: 20px;}
|
||||
.dark .number-data .item {border-color: var(--el-border-color-light);}
|
||||
.dark .number-data .item p {color: #d0d0d0;}
|
||||
.dark .chart {border-color: var(--el-border-color-light);}
|
||||
<style>
|
||||
.xcard {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.xcard .el-card__body {
|
||||
padding: 10px
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
|
||||
.number-data {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.number-data .item {
|
||||
flex: 1;
|
||||
border-right: 1px solid #f0f0f0;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.number-data .item:last-child {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.number-data .item h2 {
|
||||
font-size: 12px;
|
||||
color: #787a7d;
|
||||
font-weight: normal;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.number-data .item h2 i {
|
||||
margin-left: 5px;
|
||||
color: #8cc5ff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.number-data .item p {
|
||||
font-size: 20px;
|
||||
color: #121315;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.chart {
|
||||
border-top: 1px solid #f0f0f0;
|
||||
margin-top: 20px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.dark .number-data .item {
|
||||
border-color: var(--el-border-color-light);
|
||||
}
|
||||
|
||||
.dark .number-data .item p {
|
||||
color: #d0d0d0;
|
||||
}
|
||||
|
||||
.dark .chart {
|
||||
border-color: var(--el-border-color-light);
|
||||
}</style>
|
||||
|
@ -415,7 +415,7 @@ $linkColor: #3b6ff1;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
line-height: 40px;
|
||||
background: #2362fb;
|
||||
background: var(--el-color-primary);
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
|
@ -83,7 +83,6 @@ export default {
|
||||
tableurl: this.$route.meta.tableurl,
|
||||
groupFilterText: '',
|
||||
tabskey: '',
|
||||
tabsdefaultvalue: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -97,8 +96,12 @@ export default {
|
||||
awaitvar.then((res) => {
|
||||
if (res.code == 200) {
|
||||
Object.assign(this.$data, res.data);
|
||||
if (res.data.tabsdefaultvalue && res.data.tabskey) {
|
||||
this.search[res.data.tabskey] = res.data.tabsdefaultvalue
|
||||
|
||||
// 替换search值
|
||||
for (const key in this.search) {
|
||||
if (Object.prototype.hasOwnProperty.call(this.$route.query, key)) {
|
||||
this.search[key] = this.$route.query[key];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -207,10 +210,11 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.container .el-header{
|
||||
.container .el-header {
|
||||
padding: 0 20px;
|
||||
}
|
||||
.container .el-tabs__header{
|
||||
|
||||
.container .el-tabs__header {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
@ -226,7 +230,8 @@ export default {
|
||||
.container {
|
||||
border: 1px solid var(--el-border-color-light);
|
||||
border-radius: 4px;
|
||||
background-color: var(--el-fill-color-blank);;
|
||||
background-color: var(--el-fill-color-blank);
|
||||
;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
@ -18,10 +18,11 @@
|
||||
<el-tabs v-if="tabs && tabs.length > 0" v-model="search[tabskey]" @tab-change="tabChange">
|
||||
<el-tab-pane v-for="item in tabs" :key="item.value" :label="item.label + (item.num ? '(' + item.num + ')' : '')" :name="item.value" />
|
||||
</el-tabs>
|
||||
<xTable :isselection="isselection" :batchoperation="batch" :defaultExpandAll="tableexpand" height="auto" ref="table" :tableColumn="column" :name="tablename" :params="search" :api="api" :row-key="key" :remoteSort="true" :remoteFilter="true" stripe>
|
||||
<xTable :isselection="isselection" :batchoperation="batch" :defaultExpandAll="defaultExpandAll" height="auto" ref="table" :tableColumn="column" :name="tablename" :params="search" :api="api" :row-key="key" :remoteSort="true" :remoteFilter="true" stripe>
|
||||
<el-table-column type="expand" v-if="tableexpand">
|
||||
<template #default="{ row }">
|
||||
<el-input :value="row[tableexpandfield]" type="textarea" style="cursor: pointer; " class="expandtextarea" readonly></el-input>
|
||||
<span v-if="tableexpandtype == 'html'" class="tableexpandhtml" v-html="row[tableexpandfield]"> </span>
|
||||
<el-input v-else :value="row[tableexpandfield]" type="textarea" style="cursor: pointer; " class="expandtextarea" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="operation.label || '操作'" :width="operation.width || 124" :fixed="operation.fixed || 'right'" :align="operation.align || 'left'" v-if="operation.edit || operation.delete">
|
||||
@ -62,6 +63,8 @@ export default {
|
||||
},
|
||||
isselection: true,
|
||||
tableexpand: false,
|
||||
tableexpandtype: '',
|
||||
defaultExpandAll: true,
|
||||
tableexpandfield: 'content',
|
||||
selection: [],
|
||||
column: [],
|
||||
@ -84,7 +87,6 @@ export default {
|
||||
tableurl: this.$route.meta.tableurl,
|
||||
groupFilterText: '',
|
||||
tabskey: '',
|
||||
tabsdefaultvalue: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -99,11 +101,18 @@ export default {
|
||||
awaitvar.then((res) => {
|
||||
if (res.code == 200) {
|
||||
Object.assign(this.$data, res.data);
|
||||
if (res.data.tabsdefaultvalue && res.data.tabskey) {
|
||||
this.search[res.data.tabskey] = res.data.tabsdefaultvalue
|
||||
|
||||
|
||||
// 替换search值
|
||||
for (const key in this.search) {
|
||||
if (Object.prototype.hasOwnProperty.call(this.$route.query, key)) {
|
||||
this.search[key] = this.$route.query[key];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 子组件加载完毕后调用回调函数,并传递数据
|
||||
this.$emit('child-loaded', Object.assign({}, this.$data.aside, { search: this.$data.search }));
|
||||
this.$emit('child-loaded', Object.assign({}, this.$data.aside, { search: this.search }));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -218,6 +227,11 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.tableexpandhtml img {
|
||||
max-width: calc(100% - 100px);
|
||||
max-height: 120px;
|
||||
}
|
||||
|
||||
.expandtextarea .el-textarea__inner {
|
||||
box-shadow: none
|
||||
}
|
||||
@ -261,4 +275,5 @@ export default {
|
||||
.xtable .el-tabs__nav-next,
|
||||
.el-tabs__nav-prev {
|
||||
padding: 10px 0;
|
||||
}</style>
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="message-body">
|
||||
<div v-loading="loading" class="message-content">
|
||||
<div class="message-body-side">
|
||||
<div class="message-body-side" :style="{ width: width + 'px' }">
|
||||
<div class="message-body-flexbox">
|
||||
<x-page-header :title="title" :icon="icon"></x-page-header>
|
||||
</div>
|
||||
@ -9,7 +9,7 @@
|
||||
<x-menu-item v-for="(item, index) in items" :key="index" :label="item.label" :num="item.num" :icon="item.icon" :icon-color="item.color" :select="search[key] == item.value" @click="sideClick(item)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-body-content">
|
||||
<div class="message-body-content" :style="{ 'margin-left': width + 'px' }">
|
||||
<table2 ref="table" @childLoaded="getChildData"></table2>
|
||||
</div>
|
||||
</div>
|
||||
@ -31,6 +31,7 @@ export default {
|
||||
return {
|
||||
loading: true,
|
||||
icon: '',
|
||||
width: 180,
|
||||
title: '',
|
||||
items: [],
|
||||
key: '',
|
||||
@ -60,8 +61,8 @@ export default {
|
||||
padding: 10px 20px;
|
||||
|
||||
.x-page-header__icon {
|
||||
width: 40px;
|
||||
}
|
||||
width: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.message-header {
|
||||
@ -94,7 +95,6 @@ export default {
|
||||
|
||||
.message-body-side {
|
||||
padding: 0px 0;
|
||||
width: 180px;
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
position: absolute;
|
||||
@ -121,7 +121,6 @@ export default {
|
||||
}
|
||||
|
||||
.message-body-content {
|
||||
margin-left: 180px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
@ -129,13 +128,13 @@ export default {
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.message-body-side {
|
||||
width: 0px;
|
||||
width: 0px !important;
|
||||
transition: all 0.1s;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.message-body-content {
|
||||
margin-left: 0px;
|
||||
margin-left: 0px !important;
|
||||
transition: all 0.1s;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user