1、调整设备维修时长与故障停机时长页面的时长精度为2且单位调整由分钟调整为小时
2、调整设备维修时长与故障停机时长页面的计算接口传参方式
3、解决设备维修时长与故障停机时长页面的计算弹窗中输入框非空校验无效的问题
| | |
| | | // 计算OEE |
| | | computeOeeApi: params => postAction('/mdc/mdcOeeInfo/computeOee', params), |
| | | // 计算MTBF |
| | | computeMTBFApi: params => postAction('/mdc/mdcDownTime/computeMtbf', params), |
| | | computeMTBFApi: ({ month }) => postAction(`/mdc/mdcDownTime/computeMtbf?month=${month}`), |
| | | // 计算MTTR |
| | | computeMTTRApi: params => postAction('/mdc/mdcRepairInfo/computeMttr', params) |
| | | computeMTTRApi: ({ month }) => postAction(`/mdc/mdcRepairInfo/computeMttr?month=${month}`) |
| | | } |
| | |
| | | <template> |
| | | <a-modal title="计算MTBF" :visible="visible" :width="400" @cancel="handleModalClose" @ok="handleComputeMTBF" |
| | | :maskClosable="false"> |
| | | <a-form-model :model="model" :labelCol="labelColLong" :wrapperCol="wrapperColLong" :rules="validateRules"> |
| | | <a-form-model ref="form" :model="model" :labelCol="labelColLong" :wrapperCol="wrapperColLong" :rules="validateRules"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="月份" prop="month"> |
| | |
| | | }, |
| | | methods: { |
| | | handleComputeMTBF() { |
| | | mdcApi.computeMTBFApi(this.model) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | // 触发表单验证 |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | mdcApi.computeMTBFApi(this.model) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | this.handleModalClose() |
| | | } else { |
| | | this.$notification.error({ |
| | | message: '消息', |
| | | description: '计算失败' |
| | | }) |
| | | } |
| | | }) |
| | | this.handleModalClose() |
| | | } else { |
| | | this.$notification.error({ |
| | | message: '消息', |
| | | description: '计算失败' |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: '消息', |
| | | description: '计算失败' |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: '消息', |
| | | description: '计算失败' |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | handleModalClose() { |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="故障停机时长(min)" prop="downLong"> |
| | | <a-input-number :min="0" v-model="model.downLong" placeholder="请输入故障停机时长(min)"></a-input-number> |
| | | <a-form-model-item label="故障停机时长(h)" prop="downLong"> |
| | | <a-input-number :min="0" :step="0.1" :precision="2" v-model="model.downLong" placeholder="请输入故障停机时长(h)"></a-input-number> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | width: 440 |
| | | }, |
| | | { |
| | | title: '故障停机时长(min)', |
| | | title: '故障停机时长(h)', |
| | | align: 'center', |
| | | dataIndex: 'downLong', |
| | | width: 300 |
| | |
| | | <template> |
| | | <a-modal title="计算MTTR" :visible="visible" :width="400" @cancel="handleModalClose" @ok="handleComputeMTTR" |
| | | :maskClosable="false"> |
| | | <a-form-model :model="model" :labelCol="labelColLong" :wrapperCol="wrapperColLong" :rules="validateRules"> |
| | | <a-form-model ref="form" :model="model" :labelCol="labelColLong" :wrapperCol="wrapperColLong" :rules="validateRules"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="月份" prop="month"> |
| | |
| | | }, |
| | | methods: { |
| | | handleComputeMTTR() { |
| | | mdcApi.computeMTTRApi(this.model) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | // 触发表单验证 |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | mdcApi.computeMTTRApi(this.model) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | this.handleModalClose() |
| | | } else { |
| | | this.$notification.error({ |
| | | message: '消息', |
| | | description: '计算失败' |
| | | }) |
| | | } |
| | | }) |
| | | this.handleModalClose() |
| | | } else { |
| | | this.$notification.error({ |
| | | message: '消息', |
| | | description: '计算失败' |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: '消息', |
| | | description: '计算失败' |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: '消息', |
| | | description: '计算失败' |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleModalClose() { |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="维修时长(min)" prop="repairLong"> |
| | | <a-input-number :min="0" v-model="model.repairLong" placeholder="请输入维修时长(min)"></a-input-number> |
| | | <a-form-model-item label="维修时长(h)" prop="repairLong"> |
| | | <a-input-number :min="0":step="0.1" :precision="2" v-model="model.repairLong" placeholder="请输入维修时长(h)"></a-input-number> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | width: 440 |
| | | }, |
| | | { |
| | | title: '维修时长(min)', |
| | | title: '维修时长(h)', |
| | | align: 'center', |
| | | dataIndex: 'repairLong', |
| | | width: 300 |