fix : 修改表格高度,页面左右边距,上传文件不能和标题并排

This commit is contained in:
2024-08-13 17:21:19 +08:00
parent fa054d2a07
commit 38b6299dbf
24 changed files with 305 additions and 197 deletions

View File

@@ -1,32 +1,33 @@
<template>
<div style="padding: 0 30px">
<baseTitle title="项目基本信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
<el-form :model="attachment" inline style="margin-left: 15px">
<el-form-item label="标签" prop="tag">
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
<el-option
v-for="item in tagsOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
</el-form-item>
</el-form>
<el-card style="width: 100%">
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" height="250" :tableConfig="tableConfig"
<div style="padding: 0 30px">
<baseTitle title="项目基本信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"
style="margin-left: 15px"></fvForm>
<el-form :model="attachment" inline style="margin-left: 15px">
<el-form-item label="标签" prop="tag">
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
<el-option
v-for="item in tagsOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
</el-form-item>
</el-form>
<!-- <el-card style="width: 100%" shadow="never">-->
<fvTable style="width: 100%;max-height: 274px" v-if="showTable" height="274" :tableConfig="tableConfig"
:data="otherFileList" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template>
</fvTable>
</el-card>
</div>
<!-- </el-card>-->
</div>
</template>
<script setup lang="jsx">
@@ -39,6 +40,7 @@ import {useCacheStore} from '@/stores/cache.js'
import {toThousands} from '@/utils/changePrice.js'
import {computed, ref} from "vue";
const cacheStore = useCacheStore()
const route = useRoute()
const router = useRouter()
@@ -184,7 +186,7 @@ const schema = computed(() => {
<div>
{
baseFormData.value?.economicEstimate ?
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
<span>{toThousands(baseFormData.value?.economicEstimate)}</span>
: <span>{'--'}</span>
}
</div>
@@ -332,7 +334,7 @@ const getTagsOption = () => {
getTags(route.query.id).then(res => {
if (res.code === 1000) {
tagsOption.value = res.data
}else{
} else {
ElNotification({
title: '提示',
message: res.msg,
@@ -362,7 +364,7 @@ const handleSearch = () => {
nextTick(() => {
showTable.value = true
})
}else{
} else {
ElNotification({
title: '提示',
message: res.msg,
@@ -376,7 +378,7 @@ const handleUpload = () => {
name: 'Implementation/upload',
query: {
projectId: route.query.id,
type:'list'
type: 'list'
}
})
}
@@ -390,7 +392,7 @@ const handleDownload = (row) => {
})
}
onActivated(()=>{
onActivated(() => {
handleSearch()
getTagsOption()
})
@@ -398,6 +400,21 @@ handleSearch()
getTagsOption()
</script>
<style scoped>
<style scoped lang="scss">
:deep(.el-table__header) {
.is-leaf:first-child {
.cell {
margin-left: -25px !important;
}
}
}
:deep(.el-table__body) {
.el-table__cell:first-child {
.cell {
margin-left: -13px !important;
}
}
}
</style>