| | |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="17"> |
| | | <el-form-item label="附件:" prop="fileName"> |
| | | <el-input v-model="calibrationRecord.fileName" :style="`width: ${operationType === 'add' ? '85%' : '100%'};}`" disabled |
| | | size="small"> |
| | | <el-button v-if="operationType === 'add'" slot="append" icon="el-icon-delete-solid" |
| | | @click="deleteFile"></el-button> |
| | | </el-input> |
| | | <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">附件上传 |
| | | </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> --> |
| | | <el-col :span="24"> |
| | | <el-form-item label="备注:"> |
| | | <el-input v-model="calibrationRecord.remark" :disabled="operationType === 'view'" :rows="3" size="small" style="width: 96%" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- 操作日志 --> |
| | | <!-- <h4>--> |
| | | <!-- <div style="display: flex;--> |
| | | <!-- align-items: center;">--> |
| | | <!-- <span class="line"></span><span>本记录状态和操作日志</span>--> |
| | | <!-- </div>--> |
| | | <!-- </h4>--> |
| | | <!-- <el-table :data="tableDataOperate" style="width: 100%">--> |
| | | <!-- <el-table-column type="index" label="序号" width="100"></el-table-column>--> |
| | | <!-- <el-table-column prop="operator" label="操作人" width="120"></el-table-column>--> |
| | | <!-- <el-table-column prop="operationTime" label="操作时间" width="180"></el-table-column>--> |
| | | <!-- <el-table-column prop="operationType" label="操作类型" width="120"></el-table-column>--> |
| | | <!-- <el-table-column prop="operationContent" label="操作内容"></el-table-column>--> |
| | | <!-- </el-table>--> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="operationType === 'add'" @click="dialogVisible1 = false">取 消</el-button> |
| | |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | return this.javaApi + '/personBasicInfo/saveDeviceCalibrationFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.dialogVisible1 = true |
| | | this.getXmsg() |
| | | }, |
| | | // 查看详情 |
| | | // 查看编辑详情 |
| | | handleViewClick(type, row) { |
| | | showDeviceMetricsCopy({ id: row.id, type: 'calibrate' }).then(res => { |
| | | this.calibrateParams = res.data |
| | |
| | | this.$download.saveAs(blob, '设备校准.xlsx') |
| | | }) |
| | | }, |
| | | deleteFile() { |
| | | this.$confirm('此操作将永久删除文件, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteCNASFile({ fileName: this.calibrationRecord.systemFileName }).then(res => { |
| | | this.calibrationRecord.fileName = '' |
| | | this.$refs.upload.clearFiles() |
| | | if (res.code == 200) { |
| | | this.$message.success('删除成功!') |
| | | } |
| | | }) |
| | | }).catch((err) => { |
| | | console.log('err----', err) |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | // 校准项目维护 |
| | | calibrationMaintenance() { |
| | | this.dialogVisible0 = true |
| | |
| | | this.$message.info('已取消删除'); |
| | | }) |
| | | }, |
| | | // 提交项目校准维护 |
| | | addCalibrate() { |
| | | this.$refs['form0'].validate((valid) => { |
| | | if (valid) { |
| | |
| | | } |
| | | this.calibrateParamsLoading = false |
| | | this.addCalibrateLoading = false |
| | | }).catch(() => { |
| | | this.addCalibrateLoading = false |
| | | }) |
| | | } else { |
| | | this.addCalibrateLoading = false |
| | |
| | | } |
| | | }) |
| | | }, |
| | | // 提交校准记录 |
| | | addRecord() { |
| | | this.$refs['calibrationRecord'].validate((valid) => { |
| | | if (valid) { |
| | |
| | | this.calibrationRecord.createUser = this.nickName |
| | | this.calibrationRecord.type = 'calibrate' |
| | | this.calibrationRecord.deviceMetricsCopyList = this.calibrateParams |
| | | this.calibrationRecord.deviceMetricsCopyList.forEach(m => { |
| | | delete m.creationTime |
| | | }) |
| | | delete this.calibrationRecord.createTime |
| | | addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('添加成功') |
| | |
| | | this.getTableList(this.clickNodeVal.value) |
| | | } |
| | | this.addRecordLoading = false |
| | | }).catch((err) => { |
| | | this.addRecordLoading = false |
| | | }) |
| | | } catch (e) { |
| | | console.log('addRecord---', e) |