|
@@ -10,25 +10,18 @@
|
|
|
<title-divider title="基础信息" width="90px"></title-divider>
|
|
|
<detail-list :col="2">
|
|
|
<detail-list-item term="表单名称">{{ model.name }}</detail-list-item>
|
|
|
- <detail-list-item term="表单类型">{{ this.typeMap[model.type ] }}</detail-list-item>
|
|
|
- <detail-list-item term="模板分类">{{ this.categoryMap[model.category ] }}</detail-list-item>
|
|
|
- <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
|
|
|
+ <detail-list-item term="模板分类">{{ categoryMap[model.category ] }}</detail-list-item>
|
|
|
+ <detail-list-item term="表单类型">{{childrenMaps[model.category ][model.type ]}}</detail-list-item>
|
|
|
+ <detail-list-item term="关联流程">{{ workFlowList.find(item => item.id === model.flowId).name}}</detail-list-item>
|
|
|
<detail-list-item term="创建人">{{ model.createdUserName }}</detail-list-item>
|
|
|
<detail-list-item term="创建时间">{{ model.createdTime }}</detail-list-item>
|
|
|
+ <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
|
|
|
</detail-list>
|
|
|
<title-divider title="表单配置" width="90px"></title-divider>
|
|
|
<a-card>
|
|
|
- <a-form
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
+ <a-form :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
<a-row>
|
|
|
- <MComponent
|
|
|
- class="hover"
|
|
|
- v-for="item in formComponentConfig.components"
|
|
|
- :key="item.id"
|
|
|
- :config="formComponentConfig.config"
|
|
|
- :detail="item"
|
|
|
- />
|
|
|
+ <MComponent class="hover" v-for="item in formComponentConfig.components" :key="item.id" :config="formComponentConfig.config" :detail="item" />
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</a-card>
|
|
@@ -39,45 +32,51 @@
|
|
|
import DetailList from '@/components/tools/DetailList'
|
|
|
import MComponent from './component/modules/Component.vue'
|
|
|
const DetailListItem = DetailList.Item
|
|
|
+import { queryWorkflow } from '@/api/workflow/workflow'
|
|
|
|
|
|
export default {
|
|
|
name: 'CustomFormDetail',
|
|
|
components: {
|
|
|
DetailList,
|
|
|
DetailListItem,
|
|
|
- MComponent
|
|
|
+ MComponent,
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
confirmLoading: false,
|
|
|
mdl: {},
|
|
|
modalTitle: null,
|
|
|
visible: false,
|
|
|
// 下拉框map
|
|
|
- model: {
|
|
|
- },
|
|
|
+ model: {},
|
|
|
categoryMap: {},
|
|
|
- typeMap: {},
|
|
|
- formComponentConfig: {}
|
|
|
+ childrenMaps: [],
|
|
|
+ formComponentConfig: {},
|
|
|
+ workFlowList: [],
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
// 下拉框map
|
|
|
- this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CUSTOM_FORM_TYPE)
|
|
|
this.categoryMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CATEGORY_TYPE)
|
|
|
+ this.DictCache.getChildrenList(this.DictCache.TYPE.CATEGORY_TYPE).forEach((item) => {
|
|
|
+ this.childrenMaps[item.value] = this.DictCache.getLabelByValueMapByType(item.code)
|
|
|
+ })
|
|
|
+ queryWorkflow().then((res) => {
|
|
|
+ this.workFlowList = res.data
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
- base (record) {
|
|
|
+ base(record) {
|
|
|
this.visible = true
|
|
|
this.modalTitle = '详情'
|
|
|
this.model = record
|
|
|
this.formComponentConfig = JSON.parse(record.jsonString)
|
|
|
},
|
|
|
- handleCancel () {
|
|
|
+ handleCancel() {
|
|
|
this.visible = false
|
|
|
this.confirmLoading = false
|
|
|
this.$emit('ok')
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|