信息体组件增加配置项,当值为空时,初始值是否反向更新回去,默认为否,由后端赋值,否则会由于表单数据后加载和双向绑定导致重新赋值
样式调整,去掉列表行按钮间隔竖线 列表也拷贝数据发起流程或无流程数据发起流程的代码生成 增加从localstorage里加载数据发起流程的方法 流程配置中自动填充组件字段可配置必填和编辑
This commit is contained in:
@ -78,11 +78,13 @@
|
||||
const currentRoute = router.currentRoute.value;
|
||||
const rParams = currentRoute.params;
|
||||
const fullPath = currentRoute.fullPath;
|
||||
const rQuery = currentRoute.query;
|
||||
const rSchemaId = rParams.arg1;
|
||||
const rDraftsId = rParams.arg2;
|
||||
const taskId = ref();
|
||||
const loading = ref(false);
|
||||
const draftsJsonStr = localStorage.getItem('draftsJsonStr');
|
||||
const formJsonStr = localStorage.getItem('formJsonStr');
|
||||
let formInformation = ref();
|
||||
const opinionDlg = ref();
|
||||
let pageMode = 'new';
|
||||
@ -111,6 +113,9 @@
|
||||
localStorage.removeItem('draftsJsonStr');
|
||||
pageMode = 'draft';
|
||||
}
|
||||
if (formJsonStr) {
|
||||
localStorage.removeItem('formJsonStr');
|
||||
}
|
||||
|
||||
function closeFlowChart() {
|
||||
showFlowChart.value = false;
|
||||
@ -145,6 +150,7 @@
|
||||
// 这里的顺序不能变 表单不渲染的时候 设置表单初值没用
|
||||
await nextTick();
|
||||
await initDraftsFormData();
|
||||
await initFromFormData();
|
||||
});
|
||||
|
||||
async function initDraftsFormData() {
|
||||
@ -162,6 +168,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function initFromFormData() {
|
||||
if (formJsonStr) {
|
||||
let formDataJson = JSON.parse(formJsonStr);
|
||||
let formData = [];
|
||||
if(rQuery.fromKey&&formDataJson[rQuery.fromKey]){
|
||||
formData.push(formDataJson[rQuery.fromKey]);
|
||||
}
|
||||
await formInformation.value.setFormData(formData);
|
||||
}
|
||||
}
|
||||
|
||||
async function saveDraft() {
|
||||
try {
|
||||
disableSubmit.value = true;
|
||||
@ -323,8 +340,8 @@
|
||||
selectIds: []
|
||||
};
|
||||
});
|
||||
const strictDesign=false;
|
||||
if (strictDesign&&taskList.length > 0) {
|
||||
const strictDesign = false;
|
||||
if (strictDesign && taskList.length > 0) {
|
||||
notificationError('提交失败', '流程设计错误,开始后的第一个节点必须是审批人为发起人的起草节点。');
|
||||
data.submitLoading = false;
|
||||
loading.value = false;
|
||||
|
||||
@ -22,7 +22,7 @@ export const disableTypes = [
|
||||
titleType,
|
||||
dividerType,
|
||||
infoType,
|
||||
autoCodeType,
|
||||
//autoCodeType,
|
||||
'qrcode', //二维码组件
|
||||
]; //表单字段仅仅只有查看权限
|
||||
// 开关,滑块,颜色选择,评分,图片 组件权限中,必填权限为disable
|
||||
@ -31,7 +31,7 @@ export const requiredDisabled = [
|
||||
titleType,
|
||||
dividerType,
|
||||
infoType,
|
||||
autoCodeType,
|
||||
//autoCodeType,
|
||||
buttonType,
|
||||
'switch',
|
||||
'slider',
|
||||
|
||||
Reference in New Issue
Block a user