大屏页面初始化
This commit is contained in:
@@ -50,7 +50,7 @@ import WorkIndex from './screen/Work/index.vue';
|
||||
|
||||
import { getHomeModuleList } from '@/api/bizApi'
|
||||
|
||||
const screenTitle = ref('个人业务可视化看板');
|
||||
const screenTitle = ref('个人数字化可视化看板');
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
|
||||
const FormValues = ref({
|
||||
|
||||
@@ -15,6 +15,21 @@
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="交易类型:" class="form-item">
|
||||
<el-select
|
||||
v-model="searchForm.transactionType"
|
||||
placeholder="请选择交易类型"
|
||||
clearable
|
||||
class="custom-select"
|
||||
teleport="body"
|
||||
popper-class="theme-select-popper"
|
||||
:popper-append-to-body="true"
|
||||
@change="getTranTypes"
|
||||
>
|
||||
<el-option label="收入" value="2" />
|
||||
<el-option label="支出" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="交易分类:" class="form-item">
|
||||
<el-select
|
||||
v-model="searchForm.categoryId"
|
||||
@@ -33,20 +48,6 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="交易类型:" class="form-item">
|
||||
<el-select
|
||||
v-model="searchForm.transactionType"
|
||||
placeholder="请选择交易类型"
|
||||
clearable
|
||||
class="custom-select"
|
||||
teleport="body"
|
||||
popper-class="theme-select-popper"
|
||||
:popper-append-to-body="true"
|
||||
>
|
||||
<el-option label="收入" value="2" />
|
||||
<el-option label="支出" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item class="form-btn-group">
|
||||
<el-button type="primary" @click="handleSearch">查询</el-button>
|
||||
@@ -125,7 +126,6 @@ const emit = defineEmits(['close'])
|
||||
const handleClose = () => emit('close')
|
||||
|
||||
const tranTypes = ref();
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
const searchForm = reactive({
|
||||
@@ -135,7 +135,6 @@ const searchForm = reactive({
|
||||
})
|
||||
|
||||
const tableData = ref([]);
|
||||
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(20);
|
||||
const total = ref(0);
|
||||
@@ -165,7 +164,10 @@ const handleCurrentChange = (val) => {
|
||||
|
||||
async function getTranTypes(){
|
||||
try {
|
||||
const res = await getErpCategoryList();
|
||||
const params = {
|
||||
categoryType: searchForm.transactionType,
|
||||
}
|
||||
const res = await getErpCategoryList(params);
|
||||
tranTypes.value = res || [];
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mini.mybigscreen.biz.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mini.mybigscreen.Model.Result;
|
||||
import com.mini.mybigscreen.biz.domain.ErpCategory;
|
||||
import com.mini.mybigscreen.biz.service.ErpCategoryService;
|
||||
@@ -27,7 +29,10 @@ public class ErpCategoryController {
|
||||
private ErpCategoryService categoryService;
|
||||
|
||||
@GetMapping("list")
|
||||
public Result<List<ErpCategory>> getList() {
|
||||
return Result.success(categoryService.list());
|
||||
public Result<List<ErpCategory>> getList(String categoryType) {
|
||||
QueryWrapper<ErpCategory> query = new QueryWrapper<>();
|
||||
query.eq(StrUtil.isNotBlank(categoryType), "category_type", categoryType)
|
||||
.orderByDesc("create_time");
|
||||
return Result.success(categoryService.list(query));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user