weeklyCenter.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <div class="dailyCenterBox">
  3. <h4 class="title">工作周报填报</h4>
  4. <div class="box">
  5. <div class="calendarBox">
  6. <WeekCalendar :onChange="onChange" />
  7. </div>
  8. <div class="contentBox" v-if="writeData.isLog">
  9. <DetailBox :detail="writeData.isLog" />
  10. </div>
  11. <div class="contentBox" v-else>
  12. <EditorDetail :weekDate="writeData.weekDate" :writeData="writeData" />
  13. </div>
  14. </div>
  15. </div>
  16. </template>
  17. <script setup lang="ts">
  18. import WeekCalendar from './WeekCalendar.vue'
  19. import DetailBox from '../components/DetailBoxWeek.vue'
  20. import EditorDetail from './editorDetail.vue'
  21. import moment from 'moment'
  22. // import request from '@/config/axios'
  23. defineOptions({ name: 'WeeklyCenter' })
  24. // 本周填写的日期
  25. const writeData = ref<any>({
  26. weekDate: [
  27. moment().startOf('isoWeek').format('YYYY-MM-DD'),
  28. moment().endOf('isoWeek').format('YYYY-MM-DD')
  29. ]
  30. })
  31. const onChange = (data) => {
  32. writeData.value = data
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .dailyCenterBox {
  37. width: 100%;
  38. margin-top: 35px;
  39. height: calc(100% - 35px);
  40. background-color: #fff;
  41. border-radius: 20px;
  42. padding: 30px;
  43. position: relative;
  44. .title {
  45. font-size: 20px;
  46. margin-bottom: 20px;
  47. color: #121518;
  48. }
  49. .box {
  50. width: 100%;
  51. height: calc(100% - 50px);
  52. display: flex;
  53. justify-content: space-between;
  54. }
  55. .calendarBox {
  56. width: 50%;
  57. position: relative;
  58. }
  59. .contentBox {
  60. width: 50%;
  61. margin-top: 20px;
  62. height: calc(100% - 250px);
  63. }
  64. }
  65. </style>