123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <template>
- <div id="list">
- <el-row>
- <el-col :span="1"><i class="el-icon-s-home"></i></el-col>
- <el-col :span="23" style="margin-top:0.3rem">
- <el-breadcrumb separator=">">
- <el-breadcrumb-item :to="{ path: '/' }"><span style="color:#666666">网站首页</span></el-breadcrumb-item>
- <el-breadcrumb-item>
- <a href="/"><span style="color:#666666">招聘信息</span></a>
- </el-breadcrumb-item>
- <el-breadcrumb-item><span style="color:#999999">岗位</span></el-breadcrumb-item>
- </el-breadcrumb>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="10" style="margin-top: 1rem; width:50%">
- <el-input size="mini" placeholder="请输入企业名称" v-model="searchInfo.corpname" @keyup.enter.native="search()">
- <el-button slot="append" icon="el-icon-search" @click="search()"></el-button>
- </el-input>
- </el-col>
- </el-row>
- <el-row class="rowstyle" v-for="(item, index) in list" :key="index">
- <el-col :span="3">
- <div class="block"><el-avatar shape="square" :size="75" :src="squareUrl"></el-avatar></div>
- </el-col>
- <el-col :span="10" class="info">
- <el-row>
- <el-col :span="24">
- <el-link class="title" @click="$router.push({ path: '/jobs/detail', query: { id: item.id } })">
- {{ item.job_name }}
- </el-link>
- </el-col>
- <el-col class="money" :span="24">{{ item.salary.text }}</el-col>
- <el-col class="word" :span="24">
- <span>{{ item.city }}/{{ item.xl_req }}/{{ item.job_number }}人</span>
- </el-col>
- </el-row>
- </el-col>
- <el-col :span="11" class="info">
- <el-row>
- <el-col class="word" :span="24">{{ item.corpname }}</el-col>
- <el-col class="word" :span="24">{{ item.category }}</el-col>
- <el-col class="word" :span="24">
- {{ item.end_date }}
- </el-col>
- </el-row>
- </el-col>
- </el-row>
- <el-row style="margin-top:1rem;" type="flex" justify="end">
- <el-pagination @current-change="search" :current-page="currentPage" :page-size="$limit" layout="total, prev, pager, next, jumper" :total="totalRow">
- </el-pagination>
- </el-row>
- </div>
- </template>
- <script>
- import { mapActions, mapState } from 'vuex';
- export default {
- name: 'list',
- props: {},
- components: {},
- data: () => ({
- squareUrl: '',
- searchInfo: {},
- currentPage: 1,
- totalRow: 0,
- list: [],
- type: '',
- }),
- created() {
- this.search();
- },
- computed: {},
- methods: {
- ...mapActions(['postOperation']),
- async search(page) {
- let skip = 0;
- if (page) {
- skip = (page - 1) * this.$limit;
- }
- let newData = { skip: skip, limit: this.$limit, ...this.searchInfo }; //schid: 99991,
- this.type === 'official' ? (newData['is_practice'] = 0) : (newData['is_practice'] = 1);
- let result = await this.postOperation({ type: 'list', data: newData });
- if (`${result.errcode}` === '0') {
- //给this=>vue的实例下在中的list属性,赋予result.data的值
- this.$set(this, `list`, result.data);
- this.$set(this, `totalRow`, result.total);
- } else {
- this.$message.error(result.errmsg ? result.errmsg : 'error');
- }
- },
- },
- beforeRouteUpdate(to, from, next) {
- this.$set(this, `type`, to.params.type);
- this.search();
- next();
- },
- };
- </script>
- <style lang="less" scoped>
- .rowstyle {
- border-bottom-style: solid;
- border-width: 1px;
- border-color: #ebeef5;
- font-size: small;
- padding: 1rem 0;
- .el-col {
- margin-top: 0.5rem;
- }
- .info {
- .title {
- font-size: 1rem;
- color: #850000;
- }
- .money {
- font-size: 0.9rem;
- color: #f40;
- }
- .word {
- font-size: 0.85rem;
- color: #666666;
- }
- }
- }
- </style>
|