Переглянути джерело

pms 保养查询 显示 工单状态

zhangcl 2 днів тому
батько
коміт
415430bbae

+ 2 - 0
src/api/pms/device/index.ts

@@ -40,6 +40,8 @@ export interface IotDeviceVO {
   lat: number
   lng: number
   hasSetMaintenanceBom: boolean // 当前设备是否已经配置了保养BOM
+  shouldWorkOrder: boolean // 当前设备根据保养规则应当生成保养工单
+  runningWorkOrder: boolean // 当前设备是否已经有待执行的保养工单
 }
 
 // 设备台账 API

+ 3 - 1
src/locales/en.ts

@@ -1040,7 +1040,9 @@ export default {
     accumulatedRunTime: 'COT',
     accumulatedMileage: 'COK',
     runningTimeCycleError: 'MCT must be greater than 0',
-    maintenanceQuery: 'Maintenance Query'
+    maintenanceQuery: 'Maintenance Query',
+    notGenerated: "Not Generated",
+    generatedNotExecuted: "Not Executed"
   },
   inspect:{
     InspectionItems:'InspectionItems',

+ 3 - 1
src/locales/ru.ts

@@ -981,7 +981,9 @@ export default {
     accumulatedRunTime: '累计运行时长',
     accumulatedMileage: '累计运行公里数',
     runningTimeCycleError: '运行时间周期必须大于0',
-    maintenanceQuery: '保养查询'
+    maintenanceQuery: '保养查询',
+    notGenerated: "未生成工单",
+    generatedNotExecuted: "已生成工单未执行"
   },
   inspect:{
     InspectionItems:'巡检项',

+ 3 - 1
src/locales/zh-CN.ts

@@ -1035,7 +1035,9 @@ export default {
     accumulatedRunTime: '累计运行时长',
     accumulatedMileage: '累计运行公里数',
     runningTimeCycleError: '运行时间周期必须大于0',
-    maintenanceQuery: '保养查询'
+    maintenanceQuery: '保养查询',
+    notGenerated: "未生成工单",
+    generatedNotExecuted: "已生成工单未执行"
   },
   inspect:{
     InspectionItems:'巡检项',

+ 13 - 1
src/views/pms/iotmainworkorder/IotDeviceMainAlarm.vue

@@ -89,7 +89,19 @@
               <dict-tag :type="DICT_TYPE.PMS_DEVICE_STATUS" :value="scope.row.deviceStatus" />
             </template>
           </el-table-column>
-          <el-table-column :label="t('monitor.operation')" align="center" min-width="120px">
+          <!-- 工单状态列 -->
+          <el-table-column :label="t('operationFill.status')" align="center">
+            <template #default="scope">
+              <span v-if="scope.row.shouldWorkOrder && scope.row.runningWorkOrder">
+                {{ t('mainPlan.generatedNotExecuted') }}
+              </span>
+              <span v-else-if="scope.row.shouldWorkOrder && !scope.row.runningWorkOrder">
+                {{ t('mainPlan.notGenerated') }}
+              </span>
+              <span v-else>-</span>
+            </template>
+          </el-table-column>
+          <el-table-column :label="t('monitor.operation')" align="center" min-width="60px">
             <template #default="scope">
               <el-button
                 link

+ 2 - 2
src/views/pms/iotprojecttaskschedule/IotProjectTaskScheduleForm.vue

@@ -48,7 +48,7 @@
   </Dialog>
 </template>
 <script setup lang="ts">
-import { IotProjectTaskScheduleApi, IotProjectTaskScheduleVO } from '@/api/rq/iotprojecttaskschedule'
+import { IotProjectTaskScheduleApi, IotProjectTaskScheduleVO } from '@/api/pms/iotprojecttaskschedule'
 
 /** 项目任务时间表/施工进度 表单 */
 defineOptions({ name: 'IotProjectTaskScheduleForm' })
@@ -130,4 +130,4 @@ const resetForm = () => {
   }
   formRef.value?.resetFields()
 }
-</script>
+</script>

+ 2 - 2
src/views/pms/iotprojecttaskschedule/index.vue

@@ -169,7 +169,7 @@
 <script setup lang="ts">
 import { dateFormatter } from '@/utils/formatTime'
 import download from '@/utils/download'
-import { IotProjectTaskScheduleApi, IotProjectTaskScheduleVO } from '@/api/rq/iotprojecttaskschedule'
+import { IotProjectTaskScheduleApi, IotProjectTaskScheduleVO } from '@/api/pms/iotprojecttaskschedule'
 import IotProjectTaskScheduleForm from './IotProjectTaskScheduleForm.vue'
 
 /** 项目任务时间表/施工进度 列表 */
@@ -258,4 +258,4 @@ const handleExport = async () => {
 onMounted(() => {
   getList()
 })
-</script>
+</script>