| | |
| | | import { Plus, View, EditPen, Delete, CirclePlus } from '@element-plus/icons-vue'; |
| | | import Dailog from './component/Dailog.vue'; |
| | | import { facilityManagementApi } from '/@/api/facilityManagement'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { ElMessage,ElMessageBox } from 'element-plus'; |
| | | export default defineComponent({ |
| | | components: { Dailog }, |
| | | setup() { |
| | |
| | | }); |
| | | // 删除 |
| | | const Deletes = (id: number) => { |
| | | let arr = []; |
| | | arr.push(id); |
| | | ElMessageBox.confirm('确定删除所选项吗?', 'Warning', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | facilityManagementApi() |
| | | .getequipmentTypeMngDelete(id) |
| | | .getequipmentTypeMngDelete(arr) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | |
| | | }); |
| | | listApi(); |
| | | } else { |
| | | // ElMessage({ |
| | | // showClose: true, |
| | | // message: res.data.msg, |
| | | // type: 'error', |
| | | // }); |
| | | } |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: 'Delete canceled', |
| | | }); |
| | | }); |
| | | }; |
| | | const add = () => { |
| | | listApi(); |