| | |
| | | import { useRouter } from 'vue-router'; |
| | | import ev1 from '@/assets/images/workbench/ev1.svg'; |
| | | import ev2 from '@/assets/images/workbench/ev2.svg'; |
| | | import { ElMessage } from 'element-plus' |
| | | import { ElMessage } from 'element-plus'; |
| | | const router = useRouter(); |
| | | const events = ref({}); |
| | | const params = ref({ |
| | |
| | | const getDate = date => { |
| | | return date.getDate(); |
| | | }; |
| | | |
| | | // 获取对应日期的事件 |
| | | const getEvents = dateString => { |
| | | return events.value[dateString] || []; |
| | | }; |
| | | const monthRange = getCurrentMonthRange(); |
| | | params.value = monthRange; |
| | | console.log('params.value', params.value); |
| | | |
| | | const getJobEventBar = () => { |
| | | getCalen(params.value).then(res => { |
| | | if (res.data.code !== 0) return; |
| | |
| | | }); |
| | | }; |
| | | const jumpcalendar = (event, day) => { |
| | | |
| | | |
| | | if (event.name === '工单') { |
| | | router.push({ |
| | | path: '/tickets/ticket', |
| | |
| | | day: day, |
| | | }, |
| | | }); |
| | | }else{ |
| | | } else { |
| | | router.push({ |
| | | path: '/job/jobstatistics', |
| | | query: { |
| | | day: day, |
| | | }, |
| | | }); |
| | | // ElMessage.warning('加急开发中...') |
| | | } |
| | | }; |
| | | onMounted(() => { |
| | |
| | | </script> |
| | | <style lang="scss"> |
| | | .calenBox { |
| | | .el-calendar__title{ |
| | | font-weight: bold; |
| | | font-size: 14px; |
| | | color: #363636; |
| | | } |
| | | |
| | | |
| | | .el-button-group>.el-button:not(:first-child):not(:last-child) { |
| | | border-radius: 0; |
| | | display: none; |
| | | } |
| | | .el-calendar__title { |
| | | font-weight: bold; |
| | | font-size: 14px; |
| | | color: #363636; |
| | | } |
| | | |
| | | .el-calendar-table td.is-selected { |
| | | background-color: #f0f7ff; |
| | | background-color: #f0f7ff; |
| | | border: 2px solid #409eff; |
| | | border-radius: 4px; |
| | | } |