comprehensive-query.js 99 KB

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