| | |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="设备编号"> |
| | | <a-input placeholder="输入设备编号查询" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input> |
| | | <a-input placeholder="请选择设备" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="设备名称"> |
| | | <a-input placeholder="输入设备名称查询" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input> |
| | | <a-input placeholder="请选择设备" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="采集时间"> |
| | | <a-form-item label="日期"> |
| | | <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange" format='YYYY-MM-DD'/> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | </div> |
| | | <work-chart-model ref="workChartModel"></work-chart-model> |
| | | <work-history-model ref="workHistoryModel"></work-history-model> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | // console.log(this.queryParams.collectTime) |
| | | if(this.queryParams.collectTime != undefined){ |
| | | this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') |
| | | if(!this.queryParams.equipmentId||!this.queryParams.equipmentName){ |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择设备" |
| | | }); |
| | | return false |
| | | } |
| | | this.queryChart() |
| | | }else{ |
| | | this.$message.warning("请选择时间") |
| | | // this.$message.warning("请选择时间") |
| | | console.log('触发提示') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择时间" |
| | | }); |
| | | } |
| | | |
| | | // this.queryList() |
| | | }, |
| | | searchReset() { |
| | |
| | | }, |
| | | openWorkChart() { |
| | | if(!this.equipment.equipmentId){ |
| | | this.$message.warning("请选择设备进行查询") |
| | | // this.$message.warning("请选择设备进行查询") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择设备进行查询" |
| | | }); |
| | | }else{ |
| | | this.$refs.workChartModel.add(this.equipment) |
| | | this.$refs.workChartModel.title = '工作曲线' |
| | |
| | | openHistoryChart() { |
| | | // console.log(this.equipment); |
| | | if(!this.equipment.equipmentId){ |
| | | this.$message.warning("请选择设备进行查询") |
| | | // this.$message.warning("请选择设备进行查询") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择设备进行查询" |
| | | }); |
| | | // console.log(1111) |
| | | } else{ |
| | | this.$refs.workHistoryModel.add(this.equipment) |
| | |
| | | }, |
| | | dataAfter() { |
| | | if((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')){ |
| | | this.$message.warning("请选择今天以及今天之前的日期!!") |
| | | // this.$message.warning("请选择今天以及今天之前的日期!!") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请选择今天以及今天之前的日期!!' |
| | | }); |
| | | }else{ |
| | | this.queryParams.collectTime = moment(this.queryParams.collectTime.add(1, 'd'), 'YYYY-MM-DD') |
| | | this.searchQuery() |
| | |
| | | this.queryParams = {} |
| | | // this.queryList() |
| | | this.equipment = {} |
| | | _this.$message.warning('请联系管理员,开放设备权限!') |
| | | // _this.$message.warning('请联系管理员,开放设备权限!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }) |
| | | } |
| | |
| | | this.initEquipment(); |
| | | // this.queryTreeData(); |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: { |
| | | equement(val) { |
| | | console.log('通过watch触发') |
| | | |
| | | if (val && val.equipmentId) { |
| | | this.$set(this.queryParams, 'equipmentName', val.equipmentName) |
| | | this.$set(this.queryParams, 'equipmentId', val.equipmentId) |