| | |
| | | <template> |
| | | <div> |
| | | <avue-crud ref="crud" class="l-mes" rowKey="oneId" :data="tableData" :option="option" :span-method="spanMethod" |
| | | :page="page" :table-loading="loading"> |
| | | <avue-crud |
| | | ref="crud" |
| | | class="l-mes" |
| | | rowKey="oneId" |
| | | :data="tableData" |
| | | :option="option" |
| | | :span-method="spanMethod" |
| | | :page="page" |
| | | :table-loading="loading"> |
| | | <template slot="code" slot-scope="scope"> |
| | | <avue-text-ellipsis use-tooltip :text="scope.row.code" :height="textEllipsisHeight" :width="textEllipsisWidth"> |
| | | <small slot="more">...</small> |
| | |
| | | message: "单位不能为空", |
| | | trigger: "blur" |
| | | }] |
| | | },] |
| | | },] |
| | | } |
| | | } |
| | | }, |
| | |
| | | return [] |
| | | }, |
| | | required: true |
| | | }, |
| | | loading: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | page: { |
| | | type: Object, |
| | |
| | | }, |
| | | }, |
| | | watch:{ |
| | | table(val) { |
| | | this.doLayout() |
| | | }, |
| | | tableTreeData:{ |
| | | handler(old,newval){ |
| | | this.loading = true |
| | | this.tableData=JSON.parse(JSON.stringify(this.tableTreeData)) |
| | | this.rowSort() |
| | | this.rowCalc() |
| | | this.loading = false |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | this.loading = true |
| | | this.tableData=JSON.parse(JSON.stringify(this.tableTreeData)) |
| | | this.rowSort() |
| | | this.rowCalc() |
| | | setTimeout(()=>{ |
| | | this.loading = false |
| | | },3000) |
| | | }, |
| | | data(){ |
| | | return { |
| | | tableData: [], |
| | | loading: false, |
| | | } |
| | | }, |
| | | methods:{ |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | .avue-crud__menu { |
| | | display: none; |
| | | .avue-crud .el-table th { |
| | | word-break: break-word; |
| | | color: rgba(102,102,102,1); |
| | | background-color: white; |
| | | } |
| | | </style> |