| | |
| | | mixins: [JeecgListMixin], |
| | | components: {}, |
| | | props: { |
| | | maintenanceType:{ |
| | | type:String, |
| | | default:'', |
| | | required:true |
| | | maintenanceType: { |
| | | type: String, |
| | | default: '', |
| | | required: true |
| | | } |
| | | |
| | | }, |
| | |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | |
| | | title: '统一编码', |
| | | align: 'center', |
| | | dataIndex: 'num', |
| | | width:200 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: 'center', |
| | | dataIndex: 'name', |
| | | width:200 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '设备型号', |
| | | align: 'center', |
| | | dataIndex: 'model', |
| | | width:200 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '设备规格', |
| | | align: 'center', |
| | | dataIndex: 'specification', |
| | | width:200 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'ABC标识', |
| | | align: "center", |
| | | dataIndex: 'equipmentImportanceId', |
| | | width:100 |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: '关键设备标识', |
| | | align: "center", |
| | | dataIndex: 'specificEquipment_dictText', |
| | | width:100 |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: '设备状态', |
| | | align: 'center', |
| | | dataIndex: 'equipmentStatus_dictText', |
| | | width:100 |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: '技术状态', |
| | | align: 'center', |
| | | dataIndex: 'technologyStatus_dictText', |
| | | width:100 |
| | | width: 100 |
| | | }, |
| | | ], |
| | | selectedRowKeys: [], |
| | |
| | | visible: false, |
| | | loading: false, |
| | | url: { |
| | | list: '/eam/equipment/getEquipmentList', |
| | | getStandards:'/eam/equipmentMaintenancePlan/getStandards' |
| | | list: '/eam/equipment/showEquipmentList', |
| | | getStandards: '/eam/equipmentMaintenancePlan/getStandards' |
| | | }, |
| | | } |
| | | }, |
| | |
| | | this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'; |
| | | } |
| | | this.ipagination = pagination; |
| | | this.loadData(); |
| | | this.loadData(); |
| | | }, |
| | | handleSubmit() { |
| | | this.loading = true |
| | | let that = this; |
| | | var ids = ''; |
| | | if(this.selectionRows.length==0){ |
| | | if (this.selectionRows.length == 0) { |
| | | that.$message.warning("请选择保养设备"); |
| | | this.loading=false; |
| | | this.loading = false; |
| | | return false; |
| | | } |
| | | for(var i = 0;i<this.selectionRows.length;i++){ |
| | | ids = ids+this.selectionRows[i].id+','; |
| | | for (var i = 0; i < this.selectionRows.length; i++) { |
| | | ids = ids + this.selectionRows[i].id + ','; |
| | | } |
| | | getAction(this.url.getStandards,{ids:ids,maintenanceType:this.maintenanceType}).then(res=>{ |
| | | if(res.success){ |
| | | if(res.result.records.length!==that.selectionRows.length){ |
| | | getAction(this.url.getStandards, { ids: ids, maintenanceType: this.maintenanceType }).then(res => { |
| | | if (res.success) { |
| | | if (res.result.records.length !== that.selectionRows.length) { |
| | | that.$message.warning(res.result.message); |
| | | } |
| | | that.$emit('selectionEquipmentRows', res.result.records); |
| | | that.searchReset(0) |
| | | that.close(); |
| | | } |
| | | }).finally(res=>{ |
| | | this.loading=false; |
| | | }).finally(res => { |
| | | this.loading = false; |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows; |