comprehensive-query.js 98 KB

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