master
xy 2 years ago
parent 58840df292
commit 84b4284b81

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 KiB

@ -10,7 +10,7 @@
<div class="container__login"> <div class="container__login">
<i class="el-icon-user"></i> <i class="el-icon-user"></i>
<span>管理端登</span> <span @click="$router.push('/')"></span>
</div> </div>
</section> </section>
</template> </template>

@ -19,17 +19,20 @@
<div class="right"> <div class="right">
<div class="search-bar"> <div class="search-bar">
<el-dropdown trigger="click" placement="bottom" @command=""> <el-dropdown trigger="click" placement="bottom-start" @command="searchCommand">
<el-button type="primary" class="dropdown-search-button"> <el-button type="primary" class="dropdown-search-button">
<div class="btn-slot"> <div class="btn-slot">
<span>任意词</span><i style="padding-left: 10px;" class="el-icon-arrow-down el-icon--right"></i> <span>{{searchTypeText}}</span><i style="padding-left: 10px;" class="el-icon-arrow-down el-icon--right"></i>
</div> </div>
</el-button> </el-button>
<template #dropdown> <template #dropdown>
<el-dropdown-menu class="select-drop"> <el-dropdown-menu class="select-drop">
<el-dropdown-item command="任意词"> <el-dropdown-item :command="{key: 'keyword',label: '任意词'}">
<div style="text-align: center">任意词</div> <div style="text-align: center">任意词</div>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item :command="{key: 'jianshu',label: '简述'}">
<div style="text-align: center">简述</div>
</el-dropdown-item>
<!-- <el-dropdown-item command="工作流程">--> <!-- <el-dropdown-item command="工作流程">-->
<!-- <div style="text-align: center">工作流程</div>--> <!-- <div style="text-align: center">工作流程</div>-->
<!-- </el-dropdown-item>--> <!-- </el-dropdown-item>-->
@ -80,6 +83,8 @@
export default { export default {
data() { data() {
return { return {
searchTypeText: '任意词',
searchType: 'keyword',
popoverShow: false, popoverShow: false,
selectLabel: '', selectLabel: '',
selectValue: '', selectValue: '',
@ -88,8 +93,19 @@ export default {
} }
}, },
methods: { methods: {
searchCommand (e) {
this.searchTypeText = e.label
this.searchType = e.key
},
search () { search () {
this.$store.commit('reception/SET_SELECTED',{ key: 'keyword', value: this.inputValue }) if (this.searchType === 'keyword') {
this.$store.commit('reception/SET_SELECTED',{ key: 'jianshu', value: '' })
this.$store.commit('reception/SET_SELECTED',{ key: 'keyword', value: this.inputValue })
}
if (this.searchType === 'jianshu') {
this.$store.commit('reception/SET_SELECTED',{ key: 'keyword', value: '' })
this.$store.commit('reception/SET_SELECTED',{ key: 'jianshu', value: this.inputValue })
}
this.$router.push(`/index/list1?${this.$store.getters.select}`) this.$router.push(`/index/list1?${this.$store.getters.select}`)
} }
@ -196,8 +212,9 @@ export default {
&::before { &::before {
content: ''; content: '';
background: #1e9fff; background: url('../../assets/reception/search-bkg.png') no-repeat center;
filter: blur(8px); background-size: cover;
filter: blur(2px);
z-index: 0; z-index: 0;
position: absolute; position: absolute;
@ -295,7 +312,7 @@ export default {
.select-drop > li:nth-child(1) { .select-drop > li:nth-child(1) {
border-radius: 6px 6px 0 0; border-radius: 6px 6px 0 0;
} }
.select-drop > li:nth-child(4) { .select-drop > li:nth-last-child(1) {
border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px;
} }
</style> </style>

@ -3,7 +3,9 @@ const state = {
tag_id: '', tag_id: '',
dept_id: '', dept_id: '',
keyword: '', keyword: '',
leixing: '' jianshu: '',
leixing: '',
sort_name: '',
} }
} }

@ -23,7 +23,7 @@
<div> <div>
<div class="list"> <div class="list">
<div class="list__item" v-for="i in departments" @click="toList(i)"> <div class="list__item" v-for="i in departments" @click="toList(i)">
{{ i.name }} <p>{{ i.name }}</p>
<el-image class="list__item--icon" mode="coutain" :src="require('@/assets/reception/department-list-item-bkg.png')"></el-image> <el-image class="list__item--icon" mode="coutain" :src="require('@/assets/reception/department-list-item-bkg.png')"></el-image>
</div> </div>
</div> </div>
@ -57,7 +57,7 @@ export default {
toList (i) { toList (i) {
this.$store.commit('reception/SET_SELECTED', { key: 'dept_id', value: i.id}) this.$store.commit('reception/SET_SELECTED', { key: 'dept_id', value: i.id, refresh: true})
this.$router.push(`/index/list1?${this.$store.getters.select}`) this.$router.push(`/index/list1?${this.$store.getters.select}`)
} }
}, },
@ -129,6 +129,9 @@ export default {
border: 1px solid #F8F8F8; border: 1px solid #F8F8F8;
cursor: pointer; cursor: pointer;
transition: all .2s; transition: all .2s;
display: flex;
align-items: center;
justify-content: center;
padding: 34px 41px; padding: 34px 41px;
margin-bottom: 16px; margin-bottom: 16px;

@ -5,7 +5,9 @@
<el-col :span="12"> <el-col :span="12">
<div class="news__header"> <div class="news__header">
<div class="news__header--diamond">热点资料</div> <div class="news__header--diamond">热点资料</div>
<div class="news__header--line"></div> <div class="news__header--line">
<span @click="toList({ sort_name: 'dianjiliang' })">更多<i class="el-icon-d-arrow-right" style="font-weight: 600;"></i></span>
</div>
</div> </div>
<el-skeleton animated :loading="loading"> <el-skeleton animated :loading="loading">
<template #template> <template #template>
@ -15,7 +17,7 @@
</template> </template>
<template> <template>
<ul class="news__list"> <ul class="news__list">
<li class="news__list--item" v-for="i in details.hot"> <li class="news__list--item" v-for="i in details.hot" @click="toList({ sort_name: 'dianjiliang' })">
<div>{{ i.biaoti }}</div> <div>{{ i.biaoti }}</div>
<div>{{ $moment(new Date(i.created_at)).format("YYYY-MM-DD") }}</div> <div>{{ $moment(new Date(i.created_at)).format("YYYY-MM-DD") }}</div>
</li> </li>
@ -28,7 +30,9 @@
<el-col :span="12"> <el-col :span="12">
<div class="news__header"> <div class="news__header">
<div class="news__header--diamond">最新资料</div> <div class="news__header--diamond">最新资料</div>
<div class="news__header--line"></div> <div class="news__header--line">
<span @click="toList({ sort_name: 'created_at' })">更多<i class="el-icon-d-arrow-right" style="font-weight: 600;"></i></span>
</div>
</div> </div>
<el-skeleton animated :loading="loading"> <el-skeleton animated :loading="loading">
@ -39,7 +43,7 @@
</template> </template>
<template> <template>
<ul class="news__list"> <ul class="news__list">
<li class="news__list--item" v-for="i in details.last"> <li class="news__list--item" v-for="i in details.last" @click="toList({ sort_name: 'created_at' })">
<div>{{ i.biaoti }}</div> <div>{{ i.biaoti }}</div>
<div>{{ $moment(new Date(i.created_at)).format("YYYY-MM-DD") }}</div> <div>{{ $moment(new Date(i.created_at)).format("YYYY-MM-DD") }}</div>
</li> </li>
@ -75,7 +79,7 @@
<div> <div>
<div class="department__list"> <div class="department__list">
<div v-for="item in departments" class="department__list--item" @click="toList({ dept:item })"> <div v-for="item in departments" class="department__list--item" @click="toList({ dept:item })">
<div>{{ item.name }}</div> <p>{{ item.name }}</p>
</div> </div>
<div class="department__list--item"> <div class="department__list--item">
<div @click="$router.push('/index/department')">...</div> <div @click="$router.push('/index/department')">...</div>
@ -200,10 +204,12 @@ export default {
console.log(this.labelGroup); console.log(this.labelGroup);
}, },
toList ({ tag, dept }) { toList ({ tag, dept, leixing, sort_name }) {
tag?.id ? this.$store.commit('reception/SET_SELECTED',{ key: 'tag_id', value: tag.id }) : '' console.log(111, sort_name, leixing)
dept?.id ? this.$store.commit('reception/SET_SELECTED',{ key: 'dept_id', value: dept.id }) : '' tag?.id ? this.$store.commit('reception/SET_SELECTED',{ key: 'tag_id', value: tag.id, refresh: true }) : ''
dept?.id ? this.$store.commit('reception/SET_SELECTED',{ key: 'dept_id', value: dept.id, refresh: true }) : ''
leixing ? this.$store.commit('reception/SET_SELECTED',{ key: 'leixing', value: leixing }) : ''
sort_name ? this.$store.commit('reception/SET_SELECTED',{ key: 'sort_name', value: sort_name, refresh: true }) : ''
this.$router.push(`/index/list1?${this.$store.getters.select}`) this.$router.push(`/index/list1?${this.$store.getters.select}`)
} }
}, },
@ -269,10 +275,14 @@ export default {
} }
&--line { &--line {
flex: 1; flex: 1;
height: 1px; color: #999;
background: #c7d9e5; text-align: right;
border-bottom: 1px solid #c7d9e5;
margin-left: 10px; margin-left: 10px;
& > span {
cursor: pointer;
}
} }
} }
@ -389,26 +399,29 @@ export default {
} }
&__list { &__list {
display: flex; display: grid;
flex-wrap: wrap; grid-template-columns: repeat(5, 1fr);
justify-content: space-between; grid-gap: 17px;
align-items: center;
margin-top: 41px; margin-top: 41px;
&--item { &--item {
background: #fff; background: #fff;
width: 176px; //width: 176px;
height: 80px; height: 80px;
color: #1a5ca3; color: #1a5ca3;
font-size: 16px; font-size: 16px;
line-height: 80px;
text-align: center; text-align: center;
font-weight: 500; font-weight: 500;
cursor: pointer; cursor: pointer;
transition: all 0.2ms; transition: all 0.2ms;
display: flex;
align-items: center;
box-sizing: border-box;
justify-content: center;
margin-bottom: 20px; margin-bottom: 20px;
padding: 0 10px;
&:hover { &:hover {
color: #fff; color: #fff;
@ -459,7 +472,7 @@ export default {
transition: all 0.4s; transition: all 0.4s;
&:hover { &:hover {
transform: scale(1.1, 1.1); transform: scale(1.05, 1.05);
} }
} }
&__left--single { &__left--single {

@ -75,7 +75,7 @@ export default {
}, },
toList (i) { toList (i) {
this.$store.commit('reception/SET_SELECTED', { key: 'tag_id', value: i.id }) this.$store.commit('reception/SET_SELECTED', { key: 'tag_id', value: i.id, refresh: true })
this.$router.push(`/index/list1?${this.$store.getters.select}`) this.$router.push(`/index/list1?${this.$store.getters.select}`)
} }
}, },

@ -1,6 +1,6 @@
<template> <template>
<div class="list1"> <div class="list1">
<el-page-header class="header" @back="$router.back()" :content="type+':共搜索到'+total+'条'"> <el-page-header class="header" @back="$router.replace('/index')" :content="type+':共搜索到'+total+'条'">
</el-page-header> </el-page-header>
<div class="container"> <div class="container">
@ -17,7 +17,7 @@
<div> <div>
<div class="list" v-if="list.length > 0"> <div class="list" v-if="list.length > 0">
<div class="list__item" v-for="i in list" :key="i.id"> <div class="list__item" v-for="i in list" :key="i.id">
<div class="list__item--pre" v-if="$route.query.leixing == 2">{{i.wenjian}}{{i.nianfen}}{{i.bianhao}}</div> <div class="list__item--pre" v-if="$route.query.leixing == 5">{{i.wenjian}}{{i.nianfen}}{{i.bianhao}}</div>
<div class="list__item--name">{{i.biaoti}}</div> <div class="list__item--name">{{i.biaoti}}</div>
<div class="list__item--date">{{ $moment(new Date(i.created_at)).format('YYYY-MM-DD') }}</div> <div class="list__item--date">{{ $moment(new Date(i.created_at)).format('YYYY-MM-DD') }}</div>
<el-dropdown trigger="click" placement="bottom-start" @command="open"> <el-dropdown trigger="click" placement="bottom-start" @command="open">
@ -101,10 +101,13 @@ export default {
keyword: '', keyword: '',
page: 1, page: 1,
leixing: '', leixing: '',
jianshu: '',
page_size: 10, page_size: 10,
table_name: 'materials', table_name: 'materials',
tag_id: '', tag_id: '',
dept_id: '' dept_id: '',
sort_name: '',
sort_type: 'desc',
}, },
list: [], list: [],
total: 0, total: 0,
@ -165,6 +168,8 @@ export default {
this.select.page = 1; this.select.page = 1;
this.select.leixing = newVal.leixing; this.select.leixing = newVal.leixing;
this.select.keyword = newVal.keyword; this.select.keyword = newVal.keyword;
this.select.sort_name = newVal.sort_name;
this.select.jianshu = newVal.jianshu;
this.getMaterial() this.getMaterial()
}, },
deep: true deep: true
@ -172,11 +177,13 @@ export default {
}, },
created() { created() {
this.select.page = 1; this.select.page = 1;
let { leixing, keyword , tag_id, dept_id } = this.$route.query let { leixing, keyword , tag_id, dept_id, sort_name, jianshu } = this.$route.query
this.select.leixing = leixing; this.select.leixing = leixing;
this.select.keyword = keyword; this.select.keyword = keyword;
this.select.tag_id = tag_id; this.select.tag_id = tag_id;
this.select.dept_id = dept_id; this.select.dept_id = dept_id;
this.select.sort_name = sort_name;
this.select.jianshu = jianshu;
this.getMaterial() this.getMaterial()
} }
} }

Loading…
Cancel
Save