From 06ca842a5219511302497d0a87be4293ae7cb7a0 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期四, 17 四月 2025 23:10:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 /dev/null                                                                        |  287 --------------
 src/api/cnas/resourceDemand/device.js                                            |  117 ++++-
 src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue          |  289 ++++++++++++++
 src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue |   31 
 src/views/CNAS/resourceDemand/device/index.vue                                   |   16 
 src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue    |    2 
 src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue                |    2 
 src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue            |  376 ++++++++++++++++++
 src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue      |   25 
 9 files changed, 788 insertions(+), 357 deletions(-)

diff --git a/src/api/cnas/resourceDemand/device.js b/src/api/cnas/resourceDemand/device.js
index 58189d3..5f2d7fd 100644
--- a/src/api/cnas/resourceDemand/device.js
+++ b/src/api/cnas/resourceDemand/device.js
@@ -874,42 +874,6 @@
   });
 }
 
-//璁惧淇濆吇鍗曟潯瀵煎嚭
-export function exportMaintenanceRecord(query) {
-  return request({
-    url: "/deviceMaintain/exportMaintenanceRecord",
-    method: "get",
-    responseType: "blob",
-    params: query,
-  });
-}
-
-//璁惧缁存姢鍒犻櫎
-export function deleteDeviceMaintenance(query) {
-  return request({
-    url: "/deviceMaintain/deleteDeviceMaintenance",
-    method: "delete",
-    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({
@@ -1275,3 +1239,84 @@
     params: query,
   });
 }
+//璁惧缁存姢淇濆吇 鏌ヨ
+export function selectDeviceMaintenancePage(query) {
+  return request({
+    url: "/deviceMaintain/selectDeviceMaintenancePage",
+    method: "get",
+    params: query,
+  });
+}
+//璁惧缁存姢淇濆吇 鍒犻櫎
+export function deleteDeviceMaintenance(query) {
+  return request({
+    url: "/deviceMaintain/deleteDeviceMaintenance",
+    method: "delete",
+    params: query,
+  });
+}
+//璁惧缁存姢淇濆吇 鏂板
+export function addDeviceMaintenance(query) {
+  return request({
+    url: "/deviceMaintain/addDeviceMaintenance",
+    method: "post",
+    data: query,
+  });
+}
+//璁惧浣跨敤鎺堟潈 鍒嗛〉鏌ヨ
+export function selectDeviceImpowerByPage(query) {
+  return request({
+    url: "/deviceImpower/selectDeviceImpowerByPage",
+    method: "get",
+    params: query,
+  });
+}
+//璁惧浣跨敤鎺堟潈 鏌ヨ璇︽儏
+export function getImpowerDetail(query) {
+  return request({
+    url: "/deviceImpower/getImpowerDetail",
+    method: "get",
+    params: query,
+  });
+}
+//璁惧浣跨敤鎺堟潈 鍒犻櫎
+export function deleteImpower(query) {
+  return request({
+    url: "/deviceImpower/deleteImpower",
+    method: "delete",
+    params: query,
+  });
+}
+//璁惧浣跨敤鎺堟潈 瀵煎嚭
+export function exportDeviceImpower(query) {
+  return request({
+    url: "/deviceImpower/exportDeviceImpower",
+    method: "get",
+    responseType: "blob",
+    params: query,
+  });
+}
+//璁惧浣跨敤鎺堟潈 鏂板
+export function addImpower(query) {
+  return request({
+    url: "/deviceImpower/addImpower",
+    method: "post",
+    data: query,
+  });
+}
+//璁惧浣跨敤鎺堟潈 淇敼
+export function updateImpower(query) {
+  return request({
+    url: "/deviceImpower/updateImpower",
+    method: "post",
+    data: query,
+  });
+}
+//璁惧浣跨敤鎺堟潈 鎵瑰噯鎺堟潈
+export function reviewImpowerStatus(query) {
+  return request({
+    url: "/deviceImpower/reviewImpowerStatus",
+    method: "post",
+    data: query,
+  });
+}
diff --git a/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue b/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
index 29618b3..894b4ad 100644
--- a/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
+++ b/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
@@ -14,7 +14,7 @@
       <div style="margin: 10px 0">
         <el-table ref="yearTable" :data="examinePlanDetailsList" id="templateParamTable" row-key="deviceId"
                   v-loading="yearTableLoading"
-                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border height="500px">
+                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border height="560px">
           <el-table-column label="璁惧鍚嶇О" min-width="190" prop="deviceName">
             <template slot-scope="scope">
               <el-input v-model="scope.row.deviceName" clearable size="small"></el-input>
diff --git a/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue b/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
index 951dfbc..d750d8e 100644
--- a/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
+++ b/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
@@ -12,7 +12,7 @@
         </el-date-picker>
       </div>
       <div style="margin: 10px 0">
-        <el-table id="templateParamTable" ref="yearTable" :data="calibrationPlanDetailList" height="300px"
+        <el-table id="templateParamTable" ref="yearTable" :data="calibrationPlanDetailList" height="560px"
                   v-loading="yearTableLoading"
                   :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
           row-key="deviceId" style="width: 100% ;">
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
new file mode 100644
index 0000000..ed7d0e6
--- /dev/null
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
@@ -0,0 +1,289 @@
+<template>
+  <div>
+    <div class="search">
+      <el-button size="small" type="primary" @click="refreshTableList">鍒锋柊</el-button>
+      <el-button size="small" type="primary" @click="openDia('add')">鏂� 寤�</el-button>
+      <el-button :loading="outLoading" size="small" type="primary" @click="openHandleOut">瀵� 鍑�</el-button>
+    </div>
+    <div>
+      <lims-table :tableData="tableData" :column="column"
+                  height="calc(100vh - 20em)" @pagination="pagination"
+                  :page="page" :tableLoading="tableLoading"></lims-table>
+    </div>
+    <el-dialog :visible.sync="dialogVisible" title="浠櫒璁惧浣跨敤缁存姢淇濆吇琛�" width="55%">
+      <el-form ref="form" :model="form" label-width="130px" :rules="rules">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="缁存姢鏃ユ湡:" prop="maintenanceDate">
+              <el-date-picker v-model="form.maintenanceDate" :disabled="operationType === 'view'"
+                              format="yyyy-MM-dd" size="small" placeholder="閫夋嫨鏃ユ湡" style="width:100%"
+                              type="date" value-format="yyyy-MM-dd">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="缁存姢鍐呭:" prop="maintenanceContentArr">
+              <el-checkbox-group v-model="form.maintenanceContentArr" :disabled="operationType === 'view'">
+                <el-checkbox v-for="city in qualificationList" :key="city.label" :label="city.label"
+                             :value="city.label"></el-checkbox>
+              </el-checkbox-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="缁存姢浜�:" prop="maintenanceUserId">
+              <el-select v-model="form.maintenanceUserId"
+                         clearable filterable
+                         placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+                <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="澶囨敞:" prop="remark">
+              <el-input v-model="form.remark" :disabled="operationType === 'view'" size="small"
+                        style="width: 100%;"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeDia">鍙� 娑�</el-button>
+        <el-button v-if="operationType !== 'view'" type="primary" @click="saveRecord" :loading="buttonLoading">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  addDeviceMaintenance,
+  deleteDeviceMaintenance,
+  selectDeviceMaintenancePage
+} from "@/api/cnas/resourceDemand/device";
+import limsTable from "@/components/Table/lims-table.vue";
+import {selectUserCondition} from "@/api/system/user";
+
+export default {
+  name: '',
+  // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+  components: {limsTable},
+  props: {
+    clickNodeVal: {
+      type: Object,
+      default: () => {
+        return {};
+      }
+    },
+  },
+  data() {
+    // 杩欓噷瀛樻斁鏁版嵁
+    return {
+      search: {
+        maintenanceDate: '',
+      },
+      outLoading: false,
+      tableData: [],
+      tableLoading: false,
+      page: {
+        total: 0,
+        size: 20,
+        current: 1
+      },
+      column: [
+        { label: '缁存姢鏃ユ湡', prop: 'maintenanceDate' },
+        { label: '缁存姢鍐呭', prop: 'maintenanceContent' },
+        { label: '缁存姢浜�', prop: 'maintenanceUserName' },
+        { label: '澶囨敞', prop: 'remark' },
+        {
+          dataType: 'action',
+          label: '鎿嶄綔',
+          operation: [
+            {
+              name: '缂栬緫',
+              type: 'text',
+              clickFun: (row) => {
+                this.openDia('edit', row);
+              },
+            },
+            {
+              name: '鍒犻櫎',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleDeleteClick(row);
+              },
+            },
+          ]
+        }
+      ],
+      dialogVisible: false,
+      form: {
+        id: '',
+        deviceId: '',
+        maintenanceDate: '',
+        maintenanceContentArr: [],
+        maintenanceContent: '',
+        maintenanceUserId: '',
+        remark: '',
+      },
+      operationType: '',
+      buttonLoading: false,
+      qualificationList: [],
+      rules: {
+        maintenanceDate: [{ required: true, message: '璇烽�夋嫨缁存姢鏃ユ湡', trigger: 'change' }],
+        maintenanceContentArr: [{ required: true, message: '璇烽�夋嫨缁存姢鍐呭', trigger: 'change' }],
+        maintenanceUserId: [{ required: true, message: '璇烽�夋嫨缁存姢浜�', trigger: 'change' }],
+      },
+      responsibleOptions: [],
+    };
+  },
+  mounted() {
+    this.refreshTableList()
+  },
+  // 鏂规硶闆嗗悎
+  methods: {
+    // 鐐瑰嚮鍒锋柊
+    refreshTableList () {
+      this.page.current = 1;
+      this.getTableList()
+    },
+    // 鍒嗛〉鍒囨崲
+    pagination(page) {
+      this.page.size = page.limit
+      this.getTableList()
+    },
+    getTableList () {
+      this.tableLoading = true
+      selectDeviceMaintenancePage({
+        deviceId: this.clickNodeVal.value,
+        ...this.page
+      }).then(res => {
+        this.tableLoading = false
+        this.tableData = res.data.records
+        this.page.total = res.data.total
+      }).catch(err => {
+        this.tableLoading = false
+      })
+    },
+    // 鎵撳紑鎿嶄綔寮规
+    openDia (type, row) {
+      this.operationType = type
+      this.dialogVisible = true
+      this.$nextTick(() => {
+        this.$refs['form'].resetFields()
+        this.form.id = ''
+        if (this.operationType === 'edit') {
+          this.form = {...row}
+          this.$set(this.form, 'maintenanceContentArr', this.form.maintenanceContent.split(','))
+        }
+      })
+      this.getDictS()
+      this.getUserList()
+    },
+    // 鏌ヨ缁存姢鍐呭閫夋嫨妗嗗唴瀹�
+    getDictS () {
+      // 瀹氫箟瀹為獙瀹ゅ悕绉颁笌缁存姢鍐呭绫诲瀷鐨勬槧灏勫叧绯�
+      const labTypeMapping = {
+        '鑰佸寲瀹�': 'aging_maintenance_content',
+        '鑰佸寲瀹為獙瀹�': 'aging_maintenance_content',
+        '鐢垫�ц兘瀹為獙瀹�': 'electrical_maintenance_content',
+        '鐜瀹為獙瀹�': 'environmental_maintenance_content',
+        '鐕冪儳瀹為獙瀹�': 'burn_maintenance_content',
+        '娣风偧瀹為獙瀹�': 'mixing_maintenance_content',
+        '妫�娴嬩腑蹇冪數鎬ц兘瀹為獙瀹�': 'center_electrical_maintenance_content',
+        '鎭掓俯浜�': 'temperature2_maintenance_content',
+        '鎭掓俯涓�': 'temperature1_maintenance_content',
+        '鍖栧瀹為獙瀹�': 'chemistry_maintenance_content',
+        '鍒舵牱瀹�': 'sample_maintenance_content',
+        '浣庢俯瀹為獙瀹�': 'hypothermia_maintenance_content',
+      };
+      // 鑾峰彇褰撳墠鑺傜偣鐨勫疄楠屽鍚嶇О
+      const name = this.clickNodeVal.parent.label;
+      // 鏍规嵁鏄犲皠鍏崇郴鑾峰彇瀵瑰簲鐨勭被鍨�
+      const type = labTypeMapping[name];
+      this.getDicts(type).then((response) => {
+        this.qualificationList = response.data.map((m) => {
+          return {
+            label: m.dictLabel,
+            value: m.dictValue,
+          };
+        });
+      });
+    },
+    openHandleOut () {
+
+    },
+    handleDeleteClick(row) {
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        deleteDeviceMaintenance({ id: row.id }).then(res => {
+          this.$message({
+            type: 'success',
+            message: '鍒犻櫎鎴愬姛!'
+          });
+          this.refreshTableList()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
+    },
+    // 鎻愪氦鏂板鍜屼繚瀛�
+    saveRecord () {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.buttonLoading = true;
+          this.form.maintenanceContent = this.form.maintenanceContentArr.join(',')
+          this.form.deviceId = this.clickNodeVal.value
+          addDeviceMaintenance(this.form).then(res => {
+            this.buttonLoading = false;
+            this.$message.success('鏂板鎴愬姛')
+            this.closeDia()
+            this.getTableList()
+          }).catch(err => {
+            this.buttonLoading = false;
+          })
+        }
+      })
+    },
+    closeDia () {
+      this.$refs['form'].resetFields();
+      this.dialogVisible = false
+      this.refreshTableList()
+    },
+    // 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
+    getUserList() {
+      selectUserCondition({type: 2}).then(res => {
+        if (res.code == 200) {
+          this.responsibleOptions = res.data
+        }
+      })
+    },
+  },
+  watch: {
+    // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊
+    clickNodeVal(newVal) {
+      if (newVal.value) {
+        this.refreshTableList();
+      }
+    },
+  }
+};
+</script>
+
+<style scoped>
+.search {
+  height: 46px;
+  text-align: right;
+  margin-top: 10px;
+}
+</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
index 549402a..e6ceeff 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
@@ -28,6 +28,7 @@
             <template slot-scope="scope">
               <el-button :disabled="scope.row.status === 1" size="small" type="text"
                 @click="handleForm('edit', scope.row)">缂栬緫</el-button>
