comprehensive-query.js 87 KB

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