|
|
import Vue from "vue";import Vuex from "vuex";
Vue.use(Vuex);
export default new Vuex.Store({ state: { set: 'qqqq', customerOrg: { //体检单位设置
customerOrgTree: [], //体检单位列表
treeprops: { label: "displayName", value: "id", children: "treeChildren", }, //树形组件的数据结构
customerOrgId:'',//当前单位ID(可根据此值是否为空,判断是新增还是编辑)
customerOrgRd:{displayName:'单位名称'}, //单个体检单位记录值
customerOrgRegisterList: [], //单位体检次数登记列表
contactPersonList:[], //联系人列表
contactMethodList:[], //联系方式列表
}, personnelUnit:{ personnelgrouping:[], //人员分组
id:'',//根据Id选择的数据
form:'',//列表每一项
nogroupselected:[],//已选分组
},
//体检人员登记 add by pengjun
patientRegister:{ customerOrgTreeAll: [], //体检单位列表(含个人)
patientRegisterId:'', //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
patientRegisterRd:{}, //体检人员记录
query:{ times:0, //触发查询次数
customerOrgId:'', //体检单位ID
},//查询条件
customerOrgGroup:[], //分组(针对单位)
},
//公共字典数据 add by pengjun
dict:{ personOrgId:'00000000-0000-0000-0000-000000000000', //个人体检单位ID
organization:[], //体检中心
sex:[], //性别
medicalType:[], //体检类别
personnelType:[], //人员类别
maritalStatus:[],//婚姻状况
sexHormoneTerm:[],//性激素期
nation:[], //民族
birthPlace:[], //籍惯 ,出生地
completeFlag:[ //体检完成标志
{id:'0',displayName:'预登记'},{id:'1',displayName:'正式登记'},{id:'2',displayName:'部份已检'},{id:'3',displayName:'已总检'}, ], medicalPackage:[], //所有套餐
customerOrgGroupAll:[], //所有分组,不限单位,不限次数
},
}, getters: {},
mutations: {//同步更改状态
//通用设置 state 值 option {key-value} add by pengjun
setData(state, option) { let array = option.key.split('.') switch (array.length) { case 1: state[array[0]] = option.value; break; case 2: state[array[0]][array[1]] = option.value; break; case 3: state[array[0]][array[1]][array[2]] = option.value; break; case 4: state[array[0]][array[1]][array[2]][array[3]] = option.value; break; } } },
actions: {}, modules: {},});
|