Bläddra i källkod

岗位添加逻辑删除功能

LiFei 6 år sedan
förälder
incheckning
8a83647512
1 ändrade filer med 28 tillägg och 3 borttagningar
  1. 28 3
      src/views/position/PositionList.vue

+ 28 - 3
src/views/position/PositionList.vue

@@ -100,9 +100,7 @@
              <a-divider type="vertical" />
             <a href="javascript:;" @click="confirm1(record)">审核</a>
            <a-divider type="vertical" />
-            <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-            </a-popconfirm>
+           <a href="javascript:;" @click="deleteOK(record)">删除</a>
         </span>
 
       </a-table>
@@ -119,6 +117,7 @@
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import { getAction,deleteAction,putAction,postAction} from '@/api/manage'
   const auditHpUser = (params)=>putAction("/hpposition/position/changeAuth",params);
+  const deleteOK = (params)=>putAction("/hpposition/position/deleteOK",params);
   import JDate from '@/components/jeecg/JDate'
 
   export default {
@@ -230,7 +229,33 @@
             })
           },
         })
+      },
+
+
+      //审核确认
+      deleteOK(record){
+        let that = this;
+        that.$confirm({
+          title: "确定删除吗",
+          content:record.enterpriseName,
+          okText:"删除",
+          cancelText:"取消",
+          onOk: function () {
+            deleteOK({ id: record.id }).then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.loadData();
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+          },
+          onCancel() {
+
+          },
+        })
       }
+
     }
   }
 </script>