|
@@ -0,0 +1,62 @@
|
|
|
+<template>
|
|
|
+ <el-table :data="tableData" border max-height="70vh">
|
|
|
+ <el-table-column label="#" width="80" type="index" align="center"/>
|
|
|
+ <el-table-column label="巡检结果" align="left" prop="checkResult"/>
|
|
|
+ <el-table-column label="巡检日期" align="center" prop="checkTime" width="150"/>
|
|
|
+ <el-table-column label="操作" align="center" width="120">
|
|
|
+ <template #default="{row}">
|
|
|
+ <el-button type="text" @click="onShowReport(row)">查看报告</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="totalNum>0"
|
|
|
+ :total="totalNum"
|
|
|
+ v-model:page="queryParams.page"
|
|
|
+ v-model:limit="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-dialog v-model="visible" title="巡检报告" width="80%" append-to-body style="margin-top:1vh!important">
|
|
|
+ <n-check-report :cr-id="crId" :span-method="spanMethod"/>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+</template>
|
|
|
+<script setup lang="ts">
|
|
|
+import {listChkr} from "@/api/check/chkr"
|
|
|
+import {onMounted} from "vue";
|
|
|
+import nCheckReport from "./nCheckReport.vue"
|
|
|
+
|
|
|
+const tableData = ref([])
|
|
|
+const totalNum = ref(0)
|
|
|
+const queryParams = ref({
|
|
|
+ page: 1,
|
|
|
+ pageSize: 20
|
|
|
+})
|
|
|
+const visible = ref(false)
|
|
|
+const crId = ref(0)
|
|
|
+
|
|
|
+const props = defineProps({
|
|
|
+ spanMethod: {
|
|
|
+ type: Function
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const onShowReport = (row) => {
|
|
|
+ crId.value = row.crId
|
|
|
+ visible.value = true
|
|
|
+}
|
|
|
+
|
|
|
+const getList = async () => {
|
|
|
+ const {total, rows} = await listChkr({...queryParams.value})
|
|
|
+ tableData.value = rows
|
|
|
+ totalNum.value = total
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ getList()
|
|
|
+})
|
|
|
+
|
|
|
+</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+</style>
|