ModifySchoolSet.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <el-dialog
  3. class="modify-school-set"
  4. :visible.sync="modalIsShow"
  5. :title="title"
  6. :close-on-click-modal="false"
  7. :close-on-press-escape="false"
  8. append-to-body
  9. fullscreen
  10. @opened="visibleChange"
  11. >
  12. <div class="mb-4 tab-btns">
  13. <el-button
  14. v-for="tab in tabs"
  15. :key="tab.val"
  16. size="medium"
  17. :type="curTab == tab.val ? 'primary' : 'default'"
  18. @click="selectMenu(tab.val)"
  19. >{{ tab.name }}
  20. </el-button>
  21. </div>
  22. <component :is="compName" :school="school"></component>
  23. <div slot="footer"></div>
  24. </el-dialog>
  25. </template>
  26. <script>
  27. import SchoolSetCheck from "./school/SchoolSetCheck.vue";
  28. import SchoolSetData from "./school/SchoolSetData.vue";
  29. import SchoolSetMenu from "./school/SchoolSetMenu.vue";
  30. import SchoolSetPaper from "./school/SchoolSetPaper.vue";
  31. import SchoolSetRole from "./school/SchoolSetRole.vue";
  32. import SchoolSetSync from "./school/SchoolSetSync.vue";
  33. export default {
  34. name: "modify-school-set",
  35. components: {
  36. SchoolSetCheck,
  37. SchoolSetData,
  38. SchoolSetMenu,
  39. SchoolSetPaper,
  40. SchoolSetRole,
  41. SchoolSetSync
  42. },
  43. props: {
  44. school: {
  45. type: Object,
  46. default() {
  47. return {};
  48. }
  49. }
  50. },
  51. data() {
  52. return {
  53. modalIsShow: false,
  54. curTab: "check",
  55. tabs: [
  56. {
  57. name: "用户验证配置",
  58. val: "check"
  59. },
  60. {
  61. name: "菜单管理",
  62. val: "menu"
  63. },
  64. {
  65. name: "角色管理",
  66. val: "role"
  67. },
  68. {
  69. name: "试卷规格配置",
  70. val: "paper"
  71. },
  72. {
  73. name: "同步配置",
  74. val: "sync"
  75. },
  76. {
  77. name: "数据还原",
  78. val: "data"
  79. }
  80. ]
  81. };
  82. },
  83. computed: {
  84. compName() {
  85. return `school-set-${this.curTab}`;
  86. },
  87. title() {
  88. return `学校设置--${this.school.name}`;
  89. }
  90. },
  91. methods: {
  92. visibleChange() {},
  93. cancel() {
  94. this.modalIsShow = false;
  95. },
  96. open() {
  97. this.modalIsShow = true;
  98. },
  99. selectMenu(tab) {
  100. this.curTab = tab;
  101. }
  102. }
  103. };
  104. </script>