├── .gitignore ├── .browserslistrc ├── src ├── assets │ ├── style │ │ ├── theme.scss │ │ ├── layout.scss │ │ ├── login.scss │ │ └── global.scss │ ├── logo.png │ ├── images │ │ ├── 404.png │ │ ├── customer.jpg │ │ └── 404_cloud.png │ └── lang │ │ ├── zh.ts │ │ └── en.ts ├── views │ ├── About.vue │ ├── system │ │ ├── account │ │ │ └── index.vue │ │ ├── setting │ │ │ └── index.vue │ │ └── components │ │ │ ├── echarts │ │ │ ├── components │ │ │ │ ├── GongBar.vue │ │ │ │ ├── GongBar.ts │ │ │ │ └── word-cloud │ │ │ │ │ └── index.vue │ │ │ └── index.vue │ │ │ └── videos │ │ │ └── index.vue │ ├── Home.vue │ ├── business │ │ ├── dashboard │ │ │ ├── analysis │ │ │ │ ├── components │ │ │ │ │ ├── bar-chart │ │ │ │ │ │ ├── option.ts │ │ │ │ │ │ └── index.vue │ │ │ │ │ ├── common.scss │ │ │ │ │ ├── line-chart │ │ │ │ │ │ ├── index.vue │ │ │ │ │ │ └── option.ts │ │ │ │ │ ├── menu-card.vue │ │ │ │ │ └── total-item.vue │ │ │ │ └── index.vue │ │ │ └── workplace │ │ │ │ └── index.vue │ │ └── customer │ │ │ ├── components │ │ │ ├── filter.vue │ │ │ └── modal.vue │ │ │ └── index.vue │ ├── temp │ │ └── home.vue │ └── common │ │ ├── error │ │ ├── 401.vue │ │ └── 404.vue │ │ └── login │ │ └── index.vue ├── vue.d.ts ├── router │ ├── import_production.ts │ ├── import_development.ts │ └── index.ts ├── config │ ├── system.config.js │ └── router.config.ts ├── api │ ├── user.ts │ ├── login.ts │ └── customer.ts ├── shims-vue.d.ts ├── store │ ├── index.ts │ ├── modules │ │ ├── index.ts │ │ ├── user.ts │ │ └── permission.ts │ └── getters.ts ├── model │ └── CustomerModel.ts ├── components │ ├── HelloWorld.vue │ ├── Template.vue │ ├── Menu │ │ ├── MenuItem.vue │ │ └── SubMenu.vue │ ├── HeaderMenu │ │ ├── Lang.vue │ │ ├── User.vue │ │ ├── Modules.vue │ │ └── Theme.vue │ ├── Container │ │ └── index.vue │ ├── IconSlider.vue │ ├── Layout │ │ └── index.vue │ ├── BreadCrumb.vue │ ├── HeaderBar │ │ └── index.vue │ └── SideBar │ │ └── index.vue ├── interface │ └── api │ │ └── login.ts ├── utils │ ├── auth.ts │ ├── request.ts │ ├── antd.ts │ └── common.ts ├── shims-tsx.d.ts ├── main.ts ├── entity │ └── Customer.ts ├── App.vue └── permission.ts ├── .env.development ├── .env.production ├── dist ├── css │ ├── chunk-ea220f12.82bde05f.css │ ├── chunk-2458558b.14bb5faf.css │ ├── chunk-14d36d2e.82ba8555.css │ ├── chunk-76eee2f3.f1d91ce1.css │ ├── chunk-3e46c4f7.43ecdf07.css │ ├── chunk-e0105510.63ba1b5f.css │ ├── chunk-7df99e32.daec95e3.css │ ├── chunk-62093f8a.537e81c8.css │ ├── chunk-30e8fe47.3ab609ea.css │ ├── chunk-56b14b8d.741813ef.css │ └── app.bff59aeb.css ├── ico.png ├── temp.gif ├── favicon.ico ├── img │ ├── logo.82b9c7a5.png │ └── customer.fc1f93b9.jpg ├── js │ ├── chunk-76eee2f3.f2175d63.js │ ├── chunk-2d0c5202.9bb20c27.js │ ├── chunk-2d22d746.d16ddc40.js │ ├── chunk-2d0c0c06.22d4621c.js │ ├── chunk-2d0e28f8.318c82fa.js │ ├── chunk-2d22ccb2.d2bb10d8.js │ ├── chunk-2d0ac61c.95bc62b4.js │ ├── chunk-2d0c1dc4.c0e091a0.js │ ├── chunk-2d0b16b0.cf81be97.js │ ├── chunk-712f2df5.f7a188ec.js │ ├── chunk-2d0e88ce.8da710bb.js │ ├── chunk-2651c630.d7a5dcba.js │ ├── chunk-5449cdb1.d3957f0c.js │ ├── chunk-7df99e32.e7893ae7.js │ ├── chunk-2458558b.2a69f34f.js │ ├── chunk-3e46c4f7.abb3c5d6.js │ ├── chunk-3e2d8b8f.60f3307d.js │ ├── chunk-62093f8a.cf28c174.js │ ├── chunk-5fdc446c.3af16159.js │ ├── chunk-4bf207b4.7d1d1544.js │ ├── chunk-3c87aab4.97caf7e8.js │ ├── chunk-14d36d2e.bc95addc.js │ └── chunk-30e8fe47.0a381692.js └── index.html ├── public ├── me.png ├── ico.png ├── temp.gif ├── favicon.ico └── index.html ├── .env.release ├── .vscode └── settings.json ├── deploy.sh ├── babel.config.js ├── tsconfig.json ├── vue.config.js ├── .github └── workflows │ └── sync.yml ├── package.json ├── README.md └── .eslintrc.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | -------------------------------------------------------------------------------- /src/assets/style/theme.scss: -------------------------------------------------------------------------------- 1 | $theme-color: #3385ff; -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | VUE_APP_BASE_API = 'http://qa.i4cloud.cn:40001' 2 | -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | VUE_APP_BASE_API = 'http://qa.i4cloud.cn:40001' 2 | -------------------------------------------------------------------------------- /dist/css/chunk-ea220f12.82bde05f.css: -------------------------------------------------------------------------------- 1 | .chart[data-v-9e838534]{height:500px;width:100%} -------------------------------------------------------------------------------- /dist/ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/dist/ico.png -------------------------------------------------------------------------------- /dist/temp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/dist/temp.gif -------------------------------------------------------------------------------- /public/me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/public/me.png -------------------------------------------------------------------------------- /dist/css/chunk-2458558b.14bb5faf.css: -------------------------------------------------------------------------------- 1 | .load_player[data-v-5169e12f]{height:500px;width:100%} -------------------------------------------------------------------------------- /public/ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/public/ico.png -------------------------------------------------------------------------------- /public/temp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/public/temp.gif -------------------------------------------------------------------------------- /dist/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/dist/favicon.ico -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /.env.release: -------------------------------------------------------------------------------- 1 | NODE_ENV = 'production' 2 | VUE_APP_BASE_API = 'http://111.231.59.56:5000/api' 3 | 4 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/style/layout.scss: -------------------------------------------------------------------------------- 1 | #app{ 2 | height: 100%; 3 | width: 100%; 4 | font-size: 12px; 5 | } -------------------------------------------------------------------------------- /src/assets/images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/src/assets/images/404.png -------------------------------------------------------------------------------- /dist/img/logo.82b9c7a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/dist/img/logo.82b9c7a5.png -------------------------------------------------------------------------------- /dist/img/customer.fc1f93b9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/dist/img/customer.fc1f93b9.jpg -------------------------------------------------------------------------------- /src/assets/images/customer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/src/assets/images/customer.jpg -------------------------------------------------------------------------------- /src/assets/images/404_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhanzhan/antd-vue-admin/HEAD/src/assets/images/404_cloud.png -------------------------------------------------------------------------------- /src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /dist/js/chunk-76eee2f3.f2175d63.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-76eee2f3"],{a227:function(n,w,e){}}]); -------------------------------------------------------------------------------- /src/vue.d.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | declare module 'vue/types/vue' { 4 | interface Vue { 5 | $bus: any 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/router/import_production.ts: -------------------------------------------------------------------------------- 1 | module.exports = (file: string) => { 2 | 'use strict' 3 | return () => import(`@/views/${file}`) 4 | } 5 | 6 | -------------------------------------------------------------------------------- /src/config/system.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @desc 配置系统config 3 | * @param menu 4 | * @param theme 5 | * @param lanuage 6 | */ 7 | export default { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/api/user.ts: -------------------------------------------------------------------------------- 1 | import request from '../utils/request' 2 | 3 | export function getUser() { 4 | return request({ 5 | url: '/users', 6 | method: 'get' 7 | }) 8 | } 9 | -------------------------------------------------------------------------------- /src/router/import_development.ts: -------------------------------------------------------------------------------- 1 | module.exports = (file: string) => { 2 | 'use strict' 3 | return (resolve: any) => require([`@/views/${file}`], resolve) 4 | } 5 | 6 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "vue-i18n.i18nPaths": "src\\assets\\lang", 3 | "vscode.tsc.compiler.alertTSConfigChanges": "never", 4 | "vscode.tsc.compiler.alertOnError": "never" 5 | } -------------------------------------------------------------------------------- /src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue' 3 | export default Vue 4 | } 5 | 6 | declare module 'path-to-regexp' 7 | declare module 'nprogress' 8 | declare module 'ant-design-vue/lib/locale-provider/zh_CN' 9 | -------------------------------------------------------------------------------- /src/store/index.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import modules from './modules/index' 4 | import getters from './getters' 5 | 6 | Vue.use(Vuex) 7 | 8 | export default new Vuex.Store({ 9 | modules, 10 | getters 11 | }) 12 | -------------------------------------------------------------------------------- /dist/css/chunk-14d36d2e.82ba8555.css: -------------------------------------------------------------------------------- 1 | .ant-advanced-search-form[data-v-7171f938] .ant-form-item{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:0}.ant-advanced-search-form[data-v-7171f938] .ant-form-item-control-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1} -------------------------------------------------------------------------------- /src/model/CustomerModel.ts: -------------------------------------------------------------------------------- 1 | interface Model { 2 | [key:string]:any 3 | } 4 | // 策略模式 5 | export const CustomerCodeType:Model = { 6 | '1': { tagColor: '#87d068', name: '1级客户' }, 7 | '2': { tagColor: '#2db7f5', name: '2级客户' }, 8 | '3': { tagColor: '#108ee9', name: '3级客户' } 9 | } 10 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 确保脚本抛出遇到的错误 4 | set -e 5 | 6 | # 生成静态文件 7 | npm run build 8 | 9 | git init 10 | git add -A 11 | git commit -m '功能开发细节优化' 12 | 13 | # 如果发布到 https://.github.io 14 | git push -f git@github.com:weizhanzhan/antd-vue-admin.git typescript_dev 15 | 16 | cd - -------------------------------------------------------------------------------- /src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /src/interface/api/login.ts: -------------------------------------------------------------------------------- 1 | export interface LoginInfo { 2 | email:string 3 | password:string 4 | } 5 | export interface LoginResponse { 6 | access_token:string 7 | } 8 | 9 | export interface UserInfo{ 10 | id: string, 11 | name: string 12 | email: string 13 | role: string 14 | sex: number 15 | avatar: string 16 | } 17 | -------------------------------------------------------------------------------- /src/utils/auth.ts: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | 3 | const TokenKey = 'Admin-Token' 4 | 5 | export function getToken() { 6 | return Cookies.get(TokenKey) 7 | } 8 | 9 | export function setToken(token:any) { 10 | return Cookies.set(TokenKey, token) 11 | } 12 | 13 | export function removeToken() { 14 | return Cookies.remove(TokenKey) 15 | } 16 | -------------------------------------------------------------------------------- /src/views/system/account/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /src/views/system/setting/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /src/store/modules/index.ts: -------------------------------------------------------------------------------- 1 | const files = require.context('.', false, /\.ts$/) 2 | const modules:any = {} 3 | let exportModule = {} 4 | 5 | files.keys().forEach(key => { 6 | if (key === './index.ts') return 7 | modules[key.replace(/(\.\/|\.ts)/g, '')] = files(key).default 8 | }) 9 | 10 | exportModule = Object.assign({}, modules) 11 | 12 | export default exportModule 13 | -------------------------------------------------------------------------------- /src/shims-tsx.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from 'vue' 2 | 3 | declare global { 4 | namespace JSX { 5 | // tslint:disable no-empty-interface 6 | interface Element extends VNode {} 7 | // tslint:disable no-empty-interface 8 | interface ElementClass extends Vue {} 9 | interface IntrinsicElements { 10 | [elem: string]: any; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dist/js/chunk-2d0c5202.9bb20c27.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c5202"],{"3e82":function(e,a,t){"use strict";t.r(a);var o={xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],show:!1},yAxis:{type:"value",show:!1},grid:{left:"0"},series:[{data:[120,200,150,80,70,110,130],type:"bar",color:"#2f54e8",barWidth:"30%"}]};a["default"]=o}}]); -------------------------------------------------------------------------------- /src/components/Template.vue: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 17 | 18 | 20 | -------------------------------------------------------------------------------- /dist/js/chunk-2d22d746.d16ddc40.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22d746"],{f820:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},s=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"about"},[n("h1",[e._v("This is an about page")])])}],u=n("e90a"),c={},i=Object(u["a"])(c,a,s,!1,null,null,null);t["default"]=i.exports}}]); -------------------------------------------------------------------------------- /src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 22 | -------------------------------------------------------------------------------- /dist/css/chunk-76eee2f3.f1d91ce1.css: -------------------------------------------------------------------------------- 1 | .dashboard .w_menu_card{margin-bottom:32px}.dashboard .w_card_content{background:#fff;height:125px;padding:20px}.dashboard .w_card_content .w_card_title{float:right}.dashboard .w_card_content .w_card_remark{font-size:14px;float:right;margin-top:8px;color:#999;font-weight:300}.dashboard .w_card_content>h2{font-size:20px;color:#303030;font-weight:700;margin-bottom:5px}.dashboard .w_card_content>h5{font-size:14px;color:#303030;font-weight:700;margin-bottom:5px} -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | // 获取 VUE_APP_ENV 非 NODE_ENV,测试环境依然 console 2 | const IS_PROD = ['production', 'prod'].includes(process.env.VUE_APP_ENV) 3 | 4 | const plugins = [ 5 | [ 6 | 'import', 7 | { libraryName: 'ant-design-vue', libraryDirectory: 'es', style: true } 8 | ] 9 | ] 10 | 11 | // 去除 console.log 12 | if (IS_PROD) { 13 | plugins.push('transform-remove-console') 14 | } 15 | 16 | module.exports = { 17 | presets: ['@vue/cli-plugin-babel/preset'], 18 | plugins 19 | } 20 | 21 | -------------------------------------------------------------------------------- /dist/js/chunk-2d0c0c06.22d4621c.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c0c06"],{"42b4":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t._v(" SystemAccount ")])},c=[],r=a("4324"),u=a("7ae9"),i=a("a549"),s=a("0a8e"),o=a("f366"),b=function(t){Object(i["a"])(a,t);var e=Object(u["a"])(a);function a(){return Object(r["a"])(this,a),e.apply(this,arguments)}return a}(o["d"]);b=Object(s["a"])([o["a"]],b);var l=b,p=l,f=a("e90a"),d=Object(f["a"])(p,n,c,!1,null,"640aa543",null);e["default"]=d.exports}}]); -------------------------------------------------------------------------------- /dist/js/chunk-2d0e28f8.318c82fa.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e28f8"],{"7ee9":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._v(" SystemSetting ")])},c=[],r=n("4324"),u=n("7ae9"),i=n("a549"),s=n("0a8e"),o=n("f366"),f=function(e){Object(i["a"])(n,e);var t=Object(u["a"])(n);function n(){return Object(r["a"])(this,n),t.apply(this,arguments)}return n}(o["d"]);f=Object(s["a"])([o["a"]],f);var l=f,p=l,b=n("e90a"),d=Object(b["a"])(p,a,c,!1,null,"46645806",null);t["default"]=d.exports}}]); -------------------------------------------------------------------------------- /src/views/business/dashboard/analysis/components/bar-chart/option.ts: -------------------------------------------------------------------------------- 1 | const option:object = { 2 | xAxis: { 3 | type: 'category', 4 | data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], 5 | show: false 6 | }, 7 | yAxis: { 8 | type: 'value', 9 | show: false 10 | }, 11 | grid: { 12 | left: '0' 13 | }, 14 | series: [{ 15 | data: [120, 200, 150, 80, 70, 110, 130], 16 | type: 'bar', 17 | color: '#2f54e8', 18 | barWidth: '30%' 19 | }] 20 | } 21 | export default option 22 | -------------------------------------------------------------------------------- /src/api/login.ts: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | // eslint-disable-next-line no-unused-vars 3 | import * as LoginInterface from '../interface/api/login' 4 | const mockNum = '/mock/89/api/' 5 | 6 | export const loginByUsername = (data:LoginInterface.LoginInfo):Promise => { 7 | return request({ 8 | url: mockNum + 'login', 9 | method: 'post', 10 | data 11 | }) 12 | } 13 | 14 | export const getUserInfo = ():Promise => { 15 | return request({ 16 | url: mockNum + 'userInfo', 17 | method: 'get' 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /dist/css/chunk-3e46c4f7.43ecdf07.css: -------------------------------------------------------------------------------- 1 | .login-container[data-v-41bc4692]{width:100%;min-height:100%;min-width:1200px;-webkit-box-shadow:2px 2px 20px #eee;box-shadow:2px 2px 20px #eee;background-repeat:no-repeat;background-size:100% 100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.login-container .login-form-container[data-v-41bc4692]{max-width:300px;margin:0 auto;padding-top:250px}.login-container .login-form[data-v-41bc4692]{padding:40px 30px 5px 30px;border-radius:4px}.login-container .login-form-forgot[data-v-41bc4692]{float:right}.login-container .login-form-button[data-v-41bc4692]{width:100%} -------------------------------------------------------------------------------- /src/views/temp/home.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 25 | 26 | 28 | -------------------------------------------------------------------------------- /src/assets/lang/zh.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | menu: { 3 | home: '首页', 4 | dashboard: '仪表盘', 5 | workplace: '工作台', 6 | analysis: '分析页', 7 | customer: '客户', 8 | datasheets: '数据列表', 9 | components: '组件', 10 | echarts: 'echarts', 11 | antdComponent: 'Antd 组件', 12 | account: '个人中心', 13 | blogData: '博客数据', 14 | blogList: '博客列表', 15 | writeBlog: '写博客', 16 | category: '博客类别', 17 | system: '系统数据管理', 18 | user: '用户管理', 19 | recycleBin: '回收站', 20 | chart: 'Chart', 21 | video: 'video', 22 | base: '基础服务', 23 | console: '控制台' 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import store from './store' 5 | import Zh from './assets/lang/zh' 6 | import En from './assets/lang/en' 7 | import VueI18n from 'vue-i18n' 8 | import { bus } from './utils/common' 9 | import './assets/style/global.scss' 10 | import './utils/antd' 11 | import './permission' 12 | Vue.config.productionTip = false 13 | Vue.prototype.$bus = bus 14 | Vue.use(VueI18n) 15 | const i18n = new VueI18n({ 16 | locale: 'zh', // 语言标识 17 | messages: { 18 | 'zh': Zh, 19 | 'en': En 20 | } 21 | }) 22 | new Vue({ 23 | i18n, 24 | router, 25 | store, 26 | render: h => h(App) 27 | }).$mount('#app') 28 | -------------------------------------------------------------------------------- /dist/js/chunk-2d22ccb2.d2bb10d8.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22ccb2"],{f56c:function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("wx-container",{attrs:{"show-bread":""},scopedSlots:e._u([{key:"header",fn:function(){return[e._v(" Container Header插槽(不需要删除) ")]},proxy:!0}])},[t("div",[e._v(" Container内容插槽 ")])])},r=[],c=t("4324"),o=t("7ae9"),u=t("a549"),i=t("0a8e"),s=t("f366"),d=function(e){Object(u["a"])(t,e);var n=Object(o["a"])(t);function t(){return Object(c["a"])(this,t),n.apply(this,arguments)}return t}(s["d"]);d=Object(i["a"])([s["a"]],d);var f=d,p=f,b=t("e90a"),l=Object(b["a"])(p,a,r,!1,null,"537d547d",null);n["default"]=l.exports}}]); -------------------------------------------------------------------------------- /src/views/business/dashboard/workplace/index.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 27 | 28 | 31 | -------------------------------------------------------------------------------- /src/views/business/dashboard/analysis/components/common.scss: -------------------------------------------------------------------------------- 1 | .dashboard { 2 | .w_menu_card { 3 | margin-bottom: 32px 4 | } 5 | .w_card_content { 6 | background: #ffffff; 7 | height: 125px; 8 | padding: 20px; 9 | .w_card_title { 10 | float: right; 11 | } 12 | .w_card_remark { 13 | font-size: 14px; 14 | float: right; 15 | margin-top: 8px; 16 | color: #999; 17 | font-weight: 300; 18 | } 19 | } 20 | .w_card_content>h2 { 21 | font-size: 20px; 22 | color: #303030; 23 | font-weight: 700; 24 | margin-bottom: 5px 25 | } 26 | .w_card_content>h5 { 27 | font-size: 14px; 28 | color: #303030; 29 | font-weight: 700; 30 | margin-bottom: 5px 31 | } 32 | } -------------------------------------------------------------------------------- /src/assets/lang/en.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | menu: { 3 | home: 'Home', 4 | dashboard: 'Dashborad', 5 | workplace: 'Workplace', 6 | analysis: 'Analysis', 7 | customer: 'Customer', 8 | datasheets: 'Datasheets', 9 | components: 'Components', 10 | echarts: 'echarts', 11 | antdComponent: 'Antd Components', 12 | account: 'Personal center', 13 | blogData: 'Blog data', 14 | blogList: 'Blog list', 15 | writeBlog: 'write blog', 16 | category: 'Blog category', 17 | system: 'system', 18 | user: 'User', 19 | recycleBin: 'recycle bin', 20 | chart: 'Chart', 21 | video: 'Video', 22 | base: 'Base', 23 | console: 'Console' 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/store/getters.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unused-vars */ 2 | import { State as UserState } from './modules/user' 3 | import { State as PermissionState } from './modules/permission' 4 | 5 | export interface State { 6 | user:UserState 7 | permission:PermissionState 8 | } 9 | 10 | const getters = { 11 | user: (state:State) => state.user.user, 12 | roles: (state:State) => state.user.roles, 13 | addRoutes: (state:State) => state.permission.addRoutes, 14 | // routes: (state:permissionState) => state.permission.routes, 15 | moduleMenu: (state:State) => state.permission.moduleMenu, 16 | activeModule: (state:State) => state.permission.activeModule, 17 | activeModuleMenu: (state:State) => state.permission.activeModuleMenu 18 | } 19 | 20 | export default getters 21 | -------------------------------------------------------------------------------- /dist/css/chunk-e0105510.63ba1b5f.css: -------------------------------------------------------------------------------- 1 | .ant-result{padding:48px 32px}.ant-result-success .ant-result-icon>.anticon{color:#52c41a}.ant-result-error .ant-result-icon>.anticon{color:#f5222d}.ant-result-info .ant-result-icon>.anticon{color:#1890ff}.ant-result-warning .ant-result-icon>.anticon{color:#faad14}.ant-result-image{width:250px;height:295px;margin:auto}.ant-result-icon{margin-bottom:24px;text-align:center}.ant-result-icon>.anticon{font-size:72px}.ant-result-title{color:rgba(0,0,0,.85);font-size:24px;line-height:1.8;text-align:center}.ant-result-subtitle{color:rgba(0,0,0,.45);font-size:14px;line-height:1.6;text-align:center}.ant-result-extra{margin-top:32px;text-align:center}.ant-result-extra>*{margin-right:8px}.ant-result-extra>:last-child{margin-right:0}.ant-result-content{margin-top:24px;padding:24px 40px;background-color:#fafafa} -------------------------------------------------------------------------------- /src/views/common/error/401.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 31 | 32 | 35 | -------------------------------------------------------------------------------- /dist/js/chunk-2d0ac61c.95bc62b4.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0ac61c"],{"18fe":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("wx-container",{attrs:{"show-bread":""},scopedSlots:e._u([{key:"header",fn:function(){return[a("div",[a("h2",[e._v("工作台")]),a("a-icon",{staticClass:"header-icon",attrs:{type:"dashboard",theme:"twoTone","two-tone-color":"#52c41a"}}),e._v("这里是工作台的一些注释 ")],1)]},proxy:!0}])},[a("div",[e._v(" Container内容插槽 --Workplace ")])])},r=[],c=a("4324"),o=a("7ae9"),s=a("a549"),i=a("0a8e"),u=a("f366"),d=function(e){Object(s["a"])(a,e);var t=Object(o["a"])(a);function a(){return Object(c["a"])(this,a),t.apply(this,arguments)}return a}(u["d"]);d=Object(i["a"])([u["a"]],d);var l=d,p=l,h=a("e90a"),f=Object(h["a"])(p,n,r,!1,null,"4a904400",null);t["default"]=f.exports}}]); -------------------------------------------------------------------------------- /dist/js/chunk-2d0c1dc4.c0e091a0.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c1dc4"],{"489c":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("a-result",{attrs:{status:"404",title:"404","sub-title":"Sorry, the page you visited does not exist."},scopedSlots:t._u([{key:"extra",fn:function(){return[n("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.$router.push("/")}}},[t._v(" Back Home ")])]},proxy:!0}])})],1)},r=[],c=(n("54df"),n("dc24")),u=n("4324"),o=n("7ae9"),s=n("a549"),i=n("0a8e"),p=n("f366"),l=function(t){Object(s["a"])(n,t);var e=Object(o["a"])(n);function n(){return Object(u["a"])(this,n),e.apply(this,arguments)}return n}(p["d"]);l=Object(i["a"])([Object(p["a"])({components:{"a-result":c["a"]}})],l);var f=l,d=f,b=n("e90a"),h=Object(b["a"])(d,a,r,!1,null,"176cfc4f",null);e["default"]=h.exports}}]); -------------------------------------------------------------------------------- /src/assets/style/login.scss: -------------------------------------------------------------------------------- 1 | $color:red; 2 | 3 | .login-container{ 4 | width:100%; 5 | min-height:100%; 6 | min-width: 1200px; 7 | box-shadow: 2px 2px 20px #eeeeee; 8 | background-image: url('/banner2.jpg'); 9 | background-repeat:no-repeat; 10 | background-size: 100% 100%; 11 | align-items: center; 12 | // padding: 20px; 13 | // position: absolute; 14 | // top: 30%; 15 | // left: 50%; 16 | // margin-left: -200px; 17 | 18 | .login-form-container { 19 | max-width: 300px; 20 | margin: 0 auto; 21 | padding-top: 250px; 22 | } 23 | .login-form{ 24 | background: rgba(0, 0, 0, 0.1); 25 | padding: 40px 30px 5px 30px; 26 | border-radius: 4px; 27 | 28 | } 29 | .login-form-forgot { 30 | float: right; 31 | } 32 | .login-form-button { 33 | width: 100%; 34 | } 35 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "target": "esnext", 5 | "module": "esnext", 6 | "strict": true, 7 | "jsx": "preserve", 8 | "importHelpers": true, 9 | "moduleResolution": "node", 10 | "experimentalDecorators": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "sourceMap": false, 14 | "baseUrl": ".", 15 | "types": [ 16 | "webpack-env" 17 | ], 18 | "paths": { 19 | "@/*": [ 20 | "src/*" 21 | ] 22 | }, 23 | "lib": [ 24 | "esnext", 25 | "dom", 26 | "dom.iterable", 27 | "scripthost" 28 | ] 29 | }, 30 | "include": [ 31 | "src/**/*.ts", 32 | "src/**/*.tsx", 33 | "src/**/*.vue", 34 | "tests/**/*.ts", 35 | "tests/**/*.tsx" 36 | ], 37 | "exclude": [ 38 | "node_modules" 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /dist/js/chunk-2d0b16b0.cf81be97.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b16b0"],{2084:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-result",{attrs:{status:"403",title:"403","sub-title":"Sorry, you are not authorized to access this page."},scopedSlots:t._u([{key:"extra",fn:function(){return[a("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.$router.push("/")}}},[t._v(" Back Home ")])]},proxy:!0}])})],1)},n=[],c=(a("54df"),a("dc24")),u=a("4324"),o=a("7ae9"),s=a("a549"),i=a("0a8e"),p=a("f366"),l=function(t){Object(s["a"])(a,t);var e=Object(o["a"])(a);function a(){return Object(u["a"])(this,a),e.apply(this,arguments)}return a}(p["d"]);l=Object(i["a"])([Object(p["a"])({components:{"a-result":c["a"]}})],l);var b=l,f=b,d=a("e90a"),h=Object(d["a"])(f,r,n,!1,null,"35c3831e",null);e["default"]=h.exports}}]); -------------------------------------------------------------------------------- /src/entity/Customer.ts: -------------------------------------------------------------------------------- 1 | import { getCustomerList, createCustomer, updateCustomer, deleteCustomer } from '@/api/customer' 2 | 3 | export interface CustomerContent { 4 | id?:string 5 | name:string 6 | code:string 7 | address:string 8 | state:boolean 9 | phone:string 10 | } 11 | 12 | export class Customer { 13 | content:CustomerContent 14 | constructor(customer?:CustomerContent) { 15 | this.content = customer || { 16 | name: '', 17 | code: '', 18 | address: '', 19 | state: true, 20 | phone: '' 21 | } 22 | } 23 | create() { 24 | return createCustomer(this.content) 25 | } 26 | update() { 27 | return updateCustomer((this.content)) 28 | } 29 | delete(customerId?:string) { 30 | return deleteCustomer(customerId || this.content.id as string) 31 | } 32 | static getAllCustoemrList() { 33 | return getCustomerList() 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | const externals = { 2 | vue: 'Vue', 3 | 'vue-router': 'VueRouter', 4 | vuex: 'Vuex', 5 | axios: 'axios' 6 | } 7 | const cdnMap = { 8 | css: [], 9 | js: [ 10 | '//unpkg.com/vue@2.6.10/dist/vue.min.js', 11 | '//unpkg.com/vue-router@3.0.6/dist/vue-router.min.js', 12 | '//unpkg.com/vuex@3.1.1/dist/vuex.min.js', 13 | '//unpkg.com/axios@0.19.0/dist/axios.min.js' 14 | ] 15 | } 16 | module.exports = { 17 | publicPath: '/vue-admin-preview/', 18 | productionSourceMap: process.env.NODE_ENV !== 'production', 19 | chainWebpack: config => { 20 | config.externals(externals) 21 | config.plugin('html').tap(args => { 22 | args[0].cdn = cdnMap 23 | args[0].minify && (args[0].minify.minifyCSS = true) // 压缩html中的css 24 | return args 25 | }) 26 | } 27 | // baseUrl: process.env.NODE_ENV === 'production' ? './' : '' 28 | } 29 | -------------------------------------------------------------------------------- /dist/js/chunk-712f2df5.f7a188ec.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-712f2df5"],{bb51:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"home"},[a("img",{attrs:{alt:"Vue logo",src:n("cf05")}}),a("HelloWorld",{attrs:{msg:"Welcome to Your Vue.js App"}})],1)},o=[],c=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div")},l=[],r=n("4324"),s=n("7ae9"),u=n("a549"),i=n("0a8e"),p=n("f366"),f=function(e){Object(u["a"])(n,e);var t=Object(s["a"])(n);function n(){return Object(r["a"])(this,n),t.apply(this,arguments)}return n}(p["d"]);f=Object(i["a"])([p["a"]],f);var b=f,m=b,d=n("e90a"),h=Object(d["a"])(m,c,l,!1,null,"64ba6e06",null),j=h.exports,v={name:"Home",components:{HelloWorld:j}},g=v,w=Object(d["a"])(g,a,o,!1,null,null,null);t["default"]=w.exports},cf05:function(e,t,n){e.exports=n.p+"img/logo.82b9c7a5.png"}}]); -------------------------------------------------------------------------------- /src/views/business/dashboard/analysis/components/bar-chart/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 35 | 36 | 39 | -------------------------------------------------------------------------------- /src/assets/style/global.scss: -------------------------------------------------------------------------------- 1 | .container-view { 2 | margin: 16px; 3 | padding: 24px; 4 | background: #fff; 5 | min-height: 280px; 6 | } 7 | 8 | .container-view.no-bg { 9 | background: transparent 10 | } 11 | 12 | .side_bar_dark { 13 | background: #010101 !important; 14 | .ant-layout-sider-trigger{ 15 | background: #010101 !important; 16 | } 17 | } 18 | 19 | .side_bar_light { 20 | background: #fff !important; 21 | .ant-layout-sider-trigger{ 22 | background: #fff !important; 23 | color: #010101; 24 | } 25 | } 26 | 27 | .ant-menu-dark .ant-menu-inline.ant-menu-sub { 28 | background: #232323 !important 29 | } 30 | 31 | .wx-body { 32 | padding: 16px; 33 | background: #fff; 34 | } 35 | 36 | .m_t_16 { 37 | margin-top: 16px; 38 | } 39 | 40 | .form-item-btn { 41 | margin-right: 0 !important; 42 | } 43 | 44 | .header-icon{ 45 | font-size: 18px; 46 | margin-right: 6px; 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/views/business/dashboard/analysis/components/line-chart/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 35 | 36 | 39 | -------------------------------------------------------------------------------- /src/views/common/error/404.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 35 | 36 | 39 | -------------------------------------------------------------------------------- /src/api/customer.ts: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | // eslint-disable-next-line no-unused-vars 3 | import { CustomerContent } from '@/entity/Customer' 4 | const mockNum = '/mock/89/api/' 5 | 6 | export const getCustomerList = ():Promise<{contents:Array, totalElements:number}> => { 7 | return request({ 8 | url: mockNum + 'customer/list', 9 | method: 'get' 10 | }) 11 | } 12 | export const createCustomer = (data:CustomerContent) => { 13 | return request({ 14 | url: mockNum + 'customer', 15 | method: 'post', 16 | data 17 | }) 18 | } 19 | 20 | export const updateCustomer = (data:CustomerContent) => { 21 | return request({ 22 | url: mockNum + 'customer', 23 | method: 'put', 24 | data 25 | }) 26 | } 27 | export const deleteCustomer = (id:string) => { 28 | return request({ 29 | url: mockNum + 'customer/' + id, 30 | method: 'delete' 31 | }) 32 | } 33 | 34 | -------------------------------------------------------------------------------- /src/views/system/components/echarts/components/GongBar.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 33 | 34 | 37 | -------------------------------------------------------------------------------- /src/components/Menu/MenuItem.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 36 | 37 | 40 | -------------------------------------------------------------------------------- /dist/css/chunk-7df99e32.daec95e3.css: -------------------------------------------------------------------------------- 1 | .dashboard .w_menu_card[data-v-7e4db85a]{margin-bottom:32px}.dashboard .w_card_content[data-v-7e4db85a]{background:#fff;height:125px;padding:20px}.dashboard .w_card_content .w_card_title[data-v-7e4db85a]{float:right}.dashboard .w_card_content .w_card_remark[data-v-7e4db85a]{font-size:14px;float:right;margin-top:8px;color:#999;font-weight:300}.dashboard .w_card_content>h2[data-v-7e4db85a]{font-size:20px;color:#303030;font-weight:700;margin-bottom:5px}.dashboard .w_card_content>h5[data-v-7e4db85a]{font-size:14px;color:#303030;font-weight:700;margin-bottom:5px}.statistics-text[data-v-7e4db85a]{text-align:right;height:65px;position:relative}.statistics-text .statistics-text-value[data-v-7e4db85a]{position:absolute;bottom:0;right:0}.statistics-text .statistics-text-value .value-rise[data-v-7e4db85a]{color:#096dd9}.statistics-text .statistics-text-value .value-fall[data-v-7e4db85a]{color:#f5222d}.statistics-text .statistics-text-value .value-label[data-v-7e4db85a]{font-size:20px;font-weight:700;padding-left:6px} -------------------------------------------------------------------------------- /.github/workflows/sync.yml: -------------------------------------------------------------------------------- 1 | name: Gitee自动部署2 2 | 3 | on: 4 | push: 5 | branches: [ typescript_dev ] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Sync to Gitee 12 | uses: wearerequired/git-mirror-action@master 13 | env: 14 | # 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY 15 | SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} 16 | with: 17 | # 注意替换为你的 GitHub 源仓库地址 18 | source-repo: "git@github.com:weizhanzhan/antd-vue-admin.git" 19 | # 注意替换为你的 Gitee 目标仓库地址 20 | destination-repo: "git@gitee.com:zhan961023/vue-admin-preview.git" 21 | 22 | - name: Build Gitee Pages 23 | uses: yanglbme/gitee-pages-action@master 24 | with: 25 | # 注意替换为你的 Gitee 用户名 26 | gitee-username: zhan961023 27 | # 注意在 Settings->Secrets 配置 GITEE_PASSWORD 28 | gitee-password: ${{ secrets.GITEE_PASSWORD }} 29 | # 注意替换为你的 Gitee 仓库 30 | gitee-repo: zhan961023/vue-admin-preview -------------------------------------------------------------------------------- /dist/css/chunk-62093f8a.537e81c8.css: -------------------------------------------------------------------------------- 1 | .w_process[data-v-be33a6f4]{height:5px;margin-bottom:0;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.w_process_bar[data-v-be33a6f4]{float:left;width:20%;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.dashboard .w_menu_card[data-v-385a956b]{margin-bottom:32px}.dashboard .w_card_content[data-v-385a956b]{background:#fff;height:125px;padding:20px}.dashboard .w_card_content .w_card_title[data-v-385a956b]{float:right}.dashboard .w_card_content .w_card_remark[data-v-385a956b]{font-size:14px;float:right;margin-top:8px;color:#999;font-weight:300}.dashboard .w_card_content>h2[data-v-385a956b]{font-size:20px;color:#303030;font-weight:700;margin-bottom:5px}.dashboard .w_card_content>h5[data-v-385a956b]{font-size:14px;color:#303030;font-weight:700;margin-bottom:5px} -------------------------------------------------------------------------------- /dist/js/chunk-2d0e88ce.8da710bb.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e88ce"],{"8a6e":function(e,t,a){"use strict";a.r(t);var i={title:{text:"Front Frame",subtext:"Stars(数据纯属虚构)"},color:["#006DF0","#933EC5","#65b12d"],tooltip:{trigger:"axis"},grid:{left:"4%",right:"2%"},legend:{data:["Vue","React","Angular"]},toolbox:{show:!0,feature:{mark:{show:!0},dataView:{show:!0,readOnly:!1},magicType:{show:!0,type:["line","bar","stack","tiled"]},restore:{show:!0},saveAsImage:{show:!0}}},xAxis:[{type:"category",boundaryGap:!1,data:["2012","2013","2014","2015","2016","2017","2018"],axisLine:{show:!1},axisTick:{show:!1}}],yAxis:[{type:"value",axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:["#eeeeee"]}}}],series:[{name:"Vue",type:"line",smooth:!0,symbolSize:8,symbol:"circle",barWidth:"50%",data:[140,242,221,154,260,830,710],lineStyle:{width:1}},{name:"React",type:"line",smooth:!0,symbol:"circle",symbolSize:8,data:[430,682,434,791,390,30,110],lineStyle:{width:1}},{name:"Angular",type:"line",smooth:!0,symbolSize:8,symbol:"circle",data:[1320,1132,601,234,120,590,820],lineStyle:{width:1}}]};t["default"]=i}}]); -------------------------------------------------------------------------------- /src/utils/request.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import { getToken } from './auth' 3 | import { message } from 'ant-design-vue' 4 | import router from '../router' 5 | declare module 'axios' { 6 | interface AxiosInstance {// 设置返回类型是promise 7 | (config: AxiosRequestConfig): Promise 8 | } 9 | } 10 | 11 | const service = axios.create({ 12 | baseURL: process.env.VUE_APP_BASE_API, 13 | timeout: 10000 14 | }) 15 | service.interceptors.request.use( 16 | config => { 17 | const token = getToken() 18 | // 每次发送请求之前判断是否存在token,如果存在,则统一在http请求的header都加上token,不用每次请求都手动添加了 19 | if (token) { 20 | config.headers['Authorization'] = token 21 | } 22 | return config 23 | }, 24 | error => Promise.reject(error) 25 | ) 26 | service.interceptors.response.use( 27 | response => response.data, 28 | error => { 29 | if (error.code) { message.error('网络超时....') } 30 | if (error.response && error.response.data) { 31 | message.error(JSON.stringify(error.response.data)) 32 | if (error.response.status === 401) { 33 | router.push('/login') 34 | } 35 | } 36 | return Promise.reject(error) 37 | } 38 | ) 39 | 40 | export default service 41 | -------------------------------------------------------------------------------- /src/views/business/dashboard/analysis/components/menu-card.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 42 | 43 | 46 | -------------------------------------------------------------------------------- /dist/js/chunk-2651c630.d7a5dcba.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2651c630","chunk-2d0c5202"],{"3e82":function(t,e,a){"use strict";a.r(e);var i={xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],show:!1},yAxis:{type:"value",show:!1},grid:{left:"0"},series:[{data:[120,200,150,80,70,110,130],type:"bar",color:"#2f54e8",barWidth:"30%"}]};e["default"]=i},"6b01":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{ref:"chart",staticStyle:{height:"100%",width:"100%"}})},n=[],r=a("4324"),c=a("1b6a"),s=a("7ae9"),u=a("a549"),h=a("0a8e"),o=a("2389"),d=a.n(o),f=a("3e82"),l=a("f366"),b=function(t){Object(u["a"])(a,t);var e=Object(s["a"])(a);function a(){return Object(r["a"])(this,a),e.apply(this,arguments)}return Object(c["a"])(a,[{key:"initEchart",value:function(){var t=this;this.echart=d.a.init(this.$refs.chart),this.echart.setOption(f["default"]),window.addEventListener("resize",(function(){t.echart.resize()})),setTimeout((function(){t.echart.resize()}),0)}},{key:"mounted",value:function(){this.initEchart()}}]),a}(l["d"]);b=Object(h["a"])([Object(l["a"])({})],b);var p=b,v=p,w=a("e90a"),y=Object(w["a"])(v,i,n,!1,null,null,null);e["default"]=y.exports}}]); -------------------------------------------------------------------------------- /src/utils/antd.ts: -------------------------------------------------------------------------------- 1 | 2 | import Vue from 'vue' 3 | import WxContainer from '../components/Container/index.vue' 4 | import { message } from 'ant-design-vue' 5 | import { 6 | Icon, 7 | Row, 8 | Col, 9 | Table, 10 | Button, 11 | Form, 12 | Input, 13 | Upload, 14 | Modal, 15 | Tabs 16 | } from 'ant-design-vue' 17 | 18 | const antdComponents = [ 19 | { name: 'a-row', component: Row }, 20 | { name: 'a-col', component: Col }, 21 | { name: 'a-icon', component: Icon }, 22 | { name: 'a-table', component: Table }, 23 | { name: 'a-button', component: Button }, 24 | { name: 'a-form', component: Form }, 25 | { name: 'a-form-item', component: Form.Item }, 26 | { name: 'a-input', component: Input }, 27 | { name: 'a-upload', component: Upload }, 28 | { name: 'a-modal', component: Modal }, 29 | { name: 'a-tabs', component: Tabs }, 30 | { name: 'a-tab-pane', component: Tabs.TabPane } 31 | ] 32 | const selfComponent = [ 33 | { name: 'wx-container', component: WxContainer } 34 | ] 35 | selfComponent.forEach(item => { 36 | Vue.component(item.name, item.component) 37 | }) 38 | antdComponents.forEach(item => { 39 | Vue.component(item.name, item.component) 40 | }) 41 | Vue.prototype.$message = message 42 | -------------------------------------------------------------------------------- /src/components/HeaderMenu/Lang.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 45 | 46 | 49 | -------------------------------------------------------------------------------- /src/components/Container/index.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 36 | 37 | 56 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 45 | 46 | 54 | -------------------------------------------------------------------------------- /src/views/system/components/echarts/index.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 54 | 55 | 58 | -------------------------------------------------------------------------------- /src/components/Menu/SubMenu.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 48 | 49 | 52 | -------------------------------------------------------------------------------- /src/components/IconSlider.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 31 | 32 | 56 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 12 | 13 | <% for (var i in 14 | htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.css) { %> 15 | 16 | 17 | <% } %> 18 | 19 | <% for (var i in 20 | htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %> 21 | 22 | <% } %> 23 | 24 | 25 | 28 |
29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/views/business/dashboard/analysis/components/total-item.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 43 | 44 | 68 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "antd-vue-admin", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "@types/echarts": "^4.4.3", 12 | "@types/js-cookie": "^2.2.5", 13 | "ant-design-vue": "^1.5.0-rc.6", 14 | "axios": "^0.19.2", 15 | "babel-plugin-import": "^1.13.0", 16 | "core-js": "^3.6.4", 17 | "echarts": "^4.7.0", 18 | "echarts-wordcloud": "^1.1.3", 19 | "js-cookie": "^2.2.1", 20 | "less": "^2.7.3", 21 | "less-loader": "^5.0.0", 22 | "node-sass": "^4.13.1", 23 | "nprogress": "^0.2.0", 24 | "sass-loader": "^8.0.2", 25 | "vue": "^2.6.11", 26 | "vue-class-component": "^7.2.2", 27 | "vue-i18n": "^8.15.5", 28 | "vue-property-decorator": "^8.3.0", 29 | "vue-router": "^3.1.5", 30 | "vuex": "^3.1.2", 31 | "vuex-class": "^0.3.2" 32 | }, 33 | "devDependencies": { 34 | "@typescript-eslint/eslint-plugin": "^2.18.0", 35 | "@typescript-eslint/parser": "^2.18.0", 36 | "@vue/cli-plugin-babel": "^4.2.0", 37 | "@vue/cli-plugin-eslint": "^4.2.0", 38 | "@vue/cli-plugin-typescript": "^4.2.0", 39 | "@vue/cli-service": "^4.2.0", 40 | "@vue/eslint-config-prettier": "^6.0.0", 41 | "@vue/eslint-config-typescript": "^5.0.1", 42 | "babel-plugin-transform-remove-console": "^6.9.4", 43 | "eslint": "^6.7.2", 44 | "eslint-plugin-prettier": "^3.1.1", 45 | "eslint-plugin-vue": "^6.1.2", 46 | "prettier": "^1.19.1", 47 | "typescript": "~3.7.5", 48 | "vue-template-compiler": "^2.6.11" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/components/Layout/index.vue: -------------------------------------------------------------------------------- 1 | 30 | 58 | 61 | -------------------------------------------------------------------------------- /src/permission.ts: -------------------------------------------------------------------------------- 1 | import router from './router' 2 | import store from './store' 3 | import { getToken } from '@/utils/auth' 4 | import { message } from 'ant-design-vue' 5 | import NProgress from 'nprogress' 6 | import 'nprogress/nprogress.css' 7 | const whiteList = ['/login', '/auth-redirect'] 8 | 9 | function hasPermission(roles:Array, permissionRoles:Array) { 10 | if (roles.includes('admin')) return true // admin permission passed directly 11 | if (!permissionRoles) return true 12 | return roles.some(role => permissionRoles.indexOf(role) >= 0) 13 | } 14 | 15 | router.beforeEach((to, from, next) => { 16 | NProgress.start() 17 | if (getToken()) { 18 | if (whiteList.indexOf(to.path) !== -1) { 19 | next() 20 | } else { 21 | if (store.getters.roles.length === 0) { 22 | store.dispatch('GetUserInfo').then(info => { 23 | const roles = info.role 24 | store.dispatch('GenerateRoutes', { roles }) // 根据用户权限生产可访问的路由表 25 | .then(() => { 26 | router.addRoutes(store.getters.addRoutes) 27 | next({ 28 | path: to.path, query: to.query, params: to.params, 29 | replace: true 30 | }) 31 | }) 32 | }) 33 | } else { 34 | // 当如果一个角色登录过后,再次有登录的话回去再次验证该角色是否有权限进入该路由 35 | if (hasPermission(store.getters.roles, to.meta.roles)) { 36 | next() 37 | } else { 38 | message.error('你没有权限') 39 | next({ path: '/login', replace: true, query: {}}) 40 | } 41 | } 42 | } 43 | } else { 44 | if (whiteList.indexOf(to.path) !== -1) { 45 | // 在免登录白名单,直接进入 46 | next() 47 | } else { 48 | message.error('身份已过期!请重新登陆') 49 | next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 50 | } 51 | } 52 | }) 53 | router.afterEach(() => { 54 | NProgress.done() 55 | }) 56 | -------------------------------------------------------------------------------- /dist/js/chunk-5449cdb1.d3957f0c.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5449cdb1","chunk-2d0e88ce"],{"7d03":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"chart",staticStyle:{height:"558px",width:"100%"}})},n=[],s=a("4324"),r=a("1b6a"),o=a("7ae9"),c=a("a549"),l=a("0a8e"),h=a("2389"),u=a.n(h),d=a("8a6e"),y=a("f366"),b=function(e){Object(c["a"])(a,e);var t=Object(o["a"])(a);function a(){return Object(s["a"])(this,a),t.apply(this,arguments)}return Object(r["a"])(a,[{key:"initEchart",value:function(){var e=this;this.echart=u.a.init(this.$refs.chart),this.echart.setOption(d["default"]),window.addEventListener("resize",(function(){e.echart.resize()})),setTimeout((function(){e.echart.resize()}),0)}},{key:"mounted",value:function(){this.initEchart()}}]),a}(y["d"]);b=Object(l["a"])([Object(y["a"])({})],b);var w=b,p=w,m=a("e90a"),f=Object(m["a"])(p,i,n,!1,null,null,null);t["default"]=f.exports},"8a6e":function(e,t,a){"use strict";a.r(t);var i={title:{text:"Front Frame",subtext:"Stars(数据纯属虚构)"},color:["#006DF0","#933EC5","#65b12d"],tooltip:{trigger:"axis"},grid:{left:"4%",right:"2%"},legend:{data:["Vue","React","Angular"]},toolbox:{show:!0,feature:{mark:{show:!0},dataView:{show:!0,readOnly:!1},magicType:{show:!0,type:["line","bar","stack","tiled"]},restore:{show:!0},saveAsImage:{show:!0}}},xAxis:[{type:"category",boundaryGap:!1,data:["2012","2013","2014","2015","2016","2017","2018"],axisLine:{show:!1},axisTick:{show:!1}}],yAxis:[{type:"value",axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:["#eeeeee"]}}}],series:[{name:"Vue",type:"line",smooth:!0,symbolSize:8,symbol:"circle",barWidth:"50%",data:[140,242,221,154,260,830,710],lineStyle:{width:1}},{name:"React",type:"line",smooth:!0,symbol:"circle",symbolSize:8,data:[430,682,434,791,390,30,110],lineStyle:{width:1}},{name:"Angular",type:"line",smooth:!0,symbolSize:8,symbol:"circle",data:[1320,1132,601,234,120,590,820],lineStyle:{width:1}}]};t["default"]=i}}]); -------------------------------------------------------------------------------- /dist/css/chunk-30e8fe47.3ab609ea.css: -------------------------------------------------------------------------------- 1 | .w_process[data-v-be33a6f4]{height:5px;margin-bottom:0;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.w_process_bar[data-v-be33a6f4]{float:left;width:20%;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.dashboard .w_menu_card[data-v-385a956b]{margin-bottom:32px}.dashboard .w_card_content[data-v-385a956b]{background:#fff;height:125px;padding:20px}.dashboard .w_card_content .w_card_title[data-v-385a956b]{float:right}.dashboard .w_card_content .w_card_remark[data-v-385a956b]{font-size:14px;float:right;margin-top:8px;color:#999;font-weight:300}.dashboard .w_card_content>h2[data-v-385a956b]{font-size:20px;color:#303030;font-weight:700;margin-bottom:5px}.dashboard .w_card_content>h5[data-v-385a956b]{font-size:14px;color:#303030;font-weight:700;margin-bottom:5px}.dashboard .w_menu_card[data-v-7e4db85a]{margin-bottom:32px}.dashboard .w_card_content[data-v-7e4db85a]{background:#fff;height:125px;padding:20px}.dashboard .w_card_content .w_card_title[data-v-7e4db85a]{float:right}.dashboard .w_card_content .w_card_remark[data-v-7e4db85a]{font-size:14px;float:right;margin-top:8px;color:#999;font-weight:300}.dashboard .w_card_content>h2[data-v-7e4db85a]{font-size:20px;color:#303030;font-weight:700;margin-bottom:5px}.dashboard .w_card_content>h5[data-v-7e4db85a]{font-size:14px;color:#303030;font-weight:700;margin-bottom:5px}.statistics-text[data-v-7e4db85a]{text-align:right;height:65px;position:relative}.statistics-text .statistics-text-value[data-v-7e4db85a]{position:absolute;bottom:0;right:0}.statistics-text .statistics-text-value .value-rise[data-v-7e4db85a]{color:#096dd9}.statistics-text .statistics-text-value .value-fall[data-v-7e4db85a]{color:#f5222d}.statistics-text .statistics-text-value .value-label[data-v-7e4db85a]{font-size:20px;font-weight:700;padding-left:6px}.dashboard_chart[data-v-5c55375b]{background:#fff;padding:20px} -------------------------------------------------------------------------------- /src/config/router.config.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @desc 这里只要数模拟菜单通过接口获取 3 | * @param routes 4 | * @param role 5 | */ 6 | export default [ 7 | { 8 | name: 'base', 9 | menus: [ 10 | { 11 | path: '/components', 12 | component: 'Layout', 13 | redirect: '/components/echarts', 14 | name: 'components', 15 | meta: { title: 'components' }, 16 | alwaysShow: true, 17 | children: [ 18 | { 19 | path: 'echarts', 20 | name: 'echarts', 21 | component: 'system/components/echarts', 22 | meta: { title: 'echarts' } 23 | }, 24 | { 25 | path: 'video', 26 | name: 'video', 27 | component: 'system/components/videos', 28 | meta: { title: 'video' } 29 | } 30 | ] 31 | } 32 | ] 33 | }, 34 | { 35 | name: 'console', 36 | menus: [ 37 | { 38 | path: '/dashboard', 39 | component: 'Layout', 40 | redirect: '/dashboard/analysis', 41 | name: 'dashboard', 42 | meta: { title: 'dashboard' }, 43 | alwaysShow: true, 44 | children: [ 45 | { 46 | path: 'workplace', 47 | name: 'workplace', 48 | component: 'business/dashboard/workplace', 49 | meta: { title: 'workplace' } 50 | }, 51 | { 52 | path: 'analysis', 53 | name: 'analysis', 54 | component: 'business/dashboard/analysis', 55 | meta: { title: 'analysis' } 56 | } 57 | ] 58 | }, 59 | { 60 | path: '/customer', 61 | component: 'Layout', 62 | redirect: '/customer/list', 63 | name: 'customer', 64 | meta: { title: 'customer' }, 65 | alwaysShow: true, 66 | children: [ 67 | { 68 | path: 'datasheets', 69 | name: 'customerDatasheets', 70 | component: 'business/customer', 71 | meta: { title: 'datasheets' } 72 | } 73 | ] 74 | } 75 | ] 76 | } 77 | ] 78 | -------------------------------------------------------------------------------- /src/components/BreadCrumb.vue: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 64 | 65 | 71 | -------------------------------------------------------------------------------- /src/components/HeaderBar/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 47 | 48 | 88 | -------------------------------------------------------------------------------- /src/components/HeaderMenu/User.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 64 | 65 | 82 | -------------------------------------------------------------------------------- /dist/js/chunk-7df99e32.e7893ae7.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7df99e32","chunk-2651c630","chunk-2d0c5202"],{"3e82":function(t,a,e){"use strict";e.r(a);var s={xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],show:!1},yAxis:{type:"value",show:!1},grid:{left:"0"},series:[{data:[120,200,150,80,70,110,130],type:"bar",color:"#2f54e8",barWidth:"30%"}]};a["default"]=s},5560:function(t,a,e){"use strict";var s=e("b274"),i=e.n(s);i.a},"6b01":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{ref:"chart",staticStyle:{height:"100%",width:"100%"}})},i=[],n=e("4324"),c=e("1b6a"),r=e("7ae9"),u=e("a549"),l=e("0a8e"),o=e("2389"),h=e.n(o),f=e("3e82"),d=e("f366"),b=function(t){Object(u["a"])(e,t);var a=Object(r["a"])(e);function e(){return Object(n["a"])(this,e),a.apply(this,arguments)}return Object(c["a"])(e,[{key:"initEchart",value:function(){var t=this;this.echart=h.a.init(this.$refs.chart),this.echart.setOption(f["default"]),window.addEventListener("resize",(function(){t.echart.resize()})),setTimeout((function(){t.echart.resize()}),0)}},{key:"mounted",value:function(){this.initEchart()}}]),e}(d["d"]);b=Object(l["a"])([Object(d["a"])({})],b);var v=b,p=v,w=e("e90a"),O=Object(w["a"])(p,s,i,!1,null,null,null);a["default"]=O.exports},b274:function(t,a,e){},bfdd:function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("a-col",{staticClass:"w_menu_card"},[e("div",{staticClass:"w_card_content"},[e("h5",[e("span",[t._v(t._s(t.title))])]),e("a-row",[e("a-col",{attrs:{span:8}},[e("total-item-chart")],1),e("a-col",{staticClass:"statistics-text",attrs:{span:16}},[e("div",{staticClass:"statistics-text-value"},[e("a-icon",{staticClass:"value-rise",attrs:{type:"rise"}}),e("span",{staticClass:"value-label"},[t._v(t._s(t.value))])],1)])],1)],1)])},i=[],n=e("4324"),c=e("7ae9"),r=e("a549"),u=e("0a8e"),l=e("6b01"),o=e("f366"),h=function(t){Object(r["a"])(e,t);var a=Object(c["a"])(e);function e(){return Object(n["a"])(this,e),a.apply(this,arguments)}return e}(o["d"]);h=Object(u["a"])([Object(o["a"])({components:{"total-item-chart":l["default"]},props:{title:String,value:String}})],h);var f=h,d=f,b=(e("5560"),e("e90a")),v=Object(b["a"])(d,s,i,!1,null,"7e4db85a",null);a["default"]=v.exports}}]); -------------------------------------------------------------------------------- /src/store/modules/user.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unused-vars */ 2 | import { loginByUsername, getUserInfo } from '@/api/login' 3 | import { setToken, removeToken } from '@/utils/auth' 4 | import { LoginInfo, UserInfo } from '@/interface/api/login' 5 | import { Commit } from 'vuex' 6 | import { message } from 'ant-design-vue' 7 | import { resetRouter } from '@/router' 8 | export interface State { 9 | user: UserInfo 10 | roles: Array < string > 11 | token: string 12 | } 13 | const user = { 14 | state: { 15 | user: {}, 16 | roles: [], 17 | token: '' 18 | }, 19 | mutations: { 20 | SET_TOKEN(state: State, token: string) { 21 | state.token = token 22 | }, 23 | SET_USER_INFO(state: State, info: UserInfo) { 24 | state.user = info 25 | }, 26 | SET_ROLE(state: State, role: Array) { 27 | state.roles = role 28 | } 29 | }, 30 | actions: { 31 | LoginByUsername(context: { commit: Commit }, userInfo: LoginInfo) { 32 | const email = userInfo.email.trim() 33 | return new Promise((resolve, reject) => { 34 | loginByUsername({ email, password: userInfo.password }).then((response) => { 35 | context.commit('SET_ROLE', []) 36 | context.commit('SET_TOKEN', response.access_token) 37 | setToken(response.access_token) 38 | resolve() 39 | }).catch(error => { 40 | reject(error) 41 | }) 42 | }) 43 | }, 44 | GetUserInfo(context: { commit: Commit }) { 45 | return new Promise((resolve, reject) => { 46 | getUserInfo().then(res => { 47 | context.commit('SET_USER_INFO', res) 48 | context.commit('SET_ROLE', [res.role]) 49 | resolve(res) 50 | }) 51 | .catch(err => { 52 | reject(err) 53 | }) 54 | }) 55 | }, 56 | Logout(context: { commit: Commit }) { 57 | return new Promise((resolve, reject) => { 58 | try { 59 | message.success('退出成功!') 60 | resetRouter() 61 | context.commit('SET_USER_INFO', '') 62 | context.commit('SET_TOKEN', '') 63 | context.commit('SET_ROLE', []) 64 | removeToken() 65 | resolve() 66 | } catch (error) { 67 | reject(error) 68 | } 69 | }) 70 | } 71 | } 72 | } 73 | 74 | export default user 75 | -------------------------------------------------------------------------------- /dist/js/chunk-2458558b.2a69f34f.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2458558b"],{6972:function(e,a,t){"use strict";t.r(a);var i=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("wx-container",{attrs:{"show-bread":""},scopedSlots:e._u([{key:"header",fn:function(){return[t("h2",[e._v("Web Video")]),t("div",[t("a-icon",{staticClass:"header-icon",attrs:{type:"video-camera"}}),e._v(" 阿里云视频点播(ApsaraVideo for VoD)是集音视频采集、编辑、上传、自动化转码处理、媒体资源管理、高效云剪辑处理、分发加速、视频播放于一体的一站式音视频点播解决方案,"),t("br"),e._v("整体服务构建在阿里云强大的基础设施服务之上,提供端到端的视频全链路服务,帮助企业和开发者快速搭建安全、弹性、高可定制的视频点播平台和应用。 "),t("a",{attrs:{href:"https://player.alicdn.com/aliplayer/index.html",target:"view_window"}},[e._v("Aliplayer官网")])],1)]},proxy:!0}])},[t("div",{staticClass:"wx-body"},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.player,expression:"player"}],staticClass:"prism-player",attrs:{id:"player-con"}}),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.player,expression:"!player"}],staticClass:"load_player"},[e._v(" AliyunPlayer正在加载... ")])])])},o=[],n=t("4324"),r=t("1b6a"),s=t("7ae9"),l=t("a549"),c=t("0a8e"),p=t("f366");p["a"].registerHooks(["beforeRouteLeave"]);var d=function(e){Object(l["a"])(t,e);var a=Object(s["a"])(t);function t(){var e;return Object(n["a"])(this,t),e=a.apply(this,arguments),e.player=null,e}return Object(r["a"])(t,[{key:"mounted",value:function(){setTimeout(this.loadPlayer,1e3)}},{key:"loadPlayer",value:function(){var e=window.Aliplayer,a=window.AliPlayerComponent;e&&(this.player=new e({id:"player-con",source:"//player.alicdn.com/video/aliyunmedia.mp4",width:"100%",height:"500px",autoplay:!0,isLive:!1,rePlay:!1,playsinline:!0,preload:!0,controlBarVisibility:"hover",useH5Prism:!0,components:[{name:"StartADComponent",type:a.StartADComponent,args:["https://img.alicdn.com/tfs/TB1byi8afDH8KJjy1XcXXcpdXXa-1920-514.jpg","https://promotion.aliyun.com/ntms/act/videoai.html",3]},{name:"PauseADComponent",type:a.PauseADComponent,args:["https://img.alicdn.com/tfs/TB1byi8afDH8KJjy1XcXXcpdXXa-1920-514.jpg","https://promotion.aliyun.com/ntms/act/videoai.html"]}]}))}},{key:"beforeRouteLeave",value:function(e,a,t){t()}}]),t}(p["d"]);d=Object(c["a"])([p["a"]],d);var u=d,y=u,m=(t("7737"),t("e90a")),v=Object(m["a"])(y,i,o,!1,null,"5169e12f",null);a["default"]=v.exports},7737:function(e,a,t){"use strict";var i=t("bd79"),o=t.n(i);o.a},bd79:function(e,a,t){}}]); -------------------------------------------------------------------------------- /src/views/business/dashboard/analysis/components/line-chart/option.ts: -------------------------------------------------------------------------------- 1 | const option:object = { 2 | title: { 3 | text: 'Front Frame', 4 | subtext: 'Stars(数据纯属虚构)' // 副标题 5 | }, 6 | color: ['#006DF0', '#933EC5', '#65b12d'], 7 | tooltip: { 8 | trigger: 'axis' 9 | }, 10 | grid: { 11 | left: '4%', 12 | right: '2%' 13 | }, 14 | legend: { 15 | data: ['Vue', 'React', 'Angular'] 16 | }, 17 | toolbox: { 18 | show: true, 19 | feature: { 20 | mark: { 21 | show: true 22 | }, 23 | dataView: { 24 | show: true, 25 | readOnly: false 26 | }, 27 | magicType: { 28 | show: true, 29 | type: ['line', 'bar', 'stack', 'tiled'] 30 | }, 31 | restore: { 32 | show: true 33 | }, 34 | saveAsImage: { 35 | show: true 36 | } 37 | } 38 | }, 39 | // calculable : true, 40 | xAxis: [{ 41 | type: 'category', 42 | boundaryGap: false, 43 | data: ['2012', '2013', '2014', '2015', '2016', '2017', '2018'], 44 | axisLine: { 45 | show: false 46 | }, 47 | axisTick: { 48 | show: false 49 | } 50 | }], 51 | yAxis: [{ 52 | type: 'value', 53 | axisLine: { 54 | show: false 55 | }, 56 | axisTick: { 57 | show: false 58 | }, 59 | splitLine: { 60 | lineStyle: { 61 | color: ['#eeeeee'] 62 | } 63 | } 64 | }], 65 | series: [{ 66 | name: 'Vue', 67 | type: 'line', 68 | smooth: true, 69 | symbolSize: 8, 70 | symbol: 'circle', 71 | barWidth: '50%', 72 | data: [140, 242, 221, 154, 260, 830, 710], 73 | lineStyle: { 74 | width: 1 75 | } 76 | }, 77 | { 78 | name: 'React', 79 | type: 'line', 80 | smooth: true, 81 | symbol: 'circle', 82 | symbolSize: 8, 83 | data: [430, 682, 434, 791, 390, 30, 110], 84 | lineStyle: { 85 | width: 1 86 | } 87 | }, 88 | { 89 | name: 'Angular', 90 | type: 'line', 91 | smooth: true, 92 | symbolSize: 8, 93 | symbol: 'circle', 94 | data: [1320, 1132, 601, 234, 120, 590, 820], 95 | lineStyle: { 96 | width: 1 97 | } 98 | } 99 | ] 100 | } 101 | export default option 102 | -------------------------------------------------------------------------------- /src/views/system/components/videos/index.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 81 | 82 | 88 | -------------------------------------------------------------------------------- /src/router/index.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | // import Layout from '../components/Layout/index.vue' 4 | Vue.use(VueRouter) 5 | const getComponent = require(`./import_${process.env.NODE_ENV}`) 6 | 7 | export const constantRoutes = [ 8 | // { 9 | // path: '/', redirect: '/dashboard' 10 | // }, 11 | { 12 | path: '/login', name: 'login', component: getComponent('common/login/index') 13 | }, 14 | { 15 | path: '*', name: '404', component: getComponent('common/error/404.vue') 16 | }, 17 | { 18 | path: '/401', name: '401', component: getComponent('common/error/401.vue') 19 | } 20 | ] 21 | export const asyncRoutes = [ 22 | // { 23 | // path: '/dashboard', 24 | // component: Layout, 25 | // redirect: '/dashboard/analysis', 26 | // name: 'dashboard', 27 | // meta: { title: 'dashboard' }, 28 | // alwaysShow: true, 29 | // children: [ 30 | // { 31 | // path: 'workplace', 32 | // name: 'workplace', 33 | // component: getComponent('business/dashboard/workplace'), 34 | // meta: { title: 'workplace' } 35 | // }, 36 | // { 37 | // path: 'analysis', 38 | // name: 'analysis', 39 | // component: getComponent('business/dashboard/analysis'), 40 | // meta: { title: 'analysis' } 41 | // } 42 | // ] 43 | // }, 44 | // { 45 | // path: '/customer', 46 | // component: Layout, 47 | // redirect: '/customer/list', 48 | // name: 'customer', 49 | // meta: { title: 'customer' }, 50 | // alwaysShow: true, 51 | // children: [ 52 | // { 53 | // path: 'datasheets', 54 | // name: 'customerDatasheets', 55 | // component: getComponent('business/customer'), 56 | // meta: { title: 'datasheets' } 57 | // } 58 | // ] 59 | // } 60 | // { 61 | // path: '/components', 62 | // component: Layout, 63 | // redirect: '/components/echarts', 64 | // name: 'components', 65 | // meta: { title: 'components' }, 66 | // alwaysShow: true, 67 | // children: [ 68 | // { 69 | // path: 'echarts', 70 | // name: 'echarts', 71 | // component: getComponent('system/components/echarts'), 72 | // meta: { title: 'echarts' } 73 | // } 74 | // ] 75 | // } 76 | ] 77 | 78 | const createRouter = () => new VueRouter({ 79 | // mode: 'history', // require service support 80 | scrollBehavior: ():any => ({ y: 0 }), 81 | base: process.env.BASE_URL, 82 | routes: constantRoutes 83 | }) 84 | 85 | const router = createRouter() 86 | 87 | export function resetRouter() { // 清除路由缓存 88 | const newRouter = createRouter(); 89 | (router as any).matcher = (newRouter as any).matcher // reset router 90 | } 91 | // const router = new VueRouter({ 92 | // // mode: 'history', 93 | // base: process.env.BASE_URL, 94 | // routes: constantRoutes 95 | // }) 96 | 97 | export default router 98 | -------------------------------------------------------------------------------- /dist/js/chunk-3e46c4f7.abb3c5d6.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3e46c4f7"],{"0761":function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"login-container"},[t("div",{staticClass:"login-form-container"},[t("a-form",{staticClass:"login-form",attrs:{id:"components-form-demo-normal-login",form:e.form},on:{submit:e.handleSubmit}},[t("a-form-item",[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{rules:[{required:!0,message:"Please input your email!"}]}],expression:"[ 'email', { rules: [{ required: true, message: 'Please input your email!' }] } ]"}],attrs:{placeholder:"email"}},[t("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),t("a-form-item",[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"Please input your Password!"}]}],expression:"[ 'password', { rules: [{ required: true, message: 'Please input your Password!' }] } ]"}],attrs:{type:"password",placeholder:"Password"}},[t("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),t("a-form-item",[t("a-checkbox",{directives:[{name:"decorator",rawName:"v-decorator",value:["remember",{valuePropName:"checked",initialValue:!0}],expression:"[ 'remember', { valuePropName: 'checked', initialValue: true, } ]"}]},[t("span",{staticStyle:{color:"#ffffff"}},[e._v("Remember me")])]),t("a",{staticClass:"login-form-forgot",attrs:{href:""}},[e._v(" Forgot password ")]),t("a-button",{staticClass:"login-form-button",attrs:{type:"primary",loading:e.loading,"html-type":"submit"}},[e._v(" Login ")]),t("span",{staticStyle:{color:"#ffffff"}},[e._v(" Or")]),t("a",{attrs:{href:""}},[e._v(" register now! ")])],1)],1)],1)])},o=[],s=(t("be93"),t("350f")),i=(t("44c0"),t("7aa0")),n=(t("92fc"),t("657a")),c=(t("7dbe"),t("723c")),l=(t("ac58"),t("346d")),u=t("4324"),m=t("1b6a"),f=t("7ae9"),d=t("a549"),p=t("0a8e"),b=t("f366"),v=function(e){Object(d["a"])(t,e);var a=Object(f["a"])(t);function t(){var e;return Object(u["a"])(this,t),e=a.apply(this,arguments),e.loginForm={email:"",password:""},e.loading=!1,e}return Object(m["a"])(t,[{key:"beforeCreate",value:function(){this.form=this.$form.createForm(this)}},{key:"handleSubmit",value:function(e){var a=this;e.preventDefault(),this.form.validateFields((function(e,t){e||(a.loading=!0,a.$store.dispatch("LoginByUsername",t).then((function(){a.loading=!1,a.$message.success("登陆成功"),a.$router.push("/")})).catch((function(){a.loading=!1})))}))}}]),t}(b["d"]);v=Object(p["a"])([Object(b["a"])({components:{"a-form":l["a"],"a-form-item":l["a"].Item,"a-button":c["a"],"a-input":n["a"],"a-icon":i["a"],"a-checkbox":s["a"]}})],v);var g=v,h=g,w=(t("cd2b"),t("e90a")),y=Object(w["a"])(h,r,o,!1,null,"41bc4692",null);a["default"]=y.exports},2553:function(e,a,t){},cd2b:function(e,a,t){"use strict";var r=t("2553"),o=t.n(r);o.a}}]); -------------------------------------------------------------------------------- /dist/js/chunk-3e2d8b8f.60f3307d.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3e2d8b8f"],{"1a8c":function(e,t,a){"use strict";var n=a("91fe"),r=a("407d").map,i=a("b1a1"),o=a("6885"),s=i("map"),l=o("map");n({target:"Array",proto:!0,forced:!s||!l},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},2410:function(e,t,a){var n=a("91fe"),r=a("547a"),i=a("5751");n({target:"Array",proto:!0},{fill:r}),i("fill")},"547a":function(e,t,a){"use strict";var n=a("ee6f"),r=a("0192"),i=a("684e");e.exports=function(e){var t=n(this),a=i(t.length),o=arguments.length,s=r(o>1?arguments[1]:void 0,a),l=o>2?arguments[2]:void 0,c=void 0===l?a:r(l,a);while(c>s)t[s++]=e;return t}},e1b3:function(e,t,a){"use strict";a.r(t);a("2410"),a("1a8c");var n,r=a("2ef9"),i=a("4324"),o=a("1b6a"),s=a("7ae9"),l=a("a549"),c=a("0a8e"),u=a("f366"),d=a("2389"),h=a.n(d);(function(e){e["MoreThanMax"]="#f7c53e",e["BetweenMaxAndMin"]="#3F60EE",e["LessThanMin"]="#FD687D"})(n||(n={}));var p=function(e){Object(l["a"])(a,e);var t=Object(s["a"])(a);function a(){var e;return Object(i["a"])(this,a),e=t.apply(this,arguments),e.charts=null,e}return Object(o["a"])(a,[{key:"complier",value:function(e){if(!e.data.bindDom)throw Error("未发现挂在echart的dom对象");this.charts=h.a.init(e.data.bindDom),this.bindOption(e)}},{key:"bindOption",value:function(e){var t=e.data,a=e.option,n=this.getOption(t);a&&Object.assign(n,a),console.log(n,this.charts),this.charts&&this.charts.setOption(n)}},{key:"getOption",value:function(e){var t=e.maxs,a=e.mins,i=e.stocks;return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(e){var t="";try{t+=(e[0].axisValue||"")+"
",t+=(e[0].marker||"")+"Max:"+(e[1].value[1]||0)+"
",t+=(e[1].marker||"")+"Min:"+(e[1].value[2]||0)+"
",t+=(e[1].marker||"")+"库存:"+(i[e[0].dataIndex]||0)+"
"}catch(a){}return t}},yAxis:{type:"value",name:"库存",max:125*Math.max.apply(Math,Object(r["a"])(t))/100||null},dataZoom:[{type:"slider",show:!0,xAxisIndex:[0],start:1,end:35}],grid:{top:"15%",right:"15%"},series:[{data:i,type:"bar",name:"Daily Stock(Pcs)",lineStyle:{width:2,type:"solid"},symbol:"diamond",symbolSize:20,itemStyle:{color:function(e){var r=t[e.dataIndex],i=a[e.dataIndex];return e.value>r?n.MoreThanMax:e.value 2 |
3 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 26 | 27 | 28 | 29 | 30 | 37 | 38 | 39 | 40 | 41 | 48 | 49 | 52 | Search 53 | 54 | 58 | Clear 59 | 60 |
61 | 66 | 新增 67 | 68 |   69 | 72 | 导出 73 | 74 |
75 |
76 |
77 |
78 |
79 | 80 |
81 | 82 | 103 | 104 | 114 | -------------------------------------------------------------------------------- /src/views/business/dashboard/analysis/index.vue: -------------------------------------------------------------------------------- 1 | 88 | 89 | 104 | 105 | 111 | -------------------------------------------------------------------------------- /src/components/HeaderMenu/Modules.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 79 | 80 | 109 | -------------------------------------------------------------------------------- /src/components/HeaderMenu/Theme.vue: -------------------------------------------------------------------------------- 1 | 47 | 79 | 80 | 112 | -------------------------------------------------------------------------------- /dist/js/chunk-62093f8a.cf28c174.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-62093f8a"],{1198:function(t,e,a){"use strict";var r=a("6936"),n=a.n(r);n.a},"60f2":function(t,e,a){var r=a("d68d"),n=a("4ce0");t.exports=function(t,e,a){var s,c;return n&&"function"==typeof(s=e.constructor)&&s!==a&&r(c=s.prototype)&&c!==a.prototype&&n(t,c),t}},6936:function(t,e,a){},b290:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-col",{staticClass:"w_menu_card",attrs:{xs:24,sm:24,md:12,lg:12,xl:6}},[a("div",{staticClass:"w_card_content"},[a("h5",[a("span",[t._v(t._s(t.title))]),a("span",{staticClass:"w_card_title"},[t._v(t._s(t.subTitle))])]),a("h2",[a("span",[t._v(t._s(t.count))]),a("span",{staticClass:"w_card_remark"},[t._v("stars")])]),a("icon-slider",{attrs:{min:"0",max:t.value}})],1)])},n=[],s=(a("f4a0"),a("4324")),c=a("7ae9"),o=a("a549"),i=a("0a8e"),u=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("span",{staticClass:"w_process_text",style:{color:t.stateColor}},[t._v(t._s(t.max)+"%")]),a("div",{staticClass:"w_process"},[a("div",{staticClass:"w_process_bar",style:[{width:t.max+"%",background:t.stateColor}]})])])},b=[],l=a("1b6a"),f=a("f366"),p=function(t){Object(o["a"])(a,t);var e=Object(c["a"])(a);function a(){return Object(s["a"])(this,a),e.apply(this,arguments)}return Object(l["a"])(a,[{key:"stateColor",get:function(){return this.max>85?"rgb(82, 196, 26)":this.max>60?"rgb(250, 173, 20)":(this.max,"rgb(245, 34, 45)")}}]),a}(f["d"]);Object(i["a"])([Object(f["b"])()],p.prototype,"min",void 0),Object(i["a"])([Object(f["b"])()],p.prototype,"max",void 0),p=Object(i["a"])([f["a"]],p);var d=p,_=d,v=(a("e2b2"),a("e90a")),O=Object(v["a"])(_,u,b,!1,null,"be33a6f4",null),h=O.exports,j=function(t){Object(o["a"])(a,t);var e=Object(c["a"])(a);function a(){return Object(s["a"])(this,a),e.apply(this,arguments)}return a}(f["d"]);Object(i["a"])([Object(f["b"])(String)],j.prototype,"title",void 0),Object(i["a"])([Object(f["b"])(String)],j.prototype,"subTitle",void 0),Object(i["a"])([Object(f["b"])(Number)],j.prototype,"count",void 0),Object(i["a"])([Object(f["b"])(Number)],j.prototype,"value",void 0),j=Object(i["a"])([Object(f["a"])({components:{"icon-slider":h}})],j);var N=j,m=N,I=(a("1198"),Object(v["a"])(m,r,n,!1,null,"385a956b",null));e["default"]=I.exports},dbd3:function(t,e,a){},e2b2:function(t,e,a){"use strict";var r=a("dbd3"),n=a.n(r);n.a},f4a0:function(t,e,a){"use strict";var r=a("7a23"),n=a("d5dc"),s=a("12d9"),c=a("3d8a"),o=a("f28d"),i=a("67ea"),u=a("60f2"),b=a("7dc7"),l=a("f30e"),f=a("641d"),p=a("65af").f,d=a("4aef").f,_=a("c223").f,v=a("03fa").trim,O="Number",h=n[O],j=h.prototype,N=i(f(j))==O,m=function(t){var e,a,r,n,s,c,o,i,u=b(t,!1);if("string"==typeof u&&u.length>2)if(u=v(u),e=u.charCodeAt(0),43===e||45===e){if(a=u.charCodeAt(2),88===a||120===a)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:r=2,n=49;break;case 79:case 111:r=8,n=55;break;default:return+u}for(s=u.slice(2),c=s.length,o=0;on)return NaN;return parseInt(s,r)}return+u};if(s(O,!h(" 0o1")||!h("0b1")||h("+0x1"))){for(var I,y=function(t){var e=arguments.length<1?0:t,a=this;return a instanceof y&&(N?l((function(){j.valueOf.call(a)})):i(a)!=O)?u(new h(m(e)),a,y):m(e)},g=r?p(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;g.length>w;w++)o(h,I=g[w])&&!o(y,I)&&_(y,I,d(h,I));y.prototype=j,j.constructor=y,c(n,O,y)}}}]); -------------------------------------------------------------------------------- /dist/css/chunk-56b14b8d.741813ef.css: -------------------------------------------------------------------------------- 1 | .ant-tag{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";display:inline-block;height:auto;margin-right:8px;padding:0 7px;font-size:12px;line-height:20px;white-space:nowrap;background:#fafafa;border:1px solid #d9d9d9;border-radius:4px;cursor:default;opacity:1;-webkit-transition:all .3s cubic-bezier(.78,.14,.15,.86);transition:all .3s cubic-bezier(.78,.14,.15,.86)}.ant-tag:hover{opacity:.85}.ant-tag,.ant-tag a,.ant-tag a:hover{color:rgba(0,0,0,.65)}.ant-tag>a:first-child:last-child{display:inline-block;margin:0 -8px;padding:0 8px}.ant-tag .anticon-close{display:inline-block;font-size:12px;font-size:10px\9;-webkit-transform:scale(.83333333) rotate(0deg);transform:scale(.83333333) rotate(0deg);margin-left:3px;color:rgba(0,0,0,.45);font-weight:700;cursor:pointer;-webkit-transition:all .3s cubic-bezier(.78,.14,.15,.86);transition:all .3s cubic-bezier(.78,.14,.15,.86)}:root .ant-tag .anticon-close{font-size:12px}.ant-tag .anticon-close:hover{color:rgba(0,0,0,.85)}.ant-tag-has-color{border-color:transparent}.ant-tag-has-color,.ant-tag-has-color .anticon-close,.ant-tag-has-color .anticon-close:hover,.ant-tag-has-color a,.ant-tag-has-color a:hover{color:#fff}.ant-tag-checkable{background-color:transparent;border-color:transparent}.ant-tag-checkable:not(.ant-tag-checkable-checked):hover{color:#1890ff}.ant-tag-checkable-checked,.ant-tag-checkable:active{color:#fff}.ant-tag-checkable-checked{background-color:#1890ff}.ant-tag-checkable:active{background-color:#096dd9}.ant-tag-hidden{display:none}.ant-tag-pink{color:#eb2f96;background:#fff0f6;border-color:#ffadd2}.ant-tag-pink-inverse{color:#fff;background:#eb2f96;border-color:#eb2f96}.ant-tag-magenta{color:#eb2f96;background:#fff0f6;border-color:#ffadd2}.ant-tag-magenta-inverse{color:#fff;background:#eb2f96;border-color:#eb2f96}.ant-tag-red{color:#f5222d;background:#fff1f0;border-color:#ffa39e}.ant-tag-red-inverse{color:#fff;background:#f5222d;border-color:#f5222d}.ant-tag-volcano{color:#fa541c;background:#fff2e8;border-color:#ffbb96}.ant-tag-volcano-inverse{color:#fff;background:#fa541c;border-color:#fa541c}.ant-tag-orange{color:#fa8c16;background:#fff7e6;border-color:#ffd591}.ant-tag-orange-inverse{color:#fff;background:#fa8c16;border-color:#fa8c16}.ant-tag-yellow{color:#fadb14;background:#feffe6;border-color:#fffb8f}.ant-tag-yellow-inverse{color:#fff;background:#fadb14;border-color:#fadb14}.ant-tag-gold{color:#faad14;background:#fffbe6;border-color:#ffe58f}.ant-tag-gold-inverse{color:#fff;background:#faad14;border-color:#faad14}.ant-tag-cyan{color:#13c2c2;background:#e6fffb;border-color:#87e8de}.ant-tag-cyan-inverse{color:#fff;background:#13c2c2;border-color:#13c2c2}.ant-tag-lime{color:#a0d911;background:#fcffe6;border-color:#eaff8f}.ant-tag-lime-inverse{color:#fff;background:#a0d911;border-color:#a0d911}.ant-tag-green{color:#52c41a;background:#f6ffed;border-color:#b7eb8f}.ant-tag-green-inverse{color:#fff;background:#52c41a;border-color:#52c41a}.ant-tag-blue{color:#1890ff;background:#e6f7ff;border-color:#91d5ff}.ant-tag-blue-inverse{color:#fff;background:#1890ff;border-color:#1890ff}.ant-tag-geekblue{color:#2f54eb;background:#f0f5ff;border-color:#adc6ff}.ant-tag-geekblue-inverse{color:#fff;background:#2f54eb;border-color:#2f54eb}.ant-tag-purple{color:#722ed1;background:#f9f0ff;border-color:#d3adf7}.ant-tag-purple-inverse{color:#fff;background:#722ed1;border-color:#722ed1}.ant-advanced-search-form[data-v-7171f938] .ant-form-item{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:0}.ant-advanced-search-form[data-v-7171f938] .ant-form-item-control-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1} -------------------------------------------------------------------------------- /dist/js/chunk-5fdc446c.3af16159.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5fdc446c","chunk-3e2d8b8f"],{"0062":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{ref:"chart",staticStyle:{height:"500px",width:"100%"}})])},r=[],i=a("4324"),o=a("1b6a"),s=a("7ae9"),c=a("a549"),l=a("0a8e"),u=a("f366"),d=a("e1b3"),h=function(t){Object(c["a"])(a,t);var e=Object(s["a"])(a);function a(){return Object(i["a"])(this,a),e.apply(this,arguments)}return Object(o["a"])(a,[{key:"mounted",value:function(){this.complier({data:{bindDom:this.$refs.chart,maxs:[100,300,500,200,500,200],mins:[10,32,21,42,33,22],stocks:[90,222,600,1e3,300,180]},option:{xAxis:{name:"X坐标轴",data:["A","B","C","D","E","F"]}}})}}]),a}(d["default"]);h=Object(l["a"])([u["a"]],h);var p=h,f=p,y=a("e90a"),v=Object(y["a"])(f,n,r,!1,null,"896cb5b2",null);e["default"]=v.exports},"1a8c":function(t,e,a){"use strict";var n=a("91fe"),r=a("407d").map,i=a("b1a1"),o=a("6885"),s=i("map"),c=o("map");n({target:"Array",proto:!0,forced:!s||!c},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},2410:function(t,e,a){var n=a("91fe"),r=a("547a"),i=a("5751");n({target:"Array",proto:!0},{fill:r}),i("fill")},"547a":function(t,e,a){"use strict";var n=a("ee6f"),r=a("0192"),i=a("684e");t.exports=function(t){var e=n(this),a=i(e.length),o=arguments.length,s=r(o>1?arguments[1]:void 0,a),c=o>2?arguments[2]:void 0,l=void 0===c?a:r(c,a);while(l>s)e[s++]=t;return e}},e1b3:function(t,e,a){"use strict";a.r(e);a("2410"),a("1a8c");var n,r=a("2ef9"),i=a("4324"),o=a("1b6a"),s=a("7ae9"),c=a("a549"),l=a("0a8e"),u=a("f366"),d=a("2389"),h=a.n(d);(function(t){t["MoreThanMax"]="#f7c53e",t["BetweenMaxAndMin"]="#3F60EE",t["LessThanMin"]="#FD687D"})(n||(n={}));var p=function(t){Object(c["a"])(a,t);var e=Object(s["a"])(a);function a(){var t;return Object(i["a"])(this,a),t=e.apply(this,arguments),t.charts=null,t}return Object(o["a"])(a,[{key:"complier",value:function(t){if(!t.data.bindDom)throw Error("未发现挂在echart的dom对象");this.charts=h.a.init(t.data.bindDom),this.bindOption(t)}},{key:"bindOption",value:function(t){var e=t.data,a=t.option,n=this.getOption(e);a&&Object.assign(n,a),console.log(n,this.charts),this.charts&&this.charts.setOption(n)}},{key:"getOption",value:function(t){var e=t.maxs,a=t.mins,i=t.stocks;return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(t){var e="";try{e+=(t[0].axisValue||"")+"
",e+=(t[0].marker||"")+"Max:"+(t[1].value[1]||0)+"
",e+=(t[1].marker||"")+"Min:"+(t[1].value[2]||0)+"
",e+=(t[1].marker||"")+"库存:"+(i[t[0].dataIndex]||0)+"
"}catch(a){}return e}},yAxis:{type:"value",name:"库存",max:125*Math.max.apply(Math,Object(r["a"])(e))/100||null},dataZoom:[{type:"slider",show:!0,xAxisIndex:[0],start:1,end:35}],grid:{top:"15%",right:"15%"},series:[{data:i,type:"bar",name:"Daily Stock(Pcs)",lineStyle:{width:2,type:"solid"},symbol:"diamond",symbolSize:20,itemStyle:{color:function(t){var r=e[t.dataIndex],i=a[t.dataIndex];return t.value>r?n.MoreThanMax:t.value 2 | 3 | 12 |
13 | 14 |
15 | 22 | 26 | {{ name }} 27 | 28 | 38 | 55 | 59 | 编辑 60 | 61 | 删除 62 | 63 | 64 | 65 |
66 |
67 |
68 | 69 | 70 | 139 | 140 | 143 | -------------------------------------------------------------------------------- /src/views/common/login/index.vue: -------------------------------------------------------------------------------- 1 | 60 | 61 | 101 | 102 | 135 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | antd-vue-admin
-------------------------------------------------------------------------------- /dist/js/chunk-4bf207b4.7d1d1544.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4bf207b4"],{"4f98":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a-modal",{attrs:{title:e.title,visible:e.visible,"confirm-loading":e.confirmLoading},on:{ok:e.handleFormSubmit,cancel:e.handleCancel}},[i("a-form",{ref:"form",attrs:{form:e.form},on:{submit:e.handleSubmit}},[i("a-form-item",{attrs:{label:"名称","label-col":{span:5},"wrapper-col":{span:16}}},[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"Please input your category name!"}]}],expression:"[\n 'name',\n {rules: [{ required: true, message: 'Please input your category name!' }]}\n ]"}]})],1),i("a-form-item",{attrs:{"label-col":{span:5},"wrapper-col":{span:16},label:"Logo",extra:"请上传png/jpg格式的图片"}},[e.fileBase?i("div",[i("img",{staticStyle:{width:"60px"},attrs:{src:e.fileBase,alt:""}})]):e._e(),i("a-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["logo",{rules:[{required:!0,message:"Please input your category logo!"}]}],expression:"[\n 'logo',\n {rules: [{ required: true, message: 'Please input your category logo!' }]}\n ]"}],attrs:{name:"logo","file-list":e.fileList,remove:e.handleRemove,"before-upload":e.beforeUpload}},[i("a-button",[i("a-icon",{attrs:{type:"upload"}}),e._v(" "+e._s("新增"==e.title?"Click to upload":"Click to Change")+" ")],1)],1)],1)],1)],1)},o=[],r=(i("4045"),i("c1f4"),i("c1b0"),i("c354"),i("4324")),l=i("1b6a"),n=i("7ae9"),s=i("a549"),c=i("0a8e"),f=i("f366"),u=function(e){Object(s["a"])(i,e);var t=Object(n["a"])(i);function i(){var e;return Object(r["a"])(this,i),e=t.apply(this,arguments),e.visible=!1,e.confirmLoading=!1,e.form=null,e.fileList=[],e.fileBase="",e.title="",e.edit=null,e}return Object(l["a"])(i,[{key:"handleCancel",value:function(){this.visible=!1}},{key:"show",value:function(e){var t=this;this.form=this.$form.createForm(this),this.fileBase="",this.visible=!0,this.title="新增",e&&(this.title="编辑",this.edit=e,this.$nextTick((function(){t.fileBase=e.imgUrl,t.form.setFieldsValue({name:e.name,logo:[e.imgUrl]})})))}},{key:"handleFormSubmit",value:function(){var e=this.$refs.form;e.onSubmit()}},{key:"handleSubmit",value:function(e){e&&e.preventDefault(),this.form.validateFields((function(e,t){e||console.log("test")}))}},{key:"isBase64",value:function(e){return-1!==e.indexOf("data:")&&-1!==e.indexOf("base64")}},{key:"normFile",value:function(e){return Array.isArray(e)?e:e&&e.fileList}},{key:"handleRemove",value:function(e){var t=this.fileList.indexOf(e),i=this.fileList.slice();i.splice(t,1),this.fileList=i}},{key:"beforeUpload",value:function(e){var t=this,i=new FileReader,a=21e5;return e&&(i.readAsDataURL(e),i.onload=function(o){0!==a&&av)throw TypeError(h);for(f=s(g,a),u=0;uy-a+i;u--)delete g[u-1]}else if(i>a)for(u=y-a;u>O;u--)d=u+a-1,m=u+i-1,d in g?g[m]=g[d]:delete g[m];for(u=0;u 3 |
4 |
5 | 6 | Vue Admin 7 |
8 | 18 | 32 | 33 |
34 | 35 | 36 | 106 | 107 | 144 | -------------------------------------------------------------------------------- /src/utils/common.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import { message } from 'ant-design-vue' 3 | let lessNodesAppended = false 4 | 5 | /** 6 | * @description event bus 7 | */ 8 | const bus = new Vue() 9 | 10 | /** 11 | * @param {String} primaryColor 12 | * @description 更新主题 13 | */ 14 | const updateTheme = (primaryColor = '#2F54E8') => { 15 | const hideMessage:any = message.loading('正在编译主题!', 0) 16 | function buildIt() { 17 | if (!((window as any).less)) { 18 | return 19 | } 20 | setTimeout(() => { 21 | (window as any).less 22 | .modifyVars({ 23 | '@primary-color': primaryColor 24 | }) 25 | .then(() => { 26 | hideMessage() 27 | }) 28 | .catch(() => { 29 | message.error('Failed to update theme') 30 | hideMessage() 31 | }) 32 | }, 200) 33 | } 34 | if (!lessNodesAppended) { 35 | // insert less.js and color.less 36 | const lessStyleNode = document.createElement('link') 37 | const lessConfigNode = document.createElement('script') 38 | const lessScriptNode = document.createElement('script') 39 | lessStyleNode.setAttribute('rel', 'stylesheet/less') 40 | lessStyleNode.setAttribute('href', '/vue-admin-preview/color.less') 41 | lessConfigNode.innerHTML = ` 42 | window.less = { 43 | async: true, 44 | env: 'production', 45 | javascriptEnabled: true 46 | }; 47 | ` 48 | lessScriptNode.src = 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js' 49 | lessScriptNode.async = true 50 | lessScriptNode.onload = () => { 51 | buildIt() 52 | lessScriptNode.onload = null 53 | } 54 | document.body.appendChild(lessStyleNode) 55 | document.body.appendChild(lessConfigNode) 56 | document.body.appendChild(lessScriptNode) 57 | lessNodesAppended = true 58 | } else { 59 | buildIt() 60 | } 61 | } 62 | 63 | class AliplayerOnline { 64 | id:string 65 | scriptSrc:string = 'https://g.alicdn.com/de/prismplayer/2.8.8/aliplayer-min.js' 66 | linkHref:string= 'https://g.alicdn.com/de/prismplayer/2.8.8/skins/default/aliplayer-min.css' 67 | componentSrc:string = '/aliyun_player_component.js' 68 | constructor(id:string) { 69 | this.id = id 70 | this.init() 71 | } 72 | init() { 73 | console.log('触发') 74 | this.initScript() 75 | this.initLink() 76 | this.initComponent() 77 | } 78 | initScript() { 79 | const aliplayerScript = document.getElementById(this.id + 'script') 80 | if (aliplayerScript) return 81 | const aliplayerNewcript = document.createElement('script') 82 | aliplayerNewcript.type = 'text/javascript' 83 | aliplayerNewcript.src = this.scriptSrc 84 | aliplayerNewcript.async = true 85 | aliplayerNewcript.id = this.id + 'script' 86 | document.body.appendChild(aliplayerNewcript) 87 | } 88 | initComponent() { 89 | const aliplayerComponent = document.getElementById(this.id + 'component') 90 | if (aliplayerComponent) return 91 | const aliplayerNewComponent = document.createElement('script') 92 | aliplayerNewComponent.type = 'text/javascript' 93 | aliplayerNewComponent.src = this.componentSrc 94 | aliplayerNewComponent.async = true 95 | aliplayerNewComponent.id = this.id + 'component' 96 | document.body.appendChild(aliplayerNewComponent) 97 | } 98 | initLink() { 99 | const aliplayerLink = document.getElementById(this.id + 'link') 100 | console.log(aliplayerLink) 101 | if (aliplayerLink) return 102 | const aliplayerNewLink = document.createElement('link') 103 | aliplayerNewLink.href = 'https://g.alicdn.com/de/prismplayer/2.8.8/skins/default/aliplayer-min.css' 104 | aliplayerNewLink.rel = 'stylesheet' 105 | aliplayerNewLink.type = 'text/css' 106 | aliplayerNewLink.id = this.id + 'link' 107 | document.getElementsByTagName('head')[0].appendChild(aliplayerNewLink) 108 | } 109 | remove() { 110 | const aliplayerScript = document.getElementById(this.id + 'script') 111 | const aliplayerComponent = document.getElementById(this.id + 'component') 112 | const aliplayerLink = document.getElementById(this.id + 'link') 113 | aliplayerScript && document.body.removeChild(aliplayerScript as HTMLElement) 114 | aliplayerComponent && document.body.removeChild(aliplayerComponent as HTMLElement) 115 | aliplayerLink && document.getElementsByTagName('head')[0].removeChild(aliplayerLink as HTMLElement) 116 | } 117 | } 118 | export { 119 | bus, 120 | updateTheme, 121 | AliplayerOnline 122 | } 123 | -------------------------------------------------------------------------------- /src/views/business/customer/components/modal.vue: -------------------------------------------------------------------------------- 1 | 2 | 59 | 60 | 148 | 149 | 151 | -------------------------------------------------------------------------------- /dist/js/chunk-3c87aab4.97caf7e8.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3c87aab4","chunk-3e2d8b8f","chunk-5fdc446c"],{"0062":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("div",{ref:"chart",staticStyle:{height:"500px",width:"100%"}})])},r=[],i=e("4324"),o=e("1b6a"),s=e("7ae9"),c=e("a549"),l=e("0a8e"),u=e("f366"),d=e("e1b3"),h=function(t){Object(c["a"])(e,t);var a=Object(s["a"])(e);function e(){return Object(i["a"])(this,e),a.apply(this,arguments)}return Object(o["a"])(e,[{key:"mounted",value:function(){this.complier({data:{bindDom:this.$refs.chart,maxs:[100,300,500,200,500,200],mins:[10,32,21,42,33,22],stocks:[90,222,600,1e3,300,180]},option:{xAxis:{name:"X坐标轴",data:["A","B","C","D","E","F"]}}})}}]),e}(d["default"]);h=Object(l["a"])([u["a"]],h);var b=h,f=b,p=e("e90a"),y=Object(p["a"])(f,n,r,!1,null,"896cb5b2",null);a["default"]=y.exports},"1a8c":function(t,a,e){"use strict";var n=e("91fe"),r=e("407d").map,i=e("b1a1"),o=e("6885"),s=i("map"),c=o("map");n({target:"Array",proto:!0,forced:!s||!c},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},2410:function(t,a,e){var n=e("91fe"),r=e("547a"),i=e("5751");n({target:"Array",proto:!0},{fill:r}),i("fill")},"547a":function(t,a,e){"use strict";var n=e("ee6f"),r=e("0192"),i=e("684e");t.exports=function(t){var a=n(this),e=i(a.length),o=arguments.length,s=r(o>1?arguments[1]:void 0,e),c=o>2?arguments[2]:void 0,l=void 0===c?e:r(c,e);while(l>s)a[s++]=t;return a}},d42c:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("wx-container",{attrs:{"show-bread":""},scopedSlots:t._u([{key:"header",fn:function(){return[e("h2",[t._v("Echarts")]),e("div",[e("a-icon",{staticClass:"header-icon",attrs:{type:"bar-chart"}}),t._v("echarts常用集合 ")],1)]},proxy:!0}])},[e("div",{staticClass:"wx-body"},[e("a-tabs",{attrs:{"default-active-key":"1","tab-position":t.tabPosition}},[e("a-tab-pane",{key:"1",attrs:{tab:"词云chart"}},[e("a-word-cloud")],1),e("a-tab-pane",{key:"2",attrs:{tab:"柱状"}},[e("a-gong-bar")],1),e("a-tab-pane",{key:"3",attrs:{tab:"更多"}},[t._v(" Content of Tab 3 ")])],1)],1)])},r=[],i=e("4324"),o=e("7ae9"),s=e("a549"),c=e("0a8e"),l=e("f366"),u=e("cb19"),d=e("0062"),h=function(t){Object(s["a"])(e,t);var a=Object(o["a"])(e);function e(){var t;return Object(i["a"])(this,e),t=a.apply(this,arguments),t.tabPosition="left",t}return e}(l["d"]);h=Object(c["a"])([Object(l["a"])({components:{"a-word-cloud":u["default"],"a-gong-bar":d["default"]}})],h);var b=h,f=b,p=e("e90a"),y=Object(p["a"])(f,n,r,!1,null,"b0fe04d0",null);a["default"]=y.exports},e1b3:function(t,a,e){"use strict";e.r(a);e("2410"),e("1a8c");var n,r=e("2ef9"),i=e("4324"),o=e("1b6a"),s=e("7ae9"),c=e("a549"),l=e("0a8e"),u=e("f366"),d=e("2389"),h=e.n(d);(function(t){t["MoreThanMax"]="#f7c53e",t["BetweenMaxAndMin"]="#3F60EE",t["LessThanMin"]="#FD687D"})(n||(n={}));var b=function(t){Object(c["a"])(e,t);var a=Object(s["a"])(e);function e(){var t;return Object(i["a"])(this,e),t=a.apply(this,arguments),t.charts=null,t}return Object(o["a"])(e,[{key:"complier",value:function(t){if(!t.data.bindDom)throw Error("未发现挂在echart的dom对象");this.charts=h.a.init(t.data.bindDom),this.bindOption(t)}},{key:"bindOption",value:function(t){var a=t.data,e=t.option,n=this.getOption(a);e&&Object.assign(n,e),console.log(n,this.charts),this.charts&&this.charts.setOption(n)}},{key:"getOption",value:function(t){var a=t.maxs,e=t.mins,i=t.stocks;return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(t){var a="";try{a+=(t[0].axisValue||"")+"
",a+=(t[0].marker||"")+"Max:"+(t[1].value[1]||0)+"
",a+=(t[1].marker||"")+"Min:"+(t[1].value[2]||0)+"
",a+=(t[1].marker||"")+"库存:"+(i[t[0].dataIndex]||0)+"
"}catch(e){}return a}},yAxis:{type:"value",name:"库存",max:125*Math.max.apply(Math,Object(r["a"])(a))/100||null},dataZoom:[{type:"slider",show:!0,xAxisIndex:[0],start:1,end:35}],grid:{top:"15%",right:"15%"},series:[{data:i,type:"bar",name:"Daily Stock(Pcs)",lineStyle:{width:2,type:"solid"},symbol:"diamond",symbolSize:20,itemStyle:{color:function(t){var r=a[t.dataIndex],i=e[t.dataIndex];return t.value>r?n.MoreThanMax:t.value 7 | moduleMenu:Array 8 | activeModuleMenu:Array 9 | activeModule:string 10 | } 11 | 12 | interface ModuleMenu { 13 | name:string, 14 | menus:Array 15 | } 16 | interface ModuleMenuItem{ 17 | path: string 18 | component: any 19 | redirect: string 20 | name: string 21 | meta: { 22 | title:string, 23 | module:string, 24 | roles:Array 25 | }, 26 | alwaysShow: boolean, 27 | children:Array 28 | } 29 | 30 | class FilterPassedRoute { 31 | public route:ModuleMenuItem; 32 | private roles: Array 33 | private moduleName:string 34 | private onlyChangeMetaModule:boolean 35 | 36 | constructor(route:ModuleMenuItem, roles:Array, moduleName:string, onlyChangeMetaModule:boolean) { 37 | this.route = route 38 | this.roles = roles 39 | this.moduleName = moduleName 40 | this.onlyChangeMetaModule = onlyChangeMetaModule 41 | this.handHasModuleName() 42 | this.handHasChildren() 43 | this.handleImportComponent() 44 | } 45 | handHasModuleName() { 46 | const { moduleName, onlyChangeMetaModule, route: { path, redirect }} = this 47 | if (moduleName) { 48 | if (!onlyChangeMetaModule) { 49 | this.route.path = `/${moduleName}${path}` 50 | redirect && (this.route.redirect = `/${moduleName}${redirect}`) 51 | } 52 | this.route.meta.module = moduleName 53 | } 54 | } 55 | 56 | handHasChildren() { 57 | const { moduleName, roles, route: { children }} = this 58 | if (children) { 59 | this.route.children = filterAsyncRoutes(children, roles, moduleName, true) 60 | } 61 | } 62 | 63 | handleImportComponent() { 64 | const { component } = this.route 65 | this.route.component = component === 'Layout' ? Layout : getComponent(component) 66 | } 67 | 68 | get processedRoute() { 69 | return this.route 70 | } 71 | } 72 | function hasPermission(roles: Array, route: ModuleMenuItem) { 73 | if (route.meta && route.meta.roles) { 74 | return roles.some(role => route.meta.roles.includes(role)) 75 | } 76 | return true 77 | } 78 | 79 | /** 80 | * @param routes -全部需要处理路由 81 | * @param roles -登录用户的角色 82 | * @param moduleName -路由对应的模块 83 | * @param onlyChangeMetaModule -路由地址是否要拼接模块名称 一般一级路由需要 子路由不需要添加 84 | * @description -当组件是模板的时候 直接赋值模板文件 其他的根据组件路径去获取,方法最后把符合条件的路由存到vuex 85 | */ 86 | function filterAsyncRoutes(routes: Array, roles: Array, moduleName: string, onlyChangeMetaModule:boolean = false) { 87 | const filterPassRoute: Array = [] 88 | routes.forEach(route => { 89 | const tmp = { ...route } 90 | if (hasPermission(roles, tmp)) { 91 | const passedRoute = new FilterPassedRoute(route, roles, moduleName, onlyChangeMetaModule) 92 | filterPassRoute.push(passedRoute.processedRoute) 93 | } 94 | }) 95 | return filterPassRoute 96 | } 97 | 98 | const permission = { 99 | state: { 100 | addRoutes: [], 101 | moduleMenu, 102 | activeModule: '', 103 | activeModuleMenu: [] 104 | }, 105 | mutations: { 106 | SET_ROUTES: (state: State, routes: Array) => { 107 | state.addRoutes = routes 108 | }, 109 | SET_MODULE_MENU: (state: State, data: { 110 | routes:Array 111 | moduleName:string 112 | }) => { 113 | const { routes, moduleName } = data 114 | state.activeModuleMenu = routes 115 | state.activeModule = moduleName 116 | } 117 | }, 118 | actions: { 119 | GenerateRoutes(context: any, data:{ roles: string }) { 120 | return new Promise(resolve => { 121 | const accessedRoutes: Array = [] 122 | const moduleMenu = context.state.moduleMenu 123 | 124 | moduleMenu.forEach((item: ModuleMenu) => { 125 | const pass = filterAsyncRoutes(item.menus, [data.roles], item.name) 126 | accessedRoutes.push(...pass) 127 | }) 128 | 129 | if (accessedRoutes.length) { 130 | // 设定默认'/'重定向地址 和 默认模块 131 | const { path } = accessedRoutes[0] 132 | // context.dispatch('handleModuleMenu', meta.module) 133 | accessedRoutes.unshift({ path: '/', redirect: path }) 134 | } 135 | 136 | context.commit('SET_ROUTES', accessedRoutes) 137 | resolve(accessedRoutes) 138 | }) 139 | }, 140 | handleModuleMenu(context: any, changedModleName: any) { 141 | return new Promise((resolve, reject) => { 142 | try { 143 | const activeModuleMenus = context.state.addRoutes.filter((item: any) => item.meta && (item.meta.module === changedModleName)) 144 | context.commit('SET_MODULE_MENU', { routes: activeModuleMenus, moduleName: changedModleName }) 145 | resolve() 146 | } catch (error) { 147 | reject() 148 | } 149 | }) 150 | } 151 | } 152 | } 153 | export default permission 154 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # antd-vue-admin typescript_Dev 2 | 3 |

4 | 5 | 6 | 7 |

8 |

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |

25 | 26 | 27 | ## 简介 28 | 29 | [antd-vue-admin](https://github.com/weizhanzhan/antd-vue-admin) 是一个后台管理 spa 页面,它基于 [vue](https://github.com/vuejs/vue) 和 [ant-design-vue](https://github.com/vueComponent/ant-design-vue) 采用了最新的前端技术栈,实现了登录权限验证,动态路由生成(新加入模块,根据模块生成对应模块的菜单信息),参考[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) 和[ant-design-pro-vue](https://github.com/sendya/ant-design-pro-vue),实现更标准化的前端实例模型,根据自己的业务修该对应的路由信息等模块信息,快速搭建后台管理系统模板。此版本是经过Typescript重构,加入一些新功能 30 | 31 | 32 | 33 | >此版本是ts版本 分支typescript_dev,不考虑ts请切换master分支,或者antd-vue-ts分支ts,js代码都有的 34 | 35 | ## TIP 36 | vue3分支是准备Vue3.0 + Typescript重构的分支,欢迎查看😄 37 | 38 | ### 安装 39 | 40 | ``` 41 | # 克隆项目 42 | git clone https://github.com/weizhanzhan/antd-vue-admin.git 43 | 44 | # 进入项目目录 45 | cd antd-vue-admin 46 | 47 | # 安装依赖 48 | npm install 49 | or 50 | yarn 51 | 52 | # 启动服务 53 | npm run serve 54 | ``` 55 | 56 | ### 部署 57 | ``` 58 | npm run build 59 | ``` 60 | 61 | 62 | ### Online 63 | 64 | [在线浏览](http://zhan961023.gitee.io/vue-admin-preview)用户名密码随便输入 65 | >账号375786117@qq.com 密码123456 66 | ![Image text](https://github.com/weizhanzhan/antd-vue-admin/blob/antd-vue-ts/public/demo.gif) 67 | ![Image text](https://github.com/weizhanzhan/antd-vue-admin/blob/typescript_dev/public/temp.gif) 68 | 69 | ### 功能 70 | 71 | ``` 72 | - 登录 / 注销 73 | - 页面 74 | - 模块切换 75 | - dashboard 76 | - sideBar收缩和展开 77 | - 主题换肤 78 | - 中英文切换 79 | 80 | - 侧边栏 81 | - 根据不同用户权限展示相应模块下的动态左侧菜单,模块切换,菜单更换 82 | 83 | - 权限验证 84 | - 管理员页面 85 | - 权限设置 86 | 87 | - 表格操作 88 | - 涉及平常业务遇到的相关表格操作(参考) 89 | 90 | - Echarts 91 | - 滑动显示更多数据 92 | - 动态切换charts 93 | - map地图使用 94 | - video视频播放 AliyunPlayer 95 | - Icons 96 | - 阿里iconfont 97 | - TypeScript(已经加入) 98 | ``` 99 | 100 | ### 顶部加载条 101 | 安装 102 | ``` 103 | yarn add nprogress 104 | yarn add @types/nprogress 105 | ``` 106 | 使用 107 | ```js 108 | router.beforeEach(()=>{ 109 | NProgress.start() 110 | }) 111 | router.afterEach(() => { 112 | NProgress.done() 113 | }) 114 | ``` 115 | 116 | 117 | ### 抽取公共包,引入CDN 118 | ```js 119 | const externals = { 120 | vue: 'Vue', 121 | 'vue-router': 'VueRouter', 122 | vuex: 'Vuex', 123 | axios: 'axios' 124 | } 125 | const cdnMap = { 126 | css: [], 127 | js: [ 128 | '//unpkg.com/vue@2.6.10/dist/vue.min.js', 129 | '//unpkg.com/vue-router@3.0.6/dist/vue-router.min.js', 130 | '//unpkg.com/vuex@3.1.1/dist/vuex.min.js', 131 | '//unpkg.com/axios@0.19.0/dist/axios.min.js' 132 | ] 133 | } 134 | module.exports = { 135 | chainWebpack: config => { 136 | config.externals(externals) 137 | config.plugin('html').tap(args => { 138 | args[0].cdn = cdnMap 139 | args[0].minify && (args[0].minify.minifyCSS = true) // 压缩html中的css 140 | return args 141 | }) 142 | } 143 | } 144 | 145 | ``` 146 | 147 | 然后在index.html里添加 148 | ```html 149 | 150 | <% for (var i in 151 | htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.css) { %> 152 | 153 | 154 | <% } %> 155 | 156 | <% for (var i in 157 | htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %> 158 | 159 | <% } %> 160 | 161 | ``` 162 | 163 | ### 去除console 164 | 保存测试环境和本地开发环境的console 165 | ``` 166 | npm i -D babel-plugin-transform-remove-console 167 | ``` 168 | 在 babel.config.js 中配置 169 | ```js 170 | // 获取 VUE_APP_ENV 非 NODE_ENV,测试环境依然 console 171 | const IS_PROD = ['production', 'prod'].includes(process.env.VUE_APP_ENV) 172 | 173 | const plugins = [ 174 | [ 175 | 'import', 176 | { libraryName: 'ant-design-vue', libraryDirectory: 'es', style: true } 177 | ] 178 | ] 179 | 180 | // 去除 console.log 181 | if (IS_PROD) { 182 | plugins.push('transform-remove-console') 183 | } 184 | 185 | module.exports = { 186 | presets: ['@vue/cli-plugin-babel/preset'], 187 | plugins 188 | } 189 | 190 | 191 | ``` 192 | 193 | # 关于我 194 | ![Image text](https://github.com/weizhanzhan/antd-vue-admin/blob/typescript_dev/public/me.png) 195 | 加我微信,邀你进入技术交流群,交流学习 😄 共同进步
196 | 如果喜欢请给我一个小♥♥ ⭐ (づ ̄3 ̄)づ 197 | 198 | # 感谢 199 | [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
200 | [ant-design-pro-vue](https://github.com/sendya/ant-design-pro-vue)
201 | [vue-h5-template](https://github.com/sunniejs/vue-h5-template) 202 | -------------------------------------------------------------------------------- /src/views/system/components/echarts/components/GongBar.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Component, 3 | Vue 4 | } from 'vue-property-decorator' 5 | import Echart from 'echarts' 6 | 7 | enum SotckTypeColor{ 8 | // eslint-disable-next-line no-unused-vars 9 | MoreThanMax = '#f7c53e', BetweenMaxAndMin = '#3F60EE', LessThanMin = '#FD687D' 10 | } 11 | 12 | interface DataOption{ 13 | maxs:Array 14 | mins:Array 15 | stocks:Array 16 | bindDom:HTMLCanvasElement 17 | } 18 | 19 | interface ComplierParams { 20 | option?:Echart.EChartOption, 21 | data:DataOption 22 | } 23 | 24 | @Component 25 | export default class IninData extends Vue { 26 | charts: Echart.ECharts | null = null 27 | 28 | complier(params:ComplierParams) { 29 | if (!params.data.bindDom) throw Error('未发现挂在echart的dom对象') 30 | this.charts = Echart.init(params.data.bindDom) 31 | this.bindOption(params) 32 | } 33 | bindOption(params:ComplierParams) { 34 | const { data, option } = params 35 | const rootOption = this.getOption(data) 36 | if (option) { 37 | Object.assign(rootOption, option) 38 | } 39 | console.log(rootOption, this.charts) 40 | // @ts-ignore 41 | this.charts && this.charts.setOption(rootOption) 42 | } 43 | getOption(data:DataOption) { 44 | const { 45 | maxs, 46 | mins, 47 | stocks 48 | } = data 49 | return { 50 | tooltip: { 51 | trigger: 'axis', 52 | axisPointer: { // 坐标轴指示器,坐标轴触发有效 53 | type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' 54 | }, 55 | formatter: (p:any) => { 56 | var a = '' 57 | try { 58 | a += (p[0].axisValue || '') + '
' 59 | a += (p[0].marker || '') + 'Max:' + (p[1].value[1] || 0) + '
' 60 | a += (p[1].marker || '') + 'Min:' + (p[1].value[2] || 0) + '
' 61 | a += (p[1].marker || '') + '库存:' + (stocks[p[0].dataIndex] || 0) + '
' 62 | } catch { 63 | 64 | } 65 | return a 66 | } 67 | }, 68 | yAxis: { 69 | type: 'value', 70 | name: '库存', 71 | max: (Math.max(...maxs) * 125 / 100) || null 72 | }, 73 | dataZoom: [{ 74 | type: 'slider', 75 | show: true, 76 | xAxisIndex: [0], 77 | start: 1, 78 | end: 35 79 | }], 80 | grid: { 81 | top: '15%', 82 | right: '15%' 83 | }, 84 | series: [{ 85 | data: stocks, 86 | type: 'bar', 87 | name: 'Daily Stock(Pcs)', 88 | lineStyle: { 89 | 'width': 2, 90 | 'type': 'solid' 91 | }, 92 | symbol: 'diamond', 93 | symbolSize: 20, 94 | itemStyle: { 95 | color: function(params: { 96 | dataIndex: number;value: number 97 | }) { 98 | const currentMaxStock = maxs[params.dataIndex] 99 | const currentMinStock = mins[params.dataIndex] 100 | if (params.value > currentMaxStock) { 101 | return SotckTypeColor.MoreThanMax 102 | } else if (params.value < currentMinStock) { 103 | return SotckTypeColor.LessThanMin 104 | } else return SotckTypeColor.BetweenMaxAndMin 105 | } 106 | } 107 | }, 108 | { 109 | name: 'Stock Max/ Min', 110 | type: 'custom', 111 | itemStyle: { 112 | normal: { 113 | borderWidth: 2 114 | } 115 | }, 116 | 117 | renderItem: (params: any, api: any) => { 118 | const colors = new Array(stocks.length).fill('#FD687D') 119 | var xValue = api.value(0) 120 | var highPoint = api.coord([xValue, api.value(1)]) 121 | var lowPoint = api.coord([xValue, api.value(2)]) 122 | var halfWidth = api.size([1, 0])[0] * 0.3 123 | 124 | var style = api.style({ 125 | stroke: colors[params.dataIndex], 126 | fill: null 127 | }) 128 | 129 | return { 130 | type: 'group', 131 | children: [{ 132 | type: 'line', 133 | shape: { 134 | x1: highPoint[0] - halfWidth, 135 | y1: highPoint[1], 136 | x2: highPoint[0] + halfWidth, 137 | y2: highPoint[1] 138 | }, 139 | style: style 140 | }, { 141 | type: 'line', 142 | shape: { 143 | x1: highPoint[0], 144 | y1: highPoint[1], 145 | x2: lowPoint[0], 146 | y2: lowPoint[1] 147 | }, 148 | style: style 149 | }, { 150 | type: 'line', 151 | shape: { 152 | x1: lowPoint[0] - halfWidth, 153 | y1: lowPoint[1], 154 | x2: lowPoint[0] + halfWidth, 155 | y2: lowPoint[1] 156 | }, 157 | style: style 158 | }] 159 | } 160 | }, 161 | encode: { 162 | x: 0, 163 | y: [1, 2] 164 | }, 165 | 166 | data: this.handleMaxMin(maxs, mins), 167 | zlevel: 2, 168 | z: 2 169 | } 170 | 171 | ] 172 | } 173 | } 174 | handleMaxMin(maxs: Array < number >, mins: Array < number >) { 175 | return mins.map((min, index) => { 176 | return [index, min, maxs[index]] 177 | }) 178 | } 179 | beforeDestroy() { 180 | this.charts && this.charts.dispose() 181 | } 182 | } 183 | -------------------------------------------------------------------------------- /src/views/system/components/echarts/components/word-cloud/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 185 | 186 | 192 | -------------------------------------------------------------------------------- /dist/js/chunk-14d36d2e.bc95addc.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-14d36d2e","chunk-4bf207b4"],{"3a1c":function(e,t,a){"use strict";var i=a("6ac9"),o=a.n(i);o.a},"4f98":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-modal",{attrs:{title:e.title,visible:e.visible,"confirm-loading":e.confirmLoading},on:{ok:e.handleFormSubmit,cancel:e.handleCancel}},[a("a-form",{ref:"form",attrs:{form:e.form},on:{submit:e.handleSubmit}},[a("a-form-item",{attrs:{label:"名称","label-col":{span:5},"wrapper-col":{span:16}}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"Please input your category name!"}]}],expression:"[\n 'name',\n {rules: [{ required: true, message: 'Please input your category name!' }]}\n ]"}]})],1),a("a-form-item",{attrs:{"label-col":{span:5},"wrapper-col":{span:16},label:"Logo",extra:"请上传png/jpg格式的图片"}},[e.fileBase?a("div",[a("img",{staticStyle:{width:"60px"},attrs:{src:e.fileBase,alt:""}})]):e._e(),a("a-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["logo",{rules:[{required:!0,message:"Please input your category logo!"}]}],expression:"[\n 'logo',\n {rules: [{ required: true, message: 'Please input your category logo!' }]}\n ]"}],attrs:{name:"logo","file-list":e.fileList,remove:e.handleRemove,"before-upload":e.beforeUpload}},[a("a-button",[a("a-icon",{attrs:{type:"upload"}}),e._v(" "+e._s("新增"==e.title?"Click to upload":"Click to Change")+" ")],1)],1)],1)],1)],1)},o=[],r=(a("4045"),a("c1f4"),a("c1b0"),a("c354"),a("4324")),l=a("1b6a"),n=a("7ae9"),s=a("a549"),c=a("0a8e"),u=a("f366"),f=function(e){Object(s["a"])(a,e);var t=Object(n["a"])(a);function a(){var e;return Object(r["a"])(this,a),e=t.apply(this,arguments),e.visible=!1,e.confirmLoading=!1,e.form=null,e.fileList=[],e.fileBase="",e.title="",e.edit=null,e}return Object(l["a"])(a,[{key:"handleCancel",value:function(){this.visible=!1}},{key:"show",value:function(e){var t=this;this.form=this.$form.createForm(this),this.fileBase="",this.visible=!0,this.title="新增",e&&(this.title="编辑",this.edit=e,this.$nextTick((function(){t.fileBase=e.imgUrl,t.form.setFieldsValue({name:e.name,logo:[e.imgUrl]})})))}},{key:"handleFormSubmit",value:function(){var e=this.$refs.form;e.onSubmit()}},{key:"handleSubmit",value:function(e){e&&e.preventDefault(),this.form.validateFields((function(e,t){e||console.log("test")}))}},{key:"isBase64",value:function(e){return-1!==e.indexOf("data:")&&-1!==e.indexOf("base64")}},{key:"normFile",value:function(e){return Array.isArray(e)?e:e&&e.fileList}},{key:"handleRemove",value:function(e){var t=this.fileList.indexOf(e),a=this.fileList.slice();a.splice(t,1),this.fileList=a}},{key:"beforeUpload",value:function(e){var t=this,a=new FileReader,i=21e5;return e&&(a.readAsDataURL(e),a.onload=function(o){0!==i&&iv)throw TypeError(h);for(u=s(y,i),f=0;fg-i+a;f--)delete y[f-1]}else if(a>i)for(f=g-i;f>O;f--)d=f+i-1,m=f+a-1,d in y?y[m]=y[d]:delete y[m];for(f=0;f85?"rgb(82, 196, 26)":this.max>60?"rgb(250, 173, 20)":(this.max,"rgb(245, 34, 45)")}}]),a}(f["d"]);Object(o["a"])([Object(f["b"])()],b.prototype,"min",void 0),Object(o["a"])([Object(f["b"])()],b.prototype,"max",void 0),b=Object(o["a"])([f["a"]],b);var h=b,v=h,p=(a("e2b2"),a("e90a")),m=Object(p["a"])(v,l,u,!1,null,"be33a6f4",null),y=m.exports,O=function(t){Object(c["a"])(a,t);var e=Object(n["a"])(a);function a(){return Object(i["a"])(this,a),e.apply(this,arguments)}return a}(f["d"]);Object(o["a"])([Object(f["b"])(String)],O.prototype,"title",void 0),Object(o["a"])([Object(f["b"])(String)],O.prototype,"subTitle",void 0),Object(o["a"])([Object(f["b"])(Number)],O.prototype,"count",void 0),Object(o["a"])([Object(f["b"])(Number)],O.prototype,"value",void 0),O=Object(o["a"])([Object(f["a"])({components:{"icon-slider":y}})],O);var j=O,_=j,w=(a("1198"),Object(p["a"])(_,r,s,!1,null,"385a956b",null));e["default"]=w.exports},bfdd:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-col",{staticClass:"w_menu_card"},[a("div",{staticClass:"w_card_content"},[a("h5",[a("span",[t._v(t._s(t.title))])]),a("a-row",[a("a-col",{attrs:{span:8}},[a("total-item-chart")],1),a("a-col",{staticClass:"statistics-text",attrs:{span:16}},[a("div",{staticClass:"statistics-text-value"},[a("a-icon",{staticClass:"value-rise",attrs:{type:"rise"}}),a("span",{staticClass:"value-label"},[t._v(t._s(t.value))])],1)])],1)],1)])},s=[],i=a("4324"),n=a("7ae9"),c=a("a549"),o=a("0a8e"),l=a("6b01"),u=a("f366"),d=function(t){Object(c["a"])(a,t);var e=Object(n["a"])(a);function a(){return Object(i["a"])(this,a),e.apply(this,arguments)}return a}(u["d"]);d=Object(o["a"])([Object(u["a"])({components:{"total-item-chart":l["default"]},props:{title:String,value:String}})],d);var f=d,b=f,h=(a("5560"),a("e90a")),v=Object(h["a"])(b,r,s,!1,null,"7e4db85a",null);e["default"]=v.exports},dbd3:function(t,e,a){},e2b2:function(t,e,a){"use strict";var r=a("dbd3"),s=a.n(r);s.a},f4a0:function(t,e,a){"use strict";var r=a("7a23"),s=a("d5dc"),i=a("12d9"),n=a("3d8a"),c=a("f28d"),o=a("67ea"),l=a("60f2"),u=a("7dc7"),d=a("f30e"),f=a("641d"),b=a("65af").f,h=a("4aef").f,v=a("c223").f,p=a("03fa").trim,m="Number",y=s[m],O=y.prototype,j=o(f(O))==m,_=function(t){var e,a,r,s,i,n,c,o,l=u(t,!1);if("string"==typeof l&&l.length>2)if(l=p(l),e=l.charCodeAt(0),43===e||45===e){if(a=l.charCodeAt(2),88===a||120===a)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:r=2,s=49;break;case 79:case 111:r=8,s=55;break;default:return+l}for(i=l.slice(2),n=i.length,c=0;cs)return NaN;return parseInt(i,r)}return+l};if(i(m,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var w,x=function(t){var e=arguments.length<1?0:t,a=this;return a instanceof x&&(j?d((function(){O.valueOf.call(a)})):o(a)!=m)?l(new y(_(e)),a,x):_(e)},g=r?b(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;g.length>E;E++)c(y,w=g[E])&&!c(x,w)&&v(x,w,h(y,w));x.prototype=O,O.constructor=x,n(s,m,x)}},fb96:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("wx-container",{attrs:{"show-bread":""},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",[a("h2",[t._v("大数据中心")]),a("a-icon",{staticClass:"header-icon",attrs:{type:"pie-chart",theme:"twoTone","two-tone-color":"#eb2f96"}}),t._v(" 这里是数据分析的一些注释 ")],1)]},proxy:!0}])},[a("div",[a("div",{staticClass:"dashboard"},[a("div",[a("a-row",{attrs:{gutter:16}},[a("menu-card",{attrs:{title:"Vue.js","sub-title":"Evan You",count:141e3,value:20}}),a("menu-card",{attrs:{title:"React.js","sub-title":"Facebook",count:131e3,value:50}}),a("menu-card",{attrs:{title:"Angular.js","sub-title":"Google",count:5e4,value:70}}),a("menu-card",{attrs:{title:"Jquery.js","sub-title":"John Resig",count:51e3,value:90}})],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:24,lg:24,xl:18}},[a("div",{staticClass:"dashboard_chart"},[a("data-sheet")],1)]),a("a-col",{attrs:{xs:24,sm:24,md:24,lg:24,xl:6}},[a("a-row",[a("total-item",{attrs:{title:"Vue Total Visit",value:"20000"}}),a("total-item",{attrs:{title:"React Total Visit",value:"50000"}}),a("total-item",{attrs:{title:"Angular Total Visit",value:"30000"}}),a("total-item",{attrs:{title:"Jquery Total Visit",value:"15000"}})],1)],1)],1)],1)])])},s=[],i=a("4324"),n=a("7ae9"),c=a("a549"),o=a("0a8e"),l=a("f366"),u=a("b290"),d=a("bfdd"),f=a("7d03"),b=function(t){Object(c["a"])(a,t);var e=Object(n["a"])(a);function a(){return Object(i["a"])(this,a),e.apply(this,arguments)}return a}(l["d"]);b=Object(o["a"])([Object(l["a"])({components:{"menu-card":u["default"],"total-item":d["default"],"data-sheet":f["default"]}})],b);var h=b,v=h,p=(a("58c7"),a("e90a")),m=Object(p["a"])(v,r,s,!1,null,"5c55375b",null);e["default"]=m.exports}}]); --------------------------------------------------------------------------------