comprehensive-query.js 93 KB

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