diff --git a/src/pages/eam/deviceReport/myDeviceReport.vue b/src/pages/eam/deviceReport/myDeviceReport.vue
index 6a93083..ca679c2 100644
--- a/src/pages/eam/deviceReport/myDeviceReport.vue
+++ b/src/pages/eam/deviceReport/myDeviceReport.vue
@@ -59,7 +59,7 @@
ref,
getCurrentInstance
} from 'vue'
- import * as deviceApi from "@/api/device.js"
+ import * as deviceApi from "@/api/eam/device.js"
const { proxy } = getCurrentInstance()
const params = ref({
pageNo: 1,
diff --git a/src/pages/eam/repairOrder/addForm.vue b/src/pages/eam/repairOrder/addForm.vue
index 9a48d63..940be20 100644
--- a/src/pages/eam/repairOrder/addForm.vue
+++ b/src/pages/eam/repairOrder/addForm.vue
@@ -90,10 +90,10 @@
ref,
getCurrentInstance
} from 'vue'
- import * as deviceApi from "@/api/device.js"
- import * as moldApi from "@/api/mold.js"
- import * as dictApi from "@/api/dict.js"
- import * as repairOrderApi from "@/api/repairOrder.js"
+ import * as deviceApi from "@/api/eam/device.js"
+ import * as moldApi from "@/api/eam/tool.js"
+ import * as dictApi from "@/api/eam/dict.js"
+ import * as repairOrderApi from "@/api/eam/repairOrder.js"
import { useCountStore } from '@/store'
const { proxy } = getCurrentInstance()
diff --git a/src/pages/eam/repairOrder/addServiceRecord.vue b/src/pages/eam/repairOrder/addServiceRecord.vue
index f1c1f0e..576a38e 100644
--- a/src/pages/eam/repairOrder/addServiceRecord.vue
+++ b/src/pages/eam/repairOrder/addServiceRecord.vue
@@ -112,8 +112,8 @@
ref,
getCurrentInstance
} from 'vue'
- import * as repairOrderApi from "@/api/repairOrder.js"
- import * as sparePartsApi from "@/api/spareParts.js"
+ import * as repairOrderApi from "@/api/eam/repairOrder.js"
+ import * as sparePartsApi from "@/api/eam/spareParts.js"
import * as deptApi from "@/api/dept.js"
const { proxy } = getCurrentInstance()
diff --git a/src/pages/eam/repairOrder/index.vue b/src/pages/eam/repairOrder/index.vue
index fde080b..91f2e95 100644
--- a/src/pages/eam/repairOrder/index.vue
+++ b/src/pages/eam/repairOrder/index.vue
@@ -14,31 +14,28 @@
{{item.maintenanceDesc}}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
工单单号:{{item.number}}
- 类型:{{item.type=='DEVICE'?'设备':item.type=='TECH'?'工艺':'模具'}}
+ 类型:设备
- {{`${params.type=='DEVICE'?'设备':params.type=='TECH'?'工艺' : '模具'}`}}编号:{{item.deviceNumber}}
+ 设备编号:{{item.equipmentCode}}
- {{`${params.type=='DEVICE'?'设备':params.type=='TECH'?'工艺' : '模具'}`}}名称:{{item.name}}
-
-
- 所属厂区:{{item.factoryAreaName}}
-
-
- 班次:{{item.classesName}}
+ 设备名称:{{item.equipmentName}}
故障类型:{{item.faultTypeName}}
@@ -72,6 +69,7 @@
} from 'vue'
import * as repairOrderApi from "@/api/eam/repairOrder"
import { useCountStore } from '@/store'
+ import * as deviceApi from "@/api/eam/device.js"
const { proxy } = getCurrentInstance()
// 获取自定义的store
@@ -89,23 +87,37 @@
function addForm(item) {
proxy.$tab.navigateTo(`/pages/eam/repairOrder/addForm?type=${params.value.type}&data=${encodeURIComponent(JSON.stringify(item))}`)
}
-
async function getList() {
- if (status.value == 'nomore') return;
- status.value = 'loading';
- proxy.$modal.loading('加载中')
- await repairOrderApi.repairOrderPage(params.value,params.value.type).then((res) => {
- proxy.$modal.closeLoading()
- if (res.data.list.length > 0) {
- list.value = list.value.concat(res.data.list);
- params.value.pageNo++;
- status.value = 'loadmore'
- } else {
- status.value = 'nomore'
- }
- }).catch(() => {
- proxy.$modal.closeLoading()
- })
+ if (status.value === 'nomore') return;
+
+ status.value = 'loading';
+ proxy.$modal.loading('加载中');
+
+ try {
+ const res = await repairOrderApi.repairOrderPage(params.value, params.value.type);
+ const resp = await deviceApi.deviceNoPage();
+
+ proxy.$modal.closeLoading();
+
+ if (res.data.list.length > 0) {
+ // 匹配并设置 equipmentName
+ res.data.list.forEach(element => {
+ const matchedItem = resp.data.find(item => item.equipmentCode === element.code);
+ if (matchedItem) {
+ element.equipmentName = matchedItem.name;
+ }
+ });
+
+ list.value = list.value.concat(res.data.list);
+ params.value.pageNo++;
+ status.value = 'loadmore';
+ } else {
+ status.value = 'nomore';
+ }
+ } catch (error) {
+ proxy.$modal.closeLoading();
+ console.error('Error fetching data:', error);
+ }
}
onLoad((option) => {
if (option.type) params.value.type = option.type;
diff --git a/src/pages/eam/repairOrder/myRepairRequest.vue b/src/pages/eam/repairOrder/myRepairRequest.vue
index 90997c2..e8351b6 100644
--- a/src/pages/eam/repairOrder/myRepairRequest.vue
+++ b/src/pages/eam/repairOrder/myRepairRequest.vue
@@ -30,7 +30,7 @@
}
-