大屏页面初始化
This commit is contained in:
@@ -50,7 +50,7 @@ import WorkIndex from './screen/Work/index.vue';
|
|||||||
|
|
||||||
import { getHomeModuleList } from '@/api/bizApi'
|
import { getHomeModuleList } from '@/api/bizApi'
|
||||||
|
|
||||||
const screenTitle = ref('个人业务可视化看板');
|
const screenTitle = ref('个人数字化可视化看板');
|
||||||
const currentYear = new Date().getFullYear().toString();
|
const currentYear = new Date().getFullYear().toString();
|
||||||
|
|
||||||
const FormValues = ref({
|
const FormValues = ref({
|
||||||
|
|||||||
@@ -15,6 +15,21 @@
|
|||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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-form-item label="交易分类:" class="form-item">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchForm.categoryId"
|
v-model="searchForm.categoryId"
|
||||||
@@ -33,20 +48,6 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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>
|
</div>
|
||||||
<el-form-item class="form-btn-group">
|
<el-form-item class="form-btn-group">
|
||||||
<el-button type="primary" @click="handleSearch">查询</el-button>
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
||||||
@@ -125,7 +126,6 @@ const emit = defineEmits(['close'])
|
|||||||
const handleClose = () => emit('close')
|
const handleClose = () => emit('close')
|
||||||
|
|
||||||
const tranTypes = ref();
|
const tranTypes = ref();
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
const searchForm = reactive({
|
const searchForm = reactive({
|
||||||
@@ -135,7 +135,6 @@ const searchForm = reactive({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const tableData = ref([]);
|
const tableData = ref([]);
|
||||||
|
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
const pageSize = ref(20);
|
const pageSize = ref(20);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
@@ -165,7 +164,10 @@ const handleCurrentChange = (val) => {
|
|||||||
|
|
||||||
async function getTranTypes(){
|
async function getTranTypes(){
|
||||||
try {
|
try {
|
||||||
const res = await getErpCategoryList();
|
const params = {
|
||||||
|
categoryType: searchForm.transactionType,
|
||||||
|
}
|
||||||
|
const res = await getErpCategoryList(params);
|
||||||
tranTypes.value = res || [];
|
tranTypes.value = res || [];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取数据失败:', error);
|
console.error('获取数据失败:', error);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.mini.mybigscreen.biz.controller;
|
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.Model.Result;
|
||||||
import com.mini.mybigscreen.biz.domain.ErpCategory;
|
import com.mini.mybigscreen.biz.domain.ErpCategory;
|
||||||
import com.mini.mybigscreen.biz.service.ErpCategoryService;
|
import com.mini.mybigscreen.biz.service.ErpCategoryService;
|
||||||
@@ -27,7 +29,10 @@ public class ErpCategoryController {
|
|||||||
private ErpCategoryService categoryService;
|
private ErpCategoryService categoryService;
|
||||||
|
|
||||||
@GetMapping("list")
|
@GetMapping("list")
|
||||||
public Result<List<ErpCategory>> getList() {
|
public Result<List<ErpCategory>> getList(String categoryType) {
|
||||||
return Result.success(categoryService.list());
|
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