Pārlūkot izejas kodu

业务字典删除功能

lxf 1 gadu atpakaļ
vecāks
revīzija
84862527f2
1 mainītis faili ar 20 papildinājumiem un 2 dzēšanām
  1. 20 2
      src/views/system/dict/dictCommonType.vue

+ 20 - 2
src/views/system/dict/dictCommonType.vue

@@ -170,6 +170,26 @@ const config = computed(() => {
               changeStatus(row);
             },
           },
+          // {
+          //   attrs: {
+          //     label: "删除",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     ElMessageBox.confirm("你是否确认此操作", "提示", {
+          //       confirmButtonText: "确定",
+          //       cancelButtonText: "取消",
+          //       type: "warning",
+          //     }).then(() => {
+          //       proxy.post("/dictCommonType/delete", { id: row.id }).then(() => {
+          //         ElMessage({ message: "删除成功", type: "success" });
+          //         getList();
+          //       });
+          //     });
+          //   },
+          // },
         ];
       },
     },
@@ -299,10 +319,8 @@ const getDtl = (row) => {
   modalType.value = "edit";
   dialogVisible.value = true;
 };
-
 const changeStatus = (row) => {
   modalType.value = "edit";
-  let status = row.status ? 0 : 1;
   proxy.post("/dictCommonType/edit", { ...row, status: row.status === 0 ? 1 : 0 }).then((res) => {
     ElMessage({
       message: "操作成功",