| | |
| | | <template> |
| | | <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid"> |
| | | <avue-crud v-model="form" |
| | | ref="dataTable" |
| | | :data="tableList" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading"> |
| | | <!--top区域按钮--> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <dynamic-button LocationType="top" type="table":butttonList="componentVO.buttons" ></dynamic-button> |
| | | </template> |
| | | <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid"> |
| | | <avue-crud v-model="form" |
| | | ref="dataTable" |
| | | :data="tableList" |
| | | :option="option" |
| | | :page.sync="pageType" |
| | | :table-loading="loading" |
| | | @selection-change="selectChange"> |
| | | <!--top区域按钮--> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <dynamic-button LocationType="top" type="table":butttonList="componentVO.buttons" :selectList="selectList"></dynamic-button> |
| | | </template> |
| | | |
| | | <!--menu区域按钮--> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <dynamic-button :scope="scope" LocationType="menu" type="table":butttonList="componentVO.buttons" ></dynamic-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | <!--menu区域按钮--> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <dynamic-button :scope="scope" LocationType="menu" type="table":butttonList="componentVO.buttons" :selectList="selectList"></dynamic-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | dataStore:{ |
| | | //弹窗时按钮所属区域选中数据 |
| | | type:Array, |
| | | default: [] |
| | | }, |
| | | tableType:{ |
| | | type:String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | parentHeight:'100%',//当前组件根节点元素高度 |
| | | form: {}, |
| | | formName: '', |
| | | loading: false, |
| | | visible: false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 5, |
| | | total: 50, |
| | | }, |
| | | simplePage:{ |
| | | currentPage: 1, |
| | | total: 100, |
| | | pagerCount:4, |
| | | layout:"prev, pager, next" |
| | | }, |
| | | //表格数据 |
| | | tableList: [ |
| | |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | selection: true, |
| | | tip:false, |
| | | height: '100%', |
| | | calcHeight: 15, |
| | | indexFixed: false, |
| | | menuFixed: false, |
| | | column: [], |
| | | }, |
| | | selectList:[], |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }; |
| | | }); |
| | | }, |
| | | pageType() { |
| | | return this.areasName === 'westArea' ? this.simplePage : this.page; |
| | | } |
| | | }, |
| | | watch:{ |
| | | parentHeight:{ |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | selectChange(row){ |
| | | this.selectList = row; |
| | | }, |
| | | TreeSelectChange(row){ |
| | | this.TreeSelectList = row; |
| | | } |
| | | } |
| | | } |
| | | </script> |