Browse Source

站点Ip黑名单

chenlei1231 5 months ago
parent
commit
c0f5416943
28 changed files with 1119 additions and 2313 deletions
  1. 12 1
      src/assets/less/common.less
  2. 12 25
      src/components/Adweb/selectSite.vue
  3. 5 3
      src/components/registerGlobComp.ts
  4. 3 3
      src/design/ant/index.less
  5. 143 35
      src/hooks/component/JeecgList.ts
  6. 11 12
      src/views/adweb/enquiry/AdwebEnquiry.data.ts
  7. 38 2
      src/views/adweb/enquiry/AdwebEnquiryList.vue
  8. 0 1427
      src/views/adweb/enquiry/AdwebEnquiryListCopy.vue
  9. 1 1
      src/views/adweb/enquiry/AdwebWasteEnquiryList.vue
  10. 11 9
      src/views/adweb/enquiry/modules/enquiryTrackRecord.vue
  11. 40 112
      src/views/adweb/enquiryPublicRules/publicBlackEmail/EnquiryPublicBlackEmailList.vue
  12. 8 9
      src/views/adweb/enquiryPublicRules/publicBlackEmail/modules/EnquiryPublicBlackEmailForm.vue
  13. 195 190
      src/views/adweb/enquiryPublicRules/publicBlackip/AdwebBlackIpList.vue
  14. 156 146
      src/views/adweb/enquiryPublicRules/publicBlackip/modules/AdwebBlackIpForm.vue
  15. 53 47
      src/views/adweb/enquiryPublicRules/publicBlackip/modules/AdwebBlackIpModal.vue
  16. 0 83
      src/views/adweb/enquiryPublicRules/publicBlackip/modules/AdwebBlackIpModal__Style.vue
  17. 10 11
      src/views/adweb/enquiryPublicRules/publicBlackip/modules/XpRecycleBinModal.vue
  18. 70 0
      src/views/adweb/enquiryPublicRules/publicBlackip/publicBlackIP.api.ts
  19. 36 0
      src/views/adweb/enquiryPublicRules/publicBlackip/publicBlackIP.data.ts
  20. 188 182
      src/views/adweb/enquirySiteRules/siteBlackIp/AdwebSiteBlackIpList.vue
  21. 6 6
      src/views/adweb/enquirySiteRules/siteBlackIp/modules/AdwebSiteBlackIpForm.vue
  22. 1 1
      src/views/adweb/enquirySiteRules/siteBlackIp/modules/AdwebSiteBlackIpModal__Style.vue
  23. 5 5
      src/views/adweb/enquirySiteRules/siteBlackIp/modules/XpRecycleBinModal.vue
  24. 70 0
      src/views/adweb/enquirySiteRules/siteBlackIp/siteBlackIP.api.ts
  25. 42 0
      src/views/adweb/enquirySiteRules/siteBlackIp/siteBlackIP.data.ts
  26. 1 1
      src/views/adweb/seo/SeoKeywordsRankList.vue
  27. 1 1
      src/views/adweb/seo/SeoKeywordsRankListCopy.vue
  28. 1 1
      src/views/dashboard/Analysis/homePage/adweb3Home.vue

+ 12 - 1
src/assets/less/common.less

@@ -86,4 +86,15 @@
   border-color: transparent!important;
   box-shadow: none!important;
   height: auto!important;
-}
+}
+
+.ant-form {
+
+  .ant-form-item-label {
+    width: auto;
+  }
+}
+
+table {
+  width: 100%;
+}

+ 12 - 25
src/components/adweb/selectSite.vue → src/components/Adweb/selectSite.vue

@@ -1,19 +1,21 @@
 <template>
   <span v-if="siteinfo.length > 1">
-    <a-select
-      show-search
-      option-filter-prop="children"
-      :filterOption="filterOption"
-      v-model:value="siteCode"
-      @change="changeUser"
-      :style="'width:' + selectWidth"
-    >
+    <a-form-item name="siteCode">
+      <a-select
+        showSearch
+        :filterOption="filterOption"
+        v-model:value="siteCode"
+        @change="changeUser"
+        :style="'width:' + selectWidth"
+      >
       <a-select-option v-for="data in siteinfo" :key="data.code" :value="data.code" :info="data">
         {{ data.name }}
       </a-select-option>
     </a-select>
+    </a-form-item>
 
-    <a-modal title="温馨提示" :open="visible" :closable="false" :keyboard="false" :maskClosable="false" :footer="null" centered dialogClass="wp-tips">
+
+    <a-modal title="温馨提示" v-model:open="visible" :closable="false" :keyboard="false" :maskClosable="false" :footer="null" centered dialogClass="wp-tips">
       <div style="text-align: center; line-height: 2">
         <p>您当前选择的是 WordPress 嵌套网站,需要在系统操作之前,请返回首页重新选择站点操作。本网站的产品类型是 {{ productType }}。</p>
         <router-link :to="{ path: '/websiteManage/dashboard/analysis' }">
@@ -39,7 +41,7 @@
         default: '/adweb/adwebSite/getSiteListByUid',
       },
       selectWidth: {
-        default: '300px',
+        default: '100%',
       },
     },
     data() {
@@ -149,21 +151,6 @@
       filterOption(input, option) {
         return `${option.info.name}`.toLowerCase().includes(`${input || ''}`.toLowerCase());
       },
-
-      // getPermissionList(value){
-      //   let that = this
-      //   that.$store.dispatch('GetPermissionList', value).then(res => {
-      //     const menuData = res.result.menu;
-      //     if (menuData === null || menuData === "" || menuData === undefined) {
-      //       return;
-      //     }
-      //     let constRoutes = [];
-      //     constRoutes = generateIndexRouter(menuData);
-      //     that.$store.dispatch('UpdateAppRouter',  { constRoutes }).then(() => {
-      //       router.addRoutes(store.getters.addRouters)
-      //     })
-      //   })
-      // }
     },
   };
 </script>

+ 5 - 3
src/components/registerGlobComp.ts

@@ -57,7 +57,8 @@ import {
   Skeleton,
   Cascader,
   Rate,
-  Progress
+  Progress,
+  Timeline,
 } from 'ant-design-vue';
 const compList = [AntButton.Group, Icon, AIcon, JUploadButton];
 
