comprehensive-query.js 99 KB

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