other.js 2.7 KB

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