From 89e51af775e9bc494df1be9e138fa7cfa35546ee Mon Sep 17 00:00:00 2001 From: zwq Date: Wed, 3 Apr 2024 15:11:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/oth/equipment.js | 49 +++++ src/views/asrs/device/HisRepair.vue | 147 ------------- src/views/asrs/device/add-or-updata.vue | 85 ++++++++ .../device/mesEquipmentPartsMaintenance.vue | 204 ++++++++++++++++++ ...ue => mesEquipmentPartsMaintenanceLog.vue} | 78 +++---- src/views/asrs/mixins/code-filter.js | 7 +- 6 files changed, 383 insertions(+), 187 deletions(-) create mode 100644 src/api/oth/equipment.js delete mode 100644 src/views/asrs/device/HisRepair.vue create mode 100644 src/views/asrs/device/add-or-updata.vue create mode 100644 src/views/asrs/device/mesEquipmentPartsMaintenance.vue rename src/views/asrs/device/{repair.vue => mesEquipmentPartsMaintenanceLog.vue} (66%) diff --git a/src/api/oth/equipment.js b/src/api/oth/equipment.js new file mode 100644 index 0000000..fc93045 --- /dev/null +++ b/src/api/oth/equipment.js @@ -0,0 +1,49 @@ +/* + * @Author: zwq + * @Date: 2024-04-02 14:13:57 + * @LastEditors: zwq + * @LastEditTime: 2024-04-03 10:54:07 + * @Description: + */ +import request from '@/utils/request' + +// 获得设备保养记录日志分页 +export function getEquipmentLogPage(query) { + return request({ + url: '/asrs/mes-equipment-parts-maintenance-log/page', + method: 'get', + params: query + }) +} +// 获得设备保养操作日志分页 +export function getEquipmentPage(query) { + return request({ + url: '/asrs/mes-equipment-parts-maintenance/page', + method: 'get', + params: query + }) +} +// 润滑 +export function update(data) { + return request({ + url: '/asrs/mes-equipment-parts-maintenance/oiling', + method: 'post', + data: data + }) +} +// 更换 +export function up(data) { + return request({ + url: '/asrs/mes-equipment-parts-maintenance/update', + method: 'post', + data: data + }) +} +// 清洗 +export function clean(data) { + return request({ + url: '/asrs/mes-equipment-parts-maintenance/clean', + method: 'post', + data: data + }) +} diff --git a/src/views/asrs/device/HisRepair.vue b/src/views/asrs/device/HisRepair.vue deleted file mode 100644 index ea756ab..0000000 --- a/src/views/asrs/device/HisRepair.vue +++ /dev/null @@ -1,147 +0,0 @@ - - - diff --git a/src/views/asrs/device/add-or-updata.vue b/src/views/asrs/device/add-or-updata.vue new file mode 100644 index 0000000..55d0906 --- /dev/null +++ b/src/views/asrs/device/add-or-updata.vue @@ -0,0 +1,85 @@ + + + + diff --git a/src/views/asrs/device/mesEquipmentPartsMaintenance.vue b/src/views/asrs/device/mesEquipmentPartsMaintenance.vue new file mode 100644 index 0000000..b7d89e5 --- /dev/null +++ b/src/views/asrs/device/mesEquipmentPartsMaintenance.vue @@ -0,0 +1,204 @@ + + + diff --git a/src/views/asrs/device/repair.vue b/src/views/asrs/device/mesEquipmentPartsMaintenanceLog.vue similarity index 66% rename from src/views/asrs/device/repair.vue rename to src/views/asrs/device/mesEquipmentPartsMaintenanceLog.vue index 598cf3a..9b50aed 100644 --- a/src/views/asrs/device/repair.vue +++ b/src/views/asrs/device/mesEquipmentPartsMaintenanceLog.vue @@ -9,8 +9,7 @@ :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" - :table-data="tableData"> - + :table-data="tableData"> import basicPage from '../mixins/basic-page'; +import codeFilter from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter'; -import { getHeavenlyEyeLogPage } from '@/api/oth/heavenlyEyeLog'; +import { getEquipmentLogPage } from '@/api/oth/equipment'; const tableProps = [ { - prop: 'reqInterface', - label: '请求接口', + prop: 'partCode', + label: '部件编号', }, { - prop: 'reqParameter', - label: '请求参数', + prop: 'partName', + label: '部件名称', }, { - prop: 'errorCode', - label: '返回编码', + prop: 'maintenanceType', + label: '保养类型', + filter: codeFilter('maintenanceType'), }, { - prop: 'cmd', - label: '返回请求接口', + prop: 'maintenanceTime', + label: '保养时间', + filter: (val)=>parseTime(val,'{y}-{m}-{d}'), + }, +]; + +const mainTaskType = [ + { + name: '更换', + id: 1, }, { - prop: 'msgId', - label: '返回msgId', + name: '清洗', + id: 2, }, { - prop: 'retStatus', - label: '返回状态', - }, - { - prop: 'fastName', - label: '返回指定区域', - }, - { - prop: 'areaName', - label: '返回复合区域', - }, - { - prop: 'list', - label: '返回集合', - }, - { - prop: 'createTime', - label: '时间', - filter: parseTime, + name: '润滑', + id: 3, }, ]; export default { @@ -72,7 +64,7 @@ export default { data() { return { urlOptions: { - getDataListURL: getHeavenlyEyeLogPage, + getDataListURL: getEquipmentLogPage, }, tableProps, tableData: [], @@ -100,6 +92,13 @@ export default { endPlaceholder: '结束时间', param: 'searchTime', }, + { + type: 'select', + label: '保养类型', + selectOptions: mainTaskType, + param: 'type', + defaultSelect: '', + }, { type: 'button', btnName: '搜索', @@ -115,18 +114,19 @@ export default { }; }, components: {}, - created() {}, + created() { + this.listQuery.warehouseId = undefined; + }, methods: { buttonClick(val) { switch (val.btnName) { case 'search': this.listQuery.pageNo = 1; this.listQuery.pageSize = 10; - this.listQuery.reqInterface = val.code; - this.listQuery.reqParameter = val.name; - this.listQuery.createTime = val.searchTime; - this.listQuery.startTime = val.searchTime ? val.searchTime[0] : ''; - this.listQuery.endTime = val.searchTime ? val.searchTime[1] : ''; + this.listQuery.partCode = val.code; + this.listQuery.partName = val.name; + this.listQuery.maintenanceTime = val.searchTime; + this.listQuery.maintenanceType = val.type; this.getDataList(); break; case 'reset': diff --git a/src/views/asrs/mixins/code-filter.js b/src/views/asrs/mixins/code-filter.js index eb1e6bd..9dacf90 100644 --- a/src/views/asrs/mixins/code-filter.js +++ b/src/views/asrs/mixins/code-filter.js @@ -2,7 +2,7 @@ /* * @Date: 2020-12-29 16:49:28 * @LastEditors: zwq - * @LastEditTime: 2024-03-13 14:22:22 + * @LastEditTime: 2024-04-02 14:16:16 * @FilePath: \basic-admin\src\filters\basicData\index.js * @Description: */ @@ -56,6 +56,11 @@ const table = { 1: '否', 2: '是', }, + maintenanceType: { + 1: '更换', + 2: '清洗', + 3: '润滑', + }, specification:{ 0: '卷', },