| | |
| | | // å é¤è®¾å¤åæ°éå¼ |
| | | deleteParamThresholdApi: id => deleteAction('/mdc/mdcEquipmentThreshold/delete', { id }), |
| | | // å é¤è®¾å¤åæ°éå¼ |
| | | deleteBatchParamThresholdApi: ids => deleteAction('/mdc/mdcEquipmentThreshold/deleteBatch', { ids }) |
| | | deleteBatchParamThresholdApi: ids => deleteAction('/mdc/mdcEquipmentThreshold/deleteBatch', { ids }), |
| | | // -------------------------------------OEE页é¢-------------------------------------------- |
| | | // 计ç®OEE |
| | | computeOeeApi: params => postAction('/mdc/mdcOeeInfo/computeOee', params) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | | </template> |
| | | |
| | | <script> |
| | | import mdcApi from '@/api/mdc' |
| | | |
| | | export default { |
| | | name: 'ComputeOeeModal', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | model: {}, |
| | | dates: [], |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 3 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | handleComputeOee() { |
| | | console.log('model', this.model) |
| | | if (this.dates.length === 0) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©æ¶é´' |
| | | }) |
| | | return |
| | | } |
| | | |
| | | mdcApi.computeOeeApi(this.model) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | this.visible = false |
| | | } else { |
| | | this.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: '计ç®å¤±è´¥' |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: '计ç®å¤±è´¥' |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | dateParamChange(value1, value2) { |
| | | this.model.startTime = value2[0] |
| | | this.model.endTime = value2[1] |
| | | }, |
| | | |
| | | handleModalClose() { |
| | | this.visible = false |
| | | this.model = {} |
| | | this.dates = [] |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('OEE')">导åº</a-button> |
| | | <a-button type="primary" icon="edit" @click="handleComputeModalOpen">计ç®</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | |
| | | <ComputeOeeModal ref="computeOeeModalRef"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import ComputeOeeModal from './ComputeOeeModal' |
| | | |
| | | export default { |
| | | name: 'OEEAnalysisList', |
| | | mixins: [JeecgListMixin], |
| | | components: {}, |
| | | components: { ComputeOeeModal }, |
| | | props: { nodeTree: '', Type: '', nodePeople: '' }, |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | handleComputeModalOpen() { |
| | | console.log('触åè¿å
¥open') |
| | | const { $refs } = this |
| | | $refs.computeOeeModalRef.visible = true |
| | | }, |
| | | |
| | | dateParamChange(v1, v2) { |
| | | this.queryParam.startTime = v2[0] |
| | | this.queryParam.endTime = v2[1] |
| | | this.dates = [v1[0], v1[1]] |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.dates = [moment().subtract(1, 'day'), moment()] |
| | | this.queryParam = { |
| | |
| | | } |
| | | this.loadData(1) |
| | | }, |
| | | |
| | | /** |
| | | * 彿µè§å¨å¯è§çªå£å°ºå¯¸åçæ¹åæ¶è§¦å |
| | | */ |