|
@@ -139,7 +139,8 @@
|
|
|
<el-button type="primary" v-if="scope.row.state==0" @click="audi(scope.row)" size="mini">审核</el-button>
|
|
|
<el-button type="info" disabled v-if="scope.row.state==1" @click="audi(scope.row)" size="mini">审核</el-button>
|
|
|
<el-button type="primary" size="mini" @click="edit(scope)">申请表</el-button>
|
|
|
- <el-button type="primary" size="mini" @click="end" >完结</el-button>
|
|
|
+ <el-button type="primary" v-if="scope.row.reportFile==''||scope.row.reportFile==null" size="mini" @click="end(scope.row)" >完结</el-button>
|
|
|
+ <el-button type="info" v-show="scope.row.reportFile!=''&&scope.row.reportFile!=null" size="mini" disabled>完结</el-button>
|
|
|
<!-- </el-button> -->
|
|
|
</div>
|
|
|
</template>
|
|
@@ -258,13 +259,19 @@
|
|
|
class="endDialog"
|
|
|
:before-close="init">
|
|
|
<div class="addDialogLogo">LOGO</div>
|
|
|
- <div class="deleteContent">"智能分链机器公开赛"项目活动,是否确定完结?</div>
|
|
|
- <div class="deleteContent1">上次活动完结报告</div>
|
|
|
- <div class="download">
|
|
|
- <div>智能分链机器公开赛.pdf 点击下载</div>
|
|
|
+ <div class="deleteContent">"{{ endTable.title }}"项目活动,是否确定完结?</div>
|
|
|
+ <div class="deleteContent1">活动完结报告</div>
|
|
|
+ <div class="download" v-if="endTable.file!=''">
|
|
|
+ <div>{{ endTable.file!=''&&endTable.file!=null?endTable.file.fileName:"" }}</div>
|
|
|
</div>
|
|
|
- <div class="addMoneyBtn" style="margin-left: 0;">
|
|
|
+ <div class="addMoneyBtn" style="margin-left: 0;" v-if="endTable.file==''||endTable.file==null">
|
|
|
<div class="jia">+</div>添加
|
|
|
+ <div id="upFile">
|
|
|
+ <beUpload @getFile="getFile" :navName="'上传文件'" :accept="accept"> </beUpload>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="DelBtn" style="margin-left: 0;" v-if="endTable.file!=''&&endTable.file!=null">
|
|
|
+ <el-button type="primary" @click="endTable.file=''">删除文件</el-button>
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="ending" class="diaBtn">确认提交</el-button>
|
|
@@ -285,9 +292,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import beUpload from '../../components/tool/beUpload'
|
|
|
export default {
|
|
|
+ components:{beUpload},
|
|
|
data() {
|
|
|
return {
|
|
|
+ accept:".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
|
status:1,
|
|
|
textarea:'',
|
|
|
input:'',
|
|
@@ -320,10 +330,17 @@
|
|
|
money:"",
|
|
|
phone:""
|
|
|
},
|
|
|
+ endTable:{
|
|
|
+ Id:"",
|
|
|
+ title:"",
|
|
|
+ file:"",
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
-
|
|
|
+ getFile(val) {//上传文件
|
|
|
+ this.endTable.file = val;
|
|
|
+ },
|
|
|
|
|
|
init(){//重置
|
|
|
this.auditDialog=false;
|
|
@@ -349,23 +366,37 @@
|
|
|
}).catch(err=>{
|
|
|
this.$message.error(err.message)
|
|
|
})
|
|
|
- // this.auditDialog=false;
|
|
|
- // this.status--
|
|
|
- // console.log(this.status);
|
|
|
},
|
|
|
|
|
|
// 驳回对话框确定
|
|
|
commit2(){
|
|
|
this.rejectDialog=false;
|
|
|
this.status++
|
|
|
- console.log(this.status);
|
|
|
},
|
|
|
|
|
|
- end(){//完结按钮
|
|
|
+ end(val){//完结按钮
|
|
|
+ this.endTable.title = val.title;
|
|
|
+ this.endTable.Id = val.acId;
|
|
|
+ this.endTable.file = val.reportFile;
|
|
|
this.endDialog=true;
|
|
|
},
|
|
|
ending(){ //完结提交
|
|
|
- this.endDialog=false;
|
|
|
+ if(this.endTable.file=="")return this.$message.error("请上传完结报告");
|
|
|
+ this.ajax.post(this.$store.state.api+"/UploadActivityFile",{
|
|
|
+ uid:this.$store.state.userInfo.userid,
|
|
|
+ aid:this.endTable.Id,
|
|
|
+ file:JSON.stringify(this.endTable.file),
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.data==1){
|
|
|
+ this.$message.success("结项成功");
|
|
|
+ this.endDialog = false;
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.$message.error("结项失败")
|
|
|
+ }
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+ // this.endDialog=false;
|
|
|
},
|
|
|
|
|
|
edit(){ // 申请表按钮
|
|
@@ -408,7 +439,6 @@
|
|
|
this.options = data[1];
|
|
|
this.options1 = data[2];
|
|
|
this.options2 = data[3];
|
|
|
- console.log(data)
|
|
|
this.Page.total = data[4][0]['total'];
|
|
|
}).catch(err=>{
|
|
|
this.$message.error(err.message)
|
|
@@ -431,7 +461,7 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getData()
|
|
|
+ this.getData();
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -524,6 +554,9 @@
|
|
|
|
|
|
.endDialog{ //完结对话框的
|
|
|
.el-dialog__header{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ box-sizing: border-box;
|
|
|
background: #32455b;
|
|
|
}
|
|
|
.el-dialog__title{
|
|
@@ -541,7 +574,9 @@
|
|
|
font-size: 22px;
|
|
|
color: #000;
|
|
|
box-sizing: border-box;
|
|
|
- padding: 0 20px;
|
|
|
+ // padding: 0 20px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
}
|
|
|
.deleteContent1{
|
|
|
width: 100%;
|