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.

388 lines
14 KiB

3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 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. shift:false, //是否按下 shift键
  19. ctrl:false, //是否按下 ctrl键
  20. },
  21. elProgress:{ //通用进度条相关参数
  22. display:false, //是否显示
  23. textInside:true,
  24. strokeWidth:30,
  25. percentage:0
  26. },
  27. customerOrg: {
  28. //体检单位设置
  29. customerOrgTree: [], //体检单位列表
  30. defaultExpandedKeys:[], //当前选中树的节点
  31. treeCurrentNodekey:'', //当前选中树的节点
  32. treeprops: {
  33. label: "displayName",
  34. value: "id",
  35. id: "id",
  36. children: "treeChildren",
  37. }, //树形组件的数据结构
  38. customerOrgId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
  39. customerOrgRd: { id: "", isLock: "N", isActive: "Y", isLockBox: false, isActiveBox: true, }, //单个体检单位记录值
  40. customerOrgRegisterList: [{ id: 'uuid' }], //单位体检次数登记列表
  41. contactPersonList: [], //联系人列表
  42. contactMethodList: [], //联系方式列表
  43. orgEditStyle: '', //编辑表单样式
  44. orgDetailStyle: '', //体检次数样式
  45. orgDetailHeight: 300, //体检次数LIST表格高度
  46. personStyle: '', //联系人样式
  47. },
  48. //体检单位分组
  49. personnelUnit: {
  50. customerOrgGroupId: "",
  51. personnelgrouping: [], //人员分组
  52. id: "", //根据Id选择的数据
  53. form: { id: "" }, //列表每一项
  54. nogroupselected: [], //已选分组
  55. },
  56. //体检人员登记 add by pengjun
  57. patientRegister: {
  58. customerOrgTreeAll: [], //体检单位列表(含个人)
  59. patientRegisterId: "", //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
  60. patientRegisterRd: { id: "" }, //体检人员记录
  61. patientRegisterTimes: 0, //体检人员登记窗口显示次数(弃用)
  62. addTimes: 0, //用于触发新增时初始化赋值
  63. saveTimes: 0, //用于体检登记时,触发分组调整保存
  64. photo: "/pic/Photo.jpg", //单独抽出,拍照时会更新
  65. cameraVisble: false, //拍照控件显示
  66. lisRequestVisble: false, //检验条码补打
  67. mergeAsbitemVisble: false, //合并项目
  68. patientRegisterRdInit: {
  69. id: "", //id
  70. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  71. patientNo: "", //档案号
  72. customerOrgId: null, //单位编号
  73. customerOrgGroupId: null, //分组
  74. medicalPackageId: null, //套餐
  75. patientName: "", //姓名
  76. birthDate: "", //字符串 如:2012-01-29
  77. sexId: "U", //性别 默认未知U
  78. age: null, //年龄
  79. jobCardNo: "", //工卡号
  80. medicalCardNo: "", //体检卡号
  81. maritalStatusId: "9", //婚姻状况 默认未知
  82. medicalTypeId: null, //体检类别
  83. personnelTypeId: null, //人员类别
  84. jobPost: "", //职务
  85. jobTitle: "", //职称
  86. photo: "", //照片
  87. salesman: "", //介绍人
  88. sexHormoneTermId: null, //性激素期限
  89. isNameHide: "N", //隐藏姓名
  90. isPhoneFollow: "N", //电话随访
  91. isVip: "N", //vip客户
  92. remark: "", //
  93. isLock: "N", //是否锁住
  94. completeFlag: "1", //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
  95. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  96. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  97. medicalTimes: 1, //条码号 【创建编辑时不操作】
  98. organizationUnitId: null, //体检中心
  99. address: "", //地址
  100. email: "", //email
  101. idNo: "", //身份证号
  102. telephone: "", //电话
  103. mobileTelephone: "", //手机号
  104. nationId: null, //民族编号
  105. postalCode: "", //邮编
  106. creatorId: null,
  107. creationTime: "",
  108. lastModificationTime: "",
  109. lastModifierId: null,
  110. }, //体检人员记录(初始值)一般创建用
  111. customerOrgGroupAsb: [], //选中分组所包含的组合项目
  112. medicalPackageAsb: [], //选中套餐所包含的组合项目
  113. customerOrgGroupChange: 0, //控制体检列表记录切换时,0 无需触发更换分组操作
  114. medicalPackageChange: 0, //控制体检列表记录切换时,0 无需触发更换套餐操作
  115. query: {
  116. dateType: 'creationTime', //登记日期
  117. dateRange: null, //日期范围
  118. startDate: null,
  119. endDate: null,
  120. containRefuse: true, //包含弃检项目
  121. times: 0, //触发查询次数
  122. customerOrgId: "", //体检单位ID
  123. CustomerOrgParentId: "", //单位父级ID
  124. customerOrgFlag: true, //单位作为查询条件
  125. customerOrgRegister: {}, //单位体检次数
  126. checkAsbs: null,
  127. }, //查询条件
  128. customerOrgGroup: [], //分组(针对单位)
  129. patientRegisterAbs: [], //人员已选组合项目
  130. prList: [], //体检登记记录
  131. },
  132. //体检医生诊台
  133. doctorCheck: {
  134. prBase: {
  135. id: '', //体检登记ID
  136. }, //人员体检登记显示基本信息
  137. RegisterCheckEdit: {
  138. id: '',
  139. checkDoctorId: null,
  140. checkDate: '',
  141. completeFlag: '0',
  142. LastModificationTime: '',
  143. LastModifierId: null,
  144. isLock: 'N',
  145. isAudit: 'N',
  146. auditorUserId: null,
  147. auditTime: '',
  148. }, //组合项目详情
  149. doctorCheckDialogVisible: false,
  150. RegisterCheckList: [], //人员体检 组合项目列表
  151. RegisterCheck: {}, //单组合项目记录
  152. RegisterCheckId: '', //
  153. checkItemList: [], //组合项目包含的明细项目
  154. checkItem: {}, //单项目记录
  155. checkSummaryList: [], //小结
  156. checkSuggestionList: [], //建议
  157. },
  158. //总检医生
  159. sumDoctorCheck: {
  160. sumDoctorCheckDialogVisible: false,
  161. sumDiagnosisVisible:false,
  162. sumPREdit: {}, //总检医生时间等相关信息(sumPREditInit)
  163. summaryList: [], //综述
  164. suggestionList: [], //建议
  165. diagnosisList: [], //诊断
  166. },
  167. report: {
  168. dialogCusOrgOCX: false, //通用单位查询控件显示
  169. dataCusOrgOCX: [], //通用单位查询的数据
  170. dialogAsbitemOCX: false,
  171. dataAsbitemOCX: [], //通用组合项目查询的数据
  172. },
  173. //公共字典数据 add by pengjun
  174. dict: {
  175. personOrgId: "00000000-0000-0000-0000-000000000000", //个人体检单位ID
  176. organization: [], //体检中心
  177. sex: [], //性别(人员档案用)
  178. forSex: [], //适用性别
  179. medicalType: [], //体检类别
  180. personnelType: [], //人员类别
  181. maritalStatus: [], //婚姻状况
  182. sexHormoneTerm: [], //性激素期
  183. nation: [], //民族
  184. birthPlace: [], //籍惯 ,出生地
  185. completeFlag: [
  186. //体检完成标志
  187. { id: "0", displayName: "预登记" },
  188. { id: "1", displayName: "正式登记" },
  189. { id: "2", displayName: "部份已检" },
  190. { id: "3", displayName: "已总检" },
  191. ],
  192. checkCompleteFlag: [
  193. //体检完成标志
  194. { id: "0", displayName: "未检" },
  195. { id: "1", displayName: "已检" },
  196. { id: "2", displayName: "弃检" },
  197. ],
  198. sumAudit: [
  199. //总检审核
  200. { id: "Y", displayName: "已审核" },
  201. { id: "N", displayName: "未审核" }
  202. ],
  203. payType: [
  204. //支付方式,比如是0自费、2免费、1单位支付
  205. { id: "0", displayName: "个人支付" },
  206. { id: "1", displayName: "单位支付" },
  207. { id: "2", displayName: "赠送" },
  208. ],
  209. cardMode: [
  210. { id: "0", displayName: "充值卡" },
  211. { id: "1", displayName: "积分卡" },
  212. ],
  213. cardType: [], //会员卡类别
  214. billFlag: [
  215. { id: "0", displayName: "收费" },
  216. { id: "1", displayName: "退费" },
  217. { id: "2", displayName: "充值" },
  218. ],
  219. checkTypeFlag: [
  220. { id: "0", displayName: "检验" },
  221. { id: "1", displayName: "功能检查" },
  222. ],
  223. medicalPackage: [], //所有套餐
  224. customerOrgGroupAll: [], //所有分组,不限单位,不限次数
  225. customerOrg: [], //所有单位,非树结构
  226. payMode: [], //支付方式
  227. itemTypeTree: [], //体检类别 树结构
  228. asbItemAll: [], //所有组合项目
  229. asbItem: [], //显示的 未选组合项目
  230. asbItemQuick: [], //显示的 未选组合项目(供快速选择)
  231. },
  232. //项目特有的对象数据
  233. projPriv:{
  234. idNos:{
  235. Code: "Success", //读取成功/失败
  236. Name: "刘滔",
  237. Sex: "男",
  238. Nation: "汉",
  239. Birthday: "1986-01-22",
  240. Address: "湖南省长沙县春华镇九木村新元组367号",
  241. DepartmentIC: "长沙县公安局",
  242. StartDateIC: "2019-11-25",
  243. EndDateIC: "2039-11-25",
  244. IDCode: "430121198601223693",
  245. Photo: "base64编码字符串"
  246. }, //读取身份证信息
  247. },
  248. },
  249. getters: {
  250. },
  251. mutations: {
  252. //同步更改状态
  253. //通用设置 state 值 option {key:,value:} add by pengjun
  254. setData(state, option) {
  255. let array = option.key.split(".");
  256. switch (array.length) {
  257. case 1:
  258. state[array[0]] = option.value;
  259. break;
  260. case 2:
  261. state[array[0]][array[1]] = option.value;
  262. break;
  263. case 3:
  264. state[array[0]][array[1]][array[2]] = option.value;
  265. break;
  266. case 4:
  267. state[array[0]][array[1]][array[2]][array[3]] = option.value;
  268. break;
  269. }
  270. },
  271. doctorCheckPrBaseInit(state) {
  272. state.doctorCheck.prBase = {
  273. id: '', //体检登记ID
  274. patientRegisterNo: '', //条码号
  275. patientNo: '', //档案号
  276. patientName: '', //姓名
  277. sexId: '', //性别
  278. medicalTimes: '', //体检次数
  279. maritalStatusId: '', //婚姻
  280. creationTime: '', //体检日期
  281. customerOrgParentName: '', //单位
  282. customerOrgName: '', //部门
  283. medicalTypeId: '', //体检类别
  284. personnelTypeId: '', //人员类别
  285. nationId: '', //民族
  286. mobileTelephone: '', //手机
  287. } //人员体检登记显示基本信息
  288. },
  289. sumPREditInit(state) {
  290. state.sumDoctorCheck.sumPREdit = {
  291. id: '', //体检登记ID
  292. completeFlag: '', //完成状态
  293. summaryDoctor: '', //总检医生
  294. summaryDate: '', //总检日期
  295. isAudit: '', //审核状态
  296. auditDoctor: '', //审核医生
  297. auditDate: '', //审核日期
  298. isLock: '', //锁定状态
  299. patientId: '', //人员档案ID
  300. } //人员体检登记显示基本信息
  301. },
  302. },
  303. actions: {
  304. //获取体检人员所选组合项目
  305. getPatientRegisterAbs(context, id) {
  306. //console.log(`vuex getPatientRegisterAbs /api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, context.state.dict.asbItemAll)
  307. if (id) {
  308. getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`).then(
  309. (res) => {
  310. console.log(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, res)
  311. if (res.code == 1) {
  312. let patientRegisterAbs = []
  313. res.data.forEach(e => {
  314. e.standTotal = e.amount * e.standardPrice
  315. e.total = e.amount * e.chargePrice
  316. patientRegisterAbs.push(e)
  317. });
  318. context.commit("setData", {
  319. key: "patientRegister.patientRegisterAbs",
  320. value: patientRegisterAbs,
  321. });
  322. context.commit("setData", {
  323. key: "dict.asbItem",
  324. value: arrayReduce(
  325. [...context.state.dict.asbItem],
  326. [...context.state.patientRegister.patientRegisterAbs],
  327. "id=asbitemId"
  328. ),
  329. });
  330. context.commit("setData", {
  331. key: "dict.asbItemQuick",
  332. value: arrayReduce([...context.state.dict.asbItemAll], [...context.state.patientRegister.patientRegisterAbs], "id=asbitemId"),
  333. });
  334. //console.log(`getPatientRegisterAbs ${id}`,context.state.dict.asbItemQuick)
  335. }
  336. }
  337. );
  338. } else {
  339. context.commit("setData", {
  340. key: "patientRegister.patientRegisterAbs",
  341. value: [],
  342. });
  343. context.commit("setData", {
  344. key: "dict.asbItem",
  345. value: [...context.state.dict.asbItemAll],
  346. });
  347. context.commit("setData", {
  348. key: "dict.asbItemQuick",
  349. value: [...context.state.dict.asbItemAll],
  350. });
  351. }
  352. },
  353. //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
  354. getCustomerOrgGroup(context, customerOrgld) {
  355. console.log(`vuex /api/app/customer-org-group/in-customer-org-id/${customerOrgld}`);
  356. getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
  357. .then((res) => {
  358. console.log("vuex getCustomerOrgGroup", res.data);
  359. if (res.code == 1) {
  360. //this.patientRegister.customerOrgGroup = res.data
  361. context.commit("setData", {
  362. key: "patientRegister.customerOrgGroup",
  363. value: res.data,
  364. });
  365. }
  366. });
  367. },
  368. },
  369. modules: {},
  370. });