From 1f138c929cbec68a018f9ebcd16af35bcc9bb179 Mon Sep 17 00:00:00 2001
From: deslrey <deslre0381@gmail.com>
Date: 星期二, 13 一月 2026 09:15:38 +0800
Subject: [PATCH] 标准库的选择树显示优化,去除null的显示

---
 src/api/standard/standardLibrary.js                         |    9 +
 src/views/standard/standardLibrary/index.vue                |   34 ++-
 src/views/standard/standardLibrary/components/BatchCopy.vue |  444 ++++++++++--------------------------------------
 3 files changed, 124 insertions(+), 363 deletions(-)

diff --git a/src/api/standard/standardLibrary.js b/src/api/standard/standardLibrary.js
index 832dd1c..73d7771 100644
--- a/src/api/standard/standardLibrary.js
+++ b/src/api/standard/standardLibrary.js
@@ -102,6 +102,15 @@
   });
 }
 
+// 閫氳繃妫�楠屾爣鍑嗘煡璇㈡楠岄」鐩�
+export function buildStandardProductListNoDrag(query) {
+  return request({
+    url: "/standardTree/buildStandardProductListNoDrag",
+    method: "get",
+    params: query,
+  });
+}
+
 // 淇敼鏍囧噯搴撲腑鐨勫尯闂磋缃�
 export function updateSection(data) {
   return request({
diff --git a/src/views/standard/standardLibrary/components/BatchCopy.vue b/src/views/standard/standardLibrary/components/BatchCopy.vue
index 7ea84b4..2b567ca 100644
--- a/src/views/standard/standardLibrary/components/BatchCopy.vue
+++ b/src/views/standard/standardLibrary/components/BatchCopy.vue
@@ -1,243 +1,94 @@
 <template>
   <div>
-    <el-dialog
-      :visible.sync="batchCopyDia"
-      class="more-edit"
-      title="鎵归噺缂栬緫"
-      width="90%"
-    >
+    <el-dialog :visible.sync="batchCopyDia" class="more-edit" title="鎵归噺缂栬緫" width="90%">
       <el-row>
         <el-col :span="6" class="search_thing">
           <div class="search_label">鏍峰搧鍚嶇О锛�</div>
           <div class="search_input">
             <el-input v-model="sample" disabled size="small">
-              <template slot="append"
-                ><el-button
-                  slot="append"
-                  icon="el-icon-search"
-                  @click="selectStandardTree = true"
-                ></el-button
-              ></template>
+              <template slot="append"><el-button slot="append" icon="el-icon-search"
+                  @click="selectStandardTree = true"></el-button></template>
             </el-input>
           </div>
         </el-col>
         <el-col :span="6" class="search_thing">
           <div class="search_label">妫�楠屾爣鍑嗭細</div>
           <div class="search_input">
-            <el-select
-              v-model="standardMethodListId"
-              :loading="methodLoad"
-              clearable
-              placeholder="璇疯緭鍏�"
-              size="small"
-              @change="changeStandardMethodListId"
-              @focus="methodFocus"
-            >
-              <el-option
-                v-for="item in methods"
-                :key="item.id"
-                :label="item.code"
-                :value="item.id"
-              >
+            <el-select v-model="standardMethodListId" :loading="methodLoad" clearable placeholder="璇疯緭鍏�" size="small"
+              @change="changeStandardMethodListId" @focus="methodFocus">
+              <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
               </el-option>
             </el-select>
           </div>
         </el-col>
         <el-col :span="12" style="text-align: right">
-          <el-button size="small" type="primary" @click="sortCopy"
-            >鎺掑簭澶嶅埗</el-button
-          >
-          <el-button size="small" type="primary" @click="compareAlone"
-            >鍗曠嫭瀵规瘮</el-button
-          >
-          <el-button size="small" type="primary" @click="compare"
-            >澶嶅埗</el-button
-          >
+          <el-button size="small" type="primary" @click="sortCopy">鎺掑簭澶嶅埗</el-button>
+          <el-button size="small" type="primary" @click="compareAlone">鍗曠嫭瀵规瘮</el-button>
+          <el-button size="small" type="primary" @click="compare">澶嶅埗</el-button>
         </el-col>
       </el-row>
-      <div
-        class="body"
-        style="display: flex; flex-direction: row; height: 80vh"
-      >
+      <div class="body" style="display: flex; flex-direction: row; height: 80vh">
         <div v-loading="productTableLoading1" style="width: 50%">
           <div>闇�瑕佸鍒剁殑妫�楠岄」</div>
-          <el-table
-            ref="productTable1"
-            :data="productList1"
-            :fit="true"
-            :row-key="(row) => row.id"
-            border
-            header-row-class-name="header-class"
-            height="90%"
-            highlight-current-row
-            stripe
-            style="width: 98%"
-            tooltip-effect="dark"
-            @select="handleSelectionChange1"
-            @select-all="handleSelectAll1"
-          >
+          <el-table ref="productTable1" :data="productList1" :fit="true" :row-key="(row) => row.id" border
+            header-row-class-name="header-class" height="90%" highlight-current-row stripe style="width: 98%"
+            tooltip-effect="dark" @select="handleSelectionChange1" @select-all="handleSelectAll1">
             <el-table-column type="selection" width="50"> </el-table-column>
-            <el-table-column
-              label="浜у搧"
-              min-width="100"
-              prop="sample"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              label="鍨嬪彿"
-              min-width="100"
-              prop="model"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              label="妫�楠岄」鍒嗙被"
-              min-width="140"
-              prop="inspectionItemClass"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              column-key="inspectionItem"
-              label="妫�楠岄」"
-              min-width="140"
-              prop="inspectionItem"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              column-key="inspectionItemSubclass"
-              label="妫�楠岄」瀛愰」"
-              min-width="140"
-              prop="inspectionItemSubclass"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              label="瑕佹眰鍊�"
-              min-width="200px"
-              prop="ask"
-            ></el-table-column>
-            <el-table-column
-              label="瑕佹眰鎻忚堪"
-              min-width="220px"
-              prop="tell"
-            ></el-table-column>
+            <el-table-column label="浜у搧" min-width="100" prop="sample" show-overflow-tooltip></el-table-column>
+            <el-table-column label="鍨嬪彿" min-width="100" prop="model" show-overflow-tooltip></el-table-column>
+            <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass"
+              show-overflow-tooltip></el-table-column>
+            <el-table-column column-key="inspectionItem" label="妫�楠岄」" min-width="140" prop="inspectionItem"
+              show-overflow-tooltip></el-table-column>
+            <el-table-column column-key="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140"
+              prop="inspectionItemSubclass" show-overflow-tooltip></el-table-column>
+            <el-table-column label="瑕佹眰鍊�" min-width="200px" prop="ask"></el-table-column>
+            <el-table-column label="瑕佹眰鎻忚堪" min-width="220px" prop="tell"></el-table-column>
           </el-table>
         </div>
         <div v-loading="productTableLoading0" style="width: 50%">
           <div>褰撳墠妫�楠岄」</div>
-          <el-table
-            ref="productTable0"
-            :data="productList0"
-            :fit="true"
-            :row-key="(row) => row.id"
-            border
-            header-row-class-name="header-class"
-            height="90%"
-            highlight-current-row
-            stripe
-            style="width: 98%"
-            tooltip-effect="dark"
-            @select="handleSelectionChange0"
-            @select-all="handleSelectAll0"
-          >
+          <el-table ref="productTable0" :data="productList0" :fit="true" :row-key="(row) => row.id" border
+            header-row-class-name="header-class" height="90%" highlight-current-row stripe style="width: 98%"
+            tooltip-effect="dark" @select="handleSelectionChange0" @select-all="handleSelectAll0">
             <el-table-column type="selection" width="50"> </el-table-column>
-            <el-table-column
-              label="浜у搧"
-              min-width="100"
-              prop="sample"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              label="鍨嬪彿"
-              min-width="100"
-              prop="model"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              label="妫�楠岄」鍒嗙被"
-              min-width="140"
-              prop="inspectionItemClass"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              column-key="inspectionItem"
-              label="妫�楠岄」"
-              min-width="140"
-              prop="inspectionItem"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              column-key="inspectionItemSubclass"
-              label="妫�楠岄」瀛愰」"
-              min-width="140"
-              prop="inspectionItemSubclass"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              label="瑕佹眰鍊�"
-              min-width="200px"
-              prop="ask"
-            ></el-table-column>
-            <el-table-column
-              label="瑕佹眰鎻忚堪"
-              min-width="220px"
-              prop="tell"
-            ></el-table-column>
+            <el-table-column label="浜у搧" min-width="100" prop="sample" show-overflow-tooltip></el-table-column>
+            <el-table-column label="鍨嬪彿" min-width="100" prop="model" show-overflow-tooltip></el-table-column>
+            <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass"
+              show-overflow-tooltip></el-table-column>
+            <el-table-column column-key="inspectionItem" label="妫�楠岄」" min-width="140" prop="inspectionItem"
+              show-overflow-tooltip></el-table-column>
+            <el-table-column column-key="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140"
+              prop="inspectionItemSubclass" show-overflow-tooltip></el-table-column>
+            <el-table-column label="瑕佹眰鍊�" min-width="200px" prop="ask"></el-table-column>
+            <el-table-column label="瑕佹眰鎻忚堪" min-width="220px" prop="tell"></el-table-column>
           </el-table>
         </div>
       </div>
     </el-dialog>
-    <el-dialog
-      :visible.sync="selectStandardTree"
-      title="閫夋嫨鏍峰搧"
-      width="500px"
-    >
-      <div
-        v-if="selectStandardTree"
-        v-loading="selectStandardTreeLoading"
-        class="body"
-        style="height: 60vh; overflow-y: auto; user-select: none"
-      >
+    <el-dialog :visible.sync="selectStandardTree" title="閫夋嫨鏍峰搧" width="500px">
+      <div v-if="selectStandardTree" v-loading="selectStandardTreeLoading" class="body"
+        style="height: 60vh; overflow-y: auto; user-select: none">
         <el-row>
           <el-col :span="24">
-            <el-input
-              v-model="search"
-              clearable
-              placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�"
-              size="small"
-              style="margin-bottom: 5px"
-              suffix-icon="el-icon-search"
-              @blur="searchFilter"
-              @clear="searchFilter"
-              @keyup.enter.native="searchFilter"
-            ></el-input>
+            <el-input v-model="search" clearable placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�" size="small" style="margin-bottom: 5px"
+              suffix-icon="el-icon-search" @blur="searchFilter" @clear="searchFilter"
+              @keyup.enter.native="searchFilter"></el-input>
           </el-col>
         </el-row>
-        <el-tree
-          ref="tree"
-          :data="list"
-          :default-expanded-keys="expandedKeys"
-          :filter-node-method="filterNode"
-          :props="{ children: 'children', label: 'label' }"
-          highlight-current
-          node-key="label"
-          @node-click="handleNodeClick"
-          @node-expand="nodeOpen"
-          @node-collapse="nodeClose"
-        >
+        <el-tree ref="tree" :data="list" :default-expanded-keys="expandedKeys" :filter-node-method="filterNode"
+          :props="{ children: 'children', label: 'label' }" highlight-current node-key="label"
+          @node-click="handleNodeClick" @node-expand="nodeOpen" @node-collapse="nodeClose">
           <div slot-scope="{ node, data }" class="custom-tree-node">
             <el-row>
               <el-col :span="24">
-                <span
-                  ><i
-                    :class="`node_i ${
-                      data.children != undefined
-                        ? data.code === '[1]'
-                          ? 'el-icon-folder-opened'
-                          : 'el-icon-folder'
-                        : 'el-icon-tickets'
-                    }`"
-                  ></i>
-                  {{ data.code }} {{ data.label }}</span
-                >
+                <span><i :class="`node_i ${data.children != undefined
+                  ? data.code === '[1]'
+                    ? 'el-icon-folder-opened'
+                    : 'el-icon-folder'
+                  : 'el-icon-tickets'
+                  }`"></i>
+                  {{ data.code }} {{ data.label }}</span>
               </el-col>
             </el-row>
           </div>
@@ -250,196 +101,91 @@
     </el-dialog>
     <el-dialog :visible.sync="compareDia" title="纭澶嶅埗淇℃伅" width="80%">
       <div style="width: 100%">
-        <el-table
-          ref="compareList"
-          :data="compareList"
-          :fit="true"
-          :row-key="(row) => row.id"
-          border
-          header-row-class-name="header-class"
-          height="90%"
-          highlight-current-row
-          stripe
-          style="width: 98%"
-          tooltip-effect="dark"
-        >
-          <el-table-column
-            label="浜у搧"
-            min-width="100"
-            prop="sample"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            label="鍨嬪彿"
-            min-width="100"
-            prop="model"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            label="妫�楠岄」鍒嗙被"
-            min-width="140"
-            prop="inspectionItemClass"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            column-key="inspectionItem"
-            label="妫�楠岄」"
-            min-width="140"
-            prop="inspectionItem"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            column-key="inspectionItemSubclass"
-            label="妫�楠岄」瀛愰」"
-            min-width="140"
-            prop="inspectionItemSubclass"
-            show-overflow-tooltip
-          ></el-table-column>
+        <el-table ref="compareList" :data="compareList" :fit="true" :row-key="(row) => row.id" border
+          header-row-class-name="header-class" height="90%" highlight-current-row stripe style="width: 98%"
+          tooltip-effect="dark">
+          <el-table-column label="浜у搧" min-width="100" prop="sample" show-overflow-tooltip></el-table-column>
+          <el-table-column label="鍨嬪彿" min-width="100" prop="model" show-overflow-tooltip></el-table-column>
+          <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass"
+            show-overflow-tooltip></el-table-column>
+          <el-table-column column-key="inspectionItem" label="妫�楠岄」" min-width="140" prop="inspectionItem"
+            show-overflow-tooltip></el-table-column>
+          <el-table-column column-key="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140"
+            prop="inspectionItemSubclass" show-overflow-tooltip></el-table-column>
           <el-table-column label="瑕佹眰鍊�" min-width="200px" prop="ask">
             <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.ask"
-                :autosize="{ minRows: 1, maxRows: 3 }"
-                clearable
-                placeholder="瑕佹眰鍊�"
-                size="small"
-                type="textarea"
-              ></el-input>
+              <el-input v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鍊�"
+                size="small" type="textarea"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="瑕佹眰鎻忚堪" min-width="220px" prop="tell">
             <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.tell"
-                :autosize="{ minRows: 1, maxRows: 3 }"
-                clearable
-                placeholder="瑕佹眰鎻忚堪"
-                size="small"
-                type="textarea"
-              ></el-input>
+              <el-input v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鎻忚堪"
+                size="small" type="textarea"></el-input>
             </template>
           </el-table-column>
           <el-table-column label="鎿嶄綔" prop="section" width="160">
             <template slot-scope="scope">
-              <el-button type="text" @click="sectionUp(scope.row)"
-                >鍖洪棿璁剧疆</el-button
-              >
+              <el-button type="text" @click="sectionUp(scope.row)">鍖洪棿璁剧疆</el-button>
             </template>
           </el-table-column>
         </el-table>
         <span slot="footer" class="dialog-footer">
           <el-button size="small" @click="compareDia = false">鍙� 娑�</el-button>
-          <el-button
-            :loading="handleCompareLoading"
-            size="small"
-            type="primary"
-            @click="handleCompare"
-            >纭� 瀹�</el-button
-          >
+          <el-button :loading="handleCompareLoading" size="small" type="primary" @click="handleCompare">纭� 瀹�</el-button>
         </span>
       </div>
     </el-dialog>
-    <el-dialog
-      :close-on-click-modal="false"
-      :visible.sync="sectionUpDia"
-      title="鍖洪棿璁剧疆"
-      width="80%"
-    >
+    <el-dialog :close-on-click-modal="false" :visible.sync="sectionUpDia" title="鍖洪棿璁剧疆" width="80%">
       <div class="body" style="padding: 5px 0">
         <el-table :data="sectionList" border height="350px" style="width: 100%">
           <el-table-column align="center" label="搴忓彿" type="index" width="70">
           </el-table-column>
           <el-table-column align="center" label="鍖洪棿">
             <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.thing"
-                clearable
-                placeholder="鍖洪棿"
-                size="small"
-              ></el-input>
+              <el-input v-model="scope.row.thing" clearable placeholder="鍖洪棿" size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column align="center" label="鑺暟">
             <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.cores"
-                clearable
-                placeholder="鑺暟"
-                size="small"
-              ></el-input>
+              <el-input v-model="scope.row.cores" clearable placeholder="鑺暟" size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column align="center" label="瑕佹眰鍊�">
             <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.ask"
-                clearable
-                placeholder="瑕佹眰鍊�"
-                size="small"
-              ></el-input>
+              <el-input v-model="scope.row.ask" clearable placeholder="瑕佹眰鍊�" size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column align="center" label="瑕佹眰鎻忚堪">
             <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.tell"
-                :autosize="{ minRows: 1, maxRows: 2 }"
-                clearable
-                placeholder="瑕佹眰鎻忚堪"
-                size="small"
-                type="textarea"
-              ></el-input>
+              <el-input v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 2 }" clearable placeholder="瑕佹眰鎻忚堪"
+                size="small" type="textarea"></el-input>
             </template>
           </el-table-column>
           <el-table-column align="center" label="瀵间綋鏉愯川">
             <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.conductorMaterial"
-                clearable
-                placeholder="瀵间綋鏉愯川"
-                size="small"
-              ></el-input>
+              <el-input v-model="scope.row.conductorMaterial" clearable placeholder="瀵间綋鏉愯川" size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column align="center" label="瀵间綋绫诲瀷">
             <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.conductorType"
-                clearable
-                placeholder="瀵间綋绫诲瀷"
-                size="small"
-              ></el-input>
+              <el-input v-model="scope.row.conductorType" clearable placeholder="瀵间綋绫诲瀷" size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column align="center" label="鍗曚环" width="120">
             <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.price"
-                clearable
-                placeholder="鍗曚环"
-                size="small"
-              ></el-input>
+              <el-input v-model="scope.row.price" clearable placeholder="鍗曚环" size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column align="center" label="宸ユ椂绯绘暟" width="120">
             <template slot-scope="scope">
-              <el-input
-                v-model="scope.row.manHour"
-                clearable
-                placeholder="宸ユ椂绯绘暟"
-                size="small"
-              ></el-input>
+              <el-input v-model="scope.row.manHour" clearable placeholder="宸ユ椂绯绘暟" size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column align="center" label="鎿嶄綔" width="70">
             <template slot-scope="scope">
-              <el-button
-                circle
-                icon="el-icon-minus"
-                size="mini"
-                type="danger"
-                @click="sectionList.splice(scope.$index, 1)"
-              ></el-button>
+              <el-button circle icon="el-icon-minus" size="mini" type="danger"
+                @click="sectionList.splice(scope.$index, 1)"></el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -447,11 +193,8 @@
       <span slot="footer" class="dialog-footer">
         <el-button @click="sectionUpDia = false">鍙� 娑�</el-button>
         <el-button type="primary" @click="sectionLoadAdd">淇� 瀛�</el-button>
-        <el-button
-          icon="el-icon-plus"
-          type="primary"
-          @click="sectionList.push({ thing: '', price: '', manHour: '' })"
-        ></el-button>
+        <el-button icon="el-icon-plus" type="primary"
+          @click="sectionList.push({ thing: '', price: '', manHour: '' })"></el-button>
       </span>
     </el-dialog>
   </div>
@@ -459,7 +202,7 @@
 
 <script>
 import {
-  selectStandardProductListByMethodId,
+  buildStandardProductListNoDrag,
   copyStandardProductSort,
   copyStandardProductOne,
   copyStandardProductList,
@@ -520,7 +263,7 @@
     getList() {
       this.batchCopyDia = true;
       this.productTableLoading0 = true;
-      selectStandardProductListByMethodId({
+      buildStandardProductListNoDrag({
         id: this.standardId,
         tree: this.selectTree1,
         page: 1,
@@ -559,6 +302,7 @@
         oldStandardProductList: this.oldStandardProductList,
         newStandardProductList: this.newStandardProductList,
       };
+
       // 璋冨彇姣旇緝宸﹀彸瑕佹眰鍊肩殑鎺ュ彛
       copyStandardProductList(params).then((res) => {
         this.compareDia = true;
@@ -714,17 +458,15 @@
       let data = this.selectTree.split(" - ");
       let data2 = "";
       for (let index = data.length - 1; index >= 0; index--) {
-        data2 += " - " + data[index];
+        if (data[index] && data[index] !== 'null') {
+          data2 += " - " + data[index];
+        }
       }
       this.selectTree = data2.replace(" - ", "");
     },
     getNodeParent(val) {
       if (val.parent != null) {
-        if (val.data.children === null) {
-          this.selectTree += " - " + val.label + " - " + "null";
-        } else {
-          this.selectTree += " - " + val.label;
-        }
+        this.selectTree += " - " + val.label;
         this.getNodeParent(val.parent);
       }
     },
@@ -734,7 +476,7 @@
     },
     getRightList() {
       this.productTableLoading1 = true;
-      selectStandardProductListByMethodId({
+      buildStandardProductListNoDrag({
         id: this.standardMethodListId,
         tree: this.selectTree,
         page: 1,
@@ -771,7 +513,7 @@
           } else {
             this.methods = res.data.standardMethodList;
           }
-        } catch (e) {}
+        } catch (e) { }
       });
     },
     activeStandardTree() {
@@ -846,10 +588,12 @@
 .search_input {
   width: calc(100% - 80px);
 }
+
 .node_i {
   color: orange;
   font-size: 18px;
 }
+
 .dialog-footer {
   display: flex;
   justify-content: flex-end;
diff --git a/src/views/standard/standardLibrary/index.vue b/src/views/standard/standardLibrary/index.vue
index 9f43cfc..6de2f11 100644
--- a/src/views/standard/standardLibrary/index.vue
+++ b/src/views/standard/standardLibrary/index.vue
@@ -1,6 +1,8 @@
 <template>
   <div class="standard">
-    <div class="left">
+    <splitpanes class="default-theme">
+      <pane size="20">
+        <div class="left">
       <el-row>
         <el-col :span="20">
           <el-input v-model="search" clearable placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�" size="small" style="margin-bottom: 5px"
@@ -44,7 +46,9 @@
         </div>
       </el-tree>
     </div>
-    <div class="right">
+      </pane>
+      <pane size="80">
+        <div class="right">
       <el-row class="title" style="width: 100%">
         <el-col :span="20" style="font-size: 14px; color: #999">{{
           selectTree
@@ -177,6 +181,8 @@
         <p style="text-align: right;margin-right: 20px;color: #333;">鍏眥{ total }}鏉�</p>
       </el-row>
     </div>
+      </pane>
+    </splitpanes>
 
     <el-dialog :visible.sync="addDia" title="鍒嗙被娣诲姞" width="400px">
       <div class="body">
@@ -306,12 +312,17 @@
 } from "@/api/standard/standardLibrary";
 import bindSupplierDensityDialogAsk from "./components/bindSupplierDensityDialogAsk.vue";
 import BatchCopy from "./components/BatchCopy.vue";
+import { Splitpanes, Pane } from "splitpanes";
+import "splitpanes/dist/splitpanes.css";
+
 export default {
   name: 'StandardLibrary',
   components: {
     BatchCopy,
     bindSupplierDensityDialogAsk,
     draggable,
+    Splitpanes,
+    Pane,
   },
   dicts: ["sys_factory", "sys_sub_lab", "sys_samp_type"],
   data() {
@@ -544,7 +555,9 @@
       let data = this.selectTree.split(" - ");
       let data2 = "";
       for (let index = data.length - 1; index >= 0; index--) {
-        data2 += " - " + data[index];
+        if (data[index] && data[index] !== 'null') {
+          data2 += " - " + data[index];
+        }
       }
       this.selectTree = data2.replace(" - ", "");
       if (node.childNodes.length === 0) {
@@ -558,11 +571,7 @@
     },
     getNodeParent(val) {
       if (val.parent != null) {
-        if (val.data.children === null) {
-          this.selectTree += " - " + val.label + " - " + "null";
-        } else {
-          this.selectTree += " - " + val.label;
-        }
+        this.selectTree += " - " + val.label;
         this.getNodeParent(val.parent);
       }
     },
@@ -1205,8 +1214,8 @@
 }
 
 .left {
-  width: 330px;
-  height: calc(100% - 40px - 10px);
+  width: 100%;
+  height: 100%;
   background-color: white;
   padding: 15px;
 }
@@ -1242,9 +1251,8 @@
 }
 
 .right {
-  margin-left: 5px;
-  width: calc(100% - 350px);
-  height: calc(100% - 40px);
+  width: 100%;
+  height: 100%;
 }
 
 .right .title {

--
Gitblit v1.9.3