From 400ba2640e9852271f22efbb90943c02ae9f46a2 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 24 九月 2025 14:58:10 +0800
Subject: [PATCH] 巡检上传

---
 src/views/equipmentManagement/inspectionManagement/index.vue |  109 ++++--------------------------------------------------
 1 files changed, 9 insertions(+), 100 deletions(-)

diff --git a/src/views/equipmentManagement/inspectionManagement/index.vue b/src/views/equipmentManagement/inspectionManagement/index.vue
index f0196b9..74886b2 100644
--- a/src/views/equipmentManagement/inspectionManagement/index.vue
+++ b/src/views/equipmentManagement/inspectionManagement/index.vue
@@ -15,20 +15,7 @@
       </el-form-item>
     </el-form>
     <el-card>
-      <!-- 鏍囩椤� -->
-      <el-tabs
-          v-model="activeTab"
-          class="info-tabs"
-          @tab-click="handleTabClick"
-      >
-        <el-tab-pane
-            v-for="tab in tabs"
-            :key="tab.name"
-            :label="tab.label"
-            :name="tab.name"
-        />
-      </el-tabs>
-      <div style="display: flex;flex-direction: row;justify-content: space-between;" v-if="tabName === 'task'">
+      <div style="display: flex;flex-direction: row;justify-content: space-between;margin-bottom: 10px;">
         <el-radio-group v-model="activeRadio" @change="radioChange">
           <el-radio-button v-for="tab in radios"
                            :key="tab.name"
@@ -50,8 +37,7 @@
                   @selection-change="handleSelectionChange"
                   :is-selection="true"
                   :border="true"
-                  :table-style="{ width: '100%', height: 'calc(100vh - 30em)' }"
-                  v-if="tabName === 'task'"
+                  :table-style="{ width: '100%', height: 'calc(100vh - 23em)' }"
           >
           <template #inspector="{ row }">
             <div class="person-tags">
@@ -71,27 +57,7 @@
               <span v-else class="no-data">--</span>
             </div>
           </template>
-          </PIMTable>
-          <el-table ref="table" :data="tableData" height="480" v-loading="tableLoading" border v-else style="width: 100%;height: calc(100vh - 25em)">
-            <el-table-column label="搴忓彿" type="index" width="60" align="center" />
-            <el-table-column prop="deviceName" label="璁惧鍚嶇О" :show-overflow-tooltip="true">
-              <template #default="scope">
-                {{scope.row.qrCode.deviceName}}
-              </template>
-            </el-table-column>
-            <el-table-column prop="location" label="鎵�鍦ㄤ綅缃弿杩�" :show-overflow-tooltip="true">
-              <template #default="scope">
-                {{scope.row.qrCode.location}}
-              </template>
-            </el-table-column>
-            <el-table-column prop="scanner" label="宸℃浜�"></el-table-column>
-            <el-table-column prop="scanTime" label="宸℃鏃堕棿"></el-table-column>
-            <el-table-column fixed="right" label="鎿嶄綔">
-              <template #default="scope">
-                <el-button link type="primary" @click="handleAdd(scope.row)">鏌ョ湅闄勪欢</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
+            </PIMTable>
         </div>
         <pagination
             v-if="total>0"
@@ -104,9 +70,7 @@
       </div>
     </el-card>
     <form-dia ref="formDia" @closeDia="handleQuery"></form-dia>
-    <qr-code-dia ref="qrCodeDia" @closeDia="handleQuery"></qr-code-dia>
     <view-files ref="viewFiles"></view-files>
-    <view-qr-code-files ref="viewQrCodeFiles"></view-qr-code-files>
   </div>
 </template>
 
@@ -118,9 +82,7 @@
 import Pagination from "@/components/Pagination/index.vue";
 import PIMTable from "@/components/PIMTable/PIMTable.vue";
 import FormDia from "@/views/equipmentManagement/inspectionManagement/components/formDia.vue";
-import QrCodeDia from "@/views/equipmentManagement/inspectionManagement/components/qrCodeDia.vue";
 import ViewFiles from "@/views/equipmentManagement/inspectionManagement/components/viewFiles.vue";
-import ViewQrCodeFiles from "@/views/equipmentManagement/inspectionManagement/components/viewQrCodeFiles.vue";
 
 // 鎺ュ彛寮曞叆
 import {
@@ -128,38 +90,22 @@
   inspectionTaskList,
   timingTaskList
 } from "@/api/inspectionManagement/index.js";
-import {
-  delQrCode,
-  qrCodeList,
-  qrCodeScanRecordList
-} from "@/api/inspectionUpload/index.js";
 
 // 鍏ㄥ眬鍙橀噺
 const { proxy } = getCurrentInstance();
 const formDia = ref();
-const qrCodeDia = ref();
 const viewFiles = ref();
