|
@@ -21,7 +21,7 @@
|
|
|
<script>
|
|
|
import topInfo from '@/layout/public/top.vue';
|
|
|
import enterpriseProduct from '@/layout/enterpriseProduct/enterpriseProduct.vue';
|
|
|
-import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
|
|
|
const { mapActions: product } = createNamespacedHelpers('market');
|
|
|
export default {
|
|
|
name: 'recruit',
|
|
@@ -36,13 +36,15 @@ export default {
|
|
|
total: 1,
|
|
|
skip: '',
|
|
|
forms: {
|
|
|
- status: '',
|
|
|
+ status: '3',
|
|
|
},
|
|
|
}),
|
|
|
created() {
|
|
|
this.search();
|
|
|
},
|
|
|
- computed: {},
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ },
|
|
|
methods: {
|
|
|
...product(['query', 'delete', 'fetch', 'update']),
|
|
|
async submit() {
|
|
@@ -52,18 +54,16 @@ export default {
|
|
|
if (this.forms.status) {
|
|
|
status = this.forms.status;
|
|
|
skip = this.skip;
|
|
|
- const res = await this.query({ skip, limit, status, ...info });
|
|
|
- let newData = res.data.filter(i => i.status != '3');
|
|
|
- this.$set(this, `recruitInfo`, newData);
|
|
|
- this.$set(this, `total`, newData.length);
|
|
|
+ let userid = this.user.uid;
|
|
|
+ const res = await this.query({ skip, limit, status, userid, ...info });
|
|
|
+ this.$set(this, `recruitInfo`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
} else {
|
|
|
- status = 0;
|
|
|
skip = this.skip;
|
|
|
- const res = await this.query({ skip, limit, status: 0, ...info });
|
|
|
- const arr = await this.query({ skip, limit, status: 3, ...info });
|
|
|
- var newData = res.data.concat(arr.data);
|
|
|
- this.$set(this, `recruitInfo`, newData);
|
|
|
- this.$set(this, `total`, newData.length);
|
|
|
+ let userid = this.user.uid;
|
|
|
+ const res = await this.query({ skip, limit, status: 3, userid, ...info });
|
|
|
+ this.$set(this, `recruitInfo`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
}
|
|
|
},
|
|
|
// 删除
|