Commit da8a2bf5 authored by daywrite's avatar daywrite

添加系统设置

parent 835acccf
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
<!-- Sdk --> <!-- Sdk -->
<script src="./static/vupVueSdk.js"></script> <script src="./static/vupVueSdk.js"></script>
<link rel="stylesheet" href="./static/vupVueSdk.css"> <link rel="stylesheet" href="./static/vupVueSdk.css">
<script src="https://code.highcharts.com.cn/highcharts/highcharts.js"></script>
<script src="https://code.highcharts.com.cn/highcharts/highcharts-more.js"></script>
<script src="https://code.highcharts.com.cn/highcharts/modules/solid-gauge.js"></script>
<script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
<script> <script>
(function (){ (function (){
if (window.VupPortalSdk.vueAppDevSdk) { if (window.VupPortalSdk.vueAppDevSdk) {
...@@ -79,6 +83,12 @@ ...@@ -79,6 +83,12 @@
"title": "考勤记录", "title": "考勤记录",
"appName": 'punch', "appName": 'punch',
"url": "/punch" "url": "/punch"
}, {
"icon": "fa-home",
"isRouteShow": 1,
"title": "系统设置",
"appName": 'settings',
"url": "/setting"
}], }],
homePage: { homePage: {
appName: 'reimbursement', appName: 'reimbursement',
......
...@@ -4335,6 +4335,12 @@ ...@@ -4335,6 +4335,12 @@
"integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=",
"dev": true "dev": true
}, },
"highcharts": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/highcharts/-/highcharts-7.1.1.tgz",
"integrity": "sha512-BQtWDQmH4AweQNFLGJCHBQwv9tj9kyp35bp2FFpmNBm7LOecCQdLjvZNgUKvCsKzBzJJIywcwWu4QEcAkPGCjg==",
"dev": true
},
"hmac-drbg": { "hmac-drbg": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "http://registry.npm.taobao.org/hmac-drbg/download/hmac-drbg-1.0.1.tgz", "resolved": "http://registry.npm.taobao.org/hmac-drbg/download/hmac-drbg-1.0.1.tgz",
...@@ -8560,15 +8566,6 @@ ...@@ -8560,15 +8566,6 @@
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
"dev": true "dev": true
}, },
"string_decoder": {
"version": "1.1.1",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz",
"integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=",
"dev": true,
"requires": {
"safe-buffer": "5.1.2"
}
},
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz", "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz",
...@@ -8580,6 +8577,15 @@ ...@@ -8580,6 +8577,15 @@
"strip-ansi": "3.0.1" "strip-ansi": "3.0.1"
} }
}, },
"string_decoder": {
"version": "1.1.1",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz",
"integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=",
"dev": true,
"requires": {
"safe-buffer": "5.1.2"
}
},
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz", "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz",
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
"extract-text-webpack-plugin": "^2.0.0", "extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.11.1", "file-loader": "^0.11.1",
"friendly-errors-webpack-plugin": "^1.1.3", "friendly-errors-webpack-plugin": "^1.1.3",
"highcharts": "^7.1.1",
"html-webpack-plugin": "^2.28.0", "html-webpack-plugin": "^2.28.0",
"http-proxy-middleware": "^0.17.3", "http-proxy-middleware": "^0.17.3",
"inject-loader": "^3.0.0", "inject-loader": "^3.0.0",
......
<template>
<section>
<div class="content">
<search-header
ref="searchHeader"
:title="'系统设置'">
</search-header>
<div class="page-body-content">
<el-alert
title="注意:请不要随便添加、删除、修改【系统设置】里的内容;可能会造成不可挽救的后果。"
type="warning"
show-icon>
</el-alert>
<div class="container">
<div class="container-chart">
<div id="container-speed"></div>
<div id="container-rpm"></div>
</div>
<Group :obj="obj"></Group>
</div>
</div>
</div>
</section>
</template>
<script>
import SearchHeader from '../common/searchHeader'
import Group from './group'
// import H from 'highcharts'
export default {
name: 'settingIndex',
components: {
SearchHeader,
Group
},
data: {
obj: [
{
title: '客户设置'
}
]
},
created () {
},
mounted () {
/* eslint-disable */
Highcharts.setOptions({
chart: {
type: 'solidgauge'
},
title: null,
pane: {
center: ['50%', '85%'],
size: '140%',
startAngle: -90,
endAngle: 90,
background: {
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
innerRadius: '60%',
outerRadius: '100%',
shape: 'arc'
}
},
tooltip: {
enabled: false
},
yAxis: {
stops: [
[0.1, '#55BF3B'], // green
[0.5, '#DDDF0D'], // yellow
[0.9, '#DF5353'] // red
],
lineWidth: 0,
minorTickInterval: null,
tickPixelInterval: 400,
tickWidth: 0,
title: {
y: -70
},
labels: {
y: 16
}
},
plotOptions: {
solidgauge: {
dataLabels: {
y: 5,
borderWidth: 0,
useHTML: true
}
}
}
})
let chart1 = Highcharts.chart('container-speed', {
yAxis: {
min: 0,
max: 200,
title: {
text: '速度'
}
},
credits: {
enabled: false
},
series: [{
name: '速度',
data: [80],
dataLabels: {
format: '<div style="text-align:center"><span style="font-size:25px;color:' +
((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
'<span style="font-size:12px;color:silver">km/h</span></div>'
},
tooltip: {
valueSuffix: ' km/h'
}
}]
})
// 转速仪表
let chart2 = Highcharts.chart('container-rpm', {
yAxis: {
min: 0,
max: 5,
title: {
text: 'RPM'
}
},
series: [{
name: 'RPM',
data: [1],
dataLabels: {
format: '<div style="text-align:center"><span style="font-size:25px;color:' +
((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y:.1f}</span><br/>' +
'<span style="font-size:12px;color:silver">* 1000 / min</span></div>'
},
tooltip: {
valueSuffix: ' revolutions/min'
}
}]
})
// setInterval(function () {
// let point = ''
// let newVal = ''
// let inc = ''
// if (chart1) {
// point = chart1.series[0].points[0]
// inc = Math.round((Math.random() - 0.5) * 100)
// newVal = point.y + inc
// if (newVal < 0 || newVal > 200) {
// newVal = point.y - inc
// }
// point.update(newVal)
// }
// if (chart2) {
// point = chart2.series[0].points[0]
// inc = Math.random() - 0.5
// newVal = point.y + inc
// if (newVal < 0 || newVal > 5) {
// newVal = point.y - inc
// }
// point.update(newVal)
// }
// }, 2000)
}
}
</script>
<style scoped>
.container {
margin-top: 20px;
width:100%;
}
.container-chart {
display: flex;
justify-content:center;
}
.container div {
flex:1;
height: 250px;
}
</style>
<template>
<section class="multiple-check-group">
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-card class="box-card"
:body-style="{ padding: '0px' }">
<div class="el-card__header">
<p class="title title-blue text-center">
客户设置
</p>
</div>
<div class="el-card__content">
<el-button
type="primary"
size="mini">
<i class="fa fa-fw fa-tags"></i>&nbsp;客户性质
</el-button>
</div>
</el-card>
</el-col>
<el-col :span="11">
<el-card class="box-card"
:body-style="{ padding: '0px' }">
<div class="el-card__header">
<p class="title title-blue text-center">
客户设置
</p>
</div>
<div class="el-card__content">
<el-button
type="primary"
size="mini">
<i class="fa fa-commenting"></i>留言
</el-button>
<el-button
type="primary"
size="mini">
<i class="fa fa-commenting"></i>留言
</el-button>
</div>
</el-card>
</el-col>
</el-row>
</section>
</template>
<script>
export default {
name: 'group',
props: {
obj: Array
},
data () {
return {
}
},
methods: {
}
}
</script>
<style>
.multiple-check-group {
margin-top:30px;
}
.multiple-check-group .el-card {
border: 1px solid #333744;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
margin-bottom: 20px;
line-height: 20px;
color:white;
}
.multiple-check-group .el-card .el-card__header {
padding: 10px;
background-color: #333744;
}
.multiple-check-group .el-card .el-card__content {
padding: 20px;
}
</style>
...@@ -10,6 +10,7 @@ import AccountRoute from './routes/account' ...@@ -10,6 +10,7 @@ import AccountRoute from './routes/account'
import ProfileRoute from './routes/profile' import ProfileRoute from './routes/profile'
import ServiceRoute from './routes/service' import ServiceRoute from './routes/service'
import PunchRoute from './routes/punch' import PunchRoute from './routes/punch'
import SettingRoute from './routes/setting'
let routes = [] let routes = []
let reimRoutes = [] let reimRoutes = []
...@@ -21,7 +22,7 @@ let accountRoute = [] ...@@ -21,7 +22,7 @@ let accountRoute = []
let profileRoute = [] let profileRoute = []
let serviceRoute = [] let serviceRoute = []
let punchRoute = [] let punchRoute = []
let settingRoute = []
const appName = 'schedule' const appName = 'schedule'
routes = [].concat(ScheduleRoute) routes = [].concat(ScheduleRoute)
...@@ -34,6 +35,7 @@ accountRoute = [].concat(AccountRoute) ...@@ -34,6 +35,7 @@ accountRoute = [].concat(AccountRoute)
profileRoute = [].concat(ProfileRoute) profileRoute = [].concat(ProfileRoute)
serviceRoute = [].concat(ServiceRoute) serviceRoute = [].concat(ServiceRoute)
punchRoute = [].concat(PunchRoute) punchRoute = [].concat(PunchRoute)
settingRoute = [].concat(SettingRoute)
let RouterInit = () => { let RouterInit = () => {
portal.createApp(appName, {}, app => { portal.createApp(appName, {}, app => {
...@@ -66,6 +68,9 @@ let RouterInit = () => { ...@@ -66,6 +68,9 @@ let RouterInit = () => {
portal.createApp('punch', {}, app => { portal.createApp('punch', {}, app => {
app.mapRoute(punchRoute) app.mapRoute(punchRoute)
}) })
portal.createApp('settings', {}, app => {
app.mapRoute(settingRoute)
})
// portal.createApp('client', {}, app => { // portal.createApp('client', {}, app => {
// app.mapRoute([ // app.mapRoute([
// { // {
......
import SettingIndex from '../components/setting/index'
const routes = [{
path: '/setting',
name: 'settingIndex',
component: SettingIndex
}]
export default routes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment