From 9645a35c1303281cfac9cc02b8773f07f9320b8a Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期三, 27 八月 2025 00:20:32 +0800
Subject: [PATCH] 增加去空格的功能
---
src/views/tasks/machinereturnfiles.vue | 74 +++++++++++++++++++++++++++++++++++--
1 files changed, 70 insertions(+), 4 deletions(-)
diff --git a/src/views/tasks/machinereturnfiles.vue b/src/views/tasks/machinereturnfiles.vue
index 91f5f48..1a3492c 100644
--- a/src/views/tasks/machinereturnfiles.vue
+++ b/src/views/tasks/machinereturnfiles.vue
@@ -1,4 +1,9 @@
<template>
+ <div class="gongkongMain">
+ <div>
+ <el-tree :data="treeData" :props="defaultProps" node-key="id" :default-expand-all="false" :default-expanded-keys="defaultKeys" @node-click="handleNodeClick" />
+ </div>
+ <div>
<basic-container>
<avue-crud
:addBtn="false"
@@ -18,7 +23,7 @@
>
<template #menu-left>
<!-- el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleExport">瀵煎嚭</el-button> -->
- <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="receiveBtn">鎵归噺鎺ユ敹</el-button>
+ <el-button type="primary" :disabled="this.selection.length==0" size="default" icon="el-icon-circle-plus" plain @click="receiveBtn">鎵归噺鎺ユ敹</el-button>
</template>
<template #menu="scope">
<el-button type="primary" text size="default" icon="el-icon-document-delete" @click.stop="rejectBtn(scope.row, scope.index)">鎷掔粷</el-button>
@@ -26,6 +31,8 @@
</template>
</avue-crud>
</basic-container>
+ </div>
+ </div>
</template>
<script>
@@ -44,6 +51,13 @@
machineGroupCode: ""
},
loading: true,
+ treeData: [],
+ defaultProps: {
+ children: 'children',
+ label: 'name',
+ isLeaf: (data) => !data.hasChildren
+ },
+ currentNode:{},//褰撳墠鑺傜偣鏁版嵁
mypage: {
size: 10,
current: 1,
@@ -220,6 +234,10 @@
machineSpec: this.search.machineSpec,
current: this.mypage.current,
size: this.mypage.size,
+ nodeType: this.currentNode.nodeType,
+ nodeId: this.currentNode.nodeType!='dir'?this.currentNode.id:undefined,
+ dirType:this.currentNode.dirType,
+ machineCode: this.currentNode.machineCode,
}
axios({
url: '/blade-mdm/machineback/file/page',
@@ -237,11 +255,59 @@
}
);
- }
+ },
+ handleNodeClick(treeNode,b,c,d) {
+ console.log(treeNode)
+ this.currentNode = treeNode;
+ this.onLoad();
+ //this.fileName = "";
+ //this.searchTable(TreeNode);
+ },
+ treeLoad () {
+ axios({
+ url: '/blade-mdm/gkw/node/load-tree',
+ method: 'get',
+ }).then(
+ res => {
+ this.treeData = res.data.data;
+ var firstIndex = 0;
+ res.data.data.forEach((item,index)=> {
+ if(item.children.length != 0) {
+ firstIndex = index;
+ }
+ })
+ //defaultKeys.push(item.id);
+ this.defaultKeys = [res.data.data[firstIndex].id];
+ }
+ )
+ },
},
+ mounted() {
+ this.treeLoad();
+ }
};
</script>
-
<style lang="scss">
-
+.gongkongMain {
+ display: flex;
+ padding: 0px;
+ margin: 0px 7px 10px 7px;
+ background-color: #fff;
+ border-top: 1px solid #ccc;
+ > div {
+ padding: 12px;
+ }
+}
+.gongkongMain > div:nth-child(1) {
+ width:25%;
+ border-right: 1px solid #ccc;
+}
+.gongkongMain div:nth-child(2) {
+ flex: 1;
+}
+.paginationTree {
+ margin-top: 12px;
+ display: flex;
+ justify-content: flex-end;
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3