comprehensive-query.js 93 KB

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