-
@@ -392,7 +392,7 @@
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
- import { saveTaskFirst } from "api/process";
+ import { saveTaskFirst,taskDel,queryTaskFirst } from "api/process";
export default {
name: "zcchStep1",
@@ -652,6 +652,24 @@
})
this.data2[this.fileIndex].dataName = list
},
+ // 文件预览及下载
+ 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() {
this.fileMadel = true
},
@@ -748,8 +766,17 @@
this.$refs['Form'].validate((valid) => {
if (valid) {
this.isSubmit = true
- this.$http.get('lawss/activiti/startProcess', {
- type: '18'
+ this.$http.post('lawss/activiti/startProcessRollBack', {
+ createUser: this.$store.getters.userInfo.userId,
+ createUserName: this.$store.getters.userInfo.userName,
+ type: '18',
+ json: JSON.stringify({
+ form: this.rhform,
+ roleForm: this.roleForm,
+ commentText: this.commentText,
+ data1: this.data1,
+ data2: this.data2,
+ })
}, {}, res => {
if (res.ok) {
var json = Object.assign(this.rhform, this.roleForm)
@@ -763,6 +790,14 @@
}, {}, res => {
if (res.success) {
this.$message.success('流程发起成功')
+ if (this.$route.query.bpnId !== '') {
+ let taskId = {
+ id: this.$route.query.bpnId
+ }
+ taskDel(taskId).then(res=>{
+ return res
+ })
+ }
this.$router.push('/processCenter')
this.isSubmit = false
} else {
@@ -822,8 +857,24 @@
this.roleForm.presidentIdName = data[0].name
}
}, // 选择人员确认事件
+ getTaskId() {
+ queryTaskFirst({
+ bpnId: this.$route.query.bpnId
+ }).then(res => {
+ let mes = JSON.parse(res.mes)
+ this.rhform = JSON.parse(JSON.stringify(mes.form))
+ this.data1 = mes.data1
+ this.data2 = mes.data2
+ this.roleForm = mes.roleForm
+ this.commentText = mes.commentText
+ })
+ },
},
- mounted() {}
+ mounted() {
+ if(this.$route.query.bpnId){
+ this.getTaskId()
+ }
+ }
};