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