feat:整体项目的架构
0 parents
Showing
128 changed files
with
2776 additions
and
0 deletions
.browserslistrc
0 → 100644
.env
0 → 100644
.env.prod
0 → 100644
.eslintrc.js
0 → 100644
1 | module.exports = { | ||
2 | root: true, | ||
3 | env: { | ||
4 | node: true | ||
5 | }, | ||
6 | 'extends': [ | ||
7 | 'plugin:vue/essential', | ||
8 | // 'eslint:recommended' | ||
9 | ], | ||
10 | rules: { | ||
11 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' | ||
13 | }, | ||
14 | parserOptions: { | ||
15 | parser: 'babel-eslint' | ||
16 | } | ||
17 | } |
.gitignore
0 → 100644
README.md
0 → 100644
1 | # Vue cli 3 项目脚手架 (已配置好环境变量,axios,引入了字体图标 Font Awesome, 若有其他开发需要请自行添加) | ||
2 | |||
3 | ## Project setup 安装依赖 | ||
4 | ``` | ||
5 | npm install | ||
6 | ``` | ||
7 | ### Compiles and hot-reloads for development 启动项目 | ||
8 | ``` | ||
9 | npm run serve //默认开发环境.env文件 | ||
10 | npm run serve-prod //生产环境.env.prod文件 | ||
11 | ``` | ||
12 | ### Compiles and minifies for production 打包环境 | ||
13 | ``` | ||
14 | npm run build //默认开发环境.env文件 | ||
15 | npm run build-prod //生产环境.env.prod文件 | ||
16 | ``` | ||
17 | ### Customize configuration | ||
18 | See [Configuration Reference](https://cli.vuejs.org/config/). | ||
19 | |||
20 | ## 字体图标Font Awesome | ||
21 | 点击在浏览器中选择使用[Font Awesome字体图标](http://fontawesome.dashgame.com/) | ||
22 | |||
23 | ## 插件应用 | ||
24 | |||
25 | ### 打包生成 ZIP 文件 | ||
26 | ``` | ||
27 | 1、安装插件 npm install filemanager-webpack-plugin --save-dev | ||
28 | 2、vue.config.js配置文件 | ||
29 | |||
30 | const FileManagerPlugin = require('filemanager-webpack-plugin'); | ||
31 | |||
32 | module.exports = { | ||
33 | configureWebpack: { // webpack 配置,避免缓存js | ||
34 | plugins: [ | ||
35 | new FileManagerPlugin({ //初始化 filemanager-webpack-plugin 插件实例 | ||
36 | onEnd: { | ||
37 | mkdir: ['./dist'], | ||
38 | archive: [ //然后我们选择dist文件夹将之打包成dist.zip并放在根目录 | ||
39 | {source: './dist', destination: './dist/dist.zip'}, | ||
40 | ] | ||
41 | } | ||
42 | }) | ||
43 | ] | ||
44 | }, | ||
45 | } | ||
46 | ``` | ||
47 | ## 工程目录 | ||
48 | ``` | ||
49 | ./dist //打包生成文件存放地址 | ||
50 | ./public //公共文件 | ||
51 | ./src //主目录 | ||
52 | |-api | ||
53 | |-index //接口地址 | ||
54 | |-assets //静态资源 | ||
55 | |-components //封装组件 | ||
56 | |-views //view页面组件总地址 | ||
57 | |-App.vue //页面入口vue组件 | ||
58 | |-main.js //项目入口js文件 | ||
59 | |-router.js //前端路由 | ||
60 | |-store.js //vuex应用级数据(state) | ||
61 | ./zip //打zip包存放地址 | ||
62 | .env //默认开发环境配置 | ||
63 | .env.prod //生产环境配置 | ||
64 | .eslintrc.js //eslint是用来管理和检测js代码风格的工具,可以和编辑器搭配使用 | ||
65 | .babel.config.js //预设可以作为babel插件的数组,甚至是一个可共享的选项配置。 | ||
66 | .vue.config.js //vue-cli3配置文件 | ||
67 | ... | ||
68 | ``` | ||
69 | ### components 封装组件说明 | ||
70 | 权籍系统整体框架的搭建 | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
mock/index.js
0 → 100644
mock/menu.js
0 → 100644
1 | // import Mock from 'mockjs' | ||
2 | // // mock一组数据 | ||
3 | // const MenuList = function() { | ||
4 | // let menuList = [ | ||
5 | // { | ||
6 | // 'name':'文章管理', | ||
7 | // 'path':'/home', | ||
8 | // 'code':'1', | ||
9 | // 'icon':'fa fa-address-card-o', | ||
10 | // 'children': [ | ||
11 | // { | ||
12 | // 'name':'草稿箱', | ||
13 | // 'path':'/article_drafts', | ||
14 | // 'code':'1-1', | ||
15 | // 'icon':'fa fa-address-card-o', | ||
16 | // }, | ||
17 | // { | ||
18 | // 'name':'发布箱', | ||
19 | // 'path':'/article_release', | ||
20 | // 'code':'1-2', | ||
21 | // 'icon':'fa fa-address-card-o', | ||
22 | // }, | ||
23 | // { | ||
24 | // 'name':'回收箱', | ||
25 | // 'path':'/article_recycle', | ||
26 | // 'code':'1-3', | ||
27 | // 'icon':'fa fa-address-card-o', | ||
28 | // } | ||
29 | // ] | ||
30 | // }, | ||
31 | // { | ||
32 | // 'name':'公告管理', | ||
33 | // 'path':'/notice', | ||
34 | // 'code':'2', | ||
35 | // 'icon':'fa fa-address-card-o', | ||
36 | // 'children': [ | ||
37 | // { | ||
38 | // 'name':'草稿箱', | ||
39 | // 'path':'/notice_drafts', | ||
40 | // 'code':'2-1', | ||
41 | // 'icon':'fa fa-address-card-o', | ||
42 | // }, | ||
43 | // { | ||
44 | // 'name':'发布箱', | ||
45 | // 'path':'/notice_release', | ||
46 | // 'code':'2-2', | ||
47 | // 'icon':'fa fa-address-card-o', | ||
48 | // }, | ||
49 | // { | ||
50 | // 'name':'回收箱', | ||
51 | // 'path':'/notice_recycle', | ||
52 | // 'code':'2-3', | ||
53 | // 'icon':'fa fa-address-card-o', | ||
54 | // } | ||
55 | // ] | ||
56 | // } | ||
57 | // ]; | ||
58 | |||
59 | // return { | ||
60 | // menuList: menuList | ||
61 | // } | ||
62 | // } | ||
63 | |||
64 | // // Mock.mock( url, post/get , 返回的数据); | ||
65 | // Mock.mock('/menuList/index', 'post', MenuList); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
mock/mock.js
0 → 100644
1 | import Mock from 'mockjs' | ||
2 | // 获取 mock.Random 对象 | ||
3 | const Random = Mock.Random; | ||
4 | // mock一组数据 | ||
5 | const produceNewsData = function() { | ||
6 | let articles = []; | ||
7 | for (let i = 0; i < 30; i++) { | ||
8 | let newArticleObject = { | ||
9 | title: Random.csentence(5, 30), // Random.csentence( min, max ) | ||
10 | thumbnail_pic_s: Random.dataImage('300x250', 'mock的图片'), // Random.dataImage( size, text ) 生成一段随机的 Base64 图片编码 | ||
11 | author_name: Random.cname(), // Random.cname() 随机生成一个常见的中文姓名 | ||
12 | date: Random.date() + ' ' + Random.time() // Random.date()指示生成的日期字符串的格式,默认为yyyy-MM-dd;Random.time() 返回一个随机的时间字符串 | ||
13 | } | ||
14 | articles.push(newArticleObject) | ||
15 | } | ||
16 | |||
17 | return { | ||
18 | articles: articles | ||
19 | } | ||
20 | } | ||
21 | |||
22 | // Mock.mock( url, post/get , 返回的数据); | ||
23 | Mock.mock('/news/index', 'post', produceNewsData); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
mock/user.js
0 → 100644
1 | import Mock from 'mockjs' | ||
2 | // mock一组数据 | ||
3 | const token = function() { | ||
4 | let token = [ | ||
5 | { | ||
6 | 'introduction': 'I am a super administrator', | ||
7 | 'avatar': 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif', | ||
8 | 'name': 'Super Admin', | ||
9 | 'token': 'admin-token' | ||
10 | } | ||
11 | ]; | ||
12 | |||
13 | return { | ||
14 | token | ||
15 | } | ||
16 | } | ||
17 | |||
18 | Mock.mock('/user/login', 'post', token); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
package-lock.json
0 → 100644
This diff could not be displayed because it is too large.
package.json
0 → 100644
1 | { | ||
2 | "name": "zebra-laila", | ||
3 | "version": "0.1.0", | ||
4 | "private": true, | ||
5 | "scripts": { | ||
6 | "serve": "vue-cli-service serve", | ||
7 | "serve-uat": "vue-cli-service serve --mode uat", | ||
8 | "serve-prod": "vue-cli-service serve --mode prod", | ||
9 | "build": "vue-cli-service build", | ||
10 | "build-uat": "vue-cli-service build --mode uat", | ||
11 | "build-prod": "vue-cli-service build --mode prod", | ||
12 | "lint": "vue-cli-service lint" | ||
13 | }, | ||
14 | "dependencies": { | ||
15 | "axios": "^0.19.0", | ||
16 | "core-js": "^2.6.5", | ||
17 | "e-icon-picker": "^1.0.7", | ||
18 | "element-ui": "^2.13.2", | ||
19 | "file-saver": "^2.0.2", | ||
20 | "js-cookie": "^2.2.1", | ||
21 | "mockjs": "^1.1.0", | ||
22 | "screenfull": "^5.0.2", | ||
23 | "style-resources-loader": "^1.3.3", | ||
24 | "vue": "^2.6.10", | ||
25 | "vue-cli-plugin-style-resources-loader": "^0.1.4", | ||
26 | "vue-quill-editor": "^3.0.6", | ||
27 | "vue-router": "^3.0.3", | ||
28 | "vuex": "^3.0.1", | ||
29 | "webpack-theme-color-replacer": "^1.3.14", | ||
30 | "xlsx": "^0.16.6" | ||
31 | }, | ||
32 | "devDependencies": { | ||
33 | "@vue/cli-plugin-babel": "^3.11.0", | ||
34 | "@vue/cli-plugin-eslint": "^3.11.0", | ||
35 | "@vue/cli-service": "^3.11.0", | ||
36 | "babel-eslint": "^10.0.1", | ||
37 | "eslint": "^5.16.0", | ||
38 | "eslint-plugin-vue": "^5.0.0", | ||
39 | "less": "^3.0.4", | ||
40 | "less-loader": "^5.0.0", | ||
41 | "script-loader": "^0.7.2", | ||
42 | "vue-template-compiler": "^2.6.10" | ||
43 | } | ||
44 | } |
public/css/common.css
0 → 100644
1 | /* CSS 初始化 */ | ||
2 | html, body, div, span, object, iframe,h1, h2, | ||
3 | h3, h4, h5, h6, p, blockquote, pre,abbr, address, cite, code,del, dfn, | ||
4 | em, img, ins,kbd, q, samp,small, strong, sub, sup, var,b, i,dl, dt, dd, | ||
5 | ol, ul, li,fieldset, form, label, legend,table, caption, tbody, | ||
6 | tfoot,thead,tr, th, td,article, aside, canvas, details, figcaption, | ||
7 | figure, footer, header, hgroup, menu, nav, section, summary,time, mark, | ||
8 | audio, video { | ||
9 | margin:0; | ||
10 | padding:0; | ||
11 | } | ||
12 | body { | ||
13 | line-height:1; | ||
14 | font-family: Verdana, Arial, Helvetica, sans-serif; | ||
15 | } | ||
16 | a{ | ||
17 | margin:0; | ||
18 | padding:0; | ||
19 | border:0; | ||
20 | font-size:100%; | ||
21 | vertical-align:baseline; | ||
22 | background:transparent; | ||
23 | } | ||
24 | a:hover,a:focus{ | ||
25 | text-decoration:none; | ||
26 | outline-style:none;/*FF*/ | ||
27 | } | ||
28 | table { | ||
29 | border-collapse:collapse; | ||
30 | border-spacing:0; | ||
31 | } | ||
32 | input, select { | ||
33 | vertical-align:middle; | ||
34 | } | ||
35 | |||
36 | /*css为clearfix,清除浮动*/ | ||
37 | .clearfix::before, | ||
38 | .clearfix::after{ | ||
39 | content: ""; | ||
40 | height: 0; | ||
41 | line-height: 0; | ||
42 | display: block; | ||
43 | visibility: hidden; | ||
44 | clear: both; | ||
45 | } | ||
46 | .clearfix:after{clear:both;} | ||
47 | .clearfix{ | ||
48 | *zoom:1;/*IE/7/6*/ | ||
49 | } | ||
50 | /* ============================================================ | ||
51 | flex:定义布局为盒模型 | ||
52 | flex-v:盒模型垂直布局 | ||
53 | flex-1:子元素占据剩余的空间 | ||
54 | flex-align-center:子元素垂直居中 | ||
55 | flex-pack-center:子元素水平居中 | ||
56 | flex-pack-justify:子元素两端对齐 | ||
57 | ============================================================ */ | ||
58 | |||
59 | .flex{display: -webkit-box; | ||
60 | display: -moz-box; | ||
61 | display: -webkit-flex; | ||
62 | display: -ms-flexbox; | ||
63 | display: flex; | ||
64 | } | ||
65 | .flex-v{-webkit-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;} | ||
66 | .flex-1{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;} | ||
67 | .flex-align-center{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;} | ||
68 | .flex-pack-center{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;} | ||
69 | .flex-pack-justify{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;} |
public/favicon.ico
0 → 100644
No preview for this file type
public/font-awesome/HELP-US-OUT.txt
0 → 100644
1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, | ||
2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, | ||
3 | comprehensive icon sets or copy and paste your own. | ||
4 | |||
5 | Please. Check it out. | ||
6 | |||
7 | -Dave Gandy |
public/font-awesome/css/font-awesome.css
0 → 100644
This diff is collapsed.
Click to expand it.
public/font-awesome/css/font-awesome.min.css
0 → 100644
This diff is collapsed.
Click to expand it.
public/font-awesome/fonts/FontAwesome.otf
0 → 100644
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
public/font-awesome/less/animated.less
0 → 100644
1 | // Animated Icons | ||
2 | // -------------------------- | ||
3 | |||
4 | .@{fa-css-prefix}-spin { | ||
5 | -webkit-animation: fa-spin 2s infinite linear; | ||
6 | animation: fa-spin 2s infinite linear; | ||
7 | } | ||
8 | |||
9 | .@{fa-css-prefix}-pulse { | ||
10 | -webkit-animation: fa-spin 1s infinite steps(8); | ||
11 | animation: fa-spin 1s infinite steps(8); | ||
12 | } | ||
13 | |||
14 | @-webkit-keyframes fa-spin { | ||
15 | 0% { | ||
16 | -webkit-transform: rotate(0deg); | ||
17 | transform: rotate(0deg); | ||
18 | } | ||
19 | 100% { | ||
20 | -webkit-transform: rotate(359deg); | ||
21 | transform: rotate(359deg); | ||
22 | } | ||
23 | } | ||
24 | |||
25 | @keyframes fa-spin { | ||
26 | 0% { | ||
27 | -webkit-transform: rotate(0deg); | ||
28 | transform: rotate(0deg); | ||
29 | } | ||
30 | 100% { | ||
31 | -webkit-transform: rotate(359deg); | ||
32 | transform: rotate(359deg); | ||
33 | } | ||
34 | } |
1 | // Bordered & Pulled | ||
2 | // ------------------------- | ||
3 | |||
4 | .@{fa-css-prefix}-border { | ||
5 | padding: .2em .25em .15em; | ||
6 | border: solid .08em @fa-border-color; | ||
7 | border-radius: .1em; | ||
8 | } | ||
9 | |||
10 | .@{fa-css-prefix}-pull-left { float: left; } | ||
11 | .@{fa-css-prefix}-pull-right { float: right; } | ||
12 | |||
13 | .@{fa-css-prefix} { | ||
14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } | ||
15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } | ||
16 | } | ||
17 | |||
18 | /* Deprecated as of 4.4.0 */ | ||
19 | .pull-right { float: right; } | ||
20 | .pull-left { float: left; } | ||
21 | |||
22 | .@{fa-css-prefix} { | ||
23 | &.pull-left { margin-right: .3em; } | ||
24 | &.pull-right { margin-left: .3em; } | ||
25 | } |
public/font-awesome/less/core.less
0 → 100644
1 | // Base Class Definition | ||
2 | // ------------------------- | ||
3 | |||
4 | .@{fa-css-prefix} { | ||
5 | display: inline-block; | ||
6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration | ||
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override | ||
8 | text-rendering: auto; // optimizelegibility throws things off #1094 | ||
9 | -webkit-font-smoothing: antialiased; | ||
10 | -moz-osx-font-smoothing: grayscale; | ||
11 | |||
12 | } |
public/font-awesome/less/fixed-width.less
0 → 100644
public/font-awesome/less/font-awesome.less
0 → 100644
1 | /*! | ||
2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome | ||
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) | ||
4 | */ | ||
5 | |||
6 | @import "variables.less"; | ||
7 | @import "mixins.less"; | ||
8 | @import "path.less"; | ||
9 | @import "core.less"; | ||
10 | @import "larger.less"; | ||
11 | @import "fixed-width.less"; | ||
12 | @import "list.less"; | ||
13 | @import "bordered-pulled.less"; | ||
14 | @import "animated.less"; | ||
15 | @import "rotated-flipped.less"; | ||
16 | @import "stacked.less"; | ||
17 | @import "icons.less"; | ||
18 | @import "screen-reader.less"; |
public/font-awesome/less/icons.less
0 → 100644
This diff is collapsed.
Click to expand it.
public/font-awesome/less/larger.less
0 → 100644
1 | // Icon Sizes | ||
2 | // ------------------------- | ||
3 | |||
4 | /* makes the font 33% larger relative to the icon container */ | ||
5 | .@{fa-css-prefix}-lg { | ||
6 | font-size: (4em / 3); | ||
7 | line-height: (3em / 4); | ||
8 | vertical-align: -15%; | ||
9 | } | ||
10 | .@{fa-css-prefix}-2x { font-size: 2em; } | ||
11 | .@{fa-css-prefix}-3x { font-size: 3em; } | ||
12 | .@{fa-css-prefix}-4x { font-size: 4em; } | ||
13 | .@{fa-css-prefix}-5x { font-size: 5em; } |
public/font-awesome/less/list.less
0 → 100644
1 | // List Icons | ||
2 | // ------------------------- | ||
3 | |||
4 | .@{fa-css-prefix}-ul { | ||
5 | padding-left: 0; | ||
6 | margin-left: @fa-li-width; | ||
7 | list-style-type: none; | ||
8 | > li { position: relative; } | ||
9 | } | ||
10 | .@{fa-css-prefix}-li { | ||
11 | position: absolute; | ||
12 | left: -@fa-li-width; | ||
13 | width: @fa-li-width; | ||
14 | top: (2em / 14); | ||
15 | text-align: center; | ||
16 | &.@{fa-css-prefix}-lg { | ||
17 | left: (-@fa-li-width + (4em / 14)); | ||
18 | } | ||
19 | } |
public/font-awesome/less/mixins.less
0 → 100644
1 | // Mixins | ||
2 | // -------------------------- | ||
3 | |||
4 | .fa-icon() { | ||
5 | display: inline-block; | ||
6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration | ||
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override | ||
8 | text-rendering: auto; // optimizelegibility throws things off #1094 | ||
9 | -webkit-font-smoothing: antialiased; | ||
10 | -moz-osx-font-smoothing: grayscale; | ||
11 | |||
12 | } | ||
13 | |||
14 | .fa-icon-rotate(@degrees, @rotation) { | ||
15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; | ||
16 | -webkit-transform: rotate(@degrees); | ||
17 | -ms-transform: rotate(@degrees); | ||
18 | transform: rotate(@degrees); | ||
19 | } | ||
20 | |||
21 | .fa-icon-flip(@horiz, @vert, @rotation) { | ||
22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; | ||
23 | -webkit-transform: scale(@horiz, @vert); | ||
24 | -ms-transform: scale(@horiz, @vert); | ||
25 | transform: scale(@horiz, @vert); | ||
26 | } | ||
27 | |||
28 | |||
29 | // Only display content to screen readers. A la Bootstrap 4. | ||
30 | // | ||
31 | // See: http://a11yproject.com/posts/how-to-hide-content/ | ||
32 | |||
33 | .sr-only() { | ||
34 | position: absolute; | ||
35 | width: 1px; | ||
36 | height: 1px; | ||
37 | padding: 0; | ||
38 | margin: -1px; | ||
39 | overflow: hidden; | ||
40 | clip: rect(0,0,0,0); | ||
41 | border: 0; | ||
42 | } | ||
43 | |||
44 | // Use in conjunction with .sr-only to only display content when it's focused. | ||
45 | // | ||
46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 | ||
47 | // | ||
48 | // Credit: HTML5 Boilerplate | ||
49 | |||
50 | .sr-only-focusable() { | ||
51 | &:active, | ||
52 | &:focus { | ||
53 | position: static; | ||
54 | width: auto; | ||
55 | height: auto; | ||
56 | margin: 0; | ||
57 | overflow: visible; | ||
58 | clip: auto; | ||
59 | } | ||
60 | } |
public/font-awesome/less/path.less
0 → 100644
1 | /* FONT PATH | ||
2 | * -------------------------- */ | ||
3 | |||
4 | @font-face { | ||
5 | font-family: 'FontAwesome'; | ||
6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); | ||
7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), | ||
8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), | ||
9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), | ||
10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), | ||
11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); | ||
12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts | ||
13 | font-weight: normal; | ||
14 | font-style: normal; | ||
15 | } |
1 | // Rotated & Flipped Icons | ||
2 | // ------------------------- | ||
3 | |||
4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } | ||
5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } | ||
6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } | ||
7 | |||
8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } | ||
9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } | ||
10 | |||
11 | // Hook for IE8-9 | ||
12 | // ------------------------- | ||
13 | |||
14 | :root .@{fa-css-prefix}-rotate-90, | ||
15 | :root .@{fa-css-prefix}-rotate-180, | ||
16 | :root .@{fa-css-prefix}-rotate-270, | ||
17 | :root .@{fa-css-prefix}-flip-horizontal, | ||
18 | :root .@{fa-css-prefix}-flip-vertical { | ||
19 | filter: none; | ||
20 | } |
public/font-awesome/less/screen-reader.less
0 → 100644
public/font-awesome/less/stacked.less
0 → 100644
1 | // Stacked Icons | ||
2 | // ------------------------- | ||
3 | |||
4 | .@{fa-css-prefix}-stack { | ||
5 | position: relative; | ||
6 | display: inline-block; | ||
7 | width: 2em; | ||
8 | height: 2em; | ||
9 | line-height: 2em; | ||
10 | vertical-align: middle; | ||
11 | } | ||
12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { | ||
13 | position: absolute; | ||
14 | left: 0; | ||
15 | width: 100%; | ||
16 | text-align: center; | ||
17 | } | ||
18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } | ||
19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } | ||
20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } |
public/font-awesome/less/variables.less
0 → 100644
This diff is collapsed.
Click to expand it.
public/font-awesome/scss/_animated.scss
0 → 100644
1 | // Spinning Icons | ||
2 | // -------------------------- | ||
3 | |||
4 | .#{$fa-css-prefix}-spin { | ||
5 | -webkit-animation: fa-spin 2s infinite linear; | ||
6 | animation: fa-spin 2s infinite linear; | ||
7 | } | ||
8 | |||
9 | .#{$fa-css-prefix}-pulse { | ||
10 | -webkit-animation: fa-spin 1s infinite steps(8); | ||
11 | animation: fa-spin 1s infinite steps(8); | ||
12 | } | ||
13 | |||
14 | @-webkit-keyframes fa-spin { | ||
15 | 0% { | ||
16 | -webkit-transform: rotate(0deg); | ||
17 | transform: rotate(0deg); | ||
18 | } | ||
19 | 100% { | ||
20 | -webkit-transform: rotate(359deg); | ||
21 | transform: rotate(359deg); | ||
22 | } | ||
23 | } | ||
24 | |||
25 | @keyframes fa-spin { | ||
26 | 0% { | ||
27 | -webkit-transform: rotate(0deg); | ||
28 | transform: rotate(0deg); | ||
29 | } | ||
30 | 100% { | ||
31 | -webkit-transform: rotate(359deg); | ||
32 | transform: rotate(359deg); | ||
33 | } | ||
34 | } |
1 | // Bordered & Pulled | ||
2 | // ------------------------- | ||
3 | |||
4 | .#{$fa-css-prefix}-border { | ||
5 | padding: .2em .25em .15em; | ||
6 | border: solid .08em $fa-border-color; | ||
7 | border-radius: .1em; | ||
8 | } | ||
9 | |||
10 | .#{$fa-css-prefix}-pull-left { float: left; } | ||
11 | .#{$fa-css-prefix}-pull-right { float: right; } | ||
12 | |||
13 | .#{$fa-css-prefix} { | ||
14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } | ||
15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } | ||
16 | } | ||
17 | |||
18 | /* Deprecated as of 4.4.0 */ | ||
19 | .pull-right { float: right; } | ||
20 | .pull-left { float: left; } | ||
21 | |||
22 | .#{$fa-css-prefix} { | ||
23 | &.pull-left { margin-right: .3em; } | ||
24 | &.pull-right { margin-left: .3em; } | ||
25 | } |
public/font-awesome/scss/_core.scss
0 → 100644
1 | // Base Class Definition | ||
2 | // ------------------------- | ||
3 | |||
4 | .#{$fa-css-prefix} { | ||
5 | display: inline-block; | ||
6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration | ||
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override | ||
8 | text-rendering: auto; // optimizelegibility throws things off #1094 | ||
9 | -webkit-font-smoothing: antialiased; | ||
10 | -moz-osx-font-smoothing: grayscale; | ||
11 | |||
12 | } |
public/font-awesome/scss/_fixed-width.scss
0 → 100644
public/font-awesome/scss/_icons.scss
0 → 100644
This diff is collapsed.
Click to expand it.
public/font-awesome/scss/_larger.scss
0 → 100644
1 | // Icon Sizes | ||
2 | // ------------------------- | ||
3 | |||
4 | /* makes the font 33% larger relative to the icon container */ | ||
5 | .#{$fa-css-prefix}-lg { | ||
6 | font-size: (4em / 3); | ||
7 | line-height: (3em / 4); | ||
8 | vertical-align: -15%; | ||
9 | } | ||
10 | .#{$fa-css-prefix}-2x { font-size: 2em; } | ||
11 | .#{$fa-css-prefix}-3x { font-size: 3em; } | ||
12 | .#{$fa-css-prefix}-4x { font-size: 4em; } | ||
13 | .#{$fa-css-prefix}-5x { font-size: 5em; } |
public/font-awesome/scss/_list.scss
0 → 100644
1 | // List Icons | ||
2 | // ------------------------- | ||
3 | |||
4 | .#{$fa-css-prefix}-ul { | ||
5 | padding-left: 0; | ||
6 | margin-left: $fa-li-width; | ||
7 | list-style-type: none; | ||
8 | > li { position: relative; } | ||
9 | } | ||
10 | .#{$fa-css-prefix}-li { | ||
11 | position: absolute; | ||
12 | left: -$fa-li-width; | ||
13 | width: $fa-li-width; | ||
14 | top: (2em / 14); | ||
15 | text-align: center; | ||
16 | &.#{$fa-css-prefix}-lg { | ||
17 | left: -$fa-li-width + (4em / 14); | ||
18 | } | ||
19 | } |
public/font-awesome/scss/_mixins.scss
0 → 100644
1 | // Mixins | ||
2 | // -------------------------- | ||
3 | |||
4 | @mixin fa-icon() { | ||
5 | display: inline-block; | ||
6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration | ||
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override | ||
8 | text-rendering: auto; // optimizelegibility throws things off #1094 | ||
9 | -webkit-font-smoothing: antialiased; | ||
10 | -moz-osx-font-smoothing: grayscale; | ||
11 | |||
12 | } | ||
13 | |||
14 | @mixin fa-icon-rotate($degrees, $rotation) { | ||
15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; | ||
16 | -webkit-transform: rotate($degrees); | ||
17 | -ms-transform: rotate($degrees); | ||
18 | transform: rotate($degrees); | ||
19 | } | ||
20 | |||
21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { | ||
22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; | ||
23 | -webkit-transform: scale($horiz, $vert); | ||
24 | -ms-transform: scale($horiz, $vert); | ||
25 | transform: scale($horiz, $vert); | ||
26 | } | ||
27 | |||
28 | |||
29 | // Only display content to screen readers. A la Bootstrap 4. | ||
30 | // | ||
31 | // See: http://a11yproject.com/posts/how-to-hide-content/ | ||
32 | |||
33 | @mixin sr-only { | ||
34 | position: absolute; | ||
35 | width: 1px; | ||
36 | height: 1px; | ||
37 | padding: 0; | ||
38 | margin: -1px; | ||
39 | overflow: hidden; | ||
40 | clip: rect(0,0,0,0); | ||
41 | border: 0; | ||
42 | } | ||
43 | |||
44 | // Use in conjunction with .sr-only to only display content when it's focused. | ||
45 | // | ||
46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 | ||
47 | // | ||
48 | // Credit: HTML5 Boilerplate | ||
49 | |||
50 | @mixin sr-only-focusable { | ||
51 | &:active, | ||
52 | &:focus { | ||
53 | position: static; | ||
54 | width: auto; | ||
55 | height: auto; | ||
56 | margin: 0; | ||
57 | overflow: visible; | ||
58 | clip: auto; | ||
59 | } | ||
60 | } |
public/font-awesome/scss/_path.scss
0 → 100644
1 | /* FONT PATH | ||
2 | * -------------------------- */ | ||
3 | |||
4 | @font-face { | ||
5 | font-family: 'FontAwesome'; | ||
6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); | ||
7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), | ||
8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), | ||
9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), | ||
10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), | ||
11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); | ||
12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts | ||
13 | font-weight: normal; | ||
14 | font-style: normal; | ||
15 | } |
1 | // Rotated & Flipped Icons | ||
2 | // ------------------------- | ||
3 | |||
4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } | ||
5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } | ||
6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } | ||
7 | |||
8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } | ||
9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } | ||
10 | |||
11 | // Hook for IE8-9 | ||
12 | // ------------------------- | ||
13 | |||
14 | :root .#{$fa-css-prefix}-rotate-90, | ||
15 | :root .#{$fa-css-prefix}-rotate-180, | ||
16 | :root .#{$fa-css-prefix}-rotate-270, | ||
17 | :root .#{$fa-css-prefix}-flip-horizontal, | ||
18 | :root .#{$fa-css-prefix}-flip-vertical { | ||
19 | filter: none; | ||
20 | } |
public/font-awesome/scss/_screen-reader.scss
0 → 100644
public/font-awesome/scss/_stacked.scss
0 → 100644
1 | // Stacked Icons | ||
2 | // ------------------------- | ||
3 | |||
4 | .#{$fa-css-prefix}-stack { | ||
5 | position: relative; | ||
6 | display: inline-block; | ||
7 | width: 2em; | ||
8 | height: 2em; | ||
9 | line-height: 2em; | ||
10 | vertical-align: middle; | ||
11 | } | ||
12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { | ||
13 | position: absolute; | ||
14 | left: 0; | ||
15 | width: 100%; | ||
16 | text-align: center; | ||
17 | } | ||
18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } | ||
19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } | ||
20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } |
public/font-awesome/scss/_variables.scss
0 → 100644
This diff is collapsed.
Click to expand it.
public/font-awesome/scss/font-awesome.scss
0 → 100644
1 | /*! | ||
2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome | ||
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) | ||
4 | */ | ||
5 | |||
6 | @import "variables"; | ||
7 | @import "mixins"; | ||
8 | @import "path"; | ||
9 | @import "core"; | ||
10 | @import "larger"; | ||
11 | @import "fixed-width"; | ||
12 | @import "list"; | ||
13 | @import "bordered-pulled"; | ||
14 | @import "animated"; | ||
15 | @import "rotated-flipped"; | ||
16 | @import "stacked"; | ||
17 | @import "icons"; | ||
18 | @import "screen-reader"; |
public/index.html
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html lang="en"> | ||
3 | <head> | ||
4 | <meta charset="utf-8"> | ||
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
6 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
7 | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||
8 | <link rel="stylesheet" href="./font-awesome/css/font-awesome.min.css"> | ||
9 | <link rel="stylesheet" href="./css/common.css"> | ||
10 | <title>权籍系统</title> | ||
11 | </head> | ||
12 | <body> | ||
13 | <noscript> | ||
14 | <strong>We're sorry but zebra-laila doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> | ||
15 | </noscript> | ||
16 | <div id="app"></div> | ||
17 | </body> | ||
18 | </html> |
public/json/vue-area.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/api/appointment.js
0 → 100644
1 | import request from '@/plugin/axios' | ||
2 | /** | ||
3 | * 预约配置列表生成接口 | ||
4 | */ | ||
5 | export function appointmentList(data) { | ||
6 | return request({ | ||
7 | url: '/reserve/appointmentRules/search', | ||
8 | method: 'get', | ||
9 | params: { | ||
10 | data | ||
11 | } | ||
12 | }) | ||
13 | } | ||
14 | |||
15 | /** | ||
16 | * 根据预约规则id单个/批量启用/禁用预约规则 | ||
17 | */ | ||
18 | export function enableAppointmentRule(data) { | ||
19 | return request({ | ||
20 | url: '/reserve/appointmentRules/enableAppointmentRule?yyidList='+data.yyidList+'&enable='+data.enable, | ||
21 | method: 'post' | ||
22 | }) | ||
23 | } | ||
24 | /** | ||
25 | * 单个/批量删除预约规则 | ||
26 | */ | ||
27 | export function deleteRuleByIds(data) { | ||
28 | return request({ | ||
29 | url: '/reserve/appointmentRules/deleteByIds?yyidList='+data.yyidList, | ||
30 | method: 'delete' | ||
31 | }) | ||
32 | } | ||
33 | /** | ||
34 | * 获取预约批次号-预约配置设置 | ||
35 | */ | ||
36 | export function getBatch() { | ||
37 | return request({ | ||
38 | url: '/reserve/appointmentRules/getBatch', | ||
39 | method: 'get' | ||
40 | }) | ||
41 | } | ||
42 | /** | ||
43 | * 组织机构接口 : Organization Service | ||
44 | */ | ||
45 | export function queryAllOrganization() { | ||
46 | return request({ | ||
47 | url: '/reserve/organization/queryAllOrganization', | ||
48 | method: 'get' | ||
49 | }) | ||
50 | } | ||
51 | /** | ||
52 | * 获取所有业务 | ||
53 | */ | ||
54 | export function getAllBusinessList() { | ||
55 | return request({ | ||
56 | url: '/reserve/appointmentPeriodRules/getAllBusinessList', | ||
57 | method: 'get' | ||
58 | }) | ||
59 | } | ||
60 | /** | ||
61 | * 根据机构IDS、业务IDS查询预约业务-预约业务配置 | ||
62 | */ | ||
63 | export function getAppointmentBusinessList(data) { | ||
64 | return request({ | ||
65 | url: '/reserve/appointmentPeriodRules/getAppointmentBusinessList', | ||
66 | method: 'get', | ||
67 | params: { | ||
68 | jgid: data.jgids, | ||
69 | ywids: data.ywids | ||
70 | } | ||
71 | }) | ||
72 | } | ||
73 | /** | ||
74 | * 根据机构ID查询机构预约和未预约业务 | ||
75 | */ | ||
76 | export function getBusinessByJgid(data) { | ||
77 | return request({ | ||
78 | url: '/reserve/appointmentPeriodRules/getBusinessByJgid', | ||
79 | method: 'get', | ||
80 | params: { | ||
81 | jgid: data | ||
82 | } | ||
83 | }) | ||
84 | } | ||
85 | /** | ||
86 | * 对机构授权可预约业务-预约业务设置保存 | ||
87 | */ | ||
88 | export function grantAppointment(data) { | ||
89 | return request({ | ||
90 | url: '/reserve/appointmentPeriodRules/grantAppointment?appointmentYwids='+data.appointmentYwids+'&jgid='+data.jgid, | ||
91 | method: 'post' | ||
92 | }) | ||
93 | } | ||
94 | /** | ||
95 | * 单个/批量删除机构下的所有预约业务-预约业务设置保存 | ||
96 | */ | ||
97 | export function deleteByjgids(data) { | ||
98 | return request({ | ||
99 | url: '/reserve/appointmentPeriodRules/deleteByjgids?jgids='+data, | ||
100 | method: 'delete' | ||
101 | }) | ||
102 | } | ||
103 | /** | ||
104 | * 预约记录管理 | ||
105 | */ | ||
106 | export function SearchList(data) { | ||
107 | return request({ | ||
108 | url: '/reserve/appointment/search', | ||
109 | method: 'post', | ||
110 | data: data, | ||
111 | }) | ||
112 | } | ||
113 | // 单个/批量取消赴约 | ||
114 | export function CancelAppointment(data) { | ||
115 | return request({ | ||
116 | url: '/reserve/appointment/deleteByIds?idList='+data, | ||
117 | method: 'delete', | ||
118 | }) | ||
119 | } | ||
120 | |||
121 | //赴约 | ||
122 | export function Appointment(data) { | ||
123 | return request({ | ||
124 | url: '/reserve/appointment/keepAppointment', | ||
125 | method: 'put', | ||
126 | data: data, | ||
127 | }) | ||
128 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/api/bussnessRegister.js
0 → 100644
1 | import request from '@/plugin/axios' | ||
2 | /** | ||
3 | * 查询业务登记类型 | ||
4 | */ | ||
5 | export function SearchList(data) { | ||
6 | return request({ | ||
7 | url: '/reserve/business/search', | ||
8 | method: 'post', | ||
9 | data:data, | ||
10 | }) | ||
11 | } | ||
12 | // 插入业务登记类型 | ||
13 | export function Insert(data) { | ||
14 | return request({ | ||
15 | url: '/reserve/business/insert', | ||
16 | method: 'post', | ||
17 | data:data, | ||
18 | }) | ||
19 | } | ||
20 | |||
21 | // 更新业务登记类型 | ||
22 | export function update(data) { | ||
23 | return request({ | ||
24 | url: '/reserve/business/update', | ||
25 | method: 'put', | ||
26 | data:data, | ||
27 | }) | ||
28 | } | ||
29 | |||
30 | // 获取业务登记类型全集 | ||
31 | export function getDetailById(id) { | ||
32 | return request({ | ||
33 | url: '/reserve/business/getDetailById', | ||
34 | method: 'get', | ||
35 | params:{ | ||
36 | id:id | ||
37 | } | ||
38 | }) | ||
39 | } | ||
40 | |||
41 | // 删除 | ||
42 | export function deleteByIds(data) { | ||
43 | return request({ | ||
44 | url: '/reserve/business/deleteByIds?idList='+data, | ||
45 | method: 'delete', | ||
46 | }) | ||
47 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/api/config.js
0 → 100644
1 | export const httpStatus = (() => { | ||
2 | const status = { | ||
3 | OK: { code: 200, text: 'OK', description: '' }, | ||
4 | CREATED: { code: 201, text: 'CREATED', description: '' }, | ||
5 | DELETED: { code: 204, text: 'DELETED', description: '' }, | ||
6 | NOT_MODIFIED: { code: 304, text: 'NOT MODIFIED', description: '' }, | ||
7 | BAD_REQUEST: { code: 400, text: 'BAD REQUEST', description: '不正确的请求信息' }, | ||
8 | METHOD_NOT_ALLOWED: { code: 405, text: 'METHOD NOT ALLOWED', description: '请求方法不支持' }, | ||
9 | UNSUPPORTED_MEDIA_TYPE: { code: 415, text: 'UNSUPPORTED MEDIA TYPE', description: '媒体类型不支持' }, | ||
10 | INTERNAL_SERVER_ERROR: { code: 500, text: 'INTERNAL SERVER_ERROR', description: '服务器内部错误' }, | ||
11 | PAGE_NOT_FOUND: { code: 404, text: 'PAGE NOT FOUND', description: '网络资源无法访问' }, | ||
12 | NOT_AUTHORIZED: { code: 401, text: 'NOT AUTHORIZED', description: '未经授权的访问' }, | ||
13 | FORBIDDEN: { code: 403, text: 'FORBIDDEN', description: '禁止访问' }, | ||
14 | UNPROCESSABLE_ENTITY: { code: 422, text: 'UNPROCESSABLE ENTITY', description: '' }, | ||
15 | SESSION_TIME_OUT: { code: 419, text: 'SESSION_TIME_OUT', description: '会话超时' }, | ||
16 | LOGIN_FAILURE:{ code: 11001, text: 'LOGIN_FAILURE', description: '登录失效' }, | ||
17 | } | ||
18 | status.CODES = { | ||
19 | /** | ||
20 | * 成功 | ||
21 | */ | ||
22 | SUCCESS: { | ||
23 | 200: status.OK, | ||
24 | 201: status.CREATED, | ||
25 | 204: status.DELETED, | ||
26 | 304: status.NOT_MODIFIED | ||
27 | }, | ||
28 | /** | ||
29 | * 程序错误或恶意攻击 | ||
30 | */ | ||
31 | PROGRAM_ERROR: { | ||
32 | 400: status.BAD_REQUEST, | ||
33 | 405: status.METHOD_NOT_ALLOWED, | ||
34 | 415: status.UNSUPPORTED_MEDIA_TYPE, | ||
35 | 500: status.INTERNAL_SERVER_ERROR | ||
36 | }, | ||
37 | /** | ||
38 | * 网络访问错误 | ||
39 | */ | ||
40 | NETWORK_ERROR: { | ||
41 | 404: status.PAGE_NOT_FOUND | ||
42 | }, | ||
43 | /** | ||
44 | * 权限错误 | ||
45 | * TODO 419未确定 | ||
46 | */ | ||
47 | AUTH_ERROR: { | ||
48 | 401: status.NOT_AUTHORIZED, | ||
49 | 403: status.FORBIDDEN, | ||
50 | 419: status.SESSION_TIME_OUT | ||
51 | }, | ||
52 | /** | ||
53 | * 正常交互错误 | ||
54 | */ | ||
55 | COMMUNICATION_ERROR: { | ||
56 | 422: status.UNPROCESSABLE_ENTITY | ||
57 | }, | ||
58 | /** | ||
59 | * 登录失效 | ||
60 | */ | ||
61 | LOGIN_FAILURE: { | ||
62 | 11001: status.LOGIN_FAILURE | ||
63 | } | ||
64 | } | ||
65 | return status | ||
66 | })() | ||
67 | |||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/api/drafts.js
0 → 100644
1 | import request from '@/plugin/axios' | ||
2 | /** | ||
3 | * 草稿箱List | ||
4 | */ | ||
5 | export function DraftsList(data) { | ||
6 | return request({ | ||
7 | url: '/hlwj/articleDO/draftsBox', | ||
8 | method: 'get', | ||
9 | params:{ | ||
10 | currentPage:data.pagenum, | ||
11 | pageSize:data.pagesize | ||
12 | } | ||
13 | }) | ||
14 | } | ||
15 | // 单个/批量刪除草稿箱的文章 | ||
16 | export function DraftsDeleteByIds(data) { | ||
17 | return request({ | ||
18 | url: '/hlwj/articleDO/deleteArticleByIds', | ||
19 | method: 'delete', | ||
20 | params:{ | ||
21 | ids:data | ||
22 | } | ||
23 | }) | ||
24 | } | ||
25 | // 草稿箱新增文章 | ||
26 | // export function DraftsInsert(data) { | ||
27 | // return request({ | ||
28 | // url: '/hlwj/articleDO/insert', | ||
29 | // method: 'post', | ||
30 | // data:data | ||
31 | // }) | ||
32 | // } | ||
33 | export function DraftsInsert(data) { | ||
34 | return request({ | ||
35 | url: '/hlwj/articleDO/insert', | ||
36 | method: 'post', | ||
37 | headers: { | ||
38 | 'Content-Type': 'multipart/form-data' | ||
39 | }, | ||
40 | data:data | ||
41 | }) | ||
42 | } | ||
43 | // 发布文章 | ||
44 | export function PublishArticle(data) { | ||
45 | return request({ | ||
46 | url: '/hlwj/articleDO/publishArticle', | ||
47 | method: 'post', | ||
48 | data:data | ||
49 | }) | ||
50 | } | ||
51 | // 栏目接口管理 | ||
52 | export function articleClassifyList() { | ||
53 | return request({ | ||
54 | url: '/cms/classify/articleClassifyList', | ||
55 | method: 'get', | ||
56 | }) | ||
57 | } | ||
58 | |||
59 | // 栏目接口管理 | ||
60 | export function ClassifyGetDetailById(classifyId) { | ||
61 | return request({ | ||
62 | url: '/cms/classify/getDetailById', | ||
63 | method: 'get', | ||
64 | params:{ | ||
65 | id:classifyId | ||
66 | } | ||
67 | }) | ||
68 | } | ||
69 | |||
70 | // 根据文章标识码查询详细信息 | ||
71 | export function getarticleDetail(data) { | ||
72 | return request({ | ||
73 | url: '/hlwj/articleDO/getDetailById', | ||
74 | method: 'get', | ||
75 | params:{ | ||
76 | id:data.id | ||
77 | } | ||
78 | }) | ||
79 | } | ||
80 | // 点击更新的时候的接口 | ||
81 | export function updateArticle(data) { | ||
82 | return request({ | ||
83 | url: '/hlwj/articleDO/update', | ||
84 | method: 'post', | ||
85 | data:data | ||
86 | }) | ||
87 | } | ||
88 |
src/api/navigation.js
0 → 100644
src/api/notice.js
0 → 100644
1 | import request from '@/plugin/axios' | ||
2 | /** | ||
3 | * 公告管理 | ||
4 | */ | ||
5 | export function noticeTable(data) { | ||
6 | return request({ | ||
7 | url: '/hlwj/Notice/draftBox', | ||
8 | method: 'post', | ||
9 | data | ||
10 | }) | ||
11 | } | ||
12 | /** | ||
13 | * 物理删除 | ||
14 | */ | ||
15 | export function physicalDeletion(data) { | ||
16 | return request({ | ||
17 | url: '/hlwj/Notice/deleteByIds?idList='+data, | ||
18 | method: 'delete' | ||
19 | }) | ||
20 | } | ||
21 | /** | ||
22 | * 逻辑删除 | ||
23 | */ | ||
24 | export function logicalDeletion(data) { | ||
25 | return request({ | ||
26 | url: '/hlwj/Notice/updateIsDelete', | ||
27 | method: 'post', | ||
28 | data | ||
29 | }) | ||
30 | } | ||
31 | /** | ||
32 | * 新增公告 | ||
33 | */ | ||
34 | export function newAnnouncement(data) { | ||
35 | return request({ | ||
36 | url: '/hlwj/Notice/insert', | ||
37 | method: 'post', | ||
38 | data | ||
39 | }) | ||
40 | } | ||
41 | /** | ||
42 | * 发布公告 | ||
43 | */ | ||
44 | export function announcement(data) { | ||
45 | return request({ | ||
46 | url: '/hlwj/Notice/updateState?idList='+data.idList, | ||
47 | method: 'post' | ||
48 | }) | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * 更新公告-编辑 | ||
53 | */ | ||
54 | export function updateNotice(data) { | ||
55 | return request({ | ||
56 | url: '/hlwj/Notice/update', | ||
57 | method: 'post', | ||
58 | data | ||
59 | }) | ||
60 | } | ||
61 | /** | ||
62 | * 发布箱tableList | ||
63 | */ | ||
64 | export function releaseBox(data) { | ||
65 | return request({ | ||
66 | url: '/hlwj/Notice/issueBox', | ||
67 | method: 'post', | ||
68 | data | ||
69 | }) | ||
70 | } | ||
71 | |||
72 | /** | ||
73 | * 发布箱启用禁用 | ||
74 | */ | ||
75 | export function publishingBoxEnabled(data) { | ||
76 | return request({ | ||
77 | url: '/hlwj/Notice/updateEnable?idList='+data.idList+'&enable='+data.enable, | ||
78 | method: 'post' | ||
79 | }) | ||
80 | } | ||
81 | /** | ||
82 | * 公告逻辑删除(使用场景:发布箱 | ||
83 | */ | ||
84 | export function publishingLogicalDeletion(data) { | ||
85 | return request({ | ||
86 | url: '/hlwj/Notice/updateIsDelete?idList='+data.idList+'&IsDelete='+data.IsDelete, | ||
87 | method: 'post' | ||
88 | }) | ||
89 | } | ||
90 | /** | ||
91 | * 公告管理回收箱tablelist | ||
92 | */ | ||
93 | export function recycleBinTableList(data) { | ||
94 | return request({ | ||
95 | url: '/hlwj/Notice/recycleBox?', | ||
96 | method: 'post', | ||
97 | data | ||
98 | }) | ||
99 | } | ||
100 | /** | ||
101 | * 读取明细-详情展示 | ||
102 | */ | ||
103 | export function getDetailById(data) { | ||
104 | return request({ | ||
105 | url: '/hlwj/Notice/getDetailById', | ||
106 | method: 'get', | ||
107 | params: { | ||
108 | id:data | ||
109 | } | ||
110 | }) | ||
111 | } |
src/api/recycle.js
0 → 100644
1 | import request from '@/plugin/axios' | ||
2 | /** | ||
3 | * 删除箱List | ||
4 | */ | ||
5 | export function RecyclesList(data) { | ||
6 | return request({ | ||
7 | url: '/hlwj/articleDO/recoverBox', | ||
8 | method: 'get', | ||
9 | params:{ | ||
10 | currentPage:data.pagenum, | ||
11 | pageSize:data.pagesize | ||
12 | } | ||
13 | }) | ||
14 | } | ||
15 | // 单个/批量回收箱的文章 | ||
16 | export function DraftsDeleteByIds(data) { | ||
17 | return request({ | ||
18 | url: '/hlwj/articleDO/deleteArticleByIds', | ||
19 | method: 'delete', | ||
20 | params:{ | ||
21 | ids:data | ||
22 | } | ||
23 | }) | ||
24 | } | ||
25 | // 栏目接口管理 | ||
26 | export function articleClassifyList() { | ||
27 | return request({ | ||
28 | url: '/cms/classify/articleClassifyList', | ||
29 | method: 'get', | ||
30 | }) | ||
31 | } | ||
32 | |||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/api/release.js
0 → 100644
1 | import request from '@/plugin/axios' | ||
2 | /** | ||
3 | * 发布箱List | ||
4 | */ | ||
5 | export function ReleasesList(data) { | ||
6 | return request({ | ||
7 | url: '/hlwj/articleDO/publishBox', | ||
8 | method: 'get', | ||
9 | params:{ | ||
10 | currentPage:data.pagenum, | ||
11 | pageSize:data.pagesize | ||
12 | } | ||
13 | }) | ||
14 | } | ||
15 | // 单个/批量刪除发布箱的文章(逻辑删除) | ||
16 | export function DraftsDeleteByIds(data) { | ||
17 | return request({ | ||
18 | url: '/hlwj/articleDO/deletePublishArticleByIds', | ||
19 | method: 'delete', | ||
20 | params:{ | ||
21 | ids:data | ||
22 | } | ||
23 | }) | ||
24 | } | ||
25 | // 栏目接口管理 | ||
26 | export function articleClassifyList() { | ||
27 | return request({ | ||
28 | url: '/cms/classify/articleClassifyList', | ||
29 | method: 'get', | ||
30 | }) | ||
31 | } | ||
32 | /** | ||
33 | * 发布箱启用禁用 | ||
34 | */ | ||
35 | |||
36 | export function publishingBoxEnabled(data) { | ||
37 | return request({ | ||
38 | url: '/hlwj/articleDO/enableArticle?ids='+data.idList+'&enable='+data.enable, | ||
39 | method: 'post' | ||
40 | }) | ||
41 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/api/user.js
0 → 100644
1 | import request from '@/plugin/axios' | ||
2 | /** | ||
3 | * 登录 | ||
4 | */ | ||
5 | export function login(data) { | ||
6 | return request({ | ||
7 | url: '/user/login', | ||
8 | method: 'post', | ||
9 | data | ||
10 | }) | ||
11 | } | ||
12 | /** | ||
13 | * 获取用户信息 | ||
14 | */ | ||
15 | export function getInfo(token) { | ||
16 | return request({ | ||
17 | url: '/vue-admin-template/user/info', | ||
18 | method: 'get', | ||
19 | params: { token } | ||
20 | }) | ||
21 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/assets/404.png
0 → 100644
95.8 KB
src/assets/404_cloud.png
0 → 100644
4.65 KB
src/assets/images/full-screen.svg
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
3 | <!-- Generator: Sketch 56.3 (81716) - https://sketch.com --> | ||
4 | <title>全屏</title> | ||
5 | <desc>Created with Sketch.</desc> | ||
6 | <g id="全屏" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
7 | <path d="M15.9031338,4 L17.9205609,6.0368788 L13.9977448,10.0043275 L14.9863013,11.0043817 L18.9101068,7.0361826 L21,9.14635201 L21,4 L15.9031338,4 Z M14.1513334,14.9178794 L18.0365562,18.847307 L15.9115428,21 L21,21 L21,15.8451433 L19.0246181,17.8465024 L15.1401373,13.9178252 L14.1513334,14.9178794 Z M9.85986271,11.0821748 L10.8486666,10.0821206 L6.96344385,6.15269298 L9.08845717,4 L4,4 L4,9.15485671 L5.97562924,7.15349761 L9.85986271,11.0821748 Z M10.0136986,13.9956183 L6.08989322,17.9640676 L4,15.853648 L4,21 L9.09686619,21 L7.07968643,18.9631212 L11.0025026,14.9956725 L10.0136986,13.9956183 Z" id="形状" fill="#FFFFFF" fill-rule="nonzero"></path> | ||
8 | </g> | ||
9 | </svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/assets/images/infos.svg
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
3 | <!-- Generator: Sketch 56.3 (81716) - https://sketch.com --> | ||
4 | <title>消息</title> | ||
5 | <desc>Created with Sketch.</desc> | ||
6 | <g id="消息" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
7 | <g id="编组-3" transform="translate(2.000000, 5.000000)" fill="#FFFFFF" fill-rule="nonzero"> | ||
8 | <path d="M2,-0.6 L17,-0.6 C18.4359403,-0.6 19.6,0.56405965 19.6,2 L19.6,13 C19.6,14.4359403 18.4359403,15.6 17,15.6 L2,15.6 C0.56405965,15.6 -0.6,14.4359403 -0.6,13 L-0.6,2 C-0.6,0.56405965 0.56405965,-0.6 2,-0.6 Z M2,0.6 C1.22680135,0.6 0.6,1.22680135 0.6,2 L0.6,13 C0.6,13.7731986 1.22680135,14.4 2,14.4 L17,14.4 C17.7731986,14.4 18.4,13.7731986 18.4,13 L18.4,2 C18.4,1.22680135 17.7731986,0.6 17,0.6 L2,0.6 Z" id="矩形"></path> | ||
9 | <path d="M1.69332256,-0.6 L17.3066774,-0.6 C18.5732445,-0.6 19.6,0.426755483 19.6,1.69332256 L19.6,2.24535558 C19.6,3.16488228 19.1143023,4.0160208 18.3226471,4.4837936 L10.8226471,8.91538956 C10.006774,9.3974722 8.99322601,9.3974722 8.17735295,8.91538956 L0.677352948,4.4837936 C-0.114302255,4.0160208 -0.6,3.16488228 -0.6,2.24535558 L-0.6,1.69332256 C-0.6,0.426755483 0.426755483,-0.6 1.69332256,-0.6 Z M1.69332256,0.6 C1.08949718,0.6 0.6,1.08949718 0.6,1.69332256 L0.6,2.24535558 C0.6,2.74048534 0.861529555,3.1987907 1.28780543,3.45066836 L8.78780543,7.88226432 C9.2271217,8.14184728 9.7728783,8.14184728 10.2121946,7.88226432 L17.7121946,3.45066836 C18.1384704,3.1987907 18.4,2.74048534 18.4,2.24535558 L18.4,1.69332256 C18.4,1.08949718 17.9105028,0.6 17.3066774,0.6 L1.69332256,0.6 Z" id="矩形"></path> | ||
10 | </g> | ||
11 | </g> | ||
12 | </svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/assets/images/logo-realestate.png
0 → 100644
45.6 KB
src/assets/images/logo.png
0 → 100644
39.9 KB
src/assets/images/sign-out.svg
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
3 | <!-- Generator: Sketch 56.3 (81716) - https://sketch.com --> | ||
4 | <title>退出</title> | ||
5 | <desc>Created with Sketch.</desc> | ||
6 | <g id="退出" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
7 | <path d="M12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 Z M11.1764291,6.76645054 L11.1764291,10.0240222 C11.1764291,10.4382358 11.5122155,10.7740222 11.9264291,10.7740222 C12.3406426,10.7740222 12.6764291,10.4382358 12.6764291,10.0240222 L12.6764291,6.76645054 C12.6764291,6.35223697 12.3406426,6.01645054 11.9264291,6.01645054 C11.5122155,6.01645054 11.1764291,6.35223697 11.1764291,6.76645054 Z M9.07118504,7.45349652 C7.47303102,8.41759493 6.47642908,10.1241393 6.47642908,12 C6.47642908,14.9515357 8.92051748,17.3367125 11.9264291,17.3367125 C14.9323407,17.3367125 17.3764291,14.9515357 17.3764291,12 C17.3764291,10.1257053 16.381496,8.42037944 14.7854925,7.45580273 C14.4309926,7.2415536 13.9699304,7.35524932 13.7556813,7.70974923 C13.5414322,8.06424914 13.6551279,8.52531134 14.0096278,8.73956047 C15.1630609,9.4366609 15.8764291,10.6593815 15.8764291,12 C15.8764291,14.114807 14.1119941,15.8367125 11.9264291,15.8367125 C9.74086403,15.8367125 7.97642908,14.114807 7.97642908,12 C7.97642908,10.6582594 8.69100361,9.43464836 9.84600287,8.73788638 C10.2006773,8.52392634 10.3147489,8.062957 10.1007889,7.70828253 C9.88682885,7.35360806 9.4258595,7.23953648 9.07118504,7.45349652 Z" id="形状结合" fill="#FFFFFF"></path> | ||
8 | </g> | ||
9 | </svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/assets/images/theme.svg
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
3 | <!-- Generator: Sketch 56.3 (81716) - https://sketch.com --> | ||
4 | <title>主题</title> | ||
5 | <desc>Created with Sketch.</desc> | ||
6 | <g id="主题" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
7 | <g id="主题_调色盘_o" transform="translate(2.000000, 2.000000)" fill="#FFFFFF"> | ||
8 | <path d="M9.99533183,19.746719 C9.050916,19.746719 8.60213554,19.3896851 8.33014005,18.598584 C7.98171443,17.5851852 7.88073144,17.3810328 7.27249654,16.772798 C6.99665835,16.4969598 6.53645858,16.2962243 5.56255088,16.0023347 C5.49395147,15.9816339 5.09305302,15.8620138 4.97430923,15.8259889 C4.73723424,15.7540643 4.5415362,15.6921299 4.35205571,15.6281451 C1.63911267,14.7120233 0.243944737,13.1756954 0.243944737,9.99533183 C0.243944737,4.60383594 4.60383594,0.243944737 9.99533183,0.243944737 C15.3868277,0.243944737 19.746719,4.60383595 19.746719,9.99533183 C19.746719,15.3868277 15.3868277,19.746719 9.99533183,19.746719 Z M9.99533183,18.3830826 C14.6337122,18.3830826 18.3830826,14.6337122 18.3830826,9.99533183 C18.3830826,5.35695152 14.6337122,1.6075811 9.99533183,1.6075811 C5.35695151,1.6075811 1.6075811,5.35695151 1.6075811,9.99533183 C1.6075811,12.5184595 2.58156538,13.5909893 4.78833277,14.3361829 C4.96257327,14.3950214 5.14555555,14.4529315 5.37019571,14.5210835 C5.48521888,14.5559796 5.88479945,14.6752065 5.95650028,14.6968432 C7.14811724,15.0564294 7.74492304,15.3167514 8.23673306,15.8085614 C8.69154245,16.2633708 9.01447869,16.7137559 9.24725808,17.1843547 C9.33810337,17.3680122 9.41196553,17.5472064 9.48208538,17.7450548 C9.51852752,17.8478791 9.61258373,18.1345588 9.61968538,18.155214 C9.71091924,18.4205684 9.66380073,18.3830826 9.99533183,18.3830826 Z" id="路径" fill-rule="nonzero"></path> | ||
9 | <path d="M5.92770928,7.01384468 C5.30011298,7.01384468 4.79134565,6.50507735 4.79134565,5.87748105 C4.79134565,5.24988474 5.30011298,4.74111741 5.92770928,4.74111741 C6.55530559,4.74111741 7.06407292,5.24988474 7.06407292,5.87748105 C7.06407292,6.50507735 6.55530559,7.01384468 5.92770928,7.01384468 Z M9.2084697,5.68181818 C8.58087339,5.68181818 8.07210606,5.17305085 8.07210606,4.54545455 C8.07210606,3.91785824 8.58087339,3.40909091 9.2084697,3.40909091 C9.83606601,3.40909091 10.3448333,3.91785824 10.3448333,4.54545455 C10.3448333,5.17305085 9.83606601,5.68181818 9.2084697,5.68181818 Z M12.6183932,6.42233762 C11.9907969,6.42233762 11.4820296,5.91357029 11.4820296,5.28597398 C11.4820296,4.65837767 11.9907969,4.14961034 12.6183932,4.14961034 C13.2459895,4.14961034 13.7547568,4.65837767 13.7547568,5.28597398 C13.7547568,5.91357029 13.2459895,6.42233762 12.6183932,6.42233762 Z M15.0608652,8.98335458 C14.4332689,8.98335458 13.9245016,8.47458725 13.9245016,7.84699095 C13.9245016,7.21939464 14.4332689,6.71062731 15.0608652,6.71062731 C15.6884615,6.71062731 16.1972289,7.21939464 16.1972289,7.84699095 C16.1972289,8.47458725 15.6884615,8.98335458 15.0608652,8.98335458 Z" id="形状结合"></path> | ||
10 | <path d="M12.0582041,16.2678727 C12.6858004,16.2678727 13.1945677,15.7591054 13.1945677,15.1315091 C13.1945677,14.5039128 12.6858004,13.9951454 12.0582041,13.9951454 C11.4306078,13.9951454 10.9218404,14.5039128 10.9218404,15.1315091 C10.9218404,15.7591054 11.4306078,16.2678727 12.0582041,16.2678727 Z" id="椭圆形"></path> | ||
11 | </g> | ||
12 | </g> | ||
13 | </svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/assets/images/user-logo.svg
0 → 100644
This diff is collapsed.
Click to expand it.
src/assets/images/user.svg
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
3 | <!-- Generator: Sketch 56.3 (81716) - https://sketch.com --> | ||
4 | <title>用户</title> | ||
5 | <desc>Created with Sketch.</desc> | ||
6 | <g id="用户" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
7 | <path d="M12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 Z M12,12.0579409 C13.5062311,12.0579409 14.7272727,10.7997784 14.7272727,9.24775638 C14.7272727,7.69573435 13.5062311,6.43757191 12,6.43757191 C10.4937689,6.43757191 9.27272727,7.69573435 9.27272727,9.24775638 C9.27272727,10.7997784 10.4937689,12.0579409 12,12.0579409 Z M12,17.4375719 C14.7614237,17.4375719 17,16.2163587 17,15.0957515 C17,13.9751443 14.7614237,12.7539311 12,12.7539311 C9.23857632,12.7539311 7,14.0278584 7,15.0957515 C7,16.1636446 9.23857632,17.4375719 12,17.4375719 Z" id="形状结合" fill="#FFFFFF"></path> | ||
8 | </g> | ||
9 | </svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/assets/less/base.less
0 → 100644
1 | // 全局颜色 | ||
2 | @bg: #2255A4; | ||
3 | @tablebg:#f0f9eb; | ||
4 | @borderColor:#eaeefb; | ||
5 | // 公共字体大小 | ||
6 | @font12:12px; | ||
7 | @font14:14px; | ||
8 | @font16:16px; | ||
9 | @font18:18px; | ||
10 | @font20:20px; | ||
11 | @font22:22px; | ||
12 | @font24:24px; | ||
13 | // margin距离 | ||
14 | @10px:10px; | ||
15 | @20px:20px; | ||
16 | @30px:30px; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/assets/less/dialog.less
0 → 100644
1 | .dialog_title{ | ||
2 | @flex(); | ||
3 | justify-content: space-between; | ||
4 | width: 97%; | ||
5 | } | ||
6 | .el-dialog__header{ | ||
7 | margin-bottom: 10px; | ||
8 | background:@tablebg; | ||
9 | } | ||
10 | .dialog_footer{ | ||
11 | @flex-center() | ||
12 | } | ||
13 | .el-form-item{ | ||
14 | @flex(); | ||
15 | width: 100%; | ||
16 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/assets/less/editor.less
0 → 100644
1 | .edit_container, | ||
2 | .ql-snow .ql-picker.ql-size .ql-picker-label::before, | ||
3 | .ql-snow .ql-picker.ql-size .ql-picker-item::before { | ||
4 | content: "14px"; | ||
5 | } | ||
6 | |||
7 | .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before, | ||
8 | .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { | ||
9 | content: "10px"; | ||
10 | } | ||
11 | .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before, | ||
12 | .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { | ||
13 | content: "18px"; | ||
14 | } | ||
15 | .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before, | ||
16 | .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { | ||
17 | content: "32px"; | ||
18 | } | ||
19 | |||
20 | .ql-snow .ql-picker.ql-header .ql-picker-label::before, | ||
21 | .ql-snow .ql-picker.ql-header .ql-picker-item::before { | ||
22 | content: "文本"; | ||
23 | } | ||
24 | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, | ||
25 | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { | ||
26 | content: "标题1"; | ||
27 | } | ||
28 | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, | ||
29 | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { | ||
30 | content: "标题2"; | ||
31 | } | ||
32 | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, | ||
33 | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { | ||
34 | content: "标题3"; | ||
35 | } | ||
36 | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, | ||
37 | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { | ||
38 | content: "标题4"; | ||
39 | } | ||
40 | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, | ||
41 | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { | ||
42 | content: "标题5"; | ||
43 | } | ||
44 | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, | ||
45 | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { | ||
46 | content: "标题6"; | ||
47 | } | ||
48 | |||
49 | .ql-snow .ql-picker.ql-font .ql-picker-label::before, | ||
50 | .ql-snow .ql-picker.ql-font .ql-picker-item::before { | ||
51 | content: "标准字体"; | ||
52 | } | ||
53 | .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before, | ||
54 | .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { | ||
55 | content: "衬线字体"; | ||
56 | } | ||
57 | .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before, | ||
58 | .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { | ||
59 | content: "等宽字体"; | ||
60 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/assets/less/element.less
0 → 100644
1 | // element 样式补丁 | ||
2 | .el-card { | ||
3 | &.is-always-shadow { | ||
4 | box-shadow: 0 0 8px 0 rgba(232,237,250,.6), 0 2px 4px 0 rgba(232,237,250,.5); | ||
5 | } | ||
6 | &.is-hover-shadow { | ||
7 | &:hover { | ||
8 | box-shadow: 0 0 8px 0 rgba(232,237,250,.6), 0 2px 4px 0 rgba(232,237,250,.5); | ||
9 | } | ||
10 | } | ||
11 | } | ||
12 | |||
13 | .el-menu--horizontal { | ||
14 | border-bottom: none !important; | ||
15 | } | ||
16 | // element 弹框 头部偏高 | ||
17 | .el-dialog__body{ | ||
18 | padding-top: 0!important; | ||
19 | } | ||
20 | |||
21 | .el-tabs__item:focus.is-active.is-focus:not(:active) { | ||
22 | box-shadow: none !important; | ||
23 | } | ||
24 | // element table 不能对齐 | ||
25 | .el-table th.gutter{ | ||
26 | display: table-cell!important; | ||
27 | } | ||
28 | // input type=number 上下箭头 | ||
29 | input::-webkit-outer-spin-button, | ||
30 | input::-webkit-inner-spin-button { | ||
31 | -webkit-appearance: none; | ||
32 | } | ||
33 | input[type="number"]{ | ||
34 | -moz-appearance: textfield; | ||
35 | } | ||
36 | // Radio 单选框升级之后的问题 | ||
37 | .el-radio{ | ||
38 | margin-right: 0!important; | ||
39 | } | ||
40 | // Divider 分割线 样式的修改 | ||
41 | .el-divider--horizontal{ | ||
42 | margin: 10px 0!important; | ||
43 | } | ||
44 | |||
45 | // form | ||
46 | .el-form-item__content{ | ||
47 | margin-left: 0!important; | ||
48 | } | ||
49 | .el-icon-full-screen{ | ||
50 | cursor: pointer; | ||
51 | } | ||
52 | // .el-dialog__wrapper{ | ||
53 | // overflow: hidden!important; | ||
54 | // } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/assets/less/main.less
0 → 100644
src/assets/less/public-class.less
0 → 100644
src/assets/less/public.less
0 → 100644
1 | // flex 垂直水平居中 | ||
2 | @flex:{ | ||
3 | display: flex; | ||
4 | } | ||
5 | @flex-center-row :{ | ||
6 | display: flex; | ||
7 | align-items: center; | ||
8 | flex-direction: row; | ||
9 | } | ||
10 | @flex-center-col :{ | ||
11 | display: flex; | ||
12 | align-items: center; | ||
13 | flex-direction: column; | ||
14 | } | ||
15 | @flex-center :{ | ||
16 | display: flex; | ||
17 | justify-content: center; | ||
18 | align-items: center; | ||
19 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/components/IvyElement/frameSolt.vue
0 → 100644
1 | // 结构性 插槽 | ||
2 | <template> | ||
3 | <div> | ||
4 | <slot name="fliterData" msg="我是顶部筛选"> | ||
5 | 顶部默认插槽 | ||
6 | </slot> | ||
7 | |||
8 | <slot name="tablePage" msg="我是table"> | ||
9 | <tableCmp :tableParams='tableParams' | ||
10 | @sizeChange='sizeChange' | ||
11 | @currentChange='currentChange' | ||
12 | @selectionChange='selectionChange' | ||
13 | @cellClick='cellClick' | ||
14 | @sortChange='sortChange'></tableCmp> | ||
15 | </slot> | ||
16 | </div> | ||
17 | </template> | ||
18 | <script> | ||
19 | //引入组件 | ||
20 | import tableCmp from './tableCmp'; | ||
21 | |||
22 | export default { | ||
23 | name: 'loseMsg', | ||
24 | props: { | ||
25 | tableParams: { | ||
26 | require: true, | ||
27 | } | ||
28 | }, | ||
29 | components: { | ||
30 | tableCmp | ||
31 | }, | ||
32 | computed: { | ||
33 | |||
34 | }, | ||
35 | data() { | ||
36 | return { | ||
37 | spinShow: true, | ||
38 | |||
39 | } | ||
40 | }, | ||
41 | watch: { | ||
42 | |||
43 | }, | ||
44 | methods: { | ||
45 | // 切换每页条数 | ||
46 | sizeChange(sizeNum) { | ||
47 | this.$emit('sizeChange', {sizeNum}); | ||
48 | }, | ||
49 | // 切换页码 | ||
50 | currentChange(current) { | ||
51 | this.$emit('currentChange', {current}); | ||
52 | }, | ||
53 | // 当选择项发生变化时会触发该事件 | ||
54 | selectionChange(selection) { | ||
55 | this.$emit('selectionChange', {selection}) | ||
56 | }, | ||
57 | // 当某个单元格被点击时会触发该事件 | ||
58 | cellClick(row, column, cell, event) { | ||
59 | this.$emit('cellClick', {row, column, cell, event}) | ||
60 | }, | ||
61 | // 当表格的排序条件发生变化的时候会触发该事件 | ||
62 | sortChange(e) { | ||
63 | this.$emit('sortChange', e) | ||
64 | } | ||
65 | } | ||
66 | } | ||
67 | </script> | ||
68 | |||
69 | <!-- Add "scoped" attribute to limit CSS to this component only --> | ||
70 | <style scoped lang="less"> | ||
71 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/components/IvyElement/ivy-head.vue
0 → 100644
1 | <template> | ||
2 | <div class="head-box" :class="{'blue-bg':skinPeeler=='def','bb-bg':skinPeeler=='bb','orange-bg':skinPeeler=='orange',}"> | ||
3 | <img class="logo" src="@/assets/images/user-logo.svg" alt=""> | ||
4 | |||
5 | <div class="user-box flex flex-pack-justify flex-align-center"> | ||
6 | <img class="screen-img" @click="screen" src="@/assets/images/full-screen.svg"> | ||
7 | <!-- <img class="theme-img" @click="showPop" src="@/assets/images/theme.svg"> --> | ||
8 | <img class="infos-img" src="@/assets/images/infos.svg"> | ||
9 | <span>admin</span> | ||
10 | <img class="user-img" src="@/assets/images/user.svg" alt=""> | ||
11 | <img class="sign-out" src="@/assets/images/sign-out.svg" alt=""> | ||
12 | <div class="popper-box" v-show="shouPop"> | ||
13 | <p class="pop-tit">切换主题</p> | ||
14 | <div class="col-box flex flex-align-center flex-pack-justify" @click="handleColorChange('def')"> | ||
15 | <div class="color-spr color-def"></div> | ||
16 | <span>默认</span> | ||
17 | </div> | ||
18 | <div class="col-box flex flex-align-center flex-pack-justify" @click="handleColorChange('bb')"> | ||
19 | <div class="color-spr"></div> | ||
20 | <span>青蓝</span> | ||
21 | </div> | ||
22 | <div class="col-box flex flex-align-center flex-pack-justify" @click="handleColorChange('orange')"> | ||
23 | <div class="color-spr color-one"></div> | ||
24 | <span>橙黄</span> | ||
25 | </div> | ||
26 | </div> | ||
27 | </div> | ||
28 | </div> | ||
29 | </template> | ||
30 | <script> | ||
31 | import screenfull from 'screenfull' | ||
32 | export default { | ||
33 | data() { | ||
34 | return { | ||
35 | shouPop:false, | ||
36 | skinPeeler:'def', | ||
37 | }; | ||
38 | }, | ||
39 | watch: {}, | ||
40 | mounted() { | ||
41 | this.initpage() | ||
42 | }, | ||
43 | methods: { | ||
44 | initpage(){ | ||
45 | let color='def'; | ||
46 | if(sessionStorage.getItem('skinPeeler')){ | ||
47 | color=sessionStorage.getItem('skinPeeler'); | ||
48 | } | ||
49 | this.skinPeeler=color; | ||
50 | // this.$store.commit('changeSkinPeeler', color); | ||
51 | }, | ||
52 | showPop(){ | ||
53 | this.shouPop=!this.shouPop; | ||
54 | }, | ||
55 | handleColorChange (color) { | ||
56 | this.skinPeeler=color; | ||
57 | // this.$store.commit('changeSkinPeeler', color); | ||
58 | this.shouPop=!this.shouPop; | ||
59 | sessionStorage.setItem('skinPeeler',color) | ||
60 | }, | ||
61 | screen(){ | ||
62 | // 如果不允许进入全屏,发出不允许提示 | ||
63 | // if (!screenfull.enabled) { | ||
64 | // this.$message('您的浏览器不能全屏'); | ||
65 | // return false | ||
66 | // } | ||
67 | screenfull.toggle(); | ||
68 | } | ||
69 | } | ||
70 | }; | ||
71 | </script> | ||
72 | <style lang="less" scoped> | ||
73 | /* 默认 */ | ||
74 | .blue-bg{ | ||
75 | background: #0C71FB !important; | ||
76 | } | ||
77 | /* 青蓝 */ | ||
78 | .bb-bg{ | ||
79 | background: #1AE1C5 !important; | ||
80 | } | ||
81 | /* 橙黄 */ | ||
82 | .orange-bg{ | ||
83 | background: #FFB701 !important; | ||
84 | } | ||
85 | .head-box { | ||
86 | width: 100%; | ||
87 | height: 52px; | ||
88 | .logo { | ||
89 | height: 22px; | ||
90 | width: auto; | ||
91 | margin-top: 15px; | ||
92 | margin-left: 26px; | ||
93 | float: left; | ||
94 | } | ||
95 | .user-box { | ||
96 | float: right; | ||
97 | margin-right: 18px; | ||
98 | height: 52px; | ||
99 | font-size: 12px; | ||
100 | color: #fff; | ||
101 | position: relative; | ||
102 | } | ||
103 | .popper-box{ | ||
104 | position: absolute; | ||
105 | width: 66px; | ||
106 | top: 52px; | ||
107 | right: 134px; | ||
108 | background:rgba(255,255,255,1); | ||
109 | box-shadow:0px 1px 6px 0px rgba(0,0,0,0.24); | ||
110 | border-radius:2px; | ||
111 | border:1px solid rgba(222,222,222,1); | ||
112 | box-sizing: border-box; | ||
113 | padding: 10px 8px; | ||
114 | z-index: 1; | ||
115 | } | ||
116 | .pop-tit{ | ||
117 | color: #6D7278; | ||
118 | font-size: 12p; | ||
119 | } | ||
120 | .col-box{ | ||
121 | height: 12px; | ||
122 | margin-top: 10px; | ||
123 | font-size: 12px; | ||
124 | line-height: 12px; | ||
125 | color: #6D7278; | ||
126 | cursor: pointer; | ||
127 | } | ||
128 | .color-spr{ | ||
129 | width: 10px; | ||
130 | height: 10px; | ||
131 | background:#1AE1C5; | ||
132 | border-radius:2px; | ||
133 | } | ||
134 | .color-def{ | ||
135 | background: #0C71FB; | ||
136 | } | ||
137 | .color-one{ | ||
138 | background: #FFB701; | ||
139 | } | ||
140 | .screen-img { | ||
141 | width: 17px; | ||
142 | height: 17px; | ||
143 | margin-right: 20px; | ||
144 | } | ||
145 | .theme-img { | ||
146 | width: 20px; | ||
147 | height: 20px; | ||
148 | margin-right: 20px; | ||
149 | } | ||
150 | .infos-img { | ||
151 | width: 20px; | ||
152 | height: 16px; | ||
153 | margin-right: 30px; | ||
154 | } | ||
155 | .user-img { | ||
156 | width: 18px; | ||
157 | height: 18px; | ||
158 | margin-left: 3px; | ||
159 | } | ||
160 | .sign-out { | ||
161 | width: 18px; | ||
162 | height: 18px; | ||
163 | margin-left: 12px; | ||
164 | } | ||
165 | } | ||
166 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/components/IvyElement/navigation.vue
0 → 100644
1 | <template> | ||
2 | <div class="navigation-box"> | ||
3 | <el-tabs | ||
4 | type="card" | ||
5 | v-model="activeIndex" | ||
6 | closable | ||
7 | @tab-click="tabClick" | ||
8 | @tab-remove="tabRemove" | ||
9 | > | ||
10 | <el-tab-pane | ||
11 | :key="index" | ||
12 | v-for="(item, index) in openTab" | ||
13 | :label="item.name" | ||
14 | :name="item.route" | ||
15 | ></el-tab-pane> | ||
16 | </el-tabs> | ||
17 | </div> | ||
18 | </template> | ||
19 | <script> | ||
20 | export default { | ||
21 | data() { | ||
22 | return { | ||
23 | } | ||
24 | }, | ||
25 | mounted() { | ||
26 | // 刷新时以当前路由做为tab加入tabs | ||
27 | // 当前路由不是首页时,添加首页以及另一页到store里,并设置激活状态 | ||
28 | // 当当前路由是首页时,添加首页到store,并设置激活状态 | ||
29 | if (this.$route.path !== "/" && this.$route.path !== "/panel") { | ||
30 | this.$store.dispatch("setTabs/add_tabs", { route: "/panel", name: "首页" }) | ||
31 | this.$store.dispatch("setTabs/add_tabs", { | ||
32 | route: this.$route.path, | ||
33 | name: this.$route.name, | ||
34 | }); | ||
35 | this.$store.dispatch("setTabs/set_active_index", this.$route.path) | ||
36 | } else { | ||
37 | this.$store.dispatch("setTabs/add_tabs", { route: "/panel", name: "首页" }) | ||
38 | this.$store.dispatch("setTabs/set_active_index", "/panel") | ||
39 | } | ||
40 | }, | ||
41 | computed: { | ||
42 | openTab() { | ||
43 | return this.$store.state.setTabs.openTab; | ||
44 | }, | ||
45 | activeIndex: { | ||
46 | get() { | ||
47 | return this.$store.state.setTabs.activeIndex; | ||
48 | }, | ||
49 | set(val) { | ||
50 | this.$store.dispatch("setTabs/set_active_index", val); | ||
51 | }, | ||
52 | }, | ||
53 | }, | ||
54 | watch: { | ||
55 | $route(to, from) { | ||
56 | //判断路由是否已经打开 | ||
57 | //已经打开的 ,将其置为active | ||
58 | //未打开的,将其放入队列里 | ||
59 | let flag = false; | ||
60 | for (let item of this.openTab) { | ||
61 | if (item.name === to.name) { | ||
62 | this.$store.dispatch("setTabs/set_active_index", to.path); | ||
63 | flag = true; | ||
64 | break; | ||
65 | } | ||
66 | } | ||
67 | |||
68 | if (!flag) { | ||
69 | console.log("to.path", to.path); | ||
70 | this.$store.dispatch("setTabs/add_tabs", { route: to.path, name: to.name }); | ||
71 | this.$store.dispatch("setTabs/set_active_index", to.path); | ||
72 | } | ||
73 | }, | ||
74 | }, | ||
75 | methods: { | ||
76 | //tab标签点击时,切换相应的路由 | ||
77 | tabClick(tab) { | ||
78 | this.$router.push({ path: this.activeIndex }); | ||
79 | }, | ||
80 | //移除tab标签 | ||
81 | tabRemove(targetName) { | ||
82 | //首页不删 | ||
83 | if (targetName == "/" || targetName == "/panel") { | ||
84 | return; | ||
85 | } | ||
86 | this.$store.dispatch("setTabs/delete_tabs", targetName); | ||
87 | if (this.activeIndex === targetName) { | ||
88 | // 设置当前激活的路由 | ||
89 | if (this.openTab && this.openTab.length >= 1) { | ||
90 | this.$store.dispatch( | ||
91 | "setTabs/set_active_index", | ||
92 | this.openTab[this.openTab.length - 1].route | ||
93 | ); | ||
94 | this.$router.push({ path: this.activeIndex }); | ||
95 | } else { | ||
96 | this.$router.push({ path: "/" }); | ||
97 | } | ||
98 | } | ||
99 | }, | ||
100 | }, | ||
101 | }; | ||
102 | </script> | ||
103 | <style lang="less"> | ||
104 | .navigation-box { | ||
105 | .el-tabs__nav .el-tabs__item:nth-child(1) span { | ||
106 | display: none; | ||
107 | } | ||
108 | } | ||
109 | </style> |
src/components/citySelect/index.vue
0 → 100644
1 | <template> | ||
2 | <el-select :value="valueTitle" size="small" :clearable="clearable" @clear="clearHandle"> | ||
3 | <!-- <el-input | ||
4 | class="selectInput" | ||
5 | :placeholder="placeholder" | ||
6 | size="small" | ||
7 | v-model="filterText"> | ||
8 | </el-input> --> | ||
9 | |||
10 | <el-option :value="valueTitle" :label="valueTitle" class="options"> | ||
11 | <el-tree id="tree-option" | ||
12 | ref="selectTree" | ||
13 | :accordion="accordion" | ||
14 | :data="options" | ||
15 | :props="props" | ||
16 | :node-key="props.value" | ||
17 | :default-expanded-keys="defaultExpandedKey" | ||
18 | :filter-node-method="filterNode" | ||
19 | @node-click="handleNodeClick"> | ||
20 | </el-tree> | ||
21 | </el-option> | ||
22 | </el-select> | ||
23 | </template> | ||
24 | |||
25 | <script> | ||
26 | import { queryAllOrganization } from "@api/appointment" | ||
27 | export default { | ||
28 | name: "el-tree-select", | ||
29 | props:{ | ||
30 | /* 配置项 */ | ||
31 | props:{ | ||
32 | type: Object, | ||
33 | default:()=>{ | ||
34 | return { | ||
35 | value:'id', // ID字段名 | ||
36 | label: 'name', // 显示名称 | ||
37 | children: 'children' // 子级字段名 | ||
38 | } | ||
39 | } | ||
40 | }, | ||
41 | /* 初始值 */ | ||
42 | value:{ | ||
43 | type: Number, | ||
44 | default: ()=>{ return null } | ||
45 | }, | ||
46 | /* 可清空选项 */ | ||
47 | clearable:{ | ||
48 | type:Boolean, | ||
49 | default:()=>{ return true } | ||
50 | }, | ||
51 | /* 自动收起 */ | ||
52 | accordion:{ | ||
53 | type:Boolean, | ||
54 | default:()=>{ return true } | ||
55 | }, | ||
56 | placeholder:{ | ||
57 | type:String, | ||
58 | default:()=>{return "检索关键字"} | ||
59 | } | ||
60 | }, | ||
61 | data() { | ||
62 | return { | ||
63 | valueId:this.value,// 初始值 | ||
64 | valueTitle:'', | ||
65 | defaultExpandedKey:[], | ||
66 | options: [] | ||
67 | } | ||
68 | }, | ||
69 | created() { | ||
70 | this._initData() | ||
71 | }, | ||
72 | mounted() { | ||
73 | this.initHandle() | ||
74 | }, | ||
75 | methods: { | ||
76 | _initData() { | ||
77 | queryAllOrganization(this.initData) | ||
78 | .then(res => { | ||
79 | this.options = res.data | ||
80 | }) | ||
81 | .catch(error => { | ||
82 | reject(error); | ||
83 | }) | ||
84 | }, | ||
85 | // 初始化值 | ||
86 | initHandle(){ | ||
87 | if(this.valueId){ | ||
88 | this.valueTitle = this.$refs.selectTree.getNode(this.valueId).data[this.props.label] // 初始化显示 | ||
89 | this.$refs.selectTree.setCurrentKey(this.valueId) // 设置默认选中 | ||
90 | this.defaultExpandedKey = [this.valueId] // 设置默认展开 | ||
91 | } | ||
92 | this.initScroll() | ||
93 | }, | ||
94 | // 初始化滚动条 | ||
95 | initScroll(){ | ||
96 | this.$nextTick(()=>{ | ||
97 | let scrollWrap = document.querySelectorAll('.el-scrollbar .el-select-dropdown__wrap')[0] | ||
98 | let scrollBar = document.querySelectorAll('.el-scrollbar .el-scrollbar__bar') | ||
99 | scrollWrap.style.cssText = 'margin: 0px; max-height: none; overflow: hidden;' | ||
100 | scrollBar.forEach(ele => ele.style.width = 0) | ||
101 | }) | ||
102 | }, | ||
103 | // 切换选项 | ||
104 | handleNodeClick(node){ | ||
105 | this.valueTitle = node[this.props.label] | ||
106 | this.valueId = node[this.props.value] | ||
107 | this.$emit('getValue',this.valueId) | ||
108 | this.defaultExpandedKey = [] | ||
109 | }, | ||
110 | // 清除选中 | ||
111 | clearHandle(){ | ||
112 | this.valueTitle = '' | ||
113 | this.valueId = null | ||
114 | this.defaultExpandedKey = [] | ||
115 | this.clearSelected() | ||
116 | this.$emit('getValue',null) | ||
117 | }, | ||
118 | /* 清空选中样式 */ | ||
119 | clearSelected(){ | ||
120 | let allNode = document.querySelectorAll('#tree-option .el-tree-node') | ||
121 | allNode.forEach((element)=>element.classList.remove('is-current')) | ||
122 | }, | ||
123 | filterNode(value, data) { | ||
124 | if (!value) return true; | ||
125 | return data.name.indexOf(value) !== -1; | ||
126 | } | ||
127 | }, | ||
128 | watch: { | ||
129 | value(){ | ||
130 | this.valueId = this.value | ||
131 | this.initHandle() | ||
132 | }, | ||
133 | filterText(val) { | ||
134 | this.$refs.selectTree.filter(val); | ||
135 | } | ||
136 | }, | ||
137 | }; | ||
138 | </script> | ||
139 | <!-- Add "scoped" attribute to limit CSS to this component only --> | ||
140 | <style scoped> | ||
141 | .el-scrollbar .el-scrollbar__view .el-select-dropdown__item{ | ||
142 | height: auto; | ||
143 | max-height: 274px; | ||
144 | padding: 0; | ||
145 | overflow: hidden; | ||
146 | overflow-y: auto; | ||
147 | } | ||
148 | .el-select-dropdown__item.selected{ | ||
149 | font-weight: normal; | ||
150 | } | ||
151 | ul li >>>.el-tree .el-tree-node__content{ | ||
152 | height:auto; | ||
153 | padding: 0 20px; | ||
154 | } | ||
155 | .el-tree-node__label{ | ||
156 | font-weight: normal; | ||
157 | } | ||
158 | .el-tree >>>.is-current .el-tree-node__label{ | ||
159 | color: #409EFF; | ||
160 | font-weight: 700; | ||
161 | } | ||
162 | .el-tree >>>.is-current .el-tree-node__children .el-tree-node__label{ | ||
163 | color:#606266; | ||
164 | font-weight: normal; | ||
165 | } | ||
166 | .selectInput{ | ||
167 | padding: 0 5px; | ||
168 | box-sizing: border-box; | ||
169 | } | ||
170 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/components/dialogBox/index.less
0 → 100644
src/components/dialogBox/index.vue
0 → 100644
1 | <template> | ||
2 | <el-dialog | ||
3 | :visible.sync="dialogVisible" | ||
4 | :width="width" | ||
5 | @close="closeDialog('ruleForm')" | ||
6 | :fullscreen="fullscreen" | ||
7 | :top="topHeight" | ||
8 | :lock-scroll="true" | ||
9 | :close-on-click-modal="false" | ||
10 | custom-class="dialogBox" | ||
11 | > | ||
12 | <div slot="title" class="dialog_title"> | ||
13 | <b>{{title}}</b> | ||
14 | <i class="el-icon-full-screen" @click="handleFullscreen" /> | ||
15 | </div> | ||
16 | <div class="dialogBox-content"> | ||
17 | <slot></slot> | ||
18 | </div> | ||
19 | <div slot="footer" class="dialog_footer"> | ||
20 | <el-button type="primary" size="small" @click="submitForm('ruleForm')">保存</el-button> | ||
21 | <el-button size="small" @click="resetForm('ruleForm')">重置</el-button> | ||
22 | <el-button size="small" @click="closeDialog('ruleForm')">关闭</el-button> | ||
23 | </div> | ||
24 | </el-dialog> | ||
25 | </template> | ||
26 | |||
27 | <script> | ||
28 | export default { | ||
29 | props: { | ||
30 | width: { | ||
31 | type: String, | ||
32 | default: '70%' | ||
33 | }, | ||
34 | title: { | ||
35 | type: String, | ||
36 | default: '' | ||
37 | }, | ||
38 | topHeight: { | ||
39 | type: String, | ||
40 | default: '15vh' | ||
41 | }, | ||
42 | }, | ||
43 | data() { | ||
44 | return { | ||
45 | dialogVisible: false, | ||
46 | fullscreen: false | ||
47 | } | ||
48 | }, | ||
49 | methods: { | ||
50 | isShow() { | ||
51 | this.dialogVisible = true; | ||
52 | }, | ||
53 | isHide() { | ||
54 | this.dialogVisible = false; | ||
55 | }, | ||
56 | handleFullscreen() { | ||
57 | this.fullscreen = !this.fullscreen; | ||
58 | }, | ||
59 | submitForm(ruleForm) { | ||
60 | this.$parent.submitForm(ruleForm); | ||
61 | }, | ||
62 | resetForm(ruleForm) { | ||
63 | this.$parent.resetForm(ruleForm); | ||
64 | }, | ||
65 | closeDialog(ruleForm) { | ||
66 | this.$parent.closeDialog(ruleForm); | ||
67 | }, | ||
68 | } | ||
69 | }; | ||
70 | </script> | ||
71 | <style rel="stylesheet/less" lang="less"> | ||
72 | @import "./index.less"; | ||
73 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/components/lb-table/forced.js
0 → 100644
1 | export default { | ||
2 | selection: { | ||
3 | renderHeader: (h, { store }) => { | ||
4 | console.log(store) | ||
5 | return ( | ||
6 | <el-checkbox | ||
7 | disabled={store.states.data && store.states.data.length === 0} | ||
8 | indeterminate={ | ||
9 | store.states.selection.length > 0 && !store.states.isAllSelected | ||
10 | } | ||
11 | nativeOn-click={store.toggleAllSelection} | ||
12 | value={store.states.isAllSelected} | ||
13 | /> | ||
14 | ) | ||
15 | }, | ||
16 | renderCell: (h, { row, column, store, $index }) => { | ||
17 | return ( | ||
18 | <el-checkbox | ||
19 | nativeOn-click={event => event.stopPropagation()} | ||
20 | value={store.isSelected(row)} | ||
21 | disabled={ | ||
22 | column.selectable | ||
23 | ? !column.selectable.call(null, row, $index) | ||
24 | : false | ||
25 | } | ||
26 | on-input={() => { | ||
27 | store.commit('rowSelectedChanged', row) | ||
28 | }} | ||
29 | /> | ||
30 | ) | ||
31 | }, | ||
32 | sortable: false, | ||
33 | resizable: false | ||
34 | }, | ||
35 | index: { | ||
36 | renderHeader: (h, scope) => { | ||
37 | return <span>{scope.column.label || '#'}</span> | ||
38 | }, | ||
39 | renderCell: (h, { $index, column }) => { | ||
40 | let i = $index + 1 | ||
41 | const index = column.index | ||
42 | |||
43 | if (typeof index === 'number') { | ||
44 | i = $index + index | ||
45 | } else if (typeof index === 'function') { | ||
46 | i = index($index) | ||
47 | } | ||
48 | |||
49 | return <div>{i}</div> | ||
50 | }, | ||
51 | sortable: false | ||
52 | }, | ||
53 | expand: { | ||
54 | renderHeader: (h, scope) => { | ||
55 | return <span>{scope.column.label || ''}</span> | ||
56 | }, | ||
57 | renderCell: (h, { row, store }, proxy) => { | ||
58 | const expanded = store.states.expandRows.indexOf(row) > -1 | ||
59 | return ( | ||
60 | <div | ||
61 | class={ | ||
62 | 'el-table__expand-icon ' + | ||
63 | (expanded ? 'el-table__expand-icon--expanded' : '') | ||
64 | } | ||
65 | on-click={e => proxy.handleExpandClick(row, e)} | ||
66 | > | ||
67 | <i class='el-icon el-icon-arrow-right' /> | ||
68 | </div> | ||
69 | ) | ||
70 | }, | ||
71 | sortable: false, | ||
72 | resizable: false, | ||
73 | className: 'el-table__expand-column' | ||
74 | } | ||
75 | } |
src/components/lb-table/lb-column.vue
0 → 100644
1 | /* | ||
2 | * FileName: lb-column.vue | ||
3 | * Remark: element-column | ||
4 | * Project: lb-element-table | ||
5 | * Author: LiuBing | ||
6 | * File Created: Tuesday, 19th March 2019 9:58:23 am | ||
7 | * Last Modified: Tuesday, 19th March 2019 10:14:42 am | ||
8 | * Modified By: LiuBing | ||
9 | */ | ||
10 | |||
11 | <template> | ||
12 | <el-table-column v-bind="$attrs" | ||
13 | v-on="$listeners" | ||
14 | :prop="column.prop" | ||
15 | :label="column.label" | ||
16 | :type="column.type" | ||
17 | :index="column.index" | ||
18 | :column-key="column.columnKey" | ||
19 | :width="column.width" | ||
20 | :min-width="column.minWidth" | ||
21 | :fixed="column.fixed" | ||
22 | :render-header="column.renderHeader" | ||
23 | :sortable="column.sortable || false" | ||
24 | :sort-method="column.sortMethod" | ||
25 | :sort-by="column.sortBy" | ||
26 | :sort-orders="column.sortOrders" | ||
27 | :resizable="column.resizable || true" | ||
28 | :formatter="column.formatter" | ||
29 | :show-overflow-tooltip="column.showOverflowTooltip || false" | ||
30 | :align="column.align || align || 'center'" | ||
31 | :header-align="column.headerAlign || headerAlign || column.align || align || 'center'" | ||
32 | :class-name="column.className" | ||
33 | :label-class-name="column.labelClassName" | ||
34 | :selectable="column.selectable" | ||
35 | :reserve-selection="column.reserveSelection || false" | ||
36 | :filters="column.filters" | ||
37 | :filter-placement="column.filterPlacement" | ||
38 | :filter-multiple="column.filterMultiple" | ||
39 | :filter-method="column.filterMethod" | ||
40 | :filtered-value="column.filteredValue"> | ||
41 | |||
42 | <template slot="header" | ||
43 | slot-scope="scope"> | ||
44 | <lb-render v-if="column.renderHeader" | ||
45 | :scope="scope" | ||
46 | :render="column.renderHeader"> | ||
47 | </lb-render> | ||
48 | <span v-else>{{ scope.column.label }}</span> | ||
49 | </template> | ||
50 | |||
51 | <template slot-scope="scope"> | ||
52 | <lb-render :scope="scope" | ||
53 | :render="column.render"> | ||
54 | </lb-render> | ||
55 | </template> | ||
56 | |||
57 | <template v-if="column.children"> | ||
58 | <lb-column v-for="(col, index) in column.children" | ||
59 | :key="index" | ||
60 | :column="col"> | ||
61 | </lb-column> | ||
62 | </template> | ||
63 | </el-table-column> | ||
64 | </template> | ||
65 | |||
66 | <script> | ||
67 | import LbRender from './lb-render' | ||
68 | import forced from './forced.js' | ||
69 | export default { | ||
70 | name: 'LbColumn', | ||
71 | props: { | ||
72 | column: Object, | ||
73 | headerAlign: String, | ||
74 | align: String | ||
75 | }, | ||
76 | components: { | ||
77 | LbRender | ||
78 | }, | ||
79 | methods: { | ||
80 | setColumn () { | ||
81 | if (this.column.type) { | ||
82 | this.column.renderHeader = forced[this.column.type].renderHeader | ||
83 | this.column.render = this.column.render || forced[this.column.type].renderCell | ||
84 | } | ||
85 | if (this.column.formatter) { | ||
86 | this.column.render = (h, scope) => { | ||
87 | return <span>{ scope.column.formatter(scope.row, scope.column, scope.row, scope.$index) }</span> | ||
88 | } | ||
89 | } | ||
90 | if (!this.column.render) { | ||
91 | this.column.render = (h, scope) => { | ||
92 | return <span>{ scope.row[scope.column.property] }</span> | ||
93 | } | ||
94 | } | ||
95 | } | ||
96 | }, | ||
97 | watch: { | ||
98 | column: { | ||
99 | handler () { | ||
100 | this.setColumn() | ||
101 | }, | ||
102 | immediate: true | ||
103 | } | ||
104 | } | ||
105 | } | ||
106 | </script> |
src/components/lb-table/lb-render.vue
0 → 100644
1 | /* | ||
2 | * FileName: lb-render.vue | ||
3 | * Remark: 自定义render | ||
4 | * Project: lb-element-table | ||
5 | * Author: LiuBing | ||
6 | * File Created: Tuesday, 19th March 2019 10:15:30 am | ||
7 | * Last Modified: Tuesday, 19th March 2019 10:15:32 am | ||
8 | * Modified By: LiuBing | ||
9 | */ | ||
10 | <script> | ||
11 | export default { | ||
12 | name: 'LbRender', | ||
13 | functional: true, | ||
14 | props: { | ||
15 | scope: Object, | ||
16 | render: Function | ||
17 | }, | ||
18 | render: (h, ctx) => { | ||
19 | return ctx.props.render ? ctx.props.render(h, ctx.props.scope) : '' | ||
20 | } | ||
21 | } | ||
22 | </script> |
src/components/lb-table/lb-table.vue
0 → 100644
1 | /* | ||
2 | * FileName: lb-table.vue | ||
3 | * Remark: element table | ||
4 | * Project: lb-element-table | ||
5 | * Author: LiuBing | ||
6 | * File Created: Tuesday, 19th March 2019 9:55:27 am | ||
7 | * Last Modified: Tuesday, 19th March 2019 9:55:34 am | ||
8 | * Modified By: LiuBing | ||
9 | */ | ||
10 | |||
11 | <template> | ||
12 | <div class="lb-table"> | ||
13 | <el-table ref="elTable" | ||
14 | border | ||
15 | :header-cell-style="{background:'#f5f7fa'}" | ||
16 | v-bind="$attrs" | ||
17 | :height="height" | ||
18 | v-on="$listeners" | ||
19 | :data="data" | ||
20 | :span-method="this.merge ? this.mergeMethod : this.spanMethod"> | ||
21 | <lb-column v-bind="$attrs" | ||
22 | v-for="(item, index) in column" | ||
23 | :key="index" | ||
24 | :column="item"> | ||
25 | </lb-column> | ||
26 | </el-table> | ||
27 | <el-pagination class="lb-table-pagination" | ||
28 | v-if="pagination" | ||
29 | v-bind="$attrs" | ||
30 | v-on="$listeners" | ||
31 | background | ||
32 | :page-sizes="[10, 20, 50, 100]" | ||
33 | layout="total, sizes, prev, pager, next, jumper" | ||
34 | @current-change="paginationCurrentChange" | ||
35 | :style="{ 'margin-top': paginationTop, 'text-align': paginationAlign }"> | ||
36 | </el-pagination> | ||
37 | </div> | ||
38 | </template> | ||
39 | |||
40 | <script> | ||
41 | import LbColumn from './lb-column' | ||
42 | export default { | ||
43 | props: { | ||
44 | column: Array, | ||
45 | data: Array, | ||
46 | spanMethod: Function, | ||
47 | pagination: { | ||
48 | type: Boolean, | ||
49 | default: false | ||
50 | }, | ||
51 | paginationTop: { | ||
52 | type: String, | ||
53 | default: '0' | ||
54 | }, | ||
55 | height: { | ||
56 | type: String, | ||
57 | default: '60vh' | ||
58 | }, | ||
59 | paginationAlign: { | ||
60 | type: String, | ||
61 | default: 'left' | ||
62 | }, | ||
63 | merge: Array | ||
64 | }, | ||
65 | components: { | ||
66 | LbColumn | ||
67 | }, | ||
68 | data () { | ||
69 | return { | ||
70 | mergeLine: {}, | ||
71 | mergeIndex: {} | ||
72 | } | ||
73 | }, | ||
74 | created () { | ||
75 | this.getMergeArr(this.data, this.merge) | ||
76 | }, | ||
77 | computed: { | ||
78 | dataLength () { | ||
79 | return this.data.length | ||
80 | } | ||
81 | }, | ||
82 | methods: { | ||
83 | clearSelection () { | ||
84 | this.$refs.elTable.clearSelection() | ||
85 | }, | ||
86 | toggleRowSelection (row, selected) { | ||
87 | this.$refs.elTable.toggleRowSelection(row, selected) | ||
88 | }, | ||
89 | toggleAllSelection () { | ||
90 | this.$refs.elTable.toggleAllSelection() | ||
91 | }, | ||
92 | toggleRowExpansion (row, expanded) { | ||
93 | this.$refs.elTable.toggleRowExpansion(row, expanded) | ||
94 | }, | ||
95 | setCurrentRow (row) { | ||
96 | this.$refs.elTable.setCurrentRow(row) | ||
97 | }, | ||
98 | clearSort () { | ||
99 | this.$refs.elTable.clearSort() | ||
100 | }, | ||
101 | clearFilter (columnKey) { | ||
102 | this.$refs.elTable.clearFilter(columnKey) | ||
103 | }, | ||
104 | doLayout () { | ||
105 | this.$refs.elTable.doLayout() | ||
106 | }, | ||
107 | sort (prop, order) { | ||
108 | this.$refs.elTable.sort(prop, order) | ||
109 | }, | ||
110 | paginationCurrentChange (val) { | ||
111 | this.$emit('p-current-change', val) | ||
112 | }, | ||
113 | getMergeArr (tableData, merge) { | ||
114 | if (!merge) return | ||
115 | this.mergeLine = {} | ||
116 | this.mergeIndex = {} | ||
117 | merge.forEach((item, k) => { | ||
118 | tableData.forEach((data, i) => { | ||
119 | if (i === 0) { | ||
120 | this.mergeIndex[item] = this.mergeIndex[item] || [] | ||
121 | this.mergeIndex[item].push(1) | ||
122 | this.mergeLine[item] = 0 | ||
123 | } else { | ||
124 | if (data[item] === tableData[i - 1][item]) { | ||
125 | this.mergeIndex[item][this.mergeLine[item]] += 1 | ||
126 | this.mergeIndex[item].push(0) | ||
127 | } else { | ||
128 | this.mergeIndex[item].push(1) | ||
129 | this.mergeLine[item] = i | ||
130 | } | ||
131 | } | ||
132 | }) | ||
133 | }) | ||
134 | }, | ||
135 | mergeMethod ({ row, column, rowIndex, columnIndex }) { | ||
136 | const index = this.merge.indexOf(column.property) | ||
137 | if (index > -1) { | ||
138 | const _row = this.mergeIndex[this.merge[index]][rowIndex] | ||
139 | const _col = _row > 0 ? 1 : 0 | ||
140 | return { | ||
141 | rowspan: _row, | ||
142 | colspan: _col | ||
143 | } | ||
144 | } | ||
145 | } | ||
146 | }, | ||
147 | watch: { | ||
148 | merge () { | ||
149 | this.getMergeArr(this.data, this.merge) | ||
150 | }, | ||
151 | dataLength () { | ||
152 | this.getMergeArr(this.data, this.merge) | ||
153 | } | ||
154 | } | ||
155 | } | ||
156 | |||
157 | </script> |
src/libs/auth.js
0 → 100644
1 | import Cookies from 'js-cookie' | ||
2 | |||
3 | const TokenKey = 'vue_admin_template_token' | ||
4 | |||
5 | export function getToken() { | ||
6 | return Cookies.get(TokenKey) | ||
7 | } | ||
8 | |||
9 | export function setToken(token) { | ||
10 | return Cookies.set(TokenKey, token) | ||
11 | } | ||
12 | |||
13 | export function removeToken() { | ||
14 | return Cookies.remove(TokenKey) | ||
15 | } |
src/libs/filterAsyncRouter.js
0 → 100644
1 | export function filterAsyncRouter (routers){ | ||
2 | let data = routers.map(router=>{ | ||
3 | var obj = {} | ||
4 | obj.path = router.path | ||
5 | obj.name = router.code | ||
6 | obj.component = loadView(router.path) | ||
7 | return obj | ||
8 | }) | ||
9 | return data | ||
10 | } | ||
11 | function loadView (viewPath) { | ||
12 | return r => require.ensure([], () => r(require(`@/views${viewPath}/index`))) | ||
13 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/libs/formatData.js
0 → 100644
1 | // 格式化数据 | ||
2 | export function _dataRelect(data) { | ||
3 | let resetData = { | ||
4 | xdata: [], | ||
5 | namedata: [] | ||
6 | } | ||
7 | resetData.namedata = (data.map(function (item) { | ||
8 | return new Date(item.timestamp * 1000).toLocaleString().substring(12, 20); | ||
9 | })) | ||
10 | resetData.xdata = (data.map(function (item) { | ||
11 | if (item.value == null) { | ||
12 | item.value = 0; | ||
13 | } | ||
14 | return (item.value).toFixed(2) | ||
15 | |||
16 | })) | ||
17 | return resetData; | ||
18 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/libs/function.js
0 → 100644
1 | /** | ||
2 | * 函数防抖 (只执行最后一次点击) | ||
3 | * @param fn | ||
4 | * @param delay | ||
5 | * @returns {Function} | ||
6 | * @constructor | ||
7 | */ | ||
8 | export const Debounce = (fn, t) => { | ||
9 | let delay = t || 500; | ||
10 | let timer; | ||
11 | return function () { | ||
12 | let args = arguments; | ||
13 | if(timer){ | ||
14 | clearTimeout(timer); | ||
15 | } | ||
16 | timer = setTimeout(() => { | ||
17 | timer = null; | ||
18 | fn.apply(this, args); | ||
19 | }, delay); | ||
20 | } | ||
21 | }; | ||
22 | /** | ||
23 | * 函数节流 | ||
24 | * @param fn | ||
25 | * @param interval | ||
26 | * @returns {Function} | ||
27 | * @constructor | ||
28 | */ | ||
29 | export const Throttle = (fn, t) => { | ||
30 | let last; | ||
31 | let timer; | ||
32 | let interval = t || 500; | ||
33 | return function () { | ||
34 | let args = arguments; | ||
35 | let now = +new Date(); | ||
36 | if (last && now - last < interval) { | ||
37 | clearTimeout(timer); | ||
38 | timer = setTimeout(() => { | ||
39 | last = now; | ||
40 | fn.apply(this, args); | ||
41 | }, interval); | ||
42 | } else { | ||
43 | last = now; | ||
44 | fn.apply(this, args); | ||
45 | } | ||
46 | } | ||
47 | }; | ||
48 | // 日期格式转换 "yyyy-MM-dd HH:mm:ss" | ||
49 | export function formdate(date) { | ||
50 | var y = date.getFullYear(); | ||
51 | var m = date.getMonth() + 1; | ||
52 | m = m < 10 ? ('0' + m) : m; | ||
53 | var d = date.getDate(); | ||
54 | d = d < 10 ? ('0' + d) : d; | ||
55 | return y + '-' + m + '-' + d + ' '; | ||
56 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/libs/sessionDb.js
0 → 100644
1 | // setSession | ||
2 | export function setSession(key, value) { | ||
3 | window.sessionStorage.setItem(key, JSON.stringify(value)) | ||
4 | } | ||
5 | |||
6 | // getSession | ||
7 | export function getSession(key) { | ||
8 | return JSON.parse(sessionStorage.getItem(key)) | ||
9 | } | ||
10 | export function removeSession(key) { | ||
11 | return sessionStorage.removeItem(key) | ||
12 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/libs/tools.js
0 → 100644
src/libs/util.cookies.js
0 → 100644
1 | import Cookies from 'js-cookie' | ||
2 | |||
3 | const cookies = {} | ||
4 | |||
5 | /** | ||
6 | * @description 存储 cookie 值 | ||
7 | * @param {String} name cookie name | ||
8 | * @param {String} value cookie value | ||
9 | * @param {Object} setting cookie setting | ||
10 | */ | ||
11 | cookies.set = function (name = 'default', value = '', cookieSetting = {}) { | ||
12 | let currentCookieSetting = { | ||
13 | expires: 1 | ||
14 | } | ||
15 | Object.assign(currentCookieSetting, cookieSetting) | ||
16 | Cookies.set(`admin-${process.env.VUE_APP_VERSION}-${name}`, value, currentCookieSetting) | ||
17 | } | ||
18 | |||
19 | /** | ||
20 | * @description 拿到 cookie 值 | ||
21 | * @param {String} name cookie name | ||
22 | */ | ||
23 | cookies.get = function (name = 'default') { | ||
24 | return Cookies.get(`admin-${process.env.VUE_APP_VERSION}-${name}`) | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * @description 拿到 cookie 全部的值 | ||
29 | */ | ||
30 | cookies.getAll = function () { | ||
31 | return Cookies.get() | ||
32 | } | ||
33 | |||
34 | /** | ||
35 | * @description 删除 cookie | ||
36 | * @param {String} name cookie name | ||
37 | */ | ||
38 | cookies.remove = function (name = 'default') { | ||
39 | return Cookies.remove(`admin-${process.env.VUE_APP_VERSION}-${name}`) | ||
40 | } | ||
41 | |||
42 | export default cookies |
src/libs/util.js
0 → 100644
src/libs/validate.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/main.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/mixins/table/mixin.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/plugin/axios/index.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/router/index.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/router/modules/example.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/router/routes.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/store/getters.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/store/index.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/store/modules/permission_routes.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/store/modules/setTabs.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/store/modules/user.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/vendor/Blob.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/vendor/Export2Excel.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/404.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/Home.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/login/images/close.svg
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/login/images/login-bg.png
0 → 100644
704 KB
src/views/login/images/logo-login.svg
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/login/images/logo.png
0 → 100644
6.69 KB
src/views/login/images/open.svg
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/login/images/password.svg
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/login/images/user.svg
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/login/login.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/mixin/dialog/mixin.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/mixin/notice/mixin.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/panel/index.vue
0 → 100644
This diff is collapsed.
Click to expand it.
vue.config.js
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment