user.js 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  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 addQwUserName(id) {
  96. return request({
  97. url: '/qw/user/syncName/' + id,
  98. method: 'post',
  99. })
  100. }
  101. // 修改企微用户
  102. export function updateUser(data) {
  103. return request({
  104. url: '/qw/user',
  105. method: 'put',
  106. data: data
  107. })
  108. }
  109. export function updateIsAuto(data) {
  110. return request({
  111. url: '/qw/user/updateIsAuto',
  112. method: 'post',
  113. data: data
  114. })
  115. }
  116. // 绑定Ai客服
  117. export function qwUserBindAi(data) {
  118. return request({
  119. url: '/qw/user/bindAi',
  120. method: 'put',
  121. data: data
  122. })
  123. }
  124. //解绑AI客服
  125. export function relieveFastGptRoleById(id) {
  126. return request({
  127. url: '/qw/user/relieveFastGptRoleById/' + id,
  128. method: 'get'
  129. })
  130. }
  131. //绑定企微用户
  132. export function bindQwUser(data) {
  133. return request({
  134. url: '/qw/user/bindQwUser',
  135. method: 'put',
  136. data: data
  137. })
  138. }
  139. //修改企微用户的欢迎语管理
  140. export function updateUserWeclome(data) {
  141. return request({
  142. url: '/qw/user/weclomeQwUser',
  143. method: 'post',
  144. data: data
  145. })
  146. }
  147. // 删除企微用户
  148. export function delUser(id) {
  149. return request({
  150. url: '/qw/user/' + id,
  151. method: 'delete'
  152. })
  153. }
  154. // 导出企微用户
  155. export function exportUser(query) {
  156. return request({
  157. url: '/qw/user/export',
  158. method: 'get',
  159. params: query
  160. })
  161. }
  162. // 导出企微员工
  163. export function exportStaff(query) {
  164. return request({
  165. url: '/qw/user/exportStaff',
  166. method: 'get',
  167. params: query
  168. })
  169. }
  170. /**
  171. * 登录企业微信(发起登录)
  172. */
  173. export function getQwIpad(data) {
  174. return request({
  175. url: '/qw/user/getQwIpad',
  176. method: 'post',
  177. data: data
  178. })
  179. }
  180. export function changeVideoStatus(id) {
  181. return request({
  182. url: '/qw/user/changeVideoStatus',
  183. method: 'get',
  184. params: {id}
  185. })
  186. }
  187. export function delQwIpad(data) {
  188. return request({
  189. url: '/qw/user/delQwIpad',
  190. method: 'post',
  191. data: data
  192. })
  193. }
  194. /**
  195. * 登录企业微信(发起登录)
  196. */
  197. export function loginQwCode(data) {
  198. return request({
  199. url: '/qw/user/loginQwCode',
  200. method: 'post',
  201. data: data
  202. })
  203. }
  204. /**
  205. * 登录企业微信(发起登录)
  206. */
  207. export function loginQwIpad(data) {
  208. return request({
  209. url: '/qw/user/loginQwIpad',
  210. method: 'post',
  211. data: data
  212. })
  213. }
  214. export function updateSendType(data) {
  215. return request({
  216. url: '/qw/user/updateSendType',
  217. method: 'post',
  218. data: data
  219. })
  220. }
  221. /**
  222. * 获取登录状态
  223. */
  224. export function qrCodeStatus(data) {
  225. return request({
  226. url: '/qw/user/qrCodeStatus',
  227. method: 'post',
  228. data: data
  229. })
  230. }
  231. export function qrCodeVerify(data) {
  232. return request({
  233. url: '/qw/user/qrCodeVerify',
  234. method: 'post',
  235. data: data
  236. })
  237. }
  238. export function outLoginQwIpad(data) {
  239. return request({
  240. url: '/qw/user/outLoginQwIpad',
  241. method: 'post',
  242. data: data
  243. })
  244. }
  245. export function twoCode(data) {
  246. return request({
  247. url: '/qw/user/twoCode',
  248. method: 'post',
  249. data: data
  250. })
  251. }
  252. export function twoCodeStatus(data) {
  253. return request({
  254. url: '/qw/user/twoCodeStatus',
  255. method: 'post',
  256. data: data
  257. })
  258. }
  259. /**
  260. * 取redis里的登录二维码
  261. */
  262. export function getQwCodeUrl(data) {
  263. return request({
  264. url: '/qw/user/getQwCodeUrl',
  265. method: 'post',
  266. data: data
  267. })
  268. }
  269. /**
  270. * 登录请求-刷新获取二维码
  271. */
  272. export function loginQwCodeUrl(data) {
  273. return request({
  274. url: '/qw/user/loginQwCodeUrl',
  275. method: 'post',
  276. data: data
  277. })
  278. }
  279. /**
  280. * 登录企业微信(传输验证信息)
  281. */
  282. export function loginQwCodeMsg(data) {
  283. return request({
  284. url: '/qw/user/loginQwCodeMsg',
  285. method: 'post',
  286. data: data
  287. })
  288. }
  289. /**
  290. * 退出企业微信
  291. */
  292. export function logoutQwLogout(data) {
  293. return request({
  294. url: '/qw/user/logoutQwLogout',
  295. method: 'post',
  296. data: data
  297. })
  298. }
  299. /**
  300. * 查询登录状态
  301. */
  302. export function getLoginQwStatus(data) {
  303. return request({
  304. url: '/qw/user/getLoginQwStatus',
  305. method: 'post',
  306. data: data
  307. })
  308. }
  309. /**
  310. * 企业微信员工账号 直接授权key
  311. */
  312. export function handleAuthAppKey(data) {
  313. return request({
  314. url: '/qw/user/authAppKey',
  315. method: 'post',
  316. data: data
  317. })
  318. }
  319. /**
  320. * 企业微信员工账号 输入的授权key
  321. */
  322. export function handleInputAuthAppKey(data) {
  323. return request({
  324. url: '/qw/user/handleInputAuthAppKey',
  325. method: 'post',
  326. data: data
  327. })
  328. }
  329. // 分配异地主机
  330. export function handleAllocateRemoteHost(data) {
  331. return request({
  332. url: '/qw/user/allocateRemoteHost',
  333. method: 'post',
  334. data
  335. });
  336. }
  337. /**
  338. * 企业微信员工账号 绑定 云主机
  339. */
  340. export function qwBindCloudHost(appkey) {
  341. return request({
  342. url: '/qw/user/qwBindCloudHost/'+appkey,
  343. method: 'get',
  344. })
  345. }
  346. /**
  347. * 企业微信员工账号 解除绑定 云主机
  348. */
  349. export function qwUnbindCloudHost(appkey) {
  350. return request({
  351. url: '/qw/user/qwUnbindCloudHost/'+appkey,
  352. method: 'get',
  353. })
  354. }
  355. /**
  356. * 获取云主机的账密
  357. */
  358. export function selectCloudAP(data) {
  359. return request({
  360. url: '/qw/user/selectCloudAP',
  361. method: 'post',
  362. data: data
  363. })
  364. }
  365. /**
  366. * 模糊查询企微用户列表
  367. * @param params 参数
  368. * @returns {*}
  369. */
  370. export function getQwUserListLikeName(params) {
  371. return request({
  372. url: '/qw/user/getQwUserListLikeName',
  373. method: 'get',
  374. params: params
  375. })
  376. }
  377. /**
  378. * 企业微信员工账号 解除绑定 云主机
  379. */
  380. export function qwRestartCloudHost(params) {
  381. return request({
  382. url: '/qw/user/restartHost',
  383. method: 'put',
  384. params: params
  385. })
  386. }
  387. export function companyQwUserlist(params) {
  388. return request({
  389. url: '/qw/user/companyQwUserlist',
  390. method: 'get',
  391. params: params
  392. })
  393. }