Skip to content

Commit

Permalink
加入一些现成的components,以及tinymce
Browse files Browse the repository at this point in the history
table新增分页插件。
考勤统计新增两个tab
  • Loading branch information
BoBoooooo committed Jan 17, 2018
1 parent b26bf73 commit 7f74646
Show file tree
Hide file tree
Showing 67 changed files with 11,386 additions and 290 deletions.
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint": "eslint --ext .js,.vue src"
},
"dependencies": {
"axios": "0.16.2",
"axios": "0.17.1",
"echarts": "^3.8.5",
"element-ui": "^2.0.11",
"http-proxy-middleware": "^0.17.3",
Expand All @@ -20,9 +20,18 @@
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"vue": "2.5.2",
"file-saver": "1.3.3",
"font-awesome": "4.7.0",

"screenfull": "3.3.2",
"showdown": "1.8.5",
"simplemde": "1.11.2",
"sortablejs": "1.7.0",
"vue-multiselect": "^2.0.8",
"vue-router": "2.7.0",
"vuex": "2.3.1"
"vue-splitpane": "1.0.2",
"vuedraggable": "2.15.0",
"vue-router": "3.0.1",
"vuex": "3.0.1"
},
"devDependencies": {
"autoprefixer": "6.7.2",
Expand Down
5 changes: 3 additions & 2 deletions src/api/KaoQin/Attendance.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import fetch from '@/utils/fetch'

export function GetAttenListToday(){
export function GetAttenListToday(params){
return fetch({
url: '/Attendance/PullPersonAttenListWithToday',
method: 'post'
method: 'post',
params
})
}

Expand Down
5 changes: 3 additions & 2 deletions src/api/KaoQin/person.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import fetch from '@/utils/fetch'
export function GetUsers(){
export function GetUsers(params){
return fetch({
url: '/Person/pulluserlist',
method: 'post'
method: 'post',
params
})
}

Expand Down
5 changes: 3 additions & 2 deletions src/api/system/role.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import fetch from '@/utils/fetch'
export function GetRoles(){
export function GetRoles(params){
return fetch({
url: '/admin/pullrolelist',
method: 'post'
method: 'post',
params
})
}

Expand Down
5 changes: 3 additions & 2 deletions src/api/system/users.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import fetch from '@/utils/fetch'
export function GetUsers(){
export function GetUsers(params){
return fetch({
url: '/admin/pulluserlist',
method: 'post'
method: 'post',
params
})
}

Expand Down
113 changes: 113 additions & 0 deletions src/components/BackToTop/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<template>
<transition :name="transitionName">
<div class="back-to-ceiling" @click="backToTop" v-show="visible" :style="customStyle">
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" class="Icon Icon--backToTopArrow" aria-hidden="true" style="height: 16px; width: 16px;">
<title>回到顶部</title>
<g>
<path d="M12.036 15.59c0 .55-.453.995-.997.995H5.032c-.55 0-.997-.445-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29c.39-.39 1.026-.385 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" fill-rule="evenodd"></path>
</g>
</svg>
</div>
</transition>
</template>

<script>
export default {
name: 'BackToTop',
props: {
visibilityHeight: {
type: Number,
default: 400
},
backPosition: {
type: Number,
default: 0
},
customStyle: {
type: Object,
default:function() {
return {
right: '50px',
bottom: '50px',
width: '40px',
height: '40px',
'border-radius': '4px',
'line-height': '45px',
background: '#e7eaf1'
}
}
},
transitionName: {
type: String,
default: 'fade'
}
},
data() {
return {
visible: false,
interval: null
}
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll)
if (this.interval) {
clearInterval(this.interval)
}
},
methods: {
handleScroll() {
this.visible = window.pageYOffset > this.visibilityHeight
},
backToTop() {
const start = window.pageYOffset
let i = 0
this.interval = setInterval(() => {
const next = Math.floor(this.easeInOutQuad(10 * i, start, -start, 500))
if (next <= this.backPosition) {
window.scrollTo(0, this.backPosition)
clearInterval(this.interval)
} else {
window.scrollTo(0, next)
}
i++
}, 16.7)
},
easeInOutQuad(t, b, c, d) {
if ((t /= d / 2) < 1) return c / 2 * t * t + b
return -c / 2 * (--t * (t - 2) - 1) + b
}
}
}
</script>

<style scoped>
.back-to-ceiling {
position: fixed;
display: inline-block;
text-align: center;
cursor: pointer;
}
.back-to-ceiling:hover {
background: #d5dbe7;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity .5s;
}
.fade-enter,
.fade-leave-to {
opacity: 0
}
.back-to-ceiling .Icon {
fill: #9aaabf;
background: none;
}
</style>
54 changes: 54 additions & 0 deletions src/components/Breadcrumb/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path" v-if='item.meta.title'>
<span v-if='item.redirect==="noredirect"||index==levelList.length-1' class="no-redirect">{{generateTitle(item.meta.title)}}</span>
<router-link v-else :to="item.redirect||item.path">{{generateTitle(item.meta.title)}}</router-link>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
</template>

<script>
import { generateTitle } from '@/utils/i18n'
export default {
created() {
this.getBreadcrumb()
},
data() {
return {
levelList: null
}
},
watch: {
$route() {
this.getBreadcrumb()
}
},
methods: {
generateTitle,
getBreadcrumb() {
let matched = this.$route.matched.filter(item => item.name)
const first = matched[0]
if (first && first.name !== 'dashboard') {
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched)
}
this.levelList = matched
}
}
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.app-breadcrumb.el-breadcrumb {
display: inline-block;
font-size: 14px;
line-height: 50px;
margin-left: 10px;
.no-redirect {
color: #97a8be;
cursor: text;
}
}
</style>
150 changes: 150 additions & 0 deletions src/components/Charts/keyboard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<template>
<div :class="className" :id="id" :style="{height:height,width:width}"></div>
</template>

<script>
import echarts from 'echarts'
export default {
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '200px'
},
height: {
type: String,
default: '200px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
const xAxisData = []
const data = []
const data2 = []
for (let i = 0; i < 50; i++) {
xAxisData.push(i)
data.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5)
data2.push((Math.sin(i / 5) * (i / 5 + 10) + i / 6) * 3)
}
this.chart.setOption(
{
backgroundColor: '#08263a',
xAxis: [{
show: false,
data: xAxisData
}, {
show: false,
data: xAxisData
}],
visualMap: {
show: false,
min: 0,
max: 50,
dimension: 0,
inRange: {
color: ['#4a657a', '#308e92', '#b1cfa5', '#f5d69f', '#f5898b', '#ef5055']
}
},
yAxis: {
axisLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#4a657a'
}
},
splitLine: {
show: true,
lineStyle: {
color: '#08263f'
}
},
axisTick: {
show: false
}
},
series: [{
name: 'back',
type: 'bar',
data: data2,
z: 1,
itemStyle: {
normal: {
opacity: 0.4,
barBorderRadius: 5,
shadowBlur: 3,
shadowColor: '#111'
}
}
}, {
name: 'Simulate Shadow',
type: 'line',
data,
z: 2,
showSymbol: false,
animationDelay: 0,
animationEasing: 'linear',
animationDuration: 1200,
lineStyle: {
normal: {
color: 'transparent'
}
},
areaStyle: {
normal: {
color: '#08263a',
shadowBlur: 50,
shadowColor: '#000'
}
}
}, {
name: 'front',
type: 'bar',
data,
xAxisIndex: 1,
z: 3,
itemStyle: {
normal: {
barBorderRadius: 5
}
}
}],
animationEasing: 'elasticOut',
animationEasingUpdate: 'elasticOut',
animationDelay(idx) {
return idx * 20
},
animationDelayUpdate(idx) {
return idx * 20
}
})
}
}
}
</script>
Loading

0 comments on commit 7f74646

Please sign in to comment.