From dd3bb0fcffc294ac9094c17aafbc73c8b6a73eed Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期五, 19 四月 2024 23:53:55 +0800
Subject: [PATCH] 1

---
 src/views/mdc/MYTree.vue |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/views/mdc/MYTree.vue b/src/views/mdc/MYTree.vue
index c54ec8f..0d290aa 100644
--- a/src/views/mdc/MYTree.vue
+++ b/src/views/mdc/MYTree.vue
@@ -1,16 +1,17 @@
 <!--
  * @Date: 2024-04-18 19:53:35
  * @LastEditors: Sneed
- * @LastEditTime: 2024-04-18 20:56:37
+ * @LastEditTime: 2024-04-18 21:30:19
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/MYTree.vue
 -->
 <template>
     <el-tree ref="treeRef" v-bind="$attrs" :show-checkbox="showCheckbox" :current-node-key="currentNodeKey"
         node-key="id" :props="defalutProps" :data="data" @check-change="checkChange" @node-click="handleNodeClick"
-        highlight-current default-expand-all></el-tree>
+        highlight-current default-expand-all :render-content="renderContent"></el-tree>
 </template>
 
 <script>
+import pmsPng from '@/assets/pms.png'
 export default {
     props: {
         showCheckbox: {
@@ -20,6 +21,7 @@
     },
     data() {
         return {
+            pmsPng,
             firstWorkKey: '',
             currentNodeKey: '',
             defalutProps: {
@@ -44,6 +46,16 @@
         this.getList()
     },
     methods: {
+        renderContent(h, { data }) {
+            let img = data.groupTag == 'fms_beltline'
+            return h('span', {
+
+            },
+                img ? h('img', {
+                    src: pmsPng
+                }, '') : '',
+                data.title)
+        },
         getList() {
             this.$HTTP.post('/api/blade-cps/group/groupWorkstation/type', {
                 groupCategory: 1,

--
Gitblit v1.9.3