| | |
| | | <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", |
| | |
| | | }, |
| | | data(){ |
| | | return{ |
| | | tableHeadDataFateher:[], |
| | | templateOids:"", |
| | | tableDataArray:[], |
| | | codeClassifyOid:"", |
| | | coderuleoid:"", |
| | |
| | | this.coderuleoid=res.data[0].attributes.coderuleoid; |
| | | this.$emit("codeClassifyOid", this.codeClassifyOid ) |
| | | this.$emit("coderuleoid", this.coderuleoid ) |
| | | this.TableHeadRends() |
| | | }).catch(res=>{ |
| | | console.log(res) |
| | | }) |
| | |
| | | } |
| | | } |
| | | }, |
| | | //树点击事件 |
| | | 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() |
| | | } |
| | | } |
| | | } |