shj
2022-08-03 5711a973743510de330ce645201417b064d57718
src/views/facilityManagement/deviceType/index.vue
@@ -40,7 +40,7 @@
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() {
@@ -65,8 +65,16 @@
      });
      // 删除
      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({
@@ -76,13 +84,15 @@
                  });
                  listApi();
               } else {
                  // ElMessage({
                  //    showClose: true,
                  //    message: res.data.msg,
                  //    type: 'error',
                  // });
               }
            });
            })
            .catch(() => {
               ElMessage({
                  type: 'info',
                  message: 'Delete canceled',
               });
            });
      };
      const add = () => {
         listApi();