user.js 7.3 KB

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