user.js 6.7 KB

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