+              <el-button size="small" type="text" @click="handleForm('view', scope.row)">鏌ョ湅</el-button>
               <el-button :disabled="scope.row.status === 1" size="small" type="text"
                 @click="tellApprove(scope.row.maintenancePlanId)">瀹℃牳閫氱煡</el-button>
               <el-button :disabled="scope.row.status === 1 || userId != scope.row.auditId" size="small" type="text"
@@ -47,54 +48,54 @@
     <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="applicationForm"
       title="璁惧淇濆吇璁″垝琛�" width="80%" @close="closeDialog">
       <div style="display: flex;align-items: center;">
-        <el-button v-if="operationType !== 'check'" size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
+        <el-button v-if="operationType === 'edit'" size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
         <span style="width: 60px;margin-left: 10px">骞翠唤锛�</span>
         <el-date-picker v-model="form.planYear" type="year" value-format="yyyy" clearable size="small" format="yyyy"
-          placeholder="閫夋嫨骞�">
+          placeholder="閫夋嫨骞�" :disabled="operationType !== 'edit'">
         </el-date-picker>
       </div>
       <div style="margin: 10px 0">
         <el-table ref="yearTable" :data="deviceMaintenancePlanDetails" id="templateParamTable" row-key="deviceId"
                   :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
-          height="300px" style="width: 100% ;">
+          height="560px" style="width: 100% ;">
           <el-table-column align="center" header-align="center" label="搴忓彿" type="index" width="60"></el-table-column>
           <el-table-column label="璁惧鍚嶇О" min-width="170" prop="deviceName">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.deviceName" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.deviceName" :disabled="operationType !== 'edit'" clearable
                 size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="璁惧缂栧彿" min-width="140" prop="deviceNumber">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.deviceNumber" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.deviceNumber" :disabled="operationType !== 'edit'" clearable
                 size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="褰掑睘瀹為獙瀹�" min-width="120" prop="storagePoint">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.storagePoint" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.storagePoint" :disabled="operationType !== 'edit'" clearable
                 size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="淇濆吇鍏抽敭閮ㄤ綅" min-width="120" prop="maintenanceSite">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.maintenanceSite" :disabled="operationType === 'check'" clearable size="small"
