配置页样式,看板基础样式
20
src/App.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App',
|
||||
data () {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
#app
|
||||
width 100%
|
||||
height 100%
|
||||
</style>
|
||||
75
src/components/header.vue
Normal file
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<header>
|
||||
<div class="center_text">晟华大屏监控</div>
|
||||
<div class="tag_block">
|
||||
<div class="tag_left">
|
||||
<!-- <div v-if="index == '0'" class="tag cur_tag">首页</div>
|
||||
<router-link v-else to="/homepage" class="tag">首页</router-link> -->
|
||||
<div v-if="index == '1'" class="tag cur_tag">生产统计</div>
|
||||
<router-link v-else to="/prodcount" class="tag">生产统计</router-link>
|
||||
</div>
|
||||
<div class="tag_right">
|
||||
<div v-if="index == '2'" class="tag cur_tag">仓储监控</div>
|
||||
<router-link v-else to="/storagemonitor" class="tag">仓储监控</router-link>
|
||||
<div v-if="index == '3'" class="tag cur_tag">设备监控</div>
|
||||
<router-link v-else to="/devicemonitor" class="tag">设备监控</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Header',
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
index: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
header
|
||||
_wh(100%, 84px)
|
||||
overflow hidden
|
||||
position relative
|
||||
_bis('../assets/images/top.png',auto, 84px)
|
||||
.center_text
|
||||
_wh(400px, 40px)
|
||||
position absolute
|
||||
_font(36px, 40px, #fff,,center)
|
||||
font-family "阿里妈妈数黑体" !important
|
||||
left 50%
|
||||
top 8px
|
||||
margin-left -200px
|
||||
letter-spacing 6px
|
||||
.tag_block
|
||||
_wh(100%, 100%)
|
||||
_fj(row)
|
||||
padding 25px 15px 0
|
||||
.tag_left
|
||||
_wh(50%, 100%)
|
||||
_fj(row, flex-start)
|
||||
.tag
|
||||
margin-right 20px
|
||||
.tag_right
|
||||
_wh(50%, 100%)
|
||||
_fj(row, flex-end)
|
||||
.tag
|
||||
margin-left 20px
|
||||
.tag
|
||||
display inline-block
|
||||
_wh(132px, 36px)
|
||||
_font(16px, 36px)
|
||||
_bis('../assets/images/tag_1.png')
|
||||
cursor pointer
|
||||
&:hover
|
||||
color #32C5FF
|
||||
_bis('../assets/images/tag_2.png')
|
||||
.cur_tag
|
||||
color #32C5FF
|
||||
_bis('../assets/images/tag_2.png')
|
||||
</style>
|
||||
97
src/components/select.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<div class="select">
|
||||
<div class="select-item pointer" @click="selectOption">
|
||||
<div class="select-item-txt">{{defaultLabel}}</div>
|
||||
<div class="select-item-button"> </div>
|
||||
</div>
|
||||
<ul v-show="active" class="options">
|
||||
<li class="pointer" :class="{'li-active': e.index === index}" v-for="e in option" :key="e.index" @click="change(e)">{{e.label}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SelectOpt',
|
||||
props: {
|
||||
option: Array,
|
||||
index: [Number, String]
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
active: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
defaultLabel () {
|
||||
let val = ''
|
||||
this.option.map(e => {
|
||||
if (e.index === this.index) {
|
||||
val = e.label
|
||||
}
|
||||
})
|
||||
return val
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectOption () {
|
||||
this.active = true
|
||||
},
|
||||
change (e) {
|
||||
this.$emit('change', e.index)
|
||||
this.active = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
.select
|
||||
position relative
|
||||
_wh(100%, inherit)
|
||||
background-color #fff
|
||||
user-select none
|
||||
.select-item
|
||||
width 100%
|
||||
_fj(row)
|
||||
.select-item-txt
|
||||
width calc(100% - 50px)
|
||||
_font(15px, inherit, #999,,left)
|
||||
// padding 0 10px
|
||||
.select-item-button
|
||||
position relative
|
||||
_wh(50px, inherit)
|
||||
vertical-align top
|
||||
&::before
|
||||
content ''
|
||||
width 0
|
||||
height 0
|
||||
border-left 5px solid transparent
|
||||
border-right 5px solid transparent
|
||||
border-top 5px solid #999
|
||||
position absolute
|
||||
right 13px
|
||||
top 17px
|
||||
pointer-events none
|
||||
z-index 3
|
||||
.options
|
||||
position absolute
|
||||
z-index 100000
|
||||
top 44px
|
||||
width 100%
|
||||
padding 10px 0
|
||||
background-color #fff
|
||||
border 1px solid #eee
|
||||
border-radius 5px
|
||||
li
|
||||
width 100%
|
||||
_font(15px, 38px, #999,,left)
|
||||
padding 0 10px
|
||||
user-select none
|
||||
box-sizing border-box
|
||||
&:hover
|
||||
background-color #f5f7fa
|
||||
.li-active
|
||||
color #409eff
|
||||
</style>
|
||||
70
src/components/time.vue
Normal file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<div class="zd-row data_box">
|
||||
<div class="time">{{time}}</div>
|
||||
<div class="date_item">
|
||||
<div class="year">{{year}}</div>
|
||||
<div class="year">{{ date }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Time',
|
||||
data () {
|
||||
return {
|
||||
timer: null,
|
||||
time: '',
|
||||
year: '',
|
||||
date: '',
|
||||
week: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.timer = window.setInterval(this.updateTime, 1000)
|
||||
},
|
||||
methods: {
|
||||
updateTime () {
|
||||
let cd = new Date()
|
||||
let year = cd.getFullYear()
|
||||
let month = cd.getMonth() + 1 < 10 ? '0' + (cd.getMonth() + 1) : cd.getMonth() + 1
|
||||
let date = cd.getDate() < 10 ? '0' + cd.getDate() : cd.getDate()
|
||||
let hh = cd.getHours() < 10 ? '0' + cd.getHours() : cd.getHours()
|
||||
let mm = cd.getMinutes() < 10 ? '0' + cd.getMinutes() : cd.getMinutes()
|
||||
let ss = cd.getSeconds() < 10 ? '0' + cd.getSeconds() : cd.getSeconds()
|
||||
var weekday = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
|
||||
let myddy = new Date().getDay()
|
||||
let week = weekday[myddy]
|
||||
this.time = `${hh}:${mm}:${ss}`
|
||||
this.year = `${year}`
|
||||
this.date = `${month}.${date}`
|
||||
this.week = `${week}`
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
clearInterval(this.timer)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.data_box
|
||||
position absolute
|
||||
right 3%
|
||||
top 16%
|
||||
.time
|
||||
font-size .4rem
|
||||
line-height .3rem
|
||||
font-family: 'YouSheBiaoTiHei';
|
||||
color: #AECAF5;
|
||||
.date_item
|
||||
margin-left .1rem
|
||||
.year
|
||||
font-size: .15rem
|
||||
font-family: 'YouSheBiaoTiHei';
|
||||
color: #AECAF5;
|
||||
line-height .15rem
|
||||
opacity: 0.7;
|
||||
</style>
|
||||
14
src/config/filter.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// import store from '../vuex/store'
|
||||
|
||||
const filter = {
|
||||
numeric (value) {
|
||||
if (value === '') return ''
|
||||
return Number(value).toFixed(3)
|
||||
},
|
||||
numFixed (value, bit) {
|
||||
if (value === '') return ''
|
||||
return Number(value).toFixed(bit)
|
||||
}
|
||||
}
|
||||
|
||||
export default filter
|
||||
3882
src/config/getData2.js
Normal file
65
src/config/http.js
Normal file
@@ -0,0 +1,65 @@
|
||||
import axios from 'axios'
|
||||
import { Dialog } from './mUtils.js'
|
||||
import store from '../vuex/store.js'
|
||||
import router from '@/router'
|
||||
|
||||
axios.defaults.timeout = 50000
|
||||
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
|
||||
|
||||
axios.interceptors.request.use(
|
||||
config => {
|
||||
// let token = ''
|
||||
// if (store.getters.userInfo !== '') {
|
||||
// token = JSON.parse(store.getters.userInfo).token
|
||||
// }
|
||||
// token && (config.headers.Authorization = token)
|
||||
if (config.method === 'post') {
|
||||
if (!config.data.flag) {
|
||||
config.data = config.data
|
||||
} else {
|
||||
config.data = config.data.formData
|
||||
}
|
||||
}
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
Dialog('错误的传参')
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
axios.interceptors.response.use(
|
||||
response => {
|
||||
return Promise.resolve(response)
|
||||
},
|
||||
error => {
|
||||
if (error && error.response) {
|
||||
switch (error.response.status) {
|
||||
case 400:
|
||||
break
|
||||
case 401:
|
||||
// store.dispatch('setSignOut')
|
||||
router.push('/setup')
|
||||
break
|
||||
}
|
||||
return Promise.reject(error.response.data)
|
||||
} else {
|
||||
return Promise.reject(error)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
export const post = (sevmethod, params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.post(`${store.getters.baseUrl}/` + sevmethod, params)
|
||||
.then(response => {
|
||||
resolve(response.data)
|
||||
}, error => {
|
||||
// Dialog(error.message)
|
||||
reject(error.message)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
134
src/config/mUtils.js
Normal file
@@ -0,0 +1,134 @@
|
||||
import store from '../vuex/store'
|
||||
|
||||
/**
|
||||
* 弹出框
|
||||
*/
|
||||
export const Dialog = (str) => {
|
||||
store.dispatch('showAlert', true)
|
||||
store.dispatch('alertMsg', str)
|
||||
// setTimeout(() => {
|
||||
// store.dispatch('showAlert', false)
|
||||
// }, 30000)
|
||||
}
|
||||
|
||||
/**
|
||||
* 提示框
|
||||
*/
|
||||
export const toast = (str) => {
|
||||
store.dispatch('showToast', true)
|
||||
store.dispatch('toastMsg', str)
|
||||
setTimeout(() => {
|
||||
store.dispatch('showToast', false)
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
/**
|
||||
* 存储localStorage
|
||||
*/
|
||||
export const setStore = (name, content) => {
|
||||
if (!name) return
|
||||
if (typeof content !== 'string') {
|
||||
content = JSON.stringify(content)
|
||||
}
|
||||
window.localStorage.setItem(name, content)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取localStorage
|
||||
*/
|
||||
export const getStore = name => {
|
||||
if (!name) return
|
||||
return window.localStorage.getItem(name)
|
||||
}
|
||||
|
||||
/**
|
||||
* 小数加法
|
||||
*/
|
||||
export const accAdd = (arg1, arg2) => {
|
||||
var r1, r2, m, c
|
||||
try {
|
||||
r1 = arg1.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r1 = 0
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r2 = 0
|
||||
}
|
||||
c = Math.abs(r1 - r2)
|
||||
m = Math.pow(10, Math.max(r1, r2))
|
||||
if (c > 0) {
|
||||
var cm = Math.pow(10, c)
|
||||
if (r1 > r2) {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', '')) * cm
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', '')) * cm
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
return (arg1 + arg2) / m
|
||||
}
|
||||
|
||||
/**
|
||||
* 小数减法
|
||||
*/
|
||||
export const accSubtract = (arg1, arg2) => {
|
||||
var r1, r2, m, c
|
||||
try {
|
||||
r1 = arg1.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r1 = 0
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r2 = 0
|
||||
}
|
||||
c = Math.abs(r1 - r2)
|
||||
m = Math.pow(10, Math.max(r1, r2))
|
||||
if (c > 0) {
|
||||
var cm = Math.pow(10, c)
|
||||
if (r1 > r2) {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', '')) * cm
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', '')) * cm
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
return (arg1 - arg2) / m
|
||||
}
|
||||
|
||||
/**
|
||||
* 小数乘法
|
||||
*/
|
||||
export const accMul = (arg1, arg2) => {
|
||||
var m = 0
|
||||
var s1 = arg1.toString()
|
||||
var s2 = arg2.toString()
|
||||
try { m += s1.split('.')[1].length } catch (e) {}
|
||||
try { m += s2.split('.')[1].length } catch (e) {}
|
||||
return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m)
|
||||
}
|
||||
|
||||
/**
|
||||
* 求数组最大值
|
||||
*/
|
||||
export const maxArr = (arr) => {
|
||||
let max = Number(arr[0])
|
||||
let len = arr.length
|
||||
for (let i = 1; i < len; i++) {
|
||||
if (Number(arr[i]) > max) {
|
||||
max = Number(arr[i])
|
||||
}
|
||||
}
|
||||
return max
|
||||
}
|
||||
426
src/config/mork2.js
Normal file
@@ -0,0 +1,426 @@
|
||||
/**
|
||||
* 新版大屏首页左侧报表
|
||||
*/
|
||||
export const homepageDataLeft = () => {
|
||||
let res = {
|
||||
// 当日混料 最多7个元素
|
||||
'todayMix': [
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
'materialName': '物料一',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 17
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
'materialName': '物料二',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 16
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
'materialName': '物料三',
|
||||
// 需生产
|
||||
'plan': 20,
|
||||
// 已生产
|
||||
'real': 16
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
'materialName': '物料四',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 16
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
'materialName': '物料五',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 16
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-31',
|
||||
'materialName': '物料6',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 16
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-32',
|
||||
'materialName': '物料7',
|
||||
// 需生产
|
||||
'plan': 14,
|
||||
// 已生产
|
||||
'real': 16
|
||||
}
|
||||
],
|
||||
// 当日成品 最多7个元素
|
||||
'todaySort': [
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-30',
|
||||
// 需生产
|
||||
'plan': 10,
|
||||
// 已压制
|
||||
'press': 20,
|
||||
// 已完成
|
||||
'real': 30
|
||||
}
|
||||
],
|
||||
// 今日生产
|
||||
'todayProduction': {
|
||||
// 压制
|
||||
'todayPressProduction': {
|
||||
// 已生产
|
||||
'real': 2122,
|
||||
// 计划生产
|
||||
'plan': 8400
|
||||
},
|
||||
// 包装
|
||||
'todaySortProduction': {
|
||||
// 已生产
|
||||
'real': 0,
|
||||
// 计划生产
|
||||
'plan': 0
|
||||
},
|
||||
// 订单完成
|
||||
'orderFulfillmentRate': {
|
||||
// 已生产
|
||||
'real': 2122,
|
||||
// 计划生产
|
||||
'plan': 8400
|
||||
},
|
||||
// 混料
|
||||
'todayMixProduction': {
|
||||
// 已生产
|
||||
'real': 0.0,
|
||||
// 计划生产
|
||||
'plan': 0.0
|
||||
},
|
||||
todayTotalPlan: '80',
|
||||
materialCountSize: '2',
|
||||
sortCompleted: '11',
|
||||
sortCompletedQty: '900',
|
||||
sortMaterialCountSize: '1',
|
||||
fulfillmentRate: '25'
|
||||
// 信息
|
||||
// 'message': '今日共需生产<span>8400</span>块,物料种类2种,已完成包装11托,共900块,1个物料,完成率25%。'
|
||||
},
|
||||
// 历史分析 固定7个元素
|
||||
'history': [
|
||||
{
|
||||
// 日期
|
||||
'date': '12月31日',
|
||||
// 成品
|
||||
'sort': 0,
|
||||
// 压制
|
||||
'press': 1890
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 0,
|
||||
'press': 2640
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 0,
|
||||
'press': 5364
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 720,
|
||||
'press': 4962
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 1584,
|
||||
'press': 1260
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 1872,
|
||||
'press': 2400
|
||||
},
|
||||
{
|
||||
'date': '12月31日',
|
||||
'sort': 576,
|
||||
'press': 630
|
||||
}
|
||||
],
|
||||
// 库存量监控 最多7个元素
|
||||
'inventory': [
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-31',
|
||||
'materialName': '物料一',
|
||||
// 数量
|
||||
'qty': 1
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-32',
|
||||
'materialName': '物料二',
|
||||
// 数量
|
||||
'qty': 2
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-3',
|
||||
'materialName': '物料三',
|
||||
// 数量
|
||||
'qty': 3
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-4',
|
||||
'materialName': '物料四',
|
||||
// 数量
|
||||
'qty': 4
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-5',
|
||||
'materialName': '物料五',
|
||||
// 数量
|
||||
'qty': 5
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-6',
|
||||
'materialName': '物料6',
|
||||
// 数量
|
||||
'qty': 6
|
||||
},
|
||||
{
|
||||
// 物料编码
|
||||
'materialCode': 'GBMCZ3027L323217GM003ZX22-7',
|
||||
'materialName': '物料7',
|
||||
// 数量
|
||||
'qty': 7
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
/**
|
||||
* 新版大屏首页右侧报表
|
||||
*/
|
||||
export const homepageDataRight = () => {
|
||||
let res = {
|
||||
'capacityRate': [{'device_name': '混料设备', 'numerical': '60'}, {'device_name': '压制设备', 'numerical': '60'}, {'device_name': '压制设备2', 'numerical': '60'}, {'device_name': '压制设备3', 'numerical': '60'}],
|
||||
'stateStatistics': {
|
||||
count: '20',
|
||||
fourState: [{'status': '5', 'stateName': '正常运行'}, {'status': '5', 'stateName': '暂未生产'}, {'status': '5', 'stateName': '空闲设备'}, {'status': '5', 'stateName': '故障设备'}]
|
||||
},
|
||||
'areaDeviceStatus': {
|
||||
'mix': {
|
||||
'running': 7,
|
||||
'pausing': 3,
|
||||
'shutdown': 4,
|
||||
'inTrouble': 1
|
||||
},
|
||||
'press': {
|
||||
'running': 4,
|
||||
'pausing': 2,
|
||||
'shutdown': 1,
|
||||
'inTrouble': 0
|
||||
},
|
||||
'dry': {
|
||||
'running': 4,
|
||||
'pausing': 7,
|
||||
'shutdown': 8,
|
||||
'inTrouble': 2
|
||||
},
|
||||
'sort': {
|
||||
'running': 7,
|
||||
'pausing': 3,
|
||||
'shutdown': 3,
|
||||
'inTrouble': 1
|
||||
}
|
||||
},
|
||||
'top10Of30Days': [
|
||||
{
|
||||
'device_name': '压机1',
|
||||
'count': 10
|
||||
},
|
||||
{
|
||||
'device_name': '压机2',
|
||||
'count': 9
|
||||
},
|
||||
{
|
||||
'device_name': '混料机1',
|
||||
'count': 8
|
||||
},
|
||||
{
|
||||
'device_name': '窑1',
|
||||
'count': 7
|
||||
},
|
||||
{
|
||||
'device_name': '分拣拆垛机械手1',
|
||||
'count': 6
|
||||
},
|
||||
{
|
||||
'device_name': '压机7',
|
||||
'count': 5
|
||||
},
|
||||
{
|
||||
'device_name': '码垛机械手1',
|
||||
'count': 4
|
||||
},
|
||||
{
|
||||
'device_name': '窑前桁架1',
|
||||
'count': 3
|
||||
},
|
||||
{
|
||||
'device_name': '拆盘机1',
|
||||
'count': 2
|
||||
},
|
||||
{
|
||||
'device_name': '覆膜机1',
|
||||
'count': 1
|
||||
}
|
||||
],
|
||||
'deviceWorkOrder': [
|
||||
{
|
||||
'process': '压制',
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机1',
|
||||
'status': '2',
|
||||
'workOrder': 'GD0001',
|
||||
'bom': '1001C1',
|
||||
'material': 'ZLMCZ1001C122211GM001BD20-8',
|
||||
'qty': '1000块',
|
||||
'startTime': '2023-11-20 14:32:32'
|
||||
},
|
||||
{
|
||||
'process': '压制',
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机1',
|
||||
'status': '0',
|
||||
'workOrder': 'GD0001',
|
||||
'bom': '1001C1',
|
||||
'material': 'ZLMCZ1001C122211GM001BD20-8',
|
||||
'qty': '1000块',
|
||||
'startTime': '2023-11-20 14:32:32'
|
||||
},
|
||||
{
|
||||
'process': '压制',
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机1',
|
||||
'status': '1',
|
||||
'workOrder': 'GD0001',
|
||||
'bom': '1001C1',
|
||||
'material': 'ZLMCZ1001C122211GM001BD20-8',
|
||||
'qty': '1000块',
|
||||
'startTime': '2023-11-20 14:32:32'
|
||||
},
|
||||
{
|
||||
'process': '压制',
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机1',
|
||||
'status': '1',
|
||||
'workOrder': 'GD0001',
|
||||
'bom': '1001C1',
|
||||
'material': 'ZLMCZ1001C122211GM001BD20-8',
|
||||
'qty': '1000块',
|
||||
'startTime': '2023-11-20 14:32:32'
|
||||
},
|
||||
{
|
||||
'process': '压制',
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机1',
|
||||
'status': '1',
|
||||
'workOrder': 'GD0001',
|
||||
'bom': '1001C1',
|
||||
'material': 'ZLMCZ1001C122211GM001BD20-8',
|
||||
'qty': '1000块',
|
||||
'startTime': '2023-11-20 14:32:32'
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
/**
|
||||
* 大屏首页设备
|
||||
*/
|
||||
export const homepageEquipment = () => {
|
||||
let res = {'productReport': [{'number': '192块', 'create_time': '2023-11-18 13:33:52', 'material_code': 'GBMAC3019C123270GM005BB20-30'}, {'number': '324块', 'create_time': '2023-11-11 15:45:02', 'material_code': 'GBMAC3003C123268GM002BB19-8'}, {'number': '240块', 'create_time': '2023-11-11 13:19:43', 'material_code': 'GBMAC3038C223271GM016BB25-30'}, {'number': '324块', 'create_time': '2023-11-11 10:58:42', 'material_code': 'GBMAC3003C123268GM002BB19-8'}, {'number': '240块', 'create_time': '2023-11-08 09:19:05', 'material_code': 'GBMCZ3059L323288GM029ZJTH21-10'}, {'number': '126块', 'create_time': '2023-11-06 16:04:40', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 15:41:37', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 14:57:32', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 14:12:48', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 13:28:01', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 12:41:13', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 11:03:33', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '270块', 'create_time': '2023-11-06 10:16:51', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '246块', 'create_time': '2023-11-04 15:44:12', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '210块', 'create_time': '2023-11-04 13:09:49', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '210块', 'create_time': '2023-11-04 12:35:26', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '210块', 'create_time': '2023-11-04 11:11:36', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '240块', 'create_time': '2023-11-04 10:36:37', 'material_code': 'GBMCZ3059L323288GM029ZJTH21-10'}, {'number': '210块', 'create_time': '2023-11-04 10:35:52', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}, {'number': '210块', 'create_time': '2023-11-04 10:09:29', 'material_code': 'GBMCZ3053M223268GM002ZJTH-201'}], 'deviceReport': [{'failure_info': '99', 'device_code': 'FJMDJXS01', 'failure_time': '2023-11-27 09:33:21'}, {'failure_info': '2', 'device_code': 'MDJXS01', 'failure_time': '2023-11-25 16:02:40'}, {'failure_info': '-', 'device_code': 'MDJXS02', 'failure_time': '2023-11-25 14:02:22'}, {'failure_info': '1', 'device_code': 'BZJ01', 'failure_time': '2023-11-25 08:01:38'}, {'failure_info': '-', 'device_code': 'JYHJ01', 'failure_time': '2023-11-22 13:24:07'}, {'failure_info': '-', 'device_code': 'CPJ01', 'failure_time': '2023-11-20 11:03:01'}, {'failure_info': '-', 'device_code': 'RGV01', 'failure_time': '2023-11-17 13:59:38'}, {'failure_info': '-', 'device_code': 'MDJXS03', 'failure_time': '2023-11-15 15:02:08'}, {'failure_info': '-', 'device_code': 'MDJXS04', 'failure_time': '2023-11-03 07:37:52'}, {'failure_info': '-', 'device_code': 'CYHJ01', 'failure_time': '2023-10-25 11:47:21'}]}
|
||||
return res
|
||||
}
|
||||
14
src/config/rem.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// 大屏尺寸2560*2560px
|
||||
(function (doc, win) {
|
||||
var docEl = doc.documentElement
|
||||
var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
|
||||
var recalc = function () {
|
||||
var clientWidth = docEl.clientWidth
|
||||
if (!clientWidth) return
|
||||
// docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px'
|
||||
docEl.style.fontSize = 100 * 2 + 'px'
|
||||
document.body.style.display = 'block'
|
||||
}
|
||||
if (!doc.addEventListener) return win.addEventListener(resizeEvt, recalc, false)
|
||||
doc.addEventListener('DOMContentLoaded', recalc, false)
|
||||
})(document, window)
|
||||
BIN
src/images/bg-bottom.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
src/images/bg-center.png
Normal file
|
After Width: | Height: | Size: 896 KiB |
BIN
src/images/bg-left.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/images/bg-m_1.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
src/images/bg-m_2.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
src/images/bg-right.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
src/images/bg-title_1.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
src/images/bg-title_2.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/bg-title_3.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
src/images/bg-top.png
Normal file
|
After Width: | Height: | Size: 558 KiB |
BIN
src/images/bg.jpg
Normal file
|
After Width: | Height: | Size: 209 KiB |
BIN
src/images/bg1.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/bg2.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/images/bg3.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/bg4.png
Normal file
|
After Width: | Height: | Size: 166 B |
BIN
src/images/fk_1.png
Normal file
|
After Width: | Height: | Size: 541 B |
BIN
src/images/fk_2.png
Normal file
|
After Width: | Height: | Size: 552 B |
BIN
src/images/fk_3.png
Normal file
|
After Width: | Height: | Size: 609 B |
BIN
src/images/fk_4.png
Normal file
|
After Width: | Height: | Size: 568 B |
BIN
src/images/fk_5.png
Normal file
|
After Width: | Height: | Size: 549 B |
BIN
src/images/fk_6.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/fk_7.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/gl-bg_1.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
src/images/gl-bg_2.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
src/images/gl-bg_3.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/images/light_1.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/images/line_selected.png
Normal file
|
After Width: | Height: | Size: 1005 B |
BIN
src/images/message-bg.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
src/images/pie-bg_1.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
src/images/pie-bg_2.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
src/images/pie_1.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
src/images/pointer.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/images/state_0.png
Normal file
|
After Width: | Height: | Size: 489 B |
BIN
src/images/state_1.png
Normal file
|
After Width: | Height: | Size: 459 B |
BIN
src/images/state_2.png
Normal file
|
After Width: | Height: | Size: 482 B |
BIN
src/images/state_3.png
Normal file
|
After Width: | Height: | Size: 461 B |
BIN
src/images/symbol_1.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/symbol_2.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/symbol_3.png
Normal file
|
After Width: | Height: | Size: 110 B |
BIN
src/images/symbol_4.png
Normal file
|
After Width: | Height: | Size: 110 B |
BIN
src/images/table-bg_1.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
27
src/main.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'babel-polyfill'
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import router from './router'
|
||||
import store from './vuex/store'
|
||||
import './config/rem.js'
|
||||
import './style/reset.css'
|
||||
import './style/layout.styl'
|
||||
import * as echarts from 'echarts'
|
||||
import 'default-passive-events'
|
||||
import scroll from 'vue-seamless-scroll'
|
||||
import {Message, Select, Option} from 'element-ui'
|
||||
|
||||
Vue.prototype.$echarts = echarts
|
||||
Vue.use(scroll)
|
||||
Vue.use(Select)
|
||||
Vue.use(Option)
|
||||
Vue.prototype.$message = Message
|
||||
Vue.config.productionTip = false
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
components: { App },
|
||||
template: '<App/>'
|
||||
})
|
||||
144
src/pages/Setup.vue
Normal file
@@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<h1>天能涂板暂存库可视化看板</h1>
|
||||
<div class="login_wrap">
|
||||
<h2>系统配置</h2>
|
||||
<div class="zd-row item_wrap">
|
||||
<div class="zd-col-8 label">域名地址</div>
|
||||
<input type="text" class="input" v-model="baseUrl">
|
||||
</div>
|
||||
<div class="zd-row item_wrap">
|
||||
<div class="zd-col-8 label">刷新时间(秒)</div>
|
||||
<input type="number" class="input" v-model="setTime">
|
||||
</div>
|
||||
<!-- <div class="zd-row item_wrap">
|
||||
<div class="zd-col-6 label">设备看板</div>
|
||||
<el-select v-model="index" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div> -->
|
||||
<div class="zd-row">
|
||||
<button class="zd-col-24 btn" @click="_config">配置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
// options: [{value: '1', label: '新-左'}],
|
||||
// index: this.$store.getters.equipId,
|
||||
baseUrl: this.$store.getters.baseUrl,
|
||||
setTime: this.$store.getters.setTime / 1000,
|
||||
fullscreen: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
_config () {
|
||||
if (this.setTime > 10800) {
|
||||
this.$message({
|
||||
message: '刷新时间设置过长',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
let obj = {
|
||||
baseUrl: this.baseUrl,
|
||||
setTime: this.setTime * 1000,
|
||||
equipId: this.index
|
||||
}
|
||||
this.$store.dispatch('setConfig', obj)
|
||||
this.$router.push('/index')
|
||||
let element = document.documentElement
|
||||
if (this.fullscreen) {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen()
|
||||
} else if (document.webkitCancelFullScreen) {
|
||||
document.webkitCancelFullScreen()
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen()
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen()
|
||||
}
|
||||
} else {
|
||||
if (element.requestFullscreen) {
|
||||
element.requestFullscreen()
|
||||
} else if (element.webkitRequestFullScreen) {
|
||||
element.webkitRequestFullScreen()
|
||||
} else if (element.mozRequestFullScreen) {
|
||||
element.mozRequestFullScreen()
|
||||
} else if (element.msRequestFullscreen) {
|
||||
// IE11
|
||||
element.msRequestFullscreen()
|
||||
}
|
||||
}
|
||||
this.fullscreen = !this.fullscreen
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
.container
|
||||
_wh(100%, 100%)
|
||||
background center / 100% 100% url('../images/bg.jpg') no-repeat
|
||||
.content
|
||||
position relative
|
||||
z-index 1
|
||||
top 50%
|
||||
left 50%
|
||||
width 25%
|
||||
min-width 890px
|
||||
transform translateX(-50%) translateY(-50%)
|
||||
h1
|
||||
font-size .3rem
|
||||
font-family: 'YouSheBiaoTiHei';
|
||||
font-weight: 400;
|
||||
color: transparent;
|
||||
line-height .3rem
|
||||
opacity: 0.89;
|
||||
background: linear-gradient(0deg, #AAD0F6 0%, #D7E7F5 53.3154296875%, #E0EAF6 100%);
|
||||
filter: drop-shadow(#092F6D 1px 4px 1px);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
text-align center
|
||||
margin-bottom 5%
|
||||
.login_wrap
|
||||
width 100%
|
||||
background #103170 center / 100% 100% url('../images/bg-m_2.png') no-repeat
|
||||
padding 3% 10% 6% 10%
|
||||
h2
|
||||
_font(.15rem, .15rem, #9BB9DD,700,center)
|
||||
margin-bottom 4%
|
||||
.item_wrap
|
||||
background linear-gradient(to bottom, #081438, #0c205a)
|
||||
border 1px solid #4a61a5
|
||||
padding 2% 2%
|
||||
margin-bottom 3%
|
||||
.label
|
||||
_font(.12rem, .25rem, #fff,,left)
|
||||
.input
|
||||
width 100%
|
||||
_font(.12rem, .25rem, #fff,,left)
|
||||
background-color transparent
|
||||
.btn
|
||||
background-color #2778f3
|
||||
border-radius 6px
|
||||
height .4rem
|
||||
font-size .17rem
|
||||
color #fff
|
||||
letter-spacing .05rem
|
||||
line-height .4rem
|
||||
outline none
|
||||
border none
|
||||
</style>
|
||||
86
src/pages/modules/home/index.vue
Normal file
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<section class="container">
|
||||
<div class="header">
|
||||
<h1>天能涂板暂存库可视化看板</h1>
|
||||
<v-time></v-time>
|
||||
</div>
|
||||
<div class="zd-row content">
|
||||
<div class="zd-col-15 allHeight"><v-left></v-left></div>
|
||||
<div class="zd-col-8 allHeight"><v-right></v-right></div>
|
||||
</div>
|
||||
<div class="left_bg"></div>
|
||||
<div class="right_bg"></div>
|
||||
<div class="bottom_bg"></div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vTime from '@components/time.vue'
|
||||
import vLeft from './left.vue'
|
||||
import vRight from './right.vue'
|
||||
export default {
|
||||
components: {
|
||||
vTime,
|
||||
vLeft,
|
||||
vRight
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.container
|
||||
position relative
|
||||
width 100%
|
||||
height 100%
|
||||
background center / 100% 100% url('../../../images/bg.jpg') no-repeat
|
||||
padding-top 6.5%
|
||||
overflow hidden
|
||||
.header
|
||||
position absolute
|
||||
top 0
|
||||
width 100%
|
||||
height 14.14%
|
||||
background center / 100% 100% url('../../../images/bg-top.png') no-repeat
|
||||
h1
|
||||
font-size: .4rem;
|
||||
font-family: 'YouSheBiaoTiHei';
|
||||
font-weight: 400;
|
||||
color: transparent;
|
||||
line-height .4rem
|
||||
height .4rem
|
||||
opacity: 0.89;
|
||||
letter-spacing .04rem
|
||||
background: linear-gradient(0deg, #AAD0F6 0%, #D7E7F5 53.3154296875%, #E0EAF6 100%);
|
||||
filter: drop-shadow(#092F6D 1px 4px 1px);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
text-align center
|
||||
margin-top 1%
|
||||
.content
|
||||
width 94%
|
||||
height 100%
|
||||
margin 0 auto
|
||||
padding-bottom 3%
|
||||
.left_bg
|
||||
position absolute
|
||||
left 0
|
||||
top 0
|
||||
width 2%
|
||||
height 100%
|
||||
background center / 100% auto url('../../../images/bg-left.png') no-repeat
|
||||
.right_bg
|
||||
position absolute
|
||||
right 0
|
||||
top 0
|
||||
width 2%
|
||||
height 100%
|
||||
background center / 100% auto url('../../../images/bg-right.png') no-repeat
|
||||
.bottom_bg
|
||||
position absolute
|
||||
bottom 0
|
||||
width 100%
|
||||
height 4%
|
||||
background center / auto 100% url('../../../images/bg-bottom.png') no-repeat
|
||||
.zd-col-8
|
||||
width 35%
|
||||
</style>
|
||||
42
src/pages/modules/home/left.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div class="n_container">
|
||||
<div class="zd-row">
|
||||
<div class="zd-col-10">
|
||||
<div class="zd-row jcflexstart">
|
||||
<div class="state_icon bg_col_1"></div>
|
||||
<div class="state_title">满货位</div>
|
||||
<div class="state_icon bg_col_2"></div>
|
||||
<div class="state_title">空货位</div>
|
||||
</div>
|
||||
<div class="zd-row">
|
||||
<div class="zd-col-6"></div>
|
||||
<div class="zd-col-6"></div>
|
||||
<div class="zd-col-6"></div>
|
||||
<div class="zd-col-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zd-col-12"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
.n_container
|
||||
_wh(100%, 100%)
|
||||
background center / 100% 100% url('../../../images/bg-center.png') no-repeat
|
||||
padding 2%
|
||||
.state_icon
|
||||
_wh(.1rem, .1rem)
|
||||
.state_title
|
||||
_font(.2rem, .2rem, #fff,,)
|
||||
margin 0 .4rem 0 .1rem
|
||||
.bg_col_1
|
||||
background-color #EF5252
|
||||
border-radius 4px
|
||||
box-shadow 0px 0px 12px 4px rgba(239, 82, 82, .5)
|
||||
.bg_col_2
|
||||
background-color #8EB5E5
|
||||
border-radius 4px
|
||||
box-shadow 0px 0px 12px 4px rgba(142, 181, 229, .5)
|
||||
</style>
|
||||
9
src/pages/modules/home/right.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div class="n_container"></div>
|
||||
</template>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
.n_container
|
||||
_wh(100%, 100%)
|
||||
</style>
|
||||
25
src/router/index.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
|
||||
const Setup = r => require.ensure([], () => r(require('@page/Setup')), 'Setup')
|
||||
const Index = r => require.ensure([], () => r(require('@page/modules/home/index')), 'screen')
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
export default new Router({
|
||||
linkActiveClass: 'tab-active',
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/setup'
|
||||
},
|
||||
{
|
||||
path: '/setup',
|
||||
component: Setup
|
||||
},
|
||||
{
|
||||
path: '/index',
|
||||
component: Index
|
||||
}
|
||||
]
|
||||
})
|
||||
BIN
src/style/font/SourceHanSansCN-Bold.otf
Normal file
BIN
src/style/font/SourceHanSansCN-Medium.otf
Normal file
BIN
src/style/font/SourceHanSansCN-Regular.otf
Normal file
BIN
src/style/font/YouSheBiaoTiHei.ttf
Normal file
33
src/style/iconfont.styl
Normal file
@@ -0,0 +1,33 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 1255596 */
|
||||
src: url('iconfont/iconfont.woff2') format('woff2'),
|
||||
url('iconfont/iconfont.woff') format('woff'),
|
||||
url('iconfont/iconfont.ttf') format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: "YouSheBiaoTiHei";
|
||||
src: url('font/YouSheBiaoTiHei.ttf') format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: "SourceHanSansCN-Bold";
|
||||
src: url('font/SourceHanSansCN-Bold.otf') format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: "SourceHanSansCN-Regular";
|
||||
src: url('font/SourceHanSansCN-Regular.otf') format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: "SourceHanSansCN-Medium";
|
||||
src: url('font/SourceHanSansCN-Medium.otf') format('truetype');
|
||||
}
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-guanbi:before {
|
||||
content: "\e60f";
|
||||
}
|
||||
37
src/style/iconfont/iconfont.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"id": "1255596",
|
||||
"name": "nl-hht-hl",
|
||||
"font_family": "iconfont",
|
||||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "2229060",
|
||||
"name": "无信号",
|
||||
"font_class": "no-signal",
|
||||
"unicode": "e76b",
|
||||
"unicode_decimal": 59243
|
||||
},
|
||||
{
|
||||
"icon_id": "400034",
|
||||
"name": "下拉",
|
||||
"font_class": "htmal5icon03",
|
||||
"unicode": "e626",
|
||||
"unicode_decimal": 58918
|
||||
},
|
||||
{
|
||||
"icon_id": "731140",
|
||||
"name": "选择",
|
||||
"font_class": "guanbi1",
|
||||
"unicode": "e608",
|
||||
"unicode_decimal": 58888
|
||||
},
|
||||
{
|
||||
"icon_id": "4736203",
|
||||
"name": "关闭",
|
||||
"font_class": "guanbi",
|
||||
"unicode": "e60f",
|
||||
"unicode_decimal": 58895
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
src/style/iconfont/iconfont.ttf
Normal file
BIN
src/style/iconfont/iconfont.woff
Normal file
BIN
src/style/iconfont/iconfont.woff2
Normal file
11
src/style/layout.styl
Normal file
@@ -0,0 +1,11 @@
|
||||
@import 'mixin.styl'
|
||||
@import 'iconfont.styl'
|
||||
|
||||
.state_0
|
||||
background center / 100% 100% url('../images/state_0.png') no-repeat
|
||||
.state_1
|
||||
background center / 100% 100% url('../images/state_1.png') no-repeat
|
||||
.state_2
|
||||
background center / 100% 100% url('../images/state_2.png') no-repeat
|
||||
.state_3
|
||||
background center / 100% 100% url('../images/state_3.png') no-repeat
|
||||
48
src/style/mixin.styl
Normal file
@@ -0,0 +1,48 @@
|
||||
$green = #30EBC9
|
||||
$yellow = #E2BB0E
|
||||
$gray = #516282
|
||||
$gray1 = #8B90A6
|
||||
$orange = #F96700
|
||||
$green2 = #65d837
|
||||
|
||||
.green
|
||||
background-color #11ff0d
|
||||
.yellow
|
||||
background-color #fdfd0f
|
||||
.gray
|
||||
background-color #bfbfbf
|
||||
.gray1
|
||||
background-color #d8d1d1
|
||||
.red
|
||||
background-color #ff1016
|
||||
|
||||
//宽高
|
||||
_wh(w, h)
|
||||
width: w
|
||||
height: h
|
||||
|
||||
//字体大小、行高、颜色
|
||||
_font(size,height,color=#ffffff,weight=normal,align=center)
|
||||
font-size: size
|
||||
line-height: height
|
||||
color: color
|
||||
font-weight: weight
|
||||
text-align: align
|
||||
|
||||
// 背景图片地址和大小
|
||||
_bis(url,w=100%,h=100%,x=center,y=center,r=no-repeat)
|
||||
background-position: x y
|
||||
background-size: w h
|
||||
background-image: url(url)
|
||||
background-repeat: r
|
||||
|
||||
// 背景图片改变颜色
|
||||
_shadow(w,c)
|
||||
filter drop-shadow(w 0 0 c)
|
||||
|
||||
//flex 布局和 子元素 对其方式
|
||||
_fj(c=column, x=space-between,y=center)
|
||||
display: flex
|
||||
flex-direction: c
|
||||
justify-content: x
|
||||
align-items: y
|
||||
238
src/style/reset.css
Normal file
@@ -0,0 +1,238 @@
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video, input {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
/* custom */
|
||||
a,a:link,a:visited,a:active {
|
||||
text-decoration: none;
|
||||
-webkit-backface-visibility: hidden;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track-piece {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
-webkit-border-radius: 6px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:vertical {
|
||||
height: 5px;
|
||||
background-color: rgba(125, 125, 125, 0.7);
|
||||
-webkit-border-radius: 6px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:horizontal {
|
||||
width: 5px;
|
||||
background-color: rgba(125, 125, 125, 0.7);
|
||||
-webkit-border-radius: 6px;
|
||||
}
|
||||
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 3840px;
|
||||
height: 2560px;
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-text-size-adjust: none;
|
||||
-webkit-tap-highlight-color: rgba(11, 7, 7, 0);
|
||||
-moz-user-select:none;/*火狐*/
|
||||
-webkit-user-select:none;/*webkit浏览器*/
|
||||
-ms-user-select:none;/*IE10*/
|
||||
-khtml-user-select:none;/*早期浏览器*/
|
||||
user-select:none;
|
||||
background-color: #133471;
|
||||
}
|
||||
|
||||
div, p {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.fl {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
.fr {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
.hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.fontselect {
|
||||
-moz-user-select:none;/*火狐*/
|
||||
-webkit-user-select:none;/*webkit浏览器*/
|
||||
-ms-user-select:none;/*IE10*/
|
||||
-khtml-user-select:none;/*早期浏览器*/
|
||||
user-select:none;
|
||||
}
|
||||
|
||||
.flexcenter {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.flexbetween {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
visibility: hidden
|
||||
}
|
||||
|
||||
.relative {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.zd-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.zd-col-24 {
|
||||
width: 100%;
|
||||
}
|
||||
.zd-col-23 {
|
||||
width: 95.83333%
|
||||
}
|
||||
.zd-col-22 {
|
||||
width: 91.66667%
|
||||
}
|
||||
.zd-col-21 {
|
||||
width: 87.5%
|
||||
}
|
||||
.zd-col-20 {
|
||||
width: 83.33333%
|
||||
}
|
||||
.zd-col-19 {
|
||||
width: 79.16667%
|
||||
}
|
||||
.zd-col-18 {
|
||||
width: 75%
|
||||
}
|
||||
.zd-col-17 {
|
||||
width: 70.83333%
|
||||
}
|
||||
.zd-col-16 {
|
||||
width: 66.66667%
|
||||
}
|
||||
.zd-col-15 {
|
||||
width: 62.5%
|
||||
}
|
||||
.zd-col-14 {
|
||||
width: 58.33333%
|
||||
}
|
||||
.zd-col-13 {
|
||||
width: 54.16667%
|
||||
}
|
||||
.zd-col-12 {
|
||||
width: 50%;
|
||||
}
|
||||
.zd-col-11 {
|
||||
width: 45.83333%
|
||||
}
|
||||
.zd-col-10 {
|
||||
width: 41.66667%
|
||||
}
|
||||
.zd-col-9 {
|
||||
width: 37.5%
|
||||
}
|
||||
.zd-col-8 {
|
||||
width: 33.33333%
|
||||
}
|
||||
.zd-col-7 {
|
||||
width: 29.16667%
|
||||
}
|
||||
.zd-col-6 {
|
||||
width: 25%
|
||||
}
|
||||
.zd-col-5 {
|
||||
width: 20.83333%
|
||||
}
|
||||
.zd-col-4 {
|
||||
width: 16.66667%
|
||||
}
|
||||
.zd-col-3 {
|
||||
width: 12.5%
|
||||
}
|
||||
.zd-col-2 {
|
||||
width: 8.33333%
|
||||
}
|
||||
.zd-col-1 {
|
||||
width: 4.16667%
|
||||
}
|
||||
.jcflexstart {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
.allHeight {
|
||||
height: 100%;
|
||||
}
|
||||
43
src/vuex/modules/com.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import * as types from '../types'
|
||||
import { getStore, setStore } from '@js/mUtils.js'
|
||||
|
||||
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.59:8080' : 'http://192.168.46.5:8080/hl_nlapp'
|
||||
|
||||
/**
|
||||
* App通用配置
|
||||
*/
|
||||
const state = {
|
||||
baseUrl: getStore('baseUrl') || baseUrl,
|
||||
setTime: getStore('setTime') || 5000,
|
||||
equipId: getStore('equipId') || '1'
|
||||
}
|
||||
|
||||
const actions = {
|
||||
setConfig ({commit}, res) {
|
||||
setStore('baseUrl', res.baseUrl)
|
||||
setStore('setTime', res.setTime)
|
||||
setStore('equipId', res.equipId)
|
||||
commit(types.COM_CONFIG, res)
|
||||
}
|
||||
}
|
||||
|
||||
const getters = {
|
||||
baseUrl: state => state.baseUrl,
|
||||
setTime: state => state.setTime,
|
||||
equipId: state => state.equipId
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
[types.COM_CONFIG] (state, res) {
|
||||
state.baseUrl = res.baseUrl
|
||||
state.setTime = res.setTime
|
||||
state.equipId = res.equipId
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
state,
|
||||
actions,
|
||||
getters,
|
||||
mutations
|
||||
}
|
||||
52
src/vuex/modules/user.js
Normal file
@@ -0,0 +1,52 @@
|
||||
import * as types from '../types'
|
||||
import { getStore, setStore } from '@js/mUtils.js'
|
||||
|
||||
const state = {
|
||||
accountId: getStore('accountId') || '',
|
||||
accountName: getStore('accountName') || '',
|
||||
userName: getStore('userName') || '',
|
||||
deptUuid: getStore('deptUuid') || ''
|
||||
}
|
||||
|
||||
const getters = {
|
||||
accountId: state => state.accountId,
|
||||
accountName: state => state.accountName,
|
||||
userName: state => state.userName,
|
||||
deptUuid: state => state.deptUuid
|
||||
}
|
||||
|
||||
const actions = {
|
||||
setUserInfo ({ commit }, res) {
|
||||
setStore('accountId', res.account_id)
|
||||
setStore('accountName', res.account_name)
|
||||
setStore('userName', res.user_name)
|
||||
setStore('deptUuid', res.dept_uuid)
|
||||
commit(types.SET_USER_INFO, res)
|
||||
},
|
||||
setSignOut ({ commit }) {
|
||||
localStorage.removeItem('accountId')
|
||||
localStorage.removeItem('userName')
|
||||
localStorage.removeItem('accountName')
|
||||
localStorage.removeItem('deptUuid')
|
||||
commit(types.SET_SIGN_OUT)
|
||||
}
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
[types.SET_USER_INFO] (state, res) {
|
||||
state.accountId = res.account_id
|
||||
state.accountName = res.account_name
|
||||
state.userName = res.user_name
|
||||
state.memberName = res.member_name
|
||||
},
|
||||
[types.SET_SIGN_OUT] (state) {
|
||||
state.accountId = ''
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
}
|
||||
14
src/vuex/store.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
import user from './modules/user'
|
||||
import com from './modules/com'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
modules: {
|
||||
user,
|
||||
com
|
||||
}
|
||||
})
|
||||
6
src/vuex/types.js
Normal file
@@ -0,0 +1,6 @@
|
||||
// 公共配置
|
||||
export const COM_CONFIG = 'COM_CONFIG'
|
||||
|
||||
// 用户
|
||||
export const SET_USER_INFO = 'SET_USER_INFO'
|
||||
export const SET_SIGN_OUT = 'SET_SIGN_OUT'
|
||||