【修改】限制邮箱最多50
This commit is contained in:
@@ -88,23 +88,22 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-form-item label="上传报告:" prop="fileId">
|
||||
<el-upload action="#" :http-request="(params) => uploadFile(params)" :show-file-list="false"
|
||||
:before-upload="beforeUploadFile" :on-remove="handleRemove"
|
||||
:file-list="fileList" :disabled="formControl">
|
||||
<el-button class="uploadBtn" :disabled="formControl">选择文件</el-button>
|
||||
<el-form-item label="上传报告:" prop="fileList">
|
||||
|
||||
</el-upload>
|
||||
<el-button class="uploadBtn" @click="dialogFile=true">
|
||||
|
||||
{{fileList.length>0?'查看文件':'选择文件'}}
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<span class="uploadFile" v-if="form.fileName">
|
||||
<span :class="{'fontColor':formControl}" :title="form.fileName" class="juli">{{ form.fileName }}</span>
|
||||
<svg-icon icon-class="cloud" @click="downFile(form.fileId)" style="font-size: 20px"
|
||||
class-name="icon" ></svg-icon>
|
||||
<svg-icon icon-class="del" @click="delFile" style="font-size: 20px"
|
||||
v-if="!formControl" class-name="icon" ></svg-icon>
|
||||
<!-- <span :class="{'fontColor':formControl}" :title="form.fileName" class="juli">{{ form.fileName }}</span>-->
|
||||
<!-- <svg-icon icon-class="cloud" @click="downFile(form.fileId)" style="font-size: 20px"-->
|
||||
<!-- class-name="icon" ></svg-icon>-->
|
||||
<!-- <svg-icon icon-class="del" @click="delFile" style="font-size: 20px"-->
|
||||
<!-- v-if="!formControl" class-name="icon" ></svg-icon>-->
|
||||
<!-- <i class="el-icon-cloudy iconstyle" ></i>-->
|
||||
<!-- <i :class="{'fontColor':formControl}" class="el-icon-delete iconstyle" @click="delFile"></i>-->
|
||||
</span>
|
||||
@@ -116,6 +115,16 @@
|
||||
value: orgTableVal,
|
||||
valueName: orgTableValName
|
||||
}" :workNumFlag="true" :isOrg="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
|
||||
<el-dialog title="上传文件" :visible.sync="dialogFile" width="10%" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false" modal-append-to-body append-to-body>
|
||||
<el-upload :disabled="formControl" action="#" :http-request="(params) => uploadFile(params)" :show-file-list="true"
|
||||
:before-upload="beforeUploadFile" :on-remove="handleRemove"
|
||||
:file-list="fileList" multiple
|
||||
drag :class="{'disable':formControl}">
|
||||
<i class="el-icon-upload" ></i>
|
||||
<div class="el-upload__text">点击或拖拽上传文件</div>
|
||||
</el-upload>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -133,7 +142,9 @@ export default {
|
||||
orgTable
|
||||
},
|
||||
props: {
|
||||
|
||||
prcType:{
|
||||
type: String
|
||||
},
|
||||
formControl: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
@@ -148,6 +159,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
delIds:[],
|
||||
dialogFile:false,
|
||||
privacyLevelOptions,
|
||||
confidentialLevelOptions,
|
||||
orgTableVal: '',
|
||||
@@ -168,7 +181,7 @@ export default {
|
||||
},
|
||||
form: {},
|
||||
processFormRule: {
|
||||
fileId: [
|
||||
fileList: [
|
||||
{
|
||||
required: true,
|
||||
message: "上传报告不能为空",
|
||||
@@ -270,11 +283,21 @@ export default {
|
||||
this.$refs.processFormRef.clearValidate()
|
||||
})
|
||||
}
|
||||
if(this.processForm.fileList.length>0){
|
||||
|
||||
this.fileList=this.processForm.fileList.map(item=>{
|
||||
return {
|
||||
name:item.fileName,
|
||||
id:item.fileId
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
changeDate(d){
|
||||
this.form.secrecyLast = new Date(d)
|
||||
},
|
||||
@@ -321,12 +344,6 @@ export default {
|
||||
this.form.departmentName = partsName.toString()
|
||||
|
||||
},
|
||||
delFile() {
|
||||
if (this.formControl) return
|
||||
this.fileList = []
|
||||
this.form.fileName = '';
|
||||
this.form.fileId = '';
|
||||
},
|
||||
reportLevel(item) {
|
||||
let imList = ['普通商密', '核心商密']
|
||||
|
||||
@@ -430,10 +447,17 @@ export default {
|
||||
this.dialogUser = true
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
this.form.fileName = '';
|
||||
this.form.fileId = '';
|
||||
this.fileList = []
|
||||
if(this.prcType == '5' || this.$route.query.taskDefinitionKey == 'reEdit'){
|
||||
// 记录删除的文件id
|
||||
this.delIds.push(file.id)
|
||||
}
|
||||
this.fileList = fileList
|
||||
this.form.fileList = this.fileList.map(item=>{
|
||||
return {
|
||||
fileId:item.id,
|
||||
fileName:item.name
|
||||
}
|
||||
})
|
||||
},
|
||||
//用递归方式去除children
|
||||
getTreeData(data) {
|
||||
@@ -459,18 +483,23 @@ export default {
|
||||
let fd = new FormData();
|
||||
fd.append('file', params.file);
|
||||
this.$api.report.reportUploadFile(fd).then(({data}) => {
|
||||
this.form.fileName = data.name;
|
||||
this.form.fileId = data.key;
|
||||
this.fileList = [data]
|
||||
this.$refs.processFormRef.clearValidate(['fileId'])
|
||||
this.fileList.push(data)
|
||||
this.form.fileList = this.fileList.map(item=>{
|
||||
return {
|
||||
fileId:item.id,
|
||||
fileName:item.name
|
||||
}
|
||||
})
|
||||
this.$refs.processFormRef.clearValidate(['fileList'])
|
||||
})
|
||||
},
|
||||
// 上传文件前
|
||||
beforeUploadFile(file) {
|
||||
let realFileType = file.name.split('.')[file.name.split('.').length - 1];
|
||||
const isType = (
|
||||
file.type === fileType.pdf || file.type === fileType.ppt || file.type === fileType.pptx
|
||||
|| realFileType === 'pdf' || realFileType === 'ppt' || realFileType === 'pptx'
|
||||
file.type === fileType.pdf || file.type === fileType.ppt || file.type === fileType.pptx || file.type === fileType.xlsx||
|
||||
file.type == fileType.xls
|
||||
|| realFileType === 'pdf' || realFileType === 'ppt' || realFileType === 'pptx' || realFileType == 'xls' || realFileType== 'xlsx'
|
||||
);
|
||||
const isSize = file.size / 1024 / 1024 < 200;
|
||||
if (!isType) {
|
||||
@@ -591,4 +620,17 @@ export default {
|
||||
::v-deep .el-input.is-disabled .el-input__inner{
|
||||
color: #858585;
|
||||
}
|
||||
::v-deep .el-dialog{
|
||||
min-width: 380px !important;
|
||||
padding: 0 10px;
|
||||
.el-dialog__body{
|
||||
//text-align: center;
|
||||
}
|
||||
}
|
||||
.disable{
|
||||
::v-deep .el-upload-dragger{
|
||||
cursor: not-allowed ;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
|
||||
<span class="base_title">基础信息</span>
|
||||
<report-form ref="basMes" :form-control="formControl" :form-controlname="formControlname"
|
||||
:process-form="processForm"></report-form>
|
||||
|
||||
|
||||
:process-form="processForm" :prcType="prcType"></report-form>
|
||||
</div>
|
||||
<div class="process_content" v-if="initShow">
|
||||
<span class="base_title">审批记录</span>
|
||||
@@ -207,6 +205,16 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 删除文件
|
||||
delFile(ids){
|
||||
return new Promise((resolve,reject)=>{
|
||||
this.$api.report.delFile({
|
||||
rfIdList:ids
|
||||
}).then(()=>{
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取领导
|
||||
getLearder(){
|
||||
console.log("获取领导")
|
||||
@@ -258,6 +266,7 @@ export default {
|
||||
mainContent:'',
|
||||
fileId:'',
|
||||
fileName:'',
|
||||
fileList:''
|
||||
}
|
||||
this.applicationForm = {
|
||||
applyReason: '',
|
||||
|
||||
Reference in New Issue
Block a user