feat: There is no way the, bug #52329

This commit is contained in:
super_liu
2022-03-31 17:36:54 +08:00
parent 8bb44b8e5a
commit 5315bc1c8e
3 changed files with 183 additions and 142 deletions
@@ -1426,6 +1426,12 @@
let mes = JSON.parse(res.mes)
mes.form.date = new Date(this.$moment(mes.form.date).format('YYYY-MM-DD'))
this.form = mes.form
this.form['lawsSyqy'] = this.filterObj(this.form['lawsSyqy'])
this.form['lawsSycx'] = this.filterObj(this.form['lawsSycx'])
this.form['lawsLabel'] = this.filterObj(this.form['lawsLabel'])
this.form['YYRZLAWS'] = this.filterObj(this.form['YYRZLAWS'])
this.form['NYLXLAWS'] = this.filterObj(this.form['NYLXLAWS'])
this.form['TGRLAWS'] = this.filterObj(this.form['TGRLAWS'])
this.roleForm = mes.roleForm
this.commentText = mes.commentText
})
@@ -1537,8 +1543,6 @@
this.form['id'] = bringData.id
this.standardDrawer = false
this.verifySarStandard = true
this.busVsFunc()
this.modelFunc()
this.$forceUpdate()
}
// 遍历对象初始化文件信息
@@ -1974,23 +1978,29 @@
// this.fileList = fileList.splice(0, 1)
// }
if (response.ok) {
switch (this.fileType){
case 'ZCWBLAWS':
this.ZCWBLAWSFileList = fileList
break;
case 'GCWBLAWS' :
this.GCWBLAWSFileList = fileList
break;
case 'JDWJLAWS':
this.JDWJLAWSFileList = fileList
break;
case 'GLWJLAWS':
this.GLWJLAWSFileList = fileList
break;
default : ;
}
this.$message({
const fileObj = {}
fileObj.id = file.response.data.id
fileObj.name = file.response.data.name
switch (this.fileType){
case 'ZCWBLAWS':
this.ZCWBLAWSFileList = this.ZCWBLAWSFileList.filter ( item => item.response === undefined);
this.ZCWBLAWSFileList.push(fileObj)
break;
case 'GCWBLAWS' :
this.GCWBLAWSFileList = this.GCWBLAWSFileList.filter ( item => item.response === undefined);
this.GCWBLAWSFileList.push(fileObj)
break;
case 'JDWJLAWS':
this.JDWJLAWSFileList = this.JDWJLAWSFileList.filter ( item => item.response === undefined);
this.JDWJLAWSFileList.push(fileObj)
break;
case 'GLWJLAWS':
this.GLWJLAWSFileList = this.GLWJLAWSFileList.filter ( item => item.response === undefined);
this.GLWJLAWSFileList.push(fileObj)
break;
default : ;
}
this.$message({
showClose: true,
message: response.message,
type: 'success'
@@ -2154,6 +2164,7 @@
// }
this.saveLoading = true
this.fileInfoHandle()
let _formData = new FormData()
// _formData.append('id', this.bpnId)
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2181,19 +2192,18 @@
})
},
fileInfoHandle(){
//拼接文件名和id 提交到流程Activity
this.form.ZCWBLAWS=this.ZCWBLAWSFileList.map(item => item.id).join(",")
this.form.ZCWBLAWSName=this.ZCWBLAWSFileList.map(item => item.name).join(",")
//拼接文件名和id 提交到流程Activity
this.form.ZCWBLAWS=this.ZCWBLAWSFileList.map(item => item.response.data.id).join(",")
this.form.ZCWBLAWSName=this.ZCWBLAWSFileList.map(item => item.name).join(",")
this.form.GCWBLAWS=this.GCWBLAWSFileList.map(item => item.id).join(",")
this.form.GCWBLAWSName=this.GCWBLAWSFileList.map(item => item.name).join(",")
this.form.GCWBLAWS=this.GCWBLAWSFileList.map(item => item.response.data.id).join(",")
this.form.GCWBLAWSName=this.GCWBLAWSFileList.map(item => item.name).join(",")
this.form.JDWJLAWS=this.JDWJLAWSFileList.map(item => item.id).join(",")
this.form.JDWJLAWSName=this.JDWJLAWSFileList.map(item => item.name).join(",")
this.form.JDWJLAWS=this.JDWJLAWSFileList.map(item => item.response.data.id).join(",")
this.form.JDWJLAWSName=this.JDWJLAWSFileList.map(item => item.name).join(",")
this.form.GLWJLAWS=this.GLWJLAWSFileList.map(item => item.response.data.id).join(",")
this.form.GLWJLAWSName=this.GLWJLAWSFileList.map(item => item.name).join(",")
this.form.GLWJLAWS=this.GLWJLAWSFileList.map(item => item.id).join(",")
this.form.GLWJLAWSName=this.GLWJLAWSFileList.map(item => item.name).join(",")
},
handleSubmit() {
@@ -2302,10 +2312,7 @@
this.YYRZLAWSOptions = res.data.YYRZLAWS
this.ZRBMLAWSOptions = res.data.ZRBMLAWS
this.ZRGCSLAWSOptions = res.data.ZRGCSLAWS
this.setMap(this.standStateOptions)
})
this.busVsFunc()
this.modelFunc()
}
}
@@ -260,7 +260,7 @@
<div class="prc-content-border">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item v-if="form.standInData === '0'" label="政策文本" prop="ZCWBLAWSName" class="add-form-item form-item-disabled">
<el-form-item label="政策文本" prop="ZCWBLAWSName" class="add-form-item form-item-disabled">
<div v-if="ZCWBLAWSFileMap.length>0" v-for="(value,index) in this.ZCWBLAWSFileMap" :key="index" style="cursor: pointer;color: #00b7ee" @click="downloadFile('ZCWBLAWS',value.id)">
<!-- {{ value.name }} -->
{{value.name}}
@@ -279,7 +279,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="form.standInData === '1'" label="过程文本" prop="GCWBLAWSName" class="add-form-item form-item-disabled">
<el-form-item label="过程文本" prop="GCWBLAWSName" class="add-form-item form-item-disabled">
<div v-if="GCWBLAWSFileMap.length>0" v-for="(value,index) in this.GCWBLAWSFileMap" :key="index" style="cursor: pointer;color: #00b7ee" @click="downloadFile('GCWBLAWS',value.id)">
{{value.name}}
</div>
@@ -1089,7 +1089,7 @@
_this: this
}, res => {
if (res.success) {
if(this.formTongGuo.approvalOpinion === '1'){
if(this.formTongGuo.approvalOpinion === 1){
this.$message.warning("驳回成功")
this.isSubmit = false
// 流程提交之后,应该流转至待办任务页面
@@ -130,14 +130,14 @@
clearable
></el-input>
</el-form-item>
<el-form-item class="add-form-item form-item-disabled" style="margin-left: -210px">
<el-button
type="primary"
:loading="loadSarStandard"
@click="handleSearchStandard">
根据编号名称文本状态查询
</el-button>
</el-form-item>
<!-- <el-form-item class="add-form-item form-item-disabled" style="margin-left: -210px">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- :loading="loadSarStandard"-->
<!-- @click="handleSearchStandard">-->
<!-- 根据编号名称文本状态查询-->
<!-- </el-button>-->
<!-- </el-form-item>-->
<el-form-item v-show="verifySarStandard" label="发文单位" prop="issueCompany" class="add-form-item form-item-disabled">
<el-input
v-model="form.issueCompany"
@@ -266,28 +266,21 @@
v-model="form.ZCWBLAWSName"
clearable
></el-input>
<div v-if="ZCWBLAWSFileList.length>0">
<!-- {{ form.fbgbjbdName }}-->
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="margin-left: 10px"
@click="fileUpload('ZCWBLAWS')">
<i class="el-icon-upload el-icon--right"></i>
查看已上传的文件
</el-button>
</div>
<div v-else>
<el-button
type="primary"
class="common-button-primary"
size="mini"
@click="fileUpload('ZCWBLAWS')">
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
</div>
<div style="display: flex;justify-content: space-between">
<div style="width: 80%;">
<div v-for="(item,index) in ZCWBLAWSFileList" :key="index" @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer" class="fileClass">{{ item.name }}</div>
</div>
<div style="width: 20%;">
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="margin-left: 10px; margin-top: 11px; float: right;"
@click="fileUpload('ZCWBLAWS')">
<i class="el-icon-upload"></i>
</el-button>
</div>
</div>
</el-form-item>
<el-form-item label="解读文件" prop="JDWJLAWSName" class="add-form-item form-item-disabled">
<el-input
@@ -296,28 +289,21 @@
v-model="form.JDWJLAWSName"
clearable
></el-input>
<div v-if="JDWJLAWSFileList.length>0">
<!-- {{ form.caName }}-->
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="margin-left: 10px"
@click="fileUpload('JDWJLAWS')">
<i class="el-icon-upload el-icon--right"></i>
查看已上传的文件
</el-button>
</div>
<div v-else>
<el-button
type="primary"
class="common-button-primary"
size="mini"
@click="fileUpload('JDWJLAWS')">
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
</div>
<div style="display: flex;justify-content: space-between">
<div style="width: 80%;">
<div v-for="(item,index) in JDWJLAWSFileList" :key="index" @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer" class="fileClass">{{ item.name }}</div>
</div>
<div style="width: 20%;">
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="margin-left: 10px; margin-top: 11px; float: right;"
@click="fileUpload('JDWJLAWS')">
<i class="el-icon-upload"></i>
</el-button>
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -328,27 +314,20 @@
v-model="form.GCWBLAWSName"
clearable
></el-input>
<div v-if="GCWBLAWSFileList.length>0">
<!-- {{ form.ssgName }}-->
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="margin-left: 10px"
@click="fileUpload('GCWBLAWS')">
<i class="el-icon-upload el-icon--right"></i>
查看已上传的文件
</el-button>
</div>
<div v-else>
<el-button
type="primary"
class="common-button-primary"
size="mini"
@click="fileUpload('GCWBLAWS')">
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div style="display: flex;justify-content: space-between">
<div style="width: 80%;">
<div v-for="(item,index) in GCWBLAWSFileList" :key="index" @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer" class="fileClass">{{ item.name }}</div>
</div>
<div style="width: 20%;">
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="margin-left: 10px; margin-top: 11px; float: right;"
@click="fileUpload('GCWBLAWS')">
<i class="el-icon-upload"></i>
</el-button>
</div>
</div>
</el-form-item>
</el-col>
@@ -505,27 +484,20 @@
v-model="form.GLWJLAWSName"
clearable
></el-input>
<div v-if="GLWJLAWSFileList.length>0">
<el-button
type="primary"
class="common-button-primary"
size="mini"
@click="fileUpload('GLWJLAWS')">
<i class="el-icon-upload el-icon--right"></i>
查看已上传文件
</el-button>
<!-- {{ form.glwjName }}-->
</div>
<div v-else>
<el-button
type="primary"
class="common-button-primary"
size="mini"
@click="fileUpload('GLWJLAWS')">
<i class="el-icon-upload el-icon--right"></i>
点击上传
</el-button>
<div style="display: flex;justify-content: space-between">
<div style="width: 80%;">
<div v-for="(item,index) in GCWBLAWSFileList" :key="index" @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer" class="fileClass">{{ item.name }}</div>
</div>
<div style="width: 20%;">
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="margin-left: 10px; margin-top: 11px; float: right;"
@click="fileUpload('GLWJLAWS')">
<i class="el-icon-upload"></i>
</el-button>
</div>
</div>
</el-form-item>
</el-col>
@@ -635,6 +607,7 @@
accept=".pdf, .PDF, .ppt, .PPT, .pptx,.PPTX, .doc, .DOC, .docx, .DOCX, .xls, .xlsx"
:before-upload="beginImportFile"
:on-success="importFileSuccess"
:on-preview="handleFilePreview"
:on-remove="removeOneFile"
:show-file-list="true"
>
@@ -1445,8 +1418,24 @@
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = item.id
this.form['lawsSyqy'] = this.filterObj(this.form['lawsSyqy'])
this.form['lawsSycx'] = this.filterObj(this.form['lawsSycx'])
this.form['lawsLabel'] = this.filterObj(this.form['lawsLabel'])
this.form['YYRZLAWS'] = this.filterObj(this.form['YYRZLAWS'])
this.form['NYLXLAWS'] = this.filterObj(this.form['NYLXLAWS'])
this.form['TGRLAWS'] = this.filterObj(this.form['TGRLAWS'])
})
},
filterObj(obj){
if(obj && obj !== ''){
if(obj instanceof Array){
return obj;
}else {
return obj.split(",")
}
}
return "";
},
getData() {
if(this.taskIds && this.pId){
return new Promise((resolve, reject) => {
@@ -1475,6 +1464,17 @@
})
}
},
assemble(ids,names){
let list= new Array();
if(ids && ids !== '' && names && names !== ''){
let idArray=ids.split(',');
let nameArray=names.split(',');
for(let i=0; i<idArray.length; i++){
list.push({id:idArray[i],name:nameArray[i]});
}
}
return list;
},
processTable () {
this.$nextTick(() => {
Promise.all([this.getTaskId()]).then((value) => {
@@ -1482,6 +1482,12 @@
let mes = JSON.parse(value[0].mes)
mes.form.date = new Date(this.$moment(mes.form.date).format('YYYY-MM-DD'))
this.form = mes.form
this.form['lawsSyqy'] = this.filterObj(this.form['lawsSyqy'])
this.form['lawsSycx'] = this.filterObj(this.form['lawsSycx'])
this.form['lawsLabel'] = this.filterObj(this.form['lawsLabel'])
this.form['YYRZLAWS'] = this.filterObj(this.form['YYRZLAWS'])
this.form['NYLXLAWS'] = this.filterObj(this.form['NYLXLAWS'])
this.form['TGRLAWS'] = this.filterObj(this.form['TGRLAWS'])
this.taskIds = mes.taskIds;
this.pId = mes.pId;
this.userId = mes.userId;
@@ -2102,19 +2108,25 @@
// this.fileList = fileList.splice(0, 1)
// }
if (response.ok) {
const fileObj = {}
fileObj.id = file.response.data.id
fileObj.name = file.response.data.name
switch (this.fileType){
case 'ZCWBLAWS':
this.ZCWBLAWSFileList = fileList
this.ZCWBLAWSFileList = this.ZCWBLAWSFileList.filter ( item => item.response === undefined);
this.ZCWBLAWSFileList.push(fileObj)
break;
case 'GCWBLAWS' :
this.GCWBLAWSFileList = fileList
this.GCWBLAWSFileList = this.GCWBLAWSFileList.filter ( item => item.response === undefined);
this.GCWBLAWSFileList.push(fileObj)
break;
case 'JDWJLAWS':
this.JDWJLAWSFileList = fileList
this.JDWJLAWSFileList = this.JDWJLAWSFileList.filter ( item => item.response === undefined);
this.JDWJLAWSFileList.push(fileObj)
break;
case 'GLWJLAWS':
this.GLWJLAWSFileList = fileList
this.GLWJLAWSFileList = this.GLWJLAWSFileList.filter ( item => item.response === undefined);
this.GLWJLAWSFileList.push(fileObj)
break;
default : ;
}
@@ -2125,6 +2137,25 @@
})
}
},
// 文件预览及下载
handleFilePreview(file) {
let attId = ""
if(file && file.id){
attId = file.id
}else {
attId = file.response.data.id
}
if (this.preview) {
if (attId) {
window.location.href = '/api/att/attFile/downloadFileForSarNew?fileId=' + attId
} else {
this.$message.warning('文件不存在,下载失败')
}
} else {
this.$preview(attId)
}
},
fileUpload (type) {
this.fileType = '';
// this.fileMadel = true;//此句应在最后执行,否则会有先显示没变换的的文件列表,在显示变换了的文件列表
@@ -2254,6 +2285,8 @@
// }
this.saveLoading = true
this.isSubmit = true
this.fileInfoHandle()
let _formData = new FormData()
// _formData.append('id', this.bpnId)
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2278,27 +2311,29 @@
commentText: this.commentText
}))
saveTaskFirst(_formData).then(res => {
this.isSubmit = false
this.saveLoading = false
this.$message.success('保存成功')
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// this.bpnId = res.result
}).catch(e => {
this.isSubmit = false
this.saveLoading = false
})
})
},
fileInfoHandle(){
//拼接文件名和id 提交到流程Activity
this.form.ZCWBLAWS=this.ZCWBLAWSFileList.map(item => item.response.data.id).join(",")
this.form.ZCWBLAWS=this.ZCWBLAWSFileList.map(item => item.id).join(",")
this.form.ZCWBLAWSName=this.ZCWBLAWSFileList.map(item => item.name).join(",")
this.form.GCWBLAWS=this.GCWBLAWSFileList.map(item => item.response.data.id).join(",")
this.form.GCWBLAWS=this.GCWBLAWSFileList.map(item => item.id).join(",")
this.form.GCWBLAWSName=this.GCWBLAWSFileList.map(item => item.name).join(",")
this.form.JDWJLAWS=this.JDWJLAWSFileList.map(item => item.response.data.id).join(",")
this.form.JDWJLAWS=this.JDWJLAWSFileList.map(item => item.id).join(",")
this.form.JDWJLAWSName=this.JDWJLAWSFileList.map(item => item.name).join(",")
this.form.GLWJLAWS=this.GLWJLAWSFileList.map(item => item.response.data.id).join(",")
this.form.GLWJLAWS=this.GLWJLAWSFileList.map(item => item.id).join(",")
this.form.GLWJLAWSName=this.GLWJLAWSFileList.map(item => item.name).join(",")
},
@@ -2308,6 +2343,7 @@
if (valid) {
this.fileInfoHandle()
this.isSubmit = true
this.saveLoading = true
this.form.country=this.countryArr;
var json = Object.assign(this.form, this.roleForm)
json.zrUserId = this.form.zrUserId
@@ -2327,6 +2363,7 @@
if (res.success) {
this.$message.success(res.message)
this.isSubmit = false
this.saveLoading = false
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}
@@ -2398,10 +2435,7 @@
this.YYRZLAWSOptions = res.data.YYRZLAWS
this.ZRBMLAWSOptions = res.data.ZRBMLAWS
this.ZRGCSLAWSOptions = res.data.ZRGCSLAWS
this.setMap(this.standStateOptions)
})
this.busVsFunc()
this.modelFunc()
}
}