import cloneDeep from 'lodash/cloneDeep' const stateReset = { isShowSeiminModel: false, //是否显示切换科室弹窗 qucikCreateOrderType: "", //快捷建单类型 qucikCreateOrderTypeId: "", //快捷建单类型id deptDisplay: 1, //护士端科室显示选择(名称还是别名)1是名称,2是别名 updateTipsForNurses: "", //护士端更新提示 specimenButton: "", //标本按钮文字 //护士科室切换提示自动关闭设置 // (1) 当用户设置为正数时,用户必须查看此窗体指定秒数。 // (2) 当用户设置为负数时,用户可点击知道了也可倒计时自动关闭。 // (3) 如果用户填写0则为无自动关闭和强制查看时间。 nurseDeptSwitchTip: 0, // 搜索到的科室-searchDept searchDeptResult: {}, // 搜索到的科室集合-searchDept-选起点科室并且需要选终点科室 searchDeptResultList: {}, // 搜索科室需要传递的参数 searchDeptParams: {}, }; const state = cloneDeep(stateReset); const getters = {}; const mutations = { // 重置数据 resetVxOther(state) { Object.assign(state, cloneDeep(stateReset)); }, //是否显示切换科室弹窗 changeSeiminModel(state, args) { state.isShowSeiminModel = args; }, //快捷建单类型 changeQucikCreateOrderType(state, args) { state.qucikCreateOrderType = args.type; state.qucikCreateOrderTypeId = args.taskTypeId; }, //护士端科室显示选择(名称还是别名)1是名称,2是别名 changeDeptDisplay(state, args) { state.deptDisplay = args; }, //护士端更新提示 changeUpdateTipsForNurses(state, args) { state.updateTipsForNurses = args; }, //标本按钮文字 changeSpecimenButton(state, args) { state.specimenButton = args; }, //护士科室切换提示自动关闭设置 changeNurseDeptSwitchTip(state, args) { state.nurseDeptSwitchTip = args; }, //搜索到的科室-searchDept changeSearchDeptResult(state, args) { state.searchDeptResult = args || {}; }, //搜索到的科室集合-searchDept-选起点科室并且需要选终点科室 changeSearchDeptResultList(state, args) { state.searchDeptResultList = args || {}; }, //搜索科室需要传递的参数 changeSearchDeptParams(state, args) { state.searchDeptParams = args; }, }; const actions = { }; export default { namespaced: true, state, getters, mutations, actions, };