田源
2023-06-09 f7e33d69713a5145d19fde5792b422826bc14107
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -9,7 +9,7 @@
<script>
import {getTreeList} from "@/api/MasterData/master";
import {mapMutations, mapState} from "vuex";
import {TableData} from "@/api/GetItem";
import {TableData,MasterTable} from "@/api/GetItem";
export default {
  name: "MasterTree",
@@ -29,6 +29,8 @@
  },
  data(){
    return{
      tableHeadDataFateher:[],
      templateOids:"",
      tableDataArray:[],
      codeClassifyOid:"",
      coderuleoid:"",
@@ -80,6 +82,7 @@
        this.coderuleoid=res.data[0].attributes.coderuleoid;
        this.$emit("codeClassifyOid", this.codeClassifyOid )
        this.$emit("coderuleoid", this.coderuleoid )
        this.TableHeadRends()
      }).catch(res=>{
        console.log(res)
      })
@@ -97,23 +100,52 @@
        }
      }
    },
    //树点击事件
    nodeClick(data){
      this.nodeClickList = data;
      console.log(this.currentPage,this.pageSize)
    //表格刷新
    TableRend(){
      TableData({
        templateOid: this.templateOid,
        codeClassifyOid: this.codeClassifyOid,
        page: this.pageSize,
        limit:this.currentPage,
        templateOid: this.templateOids,
        codeClassifyOid: this.nodeClickList.oid,
        page: this.currentPage,
        limit: this.pageSize,
      }).then(res => {
        console.log(res)
        // this.page.total = res.data.total;
        // this.data = res.data.data;
        this.tableDataArray=res.data.data;
        this.$emit('tableDataArray',this.tableDataArray)
        console.log(this.tableDataArray)
        this.$emit('total',res.data.total)
      })
    },
    //表格头部
    TableHeadRend(){
      MasterTable({
        codeClassifyOid:this.nodeClickList.oid,
        functionId: 5,
      }).then(res=>{
        this.tableHeadDataFateher=res.data;
        this.templateOids=res.data.tableDefineVO.oid
        this.$emit("tableHeadDataFateher",this.tableHeadDataFateher)
        console.log("123",res)
      })
    },
    TableHeadRends(){
      MasterTable({
        codeClassifyOid:this.codeClassifyOid,
        functionId: 5,
      }).then(res=>{
        this.tableHeadDataFateher=res.data;
        this.templateOids=res.data.tableDefineVO.oid
        this.$emit("tableHeadDataFateher",this.tableHeadDataFateher)
        console.log("123",res)
      })
    },
    //树点击事件
    nodeClick(data){
      this.nodeClickList = data;
       this.TableHeadRend()
      this.TableRend()
      console.log('code',this.nodeClickList.oid)
      console.log('teoid',this.templateOids)
      console.log()
    }
  }
}