comprehensive-query.js 87 KB

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