fix : 时间选择框为月份
This commit is contained in:
@@ -37,35 +37,23 @@ const schema = computed(() => {
|
||||
const baseForm = ref()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '关键词',
|
||||
prop: 'requirementName',
|
||||
label: '项目人员',
|
||||
prop: 'researchPersonnel',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入关键词查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目人员',
|
||||
prop: 'projectCost',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目人员查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true,
|
||||
cacheKey: ''
|
||||
placeholder: '请输入项目人员查询'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '时间',
|
||||
prop: 'datetime',
|
||||
prop: 'time',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择时间',
|
||||
type:'month',
|
||||
placeholder: '请选择月份',
|
||||
clearable: true,
|
||||
format: 'YYYY-MM',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
}
|
||||
}
|
||||
])
|
||||
@@ -87,10 +75,7 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'researchPersonnel',
|
||||
label: '研发人员',
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{getResearchName(row.researchPersonnel)}</span>
|
||||
}
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'wagesPayable',
|
||||
@@ -138,21 +123,25 @@ const tableConfig = reactive({
|
||||
projectId: route.query.id
|
||||
}
|
||||
})
|
||||
const researchOptions = ref([])
|
||||
const getResearchOptions = async () => {
|
||||
const res = await getResearchUser()
|
||||
researchOptions.value = res.data
|
||||
}
|
||||
const getResearchName=(id)=>{
|
||||
if(!id)return;
|
||||
let label=''
|
||||
researchOptions.value.forEach(item=>{
|
||||
if(item.value==id){
|
||||
label=item.label
|
||||
}
|
||||
})
|
||||
return label
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val, projectId: route.query.id}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
// const researchOptions = ref([])
|
||||
// const getResearchOptions = async () => {
|
||||
// const res = await getResearchUser()
|
||||
// researchOptions.value = res.data
|
||||
// }
|
||||
// const getResearchName=(id)=>{
|
||||
// if(!id)return;
|
||||
// let label=''
|
||||
// researchOptions.value.forEach(item=>{
|
||||
// if(item.value==id){
|
||||
// label=item.label
|
||||
// }
|
||||
// })
|
||||
// return label
|
||||
// }
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
@@ -161,7 +150,7 @@ const getBaseInfo = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
getResearchOptions()
|
||||
// getResearchOptions()
|
||||
getBaseInfo()
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user