comprehensive-query.js 68 KB

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