From 7e6950226e94a69488c7a5afff6da20bf7e96da0 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Fri, 19 Jul 2024 16:49:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/getData2.js | 4 +- src/config/http.js | 15 +++++ src/config/mork2.js | 2 +- src/pages/Setup.vue | 6 ++ src/pages/modules/board/StockBin.vue | 88 ++++++++++++---------------- src/vuex/modules/com.js | 7 ++- 6 files changed, 66 insertions(+), 56 deletions(-) diff --git a/src/config/getData2.js b/src/config/getData2.js index e74984b..9b40589 100644 --- a/src/config/getData2.js +++ b/src/config/getData2.js @@ -1,4 +1,4 @@ -import {post} from './http.js' +import {post, post1} from './http.js' // 大屏-中间设备运行情况 export const deviceCondition = () => post('api/cockpit/deviceCondition', {}) // 出、入窑输送线弹窗 @@ -10,4 +10,4 @@ export const screenTableData = () => post('api/cockpit/screenTableData', {}) // 窑看板 export const klineInfo = () => post('api/cockpit/klineInfo', {}) // 料仓监控 -export const queryliaocang = () => post('api/hand/queryliaocang', {}) +export const queryliaocang = () => post1('api/hand/queryliaocang', {}) diff --git a/src/config/http.js b/src/config/http.js index 7577144..241fe23 100644 --- a/src/config/http.js +++ b/src/config/http.js @@ -63,3 +63,18 @@ export const post = (sevmethod, params) => { }) }) } + +export const post1 = (sevmethod, params) => { + return new Promise((resolve, reject) => { + axios.post(`${store.getters.lcUrl}/` + sevmethod, params) + .then(response => { + resolve(response.data) + }, error => { + // Dialog(error.message) + reject(error.message) + }) + .catch((error) => { + reject(error) + }) + }) +} diff --git a/src/config/mork2.js b/src/config/mork2.js index 90e3c9e..82eb9d1 100644 --- a/src/config/mork2.js +++ b/src/config/mork2.js @@ -2534,6 +2534,6 @@ export const klineInfo = () => { return res } export const queryliaocang = () => { - let res = [{point_name: 'LC16'}] + let res = [{point_name: 'A1', num: '2100'}, {point_name: 'A2', num: '6100'}, {point_name: 'A3', num: '100'}, {point_name: 'A4', num: '100'}, {point_name: 'A5', num: '100'}, {point_name: 'A6', num: '100'}, {point_name: 'A7', num: '100'}, {point_name: 'A8', num: '100'}, {point_name: 'A9', num: '100'}, {point_name: 'A10', num: '100'}, {point_name: 'A11', num: '100'}, {point_name: 'A12', num: '100'}, {point_name: 'A13', num: '100'}, {point_name: 'A14', num: '100'}, {point_name: 'A15', num: '100'}, {point_name: 'A16', num: '100'}, {point_name: 'B1', num: '100'}, {point_name: 'B2', num: '100'}, {point_name: 'B3', num: '100'}, {point_name: 'B4', num: '100'}, {point_name: 'B5', num: '100'}, {point_name: 'B6', num: '100'}, {point_name: 'B7', num: '100'}, {point_name: 'B8', num: '100'}, {point_name: 'B9', num: '100'}, {point_name: 'B10', num: '100'}, {point_name: 'B11', num: '100'}, {point_name: 'B12', num: '100'}, {point_name: 'B13', num: '100'}, {point_name: 'B14', num: '100'}, {point_name: 'B15', num: '100'}, {point_name: 'B16', num: '100'}, {point_name: 'C1', num: '100'}, {point_name: 'C2', num: '100'}, {point_name: 'C3', num: '100'}, {point_name: 'C4', num: '100'}, {point_name: 'C5', num: '100'}, {point_name: 'C6', num: '100'}, {point_name: 'C7', num: '100'}, {point_name: 'C8', num: '100'}, {point_name: 'C9', num: '100'}, {point_name: 'C10', num: '100'}, {point_name: 'C11', num: '100'}, {point_name: 'C12', num: '100'}, {point_name: 'C13', num: '100'}, {point_name: 'C14', num: '100'}, {point_name: 'C15', num: '100'}, {point_name: 'C16', num: '100'}, {point_name: 'Z1', num: '100'}, {point_name: 'Z2', num: '100'}, {point_name: 'Z3', num: '100'}, {point_name: 'Z4', num: '100'}, {point_name: 'Z5', num: '100'}, {point_name: 'Z6', num: '100'}, {point_name: 'Z7', num: '100'}, {point_name: 'Z8', num: '100'}, {point_name: 'Z9', num: '100'}, {point_name: 'Z10', num: '100'}, {point_name: 'Z11', num: '100'}, {point_name: 'Z12', num: '-100'}] return res } diff --git a/src/pages/Setup.vue b/src/pages/Setup.vue index e44db13..94318a4 100644 --- a/src/pages/Setup.vue +++ b/src/pages/Setup.vue @@ -29,6 +29,10 @@ +
+ + +
@@ -71,6 +75,7 @@ export default { options: [{value: '1', label: '大屏'}, {value: '2', label: '压制生产看板'}, {value: '3', label: '分拣作业监控'}, {value: '4', label: '干燥作业监控'}, {value: '5', label: '料仓监控'}], value: this.$store.getters.equipId, baseUrl: this.$store.getters.baseUrl, + lcUrl: this.$store.getters.lcUrl, setTime: this.$store.getters.setTime / 1000, fullscreen: false } @@ -91,6 +96,7 @@ export default { } let obj = { baseUrl: this.baseUrl, + lcUrl: this.lcUrl, setTime: this.setTime * 1000, equipId: this.value } diff --git a/src/pages/modules/board/StockBin.vue b/src/pages/modules/board/StockBin.vue index f25b4d0..288ca0a 100644 --- a/src/pages/modules/board/StockBin.vue +++ b/src/pages/modules/board/StockBin.vue @@ -19,10 +19,10 @@
C
-
-
+
+

