comprehensive-query.js 93 KB

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