图斑表单详情修改,详情没数据显示【暂无】
parent
2fd2238fd5
commit
523f2271de
|
|
@ -1,61 +1,56 @@
|
|||
<template>
|
||||
<a-modal
|
||||
width="80%"
|
||||
v-model:open="props.open"
|
||||
title="详情"
|
||||
:footer="null"
|
||||
:maskClosable="true"
|
||||
:destroyOnClose="true"
|
||||
@cancel="closeModal">
|
||||
<div class="content">
|
||||
<template v-if="haveTab">
|
||||
<a-tabs v-model:activeKey="selectTab">
|
||||
<a-tab-pane v-for="(tab, tabIndex) in showList" :key="tabIndex" :tab="tab.label">
|
||||
<a-descriptions :column="2" bordered>
|
||||
<template v-for="(item, index) in tab.children" :key="index">
|
||||
<a-descriptions-item v-if="item.component === 'ImageUpload'" :label="item.label">
|
||||
<a-image
|
||||
width="100px"
|
||||
height="100px"
|
||||
:src="`${item.componentProps.server}/${item.infoShowValue}`"
|
||||
></a-image>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item v-else-if="item.component === 'VideoUpload'" :label="item.label">
|
||||
<img v-if="item.infoShowValue" style="width: 100px; height: 100px; cursor: pointer;" src="./video.png" @click="handlePreview(item)" alt="">
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item v-else :label="item.label">{{ item.infoShowValue }}</a-descriptions-item>
|
||||
</template>
|
||||
</a-descriptions>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="haveTab">
|
||||
<a-tabs v-model:activeKey="selectTab">
|
||||
<a-tab-pane v-for="(tab, tabIndex) in showList" :key="tabIndex" :tab="tab.label">
|
||||
<a-descriptions :column="2" bordered>
|
||||
<template v-for="(item, index) in showList" :key="index">
|
||||
<template v-for="(item, index) in tab.children" :key="index">
|
||||
<a-descriptions-item v-if="item.component === 'ImageUpload'" :label="item.label">
|
||||
<a-image
|
||||
v-if="item.infoShowValue"
|
||||
width="100px"
|
||||
height="100px"
|
||||
:src="`${item.componentProps.server}/${item.infoShowValue}`"
|
||||
></a-image>
|
||||
<div v-else style="opacity: 0.3">{{"(暂无)"}}</div>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item v-else-if="item.component === 'VideoUpload'" :label="item.label">
|
||||
<img v-if="item.infoShowValue" style="width: 100px; height: 100px; cursor: pointer;" src="./video.png" @click="handlePreview(item)" alt="">
|
||||
<div v-else style="opacity: 0.3">{{"(暂无)"}}</div>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item v-else :label="item.label">
|
||||
<div v-if="item.infoShowValue">{{ item.infoShowValue}}</div>
|
||||
<div v-else style="opacity: 0.3">{{"(暂无)"}}</div>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item v-else :label="item.label">{{ item.infoShowValue }}</a-descriptions-item>
|
||||
</template>
|
||||
</a-descriptions>
|
||||
<a-table v-if="subTableData" :columns="columns" :data-source="props.data.infoUseSubTableData" :pagination="false"></a-table>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-descriptions :column="2" bordered>
|
||||
<template v-for="(item, index) in showList" :key="index">
|
||||
<a-descriptions-item v-if="item.component === 'ImageUpload'" :label="item.label">
|
||||
<a-image
|
||||
width="100px"
|
||||
height="100px"
|
||||
:src="`${item.componentProps.server}/${item.infoShowValue}`"
|
||||
></a-image>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item v-else-if="item.component === 'VideoUpload'" :label="item.label">
|
||||
<img v-if="item.infoShowValue" style="width: 100px; height: 100px; cursor: pointer;" src="./video.png" @click="handlePreview(item)" alt="">
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item v-else :label="item.label">{{ item.infoShowValue }}</a-descriptions-item>
|
||||
</template>
|
||||
</div>
|
||||
</a-modal>
|
||||
</a-descriptions>
|
||||
<a-table v-if="subTableData" :columns="columns" :data-source="props.data.infoUseSubTableData" :pagination="false"></a-table>
|
||||
</template>
|
||||
<Modal :open="previewOpen" :title="previewTitle" :footer="null" @cancel="handleCancel" :zIndex="1001">
|
||||
<video :src="previewVideo" class="video-player" controls muted autoplay></video>
|
||||
</Modal>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx">
|
||||
import { defineProps, watch, ref, defineEmits } from "vue"
|
||||
import { defineProps, watch, ref, defineEmits, onMounted } from "vue"
|
||||
import ShowCardGroupItem from './ShowCardGroupItem/index.vue'
|
||||
import { Modal } from 'ant-design-vue'
|
||||
const props = defineProps(["open","data"])
|
||||
|
|
@ -68,7 +63,7 @@ const previewOpen = ref(false)
|
|||
const previewTitle = ref("")
|
||||
const subTableData = ref(null)
|
||||
const columns = ref([])
|
||||
watch(() => props.data,() => {
|
||||
onMounted(() => {
|
||||
console.log('props.data',props.data)
|
||||
props.data.tab.forEach(item => {
|
||||
console.log('item',item)
|
||||
|
|
@ -207,12 +202,12 @@ const noTabsSetCardGroupItem = (item, index) => {
|
|||
}
|
||||
})
|
||||
}
|
||||
const closeModal = () => {
|
||||
emits('update:open', false)
|
||||
showList.value = []
|
||||
columns.value = []
|
||||
subTableData.value = null
|
||||
}
|
||||
// const closeModal = () => {
|
||||
// emits('update:open', false)
|
||||
// showList.value = []
|
||||
// columns.value = []
|
||||
// subTableData.value = null
|
||||
// }
|
||||
const handlePreview = (item) => {
|
||||
previewVideo.value = `${item.componentProps.server}/${item.infoShowValue}`;
|
||||
previewOpen.value = true;
|
||||
|
|
@ -225,9 +220,6 @@ const handleCancel = () => {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
padding: 30px;
|
||||
}
|
||||
.video-player{
|
||||
width:500px;
|
||||
margin:10px;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@
|
|||
:closeFunc="closeFunc"
|
||||
> -->
|
||||
<div class="map-content">
|
||||
<template v-if="isDetail">
|
||||
<slot name="detail" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="tabsColumns.length > 1">
|
||||
<a-tabs style="width: 100%" @change="tabsChange">
|
||||
<a-tab-pane v-for="(colItem, index) in tabsColumns" :tab="colItem.label" :key="index">
|
||||
|
|
@ -123,6 +127,7 @@
|
|||
<a-button style="margin-right: 20px" @click="handlerCloseForm">取消</a-button>
|
||||
<a-button type="primary" @click="ModalSureClick">确认</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,11 @@
|
|||
@success="submitsuccess"
|
||||
/> -->
|
||||
<div class="map-form-container" v-if="mapFormShow">
|
||||
<MapFormModal v-if="mapFormShow" @clsoeMapForm="clsoeMapForm" :data="mapFormData" />
|
||||
<MapFormModal v-if="mapFormShow" @clsoeMapForm="clsoeMapForm" :data="mapFormData">
|
||||
<template #detail>
|
||||
<infoCallModal :data="mapFormData" />
|
||||
</template>
|
||||
</MapFormModal>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
|
@ -64,7 +68,19 @@
|
|||
</div>
|
||||
|
||||
<CallModal @success="submitsuccess" @register="registerModal" />
|
||||
<InfoCallModal v-model:open="infoCallModalOpen" :data="infoCallModalData"/>
|
||||
<a-modal
|
||||
width="80%"
|
||||
v-model:open="infoCallModalOpen"
|
||||
title="详情"
|
||||
:footer="null"
|
||||
:maskClosable="true"
|
||||
:destroyOnClose="true"
|
||||
@cancel="closeModal">
|
||||
<div class="content">
|
||||
<InfoCallModal :data="infoCallModalData"/>
|
||||
</div>
|
||||
</a-modal>
|
||||
|
||||
|
||||
<a-modal
|
||||
width="100%"
|
||||
|
|
@ -973,6 +989,9 @@
|
|||
const clsoeMapForm = () => {
|
||||
mapFormShow.value = false;
|
||||
};
|
||||
const closeModal = () => {
|
||||
infoCallModalOpen.value = false
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.full-modal {
|
||||
|
|
@ -1014,4 +1033,7 @@
|
|||
background: #fff;
|
||||
z-index: 999;
|
||||
}
|
||||
.content{
|
||||
padding: 30px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue