comprehensive-query.js 86 KB

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