comprehensive-query.js 97 KB

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