Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
@@ -7,13 +7,14 @@
      </div>
      <div>
        <el-table ref="yearTable" v-loading="yearTableDetailDataLoading" :data="yearTableDetailData"
                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
          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="80" prop="planYear"></el-table-column>
          <el-table-column label="编制人" min-width="120" prop="compiler"></el-table-column>
          <el-table-column label="编制时间" min-width="150" prop="datePreparation"></el-table-column>
          <el-table-column label="编制时间" min-width="160" prop="datePreparation"></el-table-column>
          <el-table-column label="审核人" min-width="150" prop="audit"></el-table-column>
          <el-table-column label="审核时间" min-width="180" prop="auditDate"></el-table-column>
          <el-table-column label="审核状态" min-width="180" prop="status">
@@ -23,10 +24,11 @@
            </template>
          </el-table-column>
          <!-- 操作按钮 -->
          <el-table-column align="center" fixed="right" label="操作" min-width="240">
          <el-table-column align="center" fixed="right" label="操作" min-width="260">
            <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"
@@ -38,7 +40,7 @@
          </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"
          :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper" background
          @size-change="handleSizeChange1" @current-change="handleCurrentChange1">
        </el-pagination>
      </div>
@@ -46,53 +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>
        <span style="width: 60px">年份:</span>
        <el-button v-if="operationType === 'edit' || operationType === 'add'" 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' && operationType !== 'add'">
        </el-date-picker>
      </div>
      <div style="margin: 10px 0">
        <el-table ref="yearTable" :data="deviceMaintenancePlanDetails" id="templateParamTable" row-key="deviceId"
          height="300px" border style="width: 100% ;">
                  :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" :disabled="operationType === 'check'" clearable
              <el-input v-model="scope.row.deviceName" :disabled="operationType !== 'edit' && operationType !== 'add'" 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' && operationType !== 'add'" 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' && operationType !== 'add'" 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' && operationType !== 'add'" 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' && operationType !== 'add'" 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' && operationType !== 'add'" 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 label="操作" width="80" align="center" v-if="operationType === 'edit' || operationType === 'add'">
            <template slot-scope="scope">
              <el-button style="color: #f56c6c" type="text" @click="deleteRow(scope.$index)">删除</el-button>
            </template>
@@ -101,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' || operationType === 'add'" :loading="submitFormLoading" type="primary" @click="submitForm">确
          认</el-button>
        <el-button v-if="operationType === 'check'" :loading="submitFormLoading" type="primary"
          @click="checkStatus(0)">不通过</el-button>
@@ -113,6 +116,7 @@
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="addEquipDia" title="添加设备"
      width="50%">
      <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>
@@ -121,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' || operationType === 'add'" :loading="submitFormLoading" type="primary"
          @click="changeMachineName">确
          认</el-button>
      </span>