├── dashboard
├── public
│ ├── robots.txt
│ ├── qqqun.jpg
│ ├── alipay.jpg
│ ├── favicon.ico
│ ├── favicon1.ico
│ ├── wechatpay.jpg
│ └── index.html
├── .eslintignore
├── tests
│ └── unit
│ │ ├── .eslintrc.js
│ │ ├── utils
│ │ ├── param2Obj.spec.js
│ │ ├── formatTime.spec.js
│ │ ├── validate.spec.js
│ │ └── parseTime.spec.js
│ │ └── components
│ │ ├── Hamburger.spec.js
│ │ └── SvgIcon.spec.js
├── postcss.config.js
├── src
│ ├── assets
│ │ ├── logo
│ │ │ └── logo.png
│ │ ├── images
│ │ │ ├── logo.png
│ │ │ ├── pay.png
│ │ │ ├── loading.gif
│ │ │ ├── profile.jpg
│ │ │ └── login-background.jpg
│ │ ├── 401_images
│ │ │ └── 401.gif
│ │ ├── 404_images
│ │ │ ├── 404.png
│ │ │ └── 404_cloud.png
│ │ ├── custom-theme
│ │ │ └── fonts
│ │ │ │ ├── element-icons.ttf
│ │ │ │ └── element-icons.woff
│ │ ├── doc
│ │ │ └── less2css.md
│ │ └── icons
│ │ │ ├── svg
│ │ │ ├── chart.svg
│ │ │ ├── size.svg
│ │ │ ├── link.svg
│ │ │ ├── guide.svg
│ │ │ ├── money.svg
│ │ │ ├── email.svg
│ │ │ ├── drag.svg
│ │ │ ├── documentation.svg
│ │ │ ├── fullscreen.svg
│ │ │ ├── lock.svg
│ │ │ ├── user.svg
│ │ │ ├── excel.svg
│ │ │ ├── example.svg
│ │ │ ├── star.svg
│ │ │ ├── slider.svg
│ │ │ ├── table.svg
│ │ │ ├── search.svg
│ │ │ ├── education.svg
│ │ │ ├── tab.svg
│ │ │ ├── message.svg
│ │ │ ├── switch.svg
│ │ │ ├── theme.svg
│ │ │ ├── code.svg
│ │ │ ├── druid.svg
│ │ │ ├── peoples.svg
│ │ │ ├── server.svg
│ │ │ ├── input.svg
│ │ │ ├── textarea.svg
│ │ │ ├── time.svg
│ │ │ ├── edit.svg
│ │ │ ├── nested.svg
│ │ │ ├── row.svg
│ │ │ ├── monitor.svg
│ │ │ ├── tree-table.svg
│ │ │ ├── eye.svg
│ │ │ ├── build.svg
│ │ │ ├── clipboard.svg
│ │ │ ├── list.svg
│ │ │ ├── download.svg
│ │ │ ├── icon.svg
│ │ │ ├── international.svg
│ │ │ ├── question.svg
│ │ │ ├── wechat.svg
│ │ │ ├── skill.svg
│ │ │ ├── people.svg
│ │ │ ├── post.svg
│ │ │ ├── language.svg
│ │ │ ├── checkbox.svg
│ │ │ ├── eye-open.svg
│ │ │ ├── validCode.svg
│ │ │ ├── radio.svg
│ │ │ ├── select.svg
│ │ │ ├── upload.svg
│ │ │ ├── 404.svg
│ │ │ ├── zip.svg
│ │ │ ├── phone.svg
│ │ │ ├── log.svg
│ │ │ └── bug.svg
│ │ │ ├── index.js
│ │ │ └── svgo.yml
│ ├── utils
│ │ ├── errorCode.js
│ │ ├── get-page-title.js
│ │ ├── auth.js
│ │ ├── generator
│ │ │ ├── css.js
│ │ │ └── drawingDefault.js
│ │ ├── random.js
│ │ ├── permission.js
│ │ ├── clipboard.js
│ │ ├── error-log.js
│ │ └── open-window.js
│ ├── App.vue
│ ├── icons
│ │ ├── svg
│ │ │ ├── chart.svg
│ │ │ ├── size.svg
│ │ │ ├── link.svg
│ │ │ ├── guide.svg
│ │ │ ├── component.svg
│ │ │ ├── money.svg
│ │ │ ├── email.svg
│ │ │ ├── drag.svg
│ │ │ ├── documentation.svg
│ │ │ ├── fullscreen.svg
│ │ │ ├── user.svg
│ │ │ ├── lock.svg
│ │ │ ├── excel.svg
│ │ │ ├── example.svg
│ │ │ ├── slider.svg
│ │ │ ├── star.svg
│ │ │ ├── table.svg
│ │ │ ├── search.svg
│ │ │ ├── password.svg
│ │ │ ├── education.svg
│ │ │ ├── tab.svg
│ │ │ ├── message.svg
│ │ │ ├── switch.svg
│ │ │ ├── theme.svg
│ │ │ ├── druid.svg
│ │ │ ├── code.svg
│ │ │ ├── peoples.svg
│ │ │ ├── input.svg
│ │ │ ├── server.svg
│ │ │ ├── textarea.svg
│ │ │ ├── time.svg
│ │ │ ├── edit.svg
│ │ │ ├── nested.svg
│ │ │ ├── row.svg
│ │ │ ├── monitor.svg
│ │ │ ├── tree-table.svg
│ │ │ ├── eye.svg
│ │ │ ├── build.svg
│ │ │ ├── clipboard.svg
│ │ │ ├── list.svg
│ │ │ ├── download.svg
│ │ │ ├── icon.svg
│ │ │ ├── international.svg
│ │ │ ├── question.svg
│ │ │ ├── wechat.svg
│ │ │ ├── skill.svg
│ │ │ ├── people.svg
│ │ │ ├── post.svg
│ │ │ ├── checkbox.svg
│ │ │ ├── language.svg
│ │ │ ├── eye-open.svg
│ │ │ ├── validCode.svg
│ │ │ ├── radio.svg
│ │ │ ├── select.svg
│ │ │ ├── upload.svg
│ │ │ ├── 404.svg
│ │ │ ├── zip.svg
│ │ │ ├── phone.svg
│ │ │ ├── log.svg
│ │ │ └── bug.svg
│ │ ├── index.js
│ │ └── svgo.yml
│ ├── api
│ │ ├── monitor
│ │ │ ├── server.js
│ │ │ ├── online.js
│ │ │ ├── operlog.js
│ │ │ ├── jobLog.js
│ │ │ ├── logininfor.js
│ │ │ ├── pip.js
│ │ │ └── cache.js
│ │ ├── control_panel
│ │ │ └── database.js
│ │ ├── vod
│ │ │ ├── houses.js
│ │ │ ├── subs.js
│ │ │ └── configs.js
│ │ ├── hiker
│ │ │ ├── rule.js
│ │ │ ├── rule_type.js
│ │ │ └── developer.js
│ │ ├── permission
│ │ │ ├── label.js
│ │ │ ├── menu.js
│ │ │ └── role.js
│ │ └── system
│ │ │ ├── dict
│ │ │ ├── data.js
│ │ │ └── detail.js
│ │ │ └── parameter.js
│ ├── components
│ │ ├── ImageCropper
│ │ │ └── utils
│ │ │ │ ├── mimes.js
│ │ │ │ ├── data2blob.js
│ │ │ │ └── effectRipple.js
│ │ ├── README.md
│ │ ├── IconSelect
│ │ │ └── requireIcons.js
│ │ ├── Tinymce
│ │ │ ├── toolbar.js
│ │ │ └── plugins.js
│ │ ├── MarkdownEditor
│ │ │ └── default-options.js
│ │ ├── iFrame
│ │ │ └── index.vue
│ │ ├── Screenfull
│ │ │ └── index.vue
│ │ ├── Hamburger
│ │ │ └── index.vue
│ │ ├── SvgIcon
│ │ │ └── index.vue
│ │ └── SizeSelect
│ │ │ └── index.vue
│ ├── layout
│ │ ├── components
│ │ │ ├── index.js
│ │ │ ├── Sidebar
│ │ │ │ ├── FixiOSBug.js
│ │ │ │ ├── Link.vue
│ │ │ │ └── Item.vue
│ │ │ └── AppMain.vue
│ │ └── mixin
│ │ │ └── ResizeHandler.js
│ ├── directive
│ │ ├── waves
│ │ │ ├── index.js
│ │ │ └── waves.css
│ │ ├── el-drag-dialog
│ │ │ └── index.js
│ │ ├── clipboard
│ │ │ └── index.js
│ │ ├── permission
│ │ │ ├── index.js
│ │ │ └── permission.js
│ │ ├── el-table
│ │ │ ├── index.js
│ │ │ └── adaptive.js
│ │ └── button_permission
│ │ │ ├── index.js
│ │ │ ├── hasRole.js
│ │ │ └── hasPermi.js
│ ├── views
│ │ ├── redirect
│ │ │ └── index.vue
│ │ ├── components
│ │ │ └── icons
│ │ │ │ └── svg-icons.js
│ │ ├── monitor
│ │ │ └── druid
│ │ │ │ └── index.vue
│ │ ├── tool
│ │ │ ├── blog
│ │ │ │ └── index.vue
│ │ │ ├── swagger
│ │ │ │ └── index.vue
│ │ │ └── liveTool
│ │ │ │ └── styles.scss
│ │ ├── user
│ │ │ └── login
│ │ │ │ └── auth-redirect.vue
│ │ ├── dashboard
│ │ │ └── index.vue
│ │ └── vod
│ │ │ └── web
│ │ │ └── about.vue
│ ├── plugins
│ │ ├── index.js
│ │ └── auth.js
│ ├── store
│ │ ├── modules
│ │ │ ├── errorLog.js
│ │ │ ├── settings.js
│ │ │ ├── vod.js
│ │ │ └── app.js
│ │ ├── index.js
│ │ └── getters.js
│ ├── vendor
│ │ └── Export2Zip.js
│ ├── styles
│ │ ├── variables.scss
│ │ ├── element-variables.scss
│ │ ├── transition.scss
│ │ ├── reset.scss
│ │ ├── element-ui.scss
│ │ └── mixin.scss
│ └── settings.js
├── .travis.yml
├── jsconfig.json
├── babel.config.js
├── .env.production
├── plop-templates
│ ├── utils.js
│ ├── store
│ │ ├── index.hbs
│ │ └── prompt.js
│ ├── view
│ │ ├── index.hbs
│ │ └── prompt.js
│ └── component
│ │ ├── index.hbs
│ │ └── prompt.js
├── .env.production.example
├── .editorconfig
├── .env.staging
├── .gitignore
├── plopfile.js
├── .env.development
├── .env.development.example
├── jest.config.js
├── build
│ └── index.js
└── LICENSE
└── .gitignore
/dashboard/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /
--------------------------------------------------------------------------------
/dashboard/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | src/assets
3 | public
4 | dist
5 |
--------------------------------------------------------------------------------
/dashboard/public/qqqun.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/public/qqqun.jpg
--------------------------------------------------------------------------------
/dashboard/tests/unit/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | jest: true
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/dashboard/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/dashboard/public/alipay.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/public/alipay.jpg
--------------------------------------------------------------------------------
/dashboard/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/public/favicon.ico
--------------------------------------------------------------------------------
/dashboard/public/favicon1.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/public/favicon1.ico
--------------------------------------------------------------------------------
/dashboard/public/wechatpay.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/public/wechatpay.jpg
--------------------------------------------------------------------------------
/dashboard/src/assets/logo/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/logo/logo.png
--------------------------------------------------------------------------------
/dashboard/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js: 10
3 | script: npm run test
4 | notifications:
5 | email: false
6 |
--------------------------------------------------------------------------------
/dashboard/src/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/images/logo.png
--------------------------------------------------------------------------------
/dashboard/src/assets/images/pay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/images/pay.png
--------------------------------------------------------------------------------
/dashboard/src/assets/401_images/401.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/401_images/401.gif
--------------------------------------------------------------------------------
/dashboard/src/assets/404_images/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/404_images/404.png
--------------------------------------------------------------------------------
/dashboard/src/assets/images/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/images/loading.gif
--------------------------------------------------------------------------------
/dashboard/src/assets/images/profile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/images/profile.jpg
--------------------------------------------------------------------------------
/dashboard/src/assets/404_images/404_cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/404_images/404_cloud.png
--------------------------------------------------------------------------------
/dashboard/src/assets/images/login-background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/images/login-background.jpg
--------------------------------------------------------------------------------
/dashboard/src/assets/custom-theme/fonts/element-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/custom-theme/fonts/element-icons.ttf
--------------------------------------------------------------------------------
/dashboard/src/assets/custom-theme/fonts/element-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjdhnx/hipy-ui/HEAD/dashboard/src/assets/custom-theme/fonts/element-icons.woff
--------------------------------------------------------------------------------
/dashboard/src/utils/errorCode.js:
--------------------------------------------------------------------------------
1 | export default {
2 | '401': '认证失败,无法访问系统资源',
3 | '403': '当前操作没有权限',
4 | '404': '访问资源不存在',
5 | 'default': '系统未知错误,请反馈给管理员'
6 | }
7 |
--------------------------------------------------------------------------------
/dashboard/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "./",
4 | "paths": {
5 | "@/*": ["src/*"]
6 | }
7 | },
8 | "exclude": ["node_modules", "dist"]
9 | }
--------------------------------------------------------------------------------
/dashboard/src/assets/doc/less2css.md:
--------------------------------------------------------------------------------
1 | ### 在线less转scss
2 |
3 | [访问此处](https://less2scss.awk5.com/)
4 | [前端借鉴](https://github.com/geeeeeeeek/appvideo)
5 | [前端效果演示](http://101.43.124.118:8002/index)
--------------------------------------------------------------------------------
/dashboard/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
--------------------------------------------------------------------------------
/dashboard/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/app'
4 | ],
5 | env: {
6 | development: {
7 | plugins: ['dynamic-import-node']
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/chart.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/api/monitor/server.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 获取服务信息
4 | export function getServer() {
5 | return request({
6 | url: '/monitor/server',
7 | method: 'get'
8 | })
9 | }
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/chart.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/components/ImageCropper/utils/mimes.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'jpg': 'image/jpeg',
3 | 'png': 'image/png',
4 | 'gif': 'image/gif',
5 | 'svg': 'image/svg+xml',
6 | 'psd': 'image/photoshop'
7 | }
8 |
--------------------------------------------------------------------------------
/dashboard/.env.production:
--------------------------------------------------------------------------------
1 | # just a flag
2 | ENV='production'
3 |
4 | # base api
5 | VUE_APP_BASE_API='http://fastapi-vue-api.beginner2020.top/api/v1/'
6 | VUE_APP_MEDIA_BASE='http://fastapi-vue-api.beginner2020.top/media/'
7 |
--------------------------------------------------------------------------------
/dashboard/plop-templates/utils.js:
--------------------------------------------------------------------------------
1 | exports.notEmpty = name => {
2 | return v => {
3 | if (!v || v.trim === '') {
4 | return `${name} is required`
5 | } else {
6 | return true
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/dashboard/.env.production.example:
--------------------------------------------------------------------------------
1 | # just a flag
2 | ENV='production'
3 |
4 | # base api
5 | VUE_APP_BASE_API='http://fastapi-vue-api.beginner2020.top/api/v1/'
6 | VUE_APP_MEDIA_BASE='http://fastapi-vue-api.beginner2020.top/media/'
7 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/size.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/size.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/components/README.md:
--------------------------------------------------------------------------------
1 | ##### 用于各组件功能点解释,避免重复组件引入
2 | ```
3 | BackToTop 返回顶部
4 | Breadcrumb pass
5 | Charts 图表
6 | DndList
7 | DragSelect 拖拽表单
8 |
9 | ```
10 |
--------------------------------------------------------------------------------
/dashboard/plop-templates/store/index.hbs:
--------------------------------------------------------------------------------
1 | {{#if state}}
2 | const state = {}
3 | {{/if}}
4 |
5 | {{#if mutations}}
6 | const mutations = {}
7 | {{/if}}
8 |
9 | {{#if actions}}
10 | const actions = {}
11 | {{/if}}
12 |
13 | export default {
14 | namespaced: true,
15 | {{options}}
16 | }
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/.idea
2 | **/.fleet
3 | **/venv
4 | **/log
5 | **/__pycache__
6 | **.pyc
7 | **.pyo
8 | **.log
9 |
10 | **.yaml
11 | **/.DS_Store
12 |
13 |
14 | **/node_modules
15 | **/dist
16 |
17 | **/.env
18 | **/.env.local
19 | **/.env.development
20 | **/.env.production
21 | **/.env.*.local
22 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/layout/components/index.js:
--------------------------------------------------------------------------------
1 | export { default as AppMain } from './AppMain'
2 | export { default as Navbar } from './Navbar'
3 | export { default as Settings } from './Settings'
4 | export { default as Sidebar } from './Sidebar/index.vue'
5 | export { default as TagsView } from './TagsView/index.vue'
6 |
--------------------------------------------------------------------------------
/dashboard/src/utils/get-page-title.js:
--------------------------------------------------------------------------------
1 | import defaultSettings from '@/settings'
2 |
3 | const title = defaultSettings.title || 'Vue Element Admin'
4 |
5 | export default function getPageTitle(pageTitle) {
6 | if (pageTitle) {
7 | return `${pageTitle} - ${title}`
8 | }
9 | return `${title}`
10 | }
11 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/directive/waves/index.js:
--------------------------------------------------------------------------------
1 | import waves from './waves'
2 |
3 | const install = function(Vue) {
4 | Vue.directive('waves', waves)
5 | }
6 |
7 | if (window.Vue) {
8 | window.waves = waves
9 | Vue.use(install); // eslint-disable-line
10 | }
11 |
12 | waves.install = install
13 | export default waves
14 |
--------------------------------------------------------------------------------
/dashboard/.editorconfig:
--------------------------------------------------------------------------------
1 | # https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | end_of_line = lf
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
12 | [*.md]
13 | insert_final_newline = false
14 | trim_trailing_whitespace = false
15 |
--------------------------------------------------------------------------------
/dashboard/src/views/redirect/index.vue:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/guide.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/directive/el-drag-dialog/index.js:
--------------------------------------------------------------------------------
1 | import drag from './drag'
2 |
3 | const install = function(Vue) {
4 | Vue.directive('el-drag-dialog', drag)
5 | }
6 |
7 | if (window.Vue) {
8 | window['el-drag-dialog'] = drag
9 | Vue.use(install); // eslint-disable-line
10 | }
11 |
12 | drag.install = install
13 | export default drag
14 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/component.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/views/components/icons/svg-icons.js:
--------------------------------------------------------------------------------
1 | const req = require.context('../../../assets/icons/svg', false, /\.svg$/)
2 | const requireAll = requireContext => requireContext.keys()
3 |
4 | const re = /\.\/(.*)\.svg/
5 |
6 | const svgIcons = requireAll(req).map(i => {
7 | return i.match(re)[1]
8 | })
9 |
10 | export default svgIcons
11 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/guide.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import SvgIcon from '@/components/SvgIcon'// svg component
3 |
4 | // register globally
5 | Vue.component('svg-icon', SvgIcon)
6 |
7 | const req = require.context('./svg', false, /\.svg$/)
8 | const requireAll = requireContext => requireContext.keys().map(requireContext)
9 | requireAll(req)
10 |
--------------------------------------------------------------------------------
/dashboard/src/directive/clipboard/index.js:
--------------------------------------------------------------------------------
1 | import Clipboard from './clipboard'
2 |
3 | const install = function(Vue) {
4 | Vue.directive('Clipboard', Clipboard)
5 | }
6 |
7 | if (window.Vue) {
8 | window.clipboard = Clipboard
9 | Vue.use(install); // eslint-disable-line
10 | }
11 |
12 | Clipboard.install = install
13 | export default Clipboard
14 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/money.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import SvgIcon from '@/components/SvgIcon'// svg component
3 |
4 | // register globally
5 | Vue.component('svg-icon', SvgIcon)
6 |
7 | const req = require.context('./svg', false, /\.svg$/)
8 | const requireAll = requireContext => requireContext.keys().map(requireContext)
9 | requireAll(req)
10 |
--------------------------------------------------------------------------------
/dashboard/.env.staging:
--------------------------------------------------------------------------------
1 | NODE_ENV=production
2 |
3 | # just a flag
4 | ENV='staging'
5 |
6 | # base api
7 | # VUE_APP_BASE_API='http://fastapi-vue-api.beginner2020.top/api/v1/'
8 | # VUE_APP_MEDIA_BASE='http://fastapi-vue-api.beginner2020.top/media/'
9 |
10 | VUE_APP_BASE_API='http://localhost:5707/api/v1/'
11 | VUE_APP_MEDIA_BASE='http://localhost:5707/media/'
12 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/money.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/utils/auth.js:
--------------------------------------------------------------------------------
1 | import Cookies from 'js-cookie'
2 |
3 | const TokenKey = 'Admin-Token'
4 |
5 | export function getToken() {
6 | return Cookies.get(TokenKey)
7 | }
8 |
9 | export function setToken(token) {
10 | return Cookies.set(TokenKey, token)
11 | }
12 |
13 | export function removeToken() {
14 | return Cookies.remove(TokenKey)
15 | }
16 |
--------------------------------------------------------------------------------
/dashboard/src/directive/permission/index.js:
--------------------------------------------------------------------------------
1 | import permission from './permission'
2 |
3 | const install = function(Vue) {
4 | Vue.directive('permission', permission)
5 | }
6 |
7 | if (window.Vue) {
8 | window['permission'] = permission
9 | Vue.use(install); // eslint-disable-line
10 | }
11 |
12 | permission.install = install
13 | export default permission
14 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/email.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/email.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/drag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/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 |
--------------------------------------------------------------------------------
/dashboard/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | **/*.log
8 |
9 | tests/**/coverage/
10 | tests/e2e/reports
11 | selenium-debug.log
12 |
13 | # Editor directories and files
14 | .idea
15 | .vscode
16 | *.suo
17 | *.ntvs*
18 | *.njsproj
19 | *.sln
20 | *.local
21 |
22 | package-lock.json
23 | yarn.lock
24 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/drag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/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 |
--------------------------------------------------------------------------------
/dashboard/src/directive/el-table/index.js:
--------------------------------------------------------------------------------
1 | import adaptive from './adaptive'
2 |
3 | const install = function(Vue) {
4 | Vue.directive('el-height-adaptive-table', adaptive)
5 | }
6 |
7 | if (window.Vue) {
8 | window['el-height-adaptive-table'] = adaptive
9 | Vue.use(install); // eslint-disable-line
10 | }
11 |
12 | adaptive.install = install
13 | export default adaptive
14 |
--------------------------------------------------------------------------------
/dashboard/src/views/monitor/druid/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
--------------------------------------------------------------------------------
/dashboard/src/views/tool/blog/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
--------------------------------------------------------------------------------
/dashboard/src/components/IconSelect/requireIcons.js:
--------------------------------------------------------------------------------
1 | // const req = require.context('@/icons/svg', false, /\.svg$/)
2 | const req = require.context('../../assets/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 |
--------------------------------------------------------------------------------
/dashboard/src/api/monitor/online.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询在线用户列表
4 | export function list(query) {
5 | return request({
6 | url: '/monitor/online/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 强退用户
13 | export function forceLogout(tokenId) {
14 | return request({
15 | url: '/monitor/online/' + tokenId,
16 | method: 'delete'
17 | })
18 | }
19 |
--------------------------------------------------------------------------------
/dashboard/src/views/user/login/auth-redirect.vue:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/dashboard/plopfile.js:
--------------------------------------------------------------------------------
1 | const viewGenerator = require('./plop-templates/view/prompt')
2 | const componentGenerator = require('./plop-templates/component/prompt')
3 | const storeGenerator = require('./plop-templates/store/prompt.js')
4 |
5 | module.exports = function(plop) {
6 | plop.setGenerator('view', viewGenerator)
7 | plop.setGenerator('component', componentGenerator)
8 | plop.setGenerator('store', storeGenerator)
9 | }
10 |
--------------------------------------------------------------------------------
/dashboard/src/directive/button_permission/index.js:
--------------------------------------------------------------------------------
1 | import hasRole from './hasRole'
2 | import hasPermi from './hasPermi'
3 |
4 | const install = function(Vue) {
5 | Vue.directive('hasRole', hasRole)
6 | Vue.directive('hasPermi', hasPermi)
7 | }
8 |
9 | if (window.Vue) {
10 | window['hasRole'] = hasRole
11 | window['hasPermi'] = hasPermi
12 | Vue.use(install); // eslint-disable-line
13 | }
14 |
15 | export default install
16 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/documentation.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/fullscreen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/documentation.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/fullscreen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/views/tool/swagger/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
--------------------------------------------------------------------------------
/dashboard/plop-templates/view/index.hbs:
--------------------------------------------------------------------------------
1 | {{#if template}}
2 |
3 |
4 |
5 | {{/if}}
6 |
7 | {{#if script}}
8 |
20 | {{/if}}
21 |
22 | {{#if style}}
23 |
26 | {{/if}}
27 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/plop-templates/component/index.hbs:
--------------------------------------------------------------------------------
1 | {{#if template}}
2 |
3 |
4 |
5 | {{/if}}
6 |
7 | {{#if script}}
8 |
20 | {{/if}}
21 |
22 | {{#if style}}
23 |
26 | {{/if}}
27 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/lock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/lock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/excel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/excel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/tests/unit/utils/param2Obj.spec.js:
--------------------------------------------------------------------------------
1 | import { param2Obj } from '@/utils/index.js'
2 | describe('Utils:param2Obj', () => {
3 | const url = 'https://github.com/PanJiaChen/vue-element-admin?name=bill&age=29&sex=1&field=dGVzdA==&key=%E6%B5%8B%E8%AF%95'
4 |
5 | it('param2Obj test', () => {
6 | expect(param2Obj(url)).toEqual({
7 | name: 'bill',
8 | age: '29',
9 | sex: '1',
10 | field: window.btoa('test'),
11 | key: '测试'
12 | })
13 | })
14 | })
15 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/example.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/plugins/index.js:
--------------------------------------------------------------------------------
1 | import tab from './tab'
2 | import auth from './auth'
3 | import cache from './cache'
4 | import modal from './modal'
5 | import download from './download'
6 |
7 | export default {
8 | install(Vue) {
9 | // 页签操作
10 | Vue.prototype.$tab = tab
11 | // 认证对象
12 | Vue.prototype.$auth = auth
13 | // 缓存对象
14 | Vue.prototype.$cache = cache
15 | // 模态框对象
16 | Vue.prototype.$modal = modal
17 | // 下载文件
18 | Vue.prototype.$download = download
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/example.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/components/Tinymce/toolbar.js:
--------------------------------------------------------------------------------
1 | // Here is a list of the toolbar
2 | // Detail list see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
3 |
4 | const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen']
5 |
6 | export default toolbar
7 |
--------------------------------------------------------------------------------
/dashboard/src/store/modules/errorLog.js:
--------------------------------------------------------------------------------
1 | const state = {
2 | logs: []
3 | }
4 |
5 | const mutations = {
6 | ADD_ERROR_LOG: (state, log) => {
7 | state.logs.push(log)
8 | },
9 | CLEAR_ERROR_LOG: (state) => {
10 | state.logs.splice(0)
11 | }
12 | }
13 |
14 | const actions = {
15 | addErrorLog({ commit }, log) {
16 | commit('ADD_ERROR_LOG', log)
17 | },
18 | clearErrorLog({ commit }) {
19 | commit('CLEAR_ERROR_LOG')
20 | }
21 | }
22 |
23 | export default {
24 | namespaced: true,
25 | state,
26 | mutations,
27 | actions
28 | }
29 |
--------------------------------------------------------------------------------
/dashboard/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | <%= webpackConfig.name %>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/slider.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/star.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/star.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/api/monitor/operlog.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询操作日志列表
4 | export function list(query) {
5 | return request({
6 | url: '/monitor/operlog/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 删除操作日志
13 | export function delOperlog(operId) {
14 | return request({
15 | url: '/monitor/operlog/' + operId,
16 | method: 'delete'
17 | })
18 | }
19 |
20 | // 清空操作日志
21 | export function cleanOperlog() {
22 | return request({
23 | url: '/monitor/operlog/clean',
24 | method: 'delete'
25 | })
26 | }
27 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/slider.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/utils/generator/css.js:
--------------------------------------------------------------------------------
1 | const styles = {
2 | 'el-rate': '.el-rate{display: inline-block; vertical-align: text-top;}',
3 | 'el-upload': '.el-upload__tip{line-height: 1.2;}'
4 | }
5 |
6 | function addCss(cssList, el) {
7 | const css = styles[el.tag]
8 | css && cssList.indexOf(css) === -1 && cssList.push(css)
9 | if (el.children) {
10 | el.children.forEach(el2 => addCss(cssList, el2))
11 | }
12 | }
13 |
14 | export function makeUpCss(conf) {
15 | const cssList = []
16 | conf.fields.forEach(el => addCss(cssList, el))
17 | return cssList.join('\n')
18 | }
19 |
--------------------------------------------------------------------------------
/dashboard/src/api/monitor/jobLog.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询调度日志列表
4 | export function listJobLog(query) {
5 | return request({
6 | url: '/monitor/jobLog/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 删除调度日志
13 | export function delJobLog(jobLogId) {
14 | return request({
15 | url: '/monitor/jobLog/' + jobLogId,
16 | method: 'delete'
17 | })
18 | }
19 |
20 | // 清空调度日志
21 | export function cleanJobLog() {
22 | return request({
23 | url: '/monitor/jobLog/clean',
24 | method: 'delete'
25 | })
26 | }
27 |
--------------------------------------------------------------------------------
/dashboard/src/api/control_panel/database.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | const api_url = '/database_update'
4 |
5 | // 修改
6 | export function setRecord(data) {
7 | return request({
8 | baseURL: new URL(process.env.VUE_APP_BASE_API).origin,
9 | url: api_url,
10 | method: 'put',
11 | data: data,
12 | timeout: 60 * 1000
13 | })
14 | }
15 |
16 | export function getVersion() {
17 | return request({
18 | baseURL: new URL(process.env.VUE_APP_BASE_API).origin,
19 | url: '/version',
20 | method: 'get',
21 | timeout: 5 * 1000
22 | })
23 | }
24 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/components/Tinymce/plugins.js:
--------------------------------------------------------------------------------
1 | // Any plugins you want to use has to be imported
2 | // Detail plugins list see https://www.tinymce.com/docs/plugins/
3 | // Custom builds see https://www.tinymce.com/download/custom-builds/
4 |
5 | const plugins = ['advlist anchor autolink autosave code codesample colorpicker colorpicker contextmenu directionality emoticons fullscreen hr image imagetools insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount']
6 |
7 | export default plugins
8 |
--------------------------------------------------------------------------------
/dashboard/src/utils/random.js:
--------------------------------------------------------------------------------
1 | export function generateRandomDigit(minDigits, maxDigits) {
2 | const min = Math.pow(10, minDigits - 1);
3 | const max = Math.pow(10, maxDigits) - 1;
4 | return Math.floor(Math.random() * (max - min + 1)) + min;
5 | }
6 |
7 | export function generateRandomString(length) {
8 | const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
9 | let result = '';
10 |
11 | for (let i = 0; i < length; i++) {
12 | let randomIndex = Math.floor(Math.random() * characters.length);
13 | result += characters.charAt(randomIndex);
14 | }
15 |
16 | return result;
17 | }
18 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/password.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/components/ImageCropper/utils/data2blob.js:
--------------------------------------------------------------------------------
1 | /**
2 | * database64文件格式转换为2进制
3 | *
4 | * @param {[String]} data dataURL 的格式为 “data:image/png;base64,****”,逗号之前都是一些说明性的文字,我们只需要逗号之后的就行了
5 | * @param {[String]} mime [description]
6 | * @return {[blob]} [description]
7 | */
8 | export default function(data, mime) {
9 | data = data.split(',')[1]
10 | data = window.atob(data)
11 | var ia = new Uint8Array(data.length)
12 | for (var i = 0; i < data.length; i++) {
13 | ia[i] = data.charCodeAt(i)
14 | }
15 | // canvas.toDataURL 返回的默认格式就是 image/png
16 | return new Blob([ia], {
17 | type: mime
18 | })
19 | }
20 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/education.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/education.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/api/vod/houses.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | const api_url = '/vods/houses'
4 |
5 |
6 | // 获取仓库源列表
7 | export function listHouses(query) {
8 | return request({
9 | url: api_url + '/list',
10 | method: 'get',
11 | params: query
12 | })
13 | }
14 |
15 | // 从id导入源
16 | export function addHouses(id) {
17 | return request({
18 | url: api_url + "/" + id,
19 | method: 'put',
20 | timeout: 60*1000
21 | })
22 | }
23 |
24 | // 刷新仓库源
25 | export function refreshHouses() {
26 | return request({
27 | url: api_url + '/refresh',
28 | method: 'post',
29 | timeout: 60*1000
30 | })
31 | }
32 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/tab.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/tab.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/message.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/.env.development:
--------------------------------------------------------------------------------
1 | # just a flag
2 | ENV='development'
3 |
4 | # base api
5 | VUE_APP_BASE_API='http://localhost:5707/api/v1/'
6 | VUE_APP_MEDIA_BASE='http://localhost:5707/media/'
7 |
8 | # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
9 | # to control whether the babel-plugin-dynamic-import-node plugin is enabled.
10 | # It only does one thing by converting all import() to require().
11 | # This configuration can significantly increase the speed of hot updates,
12 | # when you have a large number of pages.
13 | # Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
14 |
15 | # VUE_CLI_BABEL_TRANSPILE_MODULES = true
16 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/message.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/switch.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/.env.development.example:
--------------------------------------------------------------------------------
1 | # just a flag
2 | ENV='development'
3 |
4 | # base api
5 | VUE_APP_BASE_API='http://127.0.0.1:5707/api/v1/'
6 | VUE_APP_MEDIA_BASE='http://127.0.0.1:5707/media/'
7 |
8 | # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
9 | # to control whether the babel-plugin-dynamic-import-node plugin is enabled.
10 | # It only does one thing by converting all import() to require().
11 | # This configuration can significantly increase the speed of hot updates,
12 | # when you have a large number of pages.
13 | # Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
14 |
15 | # VUE_CLI_BABEL_TRANSPILE_MODULES = true
16 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/switch.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/theme.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/theme.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/vendor/Export2Zip.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import { saveAs } from 'file-saver'
3 | import JSZip from 'jszip'
4 |
5 | export function export_txt_to_zip(th, jsonData, txtName, zipName) {
6 | const zip = new JSZip()
7 | const txt_name = txtName || 'file'
8 | const zip_name = zipName || 'file'
9 | const data = jsonData
10 | let txtData = `${th}\r\n`
11 | data.forEach((row) => {
12 | let tempStr = ''
13 | tempStr = row.toString()
14 | txtData += `${tempStr}\r\n`
15 | })
16 | zip.file(`${txt_name}.txt`, txtData)
17 | zip.generateAsync({
18 | type: "blob"
19 | }).then((blob) => {
20 | saveAs(blob, `${zip_name}.zip`)
21 | }, (err) => {
22 | alert('导出失败')
23 | })
24 | }
25 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/code.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/druid.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/utils/permission.js:
--------------------------------------------------------------------------------
1 | import store from '@/store'
2 |
3 | /**
4 | * @param {Array} value
5 | * @returns {Boolean}
6 | * @example see @/views/permission/directive.vue
7 | */
8 | export default function checkPermission(value) {
9 | if (value && value instanceof Array && value.length > 0) {
10 | const roles = store.getters && store.getters.roles
11 | const permissionRoles = value
12 |
13 | const hasPermission = roles.some(role => {
14 | return permissionRoles.includes(role)
15 | })
16 |
17 | if (!hasPermission) {
18 | return false
19 | }
20 | return true
21 | } else {
22 | console.error(`need roles! Like v-permission="['admin','editor']"`)
23 | return false
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/druid.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/code.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/peoples.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/peoples.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/components/MarkdownEditor/default-options.js:
--------------------------------------------------------------------------------
1 | // doc: https://nhnent.github.io/tui.editor/api/latest/ToastUIEditor.html#ToastUIEditor
2 | export default {
3 | minHeight: '200px',
4 | previewStyle: 'vertical',
5 | useCommandShortcut: true,
6 | useDefaultHTMLSanitizer: true,
7 | usageStatistics: false,
8 | hideModeSwitch: false,
9 | toolbarItems: [
10 | 'heading',
11 | 'bold',
12 | 'italic',
13 | 'strike',
14 | 'divider',
15 | 'hr',
16 | 'quote',
17 | 'divider',
18 | 'ul',
19 | 'ol',
20 | 'task',
21 | 'indent',
22 | 'outdent',
23 | 'divider',
24 | 'table',
25 | 'image',
26 | 'link',
27 | 'divider',
28 | 'code',
29 | 'codeblock'
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/dashboard/src/views/dashboard/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
32 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/input.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/utils/generator/drawingDefault.js:
--------------------------------------------------------------------------------
1 | export default [
2 | {
3 | layout: 'colFormItem',
4 | tagIcon: 'input',
5 | label: '手机号',
6 | vModel: 'mobile',
7 | formId: 6,
8 | tag: 'el-input',
9 | placeholder: '请输入手机号',
10 | defaultValue: '',
11 | span: 24,
12 | style: { width: '100%' },
13 | clearable: true,
14 | prepend: '',
15 | append: '',
16 | 'prefix-icon': 'el-icon-mobile',
17 | 'suffix-icon': '',
18 | maxlength: 11,
19 | 'show-word-limit': true,
20 | readonly: false,
21 | disabled: false,
22 | required: true,
23 | changeTag: true,
24 | regList: [{
25 | pattern: '/^1(3|4|5|7|8|9)\\d{9}$/',
26 | message: '手机号格式错误'
27 | }]
28 | }
29 | ]
30 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/server.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/tests/unit/components/Hamburger.spec.js:
--------------------------------------------------------------------------------
1 | import { shallowMount } from '@vue/test-utils'
2 | import Hamburger from '@/components/Hamburger/index.vue'
3 | describe('Hamburger.vue', () => {
4 | it('toggle click', () => {
5 | const wrapper = shallowMount(Hamburger)
6 | const mockFn = jest.fn()
7 | wrapper.vm.$on('toggleClick', mockFn)
8 | wrapper.find('.hamburger').trigger('click')
9 | expect(mockFn).toBeCalled()
10 | })
11 | it('prop isActive', () => {
12 | const wrapper = shallowMount(Hamburger)
13 | wrapper.setProps({ isActive: true })
14 | expect(wrapper.contains('.is-active')).toBe(true)
15 | wrapper.setProps({ isActive: false })
16 | expect(wrapper.contains('.is-active')).toBe(false)
17 | })
18 | })
19 |
--------------------------------------------------------------------------------
/dashboard/tests/unit/components/SvgIcon.spec.js:
--------------------------------------------------------------------------------
1 | import { shallowMount } from '@vue/test-utils'
2 | import SvgIcon from '@/components/SvgIcon/index.vue'
3 | describe('SvgIcon.vue', () => {
4 | it('iconClass', () => {
5 | const wrapper = shallowMount(SvgIcon, {
6 | propsData: {
7 | iconClass: 'test'
8 | }
9 | })
10 | expect(wrapper.find('use').attributes().href).toBe('#icon-test')
11 | })
12 | it('className', () => {
13 | const wrapper = shallowMount(SvgIcon, {
14 | propsData: {
15 | iconClass: 'test'
16 | }
17 | })
18 | expect(wrapper.classes().length).toBe(1)
19 | wrapper.setProps({ className: 'test' })
20 | expect(wrapper.classes().includes('test')).toBe(true)
21 | })
22 | })
23 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/input.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/directive/button_permission/hasRole.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 角色权限处理
3 | * Copyright (c) 2019 ruoyi
4 | */
5 |
6 | import store from '@/store'
7 |
8 | export default {
9 | inserted(el, binding, vnode) {
10 | const { value } = binding
11 | const super_admin = 'admin'
12 | const roles = store.getters && store.getters.roles
13 |
14 | if (value && value instanceof Array && value.length > 0) {
15 | const roleFlag = value
16 |
17 | const hasRole = roles.some(role => {
18 | return super_admin === role || roleFlag.includes(role)
19 | })
20 |
21 | if (!hasRole) {
22 | el.parentNode && el.parentNode.removeChild(el)
23 | }
24 | } else {
25 | throw new Error(`请设置角色权限标签值"`)
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/server.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/views/vod/web/about.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
![]()
6 |
扫个微信,聊一聊
7 |
8 |
9 |
10 |
11 |
12 |
28 |
29 |
37 |
--------------------------------------------------------------------------------
/dashboard/src/layout/components/Sidebar/FixiOSBug.js:
--------------------------------------------------------------------------------
1 | export default {
2 | computed: {
3 | device() {
4 | return this.$store.state.app.device
5 | }
6 | },
7 | mounted() {
8 | // In order to fix the click on menu on the ios device will trigger the mouseleave bug
9 | // https://github.com/PanJiaChen/vue-element-admin/issues/1135
10 | this.fixBugIniOS()
11 | },
12 | methods: {
13 | fixBugIniOS() {
14 | const $subMenu = this.$refs.subMenu
15 | if ($subMenu) {
16 | const handleMouseleave = $subMenu.handleMouseleave
17 | $subMenu.handleMouseleave = (e) => {
18 | if (this.device === 'mobile') {
19 | return
20 | }
21 | handleMouseleave(e)
22 | }
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/textarea.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/api/monitor/logininfor.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | const api_url = '/monitor/logininfor'
4 |
5 | // 查询登录日志列表
6 | export function list(query) {
7 | return request({
8 | url: api_url + '/list',
9 | method: 'get',
10 | params: query
11 | })
12 | }
13 |
14 | // 删除登录日志
15 | export function delRecord(id) {
16 | return request({
17 | url: api_url + '/' + id,
18 | method: 'delete'
19 | })
20 | }
21 |
22 | // 解锁用户登录状态
23 | export function unlockLogininfor(userName) {
24 | return request({
25 | url: '/monitor/logininfor/unlock/' + userName,
26 | method: 'get'
27 | })
28 | }
29 |
30 | // 清空登录日志
31 | export function cleanLogininfor() {
32 | return request({
33 | url: api_url + '/clean',
34 | method: 'delete'
35 | })
36 | }
37 |
--------------------------------------------------------------------------------
/dashboard/src/utils/clipboard.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Clipboard from 'clipboard'
3 |
4 | function clipboardSuccess() {
5 | Vue.prototype.$message({
6 | message: 'Copy successfully',
7 | type: 'success',
8 | duration: 1500
9 | })
10 | }
11 |
12 | function clipboardError() {
13 | Vue.prototype.$message({
14 | message: 'Copy failed',
15 | type: 'error'
16 | })
17 | }
18 |
19 | export default function handleClipboard(text, event) {
20 | const clipboard = new Clipboard(event.target, {
21 | text: () => text
22 | })
23 | clipboard.on('success', () => {
24 | clipboardSuccess()
25 | clipboard.destroy()
26 | })
27 | clipboard.on('error', () => {
28 | clipboardError()
29 | clipboard.destroy()
30 | })
31 | clipboard.onClick(event)
32 | }
33 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/textarea.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/time.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import getters from './getters'
4 |
5 | Vue.use(Vuex)
6 |
7 | // https://webpack.js.org/guides/dependency-management/#requirecontext
8 | const modulesFiles = require.context('./modules', true, /\.js$/)
9 |
10 | // you do not need `import app from './modules/app'`
11 | // it will auto require all vuex module from modules file
12 | const modules = modulesFiles.keys().reduce((modules, modulePath) => {
13 | // set './app.js' => 'app'
14 | const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
15 | const value = modulesFiles(modulePath)
16 | modules[moduleName] = value.default
17 | return modules
18 | }, {})
19 |
20 | const store = new Vuex.Store({
21 | modules,
22 | getters,
23 | })
24 |
25 | export default store
26 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/time.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/store/modules/settings.js:
--------------------------------------------------------------------------------
1 | import variables from '@/styles/element-variables.scss'
2 | import defaultSettings from '@/settings'
3 |
4 | const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings
5 |
6 | const state = {
7 | theme: variables.theme,
8 | showSettings: showSettings,
9 | tagsView: tagsView,
10 | fixedHeader: fixedHeader,
11 | sidebarLogo: sidebarLogo
12 | }
13 |
14 | const mutations = {
15 | CHANGE_SETTING: (state, { key, value }) => {
16 | if (state.hasOwnProperty(key)) {
17 | state[key] = value
18 | }
19 | }
20 | }
21 |
22 | const actions = {
23 | changeSetting({ commit }, data) {
24 | commit('CHANGE_SETTING', data)
25 | }
26 | }
27 |
28 | export default {
29 | namespaced: true,
30 | state,
31 | mutations,
32 | actions
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/edit.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/edit.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/nested.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/store/modules/vod.js:
--------------------------------------------------------------------------------
1 | // 初始化状态
2 | const state = {
3 | recommend: [],
4 | filters: {
5 | "电视剧": "aa"
6 | }
7 | };
8 |
9 | // 修改状态的方法
10 | const mutations = {
11 | SET_Filters: (filters) => {
12 | state.filters = filters
13 | },
14 | SET_Recommend: (recommend) => {
15 | state.recommend = recommend
16 | },
17 | };
18 |
19 | // 包含异步操作或其他逻辑处理的方法
20 | const actions = {
21 | getfilters(categoryName) {
22 | if (Object.prototype.hasOwnProperty.call(filters, categoryName)) {
23 | const tvSeries = filters[categoryName];
24 | console.log(tvSeries);
25 | return tvSeries;
26 | } else {
27 | console.log("filters 中不包含键 " + categoryName);
28 | return [];
29 | }
30 | }
31 | };
32 |
33 | export default {
34 | namespaced: true, // 可选:启用命名空间
35 | state,
36 | mutations,
37 | actions
38 | };
39 |
40 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/nested.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/directive/button_permission/hasPermi.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 操作权限处理
3 | * Copyright (c) 2019 ruoyi
4 | */
5 |
6 | import store from '@/store'
7 |
8 | export default {
9 | inserted(el, binding, vnode) {
10 | const { value } = binding
11 | const all_permission = '*:*:*'
12 | const permissions = store.getters && store.getters.permissions
13 |
14 | if (value && value instanceof Array && value.length > 0) {
15 | const permissionFlag = value
16 |
17 | const hasPermissions = permissions.some(permission => {
18 | return all_permission === permission || permissionFlag.includes(permission)
19 | })
20 |
21 | if (!hasPermissions) {
22 | el.parentNode && el.parentNode.removeChild(el)
23 | }
24 | } else {
25 | throw new Error(`请设置操作权限标签值`)
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/dashboard/src/store/getters.js:
--------------------------------------------------------------------------------
1 | const getters = {
2 | sidebar: state => state.app.sidebar,
3 | size: state => state.app.size,
4 | device: state => state.app.device,
5 | visitedViews: state => state.tagsView.visitedViews,
6 | cachedViews: state => state.tagsView.cachedViews,
7 | token: state => state.user.token,
8 | avatar: state => state.user.avatar,
9 | username: state => state.user.username,
10 | nickname: state => state.user.nickname,
11 | email: state => state.user.email,
12 | phone: state => state.user.phone,
13 | sex: state => state.user.sex,
14 | roles: state => state.user.roles,
15 | roles_name: state => state.user.roles_name,
16 | permissions: state => state.user.permissions,
17 | permission_routes: state => state.permission.routes,
18 | errorLogs: state => state.errorLog.logs
19 | }
20 | export default getters
21 |
--------------------------------------------------------------------------------
/dashboard/src/directive/permission/permission.js:
--------------------------------------------------------------------------------
1 | import store from '@/store'
2 |
3 | function checkPermission(el, binding) {
4 | const { value } = binding
5 | const roles = store.getters && store.getters.roles
6 |
7 | if (value && value instanceof Array) {
8 | if (value.length > 0) {
9 | const permissionRoles = value
10 |
11 | const hasPermission = roles.some(role => {
12 | return permissionRoles.includes(role)
13 | })
14 |
15 | if (!hasPermission) {
16 | el.parentNode && el.parentNode.removeChild(el)
17 | }
18 | }
19 | } else {
20 | throw new Error(`need roles! Like v-permission="['admin','editor']"`)
21 | }
22 | }
23 |
24 | export default {
25 | inserted(el, binding) {
26 | checkPermission(el, binding)
27 | },
28 | update(el, binding) {
29 | checkPermission(el, binding)
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/row.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
3 | transform: {
4 | '^.+\\.vue$': 'vue-jest',
5 | '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
6 | 'jest-transform-stub',
7 | '^.+\\.jsx?$': 'babel-jest'
8 | },
9 | moduleNameMapper: {
10 | '^@/(.*)$': '/src/$1'
11 | },
12 | snapshotSerializers: ['jest-serializer-vue'],
13 | testMatch: [
14 | '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
15 | ],
16 | collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
17 | coverageDirectory: '/tests/unit/coverage',
18 | // 'collectCoverage': true,
19 | 'coverageReporters': [
20 | 'lcov',
21 | 'text-summary'
22 | ],
23 | testURL: 'http://localhost/'
24 | }
25 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/row.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/monitor.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/layout/components/Sidebar/Link.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
44 |
--------------------------------------------------------------------------------
/dashboard/src/components/iFrame/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
37 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/monitor.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/layout/components/Sidebar/Item.vue:
--------------------------------------------------------------------------------
1 |
34 |
35 |
42 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/tree-table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/api/hiker/rule.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | const api_url = '/hiker/hiker_rule'
4 |
5 | // 查询列表
6 | export function searchRecords(query) {
7 | return request({
8 | url: api_url,
9 | method: 'get',
10 | params: query
11 | })
12 | }
13 |
14 | // 查询详细
15 | export function getRecord(id) {
16 | return request({
17 | url: api_url + '/' + id,
18 | method: 'get'
19 | })
20 | }
21 |
22 | // 新增
23 | export function addRecord(data) {
24 | return request({
25 | url: api_url,
26 | method: 'post',
27 | data: data
28 | })
29 | }
30 |
31 | // 修改
32 | export function setRecord(id, data) {
33 | return request({
34 | url: api_url + '/' + id,
35 | method: 'put',
36 | data: data
37 | })
38 | }
39 |
40 | // 删除
41 | export function delRecord(id) {
42 | return request({
43 | url: api_url + '/' + id,
44 | method: 'delete'
45 | })
46 | }
47 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/tree-table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/api/monitor/pip.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | const api_url = '/monitor/pip'
4 |
5 | // 查询列表
6 | export function searchRecords(query) {
7 | return request({
8 | url: api_url,
9 | method: 'get',
10 | params: query
11 | })
12 | }
13 |
14 | // 查询详细
15 | export function getRecord(id) {
16 | return request({
17 | url: api_url + '/' + id,
18 | method: 'get'
19 | })
20 | }
21 |
22 | // 新增
23 | export function addRecord(data) {
24 | return request({
25 | url: api_url,
26 | method: 'post',
27 | data: data,
28 | timeout: 60*1000
29 | })
30 | }
31 |
32 | // 修改
33 | export function setRecord(id, data) {
34 | return request({
35 | url: api_url + '/' + id,
36 | method: 'put',
37 | data: data
38 | })
39 | }
40 |
41 | // 删除
42 | export function delRecord(id) {
43 | return request({
44 | url: api_url + '/' + id,
45 | method: 'delete'
46 | })
47 | }
48 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/styles/variables.scss:
--------------------------------------------------------------------------------
1 | // base color
2 | $blue:#324157;
3 | $light-blue:#3A71A8;
4 | $red:#C03639;
5 | $pink: #E65D6E;
6 | $green: #30B08F;
7 | $tiffany: #4AB7BD;
8 | $yellow:#FEC171;
9 | $panGreen: #30B08F;
10 |
11 | // sidebar
12 | $menuText:#bfcbd9;
13 | $menuActiveText:#409EFF;
14 | $subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951
15 |
16 | $menuBg:#304156;
17 | $menuHover:#263445;
18 |
19 | $subMenuBg:#1f2d3d;
20 | $subMenuHover:#001528;
21 |
22 | $sideBarWidth: 210px;
23 |
24 | // the :export directive is the magic sauce for webpack
25 | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
26 | :export {
27 | menuText: $menuText;
28 | menuActiveText: $menuActiveText;
29 | subMenuActiveText: $subMenuActiveText;
30 | menuBg: $menuBg;
31 | menuHover: $menuHover;
32 | subMenuBg: $subMenuBg;
33 | subMenuHover: $subMenuHover;
34 | sideBarWidth: $sideBarWidth;
35 | }
36 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/build.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/directive/waves/waves.css:
--------------------------------------------------------------------------------
1 | .waves-ripple {
2 | position: absolute;
3 | border-radius: 100%;
4 | background-color: rgba(0, 0, 0, 0.15);
5 | background-clip: padding-box;
6 | pointer-events: none;
7 | -webkit-user-select: none;
8 | -moz-user-select: none;
9 | -ms-user-select: none;
10 | user-select: none;
11 | -webkit-transform: scale(0);
12 | -ms-transform: scale(0);
13 | transform: scale(0);
14 | opacity: 1;
15 | }
16 |
17 | .waves-ripple.z-active {
18 | opacity: 0;
19 | -webkit-transform: scale(2);
20 | -ms-transform: scale(2);
21 | transform: scale(2);
22 | -webkit-transition: opacity 1.2s ease-out, -webkit-transform 0.6s ease-out;
23 | transition: opacity 1.2s ease-out, -webkit-transform 0.6s ease-out;
24 | transition: opacity 1.2s ease-out, transform 0.6s ease-out;
25 | transition: opacity 1.2s ease-out, transform 0.6s ease-out, -webkit-transform 0.6s ease-out;
26 | }
--------------------------------------------------------------------------------
/dashboard/src/styles/element-variables.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * I think element-ui's default theme color is too light for long-term use.
3 | * So I modified the default color and you can modify it to your liking.
4 | **/
5 |
6 | /* theme color */
7 | $--color-primary: #1890ff;
8 | $--color-success: #13ce66;
9 | $--color-warning: #ffba00;
10 | $--color-danger: #ff4949;
11 | // $--color-info: #1E1E1E;
12 |
13 | $--button-font-weight: 400;
14 |
15 | // $--color-text-regular: #1f2d3d;
16 |
17 | $--border-color-light: #dfe4ed;
18 | $--border-color-lighter: #e6ebf5;
19 |
20 | $--table-border: 1px solid #dfe6ec;
21 |
22 | /* icon font path, required */
23 | $--font-path: "~element-ui/lib/theme-chalk/fonts";
24 |
25 | @import "~element-ui/packages/theme-chalk/src/index";
26 |
27 | // the :export directive is the magic sauce for webpack
28 | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
29 | :export {
30 | theme: $--color-primary;
31 | }
32 |
--------------------------------------------------------------------------------
/dashboard/src/styles/transition.scss:
--------------------------------------------------------------------------------
1 | // global transition css
2 |
3 | /* fade */
4 | .fade-enter-active,
5 | .fade-leave-active {
6 | transition: opacity 0.28s;
7 | }
8 |
9 | .fade-enter,
10 | .fade-leave-active {
11 | opacity: 0;
12 | }
13 |
14 | /* fade-transform */
15 | .fade-transform-leave-active,
16 | .fade-transform-enter-active {
17 | transition: all .5s;
18 | }
19 |
20 | .fade-transform-enter {
21 | opacity: 0;
22 | transform: translateX(-30px);
23 | }
24 |
25 | .fade-transform-leave-to {
26 | opacity: 0;
27 | transform: translateX(30px);
28 | }
29 |
30 | /* breadcrumb transition */
31 | .breadcrumb-enter-active,
32 | .breadcrumb-leave-active {
33 | transition: all .5s;
34 | }
35 |
36 | .breadcrumb-enter,
37 | .breadcrumb-leave-active {
38 | opacity: 0;
39 | transform: translateX(20px);
40 | }
41 |
42 | .breadcrumb-move {
43 | transition: all .5s;
44 | }
45 |
46 | .breadcrumb-leave-active {
47 | position: absolute;
48 | }
49 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/build.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/settings.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | title: 'HiPy-嗨派',
3 |
4 | /**
5 | * @type {boolean} true | false
6 | * @description Whether show the settings right-panel
7 | */
8 | showSettings: false,
9 |
10 | /**
11 | * @type {boolean} true | false
12 | * @description Whether need tagsView
13 | */
14 | tagsView: true,
15 |
16 | /**
17 | * @type {boolean} true | false
18 | * @description Whether fix the header
19 | */
20 | fixedHeader: false,
21 |
22 | /**
23 | * @type {boolean} true | false
24 | * @description Whether show the logo in sidebar
25 | */
26 | sidebarLogo: true,
27 |
28 | /**
29 | * @type {string | array} 'production' | ['production', 'development']
30 | * @description Need show err logs component.
31 | * The default is only used in the production env
32 | * If you want to also use it in dev, you can pass ['production', 'development']
33 | */
34 | errorLog: 'production'
35 | }
36 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/clipboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/clipboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/list.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/list.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/download.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/download.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/api/permission/label.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询b权限标签列表
4 | export function listPermLabel(query) {
5 | return request({
6 | url: '/permission/perm-label',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 |
13 | // 查询权限标签详细
14 | export function getPermLabel(labelId) {
15 | return request({
16 | url: '/permission/perm-label/' + labelId,
17 | method: 'get'
18 | })
19 | }
20 |
21 | // 新增权限标签
22 | export function addPermLabel(data) {
23 | console.log(data)
24 | return request({
25 | url: '/permission/perm-label',
26 | method: 'post',
27 | data: data
28 | })
29 | }
30 |
31 | // 修改权限标签
32 | export function setPermLabel(labelId, data) {
33 | return request({
34 | url: '/permission/perm-label/' + labelId,
35 | method: 'put',
36 | data: data
37 | })
38 | }
39 |
40 | // 删除权限标签
41 | export function delPermLabel(labelId) {
42 | return request({
43 | url: '/permission/perm-label/' + labelId,
44 | method: 'delete'
45 | })
46 | }
47 |
48 |
49 |
--------------------------------------------------------------------------------
/dashboard/src/styles/reset.scss:
--------------------------------------------------------------------------------
1 | // 对部分样式进行重置
2 | html {
3 | line-height: 1.15;
4 | -webkit-text-size-adjust: 100%;
5 | }
6 |
7 | body {
8 | height: 100%;
9 | -moz-osx-font-smoothing: grayscale;
10 | -webkit-font-smoothing: antialiased;
11 | text-rendering: optimizeLegibility;
12 | font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
13 | }
14 |
15 | em {
16 | font-style: normal;
17 | }
18 |
19 | ul,
20 | dl,
21 | li,
22 | dd,
23 | dt {
24 | margin: 0;
25 | padding: 0;
26 | list-style: none;
27 | }
28 |
29 | figure,
30 | h1,
31 | h2,
32 | h3,
33 | h4,
34 | h5,
35 | h6,
36 | p {
37 | margin: 0;
38 | }
39 |
40 | * {
41 | box-sizing: border-box;
42 | margin: 0;
43 | padding: 0;
44 | scrollbar-color: #f2f2f4 transparent;
45 | scrollbar-width: thin;
46 | }
47 |
48 | a,
49 | a:focus,
50 | a:hover {
51 | outline: none;
52 | cursor: pointer;
53 | color: inherit;
54 | text-decoration: none;
55 | }
56 |
57 | input {
58 | overflow: visible;
59 | outline: none;
60 | }
--------------------------------------------------------------------------------
/dashboard/build/index.js:
--------------------------------------------------------------------------------
1 | const { run } = require('runjs')
2 | const chalk = require('chalk')
3 | const config = require('../vue.config.js')
4 | const rawArgv = process.argv.slice(2)
5 | const args = rawArgv.join(' ')
6 |
7 | if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
8 | const report = rawArgv.includes('--report')
9 |
10 | run(`vue-cli-service build ${args}`)
11 |
12 | const port = 9526
13 | const publicPath = config.publicPath
14 |
15 | var connect = require('connect')
16 | var serveStatic = require('serve-static')
17 | const app = connect()
18 |
19 | app.use(
20 | publicPath,
21 | serveStatic('./dist', {
22 | index: ['index.html', '/']
23 | })
24 | )
25 |
26 | app.listen(port, function () {
27 | console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
28 | if (report) {
29 | console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
30 | }
31 |
32 | })
33 | } else {
34 | run(`vue-cli-service build ${args}`)
35 | }
36 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/utils/error-log.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import store from '@/store'
3 | import { isString, isArray } from '@/utils/validate'
4 | import settings from '@/settings'
5 |
6 | // you can set in settings.js
7 | // errorLog:'production' | ['production', 'development']
8 | const { errorLog: needErrorLog } = settings
9 |
10 | function checkNeed() {
11 | const env = process.env.NODE_ENV
12 | if (isString(needErrorLog)) {
13 | return env === needErrorLog
14 | }
15 | if (isArray(needErrorLog)) {
16 | return needErrorLog.includes(env)
17 | }
18 | return false
19 | }
20 |
21 | if (checkNeed()) {
22 | Vue.config.errorHandler = function(err, vm, info, a) {
23 | // Don't ask me why I use Vue.nextTick, it just a hack.
24 | // detail see https://forum.vuejs.org/t/dispatch-in-vue-config-errorhandler-has-some-problem/23500
25 | Vue.nextTick(() => {
26 | store.dispatch('errorLog/addErrorLog', {
27 | err,
28 | vm,
29 | info,
30 | url: window.location.href
31 | })
32 | console.error(err, info)
33 | })
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/international.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/international.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/question.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/api/hiker/rule_type.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | const api_url = '/hiker/hiker_rule_type'
4 |
5 | // 查询列表
6 | export function searchRecords(query) {
7 | return request({
8 | url: api_url,
9 | method: 'get',
10 | params: query
11 | })
12 | }
13 |
14 | // 查询详细
15 | export function getRecord(id) {
16 | return request({
17 | url: api_url + '/' + id,
18 | method: 'get'
19 | })
20 | }
21 |
22 | // 新增
23 | export function addRecord(data) {
24 | return request({
25 | url: api_url,
26 | method: 'post',
27 | data: data
28 | })
29 | }
30 |
31 | // 修改
32 | export function setRecord(id, data) {
33 | return request({
34 | url: api_url + '/' + id,
35 | method: 'put',
36 | data: data
37 | })
38 | }
39 |
40 | // 删除
41 | export function delRecord(id) {
42 | return request({
43 | url: api_url + '/' + id,
44 | method: 'delete'
45 | })
46 | }
47 |
48 | // 修改开发者是否启用
49 | export function changeActive(id, active) {
50 | return request({
51 | url: api_url + '/' + id + '/active',
52 | method: 'put',
53 | data: {'active': active}
54 | })
55 | }
56 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/question.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017-present PanJiaChen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/wechat.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/wechat.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/skill.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/tests/unit/utils/formatTime.spec.js:
--------------------------------------------------------------------------------
1 | import { formatTime } from '@/utils/index.js'
2 | describe('Utils:formatTime', () => {
3 | const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
4 | const retrofit = 5 * 1000
5 |
6 | it('ten digits timestamp', () => {
7 | expect(formatTime((d / 1000).toFixed(0))).toBe('7月13日17时54分')
8 | })
9 | it('test now', () => {
10 | expect(formatTime(+new Date() - 1)).toBe('刚刚')
11 | })
12 | it('less two minute', () => {
13 | expect(formatTime(+new Date() - 60 * 2 * 1000 + retrofit)).toBe('2分钟前')
14 | })
15 | it('less two hour', () => {
16 | expect(formatTime(+new Date() - 60 * 60 * 2 * 1000 + retrofit)).toBe('2小时前')
17 | })
18 | it('less one day', () => {
19 | expect(formatTime(+new Date() - 60 * 60 * 24 * 1 * 1000)).toBe('1天前')
20 | })
21 | it('more than one day', () => {
22 | expect(formatTime(d)).toBe('7月13日17时54分')
23 | })
24 | it('format', () => {
25 | expect(formatTime(d, '{y}-{m}-{d} {h}:{i}')).toBe('2018-07-13 17:54')
26 | expect(formatTime(d, '{y}-{m}-{d}')).toBe('2018-07-13')
27 | expect(formatTime(d, '{y}/{m}/{d} {h}-{i}')).toBe('2018/07/13 17-54')
28 | })
29 | })
30 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/skill.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/people.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/people.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/post.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/post.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/api/vod/subs.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 |
4 | const api_url = '/vods/subs'
5 |
6 |
7 | // 查询列表
8 | export function searchRecords(query) {
9 | return request({
10 | url: api_url,
11 | method: 'get',
12 | params: query
13 | })
14 | }
15 |
16 | // 查询详细
17 | export function getRecord(id) {
18 | return request({
19 | url: api_url + '/' + id,
20 | method: 'get'
21 | })
22 | }
23 |
24 | // 新增
25 | export function addRecord(data) {
26 | return request({
27 | url: api_url,
28 | method: 'post',
29 | data: data
30 | })
31 | }
32 |
33 | // 修改
34 | export function setRecord(id, data) {
35 | console.log(data);
36 | return request({
37 | url: api_url + '/' + id,
38 | method: 'put',
39 | data: data
40 | })
41 | }
42 |
43 | // 删除
44 | export function delRecord(id) {
45 | return request({
46 | url: api_url + '/' + id,
47 | method: 'delete'
48 | })
49 | }
50 |
51 | export function enableRecords(ids) {
52 | return request({
53 | url: api_url + '/enable/' + ids,
54 | method: 'put'
55 | })
56 | }
57 |
58 | export function disableRecords(ids) {
59 | return request({
60 | url: api_url + '/disable/' + ids,
61 | method: 'put'
62 | })
63 | }
64 |
--------------------------------------------------------------------------------
/dashboard/src/layout/components/AppMain.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
24 |
25 |
49 |
50 |
58 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/checkbox.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/language.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/language.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/checkbox.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/tests/unit/utils/validate.spec.js:
--------------------------------------------------------------------------------
1 | import { validUsername, validURL, validLowerCase, validUpperCase, validAlphabets } from '@/utils/validate.js'
2 | describe('Utils:validate', () => {
3 | it('validUsername', () => {
4 | expect(validUsername('admin')).toBe(true)
5 | expect(validUsername('editor')).toBe(true)
6 | expect(validUsername('xxxx')).toBe(false)
7 | })
8 | it('validURL', () => {
9 | expect(validURL('https://github.com/PanJiaChen/vue-element-admin')).toBe(true)
10 | expect(validURL('http://github.com/PanJiaChen/vue-element-admin')).toBe(true)
11 | expect(validURL('github.com/PanJiaChen/vue-element-admin')).toBe(false)
12 | })
13 | it('validLowerCase', () => {
14 | expect(validLowerCase('abc')).toBe(true)
15 | expect(validLowerCase('Abc')).toBe(false)
16 | expect(validLowerCase('123abc')).toBe(false)
17 | })
18 | it('validUpperCase', () => {
19 | expect(validUpperCase('ABC')).toBe(true)
20 | expect(validUpperCase('Abc')).toBe(false)
21 | expect(validUpperCase('123ABC')).toBe(false)
22 | })
23 | it('validAlphabets', () => {
24 | expect(validAlphabets('ABC')).toBe(true)
25 | expect(validAlphabets('Abc')).toBe(true)
26 | expect(validAlphabets('123aBC')).toBe(false)
27 | })
28 | })
29 |
--------------------------------------------------------------------------------
/dashboard/src/api/system/dict/data.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 获取字典
4 | export function getDicts(type) {
5 | return request({
6 | url: "/system/dict/type/" + type,
7 | method: 'get'
8 | })
9 | }
10 |
11 |
12 | // 查询字典类型列表
13 | export function listDictData(query) {
14 | return request({
15 | url: '/system/dict/data',
16 | method: 'get',
17 | params: query
18 | })
19 | }
20 |
21 | // 查询字典类型详细
22 | export function getDictData(id) {
23 | return request({
24 | url: '/system/dict/data/' + id,
25 | method: 'get'
26 | })
27 | }
28 |
29 | // 新增字典类型
30 | export function addDictData(data) {
31 | return request({
32 | url: '/system/dict/data',
33 | method: 'post',
34 | data: data
35 | })
36 | }
37 |
38 | // 修改字典类型
39 | export function setDictData(id, data) {
40 | return request({
41 | url: '/system/dict/data/' + id,
42 | method: 'put',
43 | data: data
44 | })
45 | }
46 |
47 | // 删除字典类型
48 | export function delDictData(id) {
49 | return request({
50 | url: '/system/dict/data/' + id,
51 | method: 'delete'
52 | })
53 | }
54 |
55 |
56 | export function getDictDataMaxOrderNum(){
57 | return request({
58 | url: "/system/dict/data/max-order-num",
59 | method: "get"
60 | })
61 | }
62 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/eye-open.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/eye-open.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/utils/open-window.js:
--------------------------------------------------------------------------------
1 | /**
2 | *Created by PanJiaChen on 16/11/29.
3 | * @param {Sting} url
4 | * @param {Sting} title
5 | * @param {Number} w
6 | * @param {Number} h
7 | */
8 | export default function openWindow(url, title, w, h) {
9 | // Fixes dual-screen position Most browsers Firefox
10 | const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left
11 | const dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top
12 |
13 | const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width
14 | const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height
15 |
16 | const left = ((width / 2) - (w / 2)) + dualScreenLeft
17 | const top = ((height / 2) - (h / 2)) + dualScreenTop
18 | const newWindow = window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left)
19 |
20 | // Puts focus on the newWindow
21 | if (window.focus) {
22 | newWindow.focus()
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/dashboard/tests/unit/utils/parseTime.spec.js:
--------------------------------------------------------------------------------
1 | import { parseTime } from '@/utils/index.js'
2 |
3 | describe('Utils:parseTime', () => {
4 | const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
5 | it('timestamp', () => {
6 | expect(parseTime(d)).toBe('2018-07-13 17:54:01')
7 | })
8 |
9 | it('timestamp string', () => {
10 | expect(parseTime((d + ''))).toBe('2018-07-13 17:54:01')
11 | })
12 |
13 | it('ten digits timestamp', () => {
14 | expect(parseTime((d / 1000).toFixed(0))).toBe('2018-07-13 17:54:01')
15 | })
16 | it('new Date', () => {
17 | expect(parseTime(new Date(d))).toBe('2018-07-13 17:54:01')
18 | })
19 | it('format', () => {
20 | expect(parseTime(d, '{y}-{m}-{d} {h}:{i}')).toBe('2018-07-13 17:54')
21 | expect(parseTime(d, '{y}-{m}-{d}')).toBe('2018-07-13')
22 | expect(parseTime(d, '{y}/{m}/{d} {h}-{i}')).toBe('2018/07/13 17-54')
23 | })
24 | it('get the day of the week', () => {
25 | expect(parseTime(d, '{a}')).toBe('五') // 星期五
26 | })
27 | it('get the day of the week', () => {
28 | expect(parseTime(+d + 1000 * 60 * 60 * 24 * 2, '{a}')).toBe('日') // 星期日
29 | })
30 | it('empty argument', () => {
31 | expect(parseTime()).toBeNull()
32 | })
33 |
34 | it('null', () => {
35 | expect(parseTime(null)).toBeNull()
36 | })
37 | })
38 |
--------------------------------------------------------------------------------
/dashboard/src/api/monitor/cache.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询缓存详细
4 | export function getCache() {
5 | return request({
6 | url: '/monitor/cache',
7 | method: 'get'
8 | })
9 | }
10 |
11 | // 查询缓存名称列表
12 | export function listCacheName() {
13 | return request({
14 | url: '/monitor/cache/getNames',
15 | method: 'get'
16 | })
17 | }
18 |
19 | // 查询缓存键名列表
20 | export function listCacheKey(cacheName) {
21 | return request({
22 | url: '/monitor/cache/getKeys/' + cacheName,
23 | method: 'get'
24 | })
25 | }
26 |
27 | // 查询缓存内容
28 | export function getCacheValue(cacheName, cacheKey) {
29 | return request({
30 | url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey,
31 | method: 'get'
32 | })
33 | }
34 |
35 | // 清理指定名称缓存
36 | export function clearCacheName(cacheName) {
37 | return request({
38 | url: '/monitor/cache/clearCacheName/' + cacheName,
39 | method: 'delete'
40 | })
41 | }
42 |
43 | // 清理指定键名缓存
44 | export function clearCacheKey(cacheKey) {
45 | return request({
46 | url: '/monitor/cache/clearCacheKey/' + cacheKey,
47 | method: 'delete'
48 | })
49 | }
50 |
51 | // 清理全部缓存
52 | export function clearCacheAll() {
53 | return request({
54 | url: '/monitor/cache/clearCacheAll',
55 | method: 'delete'
56 | })
57 | }
58 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/validCode.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/api/system/dict/detail.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 |
4 | // 查询字典数据列表
5 | export function listDetail(query) {
6 | return request({
7 | url: '/system/dict/detail',
8 | method: 'get',
9 | params: query
10 | })
11 | }
12 |
13 | // 查询字典数据详细
14 | export function getDetail(id) {
15 | return request({
16 | url: '/system/dict/detail/' + id,
17 | method: 'get'
18 | })
19 | }
20 |
21 | // 根据字典类型查询字典数据信息 用于user获取字典
22 | export function getDicts(dictType) {
23 | return request({
24 | url: '/system/dict/data/type_code/' + dictType,
25 | method: 'get'
26 | })
27 | }
28 |
29 | // 新增字典数据
30 | export function addDetail(data) {
31 | return request({
32 | url: '/system/dict/detail',
33 | method: 'post',
34 | data: data
35 | })
36 | }
37 |
38 | // 修改字典数据
39 | export function setDetail(id, data) {
40 | return request({
41 | url: '/system/dict/detail/' + id,
42 | method: 'put',
43 | data: data
44 | })
45 | }
46 |
47 | // 删除字典数据
48 | export function delDetail(id) {
49 | return request({
50 | url: '/system/dict/detail/' + id,
51 | method: 'delete'
52 | })
53 | }
54 |
55 |
56 | export function getDetailMaxOrderNum(dictDataID) {
57 | return request({
58 | url: "/system/dict/detail/max-order-num/" + dictDataID,
59 | method: "get"
60 | })
61 | }
62 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/validCode.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/components/Screenfull/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
50 |
51 |
61 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/radio.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/select.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/radio.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/select.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/directive/el-table/adaptive.js:
--------------------------------------------------------------------------------
1 | import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event'
2 |
3 | /**
4 | * How to use
5 | * ...
6 | * el-table height is must be set
7 | * bottomOffset: 30(default) // The height of the table from the bottom of the page.
8 | */
9 |
10 | const doResize = (el, binding, vnode) => {
11 | const { componentInstance: $table } = vnode
12 |
13 | const { value } = binding
14 |
15 | if (!$table.height) {
16 | throw new Error(`el-$table must set the height. Such as height='100px'`)
17 | }
18 | const bottomOffset = (value && value.bottomOffset) || 30
19 |
20 | if (!$table) return
21 |
22 | const height = window.innerHeight - el.getBoundingClientRect().top - bottomOffset
23 | $table.layout.setHeight(height)
24 | $table.doLayout()
25 | }
26 |
27 | export default {
28 | bind(el, binding, vnode) {
29 | el.resizeListener = () => {
30 | doResize(el, binding, vnode)
31 | }
32 | // parameter 1 is must be "Element" type
33 | addResizeListener(window.document.body, el.resizeListener)
34 | },
35 | inserted(el, binding, vnode) {
36 | doResize(el, binding, vnode)
37 | },
38 | unbind(el) {
39 | removeResizeListener(window.document.body, el.resizeListener)
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/dashboard/src/components/Hamburger/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
32 |
33 |
45 |
--------------------------------------------------------------------------------
/dashboard/src/api/system/parameter.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 获取参数
4 | export function getParameter(key) {
5 | return request({
6 | url: "/system/config-setting/key/" + key,
7 | method: 'get'
8 | })
9 | }
10 |
11 |
12 | // 查询参数列表
13 | export function listConfigSettings(query) {
14 | return request({
15 | url: '/system/config-setting',
16 | method: 'get',
17 | params: query
18 | })
19 | }
20 |
21 |
22 | // 获取参数
23 | export function getConfigSetting(id) {
24 | return request({
25 | url: "/system/config-setting/" + id,
26 | method: "get"
27 | })
28 | }
29 |
30 |
31 | // 获取最大排序
32 | export function getConfigSettingMaxOrderNum(){
33 | return request({
34 | url: "/system/config-setting/max-order-num",
35 | method: "get"
36 | })
37 | }
38 |
39 |
40 | // 添加参数
41 | export function addConfigSetting(data){
42 | return request({
43 | url: "/system/config-setting",
44 | method: "post",
45 | data: data
46 | })
47 | }
48 |
49 |
50 | // 更新参数
51 | export function setConfigSetting(id, data) {
52 | return request({
53 | url: "/system/config-setting/" + id,
54 | method: "put",
55 | data: data
56 | })
57 | }
58 |
59 |
60 | // 删除参数
61 | export function delConfigSetting(id) {
62 | return request({
63 | url: "/system/config-setting/" + id,
64 | method: 'delete'
65 | })
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/dashboard/src/icons/svg/upload.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/assets/icons/svg/upload.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/src/views/tool/liveTool/styles.scss:
--------------------------------------------------------------------------------
1 | .container-liveTool {
2 | max-width: 800px;
3 | margin: 0 auto;
4 | padding: 0 15px;
5 |
6 | body {
7 | font-family: Arial, sans-serif;
8 | margin-top: 40px;
9 | }
10 |
11 | .input-group {
12 | display: flex;
13 | align-items: center;
14 | margin-bottom: 20px;
15 | gap: 20px;
16 | }
17 |
18 | .button-group {
19 | display: flex;
20 | flex-wrap: wrap;
21 | justify-content: center;
22 | gap: 10px;
23 | }
24 |
25 | .text-center {
26 | text-align: center;
27 | }
28 |
29 | .mb-3 {
30 | margin-bottom: 20px;
31 | }
32 |
33 | .mb-5 {
34 | margin-bottom: 40px;
35 | }
36 |
37 | .mt-3 {
38 | margin-top: 20px;
39 | }
40 |
41 | .upload-demo {
42 | width: 100%;
43 | margin-bottom: 20px;
44 | }
45 |
46 | .el-input {
47 | flex: 1;
48 | }
49 |
50 | .custom-select .el-input__suffix {
51 | display: none;
52 | }
53 |
54 | .custom-select .el-input__inner {
55 | appearance: none;
56 | -moz-appearance: none;
57 | -webkit-appearance: none;
58 | padding-right: 10px;
59 | }
60 |
61 | footer {
62 | margin-top: 20px;
63 | text-align: center;
64 | padding: 20px 0;
65 | border-top: 1px solid #ccc;
66 | }
67 | }
68 |
69 | @media (max-width: 768px) {
70 | .container-liveTool {
71 | max-width: 100%;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/dashboard/src/api/hiker/developer.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询列表
4 | export function searchRecords(query) {
5 | return request({
6 | url: '/hiker/hiker_developer',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询详细
13 | export function getRecord(id) {
14 | return request({
15 | url: '/hiker/hiker_developer/' + id,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 新增
21 | export function addRecord(data) {
22 | return request({
23 | url: '/hiker/hiker_developer',
24 | method: 'post',
25 | data: data
26 | })
27 | }
28 |
29 | // 修改
30 | export function setRecord(id, data) {
31 | return request({
32 | url: '/hiker/hiker_developer/' + id,
33 | method: 'put',
34 | data: data
35 | })
36 | }
37 |
38 | // 删除
39 | export function delRecord(id) {
40 | return request({
41 | url: '/hiker/hiker_developer/' + id,
42 | method: 'delete'
43 | })
44 | }
45 |
46 | //修改开发者是否超管
47 | export function changeIsManager(id, is_manager) {
48 | return request({
49 | url: "/hiker/hiker_developer/" + id + "/is_manager",
50 | method: 'put',
51 | data: {'is_manager': is_manager}
52 | })
53 | }
54 |
55 | // 修改开发者是否启用
56 | export function changeActive(id, active) {
57 | return request({
58 | url: "/hiker/hiker_developer/" + id + "/active",
59 | method: 'put',
60 | data: {'active': active}
61 | })
62 | }
63 |
--------------------------------------------------------------------------------
/dashboard/plop-templates/view/prompt.js:
--------------------------------------------------------------------------------
1 | const { notEmpty } = require('../utils.js')
2 |
3 | module.exports = {
4 | description: 'generate a view',
5 | prompts: [{
6 | type: 'input',
7 | name: 'name',
8 | message: 'view name please',
9 | validate: notEmpty('name')
10 | },
11 | {
12 | type: 'checkbox',
13 | name: 'blocks',
14 | message: 'Blocks:',
15 | choices: [{
16 | name: '',
17 | value: 'template',
18 | checked: true
19 | },
20 | {
21 | name: '
47 |
48 |
63 |
--------------------------------------------------------------------------------
/dashboard/plop-templates/store/prompt.js:
--------------------------------------------------------------------------------
1 | const { notEmpty } = require('../utils.js')
2 |
3 | module.exports = {
4 | description: 'generate store',
5 | prompts: [{
6 | type: 'input',
7 | name: 'name',
8 | message: 'store name please',
9 | validate: notEmpty('name')
10 | },
11 | {
12 | type: 'checkbox',
13 | name: 'blocks',
14 | message: 'Blocks:',
15 | choices: [{
16 | name: 'state',
17 | value: 'state',
18 | checked: true
19 | },
20 | {
21 | name: 'mutations',
22 | value: 'mutations',
23 | checked: true
24 | },
25 | {
26 | name: 'actions',
27 | value: 'actions',
28 | checked: true
29 | }
30 | ],
31 | validate(value) {
32 | if (!value.includes('state') || !value.includes('mutations')) {
33 | return 'store require at least state and mutations'
34 | }
35 | return true
36 | }
37 | }
38 | ],
39 | actions(data) {
40 | const name = '{{name}}'
41 | const { blocks } = data
42 | const options = ['state', 'mutations']
43 | const joinFlag = `,
44 | `
45 | if (blocks.length === 3) {
46 | options.push('actions')
47 | }
48 |
49 | const actions = [{
50 | type: 'add',
51 | path: `src/store/modules/${name}.js`,
52 | templateFile: 'plop-templates/store/index.hbs',
53 | data: {
54 | options: options.join(joinFlag),
55 | state: blocks.includes('state'),
56 | mutations: blocks.includes('mutations'),
57 | actions: blocks.includes('actions')
58 | }
59 | }]
60 | return actions
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/dashboard/src/styles/mixin.scss:
--------------------------------------------------------------------------------
1 | @mixin clearfix {
2 | &:after {
3 | content: "";
4 | display: table;
5 | clear: both;
6 | }
7 | }
8 |
9 | @mixin scrollBar {
10 | &::-webkit-scrollbar-track-piece {
11 | background: #d3dce6;
12 | }
13 |
14 | &::-webkit-scrollbar {
15 | width: 6px;
16 | }
17 |
18 | &::-webkit-scrollbar-thumb {
19 | background: #99a9bf;
20 | border-radius: 20px;
21 | }
22 | }
23 |
24 | @mixin relative {
25 | position: relative;
26 | width: 100%;
27 | height: 100%;
28 | }
29 |
30 | @mixin pct($pct) {
31 | width: #{$pct};
32 | position: relative;
33 | margin: 0 auto;
34 | }
35 |
36 | @mixin triangle($width, $height, $color, $direction) {
37 | $width: $width/2;
38 | $color-border-style: $height solid $color;
39 | $transparent-border-style: $width solid transparent;
40 | height: 0;
41 | width: 0;
42 |
43 | @if $direction==up {
44 | border-bottom: $color-border-style;
45 | border-left: $transparent-border-style;
46 | border-right: $transparent-border-style;
47 | }
48 |
49 | @else if $direction==right {
50 | border-left: $color-border-style;
51 | border-top: $transparent-border-style;
52 | border-bottom: $transparent-border-style;
53 | }
54 |
55 | @else if $direction==down {
56 | border-top: $color-border-style;
57 | border-left: $transparent-border-style;
58 | border-right: $transparent-border-style;
59 | }
60 |
61 | @else if $direction==left {
62 | border-right: $color-border-style;
63 | border-top: $transparent-border-style;
64 | border-bottom: $transparent-border-style;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/dashboard/src/api/vod/configs.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | const api_url = '/vods/configs'
4 |
5 | // 获取参数
6 | export function getConfigsByKey(key) {
7 | return request({
8 | url: api_url + '/key/' + key,
9 | method: 'get'
10 | })
11 | }
12 |
13 |
14 | // 查询参数列表
15 | export function listConfigs(query) {
16 | return request({
17 | url: api_url + '/list',
18 | method: 'get',
19 | params: query
20 | })
21 | }
22 |
23 |
24 | // 获取参数
25 | export function getConfigsById(id) {
26 | return request({
27 | url: api_url + '/' + id,
28 | method: "get"
29 | })
30 | }
31 |
32 |
33 | // 获取最大排序
34 | export function getConfigsMaxOrderNum() {
35 | return request({
36 | url: api_url + "/max-order-num",
37 | method: "get"
38 | })
39 | }
40 |
41 |
42 | // 添加参数
43 | export function addConfigs(data) {
44 | return request({
45 | url: api_url,
46 | method: "post",
47 | data: data
48 | })
49 | }
50 |
51 |
52 | // 刷新配置
53 | export function refreshConfigs() {
54 | return request({
55 | url: api_url + '/refresh',
56 | method: 'post'
57 | })
58 | }
59 |
60 |
61 | // 更新参数
62 | export function setConfigs(id, data) {
63 | return request({
64 | url: api_url + "/" + id,
65 | method: "put",
66 | data: data
67 | })
68 | }
69 |
70 |
71 | // 删除参数
72 | export function delConfigs(id) {
73 | return request({
74 | url: api_url + "/" + id,
75 | method: 'delete'
76 | })
77 |
78 | }
79 |
80 | // 清空配置
81 | export function clearRecord() {
82 | return request({
83 | url: api_url + '/clear',
84 | method: 'delete'
85 | })
86 | }
87 |
--------------------------------------------------------------------------------
/dashboard/src/components/SizeSelect/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{
9 | item.label }}
10 |
11 |
12 |
13 |
14 |
15 |
58 |
--------------------------------------------------------------------------------