zhy
2023-10-25 8130823e7e4c36e1c10705c734b0b60b5f193958
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,20 @@
</template>
<script>
import myTree from '@/components/myTree/index';
import { listType, getType, delType, addType, updateType, refreshCache } 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 +258,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)