123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <template>
- <div id="serve">
- <el-row>
- <el-col :span="24" class="info">
- <el-col :span="24" class="top">
- 研发服务
- </el-col>
- <el-col :span="24" class="list">
- <ul>
- <li class="schoolList" v-for="(item, index) in list" :key="index">
- <el-col :span="24" class="image">
- <el-image style="width:219px;height:170px;" :src="url"></el-image>
- </el-col>
- <el-col :span="24" class="title textOver">
- {{ item.name }}
- </el-col>
- <el-col :span="12" class="yen textOver"> {{ item.messattribute }}</el-col>
- <el-col :span="12" class="type"> {{ item.type == '0' ? '技术' : item.ype == '1' ? '产品' : '服务' }}</el-col>
- </li>
- </ul>
- <el-col :span="24" class="page">
- <el-pagination
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- layout="total, prev, pager, next, jumper"
- :total="serveTotal"
- :page-size="pageSize"
- >
- </el-pagination>
- </el-col>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import _ from 'lodash';
- export default {
- name: 'company',
- props: {
- serveList: null,
- serveTotal: null,
- },
- components: {},
- data: () => ({
- currentPage: 1,
- pageSize: 10,
- origin: [],
- list: [],
- url: require('@a/fabu.jpg'),
- }),
- created() {},
- computed: {},
- methods: {
- search(page = 1) {
- this.$set(this, `list`, this.origin[page - 1]);
- },
- handleCurrentChange(currentPage) {
- this.search(currentPage);
- },
- },
- watch: {
- serveList: {
- 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 {
- margin: 20px 0 0 0;
- }
- .schoolList {
- float: left;
- width: 219px;
- height: 219px;
- margin: 0 10px 10px 0;
- border: 1px solid #ccc;
- background-color: #f3f3f3;
- overflow: hidden;
- }
- .schoolList:nth-child(4n) {
- width: 215px;
- margin: 0 0 10px 0;
- }
- .schoolList .image {
- height: 170px;
- }
- .schoolList .title {
- padding: 3px 10px;
- font-size: 14px;
- color: #63636d;
- }
- .schoolList .yen {
- font-size: 14px;
- padding: 0 0 0 10px;
- color: red;
- }
- .schoolList .type {
- font-size: 14px;
- text-align: right;
- padding: 0 10px 0 0;
- color: #63636d;
- }
- .page {
- padding: 34px 0;
- text-align: center;
- }
- </style>
|