Browse Source

修复role store,增加询盘通知时间

chenlei1231 4 months ago
parent
commit
7532115bdc

+ 1 - 0
src/enums/roleEnum.ts

@@ -1,6 +1,7 @@
 export enum RoleEnum {
   // super admin
   SUPER = 'super',
+  ADMIN = 'admin',
 
   // tester
   TEST = 'test',

+ 6 - 7
src/layouts/default/header/components/notify/index.vue

@@ -143,13 +143,12 @@
         }
 
         if (data.cmd === 'enquiry') {
-          setTimeout(() => {
-            notification.info({
-              message: `询盘通知`,
-              icon: () => h(SmileOutlined, { style: 'color: #108ee9' }),
-              description: `${data.msgTxt}`,
-            });
-          }, 1000);
+          notification.info({
+            message: `询盘通知`,
+            icon: () => h(SmileOutlined, { style: 'color: #108ee9' }),
+            description: `${data.msgTxt}`,
+            duration: 10,
+          });
         }
       }
 

+ 25 - 24
src/store/modules/user.ts

@@ -18,8 +18,8 @@ import { isArray } from '/@/utils/is';
 import { useGlobSetting } from '/@/hooks/setting';
 import { JDragConfigEnum } from '/@/enums/jeecgEnum';
 import { useSso } from '/@/hooks/web/useSso';
-import { isOAuth2AppEnv } from "/@/views/sys/login/useLogin";
-import { getUrlParam } from "@/utils";
+import { isOAuth2AppEnv } from '/@/views/sys/login/useLogin';
+import { getUrlParam } from '@/utils';
 interface dictType {
   [key: string]: any;
 }
