comprehensive-query.js 87 KB

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