feat: up detail

This commit is contained in:
wenhua
2024-05-19 23:07:32 +08:00
parent 4a90f4bc1e
commit 3a4f9927c9
5 changed files with 246 additions and 17 deletions

View File

@@ -0,0 +1,81 @@
<template>
<div>
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
<!-- <AttachmentUpload></AttachmentUpload> -->
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="process">
<operation-render v-if="processViewer" :operation-list="data.operationList"
:state="data.state"/>
<process-diagram-viewer v-if="processViewer"/>
</div>
</div>
<Opinion: v-if="data.taskId" :formData="formData" :taskId="formData.taskId"></Opinion:>
</div>
</template>
<script setup lang="jsx">
import { computed, markRaw, reactive, ref, watchEffect } from 'vue';
import AttachmentUpload from '../AttachmentUpload.vue';
import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import Opinion from './Opinion.vue';
import fvTable from '@/fvcomponents/fvTable/index.vue'
const props = defineProps({
formData: {
type: Object,
default: {}
},
data: {
type: Array,
default: []
},
processViewer: {
type: Boolean,
default: false
},
companyOption: {
type: Array,
default: []
},
})
const form = ref()
const localData = reactive({
fileList: props.formData.fileList
})
const schema = computed(()=>{
return [
{
label: '前置流程',
prop: 'preProcess',
colProps: {
span: 24
}
},
{
label: '项目立项附件',
prop: 'singleFile',
colProps: {
span: 24
}
},
{
label: '其他文件',
prop: 'fileList',
}
]
})
watchEffect(()=>{
Object.keys(props.formData).length && (form.value.setValues(props.formData))
})
</script>
<style lang="scss" scoped>
</style>