From 48ad70d6c9dca8d62d0c3120f8dba640272db4a5 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 05 九月 2023 14:52:55 +0800
Subject: [PATCH] 	modified:   src/api/laboratory/organizational.js 	modified:   src/views/experiment/planAssignments/plan.vue 	modified:   src/views/laboratory/ledger/index.vue 	modified:   src/views/standardLibrary/index.vue

---
 src/views/standardLibrary/index.vue |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/views/standardLibrary/index.vue b/src/views/standardLibrary/index.vue
index 8adee1f..2f37add 100644
--- a/src/views/standardLibrary/index.vue
+++ b/src/views/standardLibrary/index.vue
@@ -2,10 +2,10 @@
 	<div class="standard-library-main">
 		<div class="content-main">
 			<div class="library-bom" style="width: 300px">
-				<el-input v-model="filterText" placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�"></el-input>
+				<el-input clearable v-model="filterText" placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�"></el-input>
 				<el-button type="text">鍏ㄩ儴</el-button>
 				<el-tree ref="tree" style="width: 100%" class="filter-tree" :data="standardTree" :props="defaultProps"
-					node-key="id" highlight-current default-expand-all :filter-node-method="filterNode"
+					node-key="id" :highlight-current="true" :default-expand-all="true" :filter-node-method="filterNode"
 					:render-content="renderContent" @node-click="nodeClick" />
 			</div>
 			<div class="library-table" style="width: 80%">
@@ -108,6 +108,7 @@
 	export default {
 		data() {
 			return {
+				filterNodeData: [],
 				options: [],
 				versionValue: "",
 				deleteList: [],
@@ -167,7 +168,8 @@
 			},
 			async insertVersion() {
 				const resp = await addVersion({
-					specificationsId: this.selectData.id
+					specificationsId: this.selectData.id,
+					version: this.versionValue
 				});
 				if (resp.code === 200) {
 					this.initSelect();
@@ -188,7 +190,7 @@
 					})
 					.catch(() => {});
 			},
-			filterNode(value, data) {
+			filterNode(value, data,node) {
 				if (!value) return true;
 				return data.name.indexOf(value) !== -1;
 			},
@@ -241,6 +243,7 @@
 						//TODO handle the exception
 					}
 				});
+
 			},
 			getDefault(arr, index) {
 				for (const item of arr) {
@@ -359,6 +362,8 @@
 				this.addTreeFormVisible = false;
 				this.getStandardTree();
 				this.getTableByClick(this.selectData, this.versionValue);
+				this.addTreeForm=null
+				this.addTreeForm.addTypeArr=[]
 			},
 			changeCascader(data) {
 				this.addTreeForm.addTypeArr = data;
@@ -379,14 +384,18 @@
 				});
 			},
 			selectDataList() {
+				let i=0
 				this.tableData.forEach((a) => {
+					a.id="0"+i
 					a.code = "[1]";
+					i++;
 					if (a.children != undefined) {
 						a.children.forEach((b) => {
 							b.code = "[2]";
 						});
 					}
 				});
+				console.log(this.tableData);
 			},
 			// 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆
 			// 鍏ㄩ��/鍙栨秷閫夋搷浣�

--
Gitblit v1.9.3