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