年和月改成年月一起,排序图标颜色有激活和未激活的变化
This commit is contained in:
@@ -88,20 +88,20 @@
|
||||
></InputDateRange>
|
||||
</template>
|
||||
<template v-for="prop in yearRange" :key="prop" #[`${prop}-search`]="scope">
|
||||
<div style="display:flex;align-items:center;flex-direction:row"><el-date-picker
|
||||
v-model="tableSearch['useYearStart']"
|
||||
:type="scope.column.type"
|
||||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
placeholder="选择开始年份"
|
||||
<div style="display:flex;align-items:center;flex-direction:row" v-if="scope.column"><el-date-picker
|
||||
v-model="tableSearch['useYearMonthStart']"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="选择开始年月"
|
||||
/>
|
||||
<div class="px-5px">{{ t('Avue.control.to') }}</div>
|
||||
<el-date-picker
|
||||
v-model="tableSearch['useYearEnd']"
|
||||
:type="scope.column.type"
|
||||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
placeholder="选择结束年份"
|
||||
v-model="tableSearch['useYearMonthEnd']"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="选择结束年月"
|
||||
/></div>
|
||||
</template>
|
||||
<template v-for="prop in monthRange" :key="prop" #[`${prop}-search`]="scope">
|
||||
@@ -439,12 +439,14 @@ const initTable = async () => {
|
||||
config.valueFormat = 'YYYY'
|
||||
if(props.reportCode=='ZHXSQK'){
|
||||
config.searchSpan=5
|
||||
config.searchLabel='年月'
|
||||
yearRange.value.push(item.fieldCode)
|
||||
}
|
||||
}else if(item.fieldName.includes('月')){
|
||||
if(props.reportCode=='ZHXSQK'){
|
||||
monthRange.value.push(item.fieldCode)
|
||||
config.searchSpan=4
|
||||
config.search=false
|
||||
}
|
||||
config.searchType='select'
|
||||
config.dicData=[{label:'1月',value:'1'},{label:'2月',value:'2'},{label:'3月',value:'3'},{label:'4月',value:'4'},{label:'5月',value:'5'},{label:'6月',value:'6'},{label:'7月',value:'7'},{label:'8月',value:'8'},{label:'9月',value:'9'},{label:'10月',value:'10'},{label:'11月',value:'11'},{label:'12月',value:'12'}]
|
||||
@@ -457,6 +459,16 @@ const initTable = async () => {
|
||||
tableSearch.value[config.prop+'End']=defualtSearch.value[config.prop]
|
||||
defualtSearch.value[config.prop+'Start']=defualtSearch.value[config.prop]
|
||||
defualtSearch.value[config.prop+'End']=defualtSearch.value[config.prop]
|
||||
if(config.prop=='useYear'){
|
||||
tableSearch.value['useYearMonthStart']=defualtSearch.value[config.prop]+'-01'
|
||||
tableSearch.value['useYearMonthEnd']=defualtSearch.value[config.prop]+'-12'
|
||||
}else if(config.prop=='useMonth'){
|
||||
const month=defualtSearch.value[config.prop]>10?defualtSearch.value[config.prop]:'0'+defualtSearch.value[config.prop]
|
||||
tableSearch.value['useYearMonthStart']=tableSearch.value['useYearStart']+'-'+month
|
||||
tableSearch.value['useYearMonthEnd']=tableSearch.value['useYearEnd']+'-'+month
|
||||
}
|
||||
defualtSearch.value['useYearMonthStart']=tableSearch.value['useYearMonthStart']
|
||||
defualtSearch.value['useYearMonthEnd']=tableSearch.value['useYearMonthEnd']
|
||||
delete defualtSearch.value[config.prop]
|
||||
delete tableSearch.value[config.prop]
|
||||
}
|
||||
@@ -894,6 +906,14 @@ const clearSearch = () => {
|
||||
|
||||
const searchChange = async (params?, done?) => {
|
||||
if (tablePage.value) tablePage.value['currentPage'] = 1
|
||||
if(tableSearch.value['useYearMonthStart']){
|
||||
tableSearch.value['useYearStart']=tableSearch.value['useYearMonthStart'].split('-')[0]
|
||||
tableSearch.value['useMonthStart']=Number(tableSearch.value['useYearMonthStart'].split('-')[1])
|
||||
}
|
||||
if(tableSearch.value['useYearMonthEnd']){
|
||||
tableSearch.value['useYearEnd']=tableSearch.value['useYearMonthEnd'].split('-')[0]
|
||||
tableSearch.value['useMonthEnd']=Number(tableSearch.value['useYearMonthEnd'].split('-')[1])
|
||||
}
|
||||
await getTableData()
|
||||
|
||||
if (done) done()
|
||||
@@ -1000,10 +1020,16 @@ defineExpose({
|
||||
|
||||
}
|
||||
.sort-caret.ascending{
|
||||
border-bottom-color: #000 ;
|
||||
border-bottom-color: #737476 ;
|
||||
}
|
||||
.sort-caret.descending {
|
||||
border-top-color: #000 ;
|
||||
border-top-color: #737476 ;
|
||||
}
|
||||
.ascending .sort-caret.ascending{
|
||||
border-bottom-color: #000 ;
|
||||
}
|
||||
.descending .sort-caret.descending{
|
||||
border-top-color: #000 ;
|
||||
}
|
||||
td.textAlignCell .cell{
|
||||
span{
|
||||
|
||||
Reference in New Issue
Block a user