You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
4.7 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. import Vue from "vue";
  2. import Vuex from "vuex";
  3. Vue.use(Vuex);
  4. export default new Vuex.Store({
  5. state: {
  6. set: 'qqqq',
  7. customerOrg: { //体检单位设置
  8. customerOrgTree: [], //体检单位列表
  9. treeprops: {
  10. label: "displayName",
  11. value: "id",
  12. children: "treeChildren",
  13. }, //树形组件的数据结构
  14. customerOrgId:'',//当前单位ID(可根据此值是否为空,判断是新增还是编辑)
  15. customerOrgRd:{displayName:'单位名称'}, //单个体检单位记录值
  16. customerOrgRegisterList: [], //单位体检次数登记列表
  17. contactPersonList:[], //联系人列表
  18. contactMethodList:[], //联系方式列表
  19. },
  20. personnelUnit:{
  21. customerOrgGroupId:'',
  22. personnelgrouping:[], //人员分组
  23. id:'',//根据Id选择的数据
  24. form:{id:''},//列表每一项
  25. nogroupselected:[],//已选分组
  26. },
  27. //体检人员登记 add by pengjun
  28. patientRegister:{
  29. customerOrgTreeAll: [], //体检单位列表(含个人)
  30. patientRegisterId:'', //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
  31. patientRegisterRd:{}, //体检人员记录
  32. addTimes:0, //用于触发新增时初始化赋值
  33. photo:'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg', //单独抽出,拍照时会更新
  34. cameraVisble:false, //拍照控件显示
  35. patientRegisterRdInit: {
  36. id: '', //id
  37. patientId: '00000000-0000-0000-0000-000000000000', //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  38. patientNo:'',//档案号
  39. customerOrgId: null, //单位编号
  40. customerOrgGroupId: null, //分组
  41. medicalPackageId: null,//套餐
  42. patientName: '', //姓名
  43. birthDate: '', //字符串 如:2012-01-29
  44. sexId: 'U', //性别 默认未知U
  45. age: null, //年龄
  46. jobCardNo: '', //工卡号
  47. medicalCardNo: '', //体检卡号
  48. maritalStatusId: 'U', //婚姻状况 默认未知
  49. medicalTypeId: null, //体检类别
  50. personnelTypeId: null, //人员类别
  51. jobPost: '', //职务
  52. jobTitle: '', //职称
  53. photo: '', //照片
  54. salesman: '', //介绍人
  55. sexHormoneTermId: null, //性激素期限
  56. isNameHide: 'N', //隐藏姓名
  57. isPhoneFollow: 'N', //电话随访
  58. isVip: 'N', //vip客户
  59. remark: '', //
  60. isLock: 'N', //是否锁住
  61. completeFlag: '1', //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
  62. isMedicalStart: 'N', //体检开始标志 【创建编辑时不操作】
  63. patientRegisterNo: '', //条码号 【创建编辑时不操作】
  64. medicalTimes: 1, //条码号 【创建编辑时不操作】
  65. organizationUnitId: null, //体检中心
  66. address:'', //地址
  67. email:'', //email
  68. idNo:'', //身份证号
  69. telephone:'', //电话
  70. mobileTelephone:'', //手机号
  71. nationId:null, //民族编号
  72. postalCode:'', //邮编
  73. }, //体检人员记录(初始值)一般创建用
  74. query:{
  75. times:0, //触发查询次数
  76. customerOrgId:'', //体检单位ID
  77. },//查询条件
  78. customerOrgGroup:[], //分组(针对单位)
  79. },
  80. //公共字典数据 add by pengjun
  81. dict:{
  82. personOrgId:'00000000-0000-0000-0000-000000000000', //个人体检单位ID
  83. organization:[], //体检中心
  84. sex:[], //性别
  85. medicalType:[], //体检类别
  86. personnelType:[], //人员类别
  87. maritalStatus:[],//婚姻状况
  88. sexHormoneTerm:[],//性激素期
  89. nation:[], //民族
  90. birthPlace:[], //籍惯 ,出生地
  91. completeFlag:[ //体检完成标志
  92. {id:'0',displayName:'预登记'},{id:'1',displayName:'正式登记'},{id:'2',displayName:'部份已检'},{id:'3',displayName:'已总检'},
  93. ],
  94. medicalPackage:[], //所有套餐
  95. customerOrgGroupAll:[], //所有分组,不限单位,不限次数
  96. customerOrg:[], //所有单位,非树结构
  97. },
  98. },
  99. getters: {},
  100. mutations: {//同步更改状态
  101. //通用设置 state 值 option {key-value} add by pengjun
  102. setData(state, option) {
  103. let array = option.key.split('.')
  104. switch (array.length) {
  105. case 1:
  106. state[array[0]] = option.value; break;
  107. case 2:
  108. state[array[0]][array[1]] = option.value; break;
  109. case 3:
  110. state[array[0]][array[1]][array[2]] = option.value; break;
  111. case 4:
  112. state[array[0]][array[1]][array[2]][array[3]] = option.value; break;
  113. }
  114. }
  115. },
  116. actions: {},
  117. modules: {},
  118. });