Browse Source

修改查看更多

zs 1 year ago
parent
commit
2ae7fbbcc7
1 changed files with 50 additions and 2 deletions
  1. 50 2
      src/views/achievement/index.vue

+ 50 - 2
src/views/achievement/index.vue

@@ -89,7 +89,7 @@
             </el-row>
             <el-row class="one_1">
               <el-col :span="3" class="left">技术领域</el-col>
-              <el-col :span="21" class="right">
+              <el-col :span="20" class="right" v-if="twoShow">
                 <a-button
                   class="title"
                   v-for="(item, index) in fieldList"
@@ -102,6 +102,29 @@
                   {{ item.label }}
                 </a-button>
               </el-col>
+              <el-col :span="20" class="right" v-else>
+                <a-button
+                  class="title"
+                  v-for="(item, index) in fieldList.slice(0, 8)"
+                  :key="index"
+                  type="link"
+                  size="samll"
+                  @click="toSelect(item, 'two')"
+                  :class="[item.is_active ? 'show' : '']"
+                >
+                  {{ item.label }}
+                </a-button>
+              </el-col>
+              <el-col :span="1" class="button">
+                <span v-if="!twoShow" @click="twoShow = true">
+                  更多
+                  <el-icon><ArrowDown /></el-icon>
+                </span>
+                <span v-else @click="twoShow = false">
+                  收起
+                  <el-icon><ArrowUp /></el-icon>
+                </span>
+              </el-col>
             </el-row>
             <el-row class="one_1">
               <el-col :span="3" class="left">成熟度</el-col>
@@ -121,7 +144,7 @@
             </el-row>
             <el-row class="one_1">
               <el-col :span="3" class="left">出让方式</el-col>
-              <el-col :span="21" class="right">
+              <el-col :span="20" class="right" v-if="thrShow">
                 <a-button
                   class="title"
                   v-for="(item, index) in sellList"
@@ -134,6 +157,29 @@
                   {{ item.label }}
                 </a-button>
               </el-col>
+              <el-col :span="20" class="right" v-else>
+                <a-button
+                  class="title"
+                  v-for="(item, index) in sellList.slice(0, 8)"
+                  :key="index"
+                  type="link"
+                  size="samll"
+                  @click="toSelect(item, 'four')"
+                  :class="[item.is_active ? 'show' : '']"
+                >
+                  {{ item.label }}
+                </a-button>
+              </el-col>
+              <el-col :span="1" class="button">
+                <span v-if="!thrShow" @click="thrShow = true">
+                  更多
+                  <el-icon><ArrowDown /></el-icon>
+                </span>
+                <span v-else @click="thrShow = false">
+                  收起
+                  <el-icon><ArrowUp /></el-icon>
+                </span>
+              </el-col>
             </el-row>
             <el-row class="one_1">
               <el-col :span="3" class="left">交易价格</el-col>
@@ -279,6 +325,8 @@ const sellList = ref([])
 const technologyList = ref([])
 // 是否展开
 const oneShow = ref(false)
+const twoShow = ref(false)
+const thrShow = ref(false)
 // 查看
 const toView = (item) => {
   router.push({ path: '/achievement/detail', query: { id: item.id || item._id } })