user.js 6.5 KB

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