comprehensive-query.js 87 KB

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