+              <el-input v-model="scope.row.maintenanceSite" :disabled="operationType !== 'edit'" clearable size="small"
                 type="textarea"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="淇濆吇鍐呭" min-width="120" prop="maintenanceContent">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.maintenanceContent" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.maintenanceContent" :disabled="operationType !== 'edit'" clearable
                 size="small" type="textarea"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="淇濆吇鍛ㄦ湡" min-width="90" prop="maintenanceIntervals">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.maintenanceIntervals" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.maintenanceIntervals" :disabled="operationType !== 'edit'" clearable
                 size="small"></el-input>
             </template>
           </el-table-column>
-          <el-table-column fixed="right" label="鎿嶄綔" width="80" align="center" v-if="operationType !== 'check'">
+          <el-table-column fixed="right" label="鎿嶄綔" width="80" align="center" v-if="operationType === 'edit'">
             <template slot-scope="scope">
               <el-button style="color: #f56c6c" type="text" @click="deleteRow(scope.$index)">鍒犻櫎</el-button>
             </template>
@@ -103,7 +104,7 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDialog">鍙� 娑�</el-button>
-        <el-button v-if="operationType !== 'check'" :loading="submitFormLoading" type="primary" @click="submitForm">纭�
+        <el-button v-if="operationType === 'edit'" :loading="submitFormLoading" type="primary" @click="submitForm">纭�
           璁�</el-button>
         <el-button v-if="operationType === 'check'" :loading="submitFormLoading" type="primary"
           @click="checkStatus(0)">涓嶉�氳繃</el-button>
@@ -124,7 +125,7 @@
       </el-table>
       <span slot="footer" class="dialog-footer">
         <el-button @click="addEquipDia = false">鍙� 娑�</el-button>
