| | |
| | | <el-button type="primary" size="mini" disabled>快速创建</el-button> --> |
| | | </div> |
| | | </div> |
| | | <TableCommonView ref="tableListRef" :table-list="tableList" :select-box="false" @selCommonClick="selNameClick"> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | :table-list="tableList" |
| | | :select-box="false" |
| | | @selCommonClick="selNameClick" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | </TableCommonView> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <!-- <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> --> |
| | |
| | | } |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | this.showcol = val; |
| | | this.tableList.tableColumn = this.setColumnVisible(val); |
| | | }, |
| | | // setColumnVisible(showCol){ |
| | | // return this.tableColumn.map(ele=>{ |
| | | // return { |
| | | // ...ele, |
| | | // isShowColumn:showCol.includes(ele.label) |
| | | // } |
| | | // }) |
| | | // }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | |
| | | async getProductList() { |
| | | let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc |
| | | await fn({ |
| | | productName: this.keywordType === "产品名称" ? this.keyword : "", |
| | | productNumber: this.keywordType === "产品编号" ? this.keyword : "", |
| | | keyword:this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | console.log(res.data) |
| | | if (res.data.code === 200) { |
| | | if (res.data.data.list && res.data.data.list.length > 0) { |
| | | const list = res.data.data.list.map((item) => { |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list |
| | | this.pagerOptions.totalCount = res.data.data.total |
| | | this.pagerOptions.totalCount = res.data.total |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | |
| | | } |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | [val.value]: content |
| | | } |
| | | searchClick(content) { |
| | | console.log( content) |
| | | this.keyword = content |
| | | this.keywordType = val.label |
| | | this.getData() |
| | | }, |
| | | resetClick() { |