comprehensive-query.js 92 KB

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