zhuliu 9 月之前
父節點
當前提交
ad444426db
共有 1 個文件被更改,包括 116 次插入0 次删除
  1. 116 0
      src/views/report/InvalidResponse/components/table/IPREmail.vue

+ 116 - 0
src/views/report/InvalidResponse/components/table/IPREmail.vue

@@ -0,0 +1,116 @@
+<template>
+  <div class="height_100">
+    <el-container>
+        <el-header>
+            <div>
+                <div>
+                    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"  label-width="68px">
+                        <el-form-item label="审核类型" prop="type" v-if="$permission.hasPermission([1,3])">
+                            <el-select v-model="queryParams.type" placeholder="请选择" clearable >
+                                <el-option v-for="(item, key) in examineType" :key="key" :label="item" :value="key"></el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="任务状态" prop="status">
+                            <el-select v-model.number="queryParams.status" placeholder="请选择" clearable >
+                                <el-option v-for="(item, key) in status" :key="key" :label="item" :value="Number(key)"></el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="审核结果" prop="auditResult">
+                            <el-select v-model="queryParams.auditResult" placeholder="请选择" clearable >
+                                <el-option v-for="(item, key) in auditResult" :key="key" :label="item" :value="key"></el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-button type="primary" icon="el-icon-search" size="mini" @click="search">搜索</el-button>
+                            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+                        </el-form-item>
+                    </el-form>
+                </div>
+                <div></div>
+            </div>
+        </el-header>
+        <el-main></el-main>
+        <el-footer class="pagination">
+            <el-pagination background layout="total, sizes, prev, pager, next, jumper"
+                    :current-page.sync="queryParams.current" :page-size.sync="queryParams.size"
+                    @current-change="handleCurrentChange" @size-change="changeSize" :total="total">
+                </el-pagination>
+        </el-footer>
+    </el-container>
+  </div>
+</template>
+
+<script>
+const defaultSearchForm={
+    name:null,
+    email:null,
+    type:null
+}
+export default {
+    name:"IPREmailTable",
+  components: {},
+  props: {
+    queryApi:{
+        type:[String,Function],
+    },
+    projectId:{}
+  },
+  data() {
+    return {
+        tableData:[],
+        queryParams:{
+            current:1,
+            size:10,
+            ...defaultSearchForm,
+            projectId:this.projectId
+        },
+        total:0,
+        loading:false,
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    async getList(){
+        this.loading = true
+        var api = ''
+        if(this.queryApi){
+            if(typeof this.queryApi == 'function'){
+                var data = await this.queryApi(this.queryParams)
+                this.tableData = data.data
+                this.total = data.total
+                this.loading = false
+                return
+            }
+            api = this.queryApi
+        }
+        this.$api[api](this.queryParams).then(response=>{
+            if(response.code == 200){
+                this.loading = false
+            }
+        }).catch(error=>{
+            this.tableData = []
+            this.total = 0
+            this.loading = false
+        })
+    },
+    //切换分页
+    handleCurrentChange(value){
+        this.queryParams.current = value
+        this.getList()
+    },
+    //切换页大小
+    changeSize(value){
+        this.queryParams.size = value
+        this.queryParams.current = 1
+        this.getList()
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>