You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

from.vue 4.0 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="page">
  3. <l-input title="学年" placeholder="请填写学年" :value="data.AcademicYearNo" disabled right />
  4. <l-input title="学期" placeholder="请填写学期" :value="data.Semester" disabled right />
  5. <l-input title="课程名称" placeholder="请填写课程名称" :value="data.LessonName" disabled right />
  6. <view class="txt">课程简介:</view>
  7. <view class="remarks">
  8. <!-- <l-textarea class="remarks" title="课程简介" :value="data.Introduction" placeholder="输入点什么..." readonly="readonly" /> -->
  9. <textarea disabled auto-height='true' :value="data.Introduction" />
  10. </view>
  11. <l-input title="上课节次" placeholder="请填写上课节次" :value="data.LessonSection" disabled right />
  12. <l-input title="上课时间" placeholder="请填写上课时间" :value="data.LessonTime" disabled right />
  13. <l-input title="学分" placeholder="请填写学分" :value="data.StudyScore" disabled right />
  14. <l-input title="教师姓名" placeholder="请填写教师姓名" :value="data.EmpName" disabled right />
  15. <!-- <view class="txt">教师简介:</view>
  16. <view class="bg-white">
  17. <l-textarea :value="data.resume" disabled placeholder="输入点什么..." readonly="readonly" />
  18. </view> -->
  19. <view class="txt">教师简介:</view>
  20. <view class="remarks">
  21. <!-- <l-textarea class="remarks" title="课程简介" :value="data.Introduction" placeholder="输入点什么..." readonly="readonly" /> -->
  22. <textarea disabled auto-height='true' :value="data.resume" />
  23. </view>
  24. <l-input title="教室名称" placeholder="请填写教室名称" :value="data.ClassRoomName" disabled right />
  25. <!-- <l-input title="姓名" placeholder="请填写姓名" :value="data.AcademicYearNo" disabled right /> -->
  26. <l-input title="人数上限" placeholder="请填写人数上限" :value="data.StuNumMax" disabled right />
  27. <l-input title="已报名人数" placeholder="请填写已报名人数" :value="data.StuNum" disabled right />
  28. <view class="btn" @click="fromBtn">报名</view>
  29. </view>
  30. </template>
  31. <script>
  32. export default{
  33. data() {
  34. return {
  35. weekChina: ["一", "二", "三", "四", "五", "六", "日"],
  36. keyValue: '',
  37. data: {}
  38. }
  39. },
  40. methods:{
  41. init() {
  42. this.keyValue = this.GET_PARAM(); //获取页面传递参数
  43. // console.log(this.keyValue);
  44. let _this = this;
  45. _this.LOADING('加载数据中…');
  46. _this.HTTP_GET('learun/OpenLessonPlanOfElectiveStudent/form', _this.keyValue, '加载数据时出错').then(res => {
  47. console.log(_postData,"_postData")
  48. this.HIDE_LOADING();
  49. // console.log(res);
  50. _this.data = res.JournalReceive;
  51. });
  52. },
  53. fromBtn() {
  54. var _postData = {}
  55. let _this = this;
  56. let user = this.GET_GLOBAL('loginUser');;
  57. _postData.keyValue = this.keyValue;
  58. _postData.StuNo = user.account;
  59. _this.LOADING('正在提交…');
  60. _this.HTTP_POST('learun/OpenLessonPlanOfElectiveStudent/SignInByMobile', _postData, '加载数据时出错').then((res,info, code) => {
  61. // this.HIDE_LOADING();
  62. console.log(res);
  63. // console.log(info);
  64. // console.log(code);
  65. if (res) {// 表单数据保存成功
  66. //判断队列结果
  67. let timer = setInterval(function () {
  68. // _this.LOADING('正在提交…');
  69. _this.HTTP_POST('learun/OpenLessonPlanOfElectiveStudent/GetApplyResult', _postData, '加载数据时出错').then((dataresult) => {
  70. _this.HIDE_LOADING();
  71. console.log(dataresult)
  72. clearInterval(timer);
  73. _this.EMIT('OpenLessonPlanOfElectiveStudent')
  74. _this.TOAST(dataresult.msg);
  75. // _this.NAV_BACK()
  76. });
  77. }, 5000);
  78. }
  79. });
  80. }
  81. },
  82. created() {
  83. this.init()
  84. }
  85. }
  86. </script>
  87. <style lang="less" scoped>
  88. .txt{
  89. line-height: 24px;
  90. font-size: 15px;
  91. background-color: #fff;
  92. padding: 10px 0 10px 15px;
  93. }
  94. .page{
  95. background-color: #fff;
  96. padding-bottom: 1px;
  97. }
  98. /deep/ .cu-form-group uni-textarea{
  99. height: auto;
  100. }
  101. .remarks{
  102. border-bottom: 0.5px solid #eee;
  103. padding-bottom: 10px;
  104. }
  105. .remarks textarea{
  106. width: 100%;
  107. padding: 0 15px;
  108. }
  109. </style>