user.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  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. export function exportStaff(query) {
  157. return request({
  158. url: '/qw/user/exportStaff',
  159. method: 'get',
  160. params: query
  161. })
  162. }
  163. /**
  164. * 登录企业微信(发起登录)
  165. */
  166. export function getQwIpad(data) {
  167. return request({
  168. url: '/qw/user/getQwIpad',
  169. method: 'post',
  170. data: data
  171. })
  172. }
  173. export function changeVideoStatus(id) {
  174. return request({
  175. url: '/qw/user/changeVideoStatus',
  176. method: 'get',
  177. params: {id}
  178. })
  179. }
  180. export function delQwIpad(data) {
  181. return request({
  182. url: '/qw/user/delQwIpad',
  183. method: 'post',
  184. data: data
  185. })
  186. }
  187. /**
  188. * 登录企业微信(发起登录)
  189. */
  190. export function loginQwCode(data) {
  191. return request({
  192. url: '/qw/user/loginQwCode',
  193. method: 'post',
  194. data: data
  195. })
  196. }
  197. /**
  198. * 登录企业微信(发起登录)
  199. */
  200. export function loginQwIpad(data) {
  201. return request({
  202. url: '/qw/user/loginQwIpad',
  203. method: 'post',
  204. data: data
  205. })
  206. }
  207. export function updateSendType(data) {
  208. return request({
  209. url: '/qw/user/updateSendType',
  210. method: 'post',
  211. data: data
  212. })
  213. }
  214. /**
  215. * 获取登录状态
  216. */
  217. export function qrCodeStatus(data) {
  218. return request({
  219. url: '/qw/user/qrCodeStatus',
  220. method: 'post',
  221. data: data
  222. })
  223. }
  224. export function qrCodeVerify(data) {
  225. return request({
  226. url: '/qw/user/qrCodeVerify',
  227. method: 'post',
  228. data: data
  229. })
  230. }
  231. export function outLoginQwIpad(data) {
  232. return request({
  233. url: '/qw/user/outLoginQwIpad',
  234. method: 'post',
  235. data: data
  236. })
  237. }
  238. export function twoCode(data) {
  239. return request({
  240. url: '/qw/user/twoCode',
  241. method: 'post',
  242. data: data
  243. })
  244. }
  245. export function twoCodeStatus(data) {
  246. return request({
  247. url: '/qw/user/twoCodeStatus',
  248. method: 'post',
  249. data: data
  250. })
  251. }
  252. /**
  253. * 取redis里的登录二维码
  254. */
  255. export function getQwCodeUrl(data) {
  256. return request({
  257. url: '/qw/user/getQwCodeUrl',
  258. method: 'post',
  259. data: data
  260. })
  261. }
  262. /**
  263. * 登录请求-刷新获取二维码
  264. */
  265. export function loginQwCodeUrl(data) {
  266. return request({
  267. url: '/qw/user/loginQwCodeUrl',
  268. method: 'post',
  269. data: data
  270. })
  271. }
  272. /**
  273. * 登录企业微信(传输验证信息)
  274. */
  275. export function loginQwCodeMsg(data) {
  276. return request({
  277. url: '/qw/user/loginQwCodeMsg',
  278. method: 'post',
  279. data: data
  280. })
  281. }
  282. /**
  283. * 退出企业微信
  284. */
  285. export function logoutQwLogout(data) {
  286. return request({
  287. url: '/qw/user/logoutQwLogout',
  288. method: 'post',
  289. data: data
  290. })
  291. }
  292. /**
  293. * 查询登录状态
  294. */
  295. export function getLoginQwStatus(data) {
  296. return request({
  297. url: '/qw/user/getLoginQwStatus',
  298. method: 'post',
  299. data: data
  300. })
  301. }
  302. /**
  303. * 企业微信员工账号 直接授权key
  304. */
  305. export function handleAuthAppKey(data) {
  306. return request({
  307. url: '/qw/user/authAppKey',
  308. method: 'post',
  309. data: data
  310. })
  311. }
  312. /**
  313. * 企业微信员工账号 输入的授权key
  314. */
  315. export function handleInputAuthAppKey(data) {
  316. return request({
  317. url: '/qw/user/handleInputAuthAppKey',
  318. method: 'post',
  319. data: data
  320. })
  321. }
  322. // 分配异地主机
  323. export function handleAllocateRemoteHost(data) {
  324. return request({
  325. url: '/qw/user/allocateRemoteHost',
  326. method: 'post',
  327. data
  328. });
  329. }
  330. /**
  331. * 企业微信员工账号 绑定 云主机
  332. */
  333. export function qwBindCloudHost(appkey) {
  334. return request({
  335. url: '/qw/user/qwBindCloudHost/'+appkey,
  336. method: 'get',
  337. })
  338. }
  339. /**
  340. * 企业微信员工账号 解除绑定 云主机
  341. */
  342. export function qwUnbindCloudHost(appkey) {
  343. return request({
  344. url: '/qw/user/qwUnbindCloudHost/'+appkey,
  345. method: 'get',
  346. })
  347. }
  348. /**
  349. * 获取云主机的账密
  350. */
  351. export function selectCloudAP(data) {
  352. return request({
  353. url: '/qw/user/selectCloudAP',
  354. method: 'post',
  355. data: data
  356. })
  357. }
  358. /**
  359. * 模糊查询企微用户列表
  360. * @param params 参数
  361. * @returns {*}
  362. */
  363. export function getQwUserListLikeName(params) {
  364. return request({
  365. url: '/qw/user/getQwUserListLikeName',
  366. method: 'get',
  367. params: params
  368. })
  369. }
  370. /**
  371. * 企业微信员工账号 解除绑定 云主机
  372. */
  373. export function qwRestartCloudHost(params) {
  374. return request({
  375. url: '/qw/user/restartHost',
  376. method: 'put',
  377. params: params
  378. })
  379. }
  380. export function companyQwUserlist(params) {
  381. return request({
  382. url: '/qw/user/companyQwUserlist',
  383. method: 'get',
  384. params: params
  385. })
  386. }