-        <el-button v-if="operationType !== 'check'" :loading="submitFormLoading" type="primary"
+        <el-button v-if="operationType === 'edit'" :loading="submitFormLoading" type="primary"
           @click="changeMachineName">纭�
           璁�</el-button>
       </span>
diff --git a/src/views/CNAS/resourceDemand/device/component/maintenance.vue b/src/views/CNAS/resourceDemand/device/component/maintenance.vue
deleted file mode 100644
index 8bc91aa..0000000
--- a/src/views/CNAS/resourceDemand/device/component/maintenance.vue
+++ /dev/null
@@ -1,287 +0,0 @@
-<!-- 璁惧缁存姢 -->
-<template>
-  <div>
-    <div class="search">
-      <el-form :model="search" ref="search" size="small" :inline="true">
-        <el-form-item label="娴佺▼缂栧彿">
-          <el-input v-model="search.deviceNumber" clearable placeholder="璇疯緭鍏�" size="small"
-                    @keyup.enter.native="getAllMessage(clickNodeVal.value)"></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button size="mini" type="primary" @click="getAllMessage(clickNodeVal.value)">鏌ヨ</el-button>
-          <el-button size="mini" @click="resetSearch">閲嶇疆</el-button>
-        </el-form-item>
-      </el-form>
-      <div>
-        <el-button size="small" type="primary" @click="dialogVisible = true; add()">娣诲姞缁存姢璁板綍</el-button>
-        <el-button :loading="outLoading" size="small" type="primary" @click="handleDownOne">瀵煎嚭</el-button>
-      </div>
-    </div>
-    <div>
-      <el-table ref="table" :data="MaintainParam" height="calc(100vh - 20em)"
-                :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
-        <el-table-column label="搴忓彿" type="index" width="120">
-          <template v-slot="scope">
-            <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="娴佺▼缂栧彿" min-width="180" prop="deviceNumber" />
-        <el-table-column label="璁惧鍚嶇О" min-width="150" prop="deviceName" />
-        <el-table-column label="绠$悊缂栧彿" min-width="150" prop="managementNumber" />
-        <el-table-column label="缁存姢鍐呭" min-width="150" prop="content" />
-        <el-table-column label="缁存姢鏃堕棿" min-width="150" prop="date" />
-        <el-table-column label="鎻愪氦浜�" min-width="150" prop="name" />
-        <el-table-column label="鎻愪氦鏃ユ湡" min-width="150" prop="date">
-        </el-table-column>
-        <el-table-column fixed="right" label="鎿嶄綔" width="110">
-          <template slot-scope="scope">
-            <el-button size="small" type="text" @click="handleViewClick(scope.row)">鏌ョ湅</el-button>
-            <el-button size="small" type="text" @click="handleDeleteClick(scope.$index, scope.row)">鍒犻櫎</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <el-pagination :current-page="1" :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>
-    </div>
-    <!-- 鏂板缓缁存姢 -->
-    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible" title="娣诲姞缁存姢璁板綍"
-      top="5vh" width="60%">
-      <el-form ref="form" :model="formData" label-width="130px">
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="娴佺▼缂栧彿:" prop="deviceNumber">
-              <el-input v-model="formData.deviceNumber" clearable disabled size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="璁惧鍚嶇О:" prop="deviceName">
-              <el-input v-model="formData.deviceName" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="绠$悊缂栧彿:" prop="managementNumber">
-              <el-input v-model="formData.managementNumber" clearable disabled placeholder="璇疯緭鍏�"
-                size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ョ淮鎶ゅ唴瀹�', trigger: 'blur' }]" label="缁存姢鍐呭:"
-              prop="content">
-              <el-input v-model="formData.content" placeholder="璇疯緭鍏�" size="small" type="textarea"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ョ淮鎶ゆ椂闂�', trigger: 'blur' }]" label="缁存姢鏃堕棿:" prop="date">
-              <el-date-picker v-model="formData.date" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"
-                style="width:100%" type="date" value-format="yyyy-MM-dd">
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ョ淮鎶ゆ椂闂�', trigger: 'blur' }]" label="缁存姢绫诲瀷:"
-              prop="maintenanceType">
-              <el-radio-group v-model="formData.maintenanceType" :disabled="!this.editMode">
-                <el-radio :label="0">浣跨敤鍓嶅悗缁存姢</el-radio>
-                <el-radio :label="1">璁″垝涓淮鎶�</el-radio>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item :rules="[{ required: true, message: '璇烽�夋嫨涓嬫缁存姢鏃堕棿', trigger: 'blur' }]" label="涓嬫缁存姢鏃堕棿:"
-              prop="nextDate">
-              <el-date-picker v-model="formData.nextDate" :picker-options="{ disabledDate: this.disabledDate }"
-                format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" style="width:100%" type="date"
-                value-format="yyyy-MM-dd">
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ョ淮鎶や汉', trigger: 'blur' }]" label="缁存姢浜�:" prop="name">
-              <el-input v-model="formData.name" clearable placeholder="璇疯緭鍏�" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="澶囨敞:">
-              <el-input v-model="formData.comments" placeholder="璇疯緭鍏�" size="small" type="textarea"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button v-if="editMode" @click="dialogVisible = false">鍙� 娑�</el-button>
-        <el-button v-if="editMode" type="primary" @click="addRecord">纭� 瀹�</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import {
-  exportMaintenanceRecord,
-  deleteDeviceMaintenance,
-  selectDeviceByCode,
-  addDeviceMaintenance,
-  getDeviceMaintenancePage,
-} from '@/api/cnas/resourceDemand/device.js'
-export default {
-  props: {
-    clickNodeVal: {
-      type: Object,
-      default: () => {
-        return {};
-      }
-    }
-  },
-  data() {
-    return {
-      search: {
-        size: 20,
-        current: 1,
-        total: 0,
-        deviceNumber: ''
-      },
-      editMode: false,
-      dialogVisible: false,
-      //琛ㄥ崟缁存姢鍐呭
-      formData: {},
-      //琛ㄥご鏄剧ず
-      MaintainParam: [],
-      outLoading: false
-    }
-  },
-  mounted() {
-    this.getAllMessage(this.clickNodeVal.value)
-  },
-  methods: {
-    //涓嬫缁存姢鏃ユ湡:绂佺敤鍦ㄧ淮鎶ゆ棩鏈熷墠鐨勬棩鏈�
-    disabledDate(time) {
-      let selectDate = this.formData.date
-      if (selectDate) {
-        let oldDate = new Date(selectDate)
-        return time <= oldDate.getTime()
-      }
-      return false
-    },
-    handleSizeChange(val) {
-      this.search.size = val
-      this.getAllMessage(this.clickNodeVal.value)
-    },
-    handleCurrentChange(val) {
-      this.search.current = val
-      this.getAllMessage(this.clickNodeVal.value)
-    },
-    //鎿嶄綔璇︽儏鏌ョ湅
-    handleViewClick(row) {
-      this.editMode = false;
-      this.dialogVisible = true;
-      this.formData = row;
-    },
-    // 瀵煎嚭
-    handleDownOne() {
-      this.outLoading = true
-      exportMaintenanceRecord({ deviceId: this.clickNodeVal.value }).then(res => {
-        this.outLoading = false
-        const blob = new Blob([res], { type: 'application/octet-stream' });
-        this.$download.saveAs(blob, '璁惧缁存姢淇濆吇璁板綍.doc')
-      })
-    },
-    //鎿嶄綔璇︽儏鍒犻櫎
-    handleDeleteClick(index, row) {
-      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).then(() => {
-        deleteDeviceMaintenance({ id: row.id }).then(res => {
-        })
-        // this.MaintainParam.splice(index, 1);
-        this.getAllMessage(this.clickNodeVal.value)
-        this.$message({
-          type: 'success',
-          message: '鍒犻櫎鎴愬姛!'
-        });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '宸插彇娑堝垹闄�'
-        });
-      });
-    },
-    //鐐瑰嚮鍚庡彲缂栬緫
-    add() {
-      selectDeviceByCode({ id: this.clickNodeVal.value }).then(res => {
-        this.formData.deviceName = res.data.deviceName
-        this.formData.managementNumber = res.data.managementNumber
-        this.$nextTick(() => {
-          this.$refs['form'].clearValidate()
-        })
-      });
-      this.editMode = true;
-    },
-    //娣诲姞缁存姢璁板綍
-    addRecord() {
-      this.$refs['form'].validate((valid) => {
-        if (valid) {
-          this.formData.deviceId = this.clickNodeVal.value;
-          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)
-        }
-      })
-    },
-    resetSearch() {
-      this.search = {
-        size: 20,
-        current: 1,
-        total: 0,
-        deviceNumber: '',
-      }
-      this.getAllMessage(this.clickNodeVal.value);
-    },
-    //鑾峰彇琛ㄥ崟璁惧缁存姢淇℃伅
-    getAllMessage(deviceId) {
-      getDeviceMaintenancePage({
-        deviceId,
-        ...this.search
-      }).then(res => {
-        if (res.code == 200) {
-          this.MaintainParam = res.data.records
-          this.search.total = res.data.total
-        }
-      })
-    },
-  },
-  watch: {
-    // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊
-    clickNodeVal(newVal) {
-      if (newVal.value) {
-        this.getAllMessage(newVal.value)
-      }
-    },
-    dialogVisible(newVal) {
-      if (newVal === false) {
-        this.formData = {}
-        this.$refs['form'].clearValidate()
-      }
-    }
-  }
-}
-</script>
-
-<style scoped>
-.search {
-  height: 46px;
-  display: flex;
-  justify-content: space-between;
-  margin-top: 10px;
-  align-items: flex-start;
-}
-</style>
diff --git a/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue b/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue
index bb806b6..54d0c87 100644
--- a/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue
@@ -25,10 +25,11 @@
           </el-table-column>
           <el-table-column label="鎵瑰噯鏃堕棿" min-width="180" prop="auditDate"></el-table-column>
           <!-- 鎿嶄綔鎸夐挳 -->