{{ e.point_name }}

-

{{ e.qty }}

+

{{ e.num }}

@@ -32,10 +32,10 @@
B
-
-
+
+

{{ e.point_name }}

-

{{ e.qty }}

+

{{ e.num }}

@@ -45,10 +45,10 @@
A
-
-
+
+

{{ e.point_name }}

-

{{ e.qty }}

+

{{ e.num }}

@@ -57,11 +57,11 @@
Z
-
-
-
+
+
+

{{ e.point_name }}

-

{{ e.qty }}

+

{{ e.num }}

@@ -71,49 +71,21 @@
@@ -196,6 +178,8 @@ export default { _fj(row, flex-start) align-content: flex-start flex-wrap wrap +.p_wraper_1 + justify-content: flex-end .p_item _wh(5.5%, 100%) border-radius 4px diff --git a/src/vuex/modules/com.js b/src/vuex/modules/com.js index e1e0d3f..5f65b31 100644 --- a/src/vuex/modules/com.js +++ b/src/vuex/modules/com.js @@ -1,13 +1,15 @@ 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' +const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.8.162:8010' : 'http://192.168.8.162:8010' +const lcUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.8.160:8010' : 'http://192.168.8.160:8010' /** * App通用配置 */ const state = { baseUrl: getStore('baseUrl') || baseUrl, + lcUrl: getStore('lcUrl') || lcUrl, setTime: getStore('setTime') || 50000, equipId: getStore('equipId') || '1' } @@ -15,6 +17,7 @@ const state = { const actions = { setConfig ({commit}, res) { setStore('baseUrl', res.baseUrl) + setStore('lcUrl', res.lcUrl) setStore('setTime', res.setTime) setStore('equipId', res.equipId) commit(types.COM_CONFIG, res) @@ -23,6 +26,7 @@ const actions = { const getters = { baseUrl: state => state.baseUrl, + lcUrl: state => state.lcUrl, setTime: state => state.setTime, equipId: state => state.equipId } @@ -30,6 +34,7 @@ const getters = { const mutations = { [types.COM_CONFIG] (state, res) { state.baseUrl = res.baseUrl + state.lcUrl = res.lcUrl state.setTime = res.setTime state.equipId = res.equipId }