|
|
@ -10,8 +10,8 @@ import { |
|
|
string2json, |
|
|
string2json, |
|
|
stringToObj |
|
|
stringToObj |
|
|
} from '@/utils/DesignForm/form' |
|
|
} from '@/utils/DesignForm/form' |
|
|
|
|
|
import { nodeFlow } from '@/api/taskapi/types' |
|
|
import { haveCustomerFormVersion } from '@/api/taskapi/management' |
|
|
import { haveCustomerFormVersion,generateFlow } from '@/api/taskapi/management' |
|
|
import { judgeSubmitCancel } from '@/api/DesignForm/requestapi' |
|
|
import { judgeSubmitCancel } from '@/api/DesignForm/requestapi' |
|
|
|
|
|
|
|
|
import '@/assets/scss/element-var.scss' |
|
|
import '@/assets/scss/element-var.scss' |
|
|
@ -19,6 +19,8 @@ import '@/assets/scss/index.scss' |
|
|
import '@/assets/iconfont/iconfont.css' |
|
|
import '@/assets/iconfont/iconfont.css' |
|
|
import 'element-plus/dist/index.css' |
|
|
import 'element-plus/dist/index.css' |
|
|
|
|
|
|
|
|
|
|
|
import FlowStep from '@/views/taskplatform/taskmanagement/flowStep.vue' |
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
|
isopen:{ |
|
|
isopen:{ |
|
|
type:Boolean, |
|
|
type:Boolean, |
|
|
@ -65,6 +67,7 @@ const submitButton = { |
|
|
} |
|
|
} |
|
|
}] |
|
|
}] |
|
|
} |
|
|
} |
|
|
|
|
|
const isFlowForm = ref(false) |
|
|
const loadingData = ref(false) |
|
|
const loadingData = ref(false) |
|
|
const formEl = ref() |
|
|
const formEl = ref() |
|
|
const router = useRouter() |
|
|
const router = useRouter() |
|
|
@ -80,6 +83,13 @@ const state = reactive<any>({ |
|
|
id: 0, |
|
|
id: 0, |
|
|
loading: true |
|
|
loading: true |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
//获取工作流条件 |
|
|
|
|
|
const gainFlowChart = reactive<nodeFlow>({ |
|
|
|
|
|
id:0 |
|
|
|
|
|
}) |
|
|
|
|
|
//工作流数据 |
|
|
|
|
|
const flowMap = ref<any[]>(); |
|
|
const formType = computed(() => { |
|
|
const formType = computed(() => { |
|
|
// 带有参数id为编辑状态 |
|
|
// 带有参数id为编辑状态 |
|
|
if (props.infoid) { |
|
|
if (props.infoid) { |
|
|
@ -103,6 +113,11 @@ const getTaskFormData = () =>{ |
|
|
haveCustomerFormVersion({id:props.versionid}) |
|
|
haveCustomerFormVersion({id:props.versionid}) |
|
|
.then(({ data }) =>{ |
|
|
.then(({ data }) =>{ |
|
|
console.log("表单数据",data) |
|
|
console.log("表单数据",data) |
|
|
|
|
|
if(data.classify == 2){ |
|
|
|
|
|
isFlowForm.value = true; |
|
|
|
|
|
}else{ |
|
|
|
|
|
isFlowForm.value = false; |
|
|
|
|
|
} |
|
|
state.id=props.versionid |
|
|
state.id=props.versionid |
|
|
state.formData = stringToObj(data.mastesform) |
|
|
state.formData = stringToObj(data.mastesform) |
|
|
state.dict = string2json(data.dict) |
|
|
state.dict = string2json(data.dict) |
|
|
@ -114,6 +129,14 @@ const getTaskFormData = () =>{ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
//获取工作流不进图 |
|
|
|
|
|
gainFlowChart.id=data.flowkeystr |
|
|
|
|
|
generateFlow(gainFlowChart) |
|
|
|
|
|
.then((data:any) =>{ |
|
|
|
|
|
console.log("获取工作流不进图",data) |
|
|
|
|
|
flowMap.value = data.data |
|
|
|
|
|
console.log("获取工作流不进图--->",flowMap.value) |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
.finally(()=>{ |
|
|
.finally(()=>{ |
|
|
loadingData.value = false; |
|
|
loadingData.value = false; |
|
|
@ -167,7 +190,31 @@ watch(()=>props.isopen,()=>{ |
|
|
</script> |
|
|
</script> |
|
|
<template> |
|
|
<template> |
|
|
<el-drawer v-model="drawerOpenOrClose" v-loading="loadingData" :title="versiontitle" :close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true" :size="props.drawerwith" class="drawerClass" > |
|
|
<el-drawer v-model="drawerOpenOrClose" v-loading="loadingData" :title="versiontitle" :close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true" :size="props.drawerwith" class="drawerClass" > |
|
|
<div class="drawerBody"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-tabs v-if="isFlowForm" tab-position="left" style="height: 100%" class="demo-tabs"> |
|
|
|
|
|
<el-tab-pane label="表单"> |
|
|
|
|
|
<ak-form |
|
|
|
|
|
ref="formEl" |
|
|
|
|
|
:form-data="state.formData" |
|
|
|
|
|
:type="formType" |
|
|
|
|
|
:dict="state.dict" |
|
|
|
|
|
request-url="getFormContent" |
|
|
|
|
|
add-url="saveFormContent" |
|
|
|
|
|
edit-url="editFormContent" |
|
|
|
|
|
:before-submit="beforeSubmit" |
|
|
|
|
|
:after-submit="afterSubmit" |
|
|
|
|
|
:close-app-submit="closeAppSubmit" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
<el-tab-pane label="流程"> |
|
|
|
|
|
|
|
|
|
|
|
<FlowStep v-molde:flow-map="flowMap" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
</el-tabs> |
|
|
|
|
|
<div v-else class="drawerBody"> |
|
|
<ak-form |
|
|
<ak-form |
|
|
ref="formEl" |
|
|
ref="formEl" |
|
|
:form-data="state.formData" |
|
|
:form-data="state.formData" |
|
|
@ -209,3 +256,15 @@ watch(()=>props.isopen,()=>{ |
|
|
padding: 20px; |
|
|
padding: 20px; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|
|
|
<style> |
|
|
|
|
|
.demo-tabs > .el-tabs__content { |
|
|
|
|
|
padding: 0px 20px 20px 20px; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
overflow-y: auto; |
|
|
|
|
|
} |
|
|
|
|
|
.el-tabs--right .el-tabs__content, |
|
|
|
|
|
.el-tabs--left .el-tabs__content { |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
|