index.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. var template = ''
  2. $.ajax('../../../component/statistics/PlanService/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('plan-service', {
  14. template: template,
  15. props: [],
  16. data: function () {
  17. return {
  18. years: [],
  19. yearType: '1',
  20. chooseYear: null,
  21. chooseTime: null,
  22. form: {},
  23. tableData: [],
  24. tableHeader: [
  25. { label: '住院号', prop: 'a' },
  26. { label: '患者姓名', prop: 'b' },
  27. { label: '性别', prop: 'c' },
  28. { label: '年龄', prop: 'c' },
  29. { label: '建床日期', prop: 'a' },
  30. { label: '查床周期', prop: 'a' },
  31. { label: '查床开始日期', prop: 'a' },
  32. { label: '查床人员', prop: 'a' }
  33. ],
  34. dialogShow: true,
  35. planList: [
  36. { checkTime: '2024-11-01 9:30', patientName: '黄小蕾', checkPlanStatusName: '计划中', color: '#0099ff' },
  37. { checkTime: '2024-11-02 9:30', patientName: '黄小蕾', checkPlanStatusName: '已完成', color: '#099d09' },
  38. { checkTime: '2024-11-03 9:30', patientName: '黄小蕾', checkPlanStatusName: '计划超时', color: '#ff0000' },
  39. { checkTime: '2024-11-04 9:30', patientName: '黄小蕾', checkPlanStatusName: '计划中', color: '#0099ff' }
  40. ]
  41. }
  42. },
  43. methods: {
  44. initTime() {
  45. var vm = this
  46. var now = new Date()
  47. vm.nowyear = vm.chooseYear = now.getFullYear()
  48. vm.years = []
  49. for (i = vm.nowyear; i >= 2013; i--) {
  50. vm.years.push(i)
  51. }
  52. },
  53. queryDate() {},
  54. exportTable() {},
  55. eliminateClick() {
  56. this.form = {}
  57. this.yearType = '1'
  58. this.chooseYear = new Date().getFullYear()
  59. this.chooseTime = null
  60. },
  61. closeDialog() {
  62. this.dialogShow = false
  63. },
  64. previewRecord(row) {
  65. this.dialogShow = true
  66. }
  67. },
  68. mounted() {
  69. this.initTime()
  70. }
  71. })