index.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!--
  2. * @Author: WangJiaCheng
  3. * @Date: 2021-05-07 12:09:58
  4. * @LastEditors: WangJiaCheng
  5. * @LastEditTime: 2021-08-20 17:58:46
  6. * @Description:
  7. -->
  8. <template>
  9. <div class="dashboard">
  10. <div class="entry">
  11. <div class="entry-row">
  12. <div
  13. class="entry-item"
  14. @click="goEditor"
  15. >
  16. <span>开发页面</span>
  17. </div>
  18. <div :span="12" class="entry-item">
  19. 开发可视化大屏
  20. </div>
  21. </div>
  22. <div class="entry-row">
  23. <div :span="12" class="entry-item" @click="handleCreate('page')">
  24. 代码生成
  25. </div>
  26. <div :span="12" class="entry-item" @click="goFormDesign">
  27. 表单设计
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. </template>
  33. <script>
  34. export default {
  35. name: 'DashBoard',
  36. data() {
  37. return {}
  38. },
  39. methods: {
  40. goEditor(type) {
  41. this.$router.push({
  42. name: 'appEditor',
  43. query: { id: 'create' }
  44. })
  45. },
  46. goFormDesign() {
  47. this.$router.push({
  48. name: 'formDesign'
  49. })
  50. },
  51. handleCreate(type) {
  52. this.$router.push({
  53. name: `${type}Edit`,
  54. params: { type: 'create' }
  55. })
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="less">
  61. .entry {
  62. margin: 20px auto;
  63. width: 90%;
  64. max-width: 900px;
  65. .entry-row {
  66. display: flex;
  67. justify-content: center;
  68. .entry-item {
  69. display: flex;
  70. align-items: center;
  71. justify-content: center;
  72. border: 1px solid #f0f0f0;
  73. margin: 10px;
  74. border-radius: 4px;
  75. height: 200px;
  76. width: 400px;
  77. cursor: pointer;
  78. font-size: 20px;
  79. // background: spin(lighten(@base, 25%), 8);
  80. }
  81. }
  82. }
  83. </style>