other.js 2.5 KB

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