comprehensive-query.js 86 KB

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