From a1faa94fbf85553f22da934a1abc745d89dd8667 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期一, 19 十月 2026 17:23:49 +0800
Subject: [PATCH] fix: 取消设备核查/比对的身份限制与三张设备计划的审批功能

---
 src/views/CNAS/resourceDemand/device/component/record.vue |   41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/src/views/CNAS/resourceDemand/device/component/record.vue b/src/views/CNAS/resourceDemand/device/component/record.vue
index 6ca385f..9c45784 100644
--- a/src/views/CNAS/resourceDemand/device/component/record.vue
+++ b/src/views/CNAS/resourceDemand/device/component/record.vue
@@ -17,7 +17,7 @@
         </el-form-item>
       </el-form>
       <div>
-        <el-button size="small" type="primary" @click="dialogVisible = true, openAdd()">鏂� 寤�</el-button>
+        <el-button v-if="isMenuList !== 1" size="small" type="primary" @click="dialogVisible = true, openAdd()">鏂� 寤�</el-button>
         <el-button :loading="outLoading" size="small" type="primary" @click="openHandleOut">瀵� 鍑�</el-button>
       </div>
     </div>
@@ -45,8 +45,8 @@
           </template>
         </el-table-column>
         <!--        <el-table-column label="寮傚父鎯呭喌" min-width="120" prop="abnormal" />-->
-        <el-table-column label="浣跨敤寮�濮嬫棩鏈�" min-width="170" prop="useStartDate" />
-        <el-table-column label="浣跨敤缁撴潫鏃ユ湡" min-width="170" prop="useEndDate" />
+        <el-table-column label="浣跨敤寮�濮嬫棩鏈�" min-width="170" prop="useStartDate" :formatter="formatDateCell" />
+        <el-table-column label="浣跨敤缁撴潫鏃ユ湡" min-width="170" prop="useEndDate" :formatter="formatDateCell" />
         <el-table-column label="浣跨敤浜�" min-width="120" prop="usePerson" />
         <el-table-column label="澶囨敞" min-width="120" prop="remark" />
         <!-- 鎿嶄綔鎸夐挳 -->
@@ -58,7 +58,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]"
+      <el-pagination :current-page="search.current" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]"
         :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
         @current-change="handleCurrentChange" background>
       </el-pagination>
@@ -157,6 +157,8 @@
   deleteDeviceRecord,
 } from '@/api/cnas/resourceDemand/device.js'
 import { selectUserCondition } from "@/api/business/inspectionTask";
+import { formatListDate } from './dateFormat';
+import { saveBlobOrShowError } from '@/utils/saveBlob'
 export default {
   props: {
     clickNodeVal: {
@@ -221,6 +223,9 @@
     this.getTableList(this.clickNodeVal.value);
   },
   methods: {
+    formatDateCell(row, column, cellValue) {
+      return formatListDate(cellValue)
+    },
     // element-plus 鐨� el-date-picker 娌℃湁 picker-options锛屾敼鎴� :disabled-date
     disabledDate(time) {
       return time.getTime() > Date.now();
@@ -270,11 +275,14 @@
       this.outLoading = true
       exportUseRecord({
         deviceId: this.clickNodeVal.value,
+        sampleCode: this.search.sampleCode,
+        managementNumber: this.search.managementNumber,
         exportDate: this.exportDate
       }).then(res => {
         this.outLoading = false
-        const blob = new Blob([res], { type: 'application/octet-stream' });
-        this.$download.saveAs(blob, '璁惧浣跨敤璁板綍.doc')
+        saveBlobOrShowError(res, '璁惧浣跨敤璁板綍.doc', 'application/msword')
+      }).catch(() => {
+        this.outLoading = false
       })
     },
     //鏂板缓
@@ -310,7 +318,6 @@
                 this.dialogVisible = false
               }
             })
-            this.dialogVisible = false;
           } else {
             updateDeviceRecord(this.form).then(res => {
               if (res.code == 200) {
@@ -319,7 +326,6 @@
                 this.dialogVisible = false
               }
             })
-            this.dialogVisible = false;
           }
         }
       });
@@ -327,20 +333,17 @@
     //鏌ョ湅璇︽儏
     showDetailsDialog(type, row) {
       this.operationType = type;
-      console.log(row)
       this.dialogVisible = true;
       this.getUserList()
-      this.form = row;
-      let list = []
-      if (row.useStartDate === null) {
-        row.useStartDate = ''
+      // 澶嶅埗涓�浠藉啀缂栬緫锛岄伩鍏嶇洿鎺ユ敼鍔ㄨ〃鏍奸噷鐨勬暟鎹�
+      const useStartDate = row.useStartDate || ''
+      const useEndDate = row.useEndDate || ''
+      this.form = {
+        ...row,
+        useStartDate,
+        useEndDate,
+        useDateList: useStartDate && useEndDate ? [useStartDate, useEndDate] : []
       }
-      if (row.useEndDate === null) {
-        row.useEndDate = ''
-      }
-      list.push(row.useStartDate)
-      list.push(row.useEndDate)
-      this.form['useDateList'] = list
     },
     handleDeleteClick(index, row) {
       this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', {

--
Gitblit v1.9.3