Просмотр исходного кода

Merge branch 'cpq-dev' of wangfan/adweb3-web into master

chenpeiqing 3 месяцев назад
Родитель
Сommit
213ed983dc

+ 12 - 12
src/views/adweb/enquiry/AdwebEnquiry.api.ts

@@ -1,14 +1,14 @@
 import { defHttp } from '/@/utils/http/axios';
-import { useMessage } from "/@/hooks/web/useMessage";
+import { useMessage } from '/@/hooks/web/useMessage';
 
 const { createConfirm } = useMessage();
 
 enum Api {
   list = '/adweb/adwebEnquiry/list',
-  save='/adweb/adwebEnquiry/add',
-  edit='/adweb/adwebEnquiry/edit',
+  save = '/adweb/adwebEnquiry/add',
+  edit = '/adweb/adwebEnquiry/edit',
   deleteOne = '/adweb/adwebEnquiry/delete',
-  deleteBatch = '/adweb/adwebEnquiry/deleteBatch',
+  deleteBatch = '/adweb/adwebEnquiry/delBatch',
   importExcel = '/adweb/adwebEnquiry/importExcel',
   exportXls = '/adweb/adwebEnquiry/exportXls',
 }
@@ -35,11 +35,11 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * @param params
  * @param handleSuccess
  */
-export const deleteOne = (params,handleSuccess) => {
-  return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
+export const deleteOne = (params, handleSuccess) => {
+  return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
-}
+};
 
 /**
  * 批量删除
@@ -54,12 +54,12 @@ export const batchDelete = (params, handleSuccess) => {
     okText: '确认',
     cancelText: '取消',
     onOk: () => {
-      return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
+      return defHttp.get({ url: Api.deleteBatch, params }).then(() => {
         handleSuccess();
       });
-    }
+    },
   });
-}
+};
 
 /**
  * 保存或者更新
@@ -67,6 +67,6 @@ export const batchDelete = (params, handleSuccess) => {
  * @param isUpdate
  */
 export const saveOrUpdate = (params, isUpdate) => {
-  let url = isUpdate ? Api.edit : Api.save;
+  const url = isUpdate ? Api.edit : Api.save;
   return defHttp.post({ url: url, params }, { isTransformResponse: false });
-}
+};

+ 1 - 1
src/views/adweb/enquiry/AdwebEnquiryList.vue

@@ -786,7 +786,7 @@
    * 批量删除事件
    */
   async function batchHandleDelete() {
-    await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
+    await batchDelete({ id: selectedRowKeys.value.join(',') }, handleSuccess);
   }
 
   /**

+ 2 - 2
src/views/adweb/enquiry/AdwebWasteEnquiryList.vue

@@ -659,7 +659,7 @@
     await nextTick();
 
     if (XpRecycleBinModalRef.value && XpRecycleBinModalRef.value.init) {
-      XpRecycleBinModalRef.value.init(queryParam.siteId, '1,2');
+      XpRecycleBinModalRef.value.init(queryParam.siteId, '0');
     }
   }
 
@@ -729,7 +729,7 @@
    * 批量删除事件
    */
   async function batchHandleDelete() {
-    await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
+    await batchDelete({ id: selectedRowKeys.value.join(',') }, handleSuccess);
   }
 
   /**