| | |
| | | > |
| | | <a-form-item label="版本状态"> |
| | | <a-radio-group |
| | | v-model="queryParam.versionStatus" |
| | | v-model="queryParam.status" |
| | | @change="onChange" |
| | | default-value="2" |
| | | > |
| | |
| | | @click='handleAdd' |
| | | type='primary' |
| | | icon='plus' |
| | | v-has="'predictiveWorkPlan:add&edit&delete'" |
| | | >新增 |
| | | </a-button> |
| | | <a-button |
| | |
| | | <a |
| | | v-if="record.status == '2'" |
| | | @click="handleRevise(record)" |
| | | v-has="'predictiveWorkplan:update&take'" |
| | | >升版</a> |
| | | <a |
| | | v-if="record.status == '1'" |
| | | @click="handleTakeEffect(record)" |
| | | v-has="'predictiveWorkplan:update&take'" |
| | | >生效</a> |
| | | <a-divider type="vertical"/> |
| | | <a |
| | | v-if="record.status == '1'" |
| | | @click="handleEdit(record)" |
| | | v-has="'predictiveWorkPlan:add&edit&delete'" |
| | | >编辑</a> |
| | | <a-divider type="vertical"/> |
| | | <a-popconfirm |
| | | v-if="record.status == '1'" |
| | | title="确定删除吗?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | v-has="'predictiveWorkPlan:add&edit&delete'" |
| | | > |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <predictive-spare-parts :planId='planId' :isEdit="isEdit" :isAdd="isAdd" :isDel="isDel"/> |
| | | <predictive-spare-parts :planId='planId' :isEdit="isEdit" :isAdd="isAdd" :isDel="isDel" v-show="selectionRows.length==1&&selectionRows[0].monitor_type == 'smkz'"/> |
| | | <!-- v-if="selectionRows[0].monitorType == 'smkz'"--> |
| | | <predictive-parameters :planId='planId' :equipmentId='equipmentId' :isEdit="isEdit" :isAdd="isAdd" |
| | | v-show="selectionRows.length==1&&selectionRows[0].monitor_type == 'cskz'" |
| | | :isDel="isDel"/> |
| | | <!-- v-if="selectionRows[0].monitorType == 'cskz'" --> |
| | | <predictive-warn :planId='planId' :equipmentId='equipmentId' :isEdit="isEdit" :isAdd="isAdd" |
| | | v-show="selectionRows.length==1&&selectionRows[0].monitor_type == 'bjkz'" |
| | | :isDel="isDel"/> |
| | | <!-- v-if="selectionRows[0].monitorType == 'bjkz'"--> |
| | | </div> |
| | |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | import { requestPut } from '@/api/manage' |
| | | import { requestPut,deleteAction } from '@/api/manage' |
| | | |
| | | import DailyMaintenanceStandardDetail from './modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail' |
| | | //计划用料 |
| | |
| | | isDel: false, |
| | | url: { |
| | | list: '/eam/predictiveworkplan/pagePredictiveWorkPlan', |
| | | delete: '/eam/maintenanceStandard/delete', |
| | | deleteBatch: '/eam/maintenanceStandard/deleteBatch', |
| | | versionTakeEffect: '/eam/maintenanceStandard/versionTakeEffect' |
| | | delete: '/eam/predictiveworkplan/delete', |
| | | versionTakeEffect: '/eam/predictiveworkplan/versionTakeEffect' |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.selectionRows = [] |
| | | this.planId = '' |
| | | this.equipmentId = '' |
| | | this.isAdd = false |
| | | this.isAdd = falses |
| | | |
| | | }, |
| | | handleDelete: function(id) { |
| | | if (!this.url.delete) { |
| | | this.$message.error('请设置url.delete属性!') |
| | | return |
| | | } |
| | | var that = this |
| | | deleteAction(that.url.delete, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | this.planId = this.selectedRowKeys[0] |
| | | this.equipmentId = selectionRows[0].equipment_id |
| | | this.isAdd = true |
| | | this.isAdd = selectionRows[0].status=='1'; |
| | | this.isDel = selectionRows[0].status=='1'; |
| | | this.isEdit = selectionRows[0].status=='1'; |
| | | |
| | | }, |
| | | |
| | | onChange(e) { |
| | |
| | | //升版 |
| | | handleRevise: function(record) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = '保养标准版本升级' |
| | | this.$refs.modalForm.title = '升级' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.isRevise = true |
| | | }, |
| | |
| | | const that = this |
| | | that.confirmLoading = true |
| | | this.$confirm({ |
| | | title: '日常保养标准版本生效!', |
| | | title: '版本生效!', |
| | | content: '提示:版本生效后上一版本将自动失效,请谨慎操作!', |
| | | okText: '确认', |
| | | cancelText: '取消', |
| | |
| | | requestPut(that.url.versionTakeEffect, { |
| | | id: record.id, |
| | | num: record.num, |
| | | versionStatus: '2' |
| | | status: '2' |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success('版本生效成功!') |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |