| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- @include('public.admin.box-item')
- <style>
- [v-cloak]{display: none;}
- body{
- background-color: #eff3f6;
- }
- .all{
- margin-bottom: 80px;
- }
- .fixed {
- width: calc(100% - 250px);
- padding: 7px;
- padding-top: 10px;
- position: fixed;
- bottom: 0px;
- z-index: 199;
- box-sizing: border-box;
- box-shadow: 0px -1px 10px rgb(0 0 0 / 10%);
- margin-left: -14px;
- background-color: #fff;
- border-radius: 20px 20px 0 0;
- }
- .fixed_box {
- height: 60px;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .el-table td, .el-table th.is-leaf{
- text-align: center;
- }
- </style>
- <script>
- let tableMixins = {
- el:"#app",
- delimiters: ['[[', ']]'],
- data(){
- return {
- tablePage: 1,
- tablePageSizes:[10,20,30],
- tableTotal: 0,
- tablePageSize: 10,
- tableData: [],
- searchInfo: {},
- tableLoading:false,
- last_page:"",
- }
- },
- created(){
- this.getTableData();
- },
- methods:{
- getTableData(json){
- if(this.last_page == this.tablePage){
- this.$message.error("已经是最后一页了");
- return false;
- }
- this.tableLoading = true;
- this.$http.post(this.tableUrl, {data:json || {}}).then(({data:{result,msg,data}})=>{
- this.tableLoading = false;
- if (result == 1) {
- this.tableTotal = data.total;
- this.last_page = data.last_page;
- this.tableData = data.data;
- }else{
- this.$message.error(msg || "");
- }
- })
- },
- tablePageFun(){
- let search = this.search || {};
- search.page = this.tablePage;
- return search;
- },
- searchVal(){
- this.last_page = "";
- this.tablePage = 1;
- this.getTableData(this.tablePageFun());
- },
- handleSizeChange(val){
- console.log("duoshanye",val);
- },
- handleCurrentChange(val){
- this.tablePage = val;
- this.getTableData(this.tablePageFun());
- },
- }
- }
- </script>
|