fix : 修复页面细节

This commit is contained in:
2024-05-30 20:04:57 +08:00
parent 29a019b32a
commit 8c6da666d5
9 changed files with 433 additions and 146 deletions

View File

@@ -8,6 +8,7 @@
</template>
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
const router = useRouter()
const route = useRoute()
@@ -24,26 +25,59 @@ const searchConfig = reactive([
}
},
{
label: '时间',
prop: 'time',
component: 'el-date-picker',
props: {
placeholder: '请选择时间',
clearable: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
colProps: {}
}, {
label: '项目费用',
prop: 'projectCost',
prop: 'requirementName',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择项目费用查询',
clearable: true,
filterable: true,
cacheKey: 'project_cost',
}
}, {
label: '研发阶段',
prop: 'researchStage',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择研发阶段查询',
clearable: true,
filterable: true,
checkStrictly: true,
cacheKey: 'research_stage',
}
},
{
label: '税后余额',
prop: 'afterTax',
component: 'el-input',
props: {
placeholder: '请输入项目费用查询',
placeholder: '请输入税后余额查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
{
label: '起始时间',
prop: 'time',
component: 'el-date-picker',
label: '摘要',
prop: 'digest',
component: 'el-input',
props: {
placeholder: '请选择起始时间',
placeholder: '请输入摘要查询',
clearable: true,
},
colProps: {}
}
filterable: true,
checkStrictly: true
}
},
])
const tableConfig = reactive({
columns: [

View File

@@ -12,6 +12,35 @@ import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {reactive, shallowRef} from "vue";
const router = useRouter()
const shortcuts = [
{
text: '上周',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
return [start, end]
},
},
{
text: '上月',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
return [start, end]
},
},
{
text: '三月前',
value: () => {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
return [start, end]
},
},
]
const searchConfig = reactive([
{
label: '项目名称',
@@ -30,6 +59,7 @@ const searchConfig = reactive([
component: shallowRef(fvSelect),
props: {
placeholder: '请选择项目类型',
cacheKey: 'project_type',
clearable: true,
filterable: true,
}
@@ -40,6 +70,7 @@ const searchConfig = reactive([
component: shallowRef(fvSelect),
props: {
placeholder: '请选择项目影响',
cacheKey: 'project_impact',
clearable: true,
filterable: true,
},
@@ -51,43 +82,56 @@ const searchConfig = reactive([
component: shallowRef(fvSelect),
props: {
placeholder: '请选择研发主体',
cacheKey: 'rd_subject',
clearable: true,
filterable: true,
}
},
{
label: '起止时间',
prop: 'startTime',
prop: 'dateValue',
component: 'el-date-picker',
props: {
placeholder: '请选择起止时间',
clearable: true,
},
colProps: {}
},
{
label: '最小金额',
prop: 'requirementName',
component: 'el-input',
props: {
placeholder: '请输入金额查询',
clearable: true,
filterable: true,
checkStrictly: true
type: 'datetimerange',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
shortcuts: shortcuts
}
},
{
label: '最大金额',
prop: 'requirementName',
component: 'el-input',
label: '状态',
prop: 'state',
component: shallowRef(fvSelect),
props: {
placeholder: '请输入金额查询',
placeholder: '请选择状态',
clearable: true,
filterable: true,
checkStrictly: true
cacheKey: 'project_initiation'
}
},
// {
// label: '最小金额',
// prop: 'requirementName',
// component: 'el-input',
// props: {
// placeholder: '请输入金额查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
// {
// label: '最大金额',
// prop: 'requirementName',
// component: 'el-input',
// props: {
// placeholder: '请输入金额查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
])
const tableIns = ref()
const tableConfig = reactive({
@@ -134,7 +178,10 @@ const tableConfig = reactive({
{
prop: 'startTime',
label: '起止时间',
align: 'center'
align: 'center',
currentRender: ({row}) => {
return row.startTime + ' 至 ' + row.endTime
}
},
{
prop: 'taskNode',
@@ -210,7 +257,13 @@ const tableConfig = reactive({
})
const search = (val) => {
tableConfig.params = {...val}
let obj = {...val}
if(obj.dateValue) {
obj.startTime = obj.dateValue[0]
obj.endTime = obj.dateValue[1]
delete obj.dateValue
}
tableConfig.params = obj
tableIns.value.refresh()
}