fix(operator): fix operator edit issue
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m51s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m51s
This commit is contained in:
@@ -25,10 +25,9 @@
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
style="width: 360px"
|
||||
@change="handleDateChange"
|
||||
/>
|
||||
<ElButton type="primary" @click="handleFilterChange">查询</ElButton>
|
||||
<ElButton @click="handleResetFilter">重置</ElButton>
|
||||
<ElButton type="primary" @click="handleQuery">查询</ElButton>
|
||||
<ElButton @click="handleReset">重置</ElButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -194,28 +193,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 处理日期范围变化
|
||||
const handleDateChange = (value: [Date, Date] | null) => {
|
||||
if (value && value.length === 2) {
|
||||
// 转换为 RFC3339 格式
|
||||
queryParams.value.start_time = value[0].toISOString()
|
||||
queryParams.value.end_time = value[1].toISOString()
|
||||
// 处理查询按钮点击
|
||||
const handleQuery = () => {
|
||||
queryParams.value.page = 1
|
||||
pagination.value.page = 1
|
||||
queryParams.value.transaction_type = filterForm.value.transaction_type
|
||||
|
||||
// 处理日期范围
|
||||
if (filterForm.value.date_range && filterForm.value.date_range.length === 2) {
|
||||
queryParams.value.start_time = filterForm.value.date_range[0].toISOString()
|
||||
queryParams.value.end_time = filterForm.value.date_range[1].toISOString()
|
||||
} else {
|
||||
queryParams.value.start_time = null
|
||||
queryParams.value.end_time = null
|
||||
}
|
||||
}
|
||||
|
||||
// 处理筛选条件变化
|
||||
const handleFilterChange = () => {
|
||||
queryParams.value.page = 1
|
||||
pagination.value.page = 1
|
||||
queryParams.value.transaction_type = filterForm.value.transaction_type
|
||||
loadTransactions()
|
||||
}
|
||||
|
||||
// 重置筛选条件
|
||||
const handleResetFilter = () => {
|
||||
// 处理重置按钮点击
|
||||
const handleReset = () => {
|
||||
filterForm.value = {
|
||||
transaction_type: null,
|
||||
date_range: null
|
||||
@@ -254,7 +251,7 @@
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
// 重置状态
|
||||
handleResetFilter()
|
||||
handleReset()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
|
||||
Reference in New Issue
Block a user