├── static
├── .gitkeep
└── che.ico
├── doc
└── 项目环境搭建步骤.doc
├── src
├── assets
│ ├── logo.png
│ ├── images
│ │ ├── card.jpg
│ │ ├── not_found.png
│ │ ├── totalnumber.jpg
│ │ └── downloadcode.png
│ ├── fonts
│ │ ├── iconfont.eot
│ │ ├── iconfont.ttf
│ │ ├── iconfont.woff
│ │ └── iconfont.svg
│ ├── iconfont.css
│ └── css
│ │ └── style.css
├── views
│ ├── workbench
│ │ ├── mySettings.vue
│ │ ├── maillist.vue
│ │ ├── mission
│ │ │ ├── detail.vue
│ │ │ ├── add.vue
│ │ │ └── mission.vue
│ │ ├── dashboard.vue
│ │ └── plan.vue
│ ├── enterprise
│ │ ├── detail.vue
│ │ ├── update.vue
│ │ ├── validate.vue
│ │ ├── add.vue
│ │ └── index.vue
│ ├── customer
│ │ └── index.vue
│ ├── partner
│ │ └── index.vue
│ ├── vehicle
│ │ └── index.vue
│ ├── dept
│ │ └── index.vue
│ ├── home.vue
│ └── login.vue
├── road.js
├── app.vue
├── api
│ ├── env.js
│ ├── api_enterprise.js
│ ├── api_user.js
│ └── index.js
├── common
│ └── util.js
├── components
│ ├── 404.vue
│ └── nav
│ │ └── leftNav.vue
├── store.js
├── main.js
└── router
│ └── index.js
├── config
├── prod.env.js
├── dev.env.js
└── index.js
├── .editorconfig
├── .gitignore
├── .babelrc
├── .postcssrc.js
├── README.md
├── index.html
└── package.json
/static/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/static/che.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/ccproject/HEAD/static/che.ico
--------------------------------------------------------------------------------
/doc/项目环境搭建步骤.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/ccproject/HEAD/doc/项目环境搭建步骤.doc
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/ccproject/HEAD/src/assets/logo.png
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/src/views/workbench/mySettings.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/assets/images/card.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/ccproject/HEAD/src/assets/images/card.jpg
--------------------------------------------------------------------------------
/src/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/ccproject/HEAD/src/assets/fonts/iconfont.eot
--------------------------------------------------------------------------------
/src/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/ccproject/HEAD/src/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/ccproject/HEAD/src/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/src/assets/images/not_found.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/ccproject/HEAD/src/assets/images/not_found.png
--------------------------------------------------------------------------------
/src/assets/images/totalnumber.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/ccproject/HEAD/src/assets/images/totalnumber.jpg
--------------------------------------------------------------------------------
/src/assets/images/downloadcode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yqrong/ccproject/HEAD/src/assets/images/downloadcode.png
--------------------------------------------------------------------------------
/src/road.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/13.
3 | */
4 | import Vue from 'vue'
5 |
6 | export let road = new Vue()
7 |
--------------------------------------------------------------------------------
/src/views/enterprise/detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 详情
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/views/workbench/maillist.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 通讯录
4 |
5 |
6 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/src/app.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/src/api/env.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/13.
3 | * 设置api请求的baseURL
4 | * 实际项目中建议该文件不纳入版本管理
5 | */
6 | export default {
7 | baseURL: 'http://localhost:8090',
8 | isDev: true
9 | }
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | /dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Editor directories and files
9 | .idea
10 | .vscode
11 | *.suo
12 | *.ntvs*
13 | *.njsproj
14 | *.sln
15 | package-lock.json
16 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"]
12 | }
13 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-import": {},
6 | "postcss-url": {},
7 | // to edit target browsers: use "browserslist" field in package.json
8 | "autoprefixer": {}
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/api/api_enterprise.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/13.
3 | */
4 | import * as API from './'
5 |
6 | export default {
7 | //查询列表
8 | findList: params => {
9 | return API.GET('/json', params)
10 | },
11 | findById: id => {
12 | return API.GET(`/api/enterprise/list/${id}`)
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/common/util.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/25.
3 | */
4 | var TEL_REGEXP = /^1([38]\d|5[0-35-9]|7[3678])\d{8}$/;
5 |
6 | export default {
7 | checkTel: {
8 | validateTel: function(tel){
9 | if(TEL_REGEXP.test(tel)){
10 | return true;
11 | }
12 | return false;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/api/api_user.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/13.
3 | */
4 | import * as API from './'
5 |
6 | export default {
7 | //登录
8 | login: params => {
9 | return "success";
10 | //return API.POST('/api/users/login', params)
11 | },
12 | //登出
13 | logout: params => {
14 | return "success";
15 | //return API.GET('/api/users/logout', params)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/views/customer/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 客户查看
4 |
5 |
6 |
20 |
--------------------------------------------------------------------------------
/src/views/partner/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 伙伴查看
4 |
5 |
6 |
20 |
--------------------------------------------------------------------------------
/src/views/vehicle/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 车辆查看
4 |
5 |
6 |
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vvproject
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:8080
12 | npm run dev
13 |
14 | # build for production with minification
15 | npm run build
16 |
17 | # build for production and view the bundle analyzer report
18 | npm run build --report
19 | ```
20 |
21 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
22 | # vvproject
23 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 车车综合管理
8 |
9 |
10 |
11 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/views/enterprise/update.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Start
5 |
6 |
保存
7 |
8 |
9 |
28 |
--------------------------------------------------------------------------------
/src/components/404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |

4 |
您访问的页面不存在...
5 |
6 | 返回首页
7 |
8 |
9 |
10 |
34 |
--------------------------------------------------------------------------------
/src/store.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/3/26.
3 | */
4 | import Vue from 'vue'
5 | import Vuex from 'vuex'
6 |
7 | Vue.use(Vuex)
8 |
9 | /*测试数据*/
10 | const date = 'Mon Mar 24 2018 00:00:00 GMT+0800 (中国标准时间)'
11 | const data = [
12 | {
13 | id: '1111',
14 | name: 'Allen',
15 | type: '员工',
16 | status: '已离职'
17 | },{
18 | id: '2222',
19 | name: 'Thomas',
20 | type: '司机',
21 | status: '在职'
22 | }
23 | ]
24 |
25 | const state = {
26 | collapsed: false,
27 | topNavState: 'home',
28 | leftNavState: 'home'
29 | }
30 |
31 | /*从本地存储读取数据*/
32 | for(var item in state) {
33 | localStorage.getItem(item)? state[item] = JSON.parse(localStorage.getItem(item)): false;
34 | }
35 |
36 | export default new Vuex.Store({
37 | state
38 | })
39 |
--------------------------------------------------------------------------------
/src/assets/iconfont.css:
--------------------------------------------------------------------------------
1 |
2 | @font-face {font-family: "iconfont";
3 | src: url('fonts/iconfont.eot?t=1524894158375'); /* IE9*/
4 | src: url('fonts/iconfont.eot?t=1524894158375#iefix') format('embedded-opentype'), /* IE6-IE8 */
5 | url('fonts/iconfont.woff?t=1524894158375') format('woff'),
6 | url('fonts/iconfont.ttf?t=1524894158375') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7 | url('fonts/iconfont.svg?t=1524894158375#iconfont') format('svg'); /* iOS 4.1- */
8 | }
9 |
10 | .iconfont {
11 | font-family:"iconfont" !important;
12 | font-size:16px;
13 | font-style:normal;
14 | -webkit-font-smoothing: antialiased;
15 | -moz-osx-font-smoothing: grayscale;
16 | }
17 |
18 | .icon-home:before { content: "\e626"; }
19 |
20 | .icon-user:before { content: "\ec52"; }
21 |
22 | .icon-indent:before { content: "\e62b"; }
23 |
24 | .icon-outdent:before { content: "\e62c"; }
25 |
26 | .icon-caret-down:before { content: "\e631"; }
27 |
28 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | // The Vue build version to load with the `import` command
2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3 | import Vue from 'vue'
4 | import App from './App'
5 | import router from './router'
6 | import ElementUI from 'element-ui'
7 |
8 | import store from './store.js'
9 | import 'element-ui/lib/theme-chalk/index.css'
10 | import '@/assets/iconfont.css'
11 | import '@/assets/css/style.css'
12 |
13 | Vue.config.productionTip = false
14 | Vue.use(ElementUI)
15 |
16 | Vue.component('footer-copyright', {
17 | template: ''
18 | });
19 |
20 | Vue.filter('formatDateTime', function (value) {
21 | if (!value) return ''
22 | let date = new Date(value);
23 | let y = date.getFullYear() + '/';
24 | let mon = (date.getMonth() + 1) + '/';
25 | let d = date.getDate();
26 | return y + mon + d;
27 | });
28 |
29 | new Vue({
30 | router,
31 | store,
32 | el: '#app',
33 | render: h => h(App)
34 | })
35 |
--------------------------------------------------------------------------------
/src/views/enterprise/validate.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
企业认证
4 |
5 |
6 |
7 |
8 |
9 |
认证
10 |
11 |
12 |
37 |
66 |
--------------------------------------------------------------------------------
/src/api/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by yqr on 2018/4/13.
3 | */
4 | import Env from './env';
5 | import axios from 'axios'
6 | import {road} from '../road.js'
7 | import routerIndex from '../router/index'
8 |
9 | axios.defaults.withCredentials = false;
10 | // axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
11 | // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';//配置请求头
12 | axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';//配置请求头
13 |
14 | //添加一个请求拦截器
15 | axios.interceptors.request.use(function (config) {
16 | //console.dir(config);
17 | return config;
18 | }, function (error) {
19 | // Do something with request error
20 | return Promise.reject(error);
21 | });
22 |
23 | // 添加一个响应拦截器
24 | axios.interceptors.response.use(function (response) {
25 | if (response.data && response.data.errcode) {
26 | if (parseInt(response.data.errcode) === 40001) {
27 | //未登录
28 | road.$message.error('请重新登录');
29 | routerIndex.push('/login');
30 | }
31 | }
32 | return response;
33 | }, function (error) {
34 | // Do something with response error
35 | return Promise.reject(error);
36 | });
37 |
38 | //基地址
39 | let base = Env.baseURL;
40 |
41 | //测试使用
42 | export const ISDEV = Env.isDev;
43 |
44 | //通用方法
45 | export const POST = (url, params) => {
46 | return axios.post(`${base}${url}`, params).then(res => res.data)
47 | }
48 |
49 | export const GET = (url, params) => {
50 | return axios.get(`${base}${url}`, {params: params}).then(res => res.data)
51 | }
52 |
53 | export const PUT = (url, params) => {
54 | return axios.put(`${base}${url}`, params).then(res => res.data)
55 | }
56 |
57 | export const DELETE = (url, params) => {
58 | return axios.delete(`${base}${url}`, {params: params}).then(res => res.data)
59 | }
60 |
61 | export const PATCH = (url, params) => {
62 | return axios.patch(`${base}${url}`, params).then(res => res.data)
63 | }
64 |
--------------------------------------------------------------------------------
/src/views/dept/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
63 |
--------------------------------------------------------------------------------
/src/views/workbench/mission/detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
任务详情
4 |
5 | - 任务编号:
{{detail.number}}
6 | - 任务类型:
{{detail.type}}
7 | - 任务内容:
{{detail.content | contentFilter}}
8 | - 任务备注:
{{detail.remark}}
9 | - 创建日期:
{{detail.createTime | formatDateTime}}
10 | - 执行日期:
{{detail.activeTime | formatDateTime}}
11 |
12 |
13 |
14 |
58 |
84 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vvproject",
3 | "version": "1.0.0",
4 | "description": "A Vue.js project",
5 | "author": "Lena",
6 | "private": true,
7 | "scripts": {
8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
9 | "start": "npm run dev",
10 | "build": "node build/build.js"
11 | },
12 | "dependencies": {
13 | "axios": "^0.18.0",
14 | "babel-polyfill": "^6.26.0",
15 | "echarts": "^4.0.4",
16 | "element-ui": "^2.4.11",
17 | "vue": "^2.5.2",
18 | "vue-router": "^3.0.1",
19 | "vuex": "^3.0.1"
20 | },
21 | "devDependencies": {
22 | "autoprefixer": "^7.1.2",
23 | "babel-core": "^6.22.1",
24 | "babel-helper-vue-jsx-merge-props": "^2.0.3",
25 | "babel-loader": "^7.1.1",
26 | "babel-plugin-syntax-jsx": "^6.18.0",
27 | "babel-plugin-transform-runtime": "^6.22.0",
28 | "babel-plugin-transform-vue-jsx": "^3.5.0",
29 | "babel-preset-env": "^1.3.2",
30 | "babel-preset-stage-2": "^6.22.0",
31 | "chalk": "^2.0.1",
32 | "copy-webpack-plugin": "^4.0.1",
33 | "css-loader": "^0.28.0",
34 | "extract-text-webpack-plugin": "^3.0.0",
35 | "file-loader": "^1.1.4",
36 | "friendly-errors-webpack-plugin": "^1.6.1",
37 | "html-webpack-plugin": "^2.30.1",
38 | "node-notifier": "^5.1.2",
39 | "node-sass": "^4.9.0",
40 | "optimize-css-assets-webpack-plugin": "^3.2.0",
41 | "ora": "^1.2.0",
42 | "portfinder": "^1.0.13",
43 | "postcss-import": "^11.0.0",
44 | "postcss-loader": "^2.0.8",
45 | "postcss-url": "^7.2.1",
46 | "rimraf": "^2.6.0",
47 | "sass-loader": "^7.0.1",
48 | "semver": "^5.3.0",
49 | "shelljs": "^0.7.6",
50 | "uglifyjs-webpack-plugin": "^1.1.1",
51 | "url-loader": "^0.5.8",
52 | "vue-loader": "^13.3.0",
53 | "vue-style-loader": "^3.0.1",
54 | "vue-template-compiler": "^2.5.2",
55 | "webpack": "^3.6.0",
56 | "webpack-bundle-analyzer": "^2.9.0",
57 | "webpack-dev-server": "^2.9.1",
58 | "webpack-merge": "^4.1.0"
59 | },
60 | "engines": {
61 | "node": ">= 6.0.0",
62 | "npm": ">= 3.0.0"
63 | },
64 | "browserslist": [
65 | "> 1%",
66 | "last 2 versions",
67 | "not ie <= 8"
68 | ]
69 | }
70 |
--------------------------------------------------------------------------------
/src/views/enterprise/add.vue:
--------------------------------------------------------------------------------
1 |
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 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | 保存添加
43 |
44 |
45 |
46 |
47 |
64 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | // Template version: 1.3.1
3 | // see http://vuejs-templates.github.io/webpack for documentation.
4 |
5 | const path = require('path')
6 |
7 | module.exports = {
8 | dev: {
9 |
10 | // Paths
11 | assetsSubDirectory: 'static',
12 | assetsPublicPath: '/',
13 | proxyTable: {
14 | // '/api': {
15 | // target: 'http://localhost:8080',//设置你调用的接口域名和端口号 别忘了加http
16 | // changeOrigin: true,
17 | // pathRewrite: {
18 | // '^/api': ''//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可
19 | // }
20 | // }
21 | },
22 |
23 | // Various Dev Server settings
24 | host: 'localhost', // can be overwritten by process.env.HOST
25 | port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
26 | autoOpenBrowser: false,
27 | errorOverlay: true,
28 | notifyOnErrors: true,
29 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
30 |
31 |
32 | /**
33 | * Source Maps
34 | */
35 |
36 | // https://webpack.js.org/configuration/devtool/#development
37 | devtool: 'cheap-module-eval-source-map',
38 |
39 | // If you have problems debugging vue-files in devtools,
40 | // set this to false - it *may* help
41 | // https://vue-loader.vuejs.org/en/options.html#cachebusting
42 | cacheBusting: true,
43 |
44 | cssSourceMap: true
45 | },
46 |
47 | build: {
48 | // Template for index.html
49 | index: path.resolve(__dirname, '../dist/index.html'),
50 |
51 | // Paths
52 | assetsRoot: path.resolve(__dirname, '../dist'),
53 | assetsSubDirectory: 'static',
54 | assetsPublicPath: './',
55 |
56 | /**
57 | * Source Maps
58 | */
59 |
60 | productionSourceMap: true,
61 | // https://webpack.js.org/configuration/devtool/#production
62 | devtool: '#source-map',
63 |
64 | // Gzip off by default as many popular static hosts such as
65 | // Surge or Netlify already gzip all static assets for you.
66 | // Before setting to `true`, make sure to:
67 | // npm install --save-dev compression-webpack-plugin
68 | productionGzip: false,
69 | productionGzipExtensions: ['js', 'css'],
70 |
71 | // Run the build command with an extra argument to
72 | // View the bundle analyzer report after build finishes:
73 | // `npm run build --report`
74 | // Set to `true` or `false` to always turn it on or off
75 | bundleAnalyzerReport: process.env.npm_config_report
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/views/workbench/mission/add.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | 接乘客
20 | 派车辆
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
37 |
38 |
39 |
71 |
--------------------------------------------------------------------------------
/src/components/nav/leftNav.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
93 |
--------------------------------------------------------------------------------
/src/views/enterprise/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 查询
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
29 |
30 |
38 |
39 |
40 |
41 |
42 |
43 |
120 |
129 |
--------------------------------------------------------------------------------
/src/views/workbench/dashboard.vue:
--------------------------------------------------------------------------------
1 |
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 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
标题
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
91 |
166 |
--------------------------------------------------------------------------------
/src/assets/fonts/iconfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
49 |
--------------------------------------------------------------------------------
/src/views/workbench/plan.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 查询
11 |
12 |
13 | 添加行程
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | {{props.row.id}}
25 |
26 |
27 | {{props.row.name}}
28 |
29 |
30 | {{props.row.content}}
31 |
32 |
33 | {{props.row.startTime}}
34 |
35 |
36 | {{props.row.finishTime}}
37 |
38 |
39 | {{props.row.remark}}
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
138 |
152 |
--------------------------------------------------------------------------------
/src/views/home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |

7 |
8 |
11 |
12 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | {{nickname}}
36 |
37 |
38 | 个人信息
39 |
40 |
41 | 修改密码
42 |
43 | 退出登录
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
141 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 | import LeftNav from '@/components/nav/leftNav.vue'
4 | import Home from '@/views/home.vue'
5 | import Dashboard from '@/views/workbench/dashboard.vue'
6 | import Mission from '@/views/workbench/mission/mission.vue'
7 | import Plan from '@/views/workbench/plan.vue'
8 | import Maillist from '@/views/workbench/maillist.vue'
9 | import EnterpriseList from '@/views/enterprise/index.vue'
10 | import EnterpriseAdd from '@/views/enterprise/add.vue'
11 | import EnterpriseDetail from '@/views/enterprise/detail.vue'
12 | import EnterpriseValidate from '@/views/enterprise/validate.vue'
13 | import VehicleManage from '@/views/vehicle/index.vue'
14 | import DeptManager from '@/views/dept/index.vue'
15 | import NotFound from '@/components/404.vue'
16 |
17 | // 懒加载方式,当路由被访问的时候才加载对应组件
18 | const Login = resolve => require(['@/views/login'], resolve)
19 |
20 | Vue.use(Router)
21 |
22 | let router = new Router({
23 | routes: [
24 | {
25 | path: '/login',
26 | type: 'login',
27 | component: Login
28 | },
29 | {
30 | path: '*',
31 | component: NotFound
32 | },
33 | {
34 | path: '/',
35 | type: 'home', // 根据type区分不同模块(顶部导航)
36 | name: 'home', // 根据name区分不同子模块(左侧导航)
37 | redirect: '/dashboard',
38 | component: Home,
39 | menuShow: true,
40 | children: [
41 | {
42 | path: '/dashboard',
43 | component: LeftNav,
44 | name: 'dashboard', // 当前路由的name
45 | leaf: true, // 只有一个节点
46 | iconCls: 'iconfont icon-home', // 图标样式class
47 | menuShow: true,
48 | children: [
49 | { path: '/dashboard', component: Dashboard, name: '首页', menuShow: true }
50 | ]
51 | },
52 | {
53 | path: '/mySet',
54 | component: LeftNav,
55 | name: '我的设置',
56 | iconCls: 'el-icon-menu',
57 | menuShow: true,
58 | children: [
59 | { path: '/mySet/plan', component: Plan, name: '行程计划', menuShow: true },
60 | { path: '/mySet/mission', component: Mission, name: '我的任务', menuShow: true },
61 | { path: '/mySet/maillist', component: Maillist, name: '通讯录', menuShow: true }
62 | ]
63 | }
64 | ]
65 | },
66 | {
67 | path: '/enterpriseManager',
68 | type: 'enterprise',
69 | name: 'enterprise',
70 | component: Home,
71 | redirect: '/enterprise/list',
72 | menuShow: true,
73 | children: [
74 | {
75 | path: '/enterpriseList',
76 | component: LeftNav,
77 | name: 'enterpriseList',
78 | leaf: true, // 只有一个节点
79 | iconCls: 'iconfont icon-home', // 图标样式class
80 | menuShow: true,
81 | children: [
82 | { path: '/enterprise/list', component: EnterpriseList, name: '企业列表', menuShow: true },
83 | { path: '/enterprise/detail', component: EnterpriseDetail, name: '企业详情', menuShow: false }
84 | ]
85 | },
86 | {
87 | path: '/enterpriseAdd',
88 | component: LeftNav,
89 | name: 'enterpriseAdd',
90 | leaf: true, // 只有一个节点
91 | iconCls: 'el-icon-menu',
92 | menuShow: true,
93 | children: [
94 | { path: '/enterprise/add', component: EnterpriseAdd, name: '企业添加', menuShow: true }
95 | ]
96 | },
97 | {
98 | path: '/enterpriseValidate',
99 | component: LeftNav,
100 | name: 'enterpriseValidate',
101 | leaf: true, // 只有一个节点
102 | iconCls: 'el-icon-menu',
103 | menuShow: true,
104 | children: [
105 | { path: '/enterprise/validate', component: EnterpriseValidate, name: '企业认证', menuShow: true }
106 | ]
107 | }
108 | ]
109 | },
110 | {
111 | path: '/vehicleManager',
112 | type: 'enterprise',
113 | name: 'vehicle',
114 | component: Home,
115 | redirect: '/vehicle/list',
116 | menuShow: true,
117 | children: [
118 | {
119 | path: '/vehicleList',
120 | component: LeftNav,
121 | name: 'vehicleList',
122 | leaf: true, // 只有一个节点
123 | iconCls: 'iconfont icon-home', // 图标样式class
124 | menuShow: true,
125 | children: [
126 | { path: '/vehicle/list', component: VehicleManage, name: '车辆信息', menuShow: true }
127 | ]
128 | }
129 | ]
130 | },
131 | {
132 | path: '/deptManager',
133 | type: 'enterprise',
134 | name: 'dept',
135 | component: Home,
136 | redirect: '/dept/list',
137 | menuShow: true,
138 | children: [
139 | {
140 | path: '/deptList',
141 | component: LeftNav,
142 | name: 'deptList',
143 | leaf: true, // 只有一个节点
144 | iconCls: 'iconfont icon-home', // 图标样式class
145 | menuShow: true,
146 | children: [
147 | { path: '/dept/list', component: DeptManager, name: '部门信息', menuShow: true }
148 | ]
149 | }
150 | ]
151 | }
152 |
153 | ]
154 | });
155 |
156 | router.beforeEach((to, from, next) => {
157 | // console.log('to:' + to.path)
158 | if (to.path.startsWith('/login')) {
159 | window.localStorage.removeItem('access-user')
160 | next()
161 | } else if(to.path.startsWith('/register')){
162 | window.localStorage.removeItem('access-user')
163 | next()
164 | } else {
165 | let user = JSON.parse(window.localStorage.getItem('access-user'))
166 | if (!user) {
167 | next({path: '/login'})
168 | } else {
169 | next()
170 | }
171 | }
172 | });
173 |
174 | export default router
175 |
--------------------------------------------------------------------------------
/src/views/login.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
11 | 欢迎登录
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 | 登录
25 |
26 |
27 |
30 |
31 |
32 |
117 |
184 |
--------------------------------------------------------------------------------
/src/views/workbench/mission/mission.vue:
--------------------------------------------------------------------------------
1 |
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 | 删除
33 |
34 |
35 |
36 |
37 |
38 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
154 |
177 |
--------------------------------------------------------------------------------
/src/assets/css/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | }
5 |
6 | *, :after, :before {
7 | webkit-box-sizing: border-box;
8 | -moz-box-sizing: border-box;
9 | box-sizing: border-box;
10 | }
11 |
12 | html {
13 | font-size: 14px;
14 | }
15 |
16 | @media all and (max-width: 768px) {
17 | html {
18 | font-size: 12px;
19 | }
20 | }
21 |
22 | a {
23 | text-decoration: none;
24 | }
25 |
26 | ul {
27 | list-style: none;
28 | margin-bottom: 0;
29 | }
30 |
31 | #app {
32 | font-family: 'Avenir', Helvetica, Arial, sans-serif;
33 | -webkit-font-smoothing: antialiased;
34 | -moz-osx-font-smoothing: grayscale;
35 | color: #2c3e50;
36 | margin-top: 60px;
37 | }
38 |
39 | .pull-left {
40 | float: left;
41 | }
42 |
43 | .pull-right {
44 | float: right;
45 | }
46 |
47 | .container {
48 | position: absolute;
49 | top: 0px;
50 | bottom: 0px;
51 | width: 100%;
52 | }
53 |
54 | /* top navbar style start */
55 | .container .topbar-wrap {
56 | height: 50px;
57 | line-height: 50px;
58 | background: #373d41;
59 | padding: 0px;
60 | }
61 |
62 | .container .topbar-wrap .topbar-btn {
63 | color: #fff;
64 | }
65 |
66 | .container .topbar-wrap .topbar-logo {
67 | float: left;
68 | width: 60px;
69 | line-height: 26px;
70 | }
71 |
72 | .container .topbar-wrap .topbar-logos {
73 | float: left;
74 | width: 128px;
75 | line-height: 48px;
76 | font-size: 14px;
77 | }
78 |
79 | .container .topbar-wrap .topbar-logo img, .container .topbar-wrap .topbar-logos img {
80 | height: 30px;
81 | margin-top: 12px;
82 | margin-left: 2px;
83 | }
84 |
85 | .container .topbar-wrap .topbar-title {
86 | float: left;
87 | text-align: left;
88 | padding-left: 10px;
89 | border-left: 1px solid #000;
90 | }
91 |
92 | .topbar-title .el-menu--horizontal {
93 | background-color: transparent;
94 | }
95 |
96 | .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item.is-active {
97 | color: #fff;
98 | background-color: transparent;
99 | border-bottom: 2px solid #409EFF !important;
100 | }
101 |
102 | .topbar-title .el-menu--horizontal > .el-menu-item {
103 | height: 50px;
104 | line-height: 50px;
105 | color: #fff;
106 | }
107 |
108 | .el-menu-item .iconfont {
109 | margin-right: 5px;
110 | display: inline-block;
111 | width: 24px;
112 | text-align: center;
113 | font-size: 18px;
114 | vertical-align: middle;
115 | }
116 |
117 | .container .topbar-wrap .topbar-account {
118 | float: right;
119 | padding-right: 12px;
120 | }
121 |
122 | .container .topbar-wrap .topbar-timer {
123 | display: inline-block;
124 | }
125 |
126 | .container .topbar-wrap .topbar-timer span {
127 | display: inline-block;
128 | vertical-align: middle;
129 | }
130 |
131 | .container .topbar-wrap .topbar-timer .login-name {
132 | margin: 0 6px;
133 | font-style: normal;
134 | }
135 |
136 | .container .topbar-wrap .userinfo-inner {
137 | cursor: pointer;
138 | color: #fff;
139 | padding-left: 10px;
140 | }
141 |
142 | .container .topbar-wrap .userinfo-inner img {
143 | margin-left: 6px;
144 | width: 42px;
145 | height: 42px;
146 | border: 1px solid #504d4d;
147 | -webkit-border-radius: 50%;
148 | -moz-border-radius: 50%;
149 | border-radius: 50%;
150 | vertical-align: middle;
151 | }
152 | /* top navbar style end */
153 |
154 | /* left sidebar style start */
155 | .container aside {
156 | min-width: 50px;
157 | background: #333744;
158 | }
159 |
160 | .container aside::-webkit-scrollbar {
161 | display: none;
162 | }
163 |
164 | .container aside .menu-toggle {
165 | background: #4A5064;
166 | text-align: center;
167 | color: white;
168 | height: 26px;
169 | line-height: 30px;
170 | }
171 |
172 | .container aside .menu-toggle .iconfont:hover {
173 | cursor: pointer;
174 | }
175 |
176 | aside .el-menu-item, aside .el-submenu__title {
177 | color: #fff;
178 | text-align: left;
179 | }
180 |
181 | aside .el-menu-item:hover, aside .el-submenu .el-menu-item:hover, aside .el-submenu__title:hover {
182 | background-color: #7ed2df;
183 | }
184 |
185 | aside .el-submenu .el-menu-item {
186 | background-color: #333744;
187 | }
188 |
189 | aside .el-submenu .el-menu-item:hover {
190 | background-color: #4A5064;
191 | }
192 |
193 | aside .el-submenu .el-menu-item.is-active, aside .el-menu-item.is-active,
194 | aside .el-submenu .el-menu-item.is-active:hover, aside .el-menu-item.is-active:hover {
195 | background-color: #00C1DE;
196 | color: #fff;
197 | }
198 |
199 | .container aside.showSidebar {
200 | overflow-x: hidden;
201 | overflow-y: auto;
202 | }
203 |
204 | .container aside .el-menu {
205 | height: 100%; /*写给不支持calc()的浏览器*/
206 | height: calc(100% - 80px);
207 | border-radius: 0px;
208 | background-color: #333744;
209 | border-right: 0px;
210 | }
211 |
212 | .container aside .el-submenu .el-menu-item {
213 | min-width: 60px;
214 | }
215 |
216 | .container aside .el-menu {
217 | width: 189px;
218 | }
219 |
220 | .container aside .el-menu--collapse {
221 | width: 60px;
222 | }
223 |
224 | .container aside .el-menu .el-menu-item, .container aside .el-submenu .el-submenu__title {
225 | height: 46px;
226 | line-height: 46px;
227 | }
228 |
229 | .container aside .el-menu-item:hover, .container aside .el-submenu .el-menu-item:hover, .container aside .el-submenu__title:hover {
230 | background-color: #7ed2df;
231 | }
232 |
233 | /* left sidebar style end */
234 |
235 | .container .main {
236 | display: -ms-flexbox;
237 | display: flex;
238 | position: absolute;
239 | top: 50px;
240 | bottom: 0px;
241 | overflow: hidden;
242 | }
243 |
244 | .container .warp-main {
245 | padding-top: 10px;
246 | padding-bottom: 10px;
247 | }
248 |
249 | .container .content-container {
250 | background: #f2f2f2;
251 | -ms-flex: 1;
252 | flex: 1;
253 | overflow-y: auto;
254 | padding: 10px;
255 | }
256 |
257 | .container .content-container .content-wrapper {
258 | background-color: #fff;
259 | box-sizing: border-box;
260 | }
261 |
262 | .grid-content {
263 | border-radius: 2px;
264 | background-color: #fff;
265 | }
266 |
267 | .grid-content .toolbar {
268 | padding: 10px 10px 0 10px;
269 | }
270 |
271 | .grid-content .el-pagination {
272 | padding: 15px;
273 | text-align: right;
274 | }
275 |
276 | .table-wrapper {
277 | border-top: 1px solid #ebeef5;
278 | }
279 |
280 | /* bottom footer style start */
281 | .footer {
282 | position: fixed;
283 | bottom: 0;
284 | left: 0;
285 | padding: 20px 0;
286 | width: 100%;
287 | background-color: #2d2e2e;
288 | }
289 |
290 | .footer .footer-msg {
291 | max-width: 800px;
292 | margin: 0 auto;
293 | text-align: center;
294 | font-size: 1.08rem;
295 | color: #666;
296 | }
297 |
298 | .footer .footer-msg a {
299 | color: #428bca;
300 | text-decoration: none;
301 | }
302 |
303 | .footer .footer-msg a:hover,
304 | .footer .footer-msg a:focus,
305 | .footer .footer-msg a:active {
306 | color: #2a6496;
307 | text-decoration: underline;
308 | outline: 0;
309 | }
310 | /* bottom footer style end */
311 |
312 | /* scrollbar style start */
313 | ::-webkit-scrollbar {
314 | background: transparent;
315 | width: 10px;
316 | height: 10px
317 | }
318 |
319 | ::-webkit-scrollbar-thumb {
320 | -webkit-border-radius: 5px;
321 | -moz-border-radius: 5px;
322 | border-radius: 5px;
323 | background-color: #e1e1e1;
324 | width: 6px;
325 | height: 6px;
326 | border: 2px solid transparent;
327 | background-clip: content-box
328 | }
329 |
330 | ::-webkit-scrollbar-track {
331 | -webkit-border-radius: 5px;
332 | -moz-border-radius: 5px;
333 | border-radius: 5px;
334 | background-color: #fafafa
335 | }
336 | /* scrollbar style end */
337 |
338 | /* sidebar style start */
339 | .slide-fade-enter-active {
340 | transition: all .3s ease;
341 | }
342 | .slide-fade-leave-active {
343 | transition: all .3s cubic-bezier(1, .5, .8, 1);
344 | }
345 | .slide-fade-enter, .slide-fade-leave-to {
346 | transform: translateX(600px);
347 | }
348 | /* sidebar style end */
349 |
--------------------------------------------------------------------------------