|
@@ -36,26 +36,17 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import model from '@/api/flow/process'
|
|
|
|
import purchaseOrder from '@/api/test/purchaseOrder'
|
|
import purchaseOrder from '@/api/test/purchaseOrder'
|
|
-import { nextTick, onMounted, ref, markRaw, defineAsyncComponent } from 'vue'
|
|
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
import { erFormPreview } from '@ER/formEditor'
|
|
import { erFormPreview } from '@ER/formEditor'
|
|
import FlowTrend from '@/components/Flow/FlowTrend.vue'
|
|
import FlowTrend from '@/components/Flow/FlowTrend.vue'
|
|
import type { ModelContentConfig } from '@/views/approve/components/config.ts'
|
|
import type { ModelContentConfig } from '@/views/approve/components/config.ts'
|
|
|
|
+import { nextTick, onMounted, ref, markRaw, defineAsyncComponent, provide } from 'vue'
|
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
modelValue: boolean
|
|
modelValue: boolean
|
|
record: { processId: string; processName: string; [key: string]: any }
|
|
record: { processId: string; processName: string; [key: string]: any }
|
|
}
|
|
}
|
|
-type Assignee = {
|
|
|
|
- type: 1 | 3 // 1: 用户 3: 角色
|
|
|
|
- assignees: { [key: string]: any /*name, id*/ }
|
|
|
|
- disabled?: boolean
|
|
|
|
- selectOpts?: any
|
|
|
|
- // minSelected?: number
|
|
|
|
- // maxSelected?: number
|
|
|
|
-}
|
|
|
|
|
|
|
|
// 当前form 表单数据字符串
|
|
// 当前form 表单数据字符串
|
|
let cur_processForm_str = '{}'
|
|
let cur_processForm_str = '{}'
|
|
@@ -75,6 +66,9 @@ const modelContentConfig = ref<ModelContentConfig | any>({})
|
|
const dyVueComponent = ref(undefined)
|
|
const dyVueComponent = ref(undefined)
|
|
const dyVueComponentRef = ref()
|
|
const dyVueComponentRef = ref()
|
|
const flowTrendRef = ref()
|
|
const flowTrendRef = ref()
|
|
|
|
+const dyVueForm = ref({})
|
|
|
|
+
|
|
|
|
+provide('dyVueForm', dyVueForm) // 这里主要是存放动态的form的属性值
|
|
|
|
|
|
const onSubmit = async () => {
|
|
const onSubmit = async () => {
|
|
const processId = props.record.processId
|
|
const processId = props.record.processId
|
|
@@ -113,7 +107,7 @@ const onSubmit = async () => {
|
|
} else {
|
|
} else {
|
|
const formData = dyVueComponentRef.value.getData()
|
|
const formData = dyVueComponentRef.value.getData()
|
|
const testData = {
|
|
const testData = {
|
|
- formStructure: '表单主体vue地址',
|
|
|
|
|
|
+ formStructure: '@/views/flow/test/test1.vue',
|
|
formData: formData
|
|
formData: formData
|
|
}
|
|
}
|
|
params = {
|
|
params = {
|
|
@@ -152,10 +146,21 @@ const getDetailInfo = () => {
|
|
const { formStructure } = JSON.parse(cur_processForm_str)
|
|
const { formStructure } = JSON.parse(cur_processForm_str)
|
|
EReditorRef.value.setData(formStructure)
|
|
EReditorRef.value.setData(formStructure)
|
|
} else {
|
|
} else {
|
|
- dyVueComponent.value = markRaw(defineAsyncComponent(() => import('./test1.vue')))
|
|
|
|
|
|
+ // dyVueForm.value = {
|
|
|
|
+ // dy: {
|
|
|
|
+ // name: '测试名字',
|
|
|
|
+ // region: 1,
|
|
|
|
+ // delivery: true,
|
|
|
|
+ // type: ['1'],
|
|
|
|
+ // resource: 'Sponsor',
|
|
|
|
+ // desc: '啦啦啦'
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ dyVueComponent.value = markRaw(defineAsyncComponent(() => import('@/views/flow/test/test1.vue')))
|
|
}
|
|
}
|
|
validateForm.value.loading = false
|
|
validateForm.value.loading = false
|
|
}
|
|
}
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
getDetailInfo()
|
|
getDetailInfo()
|