@@ -60,8 +60,8 @@ export const useUserStore = defineStore({
   }),
   getters: {
     getUserInfo(): UserInfo {
-      if(this.userInfo == null){
-        this.userInfo = getAuthCache<UserInfo>(USER_INFO_KEY)!=null ? getAuthCache<UserInfo>(USER_INFO_KEY) : null;
+      if (this.userInfo == null) {
+        this.userInfo = getAuthCache<UserInfo>(USER_INFO_KEY) != null ? getAuthCache<UserInfo>(USER_INFO_KEY) : null;
       }
       return this.userInfo || getAuthCache<UserInfo>(USER_INFO_KEY) || {};
     },
@@ -197,7 +197,7 @@ export const useUserStore = defineStore({
         //   permissionStore.setDynamicAddedRoute(true);
         // }
         //update-end---author:scott ---date::2024-02-21  for:【QQYUN-8326】登录不需要构建路由,进入首页有构建---
-        
+
         await this.setLoginInfo({ ...data, isLogin: true });
         //update-begin-author:liusq date:2022-5-5 for:登录成功后缓存拖拽模块的接口前缀
         localStorage.setItem(JDragConfigEnum.DRAG_BASE_URL, useGlobSetting().domainUrl);
@@ -208,7 +208,7 @@ export const useUserStore = defineStore({
         // 判断是否有 redirect 重定向地址
         //update-begin---author:wangshuai ---date:20230424  for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
         if (redirect && goHome) {
-        //update-end---author:wangshuai ---date:20230424  for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
+          //update-end---author:wangshuai ---date:20230424  for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
           // update-begin--author:liaozhiyang---date:20240104---for:【QQYUN-7804】部署生产环境,登录跳转404问题
           let publicPath = import.meta.env.VITE_PUBLIC_PATH;
           if (publicPath && publicPath != '/') {
@@ -220,16 +220,16 @@ export const useUserStore = defineStore({
           }
           // update-end--author:liaozhiyang---date:20240509---for:【issues/1147】登录跳转时去掉发布路径的最后一个/以解决404问题
           // 当前页面打开
-          window.open(redirect, '_self')
+          window.open(redirect, '_self');
           return data;
         }
         // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
 
         //update-begin---author:wangshuai---date:2024-04-03---for:【issues/1102】设置单点登录后页面,进入首页提示404,也没有绘制侧边栏 #1102---
-        let ticket = getUrlParam('ticket');
-        if(ticket){
-          goHome && (window.location.replace((userInfo && userInfo.homePath) || PageEnum.BASE_HOME));
-        }else{
+        const ticket = getUrlParam('ticket');
+        if (ticket) {
+          goHome && window.location.replace((userInfo && userInfo.homePath) || PageEnum.BASE_HOME);
+        } else {
           goHome && (await router.replace((userInfo && userInfo.homePath) || PageEnum.BASE_HOME));
         }
         //update-end---author:wangshuai---date:2024-04-03---for:【issues/1102】设置单点登录后页面,进入首页提示404,也没有绘制侧边栏 #1102---
@@ -268,7 +268,8 @@ export const useUserStore = defineStore({
       if (userInfo) {
         const { roles = [] } = userInfo;
         if (isArray(roles)) {
-          const roleList = roles.map((item) => item.value) as RoleEnum[];
+          const roleList = roles.map((item) => item) as RoleEnum[];
+
           this.setRoleList(roleList);
         } else {
           userInfo.roles = [];
@@ -327,21 +328,21 @@ export const useUserStore = defineStore({
       }
       //update-begin---author:wangshuai ---date:20230224  for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
       //退出登录的时候需要用的应用id
-      if(isOAuth2AppEnv()){
-        let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
+      if (isOAuth2AppEnv()) {
+        const tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
         removeAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
-        goLogin && await router.push({ name:"Login",query:{ tenantId:tenantId }})
-      }else{
+        goLogin && (await router.push({ name: 'Login', query: { tenantId: tenantId } }));
+      } else {
         // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
-        goLogin && (await router.push({
-          path: PageEnum.BASE_LOGIN,
-          query: {
-            // 传入当前的路由,登录成功后跳转到当前路由
-            redirect: router.currentRoute.value.fullPath,
-          }
-        }));
+        goLogin &&
+          (await router.push({
+            path: PageEnum.BASE_LOGIN,
+            query: {
+              // 传入当前的路由,登录成功后跳转到当前路由
+              redirect: router.currentRoute.value.fullPath,
+            },
+          }));
         // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
-
       }
       //update-end---author:wangshuai ---date:20230224  for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
     },

+ 188 - 182
src/views/adweb/enquiry/AdwebEnquiry.data.ts

@@ -1,153 +1,151 @@
-import {BasicColumn} from '/@/components/Table';
-import {FormSchema} from '/@/components/Table';
-import { rules} from '/@/utils/helper/validator';
-import { render } from '/@/utils/common/renderUtils';
-import { getWeekMonthQuarterYear } from '/@/utils';
+import { BasicColumn } from '/@/components/Table';
 //列表数据
 export const columns: BasicColumn[] = [
-    {
-      title: '站点名称',
-      align: 'left',
-      dataIndex: 'siteName',
-    },
-    {
-      title: '姓名',
-      align: 'left',
-      dataIndex: 'contact',
-
-    },
-    {
-      title: '邮箱',
-      align: 'left',
-      dataIndex: 'fromEmail',
-
-    },
-    {
-      title: 'whatsApp',
-      align: 'left',
-      dataIndex: 'whatsApp',
-      customRender: function ({text, record}) {
-        if (text == null || text == '' || text == undefined) {
-          return '--'
-        } else {
-          return text
-        }
+  {
+    title: '站点名称',
+    align: 'left',
+    dataIndex: 'siteName',
+  },
+  {
+    title: '姓名',
+    align: 'left',
+    dataIndex: 'contact',
+  },
+  {
+    title: '邮箱',
+    align: 'left',
+    dataIndex: 'fromEmail',
+  },
+  {
+    title: 'whatsApp',
+    align: 'left',
+    dataIndex: 'whatsApp',
+    customRender: function ({ text }) {
+      if (text == null || text == '' || text == undefined) {
+        return '--';
+      } else {
+        return text;
       }
     },
+  },
 
-    {
-      title: '手机号',
-      align: 'left',
-      dataIndex: 'phone',
-      customRender: function ({text, record}) {
-        if (text == null || text == '' || text == undefined) {
-          return '--'
-        } else {
-          return text
-        }
+  {
+    title: '手机号',
+    align: 'left',
+    dataIndex: 'phone',
+    customRender: function ({ text }) {
+      if (text == null || text == '' || text == undefined) {
+        return '--';
+      } else {
+        return text;
       }
     },
+  },
 
-    {
-      title: '来源IP',
-      align: 'left',
-      dataIndex: 'fromIp',
+  {
+    title: '来源IP',
+    align: 'left',
+    dataIndex: 'fromIp',
 
-      customRender: function ({text, record}) {
-        if (text == null || text == '' || text == undefined) {
-          return '--'
-        } else {
-          return text
-        }
+    customRender: function ({ text, record }) {
+      if (text == null || text == '' || text == undefined) {
+        return '--';
+      } else {
+        return text;
       }
     },
+  },
 
-    {
-      title: '状态',
-      align: 'left',
-      dataIndex: 'readStatus'
-    },
-    {
-      title: '询盘详情',
-      align: 'left',
+  {
+    title: '状态',
+    align: 'left',
+    dataIndex: 'readStatus',
+  },
+  {
+    title: '询盘详情',
+    align: 'left',
 
-      dataIndex: 'details'
-    },
-    // {
-    //   title: '跟进人',
-    //   align: "center",
-    //   dataIndex: 'principalUid',
-    // },
-    {
-      title: '来源页面',
-      align: 'left',
+    dataIndex: 'details',
+  },
+  // {
+  //   title: '跟进人',
+  //   align: "center",
+  //   dataIndex: 'principalUid',
+  // },
+  {
+    title: '来源页面',
+    align: 'left',
 
-      dataIndex: 'fromPage',
-    },
-    {
-      title: '分类',
-      align: 'left',
-      dataIndex: 'userEffective',
-    },
-    {
-      title: '来源国家',
-      align: 'left',
-      dataIndex: 'countryName',
-      customRender: function ({text, record}) {
-        if (text == null || text == '' || text == undefined) {
-          return '--'
-        } else {
-          return text
-        }
+    dataIndex: 'fromPage',
+  },
+  {
+    title: '分类',
+    align: 'left',
+    dataIndex: 'userEffective',
+  },
+  {
+    title: '来源国家',
+    align: 'left',
+    dataIndex: 'countryName',
+    customRender: function ({ text, record }) {
+      if (text == null || text == '' || text == undefined) {
+        return '--';
+      } else {
+        return text;
       }
     },
-    {
-      title: '来源插件',
-      align: 'left',
-      dataIndex: 'pluginName',
+  },
+  {
+    title: '来源插件',
+    align: 'left',
+    dataIndex: 'pluginName',
+  },
+  {
+    title: '询盘时间',
+    align: 'left',
+    dataIndex: 'recordCtime',
+    customRender: function ({ text }) {
+      return !text ? '' : text.length > 16 ? text.substr(0, 16) : text;
     },
-    {
-      title: '询盘时间',
-      align: 'left',
-
-      dataIndex: 'recordCtime',
-      customRender: function ({text, record}) {
-        return !text ? '' : (text.length > 16 ? text.substr(0, 16) : text)
-      }
-    }
-  ];
+  },
+  {
+    title: '入库时间',
+    align: 'left',
+    dataIndex: 'ctime',
+    customRender: function ({ text }) {
+      return !text ? '' : text.length > 16 ? text.substr(0, 16) : text;
+    },
+  },
+];
 
 export const wasteColumns: BasicColumn[] = [
   {
     title: '站点名称',
     align: 'left',
     dataIndex: 'siteName',
-
   },
   {
     title: '姓名',
     align: 'left',
     dataIndex: 'contact',
-
   },
   {
     title: '邮箱',
     align: 'left',
     dataIndex: 'fromEmail',
-
   },
 
   {
     title: '手机号',
     align: 'left',
     dataIndex: 'phone',
-    customRender: function ({text, record}) {
+    customRender: function ({ text, record }) {
       if (text == null || text == '' || text == undefined) {
-        return '--'
+        return '--';
       } else {
-        return text
+        return text;
       }
-    }
+    },
   },
 
   {
@@ -155,25 +153,25 @@ export const wasteColumns: BasicColumn[] = [
     align: 'left',
     dataIndex: 'fromIp',
 
-    customRender: function ({text, record}) {
+    customRender: function ({ text, record }) {
       if (text == null || text == '' || text == undefined) {
-        return '--'
+        return '--';
       } else {
-        return text
+        return text;
       }
-    }
+    },
   },
 
   {
     title: '状态',
     align: 'left',
-    dataIndex: 'readStatus'
+    dataIndex: 'readStatus',
   },
   {
     title: '询盘详情',
     align: 'left',
 
-    dataIndex: 'details'
+    dataIndex: 'details',
   },
   // {
   //   title: '跟进人',
@@ -195,85 +193,93 @@ export const wasteColumns: BasicColumn[] = [
     title: '来源国家',
     align: 'left',
     dataIndex: 'countryName',
-    customRender: function ({text, record}) {
+    customRender: function ({ text, record }) {
       if (text == null || text == '' || text == undefined) {
-        return '--'
+        return '--';
       } else {
-        return text
+        return text;
       }
-    }
+    },
   },
   {
     title: '询盘时间',
     align: 'left',
 
     dataIndex: 'recordCtime',
-    customRender: function ({text, record}) {
-      return !text ? '' : (text.length > 16 ? text.substr(0, 16) : text)
-    }
-  }
+    customRender: function ({ text, record }) {
+      return !text ? '' : text.length > 16 ? text.substr(0, 16) : text;
+    },
+  },
+  {
+    title: '入库时间',
+    align: 'left',
+    dataIndex: 'ctime',
+    customRender: function ({ text }) {
+      return !text ? '' : text.length > 16 ? text.substr(0, 16) : text;
+    },
+  },
 ];
 
 // 高级查询数据
 export const superQuerySchema = {
-  fromIp: {title: '询盘来源IP',order: 0,view: 'text', type: 'string',},
-  fromEmail: {title: '询盘发送者邮箱账号',order: 1,view: 'text', type: 'string',},
-  modular: {title: '询盘模块:admp_web:admp网站询盘 ;email:邮件询盘  ;diy_element:自定义组件询盘',order: 2,view: 'text', type: 'string',},
-  fromUser: {title: '发送人姓名',order: 3,view: 'text', type: 'string',},
-  status: {title: '0删除,1有效,默认值1   2:待解析  3:数据解析中 4.解析失败',order: 4,view: 'number', type: 'number',},
-  dealCount: {title: '数据解析次数',order: 5,view: 'number', type: 'number',},
-  sysEffective: {title: '系统有效性  0:无效       1;有效 后台字段',order: 6,view: 'number', type: 'number',},
-  userEffective: {title: '用户有效性  0:无效       1:有效   2 : 待定 取自字典表',order: 7,view: 'number', type: 'number',},
-  sensitiveMessage: {title: '敏感信息',order: 8,view: 'textarea', type: 'string',},
-  phase: {title: '询盘阶段,由跟踪来决定(1:待沟通 ;2:沟通中;3:成单;4;放弃)',order: 9,view: 'text', type: 'string',},
-  trackStatus: {title: '跟进跟进状态,由跟踪来决定(1:待跟进 ;2:跟进中;3:完成;4;停止)',order: 10,view: 'text', type: 'string',},
-  uid: {title: '询盘所属用户主账号ID',order: 11,view: 'text', type: 'string',},
-  tracker: {title: '询盘跟进人 id',order: 12,view: 'number', type: 'number',},
-  recordCtime: {title: '询盘创建时间',order: 13,view: 'datetime', type: 'string',},
-  ctime: {title: 'ADMP平台创建时间',order: 14,view: 'datetime', type: 'string',},
-  country: {title: '国家/地区(根据ip获取)',order: 15,view: 'text', type: 'string',},
-  countryIsoCode: {title: '通过ip解析获得国家码',order: 16,view: 'text', type: 'string',},
-  areaIsoCode: {title: '通过ip解析获得区域码',order: 17,view: 'text', type: 'string',},
-  pluginName: {title: '询盘插件名称,名称小写,如:wpforms',order: 18,view: 'text', type: 'string',},
-  siteCode: {title: '站点code,关联站点表',order: 19,view: 'text', type: 'string',},
-  siteToken: {title: '站点token',order: 20,view: 'text', type: 'string',},
-  siteHost: {title: '询盘来自站点的域名',order: 21,view: 'text', type: 'string',},
-  recordId: {title: '询盘原站点记录ID',order: 22,view: 'text', type: 'string',},
-  utime: {title: '状态更新时间',order: 23,view: 'datetime', type: 'string',},
-  replyTime: {title: '回复时间',order: 24,view: 'datetime', type: 'string',},
-  forward: {title: '转发状态:0未转发,1已转发,默认值0',order: 25,view: 'number', type: 'number',},
-  forwardTime: {title: '转发时间',order: 26,view: 'datetime', type: 'string',},
-  visitId: {title: '访客id',order: 27,view: 'text', type: 'string',},
-  siteId: {title: '来源于站点的id',order: 28,view: 'number', type: 'number',},
-  companyId: {title: '公司id',order: 29,view: 'number', type: 'number',},
-  contactIds: {title: '联系人id,字符串组合',order: 30,view: 'text', type: 'string',},
-  jobId: {title: '定时器任务修改查询唯一标识(10位随机数)',order: 31,view: 'text', type: 'string',},
-  replayStatus: {title: '回复状态',order: 32,view: 'text', type: 'string',},
-  noOut: {title: '外部编号',order: 33,view: 'text', type: 'string',},
-  modifyRecordCtime: {title: '处理后的询盘当地时间字段',order: 34,view: 'datetime', type: 'string',},
-  transContent: {title: 'transContent',order: 35,view: 'textarea', type: 'string',},
-  countryCode: {title: '国家code',order: 36,view: 'text', type: 'string',},
-  countryName: {title: '国家名',order: 37,view: 'text', type: 'string',},
-  whatsApp: {title: 'whatsApp',order: 38,view: 'text', type: 'string',},
-  wasteEnquiry: {title: '0:不是;1:是',order: 39,view: 'number', type: 'number',},
-  pushStatus: {title: '推送状态,0:待发送,1:成功,2不予发送',order: 40,view: 'number', type: 'number',},
-  pushErrorNum: {title: '推送错误次数',order: 41,view: 'number', type: 'number',},
-  name: {title: '姓名',order: 42,view: 'text', type: 'string',},
-  email: {title: '邮箱地址',order: 43,view: 'text', type: 'string',},
-  message: {title: '询盘信息',order: 44,view: 'textarea', type: 'string',},
-  company: {title: '公司名称',order: 45,view: 'text', type: 'string',},
-  fromPage: {title: '来源页面',order: 46,view: 'text', type: 'string',},
-  customerIp: {title: 'form表单传入Ip',order: 47,view: 'text', type: 'string',},
-  phone: {title: '手机号',order: 48,view: 'text', type: 'string',},
-  whatsapp: {title: 'whatsapp',order: 49,view: 'text', type: 'string',},
-  readStatus: {title: '阅读状态,0是未阅读,1是已阅读',order: 50,view: 'number', type: 'number',},
-  principalUid: {title: '负责人的id',order: 51,view: 'text', type: 'string',},
-  principalType: {title: '0代表系统根据规则分配,1代表主账户指定',order: 52,view: 'number', type: 'number',},
-  address: {title: 'form表单中的地址',order: 53,view: 'textarea', type: 'string',},
-  specialField: {title: '客户自定义字段',order: 54,view: 'textarea', type: 'string',},
-  requestTime: {title: '向Wp发送请求时间',order: 55,view: 'datetime', type: 'string',},
-  acquireMessageTime: {title: 'Adweb实时获取WebHookS消息时间,定时器无该值',order: 56,view: 'datetime', type: 'string',},
-  effectiveReason: {title: '疑似垃圾询盘理由',order: 57,view: 'text', type: 'string',},
-  wasteEnquiryType: {title: '垃圾询盘类型,关键词:keyword,邮箱:email,ip: ip,其他:other',order: 58,view: 'text', type: 'string',},
-  cartItems: {title: '询盘关联产品',order: 59,view: 'textarea', type: 'string',},
+  fromIp: { title: '询盘来源IP', order: 0, view: 'text', type: 'string' },
+  fromEmail: { title: '询盘发送者邮箱账号', order: 1, view: 'text', type: 'string' },
+  modular: { title: '询盘模块:admp_web:admp网站询盘 ;email:邮件询盘  ;diy_element:自定义组件询盘', order: 2, view: 'text', type: 'string' },
+  fromUser: { title: '发送人姓名', order: 3, view: 'text', type: 'string' },
+  status: { title: '0删除,1有效,默认值1   2:待解析  3:数据解析中 4.解析失败', order: 4, view: 'number', type: 'number' },
+  dealCount: { title: '数据解析次数', order: 5, view: 'number', type: 'number' },
+  sysEffective: { title: '系统有效性  0:无效       1;有效 后台字段', order: 6, view: 'number', type: 'number' },
+  userEffective: { title: '用户有效性  0:无效       1:有效   2 : 待定 取自字典表', order: 7, view: 'number', type: 'number' },
+  sensitiveMessage: { title: '敏感信息', order: 8, view: 'textarea', type: 'string' },
+  phase: { title: '询盘阶段,由跟踪来决定(1:待沟通 ;2:沟通中;3:成单;4;放弃)', order: 9, view: 'text', type: 'string' },
+  trackStatus: { title: '跟进跟进状态,由跟踪来决定(1:待跟进 ;2:跟进中;3:完成;4;停止)', order: 10, view: 'text', type: 'string' },
+  uid: { title: '询盘所属用户主账号ID', order: 11, view: 'text', type: 'string' },
+  tracker: { title: '询盘跟进人 id', order: 12, view: 'number', type: 'number' },
+  recordCtime: { title: '询盘创建时间', order: 13, view: 'datetime', type: 'string' },
+  ctime: { title: 'ADMP平台创建时间', order: 14, view: 'datetime', type: 'string' },
+  country: { title: '国家/地区(根据ip获取)', order: 15, view: 'text', type: 'string' },
+  countryIsoCode: { title: '通过ip解析获得国家码', order: 16, view: 'text', type: 'string' },
+  areaIsoCode: { title: '通过ip解析获得区域码', order: 17, view: 'text', type: 'string' },
+  pluginName: { title: '询盘插件名称,名称小写,如:wpforms', order: 18, view: 'text', type: 'string' },
+  siteCode: { title: '站点code,关联站点表', order: 19, view: 'text', type: 'string' },
+  siteToken: { title: '站点token', order: 20, view: 'text', type: 'string' },
+  siteHost: { title: '询盘来自站点的域名', order: 21, view: 'text', type: 'string' },
+  recordId: { title: '询盘原站点记录ID', order: 22, view: 'text', type: 'string' },
+  utime: { title: '状态更新时间', order: 23, view: 'datetime', type: 'string' },
+  replyTime: { title: '回复时间', order: 24, view: 'datetime', type: 'string' },
+  forward: { title: '转发状态:0未转发,1已转发,默认值0', order: 25, view: 'number', type: 'number' },
+  forwardTime: { title: '转发时间', order: 26, view: 'datetime', type: 'string' },
+  visitId: { title: '访客id', order: 27, view: 'text', type: 'string' },
+  siteId: { title: '来源于站点的id', order: 28, view: 'number', type: 'number' },
+  companyId: { title: '公司id', order: 29, view: 'number', type: 'number' },
+  contactIds: { title: '联系人id,字符串组合', order: 30, view: 'text', type: 'string' },
+  jobId: { title: '定时器任务修改查询唯一标识(10位随机数)', order: 31, view: 'text', type: 'string' },
+  replayStatus: { title: '回复状态', order: 32, view: 'text', type: 'string' },
+  noOut: { title: '外部编号', order: 33, view: 'text', type: 'string' },
+  modifyRecordCtime: { title: '处理后的询盘当地时间字段', order: 34, view: 'datetime', type: 'string' },
+  transContent: { title: 'transContent', order: 35, view: 'textarea', type: 'string' },
+  countryCode: { title: '国家code', order: 36, view: 'text', type: 'string' },
+  countryName: { title: '国家名', order: 37, view: 'text', type: 'string' },
+  whatsApp: { title: 'whatsApp', order: 38, view: 'text', type: 'string' },
+  wasteEnquiry: { title: '0:不是;1:是', order: 39, view: 'number', type: 'number' },
+  pushStatus: { title: '推送状态,0:待发送,1:成功,2不予发送', order: 40, view: 'number', type: 'number' },
+  pushErrorNum: { title: '推送错误次数', order: 41, view: 'number', type: 'number' },
+  name: { title: '姓名', order: 42, view: 'text', type: 'string' },
+  email: { title: '邮箱地址', order: 43, view: 'text', type: 'string' },
+  message: { title: '询盘信息', order: 44, view: 'textarea', type: 'string' },
+  company: { title: '公司名称', order: 45, view: 'text', type: 'string' },
+  fromPage: { title: '来源页面', order: 46, view: 'text', type: 'string' },
+  customerIp: { title: 'form表单传入Ip', order: 47, view: 'text', type: 'string' },
+  phone: { title: '手机号', order: 48, view: 'text', type: 'string' },
+  whatsapp: { title: 'whatsapp', order: 49, view: 'text', type: 'string' },
+  readStatus: { title: '阅读状态,0是未阅读,1是已阅读', order: 50, view: 'number', type: 'number' },
+  principalUid: { title: '负责人的id', order: 51, view: 'text', type: 'string' },
+  principalType: { title: '0代表系统根据规则分配,1代表主账户指定', order: 52, view: 'number', type: 'number' },
+  address: { title: 'form表单中的地址', order: 53, view: 'textarea', type: 'string' },
+  specialField: { title: '客户自定义字段', order: 54, view: 'textarea', type: 'string' },
+  requestTime: { title: '向Wp发送请求时间', order: 55, view: 'datetime', type: 'string' },
+  acquireMessageTime: { title: 'Adweb实时获取WebHookS消息时间,定时器无该值', order: 56, view: 'datetime', type: 'string' },
+  effectiveReason: { title: '疑似垃圾询盘理由', order: 57, view: 'text', type: 'string' },
+  wasteEnquiryType: { title: '垃圾询盘类型,关键词:keyword,邮箱:email,ip: ip,其他:other', order: 58, view: 'text', type: 'string' },
+  cartItems: { title: '询盘关联产品', order: 59, view: 'textarea', type: 'string' },
 };

+ 5 - 4
src/views/adweb/enquiry/AdwebWasteEnquiryList.vue

@@ -107,7 +107,7 @@
         </div>
       </template>
 
-      <template #bodyCell="{ column, record, index, text }">
+      <template #bodyCell="{ column, record, text }">
         <!-- 自定义显示字段       -->
 
         <!-- 询盘状态 -->
@@ -313,7 +313,7 @@
   let userEffectiveOption = ref<[]>([]);
 
   // 当前用户角色
-  const userRole = ref('');
+  const userRole = ref<any>([]);
 
   // 已经选择的站点code
   const siteCode = ref<any>('');
@@ -337,6 +337,7 @@
 
   // 跟踪记录
   const enquiryTrackRecordRef = ref();
+  const userStore = useUserStore();
 
   onBeforeMount(() => {
     siteCode.value = localStorage.getItem('siteCode');
@@ -344,7 +345,7 @@
   });
 
   onMounted(async () => {
-    userRole.value = useUserStore().roleList;
+    userRole.value = userStore.getRoleList;
     getEffectiveList();
   });
 
@@ -591,7 +592,7 @@
     postAction('/enquiry/blacklist/addBlacklist', record).then((res) => {
       if (res.success) {
         createMessage.success(`拒收成功!`);
-        this.getTableAndNum();
+        getTableAndNum();
       } else {
         if (res.code == 403 || res.code == 500) {
           createMessage.warning(res.message);

+ 8 - 9
src/views/adweb/enquiry/modules/enquiryDetail.vue

@@ -148,8 +148,7 @@ v-if="edition === 1" :href="record.fromPage.substring(record.fromPage.indexOf('h
 
 <script>
 
-import {getAction, postAction, postActionForm} from '/@/api/manage/manage'
-import Qs from 'qs'
+import {getAction, postActionForm} from '/@/api/manage/manage'
 
 import {useUserStore} from "@/store/modules/user";
 
@@ -334,24 +333,24 @@ export default {
         wasteEnquiryType: that.wasteEnquiryType,
         wasteEnquirySeason: that.wasteEnquirySeason
       }
-      postAction('/adweb/adwebEnquiry/update/user/effective', Qs.stringify(d)).then(function(res) {
+      postActionForm('/adweb/adwebEnquiry/update/user/effective', d).then(function(res) {
         that.spinning = false
-        if (res.code == 200) {
+        if (res.code === 200) {
           that.$message.success('分类修改成功!');
           that.$emit('ok')
           that.record.userEffective = that.modelUserEffective
-          if(that.wasteEnquiryType == "ip"){
+          if(that.wasteEnquiryType === "ip"){
             that.record.effectiveReason = "人工操作-ip-" + that.wasteEnquirySeason
-          }else if(that.wasteEnquiryType == "email"){
+          }else if(that.wasteEnquiryType === "email"){
             that.record.effectiveReason = "人工操作-邮箱-" + that.wasteEnquirySeason
-          }else if(that.wasteEnquiryType == "keyword"){
+          }else if(that.wasteEnquiryType === "keyword"){
             that.record.effectiveReason = "人工操作-关键词-" + that.wasteEnquirySeason
-          }else if(that.wasteEnquiryType == "other"){
+          }else if(that.wasteEnquiryType === "other"){
             that.record.effectiveReason = "人工操作-其他-" + that.wasteEnquirySeason
           }
 
         } else {
-          if (res.code == 403) {
+          if (res.code === 403) {
             that.$message.warning(res.message)
           } else {
             that.$message.error('分类修改失败!')