9f175678664e5c1bae46cc3f53cd942dd993e63a.svn-base 522 B

123456789101112131415161718192021222324
  1. <template>
  2. <div>
  3. <dashboardItem :dashboard="currentDashboard" mode="view" />
  4. </div>
  5. </template>
  6. <script>
  7. import dashboardItem from './dashboardItem'
  8. import { getdDashboardById } from '@/api/dashboard'
  9. export default {
  10. components: { dashboardItem },
  11. data() {
  12. return {
  13. currentDashboard: undefined
  14. }
  15. },
  16. created() {
  17. getdDashboardById(this.$route.params.id).then(resp => {
  18. resp.data.content = JSON.parse(resp.data.content)
  19. this.currentDashboard = resp.data
  20. })
  21. }
  22. }
  23. </script>