From 7edce9d027ae6b4b17457baa9bbd900db9b32baf Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 三月 2025 15:01:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/api/cnas/resourceDemand/device.js                                    |  392 +++++++++++++++
 src/views/CNAS/resourceDemand/device/index.vue                           |   18 
 src/views/CNAS/resourceDemand/device/component/state.vue                 |  103 +---
 src/views/structural/premises/index.vue                                  |    7 
 src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue        |   89 +--
 src/views/CNAS/resourceDemand/device/component/inspectionForm.vue        |   46 -
 src/views/CNAS/resourceDemand/device/component/check.vue                 |   15 
 src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue   |   11 
 src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue      |   59 -
 src/views/business/inspectionTask/inspection.vue                         |    7 
 src/views/CNAS/resourceDemand/device/component/calibration.vue           |   58 -
 src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue  |   28 
 src/views/CNAS/resourceDemand/device/component/borrow.vue                |  262 ++++++----
 src/views/CNAS/resourceDemand/device/component/operationInstruction.vue  |   80 +-
 src/views/CNAS/resourceDemand/device/component/accidentForm.vue          |   23 
 src/views/CNAS/resourceDemand/device/component/record.vue                |    9 
 src/views/CNAS/resourceDemand/device/component/failureForm.vue           |   28 
 src/views/CNAS/resourceDemand/device/component/fault.vue                 |   16 
 src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue |   56 -
 src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue     |   56 -
 src/views/CNAS/resourceDemand/device/component/maintenance.vue           |   49 -
 21 files changed, 769 insertions(+), 643 deletions(-)

diff --git a/src/api/cnas/resourceDemand/device.js b/src/api/cnas/resourceDemand/device.js
index f66e93b..137a598 100644
--- a/src/api/cnas/resourceDemand/device.js
+++ b/src/api/cnas/resourceDemand/device.js
@@ -647,6 +647,15 @@
     params: query,
   });
 }
+//浣跨敤璁板綍 瀵煎嚭
+export function exportUseRecord(query) {
+  return request({
+    url: "/deviceRecord/exportUseRecord",
+    method: "get",
+    responseType: "blob",
+    params: query,
+  });
+}
 
 //鏂板璁惧妗f
 export function addDocument(data) {
@@ -704,9 +713,9 @@
 }
 
 //璁惧楠屾敹锛堣澶囷級瀵煎嚭
-export function exportUseRecord(query) {
+export function exportDeviceAcceptance(query) {
   return request({
-    url: "/deviceRecord/exportUseRecord",
+    url: "/deviceAcceptance/exportDeviceAcceptance",
     method: "get",
     responseType: "blob",
     params: query,
@@ -758,12 +767,12 @@
   });
 }
 
-//璁惧鎿嶄綔鏃ュ織鍜岃褰�
-export function deviceLog(query) {
+//璁惧鏍″噯 鏂板 鏇存柊
+export function saveOrUpdateDeviceMetric(data) {
   return request({
-    url: "/api/deviceLog/" + query,
-    method: "get",
-    // params: query,
+    url: "/deviceMetrics/saveOrUpdateDeviceMetric",
+    method: "post",
+    data: data,
   });
 }
 
@@ -852,11 +861,83 @@
 }
 
 //璁惧缁存姢鍒犻櫎
-export function deviceMaintainDelete(query) {
+export function deleteDeviceMaintenance(query) {
   return request({
-    url: "/deviceMaintain/delete/" + query,
+    url: "/deviceMaintain/deleteDeviceMaintenance",
     method: "delete",
-    // params: query,
+    params: query,
+  });
+}
+
+// 鏂板璁惧缁存姢淇濆吇
+export function addDeviceMaintenance(data) {
+  return request({
+    url: "/deviceMaintain/addDeviceMaintenance",
+    method: "post",
+    data: data,
+  });
+}
+//璁惧缁存姢琛� 鏌ヨ
+export function getDeviceMaintenancePage(query) {
+  return request({
+    url: "/deviceMaintain/getDeviceMaintenancePage",
+    method: "get",
+    params: query,
+  });
+}
+
+// 鍊熺敤-淇濆瓨
+export function saveDeviceBorrow(data) {
+  return request({
+    url: "/deviceBorrow/saveDeviceBorrow",
+    method: "post",
+    data: data,
+  });
+}
+
+//鍊熺敤-鏌ョ湅
+export function getDeviceBorrow(query) {
+  return request({
+    url: "/deviceBorrow/getDeviceBorrow",
+    method: "get",
+    params: query,
+  });
+}
+
+//鍊熺敤-瀵煎嚭
+export function deviceBorrowExport(query) {
+  return request({
+    url: "/deviceBorrow/deviceBorrowExport",
+    method: "get",
+    responseType: "blob",
+    params: query,
+  });
+}
+
+//鍊熺敤-鍒犻櫎
+export function deleteDeviceBorrow(query) {
+  return request({
+    url: "/deviceBorrow/deleteDeviceBorrow",
+    method: "delete",
+    params: query,
+  });
+}
+
+//鍊熺敤-鍒楄〃
+export function deviceBorrowPage(query) {
+  return request({
+    url: "/deviceBorrow/deviceBorrowPage",
+    method: "get",
+    params: query,
+  });
+}
+
+// 璁惧鍚敤/鍋滅敤 淇濆瓨锛屾彁浜わ紝椹冲洖锛岄�氳繃鎺ュ彛
+export function saveDeviceState(data) {
+  return request({
+    url: "/deviceState/saveDeviceState",
+    method: "post",
+    data: data,
   });
 }
 
@@ -869,11 +950,296 @@
   });
 }
 
