other.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import cloneDeep from 'lodash/cloneDeep'
  2. import pick from 'lodash/pick'
  3. const stateReset = {
  4. isShowSeiminModel: false, //是否显示切换科室弹窗
  5. qucikCreateOrderType: "", //快捷建单类型
  6. qucikCreateOrderTypeId: "", //快捷建单类型id
  7. patientBuildTrip: {}, //患者建单的buildTrip
  8. patientBuildData: {}, //患者建单的请求参数数据
  9. patientTaskType: '', //患者建单的任务类型
  10. selectedPatient: {}, //患者建单的选中的患者
  11. deptDisplay: 1, //护士端科室显示选择(名称还是别名)1是名称,2是别名
  12. updateTipsForNurses: "", //护士端更新提示
  13. specimenButton: "", //标本按钮文字
  14. //护士科室切换提示自动关闭设置
  15. // (1) 当用户设置为正数时,用户必须查看此窗体指定秒数。
  16. // (2) 当用户设置为负数时,用户可点击知道了也可倒计时自动关闭。
  17. // (3) 如果用户填写0则为无自动关闭和强制查看时间。
  18. nurseDeptSwitchTip: 0,
  19. // 搜索到的科室-searchDept
  20. searchDeptResult: {},
  21. // 搜索到的科室集合-searchDept-选起点科室并且需要选终点科室
  22. searchDeptResultList: {},
  23. // 搜索科室需要传递的参数
  24. searchDeptParams: {},
  25. };
  26. const state = cloneDeep(stateReset);
  27. const getters = {};
  28. const mutations = {
  29. // 重置数据
  30. resetVxOther(state, args = {}) {
  31. Object.assign(state, cloneDeep(stateReset), pick(args, Object.keys(cloneDeep(stateReset))));
  32. },
  33. //是否显示切换科室弹窗
  34. changeSeiminModel(state, args) {
  35. state.isShowSeiminModel = args;
  36. },
  37. //快捷建单类型
  38. changeQucikCreateOrderType(state, args) {
  39. state.qucikCreateOrderType = args.type;
  40. state.qucikCreateOrderTypeId = args.taskTypeId;
  41. state.patientBuildTrip = args.patientBuildTrip;
  42. state.patientTaskType = args.patientTaskType;
  43. state.selectedPatient = args.selectedPatient;
  44. },
  45. //护士端科室显示选择(名称还是别名)1是名称,2是别名
  46. changeDeptDisplay(state, args) {
  47. state.deptDisplay = args;
  48. },
  49. //护士端更新提示
  50. changeUpdateTipsForNurses(state, args) {
  51. state.updateTipsForNurses = args;
  52. },
  53. //标本按钮文字
  54. changeSpecimenButton(state, args) {
  55. state.specimenButton = args;
  56. },
  57. //护士科室切换提示自动关闭设置
  58. changeNurseDeptSwitchTip(state, args) {
  59. state.nurseDeptSwitchTip = args;
  60. },
  61. //搜索到的科室-searchDept
  62. changeSearchDeptResult(state, args) {
  63. state.searchDeptResult = args || {};
  64. },
  65. //搜索到的科室集合-searchDept-选起点科室并且需要选终点科室
  66. changeSearchDeptResultList(state, args) {
  67. state.searchDeptResultList = args || {};
  68. },
  69. //搜索科室需要传递的参数
  70. changeSearchDeptParams(state, args) {
  71. state.searchDeptParams = args;
  72. },
  73. };
  74. const actions = {
  75. };
  76. export default {
  77. namespaced: true,
  78. state,
  79. getters,
  80. mutations,
  81. actions,
  82. };