comprehensive-query.js 98 KB

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