comprehensive-query.js 93 KB

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