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.

285 lines
10 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. import Vue from "vue";
  2. import Vuex from "vuex";
  3. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  4. import { arrayReduce } from "@/utlis/proFunc";
  5. Vue.use(Vuex);
  6. export default new Vuex.Store({
  7. state: {
  8. set: "qqqq",
  9. customerOrg: {
  10. //体检单位设置
  11. customerOrgTree: [], //体检单位列表
  12. treeprops: {
  13. label: "displayName",
  14. value: "id",
  15. children: "treeChildren",
  16. }, //树形组件的数据结构
  17. customerOrgId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
  18. customerOrgRd: { id: "", displayName: "单位名称" }, //单个体检单位记录值
  19. customerOrgRegisterList: [], //单位体检次数登记列表
  20. contactPersonList: [], //联系人列表
  21. contactMethodList: [], //联系方式列表
  22. },
  23. //体检单位分组
  24. personnelUnit: {
  25. customerOrgGroupId: "",
  26. personnelgrouping: [], //人员分组
  27. id: "", //根据Id选择的数据
  28. form: { id: "" }, //列表每一项
  29. nogroupselected: [], //已选分组
  30. },
  31. //体检人员登记 add by pengjun
  32. patientRegister: {
  33. customerOrgTreeAll: [], //体检单位列表(含个人)
  34. patientRegisterId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
  35. patientRegisterRd: { id: "" }, //体检人员记录
  36. patientRegisterTimes: 0, //体检人员登记窗口显示次数(弃用)
  37. addTimes: 0, //用于触发新增时初始化赋值
  38. saveTimes:0, //用于体检登记时,触发分组调整保存
  39. photo:"https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg", //单独抽出,拍照时会更新
  40. cameraVisble: false, //拍照控件显示
  41. patientRegisterRdInit: {
  42. id: "", //id
  43. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  44. patientNo: "", //档案号
  45. customerOrgId: null, //单位编号
  46. customerOrgGroupId: null, //分组
  47. medicalPackageId: null, //套餐
  48. patientName: "", //姓名
  49. birthDate: "", //字符串 如:2012-01-29
  50. sexId: "U", //性别 默认未知U
  51. age: null, //年龄
  52. jobCardNo: "", //工卡号
  53. medicalCardNo: "", //体检卡号
  54. maritalStatusId: "9", //婚姻状况 默认未知
  55. medicalTypeId: null, //体检类别
  56. personnelTypeId: null, //人员类别
  57. jobPost: "", //职务
  58. jobTitle: "", //职称
  59. photo: "", //照片
  60. salesman: "", //介绍人
  61. sexHormoneTermId: null, //性激素期限
  62. isNameHide: "N", //隐藏姓名
  63. isPhoneFollow: "N", //电话随访
  64. isVip: "N", //vip客户
  65. remark: "", //
  66. isLock: "N", //是否锁住
  67. completeFlag: "1", //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
  68. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  69. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  70. medicalTimes: 1, //条码号 【创建编辑时不操作】
  71. organizationUnitId: null, //体检中心
  72. address: "", //地址
  73. email: "", //email
  74. idNo: "", //身份证号
  75. telephone: "", //电话
  76. mobileTelephone: "", //手机号
  77. nationId: null, //民族编号
  78. postalCode: "", //邮编
  79. creatorId: null,
  80. creationTime: "",
  81. lastModificationTime: "",
  82. lastModifierId: null,
  83. }, //体检人员记录(初始值)一般创建用
  84. customerOrgGroupAsb: [], //选中分组所包含的组合项目
  85. medicalPackageAsb: [], //选中套餐所包含的组合项目
  86. customerOrgGroupChange: 0, //控制体检列表记录切换时,0 无需触发更换分组操作
  87. medicalPackageChange: 0, //控制体检列表记录切换时,0 无需触发更换套餐操作
  88. query: {
  89. times: 0, //触发查询次数
  90. customerOrgId: "", //体检单位ID
  91. CustomerOrgParentId: "", //单位父级ID
  92. customerOrgFlag: true, //单位作为查询条件
  93. }, //查询条件
  94. customerOrgGroup: [], //分组(针对单位)
  95. patientRegisterAbs: [], //人员已选组合项目
  96. },
  97. //体检医生诊台
  98. doctorCheck: {
  99. prBase: {
  100. id: '', //体检登记ID
  101. }, //人员体检登记显示基本信息
  102. RegisterCheckEdit: {
  103. id: '',
  104. checkDoctorId: null,
  105. checkDate: '',
  106. completeFlag: '0',
  107. LastModificationTime: '',
  108. LastModifierId: null,
  109. isLock: 'N',
  110. isAudit: 'N',
  111. auditorUserId: null,
  112. auditTime: '',
  113. }, //组合项目详情
  114. RegisterCheckList:[], //人员体检 组合项目列表
  115. RegisterCheck:{}, //单组合项目记录
  116. RegisterCheckId:'', //
  117. checkItemList:[], //组合项目包含的明细项目
  118. checkItem:{}, //单项目记录
  119. checkSummaryList:[], //小结
  120. checkSuggestionList:[], //建议
  121. },
  122. //总检医生
  123. sumDoctorCheck:{
  124. sumPREdit:{}, //总检医生时间等相关信息(sumPREditInit)
  125. summaryList:[], //综述
  126. suggestionList:[], //建议
  127. },
  128. //公共字典数据 add by pengjun
  129. dict: {
  130. personOrgId: "00000000-0000-0000-0000-000000000000", //个人体检单位ID
  131. organization: [], //体检中心
  132. sex: [], //性别(人员档案用)
  133. forSex: [], //适用性别
  134. medicalType: [], //体检类别
  135. personnelType: [], //人员类别
  136. maritalStatus: [], //婚姻状况
  137. sexHormoneTerm: [], //性激素期
  138. nation: [], //民族
  139. birthPlace: [], //籍惯 ,出生地
  140. completeFlag: [
  141. //体检完成标志
  142. { id: "0", displayName: "预登记" },
  143. { id: "1", displayName: "正式登记" },
  144. { id: "2", displayName: "部份已检" },
  145. { id: "3", displayName: "已总检" },
  146. ],
  147. checkCompleteFlag: [
  148. //体检完成标志
  149. { id: "0", displayName: "未检" },
  150. { id: "1", displayName: "已检" },
  151. { id: "2", displayName: "弃检" },
  152. ],
  153. sumAudit: [
  154. //总检审核
  155. { id: "Y", displayName: "已审核" },
  156. { id: "N", displayName: "未审核" }
  157. ],
  158. payType: [
  159. //支付方式,比如是0自费、2免费、1单位支付
  160. { id: "0", displayName: "个人支付" },
  161. { id: "1", displayName: "单位支付" },
  162. { id: "2", displayName: "赠送" },
  163. ],
  164. checkTypeFlag: [
  165. { id: "0", displayName: "检验" },
  166. { id: "1", displayName: "功能检查" },
  167. ],
  168. medicalPackage: [], //所有套餐
  169. customerOrgGroupAll: [], //所有分组,不限单位,不限次数
  170. customerOrg: [], //所有单位,非树结构
  171. payMode: [], //支付方式
  172. itemTypeTree: [], //体检类别 树结构
  173. asbItemAll: [], //所有组合项目
  174. asbItem: [], //显示的 未选组合项目
  175. },
  176. },
  177. getters: {},
  178. mutations: {
  179. //同步更改状态
  180. //通用设置 state 值 option {key:,value:} add by pengjun
  181. setData(state, option) {
  182. let array = option.key.split(".");
  183. switch (array.length) {
  184. case 1:
  185. state[array[0]] = option.value;
  186. break;
  187. case 2:
  188. state[array[0]][array[1]] = option.value;
  189. break;
  190. case 3:
  191. state[array[0]][array[1]][array[2]] = option.value;
  192. break;
  193. case 4:
  194. state[array[0]][array[1]][array[2]][array[3]] = option.value;
  195. break;
  196. }
  197. },
  198. doctorCheckPrBaseInit(state) {
  199. state.doctorCheck.prBase = {
  200. id: '', //体检登记ID
  201. patientRegisterNo: '', //条码号
  202. patientNo: '', //档案号
  203. patientName: '', //姓名
  204. sexId: '', //性别
  205. medicalTimes: '', //体检次数
  206. maritalStatusId: '', //婚姻
  207. creationTime: '', //体检日期
  208. customerOrgParentName: '', //单位
  209. customerOrgName: '', //部门
  210. medicalTypeId: '', //体检类别
  211. personnelTypeId: '', //人员类别
  212. nationId: '', //民族
  213. mobileTelephone: '', //手机
  214. } //人员体检登记显示基本信息
  215. },
  216. sumPREditInit(state) {
  217. state.sumDoctorCheck.sumPREdit = {
  218. id:'', //体检登记ID
  219. completeFlag:'', //完成状态
  220. summaryDoctor:'', //总检医生
  221. summaryDate:'', //总检日期
  222. isAudit:'', //审核状态
  223. auditDoctor:'', //审核医生
  224. auditDate:'', //审核日期
  225. isLock:'', //锁定状态
  226. } //人员体检登记显示基本信息
  227. },
  228. },
  229. actions: {
  230. //获取体检人员所选组合项目
  231. getPatientRegisterAbs(context, id) {
  232. //console.log(`vuex getPatientRegisterAbs /api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, context.state.dict.asbItemAll)
  233. getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`).then(
  234. (res) => {
  235. console.log(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, res)
  236. if (res.code == 1) {
  237. context.commit("setData", {
  238. key: "patientRegister.patientRegisterAbs",
  239. value: res.data,
  240. });
  241. context.commit("setData", {
  242. key: "dict.asbItem",
  243. value: arrayReduce(
  244. [...context.state.dict.asbItem],
  245. [...context.state.patientRegister.patientRegisterAbs],
  246. "id=asbitemId"
  247. ),
  248. });
  249. //console.log(`getPatientRegisterAbs ${id}`,context.state.dict.asbItem)
  250. }
  251. }
  252. );
  253. },
  254. //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
  255. getCustomerOrgGroup(context, customerOrgld) {
  256. console.log(`vuex /api/app/customer-org-group/in-customer-org-id/${customerOrgld}`);
  257. getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
  258. .then((res) => {
  259. console.log("vuex getCustomerOrgGroup", res.data);
  260. if (res.code == 1) {
  261. //this.patientRegister.customerOrgGroup = res.data
  262. context.commit("setData", {
  263. key: "patientRegister.customerOrgGroup",
  264. value: res.data,
  265. });
  266. }
  267. });
  268. },
  269. },
  270. modules: {},
  271. });