comprehensive-query.js 99 KB

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