|
@@ -2,35 +2,50 @@
|
|
|
<div id="achieve">
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <el-col :span="24" class="listTop">
|
|
|
- <el-col :span="12" class="columnname">
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <el-col :span="3" class="left">
|
|
|
<span>|</span> <span>{{ column_name }}</span>
|
|
|
</el-col>
|
|
|
- <el-col :span="12" class="search">
|
|
|
- <el-input placeholder="请输入名称" v-model="infoName" class="input-with-select">
|
|
|
- <el-button slot="append" icon="el-icon-search" @click="searchData()"></el-button>
|
|
|
- </el-input>
|
|
|
+ <el-col :span="21" class="right">
|
|
|
+ <el-col :span="12" class="tabs">
|
|
|
+ <!-- 主要成果单位 -->
|
|
|
+ <span v-for="(item, index) in firDroplist" :key="index" @click="change(item.name)">{{ item.name }}</span>
|
|
|
+ <!-- 其他 -->
|
|
|
+ <el-dropdown trigger="click" @command="change">
|
|
|
+ <span class="el-dropdown-link"> 其他<i class="el-icon-arrow-down el-icon--right"></i> </span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item v-for="(item, index) in dropList" :key="index" :command="item.name">{{ item.name }}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="search">
|
|
|
+ <el-input placeholder="请输入名称" v-model="infoName" class="input-with-select" clearable>
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="searchData()"></el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
- <el-col :span="21" class="name" @click.native="clickDetail(item.id)">
|
|
|
- {{ item.name }}
|
|
|
+ <el-col :span="24" class="down">
|
|
|
+ <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <el-col :span="21" class="name" @click.native="clickDetail(item.id)">
|
|
|
+ {{ item.name }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="date">
|
|
|
+ {{ getDate(item.meta.updatedAt) }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="brief"> 成果简介:{{ item.achievebrief || '暂无' }} </el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="3" class="date">
|
|
|
- {{ item.meta | getDate }}
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="brief"> 成果简介:{{ item.achievebrief }} </el-col>
|
|
|
</el-col>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="page">
|
|
|
- <el-pagination
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- :page-size="pageSize"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
+ <el-col :span="24" class="page">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ :page-size="pageSize"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -38,21 +53,35 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+var moment = require('moment');
|
|
|
export default {
|
|
|
name: 'achieve',
|
|
|
props: {
|
|
|
+ column_name: { type: String },
|
|
|
achieveList: { type: Array },
|
|
|
total: { type: Number },
|
|
|
- column_name: null,
|
|
|
+ dropList: { type: Array },
|
|
|
},
|
|
|
components: {},
|
|
|
data: function() {
|
|
|
return {
|
|
|
+ infoName: '',
|
|
|
currentPage: 1, //默认数据1
|
|
|
- pageSize: 6, //每页显示数据数量
|
|
|
+ pageSize: 5, //每页显示数据数量
|
|
|
origin: [], //分割数据
|
|
|
list: [], //显示数据列表
|
|
|
- infoName: '',
|
|
|
+ // 主要成果单位
|
|
|
+ firDroplist: [
|
|
|
+ {
|
|
|
+ name: '中科系',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '吉林大学',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '长春理工大学',
|
|
|
+ },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
@@ -67,11 +96,23 @@ export default {
|
|
|
clickDetail(id) {
|
|
|
this.$emit('clickDetail', { column_name: '技术成果', id: id });
|
|
|
},
|
|
|
+ // 获取时间
|
|
|
+ getDate(date) {
|
|
|
+ let newDate = moment(date).format('YYYY-MM-DD');
|
|
|
+ if (newDate) return newDate;
|
|
|
+ },
|
|
|
+ // 选择
|
|
|
+ change(data) {
|
|
|
+ this.$emit('changeCom', data);
|
|
|
+ },
|
|
|
// 查询
|
|
|
searchData() {
|
|
|
this.$emit('searchData', { name: this.infoName, columnName: '技术成果' });
|
|
|
},
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ },
|
|
|
watch: {
|
|
|
achieveList: {
|
|
|
immediate: true,
|
|
@@ -86,73 +127,17 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
- // 过滤时间
|
|
|
- filters: {
|
|
|
- getDate(meta) {
|
|
|
- let createdAt = _.get(meta, `createdAt`);
|
|
|
- let date = new Date(createdAt)
|
|
|
- .toLocaleDateString()
|
|
|
- .replace('/', '-')
|
|
|
- .replace('/', '-');
|
|
|
- return date;
|
|
|
- },
|
|
|
- },
|
|
|
- computed: {
|
|
|
- ...mapState(['user']),
|
|
|
- pageTitle() {
|
|
|
- return `${this.$route.meta.title}`;
|
|
|
- },
|
|
|
- },
|
|
|
- metaInfo() {
|
|
|
- return { title: this.$route.meta.title };
|
|
|
- },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
.main {
|
|
|
- padding: 0 10px;
|
|
|
- min-height: 620px;
|
|
|
- .list {
|
|
|
- padding: 10px 0;
|
|
|
- .name {
|
|
|
- font-size: 18px;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
- .date {
|
|
|
- font-size: 16px;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- .brief {
|
|
|
- font-size: 16px;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- -webkit-line-clamp: 2;
|
|
|
- word-break: break-all;
|
|
|
- display: -webkit-box;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
- margin: 10px 0 0 0;
|
|
|
- max-height: 42px;
|
|
|
- }
|
|
|
- }
|
|
|
- .list:hover {
|
|
|
- cursor: pointer;
|
|
|
- .name {
|
|
|
- -webkit-transform: translateY(-3px);
|
|
|
- -ms-transform: translateY(-3px);
|
|
|
- transform: translateY(-3px);
|
|
|
- -webkit-box-shadow: 0 0 6px #999;
|
|
|
- box-shadow: 0 0 6px #999;
|
|
|
- -webkit-transition: all 0.5s ease-out;
|
|
|
- transition: all 0.5s ease-out;
|
|
|
- color: #0085d2;
|
|
|
- }
|
|
|
- }
|
|
|
- .listTop {
|
|
|
+ .top {
|
|
|
height: 49px;
|
|
|
- line-height: 49px;
|
|
|
border-bottom: 1px solid #ccc;
|
|
|
- .columnname {
|
|
|
+ padding: 5px 0 0 0;
|
|
|
+ .left {
|
|
|
+ text-align: center;
|
|
|
span:first-child {
|
|
|
color: #22529a;
|
|
|
font-weight: bold;
|
|
@@ -164,11 +149,70 @@ export default {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
}
|
|
|
+ .right {
|
|
|
+ .tabs {
|
|
|
+ span {
|
|
|
+ font-size: 16px;
|
|
|
+ padding: 8px 10px;
|
|
|
+ display: inline-block;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ span:hover {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #409eff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .search {
|
|
|
+ /deep/.el-input__inner {
|
|
|
+ height: 35px;
|
|
|
+ line-height: 35px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .down {
|
|
|
+ height: 500px;
|
|
|
+ overflow: hidden;
|
|
|
+ .list {
|
|
|
+ padding: 10px 0;
|
|
|
+ .name {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .date {
|
|
|
+ font-size: 16px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .brief {
|
|
|
+ font-size: 16px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ word-break: break-all;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ margin: 10px 0 0 0;
|
|
|
+ max-height: 42px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list:hover {
|
|
|
+ cursor: pointer;
|
|
|
+ .name {
|
|
|
+ -webkit-transform: translateY(-3px);
|
|
|
+ -ms-transform: translateY(-3px);
|
|
|
+ transform: translateY(-3px);
|
|
|
+ -webkit-box-shadow: 0 0 6px #999;
|
|
|
+ box-shadow: 0 0 6px #999;
|
|
|
+ -webkit-transition: all 0.5s ease-out;
|
|
|
+ transition: all 0.5s ease-out;
|
|
|
+ color: #0085d2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .page {
|
|
|
+ text-align: center;
|
|
|
+ height: 30px;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
-}
|
|
|
-.page {
|
|
|
- text-align: center;
|
|
|
- height: 40px;
|
|
|
- padding: 5px 0;
|
|
|
}
|
|
|
</style>
|