wuhongyu 4 years ago
parent
commit
8c5fab75c2

+ 14 - 1
src/layout/enterpriseProduct/enterpriseProduct.vue

@@ -3,9 +3,18 @@
     <el-row>
       <el-col :span="24" class="info">
         <el-col :span="24" class="top">
-          <el-col :span="12" class="topTitle">
+          <el-col :span="4" class="topTitle">
             <span>审核信息列表</span>
           </el-col>
+          <template>
+            <el-form ref="form" :model="forms" label-width="80px">
+              <el-radio-group v-model="forms.status" @change="submit">
+                <el-radio label="0">待审核</el-radio>
+                <el-radio label="1">审核成功</el-radio>
+                <el-radio label="2">审核失败</el-radio>
+              </el-radio-group>
+            </el-form>
+          </template>
         </el-col>
         <el-col :span="24" class="list">
           <template>
@@ -74,6 +83,7 @@ export default {
   props: {
     recruitInfo: null,
     total: null,
+    forms: null,
   },
   components: {},
   data: () => ({
@@ -83,6 +93,9 @@ export default {
   created() {},
   computed: {},
   methods: {
+    submit() {
+      this.$emit('submit');
+    },
     addData() {
       this.$router.push({ path: '/personnel/recruitDetail' });
     },

+ 25 - 5
src/views/enterpriseProduct/index.vue

@@ -12,6 +12,8 @@
           @delete="deleteData"
           @edit="edit"
           @shibai="shibai"
+          :forms="forms"
+          @submit="submit"
         ></enterpriseProduct>
       </el-col>
     </el-row>
@@ -35,6 +37,9 @@ export default {
     recruitInfo: [],
     total: 1,
     skip: '',
+    forms: {
+      status: '0',
+    },
   }),
   created() {
     this.search();
@@ -42,12 +47,27 @@ export default {
   computed: {},
   methods: {
     ...product(['query', 'delete', 'fetch', 'update']),
+
+    async submit() {
+      // console.log(this.forms.status);
+      this.search(this.forms.status);
+    },
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      skip = this.skip;
-      const res = await this.query({ skip, limit, ...info });
-      let newData = res.data.filter(i => i.status != '3');
-      this.$set(this, `recruitInfo`, newData);
-      this.$set(this, `total`, newData.length);
+      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);
+      } else {
+        status = 0;
+        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);
+      }
     },
     async deleteData(item) {
       const res = await this.delete(item.id);