|
@@ -7,6 +7,10 @@
|
|
|
@shibai="shibai"
|
|
|
:resultTable="resultTable"
|
|
|
@onsave="onsaveClick"
|
|
|
+ :limit="limit"
|
|
|
+ :total="total"
|
|
|
+ @handleCurrentChange="handleCurrentChange"
|
|
|
+ :pageSize="pageSize"
|
|
|
></look-detail>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -23,6 +27,9 @@ export default {
|
|
|
lookDetail,
|
|
|
},
|
|
|
data: () => ({
|
|
|
+ total: 0,
|
|
|
+ limit: 4,
|
|
|
+ pageSize: 4,
|
|
|
info: {},
|
|
|
liebiaoList: [
|
|
|
{ name: '基本信息' },
|
|
@@ -50,15 +57,28 @@ export default {
|
|
|
...apply(['query', 'delete', 'update']),
|
|
|
...login({ logout: 'logout', transactiondtetle: 'delete' }),
|
|
|
//查询
|
|
|
- async search() {
|
|
|
+ async search({ skip = 0, limit = 4, currentPage } = { skip: 0, limit: 10 }) {
|
|
|
console.log(this.data);
|
|
|
- // let id = this.data;
|
|
|
+ console.log(this.data.apply.length);
|
|
|
+ this.$set(this, `total`, this.data.apply.length);
|
|
|
|
|
|
- // console.log(res.data);
|
|
|
-
|
|
|
- this.$set(this, `resultTable`, this.data.apply);
|
|
|
console.log();
|
|
|
+ const newProducts = [];
|
|
|
+ for (let index = skip; index < skip + limit; index++) {
|
|
|
+ if (this.data.apply[index]) {
|
|
|
+ newProducts.push(this.data.apply[index]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(newProducts);
|
|
|
+
|
|
|
+ this.$set(this, `resultTable`, newProducts);
|
|
|
},
|
|
|
+
|
|
|
+ handleCurrentChange({ currentPage }) {
|
|
|
+ this.search({ skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
|
|
|
+ console.log(currentPage);
|
|
|
+ },
|
|
|
+
|
|
|
async onsaveClick({ id }) {
|
|
|
console.log(id);
|
|
|
if (id === '基本信息') {
|