ソースを参照

update 客户管理修复

ct 1 週間 前
コミット
68ff54754b

+ 0 - 62
src/api/crm/crm/assist.js

@@ -1,62 +0,0 @@
-import request from '@/utils/request'
-
-// 查询客户员工协作列表
-export function listAssist(query) {
-  return request({
-    url: '/crm/assist/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询客户员工协作详细
-export function getAssist(id) {
-  return request({
-    url: '/crm/assist/' + id,
-    method: 'get'
-  })
-}
-
-// 新增客户员工协作
-export function addAssist(data) {
-  return request({
-    url: '/crm/assist',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改客户员工协作
-export function updateAssist(data) {
-  return request({
-    url: '/crm/assist',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除客户员工协作
-export function delAssist(id) {
-  return request({
-    url: '/crm/assist/' + id,
-    method: 'delete'
-  })
-}
-
-// 删除客户员工协作
-export function remove(data) {
-  return request({
-    url: '/crm/assist/remove',
-    method: 'post',
-    data: data
-  })
-}
-
-// 导出客户员工协作
-export function exportAssist(query) {
-  return request({
-    url: '/crm/assist/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 198
src/api/crm/crm/customer.js

@@ -1,198 +0,0 @@
-import request from '@/utils/request'
-
-export function getFullCustomerList(query) {
-  return request({
-    url: '/crm/customer/getFullCustomerList',
-    method: 'get',
-    params: query
-  })
-}
-
-export function getLineCustomerList(query) {
-  return request({
-    url: '/crm/customer/getLineCustomerList',
-    method: 'get',
-    params: query
-  })
-}
-export function listCustomerAll(query) {
-  return request({
-    url: '/crm/customer/getCustomerListAll',
-    method: 'get',
-    params: query
-  })
-}
-export function getCustomerList(query) {
-  return request({
-    url: '/crm/customer/getCustomerList',
-    method: 'get',
-    params: query
-  })
-}
-
-export function getCustomerListByIds(query) {
-  return request({
-    url: '/crm/customer/getCustomerListByIds',
-    method: 'get',
-    params: query
-  })
-}
-
-
-
-export function getMyCustomerList(query) {
-  return request({
-    url: '/crm/customer/getMyCustomerList',
-    method: 'get',
-    params: query
-  })
-}
-
-export function getCustomerDetails(query) {
-  return request({
-    url: '/crm/customer/getCustomerDetails/',
-    method: 'get',
-    params: query
-  })
-}
-export function getCustomerDetails1(query) {
-  return request({
-    url: '/crm/customer/getCustomerDetails1/',
-    method: 'get',
-    params: query
-  })
-}
-
-export function getLineCustomerDetails(query) {
-  return request({
-    url: '/crm/customer/getLineCustomerDetails/',
-    method: 'get',
-    params: query
-  })
-}
-export function getCustomer1(customerId) {
-  return request({
-    url: '/crm/customer/query1/' + customerId,
-    method: 'get'
-  })
-}
-
-export function getCustomerListBySearch(query) {
-  return request({
-    url: '/crm/customer/getCustomerListBySearch',
-    method: 'get',
-    params: query
-  })
-}
-
-
-export function exportCustomer(query) {
-  return request({
-    url: '/crm/customer/export',
-    method: 'get',
-    params: query
-  })
-}
-
-export function exportCustomerByIds(customerId) {
-  return request({
-    url: '/crm/customer/'+ customerId,
-    method: 'post',
-  })
-}
-
-export function assignToUser(data) {
-  return request({
-    url: '/crm/customer/assignToUser',
-    method: 'post',
-    data: data
-  })
-}
-export function assignUser(data) {
-  return request({
-    url: '/crm/customer/assignUser',
-    method: 'post',
-    data: data
-  })
-}
-
-
-
-export function receive(data) {
-  return request({
-    url: '/crm/customer/receive',
-    method: 'post',
-    data: data
-  })
-}
-
-export function recover(data) {
-  return request({
-    url: '/crm/customer/recover',
-    method: 'post',
-    data: data
-  })
-}
-
-
-
-
-
-
-// 下载用户导入模板
-export function importLineTemplate() {
-  return request({
-    url: '/crm/customer/importLineTemplate',
-    method: 'get'
-  })
-}
-
-// 下载用户导入模板
-export function importVisitTemplate() {
-  return request({
-    url: '/crm/customer/importVisitTemplate',
-    method: 'get'
-  })
-}
-
-
-export function addCustomer(data) {
-  return request({
-    url: '/crm/customer/add',
-    method: 'post',
-    data: data
-  })
-}
-
-export function addMyCustomer(data) {
-  return request({
-    url: '/crm/customer/addMyCustomer',
-    method: 'post',
-    data: data
-  })
-}
-
-
-// 修改客户
-export function updateCustomer(data) {
-  return request({
-    url: '/crm/customer/edit',
-    method: 'put',
-    data: data
-  })
-}
-
-export function updateCustomerSource(data) {
-  return request({
-    url: '/crm/customer/updateCustomerSource',
-    method: 'post',
-    data: data
-  })
-}
-export function getMyAssistList(query) {
-  return request({
-    url: '/crm/customer/getMyAssistList',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 61
src/api/crm/crm/customerAnalyze.js

@@ -1,61 +0,0 @@
-import request from '@/utils/request'
-
-// 查询客户聊天记录分析列表
-export function listAnalyze(query) {
-  return request({
-    url: '/crm/analyze/list',
-    method: 'get',
-    params: query
-  })
-}
-// 查询客户聊天记录分析列表
-export function listAllAnalyze(data) {
-    return request({
-        url: '/crm/analyze/listAll',
-        method: 'post',
-        data: data
-    })
-}
-
-// 查询客户聊天记录分析详细
-export function getAnalyze(id) {
-  return request({
-    url: '/crm/analyze/' + id,
-    method: 'get'
-  })
-}
-
-// 新增客户聊天记录分析
-export function addAnalyze(data) {
-  return request({
-    url: '/crm/analyze',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改客户聊天记录分析
-export function updateAnalyze(data) {
-  return request({
-    url: '/crm/analyze',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除客户聊天记录分析
-export function delAnalyze(id) {
-  return request({
-    url: '/crm/analyze/' + id,
-    method: 'delete'
-  })
-}
-
-// 导出客户聊天记录分析
-export function exportAnalyze(query) {
-  return request({
-    url: '/crm/analyze/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 21
src/api/crm/crm/customerAssign.js

@@ -1,21 +0,0 @@
-import request from '@/utils/request'
-
-// 查询客户分配记录列表
-export function listCustomerAssign(query) {
-  return request({
-    url: '/crm/customerAssign/list',
-    method: 'get',
-    params: query
-  })
-}
-
- 
- 
-export function cancelCustomerAssign(data) {
-  return request({
-    url: '/crm/customerAssign/cancel' ,
-    method: 'post',
-    data: data
-  })
-}
- 

+ 0 - 53
src/api/crm/crm/customerContacts.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询客户联系人列表
-export function listCustomerContacts(query) {
-  return request({
-    url: '/crm/customerContacts/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询客户联系人详细
-export function getCustomerContacts(contactsId) {
-  return request({
-    url: '/crm/customerContacts/' + contactsId,
-    method: 'get'
-  })
-}
-
-// 新增客户联系人
-export function addCustomerContacts(data) {
-  return request({
-    url: '/crm/customerContacts',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改客户联系人
-export function updateCustomerContacts(data) {
-  return request({
-    url: '/crm/customerContacts',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除客户联系人
-export function delCustomerContacts(contactsId) {
-  return request({
-    url: '/crm/customerContacts/' + contactsId,
-    method: 'delete'
-  })
-}
-
-// 导出客户联系人
-export function exportCustomerContacts(query) {
-  return request({
-    url: '/crm/customerContacts/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 53
src/api/crm/crm/customerExt.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询客户字段扩展列表
-export function listCustomerExt(query) {
-  return request({
-    url: '/crm/customerExt/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询客户字段扩展详细
-export function getCustomerExt(extId) {
-  return request({
-    url: '/crm/customerExt/' + extId,
-    method: 'get'
-  })
-}
-
-// 新增客户字段扩展
-export function addCustomerExt(data) {
-  return request({
-    url: '/crm/customerExt',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改客户字段扩展
-export function updateCustomerExt(data) {
-  return request({
-    url: '/crm/customerExt',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除客户字段扩展
-export function delCustomerExt(extId) {
-  return request({
-    url: '/crm/customerExt/' + extId,
-    method: 'delete'
-  })
-}
-
-// 导出客户字段扩展
-export function exportCustomerExt(query) {
-  return request({
-    url: '/crm/customerExt/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 53
src/api/crm/crm/customerHisOrder.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询客户历史订单列表
-export function listCustomerHisOrder(query) {
-  return request({
-    url: '/crm/customerHisOrder/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询客户历史订单详细
-export function getCustomerHisOrder(orderId) {
-  return request({
-    url: '/crm/customerHisOrder/' + orderId,
-    method: 'get'
-  })
-}
-
-// 新增客户历史订单
-export function addCustomerHisOrder(data) {
-  return request({
-    url: '/crm/customerHisOrder',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改客户历史订单
-export function updateCustomerHisOrder(data) {
-  return request({
-    url: '/crm/customerHisOrder',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除客户历史订单
-export function delCustomerHisOrder(orderId) {
-  return request({
-    url: '/crm/customerHisOrder/' + orderId,
-    method: 'delete'
-  })
-}
-
-// 导出客户历史订单
-export function exportCustomerHisOrder(query) {
-  return request({
-    url: '/crm/customerHisOrder/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 9
src/api/crm/crm/customerLevel.js

@@ -1,9 +0,0 @@
-import request from "@/utils/request";
-
-export const customerLevelOptions = (query) => {
-  return request({
-    url: "/crm/customerLevel/getCustomerLevelOption",
-    method: "get",
-    params: query,
-  });
-};

+ 0 - 53
src/api/crm/crm/customerLogs.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询客户日志列表
-export function listCustomerLogs(query) {
-  return request({
-    url: '/crm/customerLogs/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询客户日志详细
-export function getCustomerLogs(logsId) {
-  return request({
-    url: '/crm/customerLogs/' + logsId,
-    method: 'get'
-  })
-}
-
-// 新增客户日志
-export function addCustomerLogs(data) {
-  return request({
-    url: '/crm/customerLogs',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改客户日志
-export function updateCustomerLogs(data) {
-  return request({
-    url: '/crm/customerLogs',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除客户日志
-export function delCustomerLogs(logsId) {
-  return request({
-    url: '/crm/customerLogs/' + logsId,
-    method: 'delete'
-  })
-}
-
-// 导出客户日志
-export function exportCustomerLogs(query) {
-  return request({
-    url: '/crm/customerLogs/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 78
src/api/crm/crm/customerProperty.js

@@ -1,78 +0,0 @@
-import request from '@/utils/request'
-
-export function listByCustomerId(customerId) {
-  return request({
-    url: '/crm/customerProperty/list/' + customerId,
-    method: 'get'
-  })
-}
-
-export function getById(id) {
-  return request({
-    url: '/crm/customerProperty/' + id,
-    method: 'get'
-  })
-}
-
-export function add(data) {
-  return request({
-    url: '/crm/customerProperty/add',
-    method: 'post',
-    data: data
-  })
-}
-
-export function addOrUpdate(data) {
-  return request({
-    url: '/crm/customerProperty/addOrUpdate',
-    method: 'post',
-    data: data
-  })
-}
-
-export function addByTemplateId(customerId, templateId, propertyValue) {
-  return request({
-    url: '/crm/customerProperty/addByTemplateId',
-    method: 'post',
-    params: { customerId, templateId, propertyValue }
-  })
-}
-
-export function addOrUpdateByTemplateId(customerId, templateId, propertyValue) {
-  return request({
-    url: '/crm/customerProperty/addOrUpdateByTemplateId',
-    method: 'post',
-    params: { customerId, templateId, propertyValue }
-  })
-}
-
-export function batchAddByTemplateIds(customerId, propertyMap) {
-  return request({
-    url: '/crm/customerProperty/batchAddByTemplateIds/' + customerId,
-    method: 'post',
-    data: propertyMap
-  })
-}
-
-export function update(data) {
-  return request({
-    url: '/crm/customerProperty',
-    method: 'put',
-    data: data
-  })
-}
-
-export function del(ids) {
-  return request({
-    url: '/crm/customerProperty/' + ids,
-    method: 'delete'
-  })
-}
-
-export function deleteByPropertyId(customerId, propertyId) {
-  return request({
-    url: '/crm/customerProperty/deleteByPropertyId',
-    method: 'delete',
-    params: { customerId, propertyId }
-  })
-}

+ 0 - 53
src/api/crm/crm/customerUser.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询客户员工认领列表
-export function listCustomerUser(query) {
-  return request({
-    url: '/crm/customerUser/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询客户员工认领详细
-export function getCustomerUser(customerUserId) {
-  return request({
-    url: '/crm/customerUser/' + customerUserId,
-    method: 'get'
-  })
-}
-
-// 新增客户员工认领
-export function addCustomerUser(data) {
-  return request({
-    url: '/crm/customerUser',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改客户员工认领
-export function updateCustomerUser(data) {
-  return request({
-    url: '/crm/customerUser',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除客户员工认领
-export function delCustomerUser(customerUserId) {
-  return request({
-    url: '/crm/customerUser/' + customerUserId,
-    method: 'delete'
-  })
-}
-
-// 导出客户员工认领
-export function exportCustomerUser(query) {
-  return request({
-    url: '/crm/customerUser/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 53
src/api/crm/crm/customerVisit.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询跟进列表
-export function listCustomerVisit(query) {
-  return request({
-    url: '/crm/customerVisit/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询跟进详细
-export function getCustomerVisit(visitId) {
-  return request({
-    url: '/crm/customerVisit/' + visitId,
-    method: 'get'
-  })
-}
-
-// 新增跟进
-export function addCustomerVisit(data) {
-  return request({
-    url: '/crm/customerVisit',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改跟进
-export function updateCustomerVisit(data) {
-  return request({
-    url: '/crm/customerVisit',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除跟进
-export function delCustomerVisit(visitId) {
-  return request({
-    url: '/crm/customerVisit/' + visitId,
-    method: 'delete'
-  })
-}
-
-// 导出跟进
-export function exportCustomerVisit(query) {
-  return request({
-    url: '/crm/customerVisit/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 30
src/api/crm/crm/event.js

@@ -1,30 +0,0 @@
-import request from '@/utils/request'
-
-export function getMyCrmEventList(query) {
-  return request({
-    url: '/crm/event/getMyCrmEventList',
-    method: 'get',
-    params: query
-  })
-}
-export function addCrmEvent(data) {
-  return request({
-    url: '/crm/event/addCrmEvent',
-    method: 'post',
-    data: data
-  })
-}
-export function delCrmEvent(data) {
-  return request({
-    url: '/crm/event/delCrmEvent',
-    method: 'post',
-    data: data
-  })
-}
-export function doEvent(data) {
-  return request({
-    url: '/crm/event/doEvent',
-    method: 'post',
-    data: data
-  })
-}

+ 0 - 43
src/api/crm/crm/msg.js

@@ -1,43 +0,0 @@
-import request from '@/utils/request'
-
-// 查询 消息列表
-export function getMsg() {
-  return request({
-    url: '/crm/msg/getMsg',
-    method: 'get'
-  })
-}
-
-export function getMsgList(query) {
-  return request({
-    url: '/crm/msg/getMsgList',
-    method: 'get',
-    params: query
-  })
-}
-
-
-export function getMsgCount() {
-  return request({
-    url: '/crm/msg/getMsgCount',
-    method: 'get',
-  })
-}
-
-
-export function setRead(data) {
-  return request({
-    url: '/crm/msg/setRead',
-    method: 'post',
-    data: data
-  })
-}
-export function setAllRead() {
-  return request({
-    url: '/crm/msg/setAllRead',
-    method: 'post'
-  })
-}
-
-
-

+ 0 - 47
src/api/crm/crm/propertyTemplate.js

@@ -1,47 +0,0 @@
-import request from '@/utils/request'
-
-export function listPropertyTemplate(query) {
-  return request({
-    url: '/crm/customerPropertyTemplate/list',
-    method: 'get',
-    params: query
-  })
-}
-
-export function getPropertyTemplate(id) {
-  return request({
-    url: '/crm/customerPropertyTemplate/' + id,
-    method: 'get'
-  })
-}
-
-export function addPropertyTemplate(data) {
-  return request({
-    url: '/crm/customerPropertyTemplate',
-    method: 'post',
-    data: data
-  })
-}
-
-export function updatePropertyTemplate(data) {
-  return request({
-    url: '/crm/customerPropertyTemplate',
-    method: 'put',
-    data: data
-  })
-}
-
-export function delPropertyTemplate(id) {
-  return request({
-    url: '/crm/customerPropertyTemplate/' + id,
-    method: 'delete'
-  })
-}
-
-export function exportPropertyTemplate(query) {
-  return request({
-    url: '/crm/customerPropertyTemplate/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 110
src/api/crm/crm/statistics.js

@@ -1,110 +0,0 @@
-import request from '@/utils/request'
-
-
-export function customer(query) {
-  return request({
-    url: '/crm/statistics/customer',
-    method: 'get',
-    params: query
-  })
-}
-export function exportCustomer(query) {
-  return request({
-    url: '/crm/statistics/exportCustomer',
-    method: 'get',
-    params: query
-  })
-}
-export function customerCycle(query) {
-  return request({
-    url: '/crm/statistics/customerCycle',
-    method: 'get',
-    params: query
-  })
-}
-export function exportCustomerCycle(query) {
-  return request({
-    url: '/crm/statistics/exportCustomerCycle',
-    method: 'get',
-    params: query
-  })
-}
-
-export function customerFull(query) {
-  return request({
-    url: '/crm/statistics/customerFull',
-    method: 'get',
-    params: query
-  })
-}
-export function exportCustomerFull(query) {
-  return request({
-    url: '/crm/statistics/exportCustomerFull',
-    method: 'get',
-    params: query
-  })
-}
- export function customerNum(query) {
-   return request({
-     url: '/crm/statistics/customerNum',
-     method: 'get',
-     params: query
-   })
- }
- export function exportCustomerNum(query) {
-   return request({
-     url: '/crm/statistics/exportCustomerNum',
-     method: 'get',
-     params: query
-   })
- }
- export function customerMap(query) {
-   return request({
-     url: '/crm/statistics/customerMap',
-     method: 'get',
-     params: query
-   })
- }
- export function customerSource(query) {
-   return request({
-     url: '/crm/statistics/customerSource',
-     method: 'get',
-     params: query
-   })
- }
- export function exportCustomerSource(query) {
-   return request({
-     url: '/crm/statistics/exportCustomerSource',
-     method: 'get',
-     params: query
-   })
- }
- export function customerRate(query) {
-   return request({
-     url: '/crm/statistics/customerRate',
-     method: 'get',
-     params: query
-   })
- }
- export function exportCustomerRate(query) {
-   return request({
-     url: '/crm/statistics/exportCustomerRate',
-     method: 'get',
-     params: query
-   })
- }
-export function customerVisit(query) {
-  return request({
-    url: '/crm/statistics/customerVisit',
-    method: 'get',
-    params: query
-  })
-}
-export function exportCustomerVisit(query) {
-  return request({
-    url: '/crm/statistics/exportCustomerVisit',
-    method: 'get',
-    params: query
-  })
-}
-

+ 1 - 1
src/api/crm/customer.js

@@ -111,7 +111,7 @@ export function assignCrmToCompany(data) {
 
 export function listCustomer(query) {
   return request({
-    url: '/crm/customer/getCustomerList',
+    url: '/crm/customer/list',
     method: 'get',
     params: query
   })

+ 8 - 0
src/api/his/city.js

@@ -42,3 +42,11 @@ export function delApi(id) {
     method: 'delete'
   })
 }
+
+// 查询详细
+export function getCitys() {
+  return request({
+    url: '/his/city/getCitys',
+    method: 'get'
+  })
+}

+ 81 - 0
src/views/crm/components/editCustomerSource.vue

@@ -0,0 +1,81 @@
+<template>
+    <div>
+        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+            <el-form-item label="客户数量" >
+                {{ids.length}}个
+            </el-form-item>
+            <el-form-item label="客户来源" prop="source">
+                <el-select v-model="form.source" placeholder="请选择客户来源" clearable size="small">
+                    <el-option
+                        v-for="item in sourceOptions"
+                        :key="item.dictValue"
+                        :label="item.dictLabel"
+                        :value="item.dictValue"
+                        />
+                </el-select>
+            </el-form-item>
+        </el-form>
+        <div   class="dialog-footer">
+            <el-button type="primary" @click="submitForm">确 定</el-button>
+            <el-button @click="cancel">取 消</el-button>
+        </div>
+    </div>
+</template>
+  
+<script>
+import { listCustomer,getCustomer,addCustomer,updateCustomerSource,delCustomer,exportCustomer  } from "@/api/crm/customer";
+export default {
+        name: "customerVisit",
+        data() {
+            return {
+                sourceOptions:[],
+                ids:[],
+                // 表单参数
+                form: {},
+                // 表单校验
+                rules: {
+                    source: [
+                    { required: true, message: "客户来源不能为空", trigger: "blur" }
+                    ],
+                }
+            };
+        },
+        created() {
+            this.getDicts("sys_crm_customer_source").then((response) => {
+                this.sourceOptions = response.data;
+            });
+           
+        },
+        methods: {
+            cancel(){
+                this.$emit('close');
+            },
+            handleEdit(ids) {
+                console.log(ids)
+                this.ids=ids;
+                 
+            },
+            /** 提交按钮 */
+            submitForm() {
+                this.$refs["form"].validate(valid => {
+                    if (valid) {
+                        this.form.ids=this.ids.toString();
+                        updateCustomerSource(this.form).then(response => {
+                            if (response.code === 200) {
+                                this.msgSuccess("修改成功");
+                                this.$emit('close');
+                            }
+                        });
+                    }
+                });
+            },
+        }
+    };
+</script>
+<style lang="scss" scoped> 
+.dialog-footer{
+    margin-bottom: 10px;
+    text-align: right;
+}
+</style>
+ 

+ 242 - 0
src/views/crm/components/feiyuCrmLineList.vue

@@ -0,0 +1,242 @@
+<template>
+    <div class="app-container">
+      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
+        <el-form-item label="线索创建时间" prop="createTime">
+            <el-date-picker ref="dtPicker" clearable size="small" style="width: 250px"
+                v-model="dateRange"
+                type="daterange"
+                value-format="yyyy-MM-dd hh:mm:ss"
+                start-placeholder="开始日期" end-placeholder="结束日期"
+                :default-time="['00:00:00','23:59:59']">
+            </el-date-picker>
+         </el-form-item>
+
+        <el-form-item>
+           <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+           <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+
+      </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+        >导入线索客户</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row> 
+
+      <el-table v-loading="loading" :data="customerLineList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="ID" align="center" prop="clue_id" />
+        <el-table-column label="进线日期" width="102" align="center" prop="create_time" />
+        <!-- <el-table-column label="来源渠道编码" align="center" prop="sourceCode" /> -->
+        <el-table-column label="客户名称" align="center" prop="name" />
+        <el-table-column label="客户手机" align="center" prop="telephone" />
+        <el-table-column  label="进线方式" align="center" prop="clue_type">
+            <template slot-scope="scope">
+                <el-tag prop="clue_type" :key="'clueType'+index" v-for="(item, index) in thirdClueTypeOptions"    v-if="scope.row.clue_type==item.dictValue">{{item.dictLabel}}</el-tag>
+            </template>
+        </el-table-column>
+       
+        <el-table-column label="流量来源" width="90" align="center" >
+             <template>
+                  {{"字节-抖音"}}
+            </template>
+        </el-table-column>
+
+       <el-table-column  label="是否导入"   align="center" prop="has_import">
+            <template slot-scope="scope">
+                <el-tag prop="has_import"  :type="scope.row.has_import==1?'danger':'success'" >{{  scope.row.has_import==1?'已导入':'未导入'}}</el-tag>
+            </template>
+        </el-table-column>
+
+         <el-table-column label="进线客户链接" width="150" align="center" prop="external_url" />
+         <el-table-column label="进线客户提交日期" width="100"  align="center" prop="create_time_detail" />
+        <el-table-column label="省市区" align="center" prop="location" width="120" >
+            <template slot-scope="scope">
+                {{scope.row.location}}
+            </template>
+       </el-table-column>
+
+       <el-table-column label="广告主名称" width="150" align="center" prop="advertiser_name" />
+
+       <el-table-column label="进线客户详情" align="center" prop="remark" />
+
+     
+    <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+            <el-button
+            size="mini"
+            type="text"
+            @click="handleShow(scope.row)"
+          >查看</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleCancel(scope.row)"
+            v-hasPermi="['crm:customerAssign:cancel']"
+          >撤销</el-button>
+        </template>
+      </el-table-column> -->
+
+      </el-table>
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+      <!-- <el-dialog :title="customer.title" :visible.sync="customer.open" width="1000px" append-to-body>
+          <el-table border  :data="customers" >
+              <el-table-column label="客户名称" align="center" prop="customerName" />
+              <el-table-column label="客户手机号" align="center" prop="mobile" />
+          </el-table>
+      </el-dialog> -->
+    </div>
+  </template>
+
+ <script>
+
+  import { getClues,importThird } from "@/api/crm/third";
+  export default {
+    name: "FeiyuCrmLineList",
+    data() {
+      return {
+        customers:[],
+        companys:[],
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 客户分配记录表格数据
+        customerLineList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        //飞鱼进线方式
+        thirdClueTypeOptions: [],
+        dateRange:[],
+        //查询参数
+        queryParams: {
+           pageNum: 1,
+           pageSize: 10,
+        },
+      };
+    },
+    created() {
+        this.getDicts("crm_third_feiyu_clue_type").then(response => {
+            this.thirdClueTypeOptions = response.data;
+        });
+    },
+    methods: {
+        getData(data){
+            this.queryParams=data;
+            this.queryParams.pageNum=1;
+            this.queryParams.pageSize=20;
+            this.dateRange=[];
+            this.getList()
+        },
+        /** 查询飞鱼线索客户列表 */
+        getList() {
+            this.loading = true;
+            let beginDate = new Date();
+            let endDate = new Date();
+            let startTime="";
+            let endTime="";
+            if(this.dateRange!=null&&this.dateRange.length==2){
+                var dateRange1=this.dateRange[0];
+                var dateRange2=this.dateRange[1];
+                if(typeof(dateRange1)==Date){
+                    beginDate=dateRange1;
+                    endDate=dateRange2;
+                }else{
+                    beginDate=new Date(dateRange1);
+                    endDate=new Date(dateRange2);
+                }
+                startTime=beginDate.getFullYear()+"-"+this.repair(beginDate.getMonth() + 1)+"-"+this.repair(beginDate.getDate());
+                endTime=endDate.getFullYear()+"-"+this.repair(endDate.getMonth() + 1)+"-"+this.repair(endDate.getDate());
+            }
+            else{
+                 beginDate.setDate(beginDate.getDate() - 7);
+                 startTime=beginDate.getFullYear()+"-"+this.repair(beginDate.getMonth() + 1)+"-"+this.repair(beginDate.getDate());
+                 endTime=endDate.getFullYear()+"-"+this.repair(endDate.getMonth() + 1)+"-"+this.repair(endDate.getDate());
+                 this.dateRange = [beginDate, endDate]; 
+             }
+             this.queryParams.startTime=startTime+" 00:00:00";
+             this.queryParams.endTime=endTime+" 23:59:59";
+             
+             getClues(this.queryParams).then(response => {
+                  this.customerLineList = response.data.list;
+                  this.total = response.data.page_info.total_number;
+                  this.loading = false;
+             });
+        },
+        /** 搜索按钮操作 */
+        handleQuery() {
+            this.queryParams.pageNum = 1;
+            this.getList();
+        },
+        /** 重置按钮操作 */
+        resetQuery() {
+            this.resetForm("queryForm");
+            this.handleQuery();
+        },
+        // 多选框选中数据
+        handleSelectionChange(selection) {
+            this.ids=selection;
+            this.single = selection.length!==1
+            this.multiple = !selection.length
+        },
+        handleImport(){
+              const ids = this.ids;
+              let that=this;
+              this.$confirm('是否确认批量导入线索客户数据', "警告", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning"
+              }).then(function() {
+                  let postData={"crmList":ids,"account":that.queryParams.account};
+                  return importThird(postData);
+              }).then(() => {
+                  this.getList();
+                  this.msgSuccess("导入成功");
+               }).catch(function() {});
+          },
+        repair(i){
+            if (i >= 0 && i <= 9) {
+                return "0" + i;
+            } else {
+                return i;
+            }
+        }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+    .app-container{
+        padding-top: 0;
+        margin-top: 0;
+        padding-left: 0;
+        padding-right: 0;
+    }
+   .el-form-item {
+        margin-bottom: 10px;
+   }   
+</style>

ファイルの差分が大きいため隠しています
+ 378 - 535
src/views/crm/customer/index.vue


+ 2 - 2
src/views/crm/customer/line.vue

@@ -267,7 +267,7 @@
 
 <script>
  import store from "@/store";
-import { importLineTemplate,getLineCustomerList ,assignToUser,getCustomerDetails,exportCustomer } from "@/api/crm/customer";
+import { importLineTemplate,listLineCustomer ,assignToUser,getCustomerDetails,exportCustomer } from "@/api/crm/customer";
 import customerDetails from '../components/customerDetails.vue';
 import { treeselect } from "@/api/company/companyDept";
 import Treeselect from "@riophae/vue-treeselect";
@@ -527,7 +527,7 @@ export default {
       else{
         this.queryParams.tags=null
       }
-      getLineCustomerList(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      listLineCustomer(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
         this.customerList = response.rows;
         this.total = response.total;
         this.loading = false;

+ 475 - 36
src/views/crm/third/index.vue

@@ -1,110 +1,549 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="关键词" prop="keyword">
-        <el-input v-model="queryParams.keyword" placeholder="请输入关键词" clearable size="small"
-          @keyup.enter.native="handleQuery" />
+      <el-form-item label="平台名称" prop="thirdName">
+        <el-input
+          v-model="queryParams.thirdName"
+          placeholder="请输入平台名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="平台类型" prop="thirdType">
+        <el-select v-model="queryParams.thirdType" placeholder="请选择平台类型" clearable size="small">
+          <el-option
+            v-for="dict in thirdTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
       </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
+
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
-          v-hasPermi="['crm:third:add']">新增</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['crm:third:add']"
+        >新增</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple"
-          @click="handleDelete" v-hasPermi="['crm:third:remove']">删除</el-button>
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['crm:third:edit']"
+        >修改</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
-          v-hasPermi="['crm:third:export']">导出</el-button>
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['crm:third:delete']"
+        >删除</el-button>
       </el-col>
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['crm:third:export']"
+        >导出</el-button>
+      </el-col> -->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-    <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="50" align="center" />
-      <el-table-column label="ID" align="center" prop="id" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+
+    <el-table v-loading="loading" :data="thirdList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="ID" width="55" align="center" prop="id" />
+      <el-table-column label="平台名称" width="80px" align="center" prop="thirdName" />
+
+      <el-table-column  label="平台类型" width="80px" align="center" prop="thirdType">
+        <template slot-scope="scope">
+          <template v-for="(item, index) in thirdTypeOptions">
+            <el-tag prop="thirdType" :key="'thirdType'+index"   v-if="scope.row.thirdType==item.dictValue">{{item.dictLabel}}</el-tag>
+          </template>
+        </template>
+      </el-table-column>
+      <el-table-column label="授权账号" width="120px" align="center" prop="account" />
+      <el-table-column label="广告主ids" width="200" align="center" prop="advertiserIds">
+        <template slot-scope="scope">
+          {{  getSubStr(scope.row.advertiserIds)   }}
+        </template>
+      </el-table-column>
+      <el-table-column label="广告主名称" width="300" align="center" prop="advertiserNames">
         <template slot-scope="scope">
-          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
-            v-hasPermi="['crm:third:edit']">修改</el-button>
-          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-            v-hasPermi="['crm:third:remove']">删除</el-button>
+          {{  getSubStr(scope.row.advertiserNames)   }}
+        </template>
+      </el-table-column>
+      <!-- <el-table-column label="appid"  align="center" prop="appId" />
+      <el-table-column label="secret" align="center" prop="appSecret" /> -->
+
+      <el-table-column label="accessToken" align="center" prop="accessToken" />
+      <el-table-column label="refreshToken" align="center" prop="refreshToken" />
+      <el-table-column  label="授权状态" width="90px" align="center" prop="status">
+        <template slot-scope="scope">
+          <template v-for="(item, index) in statusOptions">
+            <el-tag prop="status" :key="'status'+index"  :type="scope.row.accessStatus==1?'success':'info'"   v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
+          </template>
+        </template>
+      </el-table-column>
+
+      <el-table-column  label="accessToken状态"   align="center" prop="accessStatus">
+        <template slot-scope="scope">
+          <el-tag prop="accessStatus" :key="'accessStatus'+index" v-for="(item, index) in accessStatusOptions"    :type="scope.row.accessStatus==1?'success':'danger'"   v-if="scope.row.accessStatus==item.dictValue">{{item.dictLabel}}</el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column  label="refreshToken状态"   align="center" prop="refreshStatus">
+        <template slot-scope="scope">
+          <el-tag prop="refreshStatus" :key="'refreshStatus'+index" v-for="(item, index) in refreshStatusOptions"  :type="scope.row.refreshStatus==1?'success':'danger'"   v-if="scope.row.refreshStatus==item.dictValue">{{item.dictLabel}}</el-tag>
+        </template>
+      </el-table-column>
+
+      <!-- <el-table-column label="refreshToken状态" align="center" prop="refreshStatus" :formatter="refreshStatusFormat" /> -->
+
+      <el-table-column label="创建时间" align="center" prop="createTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ scope.row.createTime}}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="操作" align="center"  class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-paperclip"
+            @click="handleAuth(scope.row)"
+          >授权</el-button>
+          <!-- <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-suitcase"
+            @click="getAdvertisers(scope.row)"
+          >广告主</el-button> -->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-s-operation"
+            @click="handleFeiyuCrmLineList(scope.row)"
+          >线索</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['crm:third:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['crm:third:remove']"
+          >删除</el-button>
+
         </template>
       </el-table-column>
     </el-table>
-    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize" @pagination="getList" />
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改客户线索三方平台对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="140px">
+        <el-form-item label="平台名称" prop="thirdName">
+          <el-input v-model="form.thirdName" placeholder="请输入平台名称" />
+        </el-form-item>
+        <el-form-item label="平台类型" prop="thirdType">
+          <el-select v-model="form.thirdType" placeholder="请选择平台类型">
+            <el-option
+              v-for="dict in thirdTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="平台appid" prop="appId">
+          <el-input v-model="form.appId" placeholder="请输入平台appid" />
+        </el-form-item>
+        <el-form-item label="平台secret" prop="appSecret">
+          <el-input v-model="form.appSecret" placeholder="请输入平台secret" />
+        </el-form-item>
+        <el-form-item label="授权账号" prop="account">
+          <el-input v-model="form.account" placeholder="请输入授权账号" />
+        </el-form-item>
+        <el-form-item label="是否授权">
+          <el-radio-group  v-model="form.status">
+            <el-radio disabled
+                      v-for="dict in statusOptions"
+                      :key="dict.dictValue"
+                      :label="parseInt(dict.dictValue)"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="accessToken" prop="accessToken">
+          <el-input  v-model="form.accessToken" placeholder="请输入三方平台access_token" />
+        </el-form-item>
+        <el-form-item label="refreshToken" prop="refreshToken">
+          <el-input  v-model="form.refreshToken" placeholder="请输入三方平台refresh_token" />
+        </el-form-item>
+
+        <el-form-item label="accessToken状态" prop="accessStatus">
+          <el-select v-model="form.accessStatus"  placeholder="accessToken状态">
+            <el-option
+              v-for="dict in accessStatusOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="parseInt(dict.dictValue)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="refreshToken状态" prop="refreshStatus">
+          <el-select v-model="form.refreshStatus"  placeholder="refreshToken状态">
+            <el-option
+              v-for="dict in refreshStatusOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="parseInt(dict.dictValue)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="授权广告Ids" prop="advertiserIds" v-if="form.id!=null">
+          <el-input type="textarea" size="medium" :rows="4"  v-model="form.advertiserIds" placeholder="请输入授权广告Ids" />
+        </el-form-item>
+        <el-form-item label="授权广告名称" prop="advertiserNames" v-if="form.id!=null">
+          <el-input type="textarea" size="medium" :rows="4" v-model="form.advertiserNames" placeholder="请输入授权广告名称" />
+        </el-form-item>
+
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+
+    <el-dialog :title="feiyuCrmLineList.title" :visible.sync="feiyuCrmLineList.open" width="1200px" append-to-body>
+      <feiyu-crm-line-list  ref="feiyuCrmLineList" @close="closeFeiyuCrmList"></feiyu-crm-line-list>
+    </el-dialog>
+
+
   </div>
 </template>
 
 <script>
-import { listCrmThird, getCrmThird, delCrmThird, addCrmThird, updateCrmThird, exportCrmThird } from "@/api/crm/third";
+import { listThird, getThird, delThird, addThird, updateThird, exportThird,saveFeiyuAuth,getAdvertisers } from "@/api/crm/third";
+import feiyuCrmLineList from '../components/feiyuCrmLineList.vue';
 
 export default {
-  name: "CrmThird",
+  name: "Third",
+  components: { feiyuCrmLineList },
   data() {
     return {
+      feiyuCrmLineList:{
+        title:"飞鱼线索客户",
+        open:false,
+      },
+      // 遮罩层
       loading: true,
+      // 选中数组
       ids: [],
+      // 非单个禁用
       single: true,
+      // 非多个禁用
       multiple: true,
+      // 显示搜索条件
       showSearch: true,
+      // 总条数
       total: 0,
-      list: [],
+      // 客户线索三方平台表格数据
+      thirdList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      state:null,
+      authCode:null,
+      // 平台类型字典
+      thirdTypeOptions: [],
+      // 状态  0未授权 1 已授权字典
+      statusOptions: [],
+      // token状态  0未获取  1已生效  2已过期字典
+      accessStatusOptions: [],
+      // token状态  0未获取  1已生效  2已过期字典
+      refreshStatusOptions: [],
+      // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        keyword: null
+        thirdName: null,
+        thirdType: null,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        thirdName: [
+          { required: true, message: "请输入平台名称", trigger: "blur" }
+        ],
+        thirdType: [
+          { required: true, message: "请输入平台类型", trigger: "blur" }
+        ],
+        appId: [
+          { required: true, message: "请输入appId", trigger: "blur" }
+        ],
+        appSecret: [
+          { required: true, message: "请输入appSecret", trigger: "blur" }
+        ],
       }
     };
   },
   created() {
+
+    this.getDicts("crm_third_type").then(response => {
+      this.thirdTypeOptions = response.data;
+    });
+    this.getDicts("crm_third_status").then((response) => {
+      this.statusOptions = response.data;
+    });
+
+    this.getDicts("crm_third_token_status").then(response => {
+      this.accessStatusOptions = response.data;
+    });
+    this.getDicts("crm_third_token_status").then(response => {
+      this.refreshStatusOptions = response.data;
+    });
     this.getList();
+    this.initParams();
   },
   methods: {
+    /** 查询客户线索三方平台列表 */
     getList() {
       this.loading = true;
-      listCrmThird(this.queryParams).then(response => {
-        this.list = response.rows;
+      listThird(this.queryParams).then(response => {
+        this.thirdList = response.rows;
+        console.log("qxj thirdList",JSON.stringify(this.thirdList));
         this.total = response.total;
         this.loading = false;
       });
     },
+
+    initParams(){
+      if(!!this.$route.query.state){
+        this.state=this.$route.query.state;
+      }
+      if(!!this.$route.query.auth_code){
+        this.authCode=this.$route.query.auth_code;
+        setTimeout(() => {
+          this.saveFeiyuAuth();
+        }, 1000);
+      }
+    },
+
+    // 平台类型字典翻译
+    thirdTypeFormat(row, column) {
+      return this.selectDictLabel(this.thirdTypeOptions, row.thirdType);
+    },
+
+    // token状态  0未获取  1已生效  2已过期字典翻译
+    accessStatusFormat(row, column) {
+      return this.selectDictLabel(this.accessStatusOptions, row.accessStatus);
+    },
+    // token状态  0未获取  1已生效  2已过期字典翻译
+    refreshStatusFormat(row, column) {
+      return this.selectDictLabel(this.refreshStatusOptions, row.refreshStatus);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        thirdName: null,
+        thirdType: null,
+        appId: null,
+        appSecret: null,
+        account: null,
+        status: '0',
+        accessStatus: null,
+        refreshStatus: null,
+        accessToken: null,
+        refreshToken: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
       this.getList();
     },
+    /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
       this.handleQuery();
     },
+    // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id);
-      this.single = selection.length !== 1;
-      this.multiple = !selection.length;
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
     },
+    /** 新增按钮操作 */
     handleAdd() {
-      this.$message.info("新增功能开发中");
+      this.reset();
+      this.open = true;
+      this.title = "添加客户线索三方平台";
     },
+    /** 修改按钮操作 */
     handleUpdate(row) {
-      this.$message.info("修改功能开发中");
+      this.reset();
+      const id = row.id || this.ids
+      getThird(id).then(response => {
+        this.form = response.data;
+        this.form.thirdType = response.data.thirdType.toString();
+        this.open = true;
+        this.title = "修改客户线索三方平台";
+      });
     },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateThird(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          } else {
+            addThird(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
     handleDelete(row) {
-      this.$modal.confirm("是否确认删除?").then(() => {
-        return delCrmThird(row.id || this.ids);
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除客户线索三方平台编号为"' + ids + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return delThird(ids);
       }).then(() => {
         this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+        this.msgSuccess("删除成功");
+      }).catch(function() {});
     },
+    /** 导出按钮操作 */
     handleExport() {
-      this.download("crm/third/export", { ...this.queryParams }, `平台线索.xlsx`);
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有客户线索三方平台数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return exportThird(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      }).catch(function() {});
+    },
+    handleAuth(row){
+      var scopeUrl="";
+      if(row.thirdType==1){
+        if (process.env.NODE_ENV === "development"){
+          scopeUrl="https://open.oceanengine.com/audit/oauth.html?app_id="+row.appId+"&state="+row.id+"&redirect_uri=http%3A%2F%2Flocalhost%3A1024%2Fcustomer%2FfeiyuOauthCallback/";
+        }else{
+          scopeUrl="https://open.oceanengine.com/audit/oauth.html?app_id="+row.appId+"&state="+row.id+"&redirect_uri=http%3A%2F%2Fadmin.yjf.runtzh.com%2Fcustomer%2FfeiyuOauthCallback%2F";
+        }
+      }
+      //scopeUrl=encodeURI(scopeUrl)
+      console.log("qxj process.env.NODE_ENV:",process.env.NODE_ENV);
+      window.location.href = scopeUrl;
+    },
+    saveFeiyuAuth(){
+      var data={"authCode":this.authCode,"thirdId":parseInt(this.state)};
+      saveFeiyuAuth(data).then(response => {
+        if (response.code === 200) {
+          this.msgSuccess("授权成功");
+          this.getList();
+        }
+      });
+    },
+    getAdvertisers(row){
+      getAdvertisers(row).then(response => {
+        if (response.code === 200) {
+          this.msgSuccess("获取成功");
+          this.getList();
+        }
+      });
+    },
+    handleFeiyuCrmLineList(row){
+      //this.feiyuCrmLineList.title=row.thirdName;
+      this.feiyuCrmLineList.open=true;
+      var that=this;
+      setTimeout(() => {
+        that.$refs.feiyuCrmLineList.getData(row);
+      }, 200);
+    },
+    closeFeiyuCrmList(){
+      this.feiyuCrmLineList.open=false;
+      this.getList();
+    },
+    getSubStr(sorstr){
+      var formatStr="";
+      if(!!sorstr){
+        formatStr=sorstr.length>200?sorstr.substr(0,200)+"...":sorstr;
+      }
+      return formatStr;
     }
   }
 };
-</script>
+</script>

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません