<template>
|
<div class="specificationDetail-main">
|
<div class="page-header-tips">
|
<div class="search-bar">
|
<span :style="{marginRight:'12px', color:'#409EFF'}"> 项目名称:{{ detailInfo.projectClassification }}</span>
|
<!-- <el-tag type="primary"><i class="el-icon-info" :style="{marginRight:'4px', color:'#409EFF'}" />V12</el-tag> -->
|
</div>
|
<div class="serve-btn">
|
<!-- <el-button type="primary" icon="el-icon-plus">编辑</el-button>
|
<el-button type="primary" icon="el-icon-plus">删除</el-button> -->
|
</div>
|
</div>
|
<div class="content-main">
|
<div class="specificationDetail-bom">
|
<div class="bom-item">
|
<div class="bom-item-search">
|
<el-row>
|
<el-col :span="19">
|
<el-input
|
v-model="searchData.keyword"
|
placeholder="输入关键字进行过滤"
|
/>
|
</el-col>
|
<el-col :span="5">
|
<el-button type="primary" size="small" @click="materialFormVisible = true"><i class="el-icon-plus" /></el-button>
|
</el-col>
|
</el-row>
|
</div>
|
<el-tree
|
ref="tree"
|
class="filter-tree"
|
:data="materialTree"
|
default-expand-all
|
:filter-node-method="filterNode"
|
:highlight-current="true"
|
node-key="id"
|
:default-expanded-keys="materialTreeDefault"
|
@node-click="materialTreeClick"
|
>
|
|
<span slot-scope="{ node, data }" class="custom-tree-node">
|
<span>{{ node.label }}</span>
|
<span>
|
<el-popover
|
placement="top"
|
width="30"
|
trigger="click"
|
>
|
<div style="text-align: center; margin: 0">
|
<div>
|
<el-button size="mini" type="text" @click="showChangeMaterial(data)">编辑</el-button>
|
</div>
|
<div>
|
<el-button size="mini" type="text" @click="delmaterialFormVisible=true">删除</el-button>
|
</div>
|
</div>
|
<el-button
|
slot="reference"
|
type="text"
|
size="mini"
|
><i class="el-icon-more" /></el-button>
|
</el-popover>
|
</span>
|
</span>
|
</el-tree>
|
</div>
|
<div class="bom-item">
|
<div class="bom-item-search">
|
<el-row>
|
<el-col :span="19">
|
<div class="tips">
|
<span />
|
<div>项目/子项目</div>
|
</div>
|
</el-col>
|
<el-col :span="5">
|
<el-button type="primary" size="small" plain @click="projectFormVisible = true"><i class="el-icon-plus" /></el-button>
|
</el-col>
|
</el-row>
|
</div>
|
<el-tree
|
ref="tree"
|
class="filter-tree"
|
:data="projectTree"
|
default-expand-all
|
:highlight-current="true"
|
:default-expanded-keys="projectTreeDefault"
|
@node-click="projectTreeClick"
|
>
|
<span slot-scope="{ node,data }" class="custom-tree-node">
|
<span>{{ node.label }}</span>
|
<span>
|
<el-popover
|
placement="top"
|
width="30"
|
trigger="click"
|
>
|
<div style="text-align: center; margin: 0">
|
<div>
|
<el-button size="mini" type="text" @click="showChangeProject(data)">编辑</el-button>
|
</div>
|
<div>
|
<el-button size="mini" type="text" @click="delProductFormVisible = true">删除</el-button>
|
</div>
|
</div>
|
<el-button
|
slot="reference"
|
type="text"
|
size="mini"
|
><i class="el-icon-more" /></el-button>
|
</el-popover>
|
</span>
|
</span>
|
</el-tree>
|
</div>
|
</div>
|
<div class="specificationDetail-card">
|
<div class="card-main">
|
<div class="tips-main">
|
<div class="tips">
|
<span />
|
<div>项目详情</div>
|
</div>
|
<!-- <div class="tips-btn">
|
<span><i class="el-icon-edit" />操作:</span>
|
<el-button type="text">编辑</el-button>
|
</div> -->
|
</div>
|
<div class="message">
|
<div class="message-item"><span><i class="el-icon-edit" />试验方法:{{ detailInfo.method }}</span></div>
|
<div class="message-item">
|
<span><i class="el-icon-edit" />项目分类:{{ detailInfo.projectClassification }}</span>
|
</div>
|
<div class="message-item">
|
<span><i class="el-icon-edit" />更新人:{{ detailInfo.userName }}</span></div>
|
<div class="message-item">
|
<span><i class="el-icon-edit" />更新时间:{{ detailInfo.updateTime }}</span></div>
|
</div>
|
</div>
|
<div class="card-main">
|
<div class="tips-main">
|
<div class="tips">
|
<span />
|
<div>测试标准</div>
|
</div>
|
</div>
|
<div class="message">
|
<div class="message-item">
|
<el-tag type="primary"><i class="el-icon-info" :style="{marginRight:'4px', color:'#409EFF'}" />单位:欧姆</el-tag>
|
</div>
|
<div class="message-item">
|
<span><i class="el-icon-edit" />招标人员要求:{{ detailInfo.required }}</span>
|
</div>
|
<div class="message-item">
|
<span><i class="el-icon-edit" />内控值:{{ detailInfo.internal }}</span></div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!-- 添加以及修改的模态框 -->
|
<el-dialog title="添加物料" :visible.sync="materialFormVisible" width="35%">
|
<el-form :model="addMaterialForm">
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="物料ID:" label-width="100px">
|
<el-input v-model="addMaterialForm.id" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="物料名称:" label-width="100px">
|
<el-input v-model="addMaterialForm.name" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="批次:" label-width="100px">
|
<el-input v-model="addMaterialForm.batch" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="存放地:" label-width="100px">
|
<el-input v-model="addMaterialForm.location" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="盘号:" label-width="100px">
|
<el-input v-model="addMaterialForm.reelNumber" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="数量:" label-width="100px">
|
<el-input v-model="addMaterialForm.num" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<!-- <el-form-item label="关联规格:" label-width="100px">
|
<el-input v-model="addMaterialForm.specificationsId" autocomplete="off" />
|
</el-form-item> -->
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="供应商:" label-width="100px">
|
<el-input v-model="addMaterialForm.supplier" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button type="primary" @click="addNewMaterial">确 定</el-button>
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
</div>
|
</el-dialog>
|
<el-dialog title="添加子项目" :visible.sync="projectFormVisible" width="35%">
|
<el-form :model="addProjectForm">
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="父项目:" label-width="100px">
|
<el-select
|
v-model="addProjectForm.father"
|
clearable
|
filterable
|
:allow-create="true"
|
placeholder="请选择或输入父项目"
|
@blur="productSelect"
|
>
|
<el-option
|
v-for="item in fatherOpetions"
|
:key="item.id"
|
:label="item.label"
|
:value="item.label"
|
/>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="关联物料:" label-width="100px">
|
<el-select
|
v-model="addProjectForm.materialId"
|
clearable
|
placeholder="请选择或输入父项目"
|
>
|
<el-option
|
v-for="item in materialTree"
|
:key="item.id"
|
:label="item.label"
|
:value="item.id"
|
/>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="项目名称:" label-width="100px">
|
<el-input v-model="addProjectForm.name" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="单位:" label-width="100px">
|
<el-input v-model="addProjectForm.unit" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="招标人要求值:" label-width="100px">
|
<el-input v-model="addProjectForm.required" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="内控值:" label-width="100px">
|
<el-input v-model="addProjectForm.internal" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="试验方法:" label-width="100px">
|
<el-input v-model="addProjectForm.method" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button type="primary" @click="addNewProject">确 定</el-button>
|
<el-button @click="projectFormVisible = false">取 消</el-button>
|
</div>
|
</el-dialog>
|
<el-dialog title="修改物料" :visible.sync="changeMaterialFormVisible" width="35%">
|
<el-form :model="changeMaterialForm">
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="物料名称:" label-width="100px">
|
<el-input v-model="changeMaterialForm.name" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="供应商:" label-width="100px">
|
<el-input v-model="changeMaterialForm.supplier" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="批次:" label-width="100px">
|
<el-input v-model="changeMaterialForm.batch" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="存放地:" label-width="100px">
|
<el-input v-model="changeMaterialForm.location" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="盘号:" label-width="100px">
|
<el-input v-model="changeMaterialForm.reelNumber" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="数量:" label-width="100px">
|
<el-input v-model="changeMaterialForm.num" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button type="primary" @click="changeMaterial">确 定</el-button>
|
<el-button @click="changeMaterialFormVisible = false">取 消</el-button>
|
</div>
|
</el-dialog>
|
<el-dialog title="修改子项目" :visible.sync="changeProjectFormVisible" width="35%">
|
<el-form :model="changeProjectForm">
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="父项目:" label-width="100px">
|
<el-select
|
v-model="changeProjectForm.father"
|
clearable
|
filterable
|
:allow-create="true"
|
placeholder="请选择或输入父项目"
|
@blur="productSelect"
|
>
|
<el-option
|
v-for="item in fatherOpetions"
|
:key="item.id"
|
:label="item.label"
|
:value="item.label"
|
/>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="项目名称:" label-width="100px">
|
<el-input v-model="changeProjectForm.name" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="单位:" label-width="100px">
|
<el-input v-model="changeProjectForm.unit" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="招标人要求值:" label-width="100px">
|
<el-input v-model="changeProjectForm.required" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="内控值:" label-width="100px">
|
<el-input v-model="changeProjectForm.internal" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="试验方法:" label-width="100px">
|
<el-input v-model="changeProjectForm.method" autocomplete="off" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button type="primary" @click="changeProject">确 定</el-button>
|
<el-button @click="projectFormVisible = false">取 消</el-button>
|
</div>
|
</el-dialog>
|
<el-dialog
|
title="提示"
|
:visible.sync="delmaterialFormVisible"
|
width="30%"
|
>
|
<span>确认删除该物料吗?</span>
|
<span slot="footer" class="dialog-footer">
|
<el-button type="primary" @click="deleteMaterial">确 定</el-button>
|
<el-button @click="delmaterialFormVisible = false">取 消</el-button>
|
</span>
|
</el-dialog>
|
<el-dialog
|
title="提示"
|
:visible.sync="delProductFormVisible"
|
width="30%"
|
>
|
<span>确认删除该子项目吗?</span>
|
<span slot="footer" class="dialog-footer">
|
<el-button type="primary" @click="deleleProduct">确 定</el-button>
|
<el-button @click="delProductFormVisible = false">取 消</el-button>
|
</span>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import { getMaterialList, getProductProductId, addMaterial, addProduct, getMaterialDetail, updateMaterial, updateProduct, deleteMaterial, deleteProduct } from '@/api/standardLibrary'
|
export default {
|
name: 'SpecificationDetail',
|
data() {
|
return {
|
// 查找对应详情id
|
specificationsId: '',
|
// 默认值
|
materialDefaultProps: {
|
children: 'children',
|
label: 'label'
|
},
|
// 物料tree数据
|
materialTree: [],
|
// 标准详情分类
|
projectTree: [],
|
searchData: {
|
keyword: ''
|
},
|
// 详情信息
|
detailInfo: {},
|
// 物料tree默认选中值
|
materialTreeDefault: [],
|
projectTreeDefault: [],
|
materialFormVisible: false,
|
delmaterialFormVisible: false,
|
changeMaterialFormVisible: false,
|
projectFormVisible: false,
|
changeProjectFormVisible: false,
|
delProductFormVisible: false,
|
addMaterialForm: {},
|
changeMaterialForm: {},
|
addProjectForm: {},
|
changeProjectForm: {},
|
fatherOpetions: [],
|
materialId: '',
|
productId: ''
|
}
|
},
|
// 为了选中第一层级下的第一个节点
|
watch: {
|
projectTreeDefault(newVal, oldVal) {
|
// console.log(newVal)
|
if (newVal) {
|
this.$nextTick(() => {
|
// console.log(document.querySelector('.el-tree-node__children .el-tree-node__content'))
|
|
document
|
.querySelector('.el-tree-node__children .el-tree-node__content')
|
?.click()
|
})
|
}
|
},
|
materialTreeDefault(newVal, oldVal) {
|
// console.log(newVal)
|
if (newVal) {
|
this.$nextTick(() => {
|
// console.log(document.querySelector('.el-tree-node__content'))
|
document
|
.querySelector('.el-tree-node__content')
|
?.click()
|
})
|
}
|
}
|
},
|
created() {
|
// console.log(this.$route.params)
|
// 这里加一个校验,如果没有params.id 返回标准库页面
|
this.specificationsId = this.$route.params.id
|
this.addMaterialForm.specificationsId = this.$route.params.id
|
this.refreshData()
|
},
|
methods: {
|
productSelect(e) {
|
const value = e.target.value // 输入框值
|
if (value) { // 你输入才有这个值 不为空,如果你下拉框选择的话 这个值为空
|
this.addProjectForm.pcode = value
|
}
|
},
|
// 刷新或初次获得数据
|
refreshData() {
|
this.getMaterialTreeData()
|
},
|
// tree树的过滤查询
|
filterNode(value, data) {
|
if (!value) return true
|
return data.label.indexOf(value) !== -1
|
},
|
// 获取物料tree
|
async getMaterialTreeData() {
|
const { data } = await getMaterialList({ specificationsId: this.specificationsId })
|
// console.log(data)
|
this.materialTree = data.map(item => ({ ...item, label: item.name }))
|
this.materialTreeDefault = [this.materialTree[0].id]
|
console.log(this.materialTree, this.materialTreeDefault)
|
},
|
// 物料库的节点点击
|
materialTreeClick(data, node, element) {
|
// 点击物料节点,查询对应的项目tree数据
|
console.log(data)
|
// 得到物料Id
|
this.materialId = data.id
|
},
|
// 项目库的节点点击
|
async projectTreeClick(data, node, element) {
|
// 先判断点击的是父节点还是子节点
|
if (('children' in data)) return
|
console.log('子项目节点', data)
|
this.productId = data.id
|
//
|
const { data: detailInfo } = await getProductProductId({ productId: data.id })
|
// console.log('详情信息', detailInfo)
|
this.detailInfo = detailInfo
|
this.changeProjectForm = { ...detailInfo }
|
},
|
// 新增物料
|
async addNewMaterial() {
|
// console.log('产看添加物料参数:', this.addMaterialForm)
|
// const res = await addMaterial(this.addMaterialForm)
|
await addMaterial(this.addMaterialForm)
|
// console.log(res)
|
this.$message.success('添加物料成功')
|
this.materialFormVisible = false
|
this.refreshData()
|
},
|
// 新增项目
|
async addNewProject() {
|
console.log('查看添加的子项目参数', this.addProjectForm)
|
const res = await addProduct(this.addProjectForm)
|
console.log(res)
|
this.$message.success('添加新项目成功')
|
this.projectFormVisible = false
|
this.refreshData()
|
},
|
// 修改物料
|
async changeMaterial() {
|
console.log('修改物料参数', this.changeMaterialForm)
|
const res = await updateMaterial(this.changeMaterialForm)
|
this.changeMaterialFormVisible = false
|
this.$message.success('修改成功')
|
this.refreshData()
|
console.log(res)
|
},
|
// 修改项目
|
async changeProject() {
|
console.log('修改项目参数', this.changeProjectForm)
|
const { data } = await updateProduct(this.changeProjectForm)
|
console.log(data)
|
this.changeMaterialFormVisible = false
|
this.$message.success('修改成功')
|
this.refreshData()
|
},
|
// 显示修改物料模态框同时获取需要修改物料信息
|
async showChangeMaterial(data) {
|
const { data: materialInfo } = await getMaterialDetail({ materialId: data.id })
|
for (const key in materialInfo) {
|
// console.log(key, materialInfo[key])
|
if (!materialInfo[key]) {
|
// console.log(materialInfo[key])
|
delete materialInfo[key]
|
}
|
}
|
console.log(materialInfo)
|
this.changeMaterialForm = materialInfo
|
this.changeMaterialFormVisible = true
|
},
|
// 显示修改项目模态框
|
showChangeProject(data) {
|
// console.log('修改前', this.changeProjectForm)
|
this.changeProjectForm.name = data.name
|
// console.log('修改后', this.changeMaterialForm)
|
this.changeProjectFormVisible = true
|
},
|
async deleteMaterial() {
|
await deleteMaterial({ materialId: this.materialId })
|
this.delmaterialFormVisible = false
|
},
|
async deleleProduct() {
|
// console.log('productId', this.productId)
|
await deleteProduct({ productId: this.productId })
|
this.delProductFormVisible = false
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.specificationDetail-main{
|
// 页面头部条件搜索
|
.page-header-tips{
|
background: #fff;
|
display: flex;
|
justify-content: space-between;
|
padding: 0 24px 12px 24px;
|
.search-bar{
|
.el-radio-button.is-active{
|
color: #409EFF !important;
|
background: #ecf5ff !important;
|
border-color: #b3d8ff !important;
|
}
|
>span{
|
font-size: 20px;
|
}
|
}
|
}
|
// 页面中心内容区域
|
.content-main{
|
display: flex;
|
height: 100%;
|
min-height: calc(100vh - 88px);
|
// .specificationDetail-bom,.specificationDetail-card{
|
// padding: 20px;
|
// background: #fff;
|
// }
|
.specificationDetail-bom{
|
flex: 50%;
|
margin-right: 12px;
|
display: flex;
|
>div:nth-child(1){
|
flex: 43%;
|
|
margin-right: 12px;
|
padding: 20px;
|
background: #fff;
|
}
|
>div:nth-child(2){
|
flex: 57%;
|
|
margin-left: 12px;
|
background: #fff;
|
padding: 20px;
|
|
}
|
.bom-item{
|
flex: 50%;
|
.bom-item-search{
|
margin-bottom: 12px;
|
::v-deep .el-input{
|
input{
|
height: 33px;
|
line-height: 33px;
|
}
|
}
|
.tips{
|
height: 33px !important;
|
display: flex;
|
height: 24px;
|
align-items: center;
|
font-size: 16px;
|
// margin-bottom: 12px;
|
>span{
|
display: inline-block;
|
margin-right: 10px;
|
width: 4px;
|
height: 16px;
|
background: #0077DB;
|
}
|
>div{
|
height: 100%;
|
line-height: 36px;
|
}
|
.el-button{
|
padding: 0;
|
}
|
}
|
}
|
.bom-item-search .el-row{
|
// display: flex;
|
.el-col{
|
text-align: right;
|
}
|
}
|
}
|
}
|
.specificationDetail-card{
|
flex: 50%;
|
margin-left: 12px;
|
.card-main{
|
background: #fff;
|
// padding: 10px 20px 10px 20px;
|
margin: 0;
|
margin-bottom: 12px;
|
border-radius: 6px;
|
overflow: hidden;
|
.tips-main{
|
// margin: ;
|
padding: 10px 20px 0 20px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
height: 50px;
|
// height: ;
|
&:hover{
|
background: #85bff810;
|
.tips-btn{
|
display: block;
|
left: 0;
|
opacity:1;
|
}
|
}
|
.tips-btn{
|
height: 100%;
|
// display: none;
|
position: relative;
|
opacity:0;
|
left: 100px;
|
transition: all 0.3s ease-in-out;
|
}
|
.tips{
|
height: 100%;
|
display: flex;
|
height: 24px;
|
align-items: center;
|
font-size: 16px;
|
// margin-bottom: 12px;
|
>span{
|
display: inline-block;
|
margin-right: 10px;
|
width: 4px;
|
height: 16px;
|
background: #0077DB;
|
}
|
>div{
|
height: 100%;
|
line-height: 26px;
|
}
|
.el-button{
|
padding: 0;
|
}
|
}
|
}
|
|
// 基本信息和企业信息的每一个信息项样式
|
.message{
|
padding: 0px 20px 10px 20px;
|
|
display: flex;
|
flex-wrap: wrap;
|
border-top: 1px solid #F2F6FC;
|
// border-top: 1px solid #F2F6FC;
|
>div{
|
flex: 50%;
|
max-width: 50%;
|
padding: 8px;
|
color: #606266;
|
align-items: center;
|
// height: 65px;
|
font-size: 12px;
|
height: 52px;
|
display: flex;
|
align-items: center;
|
>span{
|
color: #303133;
|
font-size: 16px;
|
//
|
>i{
|
margin-right: 8px;
|
}
|
}
|
}
|
// >div:nth-child(5){
|
// flex: 60%;
|
// max-width: 60%;
|
// }
|
}
|
}
|
}
|
}
|
}
|
|
// 树节点的样式
|
.custom-tree-node {
|
flex: 1;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
font-size: 14px;
|
padding-right: 8px;
|
&>:nth-child(2){
|
display: none;
|
}
|
&:hover >:nth-child(2){
|
display: block;
|
}
|
}
|
</style>
|