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

@@ -9,23 +9,51 @@
<script setup lang="jsx">
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: '需求名称',
prop: 'requirementName',
label: '项目名称',
prop: 'projectName',
component: 'el-input',
props: {
placeholder: '请输入需求名称查询',
placeholder: '请输入项目名称查询',
clearable: true,
checkStrictly: true
}
},
{
label: '项目类型',
prop: 'collectType',
prop: 'projectType',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择项目类型',
@@ -36,7 +64,7 @@ const searchConfig = reactive([
},
{
label: '项目影响',
prop: 'projectEffect',
prop: 'projectImpact',
component: shallowRef(fvSelect),
props: {
cacheKey: 'project_impact',
@@ -48,7 +76,7 @@ const searchConfig = reactive([
},
{
label: '研发主体',
prop: 'collectType',
prop: 'rdSubject',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择研发主体',
@@ -57,39 +85,51 @@ const searchConfig = reactive([
filterable: true,
}
},
{
label: '起止时间',
prop: 'time',
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({
@@ -199,7 +239,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()
}