52297 政策征求意见流程:对接人任务分发节点,缺少保存按钮

This commit is contained in:
宋伟佳
2022-03-31 17:19:45 +08:00
parent 8bb44b8e5a
commit 8fa40add27
3 changed files with 53 additions and 30 deletions
@@ -328,7 +328,7 @@
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import { queryTaskFirst, saveTaskFirst } from "api/process";
import { queryTaskFirst, saveTaskFirst, taskDel } from "api/process";
export default {
name: "zczqyjStep1",
@@ -620,13 +620,15 @@ export default {
handleSave() {
this.saveLoading = true;
let _formData = new FormData();
this.form.commentText = this.commentText
this.form.filesId = this.addFjList
let json = this.form
json.commentText = this.commentText
json.filesId = this.addFjList
json.filesName = this.form.fjListName
_formData.append("createUser", this.$store.getters.userInfo.userId);
_formData.append("createUserName", this.$store.getters.userInfo.userName);
_formData.append("prcType", "12");
_formData.append("prcType", "laws2");
_formData.append("json", JSON.stringify({
form: this.form,
form: json,
roleForm: this.roleForm,
commentText: this.commentText
}));
@@ -643,29 +645,40 @@ export default {
if (valid) {
this.$refs['Form'].validate((valid) => {
if (valid) {
var json = Object.assign(this.form, this.roleForm)
json.commentText = this.commentText
json.filesId = this.addFjList
json.filesName = this.form.fjListName
this.isSubmit = true
this.$http.get('lawss/activiti/startProcess', {
type: 'laws2'
this.$http.post('lawss/activiti/startProcessRollBack', {
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: 'laws2',
json: JSON.stringify({
form: json,
roleForm: this.roleForm,
commentText: this.commentText
})
}, {_this: this}, res => {
if (res.ok) {
var json = Object.assign(this.form, this.roleForm)
console.log('644',json)
json.commentText = this.commentText
json.filesId = this.addFjList
json.filesName = this.form.fjListName
this.$http.post('lawss/activiti/completeTask', {
json: JSON.stringify(json),
taskId: res.data,
userId: this.$store.getters.userInfo.userId
}, {_this: this}, res => {
if (res.success) {
this.$message.success('流程发起成功')
this.$router.push('/processCenter')
this.isSubmit = false
} else {
this.$message.warning('流程启动失败')
this.isSubmit = false
this.$message.success(res.message);
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
}
taskDel(taskId).then(res=>{
return res
})
}
this.$router.push("/processCenter");
}
this.isSubmit = false;
})
} else {
this.$message.warning('流程启动失败')
@@ -124,6 +124,7 @@
</div>
<ProcessFooter
show-submit
show-save
:submitLoading="isSubmit"
:saveLoading="saveLoading"
@save="handleSave"
@@ -279,12 +280,18 @@ export default {
//保存事件
handleSave() {
this.saveLoading = true;
let json = this.json;
json.commentText = this.commentText;
json.responUserList = this.form.responUserList;
json.responUserListName = this.form.responUserListName;
json.responUserAndInstitutionNameMap = this.form.responUserAndInstitutionNameMap;
let _formData = new FormData();
_formData.append("id", this.bpnId || "");
_formData.append("prcType", "3");
_formData.append("prcType", "12");
_formData.append("taskIds", this.taskIds);
_formData.append("json", JSON.stringify({
form: this.form,
form: json,
dataList: this.dataList,
commentText: this.commentText
}));
saveTaskForPub(_formData).then(res => {
@@ -329,14 +336,17 @@ export default {
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
console.log('335',data)
this.form.lawsNumber = data.lawsNumber
this.form.lawsName = data.lawsName
this.form.endTime = data.endTime
this.form.cname = data.cname
this.form.fjList = data.fjList
this.form.fjListId = data.fjListId
this.json = data
console.log(data);
this.form.lawsNumber = data.form ? data.form.lawsNumber : data.lawsNumber
this.form.responUserAndInstitutionNameMap = data.form ? data.form.responUserAndInstitutionNameMap : ''
this.form.lawsName = data.form ? data.form.lawsName : data.lawsName
this.form.responUserList = data.form ? data.form.responUserList: ''
this.form.responUserListName = data.form ? data.form.responUserListName : ''
this.form.endTime = data.form ? data.form.endTime : data.endTime
this.form.cname = data.form ? data.form.cname : data.cname
this.form.fjList = data.form ? data.form.fjList : data.fjList
this.form.fjListId = data.form ? data.form.fjListId : data.fjListId
this.json = data.form ? data.form : data
}).catch(e => {
});
});
@@ -724,11 +724,11 @@ export default {
}
})
break
case '12':
case 'laws2':
this.$router.push({
name: 'zczqyjStep1',
query: {
type: '12',
type: 'laws2',
processName: '政策征求意见流程',
bpnId: id
}