diff --git a/.env.dev b/.env.dev index 40a1806e..14470802 100644 --- a/.env.dev +++ b/.env.dev @@ -1,30 +1,30 @@ ### # @Author: Do not edit # @Date: 2023-08-29 09:40:39 - # @LastEditTime: 2023-12-18 13:35:00 + # @LastEditTime: 2023-12-29 08:57:36 # @LastEditors: zhp # @Description: ### # 开发环境配置 -ENV = 'development' +ENV = 'development' # 页面标题 VUE_APP_TITLE = MES系统 # 芋道管理系统/开发环境 # VUE_APP_BASE_API = 'http://100.64.0.26:48082' -VUE_APP_BASE_API = 'http://192.168.0.33:48082' +VUE_APP_BASE_API = 'http://10.70.2.2:8080' # VUE_APP_BASE_API = 'http://192.168.4.173:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.1.49:48082' # VUE_APP_BASE_API = 'http://192.168.1.8:48082' # VUE_APP_BASE_API = 'http://192.168.4.159:48080' -# VUE_APP_BASE_API = 'http://192.168.1.56:48082' +# VUE_APP_BASE_API = 'http://192.168.1.104:48082' # VUE_APP_BASE_API = 'http://192.168.1.62:48082' # VUE_APP_BASE_API = 'http://192.168.1.78:48082' # 积木报表指向地址 -VUE_APP_JIMU_API = 'http://192.168.0.33:48082' +VUE_APP_JIMU_API = 'http://10.70.2.22:8080' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/.env.prod b/.env.prod index d89ed16a..12538daa 100644 --- a/.env.prod +++ b/.env.prod @@ -15,11 +15,11 @@ VUE_APP_TITLE = MES系统 VUE_APP_BASE_API = '/prod-api' # 积木报表指向地址 -VUE_APP_JIMU_API = 'http://10.70.2.22:8080' +VUE_APP_JIMU_API = 'http://10.70.2.2:8080' # 根据服务器或域名修改 -PUBLIC_PATH = 'http://10.70.2.32' +PUBLIC_PATH = '' # 二级部署路径 # VUE_APP_APP_NAME ='yudao-admin' diff --git a/src/assets/icons/svg/energyMonitoring.svg b/src/assets/icons/svg/energyMonitoring.svg new file mode 100644 index 00000000..ba27b0f4 --- /dev/null +++ b/src/assets/icons/svg/energyMonitoring.svg @@ -0,0 +1,14 @@ + + + 能源监控 + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/eqAlarm.svg b/src/assets/icons/svg/eqAlarm.svg new file mode 100644 index 00000000..7b37c5be --- /dev/null +++ b/src/assets/icons/svg/eqAlarm.svg @@ -0,0 +1,14 @@ + + + 报警 + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/eqMonitoring.svg b/src/assets/icons/svg/eqMonitoring.svg new file mode 100644 index 00000000..66ac7afa --- /dev/null +++ b/src/assets/icons/svg/eqMonitoring.svg @@ -0,0 +1,17 @@ + + + 设备监控 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/fullScreenView.svg b/src/assets/icons/svg/fullScreenView.svg new file mode 100644 index 00000000..8b1bceb6 --- /dev/null +++ b/src/assets/icons/svg/fullScreenView.svg @@ -0,0 +1,12 @@ + + + 编组 54 + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/fullscreen.svg b/src/assets/icons/svg/fullscreen.svg deleted file mode 100644 index 0e86b6fa..00000000 --- a/src/assets/icons/svg/fullscreen.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/icons/svg/productLine.svg b/src/assets/icons/svg/productLine.svg new file mode 100644 index 00000000..a05d5c87 --- /dev/null +++ b/src/assets/icons/svg/productLine.svg @@ -0,0 +1,14 @@ + + + 库存管理 + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/scrap.svg b/src/assets/icons/svg/scrap.svg new file mode 100644 index 00000000..5f72b0e5 --- /dev/null +++ b/src/assets/icons/svg/scrap.svg @@ -0,0 +1,16 @@ + + + 缺陷 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/unFullScreenView.svg b/src/assets/icons/svg/unFullScreenView.svg new file mode 100644 index 00000000..5454a880 --- /dev/null +++ b/src/assets/icons/svg/unFullScreenView.svg @@ -0,0 +1,10 @@ + + + 编组 54备份 + + + + + + + \ No newline at end of file diff --git a/src/store/getters.js b/src/store/getters.js index 16103f89..1f08b7bd 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -19,6 +19,9 @@ const getters = { sidebarRouters:state => state.permission.sidebarRouters, choicepart: state => state.app.choicepart, // 数据字典 - dict_datas: state => state.dict.dictDatas + dict_datas: state => state.dict.dictDatas, + //ws + fanFrequencyInfo: state => state.websocket.FanFrequencyInfo, + kilnInfo: state => state.websocket.kilnInfo, } export default getters diff --git a/src/store/index.js b/src/store/index.js index 116d6d68..7f8369bb 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,6 +6,7 @@ import tagsView from './modules/tagsView' import permission from './modules/permission' import settings from './modules/settings' import dict from './modules/dict' +import websocket from './modules/websocket' import getters from './getters' Vue.use(Vuex) @@ -17,7 +18,8 @@ const store = new Vuex.Store({ tagsView, permission, settings, - dict + dict, + websocket }, getters }) diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js new file mode 100644 index 00000000..7dde1bb3 --- /dev/null +++ b/src/store/modules/websocket.js @@ -0,0 +1,52 @@ +const state = { + fanFrequencyInfo:{},// 分机运行频率 + kilnInfo:{},// 窑炉信息 + gasInfo:{},// 天然气 + + israKiln:[],// ISRA缺陷检测 + material:[]// 原料 +}; +const mutations = { + SET_FANFREQUENCYINFO: (state, fanFrequencyInfo) => { + state.fanFrequencyInfo = fanFrequencyInfo + }, + SET_KILNINFO: (state, kilnInfo) => { + state.kilnInfo = kilnInfo + }, + SET_GASINFO: (state, gasInfo) => { + state.gasInfo = gasInfo + }, + + + SET_ISRAKILN: (state, israKiln) => { + state.israKiln = israKiln + }, + SET_MATERIAL: (state, material) => { + state.material = material + } +}; +const actions = { + setFanFrequencyInfo({ commit }, fanFrequencyInfo) { + commit('SET_FANFREQUENCYINFO', fanFrequencyInfo.payload) + }, + setKilnInfo({ commit }, kilnInfo) { + commit('SET_KILNINFO', kilnInfo.payload) + }, + setGasInfo({ commit }, gasInfo) { + commit('SET_GASINFO', gasInfo.payload) + }, + + + setIsraKiln({ commit }, israKiln) { + commit('SET_ISRAKILN', israKiln.payload) + }, + setMaterial({ commit }, material) { + commit('SET_MATERIAL', material.payload) + }, +}; +export default { + namespaced: true, + state, + mutations, + actions, +} diff --git a/src/views/OperationalOverview/coldBoard.vue b/src/views/OperationalOverview/coldBoard.vue index 3127d186..a92aad06 100644 --- a/src/views/OperationalOverview/coldBoard.vue +++ b/src/views/OperationalOverview/coldBoard.vue @@ -1,213 +1,176 @@ + - @@ -1165,9 +783,11 @@ export default { .flex-1 { flex: 1 1; } - .h-full { - height: calc(100vh); + +.h-full { + height: calc(100vh - 150px); } + /* .container-main { min-height: calc(100vh - 10em); } */ diff --git a/src/views/OperationalOverview/components/baseTable.vue b/src/views/OperationalOverview/components/baseTable.vue index 52fc5ca8..2865e710 100644 --- a/src/views/OperationalOverview/components/baseTable.vue +++ b/src/views/OperationalOverview/components/baseTable.vue @@ -1,7 +1,7 @@ @@ -16,10 +16,9 @@ style="width: 100%; background: transparent" > @@ -60,98 +60,16 @@ export default { data() { return { chart: null, - series: [] + series: [{ + type: 'bar', + data: [], + barWidth: 6 + }] } }, mounted() { console.log('mounted') console.log('borderRadius: ', this.borderRadius) - - this.series = [ - { - name: this.dataList[0].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[0].topColor }, - { offset: 1, color: this.dataList[0].bottomColor } - ]), - barBorderRadius: this.borderRadius - }, - data: this.dataList[0].data, - barWidth: 6 - }, - { - name: this.dataList[1].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[1].topColor }, - { offset: 1, color: this.dataList[1].bottomColor } - ]), - barBorderRadius: this.borderRadius - }, - data: this.dataList[1].data, - barWidth: 6 - }, - { - name: this.dataList[2].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[2].topColor }, - { offset: 1, color: this.dataList[2].bottomColor } - ]), - // borderRadius: [5, 5, 0, 0] - barBorderRadius: this.borderRadius - }, - data: this.dataList[2].data, - barWidth: 6 - }, - { - name: this.dataList[3].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[3].topColor }, - { offset: 1, color: this.dataList[3].bottomColor } - ]), - // borderRadius: [5, 5, 0, 0] - barBorderRadius: this.borderRadius - }, - data: this.dataList[3].data, - barWidth: 6 - }, - { - name: this.dataList[4].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[4].topColor }, - { offset: 1, color: this.dataList[4].bottomColor } - ]), - // borderRadius: [5, 5, 0, 0] - barBorderRadius: this.borderRadius - }, - data: this.dataList[4].data, - barWidth: 6 - }, - { - name: this.dataList[5].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[5].topColor }, - { offset: 1, color: this.dataList[5].bottomColor } - ]), - // borderRadius: [5, 5, 0, 0] - barBorderRadius: this.borderRadius - }, - data: this.dataList[5].data, - barWidth: 6 - } - ] - this.$nextTick(() => { this.initChart() }) @@ -164,8 +82,50 @@ export default { this.chart = null }, methods: { - initChart() { - console.log(1) + initChart(nameList, passRateList, outputNumList) { + let series= [ + { + name: '产线产量', + type: 'bar', + yAxisIndex: 1, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: '#9DD5FF' }, + { offset: 1, color: '#1295FF' } + ]) + // barBorderRadius: this.borderRadius + }, + barWidth: 12, + data: outputNumList + }, + { + name: '产线良品率', + type: 'line', + yAxisIndex: 0, + areaStyle: { + opacity: 0.8, + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: 'rgba(255, 209, 96, 0.18)' + }, + { + offset: 1, + color: 'rgba(255, 234, 153, 0)' + } + ]) + }, + itemStyle: { + normal: { + color: 'rgba(255, 209, 96, 1)', //改变折线点的颜色 + lineStyle: { + color: 'rgba(255, 209, 96, 1)' //改变折线颜色 + } + } + }, + data: passRateList + } + ] const colors = ['#5470C6', '#91CC75', '#EE6666'] this.chart = echarts.init(document.getElementById(this.id)) this.chart.setOption({ @@ -177,7 +137,12 @@ export default { } }, grid: { - right: '20%' + left: "4%", + right: "4%", + bottom: "3%", + width: 'auto', + height: "auto", + containLabel: true }, legend: { data: ['产线产量', '产线良品率'], @@ -205,7 +170,7 @@ export default { color: '#213259' } }, - data: ['钢一线', '钢二线', '钢三线', '钢四线', '钢五线', '钢六线', '钢七线', '钢八线'] + data: nameList }, // yAxis: { @@ -236,8 +201,7 @@ export default { axisLabel: { textStyle: { color: '#ced1d5', // 坐标值得具体的颜色 - formatter: '{value} 片' - + formatter: '{value}%' } }, splitLine: { @@ -262,7 +226,7 @@ export default { }, scale: true, type: 'value', - name: '产量/片', // y轴上方的单位 + name: '产量/㎡', // y轴上方的单位 nameTextStyle: {// y轴上方单位的颜色 color: '#fff' }, @@ -295,29 +259,7 @@ export default { // }, } ], - series: [ - { - name: '产线产量', - type: 'bar', - yAxisIndex: 1, - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: '#9DD5FF' }, - { offset: 1, color: '#1295FF' } - ]) - // barBorderRadius: this.borderRadius - }, - data: [ - 2032, 3032, 1802, 2932, 2322, 2613, 2873, 2561 - ] - }, - { - name: '产线良品率', - type: 'line', - yAxisIndex: 0, - data: [98, 97, 94, 97.6, 98.2, 98.2, 97.4, 98.5] - } - ] + series: series }) } } diff --git a/src/views/OperationalOverview/components/linearBarChart.vue b/src/views/OperationalOverview/components/linearBarChart.vue index 9dea0694..a2e9f1c1 100644 --- a/src/views/OperationalOverview/components/linearBarChart.vue +++ b/src/views/OperationalOverview/components/linearBarChart.vue @@ -41,113 +41,39 @@ export default { type: Boolean, default: false }, - nameList: { - type: Array, - default: () => [] - }, - dataList: { - type: Array, - default: () => [] - } + // nameList: { + // type: Array, + // default: () => [] + // }, + // dataList: { + // type: Array, + // default: () => [] + // } }, data() { return { chart: null, - series: [] + nameList: [], + series: [{ + type: 'bar', + data: [], + barWidth: 6 + + }] } }, mounted() { console.log('mounted') console.log('borderRadius: ', this.borderRadius) - - this.series = [ - { - name: this.dataList[0].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[0].topColor }, - { offset: 1, color: this.dataList[0].bottomColor } - ]), - barBorderRadius: this.borderRadius - }, - data: this.dataList[0].data, - barWidth: 6 - }, - { - name: this.dataList[1].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[1].topColor }, - { offset: 1, color: this.dataList[1].bottomColor } - ]), - barBorderRadius: this.borderRadius - }, - data: this.dataList[1].data, - barWidth: 6 - }, - { - name: this.dataList[2].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[2].topColor }, - { offset: 1, color: this.dataList[2].bottomColor } - ]), - // borderRadius: [5, 5, 0, 0] - barBorderRadius: this.borderRadius - }, - data: this.dataList[2].data, - barWidth: 6 - }, - { - name: this.dataList[3].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[3].topColor }, - { offset: 1, color: this.dataList[3].bottomColor } - ]), - // borderRadius: [5, 5, 0, 0] - barBorderRadius: this.borderRadius - }, - data: this.dataList[3].data, - barWidth: 6 - }, - { - name: this.dataList[4].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[4].topColor }, - { offset: 1, color: this.dataList[4].bottomColor } - ]), - // borderRadius: [5, 5, 0, 0] - barBorderRadius: this.borderRadius - }, - data: this.dataList[4].data, - barWidth: 6 - }, - { - name: this.dataList[5].name, - type: 'bar', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: this.dataList[5].topColor }, - { offset: 1, color: this.dataList[5].bottomColor } - ]), - // borderRadius: [5, 5, 0, 0] - barBorderRadius: this.borderRadius - }, - data: this.dataList[5].data, - barWidth: 6 - } - ] - - this.$nextTick(() => { - this.initChart() - }) + // console.log('33333', this.dataList) + // let arr = [] + // this.dataList.forEach(ele => { + // console.log(ele); + // this.series = [] + this.initChart() + // this.$nextTick(() => { + // // this.initChart() + // }) }, beforeDestroy() { if (!this.chart) { @@ -157,9 +83,20 @@ export default { this.chart = null }, methods: { - initChart() { - console.log(1) + initChart(nameList,dataList) { + // console.log(1) this.chart = echarts.init(document.getElementById(this.id)) + if (dataList.length !== 0) { + // this.$set(this.series, "data", dataList); + this.series = [{ + type: 'bar', + data: dataList, + barWidth: 6 + }] + } + if (nameList.length !== 0) { + this.nameList = nameList + } this.chart.setOption({ tooltip: { trigger: 'axis', @@ -216,19 +153,19 @@ export default { }, type: 'value' }, - legend: { - itemHeight: 10, - itemWidth: 10, - x: 'center', // 可设定图例在左、右、居中 - y: 'top', // 可设定图例在上、下、居中 - show: this.showLegend, - data: this.dataList, - right: '1%', - textStyle: { - fontSize: 12 * this.beilv, - color: '#ced1d5' - } - }, + // legend: { + // itemHeight: 10, + // itemWidth: 10, + // x: 'center', // 可设定图例在左、右、居中 + // y: 'top', // 可设定图例在上、下、居中 + // show: this.showLegend, + // data: this.dataList, + // right: '1%', + // textStyle: { + // fontSize: 12 * this.beilv, + // color: '#ced1d5' + // } + // }, series: this.series }) } diff --git a/src/views/OperationalOverview/components/pileBarChart.vue b/src/views/OperationalOverview/components/pileBarChart.vue new file mode 100644 index 00000000..8aa32129 --- /dev/null +++ b/src/views/OperationalOverview/components/pileBarChart.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/OperationalOverview/processingBoard.vue b/src/views/OperationalOverview/processingBoard.vue index 76e95645..96a09476 100644 --- a/src/views/OperationalOverview/processingBoard.vue +++ b/src/views/OperationalOverview/processingBoard.vue @@ -2,16 +2,16 @@ * @Author: zwq * @Date: 2021-07-19 15:18:30 * @LastEditors: zhp - * @LastEditTime: 2023-12-19 14:25:07 + * @LastEditTime: 2023-12-29 15:15:50 * @Description: -->