comprehensive-query.js 99 KB

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