|
@@ -1,9 +1,12 @@
|
|
|
<template>
|
|
|
<div class="equipment-tree-container">
|
|
|
- <div>
|
|
|
- <a-button type="primary" icon="plus" style="width:13%;" @click="handleAdd"/>
|
|
|
+ <div v-if="treeData.type != 'history'">
|
|
|
+ <a-button type="primary" icon="plus" style="width:13%;" @click="handleAdd"/>
|
|
|
<a-input-search style="width:85%;margin-left:2%" placeholder="请输入" @change="onChange" />
|
|
|
</div>
|
|
|
+ <div v-if="treeData.type == 'history'">
|
|
|
+ <a-input-search style="width:100%;margin-left:2%" placeholder="请输入" @change="onChange" />
|
|
|
+ </div>
|
|
|
|
|
|
<div class="tree-container">
|
|
|
<a-tree
|
|
@@ -18,7 +21,7 @@
|
|
|
<template v-slot:title="nodeData">
|
|
|
<div style="display: flex; justify-content: space-between; width: 100%;">
|
|
|
<div>{{nodeData.interlockName}}</div>
|
|
|
- <div>
|
|
|
+ <div v-if="treeData.type != 'history'">
|
|
|
<a-dropdown>
|
|
|
<a-icon type="more" />
|
|
|
<a-menu slot="overlay">
|
|
@@ -52,6 +55,14 @@
|
|
|
components: {
|
|
|
BaseInterLockModal
|
|
|
},
|
|
|
+ props: {
|
|
|
+ treeData: {
|
|
|
+ type: Object,
|
|
|
+ default: function(){
|
|
|
+ return {} // 使用工厂函数返回默认值
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
expandedKeys: [],
|