ÎļþÃû´Ó src/views/eam/newEquipment/EquipmentProcessParametersList.vue ÐÞ¸Ä |
| | |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item> |
| | | <a-menu-item key="1" @click="handleSubmitBatch"><a-icon type="to-top" />æäº¤</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> |
| | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EquipmentProcessParametersModal from '../modules/equipmentNew/EquipmentProcessParametersModal' |
| | | import { postAction } from '../../../api/manage' |
| | | import EquipmentProcessParametersModal from './EquipmentProcessParametersModal' |
| | | import { postAction,putAction } from '../../../../api/manage' |
| | | |
| | | export default { |
| | | name: "EquipmentProcessParametersList", |
| | |
| | | scopedSlots: { |
| | | customRender: 'action' |
| | | }, |
| | | width:200 |
| | | width:200, |
| | | fixed: 'right', |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/equipmentProcessParameters/list", |
| | | edit: "/eam/equipmentProcessParameters/edit", |
| | | submitBatch:"/eam/equipmentProcessParameters/submitBatch", |
| | | // delete: "/new/equipment/deleteEquipmentProcessParameters", |
| | | // deleteBatch: "/new/equipment/deleteBatchEquipmentProcessParameters", |
| | | // exportXlsUrl: "/new/equipment/exportEquipmentProcessParameters", |
| | |
| | | methods: { |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectionRows = [] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | }, |
| | |
| | | that.dataSource = temp; |
| | | } |
| | | }, |
| | | handleSubmitBatch(){ |
| | | for(var i=0;i<this.selectionRows.length;i++){ |
| | | let parametersValue = this.selectionRows[i].parametersValue; |
| | | if(parametersValue==null||parametersValue==undefined||parametersValue==''){ |
| | | this.$message.warning("请å
å¡«å鿩项çåæ°å¼åæäº¤") |
| | | return false; |
| | | } |
| | | } |
| | | let that = this; |
| | | this.$confirm({ |
| | | title: '设å¤ç²¾åº¦ç¡®è®¤æäº¤ï¼', |
| | | content: '确认æäº¤åï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | that.loading=true; |
| | | putAction(that.url.submitBatch,that.selectionRows).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("æäº¤æåï¼") |
| | | that.loadData(1) |
| | | } else { |
| | | that.$message.warning("æäº¤å¤±è´¥ï¼") |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | | that.clearList(); |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | }, |
| | | |
| | | |
| | | } |