-// 鍊熺敤-淇濆瓨
-export function saveDeviceBorrow(data) {
+//璁惧鍋滃惎鐢ㄥ崟鏉″鍑�
+export function exportDeviceStatus(query) {
   return request({
-    url: "/deviceBorrow/saveDeviceBorrow",
+    url: "/deviceState/exportDeviceStatus",
+    method: "get",
+    responseType: "blob",
+    params: query,
+  });
+}
+
+//璁惧鍚敤/鍋滅敤 鍒犻櫎
+export function deleteDeviceState(query) {
+  return request({
+    url: "/deviceState/deleteDeviceState",
+    method: "delete",
+    params: query,
+  });
+}
+
+//璁惧鐘舵�佸鍑�
+export function deviceStateExport(query) {
+  return request({
+    url: "/deviceState/deviceStateExport",
+    method: "get",
+    responseType: "blob",
+    params: query,
+  });
+}
+
+//璁惧鍚敤/鍋滅敤 鍒嗛〉
+export function getDeviceStatePage(query) {
+  return request({
+    url: "/deviceState/getDeviceStatePage",
+    method: "get",
+    params: query,
+  });
+}
+
+//璁惧鎶ュ簾鐢宠鍒楄〃
+export function pageDeviceScrapped(query) {
+  return request({
+    url: "/deviceScrapped/pageDeviceScrapped",
+    method: "get",
+    params: query,
+  });
+}
+
+// 瀵煎嚭
+export function exportDeviceScrapped(query) {
+  return request({
+    url: "/deviceScrapped/exportDeviceScrapped",
+    method: "get",
+    responseType: "blob",
+    params: query,
+  });
+}
+
+//鍒犻櫎璁惧鎶ュ簾鐢宠
+export function delDeviceScrapped(query) {
+  return request({
+    url: "/deviceScrapped/delDeviceScrapped",
+    method: "delete",
+    params: query,
+  });
+}
+
+//鏌ヨ璁惧鎶ュ簾鐢宠
+export function getDeviceScrapped(query) {
+  return request({
+    url: "/deviceScrapped/getDeviceScrapped",
+    method: "get",
+    params: query,
+  });
+}
+
+// 鏂板璁惧鎶ュ簾鐢宠
+export function addDeviceScrapped(data) {
+  return request({
+    url: "/deviceScrapped/addDeviceScrapped",
     method: "post",
     data: data,
   });
 }
+
+//璁惧鏁呴殰缁翠慨鍒楄〃
+export function pageDeviceBreakdownMaintenance(query) {
+  return request({
+    url: "/deviceBreakdownMaintenance/pageDeviceBreakdownMaintenance",
+    method: "get",
+    params: query,
+  });
+}
+
+// 璁惧鏁呴殰涓庣淮淇�-瀵煎嚭
+export function exportDeviceBreakdownMaintenance(query) {
+  return request({
+    url: "/deviceBreakdownMaintenance/exportDeviceBreakdownMaintenance",
+    method: "get",
+    responseType: "blob",
+    params: query,
+  });
+}
+
+//鍒犻櫎璁惧鏁呴殰缁翠慨
+export function delDeviceBreakdownMaintenance(query) {
+  return request({
+    url: "/deviceBreakdownMaintenance/delDeviceBreakdownMaintenance",
+    method: "delete",
+    params: query,
+  });
+}
+
+//鏌ヨ璁惧鏁呴殰缁翠慨
+export function getDeviceBreakdownMaintenance(query) {
+  return request({
+    url: "/deviceBreakdownMaintenance/getDeviceBreakdownMaintenance",
+    method: "get",
+    params: query,
+  });
+}
+
+// 鏂板璁惧鏁呴殰缁翠慨
+export function addDeviceBreakdownMaintenance(data) {
+  return request({
+    url: "/deviceBreakdownMaintenance/addDeviceBreakdownMaintenance",
+    method: "post",
+    data: data,
+  });
+}
+
+//鍒嗛〉鏌ヨ璁惧鐐规璁板綍
+export function getDeviceInspectionRecordByPage(query) {
+  return request({
+    url: "/deviceInspectionRecord/getDeviceInspectionRecordByPage",
+    method: "get",
+    params: query,
+  });
+}
+
+// 瀵煎嚭璁惧鐐规璁板綍
+export function exportDeviceInspectionRecord(query) {
+  return request({
+    url: "/deviceInspectionRecord/exportDeviceInspectionRecord",
+    method: "get",
+    responseType: "blob",
+    params: query,
+  });
+}
+
+//鍒犻櫎璁惧鐐规璁板綍
+export function deleteDeviceInspectionRecord(query) {
+  return request({
+    url: "/deviceInspectionRecord/deleteDeviceInspectionRecord",
+    method: "delete",
+    params: query,
+  });
+}
+
+//璁惧鐐规璁板綍璇︽儏
+export function getDeviceInspectionRecord(query) {
+  return request({
+    url: "/deviceInspectionRecord/getDeviceInspectionRecord",
+    method: "get",
+    params: query,
+  });
+}
+
+// 鏂板璁惧鐐规璁板綍
+export function addDeviceInspectionRecord(data) {
+  return request({
+    url: "/deviceInspectionRecord/addDeviceInspectionRecord",
+    method: "post",
+    data: data,
+  });
+}
+
+// 淇敼璁惧鐐规璁板綍
+export function updateDeviceInspectionRecord(data) {
+  return request({
+    url: "/deviceInspectionRecord/updateDeviceInspectionRecord",
+    method: "post",
+    data: data,
+  });
+}
+
+// 澶嶆牳璁惧鐐规璁板綍
+export function reviewDeviceInspectionRecord(data) {
+  return request({
+    url: "/deviceInspectionRecord/reviewDeviceInspectionRecord",
+    method: "post",
+    data: data,
+  });
+}
+
+//璁惧浜嬫晠鎶ュ憡鍒楄〃
+export function pageDeviceAccidentReport(query) {
+  return request({
+    url: "/deviceAccidentReport/pageDeviceAccidentReport",
+    method: "get",
+    params: query,
+  });
+}
+
+// 瀵煎嚭璁惧浜嬫晠
+export function exportDeviceAccidentReport(query) {
+  return request({
+    url: "/deviceAccidentReport/exportDeviceAccidentReport",
+    method: "get",
+    responseType: "blob",
+    params: query,
+  });
+}
+
+//鍒犻櫎璁惧浜嬫晠鎶ュ憡
+export function delDeviceAccidentReport(query) {
+  return request({
+    url: "/deviceAccidentReport/delDeviceAccidentReport",
+    method: "delete",
+    params: query,
+  });
+}
+
+//鏌ヨ璁惧浜嬫晠鎶ュ憡
+export function getDeviceAccidentReport(query) {
+  return request({
+    url: "/deviceAccidentReport/getDeviceAccidentReport",
+    method: "get",
+    params: query,
+  });
+}
+
+// 鏂板璁惧浜嬫晠鎶ュ憡
+export function addDeviceAccidentReport(data) {
+  return request({
+    url: "/deviceAccidentReport/addDeviceAccidentReport",
+    method: "post",
+    data: data,
+  });
+}
+
+//浣滀笟鎸囧涔� 瀹℃壒
+export function approvalOfHomeworkInstructionManual(data) {
+  return request({
+    url: "/deviceInstruction/approvalOfHomeworkInstructionManual",
+    method: "post",
+    data: data,
+  });
+}
+
+//浣滀笟鎸囧涔� 鍒犻櫎
+export function homeworkGuidebook(query) {
+  return request({
+    url: "/deviceInstruction/homeworkGuidebook",
+    method: "delete",
+    params: query,
+  });
+}
+
+//浣滀笟鎸囧涔� 缂栬緫鏌ヨ
+export function homeworkGuidebookEditor(query) {
+  return request({
+    url: "/deviceInstruction/homeworkGuidebookEditor",
+    method: "get",
+    params: query,
+  });
+}
+
+//浣滀笟鎸囧涔︽柊澧�
+export function newHomeworkGuidebookAdded(data) {
+  return request({
+    url: "/deviceInstruction/newHomeworkGuidebookAdded",
+    method: "post",
+    data: data,
+  });
+}
+
+//浣滀笟鎸囧涔﹀彈鎺ф枃浠跺垹闄�
+export function deleteHomeworkGuidebook(query) {
+  return request({
+    url: "/deviceInstruction/deleteHomeworkGuidebook",
+    method: "delete",
+    params: query,
+  });
+}
+
+//浣滀笟鎸囧涔� 鏌ヨ
+export function pageByPageQueryOfHomeworkInstructions(query) {
+  return request({
+    url: "/deviceInstruction/pageByPageQueryOfHomeworkInstructions",
+    method: "get",
+    params: query,
+  });
+}
diff --git a/src/views/CNAS/resourceDemand/device/component/accidentForm.vue b/src/views/CNAS/resourceDemand/device/component/accidentForm.vue
index 102085b..6349287 100644
--- a/src/views/CNAS/resourceDemand/device/component/accidentForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/accidentForm.vue
@@ -96,6 +96,10 @@
 
 <script>
 import { selectUserCondition } from "@/api/business/inspectionTask";
+import {
+  getDeviceAccidentReport,
+  addDeviceAccidentReport,
+} from '@/api/cnas/resourceDemand/device.js'
 export default {
   name: "accident-form",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -150,7 +154,7 @@
     },
     // 鏌ヨ璇︽儏
     searchInfo() {
-      this.$axios.get(this.$api.deviceAccidentReport.getDeviceAccidentReport + '?accidentReportId=' + this.form.accidentReportId).then(res => {
+      getDeviceAccidentReport({ accidentReportId: this.form.accidentReportId }).then(res => {
         if (res.code === 200) {
           this.form = { ...res.data }
           if (res.data.isFinish === 0) {
@@ -187,13 +191,7 @@
       this.form.flowType = this.currentStep
       this.$refs.modelForm.validate((valid) => {
         if (valid) {
-          this.$axios.post(this.$api.deviceAccidentReport.addDeviceAccidentReport,
-            this.form, {
-            headers: {
-              'Content-Type': 'application/json'
-            },
-            noQs: true
-          }).then(res => {
+          addDeviceAccidentReport(this.form).then(res => {
             if (res.code == 200) {
               this.$message.success('鏂板鎴愬姛')
               this.resetForm()
@@ -212,14 +210,7 @@
     },
     getUserList() {
       selectUserCondition().then(res => {
-        let data = [];
-        res.data.forEach((a) => {
-          data.push({
-            label: a.name,
-            value: a.id,
-          });
-        });
-        this.userList = data
+        this.userList = res.data
       })
     },
   },
diff --git a/src/views/CNAS/resourceDemand/device/component/borrow.vue b/src/views/CNAS/resourceDemand/device/component/borrow.vue
index fba75bc..481cd21 100644
--- a/src/views/CNAS/resourceDemand/device/component/borrow.vue
+++ b/src/views/CNAS/resourceDemand/device/component/borrow.vue
@@ -4,7 +4,7 @@
     <div class="search">
       <div class="search_thing">
         <div class="search_label">娴佺▼缂栧彿锛�</div>
-        <div><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.processNumber"
+        <div><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.processNumber"
             @keyup.enter.native="refreshTable()"></el-input></div>
       </div>
       <div class="search_thing" style="padding-left: 30px;">
@@ -17,8 +17,10 @@
       </div>
     </div>
     <div class="tables" style="margin-top: 10px;">
-      <ValueTable ref="ValueTable" :url="$api.deviceBorrow.deviceBorrowPage"
-        :delUrl="$api.deviceBorrow.deleteDeviceBorrow" :componentData="componentData" :key="upIndex" />
+      <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 290px)'"
+        :page="page" @pagination="pagination"></lims-table>
+      <!-- <ValueTable ref="ValueTable" :url="$api.deviceBorrow.deviceBorrowPage"
+        :delUrl="$api.deviceBorrow.deleteDeviceBorrow" :componentData="componentData" :key="upIndex" /> -->
     </div>
     <el-dialog title="浠櫒璁惧棰�(鍊�)鐢ㄧ櫥璁�" top="5vh" :visible.sync="dialogVisible" width="60%">
       <el-steps :active="currentStep" finish-status="success" align-center>
@@ -197,13 +199,18 @@
 </template>
 
 <script>
-import ValueTable from '@/components/Table/value-table.vue'
+import limsTable from "@/components/Table/lims-table.vue";
 import { dateFormat } from '@/utils/date'
 import {
   saveDeviceBorrow,
   deleteCNASFile,
+  getDeviceBorrow,
+  deviceBorrowExport,
+  deleteDeviceBorrow,
+  deviceBorrowPage,
 } from '@/api/cnas/resourceDemand/device.js'
 import { selectUserCondition } from "@/api/business/inspectionTask";
+import { mapGetters } from "vuex";
 export default {
   props: {
     clickNodeVal: {
@@ -214,72 +221,12 @@
     }
   },
   components: {
-    ValueTable
+    limsTable
   },
   data() {
     return {
       dialogVisible: false,
       dialogVisible0: false,
-      //琛ㄥご鏄剧ず
-      componentData: {
-        entity: {
-          processNumber: null,
-          deviceId: null,
-          orderBy: {
-            field: 'id',
-            order: 'asc'
-          }
-        },
-        isIndex: true,
-        showSelect: false,
-        select: false,
-        do: [
-          {
-            id: 'show',
-            font: '鏌ョ湅',
-            type: 'text',
-            method: 'lookDetail'
-          },
-          {
-            id: 'delete',
-            font: '鍒犻櫎',
-            type: 'text',
-            method: 'doDiy'
-          },
-          {
-            id: '111',
-            font: '娴佺▼璺熻釜',
-            type: 'text',
-            method: 'handleLookList'
-          }],
-        init: false,
-        tagField: {
-          recipientState: {
-            select: [{
-              value: 0,
-              type: 'success',
-              label: '鍚堟牸'
-            }, {
-              value: 1,
-              type: 'warning',
-              label: '缁翠慨'
-            }, {
-              value: 2,
-              type: 'info',
-              label: '鍋滅敤'
-            }, {
-              value: 3,
-              type: 'danger',
-              label: '鎶ュ簾'
-            }]
-          }
-        },
-        selectField: {},
-        requiredAdd: [],
-        requiredUp: [],
-      },
-      upIndex: 0,
-      entityCopy: null,
       currentStep: 0, // 姝ラ鏉℃樉绀虹鍑犳
       currentStepClick: 0, // 鐐瑰嚮姝ラ鏉″彉鍖�
       steps: ['鍊熷嚭', '鍊熺敤'],
@@ -307,15 +254,94 @@
         nextUser: [{ required: true, message: '璇烽�夋嫨涓嬬幆鑺傝礋璐d汉', trigger: 'change' }],
       },
       deviceLogs: [],
-      outLoading: false
+      outLoading: false,
+      recipientStateList: [{
+        value: 0,
+        type: 'success',
+        label: '鍚堟牸'
+      }, {
+        value: 1,
+        type: 'warning',
+        label: '缁翠慨'
+      }, {
+        value: 2,
+        type: 'info',
+        label: '鍋滅敤'
+      }, {
+        value: 3,
+        type: 'danger',
+        label: '鎶ュ簾'
+      }],
+      queryParams: {},
+      tableData: [],
+      column: [
+        { label: "娴佺▼缂栧彿", prop: "processNumber" },
+        { label: "璁惧鍚嶇О", prop: "deviceName" },
+        {
+          label: "绠$悊缂栧彿",
+          prop: "unifyNumber"
+        },
+        { label: "鍊熺敤浜�", prop: "recipientUser" },
+        { label: "鍊熺敤浜鸿仈绯绘柟寮�", prop: "borrowerContactInformation", width: '140px' },
+        { label: "鍊熺敤鏃ユ湡", prop: "recipientTime" },
+        {
+          label: "鍊熺敤鏃剁姸鎬�", prop: "recipientState", dataType: "tag",
+          formatData: (params) => {
+            return this.recipientStateList.find((m) => m.value == params).label;
+          },
+          formatType: (params) => {
+            return this.recipientStateList.find((m) => m.value == params).type;
+          },
+        },
+        { label: "鍊熷嚭浜�", prop: "submitUser" },
+        { label: "鍊熷嚭鏃ユ湡", prop: "createTime" },
+        {
+          label: "褰撳墠鐘舵��", prop: "nowState"
+        },
+        { label: "褰撳墠璐d换浜�", prop: "nowUser" },
+        { label: "闄勪欢", prop: "fileName" },
+        {
+          dataType: "action",
+          fixed: "right",
+          label: "鎿嶄綔",
+          operation: [
+            {
+              name: "鏌ョ湅",
+              type: "text",
+              clickFun: (row) => {
+                this.lookDetail(row);
+              },
+            },
+            {
+              name: "鍒犻櫎",
+              type: "text",
+              clickFun: (row) => {
+                this.handleDelete(row);
+              },
+            },
+            {
+              name: "娴佺▼璺熻釜",
+              type: "text",
+              clickFun: (row) => {
+                this.handleLookList(row);
+              },
+            },
+          ],
+        },
+      ],
+      page: {
+        total: 0,
+        size: 10,
+        current: 0,
+      },
+      tableLoading: false,
     }
   },
   watch: {
     // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊
     clickNodeVal(newVal) {
       if (newVal.value) {
-        this.componentData.entity.deviceId = this.clickNodeVal.value
-        this.entityCopy = this.HaveJson(this.componentData.entity)
+        thisqueryParams.deviceId = this.clickNodeVal.value
         this.refreshTable()
       }
     },
@@ -329,25 +355,46 @@
     }
   },
   computed: {
+    ...mapGetters(["nickName"]),
     action() {
       return this.javaApi + '/personBasicInfo/saveCNASFile'
     }
   },
   mounted() {
-    this.componentData.entity.deviceId = this.clickNodeVal.value
-    this.entityCopy = this.HaveJson(this.componentData.entity)
-    // console.log(333,this.clickNodeVal)
+    this.queryParams.deviceId = this.clickNodeVal.value
     this.getUserList()
     this.refreshTable()
   },
   methods: {
-    refreshTable(e) {
-      this.$refs['ValueTable'].selectList(e)
+    getList() {
+      this.tableLoading = true;
+      let param = { ...this.queryParams, ...this.page };
+      delete param.total;
+      deviceBorrowPage({ ...param })
+        .then((res) => {
+          this.tableLoading = false;
+          if (res.code === 200) {
+            this.tableData = res.data.records;
+            this.page.total = res.data.total;
+          }
+        })
+        .catch((err) => {
+          this.tableLoading = false;
+        });
+    },
+    pagination({ page, limit }) {
+      this.page.current = page;
+      this.page.size = limit;
+      this.getList();
     },
     refresh() {
-      this.componentData.entity = this.HaveJson(this.entityCopy)
-      this.refreshTable()
-      // this.upIndex++
+      this.queryParams = {};
+      this.page.current = 1;
+      this.getList();
+    },
+    refreshTable() {
+      this.page.current = 1;
+      this.getList();
     },
     choiceStep(index) {
       this.currentStepClick = index
@@ -362,11 +409,11 @@
           // 鑾峰彇褰撳墠鐜妭鎿嶄綔浜轰笌鏃ユ湡
           switch (this.currentStep) {
             case 0:
-              this.form.submitOperationUser = user.name
+              this.form.submitOperationUser = this.nickName
               this.form.submitOperationTime = dateTime
               break
             case 1:
-              this.form.receiveOperationUser = user.name
+              this.form.receiveOperationUser = this.nickName
               this.form.receiveOperationTime = dateTime
               break
             default:
@@ -452,7 +499,7 @@
     },
     // 鏌ョ湅璇︽儏
     lookDetail(row) {
-      this.$axios.get(this.$api.deviceBorrow.getDeviceBorrow + '?id=' + row.id).then(res => {
+      getDeviceBorrow({ id: row.id }).then(res => {
         if (res.code == 200) {
           this.form = res.data
           this.form.deviceName = this.clickNodeVal.label
@@ -493,56 +540,39 @@
     //瀵煎嚭
     handleDown() {
       this.outLoading = true
-      this.$axios.post(this.$api.deviceBorrow.deviceBorrowExport, { deviceId: this.clickNodeVal.value }, { responseType: 'blob' }).then(res => {
+      deviceBorrowExport({ deviceId: this.clickNodeVal.value }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], {
           type: 'application/force-download'
         })
         const filename = decodeURI(this.clickNodeVal.label + '璁惧鍊熷嚭缁熻' + '.xlsx')
-        //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
-        let reader = new FileReader();
-        reader.readAsText(blob, 'utf-8');
-        reader.onload = () => {
-          try {
-            let result = JSON.parse(reader.result);
-            if (result.message) {
-              this.$message.error(result.message);
-            } else {
-              // 鍒涘缓涓�涓秴閾炬帴锛屽皢鏂囦欢娴佽祴杩涘幓锛岀劧鍚庡疄鐜拌繖涓秴閾炬帴鐨勫崟鍑讳簨浠�
-              const elink = document.createElement('a')
-              elink.download = filename
-              elink.style.display = 'none'
-              elink.href = URL.createObjectURL(blob)
-              document.body.appendChild(elink)
-              elink.click();
-              URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄
-              document.body.removeChild(elink)
-              this.$message.success('瀵煎嚭鎴愬姛')
-            }
-          } catch (err) {
-            console.log(err);
-            // 鍒涘缓涓�涓秴閾炬帴锛屽皢鏂囦欢娴佽祴杩涘幓锛岀劧鍚庡疄鐜拌繖涓秴閾炬帴鐨勫崟鍑讳簨浠�
-            const elink = document.createElement('a')
-            elink.download = filename
-            elink.style.display = 'none'
-            elink.href = URL.createObjectURL(blob)
-            document.body.appendChild(elink)
-            elink.click();
-            URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄
-            document.body.removeChild(elink)
-            this.$message.success('瀵煎嚭鎴愬姛')
-          }
-        }
+        this.$download.saveAs(blob, filename)
+        this.$message.success('瀵煎嚭鎴愬姛')
       })
     },
     handleLookList(row) {
-      this.$axios.get(this.$api.deviceBorrow.getDeviceBorrow + '?id=' + row.id).then(res => {
+      getDeviceBorrow({ id: row.id }).then(res => {
         if (res.code == 200) {
           this.deviceLogs = res.data.deviceLogs
           this.dialogVisible0 = true
         }
       })
-    }
+    },
+    handleDelete(row) {
+      this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          deleteDeviceBorrow({ id: row.id }).then((res) => {
+            if (res.code == 201) return;
+            this.$message.success("鍒犻櫎鎴愬姛");
+            this.refresh();
+          });
+        })
+        .catch(() => { });
+    },
   },
 }
 </script>
diff --git a/src/views/CNAS/resourceDemand/device/component/calibration.vue b/src/views/CNAS/resourceDemand/device/component/calibration.vue
index 655c2b4..df025bd 100644
--- a/src/views/CNAS/resourceDemand/device/component/calibration.vue
+++ b/src/views/CNAS/resourceDemand/device/component/calibration.vue
@@ -4,7 +4,7 @@
     <div class="btnS">
       <el-button size="small" type="primary" @click="calibrationMaintenance()">鏍″噯椤圭洰缁存姢</el-button>
       <el-button size="small" type="primary" @click="add('add')">娣诲姞鏍″噯璁板綍</el-button>
-      <el-button size="small" type="primary" @click="handleDown">瀵煎嚭Excel</el-button>
+      <!-- <el-button size="small" type="primary" @click="handleDown">瀵煎嚭Excel</el-button> -->
     </div>
     <div class="tables" style="margin-top: 10px;">
       <el-table :data="tableData" height="calc(100vh - 20em)">
@@ -240,20 +240,6 @@
             </template>
           </el-table-column>
         </el-table>
-        <!-- 鎿嶄綔鏃ュ織 -->
-        <!--        <h4>-->
-        <!--          <div style="display: flex;-->
-        <!--      align-items: center;">-->
-        <!--            <span class="line"></span><span>鏈褰曠姸鎬佸拰鎿嶄綔鏃ュ織</span>-->
-        <!--          </div>-->
-        <!--        </h4>-->
-        <!--        <el-table :data="tableDataOperate" style="width: 100%">-->
-        <!--          <el-table-column type="index" label="搴忓彿" width="100"></el-table-column>-->
-        <!--          <el-table-column prop="operator" label="鎿嶄綔浜�" width="120"></el-table-column>-->
-        <!--          <el-table-column prop="operationTime" label="鎿嶄綔鏃堕棿" width="180"></el-table-column>-->
-        <!--          <el-table-column prop="operationType" label="鎿嶄綔绫诲瀷" width="120"></el-table-column>-->
-        <!--          <el-table-column prop="operationContent" label="鎿嶄綔鍐呭"></el-table-column>-->
-        <!--        </el-table>-->
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button v-if="operationType === 'add'" @click="dialogVisible1 = false">鍙� 娑�</el-button>
@@ -265,10 +251,8 @@
 </template>
 
 <script>
-import fileDownload from "@/utils/file";
 import {
   deviceMetricRecordPage,
-  deviceLog,
   showDeviceMetricsCopy,
   deleteDeviceMetricRecord,
   deviceMetricRecordExport,
@@ -276,7 +260,9 @@
   selectDeviceMetric,
   deleteDeviceMetrics,
   addOrUpdateDeviceMetricRecord,
+  saveOrUpdateDeviceMetric
 } from '@/api/cnas/resourceDemand/device.js'
+import { mapGetters } from "vuex";
 export default {
   props: {
     clickNodeVal: {
@@ -343,7 +329,6 @@
         ],
       },
       addRecordLoading: false,
-      tableDataOperate: [], // 鏈褰曠姸鎬佸拰鎿嶄綔鏃ュ織
       upLoading: false,
       operationType: '',
       search: {
@@ -355,13 +340,13 @@
   },
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
   computed: {
+    ...mapGetters(["nickName"]),
     action() {
       return this.javaApi + '/personBasicInfo/saveCNASFile'
     }
   },
   mounted() {
     //鑾峰彇鎿嶄綔璁板綍淇℃伅
-    this.getOperateMsg();
     this.getTableList(this.clickNodeVal.value) // 鑾峰彇璁惧鏍″噯鍒楄〃鏁版嵁
   },
   methods: {
@@ -397,11 +382,6 @@
         this.search.total = res.data.total
       })
     },
-    getOperateMsg() {
-      deviceLog(this.clickNodeVal.value).then(res => {
-        this.tableDataOperate = res.data
-      })
-    },
     // 娣诲姞鏍告煡璁板綍
     add(type) {
       this.operationType = type
@@ -410,7 +390,7 @@
     },
     // 鏌ョ湅璇︽儏
     handleViewClick(type, row) {
-      showDeviceMetricsCopy({ id: row.id, type: calibrate }).then(res => {
+      showDeviceMetricsCopy({ id: row.id, type: 'calibrate' }).then(res => {
         this.calibrateParams = res.data
       })
       this.calibrationRecord = { ...row }
@@ -439,13 +419,11 @@
       let state = /\.(jpg|jpeg|png|gif)$/i.test(row.systemFileName)
       if (state) {
         let url = this.javaApi + '/img/' + row.systemFileName;
-        fileDownload.downloadIamge(url, row.systemFileName)
+        this.$download.saveAs(url, row.systemFileName)
+        this.$message.success('涓嬭浇鎴愬姛')
       } else {
         const url = this.javaApi + '/word/' + row.systemFileName
-        const link = document.createElement('a');
-        link.href = url;
-        link.download = row.systemFileName;
-        link.click();
+        this.$download.saveAs(url, row.systemFileName)
         this.$message.success('涓嬭浇鎴愬姛')
       }
     },
@@ -454,7 +432,7 @@
       this.outLoading = true
       deviceMetricRecordExport({
         deviceId: this.clickNodeVal.value,
-        type: calibrate
+        type: 'calibrate'
       }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
@@ -527,10 +505,9 @@
           this.calibrateParamsLoading = true
           this.addCalibrateLoading = true
           this.form0.deviceId = this.clickNodeVal.value;
-          const user = JSON.parse(localStorage.getItem('user'))
-          this.form0.createdBy = user.name;
+          this.form0.createdBy = this.nickName;
           this.form0.type = 'calibrate'
-          deleteDeviceMetrics(this.form0).then(res => {
+          saveOrUpdateDeviceMetric(this.form0).then(res => {
             if (res.code == 200) {
               this.$message.success('淇濆瓨鎴愬姛')
               this.$refs['form0'].resetFields()
@@ -559,8 +536,7 @@
             }
             this.addRecordLoading = true
             this.calibrationRecord.deviceId = this.clickNodeVal.value;
-            let user = JSON.parse(localStorage.getItem('user'))
-            this.calibrationRecord.createUser = user.name
+            this.calibrationRecord.createUser = this.nickName
             this.calibrationRecord.type = 'calibrate'
             this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams
             addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => {
@@ -636,16 +612,6 @@
       }
     }
   }
-}
-
-function downloadImage(url) {
-  const link = document.createElement('a');
-  link.href = url;
-  link.target = "_blank"
-  link.download = 'attachment.jpg'; // 鏂囦欢鍚�
-  document.body.appendChild(link);
-  link.click();
-  document.body.removeChild(link);
 }
 
 </script>
diff --git a/src/views/CNAS/resourceDemand/device/component/check.vue b/src/views/CNAS/resourceDemand/device/component/check.vue
index 10c378d..362cbfd 100644
--- a/src/views/CNAS/resourceDemand/device/component/check.vue
+++ b/src/views/CNAS/resourceDemand/device/component/check.vue
@@ -177,7 +177,7 @@
                     @click="deleteFile"></el-button>
                 </el-input>
                 <el-upload v-if="operationType === 'add'" ref="upload" :action="action" :before-upload="beforeUpload"
-                  :headers="headers" :limit="1" :on-error="onError" :on-success="handleSuccessUp"
+                  :headers="uploadHeader" :limit="1" :on-error="onError" :on-success="handleSuccessUp"
                   :show-file-list="false" style="float: right;">
                   <el-button :loading="upLoading" size="small" style="position: relative; top: -4px;"
                     type="primary">闄勪欢涓婁紶
@@ -247,6 +247,7 @@
 <script>
 import ValueTable from "@/components/Table/value-table.vue";
 import file from '@/utils/file';
+import { mapGetters } from "vuex";
 export default {
   components: {
     ValueTable
@@ -330,11 +331,7 @@
   },
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
   computed: {
-    headers() {
-      return {
-        'token': sessionStorage.getItem('token')
-      }
-    },
+    ...mapGetters(["nickName"]),
     action() {
       return this.javaApi + this.$api.personnel.saveCNASFile
     }
@@ -397,8 +394,7 @@
           this.calibrateParamsLoading = true
           this.addCalibrateLoading = true
           this.form0.deviceId = this.clickNodeVal.value;
-          const user = JSON.parse(localStorage.getItem('user'))
-          this.form0.createdBy = user.name;
+          this.form0.createdBy = this.nickName;
           this.form0.type = 'examine'
           this.$axios.post(this.$api.deviceCheck.saveOrUpdateDeviceMetric, this.form0, {
             headers: {
@@ -441,8 +437,7 @@
             }
             this.addRecordLoading = true
             this.calibrationRecord.deviceId = this.clickNodeVal.value;
-            let user = JSON.parse(localStorage.getItem('user'))
-            this.calibrationRecord.createUser = user.name
+            this.calibrationRecord.createUser = this.nickName
             this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams
             this.calibrationRecord.type = 'examine'
             this.$axios.post(this.$api.deviceCheck.addOrUpdateDeviceMetricRecord, this.calibrationRecord, {
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue b/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue
index 5946df7..8d4097a 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue
@@ -63,7 +63,7 @@
   pageDeviceAcceptance,
   getDeviceAcceptanceFileList,
   delDeviceAcceptanceFileList,
-  exportUseRecord,
+  exportDeviceAcceptance,
   delDeviceAcceptance,
 } from '@/api/cnas/resourceDemand/device.js'
 export default {
@@ -200,13 +200,10 @@
       let url = '';
       if (row.type == 1) {
         url = this.javaApi + '/img/' + row.fileUrl
-        file.downloadIamge(url, row.fileName)
+        this.$download.saveAs(url, row.fileName)
       } else {
         url = this.javaApi + '/word/' + row.fileUrl
-        const link = document.createElement('a');
-        link.href = url;
-        link.download = row.fileName;
-        link.click();
+        this.$download.saveAs(url, row.fileName)
       }
     },
     // 鍒犻櫎
@@ -272,7 +269,7 @@
     // 瀵煎嚭
     handleDownOne(id) {
       this.outLoading = true
-      exportUseRecord({ acceptanceId: id }).then(res => {
+      exportDeviceAcceptance({ acceptanceId: id }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
         this.$download.saveAs(blob, '璁惧楠屾敹.doc')
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue b/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue
index e914e36..b836c06 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentAccident.vue
@@ -40,7 +40,11 @@
 
 <script>
 import AccidentForm from "./accidentForm.vue";
-
+import {
+  pageDeviceAccidentReport,
+  exportDeviceAccidentReport,
+  delDeviceAccidentReport,
+} from '@/api/cnas/resourceDemand/device.js'
 export default {
   name: "equipment-accident",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -73,19 +77,10 @@
     // 鏌ヨ
     getYearTableDetailData(deviceId) {
       this.yearTableDetailDataLoading = true
-      this.$axios.post(this.$api.deviceAccidentReport.pageDeviceAccidentReport, {
-        page: {
-          current: this.pagination1.current,
-          size: this.pagination1.size,
-        },
-        entity: {
-          deviceId: deviceId,
-        }
-      }, {
-        headers: {
-          'Content-Type': 'application/json'
-        },
-        noQs: true
+      pageDeviceAccidentReport({
+        current: this.pagination1.current,
+        size: this.pagination1.size,
+        deviceId: deviceId,
       }).then(res => {
         if (res.code == 200) {
           this.yearTableDetailData = res.data.records
@@ -119,37 +114,10 @@
     // 瀵煎嚭
     handleDownOne(id) {
       this.outLoading = true
-      this.$axios.get(this.$api.deviceAccidentReport.exportDeviceAccidentReport + '?accidentReportId=' + id, {
-        responseType: "blob"
-      }).then(res => {
+      exportDeviceAccidentReport({ accidentReportId: id }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
-        //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
-        let reader = new FileReader();
-        reader.readAsText(blob, 'utf-8');
-        reader.onload = () => {
-          try {
-            let result = JSON.parse(reader.result);
-            if (result.message) {
-              this.$message.error(result.message);
-            } else {
-              const url = URL.createObjectURL(blob);
-              const link = document.createElement('a');
-              link.href = url;
-              link.download = '浠櫒璁惧浜嬫晠鎶ュ憡鍗�.doc';
-              link.click();
-              this.$message.success('瀵煎嚭鎴愬姛')
-            }
-          } catch (err) {
-            console.log(err);
-            const url = URL.createObjectURL(blob);
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = '浠櫒璁惧浜嬫晠鎶ュ憡鍗�.doc';
-            link.click();
-            this.$message.success('瀵煎嚭鎴愬姛')
-          }
-        }
+        this.$download.saveAs(blob, '浠櫒璁惧浜嬫晠鎶ュ憡鍗�.doc')
       })
     },
     // 鍒犻櫎
@@ -159,7 +127,7 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        this.$axios.get(this.$api.deviceAccidentReport.delDeviceAccidentReport + '?accidentReportId=' + id).then(res => {
+        delDeviceAccidentReport({ accidentReportId: id }).then(res => {
           this.$message.success('鍒犻櫎鎴愬姛锛�');
           this.getYearTableDetailData(this.clickNodeVal.value);
         });
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue b/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue
index 6ebd342..dc5e05f 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentFailure.vue
@@ -38,7 +38,11 @@
 
 <script>
 import FailureForm from "./failureForm.vue";
-
+import {
+  pageDeviceBreakdownMaintenance,
+  exportDeviceBreakdownMaintenance,
+  delDeviceBreakdownMaintenance,
+} from '@/api/cnas/resourceDemand/device.js'
 export default {
   name: "equipment-failure",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -71,19 +75,10 @@
     // 鏌ヨ
     getYearTableDetailData(deviceId) {
       this.yearTableDetailDataLoading = true
-      this.$axios.post(this.$api.deviceBreakdownMaintenance.pageDeviceBreakdownMaintenance, {
-        page: {
-          current: this.pagination1.current,
-          size: this.pagination1.size,
-        },
-        entity: {
-          deviceId: deviceId,
-        }
-      }, {
-        headers: {
-          'Content-Type': 'application/json'
-        },
-        noQs: true
+      pageDeviceBreakdownMaintenance({
+        current: this.pagination1.current,
+        size: this.pagination1.size,
+        deviceId: deviceId,
       }).then(res => {
         if (res.code == 200) {
           this.yearTableDetailData = res.data.records
@@ -117,37 +112,13 @@
     // 瀵煎嚭
     handleDownOne(id) {
       this.outLoading = true
-      this.$axios.get(this.$api.deviceBreakdownMaintenance.exportDeviceBreakdownMaintenance + '?maintenanceId=' + id, {
-        responseType: "blob"
+      exportDeviceBreakdownMaintenance({
+        maintenanceId: id
       }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
-        //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
-        let reader = new FileReader();
-        reader.readAsText(blob, 'utf-8');
-        reader.onload = () => {
-          try {
-            let result = JSON.parse(reader.result);
-            if (result.message) {
-              this.$message.error(result.message);
-            } else {
-              const url = URL.createObjectURL(blob);
-              const link = document.createElement('a');
-              link.href = url;
-              link.download = '浠櫒璁惧淇悊鐢宠琛�.doc';
-              link.click();
-              this.$message.success('瀵煎嚭鎴愬姛')
-            }
-          } catch (err) {
-            console.log(err);
-            const url = URL.createObjectURL(blob);
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = '浠櫒璁惧淇悊鐢宠琛�.doc';
-            link.click();
-            this.$message.success('瀵煎嚭鎴愬姛')
-          }
-        }
+        this.$download.saveAs(blob, '浠櫒璁惧淇悊鐢宠琛�.doc')
+        this.$message.success('瀵煎嚭鎴愬姛')
       })
     },
     // 鍒犻櫎
@@ -157,7 +128,9 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        this.$axios.get(this.$api.deviceBreakdownMaintenance.delDeviceBreakdownMaintenance + '?maintenanceId=' + id).then(res => {
+        delDeviceBreakdownMaintenance({
+          maintenanceId: id
+        }).then(res => {
           this.$message.success('鍒犻櫎鎴愬姛锛�');
           this.getYearTableDetailData(this.clickNodeVal.value);
         });
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue b/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue
index 4a85d99..5729073 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentScrap.vue
@@ -7,41 +7,48 @@
       </div>
       <div>
         <el-table ref="yearTable" v-loading="yearTableDetailDataLoading" :data="yearTableDetailData"
-                  height="calc(100vh - 18em)"
-                  style="width: 100% ;">
+          height="calc(100vh - 18em)" style="width: 100% ;">
           <!-- 琛ㄦ牸鍒� -->
-          <el-table-column align="center" header-align="center" label="搴忓彿" prop="prop" type="index" width="70"></el-table-column>
-<!--          <el-table-column label="浠櫒鍚嶇О" min-width="150" prop="unitName"></el-table-column>-->
-<!--          <el-table-column label="鍨嬪彿" min-width="100" prop="address"></el-table-column>-->
+          <el-table-column align="center" header-align="center" label="搴忓彿" prop="prop" type="index"
+            width="70"></el-table-column>
+          <!--          <el-table-column label="浠櫒鍚嶇О" min-width="150" prop="unitName"></el-table-column>-->
+          <!--          <el-table-column label="鍨嬪彿" min-width="100" prop="address"></el-table-column>-->
           <el-table-column label="閰嶄欢" min-width="150" prop="parts"></el-table-column>
           <el-table-column label="缂栧彿" min-width="100" prop="number"></el-table-column>
           <el-table-column label="鎶ュ簾鐞嗙敱" min-width="150" prop="reasonsForScrap"></el-table-column>
           <!-- 鎿嶄綔鎸夐挳 -->
           <el-table-column align="center" fixed="right" label="鎿嶄綔" min-width="120">
             <template slot-scope="scope">
-              <el-button :disabled="scope.row.ratifyStatus === 1" size="small" type="text" @click="handleForm(scope.row.scrappedId)">鎿嶄綔</el-button>
+              <el-button :disabled="scope.row.ratifyStatus === 1" size="small" type="text"
+                @click="handleForm(scope.row.scrappedId)">鎿嶄綔</el-button>
               <el-button size="small" type="text" @click="handleDownOne(scope.row.scrappedId)">瀵煎嚭</el-button>
-              <el-button size="small" style="color: #f56c6c" type="text" @click="deleteFun(scope.row.scrappedId)">鍒犻櫎</el-button>
+              <el-button size="small" style="color: #f56c6c" type="text"
+                @click="deleteFun(scope.row.scrappedId)">鍒犻櫎</el-button>
             </template>
           </el-table-column>
         </el-table>
         <el-pagination :current-page="1" :page-size="pagination1.size" :page-sizes="[10, 20, 30, 50, 100]"
-                       :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange1"
-                       @current-change="handleCurrentChange1">
+          :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper"
+          @size-change="handleSizeChange1" @current-change="handleCurrentChange1">
         </el-pagination>
       </div>
     </div>
-    <scrap-application-form v-if="applicationForm" ref="applicationForm" @closeDialog="closeDialog"></scrap-application-form>
+    <scrap-application-form v-if="applicationForm" ref="applicationForm"
+      @closeDialog="closeDialog"></scrap-application-form>
   </div>
 </template>
 
 <script>
 import scrapApplicationForm from "./scrapApplicationForm.vue";
-
+import {
+  pageDeviceScrapped,
+  exportDeviceScrapped,
+  delDeviceScrapped,
+} from '@/api/cnas/resourceDemand/device.js'
 export default {
   name: "equipment-scrap",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
-  components: {scrapApplicationForm},
+  components: { scrapApplicationForm },
   props: {
     clickNodeVal: {
       type: Object,
@@ -68,21 +75,12 @@
   // 鏂规硶闆嗗悎
   methods: {
     // 鏌ヨ
-    getYearTableDetailData (deviceId) {
+    getYearTableDetailData(deviceId) {
       this.yearTableDetailDataLoading = true
-      this.$axios.post(this.$api.deviceScrapped.pageDeviceScrapped,{
-        page: {
-          current: this.pagination1.current,
-          size: this.pagination1.size,
-        },
-        entity: {
-          deviceId: deviceId,
-        }
-      }, {
-        headers: {
-          'Content-Type': 'application/json'
-        },
-        noQs: true
+      pageDeviceScrapped({
+        current: this.pagination1.current,
+        size: this.pagination1.size,
+        deviceId: deviceId,
       }).then(res => {
         if (res.code == 200) {
           this.yearTableDetailData = res.data.records
@@ -93,13 +91,13 @@
         this.yearTableDetailDataLoading = false
       })
     },
-    handleForm (id) {
+    handleForm(id) {
       this.applicationForm = true
       this.$nextTick(() => {
         this.$refs.applicationForm.openDialog(id, this.clickNodeVal.value)
       })
     },
-    closeDialog () {
+    closeDialog() {
       this.applicationForm = false
       this.getYearTableDetailData(this.clickNodeVal.value)
     },
@@ -116,37 +114,11 @@
     // 瀵煎嚭
     handleDownOne(id) {
       this.outLoading = true
-      this.$axios.get(this.$api.deviceScrapped.exportDeviceScrapped + '?scrappedId=' + id, {
-        responseType: "blob"
-      }).then(res => {
+      exportDeviceScrapped({ scrappedId: id }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
-        //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
-        let reader = new FileReader();
-        reader.readAsText(blob, 'utf-8');
-        reader.onload = () => {
-          try {
-            let result = JSON.parse(reader.result);
-            if (result.message) {
-              this.$message.error(result.message);
-            } else {
-              const url = URL.createObjectURL(blob);
-              const link = document.createElement('a');
-              link.href = url;
-              link.download = '浠櫒璁惧鎶ュ簾鐢宠琛�.doc';
-              link.click();
-              this.$message.success('瀵煎嚭鎴愬姛')
-            }
-          } catch (err) {
-            console.log(err);
-            const url = URL.createObjectURL(blob);
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = '浠櫒璁惧鎶ュ簾鐢宠琛�.doc';
-            link.click();
-            this.$message.success('瀵煎嚭鎴愬姛')
-          }
-        }
+        this.$download.saveAs(blob, '浠櫒璁惧鎶ュ簾鐢宠琛�.doc')
+        this.$message.success('瀵煎嚭鎴愬姛')
       })
     },
     // 鍒犻櫎
@@ -156,7 +128,7 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        this.$axios.get(this.$api.deviceScrapped.delDeviceScrapped + '?scrappedId=' + id).then(res => {
+        delDeviceScrapped({ scrappedId: id }).then(res => {
           this.$message.success('鍒犻櫎鎴愬姛锛�');
           this.getYearTableDetailData(this.clickNodeVal.value);
         });
@@ -185,6 +157,7 @@
   justify-content: space-between;
   align-items: center;
 }
+
 .title-search {
   display: flex;
   align-items: center;
diff --git a/src/views/CNAS/resourceDemand/device/component/failureForm.vue b/src/views/CNAS/resourceDemand/device/component/failureForm.vue
index f8fb193..70d0cf4 100644
--- a/src/views/CNAS/resourceDemand/device/component/failureForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/failureForm.vue
@@ -67,6 +67,11 @@
 </template>
 
 <script>
+import {
+  getDeviceBreakdownMaintenance,
+  addDeviceBreakdownMaintenance,
+} from '@/api/cnas/resourceDemand/device.js'
+import { selectUserCondition } from "@/api/business/inspectionTask";
 export default {
   name: "failure-form",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -115,7 +120,9 @@
     },
     // 鏌ヨ璇︽儏
     searchInfo() {
-      this.$axios.get(this.$api.deviceBreakdownMaintenance.getDeviceBreakdownMaintenance + '?maintenanceId=' + this.form.maintenanceId).then(res => {
+      getDeviceBreakdownMaintenance({
+        maintenanceId: this.form.maintenanceId
+      }).then(res => {
         if (res.code === 200) {
           this.form = { ...res.data }
           if (this.form.isFinish === 0) {
@@ -144,13 +151,7 @@
       this.form.flowType = this.currentStep
       this.$refs.modelForm.validate((valid) => {
         if (valid) {
-          this.$axios.post(this.$api.deviceBreakdownMaintenance.addDeviceBreakdownMaintenance,
-            this.form, {
-            headers: {
-              'Content-Type': 'application/json'
-            },
-            noQs: true
-          }).then(res => {
+          addDeviceBreakdownMaintenance(this.form).then(res => {
             if (res.code == 200) {
               this.$message.success('鏂板鎴愬姛')
               this.resetForm()
@@ -168,18 +169,11 @@
       this.$emit('closeDialog')
     },
     getUserList() {
-      this.$axios.post(this.$api.user.selectUserList, {
-        page: { current: -1, size: -1, },
-        entity: { name: null }
-      }, {
-        headers: {
-          'Content-Type': 'application/json'
-        }
-      }).then(res => {
+      selectUserCondition().then(res => {
         if (res.code === 201) {
           return
         }
-        this.userList = res.data.records
+        this.userList = res.data
       })
     },
   },
diff --git a/src/views/CNAS/resourceDemand/device/component/fault.vue b/src/views/CNAS/resourceDemand/device/component/fault.vue
index ed75e85..a229fa7 100644
--- a/src/views/CNAS/resourceDemand/device/component/fault.vue
+++ b/src/views/CNAS/resourceDemand/device/component/fault.vue
@@ -277,7 +277,7 @@
 
 <script>
 import { dateFormat } from '@/utils/date'
-
+import { mapGetters } from "vuex";
 export default {
   props: {
     clickNodeVal: {
@@ -308,6 +308,7 @@
     }
   },
   computed: {
+    ...mapGetters(["nickName"]),
     action() {
       return this.javaApi + this.$api.personnel.saveCNASFile
     }
@@ -351,29 +352,28 @@
       this.$refs.form.validate((valid) => {
         if (valid === true || saveState !== '1submit') {
           // 缁欏綋鍓嶇幆鑺傝缃垱寤轰汉涓庢椂闂�
-          let user = JSON.parse(localStorage.getItem('user'))
           const dateTime = dateFormat(new Date())
           // 鑾峰彇褰撳墠鐜妭鎿嶄綔浜轰笌鏃ユ湡
           switch (this.currentStep) {
             case 0:
-              this.form.submitUser = user.name
-              this.form.submitOperatingPersonnel = user.name
+              this.form.submitUser = this.nickName
+              this.form.submitOperatingPersonnel = this.nickName
               this.form.submitDate = dateTime
               break
             case 1:
-              this.form.adminOperatingPersonnel = user.name
+              this.form.adminOperatingPersonnel = this.nickName
               this.form.adminDate = dateTime
               break
             case 2:
-              this.form.technicalOperatingPersonnel = user.name
+              this.form.technicalOperatingPersonnel = this.nickName
               this.form.technicalDate = dateTime
               break
             case 3:
-              this.form.maintainOperatingPersonnel = user.name
+              this.form.maintainOperatingPersonnel = this.nickName
               this.form.maintainDate = dateTime
               break
             case 4:
-              this.form.afterMaintenanceOperatingPersonnel = user.name
+              this.form.afterMaintenanceOperatingPersonnel = this.nickName
               this.form.afterMaintenanceDate = dateTime
               break
             default:
diff --git a/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue b/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
index 6b6b36b..5e33adc 100644
--- a/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
@@ -136,6 +136,13 @@
 </template>
 
 <script>
+import {
+  getDeviceInspectionRecord,
+  addDeviceInspectionRecord,
+  updateDeviceInspectionRecord,
+  reviewDeviceInspectionRecord,
+} from '@/api/cnas/resourceDemand/device.js'
+import { selectUserCondition } from "@/api/business/inspectionTask";
 export default {
   name: "inspection-form",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -181,7 +188,9 @@
       }
     },
     searchInfo() {
-      this.$axios.get(this.$api.deviceInspectionRecord.getDeviceInspectionRecord + '?inspectionRecordId=' + this.form.inspectionRecordId).then(res => {
+      getDeviceInspectionRecord({
+        inspectionRecordId: this.form.inspectionRecordId
+      }).then(res => {
         if (res.code === 200) {
           this.form = { ...res.data }
           this.details = this.form.details || []
@@ -198,13 +207,7 @@
       this.form.details = this.HaveJson(this.details)
       this.submitFormLoading = true
       if (this.operationType === 'add') {
-        this.$axios.post(this.$api.deviceInspectionRecord.addDeviceInspectionRecord,
-          this.form, {
-          headers: {
-            'Content-Type': 'application/json'
-          },
-          noQs: true
-        }).then(res => {
+        addDeviceInspectionRecord(this.form).then(res => {
           if (res.code == 200) {
             this.$message.success('鏂板鎴愬姛')
             this.resetForm()
@@ -214,13 +217,7 @@
           this.submitFormLoading = false
         })
       } else {
-        this.$axios.post(this.$api.deviceInspectionRecord.updateDeviceInspectionRecord,
-          this.form, {
-          headers: {
-            'Content-Type': 'application/json'
-          },
-          noQs: true
-        }).then(res => {
+        updateDeviceInspectionRecord(this.form).then(res => {
           if (res.code == 200) {
             this.$message.success('鏂板鎴愬姛')
             this.resetForm()
@@ -236,13 +233,7 @@
         inspectionRecordId: this.form.inspectionRecordId,
         status: status,
       }
-      this.$axios.post(this.$api.deviceInspectionRecord.reviewDeviceInspectionRecord,
-        params, {
-        headers: {
-          'Content-Type': 'application/json'
-        },
-        noQs: true
-      }).then(res => {
+      reviewDeviceInspectionRecord(params).then(res => {
         if (res.code == 200) {
           this.$message.success('瀹℃牳鎴愬姛')
           this.resetForm()
@@ -257,18 +248,11 @@
       this.$emit('closeDialog')
     },
     getUserList() {
-      this.$axios.post(this.$api.user.selectUserList, {
-        page: { current: -1, size: -1, },
-        entity: { name: null }
-      }, {
-        headers: {
-          'Content-Type': 'application/json'
-        }
-      }).then(res => {
+      selectUserCondition().then(res => {
         if (res.code === 201) {
           return
         }
-        this.userList = res.data.records
+        this.userList = res.data
       })
     },
   },
diff --git a/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue b/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue
index 78709ed..83af6ff 100644
--- a/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue
+++ b/src/views/CNAS/resourceDemand/device/component/inspectionOfEquipment.vue
@@ -48,7 +48,11 @@
 
 <script>
 import InspectionForm from "./inspectionForm.vue";
-
+import {
+  getDeviceInspectionRecordByPage,
+  exportDeviceInspectionRecord,
+  deleteDeviceInspectionRecord,
+} from '@/api/cnas/resourceDemand/device.js'
 export default {
   name: "inspection-of-equipment",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -81,19 +85,10 @@
     // 鏌ヨ
     getYearTableDetailData(deviceId) {
       this.yearTableDetailDataLoading = true
-      this.$axios.post(this.$api.deviceInspectionRecord.getDeviceInspectionRecordByPage, {
-        page: {
-          current: this.pagination1.current,
-          size: this.pagination1.size,
-        },
-        entity: {
-          deviceId: deviceId,
-        }
-      }, {
-        headers: {
-          'Content-Type': 'application/json'
-        },
-        noQs: true
+      getDeviceInspectionRecordByPage({
+        current: this.pagination1.current,
+        size: this.pagination1.size,
+        deviceId: deviceId,
       }).then(res => {
         if (res.code == 200) {
           this.yearTableDetailData = res.data.records
@@ -127,37 +122,12 @@
     // 瀵煎嚭
     handleDownOne(id) {
       this.outLoading = true
-      this.$axios.get(this.$api.deviceInspectionRecord.exportDeviceInspectionRecord + '?inspectionRecordId=' + id, {
-        responseType: "blob"
+      exportDeviceInspectionRecord({
+        inspectionRecordId: id
       }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
-        //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
-        let reader = new FileReader();
-        reader.readAsText(blob, 'utf-8');
-        reader.onload = () => {
-          try {
-            let result = JSON.parse(reader.result);
-            if (result.message) {
-              this.$message.error(result.message);
-            } else {
-              const url = URL.createObjectURL(blob);
-              const link = document.createElement('a');
-              link.href = url;
-              link.download = '璁惧鐐规璁板綍琛�.doc';
-              link.click();
-              this.$message.success('瀵煎嚭鎴愬姛')
-            }
-          } catch (err) {
-            console.log(err);
-            const url = URL.createObjectURL(blob);
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = '璁惧鐐规璁板綍琛�.doc';
-            link.click();
-            this.$message.success('瀵煎嚭鎴愬姛')
-          }
-        }
+        this.$download.saveAs(blob, '璁惧鐐规璁板綍琛�.doc')
       })
     },
     // 鍒犻櫎
@@ -167,7 +137,7 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        this.$axios.get(this.$api.deviceInspectionRecord.deleteDeviceInspectionRecord + '?inspectionRecordId=' + id).then(res => {
+        deleteDeviceInspectionRecord({ inspectionRecordId: id }).then(res => {
           this.$message.success('鍒犻櫎鎴愬姛锛�');
           this.getYearTableDetailData(this.clickNodeVal.value);
         });
diff --git a/src/views/CNAS/resourceDemand/device/component/maintenance.vue b/src/views/CNAS/resourceDemand/device/component/maintenance.vue
index 8510263..ab1d867 100644
--- a/src/views/CNAS/resourceDemand/device/component/maintenance.vue
+++ b/src/views/CNAS/resourceDemand/device/component/maintenance.vue
@@ -118,8 +118,10 @@
 <script>
 import {
   exportMaintenanceRecord,
-  deviceMaintainDelete,
+  deleteDeviceMaintenance,
   selectDeviceByCode,
+  addDeviceMaintenance,
+  getDeviceMaintenancePage,
 } from '@/api/cnas/resourceDemand/device.js'
 export default {
   props: {
@@ -180,33 +182,8 @@
       exportMaintenanceRecord({ deviceId: this.clickNodeVal.value }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
+        this.$download.saveAs(blob, '璁惧缁存姢淇濆吇璁板綍.doc')
         this.$message.success('瀵煎嚭鎴愬姛')
-        //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
-        let reader = new FileReader();
-        reader.readAsText(blob, 'utf-8');
-        reader.onload = () => {
-          try {
-            let result = JSON.parse(reader.result);
-            if (result.message) {
-              this.$message.error(result.message);
-            } else {
-              const url = URL.createObjectURL(blob);
-              const link = document.createElement('a');
-              link.href = url;
-              link.download = '璁惧缁存姢淇濆吇璁板綍.doc';
-              link.click();
-              this.$message.success('瀵煎嚭鎴愬姛')
-            }
-          } catch (err) {
-            console.log(err);
-            const url = URL.createObjectURL(blob);
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = '璁惧缁存姢淇濆吇璁板綍.doc';
-            link.click();
-            this.$message.success('瀵煎嚭鎴愬姛')
-          }
-        }
       })
     },
     //鎿嶄綔璇︽儏鍒犻櫎
@@ -216,9 +193,10 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        deviceMaintainDelete(row.id).then(res => {
+        deleteDeviceMaintenance({ id: row.id }).then(res => {
         })
-        this.MaintainParam.splice(index, 1);
+        // this.MaintainParam.splice(index, 1);
+        this.getAllMessage(this.clickNodeVal.value)
         this.$message({
           type: 'success',
           message: '鍒犻櫎鎴愬姛!'
@@ -246,15 +224,15 @@
       this.$refs['form'].validate((valid) => {
         if (valid) {
           this.formData.deviceId = this.clickNodeVal.value;
-          this.$axios.post(this.$api.deviceCheck.deviceMaintainAdd, this.formData).then(res => {
+          addDeviceMaintenance(this.formData).then(res => {
             if (res.code == 200) {
               this.$message.success('娣诲姞鎴愬姛');
               this.getAllMessage(this.clickNodeVal.value)
+              this.dialogVisible = false;
+              this.formData = {}; //娓呯┖琛ㄥ崟
             }
           })
-          this.MaintainParam.push(this.formData)
-          this.dialogVisible = false;
-          this.formData = {}; //娓呯┖琛ㄥ崟
+          // this.MaintainParam.push(this.formData)
         }
       })
     },
@@ -269,7 +247,10 @@
     },
     //鑾峰彇琛ㄥ崟璁惧缁存姢淇℃伅
     getAllMessage(deviceId) {
-      this.$axios.get(this.$api.deviceCheck.getDeviceMaintenancePage + "?deviceId=" + deviceId + "&size=" + this.search.size + "&current=" + this.search.current + "&deviceNumber=" + this.search.deviceNumber).then(res => {
+      getDeviceMaintenancePage({
+        deviceId,
+        ...this.search
+      }).then(res => {
         if (res.code == 200) {
           this.MaintainParam = res.data.records
           this.search.total = res.data.total
diff --git a/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue b/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
index 318eca1..8ab8536 100644
--- a/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
+++ b/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
@@ -1,16 +1,9 @@
 <!-- 浣滀笟鎸囧涔� -->
 <template>
   <div>
-    <div style="width:100%;height:30px;margin:5px 0px">
-      <el-row>
-        <el-col :span="12" style="text-align: left;">
-          <p style="line-height: 30px;">浣滀笟鎸囧涔�</p>
-        </el-col>
-        <el-col :span="12" style="text-align: right;">
-          <el-button size="small" type="primary" @click="getList">鍒锋柊</el-button>
-          <el-button size="small" type="primary" @click="dialogVisible = true">鍙楁帶鐢宠</el-button>
-        </el-col>
-      </el-row>
+    <div style="margin: 10px 0;text-align: right">
+      <el-button size="small" type="primary" @click="getList">鍒锋柊</el-button>
+      <el-button size="small" type="primary" @click="dialogVisible = true">鍙楁帶鐢宠</el-button>
     </div>
     <el-table :data="tableData" border height="calc(100vh - 18em)">
       <el-table-column type="index" label="搴忓彿" width="120">
@@ -58,8 +51,8 @@
               </el-form-item>
               <el-form-item label="闄勪欢锛�" style="float: left;">
                 <el-upload ref="uploadFile" :action="action" :before-remove="beforeRemove" :file-list="fileList1"
-                  :headers="headers" :limit="1" :on-error="onError" :on-exceed="handleExceed" :on-remove="handleRemove1"
-                  :on-success="onSuccess1" class="upload-demo" multiple>
+                  :headers="uploadHeader" :limit="1" :on-error="onError" :on-exceed="handleExceed"
+                  :on-remove="handleRemove1" :on-success="onSuccess1" class="upload-demo" multiple>
                   <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
                 </el-upload>
               </el-form-item>
@@ -86,7 +79,7 @@
           <el-button size="small" @click="delFile">鍒犻櫎</el-button>
         </div>
         <el-table :data="documentTableData" border style="width: 100%;" tooltip-effect="dark" :row-key="getRowKey"
-          @selection-change="handleSelectionChange" height="30em">
+          @selection-change="handleSelectionChange" height="29em">
           <el-table-column type="selection" width="55%">
           </el-table-column>
           <el-table-column label="搴忓彿" prop="id" type="index" width="60"></el-table-column>
@@ -165,8 +158,8 @@
             <el-col :span="24">
               <el-form-item label="闄勪欢锛�" style="float: left;">
                 <el-upload ref="uploadFile" :action="action" :before-remove="beforeRemove" :file-list="fileList"
-                  :headers="headers" :limit="1" :on-error="onError" :on-exceed="handleExceed" :on-remove="handleRemove"
-                  :on-success="onSuccess" class="upload-demo" multiple>
+                  :headers="uploadHeader" :limit="1" :on-error="onError" :on-exceed="handleExceed"
+                  :on-remove="handleRemove" :on-success="onSuccess" class="upload-demo" multiple>
                   <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
                 </el-upload>
               </el-form-item>
@@ -184,7 +177,15 @@
 
 <script>
 import fileDownload from "@/utils/file";
-
+import {
+  approvalOfHomeworkInstructionManual,
+  homeworkGuidebook,
+  homeworkGuidebookEditor,
+  newHomeworkGuidebookAdded,
+  deleteHomeworkGuidebook,
+  pageByPageQueryOfHomeworkInstructions,
+  selectDeviceParameter,
+} from '@/api/cnas/resourceDemand/device.js'
 export default {
   props: {
     clickNodeVal: {
@@ -275,13 +276,14 @@
       });
     },
     approvalFun(id, status) {
-      this.$axios.get(this.$api.deviceCheck.approvalOfHomeworkInstructionManual + "?id=" + id + "&status=" + status).then(res => {
+      approvalOfHomeworkInstructionManual({ id, status }).then(res => {
         this.getList()
+        this.$message({
+          type: 'success',
+          message: '鎿嶄綔鎴愬姛!'
+        });
       })
-      this.$message({
-        type: 'success',
-        message: '鎿嶄綔鎴愬姛!'
-      });
+
     },
     getRowKey(row) {
       return row.index
@@ -292,7 +294,10 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        this.$axios.get(this.$api.deviceCheck.homeworkGuidebook + "?id=" + row.id + "&instructionId=" + row.instructionId).then(res => {
+        homeworkGuidebook({
+          id: row.id,
+          instructionId: row.instructionId
+        }).then(res => {
           this.$message.success('鍒犻櫎鎴愬姛锛�')
           this.getList()
         })
@@ -319,7 +324,7 @@
     },
     instructionEditFun(row) {
       this.dialogVisible = true
-      this.$axios.get(this.$api.deviceCheck.homeworkGuidebookEditor + "?instructionId=" + row.instructionId).then(res => {
+      homeworkGuidebookEditor({ instructionId: row.instructionId }).then(res => {
         if (res.code == 200) {
           this.instructionForm = res.data.instruction;
           if (this.instructionForm.fileSystemName) {
@@ -345,11 +350,7 @@
       this.$refs.form1.validate((valid) => {
         if (valid) {
           this.instructionForm.feTempHumRecordList = this.documentTableData
-          this.$axios.post(this.$api.deviceCheck.newHomeworkGuidebookAdded, this.instructionForm, {
-            headers: {
-              'Content-Type': 'application/json'
-            }
-          }).then(res => {
+          newHomeworkGuidebookAdded(this.instructionForm).then(res => {
             if (res.code == 200) {
               this.$message.success('鎿嶄綔鎴愬姛锛�')
               this.dialogVisible = false
@@ -445,7 +446,7 @@
         .filter(item => item.id !== undefined)
         .map(item => item.id).join(',');
       //鏈夐敊璇�
-      const res = await this.$axios.get(this.$api.deviceCheck.deleteHomeworkGuidebook + '?ids=' + ids);
+      const res = await deleteHomeworkGuidebook({ ids });
       if (res.code === 200) {
         // 鍒犻櫎瑙嗗浘鐨勬暟鎹�
         for (const resKey in this.selectedRow) {
@@ -483,7 +484,7 @@
       this.$message.warning(`褰撳墠闄愬埗閫夋嫨 1 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠躲�俙);
     },
     getList() {
-      this.$axios.get(this.$api.deviceCheck.pageByPageQueryOfHomeworkInstructions + "?size=" + this.search.size + "&current=" + this.search.current).then(res => {
+      pageByPageQueryOfHomeworkInstructions({ ...this.search }).then(res => {
         if (res.code == 200) {
           this.tableData = res.data.records;
           this.search.total = res.data.total
@@ -491,17 +492,7 @@
       })
     },
     getAllDevice() {
-      this.$axios.post(this.$api.deviceScope.selectDeviceParameter + "?laboratoryNameIsNull=" + this.laboratoryNameIsNull, {
-        page: {
-          current: 1,
-          size: -1
-        },
-        entity: this.entity
-      }, {
-        headers: {
-          'Content-Type': 'application/json'
-        }
-      }).then(res => {
+      selectDeviceParameter({ laboratoryNameIsNull: this.laboratoryNameIsNull }).then(res => {
         if (res.code == 200) {
           this.devices = res.data.records;
           this.updateDeviceNameOptions();
@@ -527,13 +518,8 @@
     },
   },
   computed: {
-    headers() {
-      return {
-        'token': sessionStorage.getItem('token')
-      }
-    },
     action() {
-      return this.javaApi + this.$api.personnel.saveCNASFile
+      return this.javaApi + '/personBasicInfo/saveCNASFile'
     }
   },
 }
diff --git a/src/views/CNAS/resourceDemand/device/component/record.vue b/src/views/CNAS/resourceDemand/device/component/record.vue
index 6558776..7b61015 100644
--- a/src/views/CNAS/resourceDemand/device/component/record.vue
+++ b/src/views/CNAS/resourceDemand/device/component/record.vue
@@ -350,14 +350,7 @@
     },
     getUserList() {
       selectUserCondition().then(res => {
-        let data = [];
-        res.data.forEach((a) => {
-          data.push({
-            label: a.name,
-            value: a.id,
-          });
-        });
-        this.userList = data
+        this.userList = res.data
       })
     },
   },
diff --git a/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue b/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue
index a01adbf..62fcbbc 100644
--- a/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue
@@ -73,6 +73,11 @@
 </template>
 
 <script>
+import {
+  getDeviceScrapped,
+  addDeviceScrapped,
+} from '@/api/cnas/resourceDemand/device.js'
+import { selectUserCondition } from "@/api/business/inspectionTask";
 export default {
   name: "scrapApplicationForm",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -122,7 +127,9 @@
     },
     // 鏌ヨ璇︽儏
     searchInfo() {
-      this.$axios.get(this.$api.deviceScrapped.getDeviceScrapped + '?scrappedId=' + this.form.scrappedId).then(res => {
+      getDeviceScrapped({
+        scrappedId: this.form.scrappedId
+      }).then(res => {
         if (res.code === 200) {
           this.form = { ...res.data }
           if (this.form.isFinish === 0) {
@@ -155,13 +162,7 @@
       this.form.flowType = this.currentStep
       this.$refs.modelForm.validate((valid) => {
         if (valid) {
-          this.$axios.post(this.$api.deviceScrapped.addDeviceScrapped,
-            this.form, {
-            headers: {
-              'Content-Type': 'application/json'
-            },
-            noQs: true
-          }).then(res => {
+          addDeviceScrapped(this.form).then(res => {
             if (res.code == 200) {
               this.$message.success('鏂板鎴愬姛')
               this.resetForm()
@@ -179,18 +180,11 @@
       this.$emit('closeDialog')
     },
     getUserList() {
-      this.$axios.post(this.$api.user.selectUserList, {
-        page: { current: -1, size: -1, },
-        entity: { name: null }
-      }, {
-        headers: {
-          'Content-Type': 'application/json'
-        }
-      }).then(res => {
+      selectUserCondition().then(res => {
         if (res.code === 201) {
           return
         }
-        this.userList = res.data.records
+        this.userList = res.data
       })
     },
   },
diff --git a/src/views/CNAS/resourceDemand/device/component/state.vue b/src/views/CNAS/resourceDemand/device/component/state.vue
index 9994f65..b009a65 100644
--- a/src/views/CNAS/resourceDemand/device/component/state.vue
+++ b/src/views/CNAS/resourceDemand/device/component/state.vue
@@ -237,7 +237,17 @@
   </div>
 </template>
 <script>
+import {
+  saveDeviceState,
+  selectDeviceByCode,
+  exportDeviceStatus,
+  deleteDeviceState,
+  deviceStateExport,
+  getDeviceStatePage,
+} from '@/api/cnas/resourceDemand/device.js'
+import { selectUserCondition } from "@/api/business/inspectionTask";
 import { dateFormat } from '@/utils/date'
+import { mapGetters } from "vuex";
 export default {
   props: {
     clickNodeVal: {
@@ -246,6 +256,9 @@
         return {};
       }
     }
+  },
+  computed: {
+    ...mapGetters(["nickName"]),
   },
   data() {
     return {
@@ -311,25 +324,24 @@
       this.$refs.form.validate((valid) => {
         if (valid === true || saveState !== '1submit') {
           // 缁欏綋鍓嶇幆鑺傝缃垱寤轰汉涓庢椂闂�
-          let user = JSON.parse(localStorage.getItem('user'))
           const dateTime = dateFormat(new Date())
           // 鑾峰彇褰撳墠鐜妭鎿嶄綔浜轰笌鏃ユ湡
           switch (this.currentStep) {
             case 0:
-              this.form.createUser = user.name
-              this.form.submitOperatingPersonnel = user.name
+              this.form.createUser = this.nickName
+              this.form.submitOperatingPersonnel = this.nickName
               this.form.submitDate = dateTime
               break
             case 1:
-              this.form.departmentOperatingPersonnel = user.name
+              this.form.departmentOperatingPersonnel = this.nickName
               this.form.departmentDate = dateTime
               break
             case 2:
-              this.form.measuringRoomOperatingPersonnel = user.name
+              this.form.measuringRoomOperatingPersonnel = this.nickName
               this.form.measuringRoomDate = dateTime
               break
             case 3:
-              this.form.approvalOperatingPersonnel = user.name
+              this.form.approvalOperatingPersonnel = this.nickName
               this.form.approvalDate = dateTime
               break
             default:
@@ -355,11 +367,7 @@
           // 鑾峰彇褰撳墠鐘舵��
           this.form.currentState = currentStepAction === 4 ? '鍏抽棴' : this.steps[currentStepAction]
           this.form.deviceId = this.clickNodeVal.value
-          this.$axios.post(this.$api.deviceCheck.saveDeviceState, this.form, {
-            headers: {
-              'Content-Type': 'application/json'
-            }
-          }).then(res => {
+          saveDeviceState(this.form).then(res => {
             if (res.code == 200) {
               this.$message.success('鎻愪氦鎴愬姛')
               this.getDeviceStatePage(this.clickNodeVal.value)
@@ -385,7 +393,7 @@
     },
     openRecordAcceptance() {
       // 鑾峰彇璁惧鍩虹淇℃伅
-      this.$axios.get(this.$api.deviceScope.selectDeviceByCode + '?id=' + this.clickNodeVal.value).then(res => {
+      selectDeviceByCode({ id: this.clickNodeVal.value }).then(res => {
         this.form.deviceName = res.data.deviceName
         this.form.specificationModel = res.data.specificationModel
         this.form.managementNumber = res.data.managementNumber
@@ -398,7 +406,7 @@
     },
     // 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
     getUserList() {
-      this.$axios.get(this.$api.deviceScope.selectUserList).then(res => {
+      selectUserCondition().then(res => {
         if (res.code == 200) {
           this.responsibleOptions = res.data
         }
@@ -418,37 +426,11 @@
     // 瀵煎嚭
     handleDownOne(row) {
       this.outLoading = true
-      this.$axios.get(this.$api.deviceCheck.exportDeviceStatus + '?deviceId=' + row.deviceId + '&processNumber=' + row.processNumber, {
-        responseType: "blob"
-      }).then(res => {
+      exportDeviceStatus({ deviceId: row.deviceId, processNumber: row.processNumber }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
-        //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
-        let reader = new FileReader();
-        reader.readAsText(blob, 'utf-8');
-        reader.onload = () => {
-          try {
-            let result = JSON.parse(reader.result);
-            if (result.message) {
-              this.$message.error(result.message);
-            } else {
-              const url = URL.createObjectURL(blob);
-              const link = document.createElement('a');
-              link.href = url;
-              link.download = '璁惧鍋�/鍚敤.doc';
-              link.click();
-              this.$message.success('瀵煎嚭鎴愬姛')
-            }
-          } catch (err) {
-            console.log(err);
-            const url = URL.createObjectURL(blob);
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = '璁惧鍋�/鍚敤.doc';
-            link.click();
-            this.$message.success('瀵煎嚭鎴愬姛')
-          }
-        }
+        this.$download.saveAs(blob, '璁惧鍋�/鍚敤.doc')
+        this.$message.success('瀵煎嚭鎴愬姛')
       })
     },
     // 鍒犻櫎
@@ -458,7 +440,7 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        this.$axios.delete(this.$api.deviceCheck.deleteDeviceState + '?stateId=' + row.stateId).then(res => {
+        deleteDeviceState({ stateId: row.stateId }).then(res => {
           if (res.code == 200) {
             this.$message.success('鍒犻櫎鎴愬姛')
             this.getDeviceStatePage(this.clickNodeVal.value)
@@ -470,43 +452,18 @@
           message: '宸插彇娑堝垹闄�'
         });
       });
-
     },
     //瀵煎嚭
     handleDown() {
       this.outLoading = true
-      this.$axios.post(this.$api.deviceCheck.deviceStateExport, {
+      deviceStateExport({
         deviceId: this.clickNodeVal.value,
         processNumber: this.search.processNumber
-      }, { responseType: "blob" }).then(res => {
+      }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
-        //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
-        let reader = new FileReader();
-        reader.readAsText(blob, 'utf-8');
-        reader.onload = () => {
-          try {
-            let result = JSON.parse(reader.result);
-            if (result.message) {
-              this.$message.error(result.message);
-            } else {
-              const url = URL.createObjectURL(blob);
-              const link = document.createElement('a');
-              link.href = url;
-              link.download = '璁惧鍋滅敤/鍚敤.xlsx';
-              link.click();
-              this.$message.success('瀵煎嚭鎴愬姛')
-            }
-          } catch (err) {
-            console.log(err);
-            const url = URL.createObjectURL(blob);
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = '璁惧鍋滅敤/鍚敤.xlsx';
-            link.click();
-            this.$message.success('瀵煎嚭鎴愬姛')
-          }
-        }
+        this.$download.saveAs(blob, '璁惧鍋滅敤/鍚敤.xlsx')
+        this.$message.success('瀵煎嚭鎴愬姛')
       }).finally(() => {
         this.outLoading = false
       })
@@ -521,7 +478,7 @@
       this.getDeviceStatePage(this.clickNodeVal.value);
     },
     getDeviceStatePage(deviceId) {
-      this.$axios.get(this.$api.deviceCheck.getDeviceStatePage + '?deviceId=' + deviceId + "&size=" + this.search.size + "&current=" + this.search.current + "&processNumber=" + this.search.processNumber).then(res => {
+      getDeviceStatePage({ deviceId, ...this.search }).then(res => {
         if (res.code == 200) {
           this.tableDatalist = res.data.records
           this.search.total = res.data.total
diff --git a/src/views/CNAS/resourceDemand/device/index.vue b/src/views/CNAS/resourceDemand/device/index.vue
index 6a23ed4..0720819 100644
--- a/src/views/CNAS/resourceDemand/device/index.vue
+++ b/src/views/CNAS/resourceDemand/device/index.vue
@@ -97,29 +97,37 @@
           <!--            <check v-if="tabListActiveName == '璁惧鏍告煡'" :clickNodeVal="clickNodeVal"/>-->
           <!--          </el-tab-pane>-->
           <el-tab-pane label="璁惧缁存姢" name="璁惧缁存姢">
+            <!-- 瀹屾垚鎺ュ彛 -->
             <maintenance v-if="tabListActiveName == '璁惧缁存姢'" :clickNodeVal="clickNodeVal" />
           </el-tab-pane>
           <el-tab-pane label="璁惧鍊熺敤" name="璁惧鍊熺敤">
+            <!-- 瀹屾垚鎺ュ彛 -->
             <borrow v-if="tabListActiveName == '璁惧鍊熺敤'" :clickNodeVal="clickNodeVal" />
           </el-tab-pane>
           <!--          <el-tab-pane label="璁惧鏁呴殰" name="璁惧鏁呴殰">-->
           <!--            <fault v-if="tabListActiveName == '璁惧鏁呴殰'" :clickNodeVal="clickNodeVal" />-->
           <!--          </el-tab-pane>-->
+          <!-- 瀹屾垚鎺ュ彛 -->
           <el-tab-pane label="浣跨敤璁板綍" name="浣跨敤璁板綍">
             <record v-if="tabListActiveName == '浣跨敤璁板綍'" :clickNodeVal="clickNodeVal" />
           </el-tab-pane>
+          <!-- 瀹屾垚鎺ュ彛 -->
           <el-tab-pane label="璁惧鍋滅敤/鍚敤" name="璁惧鍋滅敤/鍚敤">
             <state v-if="tabListActiveName == '璁惧鍋滅敤/鍚敤'" :clickNodeVal="clickNodeVal" />
           </el-tab-pane>
+          <!-- 瀹屾垚鎺ュ彛 -->
           <el-tab-pane label="璁惧鎶ュ簾" name="璁惧鎶ュ簾">
             <equipment-scrap v-if="tabListActiveName == '璁惧鎶ュ簾'" :clickNodeVal="clickNodeVal" />
           </el-tab-pane>
+          <!-- 瀹屾垚鎺ュ彛 -->
           <el-tab-pane label="璁惧鏁呴殰涓庣淮淇�" name="璁惧鏁呴殰涓庣淮淇�">
             <equipment-failure v-if="tabListActiveName == '璁惧鏁呴殰涓庣淮淇�'" :clickNodeVal="clickNodeVal" />
           </el-tab-pane>
+          <!-- 瀹屾垚鎺ュ彛 -->
           <el-tab-pane label="璁惧鐐规" name="璁惧鐐规">
             <inspection-of-equipment v-if="tabListActiveName == '璁惧鐐规'" :clickNodeVal="clickNodeVal" />
           </el-tab-pane>
+          <!-- 瀹屾垚鎺ュ彛 -->
           <el-tab-pane label="璁惧浜嬫晠" name="璁惧浜嬫晠">
             <equipment-accident v-if="tabListActiveName == '璁惧浜嬫晠'" :clickNodeVal="clickNodeVal" />
           </el-tab-pane>
@@ -233,13 +241,13 @@
       }
     },
     nodeOpen(data, node, el) {
-      $($(el.$el).find(".node_i")[0]).attr(
-        "class",
-        "node_i el-icon-folder-opened"
-      );
+      // $($(el.$el).find(".node_i")[0]).attr(
+      //   "class",
+      //   "node_i el-icon-folder-opened"
+      // );
     },
     nodeClose(data, node, el) {
-      $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder");
+      // $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder");
     },
   }
 };
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 8b844ee..be6876c 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -19,9 +19,10 @@
       <el-col :span="16" style="text-align: right">
         <el-button size="small" type="primary" @click="refreshView">鍒锋柊</el-button>
         <el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">杩涜揣楠岃瘉</el-button>
-        <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary" @click="openUnPassDialog('add')">涓嶅悎鏍煎鐞�</el-button>
-        <el-button size="small" type="primary" @click="sampleVisible = true;uploadSample();">鏍峰搧鍒囨崲</el-button>
-<!--        <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">浠诲姟鍒囨崲</el-button>-->
+        <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary"
+          @click="openUnPassDialog('add')">涓嶅悎鏍煎鐞�</el-button>
+        <el-button size="small" type="primary" @click="sampleVisible = true; uploadSample();">鏍峰搧鍒囨崲</el-button>
+        <!--        <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">浠诲姟鍒囨崲</el-button>-->
         <el-button v-if="state == 1" size="small" type="primary" @click="addVerifyDia = true">鎻愪氦</el-button>
         <!-- 澶嶆牳 -->
         <el-button v-if="state == 2" size="medium" type="primary" @click="openAddCheck">閫氳繃</el-button>
diff --git a/src/views/structural/premises/index.vue b/src/views/structural/premises/index.vue
index 0cb76e1..708d06f 100644
--- a/src/views/structural/premises/index.vue
+++ b/src/views/structural/premises/index.vue
@@ -22,9 +22,8 @@
       </div>
     </div>
     <div class="table">
-      <lims-table :tableData="tableData" :column="column"
-                  :height="'calc(100vh - 250px)'" @pagination="pagination"
-                  :page="page" :tableLoading="tableLoading"></lims-table>
+      <lims-table :tableData="tableData" :column="column" :height="'calc(100vh - 250px)'" @pagination="pagination"
+        :page="page" :tableLoading="tableLoading"></lims-table>
     </div>
     <!--    鏂板瀹為獙瀹�-->
     <el-dialog :title="formTitle" :visible.sync="addDia" width="450px">
@@ -102,7 +101,7 @@
   },
   computed: {
     action() {
-      return this.javaApi
+      return this.javaApi + '/deviceScope/uploadFile'
     }
   },
   data() {

--
Gitblit v1.9.3