@ -0,0 +1,3 @@ |
|||
> 1% |
|||
last 2 versions |
|||
not ie <= 8 |
@ -0,0 +1,23 @@ |
|||
.DS_Store |
|||
node_modules |
|||
/dist |
|||
/src/router/index.js |
|||
|
|||
# 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* |
|||
|
@ -0,0 +1,4 @@ |
|||
module.exports = { |
|||
/* fix https://github.com/vuejs/vue-cli/issues/3678 */ |
|||
presets: [["@vue/app", { useBuiltIns: "entry" }]] |
|||
} |
@ -0,0 +1,10 @@ |
|||
{ |
|||
"compilerOptions": { |
|||
"baseUrl": "./", |
|||
"paths": { |
|||
"@/*": [ |
|||
"src/*" |
|||
], |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,60 @@ |
|||
{ |
|||
"name": "vue-admin3", |
|||
"version": "0.1.0", |
|||
"private": true, |
|||
"scripts": { |
|||
"serve": "vue-cli-service serve", |
|||
"build": "vue-cli-service build" |
|||
}, |
|||
"dependencies": { |
|||
"awe-dnd": "^0.3.4", |
|||
"axios": "0.18.0", |
|||
"clipboard": "1.7.1", |
|||
"codemirror": "5.39.2", |
|||
"driver.js": "0.8.1", |
|||
"dropzone": "5.2.0", |
|||
"echarts": "4.1.0", |
|||
"element-china-area-data": "^4.1.2", |
|||
"element-ui": "2.4.11", |
|||
"file-saver": "1.3.8", |
|||
"fuse.js": "3.4.2", |
|||
"js-cookie": "2.2.0", |
|||
"jsonlint": "1.6.3", |
|||
"jszip": "3.1.5", |
|||
"lodash": "^4.17.11", |
|||
"lodash.map": "^4.6.0", |
|||
"lodash.sortby": "^4.7.0", |
|||
"mockjs": "^1.0.1-beta3", |
|||
"moment": "^2.24.0", |
|||
"normalize.css": "7.0.0", |
|||
"nprogress": "0.2.0", |
|||
"qiniu-js": "^2.5.4", |
|||
"screenfull": "4.0.0", |
|||
"showdown": "1.8.6", |
|||
"sortablejs": "1.7.0", |
|||
"tui-editor": "1.2.7", |
|||
"vue": "^2.6.10", |
|||
"vue-count-to": "1.0.13", |
|||
"vue-router": "^3.0.2", |
|||
"vue-splitpane": "1.0.2", |
|||
"vue-sticky": "^3.3.4", |
|||
"vue-sticky-directive": "^0.0.8", |
|||
"vue-video-player": "^5.0.2", |
|||
"vuedraggable": "^2.20.0", |
|||
"vuex": "^3.1.0", |
|||
"xlsx": "^0.11.16" |
|||
}, |
|||
"devDependencies": { |
|||
"@vue/cli-plugin-babel": "^3.5.0", |
|||
"@vue/cli-service": "^3.5.0", |
|||
"babel-preset-es2015": "^6.24.1", |
|||
"babel-register": "^6.26.0", |
|||
"body-parser": "^1.18.3", |
|||
"fibers": "^3.1.1", |
|||
"lodash.clone": "^4.5.0", |
|||
"postcss-calc": "^7.0.1", |
|||
"sass": "^1.17.2", |
|||
"sass-loader": "^7.1.0", |
|||
"vue-template-compiler": "^2.5.21" |
|||
} |
|||
} |
@ -0,0 +1,6 @@ |
|||
module.exports = { |
|||
plugins: { |
|||
autoprefixer: {}, |
|||
'postcss-calc': {}, |
|||
} |
|||
} |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,31 @@ |
|||
<!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.ico"> |
|||
<title>趣匣后台管理系统</title> |
|||
</head> |
|||
|
|||
<body> |
|||
<noscript> |
|||
<strong>We're sorry but vue-admin3 doesn't work properly without JavaScript enabled. Please enable it to |
|||
continue.</strong> |
|||
</noscript> |
|||
<div id="app"></div> |
|||
<!-- ali iconfont --> |
|||
<!-- <script src="/static/iconfont/iconfont.js"></script> --> |
|||
<!-- <script src="//at.alicdn.com/t/font_1118495_6ibsffxed7y.js"></script> --> |
|||
<script src="//at.alicdn.com/t/font_1118495_x0l7sgouyg9.js"></script> |
|||
<script src="//at.alicdn.com/t/font_1118495_l9d2ctejxr.js"></script> |
|||
<script src="//at.alicdn.com/t/font_1118495_8gx7uj5mos9.js"></script> |
|||
<script src="//at.alicdn.com/t/font_1118495_qy9m22tik77.js"></script> |
|||
<!-- lodash --> |
|||
<script src="https://cdn.bootcss.com/lodash.js/4.17.12-pre/lodash.min.js"></script> |
|||
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> |
|||
<!-- built files will be auto injected --> |
|||
</body> |
|||
|
|||
</html> |
@ -0,0 +1,539 @@ |
|||
/* Logo 字体 */ |
|||
@font-face { |
|||
font-family: "iconfont logo"; |
|||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); |
|||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), |
|||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), |
|||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), |
|||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); |
|||
} |
|||
|
|||
.logo { |
|||
font-family: "iconfont logo"; |
|||
font-size: 160px; |
|||
font-style: normal; |
|||
-webkit-font-smoothing: antialiased; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
} |
|||
|
|||
/* tabs */ |
|||
.nav-tabs { |
|||
position: relative; |
|||
} |
|||
|
|||
.nav-tabs .nav-more { |
|||
position: absolute; |
|||
right: 0; |
|||
bottom: 0; |
|||
height: 42px; |
|||
line-height: 42px; |
|||
color: #666; |
|||
} |
|||
|
|||
#tabs { |
|||
border-bottom: 1px solid #eee; |
|||
} |
|||
|
|||
#tabs li { |
|||
cursor: pointer; |
|||
width: 100px; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
text-align: center; |
|||
font-size: 16px; |
|||
border-bottom: 2px solid transparent; |
|||
position: relative; |
|||
z-index: 1; |
|||
margin-bottom: -1px; |
|||
color: #666; |
|||
} |
|||
|
|||
|
|||
#tabs .active { |
|||
border-bottom-color: #f00; |
|||
color: #222; |
|||
} |
|||
|
|||
.tab-container .content { |
|||
display: none; |
|||
} |
|||
|
|||
/* 页面布局 */ |
|||
.main { |
|||
padding: 30px 100px; |
|||
width: 960px; |
|||
margin: 0 auto; |
|||
} |
|||
|
|||
.main .logo { |
|||
color: #333; |
|||
text-align: left; |
|||
margin-bottom: 30px; |
|||
line-height: 1; |
|||
height: 110px; |
|||
margin-top: -50px; |
|||
overflow: hidden; |
|||
*zoom: 1; |
|||
} |
|||
|
|||
.main .logo a { |
|||
font-size: 160px; |
|||
color: #333; |
|||
} |
|||
|
|||
.helps { |
|||
margin-top: 40px; |
|||
} |
|||
|
|||
.helps pre { |
|||
padding: 20px; |
|||
margin: 10px 0; |
|||
border: solid 1px #e7e1cd; |
|||
background-color: #fffdef; |
|||
overflow: auto; |
|||
} |
|||
|
|||
.icon_lists { |
|||
width: 100% !important; |
|||
overflow: hidden; |
|||
*zoom: 1; |
|||
} |
|||
|
|||
.icon_lists li { |
|||
width: 100px; |
|||
margin-bottom: 10px; |
|||
margin-right: 20px; |
|||
text-align: center; |
|||
list-style: none !important; |
|||
cursor: default; |
|||
} |
|||
|
|||
.icon_lists li .code-name { |
|||
line-height: 1.2; |
|||
} |
|||
|
|||
.icon_lists .icon { |
|||
display: block; |
|||
height: 100px; |
|||
line-height: 100px; |
|||
font-size: 42px; |
|||
margin: 10px auto; |
|||
color: #333; |
|||
-webkit-transition: font-size 0.25s linear, width 0.25s linear; |
|||
-moz-transition: font-size 0.25s linear, width 0.25s linear; |
|||
transition: font-size 0.25s linear, width 0.25s linear; |
|||
} |
|||
|
|||
.icon_lists .icon:hover { |
|||
font-size: 100px; |
|||
} |
|||
|
|||
.icon_lists .svg-icon { |
|||
/* 通过设置 font-size 来改变图标大小 */ |
|||
width: 1em; |
|||
/* 图标和文字相邻时,垂直对齐 */ |
|||
vertical-align: -0.15em; |
|||
/* 通过设置 color 来改变 SVG 的颜色/fill */ |
|||
fill: currentColor; |
|||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 |
|||
normalize.css 中也包含这行 */ |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.icon_lists li .name, |
|||
.icon_lists li .code-name { |
|||
color: #666; |
|||
} |
|||
|
|||
/* markdown 样式 */ |
|||
.markdown { |
|||
color: #666; |
|||
font-size: 14px; |
|||
line-height: 1.8; |
|||
} |
|||
|
|||
.highlight { |
|||
line-height: 1.5; |
|||
} |
|||
|
|||
.markdown img { |
|||
vertical-align: middle; |
|||
max-width: 100%; |
|||
} |
|||
|
|||
.markdown h1 { |
|||
color: #404040; |
|||
font-weight: 500; |
|||
line-height: 40px; |
|||
margin-bottom: 24px; |
|||
} |
|||
|
|||
.markdown h2, |
|||
.markdown h3, |
|||
.markdown h4, |
|||
.markdown h5, |
|||
.markdown h6 { |
|||
color: #404040; |
|||
margin: 1.6em 0 0.6em 0; |
|||
font-weight: 500; |
|||
clear: both; |
|||
} |
|||
|
|||
.markdown h1 { |
|||
font-size: 28px; |
|||
} |
|||
|
|||
.markdown h2 { |
|||
font-size: 22px; |
|||
} |
|||
|
|||
.markdown h3 { |
|||
font-size: 16px; |
|||
} |
|||
|
|||
.markdown h4 { |
|||
font-size: 14px; |
|||
} |
|||
|
|||
.markdown h5 { |
|||
font-size: 12px; |
|||
} |
|||
|
|||
.markdown h6 { |
|||
font-size: 12px; |
|||
} |
|||
|
|||
.markdown hr { |
|||
height: 1px; |
|||
border: 0; |
|||
background: #e9e9e9; |
|||
margin: 16px 0; |
|||
clear: both; |
|||
} |
|||
|
|||
.markdown p { |
|||
margin: 1em 0; |
|||
} |
|||
|
|||
.markdown>p, |
|||
.markdown>blockquote, |
|||
.markdown>.highlight, |
|||
.markdown>ol, |
|||
.markdown>ul { |
|||
width: 80%; |
|||
} |
|||
|
|||
.markdown ul>li { |
|||
list-style: circle; |
|||
} |
|||
|
|||
.markdown>ul li, |
|||
.markdown blockquote ul>li { |
|||
margin-left: 20px; |
|||
padding-left: 4px; |
|||
} |
|||
|
|||
.markdown>ul li p, |
|||
.markdown>ol li p { |
|||
margin: 0.6em 0; |
|||
} |
|||
|
|||
.markdown ol>li { |
|||
list-style: decimal; |
|||
} |
|||
|
|||
.markdown>ol li, |
|||
.markdown blockquote ol>li { |
|||
margin-left: 20px; |
|||
padding-left: 4px; |
|||
} |
|||
|
|||
.markdown code { |
|||
margin: 0 3px; |
|||
padding: 0 5px; |
|||
background: #eee; |
|||
border-radius: 3px; |
|||
} |
|||
|
|||
.markdown strong, |
|||
.markdown b { |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.markdown>table { |
|||
border-collapse: collapse; |
|||
border-spacing: 0px; |
|||
empty-cells: show; |
|||
border: 1px solid #e9e9e9; |
|||
width: 95%; |
|||
margin-bottom: 24px; |
|||
} |
|||
|
|||
.markdown>table th { |
|||
white-space: nowrap; |
|||
color: #333; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.markdown>table th, |
|||
.markdown>table td { |
|||
border: 1px solid #e9e9e9; |
|||
padding: 8px 16px; |
|||
text-align: left; |
|||
} |
|||
|
|||
.markdown>table th { |
|||
background: #F7F7F7; |
|||
} |
|||
|
|||
.markdown blockquote { |
|||
font-size: 90%; |
|||
color: #999; |
|||
border-left: 4px solid #e9e9e9; |
|||
padding-left: 0.8em; |
|||
margin: 1em 0; |
|||
} |
|||
|
|||
.markdown blockquote p { |
|||
margin: 0; |
|||
} |
|||
|
|||
.markdown .anchor { |
|||
opacity: 0; |
|||
transition: opacity 0.3s ease; |
|||
margin-left: 8px; |
|||
} |
|||
|
|||
.markdown .waiting { |
|||
color: #ccc; |
|||
} |
|||
|
|||
.markdown h1:hover .anchor, |
|||
.markdown h2:hover .anchor, |
|||
.markdown h3:hover .anchor, |
|||
.markdown h4:hover .anchor, |
|||
.markdown h5:hover .anchor, |
|||
.markdown h6:hover .anchor { |
|||
opacity: 1; |
|||
display: inline-block; |
|||
} |
|||
|
|||
.markdown>br, |
|||
.markdown>p>br { |
|||
clear: both; |
|||
} |
|||
|
|||
|
|||
.hljs { |
|||
display: block; |
|||
background: white; |
|||
padding: 0.5em; |
|||
color: #333333; |
|||
overflow-x: auto; |
|||
} |
|||
|
|||
.hljs-comment, |
|||
.hljs-meta { |
|||
color: #969896; |
|||
} |
|||
|
|||
.hljs-string, |
|||
.hljs-variable, |
|||
.hljs-template-variable, |
|||
.hljs-strong, |
|||
.hljs-emphasis, |
|||
.hljs-quote { |
|||
color: #df5000; |
|||
} |
|||
|
|||
.hljs-keyword, |
|||
.hljs-selector-tag, |
|||
.hljs-type { |
|||
color: #a71d5d; |
|||
} |
|||
|
|||
.hljs-literal, |
|||
.hljs-symbol, |
|||
.hljs-bullet, |
|||
.hljs-attribute { |
|||
color: #0086b3; |
|||
} |
|||
|
|||
.hljs-section, |
|||
.hljs-name { |
|||
color: #63a35c; |
|||
} |
|||
|
|||
.hljs-tag { |
|||
color: #333333; |
|||
} |
|||
|
|||
.hljs-title, |
|||
.hljs-attr, |
|||
.hljs-selector-id, |
|||
.hljs-selector-class, |
|||
.hljs-selector-attr, |
|||
.hljs-selector-pseudo { |
|||
color: #795da3; |
|||
} |
|||
|
|||
.hljs-addition { |
|||
color: #55a532; |
|||
background-color: #eaffea; |
|||
} |
|||
|
|||
.hljs-deletion { |
|||
color: #bd2c00; |
|||
background-color: #ffecec; |
|||
} |
|||
|
|||
.hljs-link { |
|||
text-decoration: underline; |
|||
} |
|||
|
|||
/* 代码高亮 */ |
|||
/* PrismJS 1.15.0 |
|||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ |
|||
/** |
|||
* prism.js default theme for JavaScript, CSS and HTML |
|||
* Based on dabblet (http://dabblet.com) |
|||
* @author Lea Verou |
|||
*/ |
|||
code[class*="language-"], |
|||
pre[class*="language-"] { |
|||
color: black; |
|||
background: none; |
|||
text-shadow: 0 1px white; |
|||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; |
|||
text-align: left; |
|||
white-space: pre; |
|||
word-spacing: normal; |
|||
word-break: normal; |
|||
word-wrap: normal; |
|||
line-height: 1.5; |
|||
|
|||
-moz-tab-size: 4; |
|||
-o-tab-size: 4; |
|||
tab-size: 4; |
|||
|
|||
-webkit-hyphens: none; |
|||
-moz-hyphens: none; |
|||
-ms-hyphens: none; |
|||
hyphens: none; |
|||
} |
|||
|
|||
pre[class*="language-"]::-moz-selection, |
|||
pre[class*="language-"] ::-moz-selection, |
|||
code[class*="language-"]::-moz-selection, |
|||
code[class*="language-"] ::-moz-selection { |
|||
text-shadow: none; |
|||
background: #b3d4fc; |
|||
} |
|||
|
|||
pre[class*="language-"]::selection, |
|||
pre[class*="language-"] ::selection, |
|||
code[class*="language-"]::selection, |
|||
code[class*="language-"] ::selection { |
|||
text-shadow: none; |
|||
background: #b3d4fc; |
|||
} |
|||
|
|||
@media print { |
|||
|
|||
code[class*="language-"], |
|||
pre[class*="language-"] { |
|||
text-shadow: none; |
|||
} |
|||
} |
|||
|
|||
/* Code blocks */ |
|||
pre[class*="language-"] { |
|||
padding: 1em; |
|||
margin: .5em 0; |
|||
overflow: auto; |
|||
} |
|||
|
|||
:not(pre)>code[class*="language-"], |
|||
pre[class*="language-"] { |
|||
background: #f5f2f0; |
|||
} |
|||
|
|||
/* Inline code */ |
|||
:not(pre)>code[class*="language-"] { |
|||
padding: .1em; |
|||
border-radius: .3em; |
|||
white-space: normal; |
|||
} |
|||
|
|||
.token.comment, |
|||
.token.prolog, |
|||
.token.doctype, |
|||
.token.cdata { |
|||
color: slategray; |
|||
} |
|||
|
|||
.token.punctuation { |
|||
color: #999; |
|||
} |
|||
|
|||
.namespace { |
|||
opacity: .7; |
|||
} |
|||
|
|||
.token.property, |
|||
.token.tag, |
|||
.token.boolean, |
|||
.token.number, |
|||
.token.constant, |
|||
.token.symbol, |
|||
.token.deleted { |
|||
color: #905; |
|||
} |
|||
|
|||
.token.selector, |
|||
.token.attr-name, |
|||
.token.string, |
|||
.token.char, |
|||
.token.builtin, |
|||
.token.inserted { |
|||
color: #690; |
|||
} |
|||
|
|||
.token.operator, |
|||
.token.entity, |
|||
.token.url, |
|||
.language-css .token.string, |
|||
.style .token.string { |
|||
color: #9a6e3a; |
|||
background: hsla(0, 0%, 100%, .5); |
|||
} |
|||
|
|||
.token.atrule, |
|||
.token.attr-value, |
|||
.token.keyword { |
|||
color: #07a; |
|||
} |
|||
|
|||
.token.function, |
|||
.token.class-name { |
|||
color: #DD4A68; |
|||
} |
|||
|
|||
.token.regex, |
|||
.token.important, |
|||
.token.variable { |
|||
color: #e90; |
|||
} |
|||
|
|||
.token.important, |
|||
.token.bold { |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.token.italic { |
|||
font-style: italic; |
|||
} |
|||
|
|||
.token.entity { |
|||
cursor: help; |
|||
} |
@ -0,0 +1,446 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"/> |
|||
<title>IconFont Demo</title> |
|||
<link rel="shortcut icon" href="https://gtms04.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/> |
|||
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css"> |
|||
<link rel="stylesheet" href="demo.css"> |
|||
<link rel="stylesheet" href="iconfont.css"> |
|||
<script src="iconfont.js"></script> |
|||
<!-- jQuery --> |
|||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script> |
|||
<!-- 代码高亮 --> |
|||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script> |
|||
</head> |
|||
<body> |
|||
<div class="main"> |
|||
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank"></a></h1> |
|||
<div class="nav-tabs"> |
|||
<ul id="tabs" class="dib-box"> |
|||
<li class="dib active"><span>Unicode</span></li> |
|||
<li class="dib"><span>Font class</span></li> |
|||
<li class="dib"><span>Symbol</span></li> |
|||
</ul> |
|||
|
|||
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=1118495" target="_blank" class="nav-more">查看项目</a> |
|||
|
|||
</div> |
|||
<div class="tab-container"> |
|||
<div class="content unicode" style="display: block;"> |
|||
<ul class="icon_lists dib-box"> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">财务</div> |
|||
<div class="code-name">&#xe690;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">授权管理</div> |
|||
<div class="code-name">&#xe678;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">设备管理</div> |
|||
<div class="code-name">&#xe7d3;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">场地管理</div> |
|||
<div class="code-name">&#xe6d5;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">运营管理</div> |
|||
<div class="code-name">&#xe61e;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">left</div> |
|||
<div class="code-name">&#xe6cb;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">right</div> |
|||
<div class="code-name">&#xe6dd;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">商品管理</div> |
|||
<div class="code-name">&#xe61f;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">系统日志</div> |
|||
<div class="code-name">&#xeb73;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">报表统计d</div> |
|||
<div class="code-name">&#xe6a5;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">首页-选中</div> |
|||
<div class="code-name">&#xe60b;</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont"></span> |
|||
<div class="name">设备管理</div> |
|||
<div class="code-name">&#xe639;</div> |
|||
</li> |
|||
|
|||
</ul> |
|||
<div class="article markdown"> |
|||
<h2 id="unicode-">Unicode 引用</h2> |
|||
<hr> |
|||
|
|||
<p>Unicode 是字体在网页端最原始的应用方式,特点是:</p> |
|||
<ul> |
|||
<li>兼容性最好,支持 IE6+,及所有现代浏览器。</li> |
|||
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li> |
|||
<li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li> |
|||
</ul> |
|||
<blockquote> |
|||
<p>注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式</p> |
|||
</blockquote> |
|||
<p>Unicode 使用步骤如下:</p> |
|||
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3> |
|||
<pre><code class="language-css" |
|||
>@font-face { |
|||
font-family: 'iconfont'; |
|||
src: url('iconfont.eot'); |
|||
src: url('iconfont.eot?#iefix') format('embedded-opentype'), |
|||
url('iconfont.woff2') format('woff2'), |
|||
url('iconfont.woff') format('woff'), |
|||
url('iconfont.ttf') format('truetype'), |
|||
url('iconfont.svg#iconfont') format('svg'); |
|||
} |
|||
</code></pre> |
|||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> |
|||
<pre><code class="language-css" |
|||
>.iconfont { |
|||
font-family: "iconfont" !important; |
|||
font-size: 16px; |
|||
font-style: normal; |
|||
-webkit-font-smoothing: antialiased; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
} |
|||
</code></pre> |
|||
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3> |
|||
<pre> |
|||
<code class="language-html" |
|||
><span class="iconfont">&#x33;</span> |
|||
</code></pre> |
|||
<blockquote> |
|||
<p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p> |
|||
</blockquote> |
|||
</div> |
|||
</div> |
|||
<div class="content font-class"> |
|||
<ul class="icon_lists dib-box"> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-caiwu"></span> |
|||
<div class="name"> |
|||
财务 |
|||
</div> |
|||
<div class="code-name">.icon-caiwu |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-shouquanguanli"></span> |
|||
<div class="name"> |
|||
授权管理 |
|||
</div> |
|||
<div class="code-name">.icon-shouquanguanli |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-shebeiguanli"></span> |
|||
<div class="name"> |
|||
设备管理 |
|||
</div> |
|||
<div class="code-name">.icon-shebeiguanli |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-changdiguanli"></span> |
|||
<div class="name"> |
|||
场地管理 |
|||
</div> |
|||
<div class="code-name">.icon-changdiguanli |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-yunyingguanli"></span> |
|||
<div class="name"> |
|||
运营管理 |
|||
</div> |
|||
<div class="code-name">.icon-yunyingguanli |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-left"></span> |
|||
<div class="name"> |
|||
left |
|||
</div> |
|||
<div class="code-name">.icon-left |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-right"></span> |
|||
<div class="name"> |
|||
right |
|||
</div> |
|||
<div class="code-name">.icon-right |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-shangpinguanli"></span> |
|||
<div class="name"> |
|||
商品管理 |
|||
</div> |
|||
<div class="code-name">.icon-shangpinguanli |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-xitongrizhi"></span> |
|||
<div class="name"> |
|||
系统日志 |
|||
</div> |
|||
<div class="code-name">.icon-xitongrizhi |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-baobiaotongji4"></span> |
|||
<div class="name"> |
|||
报表统计d |
|||
</div> |
|||
<div class="code-name">.icon-baobiaotongji4 |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-yemian-copy"></span> |
|||
<div class="name"> |
|||
首页-选中 |
|||
</div> |
|||
<div class="code-name">.icon-yemian-copy |
|||
</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<span class="icon iconfont icon-shebeiguanli1"></span> |
|||
<div class="name"> |
|||
设备管理 |
|||
</div> |
|||
<div class="code-name">.icon-shebeiguanli1 |
|||
</div> |
|||
</li> |
|||
|
|||
</ul> |
|||
<div class="article markdown"> |
|||
<h2 id="font-class-">font-class 引用</h2> |
|||
<hr> |
|||
|
|||
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p> |
|||
<p>与 Unicode 使用方式相比,具有如下特点:</p> |
|||
<ul> |
|||
<li>兼容性良好,支持 IE8+,及所有现代浏览器。</li> |
|||
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li> |
|||
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li> |
|||
<li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li> |
|||
</ul> |
|||
<p>使用步骤如下:</p> |
|||
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3> |
|||
<pre><code class="language-html"><link rel="stylesheet" href="./iconfont.css"> |
|||
</code></pre> |
|||
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3> |
|||
<pre><code class="language-html"><span class="iconfont icon-xxx"></span> |
|||
</code></pre> |
|||
<blockquote> |
|||
<p>" |
|||
iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p> |
|||
</blockquote> |
|||
</div> |
|||
</div> |
|||
<div class="content symbol"> |
|||
<ul class="icon_lists dib-box"> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-caiwu"></use> |
|||
</svg> |
|||
<div class="name">财务</div> |
|||
<div class="code-name">#icon-caiwu</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-shouquanguanli"></use> |
|||
</svg> |
|||
<div class="name">授权管理</div> |
|||
<div class="code-name">#icon-shouquanguanli</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-shebeiguanli"></use> |
|||
</svg> |
|||
<div class="name">设备管理</div> |
|||
<div class="code-name">#icon-shebeiguanli</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-changdiguanli"></use> |
|||
</svg> |
|||
<div class="name">场地管理</div> |
|||
<div class="code-name">#icon-changdiguanli</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-yunyingguanli"></use> |
|||
</svg> |
|||
<div class="name">运营管理</div> |
|||
<div class="code-name">#icon-yunyingguanli</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-left"></use> |
|||
</svg> |
|||
<div class="name">left</div> |
|||
<div class="code-name">#icon-left</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-right"></use> |
|||
</svg> |
|||
<div class="name">right</div> |
|||
<div class="code-name">#icon-right</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-shangpinguanli"></use> |
|||
</svg> |
|||
<div class="name">商品管理</div> |
|||
<div class="code-name">#icon-shangpinguanli</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-xitongrizhi"></use> |
|||
</svg> |
|||
<div class="name">系统日志</div> |
|||
<div class="code-name">#icon-xitongrizhi</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-baobiaotongji4"></use> |
|||
</svg> |
|||
<div class="name">报表统计d</div> |
|||
<div class="code-name">#icon-baobiaotongji4</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-yemian-copy"></use> |
|||
</svg> |
|||
<div class="name">首页-选中</div> |
|||
<div class="code-name">#icon-yemian-copy</div> |
|||
</li> |
|||
|
|||
<li class="dib"> |
|||
<svg class="icon svg-icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-shebeiguanli1"></use> |
|||
</svg> |
|||
<div class="name">设备管理</div> |
|||
<div class="code-name">#icon-shebeiguanli1</div> |
|||
</li> |
|||
|
|||
</ul> |
|||
<div class="article markdown"> |
|||
<h2 id="symbol-">Symbol 引用</h2> |
|||
<hr> |
|||
|
|||
<p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a> |
|||
这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p> |
|||
<ul> |
|||
<li>支持多色图标了,不再受单色限制。</li> |
|||
<li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li> |
|||
<li>兼容性较差,支持 IE9+,及现代浏览器。</li> |
|||
<li>浏览器渲染 SVG 的性能一般,还不如 png。</li> |
|||
</ul> |
|||
<p>使用步骤如下:</p> |
|||
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3> |
|||
<pre><code class="language-html"><script src="./iconfont.js"></script> |
|||
</code></pre> |
|||
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3> |
|||
<pre><code class="language-html"><style> |
|||
.icon { |
|||
width: 1em; |
|||
height: 1em; |
|||
vertical-align: -0.15em; |
|||
fill: currentColor; |
|||
overflow: hidden; |
|||
} |
|||
</style> |
|||
</code></pre> |
|||
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3> |
|||
<pre><code class="language-html"><svg class="icon" aria-hidden="true"> |
|||
<use xlink:href="#icon-xxx"></use> |
|||
</svg> |
|||
</code></pre> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<script> |
|||
$(document).ready(function () { |
|||
$('.tab-container .content:first').show() |
|||
|
|||
$('#tabs li').click(function (e) { |
|||
var tabContent = $('.tab-container .content') |
|||
var index = $(this).index() |
|||
|
|||
if ($(this).hasClass('active')) { |
|||
return |
|||
} else { |
|||
$('#tabs li').removeClass('active') |
|||
$(this).addClass('active') |
|||
|
|||
tabContent.hide().eq(index).fadeIn() |
|||
} |
|||
}) |
|||
}) |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,65 @@ |
|||
@font-face {font-family: "iconfont"; |
|||
src: url('iconfont.eot?t=1554173494910'); /* IE9 */ |
|||
src: url('iconfont.eot?t=1554173494910#iefix') format('embedded-opentype'), /* IE6-IE8 */ |
|||
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAlsAAsAAAAAEZQAAAkcAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEWgqTWI57ATYCJAM0CxwABCAFhG0HgUwbUw6jkC7KVQdI9o8EOyZ61Qj+/NiUc3w+PM1Z748kk5kAk8YwCW4riFUs9EigHqgKW1EmZ9gKPcRqEqmYp4qu0fN03RMAy5bW/lpCI0y7Ve0vPz1wAXKM8CF0zbefyyIW9fC20Hi8Tov//uZ3/7ObY26hUCIhTUQj1rfX8URolNqBiPK82UqhNqz4S4MDAcAjGAkgJWUTKsCBgSUhrFu6aEE1uJwcTEMRAcfKFKfMKNICFhzVSD0C8E748+RTpBEOoMDSsEIyzi+diwK38GktLXkkzKCtsJ6uC8BcF0ADSADAzJmLqvQ0QGRbQoPfyqABgC9EiYVzC+4Qd657vbvFfcDtcg+6R172f1rr8cC0I/hkq4vA127bvxsQHvS/PChBgYCHDAzkoKEAiAyClFzanVO4BVeCEAdDwIJDIODAuXC74vUQUOAWCAj4AAQ82AWBDDwIAQMeoRXkwMv+VqCBT2t3QAEA8PK3+gNIBOgwFE5YuSVAzMdE7G82Q0CB+d21MEoivmpWE5GZ0K5XjILEKEkg76fWJo1S0xZBYJUMioEkwqNsHzepDjmtDl5sskn2ebXifhsYyR5Z4Q1hrY65zXbJZuDRZWty+BNeRq3OaCEMXRCS0np2HTrjl4jExORkktx7zr7DNzRBaP/WN5k7Ao4R61DeLjI0ZB4YqNgRdHkAUmK3psI2+Hg4vrIz8k72kyHr8OSDfFNODxkerhwcNG33vcg33TZYyf0BaXCs/kBkuxYHog9pTd0XhEPxzuH5Z/us/dlnYm0Gmz3aGd+O7c8yNoh3h8LJvuHRqjuDYdg9sJyHMMe9La37ttrHJC7ovtJ8zXq16bLvtNPPAsG3vYBhrQD+RagFIZ9AO55n+pzrD2F39mUtPDhkHh4uvTdoGhgwrIDQfKBb6trPezcd7LH2HhIEojx7NVi9/RlfOYq19gvq5udBS5s0FW2SvVlfaWr3Hqmzt6fj4H5NhbljxfwFTmtfU8xcGyDFzrM391s3WYk1br6j6Rl/NNcmPW+OX+Akmzp4Hu12v67LTVf9e49FEyUOHJnP803PApnr6+q5Of9JyyDcMT0VC89evOLJxt4cSZuV+y/7yrqvRPoMDc0y8fOyOnS6Dn18py6uQxPTlkp1wU4l36YJVGjaKrq0se1iVJPRBkjazHatth04AIpRbVC7IDTrQzr1+k6BAkWqz3ZskI6K/acv7jx26cwRSEtugvB4D8HsG55KhN0DlUJzu9TG800d1s5JhYbv4GmPPVfV6dTTHQ6d2GYDJdk3iG1dUrdWqGjrbj+kr/Qytbd3durMQmevtUe3yfECbbR12Q/o9ZR0RRBI77Wb0lwBvJ3XCN1+zrlTt+6ESDg5WSB+aIPUjueCqrk/hN7Zt1DvqBfaSzJV57yR90fJjF3R5zUyTUN0Q1ZHcu7u7KT6E12vMfSuV/eJuqu0T9cV2W2sXcZujtnMrqxdZ0Z3iQuwHtmjK5hxZ9vf/ojfPYOesWL2Um9Py+vP2q3fr3i9RRwh76uw7sfHavik3JTq6+/GU4vr35xHzafq36IW8fevp9TkJPE1x7ofr+DGHhvHLet69CRM/sWUvNVv5a3607uhqW1vh5KqlWtMpIL4cUJV4a39KQHjlwCbi5Y0Fi/ZLMaZ+v9Nvv0u9WqX60aR7l9/vseN/0ehRTNJY0np1ta1BS3es2CiKDMYkQMJxjFjWImVTmOsOfOHZKny6+SOBfU26q6hrg54ed67u6A73/XN55/rWuoV4wq+Kgkt+apgbIFYElYihrz81IiivsXcJN4urxFXP7jSKZtJVU4tk6SppaSKnb3SPghPnFlSxp3Sn4pTmow1yWxO8dBOShVhsjvNEVMRXC+oviqV66uvH4V3hbv6+vr7LkXktn7VYDJ55pnW9VmLXHBawoJsrY8n1E9yzbNcjqQiLwd6XJPqJyCtcCvIJPODiZor4UEyfWVC/cQPWgSO3JPz3lDsP/uzN+3V8FqDF1sec/L101wKI3HCpHCne2LN8njOJP0gmbh4n5SjEdNJ4wZqel5xXtKcKf/+t2lKcF5JHpm+eQPy60j5kiXlJOwTweMp2J3Og0/fjXJSjp08v3bt+uzTbKEhxpDhn22CqXZPcdGfizRGneS3UmfUbP0pPjHHJJZm+xs0MYZCdpXCj1vVVZ/GEJBVqqqYc6Ko0NToOT+FXl9h0Z7aCmLKCsgwmMxqeRTzCn1OVT30n3P/hN4f06Xrk8uD3tl2w1iu9HIna8q2vRMUbHKUP+NHNC/46fQLzYhiU2ZopOVZC0Sxnh7tCE8C/ueo/DpR/qYk1+XHVV6/eakykGixrBZXW9y507JC303LHFObU1xb+s3Q61HZlheW1T6rLYjYt+Svr79x5ZDLZ9HX78+/GO4J//JHuUq/ylfl++P3m9jPfIZFqosYb7zEP1I/4i8pPlR/OFFRZiliRbY4uiy6OHRatOXnS7xL42q5JH2g+WAi10CKLGTKfHQj/isAnr8zMnqtqX5K36RTq69SD+iC6iu0gc6vrqNf0FLPddqmLfqavk57e6w5iSG0dQRpDFO534dm+7z2PSf8Z46/e//LrBB2K6pjnMsADhSsXgKMDrsYhwc149wJUHgxmz4whSHtXnakNCwBDuefcgxesI4Hkigxbw8AHhkYhReXYbSdeWNfRpsCCnIEARocDElMWgJgISADyMAhH/CIx2jXAtRYDRqEUQCIw98MIBBxDFDwxjVAQ8RjCoq0EcBCh8+BDCKhAQ8zUXspIIpM4cMrgxYYlDkptFSco5KHaP0X+J40ZwVh1R9ww3G1mi+L859QgE9ho+39WsQpx5TVhwkNUiJVmUawMg8idbdYOM3m3FKePExeGbT4TQdlTpxoqbj75aH0/V/ge9LccOyW8w+44cPVar7skPSJSqdjb2Vr2/u1SJdT7hRTjpmPSRcke4ZU1Q2NYGUeBkzV3UKuc13R/PJM/s5ROvn6TrQe9ZlQhCYMYYmMyAlHFIQnAlESL+INlmQ1HvpLC9T/uy7e3Z3wqQUwgJmuZxs0dti0PvVywuJ1XSVwcs3og/SHbZQVmXw8ohD6Gc8BX4wmg5oKvxpx+3iCjLrMLNXT80W6V5MJAAAA') format('woff2'), |
|||
url('iconfont.woff?t=1554173494910') format('woff'), |
|||
url('iconfont.ttf?t=1554173494910') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ |
|||
url('iconfont.svg?t=1554173494910#iconfont') format('svg'); /* iOS 4.1- */ |
|||
} |
|||
|
|||
.iconfont { |
|||
font-family: "iconfont" !important; |
|||
font-size: 16px; |
|||
font-style: normal; |
|||
-webkit-font-smoothing: antialiased; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
} |
|||
|
|||
.icon-caiwu:before { |
|||
content: "\e690"; |
|||
} |
|||
|
|||
.icon-shouquanguanli:before { |
|||
content: "\e678"; |
|||
} |
|||
|
|||
.icon-shebeiguanli:before { |
|||
content: "\e7d3"; |
|||
} |
|||
|
|||
.icon-changdiguanli:before { |
|||
content: "\e6d5"; |
|||
} |
|||
|
|||
.icon-yunyingguanli:before { |
|||
content: "\e61e"; |
|||
} |
|||
|
|||
.icon-left:before { |
|||
content: "\e6cb"; |
|||
} |
|||
|
|||
.icon-right:before { |
|||
content: "\e6dd"; |
|||
} |
|||
|
|||
.icon-shangpinguanli:before { |
|||
content: "\e61f"; |
|||
} |
|||
|
|||
.icon-xitongrizhi:before { |
|||
content: "\eb73"; |
|||
} |
|||
|
|||
.icon-baobiaotongji4:before { |
|||
content: "\e6a5"; |
|||
} |
|||
|
|||
.icon-yemian-copy:before { |
|||
content: "\e60b"; |
|||
} |
|||
|
|||
.icon-shebeiguanli1:before { |
|||
content: "\e639"; |
|||
} |
|||
|
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,11 @@ |
|||
<template> |
|||
<div id="app"> |
|||
<router-view /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'App' |
|||
} |
|||
</script> |
@ -0,0 +1,218 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
const url = '/api/admin'; |
|||
|
|||
/** |
|||
* 广告计划--获取列表 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function GET_LIST(params) { |
|||
return request({ |
|||
url: url + "/ad/plans", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 广告计划--新建广告 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function POST_LIST(params) { |
|||
return request({ |
|||
url: url + "/ad/plans", |
|||
method: 'post', |
|||
data:params |
|||
}).then(res => res.data.data) |
|||
|
|||
|
|||
} |
|||
|
|||
/** |
|||
* 广告计划--更新广告 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function PUT_LIST(params) { |
|||
return request({ |
|||
url: url + "/ad/plans?id=" + params.id, |
|||
method: 'put', |
|||
data:params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 广告计划--广告详情 * @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DETAIL_LIST(params) { |
|||
return request({ |
|||
url: url + "/ad/plans/detail", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 广告计划--删除某项 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DELETE_ITEM(params) { |
|||
return request({ |
|||
url: url + "/ad/plans", |
|||
method: 'delete', |
|||
params: { |
|||
id: params |
|||
} |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 广告计划--发布广告 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function PUBLISH(params) { |
|||
return request({ |
|||
url: url + "/ad/plans/publish", |
|||
method: 'post', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 广告计划--暂停 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function PAUSEDANDPENDING(params) { |
|||
return request({ |
|||
url: url + "/ad/plans/pause", |
|||
method: 'post', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
/** |
|||
* 广告计划--获取设备类型 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function EQUIPMENTTYPE(params) { |
|||
return request({ |
|||
url: url + "/devices/types", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
* 广告计划--获取广告位类型 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ADVERTISINGSPACETYPE(params) { |
|||
return request({ |
|||
url: url + "/ad/plans/adSpaces", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
* 广告计划--获取设备 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function EQUIPMENT(params) { |
|||
return request({ |
|||
url: url + "/devices", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 广告计划-- 列表总数 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DEVICES_COUNT(params) { |
|||
return request({ |
|||
url: url + "/ad/plans/count", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
/** |
|||
* 素材管理--列表 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function GET_RESOURCES(params) { |
|||
return request({ |
|||
url: url + "/ad/resources", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
/** |
|||
* 素材管理--上传 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function POST_RESOURCES(params) { |
|||
return request({ |
|||
url: url + "/ad/resources", |
|||
method: 'post', |
|||
data:params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
* 素材管理--删除 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DELETE_RESOURCES(params) { |
|||
return request({ |
|||
url: url + "/ad/resources", |
|||
method: 'delete', |
|||
data:params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
@ -0,0 +1,215 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
|
|||
/** |
|||
* 商品列表--获取列表 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function GET_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/products", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品列表--新建商品 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ADD_ITEM(params) { |
|||
return request({ |
|||
url: "/api/admin/products", |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品列表--更新商品 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function UPDATE_ITEM(params) { |
|||
return request({ |
|||
url: "/api/admin/products?id=" + params.id, |
|||
method: 'put', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品列表--商品详情 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DETAIL_ITEM(params) { |
|||
return request({ |
|||
url: "/api/admin/products/detail", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品列表--删除 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DELETE_ITEM(params) { |
|||
return request({ |
|||
url: "/api/admin/products", |
|||
method: 'delete', |
|||
params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品列表--总数 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function COUNT(params) { |
|||
return request({ |
|||
url: "/api/admin/products/count", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品分类--列表 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function GET_LIST_CATEGORIES(params) { |
|||
return request({ |
|||
url: "/api/admin/categories", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品分类--新建分类 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function POST_CATEGORIES(params) { |
|||
return request({ |
|||
url: "/api/admin/categories", |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品分类--更新分类 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function UPDATE_CATEGORIES(params) { |
|||
return request({ |
|||
url: "/api/admin/categories?id=" + params.id, |
|||
method: 'put', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品分类--更新分类顺序 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ORDERS_CATEGORIES(params) { |
|||
return request({ |
|||
url: "/api/admin/categories/orders?ids=" + params.ids.toString(), |
|||
method: 'POST', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品分类--设置分类商品 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function PRODUCTS_CATEGORIES(params) { |
|||
return request({ |
|||
url: "/api/admin/categories/products", |
|||
method: 'POST', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品分类--删除分类 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DELETE_CATEGORIES(params) { |
|||
return request({ |
|||
url: "/api/admin/categories", |
|||
method: 'delete', |
|||
params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
/** |
|||
* 商品分类--删除分类商品 |
|||
* @param params |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DELETE_CATEGORIES_PRODUCTS(params) { |
|||
return request({ |
|||
url: "/api/admin/categories/products", |
|||
method: 'delete', |
|||
params |
|||
}).then(res => res.data.data) |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,61 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function GET_DEVICE_TYPES(params) { |
|||
return request({ |
|||
url: "/api/admin/devices/types", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
export function GET_DEVICE_DEVICEGROUPS(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceGroups/select", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function GET_LOCATIONS(params) { |
|||
return request({ |
|||
url: "/api/admin/locations/select", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function GET_ROLES(params) { |
|||
return request({ |
|||
url: "/api/admin/roles/select", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function GET_DEVICE_GROUPS_TOTAL(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceGroups/count", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function GET_DEIVCE_GROUPS_ALL(total) { |
|||
return request({ |
|||
url: "/api/admin/deviceGroups", |
|||
method: 'get', |
|||
params: { |
|||
from: 0, |
|||
size: total |
|||
} |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function GET_LOCALTION_TYPE(params) { |
|||
return request({ |
|||
url: "/api/admin/locations/types", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
@ -0,0 +1,102 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function get_analytics_summary(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/summary", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data || 0) |
|||
} |
|||
export function get_analytics_sale(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/sale", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data || 0) |
|||
} |
|||
|
|||
export function get_analytics_income(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/income", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data || 0) |
|||
} |
|||
|
|||
export function get_analytics_orders(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/orders", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data || 0) |
|||
} |
|||
export function get_analytics_profits(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/profit", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data || 0) |
|||
} |
|||
// / 运营分析 - 销售额折线图
|
|||
export function get_analytics_trend_sale(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/trend/sale", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function get_analytics_trend_income(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/trend/income", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function get_analytics_trend_orders(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/trend/orders", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function get_analytics_trend_profits(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/trend/profit", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
// /首页 / 场地销售排行
|
|||
export function get_analytics_locations(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/locations", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function get_analytics_categories(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/categories", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function get_analytics_producsts(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/products", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function get_analytics_devices(params) { |
|||
return request({ |
|||
url: "/api/admin/analytics/devices", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
@ -0,0 +1,132 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function GET_DEVICE_LISTS(params) { |
|||
return request({ |
|||
url: "/api/admin/devices", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data).then(array => { |
|||
return array.map(item => { |
|||
item.checked = false; |
|||
item.disabled = false; |
|||
return item |
|||
}) |
|||
}) |
|||
} |
|||
|
|||
export function GET_LIST_TOTAL(params) { |
|||
return request({ |
|||
url: "/api/admin/devices/count", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function GET_DEVICES_NUM(params) { |
|||
return request({ |
|||
url: "/api/admin/devices/summary", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function ADD_DEVICE(data) { |
|||
//deviceTypeId =>typeId
|
|||
if (data.deviceTypeId) { data.typeId = data.deviceTypeId } |
|||
return request({ |
|||
url: "/api/admin/devices", |
|||
method: 'post', |
|||
data, |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function GET_DEVICE_DETAIL(params) { |
|||
return request({ |
|||
url: "/api/admin/devices/detail", |
|||
method: 'get', |
|||
params: { |
|||
id: params.id |
|||
} |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function UPDATE_DEVICE(params) { |
|||
return request({ |
|||
url: `/api/admin/devices/update?id=${params.id}`, |
|||
method: 'put', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function GET_CODE(id) { |
|||
return request({ |
|||
url: "/api/admin/devices/qrcodeText", |
|||
method: 'get', |
|||
params: { deviceId: id } |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function GET_wxCODE(id) { |
|||
return request({ |
|||
url: "/api/admin/devices/qrcode", |
|||
method: 'get', |
|||
params: { deviceId: id } |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
//设备分组
|
|||
export function GET_DEVICE_GROUPS(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceGroups", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
//设备分组 总数
|
|||
export function GET_DEVICE_GROUPS_TOTAL(query) { |
|||
return request({ |
|||
url: "/api/admin/deviceGroups/count", |
|||
method: 'get', |
|||
params: { |
|||
query |
|||
} |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
//add new groups
|
|||
export function ADD_DEVICE_GROUPS(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceGroups", |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
//delete groups
|
|||
export function DELETE_DEVICE_GROUPS(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceGroups", |
|||
method: 'delete', |
|||
data: params, |
|||
params: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
//update groups
|
|||
export function UPDATE_DEVICE_GROUPS(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceGroups", |
|||
method: 'put', |
|||
data: params, |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
//add device into groups
|
|||
export function ADD_DEVICES_INTO_GROUP(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceGroups/addDevices", |
|||
method: 'post', |
|||
data: params, |
|||
}).then(res => res.data.data) |
|||
} |
@ -0,0 +1,33 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function get_shelfs_device_lists(params) { |
|||
return request({ |
|||
url: "/api/admin/shelfs/devices", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function get_shelfs_device_summary(params) { |
|||
return request({ |
|||
url: "/api/admin/shelfs/devices/summary", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
export function get_shelfs_device_detail(id) { |
|||
return request({ |
|||
url: "/api/admin/shelfs/devices/detail", |
|||
method: 'get', |
|||
params: { id } |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function put_shelfs_device_detail(params) { |
|||
return request({ |
|||
url: `/api/admin/shelfs/devices?deviceId=${params.deviceId}`, |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
@ -0,0 +1,182 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
/** |
|||
* 设备分润 -- 列表 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function GET_EQUIPMENT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceRoyalties", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
/** |
|||
* 设备分润 -- 保存分润 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function POST_EQUIPMENT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceRoyalties", |
|||
method: 'post', |
|||
data:params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
/** |
|||
* 设备分润 -- 分润详情 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DETAIL_EQUIPMENT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceRoyalties/detail", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
/** |
|||
* 设备分润 -- 分润总数 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function COUNT_EQUIPMENT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceRoyalties/count", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 设备分润 -- 生效 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ENABLE_EQUIPMENT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceRoyalties/enable", |
|||
method: 'post', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 设备分润 -- 失效 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DISABLE_EQUIPMENT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/deviceRoyalties/disable", |
|||
method: 'post', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
/** |
|||
* 场地分润 -- 列表 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function GET_FIELD_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/locationRoyalties", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
/** |
|||
* 场地分润 -- 保存分润 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function POST_FIELD_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/locationRoyalties", |
|||
method: 'post', |
|||
data:params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
/** |
|||
* 场地分润 -- 分润总数 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function COUNT_FIELD_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/locationRoyalties/count", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
/** |
|||
* 场地分润 -- 分润详情 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DETAIL_FIELD_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/locationRoyalties/detail", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 场地分润 -- 生效 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ENABLE_FIELD_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/locationRoyalties/enable", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 场地分润 -- 失效 |
|||
* @param params |
|||
* @returns {Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DISABLE_FIELD_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/locationRoyalties/disable", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,44 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
|
|||
/** |
|||
* 财务 -- 概览 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function SUMMARY(params) { |
|||
return request({ |
|||
url: "/api/admin/settlement/summary", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 财务 -- 交易记录 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function TRANSACTIONS(params) { |
|||
return request({ |
|||
url: "/api/admin/settlement/transactions", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 财务 -- 交易记录总数 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function TRANSACTIONS_COUNT(params) { |
|||
return request({ |
|||
url: "/api/admin/settlement/transactions/count", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
@ -0,0 +1,84 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function get_list(params) { |
|||
return request({ |
|||
url: "/api/admin/inventory", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function get_list_total(params) { |
|||
return request({ |
|||
url: "/api/admin/inventory/count", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function get_total_stock(params) { |
|||
return request({ |
|||
url: "/api/admin/inventory/totalStock", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function get_list_in_locations(params) { |
|||
return request({ |
|||
url: "/api/admin/inventory/stockLocations", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function get_list_in_locations_total(params) { |
|||
return request({ |
|||
url: "/api/admin/inventory/stockLocations/count", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function post_stockin(params) { |
|||
return request({ |
|||
url: "/api/admin/inventory/stockin", |
|||
method: 'post', |
|||
data: params, |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function post_return(params) { |
|||
return request({ |
|||
url: "/api/admin/inventory/return", |
|||
method: 'post', |
|||
data: params, |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function post_transfer(params) { |
|||
return request({ |
|||
url: "/api/admin/inventory/transfer", |
|||
method: 'post', |
|||
data: params, |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function get_list_audits(params) { |
|||
return request({ |
|||
url: "/api/admin/inventory/audits", |
|||
method: 'get', |
|||
params, |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function get_list_audits_total(params) { |
|||
return request({ |
|||
url: "/api/admin/inventory/audits/count", |
|||
method: 'get', |
|||
params, |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function get_audits_detail(id) { |
|||
return request({ |
|||
url: `/api/admin/inventory/audits/detail?id=${id}`, |
|||
method: 'get', |
|||
// params,
|
|||
}).then(res => res.data.data) |
|||
} |
|||
|
@ -0,0 +1,60 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function getLocationList(params) { |
|||
return request({ |
|||
url: '/api/admin/locations', |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function addLocaltion(params) { |
|||
return request({ |
|||
url: '/api/admin/locations', |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function updateLocaltion(params) { |
|||
return request({ |
|||
url: `/api/admin/locations?id=${params.id}`, |
|||
method: 'put', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function deleteLocaltion(params) { |
|||
return request({ |
|||
url: '/api/admin/locations', |
|||
method: 'delete', |
|||
data: params, |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function localtionDetail(id) { |
|||
return request({ |
|||
url: '/api/admin/locations/detail', |
|||
method: 'get', |
|||
params: { id } |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function addDevices2localtion(params) { |
|||
return request({ |
|||
url: '/api/admin/locations/addDevices', |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function deleteDevices2localtion(params) { |
|||
return request({ |
|||
url: '/api/admin/locations/deleteDevice', |
|||
method: 'post', |
|||
data: params, |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function getLocaltionTotal(params) { |
|||
return request({ |
|||
url: '/api/admin/locations/count', |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
@ -0,0 +1,38 @@ |
|||
import axios from 'axios' |
|||
import { BASE_API } from '../config'; |
|||
import qs from 'qs'; |
|||
import { client_id, client_secret } from '@/config.js' |
|||
export function loginByUsername(username, password) { |
|||
//https://www.zhangxinxu.com/wordpress/2018/08/js-base64-atob-btoa-encode-decode/
|
|||
let Authorization = window.btoa(`${client_id}:${client_secret}`); |
|||
const data = { |
|||
username, |
|||
password, |
|||
"grant_type": 'merchant_password' |
|||
} |
|||
return axios({ |
|||
url: BASE_API + '/oauth/token', |
|||
method: 'POST', |
|||
data: qs.stringify(data), |
|||
headers: { |
|||
'Authorization': `Basic ${Authorization}`, |
|||
'content-type': 'application/x-www-form-urlencoded' |
|||
}, |
|||
}) |
|||
} |
|||
|
|||
export function logout() { |
|||
return axios({ |
|||
url: '/login/logout', |
|||
method: 'post' |
|||
}) |
|||
} |
|||
|
|||
export function getUserInfo(token) { |
|||
return axios({ |
|||
url: '/user/info', |
|||
method: 'get', |
|||
params: { token } |
|||
}) |
|||
} |
|||
|
@ -0,0 +1,44 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
|
|||
/** |
|||
* 销售订单 -- 列表 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function GET_ORDER_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/orders", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 销售订单 -- 订单详情 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DETAIL_ORDER(params) { |
|||
return request({ |
|||
url: "/api/admin/orders/detail", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 销售订单 -- 订单总数 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function COUNT_ORDER(params) { |
|||
return request({ |
|||
url: "/api/admin/orders/count", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
@ -0,0 +1,203 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
|
|||
/** |
|||
* 账户管理 -- 账户列表 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function GET_ACCOUNT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/accounts", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 账户管理 -- 新建账号 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ADD_ACCOUNT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/accounts", |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 账户管理 -- 更新账号 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function UPDATE_ACCOUNT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/accounts?id=" + params.id, |
|||
method: 'put', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 账户管理 -- 启用账号 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ENABLE_ACCOUNT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/accounts/enable?id=" + params.id, |
|||
method: 'POST', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 账户管理 -- 禁用账号 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DISABLE_ACCOUNT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/accounts/disable?id=" + params.id, |
|||
method: 'POST', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 账户管理 -- 删除账号 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DELETE_ACCOUNT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/accounts", |
|||
method: 'delete', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 账户管理 -- 账号详情 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function DETAIL_ACCOUNT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/accounts/detail", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 账户管理 -- 修改密码 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function PASSWORD_ACCOUNT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/accounts/changePassword?id=" + params.id + '&password=' + params.password, |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 账户管理 -- 列表总数 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function COUNT_ACCOUNT_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/accounts/count", |
|||
method: 'get', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 角色管理 -- 列表 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ROLES_LIST(params) { |
|||
return request({ |
|||
url: "/api/admin/roles", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 角色管理 -- 列表筛选 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ROLES_SEL(params) { |
|||
return request({ |
|||
url: "/api/admin/roles/select", |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 角色管理 -- 新建角色 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ROLES_POST(params) { |
|||
return request({ |
|||
url: "/api/admin/roles", |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 角色管理 -- 更新角色 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ROLES_PUT(params) { |
|||
return request({ |
|||
url: "/api/admin/roles?id=" + params.id, |
|||
method: 'put', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 角色管理 -- 删除角色 |
|||
* @returns {Q.Promise<any> | * | Q.Promise<T | never> | PromiseLike<T | never> | Promise<T | never>} |
|||
* @constructor |
|||
*/ |
|||
export function ROLES_DELETE(params) { |
|||
return request({ |
|||
url: "/api/admin/roles", |
|||
method: 'delete', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,70 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function getShelfs(params) { |
|||
return request({ |
|||
url: '/api/admin/shelfs', |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function getShelfDetail(id) { |
|||
return request({ |
|||
url: '/api/admin/shelfs/detail', |
|||
method: 'get', |
|||
params: { id } |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function postShelfApply(params) { |
|||
return request({ |
|||
url: `/api/admin/shelfs/apply?id=${params.id}`, |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function postShelf(params) { |
|||
return request({ |
|||
url: '/api/admin/shelfs', |
|||
method: 'post', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function deleteShelf(id) { |
|||
return request({ |
|||
url: '/api/admin/shelfs', |
|||
method: 'delete', |
|||
data: { id }, |
|||
params: { id } |
|||
}).then(res => res.data.data) |
|||
} |
|||
export function putShelf(params) { |
|||
return request({ |
|||
url: `/api/admin/shelfs?id=${params.id}`, |
|||
method: 'put', |
|||
data: params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function getShelfCount(params) { |
|||
return request({ |
|||
url: '/api/admin/shelfs/count', |
|||
method: 'get', |
|||
params |
|||
}).then(res => res.data.data) |
|||
} |
|||
|
|||
export function getShelfAppliedData(id) { |
|||
return request({ |
|||
url: '/api/admin/shelfs/appliedData', |
|||
method: 'get', |
|||
params: { id } |
|||
}).then(res => res.data.data).then(lists => { |
|||
lists.map(item => { |
|||
item.disabled = false |
|||
item.checked = false |
|||
}) |
|||
return lists |
|||
}) |
|||
} |
|||
|
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 8.7 KiB |
@ -0,0 +1,73 @@ |
|||
<template> |
|||
<el-breadcrumb class="app-breadcrumb" separator="/"> |
|||
<transition-group name="breadcrumb"> |
|||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path" v-if="item.meta.title"> |
|||
<span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect"> |
|||
{{item.meta.title}} |
|||
</span> |
|||
<a v-else @click.prevent="handleLink(item)">{{item.meta.title }}</a> |
|||
</el-breadcrumb-item> |
|||
</transition-group> |
|||
</el-breadcrumb> |
|||
</template> |
|||
|
|||
<script> |
|||
// import { generateTitle } from '@/utils/i18n' |
|||
import pathToRegexp from 'path-to-regexp' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
levelList: null |
|||
} |
|||
}, |
|||
watch: { |
|||
$route() { |
|||
this.getBreadcrumb() |
|||
} |
|||
}, |
|||
created() { |
|||
this.getBreadcrumb() |
|||
}, |
|||
methods: { |
|||
// generateTitle, |
|||
getBreadcrumb() { |
|||
/* const first = matched[0] |
|||
if (first && first.path.trim().toLocaleLowerCase() !== '/dashboard'.toLocaleLowerCase()) { |
|||
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched) |
|||
} |
|||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) |
|||
*/ |
|||
this.levelList =this.$route.matched |
|||
}, |
|||
pathCompile(path) { |
|||
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561 |
|||
const { params } = this.$route |
|||
var toPath = pathToRegexp.compile(path) |
|||
return toPath(params) |
|||
}, |
|||
handleLink(item) { |
|||
const { redirect, path } = item |
|||
if (redirect) { |
|||
this.$router.push(redirect) |
|||
return |
|||
} |
|||
// this.$router.push(this.pathCompile(path)) |
|||
this.$router.push(path) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style rel="stylesheet/scss" lang="scss" scoped> |
|||
.app-breadcrumb.el-breadcrumb { |
|||
display: inline-block; |
|||
font-size: 14px; |
|||
line-height: 50px; |
|||
margin-left: 8px; |
|||
.no-redirect { |
|||
color: #97a8be; |
|||
cursor: text; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,156 @@ |
|||
<template> |
|||
<div :id="id" :class="className" :style="{height:height,width:width}" /> |
|||
</template> |
|||
|
|||
<script> |
|||
import echarts from 'echarts' |
|||
import resize from './mixins/resize' |
|||
|
|||
export default { |
|||
mixins: [resize], |
|||
props: { |
|||
className: { |
|||
type: String, |
|||
default: 'chart' |
|||
}, |
|||
id: { |
|||
type: String, |
|||
default: 'chart' |
|||
}, |
|||
width: { |
|||
type: String, |
|||
default: '200px' |
|||
}, |
|||
height: { |
|||
type: String, |
|||
default: '200px' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
chart: null |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.initChart() |
|||
}, |
|||
beforeDestroy() { |
|||
if (!this.chart) { |
|||
return |
|||
} |
|||
this.chart.dispose() |
|||
this.chart = null |
|||
}, |
|||
methods: { |
|||
initChart() { |
|||
this.chart = echarts.init(document.getElementById(this.id)) |
|||
|
|||
const xAxisData = [] |
|||
const data = [] |
|||
const data2 = [] |
|||
for (let i = 0; i < 50; i++) { |
|||
xAxisData.push(i) |
|||
data.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5) |
|||
data2.push((Math.sin(i / 5) * (i / 5 + 10) + i / 6) * 3) |
|||
} |
|||
this.chart.setOption( |
|||
{ |
|||
backgroundColor: '#08263a', |
|||
grid: { |
|||
left: '5%', |
|||
right: '5%' |
|||
}, |
|||
xAxis: [{ |
|||
show: false, |
|||
data: xAxisData |
|||
}, { |
|||
show: false, |
|||
data: xAxisData |
|||
}], |
|||
visualMap: { |
|||
show: false, |
|||
min: 0, |
|||
max: 50, |
|||
dimension: 0, |
|||
inRange: { |
|||
color: ['#4a657a', '#308e92', '#b1cfa5', '#f5d69f', '#f5898b', '#ef5055'] |
|||
} |
|||
}, |
|||
yAxis: { |
|||
axisLine: { |
|||
show: false |
|||
}, |
|||
axisLabel: { |
|||
textStyle: { |
|||
color: '#4a657a' |
|||
} |
|||
}, |
|||
splitLine: { |
|||
show: true, |
|||
lineStyle: { |
|||
color: '#08263f' |
|||
} |
|||
}, |
|||
axisTick: { |
|||
show: false |
|||
} |
|||
}, |
|||
series: [{ |
|||
name: 'back', |
|||
type: 'bar', |
|||
data: data2, |
|||
z: 1, |
|||
itemStyle: { |
|||
normal: { |
|||
opacity: 0.4, |
|||
barBorderRadius: 5, |
|||
shadowBlur: 3, |
|||
shadowColor: '#111' |
|||
} |
|||
} |
|||
}, { |
|||
name: 'Simulate Shadow', |
|||
type: 'line', |
|||
data, |
|||
z: 2, |
|||
showSymbol: false, |
|||
animationDelay: 0, |
|||
animationEasing: 'linear', |
|||
animationDuration: 1200, |
|||
lineStyle: { |
|||
normal: { |
|||
color: 'transparent' |
|||
} |
|||
}, |
|||
areaStyle: { |
|||
normal: { |
|||
color: '#08263a', |
|||
shadowBlur: 50, |
|||
shadowColor: '#000' |
|||
} |
|||
} |
|||
}, { |
|||
name: 'front', |
|||
type: 'bar', |
|||
data, |
|||
xAxisIndex: 1, |
|||
z: 3, |
|||
itemStyle: { |
|||
normal: { |
|||
barBorderRadius: 5 |
|||
} |
|||
} |
|||
}], |
|||
animationEasing: 'elasticOut', |
|||
animationEasingUpdate: 'elasticOut', |
|||
animationDelay(idx) { |
|||
return idx * 20 |
|||
}, |
|||
animationDelayUpdate(idx) { |
|||
return idx * 20 |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
@ -0,0 +1,227 @@ |
|||
<template> |
|||
<div :id="id" :class="className" :style="{height:height,width:width}" /> |
|||
</template> |
|||
|
|||
<script> |
|||
import echarts from 'echarts' |
|||
import resize from './mixins/resize' |
|||
|
|||
export default { |
|||
mixins: [resize], |
|||
props: { |
|||
className: { |
|||
type: String, |
|||
default: 'chart' |
|||
}, |
|||
id: { |
|||
type: String, |
|||
default: 'chart' |
|||
}, |
|||
width: { |
|||
type: String, |
|||
default: '200px' |
|||
}, |
|||
height: { |
|||
type: String, |
|||
default: '200px' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
chart: null |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.initChart() |
|||
}, |
|||
beforeDestroy() { |
|||
if (!this.chart) { |
|||
return |
|||
} |
|||
this.chart.dispose() |
|||
this.chart = null |
|||
}, |
|||
methods: { |
|||
initChart() { |
|||
this.chart = echarts.init(document.getElementById(this.id)) |
|||
|
|||
this.chart.setOption({ |
|||
backgroundColor: '#394056', |
|||
title: { |
|||
top: 20, |
|||
text: 'Requests', |
|||
textStyle: { |
|||
fontWeight: 'normal', |
|||
fontSize: 16, |
|||
color: '#F1F1F3' |
|||
}, |
|||
left: '1%' |
|||
}, |
|||
tooltip: { |
|||
trigger: 'axis', |
|||
axisPointer: { |
|||
lineStyle: { |
|||
color: '#57617B' |
|||
} |
|||
} |
|||
}, |
|||
legend: { |
|||
top: 20, |
|||
icon: 'rect', |
|||
itemWidth: 14, |
|||
itemHeight: 5, |
|||
itemGap: 13, |
|||
data: ['CMCC', 'CTCC', 'CUCC'], |
|||
right: '4%', |
|||
textStyle: { |
|||
fontSize: 12, |
|||
color: '#F1F1F3' |
|||
} |
|||
}, |
|||
grid: { |
|||
top: 100, |
|||
left: '2%', |
|||
right: '2%', |
|||
bottom: '2%', |
|||
containLabel: true |
|||
}, |
|||
xAxis: [{ |
|||
type: 'category', |
|||
boundaryGap: false, |
|||
axisLine: { |
|||
lineStyle: { |
|||
color: '#57617B' |
|||
} |
|||
}, |
|||
data: ['13:00', '13:05', '13:10', '13:15', '13:20', '13:25', '13:30', '13:35', '13:40', '13:45', '13:50', '13:55'] |
|||
}], |
|||
yAxis: [{ |
|||
type: 'value', |
|||
name: '(%)', |
|||
axisTick: { |
|||
show: false |
|||
}, |
|||
axisLine: { |
|||
lineStyle: { |
|||
color: '#57617B' |
|||
} |
|||
}, |
|||
axisLabel: { |
|||
margin: 10, |
|||
textStyle: { |
|||
fontSize: 14 |
|||
} |
|||
}, |
|||
splitLine: { |
|||
lineStyle: { |
|||
color: '#57617B' |
|||
} |
|||
} |
|||
}], |
|||
series: [{ |
|||
name: 'CMCC', |
|||
type: 'line', |
|||
smooth: true, |
|||
symbol: 'circle', |
|||
symbolSize: 5, |
|||
showSymbol: false, |
|||
lineStyle: { |
|||
normal: { |
|||
width: 1 |
|||
} |
|||
}, |
|||
areaStyle: { |
|||
normal: { |
|||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ |
|||
offset: 0, |
|||
color: 'rgba(137, 189, 27, 0.3)' |
|||
}, { |
|||
offset: 0.8, |
|||
color: 'rgba(137, 189, 27, 0)' |
|||
}], false), |
|||
shadowColor: 'rgba(0, 0, 0, 0.1)', |
|||
shadowBlur: 10 |
|||
} |
|||
}, |
|||
itemStyle: { |
|||
normal: { |
|||
color: 'rgb(137,189,27)', |
|||
borderColor: 'rgba(137,189,2,0.27)', |
|||
borderWidth: 12 |
|||
|
|||
} |
|||
}, |
|||
data: [220, 182, 191, 134, 150, 120, 110, 125, 145, 122, 165, 122] |
|||
}, { |
|||
name: 'CTCC', |
|||
type: 'line', |
|||
smooth: true, |
|||
symbol: 'circle', |
|||
symbolSize: 5, |
|||
showSymbol: false, |
|||
lineStyle: { |
|||
normal: { |
|||
width: 1 |
|||
} |
|||
}, |
|||
areaStyle: { |
|||
normal: { |
|||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ |
|||
offset: 0, |
|||
color: 'rgba(0, 136, 212, 0.3)' |
|||
}, { |
|||
offset: 0.8, |
|||
color: 'rgba(0, 136, 212, 0)' |
|||
}], false), |
|||
shadowColor: 'rgba(0, 0, 0, 0.1)', |
|||
shadowBlur: 10 |
|||
} |
|||
}, |
|||
itemStyle: { |
|||
normal: { |
|||
color: 'rgb(0,136,212)', |
|||
borderColor: 'rgba(0,136,212,0.2)', |
|||
borderWidth: 12 |
|||
|
|||
} |
|||
}, |
|||
data: [120, 110, 125, 145, 122, 165, 122, 220, 182, 191, 134, 150] |
|||
}, { |
|||
name: 'CUCC', |
|||
type: 'line', |
|||
smooth: true, |
|||
symbol: 'circle', |
|||
symbolSize: 5, |
|||
showSymbol: false, |
|||
lineStyle: { |
|||
normal: { |
|||
width: 1 |
|||
} |
|||
}, |
|||
areaStyle: { |
|||
normal: { |
|||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ |
|||
offset: 0, |
|||
color: 'rgba(219, 50, 51, 0.3)' |
|||
}, { |
|||
offset: 0.8, |
|||
color: 'rgba(219, 50, 51, 0)' |
|||
}], false), |
|||
shadowColor: 'rgba(0, 0, 0, 0.1)', |
|||
shadowBlur: 10 |
|||
} |
|||
}, |
|||
itemStyle: { |
|||
normal: { |
|||
color: 'rgb(219,50,51)', |
|||
borderColor: 'rgba(219,50,51,0.2)', |
|||
borderWidth: 12 |
|||
} |
|||
}, |
|||
data: [220, 182, 125, 145, 122, 191, 134, 150, 120, 110, 165, 122] |
|||
}] |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
@ -0,0 +1,271 @@ |
|||
<template> |
|||
<div :id="id" :class="className" :style="{height:height,width:width}" /> |
|||
</template> |
|||
|
|||
<script> |
|||
import echarts from 'echarts' |
|||
import resize from './mixins/resize' |
|||
|
|||
export default { |
|||
mixins: [resize], |
|||
props: { |
|||
className: { |
|||
type: String, |
|||
default: 'chart' |
|||
}, |
|||
id: { |
|||
type: String, |
|||
default: 'chart' |
|||
}, |
|||
width: { |
|||
type: String, |
|||
default: '200px' |
|||
}, |
|||
height: { |
|||
type: String, |
|||
default: '200px' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
chart: null |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.initChart() |
|||
}, |
|||
beforeDestroy() { |
|||
if (!this.chart) { |
|||
return |
|||
} |
|||
this.chart.dispose() |
|||
this.chart = null |
|||
}, |
|||
methods: { |
|||
initChart() { |
|||
this.chart = echarts.init(document.getElementById(this.id)) |
|||
const xData = (function() { |
|||
const data = [] |
|||
for (let i = 1; i < 13; i++) { |
|||
data.push(i + 'month') |
|||
} |
|||
return data |
|||
}()) |
|||
this.chart.setOption({ |
|||
backgroundColor: '#344b58', |
|||
title: { |
|||
text: 'statistics', |
|||
x: '20', |
|||
top: '20', |
|||
textStyle: { |
|||
color: '#fff', |
|||
fontSize: '22' |
|||
}, |
|||
subtextStyle: { |
|||
color: '#90979c', |
|||
fontSize: '16' |
|||
} |
|||
}, |
|||
tooltip: { |
|||
trigger: 'axis', |
|||
axisPointer: { |
|||
textStyle: { |
|||
color: '#fff' |
|||
} |
|||
} |
|||
}, |
|||
grid: { |
|||
left: '5%', |
|||
right: '5%', |
|||
borderWidth: 0, |
|||
top: 150, |
|||
bottom: 95, |
|||
textStyle: { |
|||
color: '#fff' |
|||
} |
|||
}, |
|||
legend: { |
|||
x: '5%', |
|||
top: '10%', |
|||
textStyle: { |
|||
color: '#90979c' |
|||
}, |
|||
data: ['female', 'male', 'average'] |
|||
}, |
|||
calculable: true, |
|||
xAxis: [{ |
|||
type: 'category', |
|||
axisLine: { |
|||
lineStyle: { |
|||
color: '#90979c' |
|||
} |
|||
}, |
|||
splitLine: { |
|||
show: false |
|||
}, |
|||
axisTick: { |
|||
show: false |
|||
}, |
|||
splitArea: { |
|||
show: false |
|||
}, |
|||
axisLabel: { |
|||
interval: 0 |
|||
|
|||
}, |
|||
data: xData |
|||
}], |
|||
yAxis: [{ |
|||
type: 'value', |
|||
splitLine: { |
|||
show: false |
|||
}, |
|||
axisLine: { |
|||
lineStyle: { |
|||
color: '#90979c' |
|||
} |
|||
}, |
|||
axisTick: { |
|||
show: false |
|||
}, |
|||
axisLabel: { |
|||
interval: 0 |
|||
}, |
|||
splitArea: { |
|||
show: false |
|||
} |
|||
}], |
|||
dataZoom: [{ |
|||
show: true, |
|||
height: 30, |
|||
xAxisIndex: [ |
|||
0 |
|||
], |
|||
bottom: 30, |
|||
start: 10, |
|||
end: 80, |
|||
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z', |
|||
handleSize: '110%', |
|||
handleStyle: { |
|||
color: '#d3dee5' |
|||
|
|||
}, |
|||
textStyle: { |
|||
color: '#fff' }, |
|||
borderColor: '#90979c' |
|||
|
|||
}, { |
|||
type: 'inside', |
|||
show: true, |
|||
height: 15, |
|||
start: 1, |
|||
end: 35 |
|||
}], |
|||
series: [{ |
|||
name: 'female', |
|||
type: 'bar', |
|||
stack: 'total', |
|||
barMaxWidth: 35, |
|||
barGap: '10%', |
|||
itemStyle: { |
|||
normal: { |
|||
color: 'rgba(255,144,128,1)', |
|||
label: { |
|||
show: true, |
|||
textStyle: { |
|||
color: '#fff' |
|||
}, |
|||
position: 'insideTop', |
|||
formatter(p) { |
|||
return p.value > 0 ? p.value : '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
data: [ |
|||
709, |
|||
1917, |
|||
2455, |
|||
2610, |
|||
1719, |
|||
1433, |
|||
1544, |
|||
3285, |
|||
5208, |
|||
3372, |
|||
2484, |
|||
4078 |
|||
] |
|||
}, |
|||
|
|||
{ |
|||
name: 'male', |
|||
type: 'bar', |
|||
stack: 'total', |
|||
itemStyle: { |
|||
normal: { |
|||
color: 'rgba(0,191,183,1)', |
|||
barBorderRadius: 0, |
|||
label: { |
|||
show: true, |
|||
position: 'top', |
|||
formatter(p) { |
|||
return p.value > 0 ? p.value : '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
data: [ |
|||
327, |
|||
1776, |
|||
507, |
|||
1200, |
|||
800, |
|||
482, |
|||
204, |
|||
1390, |
|||
1001, |
|||
951, |
|||
381, |
|||
220 |
|||
] |
|||
}, { |
|||
name: 'average', |
|||
type: 'line', |
|||
stack: 'total', |
|||
symbolSize: 10, |
|||
symbol: 'circle', |
|||
itemStyle: { |
|||
normal: { |
|||
color: 'rgba(252,230,48,1)', |
|||
barBorderRadius: 0, |
|||
label: { |
|||
show: true, |
|||
position: 'top', |
|||
formatter(p) { |
|||
return p.value > 0 ? p.value : '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
data: [ |
|||
1036, |
|||
3693, |
|||
2962, |
|||
3810, |
|||
2519, |
|||
1915, |
|||
1748, |
|||
4675, |
|||
6209, |
|||
4323, |
|||
2865, |
|||
4298 |
|||
] |
|||
} |
|||
] |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
@ -0,0 +1,32 @@ |
|||
import { debounce } from '@/utils' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
sidebarElm: null |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.__resizeHandler = debounce(() => { |
|||
if (this.chart) { |
|||
this.chart.resize() |
|||
} |
|||
}, 100) |
|||
window.addEventListener('resize', this.__resizeHandler) |
|||
|
|||
this.sidebarElm = document.getElementsByClassName('sidebar-container')[0] |
|||
this.sidebarElm && this.sidebarElm.addEventListener('transitionend', this.sidebarResizeHandler) |
|||
}, |
|||
beforeDestroy() { |
|||
window.removeEventListener('resize', this.__resizeHandler) |
|||
|
|||
this.sidebarElm && this.sidebarElm.removeEventListener('transitionend', this.sidebarResizeHandler) |
|||
}, |
|||
methods: { |
|||
sidebarResizeHandler(e) { |
|||
if (e.propertyName === 'width') { |
|||
this.__resizeHandler() |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,63 @@ |
|||
<template> |
|||
<div v-if="errorLogs.length>0"> |
|||
<el-badge :is-dot="true" style="line-height: 25px;margin-top: -5px;" @click.native="dialogTableVisible=true"> |
|||
<el-button style="padding: 8px 10px;" size="small" type="danger"> |
|||
<svg-icon icon-class="bug" /> |
|||
</el-button> |
|||
</el-badge> |
|||
|
|||
<el-dialog :visible.sync="dialogTableVisible" title="Error Log" width="80%"> |
|||
<el-table :data="errorLogs" border> |
|||
<el-table-column label="Message"> |
|||
<template slot-scope="scope"> |
|||
<div> |
|||
<span class="message-title">Msg:</span> |
|||
<el-tag type="danger">{{ scope.row.err.message }}</el-tag> |
|||
</div> |
|||
<br> |
|||
<div> |
|||
<span class="message-title" style="padding-right: 10px;">Info: </span> |
|||
<el-tag type="warning">{{ scope.row.vm.$vnode.tag }} error in {{ scope.row.info }}</el-tag> |
|||
</div> |
|||
<br> |
|||
<div> |
|||
<span class="message-title" style="padding-right: 16px;">Url: </span> |
|||
<el-tag type="success">{{ scope.row.url }}</el-tag> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="Stack"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.err.stack }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'ErrorLog', |
|||
data() { |
|||
return { |
|||
dialogTableVisible: false |
|||
} |
|||
}, |
|||
computed: { |
|||
errorLogs() { |
|||
return this.$store.getters.errorLogs |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.message-title { |
|||
font-size: 16px; |
|||
color: #333; |
|||
font-weight: bold; |
|||
padding-right: 8px; |
|||
} |
|||
</style> |
@ -0,0 +1,43 @@ |
|||
<template> |
|||
<div style="padding: 0 15px;" @click="toggleClick"> |
|||
<svg |
|||
:class="{'is-active':isActive}" |
|||
class="hamburger" |
|||
viewBox="0 0 1024 1024" |
|||
xmlns="http://www.w3.org/2000/svg" |
|||
width="64" |
|||
height="64" |
|||
> |
|||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" /> |
|||
</svg> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'Hamburger', |
|||
props: { |
|||
isActive: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
toggleClick: { |
|||
type: Function, |
|||
default: null |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.hamburger { |
|||
display: inline-block; |
|||
vertical-align: middle; |
|||
width: 20px; |
|||
height: 20px; |
|||
} |
|||
|
|||
.hamburger.is-active { |
|||
transform: rotate(180deg); |
|||
} |
|||
</style> |
@ -0,0 +1,181 @@ |
|||
<template> |
|||
<div :class="{'show':show}" class="header-search"> |
|||
<svg-icon class-name="search-icon" icon-class="search" @click.stop="click" /> |
|||
<el-select |
|||
ref="headerSearchSelect" |
|||
v-model="search" |
|||
:remote-method="querySearch" |
|||
filterable |
|||
default-first-option |
|||
remote |
|||
placeholder="Search" |
|||
class="header-search-select" |
|||
@change="change" |
|||
> |
|||
<el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" /> |
|||
</el-select> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Fuse from 'fuse.js' |
|||
import path from 'path' |
|||
// import i18n from '@/lang' |
|||
|
|||
export default { |
|||
name: 'HeaderSearch', |
|||
data() { |
|||
return { |
|||
search: '', |
|||
options: [], |
|||
searchPool: [], |
|||
show: false, |
|||
fuse: undefined |
|||
} |
|||
}, |
|||
computed: { |
|||
routes() { |
|||
return this.$store.state.app.routes |
|||
}, |
|||
}, |
|||
watch: { |
|||
routes() { |
|||
this.searchPool = this.generateRoutes(this.routes) |
|||
}, |
|||
searchPool(list) { |
|||
this.initFuse(list) |
|||
}, |
|||
show(value) { |
|||
if (value) { |
|||
document.body.addEventListener('click', this.close) |
|||
} else { |
|||
document.body.removeEventListener('click', this.close) |
|||
} |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.searchPool = this.generateRoutes(this.routes) |
|||
}, |
|||
methods: { |
|||
click() { |
|||
this.show = !this.show |
|||
if (this.show) { |
|||
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus() |
|||
} |
|||
}, |
|||
close() { |
|||
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur() |
|||
this.options = [] |
|||
this.show = false |
|||
}, |
|||
change(val) { |
|||
this.$router.push(val.path) |
|||
this.search = '' |
|||
this.options = [] |
|||
this.$nextTick(() => { |
|||
this.show = false |
|||
}) |
|||
}, |
|||
initFuse(list) { |
|||
this.fuse = new Fuse(list, { |
|||
shouldSort: true, |
|||
threshold: 0.4, |
|||
location: 0, |
|||
distance: 100, |
|||
maxPatternLength: 32, |
|||
minMatchCharLength: 1, |
|||
keys: [{ |
|||
name: 'title', |
|||
weight: 0.7 |
|||
}, { |
|||
name: 'path', |
|||
weight: 0.3 |
|||
}] |
|||
}) |
|||
}, |
|||
// Filter out the routes that can be displayed in the sidebar |
|||
// And generate the internationalized title |
|||
generateRoutes(routes, basePath = '/', prefixTitle = []) { |
|||
let res = [] |
|||
|
|||
for (const router of routes) { |
|||
// skip hidden router |
|||
if (router.hidden) { continue } |
|||
|
|||
const data = { |
|||
path: path.resolve(basePath, router.path), |
|||
title: [...prefixTitle] |
|||
} |
|||
|
|||
if (router.meta && router.meta.title) { |
|||
// generate internationalized title |
|||
// const i18ntitle = i18n.t(`route.${router.meta.title}`) |
|||
|
|||
data.title = [...data.title, /* i18ntitle */] |
|||
|
|||
if (router.redirect !== 'noredirect') { |
|||
// only push the routes with title |
|||
// special case: need to exclude parent router without redirect |
|||
res.push(data) |
|||
} |
|||
} |
|||
|
|||
// recursive child routes |
|||
if (router.children) { |
|||
const tempRoutes = this.generateRoutes(router.children, data.path, data.title) |
|||
if (tempRoutes.length >= 1) { |
|||
res = [...res, ...tempRoutes] |
|||
} |
|||
} |
|||
} |
|||
return res |
|||
}, |
|||
querySearch(query) { |
|||
if (query !== '') { |
|||
this.options = this.fuse.search(query) |
|||
} else { |
|||
this.options = [] |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.header-search { |
|||
font-size: 0 !important; |
|||
|
|||
.search-icon { |
|||
cursor: pointer; |
|||
font-size: 18px; |
|||
vertical-align: middle; |
|||
} |
|||
|
|||
.header-search-select { |
|||
font-size: 18px; |
|||
transition: width 0.2s; |
|||
width: 0; |
|||
overflow: hidden; |
|||
background: transparent; |
|||
border-radius: 0; |
|||
display: inline-block; |
|||
vertical-align: middle; |
|||
.el-input__inner { |
|||
border-radius: 0; |
|||
border: 0; |
|||
padding-left: 0; |
|||
padding-right: 0; |
|||
box-shadow: none !important; |
|||
border-bottom: 1px solid #d9d9d9; |
|||
vertical-align: middle; |
|||
} |
|||
} |
|||
|
|||
&.show { |
|||
.header-search-select { |
|||
width: 210px; |
|||
margin-left: 10px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,51 @@ |
|||
<template> |
|||
<div> |
|||
<svg-icon :icon-class="isFullscreen?'exit-fullscreen':'fullscreen'" @click="click" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import screenfull from 'screenfull' |
|||
|
|||
export default { |
|||
name: 'Screenfull', |
|||
data() { |
|||
return { |
|||
isFullscreen: false |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.init() |
|||
}, |
|||
methods: { |
|||
click() { |
|||
if (!screenfull.enabled) { |
|||
this.$message({ |
|||
message: 'you browser can not work', |
|||
type: 'warning' |
|||
}) |
|||
return false |
|||
} |
|||
screenfull.toggle() |
|||
}, |
|||
init() { |
|||
if (screenfull.enabled) { |
|||
screenfull.on('change', () => { |
|||
this.isFullscreen = screenfull.isFullscreen |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.screenfull-svg { |
|||
display: inline-block; |
|||
cursor: pointer; |
|||
fill: #5a5e66;; |
|||
width: 20px; |
|||
height: 20px; |
|||
vertical-align: 10px; |
|||
} |
|||
</style> |
@ -0,0 +1,56 @@ |
|||
<template> |
|||
<el-dropdown trigger="click" @command="handleSetSize"> |
|||
<div> |
|||
<svg-icon class-name="size-icon" icon-class="size" /> |
|||
</div> |
|||
<el-dropdown-menu slot="dropdown"> |
|||
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value"> |
|||
{{ item.label }} |
|||
</el-dropdown-item> |
|||
</el-dropdown-menu> |
|||
</el-dropdown> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
sizeOptions: [ |
|||
{ label: 'Default', value: 'default' }, |
|||
{ label: 'Medium', value: 'medium' }, |
|||
{ label: 'Small', value: 'small' }, |
|||
{ label: 'Mini', value: 'mini' } |
|||
] |
|||
} |
|||
}, |
|||
computed: { |
|||
size() { |
|||
return this.$store.getters.size |
|||
} |
|||
}, |
|||
methods: { |
|||
handleSetSize(size) { |
|||
this.$ELEMENT.size = size |
|||
this.$store.dispatch('setSize', size) |
|||
this.refreshView() |
|||
this.$message({ |
|||
message: 'Switch Size Success', |
|||
type: 'success' |
|||
}) |
|||
}, |
|||
refreshView() { |
|||
// In order to make the cached page re-rendered |
|||
this.$store.dispatch('delAllCachedViews', this.$route) |
|||
|
|||
const { fullPath } = this.$route |
|||
|
|||
this.$nextTick(() => { |
|||
this.$router.replace({ |
|||
path: '/redirect' + fullPath |
|||
}) |
|||
}) |
|||
} |
|||
} |
|||
|
|||
} |
|||
</script> |
@ -0,0 +1,44 @@ |
|||
<template> |
|||
<svg :class="svgClass" aria-hidden="true" v-on="$listeners"> |
|||
<use :xlink:href="iconName" /> |
|||
</svg> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'SvgIcon', |
|||
props: { |
|||
iconClass: { |
|||
type: String, |
|||
required: true |
|||
}, |
|||
className: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
computed: { |
|||
iconName() { |
|||
return `#icon-${this.iconClass}` |
|||
}, |
|||
svgClass() { |
|||
if (this.className) { |
|||
return 'svg-icon ' + this.className |
|||
} else { |
|||
return 'svg-icon' |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.svg-icon { |
|||
width: 1em; |
|||
height: 1em; |
|||
vertical-align: -0.15em; |
|||
fill: currentColor; |
|||
overflow: hidden; |
|||
font-size: 16px; |
|||
} |
|||
</style> |
@ -0,0 +1,2 @@ |
|||
|
|||
|
@ -0,0 +1,7 @@ |
|||
export const BASE_API = "https://rapapi.renqilai.com/app/mock/39"; |
|||
|
|||
export const client_id = 'test' |
|||
export const client_secret = "test" |
|||
// export const BASE_API = "http://192.168.0.222:8080"
|
|||
|
|||
export const pageSize = 20 |
@ -0,0 +1,30 @@ |
|||
import Vue from 'vue' |
|||
// register globally
|
|||
import Sticky from 'vue-sticky-directive' |
|||
Vue.use(Sticky) |
|||
|
|||
export default () => { |
|||
|
|||
Vue.directive('scroll', { |
|||
bind(el, binding) { |
|||
// 获取滚动页面DOM
|
|||
let SCROLL_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap') |
|||
let scrollPosition = 0 |
|||
SCROLL_DOM.addEventListener('scroll', function () { |
|||
// 当前的滚动位置 减去 上一次的滚动位置
|
|||
// 如果为true则代表向上滚动,false代表向下滚动
|
|||
let flagToDirection = this.scrollTop - scrollPosition > 0 |
|||
// 记录当前的滚动位置
|
|||
scrollPosition = this.scrollTop |
|||
const LIMIT_BOTTOM = 100 |
|||
// 记录滚动位置距离底部的位置
|
|||
let scrollBottom = this.scrollHeight - (this.scrollTop + this.clientHeight) < LIMIT_BOTTOM |
|||
// 如果已达到指定位置则触发
|
|||
if (scrollBottom) { |
|||
// 将滚动行为告诉组件
|
|||
binding.value(flagToDirection) |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
} |
@ -0,0 +1,17 @@ |
|||
import Vue from 'vue' |
|||
// import store from './store'
|
|||
|
|||
//全局状态下 捕获异常,避免崩盘 在开发环境不需要捕获
|
|||
if (process.env.NODE_ENV === 'production') { |
|||
Vue.config.errorHandler = function(err, vm, info, a) { |
|||
Vue.nextTick(() => { |
|||
/* store.dispatch('addErrorLog', { |
|||
err, |
|||
vm, |
|||
info, |
|||
url: window.location.href |
|||
}) */ |
|||
console.error(err, info) |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,59 @@ |
|||
const moment = require('moment'); |
|||
|
|||
// set function parseTime,formatTime to filter
|
|||
export { parseTime, formatTime } from '@/utils' |
|||
|
|||
function pluralize(time, label) { |
|||
if (time === 1) { |
|||
return time + label |
|||
} |
|||
return time + label + 's' |
|||
} |
|||
|
|||
export function timeAgo(time) { |
|||
const between = Date.now() / 1000 - Number(time) |
|||
if (between < 3600) { |
|||
return pluralize(~~(between / 60), ' minute') |
|||
} else if (between < 86400) { |
|||
return pluralize(~~(between / 3600), ' hour') |
|||
} else { |
|||
return pluralize(~~(between / 86400), ' day') |
|||
} |
|||
} |
|||
|
|||
/* 数字 格式化*/ |
|||
export function numberFormatter(num, digits) { |
|||
const si = [ |
|||
{ value: 1E18, symbol: 'E' }, |
|||
{ value: 1E15, symbol: 'P' }, |
|||
{ value: 1E12, symbol: 'T' }, |
|||
{ value: 1E9, symbol: 'G' }, |
|||
{ value: 1E6, symbol: 'M' }, |
|||
{ value: 1E3, symbol: 'k' } |
|||
] |
|||
for (let i = 0; i < si.length; i++) { |
|||
if (num >= si[i].value) { |
|||
return (num / si[i].value + 0.1).toFixed(digits).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, '$1') + si[i].symbol |
|||
} |
|||
} |
|||
return num.toString() |
|||
} |
|||
|
|||
export function toThousandFilter(num) { |
|||
return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ',')) |
|||
} |
|||
export function parseint(num) { |
|||
return parseInt(num) |
|||
} |
|||
export function dateTimeFormate(date) { |
|||
return moment(date).format('YYYY-MM-DD HH:mm:SS') |
|||
} |
|||
|
|||
export function dateTimeFormateHHmm(date) { |
|||
return moment(date).format('YYYY-MM-DD hh:mm:ss') |
|||
|
|||
} |
|||
|
|||
export function clone(valu) { |
|||
return JSON.parse(JSON.stringify(valu)) |
|||
} |
@ -0,0 +1,6 @@ |
|||
import Vue from 'vue' |
|||
import SvgIcon from '@/components/SvgIcon'// svg组件
|
|||
|
|||
// register globally
|
|||
Vue.component('svg-icon', SvgIcon) |
|||
|
@ -0,0 +1,48 @@ |
|||
import Vue from 'vue' |
|||
import App from './App' |
|||
// CSS resets
|
|||
import 'normalize.css/normalize.css' |
|||
//elementui
|
|||
import Element from 'element-ui' |
|||
import 'element-ui/lib/theme-chalk/index.css' |
|||
import VueDND from 'awe-dnd' |
|||
Vue.use(VueDND) |
|||
|
|||
import VueVideoPlayer from 'vue-video-player' |
|||
import 'video.js/dist/video-js.css' |
|||
|
|||
Vue.use(VueVideoPlayer, /* { |
|||
options: global default options, |
|||
events: global videojs events |
|||
} */) |
|||
|
|||
import Cookies from 'js-cookie' |
|||
Vue.use(Element, { |
|||
size: Cookies.get('size') || 'medium', // set element-ui default size
|
|||
// i18n: (key, value) => i18n.t(key, value)
|
|||
}) |
|||
|
|||
import '@/styles/index.scss'// global css
|
|||
import './errorLog' // error log
|
|||
import './icons' // icon
|
|||
import "./permission" //权限控制
|
|||
import store from './store'//全局store
|
|||
import router from './router' |
|||
|
|||
// register global utility filters.
|
|||
import * as filters from './filters' // global filters
|
|||
import '@/utils/dom'//全局方法
|
|||
Object.keys(filters).forEach(key => { |
|||
Vue.filter(key, filters[key]) |
|||
}) |
|||
import Directives from './directives' |
|||
Vue.use(Directives) //添加下拉框 scroll方法
|
|||
Vue.config.devtools = true; |
|||
window._vm = new Vue({ |
|||
el: '#app', |
|||
router, |
|||
store, |
|||
|
|||
// i18n,
|
|||
render: h => h(App) |
|||
}) |
@ -0,0 +1,32 @@ |
|||
import router from './router' |
|||
import store from './store' |
|||
import { Message } from 'element-ui' |
|||
import NProgress from 'nprogress' // progress bar
|
|||
import 'nprogress/nprogress.css' // progress bar style
|
|||
import { getToken } from '@/utils/auth' |
|||
NProgress.configure({ showSpinner: false }) // NProgress Configuration
|
|||
|
|||
|
|||
router.beforeEach((to, from, next) => { |
|||
NProgress.start() // start progress bar
|
|||
if (to.path === '/login') { |
|||
next() |
|||
NProgress.done() // finish progress bar
|
|||
} else { |
|||
if (getToken()) { |
|||
store.dispatch('GenerateRoutes').then(routes => { |
|||
next() |
|||
}) |
|||
} else { |
|||
next('/login') |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
}) |
|||
|
|||
router.afterEach(() => { |
|||
NProgress.done() // finish progress bar
|
|||
}) |
@ -0,0 +1,32 @@ |
|||
import Layout from '@/views/layout/Layout' |
|||
|
|||
const advertisingManagement = { |
|||
path: '/advertisingManagement', |
|||
component: Layout, |
|||
meta: {title: '广告管理', icon: 'guanggaoguanli', noCache: true, affix: false}, |
|||
children: [ |
|||
{ |
|||
path: '/advertisingManagement/materialManagement', |
|||
component: () => import('@/views/advertisingManagement/materialManagement/index'), |
|||
name: '素材管理', |
|||
meta: {title: '素材管理', noCache: false, affix: false} |
|||
}, |
|||
{ |
|||
path: '/advertisingManagement/advertisingPlan', |
|||
component: () => import('@/views/advertisingManagement/advertisingPlan/index'), |
|||
name: '广告计划', |
|||
meta: {title: '广告计划', noCache: false, affix: false}, |
|||
|
|||
}, |
|||
{ |
|||
path: '/advertisingManagement/advertisingPlan/opiModel', |
|||
component: () => import('@/views/advertisingManagement/advertisingPlan/opiModel'), |
|||
hidden:true, |
|||
name: '计划增加/查看', |
|||
meta: {title: '广告计划增加/查看', noCache: false, affix: false}, |
|||
|
|||
} |
|||
] |
|||
}; |
|||
|
|||
export default advertisingManagement |
@ -0,0 +1,24 @@ |
|||
import Layout from '@/views/layout/Layout' |
|||
|
|||
const commodityManagement = { |
|||
path: '/commodityManagement', |
|||
component: Layout, |
|||
meta: {title: '商品管理', icon: 'shangpinguanli', noCache: true, affix: false}, |
|||
children: [ |
|||
{ |
|||
path: '/commodityManagement/productList', |
|||
component: () => import('@/views/commodityManagement/productList/index'), |
|||
name: '商品列表', |
|||
meta: {title: '商品列表', noCache: false, affix: false} |
|||
}, |
|||
{ |
|||
path: '/commodityManagement/commodityClassification', |
|||
component: () => import('@/views/commodityManagement/commodityClassification/index'), |
|||
name: '商品分类', |
|||
meta: {title: '商品分类', noCache: false, affix: false}, |
|||
|
|||
} |
|||
] |
|||
}; |
|||
|
|||
export default commodityManagement |
@ -0,0 +1,45 @@ |
|||
import Layout from '@/views/layout/Layout' |
|||
const device = { |
|||
path: '/device', |
|||
component: Layout, |
|||
meta: { title: '设备管理', icon: 'shebeiguanli1-copy', noCache: true, affix: false }, |
|||
children: [ |
|||
{ |
|||
path: '/device/list', |
|||
component: () => import('@/views/device/list/index'), |
|||
name: '设备列表', |
|||
/* affix: true 一直固定不关闭 */ |
|||
meta: { title: '设备列表', noCache: false, affix: false } |
|||
}, |
|||
{ |
|||
path: '/device/list/edit', |
|||
component: () => import('@/views/device/list/edit'), |
|||
hidden: true, |
|||
name: '设备编辑', |
|||
/* affix: true 一直固定不关闭 */ |
|||
meta: { title: '设备编辑', noCache: false, affix: false } |
|||
}, |
|||
{ |
|||
path: '/device/group', |
|||
component: () => import('@/views/device/group/index'), |
|||
name: 'device_group_list', |
|||
/* affix: true 一直固定不关闭 */ |
|||
meta: { title: '设备分组列表', noCache: false, affix: false } |
|||
}, |
|||
// {
|
|||
// path: '/device/map',
|
|||
// component: () => import('@/views/device/map/index'),
|
|||
// name: '机器地理图',
|
|||
// /* affix: true 一直固定不关闭 */
|
|||
// meta: { title: '机器地理图', noCache: false, affix: false }
|
|||
// },
|
|||
// {
|
|||
// path: '/device/fault',
|
|||
// component: () => import('@/views/device/fault/index'),
|
|||
// name: '机器故障',
|
|||
// /* affix: true 一直固定不关闭 */
|
|||
// meta: { title: '机器故障', noCache: false, affix: false }
|
|||
// },
|
|||
] |
|||
} |
|||
export default device |
@ -0,0 +1,24 @@ |
|||
import Layout from '@/views/layout/Layout' |
|||
|
|||
const commodityManagement = { |
|||
path: '/distribution', |
|||
component: Layout, |
|||
meta: {title: '分润管理', icon: 'gongxiang', noCache: true, affix: false}, |
|||
children: [ |
|||
{ |
|||
path: '/distribution/equipment', |
|||
component: () => import('@/views/distribution/equipment/index'), |
|||
name: '设备分润', |
|||
meta: {title: '设备分润', noCache: false, affix: false} |
|||
}, |
|||
{ |
|||
path: '/distribution/field', |
|||
component: () => import('@/views/distribution/field/index'), |
|||
name: '场地分润', |
|||
meta: {title: '场地分润', noCache: false, affix: false}, |
|||
|
|||
} |
|||
] |
|||
}; |
|||
|
|||
export default commodityManagement |
@ -0,0 +1,18 @@ |
|||
import Layout from '@/views/layout/Layout' |
|||
|
|||
const finance = { |
|||
path: '/finance', |
|||
component: Layout, |
|||
redirect: '/finance/index', |
|||
meta: {title: '财务', icon: 'caiwu', noCache: true, affix: false}, |
|||
children: [ |
|||
{ |
|||
path: '/finance/index', |
|||
component: () => import('@/views/finance/index'), |
|||
name: "finance_list", |
|||
meta: {title: '财务', icon: 'caiwu', noCache: true, affix: false}, |
|||
}, |
|||
] |
|||
}; |
|||
|
|||
export default finance |
@ -0,0 +1,33 @@ |
|||
import Layout from '@/views/layout/Layout' |
|||
const device = { |
|||
path: '/inventory', |
|||
component: Layout, |
|||
meta: { title: '库存管理', icon: 'kucunguanli' }, |
|||
children: [ |
|||
{ |
|||
path: '/inventory/list', |
|||
component: () => import('@/views/inventory/list/index'), |
|||
name: 'inventory_list', |
|||
/* affix: true 一直固定不关闭 */ |
|||
meta: { title: '库存管理', noCache: false, affix: false } |
|||
}, |
|||
{ |
|||
path: '/inventory/detail', |
|||
hidden: true, |
|||
component: () => import('@/views/inventory/detail/index'), |
|||
name: 'inventory_detail', |
|||
/* affix: true 一直固定不关闭 */ |
|||
meta: { title: '库存详情', noCache: false, affix: false } |
|||
}, |
|||
{ |
|||
path: '/inventory/audits', |
|||
hidden: true, |
|||
component: () => import('@/views/inventory/detail/audits/table'), |
|||
/* affix: true 一直固定不关闭 */ |
|||
meta: { title: '产品库存记录', noCache: false, affix: false } |
|||
|
|||
} |
|||
|
|||
] |
|||
} |
|||
export default device |
@ -0,0 +1,25 @@ |
|||
import Layout from '@/views/layout/Layout' |
|||
const route = { |
|||
path: '/location', |
|||
component: Layout, |
|||
meta: { title: '场地管理', icon: 'changdiguanli', noCache: true, affix: false }, |
|||
rediect: '/location/list', |
|||
children: [ |
|||
{ |
|||
path: '/location/list', |
|||
component: () => import('@/views/location/list'), |
|||
name: 'localtion_list', |
|||
/* affix: true 一直固定不关闭 */ |
|||
meta: { title: '场地管理', noCache: false, affix: false } |
|||
}, |
|||
{ |
|||
path: '/location/add-device', |
|||
hidden: true, |
|||
component: () => import('@/views/location/AddDevice2location'), |
|||
name: 'localtion_addDevice2localtion', |
|||
/* affix: true 一直固定不关闭 */ |
|||
meta: { title: '场地添加设备', noCache: false, affix: false } |
|||
}, |
|||
] |
|||
} |
|||
export default route |
@ -0,0 +1,24 @@ |
|||
import Layout from '@/views/layout/Layout' |
|||
|
|||
const order = { |
|||
path: '/order', |
|||
component: Layout, |
|||
meta: {title: '订单管理', icon: 'dingdan', noCache: true, affix: false}, |
|||
children: [ |
|||
{ |
|||
path: '/order/salesOrder', |
|||
component: () => import('@/views/order/salesOrder/index'), |
|||
name: '销售订单', |
|||
meta: {title: '销售订单', noCache: false, affix: false} |
|||
}, |
|||
// {
|
|||
// path: '/order/luckyFree',
|
|||
// component: () => import('@/views/order/luckyFree/index'),
|
|||
// name: '幸运免单',
|
|||
// meta: {title: '幸运免单', noCache: false, affix: false},
|
|||
//
|
|||
// }
|
|||
] |
|||
}; |
|||
|
|||
export default order |
@ -0,0 +1,40 @@ |
|||
import Layout from '@/views/layout/Layout' |
|||
|
|||
const commodityManagement = { |
|||
path: '/privilegeManagement', |
|||
component: Layout, |
|||
meta: {title: '权限管理', icon: 'shouquanguanli', noCache: true, affix: false}, |
|||
children: [ |
|||
{ |
|||
path: '/privilegeManagement/account', |
|||
component: () => import('@/views/privilegeManagement/account/index'), |
|||
name: '账户管理', |
|||
meta: {title: '账户管理', noCache: false, affix: false} |
|||
}, |
|||
{ |
|||
path: '/privilegeManagement/role', |
|||
component: () => import('@/views/privilegeManagement/role/index'), |
|||
name: '角色管理', |
|||
meta: {title: '角色管理', noCache: false, affix: false}, |
|||
|
|||
}, |
|||
{ |
|||
path: '/privilegeManagement/role/permissions', |
|||
component: () => import('@/views/privilegeManagement/role/permissions'), |
|||
hidden:true, |
|||
name: '新增角色', |
|||
meta: {title: '新增角色', noCache: false, affix: false}, |
|||
|
|||
}, |
|||
{ |
|||
path: '/privilegeManagement/account/opiModel', |
|||
component: () => import('@/views/privilegeManagement/account/opiModel'), |
|||
hidden:true, |
|||
name: '用户增加/查看', |
|||
meta: {title: '用户增加/查看', noCache: false, affix: false}, |
|||
|
|||
} |
|||
] |
|||
}; |
|||
|
|||
export default commodityManagement |
@ -0,0 +1,46 @@ |
|||
import Layout from '@/views/layout/Layout' |
|||
const route = { |
|||
path: '/shelfs', |
|||
component: Layout, |
|||
redirect: '/shelfs/index', |
|||
meta: { title: '货道管理', icon: 'shebeiguanli' }, |
|||
children: [ |
|||
{ |
|||
path: '/shelfs/index', |
|||
component: () => import('@/views/shelfs/list'), |
|||
name: "shelfs_list", |
|||
meta: { |
|||
title: '货道列表', noCache: false, affix: false |
|||
}, |
|||
}, |
|||
{ |
|||
path: '/shelfs/status', |
|||
component: () => import('@/views/shelfs/status'), |
|||
name: "shelfs_status", |
|||
meta: { title: '货道状态', noCache: false, affix: false }, |
|||
}, |
|||
{ |
|||
path: '/shelfs/detail', |
|||
hidden: true, |
|||
component: () => import('@/views/shelfs/detail'), |
|||
name: "shelfs_detail", |
|||
meta: { title: '货道详情', noCache: false, affix: false }, |
|||
}, |
|||
{ |
|||
path: '/shelfs/putaway', |
|||
hidden: true, |
|||
component: () => import('@/views/shelfs/list/putawayShelf/putawayShelf'), |
|||
name: "shelfs_list_putaway", |
|||
meta: { title: '货道上架', noCache: false, affix: false }, |
|||
}, |
|||
{ |
|||
path: '/shelfs/add', |
|||
hidden: true, |
|||
component: () => import('@/views/shelfs/add'), |
|||
name: "shelfs_list_add", |
|||
meta: { title: '新增货道方案', noCache: false, affix: false }, |
|||
}, |
|||
|
|||
] |
|||
} |
|||
export default route |
@ -0,0 +1,7 @@ |
|||
const getters = { |
|||
app_routes: state => state.app.routes, |
|||
sidebar: state => state.app.sidebar, |
|||
visitedViews: state => state.tagsView.visitedViews, |
|||
common: state => state.common, |
|||
} |
|||
export default getters |
@ -0,0 +1,26 @@ |
|||
import Vue from 'vue' |
|||
import Vuex from 'vuex' |
|||
import app from './modules/app' |
|||
import common from './modules/common' |
|||
import tagsView from './modules/tagsView' |
|||
import user from './modules/user' |
|||
import device from './modules/device/index' |
|||
import inventory from './modules/inventory' |
|||
|
|||
import getters from './getters' |
|||
|
|||
Vue.use(Vuex) |
|||
|
|||
const store = new Vuex.Store({ |
|||
modules: { |
|||
app, |
|||
common, |
|||
tagsView, |
|||
user, |
|||
device, |
|||
inventory, |
|||
}, |
|||
getters, |
|||
}) |
|||
|
|||
export default store |
@ -0,0 +1,72 @@ |
|||
import Cookies from 'js-cookie' |
|||
import { constantRoutes } from '@/router' |
|||
const app = { |
|||
state: { |
|||
sidebar: { |
|||
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, |
|||
withoutAnimation: false |
|||
}, |
|||
routes:[], |
|||
device: 'desktop', |
|||
language: Cookies.get('language') || 'en', |
|||
size: Cookies.get('size') || 'medium' |
|||
}, |
|||
mutations: { |
|||
TOGGLE_SIDEBAR: state => { |
|||
state.sidebar.opened = !state.sidebar.opened |
|||
state.sidebar.withoutAnimation = false |
|||
if (state.sidebar.opened) { |
|||
Cookies.set('sidebarStatus', 1) |
|||
} else { |
|||
Cookies.set('sidebarStatus', 0) |
|||
} |
|||
}, |
|||
CLOSE_SIDEBAR: (state, withoutAnimation) => { |
|||
Cookies.set('sidebarStatus', 0) |
|||
state.sidebar.opened = false |
|||
state.sidebar.withoutAnimation = withoutAnimation |
|||
}, |
|||
TOGGLE_DEVICE: (state, device) => { |
|||
state.device = device |
|||
}, |
|||
SET_LANGUAGE: (state, language) => { |
|||
state.language = language |
|||
Cookies.set('language', language) |
|||
}, |
|||
SET_SIZE: (state, size) => { |
|||
state.size = size |
|||
Cookies.set('size', size) |
|||
}, |
|||
SET_ROUTES: (state, routes) => { |
|||
state.addRoutes = routes |
|||
state.routes = routes |
|||
}, |
|||
|
|||
}, |
|||
actions: { |
|||
GenerateRoutes({ commit }, data) { |
|||
return new Promise(resolve => { |
|||
// const { roles } = data
|
|||
commit('SET_ROUTES', constantRoutes) |
|||
resolve(constantRoutes) |
|||
}) |
|||
}, |
|||
toggleSideBar({ commit }) { |
|||
commit('TOGGLE_SIDEBAR') |
|||
}, |
|||
closeSideBar({ commit }, { withoutAnimation }) { |
|||
commit('CLOSE_SIDEBAR', withoutAnimation) |
|||
}, |
|||
toggleDevice({ commit }, device) { |
|||
commit('TOGGLE_DEVICE', device) |
|||
}, |
|||
setLanguage({ commit }, language) { |
|||
commit('SET_LANGUAGE', language) |
|||
}, |
|||
setSize({ commit }, size) { |
|||
commit('SET_SIZE', size) |
|||
} |
|||
} |
|||
} |
|||
|
|||
export default app |
@ -0,0 +1,59 @@ |
|||
import { |
|||
GET_DEVICE_TYPES, GET_LOCATIONS, |
|||
GET_DEVICE_GROUPS_TOTAL, GET_DEIVCE_GROUPS_ALL, |
|||
GET_ROLES, GET_LOCALTION_TYPE |
|||
} from '@/api/common' |
|||
|
|||
const store = { |
|||
state: { |
|||
//select 的options
|
|||
deviceTypes: [], |
|||
locations: [], |
|||
roles: [], |
|||
deviceGroups: [], |
|||
locationTypes: [] |
|||
}, |
|||
mutations: { |
|||
SET_DEVICE_TYPE: (state, payload) => { |
|||
state.deviceTypes = payload |
|||
}, |
|||
SET_LOCALTIONS: (state, payload) => { |
|||
state.locations = payload |
|||
}, |
|||
SET_ROLE: (state, payload) => { |
|||
state.roles = payload |
|||
}, |
|||
SET_DEVICE_GROUPS: (state, payload) => { |
|||
state.deviceGroups = payload |
|||
}, |
|||
SET_LOCATION_TYPE: (state, payload) => { |
|||
state.locationTypes = payload |
|||
}, |
|||
}, |
|||
actions: { |
|||
getDeviceTypes: async ({ commit, state }, params) => { |
|||
var lists = await GET_DEVICE_TYPES() |
|||
commit("SET_DEVICE_TYPE", lists) |
|||
}, |
|||
getLocations: async ({ commit, state }, params) => { |
|||
var lists = await GET_LOCATIONS() |
|||
commit("SET_LOCALTIONS", lists) |
|||
}, |
|||
getDeviceGroups: async ({ commit, state }, params) => { |
|||
//1.获取groups总数
|
|||
//2.调取所有的groups
|
|||
var total = await GET_DEVICE_GROUPS_TOTAL() |
|||
var lists = await GET_DEIVCE_GROUPS_ALL(total) |
|||
commit("SET_DEVICE_GROUPS", lists) |
|||
}, |
|||
getRoles: async ({ commit, state }, params) => { |
|||
var lists = await GET_ROLES() |
|||
commit("SET_ROLE", lists) |
|||
}, |
|||
getLocationTypes: async ({ commit, state }, params) => { |
|||
var lists = await GET_LOCALTION_TYPE(params) |
|||
commit("SET_LOCATION_TYPE", lists) |
|||
}, |
|||
}, |
|||
} |
|||
export default store |
@ -0,0 +1,61 @@ |
|||
import { |
|||
GET_DEVICE_DETAIL, |
|||
UPDATE_DEVICE |
|||
} from '@/api/devices' |
|||
|
|||
const deviceStore = { |
|||
namespaced: true, |
|||
state: { |
|||
loading: false, |
|||
device: { |
|||
"groupName": "", |
|||
"locationName": "", |
|||
"locationId": '', |
|||
"groupId": '', |
|||
"name": "", |
|||
"active": false, |
|||
"id": "", |
|||
"type": "" |
|||
} |
|||
}, |
|||
mutations: { |
|||
SET_LOADING: (state, payload) => { |
|||
state.loading = payload |
|||
}, |
|||
SET_DEVICE: (state, payload) => { |
|||
state.device = payload |
|||
}, |
|||
}, |
|||
actions: { |
|||
getDeviceDetail: async ({ commit, state, dispatch }, params) => { |
|||
commit('SET_LOADING', true) |
|||
var device = await GET_DEVICE_DETAIL(params).catch(e => { |
|||
console.error(e) |
|||
commit('SET_LOADING', false) |
|||
}) |
|||
commit('SET_LOADING', false) |
|||
commit('SET_DEVICE', device) |
|||
}, |
|||
updateDevice: async ({ commit, state, dispatch }, params) => { |
|||
commit('SET_LOADING', true) |
|||
var device = await UPDATE_DEVICE(params).then(res => { |
|||
return { success: true } |
|||
}).catch(e => { |
|||
commit('SET_LOADING', false) |
|||
return { success: false, message: e } |
|||
}) |
|||
commit('SET_LOADING', false) |
|||
if (device.success) { |
|||
return { success: true, message: "添加成功" } |
|||
} else { |
|||
return device |
|||
} |
|||
|
|||
}, |
|||
resetForm: async ({ commit, state, dispatch }, params) => { |
|||
return dispatch('getDeviceDetail', state.device) |
|||
}, |
|||
} |
|||
|
|||
} |
|||
export default deviceStore |
@ -0,0 +1,17 @@ |
|||
import {ADD_DEVICE_GROUPS} from '@/api/devices'; |
|||
|
|||
|
|||
const Store = { |
|||
namespaced: true, |
|||
state: {}, |
|||
mutations: {}, |
|||
actions: { |
|||
addDeviceGroup: async ({commit, state}, {name}) => { |
|||
var result = await ADD_DEVICE_GROUPS({name}).catch(e => { |
|||
return {success: false, message: e} |
|||
}) |
|||
return {success: true, message: result} |
|||
} |
|||
}, |
|||
} |
|||
export default Store |
@ -0,0 +1,39 @@ |
|||
import {UPDATE_DEVICE_GROUPS} from "@/api/devices"; |
|||
import _map from "lodash.map" |
|||
|
|||
const Store = { |
|||
namespaced: true, |
|||
state: { |
|||
editRow: {} |
|||
}, |
|||
mutations: { |
|||
INIT_EDIT_ROW: (state, editRow) => { |
|||
state.editRow = editRow |
|||
}, |
|||
UPDATE_DEVICE_GROUP: (state, editRow) => { |
|||
state.editRow = editRow |
|||
}, |
|||
}, |
|||
actions: { |
|||
initEditRow: async ({commit, state}, editRow) => { |
|||
commit("INIT_EDIT_ROW", editRow) |
|||
}, |
|||
updateDeviceGroup: async ({rootState, commit, state, dispatch}, editRow) => { |
|||
var result = await UPDATE_DEVICE_GROUPS(editRow).catch(e => { |
|||
return {message: e, success: false} |
|||
}) |
|||
//修改
|
|||
var lists = rootState.device.group.list.lists |
|||
var _index = lists.findIndex(item => item.id == editRow.id) |
|||
|
|||
_map(editRow, (value, key) => { |
|||
lists[_index][key] = value |
|||
}) |
|||
// commit("UPDATE_DEVICE_GROUP", editRow)
|
|||
dispatch('device/group/list/setDeviceList', lists, {root: true}) |
|||
|
|||
return {message: "修改成功", success: true} |
|||
}, |
|||
}, |
|||
} |
|||
export default Store |
@ -0,0 +1,12 @@ |
|||
import list from './list' |
|||
import add from './add' |
|||
import edit from './edit' |
|||
|
|||
const Store = { |
|||
namespaced: true, |
|||
modules: { |
|||
list, |
|||
add, edit |
|||
} |
|||
} |
|||
export default Store |
@ -0,0 +1,114 @@ |
|||
import { |
|||
GET_DEVICE_LISTS, GET_LIST_TOTAL, |
|||
GET_DEVICES_NUM, ADD_DEVICE, |
|||
GET_DEVICE_GROUPS, GET_DEVICE_GROUPS_TOTAL, |
|||
} from '@/api/devices'; |
|||
import { pageSize } from '@/config'; |
|||
|
|||
const formData = { |
|||
query: "", |
|||
active: '' |
|||
}; |
|||
const addParams = { |
|||
"id": "", |
|||
deviceTypeId: "", |
|||
"note": "", |
|||
"locationId": "", |
|||
"planId": "", |
|||
"name": "" |
|||
} |
|||
const Store = { |
|||
namespaced: true, |
|||
state: { |
|||
lists: [], |
|||
tableLoading: false, |
|||
/* params */ |
|||
params: JSON.parse(JSON.stringify(formData)), |
|||
page: { |
|||
from: 0, |
|||
size: pageSize, |
|||
}, |
|||
//在线机器 离线机器
|
|||
devicesNum: { |
|||
"devices": 0, |
|||
"activeDevices": 0 |
|||
}, |
|||
//list total 用来分页,
|
|||
list_total: 0, |
|||
//add params
|
|||
addParams: JSON.parse(JSON.stringify(addParams)) |
|||
|
|||
}, |
|||
mutations: { |
|||
SET_LIST: (state, payload) => { |
|||
state.lists = payload |
|||
}, |
|||
SET_TABLE_LOADING: (state, payload) => { |
|||
state.tableLoading = payload |
|||
}, |
|||
SET_TABLE_PAGE: (state, payload) => { |
|||
state.page = payload |
|||
}, |
|||
SET_TABLE_FILTER: (state, payload) => { |
|||
state.params = payload |
|||
}, |
|||
|
|||
SET_LIST_TOTAL: (state, payload) => { |
|||
state.list_total = payload |
|||
}, |
|||
SET_DEVICES_NUM: (state, payload) => { |
|||
state.devicesNum = payload |
|||
}, |
|||
RESET_ADD_MODAL_PARAMS: (state, payload) => { |
|||
state.addParams = JSON.parse(JSON.stringify(addParams)) |
|||
}, |
|||
}, |
|||
actions: { |
|||
setDeviceList: async ({ commit, state }, lists) => { |
|||
commit("SET_LIST", lists) |
|||
}, |
|||
setDevicesNum: async ({ commit, state }, params) => { |
|||
var devicesNum = await GET_DEVICES_NUM(params) |
|||
commit("SET_DEVICES_NUM", devicesNum) |
|||
}, |
|||
getListTotal: async ({ commit, state }, params) => { |
|||
var total = await GET_DEVICE_GROUPS_TOTAL(state.params.query) |
|||
commit("SET_LIST_TOTAL", total) |
|||
}, |
|||
|
|||
getDeviceGroups: async ({ commit, state }, params) => { |
|||
commit("SET_TABLE_LOADING", true) |
|||
commit("SET_TABLE_FILTER", params) |
|||
commit("SET_TABLE_PAGE", { from: 0, size: pageSize }) |
|||
var _params = { ...params, ...state.page } |
|||
var lists = await GET_DEVICE_GROUPS(_params) |
|||
commit("SET_TABLE_LOADING", false) |
|||
commit("SET_LIST", lists) |
|||
}, |
|||
changeDeviceListPage: async ({ commit, state }, page) => { |
|||
commit("SET_TABLE_PAGE", page) |
|||
var _params = { ...state.params, ...page } |
|||
commit("SET_TABLE_LOADING", true) |
|||
var lists = await GET_DEVICE_GROUPS(_params) |
|||
commit("SET_TABLE_LOADING", false) |
|||
commit("SET_LIST", lists) |
|||
}, |
|||
resetForm: async ({ commit, state, dispatch }, page) => { |
|||
var params = JSON.parse(JSON.stringify(formData)) |
|||
dispatch("getDeviceGroups", params) |
|||
}, |
|||
addDeivce: async ({ commit, state, dispatch }, params) => { |
|||
var data = await ADD_DEVICE(state.addParams).catch(e => { |
|||
return { success: false, message: e } |
|||
}) |
|||
//更新 list
|
|||
debugger |
|||
var _params = { ...state.params, ...state.page } |
|||
dispatch("getDeviceGroups", _params) |
|||
commit('RESET_ADD_MODAL_PARAMS') |
|||
return { success: true } |
|||
}, |
|||
|
|||
}, |
|||
} |
|||
export default Store |
@ -0,0 +1,13 @@ |
|||
import list from './list' |
|||
import edit from './edit' |
|||
import group from './group' |
|||
|
|||
const deviceStore = { |
|||
namespaced: true, |
|||
modules: { |
|||
list, |
|||
edit, |
|||
group |
|||
} |
|||
} |
|||
export default deviceStore |
@ -0,0 +1,114 @@ |
|||
import { |
|||
GET_DEVICE_LISTS, GET_LIST_TOTAL, |
|||
GET_DEVICES_NUM, ADD_DEVICE |
|||
} from '@/api/devices'; |
|||
import { pageSize } from '@/config'; |
|||
|
|||
|
|||
const formData = { |
|||
id: "", |
|||
locationId: "", |
|||
active: "", |
|||
typeId: "", |
|||
groupId: "", |
|||
query: "" |
|||
}; |
|||
const addParams = { |
|||
"id": "", |
|||
deviceTypeId: "", |
|||
"note": "", |
|||
"locationId": "", |
|||
"planId": "", |
|||
"name": "" |
|||
} |
|||
const store = { |
|||
namespaced: true, |
|||
state: { |
|||
lists: [], |
|||
tableLoading: false, |
|||
/* params */ |
|||
params: JSON.parse(JSON.stringify(formData)), |
|||
page: { |
|||
from: 0, |
|||
size: pageSize, |
|||
}, |
|||
//在线机器 离线机器
|
|||
devicesNum: { |
|||
"devices": 0, |
|||
"activeDevices": 0 |
|||
}, |
|||
//list total 用来分页,
|
|||
list_total: 0, |
|||
//add params
|
|||
addParams: JSON.parse(JSON.stringify(addParams)) |
|||
|
|||
}, |
|||
mutations: { |
|||
SET_LIST: (state, payload) => { |
|||
state.lists = payload |
|||
}, |
|||
SET_TABLE_LOADING: (state, payload) => { |
|||
state.tableLoading = payload |
|||
}, |
|||
SET_TABLE_PAGE: (state, payload) => { |
|||
state.page = payload |
|||
}, |
|||
SET_TABLE_FILTER: (state, payload) => { |
|||
state.params = payload |
|||
}, |
|||
|
|||
SET_LIST_TOTAL: (state, payload) => { |
|||
state.list_total = payload |
|||
}, |
|||
SET_DEVICES_NUM: (state, payload) => { |
|||
state.devicesNum = payload |
|||
}, |
|||
RESET_ADD_MODAL_PARAMS: (state, payload) => { |
|||
state.addParams = JSON.parse(JSON.stringify(addParams)) |
|||
}, |
|||
}, |
|||
actions: { |
|||
setDevicesNum: async ({ commit, state }, params) => { |
|||
var devicesNum = await GET_DEVICES_NUM(params) |
|||
commit("SET_DEVICES_NUM", devicesNum) |
|||
}, |
|||
getListTotal: async ({ commit, state }, params) => { |
|||
var { activeDevices, devices } = await GET_DEVICES_NUM(params) |
|||
commit("SET_LIST_TOTAL", devices) |
|||
}, |
|||
|
|||
getDeviceList: async ({ commit, state }, params) => { |
|||
commit("SET_TABLE_LOADING", true) |
|||
commit("SET_TABLE_FILTER", params) |
|||
commit("SET_TABLE_PAGE", { from: 0, size: 10 }) |
|||
var _params = { ...params, ...state.page } |
|||
var lists = await GET_DEVICE_LISTS(_params) |
|||
commit("SET_TABLE_LOADING", false) |
|||
commit("SET_LIST", lists) |
|||
}, |
|||
changeDeviceListPage: async ({ commit, state }, page) => { |
|||
var _params = { ...page, ...state.params } |
|||
commit("SET_TABLE_LOADING", true) |
|||
commit("SET_TABLE_PAGE", page) |
|||
var lists = await GET_DEVICE_LISTS(_params) |
|||
commit("SET_TABLE_LOADING", false) |
|||
commit("SET_LIST", lists) |
|||
}, |
|||
resetForm: async ({ commit, state, dispatch }, page) => { |
|||
var params = JSON.parse(JSON.stringify(formData)) |
|||
dispatch("getDeviceList", params) |
|||
}, |
|||
addDeivce: async ({ commit, state, dispatch }, params) => { |
|||
var data = await ADD_DEVICE(state.addParams).catch(e => { |
|||
return { success: false, message: e } |
|||
}) |
|||
//更新 list
|
|||
var _params = { ...state.params, ...state.page } |
|||
dispatch("getDeviceList", _params) |
|||
commit('RESET_ADD_MODAL_PARAMS') |
|||
return { success: true } |
|||
}, |
|||
|
|||
}, |
|||
} |
|||
export default store |
@ -0,0 +1,33 @@ |
|||
//detail
|
|||
import map from 'lodash.map' |
|||
import { pageSize } from '@/config'; |
|||
const store = { |
|||
namespaced: true, |
|||
state: { |
|||
form: { |
|||
from: 0, |
|||
size: pageSize |
|||
}, |
|||
total: 0, |
|||
lists: [], |
|||
loading: false, |
|||
}, |
|||
mutations: { |
|||
SET_DATA: (state, payload) => { |
|||
map(payload, (value, key) => { |
|||
state[key] = payload[key] |
|||
}) |
|||
}, |
|||
}, |
|||
actions: { |
|||
|
|||
setStore: async ({ commit, state, dispatch }, payload) => { |
|||
map(payload, (value, key) => { |
|||
commit("SET_DATA", { [key]: value }) |
|||
}) |
|||
return payload |
|||
}, |
|||
|
|||
}, |
|||
} |
|||
export default store |
@ -0,0 +1,50 @@ |
|||
//detail
|
|||
import map from 'lodash.map' |
|||
import { pageSize } from '@/config'; |
|||
const store = { |
|||
namespaced: true, |
|||
state: { |
|||
editRow: {},//目前选着的数据
|
|||
form: { |
|||
from: 0, |
|||
size: pageSize |
|||
}, |
|||
total: 0, |
|||
lists: [], |
|||
loading: false, |
|||
|
|||
|
|||
tablelist1: [], |
|||
//stockshow
|
|||
stockshow: false, |
|||
transfershow: false, |
|||
returnshow: false, |
|||
editRow2: {} |
|||
}, |
|||
mutations: { |
|||
SET_DATA: (state, payload) => { |
|||
map(payload, (value, key) => { |
|||
state[key] = payload[key] |
|||
}) |
|||
}, |
|||
}, |
|||
actions: { |
|||
setEditRow: async ({ commit, state }, row) => { |
|||
commit("SET_DATA", { editRow: row }) |
|||
commit("SET_DATA", { form: { ...state.form, id: row.id } }) |
|||
}, |
|||
setStore: async ({ commit, state, dispatch }, payload) => { |
|||
map(payload, (value, key) => { |
|||
commit("SET_DATA", { [key]: value }) |
|||
}) |
|||
return payload |
|||
}, |
|||
search: async ({ commit, state, dispatch }, form) => { |
|||
var _form = { ...state.form, ...form } |
|||
commit("SET_DATA", { form: _form }) |
|||
dispatch("getLists") |
|||
}, |
|||
|
|||
}, |
|||
} |
|||
export default store |
@ -0,0 +1,13 @@ |
|||
import list from './list' |
|||
import detail from './detail' |
|||
import audits from './detail/audits' |
|||
|
|||
const store = { |
|||
namespaced: true, |
|||
modules: { |
|||
list, |
|||
detail, |
|||
audits |
|||
} |
|||
} |
|||
export default store |
@ -0,0 +1,27 @@ |
|||
//list
|
|||
import map from 'lodash.map' |
|||
const store = { |
|||
namespaced: true, |
|||
state: { |
|||
editRow: { |
|||
availableStock: "", |
|||
},//目前选着的数据
|
|||
|
|||
}, |
|||
mutations: { |
|||
SET_DATA: (state, payload) => { |
|||
map(payload, (value, key) => { |
|||
state[key] = payload[key] |
|||
}) |
|||
|
|||
}, |
|||
}, |
|||
actions: { |
|||
setEditRow: async ({ commit, state }, row) => { |
|||
commit("SET_DATA", { editRow: row }) |
|||
}, |
|||
|
|||
|
|||
}, |
|||
} |
|||
export default store |
@ -0,0 +1,162 @@ |
|||
|
|||
const tagsView = { |
|||
state: { |
|||
visitedViews: [], |
|||
cachedViews: [] |
|||
}, |
|||
mutations: { |
|||
ADD_VISITED_VIEW: (state, view) => { |
|||
if (state.visitedViews.some(v => v.path === view.path)) return |
|||
state.visitedViews.push( |
|||
Object.assign({}, view, { |
|||
title: view.meta.title || 'no-name' |
|||
}) |
|||
) |
|||
}, |
|||
ADD_CACHED_VIEW: (state, view) => { |
|||
if (state.cachedViews.includes(view.name)) return |
|||
if (!view.meta.noCache) { |
|||
state.cachedViews.push(view.name) |
|||
} |
|||
}, |
|||
|
|||
DEL_VISITED_VIEW: (state, view) => { |
|||
for (const [i, v] of state.visitedViews.entries()) { |
|||
if (v.path === view.path) { |
|||
state.visitedViews.splice(i, 1) |
|||
break |
|||
} |
|||
} |
|||
}, |
|||
DEL_CACHED_VIEW: (state, view) => { |
|||
for (const i of state.cachedViews) { |
|||
if (i === view.name) { |
|||
const index = state.cachedViews.indexOf(i) |
|||
state.cachedViews.splice(index, 1) |
|||
break |
|||
} |
|||
} |
|||
}, |
|||
|
|||
DEL_OTHERS_VISITED_VIEWS: (state, view) => { |
|||
state.visitedViews = state.visitedViews.filter(v => { |
|||
return v.meta.affix || v.path === view.path |
|||
}) |
|||
}, |
|||
DEL_OTHERS_CACHED_VIEWS: (state, view) => { |
|||
for (const i of state.cachedViews) { |
|||
if (i === view.name) { |
|||
const index = state.cachedViews.indexOf(i) |
|||
state.cachedViews = state.cachedViews.slice(index, index + 1) |
|||
break |
|||
} |
|||
} |
|||
}, |
|||
|
|||
DEL_ALL_VISITED_VIEWS: state => { |
|||
// keep affix tags
|
|||
const affixTags = state.visitedViews.filter(tag => tag.meta.affix) |
|||
state.visitedViews = affixTags |
|||
}, |
|||
DEL_ALL_CACHED_VIEWS: state => { |
|||
state.cachedViews = [] |
|||
}, |
|||
|
|||
UPDATE_VISITED_VIEW: (state, view) => { |
|||
for (let v of state.visitedViews) { |
|||
if (v.path === view.path) { |
|||
v = Object.assign(v, view) |
|||
break |
|||
} |
|||
} |
|||
} |
|||
|
|||
}, |
|||
actions: { |
|||
addView({ dispatch }, view) { |
|||
dispatch('addVisitedView', view) |
|||
dispatch('addCachedView', view) |
|||
}, |
|||
addVisitedView({ commit }, view) { |
|||
commit('ADD_VISITED_VIEW', view) |
|||
}, |
|||
addCachedView({ commit }, view) { |
|||
commit('ADD_CACHED_VIEW', view) |
|||
}, |
|||
|
|||
delView({ dispatch, state }, view) { |
|||
return new Promise(resolve => { |
|||
dispatch('delVisitedView', view) |
|||
dispatch('delCachedView', view) |
|||
resolve({ |
|||
visitedViews: [...state.visitedViews], |
|||
cachedViews: [...state.cachedViews] |
|||
}) |
|||
}) |
|||
}, |
|||
delVisitedView({ commit, state }, view) { |
|||
return new Promise(resolve => { |
|||
commit('DEL_VISITED_VIEW', view) |
|||
resolve([...state.visitedViews]) |
|||
}) |
|||
}, |
|||
delCachedView({ commit, state }, view) { |
|||
return new Promise(resolve => { |
|||
commit('DEL_CACHED_VIEW', view) |
|||
resolve([...state.cachedViews]) |
|||
}) |
|||
}, |
|||
|
|||
delOthersViews({ dispatch, state }, view) { |
|||
return new Promise(resolve => { |
|||
dispatch('delOthersVisitedViews', view) |
|||
dispatch('delOthersCachedViews', view) |
|||
resolve({ |
|||
visitedViews: [...state.visitedViews], |
|||
cachedViews: [...state.cachedViews] |
|||
}) |
|||
}) |
|||
}, |
|||
delOthersVisitedViews({ commit, state }, view) { |
|||
return new Promise(resolve => { |
|||
commit('DEL_OTHERS_VISITED_VIEWS', view) |
|||
resolve([...state.visitedViews]) |
|||
}) |
|||
}, |
|||
delOthersCachedViews({ commit, state }, view) { |
|||
return new Promise(resolve => { |
|||
commit('DEL_OTHERS_CACHED_VIEWS', view) |
|||
resolve([...state.cachedViews]) |
|||
}) |
|||
}, |
|||
|
|||
delAllViews({ dispatch, state }, view) { |
|||
return new Promise(resolve => { |
|||
dispatch('delAllVisitedViews', view) |
|||
dispatch('delAllCachedViews', view) |
|||
resolve({ |
|||
visitedViews: [...state.visitedViews], |
|||
cachedViews: [...state.cachedViews] |
|||
}) |
|||
}) |
|||
}, |
|||
delAllVisitedViews({ commit, state }) { |
|||
return new Promise(resolve => { |
|||
commit('DEL_ALL_VISITED_VIEWS') |
|||
resolve([...state.visitedViews]) |
|||
}) |
|||
}, |
|||
delAllCachedViews({ commit, state }) { |
|||
return new Promise(resolve => { |
|||
commit('DEL_ALL_CACHED_VIEWS') |
|||
resolve([...state.cachedViews]) |
|||
}) |
|||
}, |
|||
|
|||
updateVisitedView({ commit }, view) { |
|||
commit('UPDATE_VISITED_VIEW', view) |
|||
}, |
|||
} |
|||
} |
|||
|
|||
export default tagsView |
@ -0,0 +1,147 @@ |
|||
import { loginByUsername, logout, getUserInfo } from '@/api/login' |
|||
import { getToken, setToken, removeToken } from '@/utils/auth' |
|||
|
|||
const user = { |
|||
state: { |
|||
user: '', |
|||
status: '', |
|||
code: '', |
|||
token: getToken(), |
|||
name: '', |
|||
avatar: '', |
|||
introduction: '', |
|||
roles: [], |
|||
setting: { |
|||
articlePlatform: [] |
|||
} |
|||
}, |
|||
|
|||
mutations: { |
|||
SET_CODE: (state, code) => { |
|||
state.code = code |
|||
}, |
|||
SET_TOKEN: (state, token) => { |
|||
state.token = token |
|||
}, |
|||
SET_INTRODUCTION: (state, introduction) => { |
|||
state.introduction = introduction |
|||
}, |
|||
SET_SETTING: (state, setting) => { |
|||
state.setting = setting |
|||
}, |
|||
SET_STATUS: (state, status) => { |
|||
state.status = status |
|||
}, |
|||
SET_NAME: (state, name) => { |
|||
state.name = name |
|||
}, |
|||
SET_AVATAR: (state, avatar) => { |
|||
state.avatar = avatar |
|||
}, |
|||
SET_ROLES: (state, roles) => { |
|||
state.roles = roles |
|||
} |
|||
}, |
|||
|
|||
actions: { |
|||
// 用户名登录
|
|||
LoginByUsername({ commit }, userInfo) { |
|||
const username = userInfo.username.trim() |
|||
return new Promise((resolve, reject) => { |
|||
loginByUsername(username, userInfo.password).then(response => { |
|||
if (!response.data) { reject(response.code); return false } |
|||
const data = response.data |
|||
if (data.access_token) { |
|||
commit('SET_TOKEN', data.access_token) |
|||
setToken(response.data.access_token) |
|||
} |
|||
resolve(response.data.access_token) |
|||
}).catch(error => { |
|||
reject(error) |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
// 获取用户信息
|
|||
GetUserInfo({ commit, state }) { |
|||
return new Promise((resolve, reject) => { |
|||
getUserInfo(state.token).then(response => { |
|||
// 由于mockjs 不支持自定义状态码只能这样hack
|
|||
if (!response.data) { |
|||
reject('Verification failed, please login again.') |
|||
} |
|||
const data = response.data |
|||
|
|||
if (data.roles && data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
|||
commit('SET_ROLES', data.roles) |
|||
} else { |
|||
reject('getInfo: roles must be a non-null array!') |
|||
} |
|||
|
|||
commit('SET_NAME', data.name) |
|||
commit('SET_AVATAR', data.avatar) |
|||
commit('SET_INTRODUCTION', data.introduction) |
|||
resolve(response) |
|||
}).catch(error => { |
|||
reject(error) |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
// 第三方验证登录
|
|||
// LoginByThirdparty({ commit, state }, code) {
|
|||
// return new Promise((resolve, reject) => {
|
|||
// commit('SET_CODE', code)
|
|||
// loginByThirdparty(state.status, state.email, state.code).then(response => {
|
|||
// commit('SET_TOKEN', response.data.token)
|
|||
// setToken(response.data.token)
|
|||
// resolve()
|
|||
// }).catch(error => {
|
|||
// reject(error)
|
|||
// })
|
|||
// })
|
|||
// },
|
|||
|
|||
// 登出
|
|||
LogOut({ commit, state }) { |
|||
return new Promise((resolve, reject) => { |
|||
logout(state.token).then(() => { |
|||
commit('SET_TOKEN', '') |
|||
commit('SET_ROLES', []) |
|||
removeToken() |
|||
resolve() |
|||
}).catch(error => { |
|||
reject(error) |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
// 前端 登出
|
|||
FedLogOut({ commit }) { |
|||
return new Promise(resolve => { |
|||
commit('SET_TOKEN', '') |
|||
removeToken() |
|||
resolve() |
|||
}) |
|||
}, |
|||
|
|||
// 动态修改权限
|
|||
ChangeRoles({ commit, dispatch }, role) { |
|||
return new Promise(resolve => { |
|||
commit('SET_TOKEN', role) |
|||
setToken(role) |
|||
getUserInfo(role).then(response => { |
|||
const data = response.data |
|||
commit('SET_ROLES', data.roles) |
|||
commit('SET_NAME', data.name) |
|||
commit('SET_AVATAR', data.avatar) |
|||
commit('SET_INTRODUCTION', data.introduction) |
|||
dispatch('GenerateRoutes', data) // 动态修改权限后 重绘侧边菜单
|
|||
resolve() |
|||
}) |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
|
|||
export default user |
@ -0,0 +1,99 @@ |
|||
@import './variables.scss'; |
|||
|
|||
@mixin colorBtn($color) { |
|||
background: $color; |
|||
|
|||
&:hover { |
|||
color: $color; |
|||
|
|||
&:before, |
|||
&:after { |
|||
background: $color; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.blue-btn { |
|||
@include colorBtn($blue) |
|||
} |
|||
|
|||
.light-blue-btn { |
|||
@include colorBtn($light-blue) |
|||
} |
|||
|
|||
.red-btn { |
|||
@include colorBtn($red) |
|||
} |
|||
|
|||
.pink-btn { |
|||
@include colorBtn($pink) |
|||
} |
|||
|
|||
.green-btn { |
|||
@include colorBtn($green) |
|||
} |
|||
|
|||
.tiffany-btn { |
|||
@include colorBtn($tiffany) |
|||
} |
|||
|
|||
.yellow-btn { |
|||
@include colorBtn($yellow) |
|||
} |
|||
|
|||
.pan-btn { |
|||
font-size: 14px; |
|||
color: #fff; |
|||
padding: 14px 36px; |
|||
border-radius: 8px; |
|||
border: none; |
|||
outline: none; |
|||
transition: 600ms ease all; |
|||
position: relative; |
|||
display: inline-block; |
|||
|
|||
&:hover { |
|||
background: #fff; |
|||
|
|||
&:before, |
|||
&:after { |
|||
width: 100%; |
|||
transition: 600ms ease all; |
|||
} |
|||
} |
|||
|
|||
&:before, |
|||
&:after { |
|||
content: ''; |
|||
position: absolute; |
|||
top: 0; |
|||
right: 0; |
|||
height: 2px; |
|||
width: 0; |
|||
transition: 400ms ease all; |
|||
} |
|||
|
|||
&::after { |
|||
right: inherit; |
|||
top: inherit; |
|||
left: 0; |
|||
bottom: 0; |
|||
} |
|||
} |
|||
|
|||
.custom-button { |
|||
display: inline-block; |
|||
line-height: 1; |
|||
white-space: nowrap; |
|||
cursor: pointer; |
|||
background: #fff; |
|||
color: #fff; |
|||
-webkit-appearance: none; |
|||
text-align: center; |
|||
box-sizing: border-box; |
|||
outline: 0; |
|||
margin: 0; |
|||
padding: 10px 15px; |
|||
font-size: 14px; |
|||
border-radius: 4px; |
|||
} |
@ -0,0 +1,100 @@ |
|||
//覆盖一些element-ui样式 |
|||
|
|||
.el-breadcrumb__inner, |
|||
.el-breadcrumb__inner a { |
|||
font-weight: 400 !important; |
|||
} |
|||
|
|||
.el-upload { |
|||
input[type="file"] { |
|||
display: none !important; |
|||
} |
|||
} |
|||
|
|||
.el-upload__input { |
|||
display: none; |
|||
} |
|||
|
|||
.cell { |
|||
.el-tag { |
|||
margin-right: 0px; |
|||
} |
|||
} |
|||
|
|||
.small-padding { |
|||
.cell { |
|||
padding-left: 5px; |
|||
padding-right: 5px; |
|||
} |
|||
} |
|||
|
|||
.fixed-width { |
|||
.el-button--mini { |
|||
padding: 7px 10px; |
|||
width: 60px; |
|||
} |
|||
} |
|||
|
|||
.status-col { |
|||
.cell { |
|||
padding: 0 10px; |
|||
text-align: center; |
|||
|
|||
.el-tag { |
|||
margin-right: 0px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
//暂时性解决dialog 问题 https://github.com/ElemeFE/element/issues/2461 |
|||
.el-dialog { |
|||
transform: none; |
|||
left: 0; |
|||
position: relative; |
|||
margin: 0 auto; |
|||
} |
|||
|
|||
//文章页textarea修改样式 |
|||
.article-textarea { |
|||
textarea { |
|||
padding-right: 40px; |
|||
resize: none; |
|||
border: none; |
|||
border-radius: 0px; |
|||
border-bottom: 1px solid #bfcbd9; |
|||
} |
|||
} |
|||
|
|||
//element ui upload |
|||
.upload-container { |
|||
.el-upload { |
|||
width: 100%; |
|||
|
|||
.el-upload-dragger { |
|||
width: 100%; |
|||
height: 200px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
//dropdown |
|||
.el-dropdown-menu { |
|||
a { |
|||
display: block |
|||
} |
|||
} |
|||
|
|||
//选择daterang |
|||
.el-date-editor .el-range-separator { |
|||
padding: 0; |
|||
} |
|||
|
|||
//修改 el-dialog__body |
|||
.el-dialog__body { |
|||
padding-top: 5px; |
|||
} |
|||
|
|||
//table |
|||
.el-table .success-row { |
|||
background: #f0f9eb; |
|||
} |
@ -0,0 +1,234 @@ |
|||
@import './variables.scss'; |
|||
@import './mixin.scss'; |
|||
@import './transition.scss'; |
|||
@import './element-ui.scss'; |
|||
@import './sidebar.scss'; |
|||
@import './btn.scss'; |
|||
|
|||
body { |
|||
height: 100%; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
-webkit-font-smoothing: antialiased; |
|||
text-rendering: optimizeLegibility; |
|||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; |
|||
} |
|||
|
|||
label { |
|||
font-weight: 700; |
|||
} |
|||
|
|||
html { |
|||
height: 100%; |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
#app { |
|||
height: 100%; |
|||
} |
|||
|
|||
*, |
|||
*:before, |
|||
*:after { |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
.no-padding { |
|||
padding: 0px !important; |
|||
} |
|||
|
|||
.padding-content { |
|||
padding: 4px 0; |
|||
} |
|||
|
|||
a:focus, |
|||
a:active { |
|||
outline: none; |
|||
} |
|||
|
|||
a, |
|||
a:focus, |
|||
a:hover { |
|||
cursor: pointer; |
|||
color: inherit; |
|||
text-decoration: none; |
|||
} |
|||
|
|||
div:focus { |
|||
outline: none; |
|||
} |
|||
|
|||
.fr { |
|||
float: right; |
|||
} |
|||
|
|||
.fl { |
|||
float: left; |
|||
} |
|||
|
|||
.pr-5 { |
|||
padding-right: 5px; |
|||
} |
|||
|
|||
.pl-5 { |
|||
padding-left: 5px; |
|||
} |
|||
|
|||
.block { |
|||
display: block; |
|||
} |
|||
|
|||
.pointer { |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.inlineBlock { |
|||
display: block; |
|||
} |
|||
|
|||
.clearfix { |
|||
&:after { |
|||
visibility: hidden; |
|||
display: block; |
|||
font-size: 0; |
|||
content: " "; |
|||
clear: both; |
|||
height: 0; |
|||
} |
|||
} |
|||
|
|||
code { |
|||
background: #eef1f6; |
|||
padding: 15px 16px; |
|||
margin-bottom: 20px; |
|||
display: block; |
|||
line-height: 36px; |
|||
font-size: 15px; |
|||
font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif; |
|||
|
|||
a { |
|||
color: #337ab7; |
|||
cursor: pointer; |
|||
|
|||
&:hover { |
|||
color: rgb(32, 160, 255); |
|||
} |
|||
} |
|||
} |
|||
|
|||
.warn-content { |
|||
background: rgba(66, 185, 131, .1); |
|||
border-radius: 2px; |
|||
padding: 16px; |
|||
padding: 1rem; |
|||
line-height: 1.6rem; |
|||
word-spacing: .05rem; |
|||
|
|||
a { |
|||
color: #42b983; |
|||
font-weight: 600; |
|||
} |
|||
} |
|||
|
|||
//main-container全局样式 |
|||
.app-container { |
|||
padding: 20px; |
|||
} |
|||
|
|||
.components-container { |
|||
margin: 30px 50px; |
|||
position: relative; |
|||
} |
|||
|
|||
.pagination-container { |
|||
margin-top: 30px; |
|||
} |
|||
|
|||
.text-center { |
|||
text-align: center |
|||
} |
|||
|
|||
.sub-navbar { |
|||
height: 50px; |
|||
line-height: 50px; |
|||
position: relative; |
|||
width: 100%; |
|||
text-align: right; |
|||
padding-right: 20px; |
|||
transition: 600ms ease position; |
|||
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%); |
|||
|
|||
.subtitle { |
|||
font-size: 20px; |
|||
color: #fff; |
|||
} |
|||
|
|||
&.draft { |
|||
background: #d0d0d0; |
|||
} |
|||
|
|||
&.deleted { |
|||
background: #d0d0d0; |
|||
} |
|||
} |
|||
|
|||
.link-type, |
|||
.link-type:focus { |
|||
color: #337ab7; |
|||
cursor: pointer; |
|||
|
|||
&:hover { |
|||
color: rgb(32, 160, 255); |
|||
} |
|||
} |
|||
|
|||
.filter-container { |
|||
padding-bottom: 10px; |
|||
|
|||
.filter-item { |
|||
display: inline-block; |
|||
vertical-align: middle; |
|||
margin-bottom: 10px; |
|||
} |
|||
} |
|||
|
|||
//refine vue-multiselect plugin |
|||
.multiselect { |
|||
line-height: 16px; |
|||
} |
|||
|
|||
.multiselect--active { |
|||
z-index: 1000 !important; |
|||
} |
|||
|
|||
//reset dl dd |
|||
dl, dd { |
|||
padding: 0; |
|||
margin: 0; |
|||
} |
|||
|
|||
//reset h1,h2 |
|||
h1, h2, h3 { |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
|
|||
|
|||
/*滚动条设置,仅对chrome生效*/ |
|||
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ |
|||
::-webkit-scrollbar { |
|||
width: 8px; |
|||
height: 8px; |
|||
background-color: #F5F5F5; |
|||
} |
|||
|
|||
/*定义滚动条轨道 内阴影+圆角*/ |
|||
::-webkit-scrollbar-track { |
|||
border-radius: 6px; |
|||
background-color: #F5F5F5; |
|||
} |
|||
|
|||
/*定义滑块 内阴影+圆角*/ |
|||
::-webkit-scrollbar-thumb { |
|||
border-radius: 6px; |
|||
background-color: #ccc; |
|||
} |
@ -0,0 +1,66 @@ |
|||
@mixin clearfix { |
|||
&:after { |
|||
content: ""; |
|||
display: table; |
|||
clear: both; |
|||
} |
|||
} |
|||
|
|||
@mixin scrollBar { |
|||
&::-webkit-scrollbar-track-piece { |
|||
background: #d3dce6; |
|||
} |
|||
|
|||
&::-webkit-scrollbar { |
|||
width: 6px; |
|||
} |
|||
|
|||
&::-webkit-scrollbar-thumb { |
|||
background: #99a9bf; |
|||
border-radius: 20px; |
|||
} |
|||
} |
|||
|
|||
@mixin relative { |
|||
position: relative; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
@mixin pct($pct) { |
|||
width: #{$pct}; |
|||
position: relative; |
|||
margin: 0 auto; |
|||
} |
|||
|
|||
@mixin triangle($width, $height, $color, $direction) { |
|||
$width: $width/2; |
|||
$color-border-style: $height solid $color; |
|||
$transparent-border-style: $width solid transparent; |
|||
height: 0; |
|||
width: 0; |
|||
|
|||
@if $direction==up { |
|||
border-bottom: $color-border-style; |
|||
border-left: $transparent-border-style; |
|||
border-right: $transparent-border-style; |
|||
} |
|||
|
|||
@else if $direction==right { |
|||
border-left: $color-border-style; |
|||
border-top: $transparent-border-style; |
|||
border-bottom: $transparent-border-style; |
|||
} |
|||
|
|||
@else if $direction==down { |
|||
border-top: $color-border-style; |
|||
border-left: $transparent-border-style; |
|||
border-right: $transparent-border-style; |
|||
} |
|||
|
|||
@else if $direction==left { |
|||
border-right: $color-border-style; |
|||
border-top: $transparent-border-style; |
|||
border-bottom: $transparent-border-style; |
|||
} |
|||
} |
@ -0,0 +1,206 @@ |
|||
#app { |
|||
|
|||
// 主体区域 Main container |
|||
.main-container { |
|||
min-height: 100%; |
|||
transition: margin-left .28s; |
|||
margin-left: $sideBarWidth; |
|||
position: relative; |
|||
} |
|||
|
|||
// 侧边栏 Sidebar container |
|||
.sidebar-container { |
|||
transition: width 0.28s; |
|||
width: $sideBarWidth !important; |
|||
height: 100%; |
|||
position: fixed; |
|||
font-size: 0px; |
|||
top: 0; |
|||
bottom: 0; |
|||
left: 0; |
|||
z-index: 1001; |
|||
overflow: hidden; |
|||
|
|||
//reset element-ui css |
|||
.horizontal-collapse-transition { |
|||
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out; |
|||
} |
|||
|
|||
.scrollbar-wrapper { |
|||
overflow-x: hidden !important; |
|||
|
|||
.el-scrollbar__view { |
|||
height: 100%; |
|||
} |
|||
} |
|||
|
|||
.el-scrollbar__bar.is-vertical { |
|||
right: 0px; |
|||
} |
|||
|
|||
.is-horizontal { |
|||
display: none; |
|||
} |
|||
|
|||
a { |
|||
display: inline-block; |
|||
width: 100%; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.svg-icon { |
|||
margin-right: 16px; |
|||
} |
|||
|
|||
.el-menu { |
|||
border: none; |
|||
height: 100%; |
|||
width: 100% !important; |
|||
} |
|||
|
|||
// menu hover |
|||
.submenu-title-noDropdown, |
|||
.el-submenu__title { |
|||
&:hover { |
|||
background-color: $menuHover !important; |
|||
} |
|||
} |
|||
|
|||
.is-active>.el-submenu__title { |
|||
color: $subMenuActiveText !important; |
|||
} |
|||
|
|||
& .nest-menu .el-submenu>.el-submenu__title, |
|||
& .el-submenu .el-menu-item { |
|||
min-width: $sideBarWidth !important; |
|||
background-color: $subMenuBg !important; |
|||
|
|||
&:hover { |
|||
background-color: $subMenuHover !important; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.hideSidebar { |
|||
.sidebar-container { |
|||
width: 54px !important; |
|||
} |
|||
|
|||
.main-container { |
|||
margin-left: 54px; |
|||
} |
|||
|
|||
.svg-icon { |
|||
margin-right: 0px; |
|||
} |
|||
|
|||
.submenu-title-noDropdown { |
|||
padding: 0 !important; |
|||
position: relative; |
|||
|
|||
.el-tooltip { |
|||
padding: 0 !important; |
|||
.svg-icon { |
|||
margin-left: 20px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.el-submenu { |
|||
overflow: hidden; |
|||
|
|||
&>.el-submenu__title { |
|||
padding: 0 !important; |
|||
.svg-icon { |
|||
margin-left: 20px; |
|||
} |
|||
|
|||
.el-submenu__icon-arrow { |
|||
display: none; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.el-menu--collapse { |
|||
.el-submenu { |
|||
&>.el-submenu__title { |
|||
&>span { |
|||
height: 0; |
|||
width: 0; |
|||
overflow: hidden; |
|||
visibility: hidden; |
|||
display: inline-block; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.el-menu--collapse .el-menu .el-submenu { |
|||
min-width: $sideBarWidth !important; |
|||
} |
|||
|
|||
// 适配移动端, Mobile responsive |
|||
.mobile { |
|||
.main-container { |
|||
margin-left: 0px; |
|||
} |
|||
|
|||
.sidebar-container { |
|||
transition: transform .28s; |
|||
width: $sideBarWidth !important; |
|||
} |
|||
|
|||
&.hideSidebar { |
|||
.sidebar-container { |
|||
pointer-events: none; |
|||
transition-duration: 0.3s; |
|||
transform: translate3d(-$sideBarWidth, 0, 0); |
|||
} |
|||
} |
|||
} |
|||
|
|||
.withoutAnimation { |
|||
|
|||
.main-container, |
|||
.sidebar-container { |
|||
transition: none; |
|||
} |
|||
} |
|||
} |
|||
|
|||
// when menu collapsed |
|||
.el-menu--vertical { |
|||
&>.el-menu { |
|||
.svg-icon { |
|||
margin-right: 16px; |
|||
} |
|||
} |
|||
|
|||
.nest-menu .el-submenu>.el-submenu__title, |
|||
.el-menu-item { |
|||
&:hover { |
|||
// you can use $subMenuHover |
|||
background-color: $menuHover !important; |
|||
} |
|||
} |
|||
|
|||
// the scroll bar appears when the subMenu is too long |
|||
>.el-menu--popup { |
|||
max-height: 100vh; |
|||
overflow-y: auto; |
|||
|
|||
&::-webkit-scrollbar-track-piece { |
|||
background: #d3dce6; |
|||
} |
|||
|
|||
&::-webkit-scrollbar { |
|||
width: 6px; |
|||
} |
|||
|
|||
&::-webkit-scrollbar-thumb { |
|||
background: #99a9bf; |
|||
border-radius: 20px; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
//globl transition css |
|||
|
|||
/*fade*/ |
|||
.fade-enter-active, |
|||
.fade-leave-active { |
|||
transition: opacity 0.28s; |
|||
} |
|||
|
|||
.fade-enter, |
|||
.fade-leave-active { |
|||
opacity: 0; |
|||
} |
|||
|
|||
/*fade-transform*/ |
|||
.fade-transform-leave-active, |
|||
.fade-transform-enter-active { |
|||
transition: all .5s; |
|||
} |
|||
|
|||
.fade-transform-enter { |
|||
opacity: 0; |
|||
transform: translateX(-30px); |
|||
} |
|||
|
|||
.fade-transform-leave-to { |
|||
opacity: 0; |
|||
transform: translateX(30px); |
|||
} |
|||
|
|||
/*breadcrumb transition*/ |
|||
.breadcrumb-enter-active, |
|||
.breadcrumb-leave-active { |
|||
transition: all .5s; |
|||
} |
|||
|
|||
.breadcrumb-enter, |
|||
.breadcrumb-leave-active { |
|||
opacity: 0; |
|||
transform: translateX(20px); |
|||
} |
|||
|
|||
.breadcrumb-move { |
|||
transition: all .5s; |
|||
} |
|||
|
|||
.breadcrumb-leave-active { |
|||
position: absolute; |
|||
} |
@ -0,0 +1,36 @@ |
|||
// base color |
|||
$blue:#324157; |
|||
$light-blue:#3A71A8; |
|||
$red:#C03639; |
|||
$pink: #E65D6E; |
|||
$green: #30B08F; |
|||
$tiffany: #4AB7BD; |
|||
$yellow:#FEC171; |
|||
$panGreen: #30B08F; |
|||
|
|||
//sidebar |
|||
$menuText:#bfcbd9; |
|||
$menuActiveText:#409EFF; |
|||
$subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951 |
|||
|
|||
$menuBg:#304156; |
|||
$menuHover:#263445; |
|||
|
|||
$subMenuBg:#1f2d3d; |
|||
$subMenuHover:#001528; |
|||
|
|||
$pageBg:#f4f4f5; |
|||
$sideBarWidth: 210px; |
|||
|
|||
// the :export directive is the magic sauce for webpack |
|||
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass |
|||
:export { |
|||
menuText: $menuText; |
|||
menuActiveText: $menuActiveText; |
|||
subMenuActiveText: $subMenuActiveText; |
|||
menuBg: $menuBg; |
|||
menuHover: $menuHover; |
|||
subMenuBg: $subMenuBg; |
|||
subMenuHover: $subMenuHover; |
|||
sideBarWidth: $sideBarWidth; |
|||
} |
@ -0,0 +1,9 @@ |
|||
export function downLoad(url) { |
|||
var oA = document.createElement("a"); |
|||
oA.download = '';// 设置下载的文件名,默认是'下载'
|
|||
oA.href = url; |
|||
oA.target = "_Blank" |
|||
document.body.appendChild(oA); |
|||
oA.click(); |
|||
oA.remove(); // 下载之后把创建的元素删除
|
|||
} |
@ -0,0 +1,31 @@ |
|||
// elementui 版本的 myalert
|
|||
const myalert = {} |
|||
myalert.success = function (msg) { |
|||
window._vm.$message({ |
|||
message: msg, |
|||
type: 'success' |
|||
}); |
|||
} |
|||
myalert.fail = function (msg) { |
|||
window._vm.$message.error(msg); |
|||
} |
|||
myalert.confirm = function (msg) { |
|||
return window._vm.$confirm(msg, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning', |
|||
}) |
|||
} |
|||
//带有输入的提示
|
|||
//options seemore http://element.eleme.io/#/zh-CN/component/message-box
|
|||
myalert.prompt = function (msg, options) { |
|||
return window._vm.$prompt(msg, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
inputPattern: options.inputPattern, |
|||
inputValidator: options.inputValidator, |
|||
inputValue: options.inputValue, |
|||
inputErrorMessage: options.inputErrorMessage || '格式不正确' |
|||
}) |
|||
} |
|||
export default myalert |
@ -0,0 +1,15 @@ |
|||
import Cookies from 'js-cookie' |
|||
|
|||
const TokenKey = 'access_token' |
|||
|
|||
export function getToken() { |
|||
return Cookies.get(TokenKey) |
|||
} |
|||
|
|||
export function setToken(token) { |
|||
return Cookies.set(TokenKey, token) |
|||
} |
|||
|
|||
export function removeToken() { |
|||
return Cookies.remove(TokenKey) |
|||
} |
@ -0,0 +1,36 @@ |
|||
import Vue from 'vue' |
|||
import Clipboard from 'clipboard' |
|||
|
|||
function clipboardSuccess() { |
|||
Vue.prototype.$message({ |
|||
message: 'Copy successfully', |
|||
type: 'success', |
|||
duration: 1500 |
|||
}) |
|||
} |
|||
|
|||
function clipboardError() { |
|||
Vue.prototype.$message({ |
|||
message: 'Copy failed', |
|||
type: 'error' |
|||
}) |
|||
} |
|||
|
|||
export default function handleClipboard(text, event) { |
|||
const clipboard = new Clipboard(event.target, { |
|||
text: () => text |
|||
}) |
|||
clipboard.on('success', () => { |
|||
clipboardSuccess() |
|||
clipboard.off('error') |
|||
clipboard.off('success') |
|||
clipboard.destroy() |
|||
}) |
|||
clipboard.on('error', () => { |
|||
clipboardError() |
|||
clipboard.off('error') |
|||
clipboard.off('success') |
|||
clipboard.destroy() |
|||
}) |
|||
clipboard.onClick(event) |
|||
} |
@ -0,0 +1,9 @@ |
|||
import Cookie from 'js-cookie' |
|||
|
|||
export function getCookie(key) { |
|||
return Cookie.get(key) |
|||
} |
|||
|
|||
export function setCookie(key, value) { |
|||
Cookie.set(key, value, { expires: 7 }); |
|||
} |
@ -0,0 +1,49 @@ |
|||
import moment from 'moment' |
|||
export function getTimeForQiniu(date) { |
|||
if (!date) { |
|||
date = new Date() |
|||
} |
|||
if (typeof date != 'object') { |
|||
date = new Date(date) |
|||
} |
|||
var a = moment(date).format('YYYY_MM_DD/HH_mm_ss_') |
|||
return a |
|||
} |
|||
export function dateFormate(date) { |
|||
if (!date) { |
|||
date = new Date() |
|||
} |
|||
if (typeof date != 'object') { |
|||
date = new Date(date) |
|||
} |
|||
var a = moment(date).format('YYYY-MM-DD') |
|||
return a |
|||
} |
|||
export function getToday() { |
|||
var date = new Date() |
|||
var a = moment(date).format('YYYY-MM-DD') |
|||
var b = moment(new Date()).add(-1, 'days').format('YYYY-MM-DD'); |
|||
return { |
|||
start: a, |
|||
end: a, |
|||
laststart: b, |
|||
lastend: b |
|||
} |
|||
} |
|||
export function getLastWeek() { |
|||
return { |
|||
start: moment().startOf('isoWeek').format('YYYY-MM-DD'), |
|||
end: moment().endOf('isoWeek').format('YYYY-MM-DD'), |
|||
laststart: moment().add(-1, 'weeks').startOf('isoWeek').format('YYYY-MM-DD'), |
|||
lastend: moment().add(-1, 'weeks').startOf('isoWeek').format('YYYY-MM-DD'), |
|||
} |
|||
} |
|||
|
|||
export function getLastMonth() { |
|||
return { |
|||
start: moment().startOf('months').format('YYYY-MM-DD'), |
|||
end: moment().endOf('months').format('YYYY-MM-DD'), |
|||
laststart: moment().add(-1, 'months').startOf('isoWeek').format('YYYY-MM-DD'), |
|||
lastend: moment().add(-1, 'months').startOf('isoWeek').format('YYYY-MM-DD'), |
|||
} |
|||
} |