-const viewQrCodeFiles = ref();
 
 // 鏌ヨ鍙傛暟
 const queryParams = reactive({
   searchAll: "",
 });
 
-// 鏍囩椤甸厤缃�
-const activeTab = ref("task");
-const tabName = ref("task");
-const tabs = reactive([
-  { name: "task", label: "鐢熶骇宸℃" },
-  { name: "qrCodeScanRecord", label: "鐜板満宸℃璁板綍" },
-]);
-
 // 鍗曢�夋閰嶇疆
 const activeRadio = ref("taskManage");
 const radios = reactive([
   { name: "taskManage", label: "瀹氭椂浠诲姟绠$悊" },
   { name: "task", label: "瀹氭椂浠诲姟璁板綍" },
-  { name: "qrCode", label: "浜岀淮鐮佺鐞�" },
 ]);
 
 // 琛ㄦ牸鏁版嵁
@@ -175,7 +121,6 @@
 // 鍒楅厤缃�
 const columns = ref([
   { prop: "taskName", label: "宸℃浠诲姟鍚嶇О", minWidth: 160 },
-  { prop: "inspectionLocation", label: "鍦扮偣", minWidth: 120 },
   { prop: "remarks", label: "澶囨敞", minWidth: 150 },
   { prop: "inspector", label: "鎵ц宸℃浜�", minWidth: 150, slot: "inspector" },
   {
@@ -246,23 +191,9 @@
   return operationConfig;
 };
 
-const columns1 = ref([
-  { prop: "deviceName", label: "璁惧鍚嶇О", minWidth: 160 },
-  { prop: "location", label: "鎵�鍦ㄤ綅缃弿杩�", minWidth: 120 },
-  { prop: "createBy", label: "鍒涘缓鑰�", minWidth: 100 },
-  { prop: "createTime", label: "鍒涘缓鏃堕棿", minWidth: 100 },
-]);
-
 onMounted(() => {
   radioChange('taskManage');
 });
-
-// 鏍囩椤电偣鍑讳簨浠�
-const handleTabClick = (tab) => {
-  tabName.value = tab.props.name;
-  tableData.value = [];
-  getList();
-};
 
 // 鍗曢�夊彉鍖�
 const radioChange = (value) => {
@@ -274,10 +205,6 @@
     const operationColumn = getOperationColumn(['viewFile']);
     tableColumns.value = [...columns.value, ...(operationColumn ? [operationColumn] : [])];
     operationsArr.value = ['viewFile'];
-  } else {
-    const operationColumn = getOperationColumn(['edit']);
-    tableColumns.value = [...columns1.value, ...(operationColumn ? [operationColumn] : [])];
-    operationsArr.value = ['edit'];
   }
   pageNum.value = 1;
   pageSize.value = 10;
@@ -293,7 +220,7 @@
 // 鍒嗛〉澶勭悊
 const handlePagination = (val) => {
 	pageNum.value = val.page;
-	pageSize.value = val.limit;
+	pageSize.value = val.size;
 	getList();
 };
 // 鑾峰彇鍒楄〃鏁版嵁
@@ -303,19 +230,10 @@
   const params = { ...queryParams, size: pageSize.value, current: pageNum.value };
   
   let apiCall;
-  if (tabName.value === 'task') {
-    switch (activeRadio.value) {
-      case "task":
-        apiCall = inspectionTaskList(params);
-        break;
-      case "qrCode":
-        apiCall = qrCodeList(params);
-        break;
-      default:
-        apiCall = timingTaskList(params);
-    }
+  if (activeRadio.value === "task") {
+    apiCall = inspectionTaskList(params);
   } else {
-    apiCall = qrCodeScanRecordList(params);
+    apiCall = timingTaskList(params);
   }
   
   apiCall.then(res => {
@@ -360,15 +278,7 @@
 const handleAdd = (row) => {
   const type = row ? 'edit' : 'add';
   nextTick(() => {
-    if (tabName.value === 'task') {
-      if (activeRadio.value === "taskManage") {
-        formDia.value?.openDialog(type, row);
-      } else if (activeRadio.value === "qrCode") {
-        qrCodeDia.value?.openDialog(type, row);
-      }
-    } else {
-      viewQrCodeFiles.value?.openDialog(row);
-    }
+    formDia.value?.openDialog(type, row);
   });
 };
 
@@ -387,10 +297,9 @@
   }
   
   const deleteIds = selectedRows.value.map(item => item.id);
-  const api = activeRadio.value === "taskManage" ? delTimingTask : delQrCode;
   
   proxy.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫夋暟鎹」锛�').then(() => {
-    return api(deleteIds);
+    return delTimingTask(deleteIds);
   }).then(() => {
     proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
     handleQuery();

--
Gitblit v1.9.3