|
|
@@ -64,7 +64,7 @@ const getOcTypeData = async () => {
|
|
|
|
|
|
if (data && data.length > 0) {
|
|
|
state.curOcTypeId = data[0].ocTypeId
|
|
|
- nextTick(() => {
|
|
|
+ await nextTick(() => {
|
|
|
leftTreeRef.value.setCurrentKey(data[0].ocTypeId)
|
|
|
})
|
|
|
await getOcCatData()
|
|
|
@@ -126,7 +126,7 @@ const onOcCatDelete = (row: any) => {
|
|
|
<LayoutContainer left-side-width="250px" hide-left-side-toggle>
|
|
|
<template #leftSide>
|
|
|
<el-scrollbar class="tree">
|
|
|
- <ElTree ref="leftTreeRef" :data="state.treeData" default-expand-all node-key="modelId" @node-click="onTreeNodeClick">
|
|
|
+ <ElTree ref="leftTreeRef" :data="state.treeData" default-expand-all node-key="ocTypeId" @node-click="onTreeNodeClick">
|
|
|
<template #default="{ node, data }">
|
|
|
<div class="custom-tree-node">
|
|
|
<div class="label" :title="node.label">
|
|
|
@@ -183,8 +183,12 @@ const onOcCatDelete = (row: any) => {
|
|
|
|
|
|
<el-table-column label="操作" header-align="center" align="center" width="220">
|
|
|
<template #default="scope">
|
|
|
- <el-button type="warning" size="small" plain @click="onOcCatEdit(scope.row)">编辑</el-button>
|
|
|
- <el-button v-if="scope.row.isFixed <= 0" type="danger" size="small" plain @click="onOcCatDelete(scope.row)">删除</el-button>
|
|
|
+ <el-button type="warning" size="small" plain @click="onOcCatEdit(scope.row)">
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="scope.row.isFixed <= 0" type="danger" size="small" plain @click="onOcCatDelete(scope.row)">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|