瀏覽代碼

Merge branch 'master' of http://git.cc-lotus.info/live/web-live

guhongwei 4 年之前
父節點
當前提交
8254457eac

+ 3 - 2
src/components/list/list-page.vue

@@ -53,19 +53,20 @@ export default {
     searchModel: { type: String, default: 'title' },
     title: { type: String },
     total: { type: Number, default: 0 },
+    pageSize: { type: Number, default: 5 },
     usePage: { type: Boolean, default: true },
   },
   components: { tabs, search },
   data: function() {
     return {
       searchInfo: '',
-      pageSize: 10,
       currentPage: 1,
     };
   },
   created() {},
   methods: {
-    search() {
+    search(page = 1) {
+      this.currentPage = page;
       const skip = (this.currentPage - 1) * this.pageSize;
       let condition = { skip, limit: this.pageSize };
       if (this.searchInfo && this.searchInfo !== '') condition[this.searchModel] = this.searchInfo;

+ 2 - 2
src/views/market/list/achieve.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="achieve">
-    <list-page :displayList="firDroplist" :dropList="dropList" v-bind="$attrs" :total="total" v-if="!id">
+    <list-page :displayList="firDroplist" :dropList="dropList" v-bind="$attrs" :total="total" v-if="!id" @toSearch="search">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>
@@ -44,7 +44,7 @@ export default {
     ...product(['query', 'fetch']),
     ...code({ codeQuery: 'query' }),
     // 查询相关
-    async search({ skip = 0, limit = 10, ...info } = {}) {
+    async search({ skip = 0, limit = 5, ...info } = {}) {
       // TODO: 查询
       let res = await this.query({ skip, limit, status: '2', type: '1', ...info });
       if (this.$checkRes(res)) {

+ 2 - 2
src/views/market/list/business.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="business">
-    <list-page v-bind="$attrs" :total="total" v-if="!id">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>
@@ -38,7 +38,7 @@ export default {
     ...transaction({ getTran: 'query', createTran: 'create' }),
     ...product(['query', 'fetch']),
     // 查询相关
-    async search({ skip = 0, limit = 10, ...info } = {}) {
+    async search({ skip = 0, limit = 5, ...info } = {}) {
       // TODO: 查询
       let res = await this.query({ skip, limit, status: '2', type: '2', ...info });
       if (this.$checkRes(res)) {

+ 2 - 2
src/views/market/list/expert.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="expert">
-    <list-page :displayList="firDroplist" :dropList="dropList" v-bind="$attrs" :total="total" v-if="!id">
+    <list-page :displayList="firDroplist" :dropList="dropList" v-bind="$attrs" :total="total" v-if="!id" @toSearch="search">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>
@@ -43,7 +43,7 @@ export default {
     ...expert(['query', 'fetch']),
     ...code({ codeQuery: 'query' }),
     // 查询相关
-    async search({ skip = 0, limit = 10, ...info } = {}) {
+    async search({ skip = 0, limit = 5, ...info } = {}) {
       // TODO: 查询
       let res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {

+ 2 - 2
src/views/market/list/patent.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="patent">
-    <list-page v-bind="$attrs" :total="total" v-if="!id">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>
@@ -36,7 +36,7 @@ export default {
   methods: {
     ...mapPatent(['query', 'fetch']),
     // 查询相关
-    async search({ skip = 0, limit = 10, ...info } = {}) {
+    async search({ skip = 0, limit = 5, ...info } = {}) {
       // TODO: 查询
       let res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {

+ 2 - 2
src/views/market/list/roadshow.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="roadshow">
-    <list-page v-bind="$attrs" :total="total" v-if="!id">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>
@@ -36,7 +36,7 @@ export default {
   methods: {
     ...mapRoadShow(['query', 'fetch']),
     // 查询相关
-    async search({ skip = 0, limit = 10, ...info } = {}) {
+    async search({ skip = 0, limit = 5, ...info } = {}) {
       // TODO: 查询
       let res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {

+ 2 - 2
src/views/market/list/technolgy.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="technolgy">
-    <list-page v-bind="$attrs" :total="total" v-if="!id">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>
@@ -38,7 +38,7 @@ export default {
     ...transaction({ getTran: 'query', createTran: 'create' }),
     ...product(['query', 'fetch']),
     // 查询相关
-    async search({ skip = 0, limit = 10, ...info } = {}) {
+    async search({ skip = 0, limit = 5, ...info } = {}) {
       // TODO: 查询
       let res = await this.query({ skip, limit, status: '2', type: '0', ...info });
       if (this.$checkRes(res)) {

+ 1 - 1
src/views/news/list/active.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="active">
-    <list-page v-bind="$attrs" :total="total" v-if="!id">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="10">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>

+ 1 - 1
src/views/news/list/front.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="front">
-    <list-page v-bind="$attrs" :total="total" v-if="!id">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="10">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>

+ 1 - 1
src/views/news/list/info.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="info">
-    <list-page v-bind="$attrs" :total="total" v-if="!id">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="10">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>

+ 1 - 1
src/views/news/list/notice.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="notice">
-    <list-page v-bind="$attrs" :total="total" v-if="!id">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="10">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>

+ 1 - 1
src/views/techolchat/list/question.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="question">
-    <list-page v-bind="$attrs" :total="total" v-if="!id">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="10">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>

+ 1 - 1
src/views/techolchat/list/work.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="work">
-    <list-page v-bind="$attrs" :total="total" v-if="!id">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="10">
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>