Sfoglia il codice sorgente

修改维度选择弹窗

yuanyiming 1 anno fa
parent
commit
b5148f0454
3 ha cambiato i file con 56 aggiunte e 11 eliminazioni
  1. 5 1
      src/plugins/vant.js
  2. 49 8
      src/views/eva/studentDetail.vue
  3. 2 2
      src/views/eva/studentEvaluate.vue

+ 5 - 1
src/plugins/vant.js

@@ -24,7 +24,9 @@ import {
   Tab,
   Tabs,
   Grid,
-  GridItem
+  GridItem,
+  DropdownMenu,
+  DropdownItem
 } from 'vant'
 Vue.use(Button)
   .use(Cell)
@@ -50,3 +52,5 @@ Vue.use(Button)
   .use(Tab)
   .use(Grid)
   .use(GridItem)
+  .use(DropdownMenu)
+  .use(DropdownItem)

+ 49 - 8
src/views/eva/studentDetail.vue

@@ -54,14 +54,18 @@
           <div>观察记录</div>
         </div>
         <div style="display: flex;justify-content: flex-end;align-items: center;">
-          <selectStyle
+          <!-- <selectStyle
             ref="weiSel"
             @shadeIsShow="shadeIsShow"
             @update-search="handleUpdateSearch"
             :listCont="filtrate"
             :tit="'请选择纬度'"
             :choose="filtrateData"
-          ></selectStyle>
+          ></selectStyle> -->
+          <van-dropdown-menu>
+            <van-dropdown-item @change="handleUpdateSearch" v-model="filtrateData" :options="filtrate" />
+          </van-dropdown-menu>
+
           <img class="img" src="../../assets/images/eva/Frame (5).png" alt="" />
         </div>
       </div>
@@ -153,6 +157,12 @@ export default {
   },
   data() {
     return {
+      value1: 0,
+      option1: [
+        { text: '全部商品', value: 0 },
+        { text: '新款商品', value: 1 },
+        { text: '活动商品', value: 2 }
+      ],
       // 遮罩层
       isSelectShow: false,
 
@@ -164,7 +174,7 @@ export default {
       // 筛选项
       filtrate: [],
       // 纬度筛选项选择数据
-      filtrateData: [''],
+      filtrateData: '',
       // 学生信息
       studentInfo: {},
 
@@ -268,8 +278,19 @@ export default {
             allsType.push(sctysotypepe[[i]])
           }
         }
-        this.filtrate = allsType
-        console.log('allsType', allsType)
+        allsType.forEach((e, index) => {
+          let a = { value: '', text: '' }
+          a.value = e.id
+          a.text = e.name
+          this.filtrate.push(a)
+        })
+        this.filtrate.unshift({ value: '', text: '全部' })
+        // this.filtrate = allsType
+        // this.filtrate.forEach(e => {
+        //   e.name=text
+        //   e.id=value
+        // }
+        console.log('filtrate', this.filtrate)
       })
     },
 
@@ -315,7 +336,7 @@ export default {
     },
     // 上一个
     upStu() {
-      this.filtrateData = ['']
+      this.filtrateData = ''
       // 判断学生在数组中的位置,获取班学生列表有初始值
       this.activeItem = null
       // 刷新学期
@@ -336,7 +357,7 @@ export default {
     },
     // 下一个
     nextStu() {
-      this.filtrateData = ['']
+      this.filtrateData = ''
 
       this.activeItem = null
       // 刷新学期
@@ -434,7 +455,7 @@ export default {
       const data4 = {
         uid: this.stuId,
         trm: this.termData[0],
-        txt: this.filtrateData[0]
+        txt: this.filtrateData
       }
       // return console.log('getTermRecord', data4)
       // console.log(' 获取所有学生记录aaaaaaaaaaaaaaaaaaaaaaa', data4)
@@ -533,6 +554,26 @@ export default {
   color: #fff;
   // left: 0;
 }
+
+/deep/.van-dropdown-menu__bar {
+  box-shadow: none;
+  padding-right: 20px;
+  // margin-left: 30px !important;
+}
+
+/deep/ .van-dropdown-item__content {
+  border-radius: 0 0 10px 10px;
+}
+
+/deep/ .van-ellipsis {
+  font-size: 14px;
+}
+
+/deep/ .van-cell__title,
+.van-cell__value {
+  font-weight: normal;
+}
+
 .goods-card {
   margin: 0;
   background-color: #fff;

+ 2 - 2
src/views/eva/studentEvaluate.vue

@@ -8,7 +8,7 @@
       </template>
     </bar>
 
-    <div style="height: 50px;z-index: 30;overflow: hidden;"></div>
+    <div style="height: 50px;z-index: 30;"></div>
 
     <!-- <div class="bigBlock"> -->
     <div class="bigBlock" style="">
@@ -735,7 +735,7 @@ export default {
   font-size: 14px;
   z-index: 1;
   position: relative;
-  // min-height: 100vh;
+  min-height: 100vh;
   background-image: linear-gradient(to bottom, #005ccd 1%, #005ccd 12%, #f6f5f8 35%, #f6f5f8 100%);
   .rl {
     position: absolute;