comprehensive-query.js 69 KB

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