setApi.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  1. import http from "@/api/http.js"
  2. /* 部门管理模块 */
  3. const departInterence = {
  4. //系统用户详情
  5. systemUserInfo:params=>{
  6. return http.get('/system/sysuser/detail',{})
  7. },
  8. //获取系统用户(树形格式)
  9. getSystemUser:params=>{
  10. return http.get("/system/department/user_tree",params)
  11. },
  12. /**
  13. * AdminId
  14. * Enabled 0 1
  15. */
  16. statusChange: params => {
  17. return http.post('/system/sysuser/editEnabled',params)
  18. },
  19. /* 审批配置详情 */
  20. approvalFlowDetail:params=>{
  21. return http.get('/system/flow/detail',params)
  22. },
  23. /* 添加审批人搜索 */
  24. approvalUserSearch:params=>{
  25. return http.get('/system/flow/user',params)
  26. },
  27. /* 审批配置保存/编辑 */
  28. approvalFlowSave:params=>{
  29. return http.post('/system/flow/edit',params)
  30. },
  31. /* 新增部门接口
  32. "DepartmentName": "string" */
  33. addDepart: params => {
  34. return http.post('/system/department/add',params)
  35. },
  36. /* 删除部门
  37. DepartmentId int */
  38. delDepart: params => {
  39. return http.post('/system/department/delete',params)
  40. },
  41. /* 修改部门
  42. "DepartmentId": int,
  43. "DepartmentName": "string" */
  44. editDepart: params => {
  45. return http.post('/system/department/edit',params)
  46. },
  47. /* 获取部门列表 */
  48. getDepartList: params => {
  49. return http.get('/system/department/list',params)
  50. },
  51. /* 新增分组
  52. "DepartmentId": int,
  53. "GroupName": "string"
  54. */
  55. addGroup: params => {
  56. return http.post('/system/group/add',params)
  57. },
  58. /* 新增二级分组接口
  59. "DepartmentId": int,
  60. "GroupName": "string"
  61. */
  62. addTeamGroup: params => {
  63. return http.post('/system/team/add',params)
  64. },
  65. /* 删除分组
  66. "GroupId": int
  67. */
  68. delGroup: params => {
  69. return http.post('/system/group/delete',params)
  70. },
  71. /* 删除分组接口
  72. "GroupId": int
  73. */
  74. delTeamGroup: params => {
  75. return http.post('/system/team/delete',params)
  76. },
  77. /* 修改分组
  78. "GroupId": int,
  79. "GroupName": "string"
  80. DepartmentId int*/
  81. editGroup: params => {
  82. return http.post('/system/group/edit',params)
  83. },
  84. /* 修改分组
  85. "GroupId": int,
  86. "GroupName": "string"
  87. DepartmentId int*/
  88. editTeamGroup: params => {
  89. return http.post('/system/team/edit',params)
  90. },
  91. /* 新增用户
  92. "AdminName": "string",
  93. "Authority": 0,
  94. "DepartmentId": 0,
  95. "GroupId": 0,
  96. "Mobile": "string",
  97. "Password": "string",
  98. "Position": "string",
  99. "RealName": "string",
  100. "RoleId": 0*/
  101. addUser: params => {
  102. return http.post('/system/sysuser/add',params)
  103. },
  104. /* 修改用户
  105. "AdminId": 0,
  106. "AdminName": "string",
  107. "Authority": 0,
  108. "DepartmentId": 0,
  109. "GroupId": 0,
  110. "Mobile": "string",
  111. "Password": "string",
  112. "Position": "string",
  113. "RealName": "string",
  114. "RoleId": 0 */
  115. editUser: params => {
  116. return http.post('/system/sysuser/edit',params)
  117. },
  118. /* 删除用户
  119. AdminId */
  120. delUser: params => {
  121. return http.post('/system/sysuser/delete',params)
  122. },
  123. /* 获取用户列表
  124. PageSize int
  125. CurrentIndex int
  126. DepartmentId int
  127. GroupId int
  128. KeyWord */
  129. getUserList: params => {
  130. return http.get('/system/sysuser/list',params)
  131. },
  132. //获取menu
  133. getMenu:params => {
  134. return http.get('/system/menu/list',params)
  135. },
  136. /* 获取所有已添加角色 */
  137. getRole:params => {
  138. return http.get('/system/role/all',params)
  139. },
  140. /* 新增角色
  141. "RoleName": "string" */
  142. addRole: params => {
  143. return http.post('/system/role/add',params)
  144. },
  145. /* 删除角色
  146. "RoleId": 0 */
  147. delRole: params => {
  148. return http.post('/system/role/delete',params)
  149. },
  150. /* 修改角色
  151. "RoleId": 0 int,
  152. "RoleName": "string" */
  153. editRole: params => {
  154. return http.post('/system/role/edit',params)
  155. },
  156. /* 获取角色列表
  157. PageSize int
  158. CurrentIndex int
  159. KeyWord */
  160. getRoleList: params => {
  161. return http.get('/system/role/list',params)
  162. },
  163. /* 新增角色菜单权限 crm14.1上线后弃用
  164. MenuIdStr
  165. "RoleId"
  166. MenuButtonIdStr
  167. */
  168. saveAuth:params => {
  169. return http.post('/system/role/menu/add',params)
  170. },
  171. /* 获取菜单权限,crm14.1上线后弃用
  172. RoleId */
  173. getAuthList:params => {
  174. return http.get('/system/role/menu/list',params)
  175. },
  176. /* 获取所有功能权限 */
  177. getBtnAuth:params => {
  178. return http.get('/system/menu/buttons',params)
  179. },
  180. /* 获取研究方向分组列表 */
  181. getResearchGroupList:params => {
  182. return http.get('/system/research_group/list',params)
  183. },
  184. /* 获取研究员的研究方向 */
  185. getResearchGroupByAdminId:params => {
  186. return http.get('/system/research_group/admin_group',params)
  187. },
  188. /* 获取需要配置的账号列表 */
  189. getQuestionAdminList:params =>{
  190. return http.get('/system/role/seller/list',params)
  191. },
  192. /* 新增运营管理员(批量)*/
  193. addQuestionAdmins:params=>{
  194. return http.post('/system/role/admin/add',params)
  195. },
  196. /* 删除运营管理员(单个) RoleTypeCode:yb_question_admin*/
  197. deleteQuestionAdmin:params=>{
  198. return http.post('/system/role/admin/del',params)
  199. },
  200. /* 已绑定的管理员列表
  201. RoleTypeCode:yb_comment_admin/yb_question_admin
  202. */
  203. getRoleAdminList:params=>{
  204. return http.get('/system/role/admin/list',params)
  205. },
  206. /* 获取标签库数据
  207. IncludeDisableMember:1包含禁用的研究员
  208. */
  209. getTagTree:params=>{
  210. return http.get('/taglib/variety_tag/tag_tree',params)
  211. },
  212. /* 同步每刻
  213. */
  214. syncCompanyProfile:params=>{
  215. return http.post('/maycur/company_profile/sync',params)
  216. },
  217. /**
  218. * 移动用户分组
  219. * AdminId
  220. * DepartmentId
  221. * GroupId
  222. * TeamId
  223. */
  224. moveSysuser:params=>{
  225. return http.post('/system/sysuser/move',params)
  226. },
  227. /**
  228. * 重置用户密码
  229. * AdminId
  230. * Password 密码是经过md5加密后的字符串
  231. * RePassword 两次的密码要一样
  232. */
  233. resetSysuserPass:params=>{
  234. return http.post('/system/sysuser/reset_pass',params)
  235. },
  236. /**
  237. * 部门移动排序
  238. * DepartmentIds 移动的是一级部门时,移动后的排序
  239. * GroupIds 移动的是二级部门时,移动后的排序
  240. * TeamIds 移动的是三级部门时,移动后的排序
  241. */
  242. sortDepart:params=>{
  243. return http.post('/system/group/set_sort',params)
  244. },
  245. // 获取跳转到CRM系统的code
  246. getToCRMSysCode:()=>{
  247. return http.get('/sysuser/get_crm_auth_code',{})
  248. },
  249. //从其他系统跳转来用code换token
  250. useCodeLogin:params=>{
  251. return http.get('/sysuser/auth_code_login',params)
  252. },
  253. //获取角色的权限信息,包括菜单和功能 (crm14.1)
  254. //RoleId
  255. getRoleAuth:params=>{
  256. return http.get('/system/role/menu/auth_list',params)
  257. },
  258. //保存角色菜单权限 (crm14.1)
  259. //RoleId
  260. //MenuIds
  261. //HalfMenuIds
  262. saveRoleAuth:params=>{
  263. return http.post('/system/role/menu/auth_save',params)
  264. },
  265. //获取用户所有的按钮权限
  266. getRoleBtnAuth:params=>{
  267. return http.get('/system/role/menu/buttons',params)
  268. },
  269. /**
  270. * 获取图形验证码 返回Base64格式数据
  271. * @returns
  272. */
  273. getCodePic:params=>{
  274. return http.get('/user_login/get_captcha',params)
  275. },
  276. /**
  277. * 获取短信/邮箱验证码
  278. * @param {Number} VerifyType 验证方式: 1-手机号; 2-邮箱
  279. * @param {String} CaptchaId 图形验证码ID
  280. * @param {String} CaptchaCode 图形验证码的值
  281. * @param {String} Mobile 手机号 验证方式为1时必填
  282. * @param {String} Email 邮箱 验证方式为2时必填
  283. * @param {String} TelAreaCode 手机区号
  284. * @param {Number} Source 来源:1-登录;3-忘记密码
  285. * @returns
  286. */
  287. getCodeVerify:params=>{
  288. return http.post('/user_login/verify_code',params)
  289. },
  290. /**
  291. * ETA1.4后,用户登录
  292. * @param {Number} LoginType 登录方式: 1-账号; 2-手机号; 3-邮箱
  293. * @param {String} Username 用户名
  294. * @param {String} Password 密码
  295. * @param {String} Mobile 手机号
  296. * @param {String} Email 邮箱
  297. * @param {String} VerifyCode 手机号/邮箱的验证码
  298. * @returns
  299. */
  300. userLogin:params=>{
  301. return http.post('/user_login/login',params)
  302. },
  303. /**
  304. * 忘记密码账号校验,获取账号信息
  305. * @param {String} CaptchaId 图形验证码ID
  306. * @param {String} CaptchaCode 图形验证码
  307. * @param {String} UserName 账号
  308. * @returns
  309. */
  310. accountCheck:params=>{
  311. return http.post('/user_login/forget/account_get',params)
  312. },
  313. /**
  314. * 忘记密码-手机/邮箱的验证码校验
  315. * @param {Number} FindType 密码找回方式:1-手机号;2-邮箱
  316. * @param {String} VerifyCode 验证码
  317. * @param {String} UserName 用户名
  318. * @param {String} Mobile 找回方式为手机号时必填
  319. * @param {String} Email 找回方式为邮箱时必填
  320. * @returns
  321. */
  322. checkCodeVerify:params=>{
  323. return http.post('/user_login/forget/code_verify',params)
  324. },
  325. /**
  326. * 忘记密码-重置密码
  327. * @param {String} UserName
  328. * @param {String} Password
  329. * @param {String} RePassword
  330. * @returns
  331. */
  332. resetPass:params=>{
  333. return http.post('/user_login/forget/reset_pass',params)
  334. },
  335. /**
  336. * 获取手机号区号
  337. * @returns
  338. */
  339. getPhoneAreaCode:params=>{
  340. return http.get('/user_login/area_code/list',params)
  341. },
  342. // 判断用户是否为域用户
  343. checkUserIsLdap:params=>{
  344. return http.post('/user_login/ldap/user_check',params)
  345. },
  346. /**
  347. * 获取登录页的信息
  348. * @returns ETATitle登录标题 Icp备案信息
  349. */
  350. getBaseInfo:params=>{
  351. return http.get('/user_login/base_info',params)
  352. }
  353. }
  354. /* 视频管理 */
  355. const videoInterence = {
  356. /* 上传视频接口 file */
  357. upload: params => {
  358. return http.post('/resource/video/upload',params);
  359. },
  360. /* 删除视频 VideoId */
  361. delVideo: params => {
  362. return http.post('/video/delete',params)
  363. },
  364. /* 编辑视频
  365. "PlaySeconds": 0,
  366. "TagsIdStr": "string",
  367. "Title": "string",
  368. "VideoCoverUrl": "string",
  369. "VideoId": 0,
  370. "VideoUrl": "string" */
  371. editVideo: params => {
  372. return http.post('/video/edit',params)
  373. },
  374. /* 视频列表
  375. PageSize *
  376. CurrentIndex *
  377. KeyWord **/
  378. getVideoList: params => {
  379. return http.get('/video/list',params)
  380. },
  381. /* 发布 "VideoIds": "string" */
  382. publish: params => {
  383. return http.post('/video/publish',params)
  384. },
  385. /* 取消发布 "VideoIds": "string"*/
  386. cancelPublish: params => {
  387. return http.post('/video/publish/cancel',params)
  388. },
  389. /* 新增视频
  390. "PlaySeconds": 0,
  391. "TagsIdStr": "string",
  392. "Title": "string",
  393. "VideoCoverUrl": "string",
  394. "VideoUrl": "string" */
  395. saveVideo: params => {
  396. return http.post('/video/save',params)
  397. },
  398. /* 标签 */
  399. tagList: params => {
  400. return http.get('/video/tags/list',params)
  401. },
  402. }
  403. /* 互动管理 */
  404. const InteractionInterence = {
  405. /* 问答列表 */
  406. getQuestionList:params => {
  407. return http.get('/yb/community/question/list',params)
  408. },
  409. /* 分配回复人 */
  410. distributeAnswer:params => {
  411. return http.post('/yb/community/question/distribute',params)
  412. },
  413. /* 删除问答 */
  414. deleteQuestion:params => {
  415. return http.post('/yb/community/question/delete',params)
  416. },
  417. /* 推送分配消息 */
  418. sendMsg:params =>{
  419. return http.post('/yb/community/question/send_template_msg',params)
  420. },
  421. /* 编辑问题描述 */
  422. editQuestion:params=>{
  423. return http.post('/yb/community/question/edit',params)
  424. },
  425. /* 查询点击量详情列表 */
  426. questionClickLogs:params=>{
  427. return http.get('yb/community/question/click/logs',params)
  428. },
  429. /* 提问者详情 */
  430. questionUser:params=>{
  431. return http.get('yb/community/question/user',params)
  432. },
  433. questionDetail:params=>{
  434. return http.get('yb/community/question/detail',params)
  435. },
  436. // 转移问题
  437. questionTransfer:params=>{
  438. return http.post('yb/community/question/transfer',params)
  439. }
  440. }
  441. /* 数据操作权限 */
  442. const operateAuthInterface = {
  443. /**
  444. * 列表
  445. * @param {*} params
  446. * Source=5&UserId=11&CurrentIndex=1&PageSize=10 Keyword
  447. * @returns
  448. */
  449. list: params => {
  450. return http.get('/datamanage/edb_chart/list',params)
  451. },
  452. /**
  453. * 修改权限所属
  454. * @param {*} params
  455. * Source DataIdList NewUserId
  456. * @returns
  457. */
  458. authEdit: params => {
  459. return http.post('/datamanage/edb_chart/change_user',params)
  460. },
  461. /**
  462. * 修改权限所属
  463. * @param {*} params.Source - string -来源 :1:手工数据指标 2:钢联化工数据库 3:ETA指标库 4:ETA预测指标 5:图库
  464. * @returns
  465. */
  466. getClassificationBySource: params => {
  467. return http.get('/datamanage/edb_chart/classify',params)
  468. },
  469. /**
  470. * 获取指标无权限列表
  471. * @param {*} params EdbInfoId
  472. * @returns
  473. */
  474. getEdbNoAuthList: params => {
  475. return http.get('/datamanage/edb_no_permission/list',params)
  476. },
  477. /**
  478. * 设置无权限用户
  479. * @param {*} params EdbInfoId AdminIdList:[]
  480. * @returns
  481. */
  482. edbNoAuthSet: params => {
  483. return http.post('/datamanage/edb_no_permission/modify',params)
  484. },
  485. /**
  486. * 删除指标无权限 EdbInfoId AdminId
  487. * @param {*} params
  488. * @returns
  489. */
  490. edbNoAuthDel: params => {
  491. return http.post('/datamanage/edb_no_permission/delete',params)
  492. },
  493. /**
  494. * 批量配置无权限用户
  495. * @param {*} params EdbInfoIdList AdminIdList
  496. * @returns
  497. */
  498. edbNoAuthBatchSet: params => {
  499. return http.post('/datamanage/edb_no_permission/batch_add',params)
  500. },
  501. /**
  502. * 全量资产转移
  503. * @param {*} params Source NewUserId OldUserId
  504. */
  505. transferAllData: params => {
  506. return http.post('/datamanage/edb_chart/all/change_user',params)
  507. },
  508. /**
  509. * 获取用户的资产数量统计
  510. * @param {*} params UserId
  511. * @returns
  512. */
  513. getUserStatistic: params => {
  514. return http.get('/datamanage/edb_chart/count',params)
  515. },
  516. /**
  517. * 设置涉密分类
  518. * @param {*} params
  519. * "Source": 3,
  520. "SubSource": 0,
  521. "ClassifyIdList": []
  522. * @returns
  523. */
  524. setPermissionClassify: params => {
  525. return http.post('/datamanage/edb_chart/classify/permission/is_permission/set',params)
  526. },
  527. /**
  528. * 设置分类权限
  529. * @param {*} params
  530. * Source SubSource UserList[] ClassifyIdList[]
  531. * @returns
  532. */
  533. setClassifyAuth: params => {
  534. return http.post('/datamanage/edb_chart/classify/permission/set',params)
  535. },
  536. /**
  537. * 设置数据权限
  538. * @param {*} params
  539. * Source
  540. * SubSource
  541. * UserId
  542. * DataIdList
  543. * NoDataIdList
  544. * UserList
  545. * IsSelectAll
  546. * ClassifyId
  547. * Keyword
  548. */
  549. setDataAuth: params => {
  550. return http.post('/datamanage/edb_chart/permission/set',params)
  551. },
  552. /**
  553. * 根据用户获取权限分类
  554. * @param {*} params Source SubSource UserId
  555. * @returns
  556. */
  557. getSecretClassifyByUser: params => {
  558. return http.get('/datamanage/edb_chart/classify/permission/show_by_user',params)
  559. },
  560. /**
  561. * 根据数据获取权限用户
  562. * @param {*} params Source SubSource DataId
  563. * @returns
  564. */
  565. getAuthUserByData: params => {
  566. return http.get('/datamanage/edb_chart/permission/show_by_data',params)
  567. },
  568. /**
  569. * 获取消息列表
  570. * @param {*} params
  571. * @returns
  572. */
  573. getNoticeList: params => {
  574. return http.get('/datamanage/message/list',params)
  575. },
  576. /**
  577. * 标记已读
  578. * @param {*} params MessageId
  579. * @returns
  580. */
  581. redMessage: params => {
  582. return http.post('/datamanage/message/read',params)
  583. },
  584. /**
  585. * 消息详情
  586. * @param {*} params
  587. * MessageId Source SubSource PageSize CurrentIndex
  588. * @returns
  589. */
  590. getNoticeDetail: params => {
  591. return http.get('/datamanage/message/detail',params)
  592. },
  593. /**
  594. * 获取所有私密分类
  595. * @param {*} params Source SubSource
  596. * @returns
  597. */
  598. getSecretClassify: params => {
  599. return http.get('/datamanage/edb_chart/classify/secret',params)
  600. },
  601. /**
  602. * 消息通知 所有未读
  603. * @param {*} params
  604. * @returns
  605. */
  606. getAllUnread: params => {
  607. return http.get('/message/unread/num')
  608. }
  609. }
  610. /* 英文权限管理 */
  611. const enAuthInterence = {
  612. /* 英文权限列表 */
  613. getAuthList:params=>{
  614. return http.get('/english_report/auth/list',params)
  615. },
  616. /* 英文权限详情 AdminId*/
  617. getAuthDetail:params=>{
  618. return http.get('/english_report/auth/detail',params)
  619. },
  620. /* 英文权限批量新增 AdminIds*/
  621. addAuthAdmins:params=>{
  622. return http.post('/english_report/auth/batch_add',params)
  623. },
  624. /* 英文权限编辑 AdminId RoleTypeCodes*/
  625. editAuthAdmin:params=>{
  626. return http.post('/english_report/auth/edit',params)
  627. },
  628. /* 英文权限 删除 AdminId*/
  629. deleteAuthAdmin:params=>{
  630. return http.post('/english_report/auth/del',params)
  631. }
  632. }
  633. export {
  634. departInterence,
  635. videoInterence,
  636. InteractionInterence,
  637. operateAuthInterface,
  638. enAuthInterence
  639. }