comprehensive-query.js 93 KB

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