Commit b40c8631 by li

二合一App后台

parents
# https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
# just a flag
ENV = 'development'
# base api
VUE_APP_BASE_API = '/dev-api'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
# It only does one thing by converting all import() to require().
# This configuration can significantly increase the speed of hot updates,
# when you have a large number of pages.
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# just a flag
ENV = 'production'
# base api
VUE_APP_BASE_API = ''
NODE_ENV = production
# just a flag
ENV = 'staging'
# base api
VUE_APP_BASE_API = ''
build/*.js
src/assets
public
dist
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
"vue/max-attributes-per-line": [2, {
"singleline": 10,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline":"off",
"vue/name-property-casing": ["error", "PascalCase"],
"vue/no-v-html": "off",
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': ["error", "always", {"null": "ignore"}],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 0,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
tests/**/coverage/
tests/e2e/reports
tests/
selenium-debug.log
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock
language: node_js
node_js: 10
script: npm run test
notifications:
email: false
MIT License
Copyright (c) 2017-present PanJiaChen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
<p align="center">
<img width="320" src="https://wpimg.wallstcn.com/ecc53a42-d79b-42e2-8852-5126b810a4c8.svg">
</p>
<p align="center">
<a href="https://github.com/vuejs/vue">
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
</a>
<a href="https://github.com/ElemeFE/element">
<img src="https://img.shields.io/badge/element--ui-2.7.0-brightgreen.svg" alt="element-ui">
</a>
<a href="https://travis-ci.org/PanJiaChen/vue-element-admin" rel="nofollow">
<img src="https://travis-ci.org/PanJiaChen/vue-element-admin.svg?branch=master" alt="Estado de Construcción">
</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/mashape/apistatus.svg" alt="Licencia">
</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/releases">
<img src="https://img.shields.io/github/release/PanJiaChen/vue-element-admin.svg" alt="Liberación Github">
</a>
<a href="https://gitter.im/vue-element-admin/discuss">
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter">
</a>
<a href="https://panjiachen.github.io/vue-element-admin-site/donate">
<img src="https://img.shields.io/badge/%24-donate-ff69b4.svg" alt="Donación">
</a>
</p>
Español | [English](./README.md) | [简体中文](./README.zh-CN.md) | [日本語](./README.ja.md)
## Introducción
[vue-element-admin](https://panjiachen.github.io/vue-element-admin) es una interfáz de administración preparada para producción. Está basada en [vue](https://github.com/vuejs/vue) y usa [element-ui](https://github.com/ElemeFE/element) como conjunto de herramientas de interfáz de usuario.
Vue Element Admin es una solución práctica basada en la nueva plataforma de desarrollo de vue, construida con soporte a i18 para el manejo de múltiples lenguajes, plantillas estándares para aplicaciones de negocio y un conjunto de asombrosas características. Esta herramienta ayuda a construir largas y complejas Aplicacones de una sola página (SPA). Creo que lo que necesites hacer, este proyecto te ayudará.
- [Vista Prévia de la Aplicación](https://panjiachen.github.io/vue-element-admin)
- [Documentación](https://panjiachen.github.io/vue-element-admin-site/)
- [Canal de Gitter](https://gitter.im/vue-element-admin/discuss)
- [Para Donaciones](https://panjiachen.github.io/vue-element-admin-site/donate/)
- [Enlace de Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki)
- [Canal de Gitee](https://panjiachen.gitee.io/vue-element-admin/)
- Plantilla base recomendada para usar: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
- Aplicación de Escritorio: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
- Plantilla de Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Créditos: [@Armour](https://github.com/Armour))
**Después de la versión `v4.1.0+`, la rama por defecto master no tendrá soporte para i18n. Por favor use [i18n](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), los cambios serán incluidos en la rama master**
**la versión actual es `v4.0+` construida con `vue-cli`. Si encuentra algún problema, por favor coloque un [issue](https://github.com/PanJiaChen/vue-element-admin/issues/new). Si desea usar la versión anterior, puede cambiar de rama a [tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0), no relacionado con `vue-cli`**
**Este proyecto no está soportado para versiones muy viejas de navegadores (e.g. IE).**
## Preparación
Necesita instalar [node](https://nodejs.org/) y [git](https://git-scm.com/) localmente. El proyecto es basado en [ES2015+](https://es6.ruanyifeng.com/), [vue](https://cn.vuejs.org/index.html), [vuex](https://vuex.vuejs.org/zh-cn/), [vue-router](https://router.vuejs.org/zh-cn/), [vue-cli](https://github.com/vuejs/vue-cli) , [axios](https://github.com/axios/axios) and [element-ui](https://github.com/ElemeFE/element), toda la solicitud de datos simulada se realiza a través de [Mock.js](https://github.com/nuysoft/Mock).
Entendiendo y aprendiendo esto pudiera ayudarle con su proyecto.
<p align="center">
<img width="900" src="https://wpimg.wallstcn.com/a5894c1b-f6af-456e-82df-1151da0839bf.png">
</p>
## Patrocinantes
Se un patrocinante y pon tu logo en nuestro README on GitHub con un enlace directo a tu sitio web. [[Se un Patrocinante]](https://www.patreon.com/panjiachen)
<a href="https://flatlogic.com/admin-dashboards?from=vue-element-admin"><img width="150px" src="https://wpimg.wallstcn.com/9c0b719b-5551-4c1e-b776-63994632d94a.png" /></a><p>Plantilla de Dashboard de administración hecha con Vue, React y Angular.</p>
## Características
```
- Iniciar / Cerrar Sesión
- Permisos de Authentication
- Página de Permisos
- Directivas de permisos
- Página de configuración de permisos
- Autenticación por dos pasos
- Construcción Multi-entorno
- dev sit stage producción
- Características Globales
- I18n
- Temas dinámicos
- Dynamic sidebar (soporte a rutas multi-nivel)
- Barra de rutas dinámica
- Tags-view (Tab page Support right-click operation)
- Svg Sprite
- Datos de simulación con Mock
- Pantalla completa
- Responsive Sidebar
- Editor
- Editor de Texto Enriquecido
- Editor Markdown
- Editor JSON
- Excel
- Exportación a Excel
- Carga de Excel
- Visualización de Excel
- Exportación como zip
- Tabla
- Tabla Dinámica
- Tabla con Arrastrar y Soltar
- Tabla de edición en línea
- Páginas de Error
- 401
- 404
- Componentes
- Carga de Avatar
- Botón para subir al inicio
- Arrastrar y Soltar (Diaglogo)
- Arrastrar y Soltar (Seleccionar)
- Arrastrar y Soltar (Kanban)
- Arrastrar y Soltar (Lista)
- Panel de división
- Componente para soltar archivos
- Adhesión de objetos
- Contador hasta
- Ejemplo Avanzado
- Registro de Errores
- Tablero de indicadores
- Página de Guías
- ECharts (Gráficos)
- Portapapeles
- Convertidor de Markdown a html
```
## Iniciando
```bash
# clone el proyecto
git clone https://github.com/PanJiaChen/vue-element-admin.git
# vaya al directorio clonado
cd vue-element-admin
# instale las dependencias
npm install
# corra el proyecto como desarrollador
npm run dev
```
Automáticamente se abrirá el siguiente enlace en su navegador http://localhost:9527
## Construcción
```bash
# Construcción para entornos de prueba
npm run build:stage
# Construcción para entornos de producción
npm run build:prod
```
## Avanzado
```bash
# Vista previa con efectos de entorno
npm run preview
# Vista previa con efectos + análisis de recursos estáticos
npm run preview -- --report
# Chequeo de formato de código
npm run lint
# Chequeo de formato de código y auto-corrección
npm run lint -- --fix
```
Vaya a [Documentación](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) para mayor información
## Registro de Cambios
Los cambios detallados por cada liberación se encuentran en [notas de liberación](https://github.com/PanJiaChen/vue-element-admin/releases).
## Demostración en línea
[Vista Prévia de la Aplicación](https://panjiachen.github.io/vue-element-admin)
## Donación
Si este proyecto es de mucha ayuda para ti, puedes comprarle al autor un vaso de jugo :tropical_drink:
![Donar](https://wpimg.wallstcn.com/bd273f0d-83a0-4ef2-92e1-9ac8ed3746b9.png)
[dona por Paypal](https://www.paypal.me/panfree23)
[Comprame un Café](https://www.buymeacoffee.com/Pan)
## Navegadores Soportados
Navegadores modernos e Internet Explorer 10+.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| últimas 2 versiones| últimas 2 versiones| últimas 2 versiones
## Licencia
[MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE)
Copyright (c) 2017-presente PanJiaChen
<p align="center">
<img width="320" src="https://wpimg.wallstcn.com/ecc53a42-d79b-42e2-8852-5126b810a4c8.svg">
</p>
<p align="center">
<a href="https://github.com/vuejs/vue">
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
</a>
<a href="https://github.com/ElemeFE/element">
<img src="https://img.shields.io/badge/element--ui-2.7.0-brightgreen.svg" alt="element-ui">
</a>
<a href="https://travis-ci.org/PanJiaChen/vue-element-admin" rel="nofollow">
<img src="https://travis-ci.org/PanJiaChen/vue-element-admin.svg?branch=master" alt="Build Status">
</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/mashape/apistatus.svg" alt="license">
</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/releases">
<img src="https://img.shields.io/github/release/PanJiaChen/vue-element-admin.svg" alt="GitHub release">
</a>
<a href="https://gitter.im/vue-element-admin/discuss">
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="gitter">
</a>
<a href="https://panjiachen.gitee.io/vue-element-admin-site/zh/donate">
<img src="https://img.shields.io/badge/%24-donate-ff69b4.svg" alt="donate">
</a>
</p>
日本語 | [English](./README.md) | [简体中文](./README.zh-CN.md) | [Spanish](./README.es.md)
## 概要
[vue-element-admin](https://panjiachen.github.io/vue-element-admin) は管理画面のフロントエンドのインタフェース,[vue](https://github.com/vuejs/vue)[element-ui](https://github.com/ElemeFE/element)を使っています。i18nの多言語対応、可変ルート、権限、典型的なビジネスアプリテンプレートであり、豊富なコンポーネントを提供しています、素早くビジネス用の管理画面の現型を構築に役立ちます。
- [デモページ](https://panjiachen.github.io/vue-element-admin)
- [ドキュメント](https://panjiachen.github.io/vue-element-admin-site/)
- [Gitter](https://gitter.im/vue-element-admin/discuss)
- [Donate](https://panjiachen.gitee.io/vue-element-admin-site/zh/donate)
- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki)
- おすすめシンプルテンプレート: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
- デスクトップバージョン: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
- Typescriptバージョン: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour))
**After the `v4.1.0+` version, the default master branch will not support i18n. Please use [i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), it will keep up with the master update**
**現在のバージョン `v4.0+` は `vue-cli` で構築,バグ報告は[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)のissueでお願いします。旧バージョン[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0)もあります。`vue-cli`に依存しないです。**
**低いバージョンのブラウザはサーポートしないです(例えば ie),必要があれば polyfill を追加してください。 [詳細はこちら](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)**
## 前準備
ローカル環境に [node](http://nodejs.org/)[git](https://git-scm.com/)をインストールが必要です。[ES2015+](http://es6.ruanyifeng.com/)[vue](https://cn.vuejs.org/index.html)[vuex](https://vuex.vuejs.org/zh-cn/)[vue-router](https://router.vuejs.org/zh-cn/)[vue-cli](https://github.com/vuejs/vue-cli)[axios](https://github.com/axios/axios)[element-ui](https://github.com/ElemeFE/element)で開発しています。Requestは[Mock.js](https://github.com/nuysoft/Mock)のモックデータを使っています。
**バグ修正や新規機能追加のissue と pull requestは大歓迎です。**
<p align="center">
<img width="900" src="https://wpimg.wallstcn.com/a5894c1b-f6af-456e-82df-1151da0839bf.png">
</p>
## Sponsors
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen)
<a href="https://flatlogic.com/admin-dashboards?from=vue-element-admin"><img width="150px" src="https://wpimg.wallstcn.com/9c0b719b-5551-4c1e-b776-63994632d94a.png" /></a><p>Admin Dashboard Templates made with Vue, React and Angular.</p>
## 機能一覧
```
- ログイン / ログアウト
- Auth認証
- ページ権限
- 権限パーミッション
- 権限設定
- 外部IDでログイン
- 複数環境デプロイ
- dev sit stage prod
- 共通機能
- 多言語切替
- テーマ切替
- サイトメニュー(ルートから生成)
- Breadcrumb Navigation
- Tag Navigation
- Svg Sprite Icon
- ローカル/バックエンド モック データ
- Screenfull
- WYSIWYG
- TinyMCE
- Markdown
- JSON
- Excel
- エクスポート
- インポート
- リード
- Zip
- Table
- Dynamic Table
- Drag And Drop Table
- Inline Edit Table
- Error Page
- 401
- 404
- コンポーネント
- Avatar Upload
- Back To Top
- Drag Dialog
- Drag Select
- Drag Kanban
- Drag List
- SplitPane
- Dropzone
- Sticky
- CountTo
- Advanced Example
- Error Log
- Dashboard
- Guide Page
- ECharts
- Clipboard
- Markdown to html
```
## Getting started
```bash
# clone the project
git clone https://github.com/PanJiaChen/vue-element-admin.git
# enter the project directory
cd vue-element-admin
# install dependency
npm install
# develop
npm run dev
```
This will automatically open http://localhost:9527
## Build
```bash
# build for test environment
npm run build:stage
# build for production environment
npm run build:prod
```
## Advanced
```bash
# preview the release environment effect
npm run preview
# preview the release environment effect + static resource analysis
npm run preview -- --report
# code format check
npm run lint
# code format check and auto fix
npm run lint -- --fix
```
Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information
## Changelog
Detailed changes for each release are documented in the [release notes](https://github.com/PanJiaChen/vue-element-admin/releases).
## Online Demo
[Preview](https://panjiachen.github.io/vue-element-admin)
## Donate
If you find this project useful, you can buy author a glass of juice :tropical_drink:
![donate](https://wpimg.wallstcn.com/bd273f0d-83a0-4ef2-92e1-9ac8ed3746b9.png)
[Paypal Me](https://www.paypal.me/panfree23)
[Buy me a coffee](https://www.buymeacoffee.com/Pan)
## Browsers support
Modern browsers and Internet Explorer 10+.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
## License
[MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE)
Copyright (c) 2017-present PanJiaChen
<p align="center">
<img width="320" src="https://wpimg.wallstcn.com/ecc53a42-d79b-42e2-8852-5126b810a4c8.svg">
</p>
<p align="center">
<a href="https://github.com/vuejs/vue">
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
</a>
<a href="https://github.com/ElemeFE/element">
<img src="https://img.shields.io/badge/element--ui-2.7.0-brightgreen.svg" alt="element-ui">
</a>
<a href="https://travis-ci.org/PanJiaChen/vue-element-admin" rel="nofollow">
<img src="https://travis-ci.org/PanJiaChen/vue-element-admin.svg?branch=master" alt="Build Status">
</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/mashape/apistatus.svg" alt="license">
</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/releases">
<img src="https://img.shields.io/github/release/PanJiaChen/vue-element-admin.svg" alt="GitHub release">
</a>
<a href="https://gitter.im/vue-element-admin/discuss">
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="gitter">
</a>
<a href="https://panjiachen.github.io/vue-element-admin-site/donate">
<img src="https://img.shields.io/badge/%24-donate-ff69b4.svg" alt="donate">
</a>
</p>
English | [简体中文](./README.zh-CN.md) | [日本語](./README.ja.md) | [Spanish](./README.es.md)
## Introduction
[vue-element-admin](https://panjiachen.github.io/vue-element-admin) is a production-ready front-end solution for admin interfaces. It based on [vue](https://github.com/vuejs/vue) and use the UI Toolkit [element-ui](https://github.com/ElemeFE/element).
It is a magical vue admin based on the newest development stack of vue, built-in i18n solution, typical templates for enterprise applications, lots of awesome features. It helps you build a large complex Single-Page Applications. I believe whatever your needs are, this project will help you.
- [Preview](https://panjiachen.github.io/vue-element-admin)
- [Documentation](https://panjiachen.github.io/vue-element-admin-site/)
- [Gitter](https://gitter.im/vue-element-admin/discuss)
- [Donate](https://panjiachen.github.io/vue-element-admin-site/donate/)
- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki)
- [Gitee](https://panjiachen.gitee.io/vue-element-admin/) 国内用户可访问该地址在线预览
- Base template recommends using: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
- Desktop: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
- Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))
**After the `v4.1.0+` version, the default master branch will not support i18n. Please use [i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), it will keep up with the master update**
**The current version is `v4.0+` build on `vue-cli`. If you find a problem, please put [issue](https://github.com/PanJiaChen/vue-element-admin/issues/new). If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0), it does not rely on `vue-cli`**
**This project does not support low version browsers (e.g. IE). Please add polyfill by yourself.**
## Preparation
You need to install [node](https://nodejs.org/) and [git](https://git-scm.com/) locally. The project is based on [ES2015+](https://es6.ruanyifeng.com/), [vue](https://cn.vuejs.org/index.html), [vuex](https://vuex.vuejs.org/zh-cn/), [vue-router](https://router.vuejs.org/zh-cn/), [vue-cli](https://github.com/vuejs/vue-cli) , [axios](https://github.com/axios/axios) and [element-ui](https://github.com/ElemeFE/element), all request data is simulated using [Mock.js](https://github.com/nuysoft/Mock).
Understanding and learning this knowledge in advance will greatly help the use of this project.
<p align="center">
<img width="900" src="https://wpimg.wallstcn.com/a5894c1b-f6af-456e-82df-1151da0839bf.png">
</p>
## Sponsors
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen)
<a href="https://flatlogic.com/admin-dashboards?from=vue-element-admin"><img width="150px" src="https://wpimg.wallstcn.com/9c0b719b-5551-4c1e-b776-63994632d94a.png" /></a><p>Admin Dashboard Templates made with Vue, React and Angular.</p>
## Features
```
- Login / Logout
- Permission Authentication
- Page permission
- Directive permission
- Permission configuration page
- Two-step login
- Multi-environment build
- dev sit stage prod
- Global Features
- I18n
- Multiple dynamic themes
- Dynamic sidebar (supports multi-level routing)
- Dynamic breadcrumb
- Tags-view (Tab page Support right-click operation)
- Svg Sprite
- Mock data
- Screenfull
- Responsive Sidebar
- Editor
- Rich Text Editor
- Markdown Editor
- JSON Editor
- Excel
- Export Excel
- Upload Excel
- Visualization Excel
- Export zip
- Table
- Dynamic Table
- Drag And Drop Table
- Inline Edit Table
- Error Page
- 401
- 404
- Components
- Avatar Upload
- Back To Top
- Drag Dialog
- Drag Select
- Drag Kanban
- Drag List
- SplitPane
- Dropzone
- Sticky
- CountTo
- Advanced Example
- Error Log
- Dashboard
- Guide Page
- ECharts
- Clipboard
- Markdown to html
```
## Getting started
```bash
# clone the project
git clone https://github.com/PanJiaChen/vue-element-admin.git
# enter the project directory
cd vue-element-admin
# install dependency
npm install
# develop
npm run dev
```
This will automatically open http://localhost:9527
## Build
```bash
# build for test environment
npm run build:stage
# build for production environment
npm run build:prod
```
## Advanced
```bash
# preview the release environment effect
npm run preview
# preview the release environment effect + static resource analysis
npm run preview -- --report
# code format check
npm run lint
# code format check and auto fix
npm run lint -- --fix
```
Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information
## Changelog
Detailed changes for each release are documented in the [release notes](https://github.com/PanJiaChen/vue-element-admin/releases).
## Online Demo
[Preview](https://panjiachen.github.io/vue-element-admin)
## Donate
If you find this project useful, you can buy author a glass of juice :tropical_drink:
![donate](https://wpimg.wallstcn.com/bd273f0d-83a0-4ef2-92e1-9ac8ed3746b9.png)
[Paypal Me](https://www.paypal.me/panfree23)
[Buy me a coffee](https://www.buymeacoffee.com/Pan)
## Browsers support
Modern browsers and Internet Explorer 10+.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
## License
[MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE)
Copyright (c) 2017-present PanJiaChen
<p align="center">
<img width="320" src="https://wpimg.wallstcn.com/ecc53a42-d79b-42e2-8852-5126b810a4c8.svg">
</p>
<p align="center">
<a href="https://github.com/vuejs/vue">
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
</a>
<a href="https://github.com/ElemeFE/element">
<img src="https://img.shields.io/badge/element--ui-2.7.0-brightgreen.svg" alt="element-ui">
</a>
<a href="https://travis-ci.org/PanJiaChen/vue-element-admin" rel="nofollow">
<img src="https://travis-ci.org/PanJiaChen/vue-element-admin.svg?branch=master" alt="Build Status">
</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/mashape/apistatus.svg" alt="license">
</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/releases">
<img src="https://img.shields.io/github/release/PanJiaChen/vue-element-admin.svg" alt="GitHub release">
</a>
<a href="https://gitter.im/vue-element-admin/discuss">
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="gitter">
</a>
<a href="https://panjiachen.gitee.io/vue-element-admin-site/zh/donate">
<img src="https://img.shields.io/badge/%24-donate-ff69b4.svg" alt="donate">
</a>
</p>
简体中文 | [English](./README.md) | [日本語](./README.ja.md) | [Spanish](./README.es.md)
## 简介
[vue-element-admin](https://panjiachen.github.io/vue-element-admin) 是一个后台前端解决方案,它基于 [vue](https://github.com/vuejs/vue)[element-ui](https://github.com/ElemeFE/element)实现。它使用了最新的前端技术栈,内置了 i18n 国际化解决方案,动态路由,权限验证,提炼了典型的业务模型,提供了丰富的功能组件,它可以帮助你快速搭建企业级中后台产品原型。相信不管你的需求是什么,本项目都能帮助到你。
- [在线预览](https://panjiachen.github.io/vue-element-admin)
- [使用文档](https://panjiachen.github.io/vue-element-admin-site/zh/)
- [Gitter 讨论组](https://gitter.im/vue-element-admin/discuss)
- [Donate](https://panjiachen.gitee.io/vue-element-admin-site/zh/donate)
- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki)
- [Gitee](https://panjiachen.gitee.io/vue-element-admin/) 在线预览(国内用户可访问该地址)
- [国内访问文档](https://panjiachen.gitee.io/vue-element-admin-site/zh/) 文档(方便没翻墙的用户查看)
- 基础模板建议使用: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
- 桌面端: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
- Typescript 版: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour))
**`v4.1.0+`版本之后默认 master 分支将不支持国际化,有需要的请使用[i18n](https://github.com/PanJiaChen/vue-element-admin/tree/i18n)分支,它会和 master 保持同步更新**
**该项目不支持低版本浏览器(如 ie),有需求请自行添加 polyfill [详情](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)**
**目前版本为 `v4.0+` 基于 `vue-cli` 进行构建,若发现问题,欢迎提[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)。若你想使用旧版本,可以切换分支到[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0),它不依赖 `vue-cli`**
群主 **[圈子](https://jianshiapp.com/circles/1209)** 群主会经常分享一些技术相关的东西,或者加入 [qq 群](https://github.com/PanJiaChen/vue-element-admin/issues/602) 或者关注 [微博](https://weibo.com/u/3423485724?is_all=1)
## 前序准备
你需要在本地安装 [node](http://nodejs.org/)[git](https://git-scm.com/)。本项目技术栈基于 [ES2015+](http://es6.ruanyifeng.com/)[vue](https://cn.vuejs.org/index.html)[vuex](https://vuex.vuejs.org/zh-cn/)[vue-router](https://router.vuejs.org/zh-cn/)[vue-cli](https://github.com/vuejs/vue-cli)[axios](https://github.com/axios/axios)[element-ui](https://github.com/ElemeFE/element),所有的请求数据都使用[Mock.js](https://github.com/nuysoft/Mock)进行模拟,提前了解和学习这些知识会对使用本项目有很大的帮助。
同时配套了系列教程文章,如何从零构建后一个完整的后台项目,建议大家先看完这些文章再来实践本项目
- [手摸手,带你用 vue 撸后台 系列一(基础篇)](https://juejin.im/post/59097cd7a22b9d0065fb61d2)
- [手摸手,带你用 vue 撸后台 系列二(登录权限篇)](https://juejin.im/post/591aa14f570c35006961acac)
- [手摸手,带你用 vue 撸后台 系列三 (实战篇)](https://juejin.im/post/593121aa0ce4630057f70d35)
- [手摸手,带你用 vue 撸后台 系列四(vueAdmin 一个极简的后台基础模板)](https://juejin.im/post/595b4d776fb9a06bbe7dba56)
- [手摸手,带你用vue撸后台 系列五(v4.0新版本)](https://juejin.im/post/5c92ff94f265da6128275a85)
- [手摸手,带你封装一个 vue component](https://segmentfault.com/a/1190000009090836)
- [手摸手,带你优雅的使用 icon](https://juejin.im/post/59bb864b5188257e7a427c09)
- [手摸手,带你用合理的姿势使用 webpack4(上)](https://juejin.im/post/5b56909a518825195f499806)
- [手摸手,带你用合理的姿势使用 webpack4(下)](https://juejin.im/post/5b5d6d6f6fb9a04fea58aabc)
**如有问题请先看上述使用文档和文章,若不能满足,欢迎 issue 和 pr**
<p align="center">
<img width="900" src="https://wpimg.wallstcn.com/a5894c1b-f6af-456e-82df-1151da0839bf.png">
</p>
## Sponsors
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen)
<a href="https://flatlogic.com/admin-dashboards?from=vue-element-admin"><img width="150px" src="https://wpimg.wallstcn.com/9c0b719b-5551-4c1e-b776-63994632d94a.png" /></a><p>Admin Dashboard Templates made with Vue, React and Angular.</p>
## 功能
```
- 登录 / 注销
- 权限验证
- 页面权限
- 指令权限
- 权限配置
- 二步登录
- 多环境发布
- dev sit stage prod
- 全局功能
- 国际化多语言
- 多种动态换肤
- 动态侧边栏(支持多级路由嵌套)
- 动态面包屑
- 快捷导航(标签页)
- Svg Sprite 图标
- 本地/后端 mock 数据
- Screenfull全屏
- 自适应收缩侧边栏
- 编辑器
- 富文本
- Markdown
- JSON 等多格式
- Excel
- 导出excel
- 导入excel
- 前端可视化excel
- 导出zip
- 表格
- 动态表格
- 拖拽表格
- 内联编辑
- 错误页面
- 401
- 404
- 組件
- 头像上传
- 返回顶部
- 拖拽Dialog
- 拖拽Select
- 拖拽看板
- 列表拖拽
- SplitPane
- Dropzone
- Sticky
- CountTo
- 综合实例
- 错误日志
- Dashboard
- 引导页
- ECharts 图表
- Clipboard(剪贴复制)
- Markdown2html
```
## 开发
```bash
# 克隆项目
git clone https://github.com/PanJiaChen/vue-element-admin.git
# 进入项目目录
cd vue-element-admin
# 安装依赖
npm install
# 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org
# 启动服务
npm run dev
```
浏览器访问 http://localhost:9527
## 发布
```bash
# 构建测试环境
npm run build:stage
# 构建生产环境
npm run build:prod
```
## 其它
```bash
# 预览发布环境效果
npm run preview
# 预览发布环境效果 + 静态资源分析
npm run preview -- --report
# 代码格式检查
npm run lint
# 代码格式检查并自动修复
npm run lint -- --fix
```
更多信息请参考 [使用文档](https://panjiachen.github.io/vue-element-admin-site/zh/)
## Changelog
Detailed changes for each release are documented in the [release notes](https://github.com/PanJiaChen/vue-element-admin/releases).
## Online Demo
[在线 Demo](https://panjiachen.github.io/vue-element-admin)
## Donate
如果你觉得这个项目帮助到了你,你可以帮作者买一杯果汁表示鼓励 :tropical_drink:
![donate](https://panjiachen.github.io/donate/donation.png)
[更多捐赠方式](https://panjiachen.gitee.io/vue-element-admin-site/zh/donate)
[Paypal Me](https://www.paypal.me/panfree23)
[Buy me a coffee](https://www.buymeacoffee.com/Pan)
## Browsers support
Modern browsers and Internet Explorer 10+.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
## License
[MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE)
Copyright (c) 2017-present PanJiaChen
module.exports = {
presets: [
'@vue/app'
]
}
const { run } = require('runjs')
const chalk = require('chalk')
const config = require('../vue.config.js')
const rawArgv = process.argv.slice(2)
const args = rawArgv.join(' ')
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
const report = rawArgv.includes('--report')
run(`vue-cli-service build ${args}`)
const port = 9526
const publicPath = config.publicPath
var connect = require('connect')
var serveStatic = require('serve-static')
const app = connect()
app.use(
publicPath,
serveStatic('./dist', {
index: ['index.html', '/']
})
)
app.listen(port, function () {
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})
} else {
run(`vue-cli-service build ${args}`)
}
module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/tests/unit/coverage',
// 'collectCoverage': true,
'coverageReporters': [
'lcov',
'text-summary'
],
testURL: 'http://localhost/'
}
{
"name": "vue-element-admin",
"version": "4.2.1",
"description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
"author": "Pan <panfree23@gmail.com>",
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"new": "plop"
},
"keywords": [
"vue",
"admin",
"dashboard",
"element-ui",
"boilerplate",
"admin-template",
"management-system"
],
"repository": {
"type": "git",
"url": "git+https://github.com/PanJiaChen/vue-element-admin.git"
},
"bugs": {
"url": "https://github.com/PanJiaChen/vue-element-admin/issues"
},
"dependencies": {
"axios": "0.18.0",
"clipboard": "2.0.4",
"codemirror": "5.45.0",
"crypto-js": "^4.2.0",
"driver.js": "0.9.5",
"dropzone": "5.5.1",
"echarts": "4.2.1",
"element-ui": "2.15.12",
"file-saver": "2.0.1",
"fuse.js": "3.4.4",
"js-cookie": "2.2.0",
"js-md5": "^0.7.3",
"jsonlint": "1.6.3",
"jszip": "3.2.1",
"moment": "^2.29.4",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"screenfull": "4.2.0",
"showdown": "1.9.0",
"sortablejs": "1.8.4",
"spark-md5": "^3.0.2",
"vue": "2.6.10",
"vue-count-to": "1.0.13",
"vue-lazyload": "^1.3.3",
"vue-router": "3.0.2",
"vue-splitpane": "1.0.4",
"vuedraggable": "2.20.0",
"vuex": "3.1.0",
"xlsx": "0.14.1"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@babel/register": "7.0.0",
"@vue/cli-plugin-babel": "3.5.3",
"@vue/cli-plugin-eslint": "3.5.1",
"@vue/cli-plugin-unit-jest": "3.5.3",
"@vue/cli-service": "3.5.3",
"@vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "^9.5.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"chalk": "2.4.2",
"chokidar": "2.1.5",
"connect": "3.6.6",
"eslint": "5.15.3",
"eslint-plugin-vue": "5.2.2",
"html-webpack-plugin": "3.2.0",
"husky": "1.3.1",
"lint-staged": "8.1.5",
"mockjs": "1.0.1-beta3",
"node-sass": "^4.9.0",
"plop": "2.3.0",
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.0",
"vue-template-compiler": "2.6.10"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
{{#if template}}
<template>
<div />
</template>
{{/if}}
{{#if script}}
<script>
export default {
name: '{{ properCase name }}',
props: {},
data() {
return {}
},
created() {},
mounted() {},
methods: {}
}
</script>
{{/if}}
{{#if style}}
<style lang="scss" scoped>
</style>
{{/if}}
const { notEmpty } = require('../utils.js')
module.exports = {
description: 'generate vue component',
prompts: [{
type: 'input',
name: 'name',
message: 'component name please',
validate: notEmpty('name')
},
{
type: 'checkbox',
name: 'blocks',
message: 'Blocks:',
choices: [{
name: '<template>',
value: 'template',
checked: true
},
{
name: '<script>',
value: 'script',
checked: true
},
{
name: 'style',
value: 'style',
checked: true
}
],
validate(value) {
if (value.indexOf('script') === -1 && value.indexOf('template') === -1) {
return 'Components require at least a <script> or <template> tag.'
}
return true
}
}
],
actions: data => {
const name = '{{properCase name}}'
const actions = [{
type: 'add',
path: `src/components/${name}/index.vue`,
templateFile: 'plop-templates/component/index.hbs',
data: {
name: name,
template: data.blocks.includes('template'),
script: data.blocks.includes('script'),
style: data.blocks.includes('style')
}
}]
return actions
}
}
exports.notEmpty = name => {
return v => {
if (!v || v.trim === '') {
return `${name} is required`
} else {
return true
}
}
}
{{#if template}}
<template>
<div />
</template>
{{/if}}
{{#if script}}
<script>
export default {
name: '{{ properCase name }}',
props: {},
data() {
return {}
},
created() {},
mounted() {},
methods: {}
}
</script>
{{/if}}
{{#if style}}
<style lang="scss" scoped>
</style>
{{/if}}
const { notEmpty } = require('../utils.js')
module.exports = {
description: 'generate a view',
prompts: [{
type: 'input',
name: 'name',
message: 'view name please',
validate: notEmpty('name')
},
{
type: 'checkbox',
name: 'blocks',
message: 'Blocks:',
choices: [{
name: '<template>',
value: 'template',
checked: true
},
{
name: '<script>',
value: 'script',
checked: true
},
{
name: 'style',
value: 'style',
checked: true
}
],
validate(value) {
if (value.indexOf('script') === -1 && value.indexOf('template') === -1) {
return 'View require at least a <script> or <template> tag.'
}
return true
}
}
],
actions: data => {
const name = '{{name}}'
const actions = [{
type: 'add',
path: `src/views/${name}/index.vue`,
templateFile: 'plop-templates/view/index.hbs',
data: {
name: name,
template: data.blocks.includes('template'),
script: data.blocks.includes('script'),
style: data.blocks.includes('style')
}
}]
return actions
}
}
const viewGenerator = require('./plop-templates/view/prompt')
const componentGenerator = require('./plop-templates/component/prompt')
module.exports = function(plop) {
plop.setGenerator('view', viewGenerator)
plop.setGenerator('component', componentGenerator)
}
module.exports = {
plugins: {
autoprefixer: {}
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<template>
<div id="app">
<router-view/>
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
<style>
.upload-mess{
z-index: 931070 !important;
}
.progress-wrap .el-progress__text{
color: white!important;
}
.el-loading-mask.is-fullscreen {
z-index: 931070 !important;
}
.self-preview-model {
width: 60vw;
}
.self-preview-model img, .self-preview-model video {
max-width: 100%;
height: auto;
}
input:-webkit-autofill {
transition: background-color 50000s ease-in-out 0s;
}
input:-internal-autofill-previewed, input:-internal-autofill-selected {
transition: background-color 5000s ease-out 0.5s;
}
</style>
import request from '@/utils/request'
export function listAbout(data) {
return request({
url: '/api/business/my/pageAboutConfig',
method: 'post',
data
})
}
export function saveOrUpdateAbout(data) {
return request({
url: '/api/business/my/saveOrUpdateAbout',
method: 'post',
data
})
}
export function deleteAbout(id) {
return request({
url: '/api/business/my/deleteBlankAbout',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
export function listApply(data) {
return request({
url: '/api/business/my/pageApplyConfig',
method: 'post',
data
})
}
export function proveApply(data) {
return request({
url: '/api/business/my/checkApply',
method: 'post',
data
})
}
import request from '@/utils/request'
export function listArticle(data) {
return request({
url: '/api/business/article/pageConfig',
method: 'post',
data
})
}
export function saveOrUpdateArticle(data) {
return request({
url: '/api/business/article/saveOrUpdate',
method: 'post',
data
})
}
export function deleteArticle(id) {
return request({
url: '/api/business/article/delete',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
export function listBank(data) {
return request({
url: '/api/business/my/pageBankConfig',
method: 'post',
data
})
}
export function saveOrUpdateBank(data) {
return request({
url: '/api/business/my/saveOrUpdateBlank',
method: 'post',
data
})
}
export function deleteBank(id) {
return request({
url: '/api/business/my/deleteBlank',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
// -------------------------站内信-------------------------------------------
export function getSendMessages(data) {
return request({
url: '/api/business/center/getSendMessages',
method: 'post',
data: data
})
}
export function countSendMessages(data) {
return request({
url: '/api/business/center/countSendMessages',
method: 'post',
data: data
})
}
export function getReceiveMessages(data) {
return request({
url: '/api/business/center/getReceiveMessages',
method: 'post',
data: data
})
}
export function countReceiveMessages(data) {
return request({
url: '/api/business/center/countReceiveMessages',
method: 'post',
data: data
})
}
export function insertReceiveMessage(data) {
return request({
url: '/api/business/center/insertReceiveMessage',
method: 'post',
data: data
})
}
export function updateReceiveMessage(data) {
return request({
url: '/api/business/center/updateReceiveMessage',
method: 'post',
data: data
})
}
export function delReceiveMessage(data) {
return request({
url: '/api/business/center/delReceiveMessage?id=' + data, // 删除首页配置信息
method: 'post'
})
}
// -------------------------聊天室-------------------------------------------
export function getImRooms(data) {
return request({
url: '/api/business/center/getImRooms',
method: 'post',
data: data
})
}
export function addImRoom(data) {
return request({
url: '/api/business/center/addImRoom',
method: 'post',
data: data
})
}
export function updateImRoom(data) {
return request({
url: '/api/business/center/updateImRoom',
method: 'post',
data: data
})
}
export function updateImRoomWithStatus(data) {
return request({
url: '/api/business/center/updateImRoomWithStatus',
method: 'post',
data: data
})
}
export function deleteImRoom(data) {
return request({
url: '/api/business/center/deleteImRoom?id=' + data,
method: 'post'
})
}
// -------------------------聊天室黑名单-------------------------------------------
export function getImRoomBlackUser(data) {
return request({
url: '/api/business/center/getImRoomBlackUser',
method: 'post',
data: data
})
}
export function addImRoomBlackUser(data) {
return request({
url: '/api/business/center/addImRoomBlackUser',
method: 'post',
data: data
})
}
export function deleteImRoomBlackUser(data) {
return request({
url: '/api/business/center/deleteImRoomBlackUser?id=' + data,
method: 'post'
})
}
// -------------------------日志-------------------------------------------
export function getBatchLog(data) {
return request({
url: '/api/business/center/getBatchLog',
method: 'post',
data: data
})
}
export function countBatchLog(data) {
return request({
url: '/api/business/center/countBatchLog',
method: 'post',
data: data
})
}
// -------------------------站内信-------------------------------------------
export function getPageSysMessage(data) {
return request({
url: '/api/business/center/pageSysMessage',
method: 'get',
params: data
})
}
export function updateSysMessage(data) {
return request({
url: '/api/business/center/saveSysMessage',
method: 'post',
data: data
})
}
export function deleteSysMessage(data) {
return request({
url: '/api/business/customer/deleteSysMessage?id=' + data.id,
method: 'post'
})
}
// -------------------------公告-------------------------------------------
export function getPageSysNotice(data) {
return request({
url: '/api/business/center/pageSysNotice',
method: 'get',
params: data
})
}
export function updateSysNotice(data) {
return request({
url: '/api/business/center/saveSysNotice',
method: 'post',
data: data
})
}
export function deleteSysNotice(data) {
return request({
url: '/api/business/center/deleteSysNotice?id=' + data.id,
method: 'get'
})
}
// -------------------------用户等级配置-------------------------------------------
export function getUserLevelConfig(data) {
return request({
url: '/api/business/center/getUserLevelConfig',
method: 'get',
params: data
})
}
export function updateUserLevelConfig(data) {
return request({
url: '/api/business/center/saveUserLevelConfig',
method: 'get',
params: data
})
}
export function deleteUserLevelConfig(data) {
return request({
url: '/api/business/center/deleteUserLevelConfig?id=' + data.id,
method: 'get'
})
}
// -------------------------用户行为奖励配置-------------------------------------------
export function getUserOperateConfig(data) {
return request({
url: '/api/business/center/getUserOperateConfig',
method: 'get',
params: data
})
}
export function updateUserOperateConfig(data) {
return request({
url: '/api/business/center/saveUserOperateConfig',
method: 'get',
params: data
})
}
export function deleteUserOperateConfig(data) {
return request({
url: '/api/business/center/deleteUserOperateConfig?id=' + data.id,
method: 'get'
})
}
// 配置项
export function getConfigItems(data) {
return request({
url: '/api/business/dict/pageDictConfig',
method: 'get',
params: data
})
}
export function updateConfigItems(data) {
return request({
url: '/api/business/dict/saveDictConfig',
method: 'post',
data: JSON.stringify(data)
})
}
export function deleteConfigItem(data) {
return request({
url: '/api/business/dict/deleteDictConfig',
method: 'post',
data,
})
}
// 代言人等级
export function getProxyLevelConfig(data) {
return request({
url: '/api/business/dict/pageUserLevel',
method: 'get',
params: data
})
}
export function updateProxyLevelConfig(data) {
return request({
url: '/api/business/dict/saveUserLevel',
method: 'post',
data: JSON.stringify(data)
})
}
export function deleteProxyLevelConfig(data) {
return request({
url: '/api/business/dict/deleteUserLevel?id='+data.id,
method: 'post',
})
}
export function getPageSysRobotMsg(data) {
return request({
url: '/api/business/sys-robot-msg/pageSysRobotMessage',
method: 'get',
params: data
})
}
export function updateSysRobotMsg(data) {
return request({
url: '/api/business/sys-robot-msg/saveSysRobotMessage',
method: 'post',
data: data
})
}
export function deleteSysRobotMsg(data) {
return request({
url: '/api/business/sys-robot-msg/deleteSysRobotMessage?id=' + data.id,
method: 'post'
})
}
export function getPageSysRobot(data) {
return request({
url: '/api/business/sys-robot/pageSysRobot',
method: 'get',
params: data
})
}
export function updateVipLevelConfig(data) {
return request({
url: '/api/business/member/saveUserMember',
method: 'post',
data
})
}
export function deleteVipLevelConfig(data) {
return request({
url: '/api/business/member/deleteUserMember?id=' + data.id,
method: 'post',
data: data
})
}
export function updateSysRobot(data) {
return request({
url: '/api/business/sys-robot/saveSysRobot',
method: 'post',
data: data
})
}
export function deleteSysRobot(data) {
return request({
url: '/api/business/sys-robot/deleteSysRobot?id=' + data.id,
method: 'get'
})
}
import request from '@/utils/request'
export function listCertificate(data) {
return request({
url: '/api/business/my/pageCertificateConfig',
method: 'post',
data
})
}
export function saveOrUpdateCertificate(data) {
return request({
url: '/api/business/my/saveOrUpdateCertificate',
method: 'post',
data
})
}
export function deleteCertificate(id) {
return request({
url: '/api/business/my/deleteCertificate',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
export function listComment(data) {
return request({
url: '/api/business/my/pageCommentConfig',
method: 'post',
data
})
}
export function addComment(data) {
return request({
url: '/api/business/my/addComment',
method: 'post',
data
})
}
export function saveOrUpdateComment(data) {
return request({
url: '/api/business/my/updateComment',
method: 'post',
data
})
}
export function deleteComment(id) {
return request({
url: '/api/business/my/deleteComment',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
// 得到首页数据
export function pageHlDict(query) {
return request({
url: '/api/business/hlDict/pageHlDict',
method: 'get',
params: query
})
}
// list
export function hlDictList(query) {
return request({
url: '/api/business/hlDict/getCategoryList',
method: 'get',
params: query
})
}
export function saveHlDict(data) {
return request({
url: '/api/business/hlDict/saveHlDict',
method: 'post',
data
})
}
export function deleteHlDict(params) {
return request({
url: '/api/business/hlDict/deleteHlDict',
method: 'post',
params
})
}
import request from '@/utils/request'
export function listContractus(data) {
return request({
url: '/api/business/publicInfo/pageConfigContact',
method: 'post',
data
})
}
export function saveOrUpdateContractus(data) {
return request({
url: '/api/business/publicInfo/saveOrUpdateContact',
method: 'post',
data
})
}
export function deleteContractus(id) {
return request({
url: '/api/business/publicInfo/deleteContact',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
export function listCouncil(data) {
return request({
url: '/api/business/my/pageCouncilConfig',
method: 'post',
data
})
}
export function saveOrUpdateCouncil(data) {
return request({
url: '/api/business/my/saveOrUpdateCouncil',
method: 'post',
data
})
}
export function deleteCouncil(id) {
return request({
url: '/api/business/my/deleteCouncil',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
export function listCrowd(data) {
return request({
url: '/api/business/crowd/pageConfig',
method: 'post',
data
})
}
export function saveOrUpdateCrowd(data) {
return request({
url: '/api/business/crowd/update',
method: 'post',
data
})
}
export function deleteCrowd(id) {
return request({
url: '/api/business/crowd/delete',
method: 'post',
data: {
id
}
})
}
export function proveCrowd(data) {
return request({
url: '/api/business/crowd/check',
method: 'post',
data
})
}
export function virtualCrowd(data) {
return request({
url: '/api/business/crowd/createDonate',
method: 'post',
data
})
}
export function recordDelete(data) {
return request({
url: '/api/business/donate/recordDelete',
method: 'post',
data
})
}
import request from '@/utils/request'
// -------------------------用户信息-------------------------------------------
export function getCustomerInfos(data) {
return request({
url: '/api/business/customer/getCustomerInfos', // 获取首页配置信息
method: 'post',
data: data
})
}
export function getCustomerInfosSub(uuid) {
return request({
url: '/api/business/customer/getUserInfoByUuid?uuid='+uuid, // 获取首页配置信息
method: 'get',
// data: data
})
}
export function registeredUser(data) {
return request({
url: '/api/business/customer/registeredUser',
method: 'post',
data: data
})
}
export function setManager(data) {
return request({
url: '/api/business/customer/setManager',
method: 'post',
data: data
})
}
export function countCustomerInfos(data) {
return request({
url: '/api/business/customer/countCustomerInfos', // 获取首页配置信息
method: 'post',
data: data
})
}
export function updateCustomerInfo(data) {
return request({
url: '/api/business/customer/updateCustomerInfo', // 更新首页配置信息
method: 'post',
data: data
})
}
export function tongbu() {
return request({
url: '/api/business/customer/tongbu', // 更新首页配置信息
method: 'post'
})
}
// -------------------------用户附加信息-------------------------------------------
export function getChildCustomerInfos(data) {
return request({
url: '/api/business/customer/getChildCustomerInfos', // 获取首页配置信息
method: 'post',
data: data
})
}
export function countChildCustomerInfos(data) {
return request({
url: '/api/business/customer/countChildCustomerInfos', // 获取首页配置信息
method: 'post',
data: data
})
}
export function updateChildCustomerInfo(data) {
return request({
url: '/api/business/customer/updateChildCustomerInfo', // 更新首页配置信息
method: 'post',
data: data
})
}
// -------------------------账单信息-------------------------------------------
export function getBillList(data) {
return request({
url: '/api/business/customer/getBillList', // 获取首页配置信息
method: 'post',
data: data
})
}
export function countBillList(data) {
return request({
url: '/api/business/customer/countBillList', // 获取首页配置信息
method: 'post',
data: data
})
}
export function updateBillList(data) {
return request({
url: '/api/business/customer/updateBillList', // 更新首页配置信息
method: 'post',
data: data
})
}
// -------------------------反馈信息-------------------------------------------
export function getPageFeedback(data) {
return request({
url: '/api/business/customer/pageFeedback',
method: 'get',
params: data
})
}
export function updateFeedback(data) {
return request({
url: '/api/business/customer/saveFeedback',
method: 'get',
params: data
})
}
export function deleteFeedback(data) {
return request({
url: '/api/business/customer/deleteFeedback?id=' + data.id,
method: 'post'
})
}
// -------------------------积分账单-------------------------------------------
export function getPagePoint(data) {
return request({
url: '/api/business/customer/pagePoint',
method: 'get',
params: data
})
}
export function updatePoint(data) {
return request({
url: '/api/business/customer/updatePoint',
method: 'post',
data: data
})
}
// -------------------------违规记录-------------------------------------------
export function getPageViolationRecord(data) {
return request({
url: '/api/business/customer/pageViolationRecord',
method: 'get',
params: data
})
}
export function updateViolationRecord(data) {
return request({
url: '/api/business/customer/saveViolationRecord',
method: 'get',
params: data
})
}
export function deleteViolationRecord(data) {
return request({
url: '/api/business/customer/deleteViolationRecord?id=' + data.id,
method: 'post'
})
}
export function pagePoint(data) {
return request({
url: '/api/business/customer/pagePoint',
method: 'get',
params: data
})
}
export function getUserInfoByLoginName(data) {
return request({
url: '/api/business/customer/getUserInfoByLoginName?loginName=' + data,
method: 'get'
})
}
export function pageComplain(data) {
return request({
url: '/api/business/top/pageComplain',
method: 'get',
params: data
})
}
export function saveComplain(data) {
return request({
url: '/api/business/top/saveComplain',
method: 'get',
params: data
})
}
export function saveProxyData(data) {
return request({
url: '/api/business/customer/saveProxyData',
method: 'post',
params: data
})
}
export function pageUserProxy(data) {
return request({
url: '/api/business/center/pageUserReportMonth',
method: 'get',
params: data
})
}
export function addPrice(data) {
return request({
url: '/api/business/customer/insPrice',
method: 'get',
params: data
})
}
export function pageUserProxyList(data) {
return request({
url: '/api/business/customer/pageUserProxyList',
method: 'get',
params: data
})
}
export function getAccountType(data) {
return request({
url: '/api/business/customer/getAccountType',
method: 'get',
data: data
})
}
export function saveAccountType(data) {
return request({
url: '/api/business/customer/saveAccountType',
method: 'post',
data: data
})
}
// 平台禁言
/**
* @param
* "uuid":"",//用户uuid
* "reason":""//禁言原因reason,
* "ban":0 //默认0 禁言1
*/
export function banAccount(data) {
return request({
url: '/api/business/customer/banUser',
method: 'post',
data: data
})
}
// 审核积分
/**
*
* @param {
*
* } data
*/
export function processPoint(data) {
return request({
url: '/api/business/customer/pointReview',
method: 'post',
data: data
})
}
import request from '@/utils/request'
export function listDonate(data) {
return request({
url: '/api/business/donate/pageProjectConfig',
method: 'post',
data
})
}
export function createBatchDonate(data) {
return request({
url: '/api/business/crowd/createBatchDonate',
method: 'post',
data
})
}
export function createBatchPlanBDonate(data) {
return request({
url: '/api/business/crowd/createBatchPlanBDonate',
method: 'post',
data
})
}
export function listDonateRecord(data) {
return request({
url: '/api/business/donate/pageConfig',
method: 'post',
data
})
}
export function listDonateRecordPjType(data) {
return request({
url: '/api/business/donate/projectTypeAll',
method: 'post',
data
})
}
export function saveOrUpdateDonate(data) {
return request({
url: '/api/business/donate/saveOrUpdate',
method: 'post',
data
})
}
export function deleteDonate(id) {
return request({
url: '/api/business/donate/delete',
method: 'post',
data: {
id
}
})
}
export function listPjw(data) {
return request({
url: '/api/business/donate/pageProjectWithConfig',
method: 'post',
data
})
}
export function listPjOrder(data) {
return request({
url: '/api/business/donate/pageOrderConfig',
method: 'post',
data
})
}
export function saveOrUpdatePjOrder(data) {
return request({
url: '/api/business/donate/recordSaveOrUpDate',
method: 'post',
data
})
}
export function saveOrUpdatePjw(data) {
return request({
url: '/api/business/donate/saveOrUpdateProjectWith',
method: 'post',
data
})
}
export function deletePjw(id) {
return request({
url: '/api/business/donate/deleteProjectWith',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
// 配置列表
export function pageHlDict(data) {
return request({
url: '/dict/pageHlDict',
method: 'get',
params: data
})
}
// 获取配置
export function getHlDict(data) {
return request({
url: '/dict/getHlDict',
method: 'get',
params: data
})
}
// 删除配置
export function deleteHlDict(data) {
return request({
url: '/dict/deleteHlDict',
method: 'post',
params: data
})
}
// 保存配置
export function saveHlDict(data) {
return request({
url: '/dict/saveHlDict',
method: 'post',
data
})
}
import request from '@/utils/request'
export function listFoundation(data) {
return request({
url: '/api/business/my/pageFoundationConfig',
method: 'post',
data
})
}
export function saveOrUpdateFoundation(data) {
return request({
url: '/api/business/my/saveOrUpdateFoundation',
method: 'post',
data
})
}
export function deleteFoundation(id) {
return request({
url: '/api/business/my/deleteFoundation',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
export function listHomeLunbo(data) {
return request({
url: '/api/business/home/pageHomeConfig',
method: 'post',
data
})
}
export function saveOrUpdateHomeLunbo(data) {
return request({
url: '/api/business/home/saveOrUpdate',
method: 'post',
data
})
}
export function deleteHomeLunbo(id) {
return request({
url: '/api/business/home/delete',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
// 拉新列表
export function inviteList(data) {
return request({
url: '/api/business/my/pageRecruitConfig',
method: 'post',
data
})
}
import request from '@/utils/request'
// 问题类型列表 暂不考虑分页
export function issuetypeList(data) {
return request({
url: '/admin/issuetype/list/all',
method: 'get'
})
}
// 问题列表
export function issueList(data) {
return request({
url: '/admin/issue/list',
method: 'get',
params: data
})
}
// 回复问题信息
export function issueReplay(data) {
return request({
url: '/admin/issue/replay',
method: 'post',
data
})
}
import request from '@/utils/request'
// 配置列表
export function pageHlDict(data) {
return request({
url: '/admin/issuetype/list/all',
method: 'get',
params: data
})
}
// 获取配置
export function getHlDict(data) {
return request({
url: '/admin/issuetype/get',
method: 'get',
params: data
})
}
// 删除配置
export function deleteHlDict(data) {
return request({
url: '/admin/issuetype/delete',
method: 'post',
params: data
})
}
// 保存配置
export function saveHlDict(data) {
return request({
url: '/admin/issuetype/save',
method: 'post',
data
})
}
import request from '@/utils/request'
export function listPjType(data) {
return request({
url: '/api/business/my/pagePTypeConfig',
method: 'post',
data
})
}
export function saveOrUpdatePjType(data) {
return request({
url: '/api/business/my/saveOrUpdatePType',
method: 'post',
data
})
}
export function deletePjType(id) {
return request({
url: '/api/business/my/deletePType',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
export function listPromoter(data) {
return request({
url: '/api/business/promoter/pagePromoterConfig',
method: 'post',
data
})
}
export function saveOrUpdatePromoter(data) {
return request({
url: '/api/business/promoter/saveOrUpdate',
method: 'post',
data
})
}
export function deletePromoter(id) {
return request({
url: '/api/business/promoter/delete',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
export function listpublicInfo(data) {
return request({
url: '/api/business/publicInfo/pageConfig',
method: 'post',
data
})
}
export function saveOrUpdatepublicInfo(data) {
return request({
url: '/api/business/publicInfo/saveOrUpdate',
method: 'post',
data
})
}
export function deletepublicInfo(id) {
return request({
url: '/api/business/publicInfo/delete',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
export function getRoutes() {
return request({
url: '/routes',
method: 'get'
})
}
export function getRoles() {
return request({
url: '/roles',
method: 'get'
})
}
export function addRole(data) {
return request({
url: '/role',
method: 'post',
data
})
}
export function updateRole(id, data) {
return request({
url: `/role/${id}`,
method: 'put',
data
})
}
export function deleteRole(id) {
return request({
url: `/role/${id}`,
method: 'delete'
})
}
import request from '@/utils/request'
export function generateRoutes() {
return request({
url: '/api/business/tbUser/getUserPermissions',
method: 'get'
})
}
import request from '@/utils/request'
export function all(data) {
return request({
url: '/admin/ad/list/all',
method: 'get',
data
})
}
export function deleteItem(id) {
return request({
url: `/admin/ad/delete?id=${id}`,
method: 'post',
// data: {
// id: Number(id)
// }
})
}
export function save(data) {
return request({
url: '/admin/ad/save',
method: 'post',
data
})
}
This diff is collapsed. Click to expand it.
import request from '@/utils/request'
import CryptoJS from "crypto-js"
export function upload(data) {
return request({
url: '/api/file/upload', // 上传图片
method: 'post',
data: data
})
}
export function merge(data) {
return request({
url: '/api/file/merge',
method: 'post',
data: data, timeout: 1000 * 60 * 30
})
}
export function uploadSlice(data) {
return request({
url: '/api/file/uploadSlice',
method: 'post',
isRepeatSubmit: true,
data: data, timeout: 1000 * 60 * 30
})
}
export const dvoUpload = {
get: async function(params, config) {
return request({
url: '/api/file/uploads',
params,
timeout: 1000 * 60 * 10,
isRepeatSubmit: true,
...config
})
},
post: async function(data, config) {
return request({
method: 'post',
url: '/api/file/uploads',
data,
timeout: 1000 * 60 * 10,
isRepeatSubmit: true,
...config
})
}
}
function convertWordArrayToUint8Array(wordArray) {
var arrayOfWords = wordArray.hasOwnProperty("words") ? wordArray.words : [];
var length = wordArray.hasOwnProperty("sigBytes") ? wordArray.sigBytes : arrayOfWords.length * 4;
var uInt8Array = new Uint8Array(length),
index = 0,
word, i;
for (i = 0; i < length; i++) {
word = arrayOfWords[i];
uInt8Array[index++] = word >> 24;
uInt8Array[index++] = (word >> 16) & 0xff;
uInt8Array[index++] = (word >> 8) & 0xff;
uInt8Array[index++] = word & 0xff;
}
return uInt8Array;
}
export function obsJiemi(url,flag) {
if(url.includes('myhuaweicloud'))
return new Promise((res, rej) => {
let xhr = new XMLHttpRequest()
let blob;
xhr.open('get', url)
xhr.setRequestHeader('Accept', getFileType(url))
xhr.responseType = 'blob'
xhr.onload = () => {
blob = xhr.response
let file;
file = new File([blob], url, {
type: getFileType(url)
})
var reader = new FileReader();
reader.readAsText(file);
reader.onload = () => {
var key = 'a63f22e7c4a5e167';
var decrypted = CryptoJS.AES.decrypt(reader.result, CryptoJS.enc.Utf8.parse(key), {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
}); // Decryption: I: Base64 encoded string (OpenSSL-format) -> O: WordArray
var typedArray = convertWordArrayToUint8Array(
decrypted); // Convert: WordArray -> typed array
var fileDec = new Blob([typedArray]); // Create blob from typed array
let url = URL.createObjectURL(fileDec)
if((file.type != 'image/*' && file.type != 'video/*') && flag){
var a = document.createElement("a");
var filename = file.name;
a.href = url;
a.download = filename.substring(filename.lastIndexOf('/')+1);
a.click();
window.URL.revokeObjectURL(url);
}
let param = {url:url,type:file.type}
res(param)
};
}
xhr.onerror = (error) => {
rej(error)
}
xhr.send()
})
else{
return new Promise((res,rej)=>{
let param = {url:url,type:getFileType(url)}
res(param)
})
}
}
function getFileType(url){
let arr = 'bmp,jpg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp,avif,apng'
let videoArr = 'asf,avi,mov,mpeg,mpg,vob,wmv,rm,rmvb,ogm,mkv,ifo,mp4,3gp,ts,mid,mp3,wav,wma,ra,ogg,flac,aac,ape,mpc,ac3,cda,m4a,mka,mp2,mpa,ofr,dts'
arr = arr.split(',')
videoArr = videoArr.split(',')
for(let i in arr){
if(url.includes(arr[i]) || url.includes(arr[i].toUpperCase()))
return 'image/*'
}
for(let i in videoArr){
if(url.includes(videoArr[i]) || url.includes(videoArr[i].toUpperCase()))
return 'video/*'
}
if(url.includes('txt') || url.includes('TXT')){
return "text/html,text/plain"
}
if(url.includes('pdf') || url.includes('PDF')){
return "application/pdf"
}
if(url.includes('doc') || url.includes('DOC')){
return "application/msword"
}
}
import request from '@/utils/request'
export function login(data) {
return request({
url: '/oauth/token',
method: 'post',
params: data
})
}
export function getInfo() {
return request({
url: '/api/business/tbUser/getUserInfo',
method: 'get'
})
}
export function logout(data) {
return request({
url: '/api/business/tuser/myLogout?accessToken=' + data,
method: 'get'
})
}
// 用户查询列表
export function fetchList(data) {
return request({
url: '/api/business/tuser/queryAllUser',
method: 'get',
params: data
})
}
// export function fetchList(data) {
// return request({
// url: '/api/business/tuser/userList',
// method: 'post',
// data: data
// })
// }
// 新增用户
export function addUser(data) {
return request({
url: '/api/business/tuser/saveUser',
method: 'post',
data: data
})
}
// 修改用户
export function updateUser(data) {
return request({
url: '/api/business/tuser/updateUser',
method: 'post',
data: data
})
}
// 单个用户信息查询
export function getOneInfo(data) {
return request({
url: '/api/business/tuser/info/one',
method: 'post',
params: data
})
}
// 删除用户信息
export function deleteOneInfo(data) {
return request({
url: '/api/business/tuser/delete',
method: 'post',
params: data
})
}
// 用户单个角色信息查询(用户修改)
export function getoneInfoRoles(data) {
return request({
url: '/api/business/tuser/info/getTbUserRoles',
method: 'post',
params: data
})
}
// 用户冻结/解冻
export function updateStatus(data) {
return request({
url: '/api/business/tuser/updateStatus',
method: 'post',
params: data
})
}
// 获取角色列表信息
export function roleList(data) {
return request({
url: '/api/business/role/list',
params: data,
method: 'post'
})
}
// 修改角色
export function getRoleInfo(data) {
return request({
url: '/api/business/role/info',
method: 'post',
params: data
})
}
// 新增角色
export function addRole(data) {
return request({
url: '/api/business/role/saveRole',
method: 'post',
data: data
})
}
// 修改角色
export function updateRole(data) {
return request({
url: '/api/business/role/updateRole',
method: 'post',
data: data
})
}
// 检索菜单接口
export function permissionListAll(data) {
return request({
url: '/api/business/permission/permissionListAll',
method: 'get',
data: data
})
}
import request from '@/utils/request'
export function listVcustomer(data) {
return request({
url: '/api/business/crowd/pageUserListConfig',
method: 'post',
data
})
}
export function saveOrUpdateVcustomer(data) {
return request({
url: '/api/business/crowd/userListSaveOrUpdate',
method: 'post',
data
})
}
export function deleteVcustomer(id) {
return request({
url: '/api/business/crowd/userListDel',
method: 'post',
data: {
id
}
})
}
import request from '@/utils/request'
export function listWallet(data) {
return request({
url: '/api/business/my/pageWalletConfig',
method: 'post',
data
})
}
export function saveOrUpdateWallet(data) {
return request({
url: '/api/business/my/saveOrUpdateWallet',
method: 'post',
data
})
}
export function deleteWallet(id) {
return request({
url: '/api/business/my/deleteWallet',
method: 'post',
data: {
id
}
})
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<template>
<transition :name="transitionName">
<div v-show="visible" :style="customStyle" class="back-to-ceiling" @click="backToTop">
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" class="Icon Icon--backToTopArrow" aria-hidden="true" style="height:16px;width:16px"><path d="M12.036 15.59a1 1 0 0 1-.997.995H5.032a.996.996 0 0 1-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29a1.003 1.003 0 0 1 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" /></svg>
</div>
</transition>
</template>
<script>
export default {
name: 'BackToTop',
props: {
visibilityHeight: {
type: Number,
default: 400
},
backPosition: {
type: Number,
default: 0
},
customStyle: {
type: Object,
default: function() {
return {
right: '50px',
bottom: '50px',
width: '40px',
height: '40px',
'border-radius': '4px',
'line-height': '45px',
background: '#e7eaf1'
}
}
},
transitionName: {
type: String,
default: 'fade'
}
},
data() {
return {
visible: false,
interval: null,
isMoving: false
}
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll)
if (this.interval) {
clearInterval(this.interval)
}
},
methods: {
handleScroll() {
this.visible = window.pageYOffset > this.visibilityHeight
},
backToTop() {
if (this.isMoving) return
const start = window.pageYOffset
let i = 0
this.isMoving = true
this.interval = setInterval(() => {
const next = Math.floor(this.easeInOutQuad(10 * i, start, -start, 500))
if (next <= this.backPosition) {
window.scrollTo(0, this.backPosition)
clearInterval(this.interval)
this.isMoving = false
} else {
window.scrollTo(0, next)
}
i++
}, 16.7)
},
easeInOutQuad(t, b, c, d) {
if ((t /= d / 2) < 1) return c / 2 * t * t + b
return -c / 2 * (--t * (t - 2) - 1) + b
}
}
}
</script>
<style scoped>
.back-to-ceiling {
position: fixed;
display: inline-block;
text-align: center;
cursor: pointer;
}
.back-to-ceiling:hover {
background: #d5dbe7;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity .5s;
}
.fade-enter,
.fade-leave-to {
opacity: 0
}
.back-to-ceiling .Icon {
fill: #9aaabf;
background: none;
}
</style>
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
</template>
<script>
import pathToRegexp from 'path-to-regexp'
export default {
data() {
return {
levelList: null
}
},
watch: {
$route(route) {
// if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) {
return
}
this.getBreadcrumb()
}
},
created() {
this.getBreadcrumb()
},
methods: {
getBreadcrumb() {
// only show routes with meta.title
let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
const first = matched[0]
if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
},
isDashboard(route) {
const name = route && route.name
if (!name) {
return false
}
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
},
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route
var toPath = pathToRegexp.compile(path)
return toPath(params)
},
handleLink(item) {
const { redirect, path } = item
if (redirect) {
this.$router.push(redirect)
return
}
this.$router.push(this.pathCompile(path))
}
}
}
</script>
<style lang="scss" scoped>
.app-breadcrumb.el-breadcrumb {
display: inline-block;
font-size: 14px;
line-height: 50px;
margin-left: 8px;
.no-redirect {
color: #97a8be;
cursor: text;
}
}
</style>
<template>
<div :id="id" :class="className" :style="{height:height,width:width}" />
</template>
<script>
import echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '200px'
},
height: {
type: String,
default: '200px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
const xAxisData = []
const data = []
const data2 = []
for (let i = 0; i < 50; i++) {
xAxisData.push(i)
data.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5)
data2.push((Math.sin(i / 5) * (i / 5 + 10) + i / 6) * 3)
}
this.chart.setOption({
backgroundColor: '#08263a',
grid: {
left: '5%',
right: '5%'
},
xAxis: [{
show: false,
data: xAxisData
}, {
show: false,
data: xAxisData
}],
visualMap: {
show: false,
min: 0,
max: 50,
dimension: 0,
inRange: {
color: ['#4a657a', '#308e92', '#b1cfa5', '#f5d69f', '#f5898b', '#ef5055']
}
},
yAxis: {
axisLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#4a657a'
}
},
splitLine: {
show: true,
lineStyle: {
color: '#08263f'
}
},
axisTick: {
show: false
}
},
series: [{
name: 'back',
type: 'bar',
data: data2,
z: 1,
itemStyle: {
normal: {
opacity: 0.4,
barBorderRadius: 5,
shadowBlur: 3,
shadowColor: '#111'
}
}
}, {
name: 'Simulate Shadow',
type: 'line',
data,
z: 2,
showSymbol: false,
animationDelay: 0,
animationEasing: 'linear',
animationDuration: 1200,
lineStyle: {
normal: {
color: 'transparent'
}
},
areaStyle: {
normal: {
color: '#08263a',
shadowBlur: 50,
shadowColor: '#000'
}
}
}, {
name: 'front',
type: 'bar',
data,
xAxisIndex: 1,
z: 3,
itemStyle: {
normal: {
barBorderRadius: 5
}
}
}],
animationEasing: 'elasticOut',
animationEasingUpdate: 'elasticOut',
animationDelay(idx) {
return idx * 20
},
animationDelayUpdate(idx) {
return idx * 20
}
})
}
}
}
</script>
<template>
<div :id="id" :class="className" :style="{height:height,width:width}" />
</template>
<script>
import echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '200px'
},
height: {
type: String,
default: '200px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
this.chart.setOption({
backgroundColor: '#394056',
title: {
top: 20,
text: 'Requests',
textStyle: {
fontWeight: 'normal',
fontSize: 16,
color: '#F1F1F3'
},
left: '1%'
},
tooltip: {
trigger: 'axis',
axisPointer: {
lineStyle: {
color: '#57617B'
}
}
},
legend: {
top: 20,
icon: 'rect',
itemWidth: 14,
itemHeight: 5,
itemGap: 13,
data: ['CMCC', 'CTCC', 'CUCC'],
right: '4%',
textStyle: {
fontSize: 12,
color: '#F1F1F3'
}
},
grid: {
top: 100,
left: '2%',
right: '2%',
bottom: '2%',
containLabel: true
},
xAxis: [{
type: 'category',
boundaryGap: false,
axisLine: {
lineStyle: {
color: '#57617B'
}
},
data: ['13:00', '13:05', '13:10', '13:15', '13:20', '13:25', '13:30', '13:35', '13:40', '13:45', '13:50', '13:55']
}],
yAxis: [{
type: 'value',
name: '(%)',
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: '#57617B'
}
},
axisLabel: {
margin: 10,
textStyle: {
fontSize: 14
}
},
splitLine: {
lineStyle: {
color: '#57617B'
}
}
}],
series: [{
name: 'CMCC',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 1
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(137, 189, 27, 0.3)'
}, {
offset: 0.8,
color: 'rgba(137, 189, 27, 0)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
itemStyle: {
normal: {
color: 'rgb(137,189,27)',
borderColor: 'rgba(137,189,2,0.27)',
borderWidth: 12
}
},
data: [220, 182, 191, 134, 150, 120, 110, 125, 145, 122, 165, 122]
}, {
name: 'CTCC',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 1
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(0, 136, 212, 0.3)'
}, {
offset: 0.8,
color: 'rgba(0, 136, 212, 0)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
itemStyle: {
normal: {
color: 'rgb(0,136,212)',
borderColor: 'rgba(0,136,212,0.2)',
borderWidth: 12
}
},
data: [120, 110, 125, 145, 122, 165, 122, 220, 182, 191, 134, 150]
}, {
name: 'CUCC',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 1
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(219, 50, 51, 0.3)'
}, {
offset: 0.8,
color: 'rgba(219, 50, 51, 0)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
itemStyle: {
normal: {
color: 'rgb(219,50,51)',
borderColor: 'rgba(219,50,51,0.2)',
borderWidth: 12
}
},
data: [220, 182, 125, 145, 122, 191, 134, 150, 120, 110, 165, 122]
}]
})
}
}
}
</script>
<template>
<div :id="id" :class="className" :style="{height:height,width:width}" />
</template>
<script>
import echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '200px'
},
height: {
type: String,
default: '200px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
const xData = (function() {
const data = []
for (let i = 1; i < 13; i++) {
data.push(i + 'month')
}
return data
}())
this.chart.setOption({
backgroundColor: '#344b58',
title: {
text: 'statistics',
x: '20',
top: '20',
textStyle: {
color: '#fff',
fontSize: '22'
},
subtextStyle: {
color: '#90979c',
fontSize: '16'
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
textStyle: {
color: '#fff'
}
}
},
grid: {
left: '5%',
right: '5%',
borderWidth: 0,
top: 150,
bottom: 95,
textStyle: {
color: '#fff'
}
},
legend: {
x: '5%',
top: '10%',
textStyle: {
color: '#90979c'
},
data: ['female', 'male', 'average']
},
calculable: true,
xAxis: [{
type: 'category',
axisLine: {
lineStyle: {
color: '#90979c'
}
},
splitLine: {
show: false
},
axisTick: {
show: false
},
splitArea: {
show: false
},
axisLabel: {
interval: 0
},
data: xData
}],
yAxis: [{
type: 'value',
splitLine: {
show: false
},
axisLine: {
lineStyle: {
color: '#90979c'
}
},
axisTick: {
show: false
},
axisLabel: {
interval: 0
},
splitArea: {
show: false
}
}],
dataZoom: [{
show: true,
height: 30,
xAxisIndex: [
0
],
bottom: 30,
start: 10,
end: 80,
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
handleSize: '110%',
handleStyle: {
color: '#d3dee5'
},
textStyle: {
color: '#fff' },
borderColor: '#90979c'
}, {
type: 'inside',
show: true,
height: 15,
start: 1,
end: 35
}],
series: [{
name: 'female',
type: 'bar',
stack: 'total',
barMaxWidth: 35,
barGap: '10%',
itemStyle: {
normal: {
color: 'rgba(255,144,128,1)',
label: {
show: true,
textStyle: {
color: '#fff'
},
position: 'insideTop',
formatter(p) {
return p.value > 0 ? p.value : ''
}
}
}
},
data: [
709,
1917,
2455,
2610,
1719,
1433,
1544,
3285,
5208,
3372,
2484,
4078
]
},
{
name: 'male',
type: 'bar',
stack: 'total',
itemStyle: {
normal: {
color: 'rgba(0,191,183,1)',
barBorderRadius: 0,
label: {
show: true,
position: 'top',
formatter(p) {
return p.value > 0 ? p.value : ''
}
}
}
},
data: [
327,
1776,
507,
1200,
800,
482,
204,
1390,
1001,
951,
381,
220
]
}, {
name: 'average',
type: 'line',
stack: 'total',
symbolSize: 10,
symbol: 'circle',
itemStyle: {
normal: {
color: 'rgba(252,230,48,1)',
barBorderRadius: 0,
label: {
show: true,
position: 'top',
formatter(p) {
return p.value > 0 ? p.value : ''
}
}
}
},
data: [
1036,
3693,
2962,
3810,
2519,
1915,
1748,
4675,
6209,
4323,
2865,
4298
]
}
]
})
}
}
}
</script>
import { debounce } from '@/utils'
export default {
data() {
return {
$_sidebarElm: null
}
},
mounted() {
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
window.addEventListener('resize', this.__resizeHandler)
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
},
beforeDestroy() {
window.removeEventListener('resize', this.__resizeHandler)
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
},
methods: {
// use $_ for mixins properties
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
$_sidebarResizeHandler(e) {
if (e.propertyName === 'width') {
this.__resizeHandler()
}
}
}
}
<template>
<div>
<el-form ref="dynamicValidateFormAdd" :model="configData" :rules="rules">
<el-form-item label="IOS地址" prop="iosDownUrl">
<el-input
v-model="configData.iosDownUrl"
autocomplete="off"
placeholder="请输入IOS地址"
/>
</el-form-item>
<el-form-item label="安卓地址" prop="androidDownUrl">
<el-input
v-model="configData.androidDownUrl"
autocomplete="off"
placeholder="请输入安卓地址"
/>
</el-form-item>
<el-form-item label="更新地址" prop="appUpUrl">
<el-input
v-model="configData.appUpUrl"
autocomplete="off"
placeholder="请输入更新地址"
/>
</el-form-item>
<el-form-item label="接口地址" prop="appRequestUrl">
<el-input
v-model="configData.appRequestUrl"
autocomplete="off"
placeholder="请输入接口api地址"
/>
</el-form-item>
</el-form>
</div>
</template>
<script>
// const demo = {
// "iosDownUrl":"https://gatk0.cc/",
// "androidDownUrl":"https://gatk1.cc/",
// "appUpUrl":"https://app-key.oss-cn-hongkong.aliyuncs.com/app.json",
// "appRequestUrl":"https://49-json.oss-cn-hongkong.aliyuncs.com/app.json"
// }
export default {
name: 'ConfigItemApp',
props: {
value: {},
},
data() {
return {
configData: {
iosDownUrl: '',
androidDownUrl: '',
appUpUrl: '',
appRequestUrl: ''
},
rules: {
iosDownUrl: [
{ required: true, message: '请输入IOS地址', trigger: 'blur' },
{ pattern: /^(http|https):\/\//, message: '请输入正确的地址', trigger: 'blur' }
],
androidDownUrl: [
{ required: true, message: '请输入安卓地址', trigger: 'blur' },
{ pattern: /^(http|https):\/\//, message: '请输入正确的地址', trigger: 'blur' }
],
appUpUrl: [
{ required: true, message: '请输入更新地址', trigger: 'blur' },
{ pattern: /^(http|https):\/\//, message: '请输入正确的地址', trigger: 'blur' }
],
appRequestUrl: [
{ required: true, message: '请输入接口地址', trigger: 'blur' },
{ pattern: /^(http|https):\/\//, message: '请输入正确的地址', trigger: 'blur' }
]
}
}
},
created() {
if (!this.value){
this.configData = {
iosDownUrl: '',
androidDownUrl: '',
appUpUrl: '',
appRequestUrl: ''
}
}else {
try {
const data = JSON.parse(this.value);
this.configData = data
} catch (e) {
this.configData = {
iosDownUrl: '',
androidDownUrl: '',
appUpUrl: '',
appRequestUrl: ''
}
}
}
this.$watch('configData', (newValue, oldValue) => {
// 对象属性发生变化时执行的操作
console.log(newValue)
this.$refs.dynamicValidateFormAdd.validate((valid) => {
if (valid) {
this.$emit('update:value', JSON.stringify(newValue))
}
})
}, { deep: true });
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<!-- <div>投票配置</div> -->
<!-- <div>{{ configData }}</div> -->
<div class="data">
<div class="item">
<div class="label">次数:</div>
<el-input v-model="configData.number" />
</div>
<div class="item">
<div class="label">积分:</div>
<el-input v-model="configData.point" />
</div>
</div>
</div>
</template>
<script>
export default {
name: 'ConfigItemJc',
props: {
value: '',
},
data() {
return {
configData: {
number: '',
point: ''
}
}
},
created() { },
mounted() {
console.log(this.value)
if (this.value == '[]' || !this.value || this.value == '{}'){
this.configData = {
number: '',
point: ''
}
}else {
try {
const data = JSON.parse(this.value);
if(data instanceof Array || (!data.name && !data.point)){
this.configData = {
number: '',
point: ''
}
} else
this.configData = data
} catch (e) {
this.configData = {
number: '',
point: ''
}
}
}
this.$watch('configData', (newValue, oldValue) => {
// 对象属性发生变化时执行的操作
console.log(newValue)
this.$emit('update:value', JSON.stringify(newValue))
}, { deep: true });
},
methods: {}
}
</script>
<style lang="scss" scoped>
.data {
border: 1px solid #cdcdcd80;
border-radius: 5px;
text-align: center;
padding: 2px;
width: 100%;
.item {
display: flex;
justify-content: center;
align-items: center;
.label {
width: 60px;
white-space: nowrap;
}
}
}
</style>
<template>
<div>
<!-- <div>投票配置</div> -->
<!-- <div>{{ configData }}</div> -->
<div class="data">
<!-- <div class="item">
<div class="label">次数:</div>
<el-input v-model="configData.number" />
</div> -->
<div class="item">
<div class="label">彩金:</div>
<el-input v-model="configData.point" />
</div>
</div>
</div>
</template>
<script>
export default {
name: 'ConfigItemJc2',
props: {
value: '',
},
data() {
return {
configData: {
// number: '',
point: ''
}
}
},
created() { },
mounted() {
console.log(this.value)
if (this.value == '[]' || !this.value || this.value == '{}'){
this.configData = {
// number: '',
point: ''
}
}else {
try {
const data = JSON.parse(this.value);
if(data instanceof Array || (!data.name && !data.point)){
this.configData = {
// number: '',
point: ''
}
} else
this.configData = data
} catch (e) {
this.configData = {
// number: '',
point: ''
}
}
}
this.$watch('configData', (newValue, oldValue) => {
// 对象属性发生变化时执行的操作
console.log(newValue)
this.$emit('update:value', JSON.stringify(newValue))
}, { deep: true });
},
methods: {}
}
</script>
<style lang="scss" scoped>
.data {
border: 1px solid #cdcdcd80;
border-radius: 5px;
text-align: center;
padding: 2px;
width: 100%;
.item {
display: flex;
justify-content: center;
align-items: center;
.label {
width: 60px;
white-space: nowrap;
}
}
}
</style>
<template>
<div>
<!-- <div>投票配置</div> -->
<!-- <div>{{ configData }}</div> -->
<div class="data">
<div class="item">
<div class="label">金额:</div>
<el-input v-model="configData['amount']" :disabled="true"/>
</div>
<div class="item">
<div class="label">积分:</div>
<el-input v-model="configData['point']" />
</div>
</div>
</div>
</template>
<script>
export default {
name: 'ConfigItemJfye',
props: {
value: '',
},
data() {
return {
configData: []
}
},
created() { },
mounted() {
try {
this.configData = JSON.parse(this.value);
} catch (e) { }
this.$watch('configData', (newValue, oldValue) => {
// 对象属性发生变化时执行的操作
this.$emit('update:value', JSON.stringify(newValue))
}, { deep: true });
},
methods: {}
}
</script>
<style lang="scss" scoped>
.data {
border: 1px solid #cdcdcd80;
border-radius: 5px;
text-align: center;
padding: 2px;
width: 100%;
.item {
display: flex;
justify-content: center;
align-items: center;
.label {
width: 60px;
white-space: nowrap;
}
}
}
</style>
<template>
<div>
<!-- <div>投票配置</div> -->
<!-- <div>{{ configData }}</div> -->
<table class="data" v-if="configData.length">
<thead>
<tr>
<td></td>
<td v-for="c in configData.length" :key="c">拉新等级{{ c }}</td>
</tr>
</thead>
<tbody>
<tr v-for="(row, rowIndex) in configData" :key="rowIndex">
<td>L{{ rowIndex }}</td>
<td v-for="(cell, columnIndex) in row" :key="columnIndex">
<el-input v-model="cell.point" type="number"/>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
export default {
name: 'ConfigItemLx',
props: {
value: '',
},
data() {
return {
configData: []
}
},
created() {},
mounted() {
try {
const data = JSON.parse(this.value);
const initData = data.map(col => {
return col.map(r => ({
point: r
}))
})
this.configData = initData;
} catch(e) {
this.configData = this.initData();
}
this.$watch('configData', (newValue, oldValue) => {
// 对象属性发生变化时执行的操作
const saveData = newValue.map(col => {
return col.map(c => +c.point)
})
this.$emit('update:value', JSON.stringify(saveData))
}, { deep: true });
},
methods: {
initData: function () {
return Array.from({ length: 9 }, (_, i) =>
Array.from({ length: 9 }, (_, j) => ({
originLevel: j + 1,
inviteLevel: i + 1,
point: 1
}))
);
}
},
computed: {
},
}
</script>
<style lang="scss" scoped>
.data {
border: 1px solid #cdcdcd80;
border-radius: 5px;
text-align: center;
width: 100%;
thead {
width: 100%;
}
tbody {
width: 100%;
}
}
</style>
<template>
<div>
<div class="data">
<el-input v-model="configData" placeholder="请输入H5地址"></el-input>
</div>
</div>
</template>
<script>
import Tinymce from '@/components/Tinymce'
export default {
name: 'h5url',
components: {Tinymce},
props: {
value: '',
},
data() {
return {
configData: ''
}
},
created() { },
mounted() {
if (typeof this.value === 'string') {
this.configData = this.value
} else {
this.configData = ''
}
this.$watch('configData', (newValue, oldValue) => {
// 对象属性发生变化时执行的操作
this.$emit('update:value',(newValue))
}, { deep: true });
},
methods: {}
}
</script>
<style lang="scss" scoped>
.data {
border: 1px solid #cdcdcd80;
border-radius: 5px;
text-align: center;
padding: 2px;
width: 100%;
.item {
}
}
.editor-content{
margin-top: 20px;
}
.editor-save-btn{
text-align: right;
margin-top: 10px;
}
.create-time {
margin-top: 10px;
margin-bottom: 10px;
}
.update-time {
margin-bottom: 10px;
}
</style>
<template>
<div>
<div class="data">
<div class="item">
<Tinymce v-model="configData['tip']" :height="300" />
</div>
</div>
</div>
</template>
<script>
import Tinymce from '@/components/Tinymce'
export default {
name: 'ConfigItemTip',
components: {Tinymce},
props: {
value: '',
},
data() {
return {
configData: {
tip: ''
}
}
},
created() { },
mounted() {
try {
this.configData = JSON.parse(this.value);
} catch (e) { }
this.$watch('configData', (newValue, oldValue) => {
// 对象属性发生变化时执行的操作
this.$emit('update:value', JSON.stringify(newValue))
}, { deep: true });
},
methods: {}
}
</script>
<style lang="scss" scoped>
.data {
border: 1px solid #cdcdcd80;
border-radius: 5px;
text-align: center;
padding: 2px;
width: 100%;
.item {
}
}
.editor-content{
margin-top: 20px;
}
.editor-save-btn{
text-align: right;
margin-top: 10px;
}
.create-time {
margin-top: 10px;
margin-bottom: 10px;
}
.update-time {
margin-bottom: 10px;
}
</style>
<template>
<div>
<!-- <div>投票配置</div> -->
<div>{{ configData }}</div>
<table class="data">
<thead>
<tr>
<!-- <td>编号</td> -->
<!-- <td>类型</td> -->
<!-- <td>名称</td> -->
<td>地址</td>
<td>操作</td>
</tr>
</thead>
<tbody>
<tr v-for="(c,key) in configData.data" :key="key">
<!-- <td>
<el-input v-model="c.number" :disabled="true" />
</td> -->
<!-- <td></td> -->
<!-- <td><el-input v-model="c.predictName"/></td> -->
<td><el-input v-model="configData.data[key]"/></td>
<td>
<i class='el-icon-delete' @click="del(key)" />
</td>
</tr>
<tr style="border-top: 1px solid #cdcdcd80;">
<td colspan="3">
<el-button @click="add">增加一项</el-button>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
export default {
name: 'ConfigItemTp',
props: {
value: '',
},
data() {
return {
configData: {
data: []
}
}
},
created() {},
mounted() {
try {
const val = JSON.parse(this.value);
// 需要判断类型,是否为数组
if( val.data && val.data instanceof Array) {
this.configData.data = val.data
} else {
this.configData.data = []
}
} catch(e) {}
this.$watch('configData', (newValue, oldValue) => {
// 对象属性发生变化时执行的操作
this.$emit('update:value', JSON.stringify(newValue))
}, { deep: true });
},
methods: {
add() {
this.configData.data.push('')
},
del(index) {
this.configData.data.splice(index,1)
},
// check(row) {
// // 是否选择重复的类型
// const repeat = this.configData.data.filter(i => i.predictType == row.predictType)
// if(repeat.length>1){
// row.predictType = ''
// this.$message({
// message: '不能选择存在的类型',
// type: 'warn'
// })
// }
// }
},
}
</script>
<style lang="scss" scoped>
.data {
border: 1px solid #cdcdcd80;
border-radius: 5px;
text-align: center;
width: 100%;
thead {
width: 100%;
}
tbody {
width: 100%;
}
}
</style>
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment