gaoshp
2025-06-17 4d2aa5539f3f6c9dc6af14cf9864e1c8958a886d
update
已修改1个文件
已添加2个文件
230 ■■■■■ 文件已修改
src/api/basesetting/produceplan.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basesetting/produceplan.vue 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flow/todolist.vue 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basesetting/produceplan.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
/*
 * @Date: 2025-06-17 15:22:15
 * @LastEditors: gaoshp
 * @LastEditTime: 2025-06-17 15:23:02
 * @FilePath: /mdmweb/src/api/basesetting/produceplan.js
 */
import request from '@/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/blade-mdm/producedivision/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    },
  });
};
src/views/basesetting/produceplan.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,163 @@
<!--
 * @Date: 2025-06-17 11:44:52
 * @LastEditors: gaoshp
 * @LastEditTime: 2025-06-17 16:16:28
 * @FilePath: /mdmweb/src/views/basesetting/produceplan.vue
-->
<template>
    <basic-container>
        <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
            @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            <template #menu-left>
                <el-button type="primary" plain @click="importAction">导入
                </el-button>
            </template>
            <template #menu="scope">
                <el-button type="primary" text size="default" v-if="permission.flow_model_update"
                    @click.stop="handleAction(scope.row, scope.index)">审批
                </el-button>
            </template>
        </avue-crud>
    </basic-container>
</template>
<script>
import { getList } from '@/api/basesetting/produceplan';
import { mapGetters } from 'vuex';
export default {
    name: 'ProducePlan',
    data() {
        return {
            // Define your data properties here
            option: {
                // Define your Avue CRUD options here
                addBtn: true,
                editBtn: true,
                delBtn: true,
                columnBtn: false,
                tip: false,
                // simplePage: true,
                searchShow: true,
                searchMenuSpan: 6,
                dialogWidth: '60%',
                // tree: true,
                border: true,
                index: true,
                // selection: true,
                // viewBtn: true,
                menuWidth: 320,
                dialogClickModal: false,
                column: [
                    {
                        label: '程序名称',
                        prop: 'name',
                        type: 'input',
                        search: true,
                        searchRange: true,
                        searchSpan: 8,
                        hide: true,
                    },
                    {
                        label: '人员名称',
                        prop: 'name',
                        type: 'input',
                        search: true,
                        searchRange: true,
                        searchSpan: 8,
                        hide: true,
                    },
                    // {
                    //     label: '序号',
                    //     prop: 'index',
                    //     type: 'index',
                    // },
                    {
                        label: '零组件代码',
                        prop: 'id',
                        type: '',
                    },
                    {
                        label: '专业组长',
                        prop: 'teamLeaderName',
                        type: '',
                    },
                    {
                        label: '编制(工艺员)',
                        prop: 'teamLeaderName',
                        type: '',
                    },
                    {
                        label: '校对(工艺员)',
                        prop: 'checkerName',
                        type: '',
                    },
                    {
                        label: '审核(高师)',
                        prop: 'seniorName',
                        type: '',
                    },
                    // Add more columns as needed
                ],
            },
            loading: false,
            data: [], // This will hold the data for the tables
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0,
            },
            form: {}, // This will hold the form data
            query: {}, // This will hold the search query
        };
    },
    methods: {
        // Define your methods here
        searchChange(params, done) {
            this.query = params;
            this.page.currentPage = 1;
            console.log('searchChange', params);
            console.log(params);
            this.onLoad(this.page, params);
            done();
        },
        searchReset() {
            this.query = {};
            this.onLoad(this.page);
         },
        currentChange() {
            this.page.currentPage = currentPage;
        },
        sizeChange() {
            this.page.pageSize = pageSize;
         },
        refreshChange() {
            this.onLoad(this.page, this.query);
         },
        onLoad(page, params = {}) {
            const query = {
                ...this.query,
                // category: params.category ? flowCategory(params.category) : null,
                mode: this.mode,
            };
            this.loading = true;
            getList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
                const data = res.data.data;
                this.page.total = data.total;
                this.data = data.records;
                this.loading = false;
            });
        },
        importAction() {
            // Logic for importing data
            this.$message.success('导入功能尚未实现');
        },
    },
    mounted() {
        // Code to run when the component is mounted
    },
}
</script>
<style lang="scss" scoped></style>
src/views/flow/todolist.vue
@@ -1,8 +1,8 @@
<template>
    <basic-container>
        <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
            @search-change="searchChange" @search-reset="searchReset"
            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            <template #menu-left>
                <el-button type="primary" plain @click="reassign">重新指派
                </el-button>
@@ -41,7 +41,7 @@
            optionApprove: {
                labelWidth: 100,
                column: [
                    {
                        label: '审批结果',
                        prop: 'approve',
@@ -52,6 +52,17 @@
                            { label: '驳回', value: 'N' },
                        ],
                        rules: [{ required: true, message: '请选择审批结果', trigger: 'blur' }],
                    },
                    {
                        label: '下一审批用户',
                        prop: 'assignee',
                        type: 'select',
                        // dicUrl: '/blade-system/user/page',
                        span: 24,
                        dicData: [
                        ],
                        // rules: [{ required: true, message: '请选择下一审批用户', trigger: 'blur' }],
                    },
                    {
                        label: '备注',
@@ -70,8 +81,6 @@
            form: {},
            query: {},
            loading: true,
            selectionList: [],
            parentId: 0,
            page: {
                pageSize: 10,
                currentPage: 1,
@@ -94,6 +103,7 @@
                // viewBtn: true,
                menuWidth: 320,
                dialogClickModal: false,
                column: [
                    {
                        label: '创建时间',
@@ -124,12 +134,6 @@
                            },
                        ],
                    },
                    {
                        label: '编号',
                        prop: 'taskId',
                        width: 100,
                    },
                    {
                        label: '任务名称',
                        prop: 'taskName',
@@ -140,24 +144,23 @@
                        width: 100,
                        prop: 'processDefinitionName',
                    },
                    {
                        label: '实例编号',
                        width: 100,
                        type: 'processInstanceId',
                    },
                    {
                        label: '机床',
                        width: 100,
                        type: 'tree',
                        prop: '',
                        formatter: (val, value, label) => {
                            return `${val?.variables?.machineCode}`;
                        },
                    },
                    {
                        label: '创建人',
                        width: 100,
                        type: 'tree',
                        prop: '',
                    },
                    {
                        label: '创建时间',
                        width: 100,
                        width: 200,
                        prop: 'createTime',
                    },
                    {
@@ -167,7 +170,7 @@
                    },
                    {
                        label: '到达描述',
                        width: 100,
                        width: 200,
                        prop: 'comment',
                    },
                    {
@@ -216,7 +219,7 @@
            this.row = row
            console.log('handleAction', row, index);
        },
        handleSubmit (form,done) {
        handleSubmit(form, done) {
            approve({
                ...this.formApprove,
                taskId: this.row.taskId,
@@ -237,8 +240,8 @@
            this.query = params;
            this.page.currentPage = 1;
            console.log('searchChange', params);
            params.createTimeBegin = params.createTime[0] || '';
            params.createTimeEnd = params.createTime[1] || '';
            params.createTimeBegin = params?.createTime?.[0] || '';
            params.createTimeEnd = params?.createTime?.[1] || '';
            console.log(params);
            this.onLoad(this.page, params);
            done();