comprehensive-query.js 68 KB

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