diff --git a/README.md b/README.md index d951fff..aa74669 100644 --- a/README.md +++ b/README.md @@ -30,5 +30,5 @@ npm test 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). # 注意事项 -+ 屏幕分辨率1280 * 960 -+ 15寸分辨率1024*768(这个为标准) \ No newline at end of file ++ 屏幕尺寸1920 * 1080 ++ 一体机尺寸1024*768(这个为标准) \ No newline at end of file diff --git a/src/config/getData.js b/src/config/getData.js index 8c5d10f..c8350b5 100644 --- a/src/config/getData.js +++ b/src/config/getData.js @@ -35,6 +35,4 @@ export const areaControl = (code, option) => post('api/pda/areaControl', { option: option }) // 1.10 查询设备状态 -export const queryDevice = (code) => post('api/pda/queryDevice', { - device_code: code -}) +export const queryDevice = (arr) => post('api/pda/queryDevice', arr) diff --git a/src/config/mork.js b/src/config/mork.js index 1f0e9ca..fcf0676 100644 --- a/src/config/mork.js +++ b/src/config/mork.js @@ -54,27 +54,19 @@ export const areaControl = (code, option) => { return res } export const queryDevice = (t) => { - let res = {} - if (t === 0) { - res = { - data: {car1: {x: 105, y: 312, angle: 90}} - } - } else if (t === 1) { - res = { - data: {car1: {x: 105, y: 262, angle: 180}} - } - } else if (t === 2) { - res = { - data: {car1: {x: 105, y: 202, angle: 180}} - } - } else if (t === 3) { - res = { - data: {car1: {x: 105, y: 262, angle: 90}} - } - } else if (t === 4) { - res = { - data: {car1: {x: 105, y: 312, angle: 90}} - } + let res = { + "one": { + "x": 15821, + "y": 60912, + "angle": 90 + }, + "message": "操作成功", + "two": { + "x": 15821, + "y": 60912, + "angle": 90 + }, + "status": 200 } return res } diff --git a/src/images/agv_right.png b/src/images/agv_right.png index 7598182..0f6c2e8 100644 Binary files a/src/images/agv_right.png and b/src/images/agv_right.png differ diff --git a/src/images/area_bg.png b/src/images/area_bg.png index 6e1d899..e463564 100644 Binary files a/src/images/area_bg.png and b/src/images/area_bg.png differ diff --git a/src/pages/canvas_new.vue b/src/pages/canvas_new.vue new file mode 100644 index 0000000..840dab1 --- /dev/null +++ b/src/pages/canvas_new.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/src/pages/index.vue b/src/pages/index.vue index 87422df..b75a23c 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -6,7 +6,6 @@
-
区域
@@ -27,7 +26,7 @@
起始设备
- +
目标设备
- +
物料类型
- +
设备
- +
区域
- +
任务
- +
-
+
@@ -133,7 +132,7 @@ + + diff --git a/src/pages/setup.vue b/src/pages/setup.vue index e2bb185..a31ca89 100644 --- a/src/pages/setup.vue +++ b/src/pages/setup.vue @@ -3,10 +3,14 @@

生产控制中心

配置

