From 3668f92731438b25d192b759ba7429219e922be2 Mon Sep 17 00:00:00 2001 From: g7hoo Date: Thu, 1 Sep 2022 09:04:45 +0800 Subject: [PATCH] clean code --- TODO.md | 5 +++ src/views/modules/monitoring/equipment.vue | 3 -- .../modules/monitoring/equipmentAlarmLog.vue | 24 +------------- .../monitoring/equipmentGroupAlarm.vue | 17 ---------- src/views/modules/monitoring/equipmentPlc.vue | 13 -------- .../monitoring/equipmentPlcConnect.vue | 4 --- .../modules/monitoring/equipmentPlcParam.vue | 7 ----- .../modules/monitoring/equipmentattr.vue | 9 ------ .../monitoring/qualityInspectionRecord.vue | 3 -- .../modules/monitoring/reportCategory.vue | 6 ---- src/views/modules/monitoring/reportDesign.vue | 1 - src/views/modules/monitoring/reportSheet.vue | 10 ------ .../monitoring/reportSheetCategory.vue | 12 ------- .../modules/monitoring/workShopSection.vue | 1 - .../monitoring/workShopSectionEquipment.vue | 31 +------------------ 15 files changed, 7 insertions(+), 139 deletions(-) create mode 100644 TODO.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..f845bbd --- /dev/null +++ b/TODO.md @@ -0,0 +1,5 @@ +# TODO List + +1. 按钮加权限 +2. 国际化 +3. 表格高度 \ No newline at end of file diff --git a/src/views/modules/monitoring/equipment.vue b/src/views/modules/monitoring/equipment.vue index 74e4086..e6f13ff 100644 --- a/src/views/modules/monitoring/equipment.vue +++ b/src/views/modules/monitoring/equipment.vue @@ -187,9 +187,6 @@ const addOrUpdateConfigs = { }, { name: 'remark', label: '备注 ' } ], - // TODO: 富文本 √ - // TODO: 设备资料上传 √ - // TODO: 设备图片上传 √ extraComponents: [ { name: 'description', diff --git a/src/views/modules/monitoring/equipmentAlarmLog.vue b/src/views/modules/monitoring/equipmentAlarmLog.vue index bbe63ab..2968107 100644 --- a/src/views/modules/monitoring/equipmentAlarmLog.vue +++ b/src/views/modules/monitoring/equipmentAlarmLog.vue @@ -9,29 +9,7 @@ 新增 - + (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') }, - // { prop: 'name', name: '属性名', formField: true, rules: [{ required: true, message: '必填', trigger: 'blur' }] }, - // { prop: 'code', name: '属性值', formField: true }, - // { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } - // ] - // } } export default { diff --git a/src/views/modules/monitoring/equipmentPlcConnect.vue b/src/views/modules/monitoring/equipmentPlcConnect.vue index ad9b078..3d4ec46 100644 --- a/src/views/modules/monitoring/equipmentPlcConnect.vue +++ b/src/views/modules/monitoring/equipmentPlcConnect.vue @@ -108,10 +108,6 @@ const addOrUpdateConfigs = { { value: 1, label: '采集' } ] }, - // { prop: 'collectionCycle', name: '采集周期(s) 暂不使用' }, - // { prop: 'reportingCycle', name: '上报周期(s) 暂不使用' }, - // { prop: 'reportingMethod', name: '上报方式 暂不使用' }, - // { prop: 'reportingCode', name: '上报编码 暂不使用' }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] } diff --git a/src/views/modules/monitoring/equipmentPlcParam.vue b/src/views/modules/monitoring/equipmentPlcParam.vue index ae34fc9..d43364d 100644 --- a/src/views/modules/monitoring/equipmentPlcParam.vue +++ b/src/views/modules/monitoring/equipmentPlcParam.vue @@ -48,15 +48,8 @@ const tableConfigs = [ { prop: 'defaultValue', name: '参数设定标准值' }, { prop: 'description', name: '描述' }, { prop: 'enabled', name: '启用状态', filter: val => ['停用', '启用'][+val] }, - // { prop: 'enabled', name: '启用状态:0 、停用,1、启用' }, { prop: 'remark', name: '备注' }, - // { prop: 'createTime', name: '添加时间' }, { prop: 'collection', name: '是否采集', filter: val => ['不采集', '采集'][+val] } - // { prop: 'collectionCycle', name: '采集周期(s) 暂不使用' }, - // { prop: 'reportingCycle', name: '上报周期(s) 暂不使用' }, - // { prop: 'reportingMethod', name: '上报方式 暂不使用' }, - // { prop: 'reportingCode', name: '上报编码 暂不使用' }, - // { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] export default { diff --git a/src/views/modules/monitoring/equipmentattr.vue b/src/views/modules/monitoring/equipmentattr.vue index cb4f8ef..35a2769 100644 --- a/src/views/modules/monitoring/equipmentattr.vue +++ b/src/views/modules/monitoring/equipmentattr.vue @@ -59,15 +59,6 @@ const tableConfigs = [ { prop: 'equipmentId', name: '设备ID' }, { prop: 'attrName', name: '属性名' }, { prop: 'attrValue', name: '属性值' }, - // { "prop": "id", "name": "ID" }, - // { "prop": "remark", "name": "备注" }, - // { "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" }, - // { "prop": "creatorId", "name": "创建人" }, - // { "prop": "creatorName", "name": "创建人姓名" }, - // { "prop": "updaterId", "name": "更新人" }, - // { "prop": "updaterName", "name": "更新人姓名" }, - // { "prop": "updateTime", "name": "更新时间" }, - // { prop: 'version', name: '版本号' }, { prop: 'operations', name: '操作', diff --git a/src/views/modules/monitoring/qualityInspectionRecord.vue b/src/views/modules/monitoring/qualityInspectionRecord.vue index 7ac7a19..3b1d3a5 100644 --- a/src/views/modules/monitoring/qualityInspectionRecord.vue +++ b/src/views/modules/monitoring/qualityInspectionRecord.vue @@ -48,15 +48,12 @@ const tableConfigs = [ { prop: 'inspectionDetContent', name: '检测内容' - // "name": "检测内容(设备推送消息时,可能无对应id,只填这个字段)" }, { prop: 'checkTime', name: '检测时间' }, { prop: 'productionId', name: '产线id' }, { prop: 'sectionId', name: '工段id' }, { prop: 'checkPerson', name: '检测人员' }, - // { prop: 'checkPerson', name: '检测人员,可以多个' }, { prop: 'source', name: '来源', filter: val => ({ 1: '手动', 2: '自动' }[val]) }, - // { prop: 'source', name: '来源 1,手动(默认) 2,自动' }, { prop: 'explainText', name: '描述' }, { prop: 'remark', name: '备注' }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } diff --git a/src/views/modules/monitoring/reportCategory.vue b/src/views/modules/monitoring/reportCategory.vue index fc804d3..1827aab 100644 --- a/src/views/modules/monitoring/reportCategory.vue +++ b/src/views/modules/monitoring/reportCategory.vue @@ -37,9 +37,6 @@ import { calcMaxHeight } from '@/utils' const tableConfigs = [ { prop: 'createTime', name: '添加时间' }, { prop: 'name', name: '分类名称' }, - // { prop: 'code', name: '分类编码' }, - // 'description', - // 'remark', { prop: 'operations', name: '操作', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] @@ -48,9 +45,6 @@ const addOrUpdateConfigs = { infoUrl: '/monitoring/reportSheetCategory', fields: [ { name: 'name', label: '分类名称', required: true, span: 24 } - // { name: 'code', label: '分类编码', required: true }, - // { name: 'description', label: '描述' }, - // { name: 'remark', label: '备注' } ], operations: [ { name: 'cancel', url: true, showAlways: true }, diff --git a/src/views/modules/monitoring/reportDesign.vue b/src/views/modules/monitoring/reportDesign.vue index 2f7ab10..93a9328 100644 --- a/src/views/modules/monitoring/reportDesign.vue +++ b/src/views/modules/monitoring/reportDesign.vue @@ -22,7 +22,6 @@ export default { this.url += name ? '?_u=db:' + this.$route.query.name : '' const ifream = document.getElementById('zgboke') - console.log('url: ', this.url) ifream.onload = function() { console.log('加载完成') vm.loading = false diff --git a/src/views/modules/monitoring/reportSheet.vue b/src/views/modules/monitoring/reportSheet.vue index c25e41b..a8e765d 100644 --- a/src/views/modules/monitoring/reportSheet.vue +++ b/src/views/modules/monitoring/reportSheet.vue @@ -38,21 +38,11 @@ const tableConfigs = [ { prop: 'name', name: '报表名称' }, { prop: 'code', name: '报表编码' }, { prop: 'category', name: '报表分类' }, - // { prop: 'id', name: 'ID' }, - // { prop: 'category', name: '分类:关联report_sheet_category' }, { prop: 'fileName', name: '文件名称' }, { prop: 'url', name: '链接地址' }, { prop: 'description', name: '描述' }, { prop: 'remark', name: '备注' }, { prop: 'content', name: '报表内容' }, - // { prop: 'enabled', name: '启用状态:0 、停用,1、启用' }, - // { prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' }, - // { prop: 'creatorId', name: '创建人' }, - // { prop: 'creatorName', name: '创建人姓名' }, - // { prop: 'updaterId', name: '更新人' }, - // { prop: 'updaterName', name: '更新人姓名' }, - // { prop: 'updateTime', name: '更新时间' }, - // { prop: 'version', name: '版本号' }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] diff --git a/src/views/modules/monitoring/reportSheetCategory.vue b/src/views/modules/monitoring/reportSheetCategory.vue index 6baa772..38c9ee0 100644 --- a/src/views/modules/monitoring/reportSheetCategory.vue +++ b/src/views/modules/monitoring/reportSheetCategory.vue @@ -60,18 +60,6 @@ const tableConfigs = [ { prop: 'createTime', name: '添加时间' }, { prop: 'name', name: '分类名称' }, { prop: 'code', name: '分类编码' }, - // { "prop": "id", "name": "ID" }, - // { "prop": "description", "name": "描述" }, - // { "prop": "externalCode", "name": "外部编码,用于对照外部系统的编码" }, - // { "prop": "enabled", "name": "启用状态:0 、停用,1、启用" }, - // { "prop": "remark", "name": "备注" }, - // { "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" }, - // { "prop": "creatorId", "name": "创建人" }, - // { "prop": "creatorName", "name": "创建人姓名" }, - // { "prop": "updaterId", "name": "更新人" }, - // { "prop": "updaterName", "name": "更新人姓名" }, - // { "prop": "updateTime", "name": "更新时间" }, - // { prop: 'version', name: '版本号' }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] diff --git a/src/views/modules/monitoring/workShopSection.vue b/src/views/modules/monitoring/workShopSection.vue index 4c5df81..e37f1e3 100644 --- a/src/views/modules/monitoring/workShopSection.vue +++ b/src/views/modules/monitoring/workShopSection.vue @@ -38,7 +38,6 @@ const tableConfigs = [ { prop: 'createTime', name: '添加时间' }, { prop: 'name', name: '工段名称' }, { prop: 'code', name: '工段编码' }, - // { prop: 'productionLineId', name: '产线ID' }, { prop: 'productionLineName', name: '产线' }, { prop: 'remark', name: '备注' }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } diff --git a/src/views/modules/monitoring/workShopSectionEquipment.vue b/src/views/modules/monitoring/workShopSectionEquipment.vue index 7ef83ee..c992bf3 100644 --- a/src/views/modules/monitoring/workShopSectionEquipment.vue +++ b/src/views/modules/monitoring/workShopSectionEquipment.vue @@ -9,28 +9,7 @@ 新增 - +