wuhongyu 5 年之前
父節點
當前提交
05669dfa25

+ 2 - 1
src/components/enterprise/appointment.vue

@@ -12,7 +12,7 @@
             </el-col>
           </el-col>
           <el-col :span="19" class="right">
-            <appointment v-on="$listeners" :resultTable="resultTable"></appointment>
+            <appointment :total="total" v-on="$listeners" :resultTable="resultTable"></appointment>
           </el-col>
         </div>
         <el-col :span="24" class="foots">
@@ -36,6 +36,7 @@ export default {
     liebiaoList: null, //分类导航
     form: null,
     resultTable: null,
+    total: null,
   },
   components: {
     heads,

+ 7 - 4
src/layout/enterprise/appointment.vue

@@ -32,7 +32,7 @@
             </el-table-column>
             <el-table-column prop="desc" label="简介" :show-overflow-tooltip="true"> </el-table-column>
 
-            <el-table-column label="操作">
+            <el-table-column label="操作" style="width:200px">
               <template slot-scope="scope">
                 <el-button size="mini" type="text" @click.prevent="handleEdit(scope.row.id)"
                   ><el-tooltip class="item" effect="dark" content="编辑" placement="top-start"> <i class="el-icon-edit"></i> </el-tooltip
@@ -57,7 +57,7 @@
             </el-table-column>
           </el-table>
           <el-col :span="24">
-            <page :total="total" position="right"></page>
+            <page :total="total" position="right" v-on="$listeners"></page>
           </el-col>
         </el-col>
       </el-col>
@@ -69,13 +69,16 @@
 import _ from 'lodash';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: news } = createNamespacedHelpers('news');
+import page from '@/components/pagination.vue';
 export default {
   name: 'technical',
   props: {
     resultTable: null,
     total: null,
   },
-  components: {},
+  components: {
+    page,
+  },
   data: () => ({
     downLeftTopImage: require('@/assets/live/square_big.png'),
     jishuImage: require('@/assets/live/main3.png'),
@@ -153,7 +156,7 @@ export default {
   height: 500px;
   overflow: hidden;
   margin: 0 auto;
-  padding: 20px 20px 20px 20px;
+  padding: 20px 10px 20px 10px;
 }
 .leftTitle {
   text-align: center;

+ 17 - 3
src/views/enterprise/appointment.vue

@@ -1,6 +1,13 @@
 <template>
   <div id="adviserList">
-    <appointment-detail :liebiaoList="liebiaoList" @deleteRow="deleteRow" :resultTable="resultTable" @onsave="onsaveClick"></appointment-detail>
+    <appointment-detail
+      :liebiaoList="liebiaoList"
+      @query="search"
+      :total="total"
+      @deleteRow="deleteRow"
+      :resultTable="resultTable"
+      @onsave="onsaveClick"
+    ></appointment-detail>
   </div>
 </template>
 
@@ -16,6 +23,7 @@ export default {
     appointmentDetail,
   },
   data: () => ({
+    total: 0,
     info: {},
     liebiaoList: [
       { name: '基本信息' },
@@ -40,12 +48,18 @@ export default {
     ...dock(['query', 'delete', 'update']),
     ...login({ logout: 'logout', transactiondtetle: 'delete' }),
     //查询
-    async search() {
-      let res = await this.query();
+    async search({ skip = 0, limit = 4 } = { skip: 0, limit: 4 }) {
+      let res = await this.query({ skip, limit });
       console.log(res.data);
       this.$set(this, `resultTable`, res.data);
+      this.$set(this, `total`, res.total);
       console.log();
     },
+
+    search1({ skip, limit }) {
+      console.log(skip);
+    },
+
     async onsaveClick({ id }) {
       console.log(id);
       if (id === '基本信息') {