From 4d2aa5539f3f6c9dc6af14cf9864e1c8958a886d Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期二, 17 六月 2025 16:38:29 +0800
Subject: [PATCH] update

---
 src/api/basesetting/produceplan.js    |   18 ++++
 src/views/basesetting/produceplan.vue |  163 ++++++++++++++++++++++++++++++++++++++++
 src/views/flow/todolist.vue           |   49 ++++++-----
 3 files changed, 207 insertions(+), 23 deletions(-)

diff --git a/src/api/basesetting/produceplan.js b/src/api/basesetting/produceplan.js
new file mode 100644
index 0000000..7fb2df2
--- /dev/null
+++ b/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,
+    },
+  });
+};
\ No newline at end of file
diff --git a/src/views/basesetting/produceplan.vue b/src/views/basesetting/produceplan.vue
new file mode 100644
index 0000000..abd8620
--- /dev/null
+++ b/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>
\ No newline at end of file
diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index fc0148b..b0f2749 100644
--- a/src/views/flow/todolist.vue
+++ b/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();

--
Gitblit v1.9.3