|
@@ -12,46 +12,59 @@
|
|
|
</el-breadcrumb>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" class="search">
|
|
|
- <el-col :span="12">
|
|
|
- <el-col :span="6">
|
|
|
- <el-select size="mini" v-model="searchInfo.is_practice" placeholder="选择招聘类型" @change="search()">
|
|
|
- <el-option label="全部类型" :value="undefined"></el-option>
|
|
|
- <el-option label="全职" :value="0"></el-option>
|
|
|
- <el-option label="实习" :value="1"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="18">
|
|
|
- <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-col :span="24">
|
|
|
+ <el-col :span="14" class="filter-box search">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-select size="mini" v-model="searchInfo.is_practice" placeholder="选择招聘类型">
|
|
|
+ <el-option label="全部类型" :value="undefined"></el-option>
|
|
|
+ <el-option label="全职" :value="0"></el-option>
|
|
|
+ <el-option label="实习" :value="1"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="19">
|
|
|
+ <el-input size="mini" placeholder="请输入查询内容" v-model="searchInfo.value" @keyup.enter.native="search()">
|
|
|
+ <el-select slot="prepend" size="mini" placeholder="请选择" width="110" v-model="searchInfo.name">
|
|
|
+ <el-option v-for="(item, index) in filter" :label="item.label" :value="item.name" :key="'filter' + index"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="search()"></el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="10">
|
|
|
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
- <el-col :span="24">
|
|
|
- <el-col :span="20" class="title">
|
|
|
- <el-link :underline="false" @click="$router.push({ path: '/jobinfo/detail', query: { id: item.id } })">{{ item.title }}</el-link>
|
|
|
+ <span v-if="!loading">
|
|
|
+ <span v-if="list.length > 0">
|
|
|
+ <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-col :span="20" class="title">
|
|
|
+ <el-link :underline="false" @click="$router.push({ path: '/jobinfo/detail', query: { id: item.id } })">{{ item.title }}</el-link>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" class="time">
|
|
|
+ {{ item | getTime(`meta.createdAt`) }}
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="common practice">
|
|
|
+ 招聘类型:<span>{{ `${item.is_practice}` === `0` ? '全职' : '实习' }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="common corpname">
|
|
|
+ <i class="el-icon-office-building"></i>
|
|
|
+ 举办企业:<span>{{ item.corpname }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="common schname">
|
|
|
+ <i class="el-icon-school"></i>
|
|
|
+ 主办学校:<span>{{ item.schname }}</span>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="4" class="time">
|
|
|
- {{ item | getTime(`meta.createdAt`) }}
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="common practice">
|
|
|
- 招聘类型:<span>{{ `${item.is_practice}` === `0` ? '全职' : '实习' }}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="common corpname">
|
|
|
- <i class="el-icon-office-building"></i>
|
|
|
- 举办企业:<span>{{ item.corpname }}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="common schname">
|
|
|
- <i class="el-icon-school"></i>
|
|
|
- 主办学校:<span>{{ item.schname }}</span>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <no-list></no-list>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <el-col :span="24" class="list" style="padding-top:50px" v-else v-loading="loading"></el-col>
|
|
|
<el-col :span="24" class="page">
|
|
|
<el-pagination @current-change="search" :current-page="currentPage" :page-size="$limit" layout="total, prev, pager, next, jumper" :total="totalRow">
|
|
|
</el-pagination>
|
|
@@ -61,18 +74,23 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import noList from '@publics/src/layout/noList.vue';
|
|
|
import { mapActions, mapState } from 'vuex';
|
|
|
import _ from 'lodash';
|
|
|
export default {
|
|
|
name: 'list',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ noList,
|
|
|
+ },
|
|
|
data: () => ({
|
|
|
searchInfo: {},
|
|
|
squareUrl: '',
|
|
|
currentPage: 1,
|
|
|
totalRow: 0,
|
|
|
list: [],
|
|
|
+ loading: false,
|
|
|
+ filter: [{ label: '企业名称', name: 'corpname' }, { label: '标题', name: 'title' }],
|
|
|
}),
|
|
|
created() {
|
|
|
this.search();
|
|
@@ -81,11 +99,15 @@ export default {
|
|
|
methods: {
|
|
|
...mapActions(['jobinfoOperation']),
|
|
|
async search(page) {
|
|
|
+ this.loading = true;
|
|
|
let skip = 0;
|
|
|
if (page) {
|
|
|
skip = (page - 1) * this.$limit;
|
|
|
}
|
|
|
- let newData = { skip: skip, limit: this.$limit, ...this.searchInfo };
|
|
|
+ let { name, value, ...others } = JSON.parse(JSON.stringify(this.searchInfo));
|
|
|
+ let searchInfo = { ...others };
|
|
|
+ if (name && value && value !== '') searchInfo[name] = `${value}`;
|
|
|
+ let newData = { skip: skip, limit: this.$limit, ...searchInfo };
|
|
|
let result = await this.jobinfoOperation({ type: 'list', data: newData });
|
|
|
if (`${result.errcode}` === '0') {
|
|
|
//给this=>vue的实例下在中的list属性,赋予result。data的值
|
|
@@ -94,6 +116,7 @@ export default {
|
|
|
} else {
|
|
|
this.$message.error(result.errmsg ? result.errmsg : 'error');
|
|
|
}
|
|
|
+ this.loading = false;
|
|
|
},
|
|
|
},
|
|
|
filters: {
|
|
@@ -118,7 +141,7 @@ export default {
|
|
|
.search {
|
|
|
margin: 15px 0;
|
|
|
}
|
|
|
-/deep/.search .el-input__inner {
|
|
|
+/deep/.search {
|
|
|
border: 2px solid #850000;
|
|
|
border-radius: 0;
|
|
|
}
|
|
@@ -150,4 +173,10 @@ export default {
|
|
|
margin: 10px 0;
|
|
|
text-align: right;
|
|
|
}
|
|
|
+.filter-box {
|
|
|
+ display: inline-block;
|
|
|
+ .el-select {
|
|
|
+ width: 100px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|