index.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. var template = ''
  2. $.ajax('../../../component/statistics/GxbManage/index.html', {
  3. data: {},
  4. dataType: 'html',
  5. cache: false,
  6. timeout: 60000,
  7. async: false,
  8. error: function (res) {},
  9. success: function (res) {
  10. template = res
  11. }
  12. })
  13. Vue.component('gxb-manage', {
  14. template: template,
  15. props: [],
  16. data: function () {
  17. return {
  18. years: [],
  19. yearType: '1',
  20. chooseYear: null,
  21. chooseTime: null,
  22. dialogExportLoading: false,
  23. rangeOptions: [
  24. { label: '区', value: 'town' },
  25. { label: '社区', value: 'hospital' },
  26. { label: '团队', value: 'team' }
  27. ],
  28. areaOptions: [
  29. { label: '思明区', value: '350203' },
  30. { label: '海沧区', value: '350205' },
  31. { label: '湖里区', value: '350206' },
  32. { label: '集美区', value: '350211' },
  33. { label: '同安区', value: '350212' },
  34. { label: '翔安区', value: '350213' }
  35. ],
  36. hospitalOptions: [],
  37. teamOptions: [],
  38. form: {
  39. range: 'town'
  40. },
  41. loading: false,
  42. exportLoading: false,
  43. tableData: [],
  44. constantHeader: [
  45. { label: '已评估人数', prop: 'totalNum', width: '90' },
  46. { label: '已上转人数', prop: 'turnUpNum', width: '90' },
  47. { label: '上转转门诊', prop: 'mzNum', width: '110' },
  48. { label: '门诊转住院', prop: 'zyNum', width: '110' },
  49. { label: '下转管理人数', prop: 'turnDownNum', width: '110' },
  50. { label: '评估已登记随访', prop: 'followUpNum', width: '110' }
  51. // { label: '随访已达标', prop: 'standardNum', width: '110' }
  52. ],
  53. tableHeader: [],
  54. loadingTwo: false,
  55. mzTableHeader: [
  56. { label: '姓名', prop: 'name', width: '90' },
  57. { label: '性别', prop: 'sex', width: '90' },
  58. { label: '年龄', prop: 'age', width: '90' },
  59. { label: '手机号', prop: 'mobile', width: '90' },
  60. { label: '证件号码', prop: 'idcard', width: '90' },
  61. { label: '社区医院', prop: 'signHospitalName', width: '90' },
  62. { label: '签约医生', prop: 'signDoctorName', width: '90' },
  63. { label: '最近一次上传时间', prop: 'czrq', width: '90' },
  64. { label: '最近一次上转科室', prop: 'deptName', width: '90' },
  65. { label: '最近一次门诊下转时间', prop: 'createTime', width: '90' },
  66. { label: '最近一次门诊下转诊断', prop: 'diagnosisName', width: '90' }
  67. ],
  68. mzToInHopistalTableHeader: [
  69. { label: '姓名', prop: 'name', width: '90' },
  70. { label: '性别', prop: 'sex', width: '90' },
  71. { label: '年龄', prop: 'age', width: '90' },
  72. { label: '手机号', prop: 'mobile', width: '90' },
  73. { label: '证件号码', prop: 'idcard', width: '90' },
  74. { label: '社区医院', prop: 'signHospitalName', width: '90' },
  75. { label: '签约医生', prop: 'signDoctorName', width: '90' },
  76. { label: '最近一次门诊下转时间', prop: 'mzCreateTime', width: '90' },
  77. { label: '最近一次门诊下转诊断', prop: 'mzDiagnosisName', width: '90' },
  78. { label: '最近一次出院下转时间', prop: 'zyCreateTime', width: '90' },
  79. { label: '最近一次出院下转诊断', prop: 'zyDiagnosisName', width: '90' }
  80. ],
  81. turnDownTableHeader: [
  82. { label: '姓名', prop: 'name', width: '90' },
  83. { label: '性别', prop: 'sex', width: '90' },
  84. { label: '年龄', prop: 'age', width: '90' },
  85. { label: '手机号', prop: 'mobile', width: '90' },
  86. { label: '最近一次下转医院', prop: 'hospitalName', width: '90' },
  87. { label: '最近一次下转医生', prop: 'hospitalDoctor', width: '90' },
  88. { label: '最近一次下转时间', prop: 'zyCreateTime', width: '90' },
  89. { label: '出院下转次数', prop: 'turnDownTimes', width: '90' },
  90. { label: '康复计划数量', prop: 'rehabilitationTimes', width: '90' }
  91. ],
  92. totalNumTableHeader: [
  93. { label: '姓名', prop: 'name' },
  94. { label: '性别', prop: 'sex' },
  95. { label: '年龄', prop: 'age' },
  96. { label: '评估结果', prop: 'screenResult' },
  97. { label: '评估医生', prop: 'doctorName' },
  98. { label: '评估时间', prop: 'czrq' },
  99. { label: '手机号', prop: 'mobile' },
  100. { label: '证件号码', prop: 'idcard' },
  101. { label: '签约社区', prop: 'signHospitalName' },
  102. { label: '签约医生', prop: 'signDoctorName' }
  103. ],
  104. turnUpNumTableHeader: [
  105. { label: '姓名', prop: 'name' },
  106. { label: '性别', prop: 'sex' },
  107. { label: '年龄', prop: 'age' },
  108. { label: '社区医院', prop: 'signHospitalName' },
  109. { label: '签约医生', prop: 'signDoctorName' },
  110. { label: '手机号', prop: 'mobile' },
  111. { label: '证件号码', prop: 'idcard' },
  112. { label: '预约医院', prop: 'orgName' },
  113. { label: '预约医生', prop: 'dName' },
  114. { label: '预约科室', prop: 'deptName' },
  115. { label: '预约时间', prop: 'orderTime' },
  116. { label: '数据来源', prop: 'sourceType' }
  117. ],
  118. dialogTableHeader: [],
  119. page: 1,
  120. size: 10,
  121. total: 0,
  122. level: 0,
  123. mzDialogVisible: false,
  124. query: {
  125. sex: ''
  126. },
  127. dataInfo: [],
  128. title: '',
  129. dataRangeOption: []
  130. }
  131. },
  132. methods: {
  133. gotoDetail(row, column) {
  134. if (!row.code) return
  135. var vm = this
  136. this.query = { sex: '' }
  137. switch (column) {
  138. case 'mzNum':
  139. vm.dialogTableHeader = vm.mzTableHeader
  140. this.title = '上转转门诊明细'
  141. break
  142. case 'zyNum':
  143. vm.dialogTableHeader = vm.mzToInHopistalTableHeader
  144. this.title = '门诊转住院明细'
  145. break
  146. case 'turnDownNum':
  147. vm.dialogTableHeader = vm.turnDownTableHeader
  148. this.title = '下转管理明细'
  149. break
  150. case 'totalNum':
  151. this.query = { sex: '', screenResultCode: '' }
  152. vm.dialogTableHeader = vm.totalNumTableHeader
  153. this.title = '个案数据列表'
  154. break
  155. case 'turnUpNum':
  156. vm.dialogTableHeader = vm.turnUpNumTableHeader
  157. this.title = '上转预约明细列表'
  158. break
  159. }
  160. var len = row.code.length
  161. if (len == 6) {
  162. this.query.range = 'town'
  163. this.query.area = row.code
  164. } else if (len == 10) {
  165. this.query.range = 'hospital'
  166. this.query.hospital = row.code
  167. } else {
  168. this.query.range = 'team'
  169. this.query.team = row.code
  170. }
  171. this.dataRangeOption = [{ label: row.name, value: row.code }]
  172. if (column == 'mzNum') {
  173. this.mzDialogVisible = true
  174. this.turnUpToMzDetailPage()
  175. } else if (column == 'turnDownNum' || column == 'zyNum') {
  176. this.mzDialogVisible = true
  177. this.turnDownManageDetailPage()
  178. } else if (column == 'totalNum') {
  179. this.mzDialogVisible = true
  180. this.gxbCaseDataPage()
  181. } else if (column == 'turnUpNum') {
  182. this.mzDialogVisible = true
  183. this.gxbTurnUpInfoPage()
  184. }
  185. },
  186. gxbTurnUpInfoPage() {
  187. var vm = this
  188. this.loadingTwo = true
  189. var params = JSON.parse(JSON.stringify(this.query))
  190. params.page = this.page
  191. params.pageSize = this.size
  192. vm.dataInfo = []
  193. if (this.yearType == '1') {
  194. params.startDate = this.chooseYear + '-01-01'
  195. params.endDate = this.chooseYear + '-12-31'
  196. } else {
  197. if (this.chooseTime) {
  198. params.startDate = this.chooseTime[0]
  199. params.endDate = this.chooseTime[1]
  200. }
  201. }
  202. httpRequest.get('statistics/collaborate/gxbTurnUpInfoPage', { data: params }).then(function (res) {
  203. if (res.status == 200) {
  204. vm.dataInfo = res.detailModelList
  205. vm.total = res.totalCount
  206. }
  207. vm.loadingTwo = false
  208. })
  209. },
  210. gxbCaseDataPage() {
  211. var vm = this
  212. this.loadingTwo = true
  213. var params = JSON.parse(JSON.stringify(this.query))
  214. params.page = this.page
  215. params.pageSize = this.size
  216. vm.dataInfo = []
  217. if (this.yearType == '1') {
  218. params.startDate = this.chooseYear + '-01-01'
  219. params.endDate = this.chooseYear + '-12-31'
  220. } else {
  221. if (this.chooseTime) {
  222. params.startDate = this.chooseTime[0]
  223. params.endDate = this.chooseTime[1]
  224. }
  225. }
  226. httpRequest.get('statistics/collaborate/gxbCaseDataPage', { data: params }).then(function (res) {
  227. if (res.status == 200) {
  228. vm.dataInfo = res.detailModelList
  229. vm.total = res.totalCount
  230. }
  231. vm.loadingTwo = false
  232. })
  233. },
  234. seePatientDetail(row, prop) {
  235. if (prop == 'name') {
  236. if (this.title == '上转预约明细列表') {
  237. EventBus.$emit('preview-person-info', { type: '2', code: row.code })
  238. } else if (this.title == '个案数据列表') {
  239. EventBus.$emit('preview-person-info', { type: '1', code: row.code })
  240. } else if (this.title == '上转转门诊明细') {
  241. EventBus.$emit('preview-person-info', { type: '3', code: row.code })
  242. } else if (this.title == '门诊转住院明细') {
  243. EventBus.$emit('preview-person-info', { type: '4', code: row.code })
  244. } else if (this.title == '下转管理明细') {
  245. EventBus.$emit('preview-person-info', { type: '5', code: row.code })
  246. }
  247. }
  248. },
  249. turnDownManageDetailPage() {
  250. var vm = this
  251. this.loadingTwo = true
  252. var url = ''
  253. var params = JSON.parse(JSON.stringify(this.query))
  254. vm.dataInfo = []
  255. params.page = this.page
  256. params.pageSize = this.size
  257. if (this.yearType == '1') {
  258. params.startDate = this.chooseYear + '-01-01'
  259. params.endDate = this.chooseYear + '-12-31'
  260. } else {
  261. if (this.chooseTime) {
  262. params.startDate = this.chooseTime[0]
  263. params.endDate = this.chooseTime[1]
  264. }
  265. }
  266. if (this.title == '下转管理明细') {
  267. url = 'statistics/collaborate/turnDownManageDetailPage'
  268. } else if (this.title == '门诊转住院明细') {
  269. url = 'statistics/collaborate/mzToInHopistalDetailPage'
  270. }
  271. httpRequest.get(url, { data: params }).then(function (res) {
  272. if (res.status == 200) {
  273. vm.dataInfo = res.detailModelList
  274. vm.total = res.totalCount
  275. }
  276. vm.loadingTwo = false
  277. })
  278. },
  279. turnUpToMzDetailPage() {
  280. var vm = this
  281. this.loadingTwo = true
  282. var params = JSON.parse(JSON.stringify(this.query))
  283. params.page = this.page
  284. params.pageSize = this.size
  285. vm.dataInfo = []
  286. if (this.yearType == '1') {
  287. params.startDate = this.chooseYear + '-01-01'
  288. params.endDate = this.chooseYear + '-12-31'
  289. } else {
  290. if (this.chooseTime) {
  291. params.startDate = this.chooseTime[0]
  292. params.endDate = this.chooseTime[1]
  293. }
  294. }
  295. httpRequest.get('statistics/collaborate/turnUpToMzDetailPage', { data: params }).then(function (res) {
  296. if (res.status == 200) {
  297. vm.dataInfo = res.detailModelList
  298. vm.total = res.totalCount
  299. }
  300. vm.loadingTwo = false
  301. })
  302. },
  303. closeDialog() {
  304. this.mzDialogVisible = false
  305. },
  306. dialogSearchFn() {
  307. this.page = 1
  308. if (this.title == '上转预约明细列表') {
  309. this.gxbTurnUpInfoPage()
  310. } else if (this.title == '上转转门诊明细' || this.title == '门诊转住院明细') {
  311. this.turnUpToMzDetailPage()
  312. } else if (this.title == '下转管理明细') {
  313. this.turnDownManageDetailPage()
  314. } else if (this.title == '个案数据列表') {
  315. this.gxbCaseDataPage()
  316. }
  317. },
  318. dialogExportFn() {
  319. this.dialogExportLoading = true
  320. var vm = this
  321. var params = {
  322. ...this.query
  323. }
  324. if (this.yearType == '1') {
  325. params.startDate = this.chooseYear + '-01-01'
  326. params.endDate = this.chooseYear + '-12-31'
  327. } else {
  328. if (this.chooseTime) {
  329. params.startDate = this.chooseTime[0]
  330. params.endDate = this.chooseTime[1]
  331. }
  332. }
  333. if (this.title == '上转转门诊明细') {
  334. var fileName = `上转转门诊明细${new Date().getTime()}.xls`
  335. httpRequest.downLoadFileForAjax('statistics/collaborate/exportTurnUpToMzDetailPage', fileName, params).then(function () {
  336. vm.dialogExportLoading = false
  337. })
  338. } else if (this.title == '门诊转住院明细') {
  339. var fileName = `门诊转住院明细${new Date().getTime()}.xls`
  340. httpRequest.downLoadFileForAjax('statistics/collaborate/exportMzToInHopistalDetailPage', fileName, params).then(function () {
  341. vm.dialogExportLoading = false
  342. })
  343. } else if (this.title == '个案数据列表') {
  344. var fileName = `个案数据列表${new Date().getTime()}.xls`
  345. httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbCaseDataPage', fileName, params).then(function () {
  346. vm.dialogExportLoading = false
  347. })
  348. } else if (this.title == '上转预约明细列表') {
  349. var fileName = `上转预约明细列表${new Date().getTime()}.xls`
  350. httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbTurnUpInfoPage', fileName, params).then(function () {
  351. vm.dialogExportLoading = false
  352. })
  353. } else if (this.title == '下转管理明细') {
  354. var fileName = `下转管理明细${new Date().getTime()}.xls`
  355. httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbTurnUpInfoPage', fileName, params).then(function () {
  356. vm.dialogExportLoading = false
  357. })
  358. }
  359. },
  360. dialogReset() {
  361. var params = {
  362. ...this.query
  363. }
  364. if (this.title == '个案数据列表') {
  365. this.query = {
  366. sex: '',
  367. screenResultCode: '',
  368. range: typeof params.range == 'undefined' ? '' : params.range,
  369. area: typeof params.area == 'undefined' ? '' : params.area,
  370. hospital: typeof params.hospital == 'undefined' ? '' : params.hospital,
  371. team: typeof params.team == 'undefined' ? '' : params.team
  372. }
  373. } else {
  374. this.query = {
  375. sex: '',
  376. range: typeof params.range == 'undefined' ? '' : params.range,
  377. area: typeof params.area == 'undefined' ? '' : params.area,
  378. hospital: typeof params.hospital == 'undefined' ? '' : params.hospital,
  379. team: typeof params.team == 'undefined' ? '' : params.team
  380. }
  381. }
  382. },
  383. init() {
  384. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  385. if (selectedRole.code.indexOf('350200') > -1) {
  386. this.level = 1 // 市卫健委
  387. this.areaOptions = [
  388. { label: '思明区', value: '350203' },
  389. { label: '海沧区', value: '350205' },
  390. { label: '湖里区', value: '350206' },
  391. { label: '集美区', value: '350211' },
  392. { label: '同安区', value: '350212' },
  393. { label: '翔安区', value: '350213' }
  394. ]
  395. } else if (selectedRole.code.length == 6) {
  396. this.level = 2 // 区管理
  397. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
  398. this.form = {
  399. range: 'town',
  400. area: selectedRole.code
  401. }
  402. this.getHospital(selectedRole.code)
  403. } else {
  404. this.level = 3 // 社区管理
  405. this.rangeOptions = [
  406. { label: '社区', value: 'hospital' },
  407. { label: '团队', value: 'team' }
  408. ]
  409. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code.substring(0, 6) }]
  410. this.hospitalOptions = [{ name: selectedRole.name, code: selectedRole.code }]
  411. this.form = {
  412. range: 'hospital',
  413. area: selectedRole.code.substring(0, 6),
  414. hospital: selectedRole.code
  415. }
  416. this.getTeam(selectedRole.code)
  417. }
  418. this.initTime()
  419. this.searchFn()
  420. },
  421. initTime() {
  422. var vm = this
  423. var now = new Date()
  424. vm.nowyear = vm.chooseYear = now.getFullYear()
  425. vm.years = []
  426. for (i = vm.nowyear; i >= 2013; i--) {
  427. vm.years.push(i)
  428. }
  429. },
  430. resetArea() {
  431. if (this.level == 1) {
  432. delete this.form.area
  433. delete this.form.hospital
  434. delete this.form.team
  435. } else if (this.level == 2) {
  436. delete this.form.hospital
  437. delete this.form.team
  438. } else {
  439. delete this.form.team
  440. }
  441. },
  442. load(row, treeNode, resolve) {
  443. var params = {}
  444. var len = row.code.length
  445. if (len == 6) {
  446. params.range = 'hospital'
  447. params.area = row.code
  448. } else if (len == 10) {
  449. params.range = 'team'
  450. params.hospital = row.code
  451. }
  452. if (this.yearType == '1') {
  453. params.startDate = this.chooseYear + '-01-01'
  454. params.endDate = this.chooseYear + '-12-31'
  455. } else {
  456. if (this.chooseTime) {
  457. params.startDate = this.chooseTime[0]
  458. params.endDate = this.chooseTime[1]
  459. }
  460. }
  461. httpRequest.get('statistics/collaborate/gxbScreenClosedLoop', { data: params }).then(function (res) {
  462. if (res.status == 200) {
  463. var children = res.detailModelList.map(function (item) {
  464. var data = JSON.parse(JSON.stringify(item))
  465. if (len == 6) {
  466. data.areaCode = row.code
  467. data.hospital = item.name
  468. data.hasChildren = true
  469. } else if (len == 10) {
  470. data.hospitalCode = row.code
  471. data.team = item.name
  472. }
  473. return data
  474. })
  475. resolve(children)
  476. }
  477. })
  478. },
  479. searchFn() {
  480. var vm = this
  481. this.loading = true
  482. var params = {
  483. ...this.form,
  484. isTotal: 1
  485. }
  486. vm.tableData = []
  487. if (this.yearType == '1') {
  488. params.startDate = this.chooseYear + '-01-01'
  489. params.endDate = this.chooseYear + '-12-31'
  490. } else {
  491. if (this.chooseTime) {
  492. params.startDate = this.chooseTime[0]
  493. params.endDate = this.chooseTime[1]
  494. }
  495. }
  496. if (this.form.range == 'town') {
  497. this.tableHeader = getTownHeader().concat(this.constantHeader)
  498. } else if (this.form.range == 'hospital') {
  499. this.tableHeader = getHospitalHeader().concat(this.constantHeader)
  500. } else {
  501. this.tableHeader = getTeamHeader().concat(this.constantHeader)
  502. }
  503. httpRequest.get('statistics/collaborate/gxbScreenClosedLoop', { data: params }).then(function (res) {
  504. vm.tableData = res.detailModelList.map(function (item) {
  505. var data = JSON.parse(JSON.stringify(item))
  506. if (vm.form.range == 'town') {
  507. data.town = item.name
  508. data.hasChildren = item.code && true
  509. } else if (vm.form.range == 'hospital') {
  510. data.hospital = item.name
  511. data.hasChildren = item.code && true
  512. } else if (vm.form.range == 'team') {
  513. data.team = item.name
  514. }
  515. return data
  516. })
  517. vm.loading = false
  518. })
  519. },
  520. queryDate() {
  521. this.page = 1
  522. this.searchFn()
  523. },
  524. exportTable() {
  525. var vm = this
  526. var params = {
  527. ...this.form
  528. }
  529. if (this.yearType == '1') {
  530. params.startDate = this.chooseYear + '-01-01'
  531. params.endDate = this.chooseYear + '-12-31'
  532. } else {
  533. if (this.chooseTime) {
  534. params.startDate = this.chooseTime[0]
  535. params.endDate = this.chooseTime[1]
  536. }
  537. }
  538. this.exportLoading = true
  539. var fileName = `冠心病管理全流程闭环情况${new Date().getTime()}.xls`
  540. httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbScreenClosedLoop', fileName, params).then(function () {
  541. vm.exportLoading = false
  542. })
  543. },
  544. eliminateClick() {
  545. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  546. if (this.level == 1) {
  547. this.form = {
  548. range: 'town'
  549. }
  550. } else if (this.level == 2) {
  551. this.form = {
  552. range: 'town',
  553. area: selectedRole.code
  554. }
  555. this.getHospital(selectedRole.code)
  556. } else {
  557. this.form = {
  558. range: 'hospital',
  559. area: selectedRole.code.substring(0, 6),
  560. hospital: selectedRole.code
  561. }
  562. this.getTeam(selectedRole.code)
  563. }
  564. this.yearType = '1'
  565. this.chooseYear = new Date().getFullYear()
  566. this.chooseTime = null
  567. this.$forceUpdate()
  568. },
  569. getHospital(code, flag = true) {
  570. var vm = this
  571. if (flag) {
  572. delete this.form.hospital
  573. delete this.form.team
  574. }
  575. var params = {
  576. type: 5,
  577. code: code
  578. }
  579. httpRequest.post('common/district', { data: params }).then(function (res) {
  580. vm.hospitalOptions = [{ code: '', name: '全部' }]
  581. vm.hospitalOptions = vm.hospitalOptions.concat(res.list)
  582. })
  583. },
  584. getTeam(code, flag = true) {
  585. var vm = this
  586. if (flag) {
  587. delete this.form.team
  588. }
  589. var params = {
  590. hospital: code,
  591. area: this.form.area
  592. }
  593. httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
  594. vm.teamOptions = [{ id: '', name: '全部' }]
  595. vm.teamOptions = vm.teamOptions.concat(res.data)
  596. })
  597. },
  598. handleCurrentChange(val) {
  599. this.page = val
  600. if (this.title == '上转预约明细列表') {
  601. this.gxbTurnUpInfoPage()
  602. } else if (this.title == '上转转门诊明细' || this.title == '门诊转住院明细') {
  603. this.turnUpToMzDetailPage()
  604. } else if (this.title == '下转管理明细') {
  605. this.turnDownManageDetailPage()
  606. } else if (this.title == '个案数据列表') {
  607. this.gxbCaseDataPage()
  608. } else if (this.title == '上转预约明细列表') {
  609. this.gxbTurnUpInfoPage()
  610. }
  611. },
  612. handleSizeChange(val) {
  613. this.size = val
  614. if (this.title == '上转预约明细列表') {
  615. this.gxbTurnUpInfoPage()
  616. } else if (this.title == '上转转门诊明细' || this.title == '门诊转住院明细') {
  617. this.turnUpToMzDetailPage()
  618. } else if (this.title == '下转管理明细') {
  619. this.turnDownManageDetailPage()
  620. } else if (this.title == '个案数据列表') {
  621. this.gxbCaseDataPage()
  622. } else if (this.title == '上转预约明细列表') {
  623. this.gxbTurnUpInfoPage()
  624. }
  625. },
  626. getData(data) {
  627. this.yearType = data.yearType
  628. this.form.range = data.range
  629. this.form.area = data.area
  630. this.form.hospital = data.hospital
  631. this.form.team = data.team
  632. if (this.yearType == 1) {
  633. this.chooseYear = data.time
  634. } else {
  635. this.chooseTime = data.time
  636. }
  637. if (this.form.hospital) {
  638. // 如果有社区code传过来就调社区医院列表接口
  639. this.getHospital(data.area, false)
  640. }
  641. if (this.form.team) {
  642. // 如果有团队code传过来就调团队列表接口
  643. this.getTeam(data.hospital, false)
  644. }
  645. this.searchFn()
  646. },
  647. renderHeader: function (h, item) {
  648. var label = item.column.label
  649. var column = item.column
  650. var tooltip = {
  651. '签约社区': '显示为该患者当前的签约社区医院名称',
  652. '社区医院': '显示为该患者当前的签约社区医院名称',
  653. '签约医院': '显示为该患者当前的签约社区医院名称',
  654. '签约医生': '显示为该患者当前的签约社区医生名称',
  655. '家庭医生': '显示为该患者当前的签约社区医生名称'
  656. }
  657. if (label == '签约社区' || label == '签约医生' || label == '签约医院' || label == '家庭医生' || label == '社区医院') {
  658. return [
  659. label,
  660. h(
  661. 'el-tooltip',
  662. {
  663. props: {
  664. content: (function () {
  665. return tooltip[label]
  666. })(),
  667. placement: 'top'
  668. }
  669. },
  670. [
  671. h('span', {
  672. class: {
  673. 'el-icon-question': true
  674. }
  675. })
  676. ]
  677. )
  678. ]
  679. } else {
  680. return [column.label]
  681. }
  682. }
  683. },
  684. mounted() {
  685. this.init()
  686. }
  687. })