SpeechMaterial.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <div class="container-box">
  3. <div class="bread-crumb">
  4. <el-breadcrumb separator="/" style="float: left;margin:15px ">
  5. <el-breadcrumb-item :to="{ path: 'home' }">{{$i18n.locale=='en'? 'Home': '首页'}}</el-breadcrumb-item>
  6. <el-breadcrumb-item :to="{ path: 'ApplicationHistory'}">{{$i18n.locale=='en'? 'userCenter': '用户中心'}}</el-breadcrumb-item>
  7. <el-breadcrumb-item>{{$i18n.locale=='en'? 'Upload speech materials': '发言材料上传'}}</el-breadcrumb-item>
  8. </el-breadcrumb>
  9. </div>
  10. <div class="content-box">
  11. <div class="speech-material">
  12. <!-- <p class="speech-material-appellation">{{$i18n.locale=='en'? 'Dear guest!': '亲爱的嘉宾,您好!'}}</p>
  13. <p class="speech-material-tip">{{$i18n.locale=='en'? "You are already our guest speaker at this meeting. Please finish uploading your speech materials by 7 o'clock tomorrow morning.": '您已经是我们本次会议的发言嘉宾,请您在明天早上7点前,完成发言材料上传。'}}</p> -->
  14. <!-- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm"> -->
  15. <el-form :model="ruleForm" ref="ruleForm" class="demo-ruleForm">
  16. <el-form-item label="" prop="resource">
  17. <UpLoadFile @getFileUrl="getPreviousPositions"></UpLoadFile>
  18. <!-- <p class="tip-custom">{{$i18n.locale=='en'? 'Drag and drop the material directly to this area or click to select the speech material to complete the upload. Support word, pdf format. Please use the name + file name format to facilitate data management and storage for you.': '直接拖拽材料放到本区域或者点击选择发言材料,完成上传。支持word、pdf格式。请您以姓名+文件名格式,方便为你做数据管理储存。'}}</p> -->
  19. </el-form-item>
  20. <el-form-item prop="desc">
  21. <span class="label-custom">{{$i18n.locale=='en'? 'Description': '描述'}}</span>
  22. <el-input type="textarea" v-model="ruleForm.materialDescribe" :rows="8"></el-input>
  23. </el-form-item>
  24. <el-form-item :label="$i18n.locale=='en'? 'Is it public': '是否公开'" prop="resource" label-width="100px">
  25. <el-radio-group v-model="ruleForm.isPublic">
  26. <el-radio label="1">{{$i18n.locale=='en'? 'Yes': '是'}}</el-radio>
  27. <el-radio label="2">{{$i18n.locale=='en'? 'No': '否'}}</el-radio>
  28. </el-radio-group>
  29. </el-form-item>
  30. <el-form-item style="text-align: center">
  31. <el-button type="primary" @click="submitForm('ruleForm')">{{$i18n.locale=='en'? 'Submit': '提交材料'}}</el-button>
  32. </el-form-item>
  33. </el-form>
  34. </div>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. import Base from "@/views/base/Base";
  40. import { addSpeakMaterial } from "@/api/meeting/meetingApply";
  41. import UpLoadFile from "@/views/conferenceServices/UpLoadFile";
  42. export default {
  43. extends: Base,
  44. components: {
  45. UpLoadFile
  46. },
  47. data() {
  48. return {
  49. ruleForm: {
  50. meetingId: '1297382531911983104',
  51. materialName: '',
  52. materialDescribe: '',
  53. isPublic: '2',
  54. isPublish: '2',
  55. isBackUpload: '2',
  56. meetingApplyName: this.$route.params.key.applyWay=='zh'? this.$route.params.key.name: this.$route.params.key.nameEn,
  57. meetingApplyId: this.$route.params.key.id,
  58. logoAttachmentId: '', //未确定
  59. annexAttachmentId: '', //附件id
  60. annexAttachmentPath: '' //附件路径
  61. },
  62. rules: {
  63. // resource: [
  64. // { required: true, message: '请选择活动资源', trigger: 'change' }
  65. // ],
  66. // desc: [
  67. // { required: true, message: '请填写活动形式', trigger: 'blur' }
  68. // ]
  69. }
  70. };
  71. },
  72. mounted(){
  73. console.log(this.$route.params.key)
  74. },
  75. methods: {
  76. getPreviousPositions(fileData){
  77. this.ruleForm.materialName = fileData.fileName;
  78. this.ruleForm.annexAttachmentId = fileData.id;
  79. this.ruleForm.annexAttachmentPath = fileData.path;
  80. },
  81. submitForm(formName) {
  82. // this.$refs[formName].validate((valid) => {
  83. // if (valid) {
  84. // alert('submit!');
  85. // } else {
  86. // console.log('error submit!!');
  87. // return false;
  88. // }
  89. // });
  90. this.submitHandler((token) => {
  91. addSpeakMaterial(this.ruleForm).then(res=>{
  92. this.$message({
  93. message: this.$i18n.locale == "en"? 'Successfully' :'提交成功',
  94. type: 'success'
  95. });
  96. this.$router.go(-1);
  97. }).catch(err=>{
  98. this.resetToken();
  99. })
  100. })
  101. },
  102. }
  103. }
  104. </script>
  105. <style scoped>
  106. .container-box {
  107. width: 1200px;
  108. margin: 10px auto;
  109. }
  110. .bread-crumb{
  111. height: 40px;
  112. background: #fff;
  113. margin: 10px 0;
  114. }
  115. .content-box {
  116. width: 100%;
  117. background: #fff;
  118. }
  119. .speech-material{
  120. min-height: 700px;
  121. padding: 100px 200px 20px 200px;
  122. }
  123. .speech-material-appellation{
  124. font-size: 20px;
  125. font-weight: bold;
  126. margin: 0;
  127. line-height: 60px;
  128. }
  129. .speech-material-tip{
  130. font-size: 18px;
  131. text-indent: 2em;
  132. margin-top: 0;
  133. margin-bottom: 20px;
  134. }
  135. .speech-material /deep/ .el-textarea__inner{
  136. border-style: dashed;
  137. }
  138. .speech-material /deep/ .el-form-item__label{
  139. color: #333;
  140. font-weight: bold;
  141. text-align: left;
  142. }
  143. .label-custom{
  144. color: #333;
  145. font-weight: bold;
  146. }
  147. .tip-custom{
  148. color: #de571a;
  149. text-indent: 2em;
  150. margin-top: 10px;
  151. margin-bottom: 0;
  152. line-height: 26px;
  153. }
  154. </style>