| | |
| | | this.coderuleoid=res.data[0].attributes.coderuleoid; |
| | | this.$emit("codeClassifyOid", this.codeClassifyOid ) |
| | | this.$emit("coderuleoid", this.coderuleoid ) |
| | | this.TableHeadRends() |
| | | }).catch(res=>{ |
| | | console.log(res) |
| | | }) |
| | |
| | | page: this.currentPage, |
| | | limit: this.pageSize, |
| | | }).then(res => { |
| | | // this.page.total = res.data.total; |
| | | // this.data = res.data.data; |
| | | this.tableDataArray=res.data.data; |
| | | this.$emit('tableDataArray',this.tableDataArray) |
| | | this.$emit('total',res.data.total) |
| | | console.log('table',this.tableDataArray) |
| | | }) |
| | | }, |
| | | //表格头部 |
| | | 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) |
| | | TableHeadRend() { |
| | | return new Promise((resolve,reject)=>{ |
| | | MasterTable({ |
| | | codeClassifyOid: this.nodeClickList.oid, |
| | | functionId: 5, |
| | | }).then(res => { |
| | | this.tableHeadDataFateher = res.data; |
| | | this.templateOids = res.data.tableDefineVO.oid; |
| | | this.$emit('tableHeadDataFateher', this.tableHeadDataFateher); |
| | | resolve(); |
| | | }).catch(err=>{ |
| | | reject(err) |
| | | }) |
| | | }) |
| | | }, |
| | | //树点击事件 |
| | | nodeClick(data){ |
| | | this.nodeClickList = data; |
| | | this.TableHeadRend() |
| | | this.TableRend() |
| | | console.log('code',this.nodeClickList.oid) |
| | | console.log('teoid',this.templateOids) |
| | | console.log() |
| | | async nodeClick(data) { |
| | | try { |
| | | this.nodeClickList = data; |
| | | await this.TableHeadRend(); // 先执行 TableHeadRend() |
| | | this.TableRend(); // TableHeadRend() 方法完成后再执行 TableRend() |
| | | this.$emit('nodeClick',this.templateOids) |
| | | console.log(this.templateOids) |
| | | } catch (error) { |
| | | // 处理错误 |
| | | this.$message.error(error) |
| | | } |
| | | } |
| | | } |
| | | } |