From 740c606022e8370d4576452e73ffbae36c8b303d Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期日, 24 八月 2025 13:49:47 +0800
Subject: [PATCH] 导出工控网不勾选禁用按钮
---
src/views/flowmgr/backImport2.vue | 184 +++++++++++++++++++++++++---------------------
1 files changed, 100 insertions(+), 84 deletions(-)
diff --git a/src/views/flowmgr/backImport2.vue b/src/views/flowmgr/backImport2.vue
index 8d9ca0a..ba82556 100644
--- a/src/views/flowmgr/backImport2.vue
+++ b/src/views/flowmgr/backImport2.vue
@@ -1,8 +1,7 @@
<template>
<basic-container>
- <avue-crud :addBtn="false" :option="option" :table-loading="loading" :data="data" ref="crud" @current-change="currentChange"
- @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
- >
+ <avue-crud :addBtn="false" :option="option" :table-loading="loading" :data="data" ref="crud"
+ @current-change="currentChange" v-model:page="page" @search-change="searchChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
<template #menu-left>
<!-- <div style="display: flex;">
<el-button type="primary" size="default" icon="el-icon-circle-plus" @click="importData">瀵煎叆</el-button>
@@ -11,12 +10,12 @@
</div> -->
</template>
<template #menu="scope">
- <!-- <el-button type="primary" text size="default" @click.stop="fileView(scope.row, scope.index)">鏌ョ湅鏂囦欢</el-button> -->
+ <!-- <el-button type="primary" text size="default" @click.stop="fileView(scope.row, scope.index)">鏌ョ湅鏂囦欢</el-button> -->
</template>
</avue-crud>
<el-dialog title="鏂囦欢鍚嶇О" append-to-body v-model="fileViewModel">
<el-table :data="tableData" border @row-click="showContent" max-height="200" highlight-current-row>
- <el-table-column type="index" label="#" width="40" align="center"/>
+ <el-table-column type="index" label="#" width="40" align="center" />
<el-table-column prop="name" label="绋嬪簭鍚嶇О"></el-table-column>
</el-table>
<h4>绋嬪簭鍐呭</h4>
@@ -38,6 +37,7 @@
selection: [],
excelBox: false,
loading: false,
+ query:{},
option: {
addBtn: false,
editBtn: false,
@@ -45,33 +45,34 @@
labelWidth: 120,
emptyBtn: false,
searchShow: true,
+ searchEnter:true,
searchSpan: 8,
menu: false,
// selection: true,
column: [
{
- label: '鍏抽敭瀛�',
- prop: 'keyword',
- search: true,
- searchType: 'input',
- hide: true,
- viewDisplay: false,
+ label: '鍏抽敭瀛�',
+ prop: 'keyword',
+ search: true,
+ searchType: 'input',
+ hide: true,
+ viewDisplay: false,
},
{
- label: '瀵煎叆鏃堕棿',
- prop: 'createTime',
- type: 'datetime',
- format: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- search: true,
- searchRange: true,
- hide: true,
+ label: '瀵煎叆鏃堕棿',
+ prop: 'createTime',
+ type: 'datetime',
+ format: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ search: true,
+ searchRange: true,
+ hide: true,
},
{
label: '绋嬪簭鍖呭悕',
prop: 'name',
},
-
+
{
label: '鏈哄簥缂栧彿',
prop: 'machineCode',
@@ -83,12 +84,12 @@
],
},
page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- },
- form: {},
- query: {},
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ form: {},
+ query: {},
data: [],
excelForm: {},
excelOption: {
@@ -113,71 +114,86 @@
};
},
methods: {
+ searchChange(params, done) {
+ let data = {}
+ this.query = params;
+ this.page.currentPage = 1;
+ params.createTimeBegin = params?.createTime?.[0] || '';
+ params.createTimeEnd = params?.createTime?.[1] || '';
+ data = {
+ createTimeBegin: params.createTimeBegin || undefined,
+ createTimeEnd: params.createTimeEnd || undefined,
+ keyword: params.keyword || undefined,
+ }
+ this.query = data
+ 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 = {}) {
- console.log('onLoad', page, params);
- /*
- const data = {
- ...this.query,
- createTimeBegin: params.createTimeBegin,
- createTimeEnd: params.createTimeEnd,
- keyword: params.keyword || '',
- myProcessName: params.myProcessName || ''
- };*/
- params.createTimeBegin = params?.createTime?.[0] || '';
- params.createTimeEnd = params?.createTime?.[1] || '';
- const data = {
- ...this.query,
- createTimeBegin: params.createTimeBegin,
- createTimeEnd: params.createTimeEnd,
- keyword: params.keyword || ''
- };
- this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => {
- const data = res.data.data
- this.page.total = data.total;
- this.data = data.records.map(v=> {
- return {
- ...v,
- id: v.processInstanceId,
- }
- });
- this.loading = false;
- }, () => {
- this.data = [];
- this.loading = false;
- }).catch(err => {
- console.log(err)
- this.data = [];
- this.loading = false;
- });
- },
+ 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 data = {
+ ...this.query,
+ createTimeBegin: params.createTimeBegin,
+ createTimeEnd: params.createTimeEnd,
+ keyword: params.keyword || '',
+ myProcessName: params.myProcessName || ''
+ };*/
+ //params.createTimeBegin = params?.createTime;
+ //params.createTimeEnd = params?.createTime?.[1] || '';
+ const data = {
+ ...this.query,
+ createTimeBegin: params.createTimeBegin,
+ createTimeEnd: params.createTimeEnd,
+ keyword: params.keyword || ''
+ };
+ this.loading = true;
+ getList(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => {
+ const data = res.data.data
+ this.page.total = data.total;
+ this.data = data.records.map(v => {
+ return {
+ ...v,
+ id: v.processInstanceId,
+ }
+ });
+ this.loading = false;
+ }, () => {
+ this.data = [];
+ this.loading = false;
+ }).catch(err => {
+ console.log(err)
+ this.data = [];
+ this.loading = false;
+ });
+ },
showContent(row, column, event) {
- console.log(row,111)
+ console.log(row, 111)
axios({
url: '/blade-mdm/program/dncsendback/back-file-content',
method: 'get',
- params: {entryName: row.entryName}
+ params: { entryName: row.entryName }
}).then(
- res => {
- console.log(res)
- if(res.data.code === 200) {
+ res => {
+ console.log(res)
+ if (res.data.code === 200) {
this.appContent = res.data.data;
- } else {
+ } else {
this.appContent = '绋嬪簭鍐呭鍔犺浇澶辫触'
- }
- });
+ }
+ });
},
fileView(row) {
this.tableData = row.files;
@@ -200,7 +216,7 @@
},
handleWarehouse() {
if (this.selection.length == 0) {
- return this.$message.error("璇烽�夋嫨鏁版嵁")
+ return this.$message.error("璇烽�夋嫨鏁版嵁")
}
let selection = [];
this.selection.forEach(item => {
--
Gitblit v1.9.3