comprehensive-query.js 86 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725
  1. Vue.use(Vuedals.default);
  2. new Vue({
  3. el: '#main',
  4. data: {
  5. height: '',
  6. isloading: false, //加载中
  7. start: '',
  8. end: '',
  9. tabledata: [], //表格数据
  10. levelList: [
  11. {level: '4', areaLevel: '2'},
  12. {level: '3', areaLevel: '3'},
  13. {level: '2', areaLevel: '4'}
  14. ], //两种搜索,地区等级对比
  15. areaLevel: '', // 2、市,3、区,4、社区,5、团队
  16. initareaLevel: '',
  17. initlevel: '',
  18. initarea: '',
  19. level: '',
  20. area: '',
  21. areaTitle: '',
  22. index: '121',
  23. lowLevel: '',
  24. initlowLevel: '',
  25. years: [],
  26. chooseYear: '',
  27. userRole: '',
  28. treedata: [],
  29. treedataExpert: [{label: '邀请专科回复统计', id: '1'}],
  30. tableHeader: [],
  31. defaultProps: {
  32. children: 'children',
  33. label: 'label'
  34. },
  35. pickerOptions: {
  36. disabledDate: function (time) {
  37. return time.getTime() > Date.now();
  38. }
  39. },
  40. radio: '1',
  41. timeLevel: 2,
  42. searchJson: {},
  43. currentPage: 1,
  44. currentSize: 10,
  45. datatotal: 0,
  46. rangeList: [],
  47. rangeCode: '',
  48. areaList: [],
  49. areaCode: '',
  50. communityList: [{code: '', name: '全部'}],
  51. communityCode: '',
  52. teamList: [{code: '', name: '全部'}],
  53. teamCode: '',
  54. detailInquire: [
  55. {
  56. label: '明细查询',
  57. children: [
  58. {label: '咨询分析', id: '33'},
  59. {label: '签约分析', id: '34'},
  60. {label: '专病分析', id: '35'},
  61. {label: '生日祝福分析', id: '36'},
  62. {label: '上门服务分析', id: '37'},
  63. {label: '长处方分析', id: '38'},
  64. {label: '体征数据分析', id: '39'},
  65. {label: '上转预约明细', id: '40'},
  66. {label: '专病复诊明细', id: '53'},
  67. {label: '微信绑定明细', id: '41'},
  68. {label: '居民积分明细', id: '42'},
  69. {label: '入户访视明细', id: '43'},
  70. {label: '康复下转明细', id: '44'},
  71. {label: '邀请专科回复明细', id: '45'}
  72. ]
  73. }
  74. ],
  75. mzfTabsData: [
  76. {label: '慢阻肺医院工作量表', id: '46'},
  77. {label: '慢阻肺患者查询', id: '47'},
  78. {label: '慢阻肺入组进度', id: '48'},
  79. {label: '慢阻肺入组总明细', id: '49'},
  80. {label: '慢阻肺随访进度', id: '50'},
  81. {label: '慢阻肺随访总明细', id: '51'},
  82. {label: 'v1入组情况报表', id: '52'},
  83. {label: '慢阻肺呼吸训练数据', id: '54'},
  84. {label: '慢阻肺手表数据', id: '55'},
  85. {label: '慢阻肺监查、稽查情况统计', id: '56'},
  86. {label: '第一阶段入组随访进度', id: '57'},
  87. {label: '第二阶段三级医院入组进度', id: '58'},
  88. {label: '第二阶段社区医院入组进度', id: '59'},
  89. {label: '第二阶段三级医院随访进度', id: '60'},
  90. {label: '第二阶段社区医院随访进度', id: '61'},
  91. {label: '第二阶段三级医院随访进度及出组情况', id: '62'}
  92. ],
  93. mzfJcTabsData: [
  94. {label: '慢阻肺患者档案', id: '63'},
  95. {label: '管理情况自助查询', id: '64'}
  96. ],
  97. // 慢阻肺管理情况自处查询字段列表
  98. copdManageSearchFilterList: [
  99. {
  100. label: '总患者数',
  101. value: 'totalPatients'
  102. },
  103. {
  104. label: '今年新增人数',
  105. value: 'newPatientsThisYear'
  106. },
  107. {
  108. label: '已随访人数',
  109. value: 'followedUpPatients'
  110. },
  111. {
  112. label: '完成率',
  113. value: 'completionRate'
  114. },
  115. {
  116. label: '回退次数',
  117. value: 'returnCount'
  118. },
  119. {
  120. label: '转移次数',
  121. value: 'transferCount'
  122. },
  123. {
  124. label: '病人转归情况人数',
  125. value: 'patientOutcomeCount'
  126. },
  127. {
  128. label: '家签患者人数',
  129. value: 'signedPatients'
  130. },
  131. {
  132. label: '非家签患者人数',
  133. value: 'unsignedPatients'
  134. },
  135. {
  136. label: '已分配人数',
  137. value: 'assignedPatients'
  138. },
  139. {
  140. label: '未分配人数',
  141. value: 'unassignedPatients'
  142. },
  143. {
  144. label: '已接收人数',
  145. value: 'receivedPatients'
  146. },
  147. {
  148. label: '未接收人数',
  149. value: 'unreceivedPatients'
  150. },
  151. {
  152. label: '未随访人数',
  153. value: 'unfollowedPatients'
  154. },
  155. {
  156. label: '已随访次数',
  157. value: 'followUpCount'
  158. },
  159. {
  160. label: '失访人数',
  161. value: 'lostFollowUpPatients'
  162. },
  163. {
  164. label: '死亡人数',
  165. value: 'deceasedPatients'
  166. }
  167. ],
  168. copdFilterCheckValue: [],
  169. handleNodeShow: 1,
  170. handleNodeId: 0,
  171. radio1: '',
  172. radio2: '',
  173. radio3: '',
  174. radio4: '',
  175. radio5: '',
  176. radio6: '',
  177. radio7: '',
  178. radio8: '',
  179. radio9: '',
  180. radio10: '',
  181. cities: [
  182. {value: '高血压', num: '4'},
  183. {value: '糖尿病', num: '5'},
  184. {value: '65岁以上人群', num: '3'},
  185. {value: '0-6岁小孩', num: '7'},
  186. {value: '计划生育家庭', num: '9'},
  187. {value: '严重精神障碍', num: '10'},
  188. {value: '残疾人', num: '11'},
  189. {value: '普通人群', num: '1'},
  190. {value: '结核病', num: '12'},
  191. {value: '低保人群', num: '8'},
  192. {value: '孕产妇', num: '6'}
  193. ],
  194. checkedCities: [],
  195. specialCities: [],
  196. specialCheckedCities: [],
  197. serveCities: [
  198. {value: '残疾人', num: '1'},
  199. {value: '失能/半失能老人', num: '5'},
  200. {value: '80岁以上老人', num: '7'},
  201. {value: '肺结核患者', num: '2'},
  202. {value: '计生特殊家庭', num: '3'},
  203. {value: '重性精神病', num: '4'},
  204. {value: '其他', num: '6'}
  205. ],
  206. serveSpecialCities: [],
  207. options: [
  208. {
  209. value: '1',
  210. label: '是'
  211. },
  212. {
  213. value: '0',
  214. label: '否'
  215. }
  216. ],
  217. value: '',
  218. form: {
  219. endorseTheTicket: '',
  220. renew: '',
  221. backToSign: '',
  222. WeChat: ''
  223. },
  224. form2: {
  225. juniorCollege: '',
  226. family: '',
  227. resident: '',
  228. patientType: ''
  229. },
  230. form3: {
  231. family: '',
  232. resident: ''
  233. },
  234. form4: {
  235. family: '',
  236. resident: ''
  237. },
  238. form5: {
  239. family: '',
  240. resident: ''
  241. },
  242. handleData: [],
  243. diseaseData: [],
  244. serviceTypeData: [],
  245. analyseData: [], //分析数据
  246. searchJsonTime: undefined,
  247. loadingTwo: false,
  248. radio1Show: null,
  249. serverType: '',
  250. diseaseDataType: '',
  251. serviceTypeDataType: '',
  252. fullscreenLoading: false,
  253. derive: '',
  254. tabsList: [
  255. {id: '1', text: '综合查询', show: true},
  256. {id: '2', text: '明细查询', show: false},
  257. {id: '3', text: '汇总数据', show: false},
  258. {id: '4', text: '专科综合查询', show: false},
  259. // {id:'5',text:'慢阻肺综合查询',show:false},
  260. {id: '6', text: '慢阻肺统计', show: false},
  261. {id: '7', text: '疾控慢阻肺监测', show: false}
  262. ],
  263. tabsId: '1',
  264. facility: '', //体征数据分析 - 设备类型
  265. illness: '', //体征数据分析 - 疾病类型
  266. form6: {
  267. resident: '',
  268. doctor: ''
  269. },
  270. form7: {
  271. resident: '',
  272. doctorOne: '',
  273. hospital: '',
  274. doctorTwo: '',
  275. administrativeOffice: ''
  276. },
  277. form9: {
  278. resident: '',
  279. doctorTwo: ''
  280. },
  281. form10: {
  282. resident: '',
  283. doctorTwo: ''
  284. },
  285. form11: {
  286. patientName: '',
  287. status: '',
  288. hospitalCode: '',
  289. hospitalDoctor: '',
  290. orgCode: '',
  291. doctor: '',
  292. archiveStatus: '',
  293. patientType: ''
  294. },
  295. form12: {
  296. patientName: '',
  297. status: '',
  298. doctor: '',
  299. hospital: '',
  300. archiveStatus: ''
  301. },
  302. getHealthData: [],
  303. form8: {
  304. renew: ''
  305. },
  306. reservationData: [],
  307. wexinBindingData: [],
  308. hospitalData: [],
  309. administrativeOffice: [],
  310. jifenData: [],
  311. ruhuData: [],
  312. collect: [
  313. {
  314. id: 'kfxzrs,kfxzrc,szrs,szrc',
  315. label: '专病汇总',
  316. code: '1',
  317. children: [
  318. {id: 'kfxzrs', label: '康复下转人数', code: '1'},
  319. {id: 'kfxzrc', label: '康复下转人次', code: '1'},
  320. {id: 'szrs', label: '上转人数', code: '1'},
  321. {id: 'szrc', label: '上转人次', code: '1'}
  322. ]
  323. },
  324. {
  325. id: 'scsbs,scrc,yctzrc,gyrc',
  326. label: '体征数据汇总',
  327. code: '2',
  328. children: [
  329. {id: 'scsbs', label: '上传设备数', code: '2'},
  330. {id: 'scrc', label: '上传人次', code: '2'},
  331. {id: 'yctzrc', label: '异常体征人次', code: '2'},
  332. {id: 'gyrc', label: '干预人次', code: '2'}
  333. ]
  334. },
  335. {
  336. id: 'fwgd',
  337. label: '上门服务汇总',
  338. code: '3',
  339. children: [{id: 'fwgd', label: '服务工单', code: '3'}]
  340. }
  341. ],
  342. specHosName: '',
  343. specHosList: [],
  344. collectCode: '',
  345. diseaseReport: [],
  346. diseaseColumn: [],
  347. diseaseHeader: [],
  348. facilitySign: '',
  349. getDeviceReport: [],
  350. getDeviceColumn: [],
  351. getDeviceHeader: [],
  352. getDoorReport: [],
  353. getDoorColumn: [],
  354. getDoorHeader: [],
  355. isCheck: false,
  356. deorsumvergence: [{value: '', label: '全部'}],
  357. rehabilitationHospital: [{value: '', label: '全部'}],
  358. archiveList: [{value: '', label: '全部'}],
  359. inviteStatus: [
  360. {value: '', label: '全部'},
  361. {value: '0', label: '待回复'},
  362. {value: '1', label: '进行中'},
  363. {value: '2', label: '已完成'},
  364. {value: '3', label: '未回复'}
  365. ],
  366. inviteStatus1: [
  367. {value: '', label: '全部'},
  368. {value: '1', label: '门诊患者'},
  369. {value: '2', label: '出院患者'}
  370. ],
  371. recoveryList: [],
  372. dialogVisible: false,
  373. signatoryList: [],
  374. tableKey: '',
  375. indicator: [],
  376. communityHospitals: [],
  377. invitationList: [],
  378. expertFamilyIdType: '',
  379. expertReplyData: [],
  380. specializedHospital: [{value: '', label: '全部'}],
  381. mzfzhcxData: [{name: '测试数据1条'}],
  382. mzftjTree: [
  383. {
  384. id: 'zhzrs,yglrs,yrzrs,ysfrs,yczrs,bnrglrs,swrs',
  385. label: '患者管理统计',
  386. code: '1',
  387. children: [
  388. {id: 'zhzrs', label: '总患者人数', code: '1'},
  389. {id: 'yglrs', label: '已管理人数', code: '1'},
  390. {id: 'yrzrs', label: '已入组人数', code: '1'},
  391. {id: 'ysfrs', label: '已失访人数', code: '1'},
  392. {id: 'yczrs', label: '已出组人数', code: '1'},
  393. {id: 'bnrglrs', label: '不纳入管理人数', code: '1'},
  394. {id: 'swrs', label: '死亡人数', code: '1'}
  395. ]
  396. },
  397. {
  398. id: 'yjcrs,yjccs,djcrs,djccs,djcrs,djccs',
  399. label: '监查稽查统计',
  400. code: '2',
  401. children: [
  402. {id: 'yjcrs', label: '已稽查人数', code: '2'},
  403. {id: 'yjccs', label: '已稽查次数', code: '2'},
  404. {id: 'djcrs', label: '待监查人数', code: '2'},
  405. {id: 'djccs', label: '待监查次数', code: '2'},
  406. {id: 'djcrs', label: '待稽查人数', code: '2'},
  407. {id: 'djccs', label: '待稽查次数', code: '2'}
  408. ]
  409. },
  410. {
  411. id: 'xzrs,jsxzrs',
  412. label: '下转接收统计',
  413. code: '3',
  414. children: [
  415. {id: 'xzrs', label: '下转人数', code: '3'},
  416. {id: 'jsxzrs', label: '接收下转人数', code: '3'}
  417. ]
  418. },
  419. {
  420. id: 'v1sxrs,v2rzrs,v3rs,v4rs,v5rs,v6rs,zgrs,tlzls',
  421. label: '随访进度统计',
  422. code: '4',
  423. children: [
  424. {id: 'v1sxrs', label: 'v1筛选人数', code: '4'},
  425. {id: 'v2rzrs', label: 'v2入组人数', code: '4'},
  426. {id: 'v3rs', label: 'v3人数', code: '4'},
  427. {id: 'v4rs', label: 'v4人数', code: '4'},
  428. {id: 'v5rs', label: 'v5人数', code: '4'},
  429. {id: 'v6rs', label: 'v6人数', code: '4'},
  430. {id: 'zgrs', label: '在管人数', code: '4'},
  431. {id: 'tlzls', label: '脱落总例数', code: '4'}
  432. ]
  433. }
  434. ],
  435. list: [],
  436. startTime: new Date('2023', '05', '26'),
  437. endTime: new Date(),
  438. regionList: [],
  439. regionData: [{label: '全市', id: '1', type: '1'}],
  440. regionListList: [],
  441. tertiaryHospitalsData: [{label: '全部', id: '1', type: '2'}],
  442. communityHospitalsList: [],
  443. communityHospitalsData: [{label: '全部', id: '1', type: '3'}],
  444. groupingList: [],
  445. groupingData: [{label: '全部', id: '1', type: '4'}],
  446. administrationStatusList: [],
  447. administrationStatusData: [{label: '全部', id: '1', type: '5'}],
  448. show: false,
  449. showTwo: false,
  450. showThree: false,
  451. currentPage: 1,
  452. currentSize: 10,
  453. datatotal: 0, //总数
  454. loadingTwo: false,
  455. setDisabled: {
  456. disabledDate: function (time) {
  457. return time.getTime() < new Date('2023', '05', '26') || time.getTime() > Date.now();
  458. }
  459. },
  460. s: '',
  461. e: '',
  462. // 下转状态
  463. transferStatusOptions: [
  464. {
  465. label: '全部',
  466. value: -1
  467. },
  468. {
  469. label: '已下转',
  470. value: 1
  471. },
  472. {
  473. label: '未下转',
  474. value: 2
  475. }
  476. ],
  477. // 接收状态
  478. receiveStatusOptions: [
  479. {
  480. label: '全部',
  481. value: -1
  482. },
  483. {
  484. label: '已接收',
  485. value: 1
  486. },
  487. {
  488. label: '未接收',
  489. value: 2
  490. }
  491. ],
  492. // 接收的社区医院
  493. receivingHospitalList: [],
  494. // 档案状态
  495. recordStatusOptions: [
  496. {
  497. label: '全部',
  498. value: -1
  499. },
  500. {
  501. label: '正常',
  502. value: 1
  503. },
  504. {
  505. label: '失访',
  506. value: 2
  507. },
  508. {
  509. label: '回退',
  510. value: 3
  511. }
  512. ],
  513. // 生存状态
  514. survivalStatusOption: [
  515. {
  516. label: '全部',
  517. value: -1
  518. },
  519. {
  520. label: '生存',
  521. value: 1
  522. },
  523. {
  524. label: '死亡',
  525. value: 2
  526. }
  527. ]
  528. },
  529. components: {
  530. vuedals: Vuedals.Component
  531. },
  532. watch: {
  533. rangeCode: function (val) {
  534. var vm = this;
  535. if (vm.initlevel != 2) {
  536. vm.communityCode = '';
  537. }
  538. vm.teamCode = '';
  539. vm.getTreeList();
  540. },
  541. areaCode: function (val) {
  542. var vm = this;
  543. vm.selChange(3);
  544. },
  545. communityCode: function (val) {
  546. var vm = this;
  547. vm.selChange(5);
  548. },
  549. 'startTime': {
  550. handler: function (o) {
  551. if (!o) {
  552. this.list.splice(0, 1);
  553. }
  554. },
  555. deep: true,
  556. immediate: true
  557. },
  558. 'endTime': {
  559. handler: function (o) {
  560. if (!o) {
  561. this.list.splice(0, 1);
  562. }
  563. },
  564. deep: true,
  565. immediate: true
  566. }
  567. },
  568. mounted: function () {
  569. var vm = this;
  570. //初始化数据
  571. initData(vm);
  572. vm.getQuotaStr()
  573. vm.getDiseaseTypeList();
  574. vm.height = document.body.offsetHeight - 85;
  575. window.onresize = function () {
  576. vm.height = document.body.offsetHeight - 85;
  577. };
  578. this.s = this.startTime.format('yyyy-MM-dd');
  579. this.e = this.endTime.format('yyyy-MM-dd');
  580. this.list.unshift({type: '0', id: 'time', label: this.s + '~' + this.e});
  581. },
  582. methods: {
  583. //获取综合查询指标
  584. getQuotaStr(){
  585. var vm =this
  586. statisticAPI.getDictByDictName({name:'jkcopd_quotaStr'}).then(function(res){
  587. vm.copdManageSearchFilterList=res.list
  588. console.log(vm.copdManageSearchFilterList,'osidosioaidoasodais')
  589. })
  590. },
  591. startTimeChange: function (o) {
  592. if (!this.list[0] || this.list[0].type != 0) {
  593. this.list.unshift({
  594. type: '0',
  595. id: 'time',
  596. label: o.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd')
  597. });
  598. } else {
  599. this.list[0].label = o.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd');
  600. }
  601. },
  602. endTimeChange: function (o) {
  603. if (!this.list[0] || this.list[0].type != 0) {
  604. this.list.unshift({
  605. type: '0',
  606. id: 'time',
  607. label: this.startTime.format('yyyy-MM-dd') + '~' + o.format('yyyy-MM-dd')
  608. });
  609. } else {
  610. this.list[0].label = this.startTime.format('yyyy-MM-dd') + '~' + o.format('yyyy-MM-dd');
  611. }
  612. },
  613. // 确定
  614. confirm: function () {
  615. this.hospitalWorkStatistics();
  616. },
  617. // 选择
  618. change: function (val) {
  619. this.list = this.list.concat(val);
  620. },
  621. // 已选
  622. deleteClick: function (item) {
  623. if (item.id == 'time') {
  624. this.startTime = '';
  625. this.endTime = '';
  626. this.list.splice(0, 1);
  627. }
  628. var index = this.list.findIndex(function (v) {
  629. return item.id == v.id;
  630. });
  631. this.list.splice(index, 1);
  632. },
  633. // 取消
  634. cancel: function () {
  635. this.startTime = new Date('2023', '05', '26');
  636. this.endTime = new Date();
  637. if (!this.list[0] || this.list[0].type != 0) {
  638. this.list.unshift({
  639. type: '0',
  640. id: 'time',
  641. label: this.startTime.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd')
  642. });
  643. } else {
  644. this.list[0].label = this.startTime.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd');
  645. }
  646. },
  647. // 导出
  648. exportHandle: function () {
  649. var vm = this;
  650. vm.loadingTwo = true;
  651. statisticAPI
  652. .exportHospitalWorkStatistics(
  653. {
  654. startDate: this.startTime.format('yyyy-MM-dd'),
  655. endDate: this.endTime.format('yyyy-MM-dd')
  656. },
  657. '慢阻肺综合查询表.xls'
  658. )
  659. .then(function (res) {
  660. vm.loadingTwo = false;
  661. });
  662. },
  663. renderTableHeader: function (h, item) {
  664. var $index = item.$index;
  665. return h('div', [
  666. h('span', this.diseaseHeader[$index - 1] + ' ', {
  667. align: 'center',
  668. marginTop: '10px'
  669. }),
  670. h(
  671. 'el-popover',
  672. {
  673. props: {
  674. placement: 'top-start', // 一般 icon 处可添加浮层说明,浮层位置等属性
  675. width: '100',
  676. trigger: 'hover'
  677. }
  678. },
  679. [
  680. h('p', this.indicator[$index - 2], {
  681. class: 'text-align: center; margin: 0'
  682. }),
  683. h('i', {
  684. // 生成 i 标签 ,添加icon 设置 样式,slot 必填
  685. class: 'el-icon-question',
  686. style: 'color:#ccc,margin:18px,padding-top:10px',
  687. slot: 'reference'
  688. })
  689. ]
  690. )
  691. ]);
  692. },
  693. renderHeadeRexpert: function (h, item) {
  694. var index = item.$index;
  695. return [
  696. index == '3'
  697. ? '邀请次数'
  698. : index == '4'
  699. ? '进行中'
  700. : index == '5'
  701. ? '已回复'
  702. : index == '6'
  703. ? '未回复'
  704. : index == '7'
  705. ? '回复率'
  706. : index == '8'
  707. ? '平均响应时长'
  708. : '用户评价',
  709. h(
  710. 'el-tooltip',
  711. {
  712. props: {
  713. content: (function () {
  714. return index == '3'
  715. ? '发起邀请总次数'
  716. : index == ''
  717. ? '其中咨询未完成,包含待回复和进行中'
  718. : index == '5'
  719. ? '其中医生已回复且咨询已结束的'
  720. : index == '6'
  721. ? '其中咨询已结束医生未回复的'
  722. : index == '7'
  723. ? '已回复 / 邀请次数'
  724. : index == '8'
  725. ? '[邀请1响应时长+ 邀请2响应时长 + ...] / 总次数'
  726. : '用户评价';
  727. })(),
  728. placement: 'top'
  729. }
  730. },
  731. [
  732. h('span', {
  733. class: {
  734. 'el-icon-question': true
  735. }
  736. })
  737. ]
  738. )
  739. ];
  740. },
  741. // 获取康复下转明细 --- 下转状态
  742. deorsumvergenceStatusFunction: function (name) {
  743. var vm = this;
  744. signAPI.getDictByDictName({name: name}).then(function (res) {
  745. if (res.status === 200) {
  746. if (name == 'rehabilitation_status') {
  747. res.list.forEach(function (v) {
  748. vm.deorsumvergence.push({
  749. value: v.code,
  750. label: v.value
  751. });
  752. });
  753. }
  754. if (name == 'rehabilitation_hospital') {
  755. res.list.forEach(function (v) {
  756. vm.rehabilitationHospital.push({
  757. value: v.code,
  758. label: v.value
  759. });
  760. });
  761. }
  762. if (name == 'archive_status') {
  763. res.list.forEach(function (v) {
  764. vm.archiveList.push({
  765. value: v.code,
  766. label: v.value
  767. });
  768. });
  769. }
  770. }
  771. });
  772. },
  773. // 获取社区医院
  774. hospitalsByType: function () {
  775. var vm = this;
  776. statisticAPI
  777. .hospitalsByType({
  778. type: 1,
  779. code: '350200'
  780. })
  781. .then(function (res) {
  782. if (res.status == 200) {
  783. res.list.forEach(function (v) {
  784. vm.communityHospitals.push({
  785. value: v.code,
  786. label: v.name
  787. });
  788. });
  789. }
  790. })
  791. .catch(function (err) {
  792. console.log(err, 'Errr');
  793. });
  794. },
  795. // 康复下转操作
  796. operation: function (num, item) {
  797. var vm = this;
  798. if (num != 2) {
  799. statisticAPI
  800. .synchronizePationSingle({id: item.id})
  801. .then(function (res) {
  802. if (res.status == 200) {
  803. toastr.info('操作成功');
  804. this.tableKey = Math.random();
  805. } else {
  806. toastr.error(res.msg);
  807. }
  808. })
  809. .catch(function (err) {
  810. console.log(err, 'Errr');
  811. });
  812. } else {
  813. vm.signatoryList = [];
  814. statisticAPI
  815. .kangfuGetSignInfo({idcard: item.idcard})
  816. .then(function (res) {
  817. if (res.status == 200) {
  818. if (res.data != null) {
  819. vm.signatoryList.push(res.data);
  820. }
  821. }
  822. })
  823. .catch(function (err) {
  824. console.log(err, 'Errr');
  825. });
  826. this.dialogVisible = true;
  827. }
  828. },
  829. getImgurl: function (url) {
  830. return httpRequest.getImgUrl(url);
  831. },
  832. reset: function () {
  833. if (this.tabsId == 1) {
  834. this.getTreeList();
  835. } else {
  836. this.collect = [
  837. {
  838. id: 'kfxzrs,kfxzrc,szrs,szrc',
  839. label: '专病汇总',
  840. code: '1',
  841. children: [
  842. {id: 'kfxzrs', label: '康复下转人数', code: '1'},
  843. {id: 'kfxzrc', label: '康复下转人次', code: '1'},
  844. {id: 'szrs', label: '下转人数', code: '1'},
  845. {id: 'szrc', label: '下转人数', code: '1'}
  846. ]
  847. },
  848. {
  849. id: 'scsbs,scrc,yctzrc,gyrc',
  850. label: '体征数据汇总',
  851. code: '2',
  852. children: [
  853. {id: 'scsbs', label: '上传设备数', code: '2'},
  854. {id: 'scrc', label: '上传人次', code: '2'},
  855. {id: 'yctzrc', label: '异常体征人次', code: '2'},
  856. {id: 'gyrc', label: '干预人次', code: '2'}
  857. ]
  858. },
  859. {
  860. id: 'fwgd',
  861. label: '上门服务汇总',
  862. code: '3',
  863. children: [{id: 'fwgd', label: '服务工单', code: '3'}]
  864. }
  865. ];
  866. }
  867. },
  868. // 清除
  869. eliminateClick: function () {
  870. this.radio =
  871. this.handleNodeId == 44 || this.expertFamilyIdType == 'zhuanke1' || this.handleNodeId == 45 ? '2' : '1';
  872. this.radio1 = '';
  873. this.radio2 = '';
  874. this.radio3 = '';
  875. this.radio4 = '';
  876. this.radio5 = '';
  877. this.radio6 = '';
  878. this.radio7 = '';
  879. this.radio8 = '';
  880. this.radio9 = '';
  881. this.radio10 = '';
  882. this.form = {
  883. endorseTheTicket: '',
  884. renew: '',
  885. backToSign: '',
  886. WeChat: ''
  887. };
  888. this.form2 = {
  889. juniorCollege: '',
  890. family: '',
  891. resident: ''
  892. };
  893. this.form3 = {
  894. family: '',
  895. resident: ''
  896. };
  897. this.form4 = {
  898. family: '',
  899. resident: ''
  900. };
  901. this.form5 = {
  902. family: '',
  903. resident: ''
  904. };
  905. this.facility = ''; //体征数据分析 - 设备类型
  906. this.illness = ''; //体征数据分析 - 疾病类型
  907. this.form6 = {
  908. resident: '',
  909. doctor: ''
  910. };
  911. this.form7 = {
  912. resident: '',
  913. doctorOne: '',
  914. hospital: '',
  915. doctorTwo: '',
  916. administrativeOffice: ''
  917. }
  918. ;(this.form9 = {
  919. resident: '',
  920. doctorTwo: ''
  921. }),
  922. (this.form10 = {
  923. resident: '',
  924. doctorTwo: ''
  925. }),
  926. (this.form8 = {
  927. renew: ''
  928. });
  929. this.facilitySign = '';
  930. this.form11 = {
  931. patientName: '',
  932. status: '',
  933. hospitalCode: '',
  934. hospitalDoctor: '',
  935. orgCode: '',
  936. doctor: '',
  937. archiveStatus: ''
  938. }
  939. ;(this.form12 = {
  940. patientName: '',
  941. status: '',
  942. doctor: '',
  943. hospital: '',
  944. archiveStatus: ''
  945. }),
  946. initData(this);
  947. // initTime(this)
  948. // initScope(this)
  949. },
  950. tabsClick: function (item) {
  951. var vm = this;
  952. this.copdFilterCheckValue=[]
  953. vm.tabsId = item.id;
  954. if (item.id != 4) {
  955. vm.expertFamilyIdType = '';
  956. }
  957. if (item.id == 5) {
  958. vm.handleNodeShow = 5;
  959. }
  960. vm.tabsList.forEach(function (res) {
  961. if (res.id == item.id) {
  962. res.show = true;
  963. } else {
  964. res.show = false;
  965. }
  966. });
  967. vm.eliminateClick();
  968. },
  969. // 获取汇总数据的专科医院
  970. specHosData: function () {
  971. var vm = this;
  972. statisticAPI.getSpecialHospital().then(function (res) {
  973. if (res.status == 200) {
  974. res.data.forEach(function (item) {
  975. vm.specHosList.push({code: item.code, name: item.name});
  976. });
  977. }
  978. });
  979. },
  980. getDiseaseTypeList: function () {
  981. var vm = this;
  982. statisticAPI.getDiseaseTypeList({}).then(function (res) {
  983. if (res.status == 200) {
  984. vm.specialCities = res.list;
  985. }
  986. });
  987. },
  988. // 签约人群
  989. handleCheckedCitiesChange: function (value) {
  990. var vm = this;
  991. vm.handleData = value;
  992. },
  993. // 下转病种
  994. diseaseChange: function (value) {
  995. var vm = this;
  996. vm.diseaseData = value;
  997. },
  998. // 服务类型
  999. serviceTypeChange: function (value) {
  1000. var vm = this;
  1001. vm.serviceTypeData = value;
  1002. },
  1003. // 综合析树形图
  1004. treedataClick: function (name, data) {
  1005. var vm = this;
  1006. vm.handleNodeShow = 1;
  1007. vm.handleNodeId = 0;
  1008. vm.currentPage = 1;
  1009. vm.radio = '1'; //签约年度 --创建时间
  1010. // initTime(vm)
  1011. // initScope(vm)
  1012. },
  1013. // 汇总树形图
  1014. collectClick: function (data, isCheck) {
  1015. var vm = this;
  1016. vm.derive = data.label;
  1017. vm.handleNodeShow = 3;
  1018. vm.currentPage = 1;
  1019. vm.radio = '1'; //签约年度 --创建时间
  1020. vm.isCheck = isCheck;
  1021. },
  1022. collCheck: function (data, name) {
  1023. // console.log(arguments)
  1024. var vm = this;
  1025. vm.diseaseReport = [];
  1026. vm.datatotal = 0;
  1027. vm.collect.forEach(function (item) {
  1028. item.children.forEach(function (o) {
  1029. if (o.code != data.code) {
  1030. vm.$refs.collectTree.setChecked(o, false, true);
  1031. }
  1032. });
  1033. if (data.id == item.id) {
  1034. vm.$refs.collectTree.setChecked(item, vm.isCheck, true);
  1035. } else {
  1036. item.children.forEach(function (o) {
  1037. if (data.id == o.id) {
  1038. vm.$refs.collectTree.setChecked(o, vm.isCheck, true);
  1039. }
  1040. });
  1041. }
  1042. });
  1043. vm.handleNodeId = 'huizongshuju';
  1044. vm.collectCode = data.code;
  1045. if (data.code == 1) {
  1046. vm.rangeList = [
  1047. {name: '按区', code: 'town'},
  1048. {name: '按社区', code: 'hospital'},
  1049. {name: '按团队', code: 'team'},
  1050. {name: '按专科医院', code: 'specHos'}
  1051. ];
  1052. vm.specHosData();
  1053. } else {
  1054. vm.rangeList = [
  1055. {name: '按区', code: 'town'},
  1056. {name: '按社区', code: 'hospital'},
  1057. {name: '按团队', code: 'team'}
  1058. ];
  1059. }
  1060. },
  1061. // 点击明细查询树形图
  1062. handleNodeClick: function (item, type) {
  1063. var vm = this;
  1064. vm.copdFilterCheckValue=[]
  1065. vm.handleNodeId = 0;
  1066. vm.derive = item.label;
  1067. // if(data.id>=33) { //明细查询以下
  1068. vm.handleNodeShow = 2; // 明细查询tabs为2
  1069. vm.tableHeader = []; // 选择统计的数组
  1070. vm.analyseData = []; // 明细查询数组
  1071. // }
  1072. vm.handleNodeId = item.id; //切换后的id
  1073. vm.radio = '1'; //签约年度 --创建时间
  1074. vm.radio1 = ''; //咨询分析咨询状态
  1075. vm.radio2 = '';
  1076. vm.radio3 = '';
  1077. vm.radio4 = '';
  1078. vm.radio5 = '';
  1079. vm.radio6 = '';
  1080. vm.radio7 = '';
  1081. vm.radio8 = '';
  1082. vm.radio9 = '';
  1083. vm.radio10 = '';
  1084. vm.checkedCities = []; //签约人群清空
  1085. vm.specialCheckedCities = []; //下转病种清空
  1086. vm.serveSpecialCities = []; //服务类型清空
  1087. vm.diseaseReport = [];
  1088. vm.datatotal = 0;
  1089. vm.form = {
  1090. endorseTheTicket: '',
  1091. renew: '',
  1092. backToSign: '',
  1093. WeChat: ''
  1094. };
  1095. vm.form2 = {
  1096. juniorCollege: '',
  1097. family: '',
  1098. resident: ''
  1099. }
  1100. ;(vm.form3 = {
  1101. family: '',
  1102. resident: ''
  1103. }),
  1104. (vm.form4 = {
  1105. family: '',
  1106. resident: ''
  1107. }),
  1108. (vm.form5 = {
  1109. family: '',
  1110. resident: ''
  1111. }),
  1112. (this.form6 = {
  1113. resident: '',
  1114. doctor: ''
  1115. });
  1116. this.form7 = {
  1117. resident: '',
  1118. doctorOne: '',
  1119. hospital: '',
  1120. doctorTwo: '',
  1121. administrativeOffice: ''
  1122. }
  1123. ;(this.form9 = {
  1124. resident: '',
  1125. doctorTwo: ''
  1126. }),
  1127. (this.form10 = {
  1128. resident: '',
  1129. doctorTwo: ''
  1130. }),
  1131. (this.form8 = {
  1132. renew: ''
  1133. });
  1134. this.form11 = {
  1135. patientName: '',
  1136. status: '',
  1137. hospitalCode: '',
  1138. hospitalDoctor: '',
  1139. orgCode: '',
  1140. doctor: '',
  1141. archiveStatus: ''
  1142. };
  1143. initTime(vm); //时间初始化
  1144. initScope(vm); //数据范围初始化
  1145. vm.currentPage = 1;
  1146. if (type == 'zhuanke') {
  1147. vm.handleNodeShow = 4;
  1148. vm.radio = '2';
  1149. vm.expertFamilyIdType = 'zhuanke' + item.id;
  1150. vm.expertFamily(item.id);
  1151. } else {
  1152. vm.analysFunction(vm.handleNodeId); //明细查询列表查询
  1153. }
  1154. // 慢阻肺监测档案
  1155. if (type == 7) {
  1156. // console.log("点击了");
  1157. EventBus.$emit('copd-reset-select', {});
  1158. }
  1159. },
  1160. expertFamily: function (id) {
  1161. var vm = this;
  1162. if (id == '1') {
  1163. vm.expertReplyList();
  1164. }
  1165. },
  1166. // 邀请专科回复统计传参
  1167. expertReply: function () {
  1168. var vm = this;
  1169. vm.searchJsonTime = vm.beforeReq();
  1170. return {
  1171. // signYear :vm.radio=='1'?vm.chooseYear:'', //签约年度
  1172. team: vm.teamCode, //团队
  1173. area: vm.areaCode, //地区
  1174. hospital: vm.communityCode, //社区
  1175. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1176. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1177. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1178. pageSize: vm.currentSize,
  1179. page: vm.currentPage
  1180. };
  1181. },
  1182. // 邀请专科回复统计列表
  1183. expertReplyList: function () {
  1184. var vm = this;
  1185. vm.loadingTwo = true;
  1186. statisticAPI.consultHelpCountPage(vm.expertReply()).then(function (res) {
  1187. if (res.status == 200) {
  1188. vm.expertReplyData = res.detailModelList;
  1189. vm.datatotal = res.totalCount;
  1190. vm.loadingTwo = false;
  1191. }
  1192. });
  1193. },
  1194. analysFunction: function (id) {
  1195. var vm = this;
  1196. // idcard = idcard.replace(/^(.{6})(?:\d+)(.{4})$/,"$1****$2") 身份证 医保卡 脱敏显示
  1197. vm.detailFunction(id);
  1198. },
  1199. // 下转预约获取医生,科室
  1200. getReservationHosAndDept: function (data) {
  1201. var vm = this;
  1202. statisticAPI
  1203. .getReservationHosAndDept({
  1204. hospital: data ? data : '',
  1205. type: data ? '2' : ''
  1206. })
  1207. .then(function (res) {
  1208. if (res.status == 200) {
  1209. if (data) {
  1210. vm.administrativeOffice = [];
  1211. res.data.forEach(function (item) {
  1212. vm.administrativeOffice.push({
  1213. value: item.code,
  1214. label: item.name
  1215. });
  1216. });
  1217. } else {
  1218. vm.hospitalData = [];
  1219. res.data.forEach(function (item) {
  1220. vm.hospitalData.push({
  1221. value: item.code,
  1222. label: item.name
  1223. });
  1224. });
  1225. }
  1226. }
  1227. });
  1228. },
  1229. hospitalChange: function (data) {
  1230. var vm = this;
  1231. vm.getReservationHosAndDept(data);
  1232. },
  1233. // 咨询分析
  1234. getConsultList: function () {
  1235. var vm = this;
  1236. vm.loadingTwo = true;
  1237. vm.lastAjax = 'statisticsExport/getConsultList';
  1238. statisticAPI
  1239. .getConsultList({
  1240. year: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1241. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1242. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1243. status: vm.radio1, //咨询状态,1已回复,0未回复,2未及时回复
  1244. team: vm.teamCode, //团队
  1245. area: vm.areaCode, //地区
  1246. hospital: vm.communityCode, //社区
  1247. rang: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1248. pageSize: vm.currentSize,
  1249. page: vm.currentPage
  1250. })
  1251. .then(function (res) {
  1252. // console.log(res,"咨询分析")
  1253. if (res.status == 200) {
  1254. vm.analyseData = res.data.list;
  1255. vm.datatotal = res.data.total;
  1256. vm.loadingTwo = false;
  1257. }
  1258. if (res.status == -1) {
  1259. vm.loadingTwo = false;
  1260. vm.$message.error(res.msg);
  1261. }
  1262. });
  1263. },
  1264. // 签约分析
  1265. getSignList: function () {
  1266. var vm = this;
  1267. vm.lastAjax = 'statisticsExport/getSignList';
  1268. vm.loadingTwo = true;
  1269. var handleDataList = [];
  1270. vm.serverType = '';
  1271. vm.handleData.forEach(function (res) {
  1272. handleDataList.push(res.num);
  1273. });
  1274. vm.serverType = handleDataList.join(',');
  1275. statisticAPI
  1276. .getSignList({
  1277. year: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1278. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1279. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1280. serverType: vm.serverType, //签约人群
  1281. status: vm.radio2, //签约状态,1已签约,0待审核,2代缴费
  1282. isUpdate: vm.form.endorseTheTicket, //是否改签 1是0否
  1283. isAdd: vm.form.renew, //是否续签 1是0否
  1284. isOut: vm.form.backToSign, //是否退签 1是0否
  1285. isBindWX: vm.form.WeChat, //是否绑定微信 1是0否
  1286. team: vm.teamCode, //团队
  1287. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1288. hospital: vm.communityCode, //社区
  1289. rang: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1290. signYearAge: vm.radio10, // 签约年限
  1291. pageSize: vm.currentSize,
  1292. page: vm.currentPage
  1293. })
  1294. .then(function (res) {
  1295. // console.log(res,"签约分析")
  1296. if (res.status == 200) {
  1297. res.data.list.forEach(function (item) {
  1298. item.sscNum = item.sscNum.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1299. item.idcardNum = item.idcardNum.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2');
  1300. });
  1301. vm.analyseData = res.data.list;
  1302. vm.datatotal = res.data.total;
  1303. vm.loadingTwo = false;
  1304. }
  1305. if (res.status == -1) {
  1306. vm.loadingTwo = false;
  1307. vm.$message.error(res.msg);
  1308. }
  1309. });
  1310. },
  1311. // 专病分析
  1312. getSickList: function () {
  1313. var vm = this;
  1314. // vm.diseaseData
  1315. vm.lastAjax = 'statisticsExport/getSickList';
  1316. vm.loadingTwo = true;
  1317. var handleDataList = [];
  1318. vm.diseaseDataType = '';
  1319. vm.diseaseData.forEach(function (res) {
  1320. handleDataList.push(res.code);
  1321. });
  1322. vm.diseaseDataType = handleDataList.join(',');
  1323. statisticAPI
  1324. .getSickList({
  1325. year: vm.radio == '1' ? vm.chooseYear : '', //年度
  1326. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1327. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1328. diseaseType: vm.diseaseDataType, //病种类型
  1329. status: vm.radio3, //下转状态,1已接受,0未接受,2未管理
  1330. doctorName: vm.form2.juniorCollege, //专科医生
  1331. familyDoctorName: vm.form2.family, //家庭医生名字
  1332. patientName: vm.form2.resident, // 居民姓名
  1333. team: vm.teamCode, //团队
  1334. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1335. hospital: vm.communityCode, //社区
  1336. rang: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1337. pageSize: vm.currentSize,
  1338. page: vm.currentPage,
  1339. patientType: vm.form2.patientType
  1340. })
  1341. .then(function (res) {
  1342. // console.log(res,"专病分析")
  1343. if (res.status == 200) {
  1344. res.data.list.forEach(function (item) {
  1345. item.sscNum = item.sscNum.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1346. item.idcardNum = item.idcardNum.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2');
  1347. });
  1348. vm.analyseData = res.data.list;
  1349. vm.datatotal = res.data.total;
  1350. vm.loadingTwo = false;
  1351. }
  1352. if (res.status == -1) {
  1353. vm.loadingTwo = false;
  1354. vm.$message.error(res.msg);
  1355. }
  1356. });
  1357. },
  1358. // 生日祝福分析明细
  1359. getBirthdayPatientList: function () {
  1360. var vm = this;
  1361. vm.loadingTwo = true;
  1362. vm.lastAjax = 'statisticsExport/getBirthdayPatientList';
  1363. statisticAPI
  1364. .getBirthdayPatientList({
  1365. patientName: vm.form3.resident, // 居民姓名
  1366. doctorName: vm.form3.family, //医生姓名
  1367. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1368. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1369. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1370. status: vm.radio4, //状态(不传为全部,1、已发送,2、未发送)
  1371. team: vm.teamCode, //团队
  1372. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1373. hospital: vm.communityCode, //社区
  1374. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1375. pageSize: vm.currentSize,
  1376. page: vm.currentPage
  1377. })
  1378. .then(function (res) {
  1379. if (res.status == 200) {
  1380. // console.log(res,"Sddddd")
  1381. res.data.detailModelList.forEach(function (item) {
  1382. item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1383. item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2');
  1384. });
  1385. vm.analyseData = res.data.detailModelList;
  1386. vm.datatotal = res.data.total;
  1387. vm.loadingTwo = false;
  1388. }
  1389. if (res.status == -1) {
  1390. vm.loadingTwo = false;
  1391. vm.$message.error(res.msg);
  1392. }
  1393. });
  1394. },
  1395. // 长处方分析明细
  1396. getPrescriptionList: function () {
  1397. var vm = this;
  1398. vm.loadingTwo = true;
  1399. vm.lastAjax = 'statisticsExport/getPrescriptionList';
  1400. statisticAPI
  1401. .getPrescriptionList({
  1402. patientName: vm.form5.resident, // 居民姓名
  1403. doctorName: vm.form5.family, //医生姓名
  1404. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1405. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1406. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1407. status: vm.radio6, //续方状态 0待审核 20药师审核中 40待支付 100已完成 999其他
  1408. diagnosis: vm.radio7, //续方疾病类型1高血压2糖尿病3其他
  1409. dispensaryType: vm.radio8, // 取药方式1自取2快递3健管师配送
  1410. team: vm.teamCode, //团队
  1411. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1412. hospital: vm.communityCode, //社区
  1413. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1414. pageSize: vm.currentSize,
  1415. page: vm.currentPage
  1416. })
  1417. .then(function (res) {
  1418. if (res.status == 200) {
  1419. res.data.detailModelList.forEach(function (item) {
  1420. // console.log(item.finish_time,"长处方分析")
  1421. item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1422. item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2');
  1423. });
  1424. vm.analyseData = res.data.detailModelList;
  1425. vm.datatotal = res.data.total;
  1426. vm.loadingTwo = false;
  1427. }
  1428. if (res.status == -1) {
  1429. vm.loadingTwo = false;
  1430. vm.$message.error(res.msg);
  1431. }
  1432. });
  1433. },
  1434. // 上门服务分析明细
  1435. getDoorServiceList: function () {
  1436. var vm = this;
  1437. vm.lastAjax = '';
  1438. vm.loadingTwo = true;
  1439. var handleDataList = [];
  1440. vm.serviceTypeDataType = 'statisticsExport/getDoorServiceList';
  1441. vm.serviceTypeData.forEach(function (res) {
  1442. handleDataList.push(res.num);
  1443. });
  1444. vm.serviceTypeDataType = handleDataList.join(',');
  1445. statisticAPI
  1446. .getDoorServiceList({
  1447. patientName: vm.form4.resident, // 居民姓名
  1448. doctorName: vm.form4.family, //医生姓名
  1449. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1450. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1451. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1452. status: vm.radio5, //工单状态 -1已取消,1待派单、2待接单、3已接单、4待服务、5待评价
  1453. type: vm.serviceTypeDataType, //服务类型 1残疾人,2肺结核患者,3计生特殊家庭,4重性精神病,5失能/半失能老人,6其他,7 80岁以上老人
  1454. team: vm.teamCode, //团队
  1455. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1456. hospital: vm.communityCode, //社区
  1457. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1458. pageSize: vm.currentSize,
  1459. page: vm.currentPage
  1460. })
  1461. .then(function (res) {
  1462. if (res.status == 200) {
  1463. // console.log(res,"上门服务分析明细")
  1464. res.data.detailModelList.forEach(function (item) {
  1465. item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1466. item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2');
  1467. });
  1468. vm.analyseData = res.data.detailModelList;
  1469. vm.datatotal = res.data.total;
  1470. vm.loadingTwo = false;
  1471. }
  1472. if (res.status == -1) {
  1473. vm.loadingTwo = false;
  1474. vm.$message.error(res.msg);
  1475. }
  1476. });
  1477. },
  1478. //体征数据分析传参
  1479. getHealthParameter: function () {
  1480. var vm = this;
  1481. return {
  1482. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1483. team: vm.teamCode, //团队
  1484. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1485. hospital: vm.communityCode, //社区
  1486. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1487. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1488. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1489. name: vm.form6.resident, // 居民姓名
  1490. category: vm.facility, //设备类型
  1491. doctorName: vm.form6.doctor, //医生姓名
  1492. serverType: vm.illness, //签约疾病类型
  1493. pageSize: vm.currentSize,
  1494. page: vm.currentPage
  1495. };
  1496. },
  1497. //体征数据分析
  1498. physicalSignData: function () {
  1499. var vm = this;
  1500. vm.loadingTwo = true;
  1501. vm.lastAjax = 'statisticsExport/getHealthList';
  1502. statisticAPI.getHealthList(vm.getHealthParameter()).then(function (res) {
  1503. if (res.status == 200) {
  1504. // console.log(res,"体征数据")
  1505. vm.getHealthData = res.data.detailModelList;
  1506. vm.datatotal = res.data.total;
  1507. vm.loadingTwo = false;
  1508. }
  1509. if (res.status == -1) {
  1510. vm.loadingTwo = false;
  1511. vm.$message.error(res.msg);
  1512. }
  1513. });
  1514. },
  1515. //上转预约传参
  1516. reservationParameter: function () {
  1517. var vm = this;
  1518. return {
  1519. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1520. team: vm.teamCode, //团队
  1521. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1522. hospital: vm.communityCode, //社区
  1523. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1524. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1525. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1526. name: vm.form7.resident, // 居民姓名
  1527. doctorName: vm.form7.doctorOne, //签约医生姓名
  1528. reservationHospital: vm.form7.hospital, //签约医院
  1529. reservationDept: vm.form7.administrativeOffice, //预约科室
  1530. reservationDoctorName: vm.form7.doctorTwo, //预约医生
  1531. pageSize: vm.currentSize,
  1532. page: vm.currentPage
  1533. };
  1534. },
  1535. // 上转预约
  1536. upTransferAppointment: function () {
  1537. var vm = this;
  1538. vm.loadingTwo = true;
  1539. vm.lastAjax = 'statisticsExport/getDoctorReservationList';
  1540. statisticAPI.getDoctorReservationList(vm.reservationParameter()).then(function (res) {
  1541. if (res.status == 200) {
  1542. // console.log(res,"上转预约")
  1543. vm.reservationData = res.data.detailModelList;
  1544. vm.datatotal = res.data.total;
  1545. vm.loadingTwo = false;
  1546. vm.getReservationHosAndDept();
  1547. }
  1548. if (res.status == -1) {
  1549. vm.loadingTwo = false;
  1550. vm.$message.error(res.msg);
  1551. }
  1552. });
  1553. },
  1554. //微信绑定传参
  1555. wexinBindingParameter: function () {
  1556. var vm = this;
  1557. return {
  1558. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1559. team: vm.teamCode, //团队
  1560. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1561. hospital: vm.communityCode, //社区
  1562. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1563. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1564. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1565. binging: vm.form8.renew, //是否绑定微信
  1566. pageSize: vm.currentSize,
  1567. page: vm.currentPage
  1568. };
  1569. },
  1570. // 微信绑定
  1571. wechatBinding: function () {
  1572. var vm = this;
  1573. vm.loadingTwo = true;
  1574. vm.lastAjax = 'statisticsExport/getWexinBindingList';
  1575. statisticAPI.getWexinBindingList(vm.wexinBindingParameter()).then(function (res) {
  1576. if (res.status == 200) {
  1577. // console.log(res,"微信绑定")
  1578. res.data.detailModelList.forEach(function (res) {
  1579. res.sex = res.sex == 1 ? '男' : '女';
  1580. res.apply_date = new Date(res.apply_date).format('yyyy-MM-dd HH:mm:ss');
  1581. });
  1582. vm.wexinBindingData = res.data.detailModelList;
  1583. vm.datatotal = res.data.total;
  1584. vm.loadingTwo = false;
  1585. }
  1586. if (res.status == -1) {
  1587. vm.loadingTwo = false;
  1588. vm.$message.error(res.msg);
  1589. }
  1590. });
  1591. },
  1592. // 居民积分明细传参
  1593. residentIntegralParameter: function () {
  1594. var vm = this;
  1595. var parameter = {
  1596. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1597. team: vm.teamCode, //团队
  1598. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1599. hospital: vm.specHosName ? vm.specHosName : vm.communityCode, //专病医院
  1600. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1601. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1602. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1603. pageSize: vm.currentSize,
  1604. page: vm.currentPage,
  1605. patientName: vm.form9.resident || '',
  1606. doctorName: vm.form9.doctorTwo || ''
  1607. };
  1608. return parameter;
  1609. },
  1610. // 居民积分明细
  1611. residentIntegral: function () {
  1612. var vm = this;
  1613. vm.loadingTwo = true;
  1614. vm.lastAjax = 'statisticsExport/patinetIntegralAnalysis';
  1615. statisticAPI.patinetIntegralAnalysis(vm.residentIntegralParameter()).then(function (res) {
  1616. if (res.status == 200) {
  1617. vm.loadingTwo = false;
  1618. res.data.list.forEach(function (item) {
  1619. item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1620. // item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/,"$1****$2")
  1621. });
  1622. vm.jifenData = res.data.list;
  1623. vm.datatotal = res.data.total;
  1624. } else {
  1625. vm.loadingTwo = false;
  1626. vm.$message.error(res.msg);
  1627. }
  1628. });
  1629. },
  1630. // 入户访视明细传参
  1631. interviewParameter: function () {
  1632. var vm = this;
  1633. var parameter = {
  1634. // signYear:'2020', //签约年度
  1635. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1636. team: vm.teamCode, //团队
  1637. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1638. hospital: vm.specHosName ? vm.specHosName : vm.communityCode, //专病医院
  1639. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1640. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1641. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1642. pageSize: vm.currentSize,
  1643. page: vm.currentPage,
  1644. patientName: vm.form10.resident || '',
  1645. doctorName: vm.form10.doctorTwo || ''
  1646. };
  1647. return parameter;
  1648. },
  1649. // 入户访视
  1650. interview: function () {
  1651. var vm = this;
  1652. vm.loadingTwo = true;
  1653. vm.lastAjax = 'statisticsExport/findPatientFollowListByCondition';
  1654. statisticAPI.findPatientFollowListByCondition(vm.interviewParameter()).then(function (res) {
  1655. if (res.status == 200) {
  1656. vm.loadingTwo = false;
  1657. vm.ruhuData = res.data.list;
  1658. vm.datatotal = res.data.total;
  1659. } else {
  1660. vm.loadingTwo = false;
  1661. vm.$message.error(res.msg);
  1662. }
  1663. });
  1664. },
  1665. //邀请专科回复明细传参
  1666. invitationDetailsParameter: function () {
  1667. var vm = this;
  1668. vm.searchJsonTime = vm.beforeReq();
  1669. var parameter = {
  1670. patientName: vm.form12.patientName,
  1671. name: '',
  1672. status: vm.form12.status,
  1673. startTime: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1674. endTime: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1675. specialistName: vm.form12.doctor, //专科医生姓名
  1676. specialistHospital: vm.form12.hospital, //专科医院code
  1677. specialistDeptName: vm.form12.archiveStatus, //专科科室名称
  1678. team: vm.teamCode,
  1679. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1680. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1681. hospital: vm.communityCode, //医院
  1682. pageSize: vm.currentSize,
  1683. page: vm.currentPage
  1684. };
  1685. return parameter;
  1686. },
  1687. //邀请专科回复明细列表
  1688. invitationDetails: function () {
  1689. var vm = this;
  1690. vm.loadingTwo = true;
  1691. statisticAPI.consultHelpDetailPage(vm.invitationDetailsParameter()).then(function (res) {
  1692. if (res.status == 200) {
  1693. vm.loadingTwo = false;
  1694. res.detailModelList.forEach(function (v) {
  1695. v.sex = v.sex == 1 ? '男' : '女';
  1696. });
  1697. vm.invitationList = res.detailModelList;
  1698. vm.datatotal = res.totalCount;
  1699. } else {
  1700. vm.loadingTwo = false;
  1701. vm.$message.error(res.msg);
  1702. }
  1703. });
  1704. },
  1705. // 康复下转明细传参
  1706. recoveryParameter: function () {
  1707. var vm = this;
  1708. vm.searchJsonTime = vm.beforeReq();
  1709. var parameter = {
  1710. // signYear:vm.radio=='1'?vm.chooseYear:'', //签约年度
  1711. // team:vm.teamCode, //团队
  1712. // area:vm.areaCode=='350200'?'':vm.areaCode, //地区
  1713. // range:vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1714. startTime: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1715. endTime: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1716. size: vm.currentSize,
  1717. page: vm.currentPage,
  1718. patientName: vm.form11.patientName,
  1719. status: vm.form11.status,
  1720. hospitalCode: vm.form11.hospitalCode,
  1721. orgCode: vm.form11.orgCode,
  1722. hospitalDoctor: vm.form11.hospitalDoctor,
  1723. doctor: vm.form11.doctor,
  1724. archiveStatus: vm.form11.archiveStatus,
  1725. patientType: vm.form11.patientType
  1726. };
  1727. return parameter;
  1728. },
  1729. // 康复下转
  1730. recovery: function () {
  1731. var vm = this;
  1732. vm.loadingTwo = true;
  1733. vm.lastAjax = 'doctor/specialist/rehabilitation/rehabilitationPatientInfo';
  1734. statisticAPI.rehabilitationPatientInfo(vm.recoveryParameter()).then(function (res) {
  1735. if (res.status == 200) {
  1736. vm.loadingTwo = false;
  1737. res.detailModelList.forEach(function (v) {
  1738. v.sex = v.sex == 1 ? '男' : '女';
  1739. });
  1740. vm.recoveryList = res.detailModelList;
  1741. vm.datatotal = res.totalCount;
  1742. } else {
  1743. vm.loadingTwo = false;
  1744. vm.$message.error(res.msg);
  1745. }
  1746. });
  1747. },
  1748. //专病汇总传参
  1749. getSpecialParameter: function () {
  1750. var vm = this;
  1751. var parameter = {
  1752. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1753. team: vm.teamCode, //团队
  1754. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1755. hospital: vm.specHosName ? vm.specHosName : vm.communityCode, //专病医院
  1756. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1757. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1758. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1759. menu: vm.beforeReq().checked
  1760. // pageSize:vm.currentSize,
  1761. // page:vm.currentPage,
  1762. };
  1763. return parameter;
  1764. },
  1765. // 专病汇总
  1766. getSpecialDiseaseReport: function () {
  1767. var vm = this;
  1768. vm.loadingTwo = true;
  1769. statisticAPI.getSpecialDiseaseReport(vm.getSpecialParameter()).then(function (res) {
  1770. if (res.status == 200) {
  1771. vm.indicator = [];
  1772. res.data.column.forEach(function (v) {
  1773. if (v == 'kfxzrs') {
  1774. vm.indicator.push('康复计划人数');
  1775. }
  1776. if (v == 'kfxzrc') {
  1777. vm.indicator.push('康复计划数');
  1778. }
  1779. if (v == 'szrs') {
  1780. vm.indicator.push('预约挂号人数');
  1781. }
  1782. if (v == 'szrc') {
  1783. vm.indicator.push('预约挂号数');
  1784. }
  1785. });
  1786. vm.loadingTwo = false;
  1787. vm.diseaseReport = res.data.list;
  1788. vm.diseaseColumn = res.data.column;
  1789. // '康复计划人数','康复计划数','预约挂号人数','预约挂号数'
  1790. vm.diseaseHeader = res.data.header;
  1791. vm.datatotal = res.data.list.length;
  1792. } else {
  1793. vm.loadingTwo = false;
  1794. vm.$message.error(res.msg);
  1795. }
  1796. });
  1797. },
  1798. //体征分析传参
  1799. getDeviceParameter: function () {
  1800. var vm = this;
  1801. var parameter = {
  1802. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1803. team: vm.teamCode, //团队
  1804. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1805. hospital: vm.communityCode, //医院
  1806. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1807. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1808. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1809. category: vm.facilitySign,
  1810. menu: vm.beforeReq().checked
  1811. // pageSize:vm.currentSize,
  1812. // page:vm.currentPage,
  1813. };
  1814. return parameter;
  1815. },
  1816. // 体征分析数据
  1817. getDeviceHealthReport: function () {
  1818. var vm = this;
  1819. vm.loadingTwo = true;
  1820. statisticAPI.getDeviceHealthReport(vm.getDeviceParameter()).then(function (res) {
  1821. if (res.status == 200) {
  1822. vm.loadingTwo = false;
  1823. // console.log(res,"sss")
  1824. vm.getDeviceReport = res.data.list;
  1825. vm.getDeviceColumn = res.data.column;
  1826. vm.getDeviceHeader = res.data.header;
  1827. vm.datatotal = res.data.list.length;
  1828. } else {
  1829. vm.loadingTwo = false;
  1830. vm.$message.error(res.msg);
  1831. }
  1832. });
  1833. },
  1834. //上门汇总传参
  1835. getDoorParameter: function () {
  1836. var vm = this;
  1837. var parameter = {
  1838. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1839. team: vm.teamCode, //团队
  1840. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1841. hospital: vm.communityCode, //医院
  1842. status: vm.radio9,
  1843. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1844. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1845. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1846. menu: vm.beforeReq().checked
  1847. // pageSize:vm.currentSize,
  1848. // page:vm.currentPage,
  1849. };
  1850. return parameter;
  1851. },
  1852. // 上门汇总
  1853. getDoorServerOrderReport: function () {
  1854. var vm = this;
  1855. vm.loadingTwo = true;
  1856. statisticAPI.getDoorServerOrderReport(vm.getDoorParameter()).then(function (res) {
  1857. if (res.status == 200) {
  1858. vm.loadingTwo = false;
  1859. // console.log(res,"sss")
  1860. vm.getDoorReport = res.data.list;
  1861. vm.getDoorColumn = res.data.column;
  1862. vm.getDoorHeader = res.data.header;
  1863. vm.datatotal = res.data.list.length;
  1864. } else {
  1865. vm.loadingTwo = false;
  1866. vm.$message.error(res.msg);
  1867. }
  1868. });
  1869. },
  1870. getTreeList: function () {
  1871. var vm = this;
  1872. statisticAPI.exportTreeList({rang: vm.rangeCode}).then(function (res) {
  1873. if (res.status == 200) {
  1874. console.log(res, 'Sddd')
  1875. ;(vm.treedata = []), (jindex = 0);
  1876. _.each(res.data, function (item, index) {
  1877. vm.treedata.push({
  1878. id: 'p_' + jindex,
  1879. label: index,
  1880. children: []
  1881. });
  1882. _.each(item, function (citem, cindex) {
  1883. vm.treedata[jindex].children.push({
  1884. id: cindex,
  1885. label: citem
  1886. });
  1887. });
  1888. jindex++;
  1889. });
  1890. }
  1891. });
  1892. },
  1893. beforeReq: function (flag) {
  1894. var vm = this,
  1895. startDate = '',
  1896. endDate = '',
  1897. checked = [];
  1898. if (vm.radio == '1') {
  1899. if (vm.chooseYear == 2022) {
  1900. startDate = '2022-07-01';
  1901. endDate = '2022-12-31';
  1902. } else if (vm.chooseYear > 2022) {
  1903. startDate = vm.chooseYear + '-01-01';
  1904. endDate = getEndDate(vm.chooseYear);
  1905. } else {
  1906. startDate = getStartDate(vm.chooseYear);
  1907. endDate = getEndDate(vm.chooseYear);
  1908. }
  1909. vm.timeLevel = 2;
  1910. } else {
  1911. if (!vm.start && !vm.end) {
  1912. this.$message({
  1913. message: '请选择创建时间',
  1914. type: 'warning'
  1915. });
  1916. return false;
  1917. } else {
  1918. if (vm.start > vm.end) {
  1919. this.$message({
  1920. message: '开始时间应早于结束时间',
  1921. type: 'warning'
  1922. });
  1923. return false;
  1924. } else {
  1925. startDate = vm.start;
  1926. endDate = vm.end;
  1927. vm.timeLevel = 1;
  1928. }
  1929. }
  1930. }
  1931. if (vm.handleNodeId == 0 || vm.handleNodeId == 'huizongshuju') {
  1932. var checkTree;
  1933. if (vm.tabsId == 1) {
  1934. checkTree = vm.$refs.tree.getCheckedNodes(true);
  1935. } else {
  1936. checkTree = vm.$refs.collectTree.getCheckedNodes(true);
  1937. }
  1938. if (checkTree.length) {
  1939. if (!flag) {
  1940. vm.tableHeader = [];
  1941. }
  1942. _.each(checkTree, function (item, index) {
  1943. if (!flag) {
  1944. vm.tableHeader.push({prop: item.label, label: item.label});
  1945. }
  1946. checked.push(item.id);
  1947. });
  1948. } else {
  1949. this.$message({
  1950. message: '请选择搜索指标!',
  1951. type: 'warning'
  1952. });
  1953. return false;
  1954. }
  1955. } else if (vm.handleNodeId == 2) {
  1956. this.$message({
  1957. message: '请选择明细查询!',
  1958. type: 'warning'
  1959. });
  1960. return false;
  1961. }
  1962. return {start: startDate, end: endDate, checked: checked.join(',')};
  1963. },
  1964. // 查询
  1965. searchHandle: function (status) {
  1966. // console.log(this.beforeReq())
  1967. var vm = this;
  1968. vm.searchJsonTime = vm.beforeReq();
  1969. vm.currentPage = 1;
  1970. if (this.radio1 == 1) {
  1971. this.radio1Show = true;
  1972. } else {
  1973. this.radio1Show = false;
  1974. }
  1975. if (vm.handleNodeId == 0) {
  1976. if (vm.searchJsonTime) {
  1977. vm.searchJson = {
  1978. startDate: vm.searchJsonTime.start,
  1979. endDate: vm.searchJsonTime.end,
  1980. quotaStr: vm.searchJsonTime.checked,
  1981. range: vm.rangeCode,
  1982. team: vm.teamCode,
  1983. hospital: vm.communityCode,
  1984. area: vm.areaCode == '350200' ? '' : vm.areaCode,
  1985. size: vm.currentSize,
  1986. page: vm.currentPage,
  1987. timeLevel: vm.timeLevel
  1988. };
  1989. vm.getStatisticDataList();
  1990. }
  1991. } else if (vm.collectCode == 1) {
  1992. // 专病汇总
  1993. vm.getSpecialDiseaseReport();
  1994. } else if (vm.collectCode == 2) {
  1995. // 体征数据汇总
  1996. vm.getDeviceHealthReport();
  1997. } else if (vm.collectCode == 3) {
  1998. // 上门服务汇总
  1999. vm.getDoorServerOrderReport();
  2000. } else {
  2001. vm.detailFunction(vm.handleNodeId, status);
  2002. }
  2003. },
  2004. getStatisticDataList: function () {
  2005. var vm = this;
  2006. vm.isloading = true;
  2007. var params = JSON.parse(JSON.stringify(vm.searchJson));
  2008. params.page = vm.currentPage;
  2009. statisticAPI.getStatisticDataList(params).then(function (res) {
  2010. if (res.status == 200) {
  2011. vm.tabledata = res.data.data;
  2012. vm.datatotal = res.data.total;
  2013. if (vm.tabledata.length) {
  2014. vm.tableHeader = [];
  2015. _.each(vm.tabledata[0], function (item, index) {
  2016. if (
  2017. index != 'town' &&
  2018. index != 'townName' &&
  2019. index != 'hospital' &&
  2020. index != 'hospitalName' &&
  2021. index != 'area' &&
  2022. index != 'areaName' &&
  2023. index != 'code' &&
  2024. index != 'name'
  2025. )
  2026. vm.tableHeader.push({prop: index, label: index});
  2027. });
  2028. }
  2029. } else {
  2030. vm.$message.error(res.msg);
  2031. }
  2032. vm.isloading = false;
  2033. });
  2034. },
  2035. // 导出
  2036. exportHandle: function () {
  2037. // var uid = JSON.parse(window.localStorage.getItem('wlyyAgentForDoc')).uid
  2038. // var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
  2039. // saveAs(blob, "hello world.txt");
  2040. // return
  2041. var vm = this;
  2042. var vm = this,
  2043. searchJson = undefined;
  2044. vm.fullscreenLoading = true;
  2045. searchJson = vm.beforeReq('export');
  2046. var areaCode = vm.areaCode == '350200' ? '' : vm.areaCode;
  2047. var chooseYear = vm.radio == '1' ? vm.chooseYear : ''; //年份
  2048. var startDate = vm.radio == '2' ? vm.searchJsonTime.start : '';
  2049. var endDate = vm.radio == '2' ? vm.searchJsonTime.end : '';
  2050. if (vm.handleNodeId == 0) {
  2051. if (searchJson) {
  2052. statisticAPI
  2053. .statisticsExportExport(
  2054. {
  2055. startDate: searchJson.start,
  2056. endDate: searchJson.end,
  2057. quotaStr: searchJson.checked,
  2058. range: vm.rangeCode,
  2059. area: areaCode,
  2060. hospital: vm.communityCode,
  2061. team: vm.teamCode,
  2062. timeLevel: vm.timeLevel
  2063. },
  2064. '综合查询.xls'
  2065. )
  2066. .then(function (res) {
  2067. vm.fullscreenLoading = false;
  2068. // toastr.info("导出成功")
  2069. // var blob = new Blob(["Hello, world!"]);
  2070. // FileSaver.saveAs(blob, "hello world.txt");
  2071. // console.log(res)
  2072. // FileSaver()
  2073. })
  2074. .catch(function (err) {
  2075. console.error(err);
  2076. });
  2077. // let str = httpRequest.server + 'statisticsExport/export?startDate='+searchJson.start+'&endDate='+searchJson.end+'&quotaStr='+searchJson.checked+'&range='+vm.rangeCode+'&area='+areaCode+'&hospital='+vm.communityCode+'&team='+vm.teamCode+'&timeLevel='+vm.timeLevel
  2078. // window.location.href = str
  2079. }
  2080. } else if (vm.handleNodeId == 33) {
  2081. // 咨询分析
  2082. if (vm.analyseData.length != 0) {
  2083. statisticAPI
  2084. .statisticsExportExportConsultList(
  2085. {
  2086. year: chooseYear,
  2087. startDate: startDate,
  2088. endDate: endDate,
  2089. status: vm.radio1,
  2090. area: areaCode,
  2091. hospital: vm.communityCode,
  2092. rang: vm.rangeCode,
  2093. team: vm.teamCode
  2094. },
  2095. vm.derive + '.xls'
  2096. )
  2097. .then(function (res) {
  2098. vm.fullscreenLoading = false;
  2099. })
  2100. .catch(function (err) {
  2101. toastr.info(err);
  2102. vm.fullscreenLoading = false;
  2103. console.error(err);
  2104. });
  2105. // var str = httpRequest.server + 'statisticsExport/exportConsultList?year='+chooseYear+'&startDate='+startDate+'&endDate='+endDate+
  2106. // '&status='+vm.radio1+'&area='+areaCode+'&hospital='+vm.communityCode+'&rang='+vm.rangeCode+'&team='+vm.teamCode
  2107. // window.location.href = str
  2108. } else {
  2109. vm.fullscreenLoading = false;
  2110. }
  2111. } else if (vm.handleNodeId == 34) {
  2112. // 签约分析
  2113. if (vm.analyseData.length != 0) {
  2114. statisticAPI
  2115. .statisticsExportExportSignList(
  2116. {
  2117. year: chooseYear,
  2118. startDate: startDate,
  2119. endDate: endDate,
  2120. serverType: vm.serverType,
  2121. status: vm.radio2,
  2122. isUpdate: vm.form.endorseTheTicket,
  2123. isAdd: vm.form.renew,
  2124. isOut: vm.form.backToSign,
  2125. isBindWX: vm.form.WeChat,
  2126. area: areaCode,
  2127. hospital: vm.communityCode,
  2128. rang: vm.rangeCode,
  2129. team: vm.teamCode,
  2130. signYearAge: vm.radio10
  2131. },
  2132. vm.derive + '.xls'
  2133. )
  2134. .then(function (res) {
  2135. vm.fullscreenLoading = false;
  2136. })
  2137. .catch(function (err) {
  2138. toastr.info(err);
  2139. vm.fullscreenLoading = false;
  2140. console.error(err);
  2141. });
  2142. } else {
  2143. vm.fullscreenLoading = false;
  2144. }
  2145. } else if (vm.handleNodeId == 35) {
  2146. // 专病分析
  2147. if (vm.analyseData.length != 0) {
  2148. statisticAPI
  2149. .statisticsExportExportSickList(
  2150. {
  2151. year: chooseYear,
  2152. startDate: startDate,
  2153. endDate: endDate,
  2154. diseaseType: vm.diseaseDataType,
  2155. status: vm.radio3,
  2156. doctorName: vm.form2.juniorCollege,
  2157. familyDoctorName: vm.form2.family,
  2158. patientName: vm.form2.resident,
  2159. area: areaCode,
  2160. hospital: vm.communityCode,
  2161. rang: vm.rangeCode,
  2162. team: vm.teamCode,
  2163. patientType: vm.form2.patientType
  2164. },
  2165. vm.derive + '.xls'
  2166. )
  2167. .then(function (res) {
  2168. vm.fullscreenLoading = false;
  2169. })
  2170. .catch(function (err) {
  2171. toastr.info(err);
  2172. vm.fullscreenLoading = false;
  2173. console.error(err);
  2174. });
  2175. } else {
  2176. vm.fullscreenLoading = false;
  2177. }
  2178. } else if (vm.handleNodeId == 36) {
  2179. // 生日祝福分析
  2180. if (vm.analyseData.length != 0) {
  2181. statisticAPI
  2182. .statisticsExportGetBirthdayPatientListExport(
  2183. {
  2184. signYear: chooseYear,
  2185. startDate: startDate,
  2186. endDate: endDate,
  2187. patientName: vm.form3.resident,
  2188. doctorName: vm.form3.family,
  2189. status: vm.radio4,
  2190. area: areaCode,
  2191. hospital: vm.communityCode,
  2192. range: vm.rangeCode,
  2193. team: vm.teamCode,
  2194. pageSize: '50000',
  2195. page: vm.currentPage
  2196. },
  2197. vm.derive + '.xls'
  2198. )
  2199. .then(function (res) {
  2200. vm.fullscreenLoading = false;
  2201. })
  2202. .catch(function (err) {
  2203. toastr.info(err);
  2204. vm.fullscreenLoading = false;
  2205. console.error(err);
  2206. });
  2207. } else {
  2208. vm.fullscreenLoading = false;
  2209. }
  2210. } else if (vm.handleNodeId == 37) {
  2211. // 上门服务分析
  2212. if (vm.analyseData.length != 0) {
  2213. statisticAPI
  2214. .statisticsExportExportDoorServiceList(
  2215. {
  2216. signYear: chooseYear,
  2217. startDate: startDate,
  2218. endDate: endDate,
  2219. patientName: vm.form4.resident,
  2220. doctorName: vm.form4.family,
  2221. status: vm.radio5,
  2222. type: vm.serviceTypeDataType,
  2223. area: areaCode,
  2224. hospital: vm.communityCode,
  2225. range: vm.rangeCode,
  2226. team: vm.teamCode,
  2227. pageSize: vm.currentSize,
  2228. page: vm.currentPage
  2229. },
  2230. vm.derive + '.xls'
  2231. )
  2232. .then(function (res) {
  2233. vm.fullscreenLoading = false;
  2234. })
  2235. .catch(function (err) {
  2236. toastr.info(err);
  2237. vm.fullscreenLoading = false;
  2238. console.error(err);
  2239. });
  2240. } else {
  2241. vm.fullscreenLoading = false;
  2242. }
  2243. } else if (vm.handleNodeId == 38) {
  2244. // 长处方分析
  2245. if (vm.analyseData.length != 0) {
  2246. statisticAPI
  2247. .statisticsExportExportPrescriptionList(
  2248. {
  2249. signYear: chooseYear,
  2250. startDate: startDate,
  2251. endDate: endDate,
  2252. patientName: vm.form5.resident,
  2253. doctorName: vm.form5.family,
  2254. status: vm.radio6,
  2255. diagnosisName: vm.radio7,
  2256. dispensaryType: vm.radio8,
  2257. area: areaCode,
  2258. hospital: vm.communityCode,
  2259. range: vm.rangeCode,
  2260. team: vm.teamCode,
  2261. pageSize: vm.currentSize,
  2262. page: vm.currentPage
  2263. },
  2264. vm.derive + '.xls'
  2265. )
  2266. .then(function (res) {
  2267. vm.fullscreenLoading = false;
  2268. })
  2269. .catch(function (err) {
  2270. toastr.info(err);
  2271. vm.fullscreenLoading = false;
  2272. console.error(err);
  2273. });
  2274. } else {
  2275. vm.fullscreenLoading = false;
  2276. }
  2277. } else if (vm.handleNodeId == 39) {
  2278. // 体征数据
  2279. if (vm.getHealthData.length != 0) {
  2280. statisticAPI
  2281. .exportHealthList(vm.getHealthParameter(), vm.derive + '.xls')
  2282. .then(function (res) {
  2283. vm.fullscreenLoading = false;
  2284. })
  2285. .catch(function (err) {
  2286. toastr.info(err);
  2287. vm.fullscreenLoading = false;
  2288. console.error(err);
  2289. });
  2290. } else {
  2291. vm.fullscreenLoading = false;
  2292. }
  2293. } else if (vm.handleNodeId == 40) {
  2294. // 上转预约
  2295. if (vm.reservationData.length != 0) {
  2296. statisticAPI
  2297. .exportDoctorReservationList(vm.reservationParameter(), vm.derive + '.xls')
  2298. .then(function (res) {
  2299. vm.fullscreenLoading = false;
  2300. })
  2301. .catch(function (err) {
  2302. toastr.info(err);
  2303. vm.fullscreenLoading = false;
  2304. console.error(err);
  2305. });
  2306. } else {
  2307. vm.fullscreenLoading = false;
  2308. }
  2309. } else if (vm.handleNodeId == 41) {
  2310. // 微信绑定数据
  2311. if (vm.wexinBindingData.length != 0) {
  2312. statisticAPI
  2313. .exportWexinBindingList(vm.wexinBindingParameter(), vm.derive + '.xls')
  2314. .then(function (res) {
  2315. vm.fullscreenLoading = false;
  2316. })
  2317. .catch(function (err) {
  2318. toastr.info(err);
  2319. vm.fullscreenLoading = false;
  2320. console.error(err);
  2321. });
  2322. } else {
  2323. vm.fullscreenLoading = false;
  2324. }
  2325. } else if (vm.handleNodeId == 42) {
  2326. // 居民积分明细导出
  2327. if (vm.jifenData.length != 0) {
  2328. statisticAPI
  2329. .exPatinetIntegralAnalysis(
  2330. _.assign({}, vm.residentIntegralParameter(), {pageSize: 99999}),
  2331. vm.derive + '.xls'
  2332. )
  2333. .then(function (res) {
  2334. vm.fullscreenLoading = false;
  2335. })
  2336. .catch(function (err) {
  2337. toastr.info(err);
  2338. vm.fullscreenLoading = false;
  2339. console.error(err);
  2340. });
  2341. } else {
  2342. vm.fullscreenLoading = false;
  2343. }
  2344. } else if (vm.handleNodeId == 43) {
  2345. // 入户访视导出
  2346. if (vm.ruhuData.length != 0) {
  2347. statisticAPI
  2348. .exfindPatientFollowListByCondition(vm.interviewParameter(), vm.derive + '.xls')
  2349. .then(function (res) {
  2350. vm.fullscreenLoading = false;
  2351. })
  2352. .catch(function (err) {
  2353. toastr.info(err);
  2354. vm.fullscreenLoading = false;
  2355. console.error(err);
  2356. });
  2357. } else {
  2358. vm.fullscreenLoading = false;
  2359. }
  2360. } else if (vm.handleNodeId == 44) {
  2361. // 康复下转导出
  2362. if (vm.recoveryList.length != 0) {
  2363. statisticAPI
  2364. .exportRehabilitationPatientInfo(vm.recoveryParameter(), vm.derive + '.xls')
  2365. .then(function (res) {
  2366. vm.fullscreenLoading = false;
  2367. })
  2368. .catch(function (err) {
  2369. toastr.info(err);
  2370. vm.fullscreenLoading = false;
  2371. console.error(err);
  2372. });
  2373. } else {
  2374. vm.fullscreenLoading = false;
  2375. }
  2376. } else if (vm.handleNodeId == 45) {
  2377. // 邀请专科回复明细导出
  2378. if (vm.invitationList.length != 0) {
  2379. var p = _.assign({}, vm.invitationDetailsParameter());
  2380. var docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
  2381. delete p.page;
  2382. delete p.pageSize;
  2383. p.doctor = docInfo.uid;
  2384. statisticAPI
  2385. .exportConsultHelpDetailPage(p, vm.derive + '.xls')
  2386. .then(function (res) {
  2387. vm.fullscreenLoading = false;
  2388. })
  2389. .catch(function (err) {
  2390. toastr.info(err);
  2391. vm.fullscreenLoading = false;
  2392. console.error(err);
  2393. });
  2394. } else {
  2395. vm.fullscreenLoading = false;
  2396. }
  2397. } else if (vm.collectCode == 1) {
  2398. // 专病汇总
  2399. if (vm.diseaseReport.length != 0) {
  2400. statisticAPI
  2401. .exportSpecialDiseaseReport(vm.getSpecialParameter(), vm.derive + '.xls')
  2402. .then(function (res) {
  2403. vm.fullscreenLoading = false;
  2404. })
  2405. .catch(function (err) {
  2406. toastr.info(err);
  2407. vm.fullscreenLoading = false;
  2408. console.error(err);
  2409. });
  2410. } else {
  2411. vm.fullscreenLoading = false;
  2412. }
  2413. } else if (vm.collectCode == 2) {
  2414. // 体征分析
  2415. if (vm.getDeviceReport.length != 0) {
  2416. statisticAPI
  2417. .exportDeviceHealthReport(vm.getDeviceParameter(), vm.derive + '.xls')
  2418. .then(function (res) {
  2419. vm.fullscreenLoading = false;
  2420. })
  2421. .catch(function (err) {
  2422. toastr.info(err);
  2423. vm.fullscreenLoading = false;
  2424. console.error(err);
  2425. });
  2426. } else {
  2427. vm.fullscreenLoading = false;
  2428. }
  2429. } else if (vm.collectCode == 3) {
  2430. // 上门汇总
  2431. if (vm.getDoorReport.length != 0) {
  2432. statisticAPI
  2433. .exportDoorServerOrderReport(vm.getDoorParameter(), vm.derive + '.xls')
  2434. .then(function (res) {
  2435. vm.fullscreenLoading = false;
  2436. })
  2437. .catch(function (err) {
  2438. toastr.info(err);
  2439. vm.fullscreenLoading = false;
  2440. console.error(err);
  2441. });
  2442. } else {
  2443. vm.fullscreenLoading = false;
  2444. }
  2445. } else if (vm.expertFamilyIdType == 'zhuanke1') {
  2446. // 邀请专科回复统计导出
  2447. if (vm.expertReplyData.length != 0) {
  2448. statisticAPI
  2449. .exportConsultHelpCountPage(vm.expertReply(), vm.derive + '.xls')
  2450. .then(function (res) {
  2451. vm.fullscreenLoading = false;
  2452. })
  2453. .catch(function (err) {
  2454. toastr.info(err);
  2455. vm.fullscreenLoading = false;
  2456. console.error(err);
  2457. });
  2458. } else {
  2459. vm.fullscreenLoading = false;
  2460. }
  2461. }
  2462. },
  2463. backClick: function () {
  2464. history.go(-1);
  2465. },
  2466. bindEvent: function () {
  2467. var vm = this;
  2468. //监听后退按钮的操作
  2469. EventBus.$on('back-click', function (arg) {
  2470. EventBus.$emit('update-statistics-time', {}); //更新统计时间
  2471. vm.backClick();
  2472. });
  2473. //监听页面刷新
  2474. EventBus.$on('refresh-click', function (arg) {
  2475. EventBus.$emit('update-statistics-time', {}); //更新统计时间
  2476. initData(vm);
  2477. });
  2478. $('#main').removeClass('c-hide');
  2479. },
  2480. detailFunction: function (id, status) {
  2481. var vm = this;
  2482. window.ajaxInsArr[vm.lastAjax] && window.ajaxInsArr[vm.lastAjax].abort();
  2483. if (id == 33) {
  2484. // 咨询分析
  2485. vm.getConsultList();
  2486. } else if (id == 34) {
  2487. // 签约分析
  2488. vm.getSignList();
  2489. } else if (id == 35) {
  2490. // 专病分析
  2491. vm.getSickList();
  2492. } else if (id == 36) {
  2493. // 生日祝福分析
  2494. vm.getBirthdayPatientList();
  2495. } else if (id == 37) {
  2496. // 上门服务分析
  2497. vm.getDoorServiceList();
  2498. } else if (id == 38) {
  2499. // 长处方分析
  2500. vm.getPrescriptionList();
  2501. } else if (id == 39) {
  2502. // 体征数据
  2503. vm.physicalSignData();
  2504. } else if (id == 40) {
  2505. // 上转预约
  2506. vm.upTransferAppointment();
  2507. } else if (id == 41) {
  2508. // 微信绑定
  2509. vm.wechatBinding();
  2510. } else if (id == 42) {
  2511. // 居民积分明细
  2512. vm.residentIntegral();
  2513. } else if (id == 43) {
  2514. // 入户访视
  2515. vm.interview();
  2516. } else if (id == 44) {
  2517. // 康复下转
  2518. vm.radio = '2';
  2519. vm.recovery();
  2520. if (!status) {
  2521. vm.pullDown();
  2522. }
  2523. } else if (id == 45) {
  2524. vm.radio = '2';
  2525. vm.invitationDetails();
  2526. if (!status) {
  2527. vm.getSpecialistHospital(); //获取专科医院
  2528. }
  2529. } else if (vm.expertFamilyIdType == 'zhuanke1') {
  2530. vm.expertReplyList();
  2531. }
  2532. },
  2533. getSpecialistHospital: function () {
  2534. var vm = this;
  2535. vm.specializedHospital = [{value: '', label: '全部'}];
  2536. homeAPI.getSpecialistHospital().then(function (res) {
  2537. console.log(res, 'Sdddddd');
  2538. if (res.status == 200) {
  2539. res.data.forEach(function (v) {
  2540. vm.specializedHospital.push({
  2541. value: v.code,
  2542. label: v.name
  2543. });
  2544. });
  2545. }
  2546. });
  2547. },
  2548. pullDown: function () {
  2549. this.deorsumvergenceStatusFunction('archive_status'); //档案状态
  2550. this.deorsumvergenceStatusFunction('rehabilitation_status'); //下转状态
  2551. this.deorsumvergenceStatusFunction('rehabilitation_hospital'); //下转医院
  2552. this.hospitalsByType();
  2553. },
  2554. // 下一页 上一页
  2555. handleCurrentChange: function (val) {
  2556. var vm = this;
  2557. vm.currentPage = val;
  2558. if (vm.handleNodeId == 0) {
  2559. vm.getStatisticDataList();
  2560. } else {
  2561. vm.detailFunction(vm.handleNodeId);
  2562. }
  2563. },
  2564. //获取省市区 type:区3
  2565. getDistrict: function (type, code, name) {
  2566. var vm = this,
  2567. list = [],
  2568. param = '';
  2569. if (type == 3) {
  2570. list = [{code: code, name: name}];
  2571. param = 'area';
  2572. } else if (type == 5) {
  2573. list = [{code: '', name: '全部'}];
  2574. param = 'community';
  2575. }
  2576. var params = {
  2577. type: type,
  2578. code: code
  2579. };
  2580. homeAPI.getDistrict(params).then(function (res) {
  2581. if (res.status == 200) {
  2582. vm[param + 'List'] = list.concat(res.list);
  2583. vm[param + 'Code'] = vm[param + 'List'][0].code;
  2584. } else {
  2585. vm.$message.error(res.msg);
  2586. }
  2587. });
  2588. },
  2589. selChange: function (type) {
  2590. var vm = this,
  2591. name = '';
  2592. if (type == 3) {
  2593. vm.initSelOption('community');
  2594. vm.initSelOption('team');
  2595. vm.getCommunityHospital();
  2596. } else if (type == 5) {
  2597. vm.initSelOption('team');
  2598. vm.teamListByArea();
  2599. }
  2600. },
  2601. initSelOption: function (param) {
  2602. var vm = this;
  2603. vm[param + 'List'] = [{code: '', name: '全部'}];
  2604. if (param == 'team') {
  2605. vm[param + 'List'] = [{id: '', name: '全部'}];
  2606. }
  2607. vm[param + 'Code'] = vm[param + 'List'][0].code || vm[param + 'List'][0].id;
  2608. },
  2609. getCommunityHospital: function () {
  2610. var vm = this,
  2611. list = [{code: '', name: '全部'}],
  2612. param = 'community';
  2613. homeAPI.getCommunityHospital({area: vm.areaCode == '350200' ? '' : vm.areaCode}).then(function (res) {
  2614. if (res.status == 200) {
  2615. vm[param + 'List'] = list.concat(res.data);
  2616. vm[param + 'Code'] = vm[param + 'List'][0].code;
  2617. } else {
  2618. vm.$message.error(res.msg);
  2619. }
  2620. });
  2621. },
  2622. teamListByArea: function () {
  2623. var vm = this,
  2624. list = [{id: '', name: '全部'}],
  2625. param = 'team';
  2626. homeAPI
  2627. .teamListByArea({area: vm.areaCode == '350200' ? '' : vm.areaCode, hospital: vm.communityCode})
  2628. .then(function (res) {
  2629. if (res.status == 200) {
  2630. vm[param + 'List'] = list.concat(res.data);
  2631. vm[param + 'Code'] = vm[param + 'List'][0].id;
  2632. } else {
  2633. vm.$message.error(res.msg);
  2634. }
  2635. });
  2636. },
  2637. // 慢阻肺搜索左侧字段变化
  2638. onCopdFilterChange(event) {
  2639. EventBus.$emit("copd-record-filter-change", event);
  2640. }
  2641. }
  2642. });
  2643. // 初始化时间
  2644. function initTime(vm) {
  2645. var now = new Date();
  2646. vm.end = now.format('yyyy-MM-dd');
  2647. var start = now.getTime() - 30 * 24 * 60 * 60 * 1000;
  2648. vm.start = new Date(start).format('yyyy-MM-dd');
  2649. vm.nowyear = vm.chooseYear = now.getFullYear();
  2650. vm.nowmonth = now.getMonth() + 1;
  2651. vm.years = [];
  2652. for (i = vm.nowyear; i >= 2016; i--) {
  2653. vm.years.push(i);
  2654. }
  2655. }
  2656. // 数据范围初始化
  2657. function initScope(vm) {
  2658. //获得缓存中缓存的角色权限
  2659. var userRole = window.sessionStorage.getItem('selectedRole');
  2660. if (!userRole) {
  2661. return false;
  2662. }
  2663. vm.userRole = JSON.parse(userRole);
  2664. //level:2、市,3、区,4、社区,5、团队
  2665. vm.initareaLevel = vm.areaLevel = vm.userRole.code == '350200' ? 2 : vm.userRole.code.length == 6 ? 3 : 4;
  2666. vm.initlevel = vm.level = vm.userRole.code == '350200' ? 4 : vm.userRole.code.length == 6 ? 3 : 2;
  2667. // vm.lowLevel = vm.initlowLevel = vm.userRole.code == '350200' ? 3 : vm.userRole.code.length == 6 ? 2 : 1;
  2668. vm.initarea = vm.area = vm.userRole.code;
  2669. vm.areaTitle = vm.userRole.name;
  2670. vm.rangeList = [
  2671. {name: '按区', code: 'town'},
  2672. {name: '按社区', code: 'hospital'},
  2673. {name: '按团队', code: 'team'}
  2674. ];
  2675. if (vm.initlevel == 4) {
  2676. //市获取区
  2677. vm.getDistrict(3, vm.initarea, vm.areaTitle.substr(0, 3));
  2678. vm.rangeCode = vm.rangeList[0].code;
  2679. } else if (vm.initlevel == 3) {
  2680. //区获取社区
  2681. vm.areaList = [{code: vm.initarea, name: vm.areaTitle}];
  2682. vm.areaCode = vm.initarea;
  2683. vm.rangeCode = vm.rangeList[0].code;
  2684. } else if (vm.initlevel == 2) {
  2685. //社区获取团队
  2686. vm.communityList = [{code: vm.initarea, name: vm.areaTitle}];
  2687. vm.communityCode = vm.initarea;
  2688. vm.rangeList.shift();
  2689. vm.rangeCode = vm.rangeList[0].code;
  2690. }
  2691. vm.searchJson.range = vm.rangeCode;
  2692. }
  2693. function initData(vm) {
  2694. initScope(vm);
  2695. //初始化时间
  2696. initTime(vm);
  2697. vm.tabledata = [];
  2698. vm.bindEvent();
  2699. }