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 ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter"; import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle"; import ProcessTitle from "../../components/ProcessTitle";
import { queryTaskFirst, saveTaskFirst } from "api/process"; import { queryTaskFirst, saveTaskFirst, taskDel } from "api/process";
export default { export default {
name: "zczqyjStep1", name: "zczqyjStep1",
@@ -620,13 +620,15 @@ export default {
handleSave() { handleSave() {
this.saveLoading = true; this.saveLoading = true;
let _formData = new FormData(); let _formData = new FormData();
this.form.commentText = this.commentText let json = this.form
this.form.filesId = this.addFjList json.commentText = this.commentText
json.filesId = this.addFjList
json.filesName = this.form.fjListName
_formData.append("createUser", this.$store.getters.userInfo.userId); _formData.append("createUser", this.$store.getters.userInfo.userId);
_formData.append("createUserName", this.$store.getters.userInfo.userName); _formData.append("createUserName", this.$store.getters.userInfo.userName);
_formData.append("prcType", "12"); _formData.append("prcType", "laws2");
_formData.append("json", JSON.stringify({ _formData.append("json", JSON.stringify({
form: this.form, form: json,
roleForm: this.roleForm, roleForm: this.roleForm,
commentText: this.commentText commentText: this.commentText
})); }));
@@ -643,29 +645,40 @@ export default {
if (valid) { if (valid) {
this.$refs['Form'].validate((valid) => { this.$refs['Form'].validate((valid) => {
if (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.isSubmit = true
this.$http.get('lawss/activiti/startProcess', { this.$http.post('lawss/activiti/startProcessRollBack', {
type: 'laws2' 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 => { }, {_this: this}, res => {
if (res.ok) { 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', { this.$http.post('lawss/activiti/completeTask', {
json: JSON.stringify(json), json: JSON.stringify(json),
taskId: res.data, taskId: res.data,
userId: this.$store.getters.userInfo.userId userId: this.$store.getters.userInfo.userId
}, {_this: this}, res => { }, {_this: this}, res => {
if (res.success) { if (res.success) {
this.$message.success('流程发起成功') this.$message.success(res.message);
this.$router.push('/processCenter') if (this.bpnId !== '') {
this.isSubmit = false let taskId = {
} else { id: this.bpnId
this.$message.warning('流程启动失败') }
this.isSubmit = false taskDel(taskId).then(res=>{
return res
})
}
this.$router.push("/processCenter");
} }
this.isSubmit = false;
}) })
} else { } else {
this.$message.warning('流程启动失败') this.$message.warning('流程启动失败')
@@ -124,6 +124,7 @@
</div> </div>
<ProcessFooter <ProcessFooter
show-submit show-submit
show-save
:submitLoading="isSubmit" :submitLoading="isSubmit"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@save="handleSave" @save="handleSave"
@@ -279,12 +280,18 @@ export default {
//保存事件 //保存事件
handleSave() { handleSave() {
this.saveLoading = true; 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(); let _formData = new FormData();
_formData.append("id", this.bpnId || ""); _formData.append("id", this.bpnId || "");
_formData.append("prcType", "3"); _formData.append("prcType", "laws2");
_formData.append("taskIds", this.taskIds); _formData.append("taskIds", this.taskIds);
_formData.append("json", JSON.stringify({ _formData.append("json", JSON.stringify({
form: this.form, form: json,
dataList: this.dataList,
commentText: this.commentText commentText: this.commentText
})); }));
saveTaskForPub(_formData).then(res => { saveTaskForPub(_formData).then(res => {
@@ -329,14 +336,17 @@ export default {
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
console.log('335',data) console.log(data);
this.form.lawsNumber = data.lawsNumber this.form.lawsNumber = data.form ? data.form.lawsNumber : data.lawsNumber
this.form.lawsName = data.lawsName this.form.responUserAndInstitutionNameMap = data.form ? data.form.responUserAndInstitutionNameMap : ''
this.form.endTime = data.endTime this.form.lawsName = data.form ? data.form.lawsName : data.lawsName
this.form.cname = data.cname this.form.responUserList = data.form ? data.form.responUserList: ''
this.form.fjList = data.fjList this.form.responUserListName = data.form ? data.form.responUserListName : ''
this.form.fjListId = data.fjListId this.form.endTime = data.form ? data.form.endTime : data.endTime
this.json = data 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 => { }).catch(e => {
}); });
}); });
@@ -384,26 +384,7 @@ export default {
handleTabs(name) { handleTabs(name) {
this.active = 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() { handleAccept() {
this.isSubmit = true this.isSubmit = true
execTask({ execTask({
@@ -416,6 +397,29 @@ export default {
this.isSubmit = false 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() { handleSubmit() {
if (this.data.length < 1) { if (this.data.length < 1) {
this.$message.warning('请输入征求意见') this.$message.warning('请输入征求意见')
@@ -505,8 +509,11 @@ export default {
* @description: 动态表单读取 * @description: 动态表单读取
*/ */
getFormFieldList(item) { getFormFieldList(item) {
console.log(item);
this.$nextTick(() => { 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 break
case '12': case 'laws2':
this.$router.push({ this.$router.push({
name: 'zczqyjStep1', name: 'zczqyjStep1',
query: { query: {
type: '12', type: 'laws2',
processName: '政策征求意见流程', processName: '政策征求意见流程',
bpnId: id bpnId: id
} }