comprehensive-query.js 87 KB

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