/**
 * @desc
 * @author linyuanjie
 * @date 2021/6/17
 */

import { getStore, setStore } from '@/util/store'

const task = {
  state: {
    patientEduType: getStore({ name: 'patientEduType' }) || '' // 特定任务-患者教育 first: 系统对接 second: 手动上传
  },
  mutations: {
    ADD_PATIENT_EDU_TYPE: (state, payload) => {
      state.patientEduType = payload
      setStore({ name: 'patientEduType', content: state.patientEduType, type: 'session' })
    },
    DEL_PATIENT_EDU_TYPE: (state) => {
      state.patientEduType = ''
      setStore({ name: 'patientEduType', content: '', type: 'session' })
    }
  }
}
export default task
