system.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. import request from '@/utils/request.js';
  2. import dayjs from 'dayjs';
  3. // 添加医共体
  4. export function addDoctorBody(data) {
  5. return request({
  6. url: '/basis/medicalorganizationMgr/Add',
  7. method: 'post',
  8. data
  9. })
  10. };
  11. // 获取医共体列表
  12. export function getDoctorBody(data) {
  13. return request({
  14. url: '/basis/medicalorganizationMgr/listPain?page=' + data.page + '&limit=' + data.limit,
  15. method: 'post',
  16. data
  17. })
  18. };
  19. // 修改医共体
  20. export function editDoctorBody(data) {
  21. return request({
  22. url: '/basis/medicalorganizationMgr/update',
  23. method: 'post',
  24. data
  25. })
  26. };
  27. // 删除医共体
  28. export function deleteDoctorBody(data) {
  29. return request({
  30. url: '/basis/medicalorganizationMgr/BatchDelete?ids=' + data.ids,
  31. method: 'post',
  32. data
  33. })
  34. };
  35. // 获取医共体详细信息
  36. export function getDoctorBDetail(data) {
  37. return request({
  38. url: `/basis/medicalorganizationMgr/${data}`,
  39. method: 'get'
  40. })
  41. };
  42. // 获取 医共体选择器
  43. export function getDoctorBodySelect(data) {
  44. return request({
  45. url: '/basis/medicalorganizationMgr/customerQuery',
  46. method: 'post',
  47. data
  48. })
  49. };
  50. // 新增医疗机构
  51. export function addMedinsituions(data) {
  52. return request({
  53. url: '/basis/medicalinstitutionsMgr/Add',
  54. method: 'post',
  55. data
  56. })
  57. };
  58. // 获取当前医疗机构选择器
  59. export function getMedSelect(data) {
  60. return request({
  61. url: '/basis/medicalinstitutionsMgr/customerQuery?organizationId=' + data.organizationId,
  62. method: 'post',
  63. data
  64. })
  65. };
  66. // 获取医疗机构列表
  67. export function getMedlist(data) {
  68. return request({
  69. url: '/basis/medicalinstitutionsMgr/listPain?page=' + data.page + '&limit=' + data.limit,
  70. method: 'post',
  71. data
  72. })
  73. };
  74. // 获取医疗机构详细信息
  75. export function getMedDetail(data) {
  76. return request({
  77. url: `/basis/medicalinstitutionsMgr/${data}`,
  78. method: 'get'
  79. })
  80. };
  81. // 编辑医疗机构信息
  82. export function editMedData(data) {
  83. return request({
  84. url: '/basis/medicalinstitutionsMgr/update',
  85. method: 'post',
  86. data
  87. })
  88. };
  89. // 医疗机构删除
  90. export function deleteMed(data) {
  91. return request({
  92. url: '/basis/medicalinstitutionsMgr/BatchDelete?ids=' + data.ids,
  93. method: 'post',
  94. data
  95. })
  96. };
  97. // 获取科室选择器 列表
  98. export function getDepartSelect(data) {
  99. return request({
  100. url: '/basis/hospitaldepartmentsMgr/customerQuery?institutionId=' + data.institutionId,
  101. method: 'post',
  102. data
  103. })
  104. };
  105. // 获取医生选择器 列表
  106. export function getDoctorSelect(data) {
  107. return request({
  108. url: '/portal/userMgr/listPain',
  109. method: 'post',
  110. data,
  111. params: {page: 1, limit: 999}
  112. })
  113. }
  114. // 获取科室列表
  115. export function getDepartList(data) {
  116. return request({
  117. url: '/basis/hospitaldepartmentsMgr/listPain?page=' + data.page + '&limit=' + data.limit,
  118. method: 'post',
  119. data
  120. })
  121. };
  122. // 添加科室
  123. export function addDepart(data) {
  124. return request({
  125. url: '/basis/hospitaldepartmentsMgr/Add',
  126. method: 'post',
  127. data
  128. })
  129. };
  130. // 获取科室详情数据
  131. export function getDepartDetail(data) {
  132. return request({
  133. url: `/basis/hospitaldepartmentsMgr/${data}`,
  134. method: 'get'
  135. })
  136. };
  137. // 科室数据修改
  138. export function editDepart(data) {
  139. return request({
  140. url: '/basis/hospitaldepartmentsMgr/update',
  141. method: 'post',
  142. data
  143. })
  144. };
  145. // 删除科室数据
  146. export function deleteDepart(data) {
  147. return request({
  148. url: '/basis/hospitaldepartmentsMgr/BatchDelete?ids=' + data.ids,
  149. method: 'post'
  150. })
  151. };
  152. // 获取角色列表
  153. export function getRoleList(data) {
  154. return request({
  155. url: '/admin/right_RoleMgr/listPain?page=' + data.page + '&limit=' + data.limit,
  156. method: 'post',
  157. data
  158. })
  159. };
  160. // 添加 角色数据
  161. export function addRoleData(data) {
  162. return request({
  163. url: '/admin/right_RoleMgr/Add',
  164. method: 'post',
  165. data
  166. })
  167. };
  168. // 获取角色详情信息
  169. export function getRoleDetail(data) {
  170. return request({
  171. url: `/admin/right_RoleMgr/${data}`,
  172. method: 'get'
  173. })
  174. };
  175. // 修改角色信息
  176. export function editRoleData(data) {
  177. return request({
  178. url: '/admin/right_RoleMgr/update',
  179. method: 'post',
  180. data
  181. })
  182. };
  183. // 删除角色信息
  184. export function deleteRoleData(data) {
  185. return request({
  186. url: "/admin/right_RoleMgr/BatchDelete?ids=" + data.ids,
  187. method: 'post'
  188. })
  189. };
  190. // 获取角色管理权限菜单
  191. export function getPermissionsMenu(data) {
  192. return request({
  193. url: '/admin/right_RoleMgr/GetRoleRight?RoleID=' + data.RoleID,
  194. method: 'post',
  195. data
  196. })
  197. };
  198. // 获取菜单权限
  199. export function getMenuPermiss(data) {
  200. return request({
  201. url: '/Admin/getMenu',
  202. method: 'post',
  203. data
  204. })
  205. };
  206. // 为角色设置权限
  207. export function setPermToRole(data) {
  208. return request({
  209. url: '/admin/right_RoleMgr/SetRoleRight?roleID=' + data.roleID,
  210. method: 'post',
  211. data
  212. })
  213. };
  214. // 获取角色选择器信息
  215. export function getRoleSelect(data) {
  216. return request({
  217. url: '/admin/right_RoleMgr/optionselect',
  218. method: 'get',
  219. data
  220. })
  221. };
  222. // 获取用户列表
  223. export function getUserList(data) {
  224. return request({
  225. url: '/portal/userMgr/listPain?page=' + data.page + '&limit=' + data.limit,
  226. method: 'post',
  227. data
  228. })
  229. };
  230. // 新增用户信息
  231. export function addUserMsg(data) {
  232. return request({
  233. url: '/portal/userMgr/Add',
  234. data,
  235. method: 'post'
  236. })
  237. };
  238. // 获取用户详细信息
  239. export function getUserDetail(data, pid) {
  240. return request({
  241. url: `/portal/userMgr/${data}`,
  242. method: 'get',
  243. params: { pid }
  244. })
  245. };
  246. // 修改用户信息
  247. export function editUserMsg(data) {
  248. return request({
  249. url: '/portal/userMgr/update',
  250. method: 'post',
  251. data
  252. })
  253. };
  254. // 删除用户管理信息
  255. export function deleteUserMsg(data) {
  256. return request({
  257. url: '/portal/userMgr/BatchDelete?ids=' + data.ids,
  258. method: 'post',
  259. data
  260. })
  261. };
  262. // 用户管理重置密码
  263. export function resetPasInUser(data) {
  264. return request({
  265. url: '/portal/userMgr/UpdatePassWord',
  266. method: 'post',
  267. data
  268. })
  269. };
  270. //获取 公共代码 信息
  271. export function getCodeMsg(data) {
  272. return request({
  273. url: '/basis/parameterconfigMgr/getPlatformCode',
  274. method: 'post',
  275. data
  276. })
  277. };
  278. // 提交 公共代码 信息
  279. export function addCodeMsg(data) {
  280. return request({
  281. url: '/basis/parameterconfigMgr/Add',
  282. method: 'post',
  283. data
  284. })
  285. };
  286. // 获取医共体 参数信息
  287. export function getDoctorBodyPar(params) {
  288. return request({
  289. url: '/portal/configMgr/ConfigByOrganizationid',
  290. method: 'get',
  291. params
  292. })
  293. };
  294. // 保存医共体参数信息
  295. export function saveDBParams(data) {
  296. return request({
  297. url: '/portal/configMgr/Add',
  298. method: 'post',
  299. data
  300. })
  301. };
  302. // 修改密码
  303. export function changePas(data) {
  304. return request({
  305. url: '/portal/userMgr/setPassWord',
  306. method: 'post',
  307. data
  308. })
  309. };
  310. // 获取医共体权限按钮
  311. export function getDoctorBR(data) {
  312. return request({
  313. url: '/basis/medicalorganizationMgr/GetButtonRight',
  314. method: 'post',
  315. data
  316. })
  317. };
  318. // 获取医疗机构权限按钮
  319. export function getMedBR(data) {
  320. return request({
  321. url: '/basis/medicalinstitutionsMgr/GetButtonRight',
  322. method: 'post',
  323. data
  324. })
  325. };
  326. //获取科室权限按钮
  327. export function getDepartBR(data) {
  328. return request({
  329. url: '/basis/hospitaldepartmentsMgr/GetButtonRight',
  330. method: 'post',
  331. data
  332. })
  333. };
  334. // 获取用户管理权限按钮
  335. export function getUserBR(data) {
  336. return request({
  337. url: '/portal/userMgr/GetButtonRight',
  338. method: 'post',
  339. data
  340. })
  341. };
  342. // 获取角色管理权限
  343. export function getRoleBR(data) {
  344. return request({
  345. url: '/admin/right_RoleMgr/GetButtonRight',
  346. method: 'post',
  347. data
  348. })
  349. };
  350. // 身份证号焦点校验
  351. export function checkIdCard(data) {
  352. return request({
  353. url: '/basis/patientMgr/idCardCheck?card=' + data,
  354. method: 'post'
  355. })
  356. };
  357. // 跟据建明和医共体 查询数据
  358. export function getDataByKey(data) {
  359. return request({
  360. url: '/portal/configMgr/configKey',
  361. method: 'get',
  362. params: data
  363. }).then(res => {
  364. switch (data.key) {
  365. case 'defaultHomePage': return res.ResultInfo || '/index/todaypatients';
  366. case 'transitionPr': return {
  367. enabled: !res.ResultInfo || res.ResultInfo === '0',
  368. }
  369. case 'showPrintHTML': return {
  370. enabled: res.ResultInfo === '0',
  371. }
  372. default: return res;
  373. }
  374. });
  375. };
  376. // 获取医保规则列表
  377. export function getInsuranceList(data) {
  378. return request({
  379. url: '/basis/medicalInsuranceRegulationMgr/listPain',
  380. method: 'post',
  381. data
  382. })
  383. }
  384. // 修改医保规则列表
  385. export function editInsurance(data) {
  386. return request({
  387. url: '/basis/medicalInsuranceRegulationMgr/update',
  388. method: 'post',
  389. data
  390. })
  391. }
  392. export function getLogFile() {
  393. return request({
  394. url: '/system/version/recordList',
  395. method: 'post',
  396. }).then(res => res.Data.map(item => {
  397. const time = dayjs((item.showTime || item.updateTime || item.createTime || ''));
  398. return {
  399. id: item.id,
  400. content: item.content,
  401. title: time.format('YYYY/MM/DD HH:mm:ss'),
  402. time: time.valueOf()
  403. };
  404. }).sort((a, b) => b.time - a.time));
  405. }
  406. export function setLogFile(data) {
  407. return request({
  408. url: '/system/version/saveOrUpdate',
  409. method: 'post',
  410. data: {
  411. id: data.id === -1 ? null : data.id,
  412. showTime: data.time.replace(' ', 'T'),
  413. content: data.content,
  414. }
  415. })
  416. }