TaskMain.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <!-- 列表页 -->
  3. <TaskList v-if="showType === 'list'"
  4. @goAdd="showAdd"
  5. @goImport="showImport"/>
  6. <!-- 添加页 -->
  7. <TaskAdd v-else-if="showType === 'add'"
  8. @goList="showList"/>
  9. <!-- 导入页 -->
  10. <TaskImport v-else-if="showType === 'import'"
  11. @goList="showList"/>
  12. </template>
  13. <script>
  14. import TaskList from './modules/TaskList'
  15. import TaskAdd from './modules/TaskAdd'
  16. import TaskImport from './modules/TaskImport'
  17. export default {
  18. name: 'TaskMain',
  19. components: {
  20. TaskList,
  21. TaskAdd,
  22. TaskImport,
  23. },
  24. data () {
  25. return {
  26. description: '稽核任务管理主页面',
  27. showType: 'list',
  28. }
  29. },
  30. methods: {
  31. // 显示列表页面
  32. showList() {
  33. this.showType = 'list'
  34. },
  35. // 显示添加页面
  36. showAdd() {
  37. this.showType = 'add'
  38. },
  39. // 显示导入页面
  40. showImport(param) {
  41. this.showType = 'import'
  42. },
  43. }
  44. }
  45. </script>
  46. <style scoped>
  47. </style>