sjl 2 minggu lalu
induk
melakukan
9891a81eeb
1 mengubah file dengan 12 tambahan dan 6 penghapusan
  1. 12 6
      src/views/demo/adsaccount/AdsAccountList.vue

+ 12 - 6
src/views/demo/adsaccount/AdsAccountList.vue

@@ -176,14 +176,12 @@
         * 下拉操作栏
         */
   function getDropDownAction(record){
-       return [
+       const actions = [
          {
            label: '详情',
            onClick: handleDetail.bind(null, record),
-         }, {
-           label: '审核',
-           onClick: handleAudit.bind(null, record),
-         }, {
+         },
+         {
            label: '删除',
            popConfirm: {
              title: '是否确认删除',
@@ -191,7 +189,15 @@
              placement: 'topLeft',
            }
          }
-       ]
+       ];
+       // 如果 reviewStatus 是 pending,才显示审核按钮
+       if (record.reviewStatus === 'PENDING_REVIEW') {
+         actions.push({
+           label: '审核',
+           onClick: handleAudit.bind(null, record),
+         });
+       }
+       return actions;
    }