user.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. import request from '@/utils/request'
  2. // 查询企微员工列表
  3. export function staffListUser(query) {
  4. return request({
  5. url: '/qw/user/staffList',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. export function myStaffListUser(query) {
  11. return request({
  12. url: '/qw/user/myStaffList',
  13. method: 'get',
  14. params: query
  15. })
  16. }
  17. export function myDepartListUser(query) {
  18. return request({
  19. url: '/qw/user/myDepartList',
  20. method: 'get',
  21. params: query
  22. })
  23. }
  24. // 查询企微用户列表
  25. export function listUser(query) {
  26. return request({
  27. url: '/qw/user/list',
  28. method: 'get',
  29. params: query
  30. })
  31. }
  32. // 查询企微用户列表
  33. export function userList(query) {
  34. return request({
  35. url: '/qw/user/userList',
  36. method: 'get',
  37. params: query
  38. })
  39. }
  40. export function qwUserList(id) {
  41. return request({
  42. url: '/qw/user/qwUserList/' + id,
  43. method: 'get',
  44. })
  45. }
  46. export function getQwUserList(query) {
  47. return request({
  48. url: '/qw/user/getQwUserList',
  49. method: 'get',
  50. params: query
  51. })
  52. }
  53. export function getMyQwUserList(query) {
  54. return request({
  55. url: '/qw/user/getMyQwUserList',
  56. method: 'get',
  57. params: query
  58. })
  59. }
  60. export function getMyQwCompanyList(query) {
  61. return request({
  62. url: '/qw/user/getMyQwCompanyList',
  63. method: 'get',
  64. params: query
  65. })
  66. }
  67. // 查询企微用户详细
  68. export function getQwUser(id) {
  69. return request({
  70. url: '/qw/user/' + id,
  71. method: 'get'
  72. })
  73. }
  74. //批量查询企微用户详细
  75. export function getQwUserByIds(ids) {
  76. return request({
  77. url: '/qw/user/getInfo/' + ids,
  78. method: 'get'
  79. })
  80. }
  81. // 新增企微用户
  82. export function addUser(data) {
  83. return request({
  84. url: '/qw/user',
  85. method: 'post',
  86. data: data
  87. })
  88. }
  89. export function addQwUser(id) {
  90. return request({
  91. url: '/qw/user/sync/' + id,
  92. method: 'post',
  93. })
  94. }
  95. export function addQwSyncUser(id) {
  96. return request({
  97. url: '/qw/user/syncUser/' + id,
  98. method: 'post',
  99. })
  100. }
  101. export function addQwUserName(id) {
  102. return request({
  103. url: '/qw/user/syncName/' + id,
  104. method: 'post',
  105. })
  106. }
  107. // 修改企微用户
  108. export function updateUser(data) {
  109. return request({
  110. url: '/qw/user',
  111. method: 'put',
  112. data: data
  113. })
  114. }
  115. export function updateIsAuto(data) {
  116. return request({
  117. url: '/qw/user/updateIsAuto',
  118. method: 'post',
  119. data: data
  120. })
  121. }
  122. // 绑定Ai客服
  123. export function qwUserBindAi(data) {
  124. return request({
  125. url: '/qw/user/bindAi',
  126. method: 'put',
  127. data: data
  128. })
  129. }
  130. //解绑AI客服
  131. export function relieveFastGptRoleById(id) {
  132. return request({
  133. url: '/qw/user/relieveFastGptRoleById/' + id,
  134. method: 'get'
  135. })
  136. }
  137. //绑定企微用户
  138. export function bindQwUser(data) {
  139. return request({
  140. url: '/qw/user/bindQwUser',
  141. method: 'put',
  142. data: data
  143. })
  144. }
  145. //修改企微用户的欢迎语管理
  146. export function updateUserWeclome(data) {
  147. return request({
  148. url: '/qw/user/weclomeQwUser',
  149. method: 'post',
  150. data: data
  151. })
  152. }
  153. // 删除企微用户
  154. export function delUser(id) {
  155. return request({
  156. url: '/qw/user/' + id,
  157. method: 'delete'
  158. })
  159. }
  160. // 导出企微用户
  161. export function exportUser(query) {
  162. return request({
  163. url: '/qw/user/export',
  164. method: 'get',
  165. params: query
  166. })
  167. }
  168. // 导出企微员工
  169. export function exportStaff(query) {
  170. return request({
  171. url: '/qw/user/exportStaff',
  172. method: 'get',
  173. params: query
  174. })
  175. }
  176. /**
  177. * 登录企业微信(发起登录)
  178. */
  179. export function getQwIpad(data) {
  180. return request({
  181. url: '/qw/user/getQwIpad',
  182. method: 'post',
  183. data: data
  184. })
  185. }
  186. export function changeVideoStatus(id) {
  187. return request({
  188. url: '/qw/user/changeVideoStatus',
  189. method: 'get',
  190. params: {id}
  191. })
  192. }
  193. export function delQwIpad(data) {
  194. return request({
  195. url: '/qw/user/delQwIpad',
  196. method: 'post',
  197. data: data
  198. })
  199. }
  200. /**
  201. * 登录企业微信(发起登录)
  202. */
  203. export function loginQwCode(data) {
  204. return request({
  205. url: '/qw/user/loginQwCode',
  206. method: 'post',
  207. data: data
  208. })
  209. }
  210. /**
  211. * 登录企业微信(发起登录)
  212. */
  213. export function loginQwIpad(data) {
  214. return request({
  215. url: '/qw/user/loginQwIpad',
  216. method: 'post',
  217. data: data
  218. })
  219. }
  220. export function updateSendType(data) {
  221. return request({
  222. url: '/qw/user/updateSendType',
  223. method: 'post',
  224. data: data
  225. })
  226. }
  227. /**
  228. * 获取登录状态
  229. */
  230. export function qrCodeStatus(data) {
  231. return request({
  232. url: '/qw/user/qrCodeStatus',
  233. method: 'post',
  234. data: data
  235. })
  236. }
  237. export function qrCodeVerify(data) {
  238. return request({
  239. url: '/qw/user/qrCodeVerify',
  240. method: 'post',
  241. data: data
  242. })
  243. }
  244. export function outLoginQwIpad(data) {
  245. return request({
  246. url: '/qw/user/outLoginQwIpad',
  247. method: 'post',
  248. data: data
  249. })
  250. }
  251. export function twoCode(data) {
  252. return request({
  253. url: '/qw/user/twoCode',
  254. method: 'post',
  255. data: data
  256. })
  257. }
  258. export function twoCodeStatus(data) {
  259. return request({
  260. url: '/qw/user/twoCodeStatus',
  261. method: 'post',
  262. data: data
  263. })
  264. }
  265. /**
  266. * 取redis里的登录二维码
  267. */
  268. export function getQwCodeUrl(data) {
  269. return request({
  270. url: '/qw/user/getQwCodeUrl',
  271. method: 'post',
  272. data: data
  273. })
  274. }
  275. /**
  276. * 登录请求-刷新获取二维码
  277. */
  278. export function loginQwCodeUrl(data) {
  279. return request({
  280. url: '/qw/user/loginQwCodeUrl',
  281. method: 'post',
  282. data: data
  283. })
  284. }
  285. /**
  286. * 登录企业微信(传输验证信息)
  287. */
  288. export function loginQwCodeMsg(data) {
  289. return request({
  290. url: '/qw/user/loginQwCodeMsg',
  291. method: 'post',
  292. data: data
  293. })
  294. }
  295. /**
  296. * 退出企业微信
  297. */
  298. export function logoutQwLogout(data) {
  299. return request({
  300. url: '/qw/user/logoutQwLogout',
  301. method: 'post',
  302. data: data
  303. })
  304. }
  305. /**
  306. * 查询登录状态
  307. */
  308. export function getLoginQwStatus(data) {
  309. return request({
  310. url: '/qw/user/getLoginQwStatus',
  311. method: 'post',
  312. data: data
  313. })
  314. }
  315. /**
  316. * 企业微信员工账号 直接授权key
  317. */
  318. export function handleAuthAppKey(data) {
  319. return request({
  320. url: '/qw/user/authAppKey',
  321. method: 'post',
  322. data: data
  323. })
  324. }
  325. /**
  326. * 企业微信员工账号 输入的授权key
  327. */
  328. export function handleInputAuthAppKey(data) {
  329. return request({
  330. url: '/qw/user/handleInputAuthAppKey',
  331. method: 'post',
  332. data: data
  333. })
  334. }
  335. // 分配异地主机
  336. export function handleAllocateRemoteHost(data) {
  337. return request({
  338. url: '/qw/user/allocateRemoteHost',
  339. method: 'post',
  340. data
  341. });
  342. }
  343. /**
  344. * 企业微信员工账号 绑定 云主机
  345. */
  346. export function qwBindCloudHost(appkey) {
  347. return request({
  348. url: '/qw/user/qwBindCloudHost/'+appkey,
  349. method: 'get',
  350. })
  351. }
  352. /**
  353. * 企业微信员工账号 解除绑定 云主机
  354. */
  355. export function qwUnbindCloudHost(appkey) {
  356. return request({
  357. url: '/qw/user/qwUnbindCloudHost/'+appkey,
  358. method: 'get',
  359. })
  360. }
  361. /**
  362. * 获取云主机的账密
  363. */
  364. export function selectCloudAP(data) {
  365. return request({
  366. url: '/qw/user/selectCloudAP',
  367. method: 'post',
  368. data: data
  369. })
  370. }
  371. /**
  372. * 模糊查询企微用户列表
  373. * @param params 参数
  374. * @returns {*}
  375. */
  376. export function getQwUserListLikeName(params) {
  377. return request({
  378. url: '/qw/user/getQwUserListLikeName',
  379. method: 'get',
  380. params: params
  381. })
  382. }
  383. /**
  384. * 企业微信员工账号 解除绑定 云主机
  385. */
  386. export function qwRestartCloudHost(params) {
  387. return request({
  388. url: '/qw/user/restartHost',
  389. method: 'put',
  390. params: params
  391. })
  392. }
  393. export function companyQwUserlist(params) {
  394. return request({
  395. url: '/qw/user/companyQwUserlist',
  396. method: 'get',
  397. params: params
  398. })
  399. }
  400. /**
  401. * 修改ai客服上下线
  402. */
  403. export function updateFastGptRoleStatusById(id) {
  404. return request({
  405. url: '/qw/user/updateFastGptRoleStatusById/' + id,
  406. method: 'get'
  407. })
  408. }