| | |
| | | style="width: 220px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item v-show="activeRadio === 'task'" label="执行日期"> |
| | | <el-date-picker |
| | | v-model="queryDate" |
| | | type="date" |
| | | placeholder="请选择日期" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | style="width: 180px" |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleQuery">查询</el-button> |
| | | <el-button @click="resetQuery">重置</el-button> |
| | |
| | | import { Delete, Plus } from "@element-plus/icons-vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import { getCurrentInstance, nextTick, onMounted, reactive, ref } from "vue"; |
| | | import dayjs from "dayjs"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | import FormDia from "@/views/equipmentManagement/inspectionManagement/components/formDia.vue"; |
| | | import ViewFiles from "@/views/equipmentManagement/inspectionManagement/components/viewFiles.vue"; |
| | |
| | | const queryParams = reactive({ |
| | | taskName: "", |
| | | areaId: undefined, |
| | | createTimeStart: undefined, |
| | | createTimeEnd: undefined, |
| | | }); |
| | | |
| | | // 查询日期(用于定时任务记录) |
| | | const queryDate = ref(dayjs().format("YYYY-MM-DD")); |
| | | |
| | | const areaOptions = ref([]); |
| | | const areaTreeProps = { |
| | |
| | | }, |
| | | }, |
| | | { prop: "registrant", label: "登记人", minWidth: 100 }, |
| | | { prop: "createTime", label: "登记日期", minWidth: 100 }, |
| | | { prop: "createTime", label: "登记日期", width: 130 }, |
| | | ]); |
| | | |
| | | // 巡检状态列(仅定时任务记录显示) |
| | |
| | | const operationColumn = getOperationColumn(["viewFile"]); |
| | | // 定时任务记录添加巡检状态列 |
| | | tableColumns.value = [...columns.value, inspectionStatusColumn, inspectionResultColumn, ...(operationColumn ? [operationColumn] : [])]; |
| | | // 切换到定时任务记录时,默认查询当天 |
| | | queryDate.value = dayjs().format("YYYY-MM-DD"); |
| | | } |
| | | pageNum.value = 1; |
| | | pageSize.value = 10; |
| | |
| | | |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | // 设置日期参数(定时任务记录时) |
| | | if (activeRadio.value === "task" && queryDate.value) { |
| | | queryParams.createTimeStart = `${queryDate.value} 00:00:00`; |
| | | queryParams.createTimeEnd = `${queryDate.value} 23:59:59`; |
| | | } else { |
| | | queryParams.createTimeStart = undefined; |
| | | queryParams.createTimeEnd = undefined; |
| | | } |
| | | const params = { |
| | | ...queryParams, |
| | | size: pageSize.value, |
| | |
| | | const resetQuery = () => { |
| | | queryParams.taskName = ""; |
| | | queryParams.areaId = undefined; |
| | | queryParams.createTimeStart = undefined; |
| | | queryParams.createTimeEnd = undefined; |
| | | // 定时任务记录时重置为当天 |
| | | queryDate.value = dayjs().format("YYYY-MM-DD"); |
| | | handleQuery(); |
| | | }; |
| | | |