update demo url

This commit is contained in:
lin-xin 2017-09-13 20:47:38 +08:00
parent 56b37afd5e
commit 7c90b6f3bd
5 changed files with 323 additions and 323 deletions

View File

@ -1,5 +1,5 @@
# manage-system # # manage-system #
基于Vue.js 2.x系列 + Element UI 的后台管理系统解决方案。[线上地址](http://work.omwteam.com/) 基于Vue.js 2.x系列 + Element UI 的后台管理系统解决方案。[线上地址](http://blog.gdfengshuo.com/example/work/)
[English document](https://github.com/lin-xin/manage-system/blob/master/README_EN.md) [English document](https://github.com/lin-xin/manage-system/blob/master/README_EN.md)

View File

@ -1,310 +1,310 @@
# manage-system # # manage-system #
The web management system solution based on Vue2 and Element-UI。[live demo](http://work.omwteam.com/) The web management system solution based on Vue2 and Element-UI。[live demo](http://blog.gdfengshuo.com/example/work/)
## Preface ## ## Preface ##
The scheme as a set of multi-function background frame templates, suitable for most of the WEB management system development. Convenient development fast simple good components based on Vue2 and Element-UI. Color separation of color style, support manual switch themes, and it is convenient to use a custom theme color. The scheme as a set of multi-function background frame templates, suitable for most of the WEB management system development. Convenient development fast simple good components based on Vue2 and Element-UI. Color separation of color style, support manual switch themes, and it is convenient to use a custom theme color.
## Function ## ## Function ##
- [x] Element-UI - [x] Element-UI
- [x] Login/Logout - [x] Login/Logout
- [x] Table - [x] Table
- [x] From - [x] From
- [x] Chart :bar_chart: - [x] Chart :bar_chart:
- [x] Editor - [x] Editor
- [x] Markdown - [x] Markdown
- [x] Upload pictures by clipping or dragging - [x] Upload pictures by clipping or dragging
- [x] Support manual switch themes :sparkles: - [x] Support manual switch themes :sparkles:
- [x] List drag sort - [x] List drag sort
## Directory structure ## ## Directory structure ##
|-- build // Webpack configuration file |-- build // Webpack configuration file
|-- config // Project package path |-- config // Project package path
|-- src // Source directory |-- src // Source directory
| |-- components // Components | |-- components // Components
| |-- common // Common component | |-- common // Common component
| |-- Header.vue // Header component | |-- Header.vue // Header component
| |-- Home.vue // Home component | |-- Home.vue // Home component
| |-- Sidebar.vue // Sidebar component | |-- Sidebar.vue // Sidebar component
| |-- page // Router page | |-- page // Router page
| |-- BaseCharts.vue // BaseCharts | |-- BaseCharts.vue // BaseCharts
| |-- BaseForm.vue // BaseForm | |-- BaseForm.vue // BaseForm
| |-- BaseTable.vue // BaseTable | |-- BaseTable.vue // BaseTable
| |-- Login.vue // Login | |-- Login.vue // Login
| |-- Markdown.vue // Markdown | |-- Markdown.vue // Markdown
| |-- MixCharts.vue // MixCharts | |-- MixCharts.vue // MixCharts
| |-- Readme.vue // Readme | |-- Readme.vue // Readme
| |-- Upload.vue // Upload | |-- Upload.vue // Upload
| |-- VueEditor.vue // VueEditor | |-- VueEditor.vue // VueEditor
| |-- VueTable.vue // VueTable | |-- VueTable.vue // VueTable
| |-- App.vue // Main component | |-- App.vue // Main component
| |-- main.js // Entry file | |-- main.js // Entry file
|-- .babelrc // ES6 syntax compiler configuration |-- .babelrc // ES6 syntax compiler configuration
|-- .editorconfig // Code specification |-- .editorconfig // Code specification
|-- .gitignore // Ignored file |-- .gitignore // Ignored file
|-- index.html // Entry HTML file |-- index.html // Entry HTML file
|-- package.json // Dependent configuration file |-- package.json // Dependent configuration file
|-- README.md // Readme |-- README.md // Readme
## Installation steps ## ## Installation steps ##
git clone https://github.com/lin-xin/manage-system.git // Clone templates git clone https://github.com/lin-xin/manage-system.git // Clone templates
cd manage-system // Enter template directory cd manage-system // Enter template directory
npm install // Installation dependency npm install // Installation dependency
## Local development ## ## Local development ##
// Open server and access http://localhost:8080 in browser // Open server and access http://localhost:8080 in browser
npm run dev npm run dev
## Constructing production ## ## Constructing production ##
// Constructing project // Constructing project
npm run build npm run build
## Component description and presentation ## ## Component description and presentation ##
### element-ui ### ### element-ui ###
A desktop component library based on vue.js2.0 . Github : [element](http://element.eleme.io/#/zh-CN/component/layout) A desktop component library based on vue.js2.0 . Github : [element](http://element.eleme.io/#/zh-CN/component/layout)
### vue-datasource ### ### vue-datasource ###
A Vue.js server side component to create dynamic tables. Github : [vue-datasource](https://github.com/coderdiaz/vue-datasource) A Vue.js server side component to create dynamic tables. Github : [vue-datasource](https://github.com/coderdiaz/vue-datasource)
```JavaScript ```JavaScript
<template> <template>
<div> <div>
<datasource language="en" :table-data="information.data" <datasource language="en" :table-data="information.data"
:columns="columns" :columns="columns"
:pagination="information.pagination" :pagination="information.pagination"
:actions="actions" :actions="actions"
v-on:change="changePage" v-on:change="changePage"
v-on:searching="onSearch"></datasource> v-on:searching="onSearch"></datasource>
</div> </div>
</template> </template>
<script> <script>
import Datasource from 'vue-datasource'; // import Datasource component import Datasource from 'vue-datasource'; // import Datasource component
export default { export default {
data: function(){ data: function(){
return { return {
information: { information: {
pagination: {...}, // pagination config pagination: {...}, // pagination config
data: [...] data: [...]
}, },
columns: [...], // col config columns: [...], // col config
actions: [...] // function config actions: [...] // function config
} }
}, },
components: { components: {
Datasource Datasource
}, },
methods: { methods: {
changePage(values) {...}, changePage(values) {...},
onSearch(searchQuery) {...} onSearch(searchQuery) {...}
} }
} }
</script> </script>
``` ```
### Vue-Quill-Editor ### ### Vue-Quill-Editor ###
Quill editor component for Vue2. Github : [vue-quill-editor](https://github.com/surmon-china/vue-quill-editor) Quill editor component for Vue2. Github : [vue-quill-editor](https://github.com/surmon-china/vue-quill-editor)
```JavaScript ```JavaScript
<template> <template>
<div> <div>
<quill-editor ref="myTextEditor" v-model="content" :config="editorOption"></quill-editor> <quill-editor ref="myTextEditor" v-model="content" :config="editorOption"></quill-editor>
</div> </div>
</template> </template>
<script> <script>
import { quillEditor } from 'vue-quill-editor'; // import quillEditor component import { quillEditor } from 'vue-quill-editor'; // import quillEditor component
export default { export default {
data: function(){ data: function(){
return { return {
content: '', content: '',
editorOption: { editorOption: {
// something config // something config
} }
} }
}, },
components: { components: {
quillEditor quillEditor
} }
} }
</script> </script>
``` ```
### Vue-SimpleMDE ### ### Vue-SimpleMDE ###
Markdown Editor component for Vue.js. Github : [Vue-SimpleMDE](https://github.com/F-loat/vue-simplemde) Markdown Editor component for Vue.js. Github : [Vue-SimpleMDE](https://github.com/F-loat/vue-simplemde)
```JavaScript ```JavaScript
<template> <template>
<div> <div>
<markdown-editor v-model="content" :configs="configs" ref="markdownEditor"></markdown-editor> <markdown-editor v-model="content" :configs="configs" ref="markdownEditor"></markdown-editor>
</div> </div>
</template> </template>
<script> <script>
import { markdownEditor } from 'vue-simplemde'; import { markdownEditor } from 'vue-simplemde';
export default { export default {
data: function(){ data: function(){
return { return {
content:'', content:'',
configs: { configs: {
status: false, status: false,
initialValue: 'Hello BBK', initialValue: 'Hello BBK',
renderingConfig: { renderingConfig: {
codeSyntaxHighlighting: true, codeSyntaxHighlighting: true,
highlightingTheme: 'atom-one-light' highlightingTheme: 'atom-one-light'
} }
} }
} }
}, },
components: { components: {
markdownEditor markdownEditor
} }
} }
</script> </script>
``` ```
### Vue-Core-Image-Upload ### ### Vue-Core-Image-Upload ###
a vue plugin for image upload and crop. Github : [Vue-Core-Image-Upload](https://github.com/Vanthink-UED/vue-core-image-upload) a vue plugin for image upload and crop. Github : [Vue-Core-Image-Upload](https://github.com/Vanthink-UED/vue-core-image-upload)
```JavaScript ```JavaScript
<template> <template>
<div> <div>
<img :src="src"> <img :src="src">
<vue-core-image-upload :class="['pure-button','pure-button-primary','js-btn-crop']" <vue-core-image-upload :class="['pure-button','pure-button-primary','js-btn-crop']"
:crop="true" :crop="true"
text="上传图片" text="上传图片"
url="" url=""
extensions="png,gif,jpeg,jpg" extensions="png,gif,jpeg,jpg"
@:imageuploaded="imageuploaded"> @:imageuploaded="imageuploaded">
</vue-core-image-upload> </vue-core-image-upload>
</div> </div>
</template> </template>
<script> <script>
import VueCoreImageUpload from 'vue-core-image-upload'; import VueCoreImageUpload from 'vue-core-image-upload';
export default { export default {
data: function(){ data: function(){
return { return {
src:'../img/1.jpg' src:'../img/1.jpg'
} }
}, },
components: { components: {
VueCoreImageUpload VueCoreImageUpload
}, },
methods:{ methods:{
imageuploaded(res) { imageuploaded(res) {
console.log(res) console.log(res)
} }
} }
} }
</script> </script>
``` ```
### vue-schart ### ### vue-schart ###
Vue.js wrapper for sChart.js. Github : [vue-schart](https://github.com/linxin/vue-schart) Vue.js wrapper for sChart.js. Github : [vue-schart](https://github.com/linxin/vue-schart)
```JavaScript ```JavaScript
<template> <template>
<div> <div>
<schart :canvasId="canvasId" <schart :canvasId="canvasId"
:type="type" :type="type"
:width="width" :width="width"
:height="height" :height="height"
:data="data" :data="data"
:options="options" :options="options"
></schart> ></schart>
</div> </div>
</template> </template>
<script> <script>
import Schart from 'vue-schart'; import Schart from 'vue-schart';
export default { export default {
data: function(){ data: function(){
return { return {
canvasId: 'myCanvas', canvasId: 'myCanvas',
type: 'bar', type: 'bar',
width: 500, width: 500,
height: 400, height: 400,
data: [ data: [
{name: '2014', value: 1342}, {name: '2014', value: 1342},
{name: '2015', value: 2123}, {name: '2015', value: 2123},
{name: '2016', value: 1654}, {name: '2016', value: 1654},
{name: '2017', value: 1795}, {name: '2017', value: 1795},
], ],
options: { options: {
title: 'Total sales of stores in recent years' title: 'Total sales of stores in recent years'
} }
} }
}, },
components: { components: {
Schart Schart
} }
} }
</script> </script>
``` ```
## Notice ## ## Notice ##
### 一、If I don't want to use some components, how can I delete it? ### ### 一、If I don't want to use some components, how can I delete it? ###
For example, I don't want to use the vue-datasource component, I need to take four steps. For example, I don't want to use the vue-datasource component, I need to take four steps.
The first step to remove the component of the routing. Enter 'src/router/index.js' and delete the code below. The first step to remove the component of the routing. Enter 'src/router/index.js' and delete the code below.
```JavaScript ```JavaScript
{ {
path: '/vuetable', path: '/vuetable',
component: resolve => require(['../components/page/VueTable.vue'], resolve) component: resolve => require(['../components/page/VueTable.vue'], resolve)
}, },
``` ```
Second,delete the component files. Enter 'src/components/page/' and delete 'VueTable.vue' file. Second,delete the component files. Enter 'src/components/page/' and delete 'VueTable.vue' file.
The third step is to delete the entry. Enter 'src/components/common/Sidebar.vue' and delete the code below. The third step is to delete the entry. Enter 'src/components/common/Sidebar.vue' and delete the code below.
```HTML ```HTML
<el-menu-item index="vuetable">Vue表格组件</el-menu-item> <el-menu-item index="vuetable">Vue表格组件</el-menu-item>
``` ```
Finally, uninstall this component. Finally, uninstall this component.
npm un vue-datasource -S npm un vue-datasource -S
Complete! Complete!
### 二、How to switch themes? ### ### 二、How to switch themes? ###
The first step to enter 'src/main.js' and change into green theme. The first step to enter 'src/main.js' and change into green theme.
```javascript ```javascript
import 'element-ui/lib/theme-default/index.css'; // default theme import 'element-ui/lib/theme-default/index.css'; // default theme
// import '../static/css/theme-green/index.css'; // green theme // import '../static/css/theme-green/index.css'; // green theme
``` ```
The second step to enter 'src/App.vue' and change into green theme. The second step to enter 'src/App.vue' and change into green theme.
```javascript ```javascript
@import "../static/css/main.css"; @import "../static/css/main.css";
@import "../static/css/color-dark.css"; /*深色主题*/ @import "../static/css/color-dark.css"; /*深色主题*/
/*@import "../static/css/theme-green/color-green.css"; !*浅绿色主题*!*/ /*@import "../static/css/theme-green/color-green.css"; !*浅绿色主题*!*/
``` ```
Finally,enter 'src/components/common/Sidebar.vue' and find el-menu Tags,delete 'theme="dark"'。 Finally,enter 'src/components/common/Sidebar.vue' and find el-menu Tags,delete 'theme="dark"'。
## Screenshot ## ## Screenshot ##
### Default theme ### ### Default theme ###
![Image text](https://github.com/lin-xin/manage-system/raw/master/screenshots/wms1.png) ![Image text](https://github.com/lin-xin/manage-system/raw/master/screenshots/wms1.png)
### Green theme ### ### Green theme ###
![Image text](https://github.com/lin-xin/manage-system/raw/master/screenshots/wms2.png) ![Image text](https://github.com/lin-xin/manage-system/raw/master/screenshots/wms2.png)

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>manage-system</title> <title>vue-manage-system | 基于Vue 的后台管理系统</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<meta name="keywords" content="vue.js, wms, vue2, 后台模板, 管理系统, element" /> <meta name="keywords" content="vue.js, wms, vue2, 后台模板, 管理系统, element" />
<meta name="description" content="基于Vue2 + Element UI 的后台管理系统解决方案" /> <meta name="description" content="基于Vue2 + Element UI 的后台管理系统解决方案" />
@ -10,14 +10,14 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<!--<script src="./static/js/vendor.dll.js"></script>--> <!--<script src="./static/js/vendor.dll.js"></script>-->
<script> <!-- <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
var hm = document.createElement("script"); var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?1ad0a5c62a113bb874be8bb514b0a70d"; hm.src = "https://hm.baidu.com/hm.js?1c343a080809502ac823823ae4c9ffe3";
var s = document.getElementsByTagName("script")[0]; var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s); s.parentNode.insertBefore(hm, s);
})(); })();
</script> </script> -->
</body> </body>
</html> </html>

View File

@ -16,9 +16,9 @@
"vue": "^2.3.2", "vue": "^2.3.2",
"vue-core-image-upload": "2.1.11", "vue-core-image-upload": "2.1.11",
"vue-datasource": "1.0.9", "vue-datasource": "1.0.9",
"vue-schart": "^0.1.2",
"vue-quill-editor": "2.1.6", "vue-quill-editor": "2.1.6",
"vue-router": "^2.3.1", "vue-router": "^2.3.1",
"vue-schart": "^0.1.2",
"vue-simplemde": "0.3.8" "vue-simplemde": "0.3.8"
}, },
"devDependencies": { "devDependencies": {

View File

@ -53,15 +53,15 @@
], ],
options1: { options1: {
title: '某商店近年营业总额', title: '某商店近年营业总额',
bgColor: '#829dda', bgColor: '#009688',
titleColor: '#ffffff', titleColor: '#ffffff',
fillColor: '#72f6ff', fillColor: '#e0f2f1',
axisColor: '#eeeeee', axisColor: '#ffffff',
contentColor: '#bbbbbb' contentColor: '#999'
}, },
options2: { options2: {
title: '某商店各商品年度销量', title: '某商店各商品年度销量',
bgColor: '#829dca', bgColor: '#607d8b',
titleColor: '#ffffff', titleColor: '#ffffff',
legendColor: '#ffffff' legendColor: '#ffffff'
} }