|
@@ -105,24 +105,40 @@
|
|
/>
|
|
/>
|
|
<el-table-column :label="t('operationFill.operation')" align="center" min-width="120px">
|
|
<el-table-column :label="t('operationFill.operation')" align="center" min-width="120px">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button
|
|
|
|
- link
|
|
|
|
- type="primary"
|
|
|
|
- @click="openWrite(scope.row.deptId+','+scope.row.userId+','+scope.row.createTime
|
|
|
|
- +','+scope.row.id+','+scope.row.orderStatus)"
|
|
|
|
- v-hasPermi="['rq:iot-opeation-fill:update']"
|
|
|
|
- v-if="scope.row.orderStatus !== 1"
|
|
|
|
- >
|
|
|
|
- {{t('operationFill.fill')}}
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- link
|
|
|
|
- type="success"
|
|
|
|
- @click="openWrite(scope.row.deptId+','+scope.row.userId+','+scope.row.createTime+','+scope.row.id+','+scope.row.orderStatus)"
|
|
|
|
- v-else
|
|
|
|
- >
|
|
|
|
- {{t('operationFill.view')}}
|
|
|
|
- </el-button>
|
|
|
|
|
|
+
|
|
|
|
+ <div v-if="scope.row.orderStatus !== 1">
|
|
|
|
+ <el-button
|
|
|
|
+ link
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="openWrite(scope.row.deptId+','+scope.row.userId+','+scope.row.createTime+','+scope.row.id+','+scope.row.orderStatus)"
|
|
|
|
+ v-hasPermi="['rq:iot-opeation-fill:update']"
|
|
|
|
+ v-if="scope.row.orderStatus !== 1"
|
|
|
|
+ >
|
|
|
|
+ {{t('operationFill.fill')}}
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>
|
|
|
|
+ <el-button
|
|
|
|
+ link
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="openWrite(scope.row.deptId+','+scope.row.userId+','+scope.row.createTime+','+scope.row.id+','+0)"
|
|
|
|
+ v-hasPermi="['rq:iot-opeation-fill:update']"
|
|
|
|
+ v-if="isSameDay(scope.row.createTime)"
|
|
|
|
+ >
|
|
|
|
+ {{t('fault.edit')}}
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ link
|
|
|
|
+ type="success"
|
|
|
|
+ @click="openWrite(scope.row.deptId+','+scope.row.userId+','+scope.row.createTime+','+scope.row.id+','+scope.row.orderStatus)"
|
|
|
|
+ >
|
|
|
|
+ {{t('operationFill.view')}}
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- 编辑按钮 -->
|
|
|
|
+
|
|
|
|
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -151,7 +167,6 @@ import DeptTree from "@/views/system/user/DeptTree.vue";
|
|
import {IotOpeationFillApi, IotOpeationFillVO} from "@/api/pms/iotopeationfill";
|
|
import {IotOpeationFillApi, IotOpeationFillVO} from "@/api/pms/iotopeationfill";
|
|
import {useUserStore} from "@/store/modules/user";
|
|
import {useUserStore} from "@/store/modules/user";
|
|
const { push } = useRouter()
|
|
const { push } = useRouter()
|
|
-
|
|
|
|
/** 巡检工单 列表 */
|
|
/** 巡检工单 列表 */
|
|
defineOptions({ name: 'IotOpeationFill' })
|
|
defineOptions({ name: 'IotOpeationFill' })
|
|
|
|
|
|
@@ -175,6 +190,23 @@ const queryParams = reactive({
|
|
})
|
|
})
|
|
const queryFormRef = ref() // 搜索的表单
|
|
const queryFormRef = ref() // 搜索的表单
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 判断两个日期是否为同一天
|
|
|
|
+const isSameDay = (dateString) => {
|
|
|
|
+ if (!dateString) return false
|
|
|
|
+
|
|
|
|
+ // 将日期字符串转换为日期对象
|
|
|
|
+ const targetDate = new Date(dateString)
|
|
|
|
+ const today = new Date()
|
|
|
|
+
|
|
|
|
+ // 比较年、月、日
|
|
|
|
+ return targetDate.getFullYear() === today.getFullYear() &&
|
|
|
|
+ targetDate.getMonth() === today.getMonth() &&
|
|
|
|
+ targetDate.getDate() === today.getDate()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
const handleDeptNodeClick = async (row) => {
|
|
const handleDeptNodeClick = async (row) => {
|
|
queryParams.deptId = row.id
|
|
queryParams.deptId = row.id
|
|
await getList()
|
|
await getList()
|
|
@@ -208,6 +240,7 @@ const formRef = ref()
|
|
const openForm = (id?: number) => {
|
|
const openForm = (id?: number) => {
|
|
push({ name: 'InspectOrderDetail', params:{id} })
|
|
push({ name: 'InspectOrderDetail', params:{id} })
|
|
}
|
|
}
|
|
|
|
+
|
|
const openWrite = (id?: string) => {
|
|
const openWrite = (id?: string) => {
|
|
push({ name: 'FillOrderInfo',params:{id}})
|
|
push({ name: 'FillOrderInfo',params:{id}})
|
|
}
|
|
}
|