gaoshp
2025-06-20 9a4505c3b54df6338a563979ba916f328542406d
添加流程超时页面
已修改1个文件
已添加1个文件
142 ■■■■■ 文件已修改
src/api/tasks/timeouts.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tasks/timeouts.vue 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tasks/timeouts.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
/*
 * @Date: 2025-06-12 22:38:05
 * @LastEditors: gaoshp
 * @LastEditTime: 2025-06-20 21:11:25
 * @FilePath: /mdmweb/src/api/tasks/timeouts.js
 */
import request from '@/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/blade-mdm/machineback/filehandle/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    },
  })
};
src/views/tasks/timeouts.vue
@@ -1,28 +1,142 @@
<!--
 * @Date: 2025-06-20 20:48:17
 * @LastEditors: gaoshp
 * @LastEditTime: 2025-06-20 20:48:32
 * @LastEditTime: 2025-06-20 21:14:47
 * @FilePath: /mdmweb/src/views/tasks/timeouts.vue
-->
<template>
    <div>
    </div>
    <basic-container>
        <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud" @current-change="currentChange"
            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            <template #menu-left>
                <!-- <el-button type="primary" plain @click="exportWebSite">导出回传涉密网</el-button>
                <el-button type="primary" plain @click="reassign">挂载车床程序库</el-button>
                <el-button type="primary" plain @click="exportExcel">导出到EXCEL</el-button> -->
            </template>
            <template #menu="scope">
                <el-button type="primary" text size="default"
                    @click.stop="handleAction(scope.row, scope.index)">处理意见
                </el-button>
            </template>
        </avue-crud>
    </basic-container>
</template>
<script>
    import { getList } from '@/api/tasks/machinereturnfileop.js';
    export default {
    name: 'Timeouts',
    data() {
        return {
            // Define your data properties here
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0,
            },
            form: {},
            query: {},
            loading: true,
            data: [],
            option: {
                addBtn: false,
                editBtn: false,
                delBtn: false,
                viewBtn: true,
                columnBtn: false,
                tip: false,
                // simplePage: true,
                searchShow: true,
                searchMenuSpan: 6,
                dialogWidth: '60%',
                // tree: true,
                border: true,
                index: true,
                selection: true,
                // viewBtn: true,
                menuWidth: 200,
                // menu: false,
                dialogClickModal: false,
                column: [
                    {
                        label: '告警编号',
                        prop: '',
                    },
                    {
                        label: '流程名称',
                        prop: '',
                    },
                    {
                        label: '执行人员',
                        prop: '',
                    },
                    {
                        label: '任务节点',
                        prop: '',
                    },
                    {
                        label: '任务到达时间',
                        prop: '',
                        type: 'datetime',
                        format: 'YYYY-MM-DD HH:mm:ss',
                        valueFormat: 'YYYY-MM-DD HH:mm:ss',
                    },
                    {
                        label: '要求完成时间',
                        prop: '',
                        type: 'datetime',
                        format: 'YYYY-MM-DD HH:mm:ss',
                        valueFormat: 'YYYY-MM-DD HH:mm:ss',
                    },
                ],
            }
        };
    },
    methods: {
        // Define your methods here
        currentChange(currentPage) {
            this.page.currentPage = currentPage;
            // this.onLoad();
        },
        sizeChange(pageSize) {
            this.page.pageSize = pageSize;
        },
        refreshChange() {
            this.onLoad(this.page, this.query);
        },
        /** * é¡µé¢åŠ è½½æ—¶èŽ·å–æ•°æ®
         */
        onLoad(page, params = {}) {
            console.log('onLoad', page, params);
            const query = {
                ...this.query,
                // category: params.category ? flowCategory(params.category) : null,
                mode: this.mode,
            };
            try {
                delete query.confirmTime; // åˆ é™¤ä¸å¿…要的查询条件
            } catch (error) {
                console.error('日期格式化错误', error);
            }
            this.loading = true;
            getList(page.currentPage, page.pageSize, Object.assign(query, params)).then(res => {
                const data = res.data.data;
                this.page.total = data.total;
                this.data = data.records;
                this.loading = false;
            }, () => {
                this.data = [];
                this.loading = false;
            }).catch(err => {
                this.data = [];
                this.loading = false;
            });
        }
    },
    mounted() {
    }
}
</script>