|
|
@@ -31,11 +31,9 @@
|
|
|
<a-select
|
|
|
v-if="typeVal == 0"
|
|
|
v-model:value="typeValue"
|
|
|
- show-search
|
|
|
placeholder="所有分类"
|
|
|
style="width: 100px"
|
|
|
:options="typeOptions"
|
|
|
- :filter-option="filterOption"
|
|
|
@change="handleChange"
|
|
|
allowClear
|
|
|
></a-select>
|
|
|
@@ -202,19 +200,15 @@
|
|
|
const handleChange = (value) => {
|
|
|
exType.value = false
|
|
|
searchFormState.typeId = value
|
|
|
- if (searchFormState.sortOrder > 1) {
|
|
|
- searchFormState.sortOrder = 0
|
|
|
- }
|
|
|
resetLoad()
|
|
|
}
|
|
|
const handleChangeVal = (value) => {
|
|
|
exType.value = false
|
|
|
searchFormState.postType = value
|
|
|
+ searchFormState.typeId = ''
|
|
|
+ typeValue.value = '所有分类'
|
|
|
resetLoad()
|
|
|
}
|
|
|
- const filterOption = (input, option) => {
|
|
|
- return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- }
|
|
|
function formatDateTime(val) {
|
|
|
if (!val) return ''
|
|
|
return parseTime(val, '{y}-{m}-{d} {h}:{i}:{s}')
|
|
|
@@ -261,7 +255,7 @@
|
|
|
const loadData = (parameter, a) => {
|
|
|
if (exType.value) {
|
|
|
let postExtend = moduleTypeList.value.filter((r) => r.id == searchFormState.sortOrder)[0]?.state
|
|
|
- return forumApi.moreList(Object.assign(parameter, { postExtend: postExtend })).then((data) => {
|
|
|
+ return forumApi.moreList(Object.assign(parameter,searchFormState, { postExtend: postExtend })).then((data) => {
|
|
|
tableTotal.value = data.total
|
|
|
if (a) {
|
|
|
tableData.value = Object.assign(tableData.value, data.records)
|
|
|
@@ -295,10 +289,6 @@
|
|
|
searchFormState.sortOrder = value
|
|
|
pagination.value.current = 1
|
|
|
moreText.value = '加载更多'
|
|
|
- if (t == 2) {
|
|
|
- exType.value = true
|
|
|
- typeValue.value = '所有分类'
|
|
|
- }
|
|
|
loadData(pagination.value)
|
|
|
}
|
|
|
const moreText = ref()
|