Commit 916c950c by peijy

pyj 7.20 个人工作-礼堂预约文件上传修改

parent b32e66f7
......@@ -4,7 +4,7 @@
:on-error="handleUploadError" :on-exceed="handleExceed" :on-success="handleUploadSuccess" :show-file-list="false"
:headers="headers" class="upload-file-uploader" ref="fileUpload">
<!-- 上传按钮 -->
<el-button size="mini" type="primary">选取文</el-button>
<el-button size="mini" type="primary">流程单附</el-button>
<!-- 上传提示 -->
<!-- <div class="el-upload__tip" slot="tip" v-if="showTip">
请上传
......@@ -44,10 +44,10 @@ export default {
default: 5,
},
// 大小限制(MB)
fileSize: {
type: Number,
default: 5,
},
// fileSize: {
// type: Number,
// default: 5,
// },
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
type: Array,
......
......@@ -19,8 +19,8 @@
</el-form>
<!-- 表格信息 -->
<el-table stripe ref="applyTable" v-loading="loading" :data="infoList" :cell-style="cellStyle">
<el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column label="活动名称" align="center" prop="activityName" />
<el-table-column type="index" label="序号" width="55" align="center" fixed="left"></el-table-column>
<el-table-column label="活动名称" align="center" prop="activityName" width="100px" fixed="left"/>
<el-table-column label="活动地点" align="center" width="120px" prop="activityArea" />
<el-table-column label="负责人" align="center" prop="specificUserName" />
<el-table-column label="活动人数" align="center" prop="activityNumber" />
......@@ -48,7 +48,7 @@
</template>
</el-table-column>
<el-table-column label="申请人" align="center" prop="applyName" />
<el-table-column label="申请时间" align="center" prop="applyTime" />
<el-table-column label="申请时间" width="200px" align="center" prop="applyTime" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope">
<div v-if="scope.row.state === '0'">
......@@ -457,9 +457,6 @@ export default {
activityArea: [
{ required: true, message: "活动场地不能为空", trigger: "blur" }
],
activityTime: [
{ required: true, message: "活动不能为空", trigger: "blur" }
],
specificUserName: [
{ required: true, message: "具体负责人不能为空", trigger: "blur" }
......@@ -533,10 +530,15 @@ export default {
getFileList(data) {
console.log('data', data);
this.fileList = data;
this.postForm.fjlj = data[0].fjlj;
this.postForm.fjmc = data[0].fjmc;
console.log('this.postForm', this.postForm);
if(this.fileList.length !=0){
this.postForm.fjlj = data[0].fjlj;
this.postForm.fjmc = data[0].fjmc;
console.log('this.postForm', this.postForm);
}else{
this.postForm.fjlj = '';
this.postForm.fjmc = '';
}
},
/** 获取列表数据 */
......@@ -642,7 +644,7 @@ export default {
});
},
// 计算天数
// 计算天数
changeData(value) {
const startDate = value[0];
const endDate = value[1];
......@@ -762,15 +764,16 @@ export default {
console.log('this.fileList', this.fileList);
getAuditor(id).then(response => {
this.postForm = response.data;
console.log('this.fileList', this.fileList);
// if (this.fileList.length == 0) {
// this.fileList = []
// } else {
this.fileList = [{
fjlj: this.postForm.fjlj,
fjmc: this.postForm.fjmc,
}]
// }
console.log('this.fileList', this.fileList)
if(this.postForm.fjlj == '' || this.postForm.fjlj == undefined || this.postForm.fjlj == null){
this.fileList = []
}else{
this.fileList = [{
fjlj: this.postForm.fjlj,
fjmc: this.postForm.fjmc,
}]
}
console.log('postForm', this.postForm);
this.postForm.leadershipName = response.data.leadershipName
......@@ -814,17 +817,22 @@ export default {
console.log('this.postForm', this.postForm);
// this.$modal.loading("正在上传数据,请稍等...");
if (this.postForm.id != null) {
if(this.fileList.length != 0){
// 查看表单
updateAuditor(this.postForm)
.then((response) => {
this.$modal.closeLoading();
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
})
.catch((err) => {
this.$modal.closeLoading();
});
.then((response) => {
this.$modal.closeLoading();
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
})
.catch((err) => {
this.$modal.closeLoading();
});
}else{
this.$modal.msgError("流程单附件不能为空");
}
} else {
if (this.fileList.length != 0) {
console.log('this.postForm', this.postForm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment