12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <template>
- <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
- <a-row :gutter="48" slot="extra">
- <a-col :md="48" :sm="48">
- <span class="table-page-search-submitButtons" style="float: right">
- <a-button style="margin-left: 8px" type="default" @click="handleCancel()">返回</a-button>
- </span>
- </a-col>
- </a-row>
- <title-divider title="基础信息" width="90px"></title-divider>
- <detail-list :col="2">
- <detail-list-item term="表单名称">{{ model.name }}</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-row>
- <MComponent class="hover" v-for="item in formComponentConfig.components" :key="item.id" :config="formComponentConfig.config" :detail="item" />
- </a-row>
- </a-form>
- </a-card>
- </a-card>
- </template>
- <script>
- 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,
- },
- data() {
- return {
- confirmLoading: false,
- mdl: {},
- modalTitle: null,
- visible: false,
- // 下拉框map
- model: {},
- categoryMap: {},
- childrenMaps: [],
- formComponentConfig: {},
- workFlowList: [],
- }
- },
- created() {
- // 下拉框map
- 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) {
- this.visible = true
- this.modalTitle = '详情'
- this.model = record
- this.formComponentConfig = JSON.parse(record.jsonString)
- },
- handleCancel() {
- this.visible = false
- this.confirmLoading = false
- this.$emit('ok')
- },
- },
- }
- </script>
|