| | |
| | | @keyup.enter.native="refreshTable()"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="规格型号" prop="specificationModel"> |
| | | <el-form-item label="管理编号" prop="managementNumber"> |
| | | <el-input size="small" placeholder="请输入" clearable |
| | | v-model="queryParams.specificationModel" @keyup.enter.native="refreshTable()"></el-input> |
| | | v-model="queryParams.managementNumber" @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="mini" @click="refreshTable">查询</el-button> |
| | |
| | | </div> |
| | | <div class="table" v-show="!showData"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 300px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | :page="page" @pagination="pagination" :row-class-name="tableRowClassName"></lims-table> |
| | | </div> |
| | | <el-dialog :title="isUp ? '设备详情' : '档案修订'" :visible.sync="dialogVisible" width="70%" top="5vh" |
| | | :before-close="handleClose"> |
| | |
| | | { label: "管理编号", prop: "managementNumber" }, |
| | | { label: "技术指标", prop: "technicalIndicators" }, |
| | | { label: "购置日期", prop: "acquisitionDate" }, |
| | | { label: "启用日期", prop: "activationDate" }, |
| | | { label: "校准有效期", prop: "activationDate" }, |
| | | { label: "管理人", prop: "equipmentManagerUser" }, |
| | | { label: "存放点", prop: "storagePoint" }, |
| | | { label: "所属部门", prop: "laboratoryName" }, |
| | |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | const today = new Date(); |
| | | const targetDate = new Date(row.activationDate); |
| | | const fiveDaysBeforeTarget = new Date(targetDate); |
| | | // 计算前五天的日期 |
| | | fiveDaysBeforeTarget.setDate(targetDate.getDate() - 5); |
| | | // 比较时需要确保比较的是完整的日期时间,包含时分秒 |
| | | if (today > fiveDaysBeforeTarget) { |
| | | return 'red-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |