Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
@@ -3,24 +3,27 @@
  <div>
    <div>
      <div style="margin: 10px 0;display: flex;align-items: center;justify-content: space-between;">
        <span>年度计划表</span>
        <div class="title">
          <span style="font-weight: bold">年度计划表</span>
        </div>
        <div>
          <el-button size="small" type="primary" @click="getYearTableData">刷新</el-button>
          <el-button style="margin-right: 10px" size="small" type="primary" @click="addYearPlan('add')">新增</el-button>
          <el-button size="small" type="primary" @click="addYearPlan('add')">新增</el-button>
          <!--          <el-button size="small" type="primary" @click="record">导入</el-button>-->
        </div>
      </div>
      <div>
        <el-table ref="yearTable" v-loading="yearTableDataLoading" :data="yearTableData" height="calc(60vh - 20em)"
        <el-table ref="yearTable" v-loading="yearTableDataLoading"
                  :data="yearTableData" height="calc(60vh - 16em)"
                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
          highlight-current-row style="width: 100% ;" @current-change="currentChange">
                  highlight-current-row @current-change="currentChange">
          <!-- 表格列 -->
          <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="180" prop="planName"></el-table-column>
          <el-table-column label="计划名称" min-width="180" prop="planName" show-overflow-tooltip></el-table-column>
          <el-table-column label="编制人" min-width="100" prop="writeName"></el-table-column>
          <el-table-column label="编制日期" min-width="150" prop="writeTime"></el-table-column>
          <el-table-column label="编制日期" min-width="160" prop="writeTime"></el-table-column>
          <el-table-column label="批准状态" min-width="100" prop="ratifyStatus">
            <template slot-scope="scope">
              <el-tag v-if="scope.row.ratifyStatus === 1" type="success">批准</el-tag>
@@ -46,23 +49,31 @@
          </el-table-column>
        </el-table>
        <el-pagination :current-page="1" :page-size="pagination.size" :page-sizes="[10, 20, 30, 50, 100]"
          :total="pagination.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
          @current-change="handleCurrentChange">
                       background :total="pagination.total" layout="->,total, sizes, prev, pager, next, jumper"
                       @size-change="handleSizeChange" @current-change="handleCurrentChange">
        </el-pagination>
      </div>
    </div>
    <div>
      <span>年度计划明细表</span>
      <div class="title">
        <div class="title-search">
          <span style="width: 120px;font-size: 14px">设备名称及型号:</span>
          <el-input v-model="searchForm.deviceName" clearable size="small"
            style="margin-right: 10px;width: 220px"></el-input>
          <span style="width: 80px;font-size: 14px">仪器编号:</span>
          <el-input v-model="searchForm.deviceNumber" clearable size="small"
            style="margin-right: 10px;width: 220px"></el-input>
          <el-button size="small" type="primary" @click="getYearTableDetailData(currentRow)">查 询</el-button>
          <el-button size="small" @click="reset">重 置</el-button>
        <span style="font-weight: bold">年度计划明细表</span>
      </div>
      <div class="search">
        <div>
          <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
            <el-form-item label="设备名称及型号" prop="deviceName">
              <el-input v-model="searchForm.deviceName" clearable
                        @keyup.enter.native="getYearTableDetailData(currentRow)" size="small"></el-input>
            </el-form-item>
            <el-form-item label="仪器编号" prop="deviceNumber">
              <el-input v-model="searchForm.deviceNumber"
                        @keyup.enter.native="getYearTableDetailData(currentRow)" clearable size="small"></el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" size="mini" @click="getYearTableDetailData(currentRow)">查询</el-button>
              <el-button size="mini" @click="reset">重置</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div>
          <el-button size="small" type="primary" @click="handleForm('add')">新增</el-button>
@@ -71,11 +82,11 @@
      <div>
        <el-table ref="yearTableDetailData" v-loading="yearTableDetailDataLoading" :data="yearTableDetailData"
                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
          height="calc(60vh - 20em)" style="width: 100% ;">
                  :height="'calc(100vh - 34em)'" 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="180" prop="deviceName"></el-table-column>
          <el-table-column label="设备名称及型号" min-width="180" prop="deviceName" show-overflow-tooltip></el-table-column>
          <el-table-column label="设备数量" min-width="180" prop="deviceAmount"></el-table-column>
          <el-table-column label="仪器编号" min-width="150" prop="deviceNumber"></el-table-column>
          <el-table-column label="检定单位" min-width="150" prop="verificationUnit"> </el-table-column>
@@ -94,8 +105,8 @@
          </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">
                       background :total="pagination1.total" layout="->,total, sizes, prev, pager, next, jumper"
                       @size-change="handleSizeChange1" @current-change="handleCurrentChange1">
        </el-pagination>
      </div>
    </div>
@@ -597,14 +608,27 @@
<style scoped>
.title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  font-size: 16px;
  color: #333;
  font-weight: 400;
  padding-left: 10px;
  margin-bottom: 10px;
}
.title-search {
.title::before {
  position: absolute;
  left: 0;
  top: 4px;
  content: '';
  width: 4px;
  height: 16px;
  background-color: #3A7BFA;
  border-radius: 2px;
}
.search {
  height: 46px;
  display: flex;
  align-items: center;
  margin: 10px 0;
  justify-content: space-between;
}
</style>