personalDivideClass.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div class="app-container">
  3. <el-card class="box-card" >
  4. <div slot="header" class="clearfix text-center f20 pb10 pt10" >
  5. {{ title }}
  6. </div>
  7. <div>
  8. <p class="mb10">
  9. <el-button type="primary" @click="toSign">完成选科签字</el-button>
  10. <el-button type="primary" @click="showDispatchInfo">查看分班信息</el-button>
  11. </p>
  12. <div v-if="isSign && isShow">
  13. <el-alert
  14. class="mb5"
  15. :title="`通知:${$store.getters.nickName}同学您的新班级信息于2022年6月18日0点生效`"
  16. type="info"
  17. :closable="false"
  18. show-icon>
  19. </el-alert>
  20. <mx-table :prop-defines="propsDefines" :rows="rows">
  21. <template #tips="{row}">
  22. <el-button type="primary">查看</el-button>
  23. </template>
  24. </mx-table>
  25. </div>
  26. </div>
  27. </el-card>
  28. </div>
  29. </template>
  30. <script>
  31. export default {
  32. data(){
  33. return{
  34. isSign:false,
  35. isShow:false,
  36. rows: [
  37. {
  38. year: 2021,
  39. group: '物化生',
  40. name: this.$store.getters.nickName,
  41. oldClass: '2101',
  42. newClass: '2105',
  43. }
  44. ],
  45. propsDefines: {
  46. year: {
  47. label:'学年'
  48. },
  49. group: {
  50. label:'选择组合'
  51. },
  52. name: {
  53. label:'姓名'
  54. },
  55. oldClass: {
  56. label:'原班级'
  57. },
  58. newClass: {
  59. label:'新班级'
  60. },
  61. tips: {
  62. label:'新班报道备注',
  63. slot: 'tips'
  64. },
  65. }
  66. }
  67. },
  68. computed:{
  69. title(){
  70. const store = this.$store.getters
  71. if(!store) return ''
  72. console.log(store)
  73. return `${store.school.schoolName}${store.firstClassName}级分班信息 ${store.nickName}同学`
  74. }
  75. },
  76. methods: {
  77. showDispatchInfo() {
  78. if(!this.isSign){
  79. this.$message.warning('请完成选科报名签字,个人的分班信息才能显示')
  80. return
  81. }
  82. this.isShow = true
  83. },
  84. toSign() {
  85. // 签字
  86. if(this.isSign) return
  87. this.$Dialog('ElectiveSign',{},() => {
  88. this.$message.success('已完成签名')
  89. this.isSign = true
  90. })
  91. // if(!this.isSign) {
  92. // this.isSign = true
  93. // this.$message.success('已完成签名')
  94. // }
  95. }
  96. }
  97. }
  98. </script>
  99. <style>
  100. </style>