clay commit : 层级结构完成

This commit is contained in:
clay
2022-10-05 15:49:17 +08:00
parent b40b54f255
commit e450dfac97
4 changed files with 134 additions and 35 deletions

View File

@@ -102,8 +102,8 @@
<Introduction :introduction="contextData" v-if="type === 1"/>
<List :list="contextData" v-if="type === 2"/>
<FileList :value="contextData" v-if="type === 4"/>
<DireData :value="contextData" v-if="type === 3 && organizationType == '1'"/>
<Organization :value="contextData" v-if="type === 3 && organizationType == '2'"/>
<DireData :value="contextData" v-if="type === 3 && dreDataType == '1'"/>
<DireDataTow :value="contextData" v-if="type === 3 && dreDataType == '2'"/>
<Details :value="detailsData" v-if="type == null"/>
</el-col>
</el-row>
@@ -141,8 +141,8 @@
<Introduction :introduction="contextData" v-if="type === 1"/>
<List :list="contextData" v-if="type === 2"/>
<FileList :value="contextData" v-if="type === 4"/>
<DireData :value="contextData" v-if="type === 3 && organizationType == '1'"/>
<Organization :value="contextData" v-if="type === 3 && organizationType == '2'"/>
<DireData :value="contextData" v-if="type === 3 && dreDataType == '1'"/>
<DireDataTow :value="contextData" v-if="type === 3 && dreDataType == '2'"/>
<Details :value="detailsData" v-if="type == null"/>
</el-col>
</el-row>
@@ -161,7 +161,7 @@ import {getNode, crumbs, article} from "@/api";
import Introduction from './components/Introduction.vue'
import List from './components/list.vue'
import DireData from './components/dire_data.vue'
import Organization from './components/organization.vue'
import DireDataTow from './components/dire_data_tow.vue'
import Details from './components/details.vue'
import FileList from './components/file_list.vue'
import {handleTree} from "@/utils/ebts";
@@ -174,14 +174,15 @@ export default {
List,
DireData,
Details,
FileList
FileList,
DireDataTow
},
data() {
return {
width: document.documentElement.clientWidth > 992,
secondId: null,
navId: null,
organizationType: "",
dreDataType: "",
navList: [],
showIndex: 0,
showSecond: true,
@@ -416,10 +417,10 @@ export default {
this.contextData = res.data
} else if (this.type == 3) {
if (res.additional == "") {
this.organizationType = "1"
this.dreDataType = "1"
} else {
console.log(this.organizationType, "this.organizationType")
this.organizationType = res.additional
console.log(this.dreDataType, "this.organizationType")
this.dreDataType = res.additional
}
this.contextData = handleTree(res.data, "id", "pid", null, null)
console.log(this.contextData, "this.contextData")