zhangxin 2 jaren geleden
bovenliggende
commit
36188cd8ed
3 gewijzigde bestanden met toevoegingen van 87 en 29 verwijderingen
  1. 23 0
      src/api/collection/collection.js
  2. 3 1
      src/views/collection/collectionList.vue
  3. 61 28
      src/views/collection/seriesList.vue

+ 23 - 0
src/api/collection/collection.js

@@ -14,4 +14,27 @@ export function getCollection() {
     url: '/post/collection/list' ,
     method: 'get'
   })
+}
+
+
+
+
+export function getCollectionSale() {
+  return request({
+    url: '/post/series/sale' ,
+    method: 'get'
+  })
+}
+
+export function getCollectionOverdue() {
+  return request({
+    url: '/post/series/overdue' ,
+    method: 'get'
+  })
+}
+export function getCollectionPresale() {
+  return request({
+    url: '/post/series/presale' ,
+    method: 'get'
+  })
 }

+ 3 - 1
src/views/collection/collectionList.vue

@@ -90,6 +90,7 @@
 <script>
 import CollectionDetails from './collectionDetails.vue';
 import {getCollection}  from '../../api/collection/collection.js'
+
   export default{
     data(){
       return{
@@ -98,6 +99,7 @@ import {getCollection}  from '../../api/collection/collection.js'
     },
     mounted() {
     this.getCollectionList();
+      
     },
     methods: {
       //藏品详情点击跳转 
@@ -110,7 +112,7 @@ import {getCollection}  from '../../api/collection/collection.js'
           this.tableData = res.rows; 
           console.log(this.tableData);
         })    
-      }
+      },
     }
   }
 </script>

+ 61 - 28
src/views/collection/seriesList.vue

@@ -52,9 +52,9 @@
       <div>
         <div class="list-total">
           <el-radio-group v-model="radio1">
-          <el-radio-button label="在售"></el-radio-button>
-          <el-radio-button label="预售"></el-radio-button>
-          <el-radio-button label="已过期"></el-radio-button>
+          <el-radio-button label="在售" @click="zaishou"></el-radio-button>
+          <el-radio-button label="预售" @click="yushou"></el-radio-button>
+          <el-radio-button label="已过期" @click="guoqi"> </el-radio-button>
           
           </el-radio-group>
         </div>
@@ -69,55 +69,47 @@
       align="center"
       label="ID"
       width="100"
-      prop="noticeId">
-      <template slot-scope="scope">
-        <span >{{ scope.row.id }}</span>
-      </template>
+      prop="seriesId">
+      
     </el-table-column>
     <el-table-column
       align="center"
       label="商品名称(套)"
+      prop="seriesName"
       width="200">
-      <template slot-scope="scope">
-        <span >{{ scope.row.name }}</span>
-      </template>
+      
     </el-table-column>
     <el-table-column
       align="center"
       label="创建时间"
+      prop="createTime"
+      
       width="200">
-      <template slot-scope="scope">
-       
-        <span >{{ scope.row.date }}</span>
-      </template>
+     
     </el-table-column>
     <el-table-column
       align="center"
       label="展示时间"
+      prop="startTime"
+
       width="200">
-      <template slot-scope="scope">
-       
-        <span >{{ scope.row.time }}</span>
-      </template>
+      
     </el-table-column>
     <el-table-column
       align="center"
       label="藏品数量"
+      prop="collectionCounts"
+
       width="198">
-      <template slot-scope="scope">
-        <span >{{ scope.row.num }}</span>
-      </template>
+     
     </el-table-column>
     <el-table-column
       align="center"
       label="状态"
+      prop="status"
+
       width="200">
-      <template slot-scope="scope">
-          <div slot="reference" class="name-wrapper">
-            <el-tag size="medium">{{ scope.row.state }}</el-tag>
-          </div>
-       
-      </template>
+      
     </el-table-column>
     <el-table-column
       align="center"
@@ -162,6 +154,7 @@
   </div>
 </template>
 <script>
+import {getCollectionSale , getCollectionOverdue , getCollectionPresale}  from '../../api/collection/collection.js'
 
  export default {
     data() {
@@ -249,6 +242,11 @@
         total1:6,
       };
     },
+    mounted() {
+    this.getCollectionSaleList();
+    
+    },
+    
     methods: {
       //藏品列表点击跳转 
 
@@ -257,8 +255,43 @@
       },
       add(){
         this.$router.push("./addCollection")
-      }
+      },
+      
+      getCollectionSaleList() { 
+        getCollectionSale().then
+        ((res)=>{
+          console.log(res);
+          this.tableData = res.rows
+        })
+      },
+      
+      getCollectionOverdueList() { 
+        getCollectionOverdue.then
+        ((res)=>{
+          this.tableData = res.rows
+          
+        })
+      },
+      zaishou(){
+        console.log(1);
+        this.getCollectionSaleList();
+      },
+      yushou(){
+        console.log(2);
 
+        this.getCollectionPresaleList();
+
+      },
+      guoqi(){
+        this.getCollectionOverdueList();
+      },
+      getCollectionPresaleList() { 
+        getCollectionPresale.then
+        ((res)=>{
+          this.tableData = res.rows
+          
+        })
+      },
     }
   };