|
|
|
@ -160,7 +160,7 @@ const model = ref<any>({}) |
|
|
|
|
|
|
|
//监听是否为流程表单 |
|
|
|
watch(()=>props.isWorkFlow,(val:number)=>{ |
|
|
|
console.log("监听是否为流程表单----->",val,formProps) |
|
|
|
// console.log("监听是否为流程表单----->",val,formProps) |
|
|
|
if(val == 1){ |
|
|
|
getFlowInitSwps() |
|
|
|
} |
|
|
|
@ -174,7 +174,7 @@ watch(()=>props.isWorkFlow,(val:number)=>{ |
|
|
|
const getFlowInitSwps = () => { |
|
|
|
gainRunFlowStart({id:props.flowkey}) |
|
|
|
.then(({data})=>{ |
|
|
|
console.log("获取流程",data) |
|
|
|
// console.log("获取流程",data) |
|
|
|
flowMap.value = data.flowList |
|
|
|
nextStep.value = data.nextStep |
|
|
|
currentProgress.value = data.Step |
|
|
|
@ -364,7 +364,7 @@ watch(() => props.options,(val:any) => { |
|
|
|
*/ |
|
|
|
provide(constFormBtnEvent, (obj: any) => { |
|
|
|
emits('btnClick', obj.key) |
|
|
|
console.log("按钮组件事件-----2-------->",obj.key) |
|
|
|
// console.log("按钮组件事件-----2-------->",obj.key) |
|
|
|
if ([3, 4, 5].includes(props.type)) { |
|
|
|
return ElMessage.error('当前模式不能提交表单') |
|
|
|
} |
|
|
|
@ -407,7 +407,7 @@ provide(constFormBtnEvent, (obj: any) => { |
|
|
|
*/ |
|
|
|
const appAfreshSubmit = (params = {}) => { |
|
|
|
let addUrl = props.formData.config?.addUrl || props.addUrl |
|
|
|
console.log("自定义App提交表单", props.addUrl) |
|
|
|
// console.log("自定义App提交表单", props.addUrl) |
|
|
|
if (props.isSearch || !addUrl || loading.value) { |
|
|
|
if (!props.isSearch && !addUrl) { |
|
|
|
console.error( |
|
|
|
@ -441,11 +441,11 @@ const appAfreshSubmit = (params = {}) => { |
|
|
|
formatParams.status=1 |
|
|
|
formatParams.flowList=json2string(flowMap.value) |
|
|
|
|
|
|
|
console.log("submitParams--111->",submitParams ) |
|
|
|
console.log("formatParams--111->",formatParams) |
|
|
|
// console.log("submitParams--111->",submitParams ) |
|
|
|
// console.log("formatParams--111->",formatParams) |
|
|
|
afreshAppSubmit(submitParams??formatParams) |
|
|
|
.then((data:any)=>{ |
|
|
|
console.log("app重新提交表单--112221->",data) |
|
|
|
// console.log("app重新提交表单--112221->",data) |
|
|
|
emits("closePage") |
|
|
|
}) |
|
|
|
} |
|
|
|
@ -458,7 +458,7 @@ const appAfreshSubmit = (params = {}) => { |
|
|
|
*/ |
|
|
|
const saveDraftAgainSend = (params = {}) => { |
|
|
|
let addUrl = props.formData.config?.addUrl || props.addUrl |
|
|
|
console.log("自定义App提交表单", props.addUrl) |
|
|
|
// console.log("自定义App提交表单", props.addUrl) |
|
|
|
if (props.isSearch || !addUrl || loading.value) { |
|
|
|
if (!props.isSearch && !addUrl) { |
|
|
|
console.error( |
|
|
|
@ -492,11 +492,11 @@ const saveDraftAgainSend = (params = {}) => { |
|
|
|
formatParams.status=1 |
|
|
|
|
|
|
|
|
|
|
|
console.log("submitParams--111221->",submitParams ) |
|
|
|
console.log("formatParams--1112222->",formatParams) |
|
|
|
// console.log("submitParams--111221->",submitParams ) |
|
|
|
// console.log("formatParams--1112222->",formatParams) |
|
|
|
saveDraftAgain(submitParams??formatParams) |
|
|
|
.then((data:any)=>{ |
|
|
|
console.log("提交草稿数据--112221->",data) |
|
|
|
// console.log("提交草稿数据--112221->",data) |
|
|
|
emits("closePage") |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
@ -511,7 +511,7 @@ const saveDraftAgainSend = (params = {}) => { |
|
|
|
*/ |
|
|
|
const saveDraft = (params = {}) => { |
|
|
|
let addUrl = props.formData.config?.addUrl || props.addUrl |
|
|
|
console.log("自定义App提交表单", props.addUrl) |
|
|
|
// console.log("自定义App提交表单", props.addUrl) |
|
|
|
if (props.isSearch || !addUrl || loading.value) { |
|
|
|
if (!props.isSearch && !addUrl) { |
|
|
|
console.error( |
|
|
|
@ -547,7 +547,7 @@ const saveDraft = (params = {}) => { |
|
|
|
|
|
|
|
createAppTask(submitParams ?? formatParams) |
|
|
|
.then((data:any) => { |
|
|
|
console.log("formatParams--111->",data) |
|
|
|
// console.log("formatParams--111->",data) |
|
|
|
|
|
|
|
if(props.isWorkFlow == 1){ |
|
|
|
nextTick(() => { |
|
|
|
@ -558,7 +558,7 @@ const saveDraft = (params = {}) => { |
|
|
|
} |
|
|
|
startRunFlow(sendInfo) |
|
|
|
.then((data:any)=>{ |
|
|
|
console.log("流程提交成功--------1---------->",data) |
|
|
|
// console.log("流程提交成功--------1---------->",data) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
@ -587,7 +587,7 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any) |
|
|
|
}else{ |
|
|
|
fieldVal[i] = typeof model.value[i]=="number"?model.value[i].toString():model.value[i]; |
|
|
|
} |
|
|
|
console.log("监听表单--constControlChange----------1--------->",i,model.value[i]) |
|
|
|
// console.log("监听表单--constControlChange----------1--------->",i,model.value[i]) |
|
|
|
} |
|
|
|
//判断是否进行计算 |
|
|
|
if(type == "digitpage"){ |
|
|
|
@ -599,7 +599,7 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any) |
|
|
|
"mathsFornula":props.formData.config, |
|
|
|
"keyVal":fieldVal |
|
|
|
} |
|
|
|
console.log("sendInfoe-1->",sendInfo) |
|
|
|
// console.log("sendInfoe-1->",sendInfo) |
|
|
|
currencyFormApiSubmit("/systemapi/maths/mathematicalCalculations",sendInfo) |
|
|
|
.then((data:any)=>{ |
|
|
|
// console.log("结果-->",data) |
|
|
|
@ -685,7 +685,7 @@ const setValue = (obj: { [key: string]: any }, filter?: boolean) => { |
|
|
|
*/ |
|
|
|
const appFormSubmit = (params = {}) => { |
|
|
|
let addUrl = props.formData.config?.addUrl || props.addUrl |
|
|
|
console.log("自定义App提交表单", props.addUrl) |
|
|
|
// console.log("自定义App提交表单", props.addUrl) |
|
|
|
if (props.isSearch || !addUrl || loading.value) { |
|
|
|
if (!props.isSearch && !addUrl) { |
|
|
|
console.error( |
|
|
|
@ -694,16 +694,16 @@ const appFormSubmit = (params = {}) => { |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
console.log(params) |
|
|
|
// console.log(params) |
|
|
|
validate((valid: boolean, fields: any) => { |
|
|
|
if (valid) { |
|
|
|
const formatParams = Object.assign({}, fields, params) |
|
|
|
console.log("params--->",params) |
|
|
|
console.log("fields--->",fields) |
|
|
|
console.log("自定义A2pp提交表单", formatParams) |
|
|
|
// console.log("params--->",params) |
|
|
|
// console.log("fields--->",fields) |
|
|
|
// console.log("自定义A2pp提交表单", formatParams) |
|
|
|
let submitParams |
|
|
|
const beforeSubmit = props.formData.events?.beforeSubmit |
|
|
|
console.log("beforeSubmit--->", beforeSubmit) |
|
|
|
// console.log("beforeSubmit--->", beforeSubmit) |
|
|
|
if (beforeSubmit) { |
|
|
|
if (typeof beforeSubmit === 'function') { |
|
|
|
submitParams = beforeSubmit(formatParams, route) |
|
|
|
@ -722,12 +722,12 @@ const appFormSubmit = (params = {}) => { |
|
|
|
formatParams.versionId=props.versionId |
|
|
|
formatParams.appKey=props.groupid |
|
|
|
formatParams.status=2 |
|
|
|
console.log("提交表单-----------1------------>", submitParams) |
|
|
|
console.log("提交表单-----------2------------>", formatParams) |
|
|
|
// console.log("提交表单-----------1------------>", submitParams) |
|
|
|
// console.log("提交表单-----------2------------>", formatParams) |
|
|
|
|
|
|
|
createAppTask(submitParams ?? formatParams) |
|
|
|
.then((data:any) => { |
|
|
|
console.log("formatParams--111->",data) |
|
|
|
// console.log("formatParams--111->",data) |
|
|
|
|
|
|
|
if(props.isWorkFlow == 1){ |
|
|
|
nextTick(() => { |
|
|
|
@ -738,7 +738,7 @@ const appFormSubmit = (params = {}) => { |
|
|
|
} |
|
|
|
startRunFlow(sendInfo) |
|
|
|
.then((data:any)=>{ |
|
|
|
console.log("流程提交成功--------1---------->",data) |
|
|
|
// console.log("流程提交成功--------1---------->",data) |
|
|
|
}) |
|
|
|
.finally(() =>{ |
|
|
|
afterSubmit('success', data) |
|
|
|
@ -997,7 +997,7 @@ const changeKeyVal = (key:any,val:any,type:any,attribute:any) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
console.log("isUpdateFlowChart",isUpdateFlowChart) |
|
|
|
// console.log("isUpdateFlowChart",isUpdateFlowChart) |
|
|
|
//更新工作流图 |
|
|
|
if(isUpdateFlowChart && gainFlowChart.id !=0){ |
|
|
|
flowLoading.value = true |
|
|
|
|