|
|
@@ -9,20 +9,18 @@
|
|
|
</template>
|
|
|
<el-tree :expand-on-click-node="false" ref="treeRef" :filter-node-method="filterNode" :current-node-key="currentNodeKey" class="treeLeft" :data="data" @node-click="handleNodeClick"
|
|
|
node-key="id" style="margin-left:-15%;margin-top: 1%;width: 99%;background-color: transparent;" default-expand-all :key="valueKet">
|
|
|
- <template #default="{ node, data }">
|
|
|
- <span style="display: flex;width: 30%;align-items: center;margin-left: 1%;line-height: 1.5;">
|
|
|
- <div class="custom-tree-node" style="width: 50%;line-height: 1.5;align-items: center;">
|
|
|
- <!-- <el-tag v-if="data.nodeType=='MODEL'" class="ml-2" type="warning">模型</el-tag> -->
|
|
|
- <el-icon><Coin /></el-icon>
|
|
|
- <span style="font-size: 1rem;">{{ node.label }}</span>
|
|
|
-
|
|
|
- </div>
|
|
|
- <el-icon :size="size" color="red" style="position: absolute;left: 110%;" @click="delTree(data)">
|
|
|
- <Delete />
|
|
|
- </el-icon>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-tree>
|
|
|
+ <template #default="{ node, data }">
|
|
|
+ <span style="display: flex;width: 100%;align-items: center;margin-left: 5%;line-height: 1.5;">
|
|
|
+ <div class="custom-tree-node" style="width: 150%;line-height: 1.5;align-items: center;">
|
|
|
+ <el-icon><Coin /></el-icon>
|
|
|
+ <span style="font-size: 1rem;position: absolute;left: 25%;">{{ node.label }}</span>
|
|
|
+ </div>
|
|
|
+ <el-icon :size="size" color="red" style="position: absolute;left: 110%;" @click="delTree(data)">
|
|
|
+ <Delete/>
|
|
|
+ </el-icon>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-tree>
|
|
|
</el-card>
|
|
|
<div style="width: 80%;margin-left: 1%;background-color: white;">
|
|
|
<div style="display: flex;justify-content: space-between;width: 100%;align-items: center;margin-left: 0%;padding: 1%;">
|
|
|
@@ -274,7 +272,7 @@ function delTree(data) {
|
|
|
proxy.$modal.confirm('是否确认删除?').then(function () {
|
|
|
return delDataSource(data.dsCode);
|
|
|
}).then(() => {
|
|
|
- getTable();
|
|
|
+ getTree();
|
|
|
proxy.$modal.msgSuccess("删除成功");
|
|
|
}).catch(() => {});
|
|
|
};
|
|
|
@@ -513,9 +511,9 @@ onMounted(() => {
|
|
|
background-color: #eaf7ff !important;
|
|
|
}
|
|
|
:deep(.treeLeft) .el-tree-node__content {
|
|
|
- width: 150%;
|
|
|
+ width: 150% !important;
|
|
|
display: flex !important;
|
|
|
- height: 30px !important;
|
|
|
+ height: 28px; /* 按设计稿调整高度 */
|
|
|
align-items: center;
|
|
|
padding-top: 0 !important;
|
|
|
}
|