index.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. var template = ''
  2. $.ajax('../../../component/statistics/LascCervical/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('lasc-cervical', {
  14. template: template,
  15. props: [],
  16. data: function () {
  17. return {
  18. years: [],
  19. yearType: '1',
  20. loadingTwo: false,
  21. chooseYear: null,
  22. chooseTime: null,
  23. query: {
  24. page: 1,
  25. size: 10,
  26. total: 0
  27. },
  28. rangeOptions: [
  29. { label: '区', value: '1' },
  30. { label: '机构', value: '2' },
  31. { label: '居住地', value: '3' }
  32. ],
  33. areaOptions: [
  34. { label: '思明区', value: '350203' },
  35. { label: '海沧区', value: '350205' },
  36. { label: '湖里区', value: '350206' },
  37. { label: '集美区', value: '350211' },
  38. { label: '同安区', value: '350212' },
  39. { label: '翔安区', value: '350213' }
  40. ],
  41. hospitalOptions: [],
  42. teamOptions: [],
  43. form: {
  44. range: '1'
  45. },
  46. loading: false,
  47. exportLoading: false,
  48. tableData: [],
  49. tableHeader: [],
  50. constantHeader: [
  51. { label: '下转次数', prop: 'totalTimes', width: '90' },
  52. { label: '门诊下转次数', prop: 'mzTimes', width: '110' },
  53. { label: '出院下转次数', prop: 'zyTimes', width: '110' },
  54. { label: '下转人数', prop: 'totalNum', width: '110' },
  55. { label: '门诊下转人数', prop: 'mzNum', width: '110' },
  56. { label: '出院下转人数', prop: 'zyNum', width: '110' },
  57. { label: '门诊下转已评估', prop: 'mzScreenNum', width: '120' },
  58. { label: '门诊下转未评估', prop: 'unMzScreenNum', width: '120' },
  59. { label: '出院下转已评估', prop: 'zyScreenNum', width: '120' },
  60. { label: '出院下转未评估', prop: 'unZyScreenNum', width: '120' }
  61. ],
  62. level: 0,
  63. visible: false,
  64. dataRangeOption: [],
  65. dialogTableData: [],
  66. dialogHeader: [
  67. { label: '居民姓名', prop: 'name', width: '100' },
  68. { label: '证件号码', prop: 'idcard', width: '100' },
  69. { label: '手机号', prop: 'mobile', width: '110' },
  70. { label: '年龄', prop: 'age', width: '90' },
  71. { label: '出生日期', prop: 'birthday', width: '90' },
  72. { label: '常驻地址', prop: 'address', width: '100' },
  73. { label: '个人筛查状态', prop: 'statusName', width: '100' }
  74. ],
  75. page: 1,
  76. size: 10,
  77. total: 0,
  78. messageVisible: false,
  79. messInfo: null,
  80. remind: '',
  81. dialogLoading: false,
  82. dialogExportLoading: false,
  83. statusOptions: [],
  84. rehabilitationHospital: [],
  85. archiveList: [],
  86. inviteStatus: [
  87. { value: '', label: '全部' },
  88. { value: '1', label: '门诊患者' },
  89. { value: '2', label: '出院患者' }
  90. ],
  91. communityHospitals: [],
  92. title: '',
  93. dialogVisible: false,
  94. signatoryList: [],
  95. cervicalHeaderGroups: [
  96. {
  97. label: '宫颈癌管理情况',
  98. children: [
  99. { prop: 'num2', label: '妇科检查人数' },
  100. { prop: 'assessNum', label: '线上评估人数' },
  101. { prop: 'orderNum', label: '线上预约人数' }
  102. ]
  103. },
  104. {
  105. label: '宫颈妇科检查情况',
  106. children: [
  107. { prop: 'jujueNum', label: '拒绝' },
  108. { prop: 'yicongNum', label: '依从' },
  109. { prop: 'num3', label: '检查人数' },
  110. { prop: 'waitNum', label: '待完善人数' }
  111. ]
  112. },
  113. {
  114. label: 'HPV检查情况',
  115. children: [
  116. { prop: 'hpvNum', label: '检查人数' },
  117. { prop: 'n1', label: '待完善人数' }
  118. ]
  119. },
  120. {
  121. label: '高危HPV分型检测情况',
  122. children: [
  123. { prop: 'hpvH', label: '高危HPV阳性人数' },
  124. { prop: 'hpv16', label: '16型阳性人数' },
  125. { prop: 'hpv18', label: '18型阳性人数' },
  126. { prop: 'hpv31', label: '31型阳性人数' },
  127. { prop: 'hpv33', label: '33型阳性人数' },
  128. { prop: 'hpv35', label: '35型阳性人数' },
  129. { prop: 'hpv39', label: '39型阳性人数' },
  130. { prop: 'hpv45', label: '45型阳性人数' },
  131. { prop: 'hpv51', label: '51型阳性人数' },
  132. { prop: 'hpv52', label: '52型阳性人数' },
  133. { prop: 'hpv53', label: '53型阳性人数' },
  134. { prop: 'hpv56', label: '56型阳性人数' },
  135. { prop: 'hpv58', label: '58型阳性人数' },
  136. { prop: 'hpv59', label: '59型阳性人数' },
  137. { prop: 'hpv66', label: '66型阳性人数' },
  138. { prop: 'hpv68', label: '68型阳性人数' },
  139. { prop: 'hpv73', label: '73型阳性人数' },
  140. { prop: 'hpv82', label: '82型阳性人数' }
  141. ]
  142. },
  143. {
  144. label: '低危HPV分型检测情况',
  145. children: [
  146. { prop: 'hpvL', label: '低危HPV阳性人数' },
  147. { prop: 'hpv6', label: '6型阳性人数' },
  148. { prop: 'hpv11', label: '11型阳性人数' },
  149. { prop: 'hpv42', label: '42型阳性人数' },
  150. { prop: 'hpv43', label: '43型阳性人数' },
  151. { prop: 'hpv44', label: '44型阳性人数' },
  152. { prop: 'hpv81', label: '81型阳性人数' },
  153. { prop: 'hpv83', label: '83型阳性人数' }
  154. ]
  155. },
  156. {
  157. label: '宫颈细胞学检查情况',
  158. children: [
  159. { prop: 'cytNum', label: '检查人数' },
  160. { prop: 'cytNum1', label: '检查异常人数' },
  161. { prop: 'cytNum2', label: '待完善人数' }
  162. ]
  163. },
  164. {
  165. label: '初筛结果临床评估情况',
  166. children: [
  167. { prop: 'preNum', label: '检查人数' },
  168. { prop: 'preNum1', label: '待完善人数' },
  169. { prop: 'preNum2', label: '未见异常,定期筛查' },
  170. { prop: 'preNum3', label: '异常,6-12个月复查' },
  171. { prop: 'preNum4', label: '异常,嘱进一步行阴道镜检查' }
  172. ]
  173. },
  174. {
  175. label: '阴道镜检查情况',
  176. children: [
  177. { prop: 'colNum', label: '需要阴道镜检查人数' },
  178. { prop: 'colNum1', label: '阴道镜检查人数' },
  179. { prop: 'colNum2', label: '接受检查人数' },
  180. { prop: 'colNum3', label: '拒绝检查人数' },
  181. { prop: 'colNum4', label: '未见异常人数' },
  182. { prop: 'colNum5', label: '异常人数' },
  183. { prop: 'colNum6', label: '待完善人数' }
  184. ]
  185. },
  186. {
  187. label: '阴道镜检查随访情况',
  188. children: [
  189. { prop: 'colfNum', label: '已随访人数' },
  190. { prop: 'colfNum1', label: '待随访人数' },
  191. { prop: 'colfNum2', label: '未见异常' },
  192. { prop: 'colfNum3', label: '低度病变' },
  193. { prop: 'colfNum4', label: '高度病变' },
  194. { prop: 'colfNum5', label: '可疑癌' },
  195. { prop: 'colfNum6', label: '其他' },
  196. { prop: 'colfNum7', label: '不详' }
  197. ]
  198. },
  199. {
  200. label: '组织病理学检查情况',
  201. children: [
  202. { prop: 'cpatNum', label: '需要组织病理学检查' },
  203. { prop: 'cpatNum1', label: '病理学检查人数' },
  204. { prop: 'cpatNum2', label: '接受检查人数' },
  205. { prop: 'cpatNum3', label: '拒绝检查人数' },
  206. { prop: 'cpatNum4', label: '未见异常人数' },
  207. { prop: 'cpatNum5', label: '炎症' },
  208. { prop: 'cpatNum6', label: '低级别病变(原CIN1)' },
  209. { prop: 'cpatNum7', label: '高级别病变(原CIN2及CIN3)' },
  210. { prop: 'cpatNum8', label: '宫颈原位腺癌(AIS)' },
  211. { prop: 'cpatNum9', label: '宫颈微小浸润癌(鳞癌/腺癌)' },
  212. { prop: 'cpatNum10', label: '宫颈浸润癌(鳞癌/腺癌)' }
  213. ]
  214. },
  215. {
  216. label: '组织病理学检查随访情况',
  217. children: [
  218. { prop: 'cpatfNum', label: '已随访人数' },
  219. { prop: 'cpatfNum1', label: '待随访人数' },
  220. { prop: 'cpatfNum2', label: '炎症' },
  221. { prop: 'cpatfNum3', label: '低级别病变(原CIN1)' },
  222. { prop: 'cpatfNum4', label: '高级别病变(原CIN2及CIN3)' },
  223. { prop: 'cpatfNum5', label: '宫颈原位腺癌(AIS)' },
  224. { prop: 'cpatfNum6', label: '宫颈微小浸润癌(鳞癌/腺癌)' },
  225. { prop: 'cpatfNum7', label: '宫颈浸润癌(鳞癌/腺癌)' }
  226. ]
  227. },
  228. {
  229. label: '最后诊断情况',
  230. children: [
  231. { prop: 'finNum', label: '未见异常人数' },
  232. { prop: 'finNum1', label: '炎症' },
  233. { prop: 'finNum2', label: '低级别病变(原CIN1)' },
  234. { prop: 'finNum3', label: '高级别病变(原CIN2及CIN3)' },
  235. { prop: 'finNum4', label: '宫颈原位腺癌(AIS)' },
  236. { prop: 'finNum5', label: '宫颈微小浸润癌(鳞癌/腺癌)' },
  237. { prop: 'finNum6', label: '宫颈浸润癌(鳞癌/腺癌)' },
  238. { prop: 'finNum7', label: '待完善人数' }
  239. ]
  240. },
  241. {
  242. label: '宫颈病变接受治疗情况',
  243. children: [
  244. { prop: 'finTNum1', label: '接受治疗人数' },
  245. { prop: 'finTNum2', label: '不接受治疗人数' },
  246. { prop: 'finTNum3', label: '不详人数' }
  247. ]
  248. },
  249. {
  250. label: '术后病理—接受组织病理学检查情况',
  251. children: [
  252. { prop: 'finSNum1', label: '接受检查人数' },
  253. { prop: 'finSNum2', label: '不接受检查人数' },
  254. { prop: 'finSNum3', label: '炎症' },
  255. { prop: 'finSNum4', label: '低级别病变(原CIN1)' },
  256. { prop: 'finSNum5', label: '高级别病变(原CIN2及CIN3)' },
  257. { prop: 'finSNum6', label: '宫颈原位腺癌(AIS)' },
  258. { prop: 'finSNum7', label: '宫颈微小浸润癌(鳞癌/腺癌)' },
  259. { prop: 'finSNum8', label: '宫颈浸润癌(鳞癌/腺癌)' }
  260. ]
  261. }
  262. ],
  263. currentEditData: '',
  264. serviceRecordVisable: false
  265. }
  266. },
  267. methods: {
  268. back() {
  269. this.currentEditData = ''
  270. this.serviceRecordVisable = false
  271. },
  272. gotoService(item) {
  273. this.currentEditData = item.patient
  274. this.serviceRecordVisable = true
  275. },
  276. init() {
  277. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  278. if (selectedRole.code.indexOf('350200') > -1) {
  279. this.level = 1 // 市卫健委
  280. this.areaOptions = [
  281. { label: '厦门市', value: '' },
  282. { label: '思明区', value: '350203' },
  283. { label: '海沧区', value: '350205' },
  284. { label: '湖里区', value: '350206' },
  285. { label: '集美区', value: '350211' },
  286. { label: '同安区', value: '350212' },
  287. { label: '翔安区', value: '350213' }
  288. ]
  289. } else if (selectedRole.code.length == 6) {
  290. this.level = 2 // 区管理
  291. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
  292. this.form = {
  293. range: '2',
  294. town: selectedRole.code
  295. }
  296. this.getHospital(selectedRole.code)
  297. } else {
  298. this.level = 3 // 社区管理
  299. this.rangeOptions = [{ label: '机构', value: '2' }]
  300. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
  301. this.hospitalOptions = [{ name: selectedRole.name, code: selectedRole.code }]
  302. this.form = {
  303. range: '2',
  304. town: selectedRole.code.substring(0, 6),
  305. hospital: selectedRole.code
  306. }
  307. this.getTeam(selectedRole.code)
  308. }
  309. this.initTime()
  310. this.searchFn()
  311. this.hospitalsByType()
  312. },
  313. initTime() {
  314. var vm = this
  315. var now = new Date()
  316. vm.nowyear = vm.chooseYear = now.getFullYear()
  317. vm.years = []
  318. for (i = vm.nowyear; i >= 2013; i--) {
  319. vm.years.push(i)
  320. }
  321. },
  322. resetArea() {
  323. if (this.level == 1) {
  324. delete this.form.area
  325. delete this.form.hospital
  326. delete this.form.team
  327. } else if (this.level == 2) {
  328. delete this.form.hospital
  329. delete this.form.team
  330. } else {
  331. delete this.form.team
  332. }
  333. },
  334. getDictData() {},
  335. searchFn() {
  336. var vm = this
  337. this.loading = true
  338. var params = {
  339. ...this.form,
  340. // page: this.page,
  341. // size: this.size
  342. }
  343. if(this.form.range==3){
  344. if(this.form.town){
  345. params.town=this.areaOptions.find(item=>item.value==this.form.town).label
  346. }
  347. }
  348. vm.tableData = []
  349. if (this.chooseTime) {
  350. params.startTime = this.chooseTime[0]
  351. params.endTime = this.chooseTime[1]
  352. }
  353. httpRequest.get('/doctor/twoCancers/count/cervicalQualityCount', { data: params }).then(function (res) {
  354. if (res.status == 200) {
  355. vm.tableData = res.detailModelList
  356. // vm.total = res.totalCount
  357. }
  358. console.log('22222222222222222', vm.tableData)
  359. vm.loading = false
  360. })
  361. },
  362. exportTable() {
  363. var params = {
  364. ...this.form,
  365. page: this.page,
  366. size: this.size
  367. }
  368. if (this.chooseTime) {
  369. params.startTime = this.chooseTime[0]
  370. params.endTime = this.chooseTime[1]
  371. }
  372. this.exportLoading = true
  373. var fileName = `宫颈癌质控统计表${new Date().getTime()}.xls`
  374. httpRequest.downLoadFileForAjax('doctor/twoCancers/count/exportCervicalQualityCount', fileName, params).then(function () {
  375. this.exportLoading = false
  376. })
  377. },
  378. eliminateClick() {
  379. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  380. if (this.level == 1) {
  381. this.form = {
  382. range: '1'
  383. }
  384. } else if (this.level == 2) {
  385. this.form = {
  386. range: '1',
  387. area: selectedRole.code
  388. }
  389. this.getHospital(selectedRole.code)
  390. } else {
  391. this.form = {
  392. range: '2',
  393. area: selectedRole.code.substring(0, 6),
  394. hospital: selectedRole.code
  395. }
  396. this.getTeam(selectedRole.code)
  397. }
  398. this.chooseYear = new Date().getFullYear()
  399. this.chooseTime = null
  400. const now = new Date()
  401. // 获取当前日期
  402. const endDate = new Date()
  403. // 获取30天前的日期
  404. const startDate = new Date()
  405. startDate.setDate(endDate.getDate() - 30)
  406. this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)]
  407. this.init()
  408. this.$forceUpdate()
  409. },
  410. getHospital(code, flag = true) {
  411. var vm = this
  412. if (flag) {
  413. delete this.form.hospital
  414. delete this.form.team
  415. }
  416. var params = {
  417. type: 5,
  418. code: code
  419. }
  420. if (!code) {
  421. params={
  422. type: 6,
  423. code: '350200'
  424. }
  425. }
  426. httpRequest.post('common/district', { data: params }).then(function (res) {
  427. vm.hospitalOptions = [{ name: '全部', value: '' }]
  428. vm.hospitalOptions = vm.hospitalOptions.concat(res.list)
  429. })
  430. },
  431. getTeam(code, flag = true) {
  432. var vm = this
  433. if (flag) {
  434. delete this.form.team
  435. }
  436. var params = {
  437. hospital: code
  438. }
  439. httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
  440. vm.teamOptions = res.data
  441. })
  442. },
  443. handleCurrentChange(val) {
  444. this.page = val
  445. this.searchFn()
  446. },
  447. handleSizeChange(val) {
  448. this.size = val
  449. this.searchFn()
  450. },
  451. // 获取社区医院
  452. hospitalsByType() {
  453. var vm = this
  454. // var code
  455. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  456. if (selectedRole.code.indexOf('350200') > -1) {
  457. code = '350200' // 市卫健委
  458. } else if (selectedRole.code.length == 6) {
  459. code = selectedRole.code
  460. } else {
  461. this.level = 3 // 社区管理
  462. }
  463. if (selectedRole.code.length > 6) {
  464. this.communityHospitals = [{ label: selectedRole.name, value: selectedRole.code }]
  465. } else {
  466. var type = 1
  467. if (selectedRole.code.indexOf('350200') > -1) {
  468. type = 1 // 市卫健委
  469. } else if (selectedRole.code.length == 6) {
  470. type = 2
  471. }
  472. statisticAPI
  473. .hospitalsByType({
  474. type: type,
  475. code: selectedRole.code
  476. })
  477. .then(function (res) {
  478. if (res.status == 200) {
  479. vm.communityHospitals = [{ label: '全部', value: '' }]
  480. res.list.forEach(function (v) {
  481. vm.communityHospitals.push({
  482. value: v.code,
  483. label: v.name
  484. })
  485. })
  486. }
  487. })
  488. .catch(function (err) {
  489. console.log(err, 'Errr')
  490. })
  491. }
  492. },
  493. openDialog(row, prop) {
  494. var vm = this
  495. vm.dialogLoading = true
  496. this.query.type = 'g_' + prop
  497. this.query.orgCode = row.orgCode
  498. var params = {
  499. ...this.query,
  500. range: (this.form && this.form.range) || '',
  501. town: (this.form && this.form.town) || ''
  502. }
  503. vm.dialogTableData = []
  504. if (this.chooseTime) {
  505. params.startTime = this.chooseTime[0]
  506. params.endTime = this.chooseTime[1]
  507. }
  508. delete params.total
  509. httpRequest.get('doctor/twoCancers/count/caseDataList', { data: params }).then(function (res) {
  510. vm.dialogTableData = res.detailModelList
  511. vm.query.total = res.totalCount
  512. vm.visible = true
  513. vm.dialogLoading = false
  514. })
  515. },
  516. caseDataList() {
  517. var vm = this
  518. vm.dialogLoading = true
  519. var params = {
  520. ...this.query,
  521. range: (this.form && this.form.range) || '',
  522. town: (this.form && this.form.town) || '',
  523. hospital: (this.form && this.form.hospital) || ''
  524. }
  525. vm.dialogTableData = []
  526. if (this.chooseTime) {
  527. params.startTime = this.chooseTime[0]
  528. params.endTime = this.chooseTime[1]
  529. }
  530. delete params.total
  531. httpRequest.get('doctor/twoCancers/count/caseDataList', { data: params }).then(function (res) {
  532. vm.dialogTableData = res.detailModelList
  533. vm.query.total = res.totalCount
  534. vm.dialogLoading = false
  535. })
  536. },
  537. dialogSearchFn() {
  538. this.caseDataList()
  539. },
  540. handleCurrentChange1(val) {
  541. this.query.page = val
  542. this.caseDataList()
  543. },
  544. handleSizeChange1(val) {
  545. this.query.size = val
  546. this.caseDataList()
  547. },
  548. dialogExportFn() {
  549. var vm = this
  550. this.dialogExportLoading = true
  551. var params = {
  552. ...this.query,
  553. range: (this.form && this.form.range) || '',
  554. town: (this.form && this.form.town) || '',
  555. hospital: (this.form && this.form.hospital) || ''
  556. }
  557. if (this.chooseTime) {
  558. params.startTime = this.chooseTime[0]
  559. params.endTime = this.chooseTime[1]
  560. }
  561. var fileName = `个案数据列表${new Date().getTime()}.xls`
  562. httpRequest.downLoadFileForAjax('doctor/twoCancers/count/exportCaseDataList', fileName, params).then(function () {
  563. vm.dialogExportLoading = false
  564. })
  565. },
  566. dialogResetFn() {
  567. this.query = {
  568. page: 1,
  569. size: 10,
  570. total: 0,
  571. type:this.query.type,
  572. orgCode:this.query.orgCode,
  573. }
  574. this.caseDataList()
  575. },
  576. closeDialog() {
  577. this.query = {
  578. page: 1,
  579. size: 10,
  580. total: 0,
  581. type:this.query.type,
  582. orgCode:this.query.orgCode,
  583. }
  584. this.visible = false
  585. },
  586. closeDialog1() {
  587. this.dialogVisible = false
  588. },
  589. getData(data) {
  590. if (data) {
  591. this.yearType = data.yearType
  592. this.form.range = data.range
  593. this.form.area = data.area
  594. this.form.hospital = data.hospital
  595. this.form.team = data.team
  596. if (this.yearType == 1) {
  597. this.chooseYear = data.time
  598. } else {
  599. this.chooseTime = data.time
  600. }
  601. if (this.form.hospital) {
  602. // 如果有社区code传过来就调社区医院列表接口
  603. this.getHospital(data.area, false)
  604. }
  605. if (this.form.team) {
  606. // 如果有团队code传过来就调团队列表接口
  607. this.getTeam(data.hospital, false)
  608. }
  609. this.searchFn()
  610. } else {
  611. this.init()
  612. }
  613. },
  614. formatDate(date) {
  615. const year = date.getFullYear()
  616. const month = String(date.getMonth() + 1).padStart(2, '0')
  617. const day = String(date.getDate()).padStart(2, '0')
  618. return `${year}-${month}-${day}`
  619. }
  620. },
  621. mounted() {
  622. const now = new Date()
  623. // 获取当前日期
  624. const endDate = new Date()
  625. // 获取30天前的日期
  626. const startDate = new Date()
  627. startDate.setDate(endDate.getDate() - 30)
  628. this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)]
  629. this.init()
  630. }
  631. })