控制台前端页面升级
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>文档管理系统</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="text/javascript" src="doc-console-manifest.js?db1889e6304e97067ffe"></script><script type="text/javascript" src="doc-console-vendor.js?ef818240decf088ec7e9"></script><script type="text/javascript" src="doc-console-index.js?56992b3a9331350d531f"></script></body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
body,html{margin:0;padding:0}#app,.el-container,.el-menu,body,html{height:100%}.el-header{background-color:#1d4e89!important}.header-right-user-name{color:#fff;padding-right:5px}.el-menu-vertical{border-right:0}.el-menu-vertical,.el-menu-vertical .el-menu{background:#fafafa}.el-header{background-color:#409eff;color:#333;line-height:40px;text-align:right;height:40px!important}
|
||||
@@ -0,0 +1 @@
|
||||
.search-form-box{padding:10px}.page-info-box{text-align:right;margin:20px 0 50px 0}
|
||||
@@ -0,0 +1 @@
|
||||
.my-info-vue .box-card{margin:10px}
|
||||
@@ -0,0 +1 @@
|
||||
.user-list-vue .search-form-box{padding:10px}.user-list-vue .page-info-box{text-align:right;margin:20px 0 50px 0}.user-list-vue .el-button+.el-button{margin-left:5px}
|
||||
@@ -0,0 +1 @@
|
||||
.search-form-box{padding:10px}.page-info-box{text-align:right;margin:20px 0 50px 0}
|
||||
@@ -0,0 +1 @@
|
||||
.login-container{border-radius:5px;-moz-border-radius:5px;background-clip:padding-box;margin:0 auto;width:350px;padding:35px 35px 15px 35px;background:#fff;border:1px solid #eaeaea;-webkit-box-shadow:0 0 25px #cac6c6;box-shadow:0 0 25px #cac6c6}.title{margin:0 auto 40px auto;text-align:center;color:#505458}.remember{margin:0 0 35px 0}.login-background-img{width:100%;height:100%;position:absolute;z-index:-1;top:0;left:0}
|
||||
@@ -0,0 +1 @@
|
||||
.product-list{text-align:left}.product-list .item{text-align:center;display:inline-block;padding:10px;border-radius:5px;cursor:pointer;width:110px;height:100px;color:#666}.product-list .item:hover{background:#ddd}.product-list .item.disabled{background:#fff;cursor:auto}.product-list .item.disabled .logo-text{background:#909399}.product-list .item .logo-text{width:80px;height:80px;line-height:80px;text-align:center;color:#fff;margin:0 auto;background:#67c23a;border-radius:50%;overflow:hidden;font-weight:700}.product-list .item .logo-text.text1{background:#67c23a}.product-list .item .logo-text.text2{background:#e6a23c}.product-list .item .logo-text.text3{background:#f56c6c}.product-list .item .logo-img{width:80px;height:80px;margin:0 auto}.product-list .item .logo-img img{width:65px;height:65px;margin:7px}
|
||||
@@ -1,14 +1 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>文档管理系统</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="text/javascript" src="doc-console-manifest.js?db1889e6304e97067ffe"></script><script type="text/javascript" src="doc-console-vendor.js?ef818240decf088ec7e9"></script><script type="text/javascript" src="doc-console-index.js?56992b3a9331350d531f"></script></body>
|
||||
|
||||
</html>
|
||||
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon-console.png><title>文档管理系统</title><link href=css/chunk-30126bdc.ee6e60f7.css rel=prefetch><link href=css/chunk-32cc5643.5a5b2ca1.css rel=prefetch><link href=css/chunk-35c34f90.938e4b31.css rel=prefetch><link href=css/chunk-4582ecc6.ee6e60f7.css rel=prefetch><link href=css/chunk-6455e6ee.2286d44e.css rel=prefetch><link href=css/chunk-7349f4ef.be15d6a0.css rel=prefetch><link href=js/chunk-2d207ece.471a6eef.js rel=prefetch><link href=js/chunk-30126bdc.0c65330c.js rel=prefetch><link href=js/chunk-32cc5643.522aafd7.js rel=prefetch><link href=js/chunk-35c34f90.bb1dbae1.js rel=prefetch><link href=js/chunk-4582ecc6.34ccd545.js rel=prefetch><link href=js/chunk-6455e6ee.54800002.js rel=prefetch><link href=js/chunk-7349f4ef.84d79223.js rel=prefetch><link href=css/app.740554a0.css rel=preload as=style><link href=css/chunk-vendors.7be40bfc.css rel=preload as=style><link href=js/app.c46d17dc.js rel=preload as=script><link href=js/chunk-vendors.735c0b72.js rel=preload as=script><link href=css/chunk-vendors.7be40bfc.css rel=stylesheet><link href=css/app.740554a0.css rel=stylesheet></head><body><noscript><strong>We're sorry but zyplayer-console-ui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.735c0b72.js></script><script src=js/app.c46d17dc.js></script></body></html>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 294 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 309 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 248 KiB |
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d207ece"],{a339:function(n,e,t){"use strict";t.r(e);var u=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[n._v("没有权限访问该模块")])},c=[],o={data:function(){return{}},mounted:function(){},methods:{}},a=o,r=t("2877"),i=Object(r["a"])(a,u,c,!1,null,null,null);e["default"]=i.exports}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-30126bdc"],{"0b39":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticStyle:{"border-bottom":"1px solid #eee",padding:"10px","margin-bottom":"10px"}},[e._v("权限列表")]),a("div",{staticStyle:{padding:"10px"}},[a("el-table",{staticStyle:{width:"100%","margin-bottom":"5px"},attrs:{data:e.searchResultList,border:"","max-height":"500"}},[a("el-table-column",{attrs:{prop:"id",label:"编号",width:"60"}}),a("el-table-column",{attrs:{prop:"name",label:"权限名"}}),a("el-table-column",{attrs:{prop:"spaceExplain",label:"权限说明"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间"}})],1)],1),a("div",{staticClass:"page-info-box"},[a("el-pagination",{attrs:{"page-sizes":[20,50,100],"page-size":20,"current-page":e.searchParam.pageNum,layout:"prev, pager, next, jumper, sizes, total",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)])},i=[],r={data:function(){return{editUserDialogVisible:!1,totalCount:0,searchParam:{type:1,keyword:"",pageSize:20,pageNum:1},searchResultList:[{name:"张三"}],roleOptions:[{value:"管理员"}],editUserForm:{}}},mounted:function(){},methods:{handleSizeChange:function(e){this.searchParam.pageSize=e},handleCurrentChange:function(e){this.searchParam.pageNum=e},editUserInfo:function(){this.editUserDialogVisible=!0},resetPassword:function(){}}},l=r,s=(a("cc1a"),a("2877")),o=Object(s["a"])(l,n,i,!1,null,null,null);t["default"]=o.exports},"594a":function(e,t,a){},cc1a:function(e,t,a){"use strict";var n=a("594a"),i=a.n(n);i.a}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32cc5643"],{"408e":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"my-info-vue"},[a("el-breadcrumb",{staticStyle:{padding:"20px 10px"},attrs:{"separator-class":"el-icon-arrow-right"}},[a("el-breadcrumb-item",{attrs:{to:{path:"/"}}},[e._v("首页")]),a("el-breadcrumb-item",[e._v("我的信息")])],1),a("div",{staticStyle:{margin:"0 auto","max-width":"1000px"}},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e._v("我的信息")]),a("el-form",{staticClass:"search-form-box",attrs:{"label-width":"100px"}},[a("el-form-item",{attrs:{label:"账号:"}},[e._v(e._s(e.userInfo.userNo))]),a("el-form-item",{attrs:{label:"用户名:"}},[e._v(e._s(e.userInfo.userName))]),a("el-form-item",{attrs:{label:"手机号:"}},[e._v(e._s(e.userInfo.phone))]),a("el-form-item",{attrs:{label:"邮箱:"}},[e._v(e._s(e.userInfo.email))]),a("el-form-item",{attrs:{label:"状态:"}},[e._v(e._s(0==e.userInfo.delFlag?"正常":"停用"))]),a("el-form-item",{attrs:{label:"性别:"}},[e._v(e._s(0==e.userInfo.sex?"女":"男"))])],1)],1)],1)],1)},r=[],l=a("3099"),n={data:function(){return{userInfo:{}}},mounted:function(){this.getUserInfo()},methods:{getUserInfo:function(){var e=this;l["a"].getSelfUserInfo().then((function(t){e.userInfo=t.data}))}}},o=n,i=(a("dcfc"),a("2877")),c=Object(i["a"])(o,s,r,!1,null,null,null);t["default"]=c.exports},dcfc:function(e,t,a){"use strict";var s=a("ed55"),r=a.n(s);r.a},ed55:function(e,t,a){}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4582ecc6"],{"4a12":function(e,t,a){"use strict";var r=a("4de9"),l=a.n(r);l.a},"4de9":function(e,t,a){},"97ae":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticStyle:{"border-bottom":"1px solid #eee",padding:"10px","margin-bottom":"10px"}},[e._v("角色管理")]),a("el-form",{staticClass:"search-form-box",attrs:{inline:!0,model:e.searchParam}},[a("el-form-item",{attrs:{label:"搜索类型"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.searchParam.type,callback:function(t){e.$set(e.searchParam,"type",t)},expression:"searchParam.type"}},[a("el-option",{attrs:{label:"角色名",value:1}})],1)],1),a("el-form-item",{attrs:{label:"关键字"}},[a("el-input",{attrs:{placeholder:"输入关键字"},model:{value:e.searchParam.keyword,callback:function(t){e.$set(e.searchParam,"keyword",t)},expression:"searchParam.keyword"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){}}},[e._v("查询")])],1)],1),a("div",{staticStyle:{padding:"10px"}},[a("el-table",{staticStyle:{width:"100%","margin-bottom":"5px"},attrs:{data:e.searchResultList,border:"","max-height":"500"}},[a("el-table-column",{attrs:{prop:"id",label:"编号",width:"60"}}),a("el-table-column",{attrs:{prop:"name",label:"角色名"}}),a("el-table-column",{attrs:{prop:"spaceExplain",label:"CODE"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"small",plain:"",type:"primary"},on:{click:function(a){return e.editUserInfo(t.row)}}},[e._v("修改")]),a("el-button",{attrs:{size:"small",plain:"",type:"primary"},on:{click:function(a){return e.resetPassword(t.row)}}},[e._v("权限管理")]),a("el-button",{attrs:{size:"small",plain:"",type:"warning"},on:{click:function(a){return e.editUserInfo(t.row)}}},[e._v("删除")])]}}])})],1)],1),a("div",{staticClass:"page-info-box"},[a("el-pagination",{attrs:{"page-sizes":[20,50,100],"page-size":20,"current-page":e.searchParam.pageNum,layout:"prev, pager, next, jumper, sizes, total",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),a("el-dialog",{attrs:{title:"修改用户",visible:e.editUserDialogVisible,width:"600px"},on:{"update:visible":function(t){e.editUserDialogVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.editUserForm,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"账号"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"用户名"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"手机号"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"邮箱"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"性别"}},[a("el-radio-group",{model:{value:e.editUserForm.resource,callback:function(t){e.$set(e.editUserForm,"resource",t)},expression:"editUserForm.resource"}},[a("el-radio",{attrs:{label:"男"}}),a("el-radio",{attrs:{label:"女"}})],1)],1),a("el-form-item",{attrs:{label:"角色"}},[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:"请选择"},model:{value:e.editUserForm.xx,callback:function(t){e.$set(e.editUserForm,"xx",t)},expression:"editUserForm.xx"}},e._l(e.roleOptions,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){}}},[e._v("确定")]),a("el-button",[e._v("取消")])],1)],1)],1)],1)},l=[],i={data:function(){return{editUserDialogVisible:!1,totalCount:0,searchParam:{type:1,keyword:"",pageSize:20,pageNum:1},searchResultList:[{name:"张三"}],roleOptions:[{value:"管理员"}],editUserForm:{}}},mounted:function(){},methods:{handleSizeChange:function(e){this.searchParam.pageSize=e},handleCurrentChange:function(e){this.searchParam.pageNum=e},editUserInfo:function(){this.editUserDialogVisible=!0},resetPassword:function(){}}},o=i,s=(a("4a12"),a("2877")),n=Object(s["a"])(o,r,l,!1,null,null,null);t["default"]=n.exports}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6455e6ee"],{"127e":function(e,t,n){e.exports=n.p+"img/bg1.1896cb31.jpeg"},2254:function(e,t,n){e.exports=n.p+"img/bg2.28cdc5b5.jpeg"},"28e4":function(e,t,n){e.exports=n.p+"img/bg3.4ddd01fc.jpeg"},"334e":function(e,t,n){e.exports=n.p+"img/bg4.1b7809d4.jpeg"},"40c0":function(e,t,n){},9231:function(e,t,n){"use strict";var i=n("40c0"),a=n.n(i);a.a},ac2a:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{staticStyle:{"padding-top":"50px"}},[i("el-form",{ref:"loginParam",staticClass:"demo-ruleForm login-container",attrs:{model:e.loginParam,rules:e.loginRules,"label-position":"left","label-width":"0px"}},[i("h3",{staticClass:"title"},[e._v("文档管理-系统登录")]),i("el-form-item",{attrs:{prop:"username"}},[i("el-input",{attrs:{type:"text","auto-complete":"off",placeholder:"账号"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginSubmit(t)}},model:{value:e.loginParam.username,callback:function(t){e.$set(e.loginParam,"username",t)},expression:"loginParam.username"}})],1),i("el-form-item",{attrs:{prop:"password"}},[i("el-input",{attrs:{type:"password","auto-complete":"off",placeholder:"密码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginSubmit(t)}},model:{value:e.loginParam.password,callback:function(t){e.$set(e.loginParam,"password",t)},expression:"loginParam.password"}})],1),i("el-form-item",{staticStyle:{width:"100%"}},[i("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary",loading:e.logining},nativeOn:{click:function(t){return t.preventDefault(),e.loginSubmit(t)}}},[e._v("登录")])],1)],1)],1),1==e.bgImgRandom?i("img",{staticClass:"login-background-img",attrs:{src:n("127e")}}):2==e.bgImgRandom?i("img",{staticClass:"login-background-img",attrs:{src:n("2254")}}):3==e.bgImgRandom?i("img",{staticClass:"login-background-img",attrs:{src:n("28e4")}}):4==e.bgImgRandom?i("img",{staticClass:"login-background-img",attrs:{src:n("334e")}}):(e.bgImgRandom,i("img",{staticClass:"login-background-img",attrs:{src:n("ef3a")}}))])},a=[],r=n("3099"),o={data:function(){return{logining:!1,redirect:"",loginParam:{username:"",password:""},loginRules:{username:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]},checked:!0,bgImgRandom:Math.ceil(4*Math.random())+1}},mounted:function(){this.redirect=this.$route.query.redirect},methods:{loginSubmit:function(){var e=this;this.$refs.loginParam.validate((function(t){t&&r["a"].userLogin(e.loginParam).then((function(){e.redirect?location.href=decodeURIComponent(e.redirect):e.$router.back()}))}))}}},s=o,l=(n("9231"),n("2877")),g=Object(l["a"])(s,i,a,!1,null,null,null);t["default"]=g.exports},ef3a:function(e,t,n){e.exports=n.p+"img/bg5.cfdeb7fb.jpeg"}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7349f4ef"],{2629:function(t,a,i){"use strict";var s=i("d7846"),e=i.n(s);e.a},"3c4a":function(t,a){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAE2UlEQVR4nO3bW4hVVRzH8c+aM6VZPXRTC5qkHvIlSAhLujxGN3qooEizIrpoN7xkF0rLLmamFaSZWYlUVChkUARGUBFpkIiWBtlFu5iWRGWpM+ec1cOeqWnce8aZs8+Zxu0PNpyZ/3/vtfZ3/9dl7/VfQRfNvjRCwOAYBIghscUQdf77n9+BjrOidN//+HX2DbHrudUY7EF85IXmrtXLXVklDMVTGI5q3Wvxr0IMduNLfHL3deU1gh8Ev4nMWpw/kND1H+0R0IIPY9BCYyOg07UrMdgh2BRZJsSV2IjKo88dVMs9/0f1j7G+qySJxKEYg614LbLkzolt65SZvah2EE01X6ExCjguMkmwQtmdkSOm3dBm2g1tNV14oADorBF4CEsFp8C0G/sOYSACIGm6F+H1GFxYJdzRRwgDFUCHRmJx4Aol4Y6beg9hoAOA4YInRZcd+idTJ/QOwv4AAIZGHt95mHPoHYR6D4Ot2ISfu/GJGIxRGFRDWS2YjbH4el9PqheAiDVYiLfwq5RJV7uqOAHv4vgayz0Dd8UQb58ysXXX3AUH93hCvQAsx1RsDpEZL5cyHe+9pgy7dZok1qhxeA+vTpnYqicIuQMIrIpMCTFsmf5Kv3Qxh2Bq5AP82JNz3gDasCCwJetxTr+60vFzUKSZGCNDZDeRvuhUjA3MmTyx1bxuoiBvABuxEtKe/vTxFaJjBONwLg5vNw2SzPnzUgljY/CS5B0iU3nH6DpNtqcZZoyvCEl4zhLNxXk4s/04TW0jQJpOwSUw+ebWTKe8AfyhrHpfdts/G5fLN9yz1ITzJUNst06N1Ik4rIHljZHMLzLVaACNePKddWTktO7G1/1lKtydRkdKkzL6gSIAOCNwXJaxCACOlbwnpKoIAAZhWJaxCACaOz6dTbpl736gCABgpCapb2RFAdAiGpJmKAqAo2VMwIoCYDBSV1GKAiBTBwD0dwX6WwcA9HcF+lsHAPR3BfpbRQHwl2SVai8VBcA2/JFmKAqAzUr+SjP8n3OE8lO0UVl8Yv7eCyRFiIA2fJ5lLAKA3fgly1gEAJvxTZaxCAA+qiajQKqKAGBNk/QOkMaPApWeXXLV1sDq7hzqEgEPXpmZX70BO+pRZobe180IQP4AjlJK//pKkj2C+diTc7lp2oU3UJ6XEf7k3wRGiY7Ht10NDywtmT6+UsZswQaMlnyojJJEiYvlu3L8Cd7pySlvACfhgsCCmVdW98oSmbm0RPJi8lr70ZEk1YKz5AdgFxaKfuvJMe8m0BS5rdq+Jv/A2Eb3ef9oJd5Gt/lB1KcTPBnzY4in0y8QfsKjgd/3JRmhXsPgGLyKl2Pw5v3jKl/FoDV1x4hYjUno55E8UcXTlVJlValS6jFHkPrOA0bgHkzAd6S/jrYrryyx5VjQXG6Ojz+zb7tJ6j0RCjiy/ai3PpYA/3Vfb579Zyq8PkS3hmhTb0/cHwCsFV2v6lPozdNnYAOoSpKixwdWC8xZ2PtdZAMVwE4swlWB9TDn2b5toRto3wSrkinuE1gh2vNYjXsHBwqAVnwWWBKjZdgaQj4bJ/+vACJ+l2y1WY1lYlht2LatYftQjdg6u0cyrn6jcZuny5Kb/h5fYC224JcQtc56vj7PKuuq23Gtxub2xkCbqAwPv9iY4Pwbdbxk84RcOcgAAAAASUVORK5CYII="},b3d7:function(t,a,i){"use strict";i.r(a);var s=function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticStyle:{padding:"10px"}},[s("div",{staticStyle:{"max-width":"800px",margin:"20px auto"}},[s("div",{staticStyle:{"text-align":"center"}},[t._v('欢迎使用ヾ(๑╹◡╹)ノ" - 今天也要加油鸭')]),s("div",{staticStyle:{padding:"20px"}},[s("el-card",{staticClass:"box-card"},[s("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[s("span",[t._v("所有产品")])]),s("div",{staticClass:"product-list"},[s("div",{staticClass:"item",on:{click:function(a){return t.jumpToDocPage("doc-swagger")}}},[s("div",{staticClass:"logo-text text1"},[t._v("swagger")]),s("div",[t._v("swagger文档")])]),s("div",{staticClass:"item",on:{click:function(a){return t.jumpToDocPage("doc-db")}}},[s("div",{staticClass:"logo-text text2"},[t._v("DB")]),s("div",[t._v("数据库文档")])]),s("div",{staticClass:"item",on:{click:function(a){return t.jumpToDocPage("doc-wiki")}}},[s("div",{staticClass:"logo-text text3"},[t._v("WIKI")]),s("div",[t._v("WIKI文档")])]),s("div",{staticClass:"item",on:{click:function(a){return t.jumpToDocPage("doc-dubbo")}}},[s("div",{staticClass:"logo-img"},[s("img",{attrs:{src:i("3c4a")}})]),s("div",[t._v("dubbo文档")])]),s("div",{staticClass:"item",on:{click:function(a){return t.jumpToDocPage("doc-es")}}},[s("div",{staticClass:"logo-text text1"},[t._v("ES")]),s("div",[t._v("es文档")])]),s("el-tooltip",{attrs:{effect:"dark",content:"不成熟,欢迎完善",placement:"top-start"}},[s("div",{staticClass:"item disabled"},[s("div",{staticClass:"logo-text text4"},[t._v("GRPC")]),s("div",[t._v("GRPC文档")])])])],1)])],1),s("div",{staticStyle:{padding:"20px"}},[s("el-card",{staticClass:"box-card"},[s("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[s("span",[t._v("二方库-集成代理版")]),s("a",{attrs:{target:"_blank",href:"http://doc.zyplayer.com/zyplayer-doc-manage/doc-wiki#/page/share/view?pageId=76&space=23f3f59a60824d21af9f7c3bbc9bc3cb"}},[s("i",{staticClass:"el-icon-info",staticStyle:{color:"#999"}})])]),s("div",{staticClass:"product-list"},[s("el-tooltip",{attrs:{effect:"dark",content:"swagger的原生官方文档",placement:"top-start"}},[s("div",{staticClass:"item",on:{click:function(a){return t.jumpToDocPage("swagger-ui.html")}}},[s("div",{staticClass:"logo-text text1"},[t._v("swagger")]),s("div",[t._v("原生文档")])])]),s("el-tooltip",{attrs:{effect:"dark",content:"swagger-bootstrap-ui文档",placement:"top-start"}},[s("div",{staticClass:"item",on:{click:function(a){return t.jumpToDocPage("doc.html")}}},[s("div",{staticClass:"logo-text text2"},[t._v("swagger")]),s("div",[t._v("二方文档")])])])],1)])],1)])])},e=[],c={data:function(){return{}},mounted:function(){},methods:{jumpToDocPage:function(t){window.open(t)}}},o=c,l=(i("2629"),i("2877")),d=Object(l["a"])(o,s,e,!1,null,null,null);a["default"]=d.exports},d7846:function(t,a,i){}}]);
|
||||
@@ -28,7 +28,7 @@
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.zyplayer</groupId>-->
|
||||
<!-- <artifactId>dubbo-api</artifactId>-->
|
||||
<!-- <version>1.1</version>-->
|
||||
<!-- <version>1.2</version>-->
|
||||
<!-- </dependency>-->
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"presets": ["vue-app"]
|
||||
}
|
||||
13
zyplayer-doc-ui/console-ui/.editorconfig
Normal file
@@ -0,0 +1,13 @@
|
||||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = tab
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
||||
11
zyplayer-doc-ui/console-ui/.env.development
Normal file
@@ -0,0 +1,11 @@
|
||||
# 开发环境
|
||||
ENV = 'development'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'http://local.zyplayer.com:8083/zyplayer-doc-manage'
|
||||
# VUE_APP_BASE_API = 'http://doc.zyplayer.com/zyplayer-doc-manage'
|
||||
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
|
||||
|
||||
6
zyplayer-doc-ui/console-ui/.env.production
Normal file
@@ -0,0 +1,6 @@
|
||||
# 线上环境
|
||||
ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = './'
|
||||
|
||||
22
zyplayer-doc-ui/console-ui/.gitignore
vendored
@@ -1,5 +1,21 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
npm-debug.log
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
.PHONY: dist build
|
||||
install:
|
||||
@npm install
|
||||
|
||||
dev: install
|
||||
@npm run dev
|
||||
|
||||
build:
|
||||
@npm run build
|
||||
@@ -1,12 +1,12 @@
|
||||
# zyplayer-doc-manage项目的UI
|
||||
# zyplayer-doc-db项目的UI
|
||||
|
||||
## 常见问题
|
||||
|
||||
1、命令行要进入这个文件夹才能执行命令:
|
||||
|
||||
zyplayer-doc/zyplayer-doc-ui/console-ui
|
||||
zyplayer-doc/zyplayer-doc-ui/db-ui
|
||||
|
||||
2、增加host,否则run不起来:
|
||||
2、修改host,否则run不起来:
|
||||
|
||||
在文件 C:\Windows\System32\drivers\etc\hosts 末尾增加:
|
||||
|
||||
@@ -14,37 +14,34 @@ zyplayer-doc/zyplayer-doc-ui/console-ui
|
||||
|
||||
## 配置文件
|
||||
|
||||
1、这里可以配置接口请求的域名,可使用本地、线上,测试通过后就会打包到zyplayer-doc-wiki项目里面使用
|
||||
|
||||
zyplayer-doc-ui/manage-ui/src/common/config/apimix.js
|
||||
|
||||
2、这里可以配置启动后访问的地址,建议不改
|
||||
|
||||
zyplayer-doc-ui/console-ui/webpack.config.js
|
||||
配置开发环境和线上环境的请求域名地址:
|
||||
开发环境:.env.development
|
||||
线上环境:.env.production
|
||||
|
||||
## 环境要求
|
||||
|
||||
`Node >= 6`
|
||||
|
||||
|
||||
## 开始
|
||||
|
||||
``` bash
|
||||
# 执行下面的命令初始化
|
||||
yarn
|
||||
npm install
|
||||
```
|
||||
|
||||
## 开发环境
|
||||
|
||||
``` bash
|
||||
# 执行下面的命令后即可到 localhost:8010 看到页面
|
||||
# 执行下面的命令后即可到启动前端工程
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## 打包
|
||||
|
||||
``` bash
|
||||
# 开发完成后执行打包命令,然后复制dist目录里的文件到zyplayer-doc-manage项目的webjars目录下即可
|
||||
# 打包前记得修改zyplayer-doc-ui/manage-ui/src/common/config/apimix.js里的HOST接口地址
|
||||
npm run build
|
||||
# 开发完成后执行打包命令,然后复制dist目录里的文件到zyplayer-doc-db/resources目录下
|
||||
# 复制完成后记得修改index.html为doc-db.html
|
||||
# todo:是否可以直接打包为:doc-db.html,不用手动改名字
|
||||
# todo:是否可以直接打包到zyplayer-doc-db/resources文件夹下,难得复制
|
||||
```
|
||||
|
||||
5
zyplayer-doc-ui/console-ui/babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
};
|
||||
9860
zyplayer-doc-ui/console-ui/package-lock.json
generated
@@ -1,40 +1,40 @@
|
||||
{
|
||||
"name": "console-ui",
|
||||
"description": "console-ui",
|
||||
"author": "yi.shyang@ele.me",
|
||||
"name": "zyplayer-console-ui",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "webpack-dev-server --inline --hot --env.dev",
|
||||
"build": "rimraf dist && webpack -p --progress --hide-modules"
|
||||
"dev": "vue-cli-service serve --mode development",
|
||||
"build": "vue-cli-service build --mode production"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.18.0",
|
||||
"axios": "^0.19.0",
|
||||
"core-js": "^3.3.2",
|
||||
"echarts": "^4.5.0",
|
||||
"js-cookie": "^2.2.1",
|
||||
"pouchdb": "^7.1.1",
|
||||
"vue": "^2.6.10",
|
||||
"vue-axios": "^2.1.5",
|
||||
"vue-hljs": "^1.1.2",
|
||||
"vue-router": "^3.1.3",
|
||||
"vuex": "^3.1.2",
|
||||
"element-ui": "^2.10.0",
|
||||
"vue": "^2.5.16",
|
||||
"vue-axios": "^2.1.4",
|
||||
"vue-router": "^3.0.6",
|
||||
"sql-formatter": "^2.3.3",
|
||||
"wangeditor": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^6.6.0",
|
||||
"babel-core": "^6.24.1",
|
||||
"babel-loader": "^6.4.0",
|
||||
"babel-preset-vue-app": "^1.2.0",
|
||||
"css-loader": "^0.27.0",
|
||||
"file-loader": "^0.10.1",
|
||||
"html-webpack-plugin": "^2.24.1",
|
||||
"postcss-loader": "^1.3.3",
|
||||
"rimraf": "^2.6.3",
|
||||
"style-loader": "^0.13.2",
|
||||
"url-loader": "^0.5.8",
|
||||
"vue-loader": "^13.3.0",
|
||||
"vue-template-compiler": "^2.5.16",
|
||||
"webpack": "^2.4.1",
|
||||
"webpack-dev-server": "^2.4.2",
|
||||
"axios": "^0.18.0",
|
||||
"vue-axios": "^2.1.4"
|
||||
"@vue/cli-plugin-babel": "^4.0.0",
|
||||
"@vue/cli-service": "^4.0.0",
|
||||
"less": "^3.10.3",
|
||||
"less-loader": "^5.0.0",
|
||||
"vue-template-compiler": "^2.6.10"
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"autoprefixer": {}
|
||||
}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')()
|
||||
]
|
||||
}
|
||||
BIN
zyplayer-doc-ui/console-ui/public/favicon-console.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
17
zyplayer-doc-ui/console-ui/public/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon-console.png">
|
||||
<title>文档管理系统</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but zyplayer-console-ui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<template v-if="global.fullscreen">
|
||||
<template v-if="fullscreen">
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
<el-container v-else>
|
||||
@@ -14,8 +14,8 @@
|
||||
<span slot="title">系统管理</span>
|
||||
</template>
|
||||
<el-menu-item index="/console/userList"><i class="el-icon-user-solid"></i>用户管理</el-menu-item>
|
||||
<!-- <el-menu-item index="/console/roleList"><i class="el-icon-s-custom"></i>角色管理</el-menu-item>-->
|
||||
<!-- <el-menu-item index="/console/authList"><i class="el-icon-s-claim"></i>权限列表</el-menu-item>-->
|
||||
<!-- <el-menu-item index="/console/roleList"><i class="el-icon-s-custom"></i>角色管理</el-menu-item>-->
|
||||
<!-- <el-menu-item index="/console/authList"><i class="el-icon-s-claim"></i>权限列表</el-menu-item>-->
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
</div>
|
||||
@@ -26,8 +26,9 @@
|
||||
<el-dropdown @command="userSettingDropdown" trigger="click">
|
||||
<i class="el-icon-setting" style="margin-right: 15px; font-size: 16px;cursor: pointer;color: #fff;"> </i>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="aboutDoc">关于</el-dropdown-item>
|
||||
<el-dropdown-item command="myInfo" divided>我的资料</el-dropdown-item>
|
||||
<el-dropdown-item command="console">控制台</el-dropdown-item>
|
||||
<el-dropdown-item command="aboutDoc" divided>关于</el-dropdown-item>
|
||||
<el-dropdown-item command="myInfo">我的资料</el-dropdown-item>
|
||||
<el-dropdown-item command="userSignOut">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -63,10 +64,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import global from './common/config/global'
|
||||
import toast from './common/lib/common/toast'
|
||||
import consoleApi from './common/api/console'
|
||||
|
||||
var app;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -77,9 +76,12 @@
|
||||
upgradeInfo: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
fullscreen () {
|
||||
return this.$store.state.global.fullscreen;
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
global.vue.$app = this;
|
||||
this.getSelfUserInfo();
|
||||
this.checkSystemUpgrade();
|
||||
},
|
||||
@@ -95,27 +97,33 @@
|
||||
if (command == 'userSignOut') {
|
||||
this.userSignOut();
|
||||
} else if (command == 'aboutDoc') {
|
||||
app.aboutDialogVisible = true;
|
||||
this.aboutDialogVisible = true;
|
||||
} else if (command == 'myInfo') {
|
||||
this.$router.push({path: '/user/myInfo'});
|
||||
} else if (command == 'console') {
|
||||
window.location = process.env.VUE_APP_BASE_API;
|
||||
} else {
|
||||
toast.notOpen();
|
||||
this.$message.warn("功能暂未开放");
|
||||
}
|
||||
},
|
||||
userSignOut() {
|
||||
this.common.post(this.apilist1.userLogout, {}, function (json) {
|
||||
consoleApi.userLogout().then(() => {
|
||||
location.reload();
|
||||
}).catch(e => {
|
||||
console.log("退出登录失败", e);
|
||||
});
|
||||
},
|
||||
getSelfUserInfo() {
|
||||
this.common.post(this.apilist1.getSelfUserInfo, {}, function (json) {
|
||||
app.userSelfInfo = json.data;
|
||||
consoleApi.getSelfUserInfo().then(json => {
|
||||
this.userSelfInfo = json.data;
|
||||
}).catch(e => {
|
||||
console.log("获取用户信息失败", e);
|
||||
});
|
||||
},
|
||||
checkSystemUpgrade() {
|
||||
this.common.post(this.apilist1.systemUpgradeInfo, {}, function (json) {
|
||||
consoleApi.systemUpgradeInfo({}).then(json => {
|
||||
if (!!json.data) {
|
||||
app.upgradeInfo = json.data;
|
||||
this.upgradeInfo = json.data;
|
||||
console.log("zyplayer-doc发现新版本:"
|
||||
+ "\n升级地址:" + json.data.upgradeUrl
|
||||
+ "\n当前版本:" + json.data.nowVersion
|
||||
@@ -138,6 +146,9 @@
|
||||
#app, .el-container, .el-menu {
|
||||
height: 100%;
|
||||
}
|
||||
.el-header {
|
||||
background-color: #1D4E89 !important;
|
||||
}
|
||||
.header-right-user-name{color: #fff;padding-right: 5px;}
|
||||
.el-menu-vertical{border-right: 0;background: #fafafa;}
|
||||
.el-menu-vertical .el-menu{background: #fafafa;}
|
||||
|
||||
BIN
zyplayer-doc-ui/console-ui/src/assets/img/bg1.jpeg
Normal file
|
After Width: | Height: | Size: 294 KiB |
BIN
zyplayer-doc-ui/console-ui/src/assets/img/bg2.jpeg
Normal file
|
After Width: | Height: | Size: 87 KiB |
BIN
zyplayer-doc-ui/console-ui/src/assets/img/bg3.jpeg
Normal file
|
After Width: | Height: | Size: 309 KiB |
BIN
zyplayer-doc-ui/console-ui/src/assets/img/bg4.jpeg
Normal file
|
After Width: | Height: | Size: 185 KiB |
BIN
zyplayer-doc-ui/console-ui/src/assets/img/bg5.jpeg
Normal file
|
After Width: | Height: | Size: 248 KiB |
35
zyplayer-doc-ui/console-ui/src/common/api/console.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import Qs from 'qs'
|
||||
import request from './request'
|
||||
|
||||
export default {
|
||||
systemUpgradeInfo: data => {
|
||||
return request({url: '/system/info/upgrade', method: 'post', data: Qs.stringify(data)});
|
||||
},
|
||||
userLogin: data => {
|
||||
return request({url: '/login', method: 'post', data: Qs.stringify(data)});
|
||||
},
|
||||
userLogout: data => {
|
||||
return request({url: '/logout', method: 'post', data: Qs.stringify(data)});
|
||||
},
|
||||
getSelfUserInfo: data => {
|
||||
return request({url: '/user/info/selfInfo', method: 'post', data: Qs.stringify(data)});
|
||||
},
|
||||
getUserInfoList: data => {
|
||||
return request({url: '/user/info/list', method: 'post', data: Qs.stringify(data)});
|
||||
},
|
||||
updateUserInfo: data => {
|
||||
return request({url: '/user/info/update', method: 'post', data: Qs.stringify(data)});
|
||||
},
|
||||
deleteUserInfo: data => {
|
||||
return request({url: '/user/info/delete', method: 'post', data: Qs.stringify(data)});
|
||||
},
|
||||
userAuthList: data => {
|
||||
return request({url: '/user/info/auth/list', method: 'post', data: Qs.stringify(data)});
|
||||
},
|
||||
updateUserAuth: data => {
|
||||
return request({url: '/user/info/auth/update', method: 'post', data: Qs.stringify(data)});
|
||||
},
|
||||
resetPassword: data => {
|
||||
return request({url: '/user/info/resetPassword', method: 'post', data: Qs.stringify(data)});
|
||||
},
|
||||
};
|
||||
65
zyplayer-doc-ui/console-ui/src/common/api/request.js
Normal file
@@ -0,0 +1,65 @@
|
||||
import axios from 'axios'
|
||||
import vue from '../../main'
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url process.env.APP_BASE_API
|
||||
timeout: 10000,
|
||||
headers: {'Content-type': 'application/x-www-form-urlencoded'},
|
||||
withCredentials: true
|
||||
});
|
||||
// 增加不需要验证结果的标记
|
||||
const noValidate = {
|
||||
"/zyplayer-doc-db/executor/execute": true,
|
||||
"/zyplayer-doc-db/datasource/test": true,
|
||||
};
|
||||
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
config.needValidateResult = true;
|
||||
// 增加不需要验证结果的标记
|
||||
if (noValidate[config.url]) {
|
||||
config.needValidateResult = false;
|
||||
}
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
console.log(error);
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
if (!!response.message) {
|
||||
vue.$message.error('请求错误:' + response.message);
|
||||
}else {
|
||||
if (!response.config.needValidateResult || response.data.errCode == 200) {
|
||||
return response.data;
|
||||
} else if (response.data.errCode == 400) {
|
||||
vue.$message.error('请先登录');
|
||||
let redirectUrl = '';
|
||||
let locationHref = window.location.href;
|
||||
if (locationHref.indexOf("?") >= 0) {
|
||||
let reg = new RegExp("(^|&)redirect=([^&]*)(&|$)", "i");
|
||||
let r = locationHref.substring(locationHref.indexOf("?") + 1).match(reg);
|
||||
if (r != null) {
|
||||
redirectUrl = unescape(r[2]);
|
||||
}
|
||||
}
|
||||
redirectUrl = redirectUrl || encodeURIComponent(window.location.href);
|
||||
vue.$router.push({path: '/user/login', query: {redirect: redirectUrl}});
|
||||
} else if (response.data.errCode == 402) {
|
||||
vue.$router.push("/common/noAuth");
|
||||
} else if (response.data.errCode !== 200) {
|
||||
vue.$message.error(response.data.errMsg || "未知错误");
|
||||
}
|
||||
}
|
||||
return Promise.reject('请求错误');
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error);
|
||||
vue.$message.info('请求错误:' + error.message);
|
||||
return Promise.reject(error)
|
||||
}
|
||||
);
|
||||
export default service;
|
||||
@@ -1,23 +0,0 @@
|
||||
var URL = {
|
||||
userLogin: '/login',
|
||||
userLogout: '/logout',
|
||||
getSelfUserInfo: '/user/info/selfInfo',
|
||||
getUserInfoList: '/user/info/list',
|
||||
updateUserInfo: '/user/info/update',
|
||||
deleteUserInfo: '/user/info/delete',
|
||||
userAuthList: '/user/info/auth/list',
|
||||
updateUserAuth: '/user/info/auth/update',
|
||||
resetPassword: '/user/info/resetPassword',
|
||||
|
||||
systemUpgradeInfo: '/system/info/upgrade',
|
||||
};
|
||||
|
||||
var URL1 = {};
|
||||
|
||||
export default {
|
||||
URL, URL1
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
import apilist from './apilist'
|
||||
|
||||
var href = window.location.href;
|
||||
|
||||
var _fn = {
|
||||
href: href,
|
||||
// 本地启动时使用本地接口调试
|
||||
// HOST: 'http://local.zyplayer.com:8083/zyplayer-doc-manage',
|
||||
// HOST1: 'http://local.zyplayer.com:8083/zyplayer-doc-manage',
|
||||
// 也可以直接使用线上的服务调试
|
||||
// HOST: 'http://doc.zyplayer.com/zyplayer-doc-manage',
|
||||
// HOST1: 'http://doc.zyplayer.com/zyplayer-doc-manage',
|
||||
// 打包时使用下面这两行,文件就放在根目录下,所以当前路劲就好
|
||||
HOST: './',
|
||||
HOST1: './',
|
||||
|
||||
mixUrl: function (host, url) {
|
||||
var p;
|
||||
if (!host || !url || _fn.isEmptyObject(url)) {
|
||||
return;
|
||||
}
|
||||
url.HOST = host;
|
||||
for (p in url) {
|
||||
if (url[p].indexOf('http') == -1) {
|
||||
url[p] = host + url[p];
|
||||
}
|
||||
}
|
||||
return url;
|
||||
},
|
||||
//判断是否空对象
|
||||
isEmptyObject: function (obj) { //判断空对象
|
||||
if (typeof obj === "object" && !(obj instanceof Array)) {
|
||||
var hasProp = false;
|
||||
for (var prop in obj) {
|
||||
hasProp = true;
|
||||
break;
|
||||
}
|
||||
if (hasProp) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var apilist1 = _fn.mixUrl(_fn.HOST, apilist.URL);
|
||||
var apilist2 = _fn.mixUrl(_fn.HOST1, apilist.URL1);
|
||||
|
||||
export default {
|
||||
apilist1, apilist2
|
||||
};
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
const user = {
|
||||
isLogin: true,
|
||||
};
|
||||
const vue = {};
|
||||
const fullscreen = false;
|
||||
|
||||
export default {
|
||||
vue,
|
||||
user,
|
||||
fullscreen,
|
||||
}
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
import Qs from 'qs'
|
||||
import global from '../../config/global'
|
||||
import apimix from '../../config/apimix'
|
||||
|
||||
export default {
|
||||
data: {
|
||||
accessToken: '',
|
||||
},
|
||||
setAccessToken: function (token) {
|
||||
this.data.accessToken = token;
|
||||
},
|
||||
getAccessToken: function () {
|
||||
if (!this.data.accessToken) {
|
||||
var arr, reg = new RegExp("(^| )accessToken=([^;]*)(;|$)");
|
||||
if (arr = document.cookie.match(reg)) {
|
||||
this.data.accessToken = unescape(arr[2]);
|
||||
}
|
||||
}
|
||||
return this.data.accessToken;
|
||||
},
|
||||
validateResult: function (res, callback) {
|
||||
if (!!res.message) {
|
||||
global.vue.$message('请求错误:' + res.message);
|
||||
} else if (res.data.errCode == 400) {
|
||||
var href = encodeURIComponent(window.location.href);
|
||||
if (global.vue.$router.currentRoute.path != '/user/login') {
|
||||
global.vue.$message('请先登录');
|
||||
global.vue.$router.push({path: '/user/login', query: {redirect: href}});
|
||||
}
|
||||
} else if (res.data.errCode == 402) {
|
||||
global.vue.$router.push("/common/noAuth");
|
||||
} else if (res.data.errCode !== 200) {
|
||||
global.vue.$message(res.data.errMsg || "未知错误");
|
||||
} else {
|
||||
if (typeof callback == 'function') {
|
||||
callback(res.data);
|
||||
}
|
||||
}
|
||||
},
|
||||
post: function (url, param, callback) {
|
||||
param = param || {};
|
||||
param.accessToken = this.getAccessToken();
|
||||
global.vue.axios({
|
||||
method: "post",
|
||||
url: url,
|
||||
headers: {'Content-type': 'application/x-www-form-urlencoded'},
|
||||
data: Qs.stringify(param),
|
||||
withCredentials: true,
|
||||
}).then((res) => {
|
||||
console.log("ok", res);
|
||||
this.validateResult(res, callback);
|
||||
}).catch((res) => {
|
||||
console.log("error", res);
|
||||
this.validateResult(res);
|
||||
});
|
||||
},
|
||||
postNonCheck: function (url, param, callback) {
|
||||
param = param || {};
|
||||
param.accessToken = this.getAccessToken();
|
||||
global.vue.axios({
|
||||
method: "post",
|
||||
url: url,
|
||||
headers: {'Content-type': 'application/x-www-form-urlencoded'},
|
||||
data: Qs.stringify(param),
|
||||
withCredentials: true,
|
||||
}).then((res) => {
|
||||
console.log("ok", res);
|
||||
if (typeof callback == 'function') {
|
||||
callback(res.data);
|
||||
}
|
||||
}).catch((res) => {
|
||||
console.log("error", res);
|
||||
if (typeof callback == 'function') {
|
||||
callback(res.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 返回不为空的字符串,为空返回def
|
||||
*/
|
||||
getNotEmptyStr(str, def) {
|
||||
if (isEmpty(str)) {
|
||||
return isEmpty(def) ? "" : def;
|
||||
}
|
||||
return str;
|
||||
},
|
||||
/**
|
||||
* 是否是空对象
|
||||
* @param obj
|
||||
* @returns
|
||||
*/
|
||||
isEmptyObject(obj) {
|
||||
return isEmpty(obj) || $.isEmptyObject(obj);
|
||||
},
|
||||
/**
|
||||
* 是否是空字符串
|
||||
* @param str
|
||||
* @returns
|
||||
*/
|
||||
isEmpty(str) {
|
||||
return (str == "" || str == null || str == undefined);
|
||||
},
|
||||
/**
|
||||
* 是否不是空字符串
|
||||
* @param str
|
||||
* @returns
|
||||
*/
|
||||
isNotEmpty(str) {
|
||||
return !isEmpty(str);
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
import global from '../../config/global'
|
||||
|
||||
/**
|
||||
* 提示工具类
|
||||
* @author
|
||||
* @since 2017年5月7日
|
||||
*/
|
||||
export default {
|
||||
notOpen: function () {
|
||||
global.vue.$message({
|
||||
message: '该功能暂未开放,敬请期待!',
|
||||
type: 'warning',
|
||||
showClose: true
|
||||
});
|
||||
},
|
||||
success: function (msg, time) {
|
||||
global.vue.$message({
|
||||
message: msg,
|
||||
duration: time || 3000,
|
||||
type: 'success',
|
||||
showClose: true
|
||||
});
|
||||
},
|
||||
warn: function (msg, time) {
|
||||
global.vue.$message({
|
||||
message: msg,
|
||||
duration: time || 3000,
|
||||
type: 'warning',
|
||||
showClose: true
|
||||
});
|
||||
},
|
||||
error: function (msg, time) {
|
||||
global.vue.$message({
|
||||
message: msg,
|
||||
duration: time || 3000,
|
||||
type: 'error',
|
||||
showClose: true
|
||||
});
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs v-model="activePage" type="card" closable @tab-click="changePage" @tab-remove="removePageTab" style="padding: 5px 10px 0;">
|
||||
<el-tab-pane :label="pageTabNameMap[item.fullPath]||item.name" :name="item.fullPath" v-for="item in pageList"/>
|
||||
</el-tabs>
|
||||
<keep-alive>
|
||||
<router-view :key="$route.fullPath" @initLoadDataList="initLoadDataList" @loadDatasourceList="loadDatasourceList"/>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PageTableView',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
pageList: [],
|
||||
linkList: [],
|
||||
activePage: '',
|
||||
multiPage: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pageTabNameMap () {
|
||||
return this.$store.state.global.pageTabNameMap;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageList.push(this.$route);
|
||||
this.linkList.push(this.$route.fullPath);
|
||||
this.activePage = this.$route.fullPath;
|
||||
},
|
||||
watch: {
|
||||
'$route': function (newRoute, oldRoute) {
|
||||
this.activePage = newRoute.fullPath;
|
||||
if (this.linkList.indexOf(newRoute.fullPath) < 0) {
|
||||
this.linkList.push(newRoute.fullPath);
|
||||
this.pageList.push(newRoute);
|
||||
}
|
||||
},
|
||||
'activePage': function (key) {
|
||||
this.$router.push(key)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initLoadDataList(param) {
|
||||
this.$emit('initLoadDataList', param);
|
||||
},
|
||||
loadDatasourceList() {
|
||||
this.$emit('loadDatasourceList');
|
||||
},
|
||||
changePage(key) {
|
||||
this.activePage = key.name;
|
||||
},
|
||||
editPage(key, action) {
|
||||
this[action](key);
|
||||
},
|
||||
removePageTab(key) {
|
||||
if (this.pageList.length === 1) {
|
||||
this.$message.warning('这是最后一页,不能再关闭了啦');
|
||||
return
|
||||
}
|
||||
this.pageList = this.pageList.filter(item => item.fullPath !== key);
|
||||
let index = this.linkList.indexOf(key);
|
||||
this.linkList = this.linkList.filter(item => item !== key);
|
||||
index = index >= this.linkList.length ? this.linkList.length - 1 : index;
|
||||
this.activePage = this.linkList[index];
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>文档管理系统</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>文档管理系统</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -3,57 +3,41 @@ import ElementUI from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
import App from './App.vue'
|
||||
|
||||
import global from './common/config/global'
|
||||
import apimix from './common/config/apimix'
|
||||
import common from './common/lib/common/common'
|
||||
import toast from './common/lib/common/toast'
|
||||
|
||||
import VueRouter from 'vue-router'
|
||||
import routes from './routes'
|
||||
import store from './store/index'
|
||||
import axios from 'axios'
|
||||
import VueAxios from 'vue-axios'
|
||||
|
||||
import vueHljs from "vue-hljs";
|
||||
import "vue-hljs/dist/vue-hljs.min.css";
|
||||
|
||||
Vue.use(ElementUI);
|
||||
Vue.use(VueRouter);
|
||||
Vue.use(VueAxios, axios);
|
||||
Vue.use(vueHljs);
|
||||
|
||||
// 全局参数
|
||||
Vue.prototype.global = global;
|
||||
// 接口列表
|
||||
Vue.prototype.apilist1 = apimix.apilist1;
|
||||
Vue.prototype.apilist2 = apimix.apilist1;
|
||||
// 公用方法
|
||||
Vue.prototype.common = common;
|
||||
Vue.prototype.toast = toast;
|
||||
Vue.prototype.$store = store;
|
||||
|
||||
const router = new VueRouter({routes});
|
||||
// 路由跳转时判断处理
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.meta.title) {
|
||||
document.title = to.meta.title
|
||||
document.title = to.meta.title;
|
||||
}
|
||||
global.fullscreen = !!to.meta.fullscreen;
|
||||
/* 判断该路由是否需要登录权限 */
|
||||
if (to.matched.some(record => record.meta.requireAuth)) {
|
||||
if (global.user.isLogin) {
|
||||
store.commit('global/setFullscreen', !!to.meta.fullscreen);
|
||||
next();
|
||||
} else {
|
||||
next({path: '/login'});
|
||||
}
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
});
|
||||
|
||||
new Vue({
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
render(h) {
|
||||
var app = h(App);
|
||||
global.vue = app.context;
|
||||
return app;
|
||||
return h(App);
|
||||
}
|
||||
});
|
||||
export default vue;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,52 +1,43 @@
|
||||
import Home from './views/home/Home.vue'
|
||||
|
||||
import UserLogin from './views/user/Login.vue'
|
||||
import UserMyInfo from './views/user/MyInfo.vue'
|
||||
import UserRouterView from './views/user/RouterView.vue'
|
||||
|
||||
import ConsoleRoleList from './views/console/RoleList.vue'
|
||||
import ConsoleUserList from './views/console/UserList.vue'
|
||||
import ConsoleAuthList from './views/console/AuthList.vue'
|
||||
import ConsoleRouterView from './views/console/RouterView.vue'
|
||||
|
||||
import CommonNoAuth from './views/common/NoAuth.vue'
|
||||
import PageTableView from './components/layouts/PageTableView'
|
||||
|
||||
let routes = [
|
||||
{path: '/', redirect: '/home'},
|
||||
{
|
||||
path: '/home',
|
||||
component: Home,
|
||||
name: '主页',
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
}
|
||||
path: '/user/login',
|
||||
name: '系统登录',
|
||||
component: () => import('@/views/user/Login.vue'),
|
||||
meta: {fullscreen: true}
|
||||
}, {
|
||||
path: '/',
|
||||
name: '页面管理',
|
||||
component: PageTableView,
|
||||
children: [
|
||||
{path: '/home', name: '控制台', component: () => import('@/views/home/Home')},
|
||||
]
|
||||
}, {
|
||||
path: '/user',
|
||||
name: '用户管理',
|
||||
component: UserRouterView,
|
||||
component: PageTableView,
|
||||
children: [
|
||||
{path: 'login', name: '系统登录',component: UserLogin, meta: {fullscreen: true}},
|
||||
{path: 'myInfo', name: '我的信息',component: UserMyInfo},
|
||||
{path: 'myInfo', name: '我的信息', component: () => import('@/views/user/MyInfo.vue')},
|
||||
]
|
||||
}, {
|
||||
path: '/console',
|
||||
name: '系统管理',
|
||||
component: ConsoleRouterView,
|
||||
component: PageTableView,
|
||||
children: [
|
||||
{path: 'userList', name: '用户管理',component: ConsoleUserList},
|
||||
{path: 'roleList', name: '权限管理',component: ConsoleRoleList},
|
||||
{path: 'authList', name: '角色列表',component: ConsoleAuthList},
|
||||
{path: 'userList', name: '用户管理', component: () => import('@/views/console/UserList.vue')},
|
||||
{path: 'roleList', name: '权限管理', component: () => import('@/views/console/AuthList.vue')},
|
||||
{path: 'authList', name: '角色列表', component: () => import('@/views/console/RoleList.vue')},
|
||||
]
|
||||
}, {
|
||||
path: '/common',
|
||||
name: '',
|
||||
component: UserRouterView,
|
||||
component: PageTableView,
|
||||
children: [
|
||||
{path: 'noAuth', name: '没有权限',component: CommonNoAuth},
|
||||
{path: 'noAuth', name: '没有权限', component: () => import('@/views/common/NoAuth.vue')},
|
||||
]
|
||||
}, {
|
||||
path: '/',
|
||||
redirect: '/home'
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
export default routes;
|
||||
|
||||
11
zyplayer-doc-ui/console-ui/src/store/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import global from './modules/global'
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
export default new Vuex.Store({
|
||||
modules: {
|
||||
global,
|
||||
}
|
||||
});
|
||||
22
zyplayer-doc-ui/console-ui/src/store/modules/global.js
Normal file
@@ -0,0 +1,22 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
pageTabNameMap: {},
|
||||
fullscreen: false,
|
||||
},
|
||||
getters: {
|
||||
getPageTabNameMap(state) {
|
||||
return state.pageTabNameMap;
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
addTableName(state, item) {
|
||||
let sameObj = Object.assign({}, state.pageTabNameMap);
|
||||
sameObj[item.key] = item.val;
|
||||
state.pageTabNameMap = sameObj;
|
||||
},
|
||||
setFullscreen(state, val) {
|
||||
state.fullscreen = val;
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import ElementUI from 'element-ui'
|
||||
@@ -25,7 +25,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var app;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -48,7 +47,6 @@
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
|
||||
@@ -77,7 +77,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var app;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -100,7 +99,6 @@
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<template>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
|
||||
@@ -124,9 +124,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import toast from '../../common/lib/common/toast'
|
||||
var app;
|
||||
|
||||
import consoleApi from '../../common/api/console'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -150,7 +148,6 @@
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
this.getUserList();
|
||||
},
|
||||
methods: {
|
||||
@@ -163,17 +160,17 @@
|
||||
this.getUserList();
|
||||
},
|
||||
editUserAuthFun(row) {
|
||||
app.allUserAuth = [];
|
||||
app.editUserAuth = [];
|
||||
this.allUserAuth = [];
|
||||
this.editUserAuth = [];
|
||||
var param = {userIds: row.id};
|
||||
this.common.post(this.apilist1.userAuthList, param, function (json) {
|
||||
app.editUserAuth = [];
|
||||
app.allUserAuth = json.data;
|
||||
app.editUserAuthDialogVisible = true;
|
||||
app.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
for (var i = 0; i < app.allUserAuth.length; i++) {
|
||||
if (app.allUserAuth[i].checked == 1) {
|
||||
app.editUserAuth.push(app.allUserAuth[i].id);
|
||||
consoleApi.userAuthList(param).then(json => {
|
||||
this.editUserAuth = [];
|
||||
this.allUserAuth = json.data;
|
||||
this.editUserAuthDialogVisible = true;
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
for (var i = 0; i < this.allUserAuth.length; i++) {
|
||||
if (this.allUserAuth[i].checked == 1) {
|
||||
this.editUserAuth.push(this.allUserAuth[i].id);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -183,14 +180,14 @@
|
||||
userIds: this.editUserForm.id,
|
||||
authIds: this.editUserAuth.join(","),
|
||||
};
|
||||
this.common.post(this.apilist1.updateUserAuth, param, function (json) {
|
||||
toast.success("保存成功!");
|
||||
app.editUserAuthDialogVisible = false;
|
||||
consoleApi.updateUserAuth(param).then(json => {
|
||||
this.$message.success("保存成功!");
|
||||
this.editUserAuthDialogVisible = false;
|
||||
});
|
||||
},
|
||||
editUserInfo(row) {
|
||||
app.editUserDialogVisible = true;
|
||||
app.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
this.editUserDialogVisible = true;
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
},
|
||||
addUserInfo() {
|
||||
this.editUserDialogVisible = true;
|
||||
@@ -203,9 +200,8 @@
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
this.common.post(this.apilist1.resetPassword, this.editUserForm, function (json) {
|
||||
consoleApi.resetPassword(this.editUserForm).then(json => {
|
||||
app.$confirm("重置成功!新的密码为:" + json.data).then(()=> {
|
||||
done();
|
||||
}).catch(()=> {});
|
||||
});
|
||||
}).catch(()=>{});
|
||||
@@ -217,26 +213,26 @@
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
this.common.post(this.apilist1.deleteUserInfo, this.editUserForm, function (json) {
|
||||
toast.success("删除成功!");
|
||||
app.getUserList();
|
||||
consoleApi.deleteUserInfo(this.editUserForm).then(json => {
|
||||
this.$message.success("删除成功!");
|
||||
this.getUserList();
|
||||
});
|
||||
}).catch(()=>{});
|
||||
},
|
||||
updateEditUser() {
|
||||
this.common.post(this.apilist1.updateUserInfo, this.editUserForm, function (json) {
|
||||
toast.success("保存成功!");
|
||||
app.editUserDialogVisible = false;
|
||||
app.getUserList();
|
||||
consoleApi.updateUserInfo(this.editUserForm).then(json => {
|
||||
this.$message.success("保存成功!");
|
||||
this.editUserDialogVisible = false;
|
||||
this.getUserList();
|
||||
});
|
||||
},
|
||||
getUserList() {
|
||||
this.searchLoading = true;
|
||||
this.common.post(this.apilist1.getUserInfoList, this.searchParam, function (json) {
|
||||
consoleApi.getUserInfoList(this.searchParam).then(json => {
|
||||
// 让加载动画停留一会
|
||||
setTimeout(()=>{app.searchLoading = false;}, 500);
|
||||
app.totalCount = json.total;
|
||||
app.searchResultList = json.data;
|
||||
setTimeout(()=>{this.searchLoading = false;}, 500);
|
||||
this.totalCount = json.total;
|
||||
this.searchResultList = json.data;
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
@@ -64,18 +64,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import toast from '../../common/lib/common/toast'
|
||||
import global from '../../common/config/global'
|
||||
|
||||
var app;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
},
|
||||
methods: {
|
||||
jumpToDocPage(val) {
|
||||
|
||||
@@ -1,24 +1,32 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="padding-top: 50px;">
|
||||
<el-form :model="loginParam" :rules="loginRules" ref="loginParam" label-position="left" label-width="0px"
|
||||
class="demo-ruleForm login-container">
|
||||
<h3 class="title">系统登录</h3>
|
||||
<el-form :model="loginParam" :rules="loginRules" ref="loginParam" label-position="left" label-width="0px" class="demo-ruleForm login-container">
|
||||
<h3 class="title">文档管理-系统登录</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input type="text" v-model="loginParam.username" auto-complete="off" placeholder="账号" @keyup.enter="loginSubmit"></el-input>
|
||||
<el-input type="text" v-model="loginParam.username" auto-complete="off" placeholder="账号" @keyup.enter.native="loginSubmit"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input type="password" v-model="loginParam.password" auto-complete="off" placeholder="密码" @keyup.enter="loginSubmit"></el-input>
|
||||
<el-input type="password" v-model="loginParam.password" auto-complete="off" placeholder="密码" @keyup.enter.native="loginSubmit"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button type="primary" style="width:100%;" @click.native.prevent="loginSubmit" :loading="logining">登录
|
||||
</el-button>
|
||||
<el-button type="primary" style="width:100%;" @click.native.prevent="loginSubmit" :loading="logining">登录</el-button>
|
||||
<!--<el-button @click.native.prevent="handleReset2">重置</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--随机背景图-->
|
||||
<img v-if="bgImgRandom == 1" src="../../assets/img/bg1.jpeg" class="login-background-img">
|
||||
<img v-else-if="bgImgRandom == 2" src="../../assets/img/bg2.jpeg" class="login-background-img">
|
||||
<img v-else-if="bgImgRandom == 3" src="../../assets/img/bg3.jpeg" class="login-background-img">
|
||||
<img v-else-if="bgImgRandom == 4" src="../../assets/img/bg4.jpeg" class="login-background-img">
|
||||
<img v-else-if="bgImgRandom == 5" src="../../assets/img/bg5.jpeg" class="login-background-img">
|
||||
<img v-else src="../../assets/img/bg5.jpeg" class="login-background-img">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import consoleApi from '../../common/api/console'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -36,7 +44,8 @@
|
||||
{required: true, message: '请输入密码', trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
checked: true
|
||||
checked: true,
|
||||
bgImgRandom: Math.ceil(Math.random() * 4) + 1,
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
@@ -44,14 +53,13 @@
|
||||
},
|
||||
methods: {
|
||||
loginSubmit() {
|
||||
var that = this;
|
||||
this.$refs.loginParam.validate((valid) => {
|
||||
if (!valid) return;
|
||||
that.common.post(that.apilist1.userLogin, that.loginParam, function (json) {
|
||||
if(!!that.redirect) {
|
||||
location.href = decodeURIComponent(that.redirect);
|
||||
consoleApi.userLogin(this.loginParam).then(() => {
|
||||
if (!!this.redirect) {
|
||||
location.href = decodeURIComponent(this.redirect);
|
||||
} else {
|
||||
that.$router.back();
|
||||
this.$router.back();
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -84,5 +92,8 @@
|
||||
margin: 0px 0px 35px 0px;
|
||||
}
|
||||
|
||||
.login-background-img{
|
||||
width: 100%; height: 100%; position: absolute;z-index: -1;top:0;left:0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var app;
|
||||
import consoleApi from '../../common/api/console'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -29,13 +29,12 @@
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
this.common.post(this.apilist1.getSelfUserInfo, this.searchParam, function (json) {
|
||||
app.userInfo = json.data;
|
||||
consoleApi.getSelfUserInfo().then(json => {
|
||||
this.userInfo = json.data;
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<template>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
|
||||
12
zyplayer-doc-ui/console-ui/vue.config.js
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
// 官方配置文档:https://webpack.js.org/configuration/dev-server/
|
||||
module.exports = {
|
||||
devServer: {
|
||||
hot: true,
|
||||
disableHostCheck: true,
|
||||
port: 80,
|
||||
host: 'local.zyplayer.com'
|
||||
},
|
||||
publicPath: './',
|
||||
productionSourceMap: false
|
||||
};
|
||||
@@ -1,75 +0,0 @@
|
||||
const resolve = require('path').resolve;
|
||||
const webpack = require('webpack');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const url = require('url');
|
||||
const publicPath = '';
|
||||
|
||||
module.exports = (options = {}) => ({
|
||||
entry: {
|
||||
vendor: './src/vendor',
|
||||
index: './src/main.js'
|
||||
},
|
||||
output: {
|
||||
path: resolve(__dirname, 'dist'),
|
||||
filename: options.dev ? '[name].js' : 'doc-console-[name].js?[chunkhash]',
|
||||
chunkFilename: '[id].js?[chunkhash]',
|
||||
publicPath: options.dev ? '/assets/' : publicPath
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.vue$/,
|
||||
use: ['vue-loader']
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
use: ['babel-loader'],
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader', 'postcss-loader']
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2|svg|svgz)(\?.+)?$/,
|
||||
use: [{
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 800000
|
||||
}
|
||||
}]
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
names: ['vendor', 'manifest']
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: options.dev ? 'src/index.html':'src/doc-console.html',
|
||||
filename: options.dev ? 'index.html':'doc-console.html',
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'~': resolve(__dirname, 'src')
|
||||
},
|
||||
extensions: ['.js', '.vue', '.json', '.css']
|
||||
},
|
||||
devServer: {
|
||||
host: 'local.zyplayer.com',
|
||||
port: 8010,
|
||||
proxy: {
|
||||
'/api/': {
|
||||
target: 'http://local.zyplayer.com:8080',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': ''
|
||||
}
|
||||
}
|
||||
},
|
||||
historyApiFallback: {
|
||||
index: url.parse(options.dev ? '/assets/' : publicPath).pathname
|
||||
}
|
||||
},
|
||||
devtool: options.dev ? '#eval-source-map' : '#source-map'
|
||||
});
|
||||