From b5b6d18e2c3e2bfe62161323ff9bdd2f0ed7b541 Mon Sep 17 00:00:00 2001 From: cy <1664593601@qq.com> Date: 星期五, 08 十二月 2023 11:47:35 +0800 Subject: [PATCH] feat: 数据字典左侧的机构数 bug12544 --- admin-web/src/views/systemSetting/dict/index.vue | 35 +++++++++++++++++++++++++++++++++-- 1 files changed, 33 insertions(+), 2 deletions(-) diff --git a/admin-web/src/views/systemSetting/dict/index.vue b/admin-web/src/views/systemSetting/dict/index.vue index 73bece6..5cce408 100644 --- a/admin-web/src/views/systemSetting/dict/index.vue +++ b/admin-web/src/views/systemSetting/dict/index.vue @@ -1,5 +1,13 @@ <template> <div class="app-container"> + <!--宸︿晶鏍戝舰寮�濮�--> +<!-- <el-col :span="5">--> +<!-- <el-card class="box-card" shadow="never">--> +<!-- <my-tree ref="searchTree" :tree-list="treeDataList" @setNode="nodeClick" @search="search"></my-tree>--> +<!-- </el-card>--> +<!-- </el-col>--> + <!--宸︿晶鏍戝舰缁撴潫--> + <!--鍙充晶鍒楄〃寮�濮�--> <el-container> <el-card class="box-card" style="width: 100%" shadow="never"> <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">--> @@ -119,16 +127,21 @@ </template> <script> -import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type"; +import myTree from '@/components/myTree/index'; +import {addType, delType, getType, listType, refreshCache, updateType} from "@/api/system/dict/type"; import * as DateFormatter from "@/utils/DateFormatter"; import MyTableV2 from "@/components/myTable/myTableV2"; import SettingIplatform from '@/utils/settingIplatform'; import items from './items' +import * as finsystenant from '@/api/baseSetting/finsystenant'; + export default { name: "Dict", - components: { MyTableV2 }, + components: { MyTableV2, myTree }, data() { return { + // 鏍戞暟鎹� + treeDataList: [], constants: this.$constants, // 閬僵灞� loading: true, @@ -246,8 +259,26 @@ }; }, created() { + this.initTreeData() }, methods: { + // 宸︿晶鏍戝垵濮嬪寲 + initTreeData() { + finsystenant.getTree().then((res) => { + const content = res || []; + this.treeDataList.splice(0, this.treeDataList.length); + this.treeDataList = content; + if (this.treeDataList && this.treeDataList.length > 0) { + this.tenantId = this.treeDataList[0].id; + this.tenantName = this.treeDataList[0].label; + this.tenantCode = this.treeDataList[0].code; + } + }); + }, + nodeClick(param) { + console.log(param,'param'); + this.search(1) + }, fifterForm(params) { this.queryParams = Object.assign(this.queryParams, params) this.search(1) -- Gitblit v1.9.1