假期问题修复

This commit is contained in:
2025-02-23 19:22:59 +08:00
parent 54f615111f
commit 11918241bb
11 changed files with 222 additions and 143 deletions

View File

@@ -2,12 +2,24 @@
<el-card>
<h2>快捷入口</h2>
<div class="shortcut" v-for="(item, index) in shortcuts" :key="index">
<el-button type="primary" :icon="item.icon" @click="goTarget(item.url)">{{ item.name }}</el-button>
<el-badge :hidden="total===0" :value="total" class="item" v-if="item.name==='待办任务'">
<el-button type="primary" :icon="item.icon" @click="goTarget(item.url)">
{{ item.name }}
</el-button>
</el-badge>
<el-button type="primary" :icon="item.icon" v-else @click="goTarget(item.url)">
{{ item.name }}
</el-button>
</div>
</el-card>
</template>
<script>
import {listTodoProcess} from "../../api/workflow/process";
export default {
name: 'QuickAccess',
data() {
@@ -16,7 +28,19 @@ export default {
{ name: '人员考勤' ,url:'produce/attendance',icon:'el-icon-data-line'},
{ name: '日常财务' ,url:'finance/finance',icon:'el-icon-edit-outline'},
{ name: '出库管理' ,url:'ware/oaOutWarehouse',icon:'el-icon-document'},
]
{ name: '待办任务' ,url:'work/todo',icon:'el-icon-s-unfold'},
],
// 日期范围
dateRange: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
category: null,
description: null
},
total:0
};
},
methods: {
@@ -25,7 +49,22 @@ export default {
this.$router.push({ path: href});
console.log(999,href)
},
/** 查询流程定义列表 */
getList() {
this.loading = true;
listTodoProcess(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
if(this.queryParams.description != null){
this.todoList = this.searchList(response.rows, this.queryParams.description);
}else {
this.todoList =response.rows;
}
this.total = response.total;
this.loading = false;
});
},
},
mounted() {
this.getList()
}
};
</script>