├── .babelrc
├── .gitignore
├── README.md
├── babel.config.js
├── docs
├── .nojekyll
├── CNAME
├── _coverpage.md
├── _navbar.md
├── _sidebar.md
├── background
│ └── background_1.PNG
├── global
│ └── css
│ │ └── style.css
├── index.html
├── logo
│ ├── cat.png
│ └── xz.png
└── page
│ ├── API.md
│ ├── _navbar.md
│ ├── develope.md
│ ├── enter.md
│ ├── introduction.md
│ ├── online.md
│ ├── question.md
│ ├── tips.md
│ └── update_log.md
├── electron
├── main.js
├── package.json
└── 下载压缩包.txt
├── main.js
├── package-lock.json
├── package.json
├── public
├── assets
│ ├── css
│ │ └── loading.css
│ ├── images
│ │ ├── favicon.ico
│ │ ├── tv.gif
│ │ └── xz.png
│ └── js
│ │ ├── baseUrl.js
│ │ └── tinymce
│ │ ├── language
│ │ └── zh_CN.js
│ │ └── plugins
│ │ ├── autosave
│ │ └── plugin.min.js
│ │ ├── ax_wordlimit
│ │ ├── plugin.js
│ │ └── plugin.min.js
│ │ ├── axupimgs
│ │ ├── loading.gif
│ │ ├── plugin.js
│ │ ├── plugin.min.js
│ │ └── upfiles.html
│ │ ├── bdmap
│ │ ├── bd.html
│ │ ├── map.html
│ │ ├── plugin.js
│ │ └── plugin.min.js
│ │ ├── code
│ │ └── plugin.min.js
│ │ ├── codesample
│ │ └── plugin.min.js
│ │ ├── colorpicker
│ │ └── plugin.min.js
│ │ ├── emojis
│ │ └── plugin.min.js
│ │ ├── emoticons
│ │ └── plugin.min.js
│ │ ├── image
│ │ └── plugin.min.js
│ │ ├── imagetools
│ │ ├── index.js
│ │ ├── plugin.js
│ │ └── plugin.min.js
│ │ ├── importword
│ │ ├── index.js
│ │ ├── plugin.js
│ │ └── plugin.min.js
│ │ ├── indent2em
│ │ ├── index.js
│ │ ├── plugin.js
│ │ └── plugin.min.js
│ │ ├── layout
│ │ ├── index.js
│ │ ├── plugin.js
│ │ └── plugin.min.js
│ │ ├── letterspacing
│ │ ├── index.js
│ │ ├── plugin.js
│ │ └── plugin.min.js
│ │ ├── lineheight
│ │ ├── plugin.js
│ │ └── plugin.min.js
│ │ ├── media
│ │ └── plugin.min.js
│ │ ├── paste
│ │ └── plugin.min.js
│ │ ├── powerpaste
│ │ ├── img
│ │ │ └── spinner_96.gif
│ │ ├── js
│ │ │ └── wordimport.js
│ │ ├── langs
│ │ │ └── zh_CN.js
│ │ └── plugin.min.js
│ │ ├── preview
│ │ └── plugin.min.js
│ │ ├── table
│ │ ├── index.js
│ │ ├── plugin.js
│ │ └── plugin.min.js
│ │ └── upfile
│ │ ├── index.js
│ │ ├── plugin.js
│ │ ├── plugin.min.js
│ │ └── upfiles.html
└── index.html
├── public_path.js
├── src
├── App.vue
├── api
│ ├── array
│ │ └── index.js
│ ├── control
│ │ └── index.js
│ ├── database
│ │ └── index.js
│ ├── date
│ │ └── index.js
│ ├── dom
│ │ ├── copy.js
│ │ ├── insert_after.js
│ │ ├── set_class.js
│ │ └── set_style.js
│ ├── file
│ │ ├── download.js
│ │ ├── download_template.js
│ │ ├── export_excel.js
│ │ ├── export_file.js
│ │ ├── get_file.js
│ │ ├── get_file_image.js
│ │ ├── get_txt.js
│ │ ├── preview_file.js
│ │ ├── print.js
│ │ └── url_to_file.js
│ ├── http
│ │ └── index.js
│ ├── iconfont
│ │ └── iconfont.js
│ ├── json
│ │ └── index.js
│ ├── message
│ │ └── index.js
│ ├── other
│ │ ├── extend_obj.js
│ │ ├── full_screen.js
│ │ ├── image_load.js
│ │ ├── transferStr.js
│ │ └── url_query.js
│ ├── storage
│ │ └── index.js
│ └── websocket
│ │ └── index.js
├── assets
│ ├── error
│ │ ├── 404.png
│ │ ├── above.png
│ │ └── below.png
│ ├── img
│ │ ├── file_excle.png
│ │ ├── file_img.png
│ │ ├── file_pdf.png
│ │ ├── file_ppt.png
│ │ ├── file_txt.png
│ │ ├── file_unknown.png
│ │ ├── file_video.png
│ │ ├── file_word.png
│ │ ├── file_zip.png
│ │ └── index.js
│ ├── loading
│ │ ├── loading.gif
│ │ ├── loading_2.gif
│ │ ├── loading_3.gif
│ │ └── loading_4.gif
│ ├── login
│ │ └── background.png
│ ├── logo.png
│ ├── logo
│ │ ├── Snipaste_2019-07-08_15-04-36.png
│ │ ├── cat.png
│ │ ├── catforte.png
│ │ ├── catround.png
│ │ ├── fish.png
│ │ ├── fishforte.png
│ │ ├── fishjoker.png
│ │ ├── fishround.png
│ │ ├── hawk.png
│ │ ├── hawkaround.png
│ │ ├── hawkforte.png
│ │ ├── hawkjoker.png
│ │ ├── logo_1.png
│ │ ├── logo_2.png
│ │ ├── logo_3.png
│ │ ├── logo_4.png
│ │ └── menu_logo.png
│ ├── thumb.png
│ └── welcome
│ │ ├── homepage.gif
│ │ ├── welcome.gif
│ │ ├── welcome.png
│ │ └── 微信图片_20190808164141.png
├── components
│ ├── SvgIcon
│ │ └── index.vue
│ ├── Tinymce
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── plugins.js
│ │ │ └── toolbar.js
│ ├── back_top
│ │ └── index.vue
│ ├── breadcrumb
│ │ └── index.vue
│ ├── code_mirror
│ │ └── index.vue
│ ├── color_select
│ │ └── index.vue
│ ├── data_table
│ │ └── index.vue
│ ├── error_log
│ │ └── index.vue
│ ├── flexbox
│ │ ├── flexbox-item.vue
│ │ ├── flexbox.vue
│ │ └── index.js
│ ├── icon_select
│ │ ├── index.vue
│ │ └── requireIcons.js
│ ├── image_preview
│ │ └── index.vue
│ ├── operation
│ │ └── index.vue
│ ├── pagination
│ │ └── index.vue
│ ├── scrollpane
│ │ └── index.vue
│ ├── search_menu
│ │ └── index.vue
│ ├── sticky
│ │ └── index.vue
│ ├── tag
│ │ └── index.vue
│ ├── theme_picker
│ │ └── index.vue
│ ├── tree_menu
│ │ └── index.vue
│ ├── upload_avatar
│ │ └── index.vue
│ ├── upload_list
│ │ └── index.vue
│ └── vuePictureViewer
│ │ ├── img
│ │ ├── pre_close.png
│ │ ├── pre_down.png
│ │ ├── pre_left.png
│ │ ├── pre_max.png
│ │ ├── pre_min.png
│ │ ├── pre_right.png
│ │ └── pre_rotate.png
│ │ └── index.vue
├── global
│ ├── css
│ │ ├── animation.css
│ │ ├── elementUI.css
│ │ ├── format.css
│ │ ├── media.css
│ │ └── overlay-scroll.css
│ └── js
│ │ ├── config.js
│ │ └── pages.js
├── icons
│ ├── index.js
│ ├── svg
│ │ ├── 06-商品管理.svg
│ │ ├── Steve-Jobs.svg
│ │ ├── add.svg
│ │ ├── alipay.svg
│ │ ├── anq.svg
│ │ ├── bug.svg
│ │ ├── chain.svg
│ │ ├── codeConsole.svg
│ │ ├── date.svg
│ │ ├── dept.svg
│ │ ├── dev.svg
│ │ ├── develop.svg
│ │ ├── dictionary.svg
│ │ ├── email.svg
│ │ ├── error.svg
│ │ ├── font-size.svg
│ │ ├── full-screen.svg
│ │ ├── fwb.svg
│ │ ├── github.svg
│ │ ├── gonggao.svg
│ │ ├── icon.svg
│ │ ├── iconfont.svg
│ │ ├── image.svg
│ │ ├── index.svg
│ │ ├── ipvisits.svg
│ │ ├── java.svg
│ │ ├── lock.svg
│ │ ├── log.svg
│ │ ├── markdown-fill.svg
│ │ ├── markdown.svg
│ │ ├── menu.svg
│ │ ├── monitor.svg
│ │ ├── password.svg
│ │ ├── peoples.svg
│ │ ├── permission.svg
│ │ ├── phone.svg
│ │ ├── qiniu.svg
│ │ ├── redis.svg
│ │ ├── role.svg
│ │ ├── run.svg
│ │ ├── running.svg
│ │ ├── search.svg
│ │ ├── sqlMonitor.svg
│ │ ├── swagger.svg
│ │ ├── sys-tools.svg
│ │ ├── system.svg
│ │ ├── timing.svg
│ │ ├── tools.svg
│ │ ├── unlock.svg
│ │ ├── user.svg
│ │ ├── user1.svg
│ │ ├── validCode.svg
│ │ ├── visits.svg
│ │ ├── zujian.svg
│ │ ├── 上架.svg
│ │ ├── 不感兴趣_44.svg
│ │ ├── 个人中心.svg
│ │ ├── 主页.svg
│ │ ├── 任务.svg
│ │ ├── 优惠券领取记录.svg
│ │ ├── 会员.svg
│ │ ├── 会员预约.svg
│ │ ├── 全屏.svg
│ │ ├── 关联热词.svg
│ │ ├── 写文章.svg
│ │ ├── 制作优惠券.svg
│ │ ├── 勾.svg
│ │ ├── 参数.svg
│ │ ├── 叉叉.svg
│ │ ├── 发布优惠券.svg
│ │ ├── 品牌.svg
│ │ ├── 商品分类.svg
│ │ ├── 商品列表1.svg
│ │ ├── 图片.svg
│ │ ├── 图表.svg
│ │ ├── 字典管理.svg
│ │ ├── 安全.svg
│ │ ├── 导航.svg
│ │ ├── 导航_2.svg
│ │ ├── 岗位图标.svg
│ │ ├── 工具.svg
│ │ ├── 平台介绍.svg
│ │ ├── 幻灯片.svg
│ │ ├── 异常.svg
│ │ ├── 微信.svg
│ │ ├── 微信支付.svg
│ │ ├── 拼团产品.svg
│ │ ├── 拼团列表.svg
│ │ ├── 操作_设置.svg
│ │ ├── 数据.svg
│ │ ├── 文件.svg
│ │ ├── 文章分类.svg
│ │ ├── 文章列表详情.svg
│ │ ├── 文章管理.svg
│ │ ├── 新闻.svg
│ │ ├── 日志管理.svg
│ │ ├── 权限.svg
│ │ ├── 权限管理.svg
│ │ ├── 清除缓存.svg
│ │ ├── 用户.svg
│ │ ├── 用户管理.svg
│ │ ├── 监控.svg
│ │ ├── 积分-实色.svg
│ │ ├── 等级.svg
│ │ ├── 签到.svg
│ │ ├── 系统管理.svg
│ │ ├── 菜单.svg
│ │ ├── 菜单_2.svg
│ │ ├── 菜单管理.svg
│ │ ├── 营销.svg
│ │ ├── 规格.svg
│ │ ├── 角色管理.svg
│ │ ├── 订单.svg
│ │ ├── 评论.svg
│ │ ├── 账单查询.svg
│ │ ├── 部门管理.svg
│ │ └── 项目.svg
│ └── svgo.yml
├── initial
│ ├── UI
│ │ ├── elementUI.js
│ │ └── iviewUI.js
│ ├── directives
│ │ ├── dialog_drag.js
│ │ ├── index.js
│ │ ├── initial_size.js
│ │ └── permission.js
│ ├── error_log.js
│ ├── filter.js
│ ├── filter
│ │ ├── formatDate.js
│ │ ├── formatMoney.js
│ │ └── index.js
│ └── modules.js
├── main.js
├── router
│ ├── index.js
│ ├── router.js
│ └── visit.js
├── store
│ ├── index.js
│ └── modules
│ │ ├── breadcrumb.js
│ │ ├── cache_views.js
│ │ ├── error.js
│ │ ├── global.js
│ │ ├── menu.js
│ │ ├── setting.js
│ │ ├── table.js
│ │ ├── tags.js
│ │ └── user.js
├── utils
│ ├── agent.js
│ ├── color_change.js
│ ├── convertHttp.js
│ ├── country-data.js
│ ├── encrypt.js
│ ├── form_validate.js
│ ├── get_file_icon.js
│ ├── permission.js
│ ├── type.js
│ └── validate.js
└── views
│ ├── Layout
│ ├── components
│ │ ├── drawer
│ │ │ ├── background.vue
│ │ │ ├── index.vue
│ │ │ ├── logo.vue
│ │ │ └── system.vue
│ │ ├── drop_down
│ │ │ └── index.vue
│ │ ├── icon_box
│ │ │ └── index.vue
│ │ └── menu_button
│ │ │ └── index.vue
│ ├── index.vue
│ ├── js
│ │ ├── initial.js
│ │ ├── operation.js
│ │ └── property.js
│ └── scss
│ │ └── index.scss
│ ├── dashboard
│ ├── index.vue
│ ├── js
│ │ ├── initial.js
│ │ └── property.js
│ └── scss
│ │ └── index.scss
│ ├── data_table
│ └── index.vue
│ ├── error
│ ├── 403.vue
│ ├── 404.vue
│ ├── 500.vue
│ └── Layout
│ │ └── index.vue
│ ├── log
│ ├── authority_log
│ │ ├── components
│ │ │ └── detail.vue
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ ├── exception_log
│ │ ├── components
│ │ │ └── detail.vue
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ └── operation_log
│ │ ├── index.vue
│ │ └── js
│ │ ├── initial.js
│ │ ├── operation.js
│ │ └── property.js
│ ├── login
│ ├── index.vue
│ ├── js
│ │ ├── initial.js
│ │ ├── operation.js
│ │ ├── property.js
│ │ └── template_1.js
│ ├── scss
│ │ ├── index.scss
│ │ └── template_1.scss
│ └── template_1.vue
│ ├── monitor
│ ├── online_user
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ └── redis_manage
│ │ ├── components
│ │ ├── delete_all.vue
│ │ └── visit_detail.vue
│ │ ├── index.vue
│ │ └── js
│ │ ├── initial.js
│ │ ├── operation.js
│ │ └── property.js
│ ├── person
│ ├── components
│ │ ├── basic.vue
│ │ ├── edit_email.vue
│ │ ├── edit_password.vue
│ │ └── table.vue
│ ├── index.vue
│ ├── js
│ │ ├── operation.js
│ │ └── property.js
│ └── scss
│ │ └── index.scss
│ ├── redirect
│ └── index.vue
│ ├── system
│ ├── authority
│ │ ├── components
│ │ │ └── form.vue
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ ├── department
│ │ ├── components
│ │ │ └── form.vue
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ ├── dictionary
│ │ ├── components
│ │ │ ├── add.vue
│ │ │ └── edit.vue
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ ├── menu
│ │ ├── components
│ │ │ └── form.vue
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ ├── role
│ │ ├── components
│ │ │ └── form.vue
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ ├── station
│ │ ├── components
│ │ │ └── form.vue
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ └── user
│ │ ├── components
│ │ └── form.vue
│ │ ├── index.vue
│ │ └── js
│ │ ├── initial.js
│ │ ├── operation.js
│ │ └── property.js
│ ├── tools
│ ├── file
│ │ ├── index.vue
│ │ ├── localstorage
│ │ │ ├── components
│ │ │ │ └── form.vue
│ │ │ ├── index.vue
│ │ │ └── js
│ │ │ │ ├── initial.js
│ │ │ │ ├── operation.js
│ │ │ │ └── property.js
│ │ └── qiniuyun
│ │ │ ├── components
│ │ │ ├── config.vue
│ │ │ ├── form.vue
│ │ │ └── share.vue
│ │ │ ├── index.vue
│ │ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ ├── generator
│ │ ├── components
│ │ │ └── form.vue
│ │ ├── index.vue
│ │ ├── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ │ └── views
│ │ │ ├── config.vue
│ │ │ └── preview.vue
│ ├── mission
│ │ ├── components
│ │ │ ├── form.vue
│ │ │ └── table.vue
│ │ ├── index.vue
│ │ └── js
│ │ │ ├── initial.js
│ │ │ ├── operation.js
│ │ │ └── property.js
│ └── picture
│ │ ├── components
│ │ └── form.vue
│ │ ├── index.vue
│ │ └── js
│ │ ├── initial.js
│ │ ├── operation.js
│ │ └── property.js
│ └── welcome
│ └── index.vue
├── template
├── form.ftl
├── index.ftl
├── operation.ftl
├── property.ftl
└── style.ftl
└── vue.config.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": [
3 | ["import", {
4 | "libraryName": "view-design",
5 | "libraryDirectory": "src/components"
6 | }
7 | ],
8 | [
9 | "component",
10 | {
11 | "libraryName": "element-ui",
12 | "styleLibraryName": "theme-chalk"
13 | }
14 | ]
15 | ]
16 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw?
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
XZ-ADMIN
2 |
3 | 当前最新版本:`3.2`(日期:2021-02-04)
4 |
5 |
6 |
7 |
8 | ## :smirk: 页面浏览
9 |
10 | [演示地址](https://xzadmin.xuanzai.top)
11 |
12 | 账号:test
13 | 密码:123456(只有查看权限)
14 |
15 |
16 |
17 | ## :star: 安装步骤
18 |
19 | 安装:在项目目录下`npm install`
20 |
21 | 运行:在项目目录下`npm run serve`
22 |
23 | 查阅文档,[快速上手](http://xzadmin-docs.xuanzai.top)
24 |
25 | 如有问题,欢迎提`issues`
26 |
27 |
28 |
29 |
30 | ## :sparkling_heart: 技术栈
31 | 使用了`vue`、`element-ui`作为主要技术栈
32 |
33 |
34 |
35 | ## 商务合作
36 |
37 | 邮箱:1814899864@qq.com
38 |
39 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | const plugins = ["@vue/babel-plugin-transform-vue-jsx"]
2 | // 生产环境移除console
3 | if(process.env.NODE_ENV === 'production') {
4 | plugins.push("transform-remove-console")
5 | }
6 | module.exports = {
7 | plugins: plugins,
8 | presets: [
9 | '@vue/app'
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/docs/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/docs/.nojekyll
--------------------------------------------------------------------------------
/docs/CNAME:
--------------------------------------------------------------------------------
1 | xzadmin-docs.xuanzai.top
--------------------------------------------------------------------------------
/docs/_coverpage.md:
--------------------------------------------------------------------------------
1 | # XZ-ADMIN
2 |
3 | > 让一切复杂的业务都从简单的开发开始!
4 |
5 | * 基于Vue、ElementUI技术栈
6 | * 采用RBAC模式设计的数据库模型
7 |
8 | [GitHub](https://github.com/MikuBlog/xz-admin)
9 | [preview](https://xzadmin.xuanzai.top)
10 | [Get Started](/page/introduction)
11 |
12 | 
--------------------------------------------------------------------------------
/docs/_navbar.md:
--------------------------------------------------------------------------------
1 | * [API](page/API)
--------------------------------------------------------------------------------
/docs/_sidebar.md:
--------------------------------------------------------------------------------
1 | * [介绍](page/introduction)
2 | * [入门](page/enter)
3 | * [开发手册](page/develope)
4 | * [API](page/API)
5 | * [部署上线](page/online)
6 | * [更新日志](page/update_log)
7 | * [常见问题](page/question)
8 | * [温馨提示](page/tips)
--------------------------------------------------------------------------------
/docs/background/background_1.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/docs/background/background_1.PNG
--------------------------------------------------------------------------------
/docs/global/css/style.css:
--------------------------------------------------------------------------------
1 | pre {
2 | padding: 0!important;
3 | }
4 | .markdown-section pre > code {
5 | font-size: 1rem;
6 | line-height: 1.8rem;
7 | }
8 | .markdown-section code {
9 | font-size: 1rem;
10 | }
11 | .active>a {
12 | color: #0074d9!important;
13 | }
14 | .sidebar li.active {
15 | background: rgb(251, 251, 251)!important;
16 | }
--------------------------------------------------------------------------------
/docs/logo/cat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/docs/logo/cat.png
--------------------------------------------------------------------------------
/docs/logo/xz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/docs/logo/xz.png
--------------------------------------------------------------------------------
/docs/page/_navbar.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/docs/page/_navbar.md
--------------------------------------------------------------------------------
/docs/page/introduction.md:
--------------------------------------------------------------------------------
1 | ## 技术栈
2 |
3 | 使用了`Vue`、`ElementUI`、`Spring Boot`、`Redis`、`JPA`等前后端前沿技术开发。
4 |
5 | ## 响应式
6 |
7 | 支持`pc`、平板、手机等主流设备的访问。
8 |
9 | ## 模块化
10 |
11 | 前后端都采用了精细粒度的模块化开发,方便后期的开发与维护。
12 |
13 | ## 易用性
14 |
15 | 可用于大多数Web项目的后台管理系统。
--------------------------------------------------------------------------------
/docs/page/question.md:
--------------------------------------------------------------------------------
1 | ## 兼容IE
2 |
3 | 使用`IE`浏览器发出请求的`url`中文信息将会被乱码处理,如果要将中文参数放置在`url`中,则需要在发送请求前先对`url`进行编码。
4 |
5 | 解决方案:使用`encodeURI`(只对中文字符进行编码),作者已经在`axios`拦截器中作统一转码,使用`axios`不需要再手动编码。
6 |
7 | ```js
8 | encodeURI(url)
9 | ```
--------------------------------------------------------------------------------
/docs/page/tips.md:
--------------------------------------------------------------------------------
1 | ## 打包体积过大
2 |
3 | 现阶段已引入的第三方模块比较多,如:`element-ui`、`view-design`等等`UI`组件以及其他插件,打包后体积已有一定规模,如要再次在项目中引入依赖,请慎重!
4 |
5 | 解决方案
6 |
7 | + 利用[CDN](https://www.bootcdn.cn/)加速来解决本地依赖过多导致体积过大的问题。
8 | + 利用`vue.config.js`拆分包,提高包使用效率。
9 | + `nginx`配置`gzip`文件压缩,压缩后的`JavaScript`与`CSS`大概为原来的1/4。
--------------------------------------------------------------------------------
/electron/main.js:
--------------------------------------------------------------------------------
1 | const { app, BrowserWindow } = require('electron')
2 |
3 | function createWindow () {
4 | const win = new BrowserWindow({
5 | width: 1920,
6 | height: 1080,
7 | webPreferences: {
8 | nodeIntegration: true
9 | }
10 | })
11 |
12 | win.loadFile('index.html')
13 | // 是否打开控制台
14 | // win.webContents.openDevTools()
15 | }
16 |
17 | app.whenReady().then(createWindow)
18 |
19 | app.on('window-all-closed', () => {
20 | if (process.platform !== 'darwin') {
21 | app.quit()
22 | }
23 | })
24 |
25 | app.on('activate', () => {
26 | if (BrowserWindow.getAllWindows().length === 0) {
27 | createWindow()
28 | }
29 | })
--------------------------------------------------------------------------------
/electron/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-electron-app",
3 | "version": "0.1.0",
4 | "main": "main.js",
5 | "scripts": {
6 | "start": "electron .",
7 | "package":"electron-packager . xzadmin --win --out . --arch=x64 --electron-version=11.0.3 --overwrite --electron-zip-dir=. --ignore=node_module"
8 | }
9 | }
--------------------------------------------------------------------------------
/electron/下载压缩包.txt:
--------------------------------------------------------------------------------
1 | 依赖:
2 | https://npm.taobao.org/mirrors/electron/11.0.3/electron-v11.0.3-win32-x64.zip
--------------------------------------------------------------------------------
/main.js:
--------------------------------------------------------------------------------
1 | const { app, BrowserWindow } = require('electron')
2 |
3 | function createWindow () {
4 | const win = new BrowserWindow({
5 | width: 800,
6 | height: 600,
7 | webPreferences: {
8 | nodeIntegration: true
9 | }
10 | })
11 |
12 | win.loadFile('index.html')
13 | win.webContents.openDevTools()
14 | }
15 |
16 | app.whenReady().then(createWindow)
17 |
18 | app.on('window-all-closed', () => {
19 | if (process.platform !== 'darwin') {
20 | app.quit()
21 | }
22 | })
23 |
24 | app.on('activate', () => {
25 | if (BrowserWindow.getAllWindows().length === 0) {
26 | createWindow()
27 | }
28 | })
--------------------------------------------------------------------------------
/public/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/public/assets/images/favicon.ico
--------------------------------------------------------------------------------
/public/assets/images/tv.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/public/assets/images/tv.gif
--------------------------------------------------------------------------------
/public/assets/images/xz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/public/assets/images/xz.png
--------------------------------------------------------------------------------
/public/assets/js/baseUrl.js:
--------------------------------------------------------------------------------
1 | // https://aboot.missiono.cn
2 | // http://172.16.11.200:8087
3 | // http://172.16.14.33:8088
4 | // http://172.16.10.68:8087
5 | // http://172.16.15.74:8087
6 | // http://localhost:8087
7 | // http://openlan.missiono.cn
8 | var
9 | // 接口统一请求前缀地址
10 | baseUrl = 'http://172.25.0.230:8899',
11 | // 静态资源请求前tp:/缀地址
12 | prefixUrl = 'http://172.25.0.230:8899'
13 |
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/axupimgs/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/public/assets/js/tinymce/plugins/axupimgs/loading.gif
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/code/plugin.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3 | * Licensed under the LGPL or a commercial license.
4 | * For LGPL see License.txt in the project root for license information.
5 | * For commercial licenses see https://www.tiny.cloud/
6 | *
7 | * Version: 5.5.1 (2020-10-01)
8 | */
9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(o){var e=o.getContent({source_view:!0});o.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){var t,n;t=o,n=e.getData().code,t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged(),e.close()}})};e.add("code",function(e){var t,n;return(t=e).addCommand("mceCodeEditor",function(){o(t)}),(n=e).ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return o(n)}}),n.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return o(n)}}),{}})}();
10 |
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/colorpicker/plugin.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3 | * Licensed under the LGPL or a commercial license.
4 | * For LGPL see License.txt in the project root for license information.
5 | * For commercial licenses see https://www.tiny.cloud/
6 | *
7 | * Version: 5.5.1 (2020-10-01)
8 | */
9 | !function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("colorpicker",function(){console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")})}();
10 |
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/imagetools/index.js:
--------------------------------------------------------------------------------
1 | require('./plugin.js');
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/importword/index.js:
--------------------------------------------------------------------------------
1 | require('./plugin.js');
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/indent2em/index.js:
--------------------------------------------------------------------------------
1 | require('./plugin.js');
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/layout/index.js:
--------------------------------------------------------------------------------
1 | require('./plugin.js');
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/letterspacing/index.js:
--------------------------------------------------------------------------------
1 | require('./plugin.js');
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/powerpaste/img/spinner_96.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/public/assets/js/tinymce/plugins/powerpaste/img/spinner_96.gif
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/table/index.js:
--------------------------------------------------------------------------------
1 | require('./plugin.js');
--------------------------------------------------------------------------------
/public/assets/js/tinymce/plugins/upfile/index.js:
--------------------------------------------------------------------------------
1 | require('./plugin.js');
--------------------------------------------------------------------------------
/public_path.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 | module.exports = {
3 | environment: process.env.NODE_ENV === 'production' ? '/' : '/',
4 | editor: process.env.NODE_ENV === 'production' ? '/' : '/',
5 | electron: path.resolve(__dirname, './dist'),
6 | // 是否为桌面程序
7 | isExe: false
8 | }
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
--------------------------------------------------------------------------------
/src/api/dom/copy.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 复制文本
4 | * @param {DOM | String} obj
5 | * @returns {Promise}
6 | */
7 | function copyText(obj) {
8 | return new Promise((resolve, reject) => {
9 | const
10 | range = document.createRange(),
11 | selection = document.getSelection()
12 | if(typeof obj === "object") {
13 | // 将DOM元素中的文字添加到range对象中
14 | range.selectNodeContents(obj)
15 | // 清除已有选区
16 | selection.removeAllRanges()
17 | // 选中range对象中的所有文字
18 | selection.addRange(range)
19 | // 复制
20 | document.execCommand('Copy')
21 | // 清除已有选区
22 | selection.removeAllRanges()
23 | }
24 | if(typeof obj === "string") {
25 | // 动态创建 textarea 元素
26 | var aux = document.createElement("textarea");
27 | // 获得需要复制的内容
28 | aux.value = obj
29 | // 添加到 DOM 元素中
30 | document.body.appendChild(aux);
31 | // 执行选中
32 | // 注意: 只有 input 和 textarea 可以执行 select() 方法.
33 | aux.select();
34 | // 获得选中的内容
35 | var content = window.getSelection().toString();
36 | // 执行复制命令
37 | document.execCommand("copy");
38 | }
39 | resolve()
40 | })
41 | }
42 |
43 | export default copyText
--------------------------------------------------------------------------------
/src/api/dom/insert_after.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 将新元素插入到旧元素前面
4 | * @param {DOM} newEle
5 | * @param {DOM} nowEle
6 | */
7 | function insertAfter(newEle, nowEle) {
8 | nowEle.parentNode.insertBefore(newEle, nowEle.nextSibling)
9 | }
10 |
11 | export default insertAfter
--------------------------------------------------------------------------------
/src/api/dom/set_class.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 添加类
4 | * @param {DOM} element
5 | * @param {String} name
6 | */
7 | function addClass(element, name) {
8 | element.classList.add(name)
9 | }
10 |
11 | function removeClass(element, name) {
12 | element.classList.remove(name)
13 | }
14 |
15 | function getClassName(element) {
16 | return element.getAttribute('className')
17 | }
18 |
19 | export default {
20 | addClass,
21 | removeClass,
22 | getClassName
23 | }
--------------------------------------------------------------------------------
/src/api/file/download.js:
--------------------------------------------------------------------------------
1 |
2 | import axios from 'axios'
3 | import { Loading, Message } from 'element-ui'
4 | /**
5 | * @author xuanzai
6 | * @description 下载文件
7 | * @param {String} url 下载路径
8 | * @param {String} fileName 文件名称
9 | */
10 | let loading = ""
11 |
12 | function download(url, fileName) {
13 | console.log(url)
14 | loading = Loading.service({
15 | fullscreen: true,
16 | background: "rgba(255, 255, 255, .4)",
17 | customClass: 'top-floor'
18 | })
19 | Message({
20 | message: "正在下载文件,请耐心等待",
21 | type: 'info',
22 | customClass: "top-floor"
23 | })
24 | axios({
25 | url,
26 | method: "get",
27 | responseType: 'blob'
28 | }).then(result => {
29 | if(window.navigator.msSaveBlob) {
30 | try {
31 | window.navigator.msSaveBlob(result.data, fileName || new Date().getTime())
32 | } catch(e) {
33 | console.log(e)
34 | }
35 | }else {
36 | const
37 | a = document.createElement('a'),
38 | arr = url.split('/')
39 | a.download = fileName || arr[arr.length - 1]
40 | a.href = window.URL.createObjectURL(result.data)
41 | a.click()
42 | loading.close()
43 | }
44 | }).catch(e => {
45 | Message({
46 | message: e,
47 | type: 'error',
48 | customClass: "top-floor"
49 | })
50 | loading.close()
51 | })
52 | }
53 |
54 | export default download
--------------------------------------------------------------------------------
/src/api/file/download_template.js:
--------------------------------------------------------------------------------
1 | import http from '@/api/http'
2 |
3 | function downloadTemplate(url, fileName) {
4 | http.http_normal({
5 | url,
6 | responseType: 'blob',
7 | method: "get"
8 | }).then(result => {
9 | if(window.navigator.msSaveBlob) {
10 | try {
11 | window.navigator.msSaveBlob(result.data, fileName || arr[arr.length - 1])
12 | } catch(e) {
13 | console.log(e)
14 | }
15 | }else {
16 | const a = document.createElement('a')
17 | a.download = fileName || new Date().getTime()
18 | a.href = window.URL.createObjectURL(result.data)
19 | a.click()
20 | }
21 | })
22 | }
23 |
24 | export default downloadTemplate
25 |
--------------------------------------------------------------------------------
/src/api/file/export_excel.js:
--------------------------------------------------------------------------------
1 | import FileSaver from "file-saver"
2 | import XLSX from "xlsx"
3 |
4 | /**
5 | * @description 导出excel
6 | * @param {DOM | Array(DOM)} obj
7 | * @param {String} name
8 | */
9 | export default (obj, name = 'table') => {
10 | let vb = ""
11 | if(obj.length) {
12 | let table = document.createElement('table')
13 | for(let i = 0, len = obj.length; i < len; i ++) {
14 | table.appendChild(obj[i].cloneNode(true))
15 | }
16 | vb = XLSX.utils.table_to_book(table);
17 | }else {
18 | vb = XLSX.utils.table_to_book(obj);
19 | }
20 | let vbout = XLSX.write(vb, { bookType: 'xlsx', bookSST: true, type: 'array' });
21 | try {
22 | FileSaver.saveAs(new Blob([vbout], { type: 'application/octet-stream' }), `${name}.xlsx`);
23 | } catch (e) {
24 | if (typeof console !== 'undefined') console.log(e, vbout);
25 | }
26 | return vbout;
27 | }
--------------------------------------------------------------------------------
/src/api/file/export_file.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 | import JSZip from 'jszip'
3 | import FileSaver from 'file-saver'
4 | import { Loading, Message } from 'element-ui'
5 |
6 | let loading = ""
7 |
8 | function getFile(url) {
9 | return axios({
10 | url,
11 | method: "get",
12 | responseType: 'blob'
13 | })
14 | }
15 | /**
16 | * @author xuanzai
17 | * @description 批量导出文件
18 | * @param {Array} fileList 文件地址列表
19 | * @param {fileName} fileName 压缩文件名称
20 | */
21 | export default (fileList, fileName = 'file') => {
22 | const
23 | zip = new JSZip(),
24 | promises = []
25 | loading = Loading.service({
26 | fullscreen: true,
27 | background: "rgba(255, 255, 255, .4)",
28 | customClass: 'top-floor'
29 | })
30 | Message({
31 | message: "正在导出,请耐心等待",
32 | type: 'info',
33 | customClass: "top-floor"
34 | })
35 | fileList.forEach(url => {
36 | const promise = getFile(url).then(data => {
37 | const arr = url.split("/")
38 | const fileName = arr[arr.length - 1]
39 | zip.file(fileName, data.data)
40 | })
41 | promises.push(promise)
42 | })
43 | Promise.all(promises).then(() => {
44 | zip.generateAsync({
45 | type: 'blob'
46 | }).then(content => {
47 | FileSaver.saveAs(content, `${fileName}.zip`)
48 | loading.close()
49 | })
50 | }).catch(e => {
51 | Message({
52 | message: e,
53 | type: 'error',
54 | customClass: "top-floor"
55 | })
56 | loading.close()
57 | })
58 | }
--------------------------------------------------------------------------------
/src/api/file/get_file.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 获取文件
4 | * @param {Number} limit 文件大小限制,默认为2MB
5 | * @returns {Promise}
6 | */
7 | function getFile({
8 | limit,
9 | fileType
10 | }) {
11 | !limit && (limit = 2)
12 | return new Promise((resolve, reject) => {
13 | let
14 | fileEle = document.createElement('input'),
15 | event = new MouseEvent('click')
16 | fileEle.type = "file"
17 | fileEle.accept = fileType || ""
18 | fileEle.style.display = 'none'
19 | fileEle.addEventListener('change', () => {
20 | const files = fileEle.files[0]
21 | const raw = files
22 | files.size / (1024 ** 2) > limit
23 | ? reject(`文件不能超过${limit}MB!`)
24 | : resolve(raw)
25 | document.body.removeChild(fileEle)
26 | })
27 | fileEle.dispatchEvent(event)
28 | document.body.appendChild(fileEle)
29 | })
30 | }
31 |
32 | export default getFile
--------------------------------------------------------------------------------
/src/api/file/get_txt.js:
--------------------------------------------------------------------------------
1 | function getTxt() {
2 | return new Promise((resolve, reject) => {
3 | let
4 | reader = new FileReader(),
5 | fileEle = document.createElement('input'),
6 | event = new MouseEvent('click'),
7 | pattern = new RegExp(/txt$/g),
8 | data = {}
9 | fileEle.type = "file"
10 | fileEle.accept = "text/plain"
11 | fileEle.style.display = 'none'
12 | fileEle.addEventListener('change', () => {
13 | const files = fileEle.files[0]
14 | reader.readAsText(files, 'gb2312')
15 | document.body.removeChild(fileEle)
16 | })
17 | reader.addEventListener('load', () => {
18 | resolve(reader.result)
19 | })
20 | fileEle.dispatchEvent(event)
21 | document.body.appendChild(fileEle)
22 | })
23 | }
24 |
25 | export default getTxt
--------------------------------------------------------------------------------
/src/api/file/preview_file.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 在线预览文件
4 | * @param {String} url
5 | */
6 | function previewFile(url) {
7 | if(!url) {
8 | return
9 | }
10 | const
11 | strArr = url.split('.'),
12 | len = strArr.length,
13 | type = strArr[len - 1].toLowerCase(),
14 | iframe = document.createElement('iframe')
15 | iframe.style.cssText = `
16 | width: 100%;
17 | height: 100%;
18 | `
19 | if(type == 'doc'|| type == 'docx'|| type == 'xls' || type == 'xlsx' || type == 'ppt' || type == 'pptx') {
20 | const newPage = window.open('', type)
21 | iframe.src = `https://view.officeapps.live.com/op/view.aspx?src=${url}`
22 | newPage.document.body.appendChild(iframe)
23 | newPage.document.body.style.margin = "0"
24 | }else {
25 | window.open(url)
26 | }
27 | }
28 |
29 | export default previewFile
--------------------------------------------------------------------------------
/src/api/file/print.js:
--------------------------------------------------------------------------------
1 | function removePrintHeader(page) {
2 | const style = document.createElement('style')
3 | style.className = "print"
4 | style.innerHTML = "@page { margin: .5rem }"
5 | page.document.querySelector('head').appendChild(style)
6 | }
7 |
8 | /**
9 | * @author xuanzai
10 | * @description 打印
11 | * @param { HTML } page
12 | */
13 | function toPrint(page = "") {
14 | const iframe = document.createElement('iframe')
15 | iframe.style.cssText = `
16 | position: absolute;
17 | width: 0;
18 | height: 0;
19 | border: none;
20 | `
21 | document.body.appendChild(iframe)
22 | const doc = iframe.contentWindow.document
23 | if((typeof page).toLowerCase() === 'string') {
24 | doc.write(page)
25 | }else {
26 | doc.body.appendChild(page)
27 | }
28 | doc.close()
29 | removePrintHeader(iframe.contentWindow)
30 | iframe.contentWindow.focus()
31 | iframe.contentWindow.print()
32 | setTimeout(() => {
33 | document.body.removeChild(iframe)
34 | }, 1000)
35 | }
36 |
37 |
38 | export default toPrint
--------------------------------------------------------------------------------
/src/api/file/url_to_file.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @description base64转file
3 | * @param {String} dataurl base64字符串
4 | * @param {String} filename 文件名称
5 | */
6 | function dataUrlToFile(dataurl, filename) {
7 | var arr = dataurl.split(','),
8 | mime = arr[0].match(/:(.*?);/)[1],
9 | bstr = atob(arr[1]),
10 | n = bstr.length,
11 | u8arr = new Uint8Array(n);
12 | while (n--) {
13 | u8arr[n] = bstr.charCodeAt(n);
14 | }
15 | return new File([u8arr], filename || 'file', {
16 | type: mime
17 | });
18 | }
19 |
20 | export default dataUrlToFile
21 |
--------------------------------------------------------------------------------
/src/api/json/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description json美化(配合pre标签使用)
4 | * @param {JSON | Object} json json字符串或对象
5 | * @param {Number} tab 空格的个数
6 | * @returns {JSON} 返回美化好的JSON
7 | */
8 | function jsonPretty(json, tab = 4) {
9 | try {
10 | if(typeof json == "object") {
11 | return JSON.stringify(json, null, tab)
12 | }else {
13 | return JSON.stringify(JSON.parse(json), null, tab)
14 | }
15 | }catch(e) {
16 | return json
17 | }
18 | }
19 |
20 | export default jsonPretty
--------------------------------------------------------------------------------
/src/api/other/extend_obj.js:
--------------------------------------------------------------------------------
1 | export default () => {
2 | // 默认为浅拷贝
3 | var deep = false
4 | // 指定初始索引为1
5 | var i = 1
6 | // 如果传入的第一个参数为空,则给该变量一个空对象
7 | var target = arguments[0] || {}
8 | // 如果第一个参数为布尔值(判断传入的目标对象是第一个参数还是第二个参数)
9 | if(typeof target === "boolean") {
10 | // 将该参数赋值给deep变量,保存函数的调用方式
11 | deep = target
12 | // 然后将第二个参数交给该变量(判断该参数是否为对象)
13 | target = arguments[i] || {}
14 | // 索引加一
15 | i ++
16 | }
17 | // 判断target是否为对象或则为函数
18 | if (typeof target !== "object") {
19 | target = {}
20 | }
21 | // 遍历后面的所有参数
22 | for(len = arguments.length; i < len; i ++) {
23 | var options = arguments[i]
24 | if(options !== null) {
25 | for(var name in options) {
26 | // 保存目标函数属性(如果目标对象的该属性是个对象,那么在该对象的基础上继续拷贝)
27 | var src = target[name]
28 | // 保存复制的属性
29 | var copy = options[name]
30 | // 解决循环引用问题
31 | if(copy === target) {
32 | continue
33 | }
34 | // 如果为深拷贝,属性存在,属性是对象,递归进行深拷贝
35 | if(deep && copy && typeof copy == "object") {
36 | src = Array.isArray(copy) ? (src && Array.isArray(src) ? src : []) : (src && Object.getPrototypeOf(src) === Object.prototype ? src : {})
37 | target[name] = extend(deep, src, copy)
38 | }else if(copy !== undefined) {
39 | // 如果不是对象则直接赋值
40 | target[name] = copy
41 | }
42 | }
43 | }
44 | }
45 | return target
46 | }
--------------------------------------------------------------------------------
/src/api/other/full_screen.js:
--------------------------------------------------------------------------------
1 | function requestFullScreen() {
2 | const element = document.documentElement
3 | let requestMethod = element.requestFullScreen
4 | || element.webkitRequestFullScreen //谷歌
5 | || element.mozRequestFullScreen //火狐
6 | || element.msRequestFullScreen; //IE11
7 | if (requestMethod) {
8 | requestMethod.call(element); //执行这个请求的方法
9 | } else if (typeof window.ActiveXObject !== "undefined") { // window.ActiveXObject判断是否支持ActiveX控件
10 | //这里其实就是模拟了按下键盘的F11,使浏览器全屏
11 | const wscript = new ActiveXObject("WScript.Shell"); //创建ActiveX
12 | if (wscript !== null) { //创建成功
13 | wscript.SendKeys("{F11}");//触发f1
14 | }
15 | }
16 | }
17 |
18 | function cancelFullScreen() {
19 | if (document.cancelFullScreen) {
20 | document.cancelFullScreen();
21 | } else if (document.mozCancelFullScreen) {
22 | document.mozCancelFullScreen();
23 | } else if (document.webkitCancelFullScreen) {
24 | document.webkitCancelFullScreen();
25 | } else if (document.msExitFullscreen) {
26 | document.msExitFullscreen();
27 | }
28 | }
29 |
30 | export default {
31 | requestFullScreen,
32 | cancelFullScreen
33 | }
--------------------------------------------------------------------------------
/src/api/other/image_load.js:
--------------------------------------------------------------------------------
1 | // 图片加载
2 | function imageLoad(url = "") {
3 | const ele = document.querySelectorAll('.xz-image')
4 | ele.forEach(val => {
5 | const image = new Image()
6 | image.src = val.dataset.src
7 | val.src = url
8 | initialStyle(val, 'stop')
9 | initialListener(image, val)
10 | })
11 | }
12 |
13 | // 给图片加初始样式
14 | function initialStyle(val, param) {
15 | param === 'run'
16 | ? val.style["animation-play-state"] = "running"
17 | : val.style["animation-play-state"] = "paused"
18 | }
19 |
20 |
21 | // 监听图片事件
22 | function initialListener(image, val) {
23 | image.addEventListener('load', () => {
24 | val.src = image.src
25 | initialStyle(val, 'run')
26 | })
27 | }
28 |
29 | export default imageLoad
--------------------------------------------------------------------------------
/src/api/other/transferStr.js:
--------------------------------------------------------------------------------
1 | function transferStr(con) {
2 | if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n))
3 | return "数据非法";
4 | var unit = "千百拾亿千百拾万千百拾元角分", str = "";
5 | n += "00";
6 | var p = n.indexOf('.');
7 | if (p >= 0)
8 | n = n.substring(0, p) + n.substr(p + 1, 2);
9 | unit = unit.substr(unit.length - n.length);
10 | for (var i = 0; i < n.length; i++)
11 | str += '零壹贰叁肆伍陆柒捌玖'.charAt(n.charAt(i)) + unit.charAt(i);
12 | return str.replace(/零(千|百|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
13 | }
14 |
15 | export default transferStr
--------------------------------------------------------------------------------
/src/api/other/url_query.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 获取url后的参数
4 | * @param { url } 传入的url,默认为空
5 | * @returns { Object }
6 | */
7 | function urlQuery(url = "") {
8 | let
9 | query = {},
10 | param = ""
11 | if (url) {
12 | param = url.split("?")[1]
13 | } else if (window.location.search) {
14 | param = window.location.search.replace("?", "")
15 | } else {
16 | return query
17 | }
18 | if(!param) {
19 | return {}
20 | }
21 | param.split("&").forEach(val => {
22 | const
23 | key = val.split("=")[0],
24 | value = val.split("=")[1]
25 | query[key] = value
26 | })
27 | return query
28 | }
29 |
30 | export default urlQuery
31 |
--------------------------------------------------------------------------------
/src/api/storage/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 会话缓存
4 | * @param {String} key
5 | * @param {Any} data
6 | */
7 | function setMemorySes(key, data) {
8 | sessionStorage.setItem(key, JSON.stringify(data))
9 | }
10 |
11 | function getMemorySes(key) {
12 | return JSON.parse(sessionStorage.getItem(key))
13 | }
14 |
15 | /**
16 | * @author xuanzai
17 | * @description 长久缓存
18 | * @param {String} key
19 | * @param {Number | Boolean | String | Object} data
20 | */
21 | function setMemoryPmt(key, data) {
22 | localStorage.setItem(key, JSON.stringify(data))
23 | }
24 | function getMemoryPmt(key) {
25 | return JSON.parse(localStorage.getItem(key))
26 | }
27 |
28 | function clearMemorySes() {
29 | sessionStorage.clear()
30 | }
31 |
32 | function clearMemoryPmt() {
33 | localStorage.clear()
34 | }
35 |
36 | export default {
37 | setMemorySes,
38 | getMemorySes,
39 | setMemoryPmt,
40 | getMemoryPmt,
41 | clearMemorySes,
42 | clearMemoryPmt
43 | }
--------------------------------------------------------------------------------
/src/api/websocket/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 创建websocket实例
4 | * @param {Object} option
5 | * @returns {WebSocket}
6 | */
7 | export default ({
8 | url,
9 | onOpen,
10 | onMessage,
11 | onError,
12 | onClose
13 | }) => {
14 | if (!url) {
15 | throw new Error("请填写连接url")
16 | }
17 | const ws = new WebSocket(url)
18 | ws.addEventListener('open', e => {
19 | onOpen && onOpen(e)
20 | })
21 | ws.addEventListener('message', e => {
22 | onMessage && onMessage(e)
23 | })
24 | ws.addEventListener('error', e => {
25 | onError && onError(e)
26 | })
27 | ws.addEventListener('close', e => {
28 | onClose && onClose(e)
29 | })
30 | return ws
31 | }
--------------------------------------------------------------------------------
/src/assets/error/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/error/404.png
--------------------------------------------------------------------------------
/src/assets/error/above.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/error/above.png
--------------------------------------------------------------------------------
/src/assets/error/below.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/error/below.png
--------------------------------------------------------------------------------
/src/assets/img/file_excle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/img/file_excle.png
--------------------------------------------------------------------------------
/src/assets/img/file_img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/img/file_img.png
--------------------------------------------------------------------------------
/src/assets/img/file_pdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/img/file_pdf.png
--------------------------------------------------------------------------------
/src/assets/img/file_ppt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/img/file_ppt.png
--------------------------------------------------------------------------------
/src/assets/img/file_txt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/img/file_txt.png
--------------------------------------------------------------------------------
/src/assets/img/file_unknown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/img/file_unknown.png
--------------------------------------------------------------------------------
/src/assets/img/file_video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/img/file_video.png
--------------------------------------------------------------------------------
/src/assets/img/file_word.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/img/file_word.png
--------------------------------------------------------------------------------
/src/assets/img/file_zip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/img/file_zip.png
--------------------------------------------------------------------------------
/src/assets/loading/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/loading/loading.gif
--------------------------------------------------------------------------------
/src/assets/loading/loading_2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/loading/loading_2.gif
--------------------------------------------------------------------------------
/src/assets/loading/loading_3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/loading/loading_3.gif
--------------------------------------------------------------------------------
/src/assets/loading/loading_4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/loading/loading_4.gif
--------------------------------------------------------------------------------
/src/assets/login/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/login/background.png
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo.png
--------------------------------------------------------------------------------
/src/assets/logo/Snipaste_2019-07-08_15-04-36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/Snipaste_2019-07-08_15-04-36.png
--------------------------------------------------------------------------------
/src/assets/logo/cat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/cat.png
--------------------------------------------------------------------------------
/src/assets/logo/catforte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/catforte.png
--------------------------------------------------------------------------------
/src/assets/logo/catround.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/catround.png
--------------------------------------------------------------------------------
/src/assets/logo/fish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/fish.png
--------------------------------------------------------------------------------
/src/assets/logo/fishforte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/fishforte.png
--------------------------------------------------------------------------------
/src/assets/logo/fishjoker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/fishjoker.png
--------------------------------------------------------------------------------
/src/assets/logo/fishround.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/fishround.png
--------------------------------------------------------------------------------
/src/assets/logo/hawk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/hawk.png
--------------------------------------------------------------------------------
/src/assets/logo/hawkaround.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/hawkaround.png
--------------------------------------------------------------------------------
/src/assets/logo/hawkforte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/hawkforte.png
--------------------------------------------------------------------------------
/src/assets/logo/hawkjoker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/hawkjoker.png
--------------------------------------------------------------------------------
/src/assets/logo/logo_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/logo_1.png
--------------------------------------------------------------------------------
/src/assets/logo/logo_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/logo_2.png
--------------------------------------------------------------------------------
/src/assets/logo/logo_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/logo_3.png
--------------------------------------------------------------------------------
/src/assets/logo/logo_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/logo_4.png
--------------------------------------------------------------------------------
/src/assets/logo/menu_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/logo/menu_logo.png
--------------------------------------------------------------------------------
/src/assets/thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/thumb.png
--------------------------------------------------------------------------------
/src/assets/welcome/homepage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/welcome/homepage.gif
--------------------------------------------------------------------------------
/src/assets/welcome/welcome.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/welcome/welcome.gif
--------------------------------------------------------------------------------
/src/assets/welcome/welcome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/welcome/welcome.png
--------------------------------------------------------------------------------
/src/assets/welcome/微信图片_20190808164141.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/assets/welcome/微信图片_20190808164141.png
--------------------------------------------------------------------------------
/src/components/SvgIcon/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
34 |
35 |
--------------------------------------------------------------------------------
/src/components/Tinymce/js/toolbar.js:
--------------------------------------------------------------------------------
1 | export default ['searchreplace bold fontsizeselect fontselect indent2em letterspacing italic underline forecolor backcolor strikethrough lineheight alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript', 'layout importword hr bullist numlist link image upfile axupimgs charmap anchor pagebreak insertdatetime media table emoticons code codesample fullscreen bdmap preview help']
--------------------------------------------------------------------------------
/src/components/breadcrumb/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ item.meta.title }}
9 | {{ item.meta.title }}
10 |
11 |
12 |
13 |
14 |
15 |
26 |
27 |
--------------------------------------------------------------------------------
/src/components/color_select/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
49 |
50 |
--------------------------------------------------------------------------------
/src/components/flexbox/flexbox-item.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
63 |
--------------------------------------------------------------------------------
/src/components/flexbox/index.js:
--------------------------------------------------------------------------------
1 | import Flexbox from './flexbox'
2 | import FlexboxItem from './flexbox-item'
3 |
4 | export {
5 | Flexbox,
6 | FlexboxItem
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/icon_select/requireIcons.js:
--------------------------------------------------------------------------------
1 |
2 | const req = require.context('@/icons/svg', false, /\.svg$/)
3 | const requireAll = requireContext => requireContext.keys()
4 |
5 | const re = /\.\/(.*)\.svg/
6 |
7 | const icons = requireAll(req).map(i => {
8 | return i.match(re)[1]
9 | })
10 |
11 | export default icons
12 |
--------------------------------------------------------------------------------
/src/components/upload_list/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/src/components/vuePictureViewer/img/pre_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/components/vuePictureViewer/img/pre_close.png
--------------------------------------------------------------------------------
/src/components/vuePictureViewer/img/pre_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/components/vuePictureViewer/img/pre_down.png
--------------------------------------------------------------------------------
/src/components/vuePictureViewer/img/pre_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/components/vuePictureViewer/img/pre_left.png
--------------------------------------------------------------------------------
/src/components/vuePictureViewer/img/pre_max.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/components/vuePictureViewer/img/pre_max.png
--------------------------------------------------------------------------------
/src/components/vuePictureViewer/img/pre_min.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/components/vuePictureViewer/img/pre_min.png
--------------------------------------------------------------------------------
/src/components/vuePictureViewer/img/pre_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/components/vuePictureViewer/img/pre_right.png
--------------------------------------------------------------------------------
/src/components/vuePictureViewer/img/pre_rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MikuBlog/xz-admin/f05258b87f86cd1143d782ef99e1c4917316bae5/src/components/vuePictureViewer/img/pre_rotate.png
--------------------------------------------------------------------------------
/src/global/css/animation.css:
--------------------------------------------------------------------------------
1 | .bread-list-enter-active, .bread-list-leave-active {
2 | transition: all .5s;
3 | }
4 |
5 | .bread-list-enter, .bread-list-leave-active {
6 | opacity: 0;
7 | transform: translateX(20px);
8 | }
9 |
10 | .bread-list-move {
11 | transition: all .5s;
12 | }
13 |
14 | .bread-list-leave-active {
15 | position: absolute;
16 | }
17 |
18 | .xz-animation-enter-active, .xz-animation-leave-active {
19 | transition: all .5s;
20 | }
21 |
22 | .xz-animation-enter {
23 | opacity: 0;
24 | transform: translateX(-30px);
25 | }
26 |
27 | .xz-animation-leave-to {
28 | opacity: 0;
29 | transform: translateX(30px);
30 | }
--------------------------------------------------------------------------------
/src/global/css/media.css:
--------------------------------------------------------------------------------
1 | @media screen and (min-width: 1920px) {
2 | .card-gutter-xl {
3 | margin-top: 1rem;
4 | }
5 | }
6 |
7 | @media screen and (max-width: 1919px) {
8 | .card-gutter-lg {
9 | margin-top: 1rem;
10 | }
11 | }
12 |
13 | @media screen and (max-width: 1199px) {
14 | .card-gutter-md {
15 | margin-top: 1rem;
16 | }
17 | }
18 |
19 | @media screen and (max-width: 991px) {
20 | .card-gutter-sm {
21 | margin-top: 1rem;
22 | }
23 | }
24 |
25 | @media screen and (max-width: 767px) {
26 | .card-gutter-xs {
27 | margin-top: 1rem;
28 | }
29 | }
--------------------------------------------------------------------------------
/src/global/js/pages.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 暴露公共页面,无需权限访问(页面组件的注册在src/router/router.js下完成)
4 | * @param {String} 数组元素为路由名称
5 | */
6 | export default [
7 |
8 | ]
--------------------------------------------------------------------------------
/src/icons/index.js:
--------------------------------------------------------------------------------
1 | const requireAll = requireContext => requireContext.keys().map(requireContext)
2 | const req = require.context('./svg', false, /\.svg$/)
3 | requireAll(req)
4 |
5 |
--------------------------------------------------------------------------------
/src/icons/svg/06-商品管理.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/add.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/bug.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/chain.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/codeConsole.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/dev.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/develop.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/dictionary.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/error.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/font-size.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/full-screen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/gonggao.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/iconfont.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/image.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/lock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/markdown-fill.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/markdown.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/menu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/monitor.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/password.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/peoples.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/permission.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/redis.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/running.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/sqlMonitor.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/timing.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/unlock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/user1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/validCode.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/visits.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/zujian.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/个人中心.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/任务.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/会员预约.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/全屏.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/写文章.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/制作优惠券.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/勾.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/叉叉.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/商品列表1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/图表.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/安全.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/导航.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/导航_2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/岗位图标.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/平台介绍.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/异常.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/微信支付.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/拼团列表.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/数据.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/文件.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/文章管理.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/权限.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/权限管理.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/清除缓存.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/用户.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/用户管理.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/积分-实色.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/等级.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/菜单_2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/菜单管理.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/营销.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/规格.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/订单.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/评论.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/部门管理.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/项目.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svgo.yml:
--------------------------------------------------------------------------------
1 | # replace default config
2 |
3 | # multipass: true
4 | # full: true
5 |
6 | plugins:
7 |
8 | # - name
9 | #
10 | # or:
11 | # - name: false
12 | # - name: true
13 | #
14 | # or:
15 | # - name:
16 | # param1: 1
17 | # param2: 2
18 |
19 | - removeAttrs:
20 | attrs:
21 | - 'fill'
22 | - 'fill-rule'
23 |
--------------------------------------------------------------------------------
/src/initial/UI/elementUI.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | // 引入element-ui框架
3 | import ElementUI from 'element-ui'
4 |
5 | // 加入element-ui组件
6 | Vue.use(ElementUI)
--------------------------------------------------------------------------------
/src/initial/UI/iviewUI.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | // 引入iview框架
3 | import {
4 | Drawer,
5 | Select,
6 | Option,
7 | } from 'view-design'
8 |
9 | // 引入iview抽屉组件
10 | Vue.component('Drawer', Drawer)
11 | // 引入iview下拉框组件
12 | Vue.component('Select', Select)
13 | // 引入iview下拉框选项组件
14 | Vue.component('Option', Option)
--------------------------------------------------------------------------------
/src/initial/directives/index.js:
--------------------------------------------------------------------------------
1 | import permission from './permission'
2 | import dialogDrag from './dialog_drag'
3 |
4 | export default {
5 | permission,
6 | dialogDrag
7 | }
--------------------------------------------------------------------------------
/src/initial/directives/initial_size.js:
--------------------------------------------------------------------------------
1 | import style from '@/api/dom/set_style'
2 | /**
3 | * @author xuanzai
4 | * @description 初始化元素大小,强制适应目标元素的宽高(废弃)
5 | */
6 | let ele, val
7 |
8 | function initialSize() {
9 | style.setStyle(ele, {
10 | width: `${document.querySelector(val).offsetWidth}px`,
11 | height: `${document.querySelector(val).offsetHeight}px`
12 | })
13 | }
14 |
15 | function initialListener(el, binding) {
16 | ele = el
17 | val = binding.value
18 | initialSize()
19 | window.addEventListener('resize', initialSize)
20 | }
21 |
22 | function removeListener() {
23 | window.removeEventListener('resize', initialSize)
24 | }
25 |
26 | export default {
27 | inserted: initialListener,
28 | unbind: removeListener
29 | }
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/initial/directives/permission.js:
--------------------------------------------------------------------------------
1 | import Permission from '@/utils/permission'
2 | /**
3 | * @author xuanzai
4 | * @description 通过v-permission调用该指令
5 | */
6 | function permission (el, binding) {
7 | Permission(binding.value.permission)
8 | ? el.style.display = binding.value.style || 'block'
9 | : el.style.display = "none"
10 | }
11 |
12 | export default {
13 | inserted: permission,
14 | update: permission,
15 | componentUpdated: permission
16 | }
--------------------------------------------------------------------------------
/src/initial/error_log.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import store from '@/store'
3 |
4 | Vue.config.errorHandler = function (err, vm, info) {
5 | store.commit("SET_ERROR_LOG", {
6 | err,
7 | info,
8 | url: window.location.href
9 | })
10 | }
11 |
--------------------------------------------------------------------------------
/src/initial/filter.js:
--------------------------------------------------------------------------------
1 | const isEmpty = (val) => {
2 | if(val == null || val == "" || val == undefined) {
3 | return true
4 | }else {
5 | return false
6 | }
7 | }
8 |
9 | const transfer = (val) => {
10 | return val < 10 ? `0${val}` : val
11 | }
12 |
13 | /**
14 | * @author xuanzai
15 | * @description 日期格式化
16 | * @param {String} val
17 | * @param {String} format
18 | * @returns {String} result
19 | */
20 | const formatDate = (val, format) => {
21 | if(isEmpty(val)) return
22 | let
23 | date = new Date(val),
24 | y = date.getFullYear(),
25 | m = date.getMonth() + 1,
26 | d = date.getDate(),
27 | h = date.getHours(),
28 | min = date.getMinutes(),
29 | s = date.getSeconds(),
30 | result = ""
31 | if(format == undefined) {
32 | result = `${y}-${transfer(m)}-${transfer(d)} ${transfer(h)}-${transfer(min)}-${transfer(s)}`
33 | }
34 | if(format == 'yyyy-mm-dd') {
35 | result = `${y}-${transfer(m)}-${transfer(d)}`
36 | }
37 | if(format == 'yyyy-mm') {
38 | result = `${y}-${transfer(m)}`
39 | }
40 | if(format == 'mm-dd') {
41 | result = `${transfer(m)}-${transfer(d)}`
42 | }
43 | if(format == 'hh:mm') {
44 | result = `${transfer(h)}:${transfer(min)}`
45 | }
46 | if(format == 'yyyy') {
47 | result = `${y}`
48 | }
49 | return result
50 | }
51 |
52 | export default {
53 | formatDate
54 | }
--------------------------------------------------------------------------------
/src/initial/filter/formatDate.js:
--------------------------------------------------------------------------------
1 | const isEmpty = (val) => {
2 | if(val == null || val == "" || val == undefined) {
3 | return true
4 | }else {
5 | return false
6 | }
7 | }
8 |
9 | const transfer = (val) => {
10 | return val < 10 ? `0${val}` : val
11 | }
12 |
13 | /**
14 | * @author xuanzai
15 | * @description 日期格式化
16 | * @param {String} val
17 | * @param {String} format
18 | * @returns {String} result
19 | */
20 | const formatDate = (val, format) => {
21 | if(isEmpty(val)) return
22 | let
23 | date = new Date(val),
24 | y = date.getFullYear(),
25 | m = date.getMonth() + 1,
26 | d = date.getDate(),
27 | h = date.getHours(),
28 | min = date.getMinutes(),
29 | s = date.getSeconds(),
30 | result = ""
31 | if(format == undefined) {
32 | result = `${y}-${transfer(m)}-${transfer(d)} ${transfer(h)}-${transfer(min)}-${transfer(s)}`
33 | }
34 | if(format == 'yyyy-mm-dd') {
35 | result = `${y}-${transfer(m)}-${transfer(d)}`
36 | }
37 | if(format == 'yyyy-mm') {
38 | result = `${y}-${transfer(m)}`
39 | }
40 | if(format == 'mm-dd') {
41 | result = `${transfer(m)}-${transfer(d)}`
42 | }
43 | if(format == 'hh:mm') {
44 | result = `${transfer(h)}:${transfer(min)}`
45 | }
46 | if(format == 'yyyy') {
47 | result = `${y}`
48 | }
49 | return result
50 | }
51 |
52 | export default formatDate
--------------------------------------------------------------------------------
/src/initial/filter/formatMoney.js:
--------------------------------------------------------------------------------
1 | const formatMoney = (n,c,d,t) => {
2 | var c = isNaN(c = Math.abs(c)) ? 2 : c,//保留的小数位
3 | d = d === undefined ? "." : d,//整数和小数的分隔符
4 | t = t === undefined ? "," : t,//千分符
5 | s = n < 0 ? "-" : "",//正负
6 | i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(c))),//整数部分
7 | j = (j = i.length) > 3 ? j % 3 : 0;//不整3的前面的位数长度
8 | return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
9 | }
10 | export default formatMoney
--------------------------------------------------------------------------------
/src/initial/filter/index.js:
--------------------------------------------------------------------------------
1 | import formatDate from './formatDate'
2 | import formatMoney from './formatMoney'
3 | export default {
4 | formatDate,
5 | formatMoney
6 | }
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from '@/App.vue'
3 | import router from '@/router'
4 | import store from '@/store'
5 | /**
6 | * @author xuanzai
7 | * @description api模块初始化。在如下路径文件下引入模块即可。
8 | */
9 | import '@/initial/modules'
10 | /**
11 | * @author xuanzai
12 | * @description 全局过滤器初始化。在如下路径文件下全局注册过滤器即可。
13 | */
14 | import filters from '@/initial/filter/index'
15 |
16 | // 全局注册过滤器
17 | Object
18 | .keys(filters)
19 | .forEach(key => {
20 | Vue.filter(key, filters[key])
21 | })
22 |
23 | /**
24 | * @author xuanzai
25 | * @description 全局指令初始化。在如下路径文件下全局注册指令即可。
26 | */
27 | import directives from '@/initial/directives/index'
28 |
29 | // 全局注册指令
30 | Object
31 | .keys(directives)
32 | .forEach(key => {
33 | Vue.directive(key, {
34 | // 只调用一次,指令第一次绑定到元素时调用
35 | bind: directives[key].bind || (() => {}),
36 | // 被绑定元素插入父节点时调用
37 | inserted: directives[key].inserted || (() => {}),
38 | // 所在组件的 VNode 更新时调用,但是可能发生在其子 VNode 更新之前
39 | update: directives[key].update || (() => {}),
40 | // 指令所在组件的 VNode 及其子 VNode 全部更新后调用
41 | componentUpdated: directives[key].componentUpdated || (() => {}),
42 | // 只调用一次,指令与元素解绑时调用
43 | unbind: directives[key].unbind || (() => {})
44 | })
45 | })
46 |
47 | /**
48 | * @author xuanzai
49 | * @description 全局注册组件。
50 | */
51 | const req = require.context('@/components', true, /index\.vue$/)
52 |
53 | // 全局注册组件
54 | req
55 | .keys()
56 | .forEach(val => {
57 | const component = req(val).default
58 | Vue.component(component.name, component)
59 | })
60 |
61 | new Vue({
62 | router,
63 | store,
64 | render: h => h(App)
65 | }).$mount('#app')
66 |
--------------------------------------------------------------------------------
/src/router/router.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | Vue.use(Router)
5 |
6 | const
7 | Login = () => import('@/views/login/template_1'),
8 | NotFound = () => import('@/views/error/404')
9 |
10 | const router = new Router({
11 | mode: 'history',
12 | base: process.env.BASE_URL,
13 | routes: [{
14 | path: '/login',
15 | name: 'login',
16 | component: Login
17 | }, {
18 | path: '/404',
19 | name: '404',
20 | meta: {
21 | title: "404"
22 | },
23 | component: NotFound
24 | }]
25 | })
26 |
27 | export default router
--------------------------------------------------------------------------------
/src/router/visit.js:
--------------------------------------------------------------------------------
1 | import Http from '@/api/http/index.js'
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import user from './modules/user'
4 | import menu from './modules/menu'
5 | import tags from './modules/tags'
6 | import global from './modules/global.js'
7 | import setting from './modules/setting'
8 | import breadcrumb from './modules/breadcrumb'
9 | import cacheViews from './modules/cache_views'
10 | import tableHeight from './modules/table'
11 | import error from './modules/error'
12 |
13 | Vue.use(Vuex)
14 |
15 | export default new Vuex.Store({
16 | modules: {
17 | user,
18 | menu,
19 | tags,
20 | global,
21 | setting,
22 | breadcrumb,
23 | cacheViews,
24 | tableHeight,
25 | error
26 | }
27 | })
28 |
--------------------------------------------------------------------------------
/src/store/modules/breadcrumb.js:
--------------------------------------------------------------------------------
1 | const
2 | state = {
3 | breadcrumbList: [{
4 | path: "/home/welcome",
5 | meta: {
6 | title: "首页" ,
7 | }
8 | }]
9 | },
10 | mutations = {
11 | // 设置面包屑
12 | SET_CRUMB_LIST(state, arr) {
13 | state.breadcrumbList.push(...arr)
14 | },
15 | // 清空面包屑
16 | CLEAR_CRUMB_LIST(state, obj) {
17 | state.breadcrumbList.splice(1)
18 | }
19 | }
20 |
21 | export default {
22 | state,
23 | mutations
24 | }
--------------------------------------------------------------------------------
/src/store/modules/cache_views.js:
--------------------------------------------------------------------------------
1 | const
2 | state = {
3 | cacheViews: []
4 | },
5 | mutations = {
6 | // 设置缓存页面列表
7 | SET_CACHE_VIEWS(state, arr) {
8 | arr.forEach(val => {
9 | if(val.cache) {
10 | const cacheName = val.path.replace(/\//g, "")
11 | state.cacheViews.push(cacheName)
12 | }
13 | })
14 | },
15 | // 添加缓存页面
16 | ADD_CACHE_VIEWS(state, tag) {
17 | if(tag.meta.cache) {
18 | state.cacheViews.push(tag.meta.cacheName)
19 | }
20 | },
21 | // 清除缓存页面
22 | DEL_CACHE_VIEWS(state, tag) {
23 | const index = state.cacheViews.indexOf(tag.meta.cacheName)
24 | if(index > -1) {
25 | state.cacheViews.splice(index, 1)
26 | }
27 | }
28 | }
29 |
30 | export default {
31 | state,
32 | mutations
33 | }
--------------------------------------------------------------------------------
/src/store/modules/error.js:
--------------------------------------------------------------------------------
1 | const
2 | state = {
3 | errorLogList: []
4 | },
5 | mutations = {
6 | // 设置前端错误日志
7 | SET_ERROR_LOG(state, obj) {
8 | state.errorLogList.push(obj)
9 | },
10 | // 清空前端错误日志
11 | REMOVE_ALL_ERROR_LOG(state) {
12 | state.errorLogList.splice(0)
13 | }
14 | }
15 |
16 | export default {
17 | state,
18 | mutations
19 | }
--------------------------------------------------------------------------------
/src/store/modules/global.js:
--------------------------------------------------------------------------------
1 | const
2 | state = {
3 | // logo地址
4 | logoUrl: ""
5 | },
6 | mutations = {
7 | // 设置logo地址
8 | SET_LOGO_URL(state, url) {
9 | state.logoUrl = url
10 | }
11 | }
12 |
13 | export default {
14 | state,
15 | mutations
16 | }
--------------------------------------------------------------------------------
/src/store/modules/menu.js:
--------------------------------------------------------------------------------
1 | const
2 | state = {
3 | menuList: []
4 | },
5 | mutations = {
6 | // 设置菜单
7 | SET_MENU_LIST(state, obj) {
8 | state.menuList = obj
9 | }
10 | }
11 |
12 | export default {
13 | state,
14 | mutations
15 | }
--------------------------------------------------------------------------------
/src/store/modules/table.js:
--------------------------------------------------------------------------------
1 | import store from '../index'
2 | // 用于动态固定表格高度
3 | const
4 | state = {
5 | tableHeight: 0
6 | },
7 | mutations = {
8 | SET_TABLE_HEIGHT(state, height) {
9 | state.tableHeight = height
10 | }
11 | }
12 |
13 | window.addEventListener('load', e => {
14 | store.commit('SET_TABLE_HEIGHT', document.body.clientHeight - 280)
15 | })
16 |
17 | window.addEventListener('resize', e => {
18 | store.commit('SET_TABLE_HEIGHT', document.body.clientHeight - 280)
19 | })
20 |
21 | export default {
22 | state,
23 | mutations
24 | }
--------------------------------------------------------------------------------
/src/store/modules/user.js:
--------------------------------------------------------------------------------
1 | const
2 | state = {
3 | id: "",
4 | username: "",
5 | sex: "",
6 | nickname: "",
7 | avatar: "",
8 | createTime: "",
9 | dept: "",
10 | email: "",
11 | job: "",
12 | phone: "",
13 | roles: []
14 | },
15 | mutations = {
16 | // 保存用户信息
17 | SET_USER_INFO(state, obj) {
18 | for(let key in obj)
19 | state[key] = obj[key]
20 | },
21 | }
22 |
23 | export default {
24 | state,
25 | mutations
26 | }
--------------------------------------------------------------------------------
/src/utils/agent.js:
--------------------------------------------------------------------------------
1 | /* 判断浏览器类型 */
2 |
3 | // 判断是否为IE浏览器
4 | export function isIE() {
5 | return /trident/ig.test(navigator.userAgent)
6 | }
7 |
8 | // 判断是否为safari浏览器
9 | export function isSafari() {
10 | return /safari/ig.test(navigator.userAgent) && !/chrome/ig.test(navigator.userAgent)
11 | }
12 |
13 | /* 判断设备类型 */
14 |
15 | // 判断环境是否为移动端
16 | export function isMobile() {
17 | const
18 | mobileAgent = new Array("iphone", "ipod", "ipad", "android", "mobile", "blackberry", "webos", "incognito", "webmate", "bada", "nokia", "lg", "ucweb", "skyfire"),
19 | browser = navigator.userAgent.toLowerCase()
20 | for (var i = 0, len = mobileAgent.length; i < len; i++) {
21 | if (browser.indexOf(mobileAgent[i]) != -1) {
22 | return true
23 | }
24 | }
25 | return false
26 | }
27 |
28 | // 判断环境是否为ipad(safari浏览器上失效)
29 | export function isIpad() {
30 | const
31 | mobileAgent = "ipad",
32 | browser = navigator.userAgent.toLowerCase()
33 | if (browser.indexOf(mobileAgent) != -1) {
34 | return true
35 | }
36 | }
37 |
38 | /* 判断操作系统类型 */
39 |
40 | // 判断环境是否为macos
41 | export function isMacos() {
42 | return /macintosh|mac os x/ig.test(navigator.userAgent)
43 | }
44 |
45 | // 判断环境是否为linux(安卓手机为linux内核,返回值为true)
46 | export function isLinux() {
47 | return /linux/ig.test(navigator.userAgent)
48 | }
49 |
50 | // 判断环境是否为window
51 | export function isWindowos() {
52 | return /windows/ig.test(navigator.userAgent)
53 | }
54 |
55 | // 判断环境是否为安卓
56 | export function isAndroidos() {
57 | return /android/ig.test(navigator.userAgent)
58 | }
59 |
60 | // 判断环境是否ios(ipad与mac电脑返回值也为true)
61 | export function isIos() {
62 | return /ios/ig.test(navigator.userAgent)
63 | }
--------------------------------------------------------------------------------
/src/utils/convertHttp.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 判断静态文件是否为http或https开头(prefixUrl定义在public/assets/js/baseUrl.js下)
4 | * @param {String} url 文件路径
5 | * @returns {String} 文件地址
6 | */
7 | export default (url) => {
8 | const regexp = new RegExp(/^http/)
9 | if(!url) return require('@/assets/thumb.png')
10 | if (regexp.test(url)) {
11 | return url
12 | } else {
13 | return `${prefixUrl}${url.replace(/\\/g, '/').replace(/[ ]/g, '%20')}`
14 | }
15 | }
--------------------------------------------------------------------------------
/src/utils/encrypt.js:
--------------------------------------------------------------------------------
1 | import { JSEncrypt } from 'jsencrypt'
2 |
3 | const publicKey = `MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCiR+TyuZ0xfiBM0JuaQ49BG+pM
4 | jwJYzzeliGbHB0UAgf/G7Y5pMk9VbudyAWDZjinoRSgSTMWgK6X0rkpO4T1bsMzm
5 | MR0jgc6qQaRbzr2AHB9FsUIoRDjCekRK/ScmvSg80o361/jLo2grG7eUrjwyziuE
6 | 1jLZgtEAoFZ+PaStjQIDAQAB`
7 |
8 | const privateKey = `MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAN1CXyESb2fPfqvQ
9 | cDpTzdk9NZTrP6OPNlWb3cEf6hkEgEW8RGjXqmZB7hqmP78T31xI6Cvi9lP4Qejd
10 | SgNd0/HiZDO5xNnbDhUzbuyCqYOjUoLBTMkSgaIH/kgnXgIDLDYkBpAG+3zBvwUu
11 | 9U9STHGjN/Zsg1SVBHijqFQPEa4PAgMBAAECgYBLHj+B0Op1yiJtXqTbiJw4huls
12 | F7pRY0vFINfWu2kU+Uw7YMGw/pdhhDy8W3kE/FA22qHIVJPgykZGMurv3akYskRh
13 | T4TdkgL2iUewf12Vc8kjNeMpWJu2T6BXeS+QZoPmgtykm5hKh7Er5zwkT0odmn4a
14 | +3YlwgVqehS8BRH+4QJBAPmeGMAAdMrqQU406Mjaou1Jq3GUa9yb3ace+RrXrsq9
15 | /1lzoQSYJeUG+l6A5P4+rPsyl+L9GuXASClf2rR0dtcCQQDi6qbuX+RlqqTtO1/x
16 | VVKxZwmgDFFiqkulZGqHn3VGsavRU3Oksu8JIlASy63fc3HPEwtDt96arknXgrzB
17 | kPOJAkA0TXAaKv5N1i/A100/aLBiz+Dgd5zyKKaU8eR4P2EckhsC/ztp3wdxqbik
18 | PJW+wBs2ty8kHKyaH2P/Z1pIHW8ZAkB4IO+kzKE2bWOIr+E3+wqfHkRLNZo0WKFZ
19 | etKm3/UPKuoiFELpk0zWkhLAEJII9K3wiU1yWToAu3oeHHlfJCS5AkEAn2FrRjKc
20 | mZbD39KeUE7nehDmC0HDSrZA2QxPqfhvlKg/LsskkNl076uNXR2EZY/xpYr71goU
21 | AVu+/t/OFgTC0g==`
22 |
23 | // 加密
24 | export function encrypt(txt) {
25 | const encryptor = new JSEncrypt()
26 | encryptor.setPublicKey(publicKey) // 设置公钥
27 | return encryptor.encrypt(txt) // 对需要加密的数据进行加密
28 | }
29 |
30 | // 解密
31 | export function decrypt(txt) {
32 | const encryptor = new JSEncrypt()
33 | encryptor.setPrivateKey(privateKey)
34 | return encryptor.decrypt(txt)
35 | }
36 |
--------------------------------------------------------------------------------
/src/utils/get_file_icon.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 传入文件url获取对应的文件图片
4 | * @returns String
5 | */
6 | export function getFileTypeIconWithSuffix(ext) {
7 | if (arrayContain(['jpg', 'png', 'gif'], ext)) {
8 | return require('@/assets/img/file_img.png')
9 | } else if (arrayContain(['mp4', 'mp3', 'avi'], ext)) {
10 | return require('@/assets/img/file_excle.png')
11 | } else if (arrayContain(['xlsx', 'xls', 'XLSX', 'XLS'], ext)) {
12 | return require('@/assets/img/file_excle.png')
13 | } else if (arrayContain(['doc', 'docx', 'DOC', 'DOCX'], ext)) {
14 | return require('@/assets/img/file_word.png')
15 | } else if (arrayContain(['rar', 'zip'], ext)) {
16 | return require('@/assets/img/file_zip.png')
17 | } else if (ext === 'pdf') {
18 | return require('@/assets/img/file_pdf.png')
19 | } else if (ext === 'ppt' || ext === 'pptx') {
20 | return require('@/assets/img/file_ppt.png')
21 | } else if (arrayContain(['txt', 'text'], ext)) {
22 | return require('@/assets/img/file_txt.png')
23 | }
24 | return require('@/assets/img/file_unknown.png')
25 | }
--------------------------------------------------------------------------------
/src/utils/permission.js:
--------------------------------------------------------------------------------
1 | import store from '@/store'
2 | export default function(value) {
3 | if (value && value instanceof Array && value.length > 0) {
4 | const roles = store.state.user && store.state.user.roles
5 | const permissionRoles = value
6 | const hasPermission = roles.some(role => {
7 | return permissionRoles.includes(role)
8 | })
9 | if (!hasPermission) {
10 | return false
11 | }
12 | return true
13 | } else {
14 | console.error(`need roles! Like v-permission="['admin','editor']"`)
15 | return false
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/utils/type.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author xuanzai
3 | * @description 类型检测
4 | * @param {*} val
5 | * @returns {String}
6 | */
7 | function type(val) {
8 | return Object
9 | .prototype
10 | .toString
11 | .call(val)
12 | .split(' ')[1]
13 | .split(']')[0]
14 | .toLowerCase()
15 | }
16 |
17 | [
18 | "Number",
19 | "Boolean",
20 | "String",
21 | "Object",
22 | "Null",
23 | "Undefined",
24 | "Symbol",
25 | "Array",
26 | "Date"
27 | ].forEach(value => {
28 | type[`is${value}`] = (val) => {
29 | return type(val) === value.toLowerCase()
30 | }
31 | })
32 |
33 | export default type
34 |
--------------------------------------------------------------------------------
/src/utils/validate.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @description 验证是否为邮箱
3 | * @param {String} s
4 | */
5 | export function isEmail(s) {
6 | return /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s)
7 | }
8 | /**
9 | * @description 验证是否为电话号码
10 | * @param {String} s
11 | */
12 | export function isPhone(s) {
13 | return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s)
14 | }
15 | /**
16 | * @description 验证是否为手机号码
17 | * @param {String} s
18 | */
19 | export function isMobile(s) {
20 | return /^1[3-9]\d{9}$/.test(s)
21 | }
22 | /**
23 | * @description 验证是否为身份证号码
24 | * @param {String} s
25 | */
26 | export function isId(e) {
27 | return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(s)
28 | }
29 | /**
30 | * @description 验证是否为网络地址
31 | * @param {String} s
32 | */
33 | export function isURL(s) {
34 | return /^http[s]?:\/\/.*/.test(s)
35 | }
36 | /**
37 | * @description 验证是否为全小写
38 | * @param {String} s
39 | */
40 | export function isLowerCase(s) {
41 | return /^[a-z]+$/.test(s)
42 | }
43 | /**
44 | * @description 验证是否为全大写
45 | * @param {String} s
46 | */
47 | export function isUpperCase(s) {
48 | return /^[A-Z]+$/.test(s)
49 | }
50 | /**
51 | * @description 验证是否为颜色值
52 | * @param {String} s
53 | */
54 | export function isColor(color) {
55 | return new RegExp(/^#([\da-f]{3}){1,2}$/gi).test(color)
56 | }
57 |
--------------------------------------------------------------------------------
/src/views/Layout/components/drawer/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | 保存设置
16 |
17 |
18 |
19 |
20 |
42 |
43 |
--------------------------------------------------------------------------------
/src/views/Layout/components/menu_button/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
19 |
20 |
--------------------------------------------------------------------------------
/src/views/Layout/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | isCollapse: false,
5 | isSmall: false,
6 | isMini: false,
7 | isMenuCollapse: false,
8 | isSetting: false,
9 | activeName: 'layout',
10 | logoBlob: "",
11 | user: {}
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/views/dashboard/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | created() {
3 | // this.getChartData()
4 | // this.getVisitData()
5 | },
6 | methods: {
7 | // 获取访问记录统计表
8 | getChartData() {
9 | this.$http_json({
10 | url: "/api/visit/chartData",
11 | method: "get"
12 | }).then(result => {
13 | console.log(result.data)
14 | })
15 | },
16 | // 获取访问记录
17 | getVisitData() {
18 | this.$http_json({
19 | url: "/api/visit/get",
20 | method: "get"
21 | }).then(result => {
22 | console.log(result)
23 | })
24 | }
25 | },
26 | }
--------------------------------------------------------------------------------
/src/views/dashboard/scss/index.scss:
--------------------------------------------------------------------------------
1 | .chart {
2 | position: relative;
3 | }
4 | .box-card {
5 | position: relative;
6 | margin: 0.5rem 0;
7 | }
8 | .el-icon-user-solid,
9 | .el-icon-document,
10 | .el-icon-coin,
11 | .el-icon-shopping-cart-1 {
12 | position: relative;
13 | line-height: 5rem;
14 | font-size: 4rem;
15 | color: #13af7b;
16 | padding: 1rem;
17 | transition: 0.5s;
18 | border-radius: 1rem;
19 | }
20 | .el-icon-user-solid:hover {
21 | color: #fefefe;
22 | background: #13af7b;
23 | }
24 | .el-icon-document {
25 | color: #38A1F2;
26 | }
27 | .el-icon-document:hover {
28 | color: #fefefe;
29 | background: rgb(52, 151, 228);
30 | }
31 | .el-icon-coin {
32 | color: #ee2546;
33 | }
34 | .el-icon-coin:hover {
35 | color: #fefefe;
36 | background: #ee2546;
37 | }
38 | .el-icon-shopping-cart-1 {
39 | color: #ffbb00;
40 | }
41 | .el-icon-shopping-cart-1:hover {
42 | color: #fefefe;
43 | background: #ffbb00;
44 | }
45 | .content-box {
46 | position: relative;
47 | top: 1.8rem;
48 | font-size: 1.1rem;
49 | color: #8b8b8b;
50 | text-align: right;
51 | padding-right: 0.5rem;
52 | }
53 | .number {
54 | font-weight: bolder;
55 | color: #656565;
56 | font-size: 1.2rem;
57 | }
58 | @media screen and (max-width: 767px) {
59 | .content-box {
60 | text-align: center;
61 | top: 0;
62 | padding-right: 0;
63 | }
64 | }
--------------------------------------------------------------------------------
/src/views/error/403.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/views/error/404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/views/error/500.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/views/log/authority_log/components/detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 操作前的值
6 | {{authorityOldDetail}}
7 |
8 |
9 | 操作后的值
10 | {{authorityNewDetail}}
11 |
12 |
13 |
14 |
15 |
16 |
27 |
28 |
--------------------------------------------------------------------------------
/src/views/log/authority_log/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 分页处理
4 | initialPage(totalElements) {
5 | this.totalElements = totalElements;
6 | },
7 | // 初始化操作类型
8 | initialOperationType(type) {
9 | switch (type) {
10 | case 1:
11 | return "用户";
12 | case 2:
13 | return "角色";
14 | case 3:
15 | return "权限";
16 | case 4:
17 | return "部门";
18 | case 5:
19 | return "岗位";
20 | case 6:
21 | return "菜单";
22 | }
23 | },
24 | // 初始化权限日志列表
25 | initialAuthorityLogList(list) {
26 | this.authorityLogList.splice(0);
27 | list.forEach(value => {
28 | value.type = this.initialOperationType(value.type);
29 | this.authorityLogList.push(value);
30 | });
31 | },
32 | // 获取权限日志信息
33 | getAuthorityLogList(page, size) {
34 | this.$http_normal({
35 | url: `/api/authLog/page?page=${page - 1}&size=${size}&sort=createTime,desc${
36 | this.selectType_1 ? `&${this.selectType_1}=${this.searchVal}` : ""
37 | }${
38 | this.date
39 | ? `&greatCreatedAt=${this.dateArray[0]}&lessCreatedAt=${this.dateArray[1]}`
40 | : ""
41 | }${this.selectType_2 ? `&type=${this.selectType_2}` : ""}`,
42 | method: "get"
43 | }).then(result => {
44 | const data = result.data;
45 | this.initialPage(data.totalElements);
46 | this.initialAuthorityLogList(data.content);
47 | });
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/src/views/log/authority_log/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | searchVal: "",
5 | selectType_1: "",
6 | selectType_2: "",
7 | title: "",
8 | date: "",
9 | dateArray: [],
10 | authorityOldDetail: "",
11 | authorityNewDetail: "",
12 | dialogVisible: false,
13 | authorityLogList: [],
14 | // 当前页数
15 | nowPage: 1,
16 | // 当前页条数
17 | nowSize: 10,
18 | // 总条数
19 | totalElements: 0,
20 | options_1: [
21 | {
22 | value: "creatorName",
23 | label: "操作者"
24 | },
25 | {
26 | value: "name",
27 | label: "描述"
28 | }
29 | ],
30 | options_2: [
31 | {
32 | value: "1",
33 | label: "用户"
34 | },
35 | {
36 | value: "2",
37 | label: "角色"
38 | },
39 | {
40 | value: "3",
41 | label: "权限"
42 | },
43 | {
44 | value: "4",
45 | label: "部门"
46 | },
47 | {
48 | value: "5",
49 | label: "岗位"
50 | },
51 | {
52 | value: "6",
53 | label: "菜单"
54 | }
55 | ]
56 | };
57 | }
58 | }
--------------------------------------------------------------------------------
/src/views/log/exception_log/components/detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ exceptionDetail }}
4 |
5 |
6 |
7 |
17 |
18 |
--------------------------------------------------------------------------------
/src/views/log/exception_log/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 分页处理
4 | initialPage(totalElements) {
5 | this.totalElements = totalElements;
6 | },
7 | // 初始化错误日志列表
8 | initialExceptionLogList(list) {
9 | this.exceptionLogList.splice(0);
10 | list.forEach(value => {
11 | this.exceptionLogList.push(value);
12 | });
13 | },
14 | // 获取错误日志信息
15 | getExceptionLogList(page, size) {
16 | this.$http_normal({
17 | url: `/api/log/page/error?page=${page - 1}&size=${size}&sort=createdAt,desc${
18 | this.selectType ? `&${this.selectType}=${this.searchVal}` : ""
19 | }`,
20 | method: "get"
21 | }).then(result => {
22 | const data = result.data;
23 | this.initialPage(data.totalElements);
24 | this.initialExceptionLogList(data.content);
25 | });
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/views/log/exception_log/js/operation.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 重置
4 | refresh() {
5 | this.searchVal = ""
6 | this.selectType = ""
7 | this.$refs.pagination.toFirstPage()
8 | },
9 | // 点击搜索
10 | search() {
11 | this.selectType
12 | ? this.$refs.pagination.toFirstPage()
13 | : this.$warnMsg("请选择搜索类型");
14 | },
15 | // 显示具体错误信息
16 | showDetail(id) {
17 | this.$http_json({
18 | url: `/log/page/error/${id}`,
19 | method: "get"
20 | }).then(result => {
21 | const Detail = this.$refs.Detail
22 | Detail.dialogVisible = true;
23 | Detail.exceptionDetail = result.data.exception;
24 | });
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/views/log/exception_log/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | pagination: "",
5 | searchVal: "",
6 | selectType: "",
7 | exceptionLogList: [],
8 | // 当前页数
9 | nowPage: 1,
10 | // 当前页条数
11 | nowSize: 10,
12 | // 总条数
13 | totalElements: 0,
14 | dialogVisible: false,
15 | exceptionDetail: "",
16 | options: [
17 | {
18 | value: "username",
19 | label: "用户名"
20 | },
21 | {
22 | value: "description",
23 | label: "描述"
24 | }
25 | ]
26 | };
27 | }
28 | }
--------------------------------------------------------------------------------
/src/views/log/operation_log/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 分页处理
4 | initialPage(totalElements) {
5 | this.totalElements = totalElements;
6 | },
7 | // 初始化操作日志列表
8 | initialOpertionLogList(list) {
9 | this.operationLogList.splice(0);
10 | list.forEach(value => {
11 | this.operationLogList.push(value);
12 | });
13 | },
14 | // 获取操作日志信息
15 | getOpertionLogList(page, size) {
16 | this.$http_normal({
17 | url: `/api/log/page?page=${page - 1}&size=${size}&sort=createdAt,desc${
18 | this.selectType ? `&${this.selectType}=${this.searchVal}` : ""
19 | }`,
20 | method: "get"
21 | }).then(result => {
22 | const data = result.data;
23 | this.initialPage(data.totalElements);
24 | this.initialOpertionLogList(data.content);
25 | });
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/views/log/operation_log/js/operation.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 重置
4 | refresh() {
5 | this.searchVal = ""
6 | this.selectType = ""
7 | this.$refs.pagination.toFirstPage()
8 | },
9 | // 点击搜索
10 | search() {
11 | this.selectType
12 | ? this.$refs.pagination.toFirstPage()
13 | : this.$warnMsg("请选择搜索类型");
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/views/log/operation_log/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | searchVal: "",
5 | selectType: "",
6 | operationLogList: [],
7 | // 当前页数
8 | nowPage: 1,
9 | // 当前条数
10 | nowSize: 10,
11 | // 总条数
12 | totalElements: 0,
13 | options: [
14 | {
15 | value: "username",
16 | label: "用户名"
17 | },
18 | {
19 | value: "description",
20 | label: "描述"
21 | }
22 | ]
23 | };
24 | }
25 | }
--------------------------------------------------------------------------------
/src/views/login/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | labelPosition: "left",
5 | isShowDrawer: false,
6 | activeName: "0",
7 | tab: [1, 0],
8 | backgroundUrl: this.$getMemoryPmt("backgroundUrl") || "",
9 | opacity: 100,
10 | mask: 0,
11 | blur: 0,
12 | codeUrl: "",
13 | height: 66,
14 | width: 45,
15 | fontSize: 30,
16 | iconSize: 30,
17 | size: "cover",
18 | repeat: false,
19 | boxColor: "rgba(0, 0, 0, .35)",
20 | fontColor: "#fefefe",
21 | isItalic: true,
22 | unLock: false,
23 | ruleForm: {
24 | username: "admin",
25 | password: "123456",
26 | uuid: "",
27 | vcode: "",
28 | checked: false
29 | },
30 | rules: {
31 | username: [
32 | { required: true, message: "账号不能为空", trigger: "change" },
33 | { min: 2, max: 21, message: "账号长度在2到20个字符", trigger: "change" }
34 | ],
35 | password: [
36 | { required: true, message: "密码不能为空", trigger: "change" },
37 | { min: 3, max: 21, message: "账号长度在3到21个字符", trigger: "change" }
38 | ],
39 | vcode: [
40 | { required: true, message: "验证码不能为空", trigger: "change" }
41 | ]
42 | }
43 | };
44 | }
45 | }
--------------------------------------------------------------------------------
/src/views/login/js/template_1.js:
--------------------------------------------------------------------------------
1 | import {
2 | encrypt
3 | } from '@/utils/encrypt'
4 | export default {
5 | data() {
6 | return {
7 | username: "",
8 | password: "",
9 | vcode: "",
10 | uuid: "",
11 | codeUrl: "",
12 | }
13 | },
14 | created() {
15 | this.getCode()
16 | },
17 | methods: {
18 | getCode() {
19 | this.$http({
20 | url: `/api/auth/vCode`,
21 | method: "get"
22 | }).then(result => {
23 | const data = JSON.parse(result.request.response)
24 | this.uuid = data.uuid
25 | this.codeUrl = data.img
26 | })
27 | },
28 | submit() {
29 | if (!this.username) {
30 | this.$warnTip({
31 | title: "请填写用户名"
32 | })
33 | return
34 | } else if (!this.password) {
35 | this.$warnTip({
36 | title: "请填写密码"
37 | })
38 | return
39 | } else if (!this.vcode) {
40 | this.$warnTip({
41 | title: "请填写验证码"
42 | })
43 | return
44 | }
45 | this.$http_json({
46 | url: "/api/auth/login",
47 | method: "post",
48 | data: {
49 | username: this.username,
50 | // password: this.password,
51 | password: encrypt(this.password),
52 | vcode: this.vcode,
53 | uuid: this.uuid
54 | }
55 | }).then(result => {
56 | this.$setMemoryPmt("token", result.data.token)
57 | this.$setMemoryPmt('username', this.username)
58 | this.$getMemorySes("redirect") ?
59 | this.$router.push({
60 | path: this.$getMemorySes("redirect") === '/login' ?
61 | '/home/welcome' :
62 | this.$getMemorySes("redirect")
63 | }) :
64 | this.$router.push({
65 | path: "/home/welcome"
66 | })
67 | }).catch(e => {
68 | this.getCode()
69 | })
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/views/monitor/online_user/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 分页处理
4 | initialPage(totalElements) {
5 | this.totalElements = totalElements;
6 | },
7 | // 初始化操作日志列表
8 | initialOnlineUserList(list) {
9 | this.onlineUserList.splice(0);
10 | list.forEach(value => {
11 | this.onlineUserList.push(value);
12 | });
13 | },
14 | // 获取操作日志信息
15 | getOnlineUserList(page, size) {
16 | this.$http_normal({
17 | url: `/api/online?page=${page - 1}&size=${
18 | size
19 | }&sort=createdAt,desc${
20 | this.searchVal ? `&filter=${this.searchVal}` : ""
21 | }`,
22 | method: "get"
23 | }).then(result => {
24 | const data = result.data;
25 | this.initialPage(data.totalElements);
26 | this.initialOnlineUserList(data.content);
27 | });
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/src/views/monitor/online_user/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | searchVal: "",
5 | onlineUserList: [],
6 | selectList: [],
7 | // 当前页数
8 | nowPage: 1,
9 | // 当前页条数
10 | nowSize: 10,
11 | // 总条数
12 | totalElements: 0
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/views/monitor/redis_manage/components/delete_all.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 | 仅保留用户数据
11 | 清除所有缓存
12 |
13 |
17 |
18 |
19 |
20 |
48 |
49 |
51 |
--------------------------------------------------------------------------------
/src/views/monitor/redis_manage/components/visit_detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{redisDetail}}
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/views/monitor/redis_manage/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 分页处理
4 | initialPage(totalElements) {
5 | this.totalElements = totalElements;
6 | },
7 | // 初始化缓存列表
8 | initialRedisList(list) {
9 | this.redisList.splice(0);
10 | list.forEach(value => {
11 | this.redisList.push(value);
12 | });
13 | },
14 | // 获取缓存信息
15 | getRedisList(page, size) {
16 | this.$http_normal({
17 | url: `/api/redis/page?page=${page - 1}&size=${
18 | size
19 | }&key=${this.searchVal || "*"}`,
20 | method: "get"
21 | }).then(result => {
22 | const data = result.data;
23 | this.initialPage(data.totalElements);
24 | this.initialRedisList(data.content);
25 | });
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/views/monitor/redis_manage/js/operation.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 删除所有缓存
4 | deleteAll() {
5 | this.$showMsgBox({ msg: `是否删除所有缓存?` }).then(() => {
6 | this.$http_json({
7 | url: "/api/redis/delAll",
8 | method: "post"
9 | }).then(() => {
10 | this.$successMsg("删除成功");
11 | this.getRedisList();
12 | });
13 | });
14 | },
15 | // 删除缓存
16 | deleteRedis(item) {
17 | this.$showMsgBox({ msg: `是否删除当前缓存?` }).then(() => {
18 | this.$http_json({
19 | url: "/api/redis/del",
20 | method: "post",
21 | data: item
22 | }).then(() => {
23 | this.$successMsg("删除成功");
24 | this.getRedisList();
25 | });
26 | });
27 | },
28 | // 显示弹窗
29 | showDetail(detail) {
30 | const visitDetail = this.$refs.visitDetail
31 | visitDetail.redisDetail = detail;
32 | visitDetail.dialogVisible = true;
33 | },
34 | // 重置
35 | refresh() {
36 | this.searchVal = ""
37 | this.$refs.pagination.toFirstPage()
38 | },
39 | // 点击搜索
40 | search() {
41 | this.$refs.pagination.toFirstPage()
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/src/views/monitor/redis_manage/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | searchVal: "",
5 | redisList: [],
6 | // 当前页数
7 | nowPage: 1,
8 | // 当前页条数
9 | nowSize: 10,
10 | // 总条数
11 | totalElements: 0,
12 | dialogVisible: false,
13 | redisDetail: ""
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/views/person/js/operation.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 更新用户数据
4 | updateUserInfo() {
5 | this.$emit("updateUserInfo");
6 | },
7 | uploadAvatar(result) {
8 | this.$http_file({
9 | url: '/api/user/updateAvatar',
10 | method: 'post',
11 | data: {
12 | file: new window.File([result], "avatar.png", {type: result.type})
13 | }
14 | }).then(() => {
15 | this.isShow = false;
16 | this.updateUserInfo()
17 | this.$successMsg('更换头像成功,正在缓慢加载中~');
18 | })
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/views/person/js/property.js:
--------------------------------------------------------------------------------
1 | import { mapState } from "vuex";
2 | export default {
3 | data() {
4 | return {
5 | activeName: "first",
6 | isShow: false
7 | }
8 | },
9 | computed: {
10 | ...mapState({
11 | user: state => state.user
12 | })
13 | }
14 | }
--------------------------------------------------------------------------------
/src/views/person/scss/index.scss:
--------------------------------------------------------------------------------
1 | .header {
2 | position: relative;
3 | font-size: 1rem;
4 | color: #2f3032;
5 | }
6 | .avatar-box {
7 | position: relative;
8 | text-align: center;
9 | }
10 | .avatar {
11 | position: relative;
12 | margin: auto;
13 | width: 120px;
14 | height: 120px;
15 | border-radius: 50%;
16 | }
17 | .avatar:hover .hover-plus {
18 | opacity: 1;
19 | }
20 | .hover-plus {
21 | position: absolute;
22 | width: 120px;
23 | height: 120px;
24 | border-radius: 50%;
25 | top: 0;
26 | left: 0;
27 | z-index: 99;
28 | opacity: 0;
29 | background: rgba(0, 0, 0, .5);
30 | transition: .3s;
31 | }
32 | .add-avatar {
33 | position: relative;
34 | font-size: 2rem;
35 | color: #d6d6d6;
36 | top: 50%;
37 | margin-top: -1rem;
38 | }
39 | .upload-button {
40 | position: absolute;
41 | right: -5px;
42 | top: -10px;
43 | z-index: 100;
44 | opacity: .8
45 | }
46 | .image-box {
47 | position: relative;
48 | }
49 | .image {
50 | position: relative;
51 | width: 100%;
52 | height: 100%;
53 | }
54 | .role {
55 | position: relative;
56 | font-size: 1.1rem;
57 | font-weight: bold;
58 | }
59 | .name {
60 | font-size: 1rem;
61 | color: #7d7d7d;
62 | }
63 | .title {
64 | position: relative;
65 | margin: 2rem 0 1rem 0;
66 | }
67 | .word {
68 | position: relative;
69 | padding-left: 0.3rem;
70 | }
71 | .content {
72 | position: relative;
73 | font-size: 0.9rem;
74 | }
75 | .timeline-title {
76 | color: #7d7d7d;
77 | }
78 | .timeline-content {
79 | font-size: 0.8rem;
80 | }
81 | .el-button--text {
82 | font-size: 0.8rem;
83 | padding: 0;
84 | }
85 | .el-avatar {
86 | img {
87 | width: 100%;
88 | }
89 | }
--------------------------------------------------------------------------------
/src/views/redirect/index.vue:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/system/authority/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | created() {
3 | this.getAuthorityList();
4 | },
5 | methods: {
6 | // 初始化权限列表
7 | initialAuthorityList(list) {
8 | this.authorityList.splice(0);
9 | list.forEach(value => {
10 | this.authorityList.push(value);
11 | });
12 | },
13 | // 获取权限信息
14 | getAuthorityList() {
15 | this.$http_json({
16 | url: `/api/permission/get?sort=createdAt,desc${
17 | this.searchVal ? `&name=${this.searchVal}` : ""
18 | }`,
19 | method: "get"
20 | }).then(result => {
21 | this.initialAuthorityList(result.data.content);
22 | });
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/views/system/authority/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | isShow: true,
5 | expand: true,
6 | delLoading: false,
7 | searchVal: "",
8 | selectVal: "",
9 | isAdd: true,
10 | authorityList: []
11 | };
12 | }
13 | }
--------------------------------------------------------------------------------
/src/views/system/department/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | created() {
3 | // 初始化获取部门列表
4 | this.getDepartmentList();
5 | // 获取岗位字典
6 | this.getDictsList("dept_status");
7 | },
8 | methods: {
9 | // 初始化部门列表
10 | initialDepartmentList(list) {
11 | this.departmentList.splice(0);
12 | list.forEach(value => {
13 | this.departmentList.push(value);
14 | });
15 | },
16 | // 获取部门列表
17 | getDepartmentList() {
18 | this.$http_json({
19 | url: `/api/dept/get?sort=createdAt,desc${
20 | this.searchVal ? `&name=${this.searchVal}` : ""
21 | }${this.selectType ? `&enabled=${this.selectType}` : ""}`,
22 | method: "get"
23 | }).then(result => {
24 | this.initialDepartmentList(result.data.content);
25 | });
26 | },
27 | // 获取岗位字典
28 | getDictsList(dictName) {
29 | this.$http_json({
30 | url: `/api/dictDetail/page?page=0&size=9999&sort=sort,asc&dictName=${dictName}`
31 | }).then(result => {
32 | this.dicts = result.data.content;
33 | });
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/views/system/department/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | isShow: true,
5 | expand: true,
6 | delLoading: false,
7 | searchVal: "",
8 | selectType: "",
9 | isAdd: true,
10 | dicts: [],
11 | departmentList: [],
12 | options: [
13 | {
14 | value: "true",
15 | label: "正常"
16 | },
17 | {
18 | value: "false",
19 | label: "禁用"
20 | }
21 | ]
22 | };
23 | }
24 | }
--------------------------------------------------------------------------------
/src/views/system/dictionary/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | searchVal_1: "",
5 | selectType_1: "",
6 | searchVal_2: "",
7 | dictName: "",
8 | beloneDictName: "",
9 | isAdd_1: true,
10 | isAdd_2: true,
11 | // 当前页数
12 | nowPage_1: 1,
13 | // 当前页条数
14 | nowSize_1: 10,
15 | // 总条数
16 | totalElements_1: 0,
17 | // 当前页数
18 | nowPage_2: 1,
19 | // 当前页条数
20 | nowSize_2: 10,
21 | // 总条数
22 | totalElements_2: 0,
23 | isShowAddBox: false,
24 | isShowDetailBox: false,
25 | dictionaryList: [],
26 | detailList: [],
27 | options: [
28 | {
29 | value: "name",
30 | label: "名称"
31 | },
32 | {
33 | value: "remark",
34 | label: "描述"
35 | }
36 | ]
37 | };
38 | }
39 | }
--------------------------------------------------------------------------------
/src/views/system/menu/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | created() {
3 | // 初始化获取菜单列表
4 | this.getMenuList();
5 | },
6 | methods: {
7 | // 初始化菜单列表
8 | initialMenuList(list) {
9 | this.$sortList(list, 'sort')
10 | this.menuList.splice(0);
11 | list.forEach(value => {
12 | this.menuList.push(value);
13 | });
14 | },
15 | // 获取菜单列表
16 | getMenuList() {
17 | this.$http_json({
18 | url: `/api/menu/get?sort=sort,asc${
19 | this.searchVal ? `&name=${this.searchVal}` : ""
20 | }`,
21 | method: "get"
22 | }).then(result => {
23 | this.initialMenuList(result.data.content);
24 | });
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/views/system/menu/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | isShow: true,
5 | expand: true,
6 | searchVal: "",
7 | isAdd: true,
8 | menuList: [],
9 | options: {
10 | animation: 150,
11 | }
12 | };
13 | }
14 | }
--------------------------------------------------------------------------------
/src/views/system/role/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | roleId: "",
5 | searchVal: "",
6 | selectType: "菜单分配",
7 | title: "菜单分配",
8 | // 当前页数
9 | nowPage: 1,
10 | // 当前页条数
11 | nowSize: 10,
12 | // 总条数
13 | totalElements: 0,
14 | isAdd: true,
15 | showButton: false,
16 | // 角色名称
17 | roleName: "",
18 | ids: [],
19 | tree: [],
20 | defaultProps: {
21 | children: "children",
22 | label: "label"
23 | },
24 | roleList: [],
25 | permissions: [],
26 | permissionIds: [],
27 | menus: [],
28 | menuIds: []
29 | };
30 | }
31 | }
--------------------------------------------------------------------------------
/src/views/system/station/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
10 |
11 |
17 |
24 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
50 |
51 |
53 |
--------------------------------------------------------------------------------
/src/views/system/station/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | created() {
3 | // 获取岗位字典
4 | this.getDictsList("job_status");
5 | },
6 | methods: {
7 | // 分页处理
8 | initialPage(totalElements) {
9 | this.totalElements = totalElements;
10 | },
11 | // 初始化岗位列表
12 | initialStationList(list) {
13 | this.stationList.splice(0);
14 | list.forEach(value => {
15 | this.stationList.push(value);
16 | });
17 | },
18 | // 获取岗位信息
19 | getStationList(page, size) {
20 | this.$http_normal({
21 | url: `/api/job/page?page=${page - 1}&size=${
22 | size
23 | }&sort=sort,asc${this.searchVal ? `&name=${this.searchVal}` : ""}${
24 | this.selectType.length > 0 ? `&enabled=${this.selectType}` : ""
25 | }`,
26 | method: "get"
27 | }).then(result => {
28 | const data = result.data;
29 | this.initialPage(data.totalElements);
30 | this.initialStationList(data.content);
31 | });
32 | },
33 | // 获取岗位字典
34 | getDictsList(dictName) {
35 | this.$http_json({
36 | url: `/api/dictDetail/page?page=0&size=9999&sort=sort,asc&dictName=${dictName}`
37 | }).then(result => {
38 | this.dicts = result.data.content;
39 | });
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/src/views/system/station/js/operation.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 删除岗位
4 | deleteStation(item) {
5 | this.$showMsgBox({ msg: `是否删除${item.name}岗位?` }).then(() => {
6 | this.$http_json({
7 | url: `/api/job/del`,
8 | method: "post",
9 | data: [ item.id ]
10 | }).then(() => {
11 | this.$successMsg("删除成功");
12 | this.getStationList(this.nowPage, this.nowSize);
13 | });
14 | });
15 | },
16 | // 导出岗位列表
17 | downloadList() {
18 | this.$http_json({
19 | url: "/api/job/download",
20 | responseType: 'blob',
21 | method: "get"
22 | }).then(result => {
23 | const a = document.createElement('a')
24 | a.href = window.URL.createObjectURL(result.data)
25 | a.click()
26 | }).catch(e => {
27 | this.$errorMsg(e)
28 | })
29 | },
30 | // 显示添加岗位窗口
31 | showAddStation() {
32 | this.isAdd = true;
33 | this.$refs.form.dialog = true;
34 | this.$refs.form.resetForm();
35 | },
36 | // 显示编辑岗位窗口
37 | showEditStation() {
38 | this.isAdd = false;
39 | this.$refs.form.dialog = true;
40 | },
41 | // 编辑岗位
42 | editStationItem(item) {
43 | const stationForm = this.$refs.form.stationForm;
44 | this.$refs.form.stationId = item.id;
45 | stationForm.name = item.name;
46 | stationForm.sort = item.sort;
47 | stationForm.enabled = item.enabled.toString();
48 | stationForm.dept.id = item.dept.id;
49 | this.showEditStation();
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/src/views/system/user/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | searchVal_1: "",
5 | searchVal_2: "",
6 | selectType: "",
7 | selectStatus: "",
8 | isAdd: true,
9 | dicts: [],
10 | // 当前页数
11 | nowPage: 1,
12 | // 当前页条数
13 | nowSize: 10,
14 | // 总条数
15 | totalElements: 0,
16 | // 部门编号
17 | deptId: 1,
18 | departmentList: [],
19 | defaultProps: {
20 | children: "children",
21 | label: "label"
22 | },
23 | options_1: [
24 | {
25 | value: "username",
26 | label: "用户名"
27 | },
28 | {
29 | value: "email",
30 | label: "邮箱"
31 | }
32 | ],
33 | options_2: [
34 | {
35 | value: "true",
36 | label: "激活"
37 | },
38 | {
39 | value: "false",
40 | label: "锁定"
41 | }
42 | ],
43 | userList: [],
44 | selectList: []
45 | };
46 | }
47 | }
--------------------------------------------------------------------------------
/src/views/tools/file/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/views/tools/file/localstorage/js/initial.js:
--------------------------------------------------------------------------------
1 | import convertHttp from '@/utils/convertHttp'
2 | export default {
3 | methods: {
4 | // 分页处理
5 | initialPage(totalElements) {
6 | this.totalElements = totalElements;
7 | },
8 | // 初始化文件列表
9 | initialFileList(list) {
10 | this.fileList.splice(0);
11 | list.forEach(value => {
12 | value.url = convertHttp(value.url)
13 | this.fileList.push(value);
14 | });
15 | },
16 | // 获取文件列表
17 | getFileList(page, size) {
18 | this.$http_normal({
19 | url: `/api/localStorage/page?page=${page - 1}&size=${size}&sort=id,desc${
20 | this.searchVal ? `&blurry=${this.searchVal}` : ""
21 | }${
22 | this.date
23 | ? `&greatTime=${this.dateArray[0]}&lessTime=${this.dateArray[1]}`
24 | : ""
25 | }`
26 | ,
27 | method: "get"
28 | }).then(result => {
29 | const data = result.data;
30 | this.$refs.pictureTable.clearSelection()
31 | this.initialPage(data.totalElements);
32 | this.initialFileList(data.content);
33 | });
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/views/tools/file/localstorage/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | date: "",
5 | dateArray: [],
6 | searchVal: "",
7 | dialogVisible: false,
8 | isShowButton: false,
9 | // 当前页数
10 | nowPage: 1,
11 | // 当前页条数
12 | nowSize: 10,
13 | // 总条数
14 | totalElements: 0,
15 | selectFileList: [],
16 | fileList: [],
17 | idList: [],
18 | isShow: false,
19 | url: "https://myinterface.xuanzai.top/getPicture"
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/views/tools/file/qiniuyun/components/share.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 | 7天
11 | 永久
12 |
13 |
17 |
18 |
19 |
20 |
56 |
57 |
59 |
--------------------------------------------------------------------------------
/src/views/tools/file/qiniuyun/js/initial.js:
--------------------------------------------------------------------------------
1 | import convertHttp from '@/utils/convertHttp'
2 | export default {
3 | methods: {
4 | // 分页处理
5 | initialPage(totalElements) {
6 | this.totalElements = totalElements;
7 | },
8 | // 初始化文件列表
9 | initialFileList(list) {
10 | this.fileList.splice(0);
11 | list.forEach(value => {
12 | value.url = convertHttp(value.url)
13 | this.fileList.push(value);
14 | });
15 | },
16 | // 获取文件列表
17 | getFileList(page, size) {
18 | this.$http_normal({
19 | url: `/api/qiNiuContent/page?page=${page - 1}&size=${size}&sort=id,desc${
20 | this.searchVal ? `&key=${this.searchVal}` : ""
21 | }${
22 | this.date
23 | ? `&greatTime=${this.dateArray[0]}&lessTime=${this.dateArray[1]}`
24 | : ""
25 | }`
26 | ,
27 | method: "get"
28 | }).then(result => {
29 | const data = result.data;
30 | this.$refs.pictureTable.clearSelection()
31 | this.initialPage(data.totalElements);
32 | this.initialFileList(data.content);
33 | });
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/views/tools/file/qiniuyun/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | date: "",
5 | dateArray: [],
6 | searchVal: "",
7 | dialogVisible: false,
8 | isShowButton: false,
9 | // 当前页数
10 | nowPage: 1,
11 | // 当前页条数
12 | nowSize: 10,
13 | // 总条数
14 | totalElements: 0,
15 | selectFileList: [],
16 | fileList: [],
17 | idList: [],
18 | isShow: false,
19 | url: "https://myinterface.xuanzai.top/getPicture"
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/views/tools/generator/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 分页处理
4 | initialPage(totalElements) {
5 | this.totalElements = totalElements;
6 | },
7 | // 初始化操作日志列表
8 | initialGenerateCodeList(list) {
9 | this.generateCodeList.splice(0);
10 | list.forEach(value => {
11 | this.generateCodeList.push(value);
12 | });
13 | },
14 | // 获取操作日志信息
15 | getGenerateCodeList(page, size) {
16 | this.$http_normal({
17 | url: `/api/generator/tables?page=${page - 1}&size=${
18 | size
19 | }&sort=createdAt,desc${
20 | this.searchVal ? `&name=${this.searchVal}` : ""
21 | }`,
22 | method: "get"
23 | }).then(result => {
24 | const data = result.data;
25 | this.initialPage(data.totalElements);
26 | this.initialGenerateCodeList(data.content);
27 | });
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/src/views/tools/generator/js/operation.js:
--------------------------------------------------------------------------------
1 | import { Loading } from 'element-ui'
2 | export default {
3 | methods: {
4 | // 弹窗
5 | editGeneratorCode(item) {
6 | this.$router.push({
7 | path: `/home/generator_config?tableName=${item.tableName}`
8 | })
9 | },
10 | // 重置
11 | refresh() {
12 | this.searchVal = ""
13 | this.$refs.pagination.toFirstPage()
14 | },
15 | // 点击搜索
16 | search() {
17 | this.$refs.pagination.toFirstPage()
18 | },
19 | // 下载代码
20 | downloadCode(item) {
21 | let loading = Loading.service({ fullscreen: true, background: "rgba(255, 255, 255, .4)", customClass: 'top-floor' })
22 | this.$http({
23 | url: `/api/generator/handle/${item.tableName}/2`,
24 | responseType: 'blob',
25 | method: "post",
26 | headers: {
27 | 'Authorization': `Bearer ${this.$getMemoryPmt('token')}`
28 | }
29 | }).then(result => {
30 | const a = document.createElement('a')
31 | a.href = window.URL.createObjectURL(result.data)
32 | a.download = `${item.tableName}.zip`
33 | a.click()
34 | loading.close()
35 | }).catch(e => {
36 | this.$errorMsg('请先配置生成器')
37 | loading.close()
38 | })
39 | },
40 | // 生成代码
41 | generateCode(item) {
42 | this.$http_json({
43 | url: `/api/generator/handle/${item.tableName}/0`,
44 | method: "post"
45 | }).then(result => {
46 | this.$successMsg("生成代码成功")
47 | })
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/src/views/tools/generator/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | searchVal: "",
5 | generateCodeList: [],
6 | // 当前页数
7 | nowPage: 1,
8 | // 当前页条数
9 | nowSize: 10,
10 | // 总条数
11 | totalElements: 0,
12 | options: [
13 | {
14 | value: "username",
15 | label: "用户名"
16 | },
17 | {
18 | value: "description",
19 | label: "描述"
20 | }
21 | ]
22 | };
23 | }
24 | }
--------------------------------------------------------------------------------
/src/views/tools/generator/views/preview.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/views/tools/mission/js/initial.js:
--------------------------------------------------------------------------------
1 | export default {
2 | methods: {
3 | // 分页处理
4 | initialPage(totalElements) {
5 | this.totalElements = totalElements;
6 | },
7 | // 初始化定时任务列表
8 | initialMissionList(list) {
9 | this.missionList.splice(0);
10 | list.forEach(value => {
11 | this.missionList.push(value);
12 | });
13 | },
14 | // 获取定时任务信息
15 | getMissionList(page, size) {
16 | this.$http_normal({
17 | url: `/api/quartz/page?page=${page - 1}&size=${
18 | size
19 | }&sort=createdAt,desc${
20 | this.searchVal ? `&jobName=${this.searchVal}` : ""
21 | }${
22 | this.selectType !== "" ? `&paused=${this.selectType}` : ""
23 | }`,
24 | method: "get"
25 | }).then(result => {
26 | const data = result.data;
27 | this.initialPage(data.totalElements);
28 | this.initialMissionList(data.content);
29 | });
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/views/tools/mission/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | searchVal: "",
5 | selectType: "",
6 | isAdd: false,
7 | missionList: [],
8 | // 当前页数
9 | nowPage: 1,
10 | // 当前页条数
11 | nowSize: 10,
12 | // 总条数
13 | totalElements: 0,
14 | options: [
15 | {
16 | label: "已暂停",
17 | value: true
18 | },
19 | {
20 | label: "运行中",
21 | value: false
22 | }
23 | ]
24 | };
25 | }
26 | }
--------------------------------------------------------------------------------
/src/views/tools/picture/js/initial.js:
--------------------------------------------------------------------------------
1 | import convertHttp from '@/utils/convertHttp'
2 | export default {
3 | methods: {
4 | // 分页处理
5 | initialPage(totalElements) {
6 | this.totalElements = totalElements;
7 | },
8 | // 初始化图片列表
9 | initialPictureList(list) {
10 | this.pictureList.splice(0);
11 | list.forEach(value => {
12 | value.url = convertHttp(value.url)
13 | this.pictureList.push(value);
14 | });
15 | },
16 | // 获取图片列表
17 | getPictureList(page, size) {
18 | this.$http_normal({
19 | url: `/api/picture/page?page=${page - 1}&size=${size}&sort=id,desc${
20 | this.searchVal ? `&filename=${this.searchVal}` : ""
21 | }`
22 | ,
23 | method: "get"
24 | }).then(result => {
25 | const data = result.data;
26 | this.$refs.pictureTable.clearSelection()
27 | this.initialPage(data.totalElements);
28 | this.initialPictureList(data.content);
29 | });
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/views/tools/picture/js/property.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | searchVal: "",
5 | dialogVisible: false,
6 | isShowButton: false,
7 | // 当前页数
8 | nowPage: 1,
9 | // 当前页条数
10 | nowSize: 10,
11 | // 总条数
12 | totalElements: 0,
13 | selectImageList: [],
14 | pictureList: [],
15 | idList: [],
16 | isShow: false,
17 | url: "https://myinterface.xuanzai.top/getPicture"
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/template/property.ftl:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | searchVal: "",
5 | selectType: "",
6 | nowPage: 1,
7 | nowSize: 10,
8 | totalElements: 0,
9 | list: [],
10 | selectList: [],
11 | <#if betweens??>
12 | <#list betweens as column>
13 | <#if column.queryType = 'BetWeen'>
14 | date_${column_index + 1}: "",
15 | dateArray_${column_index + 1}: [],
16 | #if>
17 | #list>
18 | #if>
19 | queryTypeOptions: [
20 | <#if queryColumns??>
21 | <#list queryColumns as column>
22 | <#if column.queryType != 'BetWeen'>
23 | { key: '${column.changeColumnName}', display_name: '<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}#if>' }<#if column_has_next>,#if>
24 | #if>
25 | #list>
26 | #if>
27 | ]
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/template/style.ftl:
--------------------------------------------------------------------------------
1 | // 样式文件
--------------------------------------------------------------------------------