From 74a135c4f8b46d48a4997ac0e40ac86055b4a1a4 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 17 四月 2024 16:57:25 +0800
Subject: [PATCH] 优化标准库

---
 src/components/view/b2-standard.vue |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue
index d2ffaff..6271490 100644
--- a/src/components/view/b2-standard.vue
+++ b/src/components/view/b2-standard.vue
@@ -109,7 +109,8 @@
 			<el-tree :data="list" ref="tree" :props="{ children: 'children', label: 'label' }" node-key="label"
 				:filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen"
 				@node-collapse="nodeClose" v-loading="treeLoad" :expand-on-click-node="false"
-				:default-expanded-keys="expandedKeys">
+				:default-expanded-keys="expandedKeys"
+        style="max-height: 500px;overflow-y: scroll;scrollbar-width: none;">
 				<div class="custom-tree-node" slot-scope="{ node, data }">
 					<el-row style="width: 100%;">
 						<el-col :span="21" :class="{sort:node.level>3}">
@@ -128,20 +129,20 @@
 		</div>
 		<div class="right">
 			<el-row class="title">
-				<el-col :span="10" style="font-size: 14px;color: #999;">{{selectTree}}</el-col>
-				<el-col :span="selectTree==''?24:14" style="text-align: right;" v-if="selectTree!=''">
-					<!-- <el-button size="small" type="primary" @click="addStandardDia = true"
+				<el-col :span="24" style="font-size: 14px;color: #999;">{{selectTree}}</el-col>
+				<!-- <el-col :span="selectTree==''?24:14" style="text-align: right;" v-if="selectTree!=''">
+					<el-button size="small" type="primary" @click="addStandardDia = true"
 						v-if="addStandardMethod">鏂板鏍囧噯</el-button>
 					<el-button size="small" type="primary" @click="addProductDia = true" v-if="addStandardProduct">鏂板椤圭洰</el-button>
 					<el-button size="small" @click="delStandardProductByIds" v-if="delStandardProduct">
 						<i class="el-icon-delete" style="color: #3A7BFA;"></i>
 						<span style="color: #3A7BFA;">鍒犻櫎</span>
-					</el-button> -->
-				</el-col>
+					</el-button>
+				</el-col> -->
 			</el-row>
 			<el-row class="standard_table" v-loading="tableLoad">
 				<el-table class="el-table" :data="standardList" style="width: 100%;" height="220px" tooltip-effect="dark"
-					highlight-current-row @row-click="rowClick">
+					highlight-current-row @row-click="rowClick" ref="standard">
 					<el-table-column prop="code" label="鏍囧噯缂栧彿" show-overflow-tooltip>
 						<template slot-scope="scope">
 							<span style="color: red;font-size: 14px;">{{scope.row['code']}}</span>
@@ -596,6 +597,12 @@
 				}).then(res => {
 					this.tableLoad = false
 					this.standardList = res.data.standardMethodList
+          if(this.standardList&&this.standardList.length>0){
+            this.$refs.standard.setCurrentRow(this.standardList[0])
+            this.rowClick(this.standardList[0])
+          }else{
+            this.productList = [];
+          }
 				})
 			},
 			getPower() {

--
Gitblit v1.9.3