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.

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