Commit 916c950c by peijy

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

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