work.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
  5. // +----------------------------------------------------------------------
  6. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  7. // +----------------------------------------------------------------------
  8. // | Author: CRMEB Team <admin@crmeb.com>
  9. // +----------------------------------------------------------------------
  10. import request from '@/plugins/request';
  11. /**
  12. * @description 企业微信组织架构
  13. */
  14. export function workTree() {
  15. return request({
  16. url: 'work/tree',
  17. method: 'get'
  18. });
  19. }
  20. /**
  21. * @description
  22. */
  23. export function workLabel() {
  24. return request({
  25. url: 'work/label',
  26. method: 'get'
  27. });
  28. }
  29. // adminapi/work/synchMember
  30. /**
  31. * @description 同步企业微信成员
  32. */
  33. export function workSynchMember() {
  34. return request({
  35. url: 'work/synchMember',
  36. method: 'post'
  37. });
  38. }
  39. /**
  40. * @description 获取渠道二维码分类列表
  41. */
  42. export function workChannelCate() {
  43. return request({
  44. url: 'work/channel/cate',
  45. method: 'get'
  46. });
  47. }
  48. /**
  49. * @description 获取创建渠道二维码分类表单
  50. */
  51. export function workCateCreate() {
  52. return request({
  53. url: 'work/channel/cate/create',
  54. method: 'get'
  55. });
  56. }
  57. /**
  58. * @description 获取修改渠道二维码分类表单
  59. */
  60. export function workCateEdit(id) {
  61. return request({
  62. url: `/work/channel/cate/${id}/edit`,
  63. method: 'get'
  64. });
  65. }
  66. /**
  67. * @description 删除渠道二维码分类
  68. */
  69. export function workCateDel(id) {
  70. return request({
  71. url: `/work/channel/cate/${id}`,
  72. method: 'delete'
  73. });
  74. }
  75. /**
  76. * @description 获取渠道二维码列表
  77. */
  78. export function workChannelCode(data) {
  79. return request({
  80. url: 'work/channel/code',
  81. method: 'get',
  82. params: data
  83. });
  84. }
  85. /**
  86. * @description 保存渠道二维码
  87. */
  88. export function saveWorkCode(data) {
  89. return request({
  90. url: `work/channel/code`,
  91. method: 'post',
  92. data
  93. });
  94. }
  95. /**
  96. * @description 获取渠道二维码
  97. */
  98. export function getWorkCodeInfo(id) {
  99. return request({
  100. url: `work/channel/code/${id}`,
  101. method: 'get',
  102. });
  103. }
  104. /**
  105. * @description 获取扫描渠道码添加的客户列表
  106. */
  107. export function getWorkCodeClient(params) {
  108. return request({
  109. url: `work/channel/code/client`,
  110. method: 'get',
  111. params
  112. });
  113. }
  114. /**
  115. * @description 删除渠道二维码
  116. */
  117. export function workCodeDelete(id) {
  118. return request({
  119. url: `work/channel/code/${id}`,
  120. method: 'delete',
  121. });
  122. }
  123. /**
  124. * @description 修改渠道二维码
  125. */
  126. export function workCodeUpdate(id,data) {
  127. return request({
  128. url: `work/channel/code/${id}`,
  129. method: 'put',
  130. data
  131. });
  132. }
  133. /**
  134. * @description批量移动分类
  135. */
  136. export function workBranchCate(data) {
  137. return request({
  138. url: `work/channel/code/bactch/cate`,
  139. method: 'post',
  140. data
  141. });
  142. }
  143. /**
  144. * @description 获取企业微信部门
  145. */
  146. export function workDepartment() {
  147. return request({
  148. url: `work/department`,
  149. method: 'get'
  150. });
  151. }
  152. /**
  153. * @description 获取企业微信员工列表
  154. */
  155. export function workMember(params) {
  156. return request({
  157. url: `work/member`,
  158. method: 'get',
  159. params
  160. });
  161. }
  162. /**
  163. * @description 获取企业微信客户群聊
  164. */
  165. export function workGroupChat(params) {
  166. return request({
  167. url: `work/group_chat`,
  168. method: 'get',
  169. params
  170. });
  171. }
  172. /**
  173. * @description 同步客户群
  174. */
  175. export function workGroupSynch() {
  176. return request({
  177. url: `work/group_chat/synch`,
  178. method: 'post'
  179. });
  180. }
  181. /**
  182. * @description 保存欢迎语
  183. */
  184. export function workWelcomeSave(data) {
  185. return request({
  186. url: `work/welcome`,
  187. method: 'post',
  188. data
  189. });
  190. }
  191. /**
  192. * @description 获取欢迎语列表
  193. */
  194. export function getWelcomeList(params) {
  195. return request({
  196. url: `work/welcome`,
  197. method: 'get',
  198. params
  199. });
  200. }
  201. /**
  202. * @description 欢迎语详情
  203. */
  204. export function getWelcomeInfo(id) {
  205. return request({
  206. url: `work/welcome/${id}`,
  207. method: 'get',
  208. });
  209. }
  210. /**
  211. * @description 修改欢迎语
  212. */
  213. export function welcomeUpdate(id,data) {
  214. return request({
  215. url: `work/welcome/${id}`,
  216. method: 'put',
  217. data
  218. });
  219. }
  220. /**
  221. * @description 保存自动拉群配置
  222. */
  223. export function groupChatAuthSave(data) {
  224. return request({
  225. url: `work/group_chat_auth`,
  226. method: 'post',
  227. data
  228. });
  229. }
  230. /**
  231. * @description 获取欢自动拉群配置列表
  232. */
  233. export function getGroupChatList(params) {
  234. return request({
  235. url: `work/group_chat_auth`,
  236. method: 'get',
  237. params
  238. });
  239. }
  240. /**
  241. * @description 获取欢自动拉群详情
  242. */
  243. export function getGroupChatInfo(id) {
  244. return request({
  245. url: `work/group_chat_auth/${id}`,
  246. method: 'get',
  247. });
  248. }
  249. /**
  250. * @description 修改自动拉群配置
  251. */
  252. export function UpdateGroupChat(id,data) {
  253. return request({
  254. url: `work/group_chat_auth/${id}`,
  255. method: 'put',
  256. data
  257. });
  258. }
  259. /**
  260. * @description 企业微信客户列表
  261. */
  262. export function getWorkClientList(params) {
  263. return request({
  264. url: `work/client`,
  265. method: 'get',
  266. params
  267. });
  268. }
  269. /**
  270. * @description 获取企业微信客户群聊成员
  271. */
  272. export function getGroupChatMember(params) {
  273. return request({
  274. url: `work/group_chat/member`,
  275. method: 'get',
  276. params
  277. });
  278. }
  279. /**
  280. * @description 同步企业微信客户
  281. */
  282. export function workClientSynch() {
  283. return request({
  284. url: `work/client/synch`,
  285. method: 'get'
  286. });
  287. }
  288. /**
  289. * @description 客户群统计
  290. */
  291. export function workGroupStatistics(params) {
  292. return request({
  293. url: `work/group_chat/statistics`,
  294. method: 'get',
  295. params
  296. });
  297. }
  298. /**
  299. * @description 客户群统计列表数据
  300. */
  301. export function workGroupStatisticsList(params) {
  302. return request({
  303. url: `work/group_chat/statisticsList`,
  304. method: 'get',
  305. params
  306. });
  307. }
  308. /**
  309. * @description 获取客户群发列表
  310. */
  311. export function getGroupTemplateList(params) {
  312. return request({
  313. url: `work/group_template`,
  314. method: 'get',
  315. params
  316. });
  317. }
  318. /**
  319. * @description 保存客户群发
  320. */
  321. export function workGroupTemplateSave(data) {
  322. return request({
  323. url: `work/group_template`,
  324. method: 'post',
  325. data
  326. });
  327. }
  328. /**
  329. * @description 客户群发详情
  330. */
  331. export function workGroupTemplateInfo(id) {
  332. return request({
  333. url: `work/group_template/${id}`,
  334. method: 'get',
  335. });
  336. }
  337. /**
  338. * @description 删除客户群发
  339. */
  340. export function workGroupTemplateDelete(id) {
  341. return request({
  342. url: `work/group_template/${id}`,
  343. method: 'delete',
  344. });
  345. }
  346. /**
  347. * @description 企业微信朋友圈列表
  348. */
  349. export function getWorkMomenttList(params) {
  350. return request({
  351. url: `work/moment`,
  352. method: 'get',
  353. params
  354. });
  355. }
  356. /**
  357. * @description 保存企业微信发送朋友圈
  358. */
  359. export function workMomentSave(data) {
  360. return request({
  361. url: `/work/moment`,
  362. method: 'post',
  363. data
  364. });
  365. }
  366. /**
  367. * @description 获取客户群群发列表
  368. */
  369. export function getGroupTemplateChatList(params) {
  370. return request({
  371. url: `work/group_template_chat`,
  372. method: 'get',
  373. params
  374. });
  375. }
  376. /**
  377. * @description 保存客户群群发
  378. */
  379. export function workGroupTemplateChatSave(data) {
  380. return request({
  381. url: `work/group_template_chat`,
  382. method: 'post',
  383. data
  384. });
  385. }
  386. /**
  387. * @description 删除客户群群发
  388. */
  389. export function workGroupTemplateChatDelete(id) {
  390. return request({
  391. url: `work/group_template_chat/${id}`,
  392. method: 'delete',
  393. });
  394. }
  395. /**
  396. * @description 获取客户群群发详情
  397. */
  398. export function workGroupTemplateChatInfo(id) {
  399. return request({
  400. url: `work/group_template_chat/${id}`,
  401. method: 'get',
  402. });
  403. }
  404. /**
  405.  * @description 提醒发送
  406.  */
  407.  export function workGroupTemplateSendMsg(data) {
  408. return request({
  409. url: `work/group_template/sendMessage`,
  410. method: 'post',
  411. data
  412. });
  413. }
  414. /**
  415.  * @description 查找成员下的跟踪客户
  416.  */
  417.  export function workClientCount(data) {
  418. return request({
  419. url: `work/client/count`,
  420. method: 'post',
  421. data
  422. });
  423. }
  424. /**
  425. * @description 获取群发成员列表
  426. */
  427. export function groupTemplateMemberList(id,params) {
  428. return request({
  429. url: `work/group_template/memberList/${id}`,
  430. method: 'get',
  431. params
  432. });
  433. }
  434. /**
  435. * @description 获取群发客户列表
  436. */
  437. export function groupTemplateClientList(id,params) {
  438. return request({
  439. url: `work/group_template/clientList/${id}`,
  440. method: 'get',
  441. params
  442. });
  443. }
  444. /**
  445. * @description 获取群发群列表
  446. */
  447. export function groupChatList(id,params) {
  448. return request({
  449. url: `work/group_template_chat/groupChatList/${id}`,
  450. method: 'get',
  451. params
  452. });
  453. }
  454. /**
  455. * @description 获取群发群主列表
  456. */
  457. export function groupChatOwnerList(id,params) {
  458. return request({
  459. url: `work/group_template_chat/groupChatOwnerList/${id}`,
  460. method: 'get',
  461. params
  462. });
  463. }
  464. /**
  465. * @description 获取群发群主下的群列表
  466. */
  467. export function groupOwnerChatList(params) {
  468. return request({
  469. url: `work/group_template_chat/getOwnerChatList`,
  470. method: 'get',
  471. params
  472. });
  473. }
  474. /**
  475.  * @description 批量设置企业微信客户标签
  476.  */
  477. export function workClientBatchLabel(data) {
  478. return request({
  479. url: `work/client/batchLabel`,
  480. method: 'post',
  481. data
  482. });
  483. }
  484. /**
  485. * @description 企业微信发送朋友圈详情
  486. */
  487. export function workMomentInfo(id) {
  488. return request({
  489. url: `work/moment/${id}`,
  490. method: 'get'
  491. });
  492. }
  493. /**
  494. * @description 获取企业微信发送过朋友圈成员列表
  495. */
  496. export function workMomentList(params) {
  497. return request({
  498. url: `work/moment_list`,
  499. method: 'get',
  500. params
  501. });
  502. }
  503. /**
  504. * @description 修改企业微信客户
  505. */
  506. export function workClientEdit(id,data) {
  507. return request({
  508. url: `work/client/${id}`,
  509. method: 'put',
  510. data
  511. });
  512. }