From 9790e4011e85a365dcc679ae32b65c0349752f27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=A3=E4=BA=9B=E8=8A=B1=E5=84=BF?= <1156921458@qq.com>
Date: Thu, 18 Sep 2025 17:13:35 +0800
Subject: [PATCH] ..
---
.../views/platform/zhghh5/sys/home/todo.js | 311 ------------------
1 file changed, 311 deletions(-)
delete mode 100644 src/main/resources/views/platform/zhghh5/sys/home/todo.js
diff --git a/src/main/resources/views/platform/zhghh5/sys/home/todo.js b/src/main/resources/views/platform/zhghh5/sys/home/todo.js
deleted file mode 100644
index a4f6793f..00000000
--- a/src/main/resources/views/platform/zhghh5/sys/home/todo.js
+++ /dev/null
@@ -1,311 +0,0 @@
-const todo = {
- template: /*language=HTML*/ `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{row.taskName}}
- {{categoryOptions.find(item => item.id === row.category)?.name || '未知分类'}}
- {{row.variable?.initiatorName || '未知'}}
- {{processStatusMap[task.state]?.text || '未知状态'}}
-
-
-
-
- 查看
-
-
-
-
- `,
- data() {
- return {
- // 统计数据
- todoCount: 0,
- doneCount: 0,
- startedCount: 0,
-
- // 查询表单
- pageForm: {
- pageNumber: 1,
- pageSize: 10,
- totalCount: 0,
- searchKeyword: "",
- category: ""
- },
-
- // 流程类型选项
- categoryOptions: [],
- showCategoryPicker: false,
- categoryLabel: "",
-
- // 任务列表
- tasks: [],
- loading: false,
- finished: false,
- refreshing: false,
-
- // 标签页
- activeTab: "todo",
-
- processStatusMap: {
- 10: {text: "进行中", class: "doing"},
- 20: {text: "已完成", class: "finished"},
- 30: {text: "已撤回", class: "withdraw"},
- 40: {text: "强行终止", class: "interrupt"},
- 45: {text: "已拒绝", class: "reject"},
- 50: {text: "挂起", class: "pending"},
- 99: {text: "已废弃", class: "abandon"}
- }
- }
- },
- created() {
- this.initData();
- },
-
- methods: {
- // 初始化数据
- async initData() {
- await Promise.all([this.getStatistics(), this.listCategory()]);
- // 初始加载任务
- // this.getTasks();
- },
-
- // 获取统计数据
- async getStatistics() {
- try {
- const {code, data, msg} = await this.$axios.post("/flow/todoCenter/statistics");
- if (code === 0) {
- const {todoCount, doneCount, startedCount} = data
- this.todoCount = todoCount;
- this.doneCount = doneCount;
- this.startedCount = startedCount;
- }
- } catch (error) {
- this.$toast("获取统计数据失败");
- console.error("获取统计数据失败:", error);
- }
- },
-
- // 获取流程类型
- async listCategory() {
- try {
- // 这里使用模拟数据,实际项目中替换为API调用
- const res = await axios.post("/flow/category/list");
- if (res.data.code === 0) {
- this.categoryOptions = res.data.data;
- }
- } catch (error) {
- this.$toast("获取流程分类失败");
- console.error("获取流程分类失败:", error);
- }
- },
-
- // 获取任务列表
- async getTasks() {
- if (this.refreshing) {
- this.tasks = [];
- this.refreshing = false;
- }
-
- this.loading = true;
-
- try {
- const {code,data,msg} = await this.$axios.post("/flow/todoCenter/" + this.activeTab, this.pageForm);
- if (code === 0) {
- this.tasks = this.tasks.concat(data.list || []);
- this.pageForm.totalCount = data.totalCount;
- this.loading = false;
-
- // 数据全部加载完成
- if (this.tasks.length >= this.pageForm.totalCount) {
- this.finished = true;
- } else {
- this.pageForm.pageNumber++;
- }
- }
- } catch (error) {
- this.$toast("获取任务列表失败");
- console.error("获取任务列表失败:", error);
- this.loading = false;
- this.refreshing = false;
- }
- },
-
- // 处理标签页变化
- handleTabChange(name) {
- this.activeTab = name;
- this.pageForm.pageNumber = 1;
- this.tasks = [];
- this.finished = false;
- this.getTasks();
- this.getStatistics();
- },
-
- // 搜索
- search() {
- this.pageForm.pageNumber = 1;
- this.tasks = [];
- this.finished = false;
- this.getTasks();
- this.getStatistics();
- },
-
- // 重置搜索
- reset() {
- this.pageForm.searchKeyword = "";
- this.pageForm.category = "";
- this.categoryLabel = "";
- this.search();
- },
-
- // 分类选择确认
- onCategoryConfirm(value) {
- this.pageForm.category = value.id;
- this.categoryLabel = value.name;
- this.showCategoryPicker = false;
- },
-
- // 处理任务
- onView(task) {
- const {taskId, taskKey, instanceId, businessNo, formKey} = task;
-
- if (!formKey) {
- this.$toast("当前流程没有配置地址");
- return;
- }
- },
-
- // 获取空状态文本
- getEmptyText() {
- switch (this.activeTab) {
- case "todo":
- return "您当前没有需要办理的任务,辛苦了";
- case "done":
- return "您当前没有已办理的任务记录";
- case "started":
- return "您当前没有发起的流程";
- default:
- return "暂无数据";
- }
- }
- },
- style: /*language=CSS*/ `
- .task-center {
- margin: 0 auto;
- }
-
- ::v-deep .filter-section {
- margin-bottom: 16px;
- }
-
- .search-form {
- display: flex;
- background: #fff;
- padding: 12px 16px;
- border-radius: 8px;
- align-items: center;
- }
-
- .search-form .van-search{
- width: 100%;
- }
-
- .search-input {
- flex: 1;
- margin-right: 12px;
- }
-
- .task-list {
- margin-top: 16px;
- }
-
- ::v-deep .task-item {
- margin-bottom: 12px;
- overflow: hidden;
- background-color: #ffffff;
- }
-
- ::v-deep .task-content {
- padding: 16px;
- }
-
- ::v-deep .task-title {
- font-weight: 500;
- font-size: 16px;
- margin-bottom: 8px;
- color: #323233;
- }
-
- ::v-deep .task-info {
- display: flex;
- font-size: 14px;
- color: #969799;
- margin-bottom: 4px;
- }
-
- ::v-deep .task-info-label {
- width: 70px;
- flex-shrink: 0;
- }
-
- ::v-deep .task-info-value {
- flex: 1;
- }
-
- ::v-deep .task-footer {
- display: flex;
- justify-content: flex-end;
- margin-top: 12px;
- }
-
- ::v-deep .empty-section {
- padding: 40px 0;
- text-align: center;
- color: #969799;
- }
-
- .category-select {
- margin: 0 12px 12px 0;
- }
- `
-}