From cabb42ddb2ee6d5daeb8e6b4cf2142d725dda845 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期四, 18 四月 2024 21:50:15 +0800
Subject: [PATCH] update
---
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