From 7b4cd85ba0f55f9ce872105d76f53574712a17c8 Mon Sep 17 00:00:00 2001 From: lb Date: Thu, 14 Mar 2024 14:36:52 +0800 Subject: [PATCH 1/3] 1 --- src/views/specialEquipment/check/Record.vue | 13 ++++++++++++- src/views/specialEquipment/maintain/Record.vue | 12 ++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/views/specialEquipment/check/Record.vue b/src/views/specialEquipment/check/Record.vue index aa32bf39..815f81de 100644 --- a/src/views/specialEquipment/check/Record.vue +++ b/src/views/specialEquipment/check/Record.vue @@ -49,12 +49,21 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin'; import { parseTime } from '../../core/mixins/code-filter'; import RecordDetail from './Record-detail.vue'; +import moment from 'moment'; export default { name: 'SpecialEquipmentCheckRecord', components: { RecordDetail }, mixins: [basicPageMixin], data() { + const today = new Date(); + const twoDaysAgo = new Date(today.getTime() - 2 * 24 * 60 * 60 * 1000); + twoDaysAgo.setHours(0, 0, 0, 0); + const t = [ + moment(twoDaysAgo).format('yyyy-MM-DD HH:mm:ss'), + moment(today).format('yyyy-MM-DD HH:mm:ss'), + ]; + return { detailOpen: false, addOrUpdateVisible: false, @@ -151,6 +160,7 @@ export default { endPlaceholder: '结束日期', defaultTime: ['00:00:00', '23:59:59'], param: 'actualCheckTime', + defaultSelect: t, // width: 350, }, { @@ -189,6 +199,7 @@ export default { pageSize: 10, special: true, status: 2, + actualCheckTime: t, }, // 表单参数 form: {}, @@ -204,7 +215,7 @@ export default { getList() { this.loading = true; // 执行查询 - this.recv(this.queryParams).then((response) => { + this.recv({ ...this.queryParams }).then((response) => { this.list = response.data.list; this.total = response.data.total; this.loading = false; diff --git a/src/views/specialEquipment/maintain/Record.vue b/src/views/specialEquipment/maintain/Record.vue index 87f59e7e..5e0b7a97 100644 --- a/src/views/specialEquipment/maintain/Record.vue +++ b/src/views/specialEquipment/maintain/Record.vue @@ -108,6 +108,14 @@ export default { components: { DialogForm, RecordDetail }, mixins: [basicPageMixin], data() { + const today = new Date(); + const twoDaysAgo = new Date(today.getTime() - 2 * 24 * 60 * 60 * 1000); + twoDaysAgo.setHours(0, 0, 0, 0); + const t = [ + moment(twoDaysAgo).format('yyyy-MM-DD HH:mm:ss'), + moment(today).format('yyyy-MM-DD HH:mm:ss'), + ]; + return { recordDetailVisible: false, searchBarKeys: [ @@ -301,7 +309,7 @@ export default { endPlaceholder: '结束日期', defaultTime: ['00:00:00', '23:59:59'], param: 'startTime', - defaultSelect: null, + defaultSelect: t, // width: 350, }, // { @@ -500,7 +508,7 @@ export default { pageNo: 1, pageSize: 10, maintainPlanId: null, - startTime: null, + startTime: t, // relatePlan: null, // equipmentId: null, special: true, From 67948c10cb123e857ce5c6a7f26db2c53fc0bf29 Mon Sep 17 00:00:00 2001 From: helloDy <1615073571@qq.com> Date: Thu, 14 Mar 2024 20:19:42 +0800 Subject: [PATCH 2/3] bug -- --- src/api/equipment/base/config/config.js | 20 +++- src/views/base/coreAlarmLog/index.vue | 5 +- .../components/EquipmentDrawer.vue | 24 +++- src/views/base/coreEquipment/index.vue | 1 + .../base/coreEquipmentLineBind/index.vue | 4 +- .../base/coreHotMaterial/add-or-updata.vue | 6 +- src/views/base/coreProduct/add-or-updata.vue | 4 +- .../base/coreProductionLine/add-or-updata.vue | 3 +- src/views/base/coreWorkOrder/addWorkOrder.vue | 14 ++- src/views/base/coreWorkOrder/allocation.vue | 43 +++++-- src/views/base/coreWorkOrder/detail.vue | 6 +- .../AlarmGroup/components/dialogForm.vue | 2 +- .../BindGroup/components/BasicDrawer.vue | 109 ++++++++++++++++-- .../equipment/base/config/BindGroup/index.vue | 8 +- .../DataCollection/CollectionConfig.vue | 7 +- .../config/DataCollection/add-or-updata.vue | 35 +++--- .../base/inspection/Record/index.vue | 22 ++-- .../equipment/base/maintain/Monitor/index.vue | 55 +++++---- .../maintain/PlanConfig/add-or-updata.vue | 4 +- .../equipment/base/maintain/Record/index.vue | 39 ++++--- 20 files changed, 299 insertions(+), 112 deletions(-) diff --git a/src/api/equipment/base/config/config.js b/src/api/equipment/base/config/config.js index 71f73aa9..b1afbb25 100644 --- a/src/api/equipment/base/config/config.js +++ b/src/api/equipment/base/config/config.js @@ -1,7 +1,7 @@ /* * @Author: Do not edit * @Date: 2024-02-21 13:43:02 - * @LastEditTime: 2024-02-21 15:00:17 + * @LastEditTime: 2024-03-14 19:12:31 * @LastEditors: DY * @Description: */ @@ -33,3 +33,21 @@ export function listByParentId(query) { params: query }) } + +// 获得产线工段设备树形结构 +export function getTree(query) { + return request({ + url: '/base/core-factory/getTree', + method: 'get', + params: query + }) +} + +// 获得设备分组列表 +export function getgroupAllList(query) { + return request({ + url: '/base/equipment-group/listAll', + method: 'get', + params: query + }) +} diff --git a/src/views/base/coreAlarmLog/index.vue b/src/views/base/coreAlarmLog/index.vue index e9853140..23b46378 100644 --- a/src/views/base/coreAlarmLog/index.vue +++ b/src/views/base/coreAlarmLog/index.vue @@ -32,7 +32,7 @@ import { parseTime } from '../../core/mixins/code-filter'; import { getcoreAlarmLogPage } from '@/api/base/coreAlarmLog'; -import {DICT_TYPE, getDictDatas} from "@/utils/dict"; +import {DICT_TYPE, getDictDatas, publicFormatter } from "@/utils/dict"; const tableProps = [ { @@ -50,7 +50,8 @@ const tableProps = [ }, { prop: 'alarmGrade', - label: '报警级别' + label: '报警级别', + filter: publicFormatter(DICT_TYPE.EQU_ALARM_LEVEL) }, { prop: 'alarmReason', diff --git a/src/views/base/coreEquipment/components/EquipmentDrawer.vue b/src/views/base/coreEquipment/components/EquipmentDrawer.vue index 3c58a5c9..1cbcf25f 100644 --- a/src/views/base/coreEquipment/components/EquipmentDrawer.vue +++ b/src/views/base/coreEquipment/components/EquipmentDrawer.vue @@ -7,10 +7,11 @@