diff --git a/.env.dev b/.env.dev index d6048b91..574a759f 100644 --- a/.env.dev +++ b/.env.dev @@ -9,7 +9,7 @@ ENV = 'development' # 页面标题 -VUE_APP_TITLE = 芋道管理系统 +VUE_APP_TITLE = 产线监控系统 # 芋道管理系统/开发环境 # VUE_APP_BASE_API = 'http://192.168.1.49:48080' diff --git a/.env.front b/.env.front index 9e2d4d2b..34f878c2 100644 --- a/.env.front +++ b/.env.front @@ -2,7 +2,7 @@ ENV = 'development' # 页面标题 -VUE_APP_TITLE = 芋道管理系统 +VUE_APP_TITLE = 产线监控系统 # 芋道管理系统/本地环境 VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn' diff --git a/.env.prod b/.env.prod index 4c6133c8..7ac2b7f1 100644 --- a/.env.prod +++ b/.env.prod @@ -2,7 +2,7 @@ ENV = 'production' # 页面标题 -VUE_APP_TITLE = 芋道管理系统 +VUE_APP_TITLE = 产线监控系统 # 芋道管理系统/生产环境 VUE_APP_BASE_API = '/prod-api' diff --git a/.env.stage b/.env.stage index 5942b3c6..3602a9b9 100644 --- a/.env.stage +++ b/.env.stage @@ -1,7 +1,7 @@ NODE_ENV = production # 页面标题 -VUE_APP_TITLE = 芋道管理系统 +VUE_APP_TITLE = 产线监控系统 # 测试环境配置 ENV = 'staging' diff --git a/.env.static b/.env.static index 13901cd3..35e7a28e 100644 --- a/.env.static +++ b/.env.static @@ -4,7 +4,7 @@ NODE_ENV = development ENV = 'staging' # 页面标题 -VUE_APP_TITLE = 芋道管理系统 +VUE_APP_TITLE = 产线监控系统 # 芋道管理系统/测试环境 VUE_APP_BASE_API = 'http://127.0.0.1:48080' diff --git a/public/favicon.ico b/public/favicon.ico index e2637602..e3bdd359 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/assets/icons/svg/downArrow.svg b/src/assets/icons/svg/downArrow.svg new file mode 100644 index 00000000..a7eca2c4 --- /dev/null +++ b/src/assets/icons/svg/downArrow.svg @@ -0,0 +1,13 @@ + + + 收起箭头小备份 3 + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/upArrow.svg b/src/assets/icons/svg/upArrow.svg new file mode 100644 index 00000000..7a5ae7e8 --- /dev/null +++ b/src/assets/icons/svg/upArrow.svg @@ -0,0 +1,13 @@ + + + 收起箭头小备份 11 + + + + + + + + + + \ No newline at end of file diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index b4572179..655a9ab5 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -94,7 +94,7 @@ export default { async logout() { this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => { this.$store.dispatch('LogOut').then(() => { - location.href = getPath('/index'); + location.href = getPath('/'); }) }).catch(() => {}); } diff --git a/src/router/index.js b/src/router/index.js index ca26742b..f8430b94 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -65,16 +65,17 @@ export const constantRoutes = [ hidden: true }, { - path: '', + path: '/', component: Layout, - redirect: 'index', - children: [{ - path: 'index', - component: (resolve) => require(['@/views/index'], resolve), - name: '首页', - meta: {title: '首页', icon: 'dashboard', affix: true} - } - ] + redirect: 'core/base/factory', + // children: [{ + // path: 'index', + // redirect: 'core/base/factory', + // component: (resolve) => require(['@/views/index'], resolve), + // name: '首页', + // meta: { title: '首页', icon: 'dashboard', affix: true } + // } + // ] }, { path: '/user', @@ -82,15 +83,15 @@ export const constantRoutes = [ hidden: true, redirect: 'noredirect', children: [{ - path: 'profile', - component: (resolve) => require(['@/views/system/user/profile/index'], resolve), - name: 'Profile', - meta: {title: '个人中心', icon: 'user'} - }, { - path: 'notify-message', - component: (resolve) => require(['@/views/system/notify/my/index'], resolve), - name: 'MyNotifyMessage', - meta: { title: '我的站内信', icon: 'message' }, + path: 'profile', + component: (resolve) => require(['@/views/system/user/profile/index'], resolve), + name: 'Profile', + meta: { title: '个人中心', icon: 'user' } + }, { + path: 'notify-message', + component: (resolve) => require(['@/views/system/notify/my/index'], resolve), + name: 'MyNotifyMessage', + meta: { title: '我的站内信', icon: 'message' }, }] }, { @@ -98,11 +99,11 @@ export const constantRoutes = [ component: Layout, hidden: true, children: [{ - path: 'type/data/:dictId(\\d+)', - component: (resolve) => require(['@/views/system/dict/data'], resolve), - name: 'SystemDictData', - meta: {title: '字典数据', icon: '', activeMenu: '/system/dict'} - } + path: 'type/data/:dictId(\\d+)', + component: (resolve) => require(['@/views/system/dict/data'], resolve), + name: 'SystemDictData', + meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' } + } ] }, { @@ -110,22 +111,22 @@ export const constantRoutes = [ component: Layout, hidden: true, children: [{ - path: 'log', - component: (resolve) => require(['@/views/infra/job/log'], resolve), - name: 'InfraJobLog', - meta: {title: '调度日志', activeMenu: '/infra/job'} - } + path: 'log', + component: (resolve) => require(['@/views/infra/job/log'], resolve), + name: 'InfraJobLog', + meta: { title: '调度日志', activeMenu: '/infra/job' } + } ] }, { path: '/codegen', component: Layout, hidden: true, children: [{ - path: 'edit/:tableId(\\d+)', - component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve), - name: 'InfraCodegenEditTable', - meta: {title: '修改生成配置', activeMenu: '/infra/codegen'} - } + path: 'edit/:tableId(\\d+)', + component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve), + name: 'InfraCodegenEditTable', + meta: { title: '修改生成配置', activeMenu: '/infra/codegen' } + } ] }, { @@ -134,16 +135,16 @@ export const constantRoutes = [ hidden: true, redirect: 'noredirect', children: [{ - path: 'oa/leave/create', - component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve), - name: 'BpmOALeaveCreate', - meta: {title: '发起 OA 请假', icon: 'form', activeMenu: '/bpm/oa/leave'} - }, { - path: 'oa/leave/detail', - component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve), - name: 'BpmOALeaveDetail', - meta: {title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave'} - } + path: 'oa/leave/create', + component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve), + name: 'BpmOALeaveCreate', + meta: { title: '发起 OA 请假', icon: 'form', activeMenu: '/bpm/oa/leave' } + }, { + path: 'oa/leave/detail', + component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve), + name: 'BpmOALeaveDetail', + meta: { title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave' } + } ] }, { @@ -151,31 +152,31 @@ export const constantRoutes = [ component: Layout, hidden: true, children: [{ - path: 'manager/form/edit', - component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve), - name: 'BpmFormEditor', - meta: {title: '流程表单-编辑', activeMenu: '/bpm/manager/form'} - }, { - path: 'manager/definition', - component: (resolve) => require(['@/views/bpm/definition/index'], resolve), - name: 'BpmProcessDefinition', - meta: {title: '流程定义', activeMenu: '/bpm/manager/model'} - }, { - path: 'manager/model/design', - component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve), - name: 'BpmModelEditor', - meta: {title: '设计流程', activeMenu: '/bpm/manager/model'} - }, { - path: 'process-instance/create', - component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve), - name: 'BpmProcessInstanceCreate', - meta: {title: '发起流程', activeMenu: '/bpm/task/my'} - }, { - path: 'process-instance/detail', - component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve), - name: 'BpmProcessInstanceDetail', - meta: {title: '流程详情', activeMenu: '/bpm/task/my'} - } + path: 'manager/form/edit', + component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve), + name: 'BpmFormEditor', + meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' } + }, { + path: 'manager/definition', + component: (resolve) => require(['@/views/bpm/definition/index'], resolve), + name: 'BpmProcessDefinition', + meta: { title: '流程定义', activeMenu: '/bpm/manager/model' } + }, { + path: 'manager/model/design', + component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve), + name: 'BpmModelEditor', + meta: { title: '设计流程', activeMenu: '/bpm/manager/model' } + }, { + path: 'process-instance/create', + component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve), + name: 'BpmProcessInstanceCreate', + meta: { title: '发起流程', activeMenu: '/bpm/task/my' } + }, { + path: 'process-instance/detail', + component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve), + name: 'BpmProcessInstanceDetail', + meta: { title: '流程详情', activeMenu: '/bpm/task/my' } + } ] }, { @@ -186,7 +187,7 @@ export const constantRoutes = [ path: 'value/:propertyId(\\d+)', component: (resolve) => require(['@/views/mall/product/property/value'], resolve), name: 'ProductPropertyValue', - meta: {title: '商品属性值', icon: '', activeMenu: '/product/property'} + meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' } } ] }, @@ -198,14 +199,14 @@ export const constantRoutes = [ path: 'edit/:spuId(\\d+)', component: (resolve) => require(['@/views/mall/product/spu/save'], resolve), name: 'ProductSpuUpdate', - meta: {title: '修改商品', activeMenu: '/product/spu'} + meta: { title: '修改商品', activeMenu: '/product/spu' } }, - { - path: 'add', - component: (resolve) => require(['@/views/mall/product/spu/save'], resolve), - name: 'ProductSpuCreate', - meta: {title: '添加商品', activeMenu: '/product/spu'} - } + { + path: 'add', + component: (resolve) => require(['@/views/mall/product/spu/save'], resolve), + name: 'ProductSpuCreate', + meta: { title: '添加商品', activeMenu: '/product/spu' } + } ] }, { @@ -248,6 +249,6 @@ Router.prototype.push = function push(location) { export default new Router({ base: process.env.VUE_APP_APP_NAME ? process.env.VUE_APP_APP_NAME : "/", mode: 'hash', // 去掉url中的# - scrollBehavior: () => ({y: 0}), + scrollBehavior: () => ({ y: 0 }), routes: constantRoutes }) diff --git a/src/views/base/equipmentBindGroup/index.vue b/src/views/base/equipmentBindGroup/index.vue index 33477279..bab7525f 100644 --- a/src/views/base/equipmentBindGroup/index.vue +++ b/src/views/base/equipmentBindGroup/index.vue @@ -303,7 +303,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除设备与分组绑定编号为"' + id + '"的数据项?') + .confirm('是否确认删除该分组绑定?') .then(function () { return deleteEquipmentBindGroup(id); }) diff --git a/src/views/base/equipmentPlc/index.vue b/src/views/base/equipmentPlc/index.vue index 59c6fa71..09a47404 100644 --- a/src/views/base/equipmentPlc/index.vue +++ b/src/views/base/equipmentPlc/index.vue @@ -211,6 +211,7 @@ export default { switch: true, label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集 prop: 'collection', + value: 1, bind: { 'active-value': 1, 'inactive-value': 0, diff --git a/src/views/base/equipmentPlcConnect/index.vue b/src/views/base/equipmentPlcConnect/index.vue index e6022379..5d7e72d9 100644 --- a/src/views/base/equipmentPlcConnect/index.vue +++ b/src/views/base/equipmentPlcConnect/index.vue @@ -144,7 +144,7 @@ export default { }, { type: 'select', - label: 'PLC编码', + label: '编码', placeholder: '请选择编码', param: 'plcId', selectOptions: [], @@ -184,6 +184,9 @@ export default { labelKey: `plcTableName`, url: '/base/equipment-plc/listAll', rules: [{ required: true, message: '不能为空', trigger: 'blur' }], + bind: { + filterable: true + } }, ], [ @@ -193,6 +196,9 @@ export default { prop: 'equipmentId', url: '/base/equipment/page?pageNo=1&pageSize=99', rules: [{ required: true, message: '不能为空', trigger: 'blur' }], + bind: { + filterable: true + } }, ], ], @@ -351,11 +357,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm( - '是否确认删除设备与实时采集关系表(一对多)编号为"' + - id + - '"的数据项?' - ) + .confirm('是否删除该配置?') .then(function () { return deleteEquipmentPlcConnect(id); }) diff --git a/src/views/base/equipmentPlcParam/index.vue b/src/views/base/equipmentPlcParam/index.vue index 6d932706..e2454c75 100644 --- a/src/views/base/equipmentPlcParam/index.vue +++ b/src/views/base/equipmentPlcParam/index.vue @@ -419,7 +419,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除设备数采详情编号为"' + id + '"的数据项?') + .confirm('是否确认删除"' + row.name + '"的参数绑定?') .then(function () { return deleteEquipmentPlcParam(id); }) diff --git a/src/views/energy/analysis/contrastAnalysis/components/barChart.vue b/src/views/energy/analysis/contrastAnalysis/components/barChart.vue index 846a6d2f..943c5a36 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/barChart.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/barChart.vue @@ -25,6 +25,10 @@ export default { default: () => { return [] } + }, + timeDim: { + type: String, + default: '' } }, watch: { @@ -58,32 +62,58 @@ export default { tempArr = this.chartData[0].trendRespVOList } for (let k = 0; k < tempArr.length; k++) { - xData.push(tempArr[k].time) + let time = '' + if (this.timeDim === '3') { + let year = tempArr[k].time.slice(0,4) + let weak = tempArr[k].time.slice(4,6) + time = year+' 第 '+weak+' 周' + } else { + time = tempArr[k].time + } + xData.push(time) } for (let i = 0; i < this.chartData.length; i++) { let obj = { name: this.chartData[i].objName + this.chartData[i].objCode, type: 'bar', + barMaxWidth: 20, + label: { + show: true, + position: 'top' + }, data: [] } legendData.push(this.chartData[i].objName + this.chartData[i].objCode) let temp = this.chartData[i].trendRespVOList for (let j = 0; j < temp.length; j++) { - let num = temp[j].useNum ? temp[j].useNum : 0 + let num = temp[j].useNum ? temp[j].useNum : '' obj.data.push(num) } yData.push(obj) } var option = { + color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF'], tooltip: { - trigger: 'axis' + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + grid: { + left: '4%', + right: '1%', + bottom: '1%', + containLabel: true }, legend: { data: legendData }, xAxis: { type: 'category', - data: xData + data: xData, + axisLabel: { + rotate: "45" + } }, yAxis: { type: 'value' diff --git a/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue b/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue index 35b1b108..ae958da9 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue @@ -25,6 +25,10 @@ export default { default: () => { return [] } + }, + timeDim: { + type: String, + default: '' } }, watch: { @@ -58,7 +62,15 @@ export default { tempArr = this.chartData[0].trendRespVOList } for (let k = 0; k < tempArr.length; k++) { - xData.push(tempArr[k].time) + let time = '' + if (this.timeDim === '3') { + let year = tempArr[k].time.slice(0,4) + let weak = tempArr[k].time.slice(4,6) + time = year+' 第 '+weak+' 周' + } else { + time = tempArr[k].time + } + xData.push(time) } for (let i = 0; i < this.chartData.length; i++) { let obj = { @@ -70,22 +82,35 @@ export default { legendData.push(this.chartData[i].objName + this.chartData[i].objCode) let temp = this.chartData[i].trendRespVOList for (let j = 0; j < temp.length; j++) { - let num = temp[j].useNum ? temp[j].useNum : 0 + let num = temp[j].useNum ? temp[j].useNum : '' obj.data.push(num) } yData.push(obj) } var option = { + color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF'], tooltip: { - trigger: 'axis' + trigger: 'axis', + axisPointer: { + type: 'cross' + } + }, + grid: { + left: '4%', + right: '1%', + bottom: '1%', + containLabel: true }, legend: { data: legendData }, xAxis: { type: 'category', - data: xData + data: xData, + axisLabel: { + rotate: "45" + } }, yAxis: { type: 'value' diff --git a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue index 3557d29e..4d7d48ea 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue @@ -135,7 +135,7 @@ - + -
+
- + - + - + + +
\ No newline at end of file + + \ No newline at end of file diff --git a/src/views/energy/analysis/qoqAnalysis/components/lineChart.vue b/src/views/energy/analysis/qoqAnalysis/components/lineChart.vue index 64968301..ef025963 100644 --- a/src/views/energy/analysis/qoqAnalysis/components/lineChart.vue +++ b/src/views/energy/analysis/qoqAnalysis/components/lineChart.vue @@ -57,12 +57,22 @@ export default { { name: '本期', type: 'bar', - data: [] + data: [], + barWidth: 20, + label: { + show: true, + position: 'top' + } }, { name: '上期', type: 'bar', - data: [] + data: [], + barWidth: 20, + label: { + show: true, + position: 'top' + } } ] for (let j = 0; j < arr.length; j++) { @@ -79,6 +89,7 @@ export default { // title: { // text: 'World Population' // }, + color:['#288AFF','#8EF0AB'], tooltip: { trigger: 'axis', axisPointer: { @@ -87,8 +98,8 @@ export default { }, legend: {}, grid: { - left: '3%', - right: '4%', + left: '1%', + right: '1%', bottom: '3%', containLabel: true }, diff --git a/src/views/energy/analysis/qoqAnalysis/index.vue b/src/views/energy/analysis/qoqAnalysis/index.vue index d8e9766e..25918374 100644 --- a/src/views/energy/analysis/qoqAnalysis/index.vue +++ b/src/views/energy/analysis/qoqAnalysis/index.vue @@ -3,14 +3,18 @@ - -
- +
+ +
+ +
+ +
\ No newline at end of file + + \ No newline at end of file diff --git a/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue b/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue index 6d80bd0e..e7650d8d 100644 --- a/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue +++ b/src/views/energy/analysis/yoyAnalysis/components/lineChart.vue @@ -75,6 +75,7 @@ export default { } } var option = { + color:['#FFDC94','#8EF0AB','#63BDFF','#288AFF','#7164FF','#FF6860','#FF9747','#B0EB42','#D680FF','#0043D2'], legend: { data: keys }, @@ -82,8 +83,8 @@ export default { trigger: 'axis' }, grid: { - left: '3%', - right: '4%', + left: '1%', + right: '1%', bottom: '3%', containLabel: true }, diff --git a/src/views/energy/analysis/yoyAnalysis/components/subRate.vue b/src/views/energy/analysis/yoyAnalysis/components/subRate.vue new file mode 100644 index 00000000..9aef9955 --- /dev/null +++ b/src/views/energy/analysis/yoyAnalysis/components/subRate.vue @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/src/views/energy/analysis/yoyAnalysis/index.vue b/src/views/energy/analysis/yoyAnalysis/index.vue index 2a697c6a..670c2563 100644 --- a/src/views/energy/analysis/yoyAnalysis/index.vue +++ b/src/views/energy/analysis/yoyAnalysis/index.vue @@ -2,20 +2,25 @@
-
- +
+
+ +
+ +
- - + +
+ + + diff --git a/src/views/equipment/timing-diagram/status/demo.js b/src/views/equipment/timing-diagram/status/demo.js new file mode 100644 index 00000000..e69de29b diff --git a/src/views/equipment/timing-diagram/status/gantt.js b/src/views/equipment/timing-diagram/status/gantt.js new file mode 100644 index 00000000..0875c86f --- /dev/null +++ b/src/views/equipment/timing-diagram/status/gantt.js @@ -0,0 +1,235 @@ +import * as echarts from 'echarts'; + + +function renderItem(params, api) { + var categoryIndex = api.value(0); + var start = api.coord([api.value(1), categoryIndex]); + var end = api.coord([api.value(2), categoryIndex]); + var height = api.size([0, 1])[1] * 1; + // var height = api.size([0, 1])[1] * 0.8; + // var height = 56; + var rectShape = echarts.graphic.clipRectByRect( + { + x: start[0], + y: start[1] - height / 2, + width: end[0] - start[0], + height: height, + }, + { + x: params.coordSys.x, + y: params.coordSys.y, + width: params.coordSys.width, + height: params.coordSys.height, + } + ); + return ( + rectShape && { + type: 'rect', + transition: ['shape'], + shape: rectShape, + style: api.style(), + } + ); +} + + + +/** 颜色配置 */ +const types = [ + { name: '运行', color: '#5ad8a6' }, + { name: '故障', color: '#fc9c91' }, + { name: '计划停机', color: '#000' }, +]; + + +/** 从时间戳获取 startTime */ +function getStartTime(timestamp) { + return new Date(new Date(timestamp).toLocaleDateString()).getTime(); +} + + + +export default class GanttGraph { + constructor(el) { + this.chart = null; + this.el = el; + /** 默认配置 */ + this.grid = { + top: 32, + left: 128, + right: 128, + bottom: 64, + } + this.tooltip = { + formatter: function (params) { + return ( + params.marker + + params.name + + ': ' + + new Date(params.value[1]).toLocaleTimeString() + + ' - ' + + new Date(params.value[2]).toLocaleTimeString() + ); + }, + } + this.xAxis = { + type: 'time', + min: getStartTime(1691568181000), // <=== + max: getStartTime(1691568181000 + 3600 * 24 * 1000), // <=== + splitNumber: 10, + axisLabel: { + // rotate: -15, + formatter: function (val) { + return new Date(val).toLocaleTimeString(); + }, + }, + axisTick: { + show: true, + }, + splitLine: { + show: false, + }, + } + this.yAxis = [ + { + interval: 40, + axisLine: { + lineStyle: { + color: '', + }, + }, + axisLabel: { + fontSize: 18, + }, + axisTick: { + show: false, + }, + splitLine: { + show: true, + }, + // data: [], // <==== + data: ['设备1', '设备2', '设备3', '设备4'], + }, + { + axisLine: { + lineStyle: { + color: '', + }, + }, + data: [], + }, + ] + this.series = [ + { + type: 'custom', + renderItem: renderItem, + itemStyle: { + opacity: 0.8, + }, + encode: { + x: [1, 2], + y: 0, + }, + // data: [], // <=== + data: [ + { + name: '运行', + value: [ + 0, + 1691568181000, + 1691568181000 + 60 * 60 * 1000, + 60 * 10 * 1000, + ], + itemStyle: { + normal: { + color: types[0].color, + }, + }, + }, + { + name: '计划停机', + value: [ + 0, + 1691578581000, + 1691578581000 + 10 * 60 * 1000, + 60 * 10 * 1000, + ], + itemStyle: { + normal: { + color: types[2].color, + }, + }, + }, + { + name: '运行', + value: [ + 1, + 1691568181000, + 1691568181000 + 60 * 60 * 1000, + 60 * 10 * 1000, + ], + itemStyle: { + normal: { + color: types[0].color, + }, + }, + }, + { + name: '故障', + value: [ + 2, + 1691538181000, + 1691538181000 + 60 * 60 * 1000, + 60 * 10 * 1000, + ], + itemStyle: { + normal: { + color: types[1].color, + }, + }, + }, + { + name: '运行', + value: [ + 2, + 1691578181000, + 1691578181000 + 90 * 60 * 1000, + 90 * 10 * 1000, + ], + itemStyle: { + normal: { + color: types[0].color, + }, + }, + }, + { + name: '计划停机', + value: [ + 3, + 1691528181000, + 1691528181000 + 240 * 60 * 1000, + 240 * 10 * 1000, + ], + itemStyle: { + normal: { + color: types[2].color, + }, + }, + }, + ], + }, + ] + } + + init() { + this.chart = echarts.init(this.el); + this.chart.setOption(this.getOption()) + } + + getOption() { + const { grid, xAxis, yAxis, series, tooltip } = this; + return { + grid, xAxis, yAxis, series, tooltip + } + } +} \ No newline at end of file diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue index ac4769a9..afae93a2 100644 --- a/src/views/equipment/timing-diagram/status/index.vue +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -6,7 +6,9 @@ --> + + diff --git a/src/views/quality/monitoring/qualityInspectionRecord/index.vue b/src/views/quality/monitoring/qualityInspectionRecord/index.vue index 9aef665c..8dec558e 100644 --- a/src/views/quality/monitoring/qualityInspectionRecord/index.vue +++ b/src/views/quality/monitoring/qualityInspectionRecord/index.vue @@ -39,7 +39,7 @@ @close="cancel" @cancel="cancel" @confirm="submitForm"> - +
@@ -53,14 +53,15 @@ import { getQualityInspectionRecordPage, exportQualityInspectionRecordExcel, } from '@/api/monitoring/qualityInspectionRecord'; -import Editor from '@/components/Editor'; +// import Editor from '@/components/Editor'; import moment from 'moment'; +import DialogForm from './dialogForm.vue'; import basicPageMixin from '@/mixins/lb/basicPageMixin'; export default { name: 'QualityInspectionRecord', components: { - Editor, + DialogForm, }, mixins: [basicPageMixin], data() { @@ -272,32 +273,38 @@ export default { }, created() { this.getList(); - this.getProductLineList(); + // this.getProductLineList(); }, watch: { - // 注册弹窗里产线改变时的监听事件 - 'form.productionLineId': { + form: { handler: function (val) { - if (val == null) return; - this.$axios('/base/workshop-section/listByParentId', { - params: { - id: val, - }, - }).then((response) => { - this.$set( - this.rows[1][1], // 这里索引是硬编码,所以当 this.rows 里数据顺序改变时,此处也要改 - 'options', - response.data.map((item) => { - return { - label: item.name, - value: item.id, - }; - }) - ); - }); + console.log('form change:', val); }, - immediate: true, - }, + deep: true + } + // 注册弹窗里产线改变时的监听事件 + // 'form.productionLineId': { + // handler: function (val) { + // if (val == null) return; + // this.$axios('/base/workshop-section/listByParentId', { + // params: { + // id: val, + // }, + // }).then((response) => { + // this.$set( + // this.rows[1][1], // 这里索引是硬编码,所以当 this.rows 里数据顺序改变时,此处也要改 + // 'options', + // response.data.map((item) => { + // return { + // label: item.name, + // value: item.id, + // }; + // }) + // ); + // }); + // }, + // immediate: true, + // }, }, methods: { /** 获取搜索栏的产线列表 */ @@ -366,7 +373,11 @@ export default { const id = row.id; getQualityInspectionRecord(id).then((response) => { /** 因为后端返回的时间是时间戳格式,需转换 */ - this.form = this.filterData(response.data, Object.keys(this.form)); + const info = {} + Object.keys(this.form).forEach(key => { + info[key] = response.data[key] + }); + this.form = info; this.open = true; this.title = '修改质量检查信息记录表'; }); diff --git a/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue b/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue index b982bcf0..71de4946 100644 --- a/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue +++ b/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue @@ -147,7 +147,7 @@ export default { }, yAxis: { type: 'value', - name: '单位/片', + name: '检测数量', nameTextStyle: { color: '#999', fontSize: 14, diff --git a/vue.config.js b/vue.config.js index 62d82b48..89fa889a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -8,7 +8,7 @@ function resolve(dir) { const CompressionPlugin = require('compression-webpack-plugin') -const name = process.env.VUE_APP_TITLE || '芋道管理系统' // 网页标题 +const name = process.env.VUE_APP_TITLE || '中建材智能自动化研究院有限公司' // 网页标题 const port = process.env.port || process.env.npm_config_port || 80 // 端口