| | |
| | | <template> |
| | | <a-modal title="计算OEE" :visible="visible" :width="550" @cancel="handleModalClose" @ok="handleComputeOee" |
| | | :maskClosable="false"> |
| | | <a-form-model :model="model" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="日期"> |
| | | <a-range-picker v-model="dates" style="width: 100%" value-format="YYYY-MM-DD" |
| | | @change="dateParamChange"></a-range-picker> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-modal> |
| | | <j-modal title="计算OEE" :visible="visible" :width="550" @cancel="handleModalClose" @ok="handleComputeOee" |
| | | :maskClosable="false" :confirmLoading="confirmLoading"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model :model="model" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="日期"> |
| | | <a-range-picker v-model="dates" style="width: 100%" value-format="YYYY-MM-DD" |
| | | @change="dateParamChange"></a-range-picker> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | confirmLoading: false, |
| | | model: {}, |
| | | dates: [], |
| | | labelColLong: { |
| | |
| | | return |
| | | } |
| | | |
| | | this.confirmLoading = true |
| | | mdcApi.computeOeeApi(this.model) |
| | | .then(res => { |
| | | if (res.success) { |
| | |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | this.visible = false |
| | | this.$emit('ok') |
| | | this.handleModalClose() |
| | | } else { |
| | | this.$notification.error({ |
| | | message: '消息', |
| | |
| | | description: '计算失败' |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | this.confirmLoading = false |
| | | }) |
| | | }, |
| | | |
| | | dateParamChange(value1, value2) { |