@@ -66,7 +67,7 @@ export function registerGlobComp(app: App) {
   compList.forEach((comp) => {
     app.component(comp.name || comp.displayName, comp);
   });
-  
+
   //仪表盘依赖Tinymce,需要提前加载(没办法按需加载了)
   app.component(Editor.name, Editor);
   // update-begin--author:liaozhiyang---date:20240308---for:【QQYUN-8241】Tinymce异步加载
@@ -125,6 +126,7 @@ export function registerGlobComp(app: App) {
     .use(Skeleton)
     .use(Cascader)
     .use(Rate)
-    .use(Progress);
+    .use(Progress)
+    .use(Timeline);
     console.log("---初始化---, 全局注册Antd、仪表盘、流程设计器、online、流程等组件--------------")
 }

+ 3 - 3
src/design/ant/index.less

@@ -6,9 +6,9 @@
 // @import './table.less';
 
 //// TODO beta.11 fix
-//.ant-col {
-//  width: 100%;
-//}
+.ant-col {
+  width: 100%;
+}
 
 .ant-image-preview-root {
   img {

+ 143 - 35
src/hooks/component/JeecgList.ts

@@ -1,49 +1,157 @@
-import {getAction} from "@/api/manage/manage";
-import {useMessage} from "@/hooks/web/useMessage";
+import {TableActionType} from "@/components/Table";
+import {FormActionType} from "@/components/Form";
+import {Ref, toRefs} from "vue";
 
-export function useJeecgListMixin() {
-  const createMessage = useMessage().createMessage;
+// 替换v2中迁移过来的JeecgListMixins,将组件的通用方法提取出来,放置此处
 
+type UseTableMethod = TableActionType & {
+  getForm: () => FormActionType;
+};
+
+interface ListOptions {
+  tableContext: [
+    (instance: TableActionType, formInstance: UseTableMethod) => void,
+      TableActionType & {
+      getForm: () => FormActionType;
+    },
+    {
+      rowSelection: any;
+      selectedRows: Ref<Recordable[]>;
+      selectedRowKeys: Ref<any[]>;
+    }
+  ],
+
+  modalFormRef: Ref<any>,
+  formRef: Ref<any>,
+  batchDelete: any,
+  deleteOne: any
+}
+
+export function useCommonList(options: ListOptions) {
+  const batchDelete = options.batchDelete;
+  const deleteOne = options.deleteOne;
+
+  const {modalFormRef, formRef} = toRefs(options)
+
+  const [registerTable, {
+    reload,
+    clearSelectedRowKeys,
+    updateTableDataRecord,
+    findTableDataRecord,
+    getDataSource
+  }, {rowSelection, selectedRowKeys}] = options.tableContext;
+
+  /**
+   * 成功回调
+   */
+  function handleReload() {
+    (selectedRowKeys.value = []) && reload();
+  }
+
+  /**
+   * 新增事件
+   */
+  function handleAdd() {
+    modalFormRef.value.title = "新增";
+    modalFormRef.value.disableSubmit = false;
+    modalFormRef.value.add();
+  }
+
+  /*
+*
+* 编辑*/
+  function handleEdit(record) {
+    modalFormRef.value.title = "编辑";
+    modalFormRef.value.edit(record);
+    modalFormRef.value.disableSubmit = false;
+  }
+
+  /**
+   * 成功回调
+   */
+  function handleSuccess() {
+    (selectedRowKeys.value = []) && reload();
+  }
+
+  /**
+   * 批量删除事件
+   */
+  async function batchHandleDelete() {
+    await batchDelete({ids: selectedRowKeys.value}, handleSuccess);
+  }
+
+  /**
+   * 详情
+   */
+  function handleDetail(record: Recordable) {
+    modalFormRef.value.disableSubmit = true;
+    modalFormRef.value.edit(record);
+  }
+
+
+  /**
+   * 操作栏
+   */
+  function getTableAction(record) {
+    return [
+      {
+        label: "编辑",
+        onClick: handleEdit.bind(null, record)
+      }
+    ];
+  }
+
+  /**
+   * 删除事件
+   */
+  async function handleDelete(record) {
+    await deleteOne({id: record.id}, handleSuccess);
+  }
+
+  /**
+   * 查询
+   */
   function searchQuery() {
-    loadData(1);
-    onClearSelected()
+    reload();
   }
 
-  function loadData(arg) {
-    if (!url.list) {
-      createMessage.error("请设置url.list属性!")
-      return
-    }
-    //加载数据 若传入参数1则加载第一页的内容
-    if (arg === 1) {
-      ipagination.current = 1;
-    }
-    var params = getQueryParams();//查询条件
-    loading = true;
-    getAction(url.list, params).then((res) => {
-      if (res.success) {
-        //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-        this.dataSource = res.result.records || res.result;
-        if (res.result.total != 0) {
-          this.ipagination.total = res.result.total;
-        } else {
-          this.ipagination.total = 0;
+  /**
+   * 下拉操作栏
+   */
+  function getDropDownAction(record) {
+    return [
+      {
+        label: "详情",
+        onClick: handleDetail.bind(null, record)
+      }, {
+        label: "删除",
+        popConfirm: {
+          title: "是否确认删除",
+          confirm: handleDelete.bind(null, record),
+          placement: "topLeft"
         }
-        //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-      }
-      if (res.code === 510) {
-        createMessage.warning(res.message)
       }
-      this.loading = false;
-    })
+    ];
   }
 
-  function onClearSelected() {
-    selectedRowKeys = [];
-    selectionRows = [];
+
+  function searchReset() {
+    formRef.value.resetFields();
+    selectedRowKeys.value = [];
+    //刷新数据
+    reload();
   }
 
   return {
-    searchQuery
+    handleReload,
+    handleEdit,
+    getTableAction,
+    batchHandleDelete,
+    handleDetail,
+    getDropDownAction,
+    handleDelete,
+    handleAdd,
+    searchQuery,
+    searchReset
   }
 }

+ 11 - 12
src/views/adweb/enquiry/AdwebEnquiry.data.ts

@@ -9,7 +9,6 @@ export const columns: BasicColumn[] = [
       title: '站点名称',
       align: 'left',
       dataIndex: 'siteName',
-      resizable: true,
     },
     {
       title: '姓名',
@@ -21,7 +20,7 @@ export const columns: BasicColumn[] = [
       title: '邮箱',
       align: 'left',
       dataIndex: 'fromEmail',
-      resizable: true,
+
     },
     {
       title: 'whatsApp',
@@ -53,7 +52,7 @@ export const columns: BasicColumn[] = [
       title: '来源IP',
       align: 'left',
       dataIndex: 'fromIp',
-      resizable: true,
+
       customRender: function ({text, record}) {
         if (text == null || text == '' || text == undefined) {
           return '--'
@@ -71,7 +70,7 @@ export const columns: BasicColumn[] = [
     {
       title: '询盘详情',
       align: 'left',
-      resizable: true,
+
       dataIndex: 'details'
     },
     // {
@@ -82,7 +81,7 @@ export const columns: BasicColumn[] = [
     {
       title: '来源页面',
       align: 'left',
-      resizable: true,
+
       dataIndex: 'fromPage',
     },
     {
@@ -110,7 +109,7 @@ export const columns: BasicColumn[] = [
     {
       title: '询盘时间',
       align: 'left',
-      resizable: true,
+
       dataIndex: 'recordCtime',
       customRender: function ({text, record}) {
         return !text ? '' : (text.length > 16 ? text.substr(0, 16) : text)
@@ -123,7 +122,7 @@ export const wasteColumns: BasicColumn[] = [
     title: '站点名称',
     align: 'left',
     dataIndex: 'siteName',
-    resizable: true,
+
   },
   {
     title: '姓名',
@@ -135,7 +134,7 @@ export const wasteColumns: BasicColumn[] = [
     title: '邮箱',
     align: 'left',
     dataIndex: 'fromEmail',
-    resizable: true,
+
   },
 
   {
@@ -155,7 +154,7 @@ export const wasteColumns: BasicColumn[] = [
     title: '来源IP',
     align: 'left',
     dataIndex: 'fromIp',
-    resizable: true,
+
     customRender: function ({text, record}) {
       if (text == null || text == '' || text == undefined) {
         return '--'
@@ -173,7 +172,7 @@ export const wasteColumns: BasicColumn[] = [
   {
     title: '询盘详情',
     align: 'left',
-    resizable: true,
+
     dataIndex: 'details'
   },
   // {
@@ -184,7 +183,7 @@ export const wasteColumns: BasicColumn[] = [
   {
     title: '来源页面',
     align: 'left',
-    resizable: true,
+
     dataIndex: 'fromPage',
   },
   {
@@ -207,7 +206,7 @@ export const wasteColumns: BasicColumn[] = [
   {
     title: '询盘时间',
     align: 'left',
-    resizable: true,
+
     dataIndex: 'recordCtime',
     customRender: function ({text, record}) {
       return !text ? '' : (text.length > 16 ? text.substr(0, 16) : text)

+ 38 - 2
src/views/adweb/enquiry/AdwebEnquiryList.vue

@@ -280,8 +280,8 @@ import toReadImg from '/@/assets/enquiry/enquiryListTop3.svg';
 import toClassified from '/@/assets/enquiry/enquiryListTop2.svg';
 import toTotal from '/@/assets/enquiry/enquiryListTop4.svg';
 
-import selectSite from '@/components/adweb/selectSite.vue';
-import {nextTick, onBeforeMount, onMounted, reactive, ref} from 'vue';
+import selectSite from '/@/components/Adweb/selectSite.vue';
+import {nextTick, onBeforeMount, onMounted, reactive, ref, unref} from 'vue';
 import {BasicTable} from '/@/components/Table';
 import {useListPage} from '/@/hooks/system/useListPage';
 import {columns, superQuerySchema} from './AdwebEnquiry.data';
@@ -299,6 +299,10 @@ import enquiryDetail from "@/views/adweb/enquiry/modules/enquiryDetail.vue";
 import XpRecycleBinModal from "@/views/adweb/system/modules/XpRecycleBinModal.vue";
 import blackList from "@/views/adweb/enquiry/modules/blackList.vue";
 import enquiryTrackRecord from "@/views/adweb/enquiry/modules/enquiryTrackRecord.vue";
+import {getToken} from "@/utils/auth";
+import md5 from "crypto-js/md5";
+import {connectWebSocket, onWebSocket} from "@/hooks/web/useWebSocket";
+import {useGlobSetting} from "@/hooks/setting";
 
 const formRef = ref();
 const queryParam = reactive<any>({});
@@ -427,6 +431,7 @@ onBeforeMount(() => {
 onMounted(async () => {
   userRole.value = useUserStore().roleList;
   getEffectiveList();
+  initWebSocket();
 });
 
 function getSiteList(siteInfo: any[], selectedSiteInfo: any) {
@@ -922,6 +927,37 @@ function searchReset() {
   //刷新数据
   reload();
 }
+
+const glob = useGlobSetting();
+const userStore = useUserStore();
+
+// 初始化 WebSocket
+function initWebSocket() {
+  let token = getToken();
+  //将登录token生成一个短的标识
+  let wsClientId = md5(token);
+  let userId = unref(userStore.getUserInfo).id + "_" + wsClientId;
+  // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
+  let url = glob.domainUrl?.replace('https://', 'wss://').replace('http://', 'ws://') + '/websocket/' + userId;
+
+  connectWebSocket(url);
+  onWebSocket(onWebSocketMessage);
+}
+
+
+function onWebSocketMessage(data) {
+
+  console.log(data, "websorket");
+  if (data.cmd === 'topic' || data.cmd === 'user') {
+    //update-begin-author:taoyan date:2022-7-13 for: VUEN-1674【严重bug】系统通知,为什么必须刷新右上角才提示
+    //后台保存数据太慢 前端延迟刷新消息
+    setTimeout(()=>{
+      loadData();
+    }, 1000)
+    //update-end-author:taoyan date:2022-7-13 for: VUEN-1674【严重bug】系统通知,为什么必须刷新右上角才提示
+  }
+}
+
 </script>
 
 <style lang="less" scoped>

+ 0 - 1427
src/views/adweb/enquiry/AdwebEnquiryListCopy.vue

@@ -1,1427 +0,0 @@
-<template>
-  <div class="p-2">
-    <a-row class="r1" :gutter="8">
-      <a-col :xl="7" :xxl="6" v-if="siteList.length > 1">
-        <div class="choose-site">
-          <span class="t1">站点:</span>
-          <select-site @comMethods="changeSite"/>
-        </div>
-      </a-col>
-      <a-col :xl="8" :xxl="6">
-        <div class="choose-site">
-          <span class="t1">询盘时间:</span>
-          <a-range-picker @change="onChangeDatePciker" :disabledDate="disabledDate"
-                          :value="rangeDate" style="width:70%"/>
-        </div>
-      </a-col>
-      <a-col :xl="9" :xxl="12">
-        <a-button :class="queryParam.dateType == '' ? 'active' : ''" @click="setTime('')">全部时间
-        </a-button>
-        <a-button :class="queryParam.dateType == 'thirtyDay' ? 'active' : ''"
-                  @click="setTime('thirtyDay')">近30天
-        </a-button>
-        <a-button :class="queryParam.dateType == 'sevenDay' ? 'active' : ''"
-                  @click="setTime('sevenDay')">近一周
-        </a-button>
-        <a-button :class="queryParam.dateType == 'yesterday' ? 'active' : ''"
-                  @click="setTime('yesterday')">昨日
-        </a-button>
-        <a-button :class="queryParam.dateType == 'today' ? 'active' : ''" @click="setTime('today')">
-          今日
-        </a-button>
-      </a-col>
-    </a-row>
-
-    <a-row class="r2">
-      <a-col :span="8">
-        <p class="t1"><img :src="toReadImg"/>待阅读询盘</p>
-        <p class="t2" @click="getList('noRead')">{{ enquiryNums.noRead }}</p>
-      </a-col>
-      <a-col :span="8">
-        <p class="t1"><img :src="toClassified"/>待分类询盘</p>
-        <p class="t2" @click="getList('wait')">{{ enquiryNums.wait }}</p>
-      </a-col>
-      <a-col :span="8">
-        <p class="t1"><img :src="toTotal"/>累计询盘</p>
-        <p class="t2" @click="getList('all')">{{ enquiryNums.all }}</p>
-      </a-col>
-    </a-row>
-
-    <a-row class="r3" type="flex" :gutter="8">
-      <a-col flex="2">
-        <a-input placeholder="邮箱/姓名/国家" v-model="queryParam.searchText"></a-input>
-      </a-col>
-      <a-col flex="2">
-        <a-input placeholder="询盘内容" v-model="queryParam.searchContent"></a-input>
-      </a-col>
-      <a-col flex="2">
-        <a-select v-model="queryParam.userEffective"
-                  :allowClear="true"
-                  placeholder="全部分类"
-                  style="width: 100%"
-        >
-          <a-select-option :key="2" :value="2">待分类</a-select-option>
-          <a-select-option :key="1" :value="1">有效询盘</a-select-option>
-        </a-select>
-      </a-col>
-      <a-col flex="2">
-        <a-select v-model="queryParam.readStatus"
-                  :allowClear="true"
-                  placeholder="全部阅读状态"
-                  style="width: 100%"
-        >
-          <a-select-option value="0">
-            未读
-          </a-select-option>
-          <a-select-option value="1">
-            已读
-          </a-select-option>
-        </a-select>
-      </a-col>
-      <a-col v-if="haveSubAccount" flex="2">
-        <a-select placeholder="全部跟进人"
-                  v-model="queryParam.principalUid"
-                  showSearch
-                  allowClear
-                  style="width: 100%"
-                  :filterOption="filterOption">
-          <a-select-option key="ALL" value="ALL">所有人</a-select-option>
-          <a-select-option v-for="principal in subAccountOptions" :key="principal.id"
-                           :value="principal.id">
-            {{ principal.username }}
-          </a-select-option>
-        </a-select>
-      </a-col>
-      <a-col flex="500px" style="text-align:right">
-        <a-button type="primary" @click="searchQuery">查询</a-button>
-        <a-button ghost type="primary" @click="searchReset" style="margin-left: 8px">重置</a-button>
-        <a-button ghost type="primary" @click="handleExportXlsLU('询盘列表')"
-                  style="margin-left: 8px" :loading="excelLoading">导出Excel
-        </a-button>
-        <a-button ghost type="primary" @click="recycleBinVisible" style="margin-left: 8px">回收站
-        </a-button>
-        <a-button ghost type="primary" @click="showBlackList" style="margin-left: 8px">黑名单
-        </a-button>
-      </a-col>
-    </a-row>
-
-    <a-flex class="r4" vertical>
-
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择<a style="font-weight: 600">{{
-          selectedRowKeys.length
-        }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-        <a @click="enquiryReady" style="margin-left: 24px">标为已读</a>
-        <a v-if="haveSubAccount && siteCode !== dictSiteCode"
-           :style="(userRole.indexOf('admin') > -1 || userRole.indexOf('adweb_admin') > -1 || userRole.indexOf('adweb_seo_manager') > -1 || userRole.indexOf('adweb_site_manager') > -1) ? 'margin-left: 24px;pointer-events: none;' : 'margin-left: 24px;'"
-           @click="showEditPrincipalModal">
-          调整跟进人
-        </a>
-        <a v-if="siteCode === dictSiteCode" @click="forwardDetailAll" style="margin-left: 24px">
-          转发
-        </a>
-        <a @click="enquiryDeleteAll" style="margin-left: 24px">删除</a>
-      </div>
-
-      <a-table
-        :columns="defColumns"
-        :data-source="dataSource"
-        size="middle"
-        :scroll="{x:true}"
-        :rowKey="record => record.id"
-        :pagination="ipagination"
-        :loading="loading"
-        class="j-table-force-nowrap"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange"
-      >
-        <template slot="readStatus" slot-scope="text,record">
-          <a v-if="text == 0" class="theme-color" @click="enquiryDetail(record)">未读</a>
-          <span v-else>已读</span>
-        </template>
-        <template slot="principalUidSlot" slot-scope="text,record">
-          <a-select placeholder="请选择跟进人"
-                    v-model="record.principalUid"
-                    style="width: 180px;"
-                    showSearch
-                    :filterOption="filterOption"
-                    @change="selectPrincipal(record)"
-                    :disabled="userRole.indexOf('admin') > -1 || userRole.indexOf('adweb_admin') > -1 || userRole.indexOf('adweb_seo_manager') > -1 || userRole.indexOf('adweb_site_manager') > -1 || siteCode === dictSiteCode">
-            <a-select-option key="ALL" value="ALL">所有人</a-select-option>
-            <a-select-option v-for="principal in subAccountOptions" :key="principal.id"
-                             :value="principal.id">
-              {{ principal.username }}
-            </a-select-option>
-          </a-select>
-        </template>
-        <template slot="tips" slot-scope="text">
-          <template v-if="!text">-</template>
-          <template v-else-if="text.indexOf('http') < 0">-</template>
-          <template v-else-if="text.indexOf('http') === 0">
-            <template v-if="text.lastIndexOf('/') <= 7">
-              <a v-if="edition === 1" :href="text" target="_blank"
-                 style="text-decoration: underline">Home</a>
-              <span v-else>Home</span>
-            </template>
-            <template v-else>
-              <a v-if="edition === 1" :href="text" target="_blank"
-                 style="text-decoration: underline">{{
-                  text.substring(text.lastIndexOf('/') + 1).slice(0, 45) + (text.substring(text.lastIndexOf('/') + 1).length > 45 ? "..." : "")
-                }}</a>
-              <span v-else>{{ text.substring(text.lastIndexOf('/') + 1) }}</span>
-            </template>
-          </template>
-          <template v-else-if="text.indexOf('http') > 0">
-            <a v-if="edition === 1" :href="text.substring(text.indexOf('http'))" target="_blank"
-               style="text-decoration: underline">{{
-                text.substring(0, text.indexOf('http')).slice(0, 45) + (text.substring(0, text.indexOf('http')).length > 45 ? "..." : "")
-              }}</a>
-            <span v-else>{{ text.substring(0, text.indexOf('http')) }}</span>
-          </template>
-          <template v-else>-</template>
-        </template>
-
-        <template slot="userEffective" slot-scope="text, record">
-          <a class="theme-color" v-if="text === 2"
-             @click="enquiryDetail(record)">{{ record.userEffectiveStr }}</a>
-          <span v-else-if="text == 0" style="color: #fa8c16">{{ record.userEffectiveStr }}</span>
-          <span v-else>{{ record.userEffectiveStr }}</span>
-        </template>
-
-        <div slot="action" slot-scope="text, record" style="padding: 5px 8px;">
-          <a-tag v-if="siteCode === dictSiteCode" color="blue" @click="forwardDetail(record)"
-                 style="cursor:pointer;">
-            转发
-          </a-tag>
-          <a-tag color="purple" @click="enquiryDetail(record)" style="cursor:pointer;">
-            详情
-          </a-tag>
-          <a-popconfirm
-            title="确认拒收后,该用户会归入【黑名单】,后期不再接收该用户的询盘信息~"
-            ok-text="是"
-            cancel-text="否"
-            placement="topRight"
-            @confirm="enquiryAddBlackList(record)"
-          >
-            <a-tag color="orange" style="cursor:pointer;">
-              拒收
-            </a-tag>
-          </a-popconfirm>
-          <a-tag color="green" @click="enquiryRecord(record)" style="cursor:pointer;">
-            跟踪
-          </a-tag>
-          <a-tag color="blue"
-                 v-if='record.visitId !== null && record.visitId !== "" && record.visitId !== undefined'
-                 style="cursor:pointer;" @click="enquiryTrack(record)">
-            访问记录
-          </a-tag>
-        </div>
-        <div slot="contactSlot" slot-scope="text, record">
-          <div style="width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis">
-            {{ text }}
-          </div>
-        </div>
-        <div slot="filterDropdown">
-          <a-card>
-            <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns"
-                              :defaultValue="settingColumns">
-              <a-row>
-                <template v-for="(item,index) in columns" v-if="item.dataIndex != 'pluginName'">
-                  <template v-if="item.dataIndex === 'action'"></template>
-                  <template v-else-if="item.dataIndex === 'principalUid'">
-                    <template v-if="haveSubAccount">
-                      <a-col :span="12">
-                        <a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox>
-                      </a-col>
-                    </template>
-                  </template>
-                  <template v-else-if="item.dataIndex === 'siteName'">
-                    <template
-                      v-if="siteList !== null && siteList !== undefined && siteList.length >= 2">
-                      <a-col :span="12">
-                        <a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox>
-                      </a-col>
-                    </template>
-                  </template>
-                  <template v-else>
-                    <a-col :span="12">
-                      <a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox>
-                    </a-col>
-                  </template>
-                </template>
-              </a-row>
-            </a-checkbox-group>
-          </a-card>
-        </div>
-        <div slot="copyEmail" slot-scope="text, record">
-          <a-popover>
-            <template slot="content">
-              {{ text }}
-            </template>
-            <a @click.prevent="copyEmailFunction(text)" :href="'mailto:'+text"
-               v-if="text">{{ text.slice(0, 30) + (text.length > 30 ? "..." : "") }}</a>
-            <div v-else>--</div>
-          </a-popover>
-        </div>
-
-        <div slot="detailsSlot" slot-scope="text, record">
-          <a @click="enquiryDetail(record)" style="margin: 0 10px 0 10px">
-            {{record.context ? record.context.substr(0, 50) : '--'}}</a>
-        </div>
-
-        <a-icon slot="filterIcon" type='setting' :style="{ fontSize:'16px',color:  '#108ee9' }"/>
-      </a-table>
-    </a-flex>
-
-    <!--访问记录-->
-    <enquiry-track ref="enquiryTrack"></enquiry-track>
-    <!--跟踪记录-->
-    <enquiry-genzong ref="enquiryGenzong"></enquiry-genzong>
-    <!--回收站-->
-    <xp-recycle-bin-modal ref="XpRecycleBinModal" @ok="getTableAndNum"/>
-    <!--询盘详情   reload用于子组件删除询盘功能刷新父组件table showDelBtn用于展示删除按钮-->
-    <enquiry-detail :userEffectiveOption="userEffectiveOption" :showDelBtn="true"
-                    @reload="getTableAndNum()" @ok="getTableAndNum"
-                    ref="enquiryDetail"></enquiry-detail>
-    <!--黑名单-->
-    <black-list ref="blackList" @ok="getTableAndNum"></black-list>
-    <!-- 调整产品跟进人 -->
-    <a-modal
-      title="跟进人"
-      :visible="modalVisible"
-      @ok="editPrincipal"
-      @cancel="cancelEditPrincipal"
-    >
-      <a-radio-group v-model="selectedUserId">
-        <a-radio :style="radioStyle" value="ALL">
-          所有人
-        </a-radio>
-        <a-radio v-for="item in subAccountOptions" :style="radioStyle" :value="item.id">
-          {{ item.username }}
-        </a-radio>
-      </a-radio-group>
-    </a-modal>
-
-    <!-- 转发询盘 -->
-    <a-modal
-      title="转发"
-      :visible="forwardVisible"
-      @ok="editForward"
-      @cancel="cancelEditForward"
-      :confirm-loading="forwardLoading"
-    >
-      <a-radio-group v-model="selectedUserId">
-        <!--        <a-radio :style="radioStyle" value="ALL">-->
-        <!--          所有人-->
-        <!--        </a-radio>-->
-        <a-radio v-for="item in otherSubAccountOptions" :style="radioStyle" :value="item.id">
-          {{ item.username }}
-        </a-radio>
-      </a-radio-group>
-    </a-modal>
-  </div>
-
-</template>
-
-<script>
-import toReadImg from '/@/assets/enquiry/enquiryListTop3.svg';
-import toClassified from '/@/assets/enquiry/enquiryListTop2.svg';
-import toTotal from '/@/assets/enquiry/enquiryListTop4.svg';
-
-import {postAction, getAction, downFile, putAction} from '/@/api/manage/manage'
-import {JeecgListMixin} from '/@/hooks/component/JeecgListMixin'
-import enquiryTrack from '/@/views/adweb/enquiry/modules/enquiryTrack.vue'
-import enquiryGenzong from '/src/views/adweb/enquiry/modules/enquiryTrackRecord.vue'
-import enquiryDetail from '/@/views/adweb/enquiry/modules/enquiryDetail.vue'
-import XpRecycleBinModal from '/@/views/adweb/system/modules/XpRecycleBinModal.vue'
-import blackList from '/@/views/adweb/enquiry/modules/blackList.vue'
-import Qs from 'qs'
-import selectSite from '/@/components/adweb/selectSite.vue'
-import '/@/assets/less/common.less'
-import moment from 'moment'
-import {useUserStore} from "@/store/modules/user";
-import {createLocalStorage} from "@/utils/cache";
-import {useMessage} from "@/hooks/web/useMessage";
-
-const $ls = createLocalStorage();
-const { createMessage } = useMessage();
-
-export default {
-  name: 'AdwebEnquiryList',
-  mixins: [JeecgListMixin],
-  components: {
-    enquiryTrack,
-    enquiryGenzong,
-    XpRecycleBinModal,
-    enquiryDetail,
-    blackList,
-    selectSite
-  },
-  data() {
-    return {
-      toReadImg,
-      toClassified,
-      toTotal,
-      userRole: '',
-      siteList: [],
-      userEffectiveOption: Array(),
-      userEffective: [],
-      excelLoading: false,
-      forwardLoading: false,
-      targetUserEffect: undefined,
-      rangeDate: undefined,
-      // 表头
-      settingColumns: [
-        'siteName',
-        'contact',
-        'fromEmail',
-        'phone',
-        'readStatus',
-        'principalUid',
-        'fromPage',
-        'userEffective',
-        'countryName',
-        'recordCtime',
-        'pluginName',
-        'action',
-      ],
-      columns: [
-        {
-          title: '站点名称',
-          align: 'left',
-          dataIndex: 'siteName'
-        },
-        {
-          title: '姓名',
-          align: 'left',
-          dataIndex: 'contact',
-          scopedSlots: {
-            customCell: 'contactSlot',
-          }
-        },
-        {
-          title: '邮箱',
-          align: 'left',
-          dataIndex: 'fromEmail',
-          scopedSlots: {
-            customCell: 'copyEmail',
-          },
-        },
-        {
-          title: 'whatsApp',
-          align: 'left',
-          dataIndex: 'whatsApp',
-          customCell: function (text) {
-            if (text == null || text == '' || text == undefined) {
-              return '--'
-            } else {
-              return text
-            }
-          }
-        },
-
-        {
-          title: '手机号',
-          align: 'left',
-          dataIndex: 'phone',
-          customCell: function (text) {
-            if (text == null || text == '' || text == undefined) {
-              return '--'
-            } else {
-              return text
-            }
-          }
-        },
-
-        {
-          title: '来源IP',
-          align: 'left',
-          dataIndex: 'fromIp',
-          customCell: function (text) {
-            if (text == null || text == '' || text == undefined) {
-              return '--'
-            } else {
-              return text
-            }
-          }
-        },
-
-        {
-          title: '状态',
-          align: 'left',
-          dataIndex: 'readStatus',
-          scopedSlots: {
-            customCell: 'readStatus'
-          },
-        },
-        {
-          title: '询盘详情',
-          align: 'left',
-          dataIndex: 'details',
-          scopedSlots: {
-            customCell: 'detailsSlot',
-          }
-        },
-        {
-          title: '跟进人',
-          align: "center",
-          dataIndex: 'principalUid',
-          scopedSlots: {
-            filterDropdown: 'filterDropdown2',
-            filterIcon: 'filterIcon2',
-            customCell: 'principalUidSlot',
-          }
-        },
-        {
-          title: '来源页面',
-          align: 'left',
-          dataIndex: 'fromPage',
-          scopedSlots: {
-            customCell: 'tips'
-          },
-        },
-        {
-          title: '分类',
-          align: 'left',
-          dataIndex: 'userEffective',
-          scopedSlots: {
-            customCell: 'userEffective'
-          }
-        },
-        {
-          title: '来源国家',
-          align: 'left',
-          dataIndex: 'countryName',
-          customCell: function (text) {
-            if (text == null || text == '' || text == undefined) {
-              return '--'
-            } else {
-              return text
-            }
-          }
-        },
-        {
-          title: '来源插件',
-          align: 'left',
-          dataIndex: 'pluginName',
-        },
-        {
-          title: '询盘时间',
-          align: 'left',
-          dataIndex: 'recordCtime',
-          customCell: function (text) {
-            return !text ? '' : (text.length > 16 ? text.substr(0, 16) : text)
-          }
-        },
-        {
-          title: '操作',
-          dataIndex: 'action',
-          align: 'left',
-          width: "180px",
-          fixed: 'right',
-          scopedSlots: {
-            filterDropdown: 'filterDropdown',
-            filterIcon: 'filterIcon',
-            customCell: 'action'
-          }
-        }
-      ],
-      defColumns: [],
-      url: {
-        list: "/adweb/adwebEnquiry/list"
-      },
-      enquiryNums: {
-        all: 0,
-        noRead: 0,
-        product: 0,
-        wait: 0
-      },
-      ipagination: {
-        current: 1,
-        pageSize: 30,
-        pageSizeOptions: ['15', '30', '45', '60'],
-        showTotal: (total, range) => {
-          return range[0] + "-" + range[1] + " 共" + total + "条"
-        },
-        showQuickJumper: true,
-        showSizeChanger: true,
-        total: 0
-      },
-      queryParam: {
-        readStatus: undefined,
-        userEffective: undefined
-      },
-      disableMixinCreated: true,
-      // 调整跟进人相关的字段 start
-      modalVisible: false,
-      forwardVisible: false,
-      //转发询盘信息
-      forwardEnquiryDetail: undefined,
-      siteCode: undefined,
-      subAccountOptions: [],
-      otherSubAccountOptions: [],
-      haveSubAccount: false,
-      radioStyle: {
-        display: 'block',
-        height: '30px',
-        lineHeight: '30px',
-      },
-      tempTopNumber: 0,
-      selectedUserId: undefined,
-      // 调整跟进人相关的字段 end
-      routerQuery: {},
-      edition: 1,
-      dictSiteCode: '',
-    }
-  },
-  created() {
-    this.siteCode = localStorage.getItem('siteCode');
-    this.getTurnInquiryCode();
-  },
-  mounted() {
-    this.userRole = useUserStore().roleList;
-    this.getSiteListWithQueryConditon();
-    this.getEffectiveList();
-  },
-  watch: {
-    $route: {
-      immediate: true,
-      handler() {
-        this.queryParam.dateType = '';
-        let query = this.$route.query;
-        this.routerQuery = query
-        // 时间筛选
-        if (query.dateType || query.start || query.end || query.offset) {
-          this.queryParam.start = query.start;
-          this.queryParam.end = query.end;
-          if (query.dateType && query.offset) {
-            //判断是否有偏移量
-            this.setTimeWithoutReloadData(query.dateType, query.offset);
-            this.queryParam.start = moment(this.rangeDate[0]._d).format("YYYY-MM-DD")
-            this.queryParam.end = moment(this.rangeDate[1]._d).format("YYYY-MM-DD")
-            this.queryParam.dateType = query.dateType;
-          } else if (query.dateType && !query.offset) {
-            this.queryParam.dateType = query.dateType;
-            this.setTimeWithoutReloadData(this.queryParam.dateType);
-          } else {
-            if (query.start && query.end) {
-              this.queryParam.dateType = undefined;
-              this.rangeDate = [moment(query.start), moment(query.end)];
-              // this.rangeDate = [moment(this.queryParam.start), moment(this.queryParam.end)];
-            }
-          }
-        }
-        // 其它筛选条件
-        if (query.searchText) {
-          this.queryParam.searchText = query.searchText;
-        }
-        if (query.searchContent) {
-          this.queryParam.searchContent = query.searchContent;
-        }
-        if (query.readStatus) {
-          this.queryParam.readStatus = query.readStatus;
-        }
-      }
-    }
-  },
-  methods: {
-    // ====================和调整跟进人相关的方法 start ======================
-    // 获取子账户的下拉框选项
-    getSubAccountOptions() {
-      let that = this;
-      getAction('/usercountry/subAccounts/options?siteId=' + that.queryParam.siteId).then(res => {
-        if (res.code === 200) {
-          that.subAccountOptions = res.result;
-          that.haveSubAccount = res.result !== null && res.result !== undefined && res.result.length > 0;
-          that.initColumns();
-        }
-      })
-    },
-    // 显示选择跟进人的弹窗
-    showEditPrincipalModal() {
-      let that = this;
-      if (that.selectedRowKeys.length <= 0) {
-        createMessage.warning('请选择至少一条记录!');
-        return;
-      }
-      that.modalVisible = true;
-    },
-    // 编辑跟进人
-    editPrincipal() {
-      if (this.selectedRowKeys.length <= 0) {
-        createMessage.warning('请选择至少一条记录!');
-        return;
-      }
-      if (!this.selectedUserId) {
-        createMessage.warning('请选择跟进人!');
-        return;
-      }
-      var ids = "";
-      for (var a = 0; a < this.selectedRowKeys.length; a++) {
-        ids += this.selectedRowKeys[a] + ",";
-      }
-      var that = this;
-      that.loading = true;
-      let param = {
-        'ids': ids,
-        'uid': that.selectedUserId
-      }
-      getAction('/adweb/adwebEnquiry/setPrincipalBatch', param).then((res) => {
-        if (res.success) {
-          createMessage.success(res.message);
-          that.loadData();
-          that.onClearSelected();
-          that.cancelEditPrincipal();
-        } else {
-          createMessage.warning(res.message);
-        }
-      }).finally(() => {
-        that.loading = false;
-      });
-    },
-    // 单个产品,点击下拉框直接修改
-    selectPrincipal(record) {
-      console.log(record);
-      let params = {
-        productId: record.id,
-        uid: record.principalUid === undefined ? 'ALL' : record.principalUid
-      }
-      getAction('/adweb/adwebEnquiry/setPrincipal', params).then((res) => {
-        if (res.code == 200) {
-          createMessage.success('操作成功!');
-        } else {
-          if (res.code == 403 || res.code == 500) {
-            createMessage.warning(res.message)
-            this.loadData();
-          } else {
-            createMessage.success('操作失败!');
-          }
-        }
-      })
-    },
-    // 取消跟进人的编辑
-    cancelEditPrincipal() {
-      this.selectedUserId = undefined;
-      this.modalVisible = false;
-    },
-    // ====================和调整跟进人相关的方法 end ======================
-    //日期选择只能今天之前
-    disabledDate(current) {
-      return current && current > moment().endOf('day');
-    },
-    //访问记录
-    enquiryTrack(record) {
-      this.$nextTick(() => {
-        this.$refs.enquiryTrack.init(record)
-      })
-    },
-    //跟踪记录
-    enquiryRecord(record) {
-      this.$nextTick(() => {
-        this.$refs.enquiryGenzong.init(record)
-      })
-    },
-    //转发询盘
-    forwardDetail(record) {
-      let that = this;
-      that.getOtherSubAccountOptions(record);
-      this.forwardEnquiryDetail = record.id;
-      that.forwardVisible = true;
-    },
-    //批量转发询盘
-    forwardDetailAll() {
-      if (this.selectedRowKeys.length <= 0) {
-        createMessage.warning('请选择至少一条记录!');
-        return;
-      }
-      getAction('/usercountry/otherSubAccounts/options?siteId=' + this.queryParam.siteId).then(res => {
-        if (res.code === 200) {
-          this.otherSubAccountOptions = res.result;
-        }
-      })
-      this.forwardEnquiryDetail = ""
-      for (var a = 0; a < this.selectedRowKeys.length; a++) {
-        this.forwardEnquiryDetail += this.selectedRowKeys[a] + ",";
-      }
-      this.forwardVisible = true;
-    },
-    // 编辑转发
-    editForward() {
-      if (this.forwardEnquiryDetail === undefined) {
-        createMessage.warning('请选择询盘信息!');
-        return;
-      }
-      if (!this.selectedUserId) {
-        createMessage.warning('请选择跟进人!');
-        return;
-      }
-
-      var that = this;
-      that.forwardLoading = true;
-      let param = {
-        'ids': that.forwardEnquiryDetail,
-        'uid': that.selectedUserId,
-        'code': that.siteCode
-      }
-      getAction('/adweb/adwebEnquiry/setForward', param).then((res) => {
-        if (res.success) {
-          createMessage.success(res.message);
-          that.loadData();
-          that.cancelEditForward();
-          that.getEnquiryNums();
-          that.selectedRowKeys = [];
-        } else {
-          createMessage.warning(res.message);
-        }
-      }).finally(() => {
-        that.forwardLoading = false;
-      });
-    },
-
-    // 取消转发的编辑
-    cancelEditForward() {
-      this.selectedUserId = undefined;
-      this.forwardEnquiryDetail = undefined;
-      this.forwardVisible = false;
-    },
-    // 获取子账户的下拉框选项
-    getOtherSubAccountOptions(record) {
-      let that = this;
-      getAction('/usercountry/otherSubAccounts/options?siteId=' + that.queryParam.siteId).then(res => {
-        if (res.code === 200) {
-          that.otherSubAccountOptions = res.result.filter(item => item.id !== record.principalUid);
-        }
-      })
-    },
-
-    //获取需要轮流询盘的站点code
-    getTurnInquiryCode() {
-      getAction('/adweb/adwebEnquiry/getTurnInquiryCode').then((res) => {
-        if (res.code === 200) {
-          this.dictSiteCode = res.result[0].value;
-        }
-      })
-    },
-    //询盘详情
-    enquiryDetail(record) {
-      if (record.readStatus == 0) {
-        getAction('/adweb/adwebEnquiry/read?id=' + record.id).then(res => {
-          this.getTableAndNum()
-        })
-      }
-      this.$nextTick(() => {
-        this.$refs.enquiryDetail.init(record)
-      })
-    },
-    productDetail(record) {
-      const param = {
-        siteCode: record.siteCode,
-        fromPage: record.fromPage,
-      }
-      getAction('/adweb/adwebEnquiry/getProductDetail', param).then(res => {
-        console.log(res)
-      })
-    },
-    //黑名单
-    showBlackList() {
-      this.$nextTick(() => {
-        this.$refs.blackList.init(this.queryParam.siteId)
-      })
-    },
-    //回收箱
-    recycleBinVisible() {
-      this.$nextTick(() => {
-        this.$refs.XpRecycleBinModal.init(this.queryParam.siteId, '1,2')
-      })
-    },
-
-    //重新刷新页面数据及获取询盘数量
-    getTableAndNum(arg, clearParam) {
-      // 设置默认站点
-      let siteId = this.queryParam.siteId;
-      let siteList = this.siteList;
-      for (let site of siteList) {
-        if (site.id === siteId) {
-          localStorage.setItem("siteCode", site.code);
-        }
-      }
-
-      this.getEnquiryNums()
-      this.getSubAccountOptions();
-      if (clearParam) {
-        if (this.queryParam.readStatus) {
-          delete this.queryParam.readStatus
-        }
-        if (this.queryParam.searchText) {
-          delete this.queryParam.searchText
-        }
-        if (this.queryParam.searchContent) {
-          delete this.queryParam.searchContent
-        }
-        if (this.queryParam.userEffective) {
-          delete this.queryParam.userEffective
-        }
-        if (this.queryParam.principalUid) {
-          delete this.queryParam.principalUid;
-        }
-      }
-      this.loadData(arg)
-    },
-
-    //重新刷新页面数据及获取询盘数量,不清除查询条件
-    getTableAndNumWithQueryCondition(arg) {
-      this.getEnquiryNums()
-      this.getSubAccountOptions();
-      this.loadData(arg)
-    },
-
-    //重写重置,原先整体查询条件重置,改为只清空部分
-    searchReset() {
-      //this.queryParam = {}
-      if (this.queryParam.readStatus) {
-        delete this.queryParam.readStatus
-      }
-      if (this.queryParam.searchText) {
-        delete this.queryParam.searchText
-      }
-      if (this.queryParam.searchContent) {
-        delete this.queryParam.searchContent
-      }
-      if (this.queryParam.userEffective) {
-        delete this.queryParam.userEffective
-      }
-      if (this.queryParam.principalUid) {
-        delete this.queryParam.principalUid;
-      }
-      this.getTableAndNum(1);
-      this.onClearSelected();
-    },
-
-    changeSite(value, e) {
-
-      this.selectSiteInfo = e.info
-      this.queryParam.siteId = this.selectSiteInfo.id;
-      this.siteCode = localStorage.getItem('siteCode');
-      this.getTableAndNum(undefined, true)
-    },
-
-    //设置列表的时间查询条件
-    setTime(time) {
-      this.queryParam.dateType = time
-      this.queryParam.start = ''
-      this.queryParam.end = ''
-      // sevenDay   thirtyDay  today  yesterday
-      if (time == '') {
-        this.rangeDate = undefined
-      } else if (time == 'sevenDay') {
-        this.rangeDate = [moment().subtract(6, "days"), moment()]
-      } else if (time == 'thirtyDay') {
-        this.rangeDate = [moment().subtract(29, "days"), moment()]
-      } else if (time == 'today') {
-        this.rangeDate = [moment(), moment()]
-      } else if (time == 'yesterday') {
-        this.rangeDate = [moment().subtract(1, "days"), moment().subtract(1, "days")]
-      }
-      this.getTableAndNum()
-    },
-
-    //设置列表的时间查询条件,但不查询数据
-    setTimeWithoutReloadData(time, offset) {
-      if (!offset) {
-        offset = 0;
-      }
-      if (time == 'today' || time == 'yesterday') {
-        offset = 0;
-      }
-      offset = Number(offset);
-      this.queryParam.dateType = time
-      this.queryParam.start = ''
-      this.queryParam.end = ''
-      if (time == '') {
-        this.rangeDate = undefined
-      } else if (time == 'sevenDay') {
-        this.rangeDate = [moment().subtract(6 + offset, "days"), moment().subtract(offset, "days")]
-      } else if (time == 'thirtyDay') {
-        this.rangeDate = [moment().subtract(29 + offset, "days"), moment().subtract(offset, "days")]
-      } else if (time == 'today') {
-        this.rangeDate = [moment().subtract(offset, "days"), moment().subtract(offset, "days")]
-      } else if (time == 'yesterday') {
-        this.rangeDate = [moment().subtract(1 + offset, "days"), moment().subtract(1 + offset, "days")]
-      }
-    },
-
-    //搜索条件部分的逻辑
-    onChangeDatePciker(date, dateString) {
-      if (dateString.length > 0) {
-        this.rangeDate = date
-        this.queryParam.start = dateString[0]
-        this.queryParam.end = dateString[1]
-        this.queryParam.dateType = undefined
-        this.getTableAndNum()
-      }
-    },
-
-    getList(type) {
-      //清空查询条件
-      this.queryParam.principalUid = undefined;
-      this.queryParam.searchText = undefined;
-      this.queryParam.searchContent = undefined;
-      if (type == 'noRead') {
-        this.queryParam.readStatus = '0'
-        this.queryParam.userEffective = undefined
-      }
-      if (type == 'product') {
-        this.queryParam.userEffective = 1
-        console.log('1', this.queryParam)
-
-        this.queryParam.readStatus = undefined
-        console.log('2', this.queryParam)
-
-      }
-      if (type == 'wait') {
-        this.queryParam.userEffective = 2
-        this.queryParam.readStatus = undefined
-      }
-      if (type == 'all') {
-        this.queryParam.userEffective = undefined
-        this.queryParam.readStatus = undefined
-      }
-      this.loadData(1)
-    },
-
-
-    //获取站点列表,获取表格数据的时候不清除查询条件
-    getSiteListWithQueryConditon() {
-      let that = this
-      getAction('/adweb/adwebSite/getSiteListByUid').then(function (res) {
-        if (res.code === 200) {
-
-
-          if (res.result.length === 1) {
-            that.queryParam.siteId = res.result[0].id
-          } else {
-            let isInSite = false
-            for (let i in res.result) {
-              if (localStorage.getItem('siteCode') !== null && res.result[i].code === localStorage.getItem('siteCode')) {
-                isInSite = true
-                that.queryParam.siteId = res.result[i].id
-              }
-            }
-            if (localStorage.getItem('siteCode') !== null && isInSite) {
-            } else {
-              that.queryParam.siteId = res.result[0].id
-              localStorage.setItem('siteCode', res.result[0].code)
-            }
-          }
-
-          that.siteList = res.result;
-          that.initColumns();
-          //如果首页查询数据,直接走下面,return掉,防止接口多次请求
-          if (that.routerQuery.timeType) {
-            let start
-            if (that.routerQuery.timeType == 'thisWeek') {
-              start = moment().subtract(moment().day() - 1, 'days').format('YYYY-MM-DD')
-            }
-            if (that.routerQuery.timeType == 'thisMonth') {
-              start = moment().startOf('month').format('YYYY-MM-DD');
-            }
-            let end = moment().format('YYYY-MM-DD')
-            that.rangeDate = [moment(start), moment(end)];
-            that.queryParam.start = start
-            that.queryParam.end = end
-            that.queryParam.dateType = undefined
-            that.getTableAndNum()
-            return
-          }
-
-          if (that.routerQuery.siteCode) {
-            that.queryParam.siteId = Number(that.routerQuery.siteCode)
-          }
-          that.getTableAndNumWithQueryCondition()
-        } else {
-          createMessage.error('获取站点失败!')
-        }
-      }).catch(function (err) {
-        console.log(err)
-      })
-    },
-
-    //获取询盘分类列表
-    getEffectiveList() {
-      let that = this
-      getAction('/adweb/adwebEnquiry/getEnquiryCatalog').then(function (res) {
-        if (res.code == 200) {
-          that.userEffectiveOption = JSON.parse(res.result);
-        } else {
-          createMessage.error('获取询盘分类失败!')
-        }
-      }).catch(function (err) {
-        console.log(err)
-      })
-    },
-
-    //批量分配询盘
-    changeUserEffective(e) {
-      let that = this
-      if (e == '') {
-        return
-      }
-      let d = {
-        id: that.selectedRowKeys.toString(),
-        userEffective: e
-      }
-      postAction('/adweb/adwebEnquiry/update/user/effective', Qs.stringify(d)).then(function (res) {
-        if (res.code == 200) {
-          createMessage.success('批量分类修改成功!');
-          that.getTableAndNum()
-        } else {
-          if (res.code == 403) {
-            createMessage.warning(res.message)
-          } else {
-            createMessage.error('分类修改失败!')
-          }
-        }
-      }).catch(function (err) {
-        console.log(err)
-      })
-    },
-
-    // 删除
-    enquiryDelete(id) {
-      getAction('/adweb/adwebEnquiry/delBatch', {id: id}).then((res) => {
-        if (res.success) {
-          createMessage.success(`删除询盘成功!`)
-          this.getTableAndNum()
-        } else {
-          if (res.code == 403) {
-            createMessage.warning(res.message)
-          } else {
-            createMessage.error('删除失败!')
-          }
-        }
-      })
-    },
-    //批量删除
-    enquiryDeleteAll() {
-      if (this.selectedRowKeys.length <= 0) {
-        createMessage.warning('请选择至少一条记录!');
-        return;
-      }
-      getAction('/adweb/adwebEnquiry/delBatch', {id: this.selectedRowKeys.toString()}).then((res) => {
-        if (res.success) {
-          createMessage.success(`批量删除询盘成功!`)
-          this.getTableAndNum()
-          this.onClearSelected();
-        } else {
-          if (res.code == 403) {
-            createMessage.warning(res.message)
-          } else {
-            createMessage.error('删除失败!')
-          }
-        }
-      })
-    },
-    //批量设为已读
-    enquiryReady() {
-      if (this.selectedRowKeys.length <= 0) {
-        createMessage.warning('请选择至少一条记录!');
-        return;
-      }
-      getAction('/adweb/adwebEnquiry/read', {id: this.selectedRowKeys.toString()}).then((res) => {
-        if (res.success) {
-          createMessage.success('批量设置已读成功!')
-          this.getTableAndNum()
-          this.onClearSelected();
-        } else {
-          if (res.code == 403) {
-            createMessage.warning(res.message)
-          } else {
-            createMessage.error('设置失败!')
-          }
-        }
-      })
-    },
-
-    //拒收
-    enquiryAddBlackList(record) {
-      delete record.wasteEnquiry
-      postAction('/enquiry/blacklist/addBlacklist', record).then(res => {
-        if (res.success) {
-          createMessage.success(`拒收成功!`)
-          this.getTableAndNum()
-        } else {
-          if (res.code == 403 || res.code == 500) {
-            createMessage.warning(res.message)
-          } else {
-            createMessage.error('拒收失败!')
-          }
-
-        }
-      })
-    },
-
-    //获取不同状态询盘的数量
-    getEnquiryNums() {
-      let siteId = ''
-      let that = this
-      if (that.queryParam.siteId && that.queryParam.siteId != '') {
-        siteId = that.queryParam.siteId
-      } else {
-        siteId = ''
-      }
-      let d = {
-        siteId: siteId,
-        dateType: that.queryParam.dateType,
-        start: that.queryParam.start,
-        end: that.queryParam.end
-      }
-      getAction('/adweb/adwebEnquiry/getEnquiryNums', d).then(res => {
-        if (res.code == 200) {
-          that.enquiryNums.all = res.result.all
-          that.enquiryNums.noRead = res.result.noRead
-          that.enquiryNums.product = res.result.product
-          that.enquiryNums.wait = res.result.wait
-        } else {
-          that.enquiryNums.all = 0
-          that.enquiryNums.noRead = 0
-          that.enquiryNums.product = 0
-          that.enquiryNums.wait = 0
-        }
-
-      })
-    },
-
-
-    filterOption(inputValue, option) {
-      return option.componentOptions.children[0].text.indexOf(inputValue) >= 0
-    },
-
-
-    //列设置更改事件
-    onColSettingsChange(checkedValues) {
-      var key = this.$route.name + ":colsettings";
-      $ls.set(key, checkedValues, 7 * 24 * 60 * 60 * 1000)
-      this.settingColumns = checkedValues;
-      const cols = this.columns.filter(item => {
-        if (item.key == 'rowIndex' || item.dataIndex == 'action') {
-          return true
-        }
-        if (this.settingColumns.includes(item.dataIndex)) {
-          return true
-        }
-        return false
-      })
-      this.defColumns = cols;
-    },
-
-    initColumns() {
-      let that = this;
-
-      // 从缓存中获取存放的展示列
-      var key = this.$route.name + ":colsettings";
-      let columnIndexs = $ls.get(key);
-
-      if (columnIndexs !== null && columnIndexs !== undefined) {
-        that.settingColumns = columnIndexs;
-      }
-
-      // 重置显示的列
-      that.defColumns = this.columns.filter(item => {
-        if (item.dataIndex === 'action') {
-          return true;
-        }
-        if (item.dataIndex === 'principalUid') {
-          return that.haveSubAccount;
-        }
-        if (item.dataIndex === 'siteName') {
-          return that.siteList !== null && that.siteList !== undefined && that.siteList.length >= 2
-        }
-
-        if (that.userRole.indexOf('admin') > -1 || that.userRole.indexOf('adweb_admin') > -1 || that.userRole.indexOf('adweb_seo_manager') > -1 || that.userRole.indexOf('adweb_site_manager') > -1) {
-          if (item.dataIndex === 'pluginName') {
-            return true;
-          }
-        }
-        if (that.settingColumns.includes(item.dataIndex)) {
-          return true;
-        }
-        return false;
-      });
-    },
-    handleExportXlsLU(fileName) {
-      let that = this
-      if (that.edition == 2) {
-        createMessage.warning('"演示版"没有操作权限,如果需要操作,请切换到"正式版"再操作!');
-        return;
-      } else {
-        let param = this.getQueryParams();
-        if (!param.userEffective) {
-          param.userEffective = '1,2';
-        }
-        if (param.siteId === 0) {
-          createMessage.warning("请先选择站点!");
-          return;
-        }
-        this.excelLoading = true;
-        downFile("/adweb/adwebEnquiry/exportExcel", param).then((data) => {
-          this.excelLoading = false;
-          if (!data) {
-            createMessage.warning("文件下载失败")
-            return
-          }
-          if (typeof window.navigator.msSaveBlob !== 'undefined') {
-            window.navigator.msSaveBlob(new Blob([data], {type: 'application/vnd.ms-excel'}), fileName + '.xlsx')
-          } else {
-            let url = window.URL.createObjectURL(new Blob([data], {type: 'application/vnd.ms-excel'}))
-            let link = document.createElement('a')
-            link.style.display = 'none'
-            link.href = url
-            link.setAttribute('download', fileName + '.xlsx')
-            document.body.appendChild(link)
-            link.click()
-            document.body.removeChild(link); //下载完成移除元素
-            window.URL.revokeObjectURL(url); //释放掉blob对象
-          }
-        })
-      }
-    },
-//复制email到剪切板
-    copyEmailFunction(text) {
-      let that = this;
-      //复制email到剪切板
-      if (!navigator.clipboard) {
-        console.log('浏览器不支持navigator');
-        let copy = (e) => {
-          e.preventDefault()
-          e.clipboardData.setData('text/plain', text)
-          createMessage.success('复制成功');
-          document.removeEventListener('copy', copy)
-        }
-        document.addEventListener('copy', copy)
-        document.execCommand("Copy");
-        return
-      }
-      navigator.clipboard.writeText(text).then(function () {
-        createMessage.success('复制成功');
-      }, function (err) {
-        createMessage.error('复制失败');
-      });
-    },
-    loadData(arg) {
-      if (!this.url.list) {
-        createMessage.error("请设置url.list属性!")
-        return
-      }
-      //加载数据 若传入参数1则加载第一页的内容
-      if (arg === 1) {
-        this.ipagination.current = 1;
-      }
-      var params = this.getQueryParams();//查询条件
-      if (!params.userEffective) {
-        params.userEffective = '1,2';
-      }
-      this.loading = true;
-      getAction(this.url.list, params).then((res) => {
-        if (res.success) {
-          //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-          this.dataSource = res.result.records || res.result;
-          if (res.result.total != 0) {
-            this.ipagination.total = res.result.total;
-          } else {
-            this.ipagination.total = 0;
-          }
-          //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-        }
-        if (res.code === 510) {
-          createMessage.warning(res.message)
-        }
-        this.loading = false;
-      })
-    },
-  }
-}
-</script>
-
-<style lang="less" scoped>
-.ant-alert {
-  /deep/ .ant-btn {
-    border-radius: 0;
-    margin-left: 10px;
-  }
-}
-
-.theme-color {
-  color: @primary-color;
-}
-
-.r1 {
-  .choose-site {
-    display: flex;
-  }
-
-  .t1 {
-    font-size: 18px;
-  }
-
-  .ant-calendar-picker {
-    margin-right: 20px;
-
-  }
-
-
-}
-
-.r2 {
-  background: #fff;
-  border-radius: 10px;
-  padding: 30px 20px;
-  margin-top: 20px;
-
-  .ant-col:not(:last-child) {
-    border-right: 1px solid #e6e6e6;
-  }
-
-  p {
-    margin: 0;
-    text-align: center;
-
-    &.t1 {
-      color: #333;
-      margin-bottom: 15px;
-
-      img {
-        margin-right: 10px;
-        width: 15px;
-        margin-top: -5px;
-      }
-    }
-
-    &.t2 {
-      color: @primary-color;
-      font-size: 30px;
-      font-weight: 500;
-      line-height: 1;
-      text-decoration: underline;
-      cursor: pointer;
-      padding-left: 25px;
-    }
-  }
-}
-
-.r3 {
-  margin-top: 20px;
-}
-
-.r4 {
-  margin-top: 20px;
-
-  /deep/ .ant-table-tbody {
-    background: #fff;
-  }
-
-  /deep/ .ant-table-tbody > tr > td {
-    border-bottom: 1px solid #f7f7f7;
-  }
-}
-</style>

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

@@ -251,7 +251,7 @@
 
 <script lang="ts" name="adweb-adwebWasteEnquiry" setup>
 
-import selectSite from '@/components/adweb/selectSite.vue';
+import selectSite from '@/components/Adweb/selectSite.vue';
 import {nextTick, onBeforeMount, onMounted, reactive, ref} from 'vue';
 import {BasicTable} from '/@/components/Table';
 import {useListPage} from '/@/hooks/system/useListPage';

+ 11 - 9
src/views/adweb/enquiry/modules/enquiryTrackRecord.vue

@@ -19,15 +19,17 @@
         <a-divider class="mt-0">历史跟踪记录</a-divider>
 
         <a-timeline class="time-line-wrap">
-          <a-timeline-item v-for="(line, index) in enquiryRecordList" :key="index">
-            <p class="m-0">
-              <a-icon type="history"/>&nbsp;&nbsp;{{line.ctime}}&nbsp;&nbsp;&nbsp;&nbsp;<a-icon type="user"/>
-              {{line.realname}}
-            </p>
-            <p class="mt-5">
-              <a-icon type="form"/>&nbsp;&nbsp;{{line.content}}
-            </p>
-          </a-timeline-item>
+          <template v-for="(line, index) in enquiryRecordList" :key="index">
+            <a-timeline-item>
+              <p class="m-0">
+                <a-icon type="history"/>&nbsp;&nbsp;{{line.ctime}}&nbsp;&nbsp;&nbsp;&nbsp;<a-icon type="user"/>
+                {{line.realname}}
+              </p>
+              <p class="mt-5">
+                <a-icon type="form"/>&nbsp;&nbsp;{{line.content}}
+              </p>
+            </a-timeline-item>
+          </template>
         </a-timeline>
 
         <a-divider>添加跟踪记录</a-divider>

+ 40 - 112
src/views/adweb/enquiryPublicRules/publicBlackEmail/EnquiryPublicBlackEmailList.vue

@@ -1,17 +1,19 @@
 <template>
   <a-card :bordered="false">
     <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <a-form @keyup.enter="reload">
+    <div class="jeecg-basic-table-form-container">
+      <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam">
         <a-row :gutter="24">
           <a-col :md="6" :sm="12">
-            <a-form-item label="邮箱">
-              <a-input placeholder="输入邮箱查询" v-model:value="queryParam.email" />
+            <a-form-item name="email">
+              <template #label><span title="邮箱">邮箱</span></template>
+              <a-input name="email" placeholder="输入邮箱查询" v-model:value="queryParam.email" allow-clear></a-input>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="10">
-            <a-form-item label="黑白名单">
-              <a-select allowClear v-model:value="queryParam.blackOrWhite" placeholder="输入黑白名单类型">
+            <a-form-item name="blackOrWhite" >
+              <a-select allow-clear v-model:value="queryParam.blackOrWhite"
+                        placeholder="输入黑白名单类型">
                 <a-select-option value="0">黑名单</a-select-option>
                 <a-select-option value="1">白名单</a-select-option>
               </a-select>
@@ -19,15 +21,8 @@
           </a-col>
           <a-col :md="6" :sm="8">
             <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="reload">
-                <Icon icon="ant-design:search-outlined"></Icon>
-                查询
-              </a-button>
-              <a-button ghost type="primary" @click="searchReset"
-                        style="margin-left: 8px">
-                 <Icon icon="ant-design:reload-outlined"></Icon>
-                重置
-              </a-button>
+              <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
+              <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px"> 重置</a-button>
             </span>
           </a-col>
         </a-row>
@@ -52,7 +47,7 @@
             </a-menu>
           </template>
           <a-button>批量操作
-            <Icon icon="mdi:chevron-down" />
+            <Icon icon="mdi:chevron-down"/>
           </a-button>
         </a-dropdown>
       </template>
@@ -61,7 +56,7 @@
       <!--操作栏-->
       <template #action="{ record }">
         <TableAction :actions="getTableAction(record)"
-                     :dropDownActions="getDropDownAction(record)" />
+                     :dropDownActions="getDropDownAction(record)"/>
       </template>
 
       <template #bodyCell="{ column, record, index, text }">
@@ -84,9 +79,9 @@
           <span>
             <a @click="handleEdit(record)">编辑</a>
 
-            <a-divider type="vertical" />
+            <a-divider type="vertical"/>
             <a-dropdown>
-              <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+              <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
               <a-menu slot="overlay">
                 <a-menu-item>
                   <a @click="handleDetail(record)">详情</a>
@@ -105,31 +100,30 @@
 
     <enquiry-public-black-email-modal ref="modalFormRef"
                                       @ok="reload()"></enquiry-public-black-email-modal>
-    <xp-recycle-bin-modal ref="XpRecycleBinModalRef" />
+    <xp-recycle-bin-modal ref="XpRecycleBinModalRef"/>
   </a-card>
 </template>
 
 <script lang="ts" name="EnquiryPublicBlackEmailList" setup>
-import { DownloadOutlined } from "@ant-design/icons-vue";
 import "/@/assets/less/TableExpand.less";
 import "/@/assets/less/common.less";
-import { batchDelete, deleteOne, getExportUrl, getImportUrl, list } from "./publicBlackEmail.api";
+import {batchDelete, deleteOne, getExportUrl, getImportUrl, list} from "./publicBlackEmail.api";
 import EnquiryPublicBlackEmailModal from "./modules/EnquiryPublicBlackEmailModal.vue";
 import XpRecycleBinModal from "./modules/XpRecycleBinModal.vue";
-import { defineComponent, nextTick, onMounted, reactive, ref } from "vue";
-import { columns } from "./publicBlackEmail.data";
-import { BasicTable, TableAction } from "@/components/Table";
-import { useListPage } from "@/hooks/system/useListPage";
+import {nextTick, onMounted, reactive, ref} from "vue";
+import {columns} from "./publicBlackEmail.data";
+import {BasicTable, TableAction} from "@/components/Table";
+import {useListPage} from "@/hooks/system/useListPage";
+import {useCommonList} from "@/hooks/component/JeecgList";
 
 const XpRecycleBinModalRef = ref();
+const formRef = ref();
 const modalFormRef = ref();
-const description = ref<String>("询盘公共邮箱黑名单管理页面");
-let queryParam = reactive<any>({});
-const dictOptions = ref({});
+const queryParam = reactive<any>({});
 const superFieldList = ref([]);
 
 //注册table数据
-const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
+const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
   tableProps: {
     title: "公共邮箱黑名单",
     api: list,
@@ -163,7 +157,21 @@ const [registerTable, {
   updateTableDataRecord,
   findTableDataRecord,
   getDataSource
-}, { rowSelection, selectedRowKeys }] = tableContext;
+}, {rowSelection, selectedRowKeys}] = tableContext;
+
+
+const {
+  handleEdit,
+  getTableAction,
+  batchHandleDelete,
+  handleDetail,
+  getDropDownAction,
+  handleDelete,
+  handleAdd,
+  searchQuery,
+  searchReset
+} = useCommonList({tableContext, modalFormRef, formRef, batchDelete, deleteOne});
+
 
 onMounted(() => {
   getSuperFieldList();
@@ -171,7 +179,7 @@ onMounted(() => {
 
 function getSuperFieldList() {
   let fieldList = [];
-  fieldList.push({ type: "string", value: "email", text: "邮箱", dictCode: "" });
+  fieldList.push({type: "string", value: "email", text: "邮箱", dictCode: ""});
   superFieldList.value = fieldList;
 }
 
@@ -183,61 +191,6 @@ async function wasteNumVisible(email) {
   }
 }
 
-function handleEdit(record) {
-  modalFormRef.value.title = "编辑";
-  modalFormRef.value.edit(record);
-  modalFormRef.value.disableSubmit = false;
-}
-
-
-/**
- * 操作栏
- */
-function getTableAction(record) {
-  return [
-    {
-      label: "编辑",
-      onClick: handleEdit.bind(null, record)
-    }
-  ];
-}
-
-/**
- * 详情
- */
-function handleDetail(record: Recordable) {
-  modalFormRef.value.disableSubmit = true;
-  modalFormRef.value.edit(record);
-}
-
-/**
- * 下拉操作栏
- */
-function getDropDownAction(record) {
-  return [
-    {
-      label: "详情",
-      onClick: handleDetail.bind(null, record)
-    }, {
-      label: "删除",
-      popConfirm: {
-        title: "是否确认删除",
-        confirm: handleDelete.bind(null, record),
-        placement: "topLeft"
-      }
-    }
-  ];
-}
-
-/**
- * 新增事件
- */
-function handleAdd() {
-  modalFormRef.value.title = "新增";
-  modalFormRef.value.disableSubmit = false;
-  modalFormRef.value.add();
-}
-
 /**
  * 成功回调
  */
@@ -245,29 +198,4 @@ function handleSuccess() {
   (selectedRowKeys.value = []) && reload();
 }
 
-/**
- * 删除事件
- */
-async function handleDelete(record) {
-  await deleteOne({ id: record.id }, handleSuccess);
-}
-
-/**
- * 批量删除事件
- */
-async function batchHandleDelete() {
-  await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
-}
-
-function searchReset() {
-  queryParam = {};
-  reload();
-  clearSelectedRowKeys();
-}
-
 </script>
-<style>
-/*.table-page-search-wrapper {*/
-/*  display: block;*/
-/*}*/
-</style>

+ 8 - 9
src/views/adweb/enquiryPublicRules/publicBlackEmail/modules/EnquiryPublicBlackEmailForm.vue

@@ -27,15 +27,15 @@
 </template>
 
 <script lang="ts" name="EnquiryPublicBlackEmailForm" setup>
-import {getAction, httpAction} from '/@/api/manage/manage';
-import pick from 'lodash.pick';
+  import {getAction, httpAction} from '/@/api/manage/manage';
+  import pick from 'lodash.pick';
 
-import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
-import {computed, onBeforeMount, reactive, ref, toRaw} from 'vue';
-import {Form} from 'ant-design-vue';
-import {useMessage} from "@/hooks/web/useMessage";
+  import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
+  import {computed, onBeforeMount, reactive, ref, toRaw} from 'vue';
+  import {Form} from 'ant-design-vue';
+  import {useMessage} from "@/hooks/web/useMessage";
 
-const emit = defineEmits(["ok", "close"])
+  const emit = defineEmits(["ok", "close"])
 
   const { createMessage, createConfirm } = useMessage();
 
@@ -75,8 +75,6 @@ const emit = defineEmits(["ok", "close"])
 
   const confirmLoading = ref(false);
 
-  const validatorRules = reactive({});
-
   const url = reactive({
     add: '/adweb/enquiryPublicBlackEmail/add',
     edit: '/adweb/enquiryPublicBlackEmail/edit',
@@ -117,6 +115,7 @@ const emit = defineEmits(["ok", "close"])
 
   async function edit(record) {
     if (Object.keys(record).length === 0) {
+      modelRef.id = '';
       modelRef.email = '';
       modelRef.blackOrWhite = null;
     } else {

+ 195 - 190
src/views/adweb/enquiryPublicRules/publicBlackip/AdwebBlackIpList.vue

@@ -2,25 +2,31 @@
   <a-card :bordered="false">
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
+      <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam">
         <a-row :gutter="24">
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="ip">
-              <a-input placeholder="请输入ip" v-model="queryParam.ip"></a-input>
+            <a-form-item name="ip">
+              <a-input placeholder="请输入ip" v-model:value="queryParam.ip" allow-clear></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item name="blackOrWhite">
+              <a-select allow-clear placeholder="请输入黑白名单" v-model:value="queryParam.blackOrWhite">
+                <a-select-option value="0">黑名单</a-select-option>
+                <a-select-option value="1">白名单</a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
-            <a-col :xl="6" :lg="7" :md="8" :sm="24">
-              <a-form-item label="黑白名单">
-                <a-select allowClear placeholder="请输入黑白名单" v-model="queryParam.blackOrWhite">
-                  <a-select-option value="0">黑名单</a-select-option>
-                  <a-select-option value="1">白名单</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a-button type="primary" @click="reload">
+                <Icon icon="ant-design:search-outlined"></Icon>
+                查询
+              </a-button>
+              <a-button type="primary" @click="searchReset" style="margin-left: 8px">
+                <Icon icon="ant-design:reload-outlined"></Icon>
+                重置
+              </a-button>
             </span>
           </a-col>
         </a-row>
@@ -28,195 +34,194 @@
     </div>
     <!-- 查询区域-END -->
 
-    <!-- 操作按钮区域 -->
-    <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-<!--      <a-button type="primary" icon="download" @click="handleExportXls('IP黑名单')">导出</a-button>-->
-<!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
-<!--        <a-button type="primary" icon="import">导入</a-button>-->
-<!--      </a-upload>-->
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
-      </a-dropdown>
-    </div>
-
     <!-- table区域-begin -->
-    <div>
+    <div class="table">
       <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
+        style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="clearSelectedRowKeys">清空</a>
       </div>
 
-      <a-table
-        ref="table"
-        size="middle"
-        :scroll="{x:true}"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        class="j-table-force-nowrap"
-        @change="handleTableChange">
-
-        <span slot="wasteEnquiryNum" slot-scope="text, record">
-            <span v-if="text === '' || text === null || text === 0">0</span>
-            <a v-else  @click='wasteNumVisible(record.ip)'>{{ text }}</a>
-        </span>
-
-        <span slot="blackOrWhite" slot-scope="text, record">
-            <a-tag v-if="text === 0" color="red">黑名单</a-tag>
-            <a-tag v-else-if="text === 1">白名单</a-tag>
-            <a-tag v-else>--</a-tag>
-        </span>
-
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
-
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a @click="handleDetail(record)">详情</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
+      <!--引用表格-->
+      <BasicTable @register="registerTable" :rowSelection="rowSelection">
+        <!--插槽:table标题-->
+        <template #tableTitle>
+          <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增
+          </a-button>
+          <a-dropdown v-if="selectedRowKeys.length > 0">
+            <template #overlay>
+              <a-menu>
+                <a-menu-item key="1" @click="batchHandleDelete">
+                  <Icon icon="ant-design:delete-outlined"></Icon>
+                  删除
+                </a-menu-item>
+              </a-menu>
+            </template>
+            <a-button>批量操作
+              <Icon icon="mdi:chevron-down" />
+            </a-button>
           </a-dropdown>
-        </span>
+        </template>
+
+
+        <!--操作栏-->
+        <template #action="{ record }">
+          <TableAction :actions="getTableAction(record)"
+                       :dropDownActions="getDropDownAction(record)" />
+        </template>
+
+        <template #bodyCell="{ column, record, index, text }">
+
+          <template v-if="column.dataIndex === 'blackOrWhite'">
+          <span>
+            <a-tag v-if="record.blackOrWhite === 0" color="red">黑名单</a-tag>
+            <a-tag v-else>白名单</a-tag>
+          </span>
+          </template>
+
+          <template v-if="column.dataIndex === 'wasteEnquiryNum'">
+          <span>
+            <span v-if="text === '' || text === null || text === 0">0</span>
+            <a v-else @click="wasteNumVisible(record.email)">{{ text }}</a>
+          </span>
+          </template>
+
+          <template v-if="column.dataIndex === 'action'">
+          <span>
+            <a @click="handleEdit(record)">编辑</a>
+
+            <a-divider type="vertical" />
+            <a-dropdown>
+              <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+              <a-menu slot="overlay">
+                <a-menu-item>
+                  <a @click="handleDetail(record)">详情</a>
+                </a-menu-item>
+                <a-menu-item>
+                  <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                    <a>删除</a>
+                  </a-popconfirm>
+                </a-menu-item>
+              </a-menu>
+            </a-dropdown>
+          </span>
+          </template>
+        </template>
+      </BasicTable>
 
-      </a-table>
     </div>
 
-    <adweb-black-ip-modal ref="modalForm" @ok="modalFormOk"></adweb-black-ip-modal>
-    <xp-recycle-bin-modal ref="XpRecycleBinModal" @ok="getTableAndNum"/>
+    <adweb-black-ip-modal ref="modalFormRef" @ok="reload"></adweb-black-ip-modal>
+    <xp-recycle-bin-modal ref="XpRecycleBinModalRef" @ok="getTableAndNum"/>
   </a-card>
 </template>
 
-<script>
-
-  import '@/assets/less/TableExpand.less'
-  import { mixinDevice } from '@/utils/mixin'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import AdwebBlackIpModal from './modules/AdwebBlackIpModal'
-  import JSuperQuery from '@/components/jeecg/JSuperQuery.vue'
-  import XpRecycleBinModal from './modules/XpRecycleBinModal'
-
-  export default {
-    name: 'AdwebBlackIpList',
-    mixins:[JeecgListMixin, mixinDevice],
-    components: {
-      AdwebBlackIpModal,
-      JSuperQuery,
-      XpRecycleBinModal,
-    },
-    data () {
-      return {
-        description: 'IP黑名单管理页面',
-        // 表头
-        columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-          },
-          {
-            title:'ip',
-            align:"center",
-            dataIndex: 'ip'
-          },
-          {
-            title:'黑白名单',
-            align:"center",
-            dataIndex: 'blackOrWhite',
-            scopedSlots: {customRender: 'blackOrWhite'}
-          },
-          {
-            title:'询盘数量',
-            align:"center",
-            dataIndex: 'wasteEnquiryNum',
-            scopedSlots: {customRender: 'wasteEnquiryNum'}
-          },
-          {
-            title: '创建时间',
-            align: "center",
-            dataIndex: 'createTime',
-            sorter: true
-          },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align:"center",
-            fixed:"right",
-            width:147,
-            scopedSlots: { customRender: 'action' }
-          }
-        ],
-        url: {
-          list: "/blackip/adwebBlackIp/list",
-          delete: "/blackip/adwebBlackIp/delete",
-          deleteBatch: "/blackip/adwebBlackIp/deleteBatch",
-          exportXlsUrl: "/blackip/adwebBlackIp/exportXls",
-          importExcelUrl: "blackip/adwebBlackIp/importExcel",
-
-        },
-        dictOptions:{},
-        superFieldList:[],
-      }
-    },
-    created() {
-    this.getSuperFieldList();
-    },
-    computed: {
-      importExcelUrl: function(){
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-      },
+<script lang="ts" name="AdwebBlackIpList" setup>
+
+import '/@/assets/less/common.less';
+import '/@/assets/less/TableExpand.less'
+
+import AdwebBlackIpModal from './modules/AdwebBlackIpModal.vue'
+
+import XpRecycleBinModal from './modules/XpRecycleBinModal.vue'
+import {nextTick, onMounted, reactive, ref} from "vue";
+
+import {batchDelete, deleteOne, getExportUrl, getImportUrl, list} from "./publicBlackIP.api";
+import {columns} from "./publicBlackIP.data";
+import {BasicTable, TableAction} from "@/components/Table";
+import {useListPage} from "@/hooks/system/useListPage";
+import {useCommonList} from "@/hooks/component/JeecgList";
+
+const description = ref('IP黑名单管理页面');
+const dictOptions = reactive({});
+const formRef = ref();
+let queryParam = reactive<any>({});
+const XpRecycleBinModalRef = ref();
+const modalFormRef = ref();
+let superFieldList = reactive([{type: '', value: '', text: '', dictCode: ''}]);
+
+//注册table数据
+const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
+  tableProps: {
+    title: "公共邮箱黑名单",
+    api: list,
+    columns: columns,
+    canResize: false,
+    useSearchForm: false,
+    actionColumn: {
+      width: 180,
+      fixed: "right"
     },
-    methods: {
-      initDictConfig(){
-      },
-      getSuperFieldList(){
-        let fieldList=[];
-        fieldList.push({type:'int',value:'status',text:'状态',dictCode:''})
-        fieldList.push({type:'string',value:'ip',text:'ip',dictCode:''})
-        fieldList.push({type:'int',value:'blackOrWhite',text:'黑白名单',dictCode:''})
-        this.superFieldList = fieldList
-      },
-      wasteNumVisible(ip){
-        this.$nextTick(() => {
-          this.$refs.XpRecycleBinModal.init(ip);
-        })
-      },
-      getTableAndNum(){
-        // 设置默认站点
-        let siteId = this.queryParam.siteId;
-        let siteList = this.siteList;
-        for (let site of siteList) {
-          if (site.id === siteId) {
-            localStorage.setItem("siteCode", site.code);
-          }
-        }
-
-
-        this.loadData(arg)
-      },
+    striped: true,
+    bordered: false,
+    beforeFetch: (params) => {
+      return Object.assign(params, queryParam);
     }
+  },
+  exportConfig: {
+    name: "询盘列表",
+    url: getExportUrl,
+    params: queryParam
+  },
+  importConfig: {
+    url: getImportUrl,
+    success: handleSuccess
   }
+});
+
+const [registerTable, {
+  reload,
+  clearSelectedRowKeys,
+  updateTableDataRecord,
+  findTableDataRecord,
+  getDataSource
+}, { rowSelection, selectedRowKeys }] = tableContext;
+
+const {
+  handleEdit,
+  getTableAction,
+  batchHandleDelete,
+  handleDetail,
+  getDropDownAction,
+  handleDelete,
+  handleAdd,
+  searchQuery,
+  searchReset
+} = useCommonList({tableContext, modalFormRef, formRef, batchDelete, deleteOne});
+
+onMounted(() => {
+  getSuperFieldList();
+});
+
+function getSuperFieldList() {
+  superFieldList.push({type: 'int', value: 'status', text: '状态', dictCode: ''})
+  superFieldList.push({type: 'string', value: 'ip', text: 'ip', dictCode: ''})
+  superFieldList.push({type: 'int', value: 'blackOrWhite', text: '黑白名单', dictCode: ''})
+}
+
+async function wasteNumVisible(ip) {
+  await nextTick();
+  XpRecycleBinModalRef.value.init(ip);
+}
+
+function getTableAndNum() {
+  // 设置默认站点
+  let siteId = queryParam.siteId;
+  let siteList = siteList;
+  for (let site of siteList) {
+    if (site.id === siteId) {
+      localStorage.setItem("siteCode", site.code);
+    }
+  }
+  reload()
+}
+
+/**
+ * 成功回调
+ */
+function handleSuccess() {
+  (selectedRowKeys.value = []) && reload();
+}
+
+
 </script>
-<style scoped>
-  @import '~@assets/less/common.less';
-</style>

+ 156 - 146
src/views/adweb/enquiryPublicRules/publicBlackip/modules/AdwebBlackIpForm.vue

@@ -1,43 +1,49 @@
 <template>
   <a-spin :spinning="confirmLoading">
     <j-form-container :disabled="formDisabled">
-      <a-form :form="form" slot="detail">
-        <a-row>
-          <a-col :span="24">
-            <a-form-item label="ip" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="['ip',formRules.ip]" placeholder="请输入ip"  ></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-item label="黑白名单" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-select v-decorator="['blackOrWhite',formRules.blackOrWhite]" placeholder="请选择黑白名单">
-                <a-select-option :value="0">黑名单</a-select-option>
-                <a-select-option :value="1">白名单</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
-            <a-button @click="submitForm">提 交</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
+      <template #detail>
+        <a-form ref="formRef">
+          <a-row>
+            <a-col :span="24">
+              <a-form-item label="ip" :labelCol="labelCol" :wrapperCol="wrapperCol" :rules="[formRules.ip]">
+                <a-input  v-model:value="modelRef.ip" placeholder="请输入ip"  ></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="黑白名单" :labelCol="labelCol" :wrapperCol="wrapperCol" :rules="[formRules.blackOrWhite]">
+                <a-select placeholder="请选择黑白名单" v-model:value="modelRef.blackOrWhite">
+                  <a-select-option :value="0">黑名单</a-select-option>
+                  <a-select-option :value="1">白名单</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
+              <a-button @click="submitForm">提 交</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </template>
     </j-form-container>
   </a-spin>
 </template>
 
-<script>
+<script lang="ts" setup name="AdwebBlackIpForm">
 
-  import { httpAction, getAction } from '@/api/manage'
+  import { httpAction, getAction } from '/@/api/manage/manage'
   import pick from 'lodash.pick'
-  import { validateDuplicateValue } from '@/utils/util'
-  import JFormContainer from '@/components/jeecg/JFormContainer'
-
-  export default {
-    name: 'AdwebBlackIpForm',
-    components: {
-      JFormContainer,
-    },
-    props: {
+  import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
+  import {useMessage} from "@/hooks/web/useMessage";
+  import {Form} from "ant-design-vue";
+  import {computed, onBeforeMount, reactive, ref, toRaw} from "vue";
+
+  const emit = defineEmits(["ok", "close"])
+
+  const { createMessage } = useMessage();
+
+  const useForm = Form.useForm;
+
+  const props = defineProps(
+    {
       //流程表单data
       formData: {
         type: Object,
@@ -56,124 +62,128 @@
         default: false,
         required: false
       }
-    },
-    data () {
-      return {
-        form: this.$form.createForm(this),
-        model: {},
-        labelCol: {
-          xs: { span: 24 },
-          sm: { span: 5 },
-        },
-        wrapperCol: {
-          xs: { span: 24 },
-          sm: { span: 16 },
-        },
-        confirmLoading: false,
-        validatorRules: {
-        },
-        formRules: {
-          ip: {
-            rules: [
-              { required: true, message: '请输入ip'},
-              { max: 31, message: '关键词长度不能超过31'},
-            ],
-            trigger: 'blur'
-          },
-          blackOrWhite: {
-            initialValue: 0,
-            rules: [
-              { required: true, message: '请选择黑白名单'},
-            ],
-          },
-        },
-        url: {
-          add: "/blackip/adwebBlackIp/add",
-          edit: "/blackip/adwebBlackIp/edit",
-          queryById: "/blackip/adwebBlackIp/queryById"
-        }
+    }
+  );
+
+  let modelRef = reactive({id: '', ip: '', blackOrWhite: null });
+
+  const labelCol = reactive({
+    xs: { span: 24 },
+    sm: { span: 5 },
+  });
+
+  const wrapperCol = reactive({
+    xs: { span: 24 },
+    sm: { span: 16 },
+  });
+
+  const confirmLoading = ref(false);
+
+  const url = reactive( {
+    add: "/blackip/adwebBlackIp/add",
+    edit: "/blackip/adwebBlackIp/edit",
+    queryById: "/blackip/adwebBlackIp/queryById"
+  });
+
+  const formRules = reactive({
+    ip: [
+      { required: true, message: '请输入ip'},
+      { max: 31, message: '关键词长度不能超过31'}],
+    blackOrWhite: [
+      { required: true, message: '请输入黑白名单', trigger: 'blur' }
+    ],
+  });
+
+  const { validate } = useForm(modelRef, formRules);
+
+  // 定义一个计算属性
+  const formDisabled = computed(() => {
+    if (props.formBpm === true) {
+      return props.formData.disabled !== false;
+    }
+    return props.disabled;
+  });
+
+  const showFlowSubmitButton = computed(() => {
+    if (props.formBpm === true) {
+      if (props.formData.disabled === false) {
+        return true;
       }
-    },
-    computed: {
-      formDisabled(){
-        if(this.formBpm===true){
-          if(this.formData.disabled===false){
-            return false
-          }
-          return true
-        }
-        return this.disabled
-      },
-      showFlowSubmitButton(){
-        if(this.formBpm===true){
-          if(this.formData.disabled===false){
-            return true
-          }
+    }
+    return false;
+  });
+
+  onBeforeMount(() => {
+    showFlowData();
+  });
+
+  function add() {
+    edit({});
+  }
+
+  async function edit(record) {
+    if (Object.keys(record).length === 0) {
+      modelRef.id = '';
+      modelRef.ip = '';
+      modelRef.blackOrWhite = null;
+    } else {
+      Object.assign(modelRef, pick(record, 'id', 'ip', 'blackOrWhite'));
+    }
+  }
+
+  function showFlowData() {
+    if (props.formBpm === true) {
+      let params = { id: props.formData.dataId };
+      getAction(url.queryById, params).then((res) => {
+        if (res.code === 200) {
+          edit(res.result);
         }
-        return false
-      }
-    },
-    created () {
-      //如果是流程中表单,则需要加载流程表单data
-      this.showFlowData();
-    },
-    methods: {
-      add () {
-        this.edit({});
-      },
-      edit (record) {
-        this.form.resetFields();
-        this.model = Object.assign({}, record);
-        this.visible = true;
-        this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model,'ip','blackOrWhite'))
-        })
-      },
-      //渲染流程表单数据
-      showFlowData(){
-        if(this.formBpm === true){
-          let params = {id:this.formData.dataId};
-          getAction(this.url.queryById,params).then((res)=>{
-            if(res.success){
-              this.edit (res.result);
-            }
-          });
+      });
+    }
+  }
+
+  const onSubmit = () => {
+    validate()
+      .then(() => {
+        confirmLoading.value = true;
+
+        let httpUrl = '';
+        let method = '';
+
+        if(!modelRef.id){
+          httpUrl = url.add;
+          method = 'post';
+        }else{
+          httpUrl = url.edit;
+          method = 'put';
         }
-      },
-      submitForm () {
-        const that = this;
-        // 触发表单验证
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            that.confirmLoading = true;
-            let httpurl = '';
-            let method = '';
-            if(!this.model.id){
-              httpurl+=this.url.add;
-              method = 'post';
-            }else{
-              httpurl+=this.url.edit;
-               method = 'put';
-            }
-            let formData = Object.assign(this.model, values);
-            console.log("表单提交数据",formData)
-            httpAction(httpurl,formData,method).then((res)=>{
-              if(res.success){
-                that.$message.success(res.message);
-                that.$emit('ok');
-              }else{
-                that.$message.warning(res.message);
-              }
-            }).finally(() => {
-              that.confirmLoading = false;
-            })
-          }
 
+        let formData = toRaw(modelRef);
+        console.log("表单提交数据",formData)
+
+        httpAction(httpUrl, formData, method).then((res)=>{
+          if(res.success){
+            createMessage.success(res.message);
+            emit('ok');
+          }else{
+            createMessage.warning(res.message);
+          }
+        }).finally(() => {
+          confirmLoading.value = false;
         })
-      },
-      popupCallback(row){
-        this.form.setFieldsValue(pick(row,'ip','blackOrWhite'))
-      },
-    }
+      })
+      .catch((err) => {
+        console.log('error', err);
+      });
+  };
+
+  function submitForm() {
+    onSubmit();
   }
-</script>
+
+  defineExpose({
+    submitForm,
+    add,
+    edit,
+  });
+</script>

+ 53 - 47
src/views/adweb/enquiryPublicRules/publicBlackip/modules/AdwebBlackIpModal.vue

@@ -5,56 +5,62 @@
     :visible="visible"
     switchFullscreen
     @ok="handleOk"
-    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleCancel"
     cancelText="关闭">
-    <adweb-black-ip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></adweb-black-ip-form>
+    <adweb-black-ip-form ref="realFormRef" @ok="submitCallback" :disabled="disableSubmit"></adweb-black-ip-form>
   </j-modal>
 </template>
 
-<script>
-
-  import AdwebBlackIpForm from './AdwebBlackIpForm'
-  export default {
-    name: 'AdwebBlackIpModal',
-    components: {
-      AdwebBlackIpForm
-    },
-    data () {
-      return {
-        title:'',
-        width:800,
-        visible: false,
-        disableSubmit: false
-      }
-    },
-    methods: {
-      add () {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add();
-        })
-      },
-      edit (record) {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
-        })
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      handleOk () {
-        this.$refs.realForm.submitForm();
-      },
-      submitCallback(){
-        this.$emit('ok');
-        this.visible = false;
-      },
-      handleCancel () {
-        this.close()
-      }
-    }
+<script lang="ts" setup name='AdwebBlackIpModal'>
+
+  import AdwebBlackIpForm from './AdwebBlackIpForm.vue'
+  import JModal from "@/components/Modal/src/JModal/JModal.vue";
+  import {nextTick, ref} from "vue";
+
+  const title = ref('');
+  const width = ref(800);
+  const visible = ref(false);
+  const disableSubmit = ref(false);
+  const realFormRef = ref();
+  const emit = defineEmits(['ok', 'close']);
+
+  async function add () {
+    visible.value=true
+    await nextTick();
+
+    realFormRef.value.add();
+  }
+
+  async function edit (record) {
+    visible.value=true
+    await nextTick();
+
+    realFormRef.value.edit(record)
+  }
+
+  function close () {
+    emit('close');
+    visible.value = false;
   }
-</script>
+
+  function handleOk () {
+    realFormRef.value.submitForm();
+  }
+
+  function  submitCallback() {
+    emit('ok');
+    visible.value = false;
+  }
+
+  function handleCancel () {
+    close()
+  }
+
+  defineExpose({
+    title,
+    disableSubmit,
+    add,
+    edit
+  });
+
+</script>

+ 0 - 83
src/views/adweb/enquiryPublicRules/publicBlackip/modules/AdwebBlackIpModal__Style.vue

@@ -1,83 +0,0 @@
-<template>
-  <a-drawer
-    :title="title"
-    :width="width"
-    placement="right"
-    :closable="false"
-    @close="close"
-    :visible="visible">
-    <adweb-black-ip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></adweb-black-ip-form>
-    <div class="drawer-footer">
-      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
-      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
-    </div>
-  </a-drawer>
-</template>
-
-<script>
-
-  import AdwebBlackIpForm from './AdwebBlackIpForm'
-
-  export default {
-    name: 'AdwebBlackIpModal',
-    components: {
-      AdwebBlackIpForm
-    },
-    data () {
-      return {
-        title:"操作",
-        width:800,
-        visible: false,
-        disableSubmit: false
-      }
-    },
-    methods: {
-      add () {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add();
-        })
-      },
-      edit (record) {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
-        });
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      submitCallback(){
-        this.$emit('ok');
-        this.visible = false;
-      },
-      handleOk () {
-        this.$refs.realForm.submitForm();
-      },
-      handleCancel () {
-        this.close()
-      }
-    }
-  }
-</script>
-
-<style lang="less" scoped>
-/** Button按钮间距 */
-  .ant-btn {
-    margin-left: 30px;
-    margin-bottom: 30px;
-    float: right;
-  }
-  .drawer-footer{
-    position: absolute;
-    bottom: -8px;
-    width: 100%;
-    border-top: 1px solid #e8e8e8;
-    padding: 10px 16px;
-    text-align: right;
-    left: 0;
-    background: #fff;
-    border-radius: 0 0 2px 2px;
-  }
-</style>

+ 10 - 11
src/views/adweb/enquiryPublicRules/publicBlackip/modules/XpRecycleBinModal.vue

@@ -9,15 +9,15 @@
     :okButtonProps="{style:{display:'none'}}">
 
 
-    <a-form-model layout="inline" @keyup.enter.native="searchQuery" style="margin-bottom:15px">
-      <a-form-model-item>
+    <a-form layout="inline" @keyup.enter.native="searchQuery" style="margin-bottom:15px">
+      <a-form-item>
         <a-input placeholder="邮箱/姓名" v-model="queryParam.searchText"></a-input>
-      </a-form-model-item>
-      <a-form-model-item>
+      </a-form-item>
+      <a-form-item>
         <a-button type="primary" @click="searchQuery">查询</a-button>
         <a-button  @click="searchReset" style="margin-left:8px">重置</a-button>
-      </a-form-model-item>
-    </a-form-model>
+      </a-form-item>
+    </a-form>
 
     <a-table
       ref="table"
@@ -50,13 +50,12 @@
 </template>
 
 <script>
-import { putAction, deleteAction, postAction, getAction } from '@/api/manage'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import enquiryDetail from '@views/adweb/enquiry/modules/enquiryDetail'
+  import { putAction, deleteAction, postAction, getAction } from '/@/api/manage/manage'
+  import enquiryDetail from '/@/views/adweb/enquiry/modules/enquiryDetail.vue'
 
   export default {
     name: 'XpRecycleBinModal',
-    mixins: [JeecgListMixin],
+
     components:{enquiryDetail},
     data() {
       return {
@@ -136,4 +135,4 @@ import { putAction, deleteAction, postAction, getAction } from '@/api/manage'
   }
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped></style>

+ 70 - 0
src/views/adweb/enquiryPublicRules/publicBlackip/publicBlackIP.api.ts

@@ -0,0 +1,70 @@
+import { defHttp } from '/@/utils/http/axios';
+import { useMessage } from "/@/hooks/web/useMessage";
+
+const { createConfirm } = useMessage();
+
+enum Api {
+  list = '/blackip/adwebBlackIp/list',
+  deleteOne = '/blackip/adwebBlackIp/delete',
+  deleteBatch = '/blackip/adwebBlackIp/deleteBatch',
+  importExcel = '/blackip/adwebBlackIp/importExcel',
+  exportXls = '/blackip/adwebBlackIp/exportXls ',
+}
+
+/**
+ * 导出api
+ * @param params
+ */
+export const getExportUrl = Api.exportXls;
+
+/**
+ * 导入api
+ */
+export const getImportUrl = Api.importExcel;
+
+/**
+ * 列表接口
+ * @param params
+ */
+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(() => {
+    handleSuccess();
+  });
+}
+
+/**
+ * 批量删除
+ * @param params
+ * @param handleSuccess
+ */
+export const batchDelete = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认删除',
+    content: '是否删除选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}
+
+/**
+ * 保存或者更新
+ * @param params
+ * @param isUpdate
+ */
+export const saveOrUpdate = (params, isUpdate) => {
+  let url = isUpdate ? Api.edit : Api.save;
+  return defHttp.post({ url: url, params }, { isTransformResponse: false });
+}

+ 36 - 0
src/views/adweb/enquiryPublicRules/publicBlackip/publicBlackIP.data.ts

@@ -0,0 +1,36 @@
+import {BasicColumn} from "@/components/Table";
+
+export const columns: BasicColumn[] = [
+  {
+    title: '序号',
+    dataIndex: '',
+    key: 'rowIndex',
+    width: 60,
+    align: "center",
+    customRender: function ({text, record, index, column}) {
+
+      return parseInt(index) + 1;
+    }
+  },
+  {
+    title: 'ip',
+    align: "center",
+    dataIndex: 'ip'
+  },
+  {
+    title: '黑白名单',
+    align: "center",
+    dataIndex: 'blackOrWhite',
+  },
+  {
+    title: '询盘数量',
+    align: "center",
+    dataIndex: 'wasteEnquiryNum',
+  },
+  {
+    title: '创建时间',
+    align: "center",
+    dataIndex: 'createTime',
+    sorter: true
+  }
+];

+ 188 - 182
src/views/adweb/enquirySiteRules/siteBlackIp/AdwebSiteBlackIpList.vue

@@ -2,14 +2,10 @@
   <a-card :bordered="false">
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
+      <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam">
         <a-row :gutter="24">
           <a-col :xl="6" :sm="12">
-            <a-form-item label="站点">
-              <a-select placeholder="请选择站点" v-model="queryParam.siteId" showSearch :filterOption="filterOption" allowClear>
-                <a-select-option v-for="option in siteOptions" :key="option.id" :value="option.id">{{option.name}}</a-select-option>
-              </a-select>
-            </a-form-item>
+            <select-site ref="selectSiteRef" @com-methods="changeSite" @set-site-info="getSiteList"/>
           </a-col>
           <a-col :md="6" :sm="12">
             <a-form-item label="IP">
@@ -35,200 +31,210 @@
     </div>
     <!-- 查询区域-END -->
 
-    <!-- 操作按钮区域 -->
-    <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
-      </a-dropdown>
-    </div>
-
     <!-- table区域-begin -->
-    <div>
+    <div class="table">
       <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
+        style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="clearSelectedRowKeys">清空</a>
       </div>
 
-      <a-table
-        ref="table"
-        size="middle"
-        :scroll="{x:true}"
-
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        class="j-table-force-nowrap"
-        @change="handleTableChange">
-
-        <span slot="wasteEnquiryNum" slot-scope="text, record">
-            <span v-if="text === '' || text === null || text === 0">0</span>
-            <a v-else  @click='wasteNumVisible(record.ip,record.siteId)'>{{ text }}</a>
-        </span>
-
-        <span slot="blackOrWhite" slot-scope="text, record">
-          <a-tag v-if="record.blackOrWhite === 0" color="red">黑名单</a-tag>
-          <a-tag v-else>白名单</a-tag>
-        </span>
-
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
-
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a @click="handleDetail(record)">详情</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
+      <!--引用表格-->
+      <BasicTable @register="registerTable" :rowSelection="rowSelection">
+        <!--插槽:table标题-->
+        <template #tableTitle>
+          <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增
+          </a-button>
+          <a-dropdown v-if="selectedRowKeys.length > 0">
+            <template #overlay>
+              <a-menu>
+                <a-menu-item key="1" @click="batchHandleDelete">
+                  <Icon icon="ant-design:delete-outlined"></Icon>
+                  删除
+                </a-menu-item>
+              </a-menu>
+            </template>
+            <a-button>批量操作
+              <Icon icon="mdi:chevron-down" />
+            </a-button>
           </a-dropdown>
-        </span>
+        </template>
+
+
+        <!--操作栏-->
+        <template #action="{ record }">
+          <TableAction :actions="getTableAction(record)"
+                       :dropDownActions="getDropDownAction(record)" />
+        </template>
+
+        <template #bodyCell="{ column, record, index, text }">
+
+          <template v-if="column.dataIndex === 'blackOrWhite'">
+          <span>
+            <a-tag v-if="record.blackOrWhite === 0" color="red">黑名单</a-tag>
+            <a-tag v-else>白名单</a-tag>
+          </span>
+          </template>
+
+          <template v-if="column.dataIndex === 'wasteEnquiryNum'">
+          <span>
+            <span v-if="text === '' || text === null || text === 0">0</span>
+            <a v-else @click="wasteNumVisible(record.email)">{{ text }}</a>
+          </span>
+          </template>
+
+          <template v-if="column.dataIndex === 'action'">
+          <span>
+            <a @click="handleEdit(record)">编辑</a>
+
+            <a-divider type="vertical" />
+            <a-dropdown>
+              <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+              <a-menu slot="overlay">
+                <a-menu-item>
+                  <a @click="handleDetail(record)">详情</a>
+                </a-menu-item>
+                <a-menu-item>
+                  <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                    <a>删除</a>
+                  </a-popconfirm>
+                </a-menu-item>
+              </a-menu>
+            </a-dropdown>
+          </span>
+          </template>
+        </template>
+      </BasicTable>
 
-      </a-table>
     </div>
 
-    <adweb-site-black-ip-modal ref="modalForm" @ok="modalFormOk"></adweb-site-black-ip-modal>
-    <xp-recycle-bin-modal ref="XpRecycleBinModal" @ok="getTableAndNum"/>
+    <adweb-site-black-ip-modal ref="modalFormRef" @ok="modalFormOk"></adweb-site-black-ip-modal>
+    <xp-recycle-bin-modal ref="XpRecycleBinModalRef" @ok="getTableAndNum"/>
   </a-card>
 </template>
 
-<script>
+<script lang="ts" setup name="AdwebSiteBlackIpList">
+  import '/@/assets/less/common.less';
+  import '/@/assets/less/TableExpand.less'
 
-  import '@/assets/less/TableExpand.less'
-  import { mixinDevice } from '@/utils/mixin'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import AdwebSiteBlackIpModal from './modules/AdwebSiteBlackIpModal__Style.vue'
-  import JSuperQuery from '@/components/jeecg/JSuperQuery.vue'
-  import { httpAction, getAction } from '@/api/manage'
-  import XpRecycleBinModal from './modules/XpRecycleBinModal'
-  export default {
-    name: 'AdwebSiteBlackIpList',
-    mixins:[JeecgListMixin, mixinDevice],
-    components: {
-      AdwebSiteBlackIpModal,
-      JSuperQuery,
-      XpRecycleBinModal,
-    },
-    data () {
-      return {
-        description: 'adweb_site_black_ip管理页面',
-        // 表头
-        columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-          },
-          {
-            title:'站点名称',
-            align:"center",
-            dataIndex: 'siteName'
-          },
-          {
-            title:'ip',
-            align:"center",
-            dataIndex: 'ip'
-          },
-          {
-            title:'询盘数量',
-            align:"center",
-            dataIndex: 'wasteEnquiryNum',
-            scopedSlots: {customRender: 'wasteEnquiryNum'}
-          },
-          {
-            title:'黑白名单',
-            align:"center",
-            dataIndex: 'blackOrWhite',
-            scopedSlots: { customRender: 'blackOrWhite' }
-          },
-          {
-            title:'创建日期',
-            align:"center",
-            dataIndex: 'createTime',
-            customRender:function (text) {
-              return !text?"":(text.length>10?text.substr(0,10):text)
-            }
-          },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align:"center",
-            fixed:"right",
-            width:147,
-            scopedSlots: { customRender: 'action' }
-          }
-        ],
-        url: {
-          list: "/adweb/adwebSiteBlackIp/list",
-          delete: "/adweb/adwebSiteBlackIp/delete",
-          deleteBatch: "/adweb/adwebSiteBlackIp/deleteBatch",
-          exportXlsUrl: "/adweb/adwebSiteBlackIp/exportXls",
-          importExcelUrl: "adweb/adwebSiteBlackIp/importExcel",
-
-        },
-        dictOptions:{},
-        superFieldList:[],
-        siteOptions:[]
+  import { getAction } from '/@/api/manage/manage'
+  import XpRecycleBinModal from './modules/XpRecycleBinModal.vue'
+
+
+  import {batchDelete, deleteOne, getExportUrl, getImportUrl, list} from "./siteBlackIP.api";
+  import {columns} from "./siteBlackIP.data";
+  import {BasicTable, TableAction} from "@/components/Table";
+  import {useListPage} from "@/hooks/system/useListPage";
+
+  import {onMounted, reactive, ref} from "vue";
+  import {useCommonList} from "@/hooks/component/JeecgList";
+  import SelectSite from "@/components/Adweb/selectSite.vue";
+
+  const description = ref('adweb_site_black_ip管理页面');
+  const dictOptions = reactive({});
+  const superFieldList = reactive([]);
+  let queryParam = reactive<any>({});
+
+  const formRef = ref();
+  const XpRecycleBinModalRef = ref();
+  const modalFormRef = ref();
+  const siteOptions = reactive({});
+
+
+  //注册table数据
+  const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
+    tableProps: {
+      title: "公共邮箱黑名单",
+      api: list,
+      columns: columns,
+      canResize: false,
+      useSearchForm: false,
+      actionColumn: {
+        width: 180,
+        fixed: "right"
+      },
+      striped: true,
+      bordered: false,
+      beforeFetch: (params) => {
+        return Object.assign(params, queryParam);
       }
     },
-    created() {
-       this.getSiteList();
+    exportConfig: {
+      name: "询盘列表",
+      url: getExportUrl,
+      params: queryParam
     },
+    importConfig: {
+      url: getImportUrl,
+      success: handleSuccess
+    }
+  });
 
-    methods: {
-      //获取站点列表
-      getSiteList() {
-        let that = this
-        getAction('/sys/api/getSiteListByUid').then(function (res) {
-          if (res.code == 0) {
-            that.siteOptions = res.data;
-          } else {
-            that.$message.error('获取站点失败!')
-          }
-        }).catch(function (err) {
-          console.log(err)
-        })
-      },
+  const [registerTable, {
+    reload,
+    clearSelectedRowKeys,
+    updateTableDataRecord,
+    findTableDataRecord,
+    getDataSource
+  }, { rowSelection, selectedRowKeys }] = tableContext;
 
-      filterOption(input, option) {
-        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      },
-      wasteNumVisible(ip,siteId){
-        this.$nextTick(() => {
-          this.$refs.XpRecycleBinModal.init(ip,siteId);
-        })
-      },
-      getTableAndNum(){
-        // 设置默认站点
-        let siteId = this.queryParam.siteId;
-        let siteList = this.siteList;
-        for (let site of siteList) {
-          if (site.id === siteId) {
-            localStorage.setItem("siteCode", site.code);
-          }
-        }
-        this.loadData(arg)
-      },
+  const {
+    handleEdit,
+    getTableAction,
+    batchHandleDelete,
+    handleDetail,
+    getDropDownAction,
+    handleDelete,
+    handleAdd,
+    searchQuery,
+    searchReset
+  } = useCommonList({tableContext, modalFormRef, formRef, batchDelete, deleteOne});
+
+  onMounted(() => {
+    getSiteList();
+  });
+
+  //获取站点列表
+  function getSiteList() {
+    let that = this
+    getAction('/sys/api/getSiteListByUid').then(function (res) {
+      if (res.code == 0) {
+        that.siteOptions = res.data;
+      } else {
+        that.$message.error('获取站点失败!')
+      }
+    }).catch(function (err) {
+      console.log(err)
+    })
+  }
+
+  function filterOption(input, option) {
+    return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+  }
+
+  function wasteNumVisible(ip,siteId){
+    this.$nextTick(() => {
+      this.$refs.XpRecycleBinModal.init(ip,siteId);
+    })
+  }
+
+  function getTableAndNum(){
+    // 设置默认站点
+    let siteId = this.queryParam.siteId;
+    let siteList = this.siteList;
+    for (let site of siteList) {
+      if (site.id === siteId) {
+        localStorage.setItem("siteCode", site.code);
+      }
     }
+    this.loadData(arg)
+  }
+
+  /**
+   * 成功回调
+   */
+  function handleSuccess() {
+    (selectedRowKeys.value = []) && reload();
   }
 </script>
-<style scoped>
-  @import '~@assets/less/common.less';
-</style>

+ 6 - 6
src/views/adweb/enquirySiteRules/siteBlackIp/modules/AdwebSiteBlackIpForm.vue

@@ -34,17 +34,17 @@
 
 <script>
 
-  import { httpAction, getAction } from '@/api/manage'
+  import { httpAction, getAction } from '/@/api/manage/manage'
   import pick from 'lodash.pick'
-  import { validateDuplicateValue } from '@/utils/util'
-  import JFormContainer from '@/components/jeecg/JFormContainer'
-  import JDate from '@/components/jeecg/JDate'
+
+  import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
+
 
   export default {
     name: 'AdwebSiteBlackIpForm',
     components: {
       JFormContainer,
-      JDate,
+
     },
     props: {
       //流程表单data
@@ -211,4 +211,4 @@
       },
     }
   }
-</script>
+</script>

+ 1 - 1
src/views/adweb/enquirySiteRules/siteBlackIp/modules/AdwebSiteBlackIpModal__Style.vue

@@ -18,7 +18,7 @@
 
 <script>
 
-  import AdwebSiteBlackIpForm from './AdwebSiteBlackIpForm'
+  import AdwebSiteBlackIpForm from './AdwebSiteBlackIpForm.vue'
 
   export default {
     name: 'AdwebSiteBlackIpModal',

+ 5 - 5
src/views/adweb/enquirySiteRules/siteBlackIp/modules/XpRecycleBinModal.vue

@@ -50,13 +50,13 @@
 </template>
 
 <script>
-import { putAction, deleteAction, postAction, getAction } from '@/api/manage'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import enquiryDetail from '@views/adweb/enquiry/modules/enquiryDetail'
+import { putAction, deleteAction, postAction, getAction } from '/@/api/manage/manage'
+
+  import enquiryDetail from '/@/views/adweb/enquiry/modules/enquiryDetail.vue'
 
   export default {
     name: 'XpRecycleBinModal',
-    mixins: [JeecgListMixin],
+    mixins: [],
     components:{enquiryDetail},
     data() {
       return {
@@ -139,4 +139,4 @@ import { putAction, deleteAction, postAction, getAction } from '@/api/manage'
   }
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped></style>

+ 70 - 0
src/views/adweb/enquirySiteRules/siteBlackIp/siteBlackIP.api.ts

@@ -0,0 +1,70 @@
+import { defHttp } from '/@/utils/http/axios';
+import { useMessage } from "/@/hooks/web/useMessage";
+
+const { createConfirm } = useMessage();
+
+enum Api {
+  list = '/adweb/adwebSiteBlackIp/list',
+  deleteOne = '/adweb/adwebSiteBlackIp/delete',
+  deleteBatch = '/adweb/adwebSiteBlackIp/deleteBatch',
+  importExcel = '/adweb/adwebSiteBlackIp/importExcel',
+  exportXls = '/adweb/adwebSiteBlackIp/exportXls ',
+}
+
+/**
+ * 导出api
+ * @param params
+ */
+export const getExportUrl = Api.exportXls;
+
+/**
+ * 导入api
+ */
+export const getImportUrl = Api.importExcel;
+
+/**
+ * 列表接口
+ * @param params
+ */
+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(() => {
+    handleSuccess();
+  });
+}
+
+/**
+ * 批量删除
+ * @param params
+ * @param handleSuccess
+ */
+export const batchDelete = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认删除',
+    content: '是否删除选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}
+
+/**
+ * 保存或者更新
+ * @param params
+ * @param isUpdate
+ */
+export const saveOrUpdate = (params, isUpdate) => {
+  let url = isUpdate ? Api.edit : Api.save;
+  return defHttp.post({ url: url, params }, { isTransformResponse: false });
+}

+ 42 - 0
src/views/adweb/enquirySiteRules/siteBlackIp/siteBlackIP.data.ts

@@ -0,0 +1,42 @@
+import {BasicColumn} from "@/components/Table";
+
+export const columns: BasicColumn[] = [
+  {
+    title: '序号',
+    dataIndex: '',
+    key: 'rowIndex',
+    width: 60,
+    align: "center",
+    customRender: function ({text, record, index, column}) {
+      return parseInt(index) + 1;
+    }
+  },
+  {
+    title: '站点名称',
+    align: "center",
+    dataIndex: 'siteName'
+  },
+  {
+    title: 'ip',
+    align: "center",
+    dataIndex: 'ip'
+  },
+  {
+    title: '询盘数量',
+    align: "center",
+    dataIndex: 'wasteEnquiryNum',
+  },
+  {
+    title: '黑白名单',
+    align: "center",
+    dataIndex: 'blackOrWhite',
+  },
+  {
+    title: '创建日期',
+    align: "center",
+    dataIndex: 'createTime',
+    customRender: function ({text, record, index, column}) {
+      return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
+    }
+  }
+];

+ 1 - 1
src/views/adweb/seo/SeoKeywordsRankList.vue

@@ -294,7 +294,7 @@
 
 <script>
 import { getAction, downFile} from '@/api/manage/manage'
-import selectSite from '@/components/adweb/selectSite.vue';
+import selectSite from '@/components/Adweb/selectSite.vue';
 import { filterObj } from '/@/utils/common/compUtils';
 export default {
   name: 'seoKeywordsRankList',

+ 1 - 1
src/views/adweb/seo/SeoKeywordsRankListCopy.vue

@@ -145,7 +145,7 @@ import {
 } from "./SeoKeywordsRank.api";
 import { downloadFile } from '/src/utils/common/renderUtils';
 import { useUserStore } from '/src/store/modules/user';
-import selectSite from "@/components/adweb/selectSite.vue";
+import selectSite from "@/components/Adweb/selectSite.vue";
 import { getAction } from "@/api/manage/manage";
 const queryParam = reactive<any>({});
 const checkedKeys = ref<Array<string | number>>([]);

+ 1 - 1
src/views/dashboard/Analysis/homePage/adweb3Home.vue

@@ -498,7 +498,7 @@ import dashChart from '../chart/DashChartDemo.vue'
 import areaChart from '../chart/areaChart.vue'
 import {getAction, getFileAccessHttpUrl, postAction} from '/@/api/manage/manage'
 import { useUserStore } from '/@/store/modules/user';
-import selectSite from '/@/components/adweb/selectSite.vue';
+import selectSite from '/@/components/Adweb/selectSite.vue';
 import '../../../../assets/less/home.less';
 import { useMessage } from '/@/hooks/web/useMessage';