|
@@ -81,17 +81,23 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 活动完结报告开始 -->
|
|
|
- <!-- <div class="tabTit">
|
|
|
+ <div class="tabTit">
|
|
|
<div><p>活动完结报告</p></div>
|
|
|
</div>
|
|
|
- <div style="width: 85%;float: left;">
|
|
|
- <div style="display: flex;">
|
|
|
- <div class="download">智能分链机器公开赛.pdf 点击下载</div>
|
|
|
- <div class="addMoneyBtn">
|
|
|
+ <div style="width: 85%" v-loading="loading" element-loading-text="文件正在上传中">
|
|
|
+ <div style="display: flex;width: 100%;align-items: center;">
|
|
|
+ <div class="download" v-if="tableData.reportFile!=''&&tableData.reportFile!=null">{{ tableData.reportFile!=''&&tableData.reportFile!=null?JSON.parse(tableData.reportFile).fileName:'' }}</div>
|
|
|
+ <div class="addMoneyBtn" v-if="tableData.reportFile==''||tableData.reportFile==null">
|
|
|
<div class="jia">+</div>添加
|
|
|
+ <div id="upFile">
|
|
|
+ <beUpload @getFile="getFile" :navName="'上传文件'" :accept="accept"> </beUpload>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="DelFile" v-if="tableData.reportFile!=''&&tableData.reportFile!=null">
|
|
|
+ <el-button type="danger" @click="DelFileDialog = true">删除文件</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
<!-- 活动完结报告结束 -->
|
|
|
|
|
|
<!-- 活动指导老师开始 -->
|
|
@@ -252,25 +258,43 @@
|
|
|
width="600px"
|
|
|
class="MAputIn AddMember">
|
|
|
<div class="addDialogLogo">LOGO</div>
|
|
|
- <div class="deleteContent">是否修改“{{tableData.title}}”项目活动?</div>
|
|
|
+ <div class="deleteContent">是否修改“{{ tableData.reportFile!=''&&tableData.reportFile!=null?tableData.title:''}}”项目活动?</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="save" class="btn5" size="small">确认提交</el-button>
|
|
|
<el-button @click="dialogVisible1=false;" class="btn5" style="background:#cccccc" size="small">取消</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <!-- 提交对话框结束 -->
|
|
|
+ <!-- 删除文件对话框结束 -->
|
|
|
+ <el-dialog
|
|
|
+ title="提示"
|
|
|
+ :visible.sync="DelFileDialog"
|
|
|
+ width="600px"
|
|
|
+ class="MAputIn AddMember">
|
|
|
+ <div class="addDialogLogo">LOGO</div>
|
|
|
+ <!-- <div class="deleteContent" v-if="tableData.reportFile==''&&tableData.reportFile!=null">是否删除“{{JSON.parse(tableData.reportFile).fileName}}”文件?</div> -->
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="danger" @click="DelFileYes" class="btn5" size="small">确认删除</el-button>
|
|
|
+ <el-button @click="DelFileDialog=false;" class="btn5" style="background:#cccccc" size="small">取消</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 删除文件对话框结束 -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { VueEditor } from "vue2-editor";
|
|
|
import { uuid } from 'vue-uuid';
|
|
|
+import BeUpload from '../../components/tool/beUpload.vue'
|
|
|
export default {
|
|
|
components:{
|
|
|
- VueEditor
|
|
|
+ VueEditor,
|
|
|
+ BeUpload
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ accept:"*",
|
|
|
+ loading:false,
|
|
|
+ DelFileDialog:false,
|
|
|
dialogVisible1:false,
|
|
|
addMemberDialog:false,
|
|
|
customToolbar: [
|
|
@@ -293,6 +317,7 @@ export default {
|
|
|
course_teacher:[],
|
|
|
brief:"",
|
|
|
chapters:["","","",""],
|
|
|
+ reportFile:"",
|
|
|
},
|
|
|
selectInput:{
|
|
|
project:[],
|
|
@@ -307,6 +332,40 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ DelFileYes(){
|
|
|
+ this.ajax.post(this.$store.state.api+"/UploadActivityFile",{
|
|
|
+ uid:this.$store.state.userInfo.userid,
|
|
|
+ aid:this.$route.query['Id'],
|
|
|
+ file:""
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.data==1){
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ }else{
|
|
|
+ this.$message.error("删除失败")
|
|
|
+ }
|
|
|
+ this.getData();
|
|
|
+ this.DelFileDialog = false;
|
|
|
+ }).catch(err=>{
|
|
|
+ this.$message.error(err.message)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getFile(val) {//上传文件
|
|
|
+ this.ajax.post(this.$store.state.api+"/UploadActivityFile",{
|
|
|
+ uid:this.$store.state.userInfo.userid,
|
|
|
+ aid:this.$route.query['Id'],
|
|
|
+ file:JSON.stringify(val)
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.data==1){
|
|
|
+ this.$message.success("添加成功");
|
|
|
+ this.getData();
|
|
|
+ }else{
|
|
|
+ this.$message.error("添加失败")
|
|
|
+ }
|
|
|
+ }).catch(err=>{
|
|
|
+ this.$message.error(err.message);
|
|
|
+ })
|
|
|
+ // console.log(val);
|
|
|
+ },
|
|
|
submit(){
|
|
|
if(this.check()!=1)return;
|
|
|
this.dialogVisible1 = true;
|
|
@@ -474,11 +533,12 @@ export default {
|
|
|
data.course_teacher = JSON.parse(data.course_teacher);
|
|
|
data.chapters = JSON.parse(data.chapters)
|
|
|
this.tableData = data;
|
|
|
+ console.log(this.tableData)
|
|
|
this.$message.success("获取数据成功")
|
|
|
}).catch(err=>{
|
|
|
this.$message.error(err.message)
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
mounted(){
|
|
|
this.getAllClass();
|