123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <template>
- <div id="mechanism">
- <el-row>
- <el-col :span="24" class="info">
- <el-col :span="24" class="top">
- 机构团体
- </el-col>
- <el-col :span="24" class="list">
- <ul>
- <li v-for="(item, index) in list" :key="index">
- <el-link :underline="false">
- <el-col :span="20" class="title textOver">
- {{ item.name }}
- </el-col>
- <!-- <el-col :span="4" class="city textOver"> <i class="el-icon-location"></i>{{ item.city }} </el-col> -->
- <el-col :span="24" class="address textOver"> 地址:{{ item.addr || '暂无' }} </el-col>
- <el-col :span="24" class="content">
- <span>企业简介:</span>
- <p>{{ item.companybrief || '暂无' }}</p>
- </el-col>
- </el-link>
- </li>
- </ul>
- <el-col :span="24" class="page">
- <el-pagination
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- layout="total, prev, pager, next, jumper"
- :total="mechanismTotal"
- :page-size="pageSize"
- >
- </el-pagination>
- </el-col>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import _ from 'lodash';
- export default {
- name: 'mechanism',
- props: {
- mechanismList: null,
- mechanismTotal: null,
- },
- components: {},
- data: () => ({
- currentPage: 1,
- pageSize: 10,
- origin: [],
- list: [],
- }),
- created() {},
- computed: {},
- methods: {
- search(page = 1) {
- this.$set(this, `list`, this.origin[page - 1]);
- },
- handleCurrentChange(currentPage) {
- this.search(currentPage);
- },
- },
- watch: {
- mechanismList: {
- immediate: true,
- deep: true,
- handler(val) {
- if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
- this.search();
- },
- },
- },
- };
- </script>
- <style lang="less" scoped>
- ul {
- padding: 0;
- margin: 0;
- }
- li {
- padding: 0;
- margin: 0;
- list-style: none;
- }
- p {
- padding: 0;
- margin: 0;
- }
- .info {
- padding: 0 20px 20px 20px;
- }
- .top {
- height: 50px;
- line-height: 50px;
- border-bottom: 1px dashed #ccc;
- color: #215299;
- font-size: 18px;
- }
- .list ul li {
- float: left;
- width: 100%;
- height: 149px;
- padding: 20px 0 0 0;
- border-bottom: 1px dashed #ccc;
- }
- .list ul li .title {
- font-size: 16px;
- color: #215299;
- height: 36px;
- line-height: 36px;
- }
- .list ul li .city {
- text-align: right;
- font-size: 12px;
- color: #1b1b1b;
- height: 36px;
- line-height: 36px;
- }
- .list ul li .address {
- height: 30px;
- line-height: 30px;
- font-size: 16px;
- color: #000;
- }
- .list ul li .content span {
- float: left;
- width: 80px;
- text-align: center;
- height: 60px;
- line-height: 25px;
- font-size: 16px;
- color: #000;
- }
- .list ul li .content p {
- float: left;
- width: 830px;
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 2;
- word-break: break-all;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- font-size: 16px;
- color: #666;
- line-height: 30px;
- }
- .page {
- padding: 34px 0;
- text-align: center;
- }
- </style>
|