comprehensive-query.js 86 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713
  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.getDiseaseTypeList();
  573. vm.height = document.body.offsetHeight - 85;
  574. window.onresize = function () {
  575. vm.height = document.body.offsetHeight - 85;
  576. };
  577. this.s = this.startTime.format('yyyy-MM-dd');
  578. this.e = this.endTime.format('yyyy-MM-dd');
  579. this.list.unshift({type: '0', id: 'time', label: this.s + '~' + this.e});
  580. },
  581. methods: {
  582. startTimeChange: function (o) {
  583. if (!this.list[0] || this.list[0].type != 0) {
  584. this.list.unshift({
  585. type: '0',
  586. id: 'time',
  587. label: o.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd')
  588. });
  589. } else {
  590. this.list[0].label = o.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd');
  591. }
  592. },
  593. endTimeChange: function (o) {
  594. if (!this.list[0] || this.list[0].type != 0) {
  595. this.list.unshift({
  596. type: '0',
  597. id: 'time',
  598. label: this.startTime.format('yyyy-MM-dd') + '~' + o.format('yyyy-MM-dd')
  599. });
  600. } else {
  601. this.list[0].label = this.startTime.format('yyyy-MM-dd') + '~' + o.format('yyyy-MM-dd');
  602. }
  603. },
  604. // 确定
  605. confirm: function () {
  606. this.hospitalWorkStatistics();
  607. },
  608. // 选择
  609. change: function (val) {
  610. this.list = this.list.concat(val);
  611. },
  612. // 已选
  613. deleteClick: function (item) {
  614. if (item.id == 'time') {
  615. this.startTime = '';
  616. this.endTime = '';
  617. this.list.splice(0, 1);
  618. }
  619. var index = this.list.findIndex(function (v) {
  620. return item.id == v.id;
  621. });
  622. this.list.splice(index, 1);
  623. },
  624. // 取消
  625. cancel: function () {
  626. this.startTime = new Date('2023', '05', '26');
  627. this.endTime = new Date();
  628. if (!this.list[0] || this.list[0].type != 0) {
  629. this.list.unshift({
  630. type: '0',
  631. id: 'time',
  632. label: this.startTime.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd')
  633. });
  634. } else {
  635. this.list[0].label = this.startTime.format('yyyy-MM-dd') + '~' + this.endTime.format('yyyy-MM-dd');
  636. }
  637. },
  638. // 导出
  639. exportHandle: function () {
  640. var vm = this;
  641. vm.loadingTwo = true;
  642. statisticAPI
  643. .exportHospitalWorkStatistics(
  644. {
  645. startDate: this.startTime.format('yyyy-MM-dd'),
  646. endDate: this.endTime.format('yyyy-MM-dd')
  647. },
  648. '慢阻肺综合查询表.xls'
  649. )
  650. .then(function (res) {
  651. vm.loadingTwo = false;
  652. });
  653. },
  654. renderTableHeader: function (h, item) {
  655. var $index = item.$index;
  656. return h('div', [
  657. h('span', this.diseaseHeader[$index - 1] + ' ', {
  658. align: 'center',
  659. marginTop: '10px'
  660. }),
  661. h(
  662. 'el-popover',
  663. {
  664. props: {
  665. placement: 'top-start', // 一般 icon 处可添加浮层说明,浮层位置等属性
  666. width: '100',
  667. trigger: 'hover'
  668. }
  669. },
  670. [
  671. h('p', this.indicator[$index - 2], {
  672. class: 'text-align: center; margin: 0'
  673. }),
  674. h('i', {
  675. // 生成 i 标签 ,添加icon 设置 样式,slot 必填
  676. class: 'el-icon-question',
  677. style: 'color:#ccc,margin:18px,padding-top:10px',
  678. slot: 'reference'
  679. })
  680. ]
  681. )
  682. ]);
  683. },
  684. renderHeadeRexpert: function (h, item) {
  685. var index = item.$index;
  686. return [
  687. index == '3'
  688. ? '邀请次数'
  689. : index == '4'
  690. ? '进行中'
  691. : index == '5'
  692. ? '已回复'
  693. : index == '6'
  694. ? '未回复'
  695. : index == '7'
  696. ? '回复率'
  697. : index == '8'
  698. ? '平均响应时长'
  699. : '用户评价',
  700. h(
  701. 'el-tooltip',
  702. {
  703. props: {
  704. content: (function () {
  705. return index == '3'
  706. ? '发起邀请总次数'
  707. : index == ''
  708. ? '其中咨询未完成,包含待回复和进行中'
  709. : index == '5'
  710. ? '其中医生已回复且咨询已结束的'
  711. : index == '6'
  712. ? '其中咨询已结束医生未回复的'
  713. : index == '7'
  714. ? '已回复 / 邀请次数'
  715. : index == '8'
  716. ? '[邀请1响应时长+ 邀请2响应时长 + ...] / 总次数'
  717. : '用户评价';
  718. })(),
  719. placement: 'top'
  720. }
  721. },
  722. [
  723. h('span', {
  724. class: {
  725. 'el-icon-question': true
  726. }
  727. })
  728. ]
  729. )
  730. ];
  731. },
  732. // 获取康复下转明细 --- 下转状态
  733. deorsumvergenceStatusFunction: function (name) {
  734. var vm = this;
  735. signAPI.getDictByDictName({name: name}).then(function (res) {
  736. if (res.status === 200) {
  737. if (name == 'rehabilitation_status') {
  738. res.list.forEach(function (v) {
  739. vm.deorsumvergence.push({
  740. value: v.code,
  741. label: v.value
  742. });
  743. });
  744. }
  745. if (name == 'rehabilitation_hospital') {
  746. res.list.forEach(function (v) {
  747. vm.rehabilitationHospital.push({
  748. value: v.code,
  749. label: v.value
  750. });
  751. });
  752. }
  753. if (name == 'archive_status') {
  754. res.list.forEach(function (v) {
  755. vm.archiveList.push({
  756. value: v.code,
  757. label: v.value
  758. });
  759. });
  760. }
  761. }
  762. });
  763. },
  764. // 获取社区医院
  765. hospitalsByType: function () {
  766. var vm = this;
  767. statisticAPI
  768. .hospitalsByType({
  769. type: 1,
  770. code: '350200'
  771. })
  772. .then(function (res) {
  773. if (res.status == 200) {
  774. res.list.forEach(function (v) {
  775. vm.communityHospitals.push({
  776. value: v.code,
  777. label: v.name
  778. });
  779. });
  780. }
  781. })
  782. .catch(function (err) {
  783. console.log(err, 'Errr');
  784. });
  785. },
  786. // 康复下转操作
  787. operation: function (num, item) {
  788. var vm = this;
  789. if (num != 2) {
  790. statisticAPI
  791. .synchronizePationSingle({id: item.id})
  792. .then(function (res) {
  793. if (res.status == 200) {
  794. toastr.info('操作成功');
  795. this.tableKey = Math.random();
  796. } else {
  797. toastr.error(res.msg);
  798. }
  799. })
  800. .catch(function (err) {
  801. console.log(err, 'Errr');
  802. });
  803. } else {
  804. vm.signatoryList = [];
  805. statisticAPI
  806. .kangfuGetSignInfo({idcard: item.idcard})
  807. .then(function (res) {
  808. if (res.status == 200) {
  809. if (res.data != null) {
  810. vm.signatoryList.push(res.data);
  811. }
  812. }
  813. })
  814. .catch(function (err) {
  815. console.log(err, 'Errr');
  816. });
  817. this.dialogVisible = true;
  818. }
  819. },
  820. getImgurl: function (url) {
  821. return httpRequest.getImgUrl(url);
  822. },
  823. reset: function () {
  824. if (this.tabsId == 1) {
  825. this.getTreeList();
  826. } else {
  827. this.collect = [
  828. {
  829. id: 'kfxzrs,kfxzrc,szrs,szrc',
  830. label: '专病汇总',
  831. code: '1',
  832. children: [
  833. {id: 'kfxzrs', label: '康复下转人数', code: '1'},
  834. {id: 'kfxzrc', label: '康复下转人次', code: '1'},
  835. {id: 'szrs', label: '下转人数', code: '1'},
  836. {id: 'szrc', label: '下转人数', code: '1'}
  837. ]
  838. },
  839. {
  840. id: 'scsbs,scrc,yctzrc,gyrc',
  841. label: '体征数据汇总',
  842. code: '2',
  843. children: [
  844. {id: 'scsbs', label: '上传设备数', code: '2'},
  845. {id: 'scrc', label: '上传人次', code: '2'},
  846. {id: 'yctzrc', label: '异常体征人次', code: '2'},
  847. {id: 'gyrc', label: '干预人次', code: '2'}
  848. ]
  849. },
  850. {
  851. id: 'fwgd',
  852. label: '上门服务汇总',
  853. code: '3',
  854. children: [{id: 'fwgd', label: '服务工单', code: '3'}]
  855. }
  856. ];
  857. }
  858. },
  859. // 清除
  860. eliminateClick: function () {
  861. this.radio =
  862. this.handleNodeId == 44 || this.expertFamilyIdType == 'zhuanke1' || this.handleNodeId == 45 ? '2' : '1';
  863. this.radio1 = '';
  864. this.radio2 = '';
  865. this.radio3 = '';
  866. this.radio4 = '';
  867. this.radio5 = '';
  868. this.radio6 = '';
  869. this.radio7 = '';
  870. this.radio8 = '';
  871. this.radio9 = '';
  872. this.radio10 = '';
  873. this.form = {
  874. endorseTheTicket: '',
  875. renew: '',
  876. backToSign: '',
  877. WeChat: ''
  878. };
  879. this.form2 = {
  880. juniorCollege: '',
  881. family: '',
  882. resident: ''
  883. };
  884. this.form3 = {
  885. family: '',
  886. resident: ''
  887. };
  888. this.form4 = {
  889. family: '',
  890. resident: ''
  891. };
  892. this.form5 = {
  893. family: '',
  894. resident: ''
  895. };
  896. this.facility = ''; //体征数据分析 - 设备类型
  897. this.illness = ''; //体征数据分析 - 疾病类型
  898. this.form6 = {
  899. resident: '',
  900. doctor: ''
  901. };
  902. this.form7 = {
  903. resident: '',
  904. doctorOne: '',
  905. hospital: '',
  906. doctorTwo: '',
  907. administrativeOffice: ''
  908. }
  909. ;(this.form9 = {
  910. resident: '',
  911. doctorTwo: ''
  912. }),
  913. (this.form10 = {
  914. resident: '',
  915. doctorTwo: ''
  916. }),
  917. (this.form8 = {
  918. renew: ''
  919. });
  920. this.facilitySign = '';
  921. this.form11 = {
  922. patientName: '',
  923. status: '',
  924. hospitalCode: '',
  925. hospitalDoctor: '',
  926. orgCode: '',
  927. doctor: '',
  928. archiveStatus: ''
  929. }
  930. ;(this.form12 = {
  931. patientName: '',
  932. status: '',
  933. doctor: '',
  934. hospital: '',
  935. archiveStatus: ''
  936. }),
  937. initData(this);
  938. // initTime(this)
  939. // initScope(this)
  940. },
  941. tabsClick: function (item) {
  942. var vm = this;
  943. vm.tabsId = item.id;
  944. if (item.id != 4) {
  945. vm.expertFamilyIdType = '';
  946. }
  947. if (item.id == 5) {
  948. vm.handleNodeShow = 5;
  949. }
  950. vm.tabsList.forEach(function (res) {
  951. if (res.id == item.id) {
  952. res.show = true;
  953. } else {
  954. res.show = false;
  955. }
  956. });
  957. vm.eliminateClick();
  958. },
  959. // 获取汇总数据的专科医院
  960. specHosData: function () {
  961. var vm = this;
  962. statisticAPI.getSpecialHospital().then(function (res) {
  963. if (res.status == 200) {
  964. res.data.forEach(function (item) {
  965. vm.specHosList.push({code: item.code, name: item.name});
  966. });
  967. }
  968. });
  969. },
  970. getDiseaseTypeList: function () {
  971. var vm = this;
  972. statisticAPI.getDiseaseTypeList({}).then(function (res) {
  973. if (res.status == 200) {
  974. vm.specialCities = res.list;
  975. }
  976. });
  977. },
  978. // 签约人群
  979. handleCheckedCitiesChange: function (value) {
  980. var vm = this;
  981. vm.handleData = value;
  982. },
  983. // 下转病种
  984. diseaseChange: function (value) {
  985. var vm = this;
  986. vm.diseaseData = value;
  987. },
  988. // 服务类型
  989. serviceTypeChange: function (value) {
  990. var vm = this;
  991. vm.serviceTypeData = value;
  992. },
  993. // 综合析树形图
  994. treedataClick: function (name, data) {
  995. var vm = this;
  996. vm.handleNodeShow = 1;
  997. vm.handleNodeId = 0;
  998. vm.currentPage = 1;
  999. vm.radio = '1'; //签约年度 --创建时间
  1000. // initTime(vm)
  1001. // initScope(vm)
  1002. },
  1003. // 汇总树形图
  1004. collectClick: function (data, isCheck) {
  1005. var vm = this;
  1006. vm.derive = data.label;
  1007. vm.handleNodeShow = 3;
  1008. vm.currentPage = 1;
  1009. vm.radio = '1'; //签约年度 --创建时间
  1010. vm.isCheck = isCheck;
  1011. },
  1012. collCheck: function (data, name) {
  1013. // console.log(arguments)
  1014. var vm = this;
  1015. vm.diseaseReport = [];
  1016. vm.datatotal = 0;
  1017. vm.collect.forEach(function (item) {
  1018. item.children.forEach(function (o) {
  1019. if (o.code != data.code) {
  1020. vm.$refs.collectTree.setChecked(o, false, true);
  1021. }
  1022. });
  1023. if (data.id == item.id) {
  1024. vm.$refs.collectTree.setChecked(item, vm.isCheck, true);
  1025. } else {
  1026. item.children.forEach(function (o) {
  1027. if (data.id == o.id) {
  1028. vm.$refs.collectTree.setChecked(o, vm.isCheck, true);
  1029. }
  1030. });
  1031. }
  1032. });
  1033. vm.handleNodeId = 'huizongshuju';
  1034. vm.collectCode = data.code;
  1035. if (data.code == 1) {
  1036. vm.rangeList = [
  1037. {name: '按区', code: 'town'},
  1038. {name: '按社区', code: 'hospital'},
  1039. {name: '按团队', code: 'team'},
  1040. {name: '按专科医院', code: 'specHos'}
  1041. ];
  1042. vm.specHosData();
  1043. } else {
  1044. vm.rangeList = [
  1045. {name: '按区', code: 'town'},
  1046. {name: '按社区', code: 'hospital'},
  1047. {name: '按团队', code: 'team'}
  1048. ];
  1049. }
  1050. },
  1051. // 点击明细查询树形图
  1052. handleNodeClick: function (item, type) {
  1053. var vm = this;
  1054. vm.handleNodeId = 0;
  1055. vm.derive = item.label;
  1056. // if(data.id>=33) { //明细查询以下
  1057. vm.handleNodeShow = 2; // 明细查询tabs为2
  1058. vm.tableHeader = []; // 选择统计的数组
  1059. vm.analyseData = []; // 明细查询数组
  1060. // }
  1061. vm.handleNodeId = item.id; //切换后的id
  1062. vm.radio = '1'; //签约年度 --创建时间
  1063. vm.radio1 = ''; //咨询分析咨询状态
  1064. vm.radio2 = '';
  1065. vm.radio3 = '';
  1066. vm.radio4 = '';
  1067. vm.radio5 = '';
  1068. vm.radio6 = '';
  1069. vm.radio7 = '';
  1070. vm.radio8 = '';
  1071. vm.radio9 = '';
  1072. vm.radio10 = '';
  1073. vm.checkedCities = []; //签约人群清空
  1074. vm.specialCheckedCities = []; //下转病种清空
  1075. vm.serveSpecialCities = []; //服务类型清空
  1076. vm.diseaseReport = [];
  1077. vm.datatotal = 0;
  1078. vm.form = {
  1079. endorseTheTicket: '',
  1080. renew: '',
  1081. backToSign: '',
  1082. WeChat: ''
  1083. };
  1084. vm.form2 = {
  1085. juniorCollege: '',
  1086. family: '',
  1087. resident: ''
  1088. }
  1089. ;(vm.form3 = {
  1090. family: '',
  1091. resident: ''
  1092. }),
  1093. (vm.form4 = {
  1094. family: '',
  1095. resident: ''
  1096. }),
  1097. (vm.form5 = {
  1098. family: '',
  1099. resident: ''
  1100. }),
  1101. (this.form6 = {
  1102. resident: '',
  1103. doctor: ''
  1104. });
  1105. this.form7 = {
  1106. resident: '',
  1107. doctorOne: '',
  1108. hospital: '',
  1109. doctorTwo: '',
  1110. administrativeOffice: ''
  1111. }
  1112. ;(this.form9 = {
  1113. resident: '',
  1114. doctorTwo: ''
  1115. }),
  1116. (this.form10 = {
  1117. resident: '',
  1118. doctorTwo: ''
  1119. }),
  1120. (this.form8 = {
  1121. renew: ''
  1122. });
  1123. this.form11 = {
  1124. patientName: '',
  1125. status: '',
  1126. hospitalCode: '',
  1127. hospitalDoctor: '',
  1128. orgCode: '',
  1129. doctor: '',
  1130. archiveStatus: ''
  1131. };
  1132. initTime(vm); //时间初始化
  1133. initScope(vm); //数据范围初始化
  1134. vm.currentPage = 1;
  1135. if (type == 'zhuanke') {
  1136. vm.handleNodeShow = 4;
  1137. vm.radio = '2';
  1138. vm.expertFamilyIdType = 'zhuanke' + item.id;
  1139. vm.expertFamily(item.id);
  1140. } else {
  1141. vm.analysFunction(vm.handleNodeId); //明细查询列表查询
  1142. }
  1143. // 慢阻肺监测档案
  1144. if (type == 7) {
  1145. // console.log("点击了");
  1146. EventBus.$emit('copd-reset-select', {});
  1147. }
  1148. },
  1149. expertFamily: function (id) {
  1150. var vm = this;
  1151. if (id == '1') {
  1152. vm.expertReplyList();
  1153. }
  1154. },
  1155. // 邀请专科回复统计传参
  1156. expertReply: function () {
  1157. var vm = this;
  1158. vm.searchJsonTime = vm.beforeReq();
  1159. return {
  1160. // signYear :vm.radio=='1'?vm.chooseYear:'', //签约年度
  1161. team: vm.teamCode, //团队
  1162. area: vm.areaCode, //地区
  1163. hospital: vm.communityCode, //社区
  1164. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1165. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1166. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1167. pageSize: vm.currentSize,
  1168. page: vm.currentPage
  1169. };
  1170. },
  1171. // 邀请专科回复统计列表
  1172. expertReplyList: function () {
  1173. var vm = this;
  1174. vm.loadingTwo = true;
  1175. statisticAPI.consultHelpCountPage(vm.expertReply()).then(function (res) {
  1176. if (res.status == 200) {
  1177. vm.expertReplyData = res.detailModelList;
  1178. vm.datatotal = res.totalCount;
  1179. vm.loadingTwo = false;
  1180. }
  1181. });
  1182. },
  1183. analysFunction: function (id) {
  1184. var vm = this;
  1185. // idcard = idcard.replace(/^(.{6})(?:\d+)(.{4})$/,"$1****$2") 身份证 医保卡 脱敏显示
  1186. vm.detailFunction(id);
  1187. },
  1188. // 下转预约获取医生,科室
  1189. getReservationHosAndDept: function (data) {
  1190. var vm = this;
  1191. statisticAPI
  1192. .getReservationHosAndDept({
  1193. hospital: data ? data : '',
  1194. type: data ? '2' : ''
  1195. })
  1196. .then(function (res) {
  1197. if (res.status == 200) {
  1198. if (data) {
  1199. vm.administrativeOffice = [];
  1200. res.data.forEach(function (item) {
  1201. vm.administrativeOffice.push({
  1202. value: item.code,
  1203. label: item.name
  1204. });
  1205. });
  1206. } else {
  1207. vm.hospitalData = [];
  1208. res.data.forEach(function (item) {
  1209. vm.hospitalData.push({
  1210. value: item.code,
  1211. label: item.name
  1212. });
  1213. });
  1214. }
  1215. }
  1216. });
  1217. },
  1218. hospitalChange: function (data) {
  1219. var vm = this;
  1220. vm.getReservationHosAndDept(data);
  1221. },
  1222. // 咨询分析
  1223. getConsultList: function () {
  1224. var vm = this;
  1225. vm.loadingTwo = true;
  1226. vm.lastAjax = 'statisticsExport/getConsultList';
  1227. statisticAPI
  1228. .getConsultList({
  1229. year: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1230. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1231. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1232. status: vm.radio1, //咨询状态,1已回复,0未回复,2未及时回复
  1233. team: vm.teamCode, //团队
  1234. area: vm.areaCode, //地区
  1235. hospital: vm.communityCode, //社区
  1236. rang: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1237. pageSize: vm.currentSize,
  1238. page: vm.currentPage
  1239. })
  1240. .then(function (res) {
  1241. // console.log(res,"咨询分析")
  1242. if (res.status == 200) {
  1243. vm.analyseData = res.data.list;
  1244. vm.datatotal = res.data.total;
  1245. vm.loadingTwo = false;
  1246. }
  1247. if (res.status == -1) {
  1248. vm.loadingTwo = false;
  1249. vm.$message.error(res.msg);
  1250. }
  1251. });
  1252. },
  1253. // 签约分析
  1254. getSignList: function () {
  1255. var vm = this;
  1256. vm.lastAjax = 'statisticsExport/getSignList';
  1257. vm.loadingTwo = true;
  1258. var handleDataList = [];
  1259. vm.serverType = '';
  1260. vm.handleData.forEach(function (res) {
  1261. handleDataList.push(res.num);
  1262. });
  1263. vm.serverType = handleDataList.join(',');
  1264. statisticAPI
  1265. .getSignList({
  1266. year: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1267. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1268. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1269. serverType: vm.serverType, //签约人群
  1270. status: vm.radio2, //签约状态,1已签约,0待审核,2代缴费
  1271. isUpdate: vm.form.endorseTheTicket, //是否改签 1是0否
  1272. isAdd: vm.form.renew, //是否续签 1是0否
  1273. isOut: vm.form.backToSign, //是否退签 1是0否
  1274. isBindWX: vm.form.WeChat, //是否绑定微信 1是0否
  1275. team: vm.teamCode, //团队
  1276. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1277. hospital: vm.communityCode, //社区
  1278. rang: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1279. signYearAge: vm.radio10, // 签约年限
  1280. pageSize: vm.currentSize,
  1281. page: vm.currentPage
  1282. })
  1283. .then(function (res) {
  1284. // console.log(res,"签约分析")
  1285. if (res.status == 200) {
  1286. res.data.list.forEach(function (item) {
  1287. item.sscNum = item.sscNum.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1288. item.idcardNum = item.idcardNum.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2');
  1289. });
  1290. vm.analyseData = res.data.list;
  1291. vm.datatotal = res.data.total;
  1292. vm.loadingTwo = false;
  1293. }
  1294. if (res.status == -1) {
  1295. vm.loadingTwo = false;
  1296. vm.$message.error(res.msg);
  1297. }
  1298. });
  1299. },
  1300. // 专病分析
  1301. getSickList: function () {
  1302. var vm = this;
  1303. // vm.diseaseData
  1304. vm.lastAjax = 'statisticsExport/getSickList';
  1305. vm.loadingTwo = true;
  1306. var handleDataList = [];
  1307. vm.diseaseDataType = '';
  1308. vm.diseaseData.forEach(function (res) {
  1309. handleDataList.push(res.code);
  1310. });
  1311. vm.diseaseDataType = handleDataList.join(',');
  1312. statisticAPI
  1313. .getSickList({
  1314. year: vm.radio == '1' ? vm.chooseYear : '', //年度
  1315. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1316. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1317. diseaseType: vm.diseaseDataType, //病种类型
  1318. status: vm.radio3, //下转状态,1已接受,0未接受,2未管理
  1319. doctorName: vm.form2.juniorCollege, //专科医生
  1320. familyDoctorName: vm.form2.family, //家庭医生名字
  1321. patientName: vm.form2.resident, // 居民姓名
  1322. team: vm.teamCode, //团队
  1323. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1324. hospital: vm.communityCode, //社区
  1325. rang: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1326. pageSize: vm.currentSize,
  1327. page: vm.currentPage,
  1328. patientType: vm.form2.patientType
  1329. })
  1330. .then(function (res) {
  1331. // console.log(res,"专病分析")
  1332. if (res.status == 200) {
  1333. res.data.list.forEach(function (item) {
  1334. item.sscNum = item.sscNum.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1335. item.idcardNum = item.idcardNum.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2');
  1336. });
  1337. vm.analyseData = res.data.list;
  1338. vm.datatotal = res.data.total;
  1339. vm.loadingTwo = false;
  1340. }
  1341. if (res.status == -1) {
  1342. vm.loadingTwo = false;
  1343. vm.$message.error(res.msg);
  1344. }
  1345. });
  1346. },
  1347. // 生日祝福分析明细
  1348. getBirthdayPatientList: function () {
  1349. var vm = this;
  1350. vm.loadingTwo = true;
  1351. vm.lastAjax = 'statisticsExport/getBirthdayPatientList';
  1352. statisticAPI
  1353. .getBirthdayPatientList({
  1354. patientName: vm.form3.resident, // 居民姓名
  1355. doctorName: vm.form3.family, //医生姓名
  1356. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1357. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1358. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1359. status: vm.radio4, //状态(不传为全部,1、已发送,2、未发送)
  1360. team: vm.teamCode, //团队
  1361. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1362. hospital: vm.communityCode, //社区
  1363. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1364. pageSize: vm.currentSize,
  1365. page: vm.currentPage
  1366. })
  1367. .then(function (res) {
  1368. if (res.status == 200) {
  1369. // console.log(res,"Sddddd")
  1370. res.data.detailModelList.forEach(function (item) {
  1371. item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1372. item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2');
  1373. });
  1374. vm.analyseData = res.data.detailModelList;
  1375. vm.datatotal = res.data.total;
  1376. vm.loadingTwo = false;
  1377. }
  1378. if (res.status == -1) {
  1379. vm.loadingTwo = false;
  1380. vm.$message.error(res.msg);
  1381. }
  1382. });
  1383. },
  1384. // 长处方分析明细
  1385. getPrescriptionList: function () {
  1386. var vm = this;
  1387. vm.loadingTwo = true;
  1388. vm.lastAjax = 'statisticsExport/getPrescriptionList';
  1389. statisticAPI
  1390. .getPrescriptionList({
  1391. patientName: vm.form5.resident, // 居民姓名
  1392. doctorName: vm.form5.family, //医生姓名
  1393. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1394. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1395. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1396. status: vm.radio6, //续方状态 0待审核 20药师审核中 40待支付 100已完成 999其他
  1397. diagnosis: vm.radio7, //续方疾病类型1高血压2糖尿病3其他
  1398. dispensaryType: vm.radio8, // 取药方式1自取2快递3健管师配送
  1399. team: vm.teamCode, //团队
  1400. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1401. hospital: vm.communityCode, //社区
  1402. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1403. pageSize: vm.currentSize,
  1404. page: vm.currentPage
  1405. })
  1406. .then(function (res) {
  1407. if (res.status == 200) {
  1408. res.data.detailModelList.forEach(function (item) {
  1409. // console.log(item.finish_time,"长处方分析")
  1410. item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1411. item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2');
  1412. });
  1413. vm.analyseData = res.data.detailModelList;
  1414. vm.datatotal = res.data.total;
  1415. vm.loadingTwo = false;
  1416. }
  1417. if (res.status == -1) {
  1418. vm.loadingTwo = false;
  1419. vm.$message.error(res.msg);
  1420. }
  1421. });
  1422. },
  1423. // 上门服务分析明细
  1424. getDoorServiceList: function () {
  1425. var vm = this;
  1426. vm.lastAjax = '';
  1427. vm.loadingTwo = true;
  1428. var handleDataList = [];
  1429. vm.serviceTypeDataType = 'statisticsExport/getDoorServiceList';
  1430. vm.serviceTypeData.forEach(function (res) {
  1431. handleDataList.push(res.num);
  1432. });
  1433. vm.serviceTypeDataType = handleDataList.join(',');
  1434. statisticAPI
  1435. .getDoorServiceList({
  1436. patientName: vm.form4.resident, // 居民姓名
  1437. doctorName: vm.form4.family, //医生姓名
  1438. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1439. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1440. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1441. status: vm.radio5, //工单状态 -1已取消,1待派单、2待接单、3已接单、4待服务、5待评价
  1442. type: vm.serviceTypeDataType, //服务类型 1残疾人,2肺结核患者,3计生特殊家庭,4重性精神病,5失能/半失能老人,6其他,7 80岁以上老人
  1443. team: vm.teamCode, //团队
  1444. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1445. hospital: vm.communityCode, //社区
  1446. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1447. pageSize: vm.currentSize,
  1448. page: vm.currentPage
  1449. })
  1450. .then(function (res) {
  1451. if (res.status == 200) {
  1452. // console.log(res,"上门服务分析明细")
  1453. res.data.detailModelList.forEach(function (item) {
  1454. item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1455. item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2');
  1456. });
  1457. vm.analyseData = res.data.detailModelList;
  1458. vm.datatotal = res.data.total;
  1459. vm.loadingTwo = false;
  1460. }
  1461. if (res.status == -1) {
  1462. vm.loadingTwo = false;
  1463. vm.$message.error(res.msg);
  1464. }
  1465. });
  1466. },
  1467. //体征数据分析传参
  1468. getHealthParameter: function () {
  1469. var vm = this;
  1470. return {
  1471. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1472. team: vm.teamCode, //团队
  1473. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1474. hospital: vm.communityCode, //社区
  1475. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1476. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1477. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1478. name: vm.form6.resident, // 居民姓名
  1479. category: vm.facility, //设备类型
  1480. doctorName: vm.form6.doctor, //医生姓名
  1481. serverType: vm.illness, //签约疾病类型
  1482. pageSize: vm.currentSize,
  1483. page: vm.currentPage
  1484. };
  1485. },
  1486. //体征数据分析
  1487. physicalSignData: function () {
  1488. var vm = this;
  1489. vm.loadingTwo = true;
  1490. vm.lastAjax = 'statisticsExport/getHealthList';
  1491. statisticAPI.getHealthList(vm.getHealthParameter()).then(function (res) {
  1492. if (res.status == 200) {
  1493. // console.log(res,"体征数据")
  1494. vm.getHealthData = res.data.detailModelList;
  1495. vm.datatotal = res.data.total;
  1496. vm.loadingTwo = false;
  1497. }
  1498. if (res.status == -1) {
  1499. vm.loadingTwo = false;
  1500. vm.$message.error(res.msg);
  1501. }
  1502. });
  1503. },
  1504. //上转预约传参
  1505. reservationParameter: function () {
  1506. var vm = this;
  1507. return {
  1508. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1509. team: vm.teamCode, //团队
  1510. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1511. hospital: vm.communityCode, //社区
  1512. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1513. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1514. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1515. name: vm.form7.resident, // 居民姓名
  1516. doctorName: vm.form7.doctorOne, //签约医生姓名
  1517. reservationHospital: vm.form7.hospital, //签约医院
  1518. reservationDept: vm.form7.administrativeOffice, //预约科室
  1519. reservationDoctorName: vm.form7.doctorTwo, //预约医生
  1520. pageSize: vm.currentSize,
  1521. page: vm.currentPage
  1522. };
  1523. },
  1524. // 上转预约
  1525. upTransferAppointment: function () {
  1526. var vm = this;
  1527. vm.loadingTwo = true;
  1528. vm.lastAjax = 'statisticsExport/getDoctorReservationList';
  1529. statisticAPI.getDoctorReservationList(vm.reservationParameter()).then(function (res) {
  1530. if (res.status == 200) {
  1531. // console.log(res,"上转预约")
  1532. vm.reservationData = res.data.detailModelList;
  1533. vm.datatotal = res.data.total;
  1534. vm.loadingTwo = false;
  1535. vm.getReservationHosAndDept();
  1536. }
  1537. if (res.status == -1) {
  1538. vm.loadingTwo = false;
  1539. vm.$message.error(res.msg);
  1540. }
  1541. });
  1542. },
  1543. //微信绑定传参
  1544. wexinBindingParameter: function () {
  1545. var vm = this;
  1546. return {
  1547. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1548. team: vm.teamCode, //团队
  1549. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1550. hospital: vm.communityCode, //社区
  1551. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1552. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1553. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1554. binging: vm.form8.renew, //是否绑定微信
  1555. pageSize: vm.currentSize,
  1556. page: vm.currentPage
  1557. };
  1558. },
  1559. // 微信绑定
  1560. wechatBinding: function () {
  1561. var vm = this;
  1562. vm.loadingTwo = true;
  1563. vm.lastAjax = 'statisticsExport/getWexinBindingList';
  1564. statisticAPI.getWexinBindingList(vm.wexinBindingParameter()).then(function (res) {
  1565. if (res.status == 200) {
  1566. // console.log(res,"微信绑定")
  1567. res.data.detailModelList.forEach(function (res) {
  1568. res.sex = res.sex == 1 ? '男' : '女';
  1569. res.apply_date = new Date(res.apply_date).format('yyyy-MM-dd HH:mm:ss');
  1570. });
  1571. vm.wexinBindingData = res.data.detailModelList;
  1572. vm.datatotal = res.data.total;
  1573. vm.loadingTwo = false;
  1574. }
  1575. if (res.status == -1) {
  1576. vm.loadingTwo = false;
  1577. vm.$message.error(res.msg);
  1578. }
  1579. });
  1580. },
  1581. // 居民积分明细传参
  1582. residentIntegralParameter: function () {
  1583. var vm = this;
  1584. var parameter = {
  1585. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1586. team: vm.teamCode, //团队
  1587. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1588. hospital: vm.specHosName ? vm.specHosName : vm.communityCode, //专病医院
  1589. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1590. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1591. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1592. pageSize: vm.currentSize,
  1593. page: vm.currentPage,
  1594. patientName: vm.form9.resident || '',
  1595. doctorName: vm.form9.doctorTwo || ''
  1596. };
  1597. return parameter;
  1598. },
  1599. // 居民积分明细
  1600. residentIntegral: function () {
  1601. var vm = this;
  1602. vm.loadingTwo = true;
  1603. vm.lastAjax = 'statisticsExport/patinetIntegralAnalysis';
  1604. statisticAPI.patinetIntegralAnalysis(vm.residentIntegralParameter()).then(function (res) {
  1605. if (res.status == 200) {
  1606. vm.loadingTwo = false;
  1607. res.data.list.forEach(function (item) {
  1608. item.ssc = item.ssc.replace(/^(.{4})(?:\d+)(.{1})$/, '$1****$2');
  1609. // item.idcard = item.idcard.replace(/^(.{6})(?:\d+)(.{4})$/,"$1****$2")
  1610. });
  1611. vm.jifenData = res.data.list;
  1612. vm.datatotal = res.data.total;
  1613. } else {
  1614. vm.loadingTwo = false;
  1615. vm.$message.error(res.msg);
  1616. }
  1617. });
  1618. },
  1619. // 入户访视明细传参
  1620. interviewParameter: function () {
  1621. var vm = this;
  1622. var parameter = {
  1623. // signYear:'2020', //签约年度
  1624. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1625. team: vm.teamCode, //团队
  1626. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1627. hospital: vm.specHosName ? vm.specHosName : vm.communityCode, //专病医院
  1628. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1629. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1630. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1631. pageSize: vm.currentSize,
  1632. page: vm.currentPage,
  1633. patientName: vm.form10.resident || '',
  1634. doctorName: vm.form10.doctorTwo || ''
  1635. };
  1636. return parameter;
  1637. },
  1638. // 入户访视
  1639. interview: function () {
  1640. var vm = this;
  1641. vm.loadingTwo = true;
  1642. vm.lastAjax = 'statisticsExport/findPatientFollowListByCondition';
  1643. statisticAPI.findPatientFollowListByCondition(vm.interviewParameter()).then(function (res) {
  1644. if (res.status == 200) {
  1645. vm.loadingTwo = false;
  1646. vm.ruhuData = 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. invitationDetailsParameter: function () {
  1656. var vm = this;
  1657. vm.searchJsonTime = vm.beforeReq();
  1658. var parameter = {
  1659. patientName: vm.form12.patientName,
  1660. name: '',
  1661. status: vm.form12.status,
  1662. startTime: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1663. endTime: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1664. specialistName: vm.form12.doctor, //专科医生姓名
  1665. specialistHospital: vm.form12.hospital, //专科医院code
  1666. specialistDeptName: vm.form12.archiveStatus, //专科科室名称
  1667. team: vm.teamCode,
  1668. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1669. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1670. hospital: vm.communityCode, //医院
  1671. pageSize: vm.currentSize,
  1672. page: vm.currentPage
  1673. };
  1674. return parameter;
  1675. },
  1676. //邀请专科回复明细列表
  1677. invitationDetails: function () {
  1678. var vm = this;
  1679. vm.loadingTwo = true;
  1680. statisticAPI.consultHelpDetailPage(vm.invitationDetailsParameter()).then(function (res) {
  1681. if (res.status == 200) {
  1682. vm.loadingTwo = false;
  1683. res.detailModelList.forEach(function (v) {
  1684. v.sex = v.sex == 1 ? '男' : '女';
  1685. });
  1686. vm.invitationList = res.detailModelList;
  1687. vm.datatotal = res.totalCount;
  1688. } else {
  1689. vm.loadingTwo = false;
  1690. vm.$message.error(res.msg);
  1691. }
  1692. });
  1693. },
  1694. // 康复下转明细传参
  1695. recoveryParameter: function () {
  1696. var vm = this;
  1697. vm.searchJsonTime = vm.beforeReq();
  1698. var parameter = {
  1699. // signYear:vm.radio=='1'?vm.chooseYear:'', //签约年度
  1700. // team:vm.teamCode, //团队
  1701. // area:vm.areaCode=='350200'?'':vm.areaCode, //地区
  1702. // range:vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1703. startTime: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1704. endTime: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1705. size: vm.currentSize,
  1706. page: vm.currentPage,
  1707. patientName: vm.form11.patientName,
  1708. status: vm.form11.status,
  1709. hospitalCode: vm.form11.hospitalCode,
  1710. orgCode: vm.form11.orgCode,
  1711. hospitalDoctor: vm.form11.hospitalDoctor,
  1712. doctor: vm.form11.doctor,
  1713. archiveStatus: vm.form11.archiveStatus,
  1714. patientType: vm.form11.patientType
  1715. };
  1716. return parameter;
  1717. },
  1718. // 康复下转
  1719. recovery: function () {
  1720. var vm = this;
  1721. vm.loadingTwo = true;
  1722. vm.lastAjax = 'doctor/specialist/rehabilitation/rehabilitationPatientInfo';
  1723. statisticAPI.rehabilitationPatientInfo(vm.recoveryParameter()).then(function (res) {
  1724. if (res.status == 200) {
  1725. vm.loadingTwo = false;
  1726. res.detailModelList.forEach(function (v) {
  1727. v.sex = v.sex == 1 ? '男' : '女';
  1728. });
  1729. vm.recoveryList = res.detailModelList;
  1730. vm.datatotal = res.totalCount;
  1731. } else {
  1732. vm.loadingTwo = false;
  1733. vm.$message.error(res.msg);
  1734. }
  1735. });
  1736. },
  1737. //专病汇总传参
  1738. getSpecialParameter: function () {
  1739. var vm = this;
  1740. var parameter = {
  1741. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1742. team: vm.teamCode, //团队
  1743. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1744. hospital: vm.specHosName ? vm.specHosName : vm.communityCode, //专病医院
  1745. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1746. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1747. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1748. menu: vm.beforeReq().checked
  1749. // pageSize:vm.currentSize,
  1750. // page:vm.currentPage,
  1751. };
  1752. return parameter;
  1753. },
  1754. // 专病汇总
  1755. getSpecialDiseaseReport: function () {
  1756. var vm = this;
  1757. vm.loadingTwo = true;
  1758. statisticAPI.getSpecialDiseaseReport(vm.getSpecialParameter()).then(function (res) {
  1759. if (res.status == 200) {
  1760. vm.indicator = [];
  1761. res.data.column.forEach(function (v) {
  1762. if (v == 'kfxzrs') {
  1763. vm.indicator.push('康复计划人数');
  1764. }
  1765. if (v == 'kfxzrc') {
  1766. vm.indicator.push('康复计划数');
  1767. }
  1768. if (v == 'szrs') {
  1769. vm.indicator.push('预约挂号人数');
  1770. }
  1771. if (v == 'szrc') {
  1772. vm.indicator.push('预约挂号数');
  1773. }
  1774. });
  1775. vm.loadingTwo = false;
  1776. vm.diseaseReport = res.data.list;
  1777. vm.diseaseColumn = res.data.column;
  1778. // '康复计划人数','康复计划数','预约挂号人数','预约挂号数'
  1779. vm.diseaseHeader = res.data.header;
  1780. vm.datatotal = res.data.list.length;
  1781. } else {
  1782. vm.loadingTwo = false;
  1783. vm.$message.error(res.msg);
  1784. }
  1785. });
  1786. },
  1787. //体征分析传参
  1788. getDeviceParameter: function () {
  1789. var vm = this;
  1790. var parameter = {
  1791. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1792. team: vm.teamCode, //团队
  1793. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1794. hospital: vm.communityCode, //医院
  1795. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1796. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1797. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1798. category: vm.facilitySign,
  1799. menu: vm.beforeReq().checked
  1800. // pageSize:vm.currentSize,
  1801. // page:vm.currentPage,
  1802. };
  1803. return parameter;
  1804. },
  1805. // 体征分析数据
  1806. getDeviceHealthReport: function () {
  1807. var vm = this;
  1808. vm.loadingTwo = true;
  1809. statisticAPI.getDeviceHealthReport(vm.getDeviceParameter()).then(function (res) {
  1810. if (res.status == 200) {
  1811. vm.loadingTwo = false;
  1812. // console.log(res,"sss")
  1813. vm.getDeviceReport = res.data.list;
  1814. vm.getDeviceColumn = res.data.column;
  1815. vm.getDeviceHeader = res.data.header;
  1816. vm.datatotal = res.data.list.length;
  1817. } else {
  1818. vm.loadingTwo = false;
  1819. vm.$message.error(res.msg);
  1820. }
  1821. });
  1822. },
  1823. //上门汇总传参
  1824. getDoorParameter: function () {
  1825. var vm = this;
  1826. var parameter = {
  1827. signYear: vm.radio == '1' ? vm.chooseYear : '', //签约年度
  1828. team: vm.teamCode, //团队
  1829. area: vm.areaCode == '350200' ? '' : vm.areaCode, //地区
  1830. hospital: vm.communityCode, //医院
  1831. status: vm.radio9,
  1832. range: vm.rangeCode, //数据范围(town区传值area,hospital医院传值hospital,team团队传值team)
  1833. startDate: vm.radio == '2' ? vm.searchJsonTime.start : '', //开始时间
  1834. endDate: vm.radio == '2' ? vm.searchJsonTime.end : '', //结束时间
  1835. menu: vm.beforeReq().checked
  1836. // pageSize:vm.currentSize,
  1837. // page:vm.currentPage,
  1838. };
  1839. return parameter;
  1840. },
  1841. // 上门汇总
  1842. getDoorServerOrderReport: function () {
  1843. var vm = this;
  1844. vm.loadingTwo = true;
  1845. statisticAPI.getDoorServerOrderReport(vm.getDoorParameter()).then(function (res) {
  1846. if (res.status == 200) {
  1847. vm.loadingTwo = false;
  1848. // console.log(res,"sss")
  1849. vm.getDoorReport = res.data.list;
  1850. vm.getDoorColumn = res.data.column;
  1851. vm.getDoorHeader = res.data.header;
  1852. vm.datatotal = res.data.list.length;
  1853. } else {
  1854. vm.loadingTwo = false;
  1855. vm.$message.error(res.msg);
  1856. }
  1857. });
  1858. },
  1859. getTreeList: function () {
  1860. var vm = this;
  1861. statisticAPI.exportTreeList({rang: vm.rangeCode}).then(function (res) {
  1862. if (res.status == 200) {
  1863. console.log(res, 'Sddd')
  1864. ;(vm.treedata = []), (jindex = 0);
  1865. _.each(res.data, function (item, index) {
  1866. vm.treedata.push({
  1867. id: 'p_' + jindex,
  1868. label: index,
  1869. children: []
  1870. });
  1871. _.each(item, function (citem, cindex) {
  1872. vm.treedata[jindex].children.push({
  1873. id: cindex,
  1874. label: citem
  1875. });
  1876. });
  1877. jindex++;
  1878. });
  1879. }
  1880. });
  1881. },
  1882. beforeReq: function (flag) {
  1883. var vm = this,
  1884. startDate = '',
  1885. endDate = '',
  1886. checked = [];
  1887. if (vm.radio == '1') {
  1888. if (vm.chooseYear == 2022) {
  1889. startDate = '2022-07-01';
  1890. endDate = '2022-12-31';
  1891. } else if (vm.chooseYear > 2022) {
  1892. startDate = vm.chooseYear + '-01-01';
  1893. endDate = getEndDate(vm.chooseYear);
  1894. } else {
  1895. startDate = getStartDate(vm.chooseYear);
  1896. endDate = getEndDate(vm.chooseYear);
  1897. }
  1898. vm.timeLevel = 2;
  1899. } else {
  1900. if (!vm.start && !vm.end) {
  1901. this.$message({
  1902. message: '请选择创建时间',
  1903. type: 'warning'
  1904. });
  1905. return false;
  1906. } else {
  1907. if (vm.start > vm.end) {
  1908. this.$message({
  1909. message: '开始时间应早于结束时间',
  1910. type: 'warning'
  1911. });
  1912. return false;
  1913. } else {
  1914. startDate = vm.start;
  1915. endDate = vm.end;
  1916. vm.timeLevel = 1;
  1917. }
  1918. }
  1919. }
  1920. if (vm.handleNodeId == 0 || vm.handleNodeId == 'huizongshuju') {
  1921. var checkTree;
  1922. if (vm.tabsId == 1) {
  1923. checkTree = vm.$refs.tree.getCheckedNodes(true);
  1924. } else {
  1925. checkTree = vm.$refs.collectTree.getCheckedNodes(true);
  1926. }
  1927. if (checkTree.length) {
  1928. if (!flag) {
  1929. vm.tableHeader = [];
  1930. }
  1931. _.each(checkTree, function (item, index) {
  1932. if (!flag) {
  1933. vm.tableHeader.push({prop: item.label, label: item.label});
  1934. }
  1935. checked.push(item.id);
  1936. });
  1937. } else {
  1938. this.$message({
  1939. message: '请选择搜索指标!',
  1940. type: 'warning'
  1941. });
  1942. return false;
  1943. }
  1944. } else if (vm.handleNodeId == 2) {
  1945. this.$message({
  1946. message: '请选择明细查询!',
  1947. type: 'warning'
  1948. });
  1949. return false;
  1950. }
  1951. return {start: startDate, end: endDate, checked: checked.join(',')};
  1952. },
  1953. // 查询
  1954. searchHandle: function (status) {
  1955. // console.log(this.beforeReq())
  1956. var vm = this;
  1957. vm.searchJsonTime = vm.beforeReq();
  1958. vm.currentPage = 1;
  1959. if (this.radio1 == 1) {
  1960. this.radio1Show = true;
  1961. } else {
  1962. this.radio1Show = false;
  1963. }
  1964. if (vm.handleNodeId == 0) {
  1965. if (vm.searchJsonTime) {
  1966. vm.searchJson = {
  1967. startDate: vm.searchJsonTime.start,
  1968. endDate: vm.searchJsonTime.end,
  1969. quotaStr: vm.searchJsonTime.checked,
  1970. range: vm.rangeCode,
  1971. team: vm.teamCode,
  1972. hospital: vm.communityCode,
  1973. area: vm.areaCode == '350200' ? '' : vm.areaCode,
  1974. size: vm.currentSize,
  1975. page: vm.currentPage,
  1976. timeLevel: vm.timeLevel
  1977. };
  1978. vm.getStatisticDataList();
  1979. }
  1980. } else if (vm.collectCode == 1) {
  1981. // 专病汇总
  1982. vm.getSpecialDiseaseReport();
  1983. } else if (vm.collectCode == 2) {
  1984. // 体征数据汇总
  1985. vm.getDeviceHealthReport();
  1986. } else if (vm.collectCode == 3) {
  1987. // 上门服务汇总
  1988. vm.getDoorServerOrderReport();
  1989. } else {
  1990. vm.detailFunction(vm.handleNodeId, status);
  1991. }
  1992. },
  1993. getStatisticDataList: function () {
  1994. var vm = this;
  1995. vm.isloading = true;
  1996. var params = JSON.parse(JSON.stringify(vm.searchJson));
  1997. params.page = vm.currentPage;
  1998. statisticAPI.getStatisticDataList(params).then(function (res) {
  1999. if (res.status == 200) {
  2000. vm.tabledata = res.data.data;
  2001. vm.datatotal = res.data.total;
  2002. if (vm.tabledata.length) {
  2003. vm.tableHeader = [];
  2004. _.each(vm.tabledata[0], function (item, index) {
  2005. if (
  2006. index != 'town' &&
  2007. index != 'townName' &&
  2008. index != 'hospital' &&
  2009. index != 'hospitalName' &&
  2010. index != 'area' &&
  2011. index != 'areaName' &&
  2012. index != 'code' &&
  2013. index != 'name'
  2014. )
  2015. vm.tableHeader.push({prop: index, label: index});
  2016. });
  2017. }
  2018. } else {
  2019. vm.$message.error(res.msg);
  2020. }
  2021. vm.isloading = false;
  2022. });
  2023. },
  2024. // 导出
  2025. exportHandle: function () {
  2026. // var uid = JSON.parse(window.localStorage.getItem('wlyyAgentForDoc')).uid
  2027. // var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
  2028. // saveAs(blob, "hello world.txt");
  2029. // return
  2030. var vm = this;
  2031. var vm = this,
  2032. searchJson = undefined;
  2033. vm.fullscreenLoading = true;
  2034. searchJson = vm.beforeReq('export');
  2035. var areaCode = vm.areaCode == '350200' ? '' : vm.areaCode;
  2036. var chooseYear = vm.radio == '1' ? vm.chooseYear : ''; //年份
  2037. var startDate = vm.radio == '2' ? vm.searchJsonTime.start : '';
  2038. var endDate = vm.radio == '2' ? vm.searchJsonTime.end : '';
  2039. if (vm.handleNodeId == 0) {
  2040. if (searchJson) {
  2041. statisticAPI
  2042. .statisticsExportExport(
  2043. {
  2044. startDate: searchJson.start,
  2045. endDate: searchJson.end,
  2046. quotaStr: searchJson.checked,
  2047. range: vm.rangeCode,
  2048. area: areaCode,
  2049. hospital: vm.communityCode,
  2050. team: vm.teamCode,
  2051. timeLevel: vm.timeLevel
  2052. },
  2053. '综合查询.xls'
  2054. )
  2055. .then(function (res) {
  2056. vm.fullscreenLoading = false;
  2057. // toastr.info("导出成功")
  2058. // var blob = new Blob(["Hello, world!"]);
  2059. // FileSaver.saveAs(blob, "hello world.txt");
  2060. // console.log(res)
  2061. // FileSaver()
  2062. })
  2063. .catch(function (err) {
  2064. console.error(err);
  2065. });
  2066. // 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
  2067. // window.location.href = str
  2068. }
  2069. } else if (vm.handleNodeId == 33) {
  2070. // 咨询分析
  2071. if (vm.analyseData.length != 0) {
  2072. statisticAPI
  2073. .statisticsExportExportConsultList(
  2074. {
  2075. year: chooseYear,
  2076. startDate: startDate,
  2077. endDate: endDate,
  2078. status: vm.radio1,
  2079. area: areaCode,
  2080. hospital: vm.communityCode,
  2081. rang: vm.rangeCode,
  2082. team: vm.teamCode
  2083. },
  2084. vm.derive + '.xls'
  2085. )
  2086. .then(function (res) {
  2087. vm.fullscreenLoading = false;
  2088. })
  2089. .catch(function (err) {
  2090. toastr.info(err);
  2091. vm.fullscreenLoading = false;
  2092. console.error(err);
  2093. });
  2094. // var str = httpRequest.server + 'statisticsExport/exportConsultList?year='+chooseYear+'&startDate='+startDate+'&endDate='+endDate+
  2095. // '&status='+vm.radio1+'&area='+areaCode+'&hospital='+vm.communityCode+'&rang='+vm.rangeCode+'&team='+vm.teamCode
  2096. // window.location.href = str
  2097. } else {
  2098. vm.fullscreenLoading = false;
  2099. }
  2100. } else if (vm.handleNodeId == 34) {
  2101. // 签约分析
  2102. if (vm.analyseData.length != 0) {
  2103. statisticAPI
  2104. .statisticsExportExportSignList(
  2105. {
  2106. year: chooseYear,
  2107. startDate: startDate,
  2108. endDate: endDate,
  2109. serverType: vm.serverType,
  2110. status: vm.radio2,
  2111. isUpdate: vm.form.endorseTheTicket,
  2112. isAdd: vm.form.renew,
  2113. isOut: vm.form.backToSign,
  2114. isBindWX: vm.form.WeChat,
  2115. area: areaCode,
  2116. hospital: vm.communityCode,
  2117. rang: vm.rangeCode,
  2118. team: vm.teamCode,
  2119. signYearAge: vm.radio10
  2120. },
  2121. vm.derive + '.xls'
  2122. )
  2123. .then(function (res) {
  2124. vm.fullscreenLoading = false;
  2125. })
  2126. .catch(function (err) {
  2127. toastr.info(err);
  2128. vm.fullscreenLoading = false;
  2129. console.error(err);
  2130. });
  2131. } else {
  2132. vm.fullscreenLoading = false;
  2133. }
  2134. } else if (vm.handleNodeId == 35) {
  2135. // 专病分析
  2136. if (vm.analyseData.length != 0) {
  2137. statisticAPI
  2138. .statisticsExportExportSickList(
  2139. {
  2140. year: chooseYear,
  2141. startDate: startDate,
  2142. endDate: endDate,
  2143. diseaseType: vm.diseaseDataType,
  2144. status: vm.radio3,
  2145. doctorName: vm.form2.juniorCollege,
  2146. familyDoctorName: vm.form2.family,
  2147. patientName: vm.form2.resident,
  2148. area: areaCode,
  2149. hospital: vm.communityCode,
  2150. rang: vm.rangeCode,
  2151. team: vm.teamCode,
  2152. patientType: vm.form2.patientType
  2153. },
  2154. vm.derive + '.xls'
  2155. )
  2156. .then(function (res) {
  2157. vm.fullscreenLoading = false;
  2158. })
  2159. .catch(function (err) {
  2160. toastr.info(err);
  2161. vm.fullscreenLoading = false;
  2162. console.error(err);
  2163. });
  2164. } else {
  2165. vm.fullscreenLoading = false;
  2166. }
  2167. } else if (vm.handleNodeId == 36) {
  2168. // 生日祝福分析
  2169. if (vm.analyseData.length != 0) {
  2170. statisticAPI
  2171. .statisticsExportGetBirthdayPatientListExport(
  2172. {
  2173. signYear: chooseYear,
  2174. startDate: startDate,
  2175. endDate: endDate,
  2176. patientName: vm.form3.resident,
  2177. doctorName: vm.form3.family,
  2178. status: vm.radio4,
  2179. area: areaCode,
  2180. hospital: vm.communityCode,
  2181. range: vm.rangeCode,
  2182. team: vm.teamCode,
  2183. pageSize: '50000',
  2184. page: vm.currentPage
  2185. },
  2186. vm.derive + '.xls'
  2187. )
  2188. .then(function (res) {
  2189. vm.fullscreenLoading = false;
  2190. })
  2191. .catch(function (err) {
  2192. toastr.info(err);
  2193. vm.fullscreenLoading = false;
  2194. console.error(err);
  2195. });
  2196. } else {
  2197. vm.fullscreenLoading = false;
  2198. }
  2199. } else if (vm.handleNodeId == 37) {
  2200. // 上门服务分析
  2201. if (vm.analyseData.length != 0) {
  2202. statisticAPI
  2203. .statisticsExportExportDoorServiceList(
  2204. {
  2205. signYear: chooseYear,
  2206. startDate: startDate,
  2207. endDate: endDate,
  2208. patientName: vm.form4.resident,
  2209. doctorName: vm.form4.family,
  2210. status: vm.radio5,
  2211. type: vm.serviceTypeDataType,
  2212. area: areaCode,
  2213. hospital: vm.communityCode,
  2214. range: vm.rangeCode,
  2215. team: vm.teamCode,
  2216. pageSize: vm.currentSize,
  2217. page: vm.currentPage
  2218. },
  2219. vm.derive + '.xls'
  2220. )
  2221. .then(function (res) {
  2222. vm.fullscreenLoading = false;
  2223. })
  2224. .catch(function (err) {
  2225. toastr.info(err);
  2226. vm.fullscreenLoading = false;
  2227. console.error(err);
  2228. });
  2229. } else {
  2230. vm.fullscreenLoading = false;
  2231. }
  2232. } else if (vm.handleNodeId == 38) {
  2233. // 长处方分析
  2234. if (vm.analyseData.length != 0) {
  2235. statisticAPI
  2236. .statisticsExportExportPrescriptionList(
  2237. {
  2238. signYear: chooseYear,
  2239. startDate: startDate,
  2240. endDate: endDate,
  2241. patientName: vm.form5.resident,
  2242. doctorName: vm.form5.family,
  2243. status: vm.radio6,
  2244. diagnosisName: vm.radio7,
  2245. dispensaryType: vm.radio8,
  2246. area: areaCode,
  2247. hospital: vm.communityCode,
  2248. range: vm.rangeCode,
  2249. team: vm.teamCode,
  2250. pageSize: vm.currentSize,
  2251. page: vm.currentPage
  2252. },
  2253. vm.derive + '.xls'
  2254. )
  2255. .then(function (res) {
  2256. vm.fullscreenLoading = false;
  2257. })
  2258. .catch(function (err) {
  2259. toastr.info(err);
  2260. vm.fullscreenLoading = false;
  2261. console.error(err);
  2262. });
  2263. } else {
  2264. vm.fullscreenLoading = false;
  2265. }
  2266. } else if (vm.handleNodeId == 39) {
  2267. // 体征数据
  2268. if (vm.getHealthData.length != 0) {
  2269. statisticAPI
  2270. .exportHealthList(vm.getHealthParameter(), vm.derive + '.xls')
  2271. .then(function (res) {
  2272. vm.fullscreenLoading = false;
  2273. })
  2274. .catch(function (err) {
  2275. toastr.info(err);
  2276. vm.fullscreenLoading = false;
  2277. console.error(err);
  2278. });
  2279. } else {
  2280. vm.fullscreenLoading = false;
  2281. }
  2282. } else if (vm.handleNodeId == 40) {
  2283. // 上转预约
  2284. if (vm.reservationData.length != 0) {
  2285. statisticAPI
  2286. .exportDoctorReservationList(vm.reservationParameter(), vm.derive + '.xls')
  2287. .then(function (res) {
  2288. vm.fullscreenLoading = false;
  2289. })
  2290. .catch(function (err) {
  2291. toastr.info(err);
  2292. vm.fullscreenLoading = false;
  2293. console.error(err);
  2294. });
  2295. } else {
  2296. vm.fullscreenLoading = false;
  2297. }
  2298. } else if (vm.handleNodeId == 41) {
  2299. // 微信绑定数据
  2300. if (vm.wexinBindingData.length != 0) {
  2301. statisticAPI
  2302. .exportWexinBindingList(vm.wexinBindingParameter(), vm.derive + '.xls')
  2303. .then(function (res) {
  2304. vm.fullscreenLoading = false;
  2305. })
  2306. .catch(function (err) {
  2307. toastr.info(err);
  2308. vm.fullscreenLoading = false;
  2309. console.error(err);
  2310. });
  2311. } else {
  2312. vm.fullscreenLoading = false;
  2313. }
  2314. } else if (vm.handleNodeId == 42) {
  2315. // 居民积分明细导出
  2316. if (vm.jifenData.length != 0) {
  2317. statisticAPI
  2318. .exPatinetIntegralAnalysis(
  2319. _.assign({}, vm.residentIntegralParameter(), {pageSize: 99999}),
  2320. vm.derive + '.xls'
  2321. )
  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 == 43) {
  2334. // 入户访视导出
  2335. if (vm.ruhuData.length != 0) {
  2336. statisticAPI
  2337. .exfindPatientFollowListByCondition(vm.interviewParameter(), 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 == 44) {
  2350. // 康复下转导出
  2351. if (vm.recoveryList.length != 0) {
  2352. statisticAPI
  2353. .exportRehabilitationPatientInfo(vm.recoveryParameter(), vm.derive + '.xls')
  2354. .then(function (res) {
  2355. vm.fullscreenLoading = false;
  2356. })
  2357. .catch(function (err) {
  2358. toastr.info(err);
  2359. vm.fullscreenLoading = false;
  2360. console.error(err);
  2361. });
  2362. } else {
  2363. vm.fullscreenLoading = false;
  2364. }
  2365. } else if (vm.handleNodeId == 45) {
  2366. // 邀请专科回复明细导出
  2367. if (vm.invitationList.length != 0) {
  2368. var p = _.assign({}, vm.invitationDetailsParameter());
  2369. var docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
  2370. delete p.page;
  2371. delete p.pageSize;
  2372. p.doctor = docInfo.uid;
  2373. statisticAPI
  2374. .exportConsultHelpDetailPage(p, vm.derive + '.xls')
  2375. .then(function (res) {
  2376. vm.fullscreenLoading = false;
  2377. })
  2378. .catch(function (err) {
  2379. toastr.info(err);
  2380. vm.fullscreenLoading = false;
  2381. console.error(err);
  2382. });
  2383. } else {
  2384. vm.fullscreenLoading = false;
  2385. }
  2386. } else if (vm.collectCode == 1) {
  2387. // 专病汇总
  2388. if (vm.diseaseReport.length != 0) {
  2389. statisticAPI
  2390. .exportSpecialDiseaseReport(vm.getSpecialParameter(), vm.derive + '.xls')
  2391. .then(function (res) {
  2392. vm.fullscreenLoading = false;
  2393. })
  2394. .catch(function (err) {
  2395. toastr.info(err);
  2396. vm.fullscreenLoading = false;
  2397. console.error(err);
  2398. });
  2399. } else {
  2400. vm.fullscreenLoading = false;
  2401. }
  2402. } else if (vm.collectCode == 2) {
  2403. // 体征分析
  2404. if (vm.getDeviceReport.length != 0) {
  2405. statisticAPI
  2406. .exportDeviceHealthReport(vm.getDeviceParameter(), vm.derive + '.xls')
  2407. .then(function (res) {
  2408. vm.fullscreenLoading = false;
  2409. })
  2410. .catch(function (err) {
  2411. toastr.info(err);
  2412. vm.fullscreenLoading = false;
  2413. console.error(err);
  2414. });
  2415. } else {
  2416. vm.fullscreenLoading = false;
  2417. }
  2418. } else if (vm.collectCode == 3) {
  2419. // 上门汇总
  2420. if (vm.getDoorReport.length != 0) {
  2421. statisticAPI
  2422. .exportDoorServerOrderReport(vm.getDoorParameter(), vm.derive + '.xls')
  2423. .then(function (res) {
  2424. vm.fullscreenLoading = false;
  2425. })
  2426. .catch(function (err) {
  2427. toastr.info(err);
  2428. vm.fullscreenLoading = false;
  2429. console.error(err);
  2430. });
  2431. } else {
  2432. vm.fullscreenLoading = false;
  2433. }
  2434. } else if (vm.expertFamilyIdType == 'zhuanke1') {
  2435. // 邀请专科回复统计导出
  2436. if (vm.expertReplyData.length != 0) {
  2437. statisticAPI
  2438. .exportConsultHelpCountPage(vm.expertReply(), vm.derive + '.xls')
  2439. .then(function (res) {
  2440. vm.fullscreenLoading = false;
  2441. })
  2442. .catch(function (err) {
  2443. toastr.info(err);
  2444. vm.fullscreenLoading = false;
  2445. console.error(err);
  2446. });
  2447. } else {
  2448. vm.fullscreenLoading = false;
  2449. }
  2450. }
  2451. },
  2452. backClick: function () {
  2453. history.go(-1);
  2454. },
  2455. bindEvent: function () {
  2456. var vm = this;
  2457. //监听后退按钮的操作
  2458. EventBus.$on('back-click', function (arg) {
  2459. EventBus.$emit('update-statistics-time', {}); //更新统计时间
  2460. vm.backClick();
  2461. });
  2462. //监听页面刷新
  2463. EventBus.$on('refresh-click', function (arg) {
  2464. EventBus.$emit('update-statistics-time', {}); //更新统计时间
  2465. initData(vm);
  2466. });
  2467. $('#main').removeClass('c-hide');
  2468. },
  2469. detailFunction: function (id, status) {
  2470. var vm = this;
  2471. window.ajaxInsArr[vm.lastAjax] && window.ajaxInsArr[vm.lastAjax].abort();
  2472. if (id == 33) {
  2473. // 咨询分析
  2474. vm.getConsultList();
  2475. } else if (id == 34) {
  2476. // 签约分析
  2477. vm.getSignList();
  2478. } else if (id == 35) {
  2479. // 专病分析
  2480. vm.getSickList();
  2481. } else if (id == 36) {
  2482. // 生日祝福分析
  2483. vm.getBirthdayPatientList();
  2484. } else if (id == 37) {
  2485. // 上门服务分析
  2486. vm.getDoorServiceList();
  2487. } else if (id == 38) {
  2488. // 长处方分析
  2489. vm.getPrescriptionList();
  2490. } else if (id == 39) {
  2491. // 体征数据
  2492. vm.physicalSignData();
  2493. } else if (id == 40) {
  2494. // 上转预约
  2495. vm.upTransferAppointment();
  2496. } else if (id == 41) {
  2497. // 微信绑定
  2498. vm.wechatBinding();
  2499. } else if (id == 42) {
  2500. // 居民积分明细
  2501. vm.residentIntegral();
  2502. } else if (id == 43) {
  2503. // 入户访视
  2504. vm.interview();
  2505. } else if (id == 44) {
  2506. // 康复下转
  2507. vm.radio = '2';
  2508. vm.recovery();
  2509. if (!status) {
  2510. vm.pullDown();
  2511. }
  2512. } else if (id == 45) {
  2513. vm.radio = '2';
  2514. vm.invitationDetails();
  2515. if (!status) {
  2516. vm.getSpecialistHospital(); //获取专科医院
  2517. }
  2518. } else if (vm.expertFamilyIdType == 'zhuanke1') {
  2519. vm.expertReplyList();
  2520. }
  2521. },
  2522. getSpecialistHospital: function () {
  2523. var vm = this;
  2524. vm.specializedHospital = [{value: '', label: '全部'}];
  2525. homeAPI.getSpecialistHospital().then(function (res) {
  2526. console.log(res, 'Sdddddd');
  2527. if (res.status == 200) {
  2528. res.data.forEach(function (v) {
  2529. vm.specializedHospital.push({
  2530. value: v.code,
  2531. label: v.name
  2532. });
  2533. });
  2534. }
  2535. });
  2536. },
  2537. pullDown: function () {
  2538. this.deorsumvergenceStatusFunction('archive_status'); //档案状态
  2539. this.deorsumvergenceStatusFunction('rehabilitation_status'); //下转状态
  2540. this.deorsumvergenceStatusFunction('rehabilitation_hospital'); //下转医院
  2541. this.hospitalsByType();
  2542. },
  2543. // 下一页 上一页
  2544. handleCurrentChange: function (val) {
  2545. var vm = this;
  2546. vm.currentPage = val;
  2547. if (vm.handleNodeId == 0) {
  2548. vm.getStatisticDataList();
  2549. } else {
  2550. vm.detailFunction(vm.handleNodeId);
  2551. }
  2552. },
  2553. //获取省市区 type:区3
  2554. getDistrict: function (type, code, name) {
  2555. var vm = this,
  2556. list = [],
  2557. param = '';
  2558. if (type == 3) {
  2559. list = [{code: code, name: name}];
  2560. param = 'area';
  2561. } else if (type == 5) {
  2562. list = [{code: '', name: '全部'}];
  2563. param = 'community';
  2564. }
  2565. var params = {
  2566. type: type,
  2567. code: code
  2568. };
  2569. homeAPI.getDistrict(params).then(function (res) {
  2570. if (res.status == 200) {
  2571. vm[param + 'List'] = list.concat(res.list);
  2572. vm[param + 'Code'] = vm[param + 'List'][0].code;
  2573. } else {
  2574. vm.$message.error(res.msg);
  2575. }
  2576. });
  2577. },
  2578. selChange: function (type) {
  2579. var vm = this,
  2580. name = '';
  2581. if (type == 3) {
  2582. vm.initSelOption('community');
  2583. vm.initSelOption('team');
  2584. vm.getCommunityHospital();
  2585. } else if (type == 5) {
  2586. vm.initSelOption('team');
  2587. vm.teamListByArea();
  2588. }
  2589. },
  2590. initSelOption: function (param) {
  2591. var vm = this;
  2592. vm[param + 'List'] = [{code: '', name: '全部'}];
  2593. if (param == 'team') {
  2594. vm[param + 'List'] = [{id: '', name: '全部'}];
  2595. }
  2596. vm[param + 'Code'] = vm[param + 'List'][0].code || vm[param + 'List'][0].id;
  2597. },
  2598. getCommunityHospital: function () {
  2599. var vm = this,
  2600. list = [{code: '', name: '全部'}],
  2601. param = 'community';
  2602. homeAPI.getCommunityHospital({area: vm.areaCode == '350200' ? '' : vm.areaCode}).then(function (res) {
  2603. if (res.status == 200) {
  2604. vm[param + 'List'] = list.concat(res.data);
  2605. vm[param + 'Code'] = vm[param + 'List'][0].code;
  2606. } else {
  2607. vm.$message.error(res.msg);
  2608. }
  2609. });
  2610. },
  2611. teamListByArea: function () {
  2612. var vm = this,
  2613. list = [{id: '', name: '全部'}],
  2614. param = 'team';
  2615. homeAPI
  2616. .teamListByArea({area: vm.areaCode == '350200' ? '' : vm.areaCode, hospital: vm.communityCode})
  2617. .then(function (res) {
  2618. if (res.status == 200) {
  2619. vm[param + 'List'] = list.concat(res.data);
  2620. vm[param + 'Code'] = vm[param + 'List'][0].id;
  2621. } else {
  2622. vm.$message.error(res.msg);
  2623. }
  2624. });
  2625. },
  2626. // 慢阻肺搜索左侧字段变化
  2627. onCopdFilterChange(event) {
  2628. EventBus.$emit("copd-record-filter-change", event);
  2629. }
  2630. }
  2631. });
  2632. // 初始化时间
  2633. function initTime(vm) {
  2634. var now = new Date();
  2635. vm.end = now.format('yyyy-MM-dd');
  2636. var start = now.getTime() - 30 * 24 * 60 * 60 * 1000;
  2637. vm.start = new Date(start).format('yyyy-MM-dd');
  2638. vm.nowyear = vm.chooseYear = now.getFullYear();
  2639. vm.nowmonth = now.getMonth() + 1;
  2640. vm.years = [];
  2641. for (i = vm.nowyear; i >= 2016; i--) {
  2642. vm.years.push(i);
  2643. }
  2644. }
  2645. // 数据范围初始化
  2646. function initScope(vm) {
  2647. //获得缓存中缓存的角色权限
  2648. var userRole = window.sessionStorage.getItem('selectedRole');
  2649. if (!userRole) {
  2650. return false;
  2651. }
  2652. vm.userRole = JSON.parse(userRole);
  2653. //level:2、市,3、区,4、社区,5、团队
  2654. vm.initareaLevel = vm.areaLevel = vm.userRole.code == '350200' ? 2 : vm.userRole.code.length == 6 ? 3 : 4;
  2655. vm.initlevel = vm.level = vm.userRole.code == '350200' ? 4 : vm.userRole.code.length == 6 ? 3 : 2;
  2656. // vm.lowLevel = vm.initlowLevel = vm.userRole.code == '350200' ? 3 : vm.userRole.code.length == 6 ? 2 : 1;
  2657. vm.initarea = vm.area = vm.userRole.code;
  2658. vm.areaTitle = vm.userRole.name;
  2659. vm.rangeList = [
  2660. {name: '按区', code: 'town'},
  2661. {name: '按社区', code: 'hospital'},
  2662. {name: '按团队', code: 'team'}
  2663. ];
  2664. if (vm.initlevel == 4) {
  2665. //市获取区
  2666. vm.getDistrict(3, vm.initarea, vm.areaTitle.substr(0, 3));
  2667. vm.rangeCode = vm.rangeList[0].code;
  2668. } else if (vm.initlevel == 3) {
  2669. //区获取社区
  2670. vm.areaList = [{code: vm.initarea, name: vm.areaTitle}];
  2671. vm.areaCode = vm.initarea;
  2672. vm.rangeCode = vm.rangeList[0].code;
  2673. } else if (vm.initlevel == 2) {
  2674. //社区获取团队
  2675. vm.communityList = [{code: vm.initarea, name: vm.areaTitle}];
  2676. vm.communityCode = vm.initarea;
  2677. vm.rangeList.shift();
  2678. vm.rangeCode = vm.rangeList[0].code;
  2679. }
  2680. vm.searchJson.range = vm.rangeCode;
  2681. }
  2682. function initData(vm) {
  2683. initScope(vm);
  2684. //初始化时间
  2685. initTime(vm);
  2686. vm.tabledata = [];
  2687. vm.bindEvent();
  2688. }