-          <el-table-column align="center" fixed="right" label="鎿嶄綔" min-width="240">
+          <el-table-column align="center" fixed="right" label="鎿嶄綔" min-width="270">
             <template slot-scope="scope">
               <el-button :disabled="scope.row.status === 1" size="small" type="text"
                 @click="handleForm('edit', scope.row)">缂栬緫</el-button>
+              <el-button size="small" type="text" @click="handleForm('view', scope.row)">鏌ョ湅</el-button>
               <el-button :disabled="scope.row.status === 1" size="small" type="text"
                 @click="tellApprove(scope.row.traceabilityManagementId)">鎵瑰噯閫氱煡</el-button>
               <el-button :disabled="scope.row.status === 1 || userId != scope.row.auditId" size="small" type="text"
@@ -49,66 +50,66 @@
     <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="applicationForm"
       title="浠櫒璁惧閲忓�兼函婧愮鐞嗘�讳綋璁″垝" width="80%" @close="closeDialog">
       <div style="display: flex;align-items: center;">
-        <el-button v-if="operationType !== 'check'" size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
+        <el-button v-if="operationType === 'edit'" size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
         <span style="width: 60px;margin-left: 10px">骞翠唤锛�</span>
         <el-date-picker v-model="form.planYear" type="year" value-format="yyyy" clearable size="small" format="yyyy"
-          placeholder="閫夋嫨骞�">
+          placeholder="閫夋嫨骞�" :disabled="operationType !== 'edit'">
         </el-date-picker>
       </div>
       <div style="margin: 10px 0">
