fix : 修改表格高度,页面左右边距,上传文件不能和标题并排
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 15px;"></fvSearchForm>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 15px;margin-bottom: -18px"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
@@ -352,7 +352,7 @@ getBaseInfo()
|
||||
padding-top: 0;
|
||||
}
|
||||
:deep(.el-col-offset-1){
|
||||
margin-left: 50px;
|
||||
margin-left: 48px;
|
||||
}
|
||||
:deep(.el-date-editor.el-input, .el-date-editor.el-input__wrapper ){
|
||||
width: 100%!important;
|
||||
@@ -360,4 +360,20 @@ getBaseInfo()
|
||||
:deep(.btn-col){
|
||||
margin-left: -28px;
|
||||
}
|
||||
|
||||
: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>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<div style="padding: 0 30px">
|
||||
<baseTitle title="表格更新"></baseTitle>
|
||||
<el-form :model="tableForm" ref="form">
|
||||
<el-row gutter="20">
|
||||
<el-row gutter="30">
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectName" label="项目名称" label-width="95">
|
||||
<el-form-item prop="projectName" label="项目名称" label-width="95">
|
||||
<span>{{ tableForm.projectName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="startTime" label="项目开始时间" >
|
||||
<el-form-item prop="startTime" label="项目开始时间">
|
||||
<el-date-picker
|
||||
v-model="tableForm.startTime"
|
||||
type="date"
|
||||
@@ -43,7 +43,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="projectDevelopmentWay" label="项目开展方式" style="width: 100%" >
|
||||
<el-form-item prop="projectDevelopmentWay" label="项目开展方式" style="width: 100%">
|
||||
<el-input v-model="tableForm.projectDevelopmentWay" placeholder="请输入项目开展方式" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -57,7 +57,7 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectCompletionRate" label="完成率(%)" label-width="95">
|
||||
<el-input-number v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" min="0" max="100"
|
||||
:controls="false" style="width: 200px">
|
||||
:controls="false">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -158,7 +158,7 @@ getBaseInfo()
|
||||
const init = async () => {
|
||||
const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
|
||||
tableForm.value = data
|
||||
if(data.projectChargePersonName){
|
||||
if (data.projectChargePersonName) {
|
||||
let userObj = {
|
||||
id: data.projectChargePerson,
|
||||
name: data.projectChargePersonName,
|
||||
@@ -178,6 +178,16 @@ const init = async () => {
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
:deep(.el-date-editor--date) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<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>
|
||||
<baseTitle title="项目实施-上传附件" style="margin-bottom: 15px"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"
|
||||
style="margin-left: 15px;margin-bottom: -18px"></fvForm>
|
||||
<baseTitle title="项目实施-上传附件" ></baseTitle>
|
||||
<el-form :model="formData" ref="tagForm" label-width="auto">
|
||||
<el-form-item label="标签名称" prop="tagName" style="margin-left: 15px;">
|
||||
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px" v-if="showInput" clearable/>
|
||||
<el-select v-model="formData.tagName" placeholder="请选择标签名称" clearable filterable style="width: 300px" v-else>
|
||||
<el-select v-model="formData.tagName" placeholder="请选择标签名称" clearable filterable style="width: 300px;margin-right: 10px" v-else>
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.value"
|
||||
@@ -17,10 +18,8 @@
|
||||
<el-button type="primary" link @click="changeInput">{{ showInput ? '选择' : '输入' }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="display: flex; align-items: center;margin-top: -5px">
|
||||
<baseTitle title="其他文件" style="margin-right: 10px;"></baseTitle>
|
||||
<file-upload @getFile="getFile" :disabled="!formData.tagName" :title="!formData.tagName?'请先选择/输入标签!':''"/>
|
||||
</div>
|
||||
<!-- <baseTitle title="其他文件"></baseTitle>-->
|
||||
<file-upload @getFile="getFile" :disabled="!formData.tagName" :title="!formData.tagName?'请先选择/输入标签!':''"/>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" height="300" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
@@ -45,6 +44,7 @@ import {downloadFile, deleteFile} from "@/api/project-demand";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
@@ -189,7 +189,7 @@ const schema = computed(() => {
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
<span>{toThousands(baseFormData.value?.economicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
@@ -377,14 +377,15 @@ const changeInput = () => {
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.projectId) return
|
||||
getTags(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
showInput.value = res.data.length === 0;
|
||||
tagsOption.value = res.data
|
||||
}else{
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -473,8 +474,24 @@ const handleSubmit = async (instance) => {
|
||||
getTagsOption()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table--fit ) {
|
||||
height: 300px !important;
|
||||
}
|
||||
|
||||
: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>
|
||||
|
||||
@@ -1,82 +1,83 @@
|
||||
<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="tableForm" ref="form" class="query-form">
|
||||
<el-table :data="tableForm.tableData">
|
||||
<el-table-column prop="time" label="时间" min-width="180">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="time" :rules="scope.row.time?'1':rules.time">
|
||||
<el-date-picker
|
||||
v-model="scope.row.time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
placeholder="选择时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="projectCost" label="项目费用" min-width="220">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="projectCost" :rules="scope.row.projectCost?'1':rules.projectCost">
|
||||
<el-select v-model="scope.row.projectCost" placeholder="请选择费用性质" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('project_cost')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchStage" label="研发阶段" min-width="220">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="researchStage" :rules="scope.row.researchStage?'1':rules.researchStage">
|
||||
<el-select v-model="scope.row.researchStage" placeholder="请选择研发阶段" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('fee_stage')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="digest" label="摘要" min-width="220">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="digest" :rules="scope.row.digest?'1':rules.digest">
|
||||
<el-input v-model="scope.row.digest" placeholder="请输入摘要" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="afterTax" label="税后余额(元)" min-width="220">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="afterTax" :rules="scope.row.afterTax?'1':rules.afterTax">
|
||||
<el-input-number v-model="scope.row.afterTax" placeholder="请输入税后余额" :controls="false">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="oper" label="操作">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="handleDelete(scope.$index)" link style="font-size: 18px">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div style="width:100%;text-align: center;padding: 10px">
|
||||
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
|
||||
<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="tableForm" ref="form">
|
||||
<el-table :data="tableForm.tableData">
|
||||
<el-table-column prop="time" label="时间" min-width="180">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="time" :rules="scope.row.time?'1':rules.time">
|
||||
<el-date-picker
|
||||
v-model="scope.row.time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
placeholder="选择时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="projectCost" label="项目费用" min-width="220">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="projectCost" :rules="scope.row.projectCost?'1':rules.projectCost">
|
||||
<el-select v-model="scope.row.projectCost" placeholder="请选择费用性质" clearable filterable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('project_cost')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchStage" label="研发阶段" min-width="220">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="researchStage" :rules="scope.row.researchStage?'1':rules.researchStage">
|
||||
<el-select v-model="scope.row.researchStage" placeholder="请选择研发阶段" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('fee_stage')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="digest" label="摘要" min-width="220">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="digest" :rules="scope.row.digest?'1':rules.digest">
|
||||
<el-input v-model="scope.row.digest" placeholder="请输入摘要" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="afterTax" label="税后余额(元)" min-width="220">
|
||||
<template #default="scope">
|
||||
<el-form-item prop="afterTax" :rules="scope.row.afterTax?'1':rules.afterTax">
|
||||
<el-input-number v-model="scope.row.afterTax" placeholder="请输入税后余额" :controls="false">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="oper" label="操作">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="handleDelete(scope.$index)" link style="font-size: 16px">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div style="width:100%;text-align: center;padding: 10px">
|
||||
<el-button type="primary" @click="handleAdd" link style="font-size: 16px">添加一行</el-button>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(form)">提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(form)">提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
@@ -87,6 +88,7 @@ import {useRoute} from "vue-router";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
|
||||
const baseFormData = ref([])
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
@@ -253,7 +255,7 @@ const schema = computed(() => {
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
<span>{toThousands(baseFormData.value?.economicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
@@ -427,7 +429,7 @@ const handleSubmit = (instance) => {
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
onActivated(()=>{
|
||||
onActivated(() => {
|
||||
tableForm.value = {
|
||||
tableData: [
|
||||
{
|
||||
@@ -452,5 +454,17 @@ onActivated(()=>{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-date-editor--month) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user