comprehensive-query.js 68 KB

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