-
+
域名地址
+
+
刷新时间(秒)
+ +
@@ -18,22 +22,33 @@ export default { data () { return { - baseUrl: this.$store.getters.baseUrl - // setTime: this.$store.getters.setTime / 1000 + baseUrl: this.$store.getters.baseUrl, + setTime: this.$store.getters.setTime / 1000 } }, methods: { + _viewport () { + this.viewportWidth = window.screen.width + this.viewportHeight = window.screen.height + }, _config () { - // if (this.setTime > 10800) { - // this.$message({ - // message: '刷新时间设置过长', - // type: 'warning' - // }) - // return - // } + if (this.setTime < 3) { + this.$message({ + message: '刷新时间设置过短', + type: 'warning' + }) + return + } + if (this.setTime > 10800) { + this.$message({ + message: '刷新时间设置过长', + type: 'warning' + }) + return + } let obj = { - baseUrl: this.baseUrl - // setTime: this.setTime * 1000 + baseUrl: this.baseUrl, + setTime: this.setTime * 1000 } this.$store.dispatch('setConfig', obj) this.$router.push('/index') @@ -63,14 +78,19 @@ h1 _font(.24rem, .3rem, #fff, 400,center) margin-bottom .2rem .setup-wrap - width 4rem + width 4.6rem background-color rgb(16, 38, 105) padding .2rem .filter-value color #333 text-align left padding 0 .1rem + width calc(100% - 1.1rem) +.filter-label + width 1rem .button margin-left 0 letter-spacing .2rem +.mgb1 + margin-bottom .1rem diff --git a/src/router/index.js b/src/router/index.js index b334315..3f524f0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,7 +2,7 @@ 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/index')), 'Index') +const Index = r => require.ensure([], () => r(require('@page/index1')), 'Index') Vue.use(Router) export default new Router({ diff --git a/src/style/layout.styl b/src/style/layout.styl index 19b87e7..e5ce794 100644 --- a/src/style/layout.styl +++ b/src/style/layout.styl @@ -120,14 +120,13 @@ text-shadow 0 8px 8px rgba(0,0,0,0.30) .content position relative - padding .67rem .15rem .15rem .15rem + padding .67rem 7px .15rem 7px _wh(100%, 100%) .l-wrap - _wh(calc(100% - 705px), 100%) + _wh(calc(100% - 740px), 100%) overflow auto .r-wrap - _wh(700px, 100%) - padding 10px + _wh(733px, 100%) background: center / 100% 100% url('~@/images/item_2_bg.png') no-repeat; .item-wrap width 100% @@ -135,15 +134,6 @@ margin-top .05rem background: center/ 100% 100% url('~@/images/item_bg_1.png') no-repeat; // background-color rgb(16, 38, 105) -.title-wrap - height .4rem - padding-left .26rem - background: center/ 100% 100% url('~@/images/title_bg.png') no-repeat; - p - _font(.2rem, .3rem, transparent, 400,) - font-family: YouSheBiaoTiHei; - background: linear-gradient(to top, rgb(255, 255, 255) 0%, rgb(181, 232, 255) 80%, rgb(181, 232, 255) 100%); - -webkit-background-clip: text; .filter-item margin-bottom .1rem .filter-label diff --git a/src/style/reset.css b/src/style/reset.css index 119113d..4df6100 100644 --- a/src/style/reset.css +++ b/src/style/reset.css @@ -29,9 +29,26 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re appearance: none; } +::-webkit-scrollbar { + width: 4px; + height: 4px; +} +::-webkit-scrollbar-thumb { + border-radius: 2px; + background-color: #2650a4; +} +::-webkit-scrollbar-track { + border-radius: 2px; + background-color: #e7e7e7; + border: 1px solid #cacaca; +} + .relative { position: relative; } +.absolute { + position: absolute; +} .hide { display: none; } diff --git a/src/vuex/modules/com.js b/src/vuex/modules/com.js index 917578b..969f713 100644 --- a/src/vuex/modules/com.js +++ b/src/vuex/modules/com.js @@ -4,18 +4,18 @@ import { getStore, setStore } from '@config/utils.js' const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.171:8018' : 'http://192.168.81.171:8018' const state = { baseUrl: getStore('baseUrl') || baseUrl, - lockTime: getStore('lockTime') || 0 + setTime: getStore('setTime') || 3000 } const getters = { baseUrl: state => state.baseUrl, - lockTime: state => state.lockTime + setTime: state => state.setTime } const actions = { setConfig ({commit}, res) { setStore('baseUrl', res.baseUrl) - setStore('lockTime', res.lockTime) + setStore('setTime', res.setTime) commit(types.COM_CONFIG, res) } } @@ -23,7 +23,7 @@ const actions = { const mutations = { [types.COM_CONFIG] (state, res) { state.baseUrl = res.baseUrl - state.lockTime = res.lockTime + state.setTime = res.setTime } }