From 772a4b06338fabbbfd21ee7cd653ceb99a201508 Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 15 Sep 2023 14:30:19 +0800 Subject: [PATCH] bugfix zentao 1 --- .env.dev | 4 +- src/assets/styles/ruoyi.scss | 279 +++++++++--------- src/utils/dynamicProps.js | 2 - src/views/base/equipmentBindGroup/index.vue | 13 +- src/views/base/equipmentBindSection/index.vue | 12 +- src/views/base/equipmentGroup/index.vue | 16 +- .../base/equipmentGroupAlarm/dialogForm.vue | 177 +++++++++++ src/views/base/equipmentGroupAlarm/index.vue | 56 ++-- src/views/base/equipmentPlc/index.vue | 17 +- src/views/base/equipmentPlcConnect/index.vue | 67 ++++- src/views/base/equipmentPlcParam/index.vue | 29 +- src/views/core/base/equipment/index.vue | 15 +- src/views/core/base/equipmentType/index.vue | 6 +- .../equipment/analysis/efficiency/index.vue | 28 +- .../equipment/analysis/exception/index.vue | 22 +- .../equipment/analysis/quality/index.vue | 65 ++-- .../monitoring/equipmentAlarmLog/index.vue | 13 +- .../monitoring/equipmentFullParams/index.vue | 8 +- .../equipmentProcessAmount/graph.vue | 6 +- .../equipmentProcessAmount/index.vue | 10 +- .../monitoring/equipmentRecentHours/index.vue | 38 +-- .../equipmentStatusAndParams/index.vue | 10 +- .../base/qualityInspectionBoxBtn/index.vue | 40 ++- .../base/qualityInspectionDet/index.vue | 8 +- .../base/qualityInspectionType/index.vue | 8 +- .../qualityInspectionRecord/index.vue | 5 - .../monitoring/qualityRecentHours/index.vue | 1 - .../components/summaryTable.vue | 5 - .../monitoring/qualityStatistics/index.vue | 19 +- 29 files changed, 594 insertions(+), 385 deletions(-) create mode 100644 src/views/base/equipmentGroupAlarm/dialogForm.vue diff --git a/.env.dev b/.env.dev index e5856184..9a3b625b 100644 --- a/.env.dev +++ b/.env.dev @@ -12,9 +12,9 @@ ENV = 'development' VUE_APP_TITLE = 芋道管理系统 # 芋道管理系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.1.49:48080' +# VUE_APP_BASE_API = 'http://192.168.1.49:48080' # VUE_APP_BASE_API = 'http://192.168.1.8:48080' -# VUE_APP_BASE_API = 'http://192.168.0.33:48080' +VUE_APP_BASE_API = 'http://192.168.0.33:48080' # VUE_APP_BASE_API = 'http://192.168.1.188:48080' # 路由懒加载 diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index 0b790e54..17ef2e4f 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -5,110 +5,123 @@ /** 基础通用 **/ .pt5 { - padding-top: 5px; + padding-top: 5px; } .pr5 { - padding-right: 5px; + padding-right: 5px; } .pb5 { - padding-bottom: 5px; + padding-bottom: 5px; } .mt5 { - margin-top: 5px; + margin-top: 5px; } .mr5 { - margin-right: 5px; + margin-right: 5px; } .mb5 { - margin-bottom: 5px; + margin-bottom: 5px; } .mb8 { - margin-bottom: 8px; + margin-bottom: 8px; } .ml5 { - margin-left: 5px; + margin-left: 5px; } .mt10 { - margin-top: 10px; + margin-top: 10px; } .mr10 { - margin-right: 10px; + margin-right: 10px; } .mb10 { - margin-bottom: 10px; + margin-bottom: 10px; } .ml10 { - margin-left: 10px; + margin-left: 10px; } .mt20 { - margin-top: 20px; + margin-top: 20px; } .mr20 { - margin-right: 20px; + margin-right: 20px; } .mb20 { - margin-bottom: 20px; + margin-bottom: 20px; } .ml20 { - margin-left: 20px; + margin-left: 20px; } -.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { - font-family: inherit; - font-weight: 500; - line-height: 1.1; - color: inherit; +.h1, +.h2, +.h3, +.h4, +.h5, +.h6, +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; } -.el-message-box__status + .el-message-box__message{ - word-break: break-word; +.el-message-box__status + .el-message-box__message { + word-break: break-word; } .el-dialog:not(.is-fullscreen) { - margin-top: 6vh !important; + // margin-top: 6vh !important; + margin-top: 12vh !important; } .el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body { - overflow: auto; - overflow-x: hidden; - max-height: 70vh; - padding: 10px 20px 0; + overflow: auto; + overflow-x: hidden; + max-height: 70vh; + padding: 10px 20px 0; } -.el-dialog{ - display: flex; - flex-direction: column; - max-width: calc(100% - 30px); - max-height: calc(100% - 70px); - .el-dialog__body { - overflow: auto; - } +.el-dialog { + display: flex; + flex-direction: column; + max-width: calc(100% - 30px); + max-height: calc(100% - 70px); + .el-dialog__body { + overflow: auto; + } } .el-table { - .el-table__header-wrapper, .el-table__fixed-header-wrapper { - th { - word-break: break-word; - background-color: #f8f8f9; - color: #515a6e; - height: 40px; - font-size: 13px; - } - } - .el-table__body-wrapper { - .el-button [class*="el-icon-"] + span { - margin-left: 1px; - } - } + .el-table__header-wrapper, + .el-table__fixed-header-wrapper { + th { + word-break: break-word; + background-color: #f8f8f9; + color: #515a6e; + height: 40px; + font-size: 13px; + } + } + .el-table__body-wrapper { + .el-button [class*='el-icon-'] + span { + margin-left: 1px; + } + } } /** 表单布局 **/ .form-header { - font-size:15px; - color:#6379bb; - border-bottom:1px solid #ddd; - margin:8px 10px 25px 10px; - padding-bottom:5px + font-size: 15px; + color: #6379bb; + border-bottom: 1px solid #ddd; + margin: 8px 10px 25px 10px; + padding-bottom: 5px; } /** 表格布局 **/ @@ -122,169 +135,171 @@ /* tree border */ .tree-border { - margin-top: 5px; - border: 1px solid #e5e6e7; - background: #FFFFFF none; - border-radius:4px; + margin-top: 5px; + border: 1px solid #e5e6e7; + background: #ffffff none; + border-radius: 4px; } .pagination-container .el-pagination { - right: 0; - position: absolute; + right: 0; + position: absolute; } -@media ( max-width : 768px) { - .pagination-container .el-pagination > .el-pagination__jump { - display: none !important; - } - .pagination-container .el-pagination > .el-pagination__sizes { - display: none !important; - } +@media (max-width: 768px) { + .pagination-container .el-pagination > .el-pagination__jump { + display: none !important; + } + .pagination-container .el-pagination > .el-pagination__sizes { + display: none !important; + } } .el-table .fixed-width .el-button--mini { - padding-left: 0; - padding-right: 0; - width: inherit; + padding-left: 0; + padding-right: 0; + width: inherit; } /** 表格更多操作下拉样式 */ -.el-table .el-dropdown-link,.el-table .el-dropdown-selfdefine { - cursor: pointer; - margin-left: 5px; +.el-table .el-dropdown-link, +.el-table .el-dropdown-selfdefine { + cursor: pointer; + margin-left: 5px; } -.el-table .el-dropdown, .el-icon-arrow-down { - font-size: 12px; +.el-table .el-dropdown, +.el-icon-arrow-down { + font-size: 12px; } .el-tree-node__content > .el-checkbox { - margin-right: 8px; + margin-right: 8px; } .list-group-striped > .list-group-item { - border-left: 0; - border-right: 0; - border-radius: 0; - padding-left: 0; - padding-right: 0; + border-left: 0; + border-right: 0; + border-radius: 0; + padding-left: 0; + padding-right: 0; - &:not(:last-child) { - border-bottom: 1px solid #e7eaec; - } + &:not(:last-child) { + border-bottom: 1px solid #e7eaec; + } } .list-group { - padding-left: 0px; - list-style: none; + padding-left: 0px; + list-style: none; } .list-group-item { - // border-bottom: 1px solid #e7eaec; - // border-top: 1px solid #e7eaec; - margin-bottom: -1px; - padding: 11px 0px; - font-size: 13px; + // border-bottom: 1px solid #e7eaec; + // border-top: 1px solid #e7eaec; + margin-bottom: -1px; + padding: 11px 0px; + font-size: 13px; } .pull-right { - float: right !important; + float: right !important; } .el-card__header { - padding: 14px 15px 7px; - min-height: 40px; + padding: 14px 15px 7px; + min-height: 40px; } .el-card__body { - padding: 15px 20px 20px 20px; + padding: 15px 20px 20px 20px; } .card-box { - padding-right: 15px; - padding-left: 15px; - margin-bottom: 10px; + padding-right: 15px; + padding-left: 15px; + margin-bottom: 10px; } /* button color */ .el-button--cyan.is-active, .el-button--cyan:active { - background: #20B2AA; - border-color: #20B2AA; - color: #FFFFFF; + background: #20b2aa; + border-color: #20b2aa; + color: #ffffff; } .el-button--cyan:focus, .el-button--cyan:hover { - background: #48D1CC; - border-color: #48D1CC; - color: #FFFFFF; + background: #48d1cc; + border-color: #48d1cc; + color: #ffffff; } .el-button--cyan { - background-color: #20B2AA; - border-color: #20B2AA; - color: #FFFFFF; + background-color: #20b2aa; + border-color: #20b2aa; + color: #ffffff; } /* text color */ .text-navy { - color: #1ab394; + color: #1ab394; } .text-primary { - color: inherit; + color: inherit; } .text-success { - color: #1c84c6; + color: #1c84c6; } .text-info { - color: #23c6c8; + color: #23c6c8; } .text-warning { - color: #f8ac59; + color: #f8ac59; } .text-danger { - color: #ed5565; + color: #ed5565; } .text-muted { - color: #888888; + color: #888888; } /* image */ .img-circle { - border-radius: 50%; + border-radius: 50%; } .img-lg { - width: 120px; - height: 120px; + width: 120px; + height: 120px; } .avatar-upload-preview { - position: absolute; - top: 50%; - transform: translate(50%, -50%); - width: 200px; - height: 200px; - border-radius: 50%; - box-shadow: 0 0 4px #ccc; - overflow: hidden; + position: absolute; + top: 50%; + transform: translate(50%, -50%); + width: 200px; + height: 200px; + border-radius: 50%; + box-shadow: 0 0 4px #ccc; + overflow: hidden; } /* 拖拽列样式 */ -.sortable-ghost{ - opacity: .8; - color: #fff!important; - background: #42b983!important; +.sortable-ghost { + opacity: 0.8; + color: #fff !important; + background: #42b983 !important; } .top-right-btn { - position: relative; - float: right; + position: relative; + float: right; } diff --git a/src/utils/dynamicProps.js b/src/utils/dynamicProps.js index b0a9e643..e8c947d3 100644 --- a/src/utils/dynamicProps.js +++ b/src/utils/dynamicProps.js @@ -19,7 +19,6 @@ function step1(tree1) { .map((item) => ({ prop: item, label: item, - align: 'center', children: [], })); } @@ -33,7 +32,6 @@ function step2(firstTierProps, tree2) { parent.children.push({ label: nd.name, prop: `${parent.prop}-${nd.name}`, - align: 'center', }); } }); diff --git a/src/views/base/equipmentBindGroup/index.vue b/src/views/base/equipmentBindGroup/index.vue index c67c66eb..93815c64 100644 --- a/src/views/base/equipmentBindGroup/index.vue +++ b/src/views/base/equipmentBindGroup/index.vue @@ -85,12 +85,11 @@ export default { width: 180, filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), }, - { prop: 'equipmentName', label: '设备', align: 'center' }, - { prop: 'groupName', label: '分组', align: 'center' }, + { prop: 'equipmentName', label: '设备' }, + { prop: 'groupName', label: '分组' }, { _action: 'equipment-bind-group-show-alert', label: '分组报警', - align: 'center', subcomponent: { props: ['injectData'], render: function (h) { @@ -162,6 +161,9 @@ export default { label: '设备', url: '/base/equipment/page?pageNo=1&pageSize=100', prop: 'equipmentId', + bind: { + filterable: true, + }, rules: [{ required: true, message: '不能为空', trigger: 'blur' }], }, ], @@ -173,6 +175,9 @@ export default { // depends: '__product_line', // 依赖产线获取数据 // depends: 'productionLineId', prop: 'groupId', + bind: { + filterable: true, + }, rules: [{ required: true, message: '不能为空', trigger: 'blur' }], }, ], @@ -223,7 +228,7 @@ export default { /** 查询列表 */ getList() { this.loading = true; - _// 执行查询 + _; // 执行查询 getEquipmentBindGroupPage(this.queryParams).then((response) => { this.list = response.data.list; this.total = response.data.total; diff --git a/src/views/base/equipmentBindSection/index.vue b/src/views/base/equipmentBindSection/index.vue index cb46db05..22892c5a 100644 --- a/src/views/base/equipmentBindSection/index.vue +++ b/src/views/base/equipmentBindSection/index.vue @@ -83,28 +83,26 @@ export default { width: 180, filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), }, - { prop: 'productionLine', label: '产线名称', align: 'center' }, - { prop: 'workshopSection', label: '工段名称', align: 'center' }, - { prop: 'equipment', label: '设备名称', align: 'center' }, - { prop: 'sort', label: '工段中排序', align: 'center' }, + { prop: 'productionLine', label: '产线名称' }, + { prop: 'workshopSection', label: '工段名称' }, + { prop: 'equipment', label: '设备名称' }, + { prop: 'sort', label: '工段中排序' }, { prop: 'lineDataType', label: '产线数据类型', - align: 'center', filter: (val) => val != null ? ['无类型', '进口计数', '出口计数'][val] : '-', }, { prop: 'sectionDataType', label: '工段数据类型', - align: 'center', filter: (val) => val != null ? ['无类型', '进口计数', '出口计数'][val] : '-', }, // { // action: 'show-alert', // label: '报警', - // align: 'center', + // , // subcomponent: { // props: ['injectData'], // render: function (h) { diff --git a/src/views/base/equipmentGroup/index.vue b/src/views/base/equipmentGroup/index.vue index ae10d52a..8863d9d1 100644 --- a/src/views/base/equipmentGroup/index.vue +++ b/src/views/base/equipmentGroup/index.vue @@ -84,13 +84,12 @@ export default { width: 180, filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), }, - { prop: 'name', label: '设备分组名称', align: 'center' }, - { prop: 'code', label: '检测分组编码', align: 'center' }, - { prop: 'remark', label: '备注', align: 'center' }, + { prop: 'name', label: '设备分组名称' }, + { prop: 'code', label: '设备分组编码' }, + { prop: 'remark', label: '备注' }, { _action: 'equipment-group-show-alert', label: '报警', - align: 'center', subcomponent: { props: ['injectData'], render: function (h) { @@ -127,7 +126,7 @@ export default { type: 'input', label: '分组编码', placeholder: '请输入设备分组编码', - param: 'codes', + param: 'code', }, { type: 'button', @@ -172,6 +171,7 @@ export default { label: '分组编码', prop: 'code', url: '/base/equipment-group/getCode', + rules: [{ required: true, message: '不能为空', trigger: 'blur' }], }, ], [ @@ -302,11 +302,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm( - '是否确认删除设备分组(用于同类型不同厂家的设备区分)编号为"' + - id + - '"的数据项?' - ) + .confirm('是否确认删除设备分组 "' + row.name + '"?') .then(function () { return deleteEquipmentGroup(id); }) diff --git a/src/views/base/equipmentGroupAlarm/dialogForm.vue b/src/views/base/equipmentGroupAlarm/dialogForm.vue new file mode 100644 index 00000000..a0b9f55e --- /dev/null +++ b/src/views/base/equipmentGroupAlarm/dialogForm.vue @@ -0,0 +1,177 @@ + + + + + + + diff --git a/src/views/base/equipmentGroupAlarm/index.vue b/src/views/base/equipmentGroupAlarm/index.vue index 01fd0821..458c8acb 100644 --- a/src/views/base/equipmentGroupAlarm/index.vue +++ b/src/views/base/equipmentGroupAlarm/index.vue @@ -37,7 +37,7 @@ @close="cancel" @cancel="cancel" @confirm="submitForm"> - + @@ -54,10 +54,11 @@ import { import basicPageMixin from '@/mixins/lb/basicPageMixin'; import moment from 'moment'; import { publicFormatter } from '@/utils/dict'; +import DialogForm from './dialogForm.vue'; export default { name: 'EquipmentGroupAlarm', - components: {}, + components: { DialogForm }, mixins: [basicPageMixin], data() { return { @@ -84,22 +85,27 @@ export default { width: 180, filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), }, - { prop: 'code', label: '报警编码', align: 'center' }, - { prop: 'type', label: '报警类型', align: 'center' }, + { width: 240, prop: 'code', label: '报警编码' }, + { + prop: 'type', + label: '报警类型', + filter: (val) => + val != null ? ['-', '字符型', '布尔型', '-'][val] : '-', + }, { prop: 'grade', label: '报警级别', - align: 'center', filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL), }, - { prop: 'alarmCode', label: '设备报警编码', align: 'center' }, - { prop: 'plcParamName', label: '参数列名', align: 'center' }, - { prop: 'alarmContent', label: '报警内容', align: 'center' }, + { prop: 'alarmCode', label: '设备报警编码' }, + { prop: 'plcParamName', label: '参数列名' }, + { prop: 'alarmContent', label: '报警内容' }, ], searchBarFormConfig: [ { type: 'input', label: '设备分组编码', + width: '220', placeholder: '/', param: 'equipmentGroupCode', defaultSelect: null, @@ -181,14 +187,14 @@ export default { }, // 表单参数 form: { - id: undefined, - equipmentGroupId: undefined, - code: undefined, - type: undefined, - grade: undefined, - alarmCode: undefined, - alarmContent: undefined, - plcParamName: undefined, + id: null, + equipmentGroupId: null, + code: null, + type: null, + grade: null, + alarmCode: null, + alarmContent: null, + plcParamName: null, }, // // 表单校验 // rules: { @@ -249,14 +255,14 @@ export default { /** 表单重置 */ reset() { this.form = { - id: undefined, - equipmentGroupId: undefined, - code: undefined, - type: undefined, - grade: undefined, - alarmCode: undefined, - alarmContent: undefined, - plcParamName: undefined, + id: null, + equipmentGroupId: null, + code: null, + type: null, + grade: null, + alarmCode: null, + alarmContent: null, + plcParamName: null, }; this.resetForm('form'); }, @@ -321,7 +327,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除设备分组报警明细编号为"' + id + '"的数据项?') + .confirm('是否确认删除该报警?') .then(function () { return deleteEquipmentGroupAlarm(id); }) diff --git a/src/views/base/equipmentPlc/index.vue b/src/views/base/equipmentPlc/index.vue index c8327042..4fccc162 100644 --- a/src/views/base/equipmentPlc/index.vue +++ b/src/views/base/equipmentPlc/index.vue @@ -12,6 +12,7 @@ :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list" + ref="pageTable" @emitFun="handleEmitFun"> moment(val).format('yyyy-MM-DD HH:mm:ss'), // }, - { prop: 'code', label: '编码', align: 'center' }, - { prop: 'plcTableName', label: '关联表名', align: 'center' }, - { prop: 'name', label: '标识名称', align: 'center' }, - { prop: 'enName', label: '英文名称', align: 'center' }, + { prop: 'code', label: '编码' }, + { prop: 'plcTableName', label: '关联表名' }, + { prop: 'name', label: '标识名称' }, + { prop: 'enName', label: '英文名称' }, { prop: 'collection', label: '是否采集', - align: 'center', subcomponent: switchBtn, }, - { prop: 'description', label: '描述', align: 'center' }, + { prop: 'description', label: '描述' }, ], searchBarFormConfig: [ { @@ -246,7 +248,7 @@ export default { handleEmitFun({ action, payload }) { switch (action) { case 'update-collect': - this.reset(); + this.reset(); const tempForm = {}; Object.keys(this.form).forEach((key) => { tempForm[key] = payload[key]; @@ -267,6 +269,7 @@ export default { this.list = response.data.list; this.total = response.data.total; this.loading = false; + // this.tableKey = Math.random(); // method 1 }); }, /** 取消按钮 */ diff --git a/src/views/base/equipmentPlcConnect/index.vue b/src/views/base/equipmentPlcConnect/index.vue index 7554b9af..91d65fa7 100644 --- a/src/views/base/equipmentPlcConnect/index.vue +++ b/src/views/base/equipmentPlcConnect/index.vue @@ -61,7 +61,7 @@ export default { components: {}, data() { return { - searchBarKeys: ['name', 'plcTableName'], + searchBarKeys: ['equipmentId', 'plcId'], // tableBtn: [ // this.$auth.hasPermi('base:equipment-plc:update') // ? { @@ -98,18 +98,17 @@ export default { // width: 180, // filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), // }, - { prop: 'productionLine', label: '产线', align: 'center' }, - { prop: 'workshopSection', label: '工段', align: 'center' }, - { prop: 'equipmentName', label: '设备名', align: 'center' }, - { prop: 'equipmentCode', label: '设备编码', align: 'center' }, - { prop: 'plcCode', label: '关联表编码', align: 'center' }, - { prop: 'plcTableName', label: '关联表名', align: 'center' }, - { prop: 'plcName', label: '标识名称', align: 'center' }, - { prop: 'bindingParameters', label: '绑定参数数量', align: 'center' }, + { prop: 'productionLine', label: '产线' }, + { prop: 'workshopSection', label: '工段' }, + { prop: 'equipmentName', label: '设备名' }, + { prop: 'equipmentCode', label: '设备编码' }, + { prop: 'plcCode', label: '关联表编码' }, + { prop: 'plcTableName', label: '关联表名' }, + { prop: 'plcName', label: '标识名称' }, + { prop: 'bindingParameters', label: '绑定参数数量' }, { _action: 'params-bind', label: '查看绑定', - align: 'center', subcomponent: { props: ['injectData'], render: function (h) { @@ -136,16 +135,18 @@ export default { ], searchBarFormConfig: [ { - type: 'input', + type: 'select', label: '设备名', - placeholder: '请输入设备名', + placeholder: '请选择设备', param: 'equipmentId', + selectOptions: [], }, { - type: 'input', - label: '编码', - placeholder: '请输入编码', + type: 'select', + label: 'PLC编码', + placeholder: '请选择编码', param: 'plcId', + selectOptions: [], }, { type: 'button', @@ -207,8 +208,44 @@ export default { }, created() { this.getList(); + this.initSearchOptions(); }, methods: { + async getEquipmentOptions() { + const res = await this.$axios({ + url: '/base/equipment/listAll', + method: 'get', + }); + return res.data; + }, + + async getPlcOptions() { + const res = await this.$axios({ + url: '/base/equipment-plc/listAll', + method: 'get', + }); + return res.data; + }, + + /** 初始化查询条件 */ + async initSearchOptions() { + Promise.all([this.getEquipmentOptions(), this.getPlcOptions()]).then( + ([eqList, plcList]) => { + this.searchBarFormConfig[0].selectOptions = eqList.map((item) => { + return { + name: item.name, + id: item.id, + }; + }); + this.searchBarFormConfig[1].selectOptions = plcList.map((item) => { + return { + name: item.name, + id: item.id, + }; + }); + } + ); + }, /** 覆盖 handleEmitFun 的默认实现 */ handleEmitFun({ action, payload }) { switch (action) { diff --git a/src/views/base/equipmentPlcParam/index.vue b/src/views/base/equipmentPlcParam/index.vue index 161b1b76..7c94b48a 100644 --- a/src/views/base/equipmentPlcParam/index.vue +++ b/src/views/base/equipmentPlcParam/index.vue @@ -68,29 +68,27 @@ export default { // width: 180, // filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), // }, - { prop: 'plcParamName', label: '参数列名', align: 'center' }, - { prop: 'name', label: '参数名称', align: 'center' }, + { prop: 'plcParamName', label: '参数列名' }, + { prop: 'name', label: '参数名称' }, { prop: 'unit', label: '单位', - align: 'center', filter: publicFormatter('unit_dict'), }, { prop: 'collection', label: '是否采集', - align: 'center', filter: (val) => (val != null ? ['否', '是'][val] : '-'), }, - { prop: 'minValue', label: '最小值', align: 'center' }, - { prop: 'maxValue', label: '最大值', align: 'center' }, - { prop: 'defaultValue', label: '标准值', align: 'center' }, - { prop: 'description', label: '描述', align: 'center' }, - { prop: 'remark', label: '备注', align: 'center' }, + { prop: 'minValue', label: '最小值' }, + { prop: 'maxValue', label: '最大值' }, + { prop: 'defaultValue', label: '标准值' }, + { prop: 'description', label: '描述' }, + { prop: 'remark', label: '备注' }, // { // _action: 'params-bind', // label: '查看绑定', - // align: 'center', + // , // subcomponent: { // props: ['injectData'], // render: function (h) { @@ -157,7 +155,7 @@ export default { { type: 'number', message: '请输入正确的数字', - trigger: 'blur', + trigger: 'change', transform: (val) => Number(val), }, ], @@ -167,10 +165,13 @@ export default { label: '最大值', prop: 'maxValue', rules: [ + { + required: false, + }, { type: 'number', message: '请输入正确的数字', - trigger: 'blur', + trigger: 'change', transform: (val) => Number(val), }, ], @@ -349,8 +350,8 @@ export default { plcParamName: undefined, name: undefined, unit: undefined, - minValue: undefined, - maxValue: undefined, + minValue: null, + maxValue: null, defaultValue: undefined, collection: undefined, description: undefined, diff --git a/src/views/core/base/equipment/index.vue b/src/views/core/base/equipment/index.vue index b031cd65..6008213e 100644 --- a/src/views/core/base/equipment/index.vue +++ b/src/views/core/base/equipment/index.vue @@ -147,15 +147,14 @@ export default { width: 180, filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), }, - { prop: 'name', label: '设备名称', align: 'center' }, - { prop: 'code', label: '检测编码', align: 'center' }, - { prop: 'equipmentType', label: '设备类型', align: 'center' }, - { prop: 'enName', label: '英文名称', align: 'center' }, - { prop: 'abbr', label: '缩写', align: 'center' }, + { prop: 'name', label: '设备名称' }, + { prop: 'code', label: '检测编码' }, + { prop: 'equipmentType', label: '设备类型' }, + { prop: 'enName', label: '英文名称' }, + { prop: 'abbr', label: '缩写' }, { action: 'show-detail', label: '详情', - align: 'center', subcomponent: { props: ['injectData'], render: function (h) { @@ -377,8 +376,8 @@ export default { width: 180, filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), }, - { prop: 'name', label: '属性名称', align: 'center' }, - { prop: 'value', label: '属性值', align: 'center' }, + { prop: 'name', label: '属性名称' }, + { prop: 'value', label: '属性值' }, ], // 是否显示弹出层 open: false, diff --git a/src/views/core/base/equipmentType/index.vue b/src/views/core/base/equipmentType/index.vue index 8790f426..dca8a1d1 100644 --- a/src/views/core/base/equipmentType/index.vue +++ b/src/views/core/base/equipmentType/index.vue @@ -85,9 +85,9 @@ export default { width: 180, filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), }, - { prop: 'name', label: '设备类型名称', align: 'center' }, - { prop: 'code', label: '检测类型编码', align: 'center' }, - { prop: 'remark', label: '备注', align: 'center' }, + { prop: 'name', label: '设备类型名称', }, + { prop: 'code', label: '检测类型编码', }, + { prop: 'remark', label: '备注', }, ], searchBarFormConfig: [ { diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue index 23ebb70c..c8ce739c 100644 --- a/src/views/equipment/analysis/efficiency/index.vue +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -86,84 +86,72 @@ export default { // : undefined, // ].filter((v) => v), tableProps: [ - { prop: 'factoryName', label: '工厂', align: 'center' }, - { prop: 'lineName', label: '产线', align: 'center' }, - { prop: 'sectionName', label: '工段', align: 'center' }, - { prop: 'equipmentName', label: '设备', align: 'center' }, + { prop: 'factoryName', label: '工厂' }, + { prop: 'lineName', label: '产线' }, + { prop: 'sectionName', label: '工段' }, + { prop: 'equipmentName', label: '设备' }, { label: '有效时间', - align: 'center', children: [ { width: 128, prop: 'workTime', label: '工作时长', - align: 'center', }, { width: 128, prop: 'workRate', label: '百分比', - align: 'center', filter: (val) => (val != null ? +val.toFixed(3) : '-'), }, ], }, { label: '关机时间', - align: 'center', children: [ { width: 128, prop: 'stopTime', label: '停机时长', - align: 'center', }, - { width: 128, prop: 'stopRate', label: '百分比', align: 'center' }, + { width: 128, prop: 'stopRate', label: '百分比' }, ], }, { label: '中断损失', - align: 'center', children: [ { width: 128, prop: 'downTime', label: '故障时长', - align: 'center', filter: (val) => (val != null ? +val.toFixed(3) : '-'), }, - { width: 128, prop: 'downRate', label: '百分比', align: 'center' }, + { width: 128, prop: 'downRate', label: '百分比' }, { width: 128, prop: 'timeEfficiency', label: '时间开动率', - align: 'center', filter: (val) => (val != null ? +val.toFixed(3) : '-'), }, ], }, { label: '速度损失', - align: 'center', children: [ { width: 128, prop: 'realProcSpeed', label: '实际加工速度', - align: 'center', }, { width: 128, prop: 'designProcSpeed', label: '理论加工速度', - align: 'center', }, { width: 128, prop: 'peEfficiency', label: '速度开动率', - align: 'center', filter: (val) => (val != null ? +val.toFixed(3) : '-'), }, ], @@ -171,19 +159,17 @@ export default { { prop: 'oee', label: 'OEE', - align: 'center', filter: (val) => (val != null ? +val.toFixed(3) : '-'), }, { prop: 'teep', label: 'TEEP', - align: 'center', filter: (val) => (val != null ? +val.toFixed(3) : '-'), }, // { // _action: 'view-trend', // label: '趋势', - // align: 'center', + // , // subcomponent: { // props: ['injectData'], // render: function (h) { diff --git a/src/views/equipment/analysis/exception/index.vue b/src/views/equipment/analysis/exception/index.vue index c8246cdb..7498d077 100644 --- a/src/views/equipment/analysis/exception/index.vue +++ b/src/views/equipment/analysis/exception/index.vue @@ -65,24 +65,22 @@ export default { : undefined, ].filter((v) => v), tableProps: [ - { prop: 'lineName', label: '产线', align: 'center' }, - { prop: 'sectionName', label: '工段', align: 'center' }, - { prop: 'equipmentName', label: '设备', align: 'center' }, + { prop: 'lineName', label: '产线' }, + { prop: 'sectionName', label: '工段' }, + { prop: 'equipmentName', label: '设备' }, { width: 188, prop: 'mtbf', label: '平均故障间隔时间[MTBF](h)', - align: 'center', }, { width: 180, prop: 'mttr', label: '平均维修时间[MTTR](h)', - align: 'center', }, - { prop: 'workTime', label: '工作时长(h)', align: 'center' }, - { prop: 'downTime', label: '故障时长(h)', align: 'center' }, - { prop: 'downCount', label: '故障次数', align: 'center' }, + { prop: 'workTime', label: '工作时长(h)' }, + { prop: 'downTime', label: '故障时长(h)' }, + { prop: 'downCount', label: '故障次数' }, ], searchBarFormConfig: [ { @@ -162,15 +160,13 @@ export default { this.queryParams.recordTime = [ moment() .month(btn.month - 1) - .format('YYYY-MM')+'-01 00:00:00', - moment() - .month(btn.month) - .format('YYYY-MM')+'-01 00:00:00', + .format('YYYY-MM') + '-01 00:00:00', + moment().month(btn.month).format('YYYY-MM') + '-01 00:00:00', ]; } else { this.queryParams.recordTime = null; } - this.queryParams.lineId = btn.lineId || null; + this.queryParams.lineId = btn.lineId || null; this.handleQuery(); break; } diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue index 2f9dcae2..1a4adfa3 100644 --- a/src/views/equipment/analysis/quality/index.vue +++ b/src/views/equipment/analysis/quality/index.vue @@ -35,6 +35,7 @@