Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
super_liu
2022-03-31 17:37:10 +08:00
4 changed files with 81 additions and 51 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", "laws2");
_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 => {
});
});
@@ -384,26 +384,7 @@ export default {
handleTabs(name) {
this.active = name
},
handleSave() {
this.saveLoading = true;
let _formData = new FormData();
let json = this.form
json.data = this.data
_formData.append("id", this.bpnId || "");
_formData.append("prcType", "3");
_formData.append("taskIds", this.taskIds);
_formData.append("json", JSON.stringify({
form: json,
commentText: this.commentText
}));
saveTaskForPub(_formData).then(res => {
this.saveLoading = false;
this.$message.success("保存成功");
this.bpnId = res.result;
}).catch(e => {
this.saveLoading = false;
});
},
handleAccept() {
this.isSubmit = true
execTask({
@@ -416,6 +397,29 @@ export default {
this.isSubmit = false
})
},
handleSave() {
this.saveLoading = true;
let json = this.json
json.commentText = this.commentText
json.info = this.data
json.form = this.form
let _formData = new FormData();
_formData.append("id", this.bpnId || "");
_formData.append("prcType", "laws2");
_formData.append("taskIds", this.taskIds);
_formData.append("json", JSON.stringify({
form: json,
dataList: this.data,
commentText: this.commentText
}));
saveTaskForPub(_formData).then(res => {
this.saveLoading = false;
this.$message.success("保存成功");
this.bpnId = res.result;
}).catch(e => {
this.saveLoading = false;
});
},
handleSubmit() {
if (this.data.length < 1) {
this.$message.warning('请输入征求意见')
@@ -505,8 +509,11 @@ export default {
* @description: 动态表单读取
*/
getFormFieldList(item) {
console.log(item);
this.$nextTick(() => {
this.form = JSON.parse(JSON.stringify(item));
this.form = item.form ? JSON.parse(JSON.stringify(item.form.form)) : JSON.parse(JSON.stringify(item));
this.data = item.form ? item.dataList : []
this.commentText = item.form ? item.commentText : ''
});
},
},
@@ -724,11 +724,11 @@ export default {
}
})
break
case '12':
case 'laws2':
this.$router.push({
name: 'zczqyjStep1',
query: {
type: '12',
type: 'laws2',
processName: '政策征求意见流程',
bpnId: id
}