Commit 4d4ff769 authored by 曾沂轮's avatar 曾沂轮

Merge branch 'feature-StyleRenderForm' into 'master'

Style: 新建表单工作时,渲染参数接口调整

See merge request !3
parents 5aa1386c 96b1b66f
...@@ -23,11 +23,12 @@ const Api = { ...@@ -23,11 +23,12 @@ const Api = {
* @param {*} linkId * @param {*} linkId
* @param {*} linkKey * @param {*} linkKey
*/ */
getBusinessStartForm(businessDefinitionId) { getBusinessStartForm(businessDefinitionId, taskId) {
return config.doGetPromise( return config.doGetPromise(
baseUrl + '/v1.1.0/workflow/workflowForm/getBusinessStartForm', baseUrl + '/v1.1.0/workflow/workflowForm/getBusinessStartForm',
{ {
businessDefinitionId businessDefinitionId,
taskId
} }
); );
}, },
......
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
this.currentLink.masterMen.forEach(user => { this.currentLink.masterMen.forEach(user => {
this.$set(user, 'checked', true); this.$set(user, 'checked', true);
// 如果提交所有人,禁止状态,不能改变选中 // 如果提交所有人,禁止状态,不能改变选中
if (val.completingToAll) this.$set(user, 'disabled', true) ; if (val.completingToAll) this.$set(user, 'disabled', true);
this.mainCheckedKeys.push(user.organInfo.rid); this.mainCheckedKeys.push(user.organInfo.rid);
}); });
this.currentLink.normalMen.forEach(user => { this.currentLink.normalMen.forEach(user => {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
ref="submitTask" ref="submitTask"
:nextLinks="submitData.subTask" :nextLinks="submitData.subTask"
:nextLinkUsers="submitData.userInfos" :nextLinkUsers="submitData.userInfos"
@closed="submitTaskDialogVisible = false" @closed="handleSubmitTaskClose"
@save="handleSubmitTaskSave" @save="handleSubmitTaskSave"
></submit-task> ></submit-task>
<!-- 转办 --> <!-- 转办 -->
...@@ -125,7 +125,8 @@ export default { ...@@ -125,7 +125,8 @@ export default {
submitTaskDialogVisible: false, // 提交dialog submitTaskDialogVisible: false, // 提交dialog
submitData: {}, submitData: {},
transformDialogVisible: false, // 转办dialog transformDialogVisible: false, // 转办dialog
returnTaskVisible: false // 退回dialog returnTaskVisible: false, // 退回dialog
createTaskId: '' // 新建工作后保存时的taskId
}; };
}, },
...@@ -145,8 +146,8 @@ export default { ...@@ -145,8 +146,8 @@ export default {
}, },
// 刷新 // 刷新
refresh() { refresh(taskId) {
this.fetch(); this.fetch(taskId);
}, },
handleResultHtml(data, key) { handleResultHtml(data, key) {
...@@ -158,10 +159,12 @@ export default { ...@@ -158,10 +159,12 @@ export default {
return {}; return {};
} }
}, },
/**
fetch() { * 新建工作时,保存的时候后端返回tId
*/
fetch(tId) {
let taskId = getTaskId() || this.childrenData.taskId; let taskId = getTaskId() || this.childrenData.taskId;
const linkId = getLinkId() || this.childrenData.linkId; const linkId = tId ? tId : getLinkId() || this.childrenData.linkId;
const linkKey = getLinkKey() || this.childrenData.linkKey; const linkKey = getLinkKey() || this.childrenData.linkKey;
// console.log(taskId, linkId, linkKey) // console.log(taskId, linkId, linkKey)
let apiFn = 'renderFormByTaskId'; let apiFn = 'renderFormByTaskId';
...@@ -177,9 +180,7 @@ export default { ...@@ -177,9 +180,7 @@ export default {
taskId = getFinishForm(); taskId = getFinishForm();
apiFn = 'renderFinishForm'; apiFn = 'renderFinishForm';
} }
this.isLoading = true; this.isLoading = true;
Api[apiFn](taskId, linkId, linkKey) Api[apiFn](taskId, linkId, linkKey)
.then(res => { .then(res => {
this.isLoading = false; this.isLoading = false;
...@@ -420,7 +421,9 @@ export default { ...@@ -420,7 +421,9 @@ export default {
// console.log(res) // console.log(res)
if (res.status === 0) { if (res.status === 0) {
notification('success', '保存成功!'); notification('success', '保存成功!');
this.refresh(); if (!res.data.taskId) return false;
this.createTaskId = res.data.taskId;
this.refresh(res.data.taskId);
} else { } else {
notification('warning', res.message || '保存失败,请重试!'); notification('warning', res.message || '保存失败,请重试!');
} }
...@@ -777,6 +780,12 @@ export default { ...@@ -777,6 +780,12 @@ export default {
/* eslint-disable no-eval */ /* eslint-disable no-eval */
eval(item.operation); eval(item.operation);
} }
},
// 关闭提交后的对话框事件
handleSubmitTaskClose() {
this.submitTaskDialogVisible = false;
this.refresh(this.createTaskId);
} }
} }
}; };
......
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
const packageConfig = require('../../../package.json'); const packageConfig = require('./../../package.json');
Vue.use(Vuex); Vue.use(Vuex);
......
...@@ -127,12 +127,6 @@ export default { ...@@ -127,12 +127,6 @@ export default {
} }
}, },
navigationList(newVal) {
if (newVal.length > 0) {
}
},
currentTab() { currentTab() {
const len = this.tabsData.length; const len = this.tabsData.length;
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
......
...@@ -137,7 +137,6 @@ export default { ...@@ -137,7 +137,6 @@ export default {
}); });
this.passSubmiting = false; this.passSubmiting = false;
}, 3000); }, 3000);
} else { } else {
this.$message({ this.$message({
type: 'warning', type: 'warning',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment