| | |
| | | <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">导出Excel</el-button> |
| | | <el-button size="small" type="primary" @click="downLoadPost">导出Excel</el-button> |
| | | </div> |
| | | <div class="tables" style="margin-top: 16px;"> |
| | | <el-table :data="tableData" height="calc(100vh - 20em)"> |
| | |
| | | </div> |
| | | |
| | | <!-- 校准项目维护 --> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible0" |
| | | title="核查项目维护" top="5vh" width="70%"> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible0" title="核查项目维护" |
| | | top="5vh" width="70%"> |
| | | <h4> |
| | | <span style="display: flex;align-items: center;"><span class="line"></span><span>设备核查参数维护</span></span> |
| | | <el-button :loading="addCalibrateLoading" size="small" type="primary" @click="addCalibrate">添 加</el-button> |
| | | </h4> |
| | | <div> |
| | | <el-form ref="form0" :model="form0" :rules="form0Rules" label-position="right" label-width="120px"> |
| | | <el-form ref="form0" :model="form0" :rules="form0Rules" |
| | | label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="核查参数:" prop="measurementParameter"> |
| | |
| | | <span style="display: flex;align-items: center;"><span class="line"></span><span>设备核查参数</span></span> |
| | | </h4> |
| | | <!-- 设备校准参数表格 --> |
| | | <el-table ref="calibrateTable" v-loading="calibrateParamsLoading" :data="calibrateParams" max-height="450" stripe |
| | | style="width: 100%"> |
| | | <el-table ref="calibrateTable" v-loading="calibrateParamsLoading" :data="calibrateParams" |
| | | max-height="450" |
| | | stripe style="width: 100%"> |
| | | <el-table-column label="编号" type="index" width="80"></el-table-column> |
| | | <el-table-column label="核查参数" prop="measurementParameter"></el-table-column> |
| | | <el-table-column label="核查范围" prop="rangeOfMeasurement"></el-table-column> |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 添加核查记录 --> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible1" |
| | | title="添加核查记录" top="5vh" width="80%" @close="resetcalibrationRecord"> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible1" title="核查记录" :before-close="handleClose" |
| | | top="5vh" |
| | | width="80%" @close="resetcalibrationRecord"> |
| | | <div class="dialog-content"> |
| | | <h4> |
| | | <span style="display: flex;align-items: center;"> |
| | | <span class="line"></span> |
| | | <span class="line"></span> |
| | | <span>添加设备核查记录</span> |
| | | </span> |
| | | </h4> |
| | | <el-form ref="calibrationRecord" :model="calibrationRecord" :rules="formRules" label-position="right" |
| | | label-width="120px"> |
| | | <el-form ref="calibrationRecord" :model="calibrationRecord" :rules="formRules" |
| | | label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="核查人:" prop="unitOfMeasure"> |
| | | <el-input v-model="calibrationRecord.unitOfMeasure" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="核查日期:" prop="calibrationDate"> |
| | | <el-date-picker v-model="calibrationRecord.calibrationDate" :disabled="operationType === 'view'" |
| | | format="yyyy-MM-dd" placeholder="选择日期" size="small" style="width: 90%" type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | <el-date-picker v-model="calibrationRecord.calibrationDate" :disabled="operationType === 'view'" format="yyyy-MM-dd" placeholder="选择日期" |
| | | size="small" |
| | | style="width: 90%" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="下次核查日期:" label-width="140px" prop="nextCalibrationDate"> |
| | | <el-date-picker v-model="calibrationRecord.nextCalibrationDate" :disabled="operationType === 'view'" |
| | | :picker-options="{ disabledDate: this.disabledDate }" format="yyyy-MM-dd" placeholder="选择日期" |
| | | size="small" style="width: 90%" type="date" value-format="yyyy-MM-dd"> |
| | | <el-date-picker v-model="calibrationRecord.nextCalibrationDate" :disabled="operationType === 'view'" :picker-options="{ disabledDate: this.disabledDate }" |
| | | format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | size="small" style="width: 90%" type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="核查器具:" prop="calculatingApparatus"> |
| | | <el-input v-model="calibrationRecord.calculatingApparatus" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="核查标准量程:" prop="standardRange"> |
| | | <el-input v-model="calibrationRecord.standardRange" :disabled="operationType === 'view'" size="small" |
| | | style="width: 90%"></el-input> |
| | | style="width: 90%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="核查标准不确定度:" label-width="140px" prop="calibrationStandardUncertainty"> |
| | | <el-input v-model="calibrationRecord.calibrationStandardUncertainty" |
| | | :disabled="operationType === 'view'" size="small" style="width: 90%"></el-input> |
| | | <el-input v-model="calibrationRecord.calibrationStandardUncertainty" :disabled="operationType === 'view'" size="small" |
| | | style="width: 90%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="核查指导书:" prop="byDocument"> |
| | | <el-input v-model="calibrationRecord.byDocument" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="检查报告编号:" prop="certificateSerialNumber"> |
| | | <el-input v-model="calibrationRecord.certificateSerialNumber" :disabled="operationType === 'view'" |
| | | size="small" style="width: 90%"></el-input> |
| | | <el-input v-model="calibrationRecord.certificateSerialNumber" :disabled="operationType === 'view'" size="small" |
| | | style="width: 90%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | |
| | | </el-col> |
| | | <el-col :span="23"> |
| | | <el-form-item label="附件:" prop="fileName"> |
| | | <el-input v-model="calibrationRecord.fileName" |
| | | :style="`width: ${operationType === 'add' ? '90%' : '100%'};}`" disabled size="small"> |
| | | <el-input v-model="calibrationRecord.fileName" :style="`width: ${operationType === 'add' ? '90%' : '100%'};}`" disabled |
| | | size="small"> |
| | | <el-button v-if="operationType === 'add'" slot="append" icon="el-icon-delete-solid" |
| | | @click="deleteFile"></el-button> |
| | | @click="deleteFile"></el-button> |
| | | </el-input> |
| | | <el-upload v-if="operationType === 'add'" ref="upload" :action="action" :before-upload="beforeUpload" |
| | | :headers="uploadHeader" :limit="1" :on-error="onError" :on-success="handleSuccessUp" |
| | | :show-file-list="false" style="float: right;"> |
| | | <el-upload v-if="operationType === 'add'" ref="upload" :action="action" :before-upload="beforeUpload" :headers="headers" |
| | | :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">附件上传 |
| | | type="primary">附件上传 |
| | | </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="备注:"> |
| | | <el-input v-model="calibrationRecord.remark" :disabled="operationType === 'view'" :rows="3" size="small" |
| | | style="width: 96%" type="textarea"></el-input> |
| | | style="width: 96%" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="单项结果说明" prop="singleResultStatement"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.singleResultStatement" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | <el-input v-model="scope.row.singleResultStatement" :disabled="operationType === 'view'" size="small"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer" style="float: right;margin-top: 10px"> |
| | | <el-button v-if="operationType === 'add'" @click="dialogVisible1 = false">取 消</el-button> |
| | | <el-button v-if="operationType === 'add'" @click="handleClose">取 消</el-button> |
| | | <el-button v-if="operationType === 'add'" type="primary" @click="addRecord">确 定</el-button> |
| | | </span> |
| | | </div> |
| | |
| | | <script> |
| | | import file from '@/utils/file'; |
| | | import { mapGetters } from "vuex"; |
| | | import {deviceMetricRecordExport} from "@/api/cnas/resourceDemand/device"; |
| | | export default { |
| | | components: {}, |
| | | props: { |
| | |
| | | message: '已取消删除' |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | downLoadPost() { |
| | | this.outLoading = true |
| | | deviceMetricRecordExport({deviceId: this.clickNodeVal.value}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | this.$download.saveAs(blob, '设备核查.xlsx') |
| | | }) |
| | | }, |
| | | }, |
| | | watch: { |
| | | // 监听点击el-tree的数据,进行数据刷新 |