<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 serveList" :key="index">
              <el-col :span="24" class="image">
                <el-image style="width:219px;height:170px;" :src="item.url"></el-image>
              </el-col>
              <el-col :span="24" class="title textOver">
                {{ item.name }}
              </el-col>
              <el-col :span="12" class="yen textOver"> ¥{{ item.price }}/{{ item.priceunit }}</el-col>
              <el-col :span="12" class="type"> {{ item.product_type_name }}</el-col>
            </li>
          </ul>
          <el-col :span="24" class="page">
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              layout="total, prev, pager, next, jumper"
              :total="serveTotal"
            >
            </el-pagination>
          </el-col>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'company',
  props: {
    serveList: null,
    serveTotal: null,
  },
  components: {},
  data: () => ({
    currentPage: 1,
  }),
  created() {},
  computed: {},
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  },
};
</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>
