表单优化
parent
2084d27b08
commit
ef9ef2e62a
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="flex">
|
||||
<a-input v-model:value="address" @change="inpChange" placeholder="" />
|
||||
<a-input v-model:value="address" @change="inpChange" :disabled="disabled" placeholder="" />
|
||||
<a-button type="primary" style="margin-left: 10px;" @click="showMaps">地图</a-button>
|
||||
</div>
|
||||
|
||||
|
|
@ -16,7 +16,16 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<a-modal v-model:visible="mapsVisible" title="位置选择" @cancel="handleCancel" @ok="handleOk" width="1200px" height="850px" >
|
||||
<a-modal
|
||||
v-model:visible="mapsVisible"
|
||||
title="位置选择"
|
||||
centered
|
||||
:footer="disabled ? null : undefined"
|
||||
@cancel="handleCancel"
|
||||
@ok="handleOk"
|
||||
width="1200px"
|
||||
height="850px"
|
||||
>
|
||||
<div class="modalbox">
|
||||
<MapboxMap @handlerDrawComplete="handlerDrawComplete" :location="location" :geoms="geomData" :isPoint="geoType"></MapboxMap>
|
||||
</div>
|
||||
|
|
@ -33,14 +42,13 @@ import { propTypes } from '@/utils/propTypes';
|
|||
|
||||
defineOptions({ name: 'AddressDetails' });
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
disabled: propTypes.bool,
|
||||
value: { type: String },
|
||||
geoType: propTypes.bool,
|
||||
});
|
||||
onMounted(() => {
|
||||
console.log('rrr112r', props)
|
||||
|
||||
})
|
||||
const emitData = ref<any[]>([]);
|
||||
const [FormItemData] = useRuleFormItem(props);
|
||||
|
|
@ -52,7 +60,7 @@ const geomData = ref()
|
|||
const location = ref()
|
||||
const showMaps = ()=>{
|
||||
mapsVisible.value = true
|
||||
if(paramsData.value.length>0){
|
||||
if(paramsData.value && paramsData.value.length>0){
|
||||
location.value = paramsData.value[0].center
|
||||
geomData.value = paramsData.value
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@
|
|||
<div style="margin-top: 8px">{{ t('component.upload.upload') }}</div>
|
||||
</div>
|
||||
</Upload>
|
||||
<Modal :open="previewOpen" title="预览" :footer="null" @cancel="handleCancel">
|
||||
<Modal :open="previewOpen" title="预览" :footer="null" @cancel="handleCancel" centered draggable
|
||||
:bodyStyle="{ maxHeight: '98vh', overflowY: 'auto' }">
|
||||
<img alt="" style="width: 100%" :src="globalImagePreviewUrl" />
|
||||
</Modal>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<CloseOutlined/>
|
||||
</div>
|
||||
<img src="./video.png" @click="handlePreview(item)" alt="">
|
||||
<p>{{ item.name}}</p>
|
||||
<!-- <p>{{ item.name}}</p> -->
|
||||
</div>
|
||||
|
||||
<Upload
|
||||
|
|
@ -27,7 +27,8 @@
|
|||
</div>
|
||||
</Upload>
|
||||
|
||||
<Modal :open="previewOpen" :title="previewTitle" :footer="null" @cancel="handleCancel">
|
||||
<Modal :open="previewOpen" title="预览" :footer="null" @cancel="handleCancel" centered draggable
|
||||
:bodyStyle="{ maxHeight: '99vh', overflowY: 'auto' }">
|
||||
<!-- <img alt="" style="width: 100%" :src="previewImage" /> -->
|
||||
<video :src="previewImage" class="video-player" controls muted autoplay></video>
|
||||
</Modal>
|
||||
|
|
|
|||
|
|
@ -848,3 +848,11 @@ watch(formFileState.url, (newValue, oldValue) => {
|
|||
});
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
:deep(.ant-input-number-input) {
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
:deep(.ant-checkbox-disabled+span) {
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
</style>
|
||||
|
|
@ -475,7 +475,6 @@
|
|||
}
|
||||
|
||||
const handleClickForm = (status,record) => {
|
||||
console.log('aaaa', record)
|
||||
const config = cloneDeep(formConfig.value);
|
||||
const rows = ref([])
|
||||
if(record){
|
||||
|
|
|
|||
Loading…
Reference in New Issue