|
@@ -85,17 +85,16 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" align="center" min-width="120px">
|
|
<el-table-column label="操作" align="center" min-width="120px">
|
|
- <!-- <template #default="scope">
|
|
|
|
-
|
|
|
|
|
|
+ <template #default="scope">
|
|
<el-button
|
|
<el-button
|
|
link
|
|
link
|
|
type="primary"
|
|
type="primary"
|
|
- @click="handleView(scope.row.id)"
|
|
|
|
|
|
+ @click="detail(scope.row)"
|
|
v-hasPermi="['rq:iot-device:query']"
|
|
v-hasPermi="['rq:iot-device:query']"
|
|
>
|
|
>
|
|
- 调整记录
|
|
|
|
|
|
+ 详情
|
|
</el-button>
|
|
</el-button>
|
|
- </template> -->
|
|
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
@@ -286,10 +285,18 @@ const handleUpload = (id: number) => {
|
|
const currentDeviceId = ref() // 设备id
|
|
const currentDeviceId = ref() // 设备id
|
|
const drawerVisible = ref<boolean>(false)
|
|
const drawerVisible = ref<boolean>(false)
|
|
const showDrawer = ref()
|
|
const showDrawer = ref()
|
|
-const handleView = async (deviceId) => {
|
|
|
|
- currentDeviceId.value = deviceId
|
|
|
|
- drawerVisible.value = true
|
|
|
|
- showDrawer.value.openDrawer()
|
|
|
|
|
|
+
|
|
|
|
+const detail = (row: any) => {
|
|
|
|
+ // 如果有工单ID,跳转到保养工单详情页
|
|
|
|
+ if (row.workOrderId) {
|
|
|
|
+ push({ name: 'IotMainWorkOrderDetail', params: { id: row.workOrderId } })
|
|
|
|
+ } else if (row.planId) {
|
|
|
|
+ // 如果有计划ID,跳转到保养计划详情页
|
|
|
|
+ push({ name: 'IotMaintenancePlanDetail', params: { id: row.planId } })
|
|
|
|
+ }else {
|
|
|
|
+ // 两者都为空的情况处理
|
|
|
|
+ message.warning('当前设备无保养工单或保养计划')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|