12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <template>
- <div id="recruit">
- <el-row>
- <el-col :span="24" class="top">
- <topInfo :topTitle="topTitle"></topInfo>
- </el-col>
- <el-col :span="24" class="main">
- <enterpriseProduct
- :recruitInfo="recruitInfo"
- :total="total"
- @handleCurrentChange="handleCurrentChange"
- @delete="deleteData"
- @edit="edit"
- @shibai="shibai"
- ></enterpriseProduct>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import topInfo from '@/layout/public/top.vue';
- import enterpriseProduct from '@/layout/enterpriseProduct/enterpriseProduct.vue';
- import { createNamespacedHelpers, mapGetters } from 'vuex';
- const { mapActions: product } = createNamespacedHelpers('market');
- export default {
- name: 'recruit',
- props: {},
- components: {
- topInfo,
- enterpriseProduct,
- },
- data: () => ({
- topTitle: '审核信息',
- recruitInfo: [],
- total: 1,
- skip: '',
- }),
- created() {
- this.search();
- },
- computed: {},
- methods: {
- ...product(['query', 'delete', 'fetch', 'update']),
- async search({ skip = 0, limit = 10, ...info } = {}) {
- skip = this.skip;
- const res = await this.query({ skip, limit, ...info });
- this.$set(this, `recruitInfo`, res.data);
- this.$set(this, `total`, res.total);
- },
- async deleteData(item) {
- const res = await this.delete(item.id);
- this.$checkRes(res, '删除成功', '删除失败');
- this.search();
- },
- async edit({ data }) {
- console.log('a');
- data.status = '1';
- let res = await this.update(data);
- this.$checkRes(res, '审核成功', '审核失败');
- console.log(data);
- },
- async shibai({ data }) {
- console.log('a');
- data.status = '2';
- let res = await this.update(data);
- this.$checkRes(res, '审核成功', '审核失败');
- console.log(data);
- },
- async handleCurrentChange({ skip, limit, currentPage }) {
- this.$set(this, `skip`, skip);
- this.search();
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .main {
- padding: 20px;
- margin: 10px 20px;
- border: 1px solid #ccc;
- width: 96%;
- }
- </style>
|