2 Incheckningar 6e6af3293a ... 4416dea27c

Upphovsman SHA1 Meddelande Datum
  nanshan 4416dea27c sets 2 år sedan
  nanshan 9b56afda79 修改 2 år sedan

+ 38 - 0
src/api/sets/index.js

@@ -0,0 +1,38 @@
+import request from "@/utils/request";
+
+// 新增套系
+export function addsets(data) {
+  console.log("wokankan",data);
+  return request({
+    url: "/system/tether",
+    method:"post",
+    data,
+  });
+}
+
+//   上传文件
+export function upload(file) {
+  return request({
+    url: "/file/upload",
+    method: "post",
+    data: file,
+  });
+}
+
+// 获取套系列表
+export function setList(params){
+  return request({
+    url:'/system/tether/list',
+    params
+  })
+}
+
+
+// 根据时间和名称搜索
+export function selectether(params){
+  console.log(params);
+  return request({
+    url: "/system/tether/queryTether",
+    params
+  });
+}

+ 7 - 0
src/router/index.js

@@ -182,6 +182,13 @@ export const constantRoutes = [
         name: 'addSet',
         meta: { title: '创建套系', icon: 'nested' }
       },
+      {
+        path: 'collectionList',
+        component: () => import('@/views/sets/collectionList'),
+        name: 'collectionList',
+        meta: { title: '藏品列表', icon: 'list' },
+        hidden: true
+      },
       {
         path: 'collectionDetails',
         component: () => import('@/views/sets/collectionDetails'),

+ 1 - 1
src/views/publishers/addPublisher.vue

@@ -70,7 +70,7 @@ import {
   searchPublish,
   updatapub,
 } from "../../api/publisher/publish";
-export default {
+export default { 
   name: "addPublisher",
   // props: ["issuerID"],
   data() {

+ 207 - 135
src/views/sets/addSet.vue

@@ -1,166 +1,238 @@
 <template>
-    <div class="collection-add">
-
-        <!-- <el-page-header @back="goBack" content="创建消息"></el-page-header> -->
-        <div class="collection-add-box">
-            <el-form :model="collection" :rules="rules" ref="form" label-width="100px">
-                <el-form-item label="藏品名称(套):" prop="collectionTitle" label-width="120px">
-                    <el-input v-model="collection.collectionTitle" maxlength="20" show-word-limit></el-input>
-                </el-form-item>
-                <el-form-item label="藏品头图:" prop="collectionImg" label-width="120px">
-                    <el-upload class="avatar-uploader" action="https://jsonplaceholder.typicode.com/posts/"
-                        :show-file-list="true" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
-                        <img v-if="collection.imageUrl" :src="collection.imageUrl" class="avatar">
-                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-                    </el-upload>
-                    <span style="color: red;">请按照规范上传尺寸为750px * 750px的照片</span>
-                </el-form-item>
-                <el-form-item label="设置套系时间:" prop="collectionTime" label-width="120px">
-                    <el-date-picker v-model="collection.dataput" type="datetimerange" class="up-input-right"
-                        range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" align="right">
-                    </el-date-picker>
-                </el-form-item>
-                <el-form-item label="线下礼品兑换:" prop="giftRedemption" label-width="120px">
-                    <el-radio-group v-model="collection.resource">
-                        <el-radio label="可兑换"></el-radio>
-                        <el-radio label="不可兑换"></el-radio>
-                    </el-radio-group>
-                </el-form-item>
-                <el-form-item label-width="120px">
-                    <el-button type="primary" @click="subSet()">提交</el-button>
-                </el-form-item>
-            </el-form>
-        </div>
+  <div class="collection-add">
+    <!-- <el-page-header @back="goBack" content="创建消息"></el-page-header> -->
+    <div class="collection-add-box">
+      <el-form
+        :model="collection"
+        :rules="rules"
+        ref="collection"
+        label-width="100px"
+      >
+        <el-form-item
+          label="藏品名称(套):"
+          prop="tetherName"
+          label-width="120px"
+        >
+          <el-input
+            v-model="collection.tetherName"
+            maxlength="20"
+            show-word-limit
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="藏品头图:" prop="image" label-width="120px">
+          <el-upload
+            class="avatar-uploader"
+            action="http://39.105.160.25:10996"
+            :show-file-list="true"
+            :on-success="handleAvatarSuccess"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img
+              v-if="collection.image"
+              :src="collection.image"
+              class="avatar"
+            />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+          <span style="color: red"
+            >请按照规范上传尺寸为750px * 750px的照片</span
+          >
+        </el-form-item>
+        <el-form-item
+          label="设置套系时间:"
+          prop="createTime"
+          label-width="120px"
+        >
+          <el-date-picker
+            type="datetime"
+            placeholder="起始时间"
+            v-model="collection.showTimeStart"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          >
+          </el-date-picker>
+          <el-date-picker
+            type="datetime"
+            placeholder="结束时间"
+            v-model="collection.showTimeEnd"
+            value-format="yyyy-MM-dd HH:mm: ss"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="线下礼品兑换:" prop="status" label-width="120px">
+          <el-radio-group v-model="collection.exchange">
+            <el-radio :label="1">可兑换</el-radio>
+            <el-radio :label="2">不可兑换</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label-width="120px">
+          <el-button type="primary" @click="addCollection">提交</el-button>
+        </el-form-item>
+      </el-form>
     </div>
+  </div>
 </template>
 
 <script>
-
+import { addsets, upload } from "../../api/sets/index.js";
 export default {
-    data() {
-        return {
-            collection: {
-                collectionTitle: '',
-                collectionTime: '',
-                resource: '',
-                imageUrl: '',
-                dataput: ''
-            },
-            rules: {
-                collectionTitle: [
-                    { required: true, collection: '请输入藏品名称', trigger: 'blur' }
-                ],
-
-                collectionImg: [
-                    { required: true, collection: '请设置头图', trigger: 'blur' }
-                ],
-                collectionTime: [
-                    { required: true, collection: '请设置时间', trigger: 'blur' }
-                ],
-                giftRedemption: [
-                    { required: true, collection: '请设置是否可兑换', trigger: 'blur' }
-                ],
-            },
-
+  data() {
+    return {
+      collection: {
+        tetherName: "",
+        showTimeStart: "",
+        showTimeEnd: "",
+        exchange: "",
+        image: "",
+      },
+      rules: {
+        collectionTitle: [
+          { required: true, collection: "请输入藏品名称", trigger: "blur" },
+        ],
 
+        collectionImg: [
+          { required: true, collection: "请设置头图", trigger: "blur" },
+        ],
+        collectionTime: [
+          { required: true, collection: "请设置时间", trigger: "blur" },
+        ],
+        giftRedemption: [
+          { required: true, collection: "请设置是否可兑换", trigger: "blur" },
+        ],
+      },
+    };
+  },
+  methods: {
+    addCollection() {
+      this.$refs.collection.validate((valid) => {
+        if (valid) {
+          console.log("这是前端",this.collection);
+          addsets(this.collection)
+            // .then(() => {
+            //   this.collection.tetherName = "";
+            //   this.collection.showTimeStart = "";
+            //   this.collection.showTimeEnd = "";
+            //   this.collection.exchange = "";
+            //   this.collection.image = "";
+            // })
+            .catch((err) => {
+              console.log(err);
+            });
+          this.$notify({
+            title: "成功",
+            message: "创建套系成功",
+            type: "success",
+          });
+          this.$router.push("./setList");
+        } else {
+          this.$notify({
+            title: "警告",
+            message: "请填写内容",
+            type: "warning",
+          });
         }
+      });
     },
-    methods: {
-        handleAvatarSuccess(res, file) {
-            this.collection.imageUrl = URL.createObjectURL(file.raw);
-        },
-        //限制图片大小
-        beforeAvatarUpload(file) {
-            const isJPG = file.type === "image/jpeg" || file.type === "image/png";
-            if (!isJPG) {
-                this.$message.error("上传头像图片只能是 JPG和PNG 格式!");
-            }
-            //调用[限制图片尺寸]函数
-            this.limitFileWH(750, 750, file).then((res) => {
-                file.isFlag = res
-            })
-            return isJPG && file.isFlag;
-        },
-        //限制图片尺寸
-        limitFileWH(E_width, E_height, file) {
-            let _this = this;
-            let imgWidth = "";
-            let imgHight = "";
-            const isSize = new Promise(function (resolve, reject) {
-                let width = E_width;
-                let height = E_height;
-                let _URL = window.URL || window.webkitURL;
-                let img = new Image();
-                img.onload = function () {
-                    imgWidth = img.width;
-                    imgHight = img.height;
-                    let valid = img.width == width && img.height == height;
-                    valid ? resolve() : reject();
-                }
-                img.src = _URL.createObjectURL(file);
-            }).then(() => {
-                return true;
-            }, () => {
-                _this.$message.warning({
-                    message: '上传文件的图片大小不合符标准,宽需要为' + E_width + 'px,高需要为' + E_height + 'px。当前上传图片的宽高分别为:' + imgWidth + 'px和' +
-                        imgHight + 'px',
-                    btn: false
-                })
-                return false;
-            });
-            return isSize
+    handleAvatarSuccess(res, file) {
+      console.log("上传成功");
+    },
+    //限制图片大小
+    beforeAvatarUpload(file) {
+      let formData = new FormData();
+      formData.append("file", file);
+      upload(formData).then((res) => {
+        console.log(res);
+        this.collection.image = res.url;
+      });
+    },
+    //限制图片尺寸
+    limitFileWH(E_width, E_height, file) {
+      let _this = this;
+      let imgWidth = "";
+      let imgHight = "";
+      const isSize = new Promise(function (resolve, reject) {
+        let width = E_width;
+        let height = E_height;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.onload = function () {
+          imgWidth = img.width;
+          imgHight = img.height;
+          let valid = img.width == width && img.height == height;
+          valid ? resolve() : reject();
+        };
+        img.src = _URL.createObjectURL(file);
+      }).then(
+        () => {
+          return true;
         },
-        //
-        subSet() {
-            console.log("提交")
+        () => {
+          _this.$message.warning({
+            message:
+              "上传文件的图片大小不合符标准,宽需要为" +
+              E_width +
+              "px,高需要为" +
+              E_height +
+              "px。当前上传图片的宽高分别为:" +
+              imgWidth +
+              "px和" +
+              imgHight +
+              "px",
+            btn: false,
+          });
+          return false;
         }
-    }
-}
-
-
+      );
+      return isSize;
+    },
+    //
+    subSet() {
+      console.log("提交");
+    },
+  },
+};
 </script>
 
 <style>
 .collection-add {
-    width: 700px;
-    height: 100%;
-    position: absolute;
-    top: 30px;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    margin: auto;
-    border: 1px solid #ccc;
+  width: 700px;
+  height: 100%;
+  position: absolute;
+  top: 30px;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  margin: auto;
+  border: 1px solid #ccc;
 }
 
 .collection-add-box {
-    padding: 40px;
+  padding: 40px;
 }
 
 .avatar-uploader .el-upload {
-    border: 1px dashed #d9d9d9;
-    border-radius: 6px;
-    cursor: pointer;
-    position: relative;
-    overflow: hidden;
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
 }
 
 .avatar-uploader .el-upload:hover {
-    border-color: #409EFF;
+  border-color: #409eff;
 }
 
 .avatar-uploader-icon {
-    font-size: 28px;
-    color: #8c939d;
-    width: 447px;
-    height: 447px;
-    line-height: 447px;
-    text-align: center;
+  font-size: 28px;
+  color: #8c939d;
+  width: 447px;
+  height: 447px;
+  line-height: 447px;
+  text-align: center;
 }
 
 .avatar {
-    width: 178px;
-    height: 178px;
-    display: block;
+  width: 178px;
+  height: 178px;
+  display: block;
 }
-</style>
+</style>

+ 5 - 0
src/views/sets/collectionList.vue

@@ -0,0 +1,5 @@
+<template>
+    <div>
+        藏品列表界面
+    </div>
+</template>

+ 365 - 292
src/views/sets/setList.vue

@@ -1,356 +1,429 @@
 <template>
-    <div>
-        <el-card>
-            <el-page-header @back="goback" content="套系列表"></el-page-header>
-        </el-card>
-        <el-container>
-            <el-header style="height: 120px;">
-                <div id="header-one">
-                    <h3 class="el-icon-search" style="margin-left: 10px;">筛选搜索</h3>
-                    <div id="header-one-btu">
-                        <el-button @click="empty">重置</el-button>
-                        <el-button type="primary" @click="check">搜索</el-button>
-                    </div>
-                </div>
-                <div id="header-two">
-                    <el-row>
-                        <el-col :span="5" id="header-two-left">
-                            <el-form ref="anFormRef" :model="anForm" label-width="80px">
-                                <el-form-item label="藏品名称(套):" label-width="102px">
-                                    <el-input v-model="anForm.anName" class="anInput" placeholder="筛选藏品标题"
-                                        center></el-input>
-                                </el-form-item>
-                            </el-form>
-                        </el-col>
-                        <el-col :span="8">
-                            <el-form label-width="80px">
-                                <el-form-item label="创建时间:">
-                                    <el-date-picker v-model="dataput" type="datetimerange" class="up-input-right"
-                                        range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right">
-                                    </el-date-picker>
-                                </el-form-item>
-                            </el-form>
-                        </el-col>
-                    </el-row>
-                </div>
-            </el-header>
-            <el-main style="height: 110px;">
-                <h3 class="el-icon-tickets">套系列表 共有{{ total }}条数据</h3>
-                <el-button id="main-btu" @click="addSet()">添加</el-button>
-            </el-main>
-            <div class="footer">
-                <!-- 这破玩意帮点击为啥不好使...... -->
-                <!-- <el-radio-group v-model="tabPosition">
-                                                                                             <el-radio-button label="onSale" tab-click="onSale1">在售</el-radio-button>
-                                                                                            <el-radio-button label="preSale" @click="preSale()">预售</el-radio-button>
-                                                                                                 <el-radio-button label="expired" @click="expired()">已过期</el-radio-button>
-                                                                                               </el-radio-group> -->
-                <el-row>
-                    <!-- 这块样式需要index没有只能先这么写 -->
-                    <el-button size="small" @click="onSale1()" :class="btnact">在售</el-button>
-                    <el-button size="small" @click="preSale()" :class="btnact1">预售</el-button>
-                    <el-button size="small" @click="expired()" :class="btnact2">已过期</el-button>
-                </el-row>
-                <!-- 非响应式??‘’‘不是非响应式上面帮点击时间不好使 -->
-                <el-table :data="tableData" border style="width: 100%">
-                    <el-table-column prop="id" label="id" width="110" align="center">
-                    </el-table-column>
-                    <el-table-column prop="name" label="藏品名称(套)" width="280" align="center">
-                    </el-table-column>
-                    <el-table-column prop="time" label="创建时间" width="280" align="center">
-                    </el-table-column>
-                    <el-table-column prop="time2" label="展示时间" width="280" align="center">
-                    </el-table-column>
-                    <el-table-column prop="number" label="藏品数量" width="280" align="center">
-                    </el-table-column>
-                    <el-table-column prop="tai" label="状态" width="280" align="center">
-                    </el-table-column>
-                    <el-table-column prop="edit" label="操作" width="280" align="center">
-                        <el-button type="text" @click="sList()">藏品列表</el-button>
-                        <el-row>
-                            <el-button type="text" @click="upJia()">上架</el-button>
-                            <el-button type="text" @click="editTime()">修改时间</el-button>
-                        </el-row>
-                    </el-table-column>
-                </el-table>
-            </div>
-        </el-container>
-    </div>
+  <div>
+    <el-card>
+      <el-page-header @back="goback" content="套系列表"></el-page-header>
+    </el-card>
+    <el-container>
+      <el-header style="height: 120px">
+        <div id="header-one">
+          <h3 class="el-icon-search" style="margin-left: 10px">筛选搜索</h3>
+          <div id="header-one-btu">
+            <el-button @click="empty">重置</el-button>
+            <el-button type="primary" @click="check">搜索</el-button>
+          </div>
+        </div>
+        <div id="header-two">
+          <el-row>
+            <el-col :span="5" id="header-two-left">
+              <el-form ref="anFormRef" label-width="80px">
+                <el-form-item label="藏品名称(套):" label-width="102px">
+                  <el-input
+                    v-model="input.value1"
+                    class="anInput"
+                    placeholder="筛选藏品标题"
+                    center
+                  ></el-input>
+                </el-form-item>
+              </el-form>
+            </el-col>
+            <el-col :span="12">
+              <el-form label-width="80px">
+                <el-form-item label="创建时间:">
+                  <el-date-picker
+                    v-model="input.value2"
+                    type="datetimerange"
+                    class="up-input-right"
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                    align="right"
+                  >
+                  </el-date-picker>
+                </el-form-item>
+              </el-form>
+            </el-col>
+          </el-row>
+        </div>
+      </el-header>
+      <el-main style="height: 110px">
+        <h3 class="el-icon-tickets">套系列表 共有{{ total }}条数据</h3>
+        <el-button id="main-btu" @click="addSet()">添加</el-button>
+      </el-main>
+      <div class="footer">
+        <el-row>
+       
+          <el-button size="small" @click="onSale1()" :class="btnact"
+            >在售</el-button
+          >
+          <el-button size="small" @click="preSale()" :class="btnact1"
+            >预售</el-button
+          >
+          <el-button size="small" @click="expired()" :class="btnact2"
+            >已过期</el-button
+          >
+        </el-row>
+
+        <!-- 非响应式??‘’‘不是非响应式上面帮点击时间不好使 -->
+        <el-table :data="tableData" border style="width: 100%">
+          <el-table-column prop="tetherId" label="id" width="110" align="center">
+          </el-table-column>
+          <el-table-column
+            prop="tetherName"
+            label="藏品名称(套)"
+            width="220"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="showTimeStart"
+            label="创建时间"
+            width="220"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="showTimeEnd"
+            label="结束时间"
+            width="220"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="number"
+            label="藏品数量"
+            width="195"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="status"
+            label="状态"
+            width="200"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column prop="edit" label="操作" width="280" align="center">
+            <template Slot-scope="scope">
+                <el-button type="text" @click="sList(scope.row)">藏品列表</el-button>
+            </template>
+            <el-row>
+              <el-button type="text" @click="upJia()">上架</el-button>
+              <el-button type="text" @click="editTime()">修改时间</el-button>
+            </el-row>
+          </el-table-column>
+        </el-table>
+        <el-pagination
+          @current-change="handleCurrentChange"
+          background
+          layout="total, prev, pager, next"
+          :total="total"
+          id="page"
+          :page-size="10"
+        >
+        </el-pagination>
+      </div>
+    </el-container>
+  </div>
 </template>
 <script>
-import { getSet, searchSet } from "@/api/sets/index"
+import { getSet, searchSet, setList, selectether } from "@/api/sets/index";
 export default {
-    data() {
-        return {
-            anForm: {
-                anName: '',
-            },
-            total: 1,
-            dataput: '',
-            activeName: 'first',
-            //列表
-            tabPosition: 'onSale',
-            //
-            btnact: 'th',
-            btnact1: 'th1',
-            btnact2: 'th2',
-            tableData: [{
-                id: '17',
-                name: 'wangxiu',
-                time: '20230218',
-                time2: '20230218',
-                number: '7',
-                tai: '已上线',
-                edit: 'caozuo'
-            }],
-        }
-    },
-    watch: {
-        activeName(newVal, oldVal) {
-            console.log(newVal, "\n", oldVal)
-        }
-    },
-    created() {
-
+  data() {
+    return {
+      pageInfo: {
+        // 分页信息
+        pageNum: 1,
+        pageSize: 10,
+      },
+      input: {
+        value1: "", // 搜索姓名
+        value2: "", // 搜索时间
+      },
+      thisTime:"",//当前时间
+      dataput: "",
+      activeName: "first",
+      //列表
+      tabPosition: "onSale",
+      //
+      btnact: "th",
+      btnact1: "th1",
+      btnact2: "th2",
+      total: 1,
+      tableData: [],
+      startTime:[],
+      endTime:[]
+    };
+  },
+  watch: {
+    activeName(newVal, oldVal) {
+      console.log(newVal, "\n", oldVal);
     },
-    methods: {
-        goback() {
-            window.history.go(-1)
-        },
-        //点击标签切换修改后
-        onSale1() {
-            console.log("11")
-            if (this.btnact == 'activeBack') {
-                this.btnact = 'th'
-                this.btnact1 = 'activeBack1'
-                this.btnact2 = 'activeBack2'
-            }
-            else {
-                this.btnact = 'activeBack'
-                this.btnact1 = 'th1'
-                this.btnact2 = 'th2'
-            }
-            this.tableData = [{
-                id: '17',
-                name: 'wangxiu',
-                time: '20230218',
-                time2: '20230218',
-                number: '7',
-                tai: '已上线',
-                edit: 'caozuo'
-            }]
+  },
+  
+  mounted() {
+    this.setsList();
 
+    var date = new Date();
+    var YY = date.getFullYear() + '-';
+    var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+    var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
+    var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
+    var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
+    var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
+    this.thisTime = YY + MM + DD +" "+hh + mm + ss;
+    console.log(this.thisTime);
 
-
-        },
-        preSale() {
-            console.log('222')
-            if (this.btnact1 == 'activeBack1') {
-                this.btnact1 = 'th1'
-                this.btnact = 'activeBack'
-                this.btnact2 = 'activeBack2'
-            }
-            else {
-                this.btnact1 = 'activeBack1'
-                this.btnact = 'th'
-                this.btnact2 = 'th2'
-            }
-            this.tableData = [{
-                id: '17',
-                name: 'wangxiu 预售',
-                time: '20230218',
-                time2: '20230218',
-                number: '7',
-                tai: '已上线',
-                edit: 'caozuo'
-            }]
-        },
-        expired() {
-            console.log('333')
-            if (this.btnact2 == 'activeBack2') {
-                this.btnact2 = 'th2'
-                this.btnact = 'activeBack'
-                this.btnact1 = 'activeBack1'
-            }
-            else {
-                this.btnact2 = 'activeBack'
-                this.btnact = 'th'
-                this.btnact1 = 'th1'
-            }
-            this.tableData = [{
-                id: '17',
-                name: 'wangxiu77777',
-                time: '20230218',
-                time2: '20230218',
-                number: '7',
-                tai: '已上线',
-                edit: 'caozuo'
-            }]
-        },
-        //重置
-        empty() {
-            this.anForm.anName = "";
-            this.dataput = "";
-        },
-        //搜索
-        check() {
-            if (this.anForm.anName) {
-            let con = {
-            name: this.anForm.anName
-        }
-            searchNotice(con).then((data) => {
-             this.tableData = data.list;
-             this.total = data.count;
-        })
+  },
+  methods: {
+    handleCurrentChange(newPage) {
+      this.pageInfo.pageNum = newPage;
+      this.setsList();
+    },
+    setsList() {
+      setList(this.pageInfo).then((res) => {
+        console.log(res);
+        this.tableData = res.rows;
+        this.total = res.total;
+      });
+    },
+    goback() {
+      window.history.go(-1);
+    },
+    //点击标签切换修改后
+    onSale1() {
+      console.log("11");
+      if (this.btnact == "activeBack") {
+        this.btnact = "th";
+        this.btnact1 = "activeBack1";
+        this.btnact2 = "activeBack2";
       } else {
-        this.getnotice();
+        this.btnact = "activeBack";
+        this.btnact1 = "th1";
+        this.btnact2 = "th2";
       }
-        },
-        //添加
-        addSet() {
-            this.$router.push('./addSet')
-        },
-        //藏品列表
-        sList() {
-            this.$router.push('./collectionDetails')
-        },
-        //上架
-        upJia() {
-            this.$confirm('是否要上架商品?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-        }).then(() => {
-            this.$message({
-            type: 'success',
-            message: '上架成功!'
-        });
-        }).catch(() => {
-            this.$message({
-            type: 'info',
-             message: '已取消'
-        });
+      setList(this.pageInfo).then((res) => {
+        this.startTime=res.rows.showTimeStart;
+        this.endTime=res.rows.showTimeEnd;
+      });
+      
+        
+    },
+    preSale() {
+      console.log("222");
+      if (this.btnact1 == "activeBack1") {
+        this.btnact1 = "th1";
+        this.btnact = "activeBack";
+        this.btnact2 = "activeBack2";
+      } else {
+        this.btnact1 = "activeBack1";
+        this.btnact = "th";
+        this.btnact2 = "th2";
+      }
+      //   this.tableData = [
+      //     {
+      //       id: "17",
+      //       name: "wangxiu 预售",
+      //       time: "20230218",
+      //       time2: "20230218",
+      //       number: "7",
+      //       tai: "已上线",
+      //       edit: "caozuo",
+      //     },
+      //   ];
+    },
+    expired() {
+      console.log("333");
+      if (this.btnact2 == "activeBack2") {
+        this.btnact2 = "th2";
+        this.btnact = "activeBack";
+        this.btnact1 = "activeBack1";
+      } else {
+        this.btnact2 = "activeBack";
+        this.btnact = "th";
+        this.btnact1 = "th1";
+      }
+      //   this.tableData = [
+      //     {
+      //       id: "17",
+      //       name: "wangxiu77777",
+      //       time: "20230218",
+      //       time2: "20230218",
+      //       number: "7",
+      //       tai: "已上线",
+      //       edit: "caozuo",
+      //     },
+      //   ];
+    },
+    //重置
+    empty() {
+      this.input.value1 = "";
+      this.dataput = "";
+    },
+    //搜索
+    check() {
+      if (this.input.value1 || this.input.value2) {
+        let startTime = this.$formatDate(this.input.value2[0], 'yyyy-MM-dd hh:mm:ss');
+        let endTime = this.$formatDate(this.input.value2[1], 'yyyy-MM-dd hh:mm:ss');
+        let searchCon = {
+          tetherName: this.input.value1,
+          tetherTimeStart: startTime,
+          tetherTimeEnd: endTime,
+        };
+        // console.log(searchCon);
+        selectether(searchCon).then((res) => {
+            console.log(res)
+          this.tableData = res.rows;
+          this.total = res.total;
         });
+      } else {
+        this.setsList();
+      }
+    },
 
-        },
-        //修改时间
-        editTime() {
-            console.log("修改时间")
-        }
-
-
-    }
+    //添加
+    addSet() {
+      this.$router.push("./addSet");
+    },
+    //藏品列表
+    sList(rows) {
+        this.$router.push({name:"collectionList", params:{rows}});
+    //   this.$router.push("./collectionDetails");
+    },
+    //上架
+    upJia() {
+      this.$confirm("是否要上架商品?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "上架成功!",
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消",
+          });
+        });
+    },
+    //修改时间
+    editTime() {
+      console.log("修改时间");
+    },
+  },
 };
-
 </script>
-<style scoped>
+<style scope>
 .el-main {
-    color: #333;
-    border: 1px solid #d3d7d4;
-    border-radius: 5px;
-    margin-left: 30px;
-    margin-right: 30px;
+  color: #333;
+  border: 1px solid #d3d7d4;
+  border-radius: 5px;
+  margin-left: 30px;
+  margin-right: 30px;
 }
 
 .el-header {
-    color: #333;
-    border: 1px solid #d3d7d4;
-    border-radius: 5px;
-    margin: 30px;
+  color: #333;
+  border: 1px solid #d3d7d4;
+  border-radius: 5px;
+  margin: 30px;
 }
 
 /* .el-footer {} */
 
 #footer-t {
-    color: #333;
-    border: 1px solid #d3d7d4;
-    border-radius: 5px;
-    margin-left: 10px;
-    margin-top: 30px;
+  color: #333;
+  border: 1px solid #d3d7d4;
+  border-radius: 5px;
+  margin-left: 10px;
+  margin-top: 30px;
 }
 
 /* #header-one {} */
 
 #header-two {
-    /* background-color: aqua; */
-    margin-left: 90px;
+  /* background-color: aqua; */
+  margin-left: 90px;
 }
 
 #header-one-btu {
-    margin: 20px 20px 0px 0px;
-    float: right;
+  margin: 20px 20px 0px 0px;
+  float: right;
 }
 
 #header-two-left {
-    margin-right: 150px;
+  margin-right: 150px;
 }
 
 #main-btu {
-    float: right;
-    margin-top: 10px;
+  float: right;
+  margin-top: 10px;
 }
 
 #page {
-    float: right;
-    margin-top: 15px;
+  float: right;
+  margin-top: 15px;
 }
 
 .footer {
-    margin: 20px auto;
-    width: 97%;
+  margin: 20px auto;
+  width: 97%;
 }
 
 .th {
-    /* margin: 0;
+  /* margin: 0;
     padding: 0; */
-    margin-right: -10.75px;
-    font-size: 16px;
-    font-weight: 800;
-    background-color: #FFFFFF;
-    color: #606266;
+  margin-right: -10.75px;
+  font-size: 16px;
+  font-weight: 800;
+  background-color: #ffffff;
+  color: #606266;
 }
 
 .activeBack {
-    margin-right: -10.75px;
-    font-size: 16px;
-    font-weight: 800;
-    background-color: #409EFF;
-    color: white;
+  margin-right: -10.75px;
+  font-size: 16px;
+  font-weight: 800;
+  background-color: #409eff;
+  color: white;
 }
 
 .th1 {
-    /* margin: 0;
+  /* margin: 0;
     padding: 0; */
-    margin-right: -10.75px;
-    font-size: 16px;
-    font-weight: 800;
-    background-color: #FFFFFF;
-    color: #606266;
+  margin-right: -10.75px;
+  font-size: 16px;
+  font-weight: 800;
+  background-color: #ffffff;
+  color: #606266;
 }
 
 .activeBack1 {
-    margin-right: -10.75px;
-    font-size: 16px;
-    font-weight: 800;
-    background-color: #409EFF;
-    color: white;
+  margin-right: -10.75px;
+  font-size: 16px;
+  font-weight: 800;
+  background-color: #409eff;
+  color: white;
 }
 
 .th2 {
-    /* margin: 0;
+  /* margin: 0;
     padding: 0; */
-    margin-right: -10.75px;
-    font-size: 16px;
-    font-weight: 800;
-    background-color: #FFFFFF;
-    color: #606266;
+  margin-right: -10.75px;
+  font-size: 16px;
+  font-weight: 800;
+  background-color: #ffffff;
+  color: #606266;
 }
 
 .activeBack2 {
-    margin-right: -10.75px;
-    font-size: 16px;
-    font-weight: 800;
-    background-color: #409EFF;
-    color: white;
+  margin-right: -10.75px;
+  font-size: 16px;
+  font-weight: 800;
+  background-color: #409eff;
+  color: white;
 }
-</style>
+</style>