-        <el-table ref="yearTable" :data="deviceTraceabilityManagementDetails" height="300px" id="templateParamTable"
+        <el-table ref="yearTable" :data="deviceTraceabilityManagementDetails" height="560px" id="templateParamTable"
                   :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
                   row-key="deviceId" v-loading="yearTableLoading">
           <el-table-column align="center" header-align="center" label="搴忓彿" type="index" width="60"></el-table-column>
           <el-table-column label="璁惧鍚嶇О" min-width="170" prop="deviceId">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.deviceName" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.deviceName" :disabled="operationType !== 'edit'" clearable
                 size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="鍨嬪彿" min-width="140" prop="specificationModel">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.specificationModel" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.specificationModel" :disabled="operationType !== 'edit'" clearable
                 size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="璁惧缂栧彿" min-width="140" prop="managementNumber">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.managementNumber" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.managementNumber" :disabled="operationType !== 'edit'" clearable
                 size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="鎶�鏈寚鏍囧弬鏁�" min-width="150" prop="technicalIndexParameters">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.technicalIndexParameters" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.technicalIndexParameters" :disabled="operationType !== 'edit'" clearable
                 size="small" type="textarea"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="鎶�鏈寚鏍囪姹�" min-width="150" prop="technicalRequirements">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.technicalRequirements" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.technicalRequirements" :disabled="operationType !== 'edit'" clearable
                 size="small" type="textarea"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="妫�瀹氬懆鏈�" min-width="120" prop="verificationCycle">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.verificationCycle" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.verificationCycle" :disabled="operationType !== 'edit'" clearable
                 size="small" type="textarea"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="妫�瀹氬崟浣�" min-width="90" prop="verificationUnit">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.verificationUnit" :disabled="operationType === 'check'" clearable
+              <el-input v-model="scope.row.verificationUnit" :disabled="operationType !== 'edit'" clearable
                 size="small" type="textarea"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="澶囨敞" min-width="90" prop="remark">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.remark" :disabled="operationType === 'check'" clearable size="small"
+              <el-input v-model="scope.row.remark" :disabled="operationType !== 'edit'" clearable size="small"
                 type="textarea"></el-input>
             </template>
           </el-table-column>
-          <el-table-column fixed="right" label="鎿嶄綔" width="80" align="center" v-if="operationType !== 'check'">
+          <el-table-column fixed="right" label="鎿嶄綔" width="80" align="center" v-if="operationType === 'edit'">
             <template slot-scope="scope">
               <el-button style="color: #f56c6c" type="text" @click="deleteRow(scope.$index)">鍒犻櫎</el-button>
             </template>
@@ -117,7 +118,7 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDialog">鍙� 娑�</el-button>
-        <el-button v-if="operationType !== 'check'" :loading="submitFormLoading" type="primary" @click="submitForm">纭�
+        <el-button v-if="operationType === 'edit'" :loading="submitFormLoading" type="primary" @click="submitForm">纭�
           璁�</el-button>
         <el-button v-if="operationType === 'check'" :loading="submitFormLoading" type="primary"
           @click="checkStatus(0)">涓嶉�氳繃</el-button>
@@ -137,7 +138,7 @@
       </el-table>
       <span slot="footer" class="dialog-footer">
         <el-button @click="addEquipDia = false">鍙� 娑�</el-button>
-        <el-button v-if="operationType !== 'check'" :loading="submitFormLoading" type="primary"
+        <el-button v-if="operationType === 'edit'" :loading="submitFormLoading" type="primary"
           @click="changeMachineName">纭�
           璁�</el-button>
       </span>
