From 2b2fa317c30ee2de7a8b6f5fc964532031adea66 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期日, 20 九月 2026 13:48:54 +0800
Subject: [PATCH] fix: 优化报告功能

---
 src/views/standard/standardLibrary/index.vue |   36 +++++++++++++++---------------------
 1 files changed, 15 insertions(+), 21 deletions(-)

diff --git a/src/views/standard/standardLibrary/index.vue b/src/views/standard/standardLibrary/index.vue
index 16b01f8..a800e11 100644
--- a/src/views/standard/standardLibrary/index.vue
+++ b/src/views/standard/standardLibrary/index.vue
@@ -6,14 +6,17 @@
         <pane size="12">
           <el-col>
             <div class="head-container addButton">
-              <el-input v-model="search" clearable placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�" size="small" style="margin-bottom: 5px"
+              <el-input v-model="search" clearable placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�" size="small"
+                        style="margin-bottom: 5px; flex: 1; min-width: 0"
                         suffix-icon="el-icon-search" @keydown.enter.native="searchFilter" @blur="searchFilter" @clear="searchFilter"></el-input>
-              <el-button circle icon="el-icon-plus" size="mini" type="primary" @click="openAddDia"></el-button>
+              <el-button icon="el-icon-refresh" size="small" title="鍒锋柊"
+                         style="margin-bottom: 5px; margin-left: 8px"
+                         @click="selectStandardTreeList"></el-button>
             </div>
             <div class="head-container">
               <el-tree ref="tree" v-loading="treeLoad" :data="list"
                        :default-expanded-keys="expandedKeys" :filter-node-method="filterNode"
-                       :props="{ children: 'children', label: 'label' }" highlight-current node-key="label"
+                       :props="{ children: 'children', label: 'label' }" highlight-current node-key="id"
                        style="
                         height: calc(100vh - 173px);
                         overflow-y: scroll;
@@ -32,22 +35,6 @@
                 {{ data.label }}
               </span>
                     </el-col>
-                    <el-col v-if="
-              checkPermi(['standard:standardLibrary:delStandardTree']) &&
-              isLeaf(node.data)
-            " :span="2" style="text-align: right">
-                      <el-button size="mini" type="text" @click.stop="editTreeName(node)">
-                        <i class="el-icon-edit"></i>
-                      </el-button>
-                    </el-col>
-                    <el-col v-if="
-              checkPermi(['standard:standardLibrary:delStandardTree']) &&
-              isLeaf(node.data)
-            " :span="2" style="text-align: right">
-                      <el-button size="mini" type="text" @click.stop="remove(node, data)">
-                        <i class="el-icon-delete"></i>
-                      </el-button>
-                    </el-col>
                   </el-row>
                 </div>
               </el-tree>
@@ -58,7 +45,7 @@
         <pane size="88">
           <el-card v-if="selected.isLeaf" shadow="never" class="template-binding-card">
             <div slot="header"><span>鍘熷璁板綍妯℃澘</span><el-button v-if="checkPermi(['standard:standardLibrary:upStandardProduct'])" type="primary" size="mini" style="float:right" @click="saveBindings">淇濆瓨缁戝畾</el-button></div>
-            <p v-if="!templateBindings.length" class="binding-tip">璇蜂负褰撳墠鏍囧噯缁戝畾鍘熷璁板綍妯℃澘锛涙ā鏉夸腑椤讳娇鐢ㄢ�滄楠岄」鈥濇爣璁般��</p>
+            <p v-if="!templateBindings.length" class="binding-tip">璇蜂负褰撳墠鏍囧噯缁戝畾鍘熷璁板綍妯℃澘銆�</p>
             <el-table :data="templateBindings" border size="small">
               <el-table-column type="index" label="椤哄簭" width="70" /><el-table-column label="妯℃澘缂栧彿" prop="number" width="180" /><el-table-column label="妯℃澘鍚嶇О" prop="name" /><el-table-column label="妫�娴嬩緷鎹紙妯℃澘澶囨敞锛�" prop="remark" />
               <el-table-column v-if="checkPermi(['standard:standardLibrary:upStandardProduct'])" label="鎿嶄綔" width="150"><template slot-scope="scope"><el-button type="text" :disabled="scope.$index === 0" @click="moveBinding(scope.$index, -1)">涓婄Щ</el-button><el-button type="text" :disabled="scope.$index === templateBindings.length - 1" @click="moveBinding(scope.$index, 1)">涓嬬Щ</el-button><el-button type="text" @click="removeBinding(scope.$index)">绉婚櫎</el-button></template></el-table-column>
@@ -585,7 +572,14 @@
     selectStandardTreeList() {
       this.treeLoad = true;
       selectStandardTreeList().then((res) => {
-        this.list = res.data;
+        this.list = (res.data || []).map(industry => ({
+          ...industry,
+          children: (industry.children || []).map(standard => ({
+            ...standard,
+            // 浜岀骇鑺傜偣鍙睍绀烘爣鍑嗙紪鍙凤紱鍏煎灏氭湭閲嶅惎鐨勬棫鍚庣杩斿洖鏍煎紡銆�
+            label: standard.standardCode || String(standard.label || '').split(' - ')[0],
+          })),
+        }));
         this.expandedKeys = [];
         this.list.forEach((a) => {
           this.expandedKeys.push(a.label);

--
Gitblit v1.9.3