浏览代码

年份查询多选更改

duy 2 年之前
父节点
当前提交
eaef4d815c
共有 1 个文件被更改,包括 10 次插入9 次删除
  1. 10 9
      src/views/using/query.vue

+ 10 - 9
src/views/using/query.vue

@@ -33,7 +33,7 @@
                         <div class="hc-search-screening-item">
                             <div class="title">年度:</div>
                             <template v-for="item in annuals">
-                                <div class="screening-key" :class="item.select ? 'cut': ''" @click="annualClick(item)">{{item.name}}</div>
+                                <div class="screening-key" :class="isArrIndex(annual,'key', item.key) ? 'cut': ''" @click="annualClick(item)">{{item.name}}</div>
                             </template>
                         </div>
                         <div class="hc-search-screening-item">
@@ -157,7 +157,7 @@
                         </div>
                         <div class="hc-info-text-item">
                             <div class="title">立卷单位:</div>
-                            <div class="content">{{ fileInfo.unit }}</div>
+                            <div class="content">{{ fileInfo.filingUnit }}</div>
                         </div>
                     </el-scrollbar>
                 </div>
@@ -302,13 +302,13 @@ const clickHottitle=(item)=>{
 //年度
 const annuals = ref([])
 const setAnnuals = () => {
-    let annualArr = [{key: 'all', name: '所有',select:true}]
+    let annualArr = [{key: 'all', name: '所有'}]
     const year = new Date().getFullYear()
     for (let i = 0; i < 8; i++) {
         const item = year - i + ''
         annualArr.push({
             key: item,
-            name: item
+            name: item+'年'
         })
     }
     annuals.value = annualArr
@@ -316,11 +316,12 @@ const setAnnuals = () => {
 const annual = ref([{key: 'all', name: '所有'}])
 const annualClick = (item) => {
     annual.value = setQueryFiltering(annual.value, item)
-    searchForm.value.year=item.key;
-    annuals.value.forEach((ele)=>{
-        ele.select=false
-    })
-    item.select=true
+   searchForm.value.year=item.name
+   let arr=[]
+  annual.value.forEach((item)=>{
+       arr.push(item.key)
+   })
+   searchForm.value.year=arr+''
 }