案例年份

This commit is contained in:
lims1@hunktimes.com
2023-08-05 22:30:03 +08:00
parent e9f1fb4219
commit bf18f7b922
2 changed files with 24 additions and 9 deletions

View File

@@ -116,7 +116,7 @@
{{ caseList.count }}</span> 条数据</div>
<el-select v-model="years" multiple collapse-tags
style="margin-left: 20px; width: 147px; border-radius:20px !important;" placeholder="全部年份">
<el-option v-for="item in allYears" :key="item.value" :label="item.label" :value="item.value">
<el-option v-for="item in caseYears" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
@@ -473,13 +473,6 @@ export default {
});
return list;
},
allYears() {
let nowYear = new Date().getFullYear()
return Array.from({ length: 10 }, (_, i) => ({
value: (nowYear - i).toString(),
label: (nowYear - i).toString(),
}));
},
oneTagAll() {
return !this.domain.some(item => item.fielclass);
},
@@ -561,6 +554,8 @@ export default {
this.getPositive();
this.couresreso();
// window.addEventListener("scroll", this.handleScroll);
// 获取年
this.getYears();
},
beforeDestroy() {
@@ -569,6 +564,18 @@ export default {
},
methods: {
getYears() {
apiCase.caseYears().then(res => {
if (res.status == 200) {
const { result } = res;
console.log(result);
this.caseYears = result.map(year => ({
value: year,
label: year,
}))
}
})
},
// 查看率的时间
toCaseDetail(id, refId) {
if (refId) {