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.

509 lines
23 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
  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. changepassword: '', //用户密码
  9. set: "qqqq",
  10. importexcel: {
  11. },
  12. router: {
  13. path: '',
  14. },
  15. window: {
  16. pageHeight: 960, //页面高度
  17. pageWidth: 1920, //页面宽度
  18. pageHeaderHeight: 50, //container-header 高度
  19. pageMarginWidth: 10, //container-左右边距和
  20. pageMarginHeight: 10, //container-上下边距和
  21. cardHeaderHeight: 45, //card-header 高度
  22. shift: false, //是否按下 shift键
  23. ctrl: false, //是否按下 ctrl键
  24. },
  25. elProgress: { //通用进度条相关参数
  26. display: false, //是否显示
  27. textInside: true,
  28. strokeWidth: 30,
  29. percentage: 0
  30. },
  31. customerOrg: {
  32. //体检单位设置
  33. oprStatus: '', //空,add,edit 三种状态
  34. customerOrgTree: [], //体检单位列表
  35. defaultExpandedKeys: [], //当前选中树的节点
  36. treeCurrentNodekey: '', //当前选中树的节点
  37. treeprops: {
  38. label: "displayName",
  39. value: "id",
  40. id: "id",
  41. children: "treeChildren",
  42. }, //树形组件的数据结构
  43. customerOrgId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
  44. customerOrgRd: { id: "", isLock: "N", isActive: "Y", isLockBox: false, isActiveBox: true, }, //单个体检单位记录值
  45. customerOrgRegisterList: [{ id: 'uuid' }], //单位体检次数登记列表
  46. contactPersonList: [], //联系人列表
  47. contactMethodList: [], //联系方式列表
  48. orgEditStyle: '', //编辑表单样式
  49. orgDetailStyle: '', //体检次数样式
  50. orgDetailHeight: 300, //体检次数LIST表格高度
  51. personStyle: '', //联系人样式
  52. },
  53. //体检单位分组
  54. personnelUnit: {
  55. customerOrgGroupId: "",
  56. personnelgrouping: [], //人员分组
  57. id: "", //根据Id选择的数据
  58. form: { id: "" }, //列表每一项
  59. nogroupselected: [], //已选分组
  60. },
  61. //体检人员登记 add by pengjun
  62. patientRegister: {
  63. customerOrgTreeAll: [], //体检单位列表(含个人)
  64. patientRegisterId: "", //当前人员ID(可根据此值是否为空,判断是新增还是编辑)
  65. patientRegisterTimes: 0, //体检人员登记窗口显示次数(弃用)
  66. addTimes: 0, //用于触发新增时初始化赋值
  67. saveTimes: 0, //用于体检登记时,触发分组调整保存
  68. photo: "/pic/Photo.jpg", //单独抽出,拍照时会更新
  69. cameraVisble: false, //拍照控件显示
  70. lisRequestVisble: false, //检验条码补打
  71. mergeAsbitemVisble: false, //合并项目
  72. patientRegisterRd: { id: "" }, //体检人员记录
  73. patientRegisterRdInit: {
  74. id: "", //id
  75. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  76. patientNo: "", //档案号
  77. customerOrgId: null, //单位编号
  78. customerOrgGroupId: null, //分组
  79. medicalPackageId: null, //套餐
  80. patientName: "", //姓名
  81. birthDate: "", //字符串 如:2012-01-29
  82. sexId: "U", //性别 默认未知U
  83. age: null, //年龄
  84. jobCardNo: "", //工卡号
  85. medicalCardNo: "", //体检卡号
  86. maritalStatusId: "9", //婚姻状况 默认未知
  87. medicalTypeId: null, //体检类别
  88. personnelTypeId: null, //人员类别
  89. jobPost: "", //职务
  90. jobTitle: "", //职称
  91. photo: "/pic/Photo.jpg", //照片
  92. salesman: "", //介绍人
  93. sexHormoneTermId: null, //性激素期限
  94. isNameHide: "N", //隐藏姓名
  95. isPhoneFollow: "N", //电话随访
  96. isVip: "N", //vip客户
  97. remark: "", //
  98. isLock: "N", //是否锁住
  99. completeFlag: "1", //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
  100. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  101. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  102. medicalTimes: 1, //条码号 【创建编辑时不操作】
  103. medicalCenterId: null, //体检中心
  104. address: "", //地址
  105. email: "", //email
  106. idNo: "", //身份证号
  107. telephone: "", //电话
  108. mobileTelephone: "", //手机号
  109. nationId: null, //民族编号
  110. postalCode: "", //邮编
  111. creatorId: null,
  112. creationTime: "",
  113. lastModificationTime: "",
  114. lastModifierId: null,
  115. }, //体检人员记录(初始值)一般创建用
  116. customerOrgGroupAsb: [], //选中分组所包含的组合项目
  117. medicalPackageAsb: [], //选中套餐所包含的组合项目
  118. customerOrgGroupChange: 0, //控制体检列表记录切换时,0 无需触发更换分组操作
  119. medicalPackageChange: 0, //控制体检列表记录切换时,0 无需触发更换套餐操作
  120. query: {
  121. dateType: 'creationTime', //登记日期
  122. dateRange: null, //日期范围
  123. startDate: null,
  124. endDate: null,
  125. containRefuse: true, //包含弃检项目
  126. times: 0, //触发查询次数
  127. customerOrgId: "", //体检单位ID
  128. CustomerOrgParentId: "", //单位父级ID
  129. customerOrgFlag: true, //单位作为查询条件
  130. customerOrgRegister: { id: '' }, //单位体检次数
  131. checkAsbs: null,
  132. patientName: '', //姓名
  133. sex: '', //性别
  134. idCardNo: '', //身份证号
  135. }, //查询条件
  136. customerOrgGroup: [], //分组(针对单位)
  137. patientRegisterAbs: [], //人员已选组合项目
  138. prList: [], //体检登记记录
  139. },
  140. //体检医生诊台
  141. doctorCheck: {
  142. prBase: {
  143. id: '', //体检登记ID
  144. }, //人员体检登记显示基本信息
  145. RegisterCheckEdit: {
  146. id: '',
  147. checkDoctorId: null,
  148. checkDate: '',
  149. completeFlag: '0',
  150. LastModificationTime: '',
  151. LastModifierId: null,
  152. isLock: 'N',
  153. isAudit: 'N',
  154. auditorUserId: null,
  155. auditTime: '',
  156. }, //组合项目详情
  157. doctorCheckDialogVisible: false,
  158. RegisterCheckList: [], //人员体检 组合项目列表
  159. RegisterCheck: {}, //单组合项目记录
  160. RegisterCheckId: '', //
  161. checkItemList: [], //组合项目包含的明细项目
  162. checkItem: {}, //单项目记录
  163. checkSummaryList: [], //小结
  164. checkSuggestionList: [], //建议
  165. },
  166. //总检医生
  167. sumDoctorCheck: {
  168. sumDoctorCheckDialogVisible: false,
  169. sumDiagnosisVisible: false,
  170. sumPREdit: {}, //总检医生时间等相关信息(sumPREditInit)
  171. summaryList: [], //综述
  172. suggestionList: [], //建议
  173. diagnosisList: [], //诊断
  174. },
  175. report: {
  176. dialogCusOrgOCX: false, //通用单位查询控件显示
  177. dataCusOrgOCX: [], //通用单位查询的数据
  178. dialogAsbitemOCX: false,
  179. dataAsbitemOCX: [], //通用组合项目查询的数据
  180. },
  181. diagnosis: {
  182. dialogCusOrgOCX: false, //通用单位查询控件显示
  183. dataCusOrgOCX: [], //通用单位查询的数据
  184. dialogAsbitemOCX: false,
  185. dataAsbitemOCX: [], //通用诊断查询的数据
  186. },
  187. project: {
  188. dialogCusOrgOCX: false, //通用单位查询控件显示
  189. dataCusOrgOCX: [], //通用单位查询的数据
  190. dialogAsbitemOCX: false,
  191. dataAsbitemOCX: [], //通用项目查询的数据
  192. },
  193. //公共字典数据(量大的数据字典推荐用 indexedDB ) add by pengjun
  194. dict: {
  195. personOrgId: "00000000-0000-0000-0000-000000000001", //个人体检单位ID
  196. organization: [], //体检中心
  197. sex: [], //性别(人员档案用)
  198. forSex: [], //适用性别
  199. medicalType: [], //体检类别
  200. personnelType: [], //人员类别
  201. maritalStatus: [], //婚姻状况
  202. forMaritalStatus: [{ id: '0', displayName: '未婚' }, { id: '1', displayName: '已婚' }, { id: 'A', displayName: '全部' }], //适用婚姻
  203. sexHormoneTerm: [], //性激素期
  204. nation: [], //民族
  205. birthPlace: [], //籍惯 ,出生地
  206. completeFlag: [
  207. //体检完成标志
  208. { id: "0", displayName: "预登记" },
  209. { id: "1", displayName: "正式登记" },
  210. { id: "2", displayName: "部份已检" },
  211. { id: "3", displayName: "已总检" },
  212. ],
  213. checkCompleteFlag: [
  214. //体检完成标志
  215. { id: "0", displayName: "未检" },
  216. { id: "1", displayName: "已检" },
  217. { id: "2", displayName: "弃检" },
  218. ],
  219. sumAudit: [
  220. //总检审核
  221. { id: "Y", displayName: "已审核" },
  222. { id: "N", displayName: "未审核" }
  223. ],
  224. payType: [
  225. //支付方式,比如是0自费、2免费、1单位支付
  226. { id: "0", displayName: "个人支付" },
  227. { id: "1", displayName: "单位支付" },
  228. { id: "2", displayName: "免费" },
  229. ],
  230. cardMode: [
  231. { id: "0", displayName: "充值卡" },
  232. { id: "1", displayName: "积分卡" },
  233. ],
  234. cardType: [], //会员卡类别
  235. billFlag: [
  236. { id: "0", displayName: "收费" },
  237. { id: "1", displayName: "退费" },
  238. { id: "2", displayName: "充值" },
  239. ],
  240. checkTypeFlag: [
  241. { id: "0", displayName: "检验" },
  242. { id: "1", displayName: "功能检查" },
  243. ],
  244. menuType: [
  245. { id: "0", displayName: "仅菜单节点" },
  246. { id: "1", displayName: "菜单及页面" },
  247. { id: "2", displayName: "仅页面节点" },
  248. { id: "3", displayName: "按钮或事件" },
  249. ],
  250. lineModeFlag: [
  251. { id: "0", displayName: "不换行" },
  252. { id: "1", displayName: "换行" },
  253. { id: "2", displayName: "继承项目类别换行属性" },
  254. ],
  255. medicalPackage: [], //所有套餐
  256. customerOrgGroupAll: [], //所有分组,不限单位,不限次数
  257. customerOrg: [], //所有单位,非树结构
  258. payMode: [], //支付方式
  259. itemTypeTree: [], //体检类别 树结构
  260. asbItemAll: [], //所有组合项目
  261. asbItem: [], //显示的 未选组合项目
  262. asbItemQuick: [], //显示的 未选组合项目(供快速选择)
  263. diagnosisLevel: [], //诊断级别
  264. },
  265. // 项目特有的对象数据 project private
  266. projPriv: {
  267. idNos: {
  268. Code: "Success", //读取成功/失败
  269. Name: "刘滔",
  270. Sex: "男",
  271. Nation: "汉",
  272. Birthday: "1986-01-22",
  273. Address: "湖南省长沙县春华镇九木村新元组367号",
  274. DepartmentIC: "长沙县公安局",
  275. StartDateIC: "2019-11-25",
  276. EndDateIC: "2039-11-25",
  277. IDCode: "430121198601223693",
  278. Photo: "base64编码字符串"
  279. }, //读取身份证信息
  280. },
  281. // 多层数据传递时使用(统一归结在此,便于管理)
  282. dataTransOpts: {
  283. // 强制刷新(如触发数据刷新的ID值没有变化时,但也想强制刷新数据:
  284. // S--single 单记录刷新,M--more 多记录刷新,D--detail
  285. // 当父子组件都在存在多记录刷新时 父组件用 M,子组件用 D
  286. refresh: {
  287. adp_roles: { S: 0, M: 0 }, // 角色
  288. adp_users: { S: 0, M: 0 }, // 用户
  289. asbitem: { S: 0, M: 0 }, // 组合项目
  290. customer_org: { S: 0, M: 0 }, // 体检单位
  291. contact_method: { S: 0, M: 0 }, // 联系方式
  292. contact_person: { S: 0, M: 0 }, // 体检单位联系人
  293. customer_org_register: { S: 0, M: 0 }, // 单位体检次数
  294. customer_org_group: { S: 0, M: 0 }, // 单位分组
  295. customer_org_group_detail: { S: 0, M: 0 }, // 单位分组包含的组合项目明细
  296. charge: { S: 0, M: 0 }, // 收费
  297. menu_info: { S: 0, M: 0 }, // 菜单与页面
  298. patient_register: { S: 0, M: 0 }, // 体检人员记录
  299. register_check_asbitem: { S: 0, M: 0, D: 0 }, // 体检人员登记的项目(合并前)
  300. register_check: { S: 0, M: 0 }, // 体检人员登记的项目(合并后)
  301. register_check_item: { S: 0, M: 0 }, // 体检人员登记的明细项目
  302. role_menu_info: { S: 0, M: 0 }, // 角色对应的菜单
  303. sum_diagnosis: { S: 0, M: 0 }, // 总检诊断
  304. sumDoctor: { S: 0, M: 0 }, // 虚拟表 触发强制刷新 (sumDoctor.M 合并包含:综述、建议、对比、历史等,不包含总检诊断)
  305. },
  306. //表当前数据(单条记录 S--single)
  307. tableS: {
  308. adp_roles: { id: '' }, // 角色
  309. adp_users: { id: '' }, // 用户
  310. asbitem: { id: '' }, // 组合项目
  311. customer_org: { id: '', parent_id: '' }, // 体检单位
  312. contact_method: { id: '' }, // 联系方式
  313. contact_person: { id: '' }, // 体检单位联系人
  314. customer_org_register: { id: '' }, // 单位体检次数 pid/单位一级节点
  315. customer_org_group: { id: '' }, // 单位分组
  316. customer_org_group_detail: { id: '' }, // 单位分组包含的组合项目明细
  317. charge: { id: '' }, // 收费
  318. menu_info: { id: '' }, // 菜单与页面
  319. patient_register: { id: '', patientRegisterNo: ''}, // 体检人员记录
  320. register_check_asbitem: { id: '' }, // 体检人员登记的项目(合并前)
  321. register_check: { id: '' }, // 体检人员登记的项目(合并后)
  322. register_check_item: { id: '' }, // 体检人员登记的明细项目
  323. role_menu_info: { id: '' }, // 角色对应的菜单
  324. sum_diagnosis: { id: '' }, // 总检诊断
  325. },
  326. //表当前数据(多条记录 M--more)
  327. tableM: {
  328. adp_roles: [], // 角色
  329. adp_users: [], // 用户
  330. asbitem: [], // 组合项目
  331. customer_org: [], // 体检单位
  332. contact_method: [], // 联系方式
  333. contact_person: [], // 体检单位联系人
  334. customer_org_register: [], // 单位体检次数
  335. customer_org_group: [], // 单位分组
  336. customer_org_group_detail: [], // 单位分组包含的组合项目明细
  337. charge: [], // 收费
  338. menu_info: [], // 菜单与页面
  339. patient_register: [], // 体检人员记录
  340. register_check_asbitem: [], // 体检人员登记的项目(合并前)
  341. register_check: [], // 体检人员登记的项目(合并后)
  342. register_check_item: [], // 体检人员登记的明细项目
  343. role_menu_info: [], // 角色对应的菜单
  344. sum_diagnosis: [], // 总检诊断
  345. },
  346. plus: {
  347. clearPatientRegisterQuery: 0, //清空人员登记界面查询条件(重新赋值体检单位)
  348. PatientRegisterEditGroupBatch: 0, //刷新批量调整分组窗口
  349. PatientRegisterEditItemBatch: 0, //刷新批量调整项目窗口
  350. PatientRegisterForChoose:0, // 体检人员查询窗口
  351. }
  352. },
  353. // 弹窗控制
  354. dialogWin: {
  355. ContactPersonEdit: false, // 联系人
  356. CustomerOrgGroupEdit: false, // 单位分组 新增/编辑
  357. charge: false, // 收费窗口
  358. PatientList: false, // 体检人员档案列表
  359. PatientRegisterEdit: false, // 体检人员登记 新增/编辑
  360. PatientRegisterForChoose: false, // 体检人员登记列表
  361. PatientRegisterEditItemBatch: false, //批量调整项目
  362. PatientRegisterEditGroupBatch: false, //批量调整分组
  363. MenuPageSet: false, // 设置角色菜单权限
  364. }
  365. },
  366. getters: {
  367. },
  368. mutations: {
  369. //同步更改状态
  370. //通用设置 state 值 option {key:,value:} add by pengjun
  371. setData(state, option) {
  372. let array = option.key.split(".");
  373. switch (array.length) {
  374. case 1:
  375. state[array[0]] = option.value;
  376. break;
  377. case 2:
  378. state[array[0]][array[1]] = option.value;
  379. break;
  380. case 3:
  381. state[array[0]][array[1]][array[2]] = option.value;
  382. break;
  383. case 4:
  384. state[array[0]][array[1]][array[2]][array[3]] = option.value;
  385. break;
  386. }
  387. },
  388. doctorCheckPrBaseInit(state) {
  389. state.doctorCheck.prBase = {
  390. id: '', //体检登记ID
  391. patientRegisterNo: '', //条码号
  392. patientNo: '', //档案号
  393. patientName: '', //姓名
  394. sexId: '', //性别
  395. medicalTimes: '', //体检次数
  396. maritalStatusId: '', //婚姻
  397. creationTime: '', //体检日期
  398. customerOrgParentName: '', //单位
  399. customerOrgName: '', //部门
  400. medicalTypeId: '', //体检类别
  401. personnelTypeId: '', //人员类别
  402. nationId: '', //民族
  403. mobileTelephone: '', //手机
  404. } //人员体检登记显示基本信息
  405. },
  406. sumPREditInit(state) {
  407. state.dataTransOpts.tableS.patient_register = {
  408. id: '', //体检登记ID
  409. completeFlag: '', //完成状态
  410. summaryDoctor: '', //总检医生
  411. summaryDate: '', //总检日期
  412. isAudit: '', //审核状态
  413. auditDoctor: '', //审核医生
  414. auditDate: '', //审核日期
  415. isLock: '', //锁定状态
  416. patientId: '', //人员档案ID
  417. } //人员体检登记显示基本信息
  418. },
  419. },
  420. actions: {
  421. // //获取体检人员所选组合项目
  422. // getPatientRegisterAbs(context, id) {
  423. // //console.log(`vuex getPatientRegisterAbs /api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, context.state.dict.asbItemAll)
  424. // if (id) {
  425. // getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`).then(
  426. // (res) => {
  427. // console.log(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, res)
  428. // if (res.code == 1) {
  429. // let patientRegisterAbs = []
  430. // res.data.forEach(e => {
  431. // e.standTotal = e.amount * e.standardPrice
  432. // e.total = e.amount * e.chargePrice
  433. // patientRegisterAbs.push(e)
  434. // });
  435. // context.commit("setData", {
  436. // key: "patientRegister.patientRegisterAbs",
  437. // value: patientRegisterAbs,
  438. // });
  439. // context.commit("setData", {
  440. // key: "dict.asbItem",
  441. // value: arrayReduce(
  442. // [...context.state.dict.asbItem], [...context.state.patientRegister.patientRegisterAbs],
  443. // "id=asbitemId"
  444. // ),
  445. // });
  446. // context.commit("setData", {
  447. // key: "dict.asbItemQuick",
  448. // value: arrayReduce([...context.state.dict.asbItemAll], [...context.state.patientRegister.patientRegisterAbs], "id=asbitemId"),
  449. // });
  450. // //console.log(`getPatientRegisterAbs ${id}`,context.state.dict.asbItemQuick)
  451. // }
  452. // }
  453. // );
  454. // } else {
  455. // context.commit("setData", {
  456. // key: "patientRegister.patientRegisterAbs",
  457. // value: [],
  458. // });
  459. // context.commit("setData", {
  460. // key: "dict.asbItem",
  461. // value: [...context.state.dict.asbItemAll],
  462. // });
  463. // context.commit("setData", {
  464. // key: "dict.asbItemQuick",
  465. // value: [...context.state.dict.asbItemAll],
  466. // });
  467. // }
  468. // },
  469. // //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
  470. // getCustomerOrgGroup(context, customerOrgld) {
  471. // console.log(`vuex /api/app/customer-org-group/in-customer-org-id/${customerOrgld}`);
  472. // getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
  473. // .then((res) => {
  474. // console.log("vuex getCustomerOrgGroup", res.data);
  475. // if (res.code == 1) {
  476. // //this.patientRegister.customerOrgGroup = res.data
  477. // context.commit("setData", {
  478. // key: "patientRegister.customerOrgGroup",
  479. // value: res.data,
  480. // });
  481. // }
  482. // });
  483. // },
  484. },
  485. modules: {},
  486. });