浏览代码

附件管理bug修改

wangwei 3 年之前
父节点
当前提交
bc8544f360
共有 2 个文件被更改,包括 12 次插入30 次删除
  1. 1 3
      src/views/general/attachment/index.vue
  2. 11 27
      src/views/member/member/index.vue

+ 1 - 3
src/views/general/attachment/index.vue

@@ -223,9 +223,7 @@
       // }
       async function handleDelete(record: Recordable) {
         console.log(record);
-        await deleteAttachment({ id: record.id }).then((res) => {
-          console.log(res);
-          getTableAction().showTableSearch();
+        await deleteAttachment({ id: record.id }).then(() => {
           getTableAction().reload();
           success('删除成功!');
         });

+ 11 - 27
src/views/member/member/index.vue

@@ -349,33 +349,7 @@
       }
 
       function createActions(record: EditRecordRow): ActionItem[] {
-        if (record.ischeck === 0) {
-          // 如果不是正式会员添加审核操作
-          return [
-            {
-              label: '审核',
-              icon: 'ant-design:check-circle-outlined',
-              color: 'success',
-              onClick: handleCheck.bind(null, record),
-            },
-            {
-              label: '编辑',
-              icon: 'ant-design:edit-outlined',
-              color: 'warning',
-              onClick: handleEdit.bind(null, record),
-            },
-            {
-              label: '删除',
-              color: 'error',
-              icon: 'ic:outline-delete-outline',
-              popConfirm: {
-                title: '是否确认删除',
-                confirm: handleDelete.bind(null, record),
-              },
-            },
-          ];
-        }
-        return [
+        const actionArr: ActionItem[] = [
           {
             label: '编辑',
             icon: 'ant-design:edit-outlined',
@@ -392,6 +366,16 @@
             },
           },
         ];
+        if (record.ischeck === 0) {
+          // 如果不是正式会员添加审核操作
+          actionArr.unshift({
+            label: '审核',
+            icon: 'ant-design:check-circle-outlined',
+            color: 'success',
+            onClick: handleCheck.bind(null, record),
+          });
+        }
+        return actionArr;
       }
       return {
         popupData,