comprehensive-query.js 68 KB

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