From 5a22ba2359944f158428dc4a21a963559c73de00 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期五, 20 六月 2025 09:04:39 +0800
Subject: [PATCH] 机床回传程序处理
---
src/views/tasks/machinereturnfileop.vue | 185 ++++++++++++++++++++++++++++++++++++++++++++++
src/api/tasks/machinereturnfileop.js | 18 ++++
src/views/flow/todolist.vue | 6 -
3 files changed, 203 insertions(+), 6 deletions(-)
diff --git a/src/api/tasks/machinereturnfileop.js b/src/api/tasks/machinereturnfileop.js
new file mode 100644
index 0000000..53c3974
--- /dev/null
+++ b/src/api/tasks/machinereturnfileop.js
@@ -0,0 +1,18 @@
+/*
+ * @Date: 2025-06-12 22:38:05
+ * @LastEditors: gaoshp
+ * @LastEditTime: 2025-06-20 08:32:12
+ * @FilePath: /mdmweb/src/api/tasks/machinereturnfileop.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,
+ },
+ })
+};
\ No newline at end of file
diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index 404db80..18d7217 100644
--- a/src/views/flow/todolist.vue
+++ b/src/views/flow/todolist.vue
@@ -88,11 +88,6 @@
form: {},
query: {},
loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- },
option: {
addBtn: false,
editBtn: false,
@@ -110,7 +105,6 @@
// viewBtn: true,
menuWidth: 100,
dialogClickModal: false,
-
column: [
{
label: '鍏抽敭瀛�',
diff --git a/src/views/tasks/machinereturnfileop.vue b/src/views/tasks/machinereturnfileop.vue
new file mode 100644
index 0000000..4dadcf5
--- /dev/null
+++ b/src/views/tasks/machinereturnfileop.vue
@@ -0,0 +1,185 @@
+<!--
+ * @Date: 2025-06-18 09:17:09
+ * @LastEditors: gaoshp
+ * @LastEditTime: 2025-06-20 09:03:42
+ * @FilePath: /mdmweb/src/views/tasks/machinereturnfileop.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="reassign">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button>
+ <el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button>
+ <el-button type="primary" plain @click="reassign">瀵煎嚭鍒癊XCEL</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/tasks/machinereturnfileop.js';
+export default {
+ name: 'MachineReturnFileOp',
+ data() {
+ return {
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ form: {},
+ query: {},
+ loading: true,
+ data: [],
+ option: {
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ columnBtn: false,
+ tip: false,
+ // simplePage: true,
+ searchShow: true,
+ searchMenuSpan: 6,
+ dialogWidth: '60%',
+ // tree: true,
+ border: true,
+ index: true,
+ selection: true,
+ // viewBtn: true,
+ menuWidth: 100,
+ dialogClickModal: false,
+ column: [
+ {
+ label: '纭鏃堕棿',
+ prop: '',
+ type: 'datetime',
+ format: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ search: true,
+ searchRange: true,
+ searchSpan: 8,
+ hide: true,
+ },
+
+ {
+ label: '绋嬪簭缂栧彿',
+ prop: 'processDefinitionName',
+ },
+ {
+ label: '鍥炰紶鏈哄簥',
+ prop: 'processDefinitionName',
+ },
+
+ {
+ label: '鏂囦欢鍚嶇О',
+ prop: '',
+ formatter: (val, value, label) => {
+ return `${val?.variables?.machineCode}`;
+ },
+ },
+ {
+ label: '鏂囦欢鍥哄寲鐘舵��',
+ prop: 'startUserName',
+ },
+ {
+ label: '鏂囦欢鍒拌揪鏃堕棿',
+ prop: 'processCreateTime',
+ type: 'datetime',
+ format: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ },
+ {
+ label: '鏂囦欢鏁版嵁搴撶紪鍙�',
+ prop: 'createTime',
+ },
+ ],
+ }
+ }
+ },
+ methods: {
+ reassign() {
+
+ },
+ searchChange(params, done) {
+ let data = {}
+ this.query = params;
+ this.page.currentPage = 1;
+ console.log('searchChange', params);
+ params.createTimeBegin = params?.processCreateTime?.[0] || '';
+ params.createTimeEnd = params?.processCreateTime?.[1] || '';
+ console.log(params);
+ // data = {
+ // createTimeBegin: dayjs(params.createTimeBegin).isValid() ? dayjs(params.createTimeBegin).format('YYYY-MM-DD') : '',
+ // createTimeEnd: dayjs(params.createTimeEnd).isValid() ? dayjs(params.createTimeEnd).format('YYYY-MM-DD') : '',
+ // keyword: params.keyword || ''
+ // }
+ data = {
+ createTimeBegin: params.createTimeBegin,
+ createTimeEnd: params.createTimeEnd,
+ keyword: params.keyword || ''
+ }
+ this.onLoad(this.page, data);
+ done();
+ },
+ searchReset() {
+ let data = {}
+ this.query = params;
+ this.page.currentPage = 1;
+ data = {
+ createTimeBegin: params.createTimeBegin,
+ createTimeEnd: params.createTimeEnd,
+ keyword: params.keyword || ''
+ }
+ this.onLoad(this.page, data);
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ // this.onLoad();
+ },
+ sizeChange(pageSize) {
+ 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,
+ };
+ try {
+ delete query.processCreateTime; // 鍒犻櫎涓嶅繀瑕佺殑鏌ヨ鏉′欢
+ } 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;
+ });
+ }
+ }
+};
+</script>
+
+<style lang="scss" scoped></style>
\ No newline at end of file
--
Gitblit v1.9.3