diff --git a/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue b/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue
new file mode 100644
index 0000000..78d4681
--- /dev/null
+++ b/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue
@@ -0,0 +1,376 @@
+<template>
+  <div>
+    <div class="search">
+      <el-button size="small" type="primary" @click="refreshTableList">鍒� 鏂�</el-button>
+      <el-button size="small" type="primary" @click="openDia('add')">鏂� 澧�</el-button>
+      <el-button :loading="outLoading" size="small" type="primary" @click="openHandleOut">瀵� 鍑�</el-button>
+    </div>
+    <div>
+      <lims-table :tableData="tableData" :column="column"
+                  height="calc(100vh - 20em)" @pagination="pagination"
+                  :page="page" :tableLoading="tableLoading"></lims-table>
+    </div>
+    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="usageTableDia"
+               title="璁惧淇濆吇璁″垝琛�" width="80%" @close="closeDialog">
+      <div style="display: flex;align-items: center;">
+        <el-button size="small" type="primary" @click="addTableRow">娣诲姞</el-button>
+        <span style="width: 60px;margin-left: 10px">骞翠唤锛�</span>
+        <el-date-picker v-model="form.impowerYear" type="year" value-format="yyyy" clearable size="small" format="yyyy"
+                        placeholder="閫夋嫨骞�">
+        </el-date-picker>
+      </div>
+      <div style="margin: 10px 0">
+        <el-table ref="usageTableData" :data="usageTableData" id="templateParamTable" row-key="deviceId"
+                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
+                  height="560px" style="width: 100% ;">
+          <el-table-column align="center" header-align="center" label="搴忓彿" type="index" width="60"></el-table-column>
+          <el-table-column label="璁惧鍚嶇О" min-width="170" prop="deviceName">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.deviceName" clearable
+                        size="small" :disabled="operationType === 'check'"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column label="璁惧缂栧彿" min-width="140" prop="deviceNumber">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.deviceNumber" clearable
+                        size="small" :disabled="operationType === 'check'"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column label="瑙勬牸鍨嬪彿" min-width="120" prop="model">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.model" clearable
+                        size="small" :disabled="operationType === 'check'"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column label="妫�娴嬮」鐩�" min-width="120" prop="inspectionItem<">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.inspectionItem" clearable size="small"
+                       :disabled="operationType === 'check'"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column label="琚巿鏉冧汉" min-width="120" prop="delegatee">
+            <template slot-scope="scope">
+              <el-select v-model="scope.row.delegatedUserArr"
+                         clearable filterable multiple
+                         :disabled="operationType === 'check'"
+                         placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+                <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
+                </el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column fixed="right" label="鎿嶄綔" width="80" align="center">
+            <template slot-scope="scope">
+              <el-button style="color: #f56c6c" type="text" @click="deleteRow(scope.$index)">鍒犻櫎</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeDialog">鍙� 娑�</el-button>
+        <el-button v-if="operationType !== 'check'" :loading="submitFormLoading" type="primary" @click="submitForm">纭</el-button>
+        <el-button v-if="operationType === 'check'" :loading="submitFormLoading" type="primary"
+                   @click="checkStatus(0)">涓嶉�氳繃</el-button>
+        <el-button v-if="operationType === 'check'" :loading="submitFormLoading" type="primary"
+                   @click="checkStatus(1)">閫氳繃</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="addEquipDia" title="娣诲姞璁惧"
+               width="50%">
+      <div style="display: flex;align-items: center;">
+        <span style="width: 90px;margin-left: 10px">琚巿鏉冧汉锛�</span>
+        <el-select v-model="delegatedUser" clearable filterable multiple
+                   placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+          <el-option v-for="item in responsibleOptions" :key="item.name" :label="item.name" :value="item.name">
+          </el-option>
+        </el-select>
+      </div>
+      <el-table ref="multipleTable" :data="equipOptions" tooltip-effect="dark" height="500" style="width: 100%"
+                :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
+                @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column label="璁惧鍚嶇О" prop="label" width="190"></el-table-column>
+        <el-table-column prop="value" label="璁惧缂栧彿" width="130"></el-table-column>
+        <el-table-column prop="managementNumber" label="褰掑睘瀹為獙瀹�"></el-table-column>
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="addEquipDia = false">鍙� 娑�</el-button>
+        <el-button :loading="submitFormLoading" type="primary" @click="changeMachineName">纭</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import {
+  addImpower,
+  deleteImpower, deviceScopeSearch, getImpowerDetail, reviewImpowerStatus,
+  selectDeviceImpowerByPage, updateImpower
+} from "@/api/cnas/resourceDemand/device";
+import {exportQualityMonitorDetail} from "@/api/cnas/process/ensureResults/qualityMonitor";
+import {selectUserCondition} from "@/api/system/user";
+
+export default {
+  name: '',
+  // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+  components: {limsTable},
+  props: {
+    clickNodeVal: {
+      type: Object,
+      default: () => {
+      }
+    }
+  },
+  data() {
+    // 杩欓噷瀛樻斁鏁版嵁
+    return {
+      outLoading: false,
+      tableData: [],
+      tableLoading: false,
+      page: {
+        total: 0,
+        size: 20,
+        current: 1
+      },
+      column: [
+        { label: '璁″垝骞翠唤', prop: 'impowerYear' },
+        { label: '缂栧埗浜�', prop: 'compiler' },
+        { label: '缂栧埗鏃堕棿', prop: 'datePreparation' },
+        { label: '鎺堟潈浜�', prop: 'audit' },
+        { label: '鎺堟潈鏃ユ湡', prop: 'auditDate' },
+        {
+          dataType: 'action',
+          label: '鎿嶄綔',
+          operation: [
+            {
+              name: '缂栬緫',
+              type: 'text',
+              clickFun: (row) => {
+                this.openDia('edit', row);
+              },
+            },
+            {
+              name: '鎺堟潈',
+              type: 'text',
+              clickFun: (row) => {
+                this.openDia('check', row);
+              },
+            },
+            {
+              name: '鍒犻櫎',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleDeleteClick(row);
+              },
+            },
+          ]
+        }
+      ],
+      responsibleOptions: [],
+      operationType: '',
+      usageTableDia: false,
+      usageTableData: [],
+      submitFormLoading: false,
+      addEquipDia: false,
+      equipOptions: [],
+      selectionRows: [],
+      form: {
+        impowerYear: ''
+      },
+      delegatedUser: [],
+      impowerId: ''
+    };
+  },
+  mounted() {
+    this.refreshTableList()
+  },
+  // 鏂规硶闆嗗悎
+  methods: {
+    // 鐐瑰嚮鍒锋柊
+    refreshTableList () {
+      this.page.current = 1;
+      this.getTableList()
+    },
+    // 鍒嗛〉鍒囨崲
+    pagination(page) {
+      this.page.size = page.limit
+      this.getTableList()
+    },
+    getTableList () {
+      this.tableLoading = true
+      selectDeviceImpowerByPage({
+        ...this.page
+      }).then(res => {
+        this.tableLoading = false
+        this.tableData = res.data.records
+        this.page.total = res.data.total
+      }).catch(err => {
+        this.tableLoading = false
+      })
+    },
+    // 鎵撳紑鎿嶄綔寮规
+    openDia (type, row) {
+      this.operationType = type
+      this.usageTableDia = true
+      this.form = {
+        impowerYear: '',
+        usageTableData: [],
+      }
+      this.usageTableData = []
+      if (row) {
+        this.impowerId = row.impowerId
+        getImpowerDetail({ impowerId: this.impowerId }).then(res => {
+          if (res.code === 200) {
+            this.form = res.data
+            this.usageTableData = this.form.usageTableData
+          }
+        }).catch(error => {
+          console.error(error)
+        })
+      }
+      this.getEquipOptions()
+      this.getUserList()
+    },
+    closeDialog () {
+      this.usageTableDia = false
+      this.getTableList()
+    },
+    // 娣诲姞璁惧
+    addTableRow() {
+      this.addEquipDia = true
+      this.delegatedUser = this.responsibleOptions.map((item) => item.name);
+      this.getEquipOptions()
+    },
+    // 鍒犻櫎琛ㄦ牸琛�
+    deleteRow(index) {
+      this.usageTableData.splice(index, 1)
+    },
+    // 鎻愪氦鏂板鍜屼慨鏀�
+    submitForm() {
+      this.form.usageTableData = this.HaveJson(this.usageTableData)
+      this.form.usageTableData.forEach((item) => {
+        item.delegatedUser = item.delegatedUserArr.join(',')
+      })
+      this.submitFormLoading = true
+      if (this.operationType === 'add') {
+        addImpower(this.form).then(res => {
+          if (res.code == 200) {
+            this.$message.success('鏂板鎴愬姛')
+            this.usageTableDia = false
+            this.refreshTableList()
+          }
+          this.submitFormLoading = false
+        }).catch(err => {
+          this.submitFormLoading = false
+        })
+      } else {
+        updateImpower(this.form).then(res => {
+          if (res.code == 200) {
+            this.$message.success('淇敼鎴愬姛')
+            this.usageTableDia = false
+            this.refreshTableList()
+          }
+          this.submitFormLoading = false
+        }).catch(err => {
+          this.submitFormLoading = false
+        })
+      }
+    },
+    // 鎻愪氦瀹℃牳
+    checkStatus(status) {
+      const params = {
+        status: status,
+        impowerId: this.impowerId
+      }
+      reviewImpowerStatus(params).then(res => {
+        if (res.code == 200) {
+          this.$message.success('瀹℃牳鎴愬姛')
+          this.usageTableDia = false
+          this.refreshTableList()
+        }
+        this.submitFormLoading = false
+      }).catch(err => {
+        this.submitFormLoading = false
+      })
+    },
+    handleSelectionChange(selection) {
+      this.selectionRows = selection
+    },
+    // 璧嬪�间华鍣ㄧ紪鍙�
+    changeMachineName() {
+      this.deviceMaintenancePlanDetails = []
+      this.selectionRows.map(val => {
+        this.usageTableData.push({ deviceId: val.id, deviceName: val.label, deviceNumber: val.value, model: val.specificationModel, delegatedUserArr: this.delegatedUser })
+      })
+      this.addEquipDia = false
+    },
+    // 鑾峰彇鎵�鏈夎澶�
+    getEquipOptions() {
+      this.equipOptions = []
+      deviceScopeSearch({ status: 0 }).then(res => {
+        if (res.code === 200 && res.data) {
+          this.equipOptions = res.data.map(m => {
+            m.value = m.managementNumber
+            m.label = m.deviceName
+            return m
+          })
+        }
+      }).catch(error => {
+        console.error(error)
+      })
+    },
+    openHandleOut (row) {
+      exportQualityMonitorDetail({ impowerId: row.impowerId }).then(res => {
+        this.outLoading = false
+        const blob = new Blob([res], { type: 'application/msword' });
+        this.$download.saveAs(blob, row.monitorName + '.docx')
+      })
+    },
+    handleDeleteClick(row) {
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        deleteImpower({ id: row.impowerId }).then(res => {
+          this.$message({
+            type: 'success',
+            message: '鍒犻櫎鎴愬姛!'
+          });
+          this.refreshTableList()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
+    },
+    // 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
+    getUserList() {
+      selectUserCondition({type: 2}).then(res => {
+        if (res.code == 200) {
+          this.responsibleOptions = res.data
+        }
+      })
+    },
+  },
+  watch: {
+    // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊
+    clickNodeVal(newVal) {
+      if (newVal.value) {
+        this.refreshTableList();
+      }
+    },
+  },
+};
+</script>
+
+<style scoped>
+.search {
+  height: 46px;
+  text-align: right;
+  margin-top: 10px;
+}
+</style>
diff --git a/src/views/CNAS/resourceDemand/device/index.vue b/src/views/CNAS/resourceDemand/device/index.vue
index ec9951f..063a9b2 100644
--- a/src/views/CNAS/resourceDemand/device/index.vue
+++ b/src/views/CNAS/resourceDemand/device/index.vue
@@ -55,6 +55,10 @@
             <quantity-value-traceability-plan v-if="menuListActiveName == '閲忓�兼函婧愯鍒�'"
               :clickNodeVal="clickNodeVal"></quantity-value-traceability-plan>
           </el-tab-pane>
+          <el-tab-pane label="璁惧浣跨敤鎺堟潈" name="璁惧浣跨敤鎺堟潈">
+            <usage-authorization v-if="menuListActiveName == '璁惧浣跨敤鎺堟潈'"
+              :clickNodeVal="clickNodeVal"></usage-authorization>
+          </el-tab-pane>
           <el-tab-pane label="鍒╃敤澶栭儴浠櫒璁惧" name="鍒╃敤澶栭儴浠櫒璁惧">
             <using-external-instruments v-if="menuListActiveName == '鍒╃敤澶栭儴浠櫒璁惧'" :clickNodeVal="clickNodeVal"></using-external-instruments>
           </el-tab-pane>
@@ -74,8 +78,8 @@
           <el-tab-pane label="璁惧鏍″噯" name="璁惧鏍″噯">
             <calibration v-if="tabListActiveName == '璁惧鏍″噯'" :clickNodeVal="clickNodeVal" />
           </el-tab-pane>
-          <el-tab-pane label="璁惧缁存姢" name="璁惧缁存姢">
-            <maintenance v-if="tabListActiveName == '璁惧缁存姢'" :clickNodeVal="clickNodeVal" />
+          <el-tab-pane label="璁惧缁存姢淇濆吇" name="璁惧缁存姢淇濆吇">
+            <equipmentMaintenance v-if="tabListActiveName == '璁惧缁存姢淇濆吇'" :clickNodeVal="clickNodeVal" />
           </el-tab-pane>
           <el-tab-pane label="璁惧鍊熺敤" name="璁惧鍊熺敤">
             <borrow v-if="tabListActiveName == '璁惧鍊熺敤'" :clickNodeVal="clickNodeVal" />
@@ -112,7 +116,6 @@
 import files from "./component/files.vue";
 import calibration from "./component/calibration.vue";
 import check from "./component/check.vue";
-import maintenance from "./component/maintenance.vue";
 import borrow from "./component/borrow.vue";
 import fault from "./component/fault.vue";
 import record from "./component/record.vue";
@@ -131,6 +134,8 @@
 import EquipmentMaintenancePlan from "./component/equipmentMaintenancePlan.vue";
 import EquipmentAcceptance from "./component/equipmentAcceptance.vue";
 import QuantityValueTraceabilityPlan from "./component/quantityValueTraceabilityPlan.vue";
+import equipmentMaintenance from "./component/equipmentMaintenance.vue";
+import usageAuthorization from "./component/usageAuthorization.vue";
 import {
   treeDevice,
 } from '@/api/cnas/resourceDemand/device.js'
@@ -151,7 +156,6 @@
     files,
     calibration,
     check,
-    maintenance,
     borrow,
     fault,
     record,
@@ -159,7 +163,9 @@
     management,
     overview,
     resourceReservation,
-    operationInstruction
+    operationInstruction,
+    equipmentMaintenance,
+    usageAuthorization,
   },
   data() {
     return {

--
Gitblit v1.9.3