zhuliu 9 月之前
父节点
当前提交
75fef7f757

+ 20 - 0
src/api/examine.js

@@ -0,0 +1,20 @@
+import axios from '@/utils/axios'
+
+export default {
+    /**
+     * 查询审核任务
+     * @param {*} data 
+     * @returns 
+     */
+    queryAuditTask(data){
+        return axios.post('/permission/api/businessTask/queryAuditTask',data)
+    },
+    /**
+     * 处理审核任务
+     * @param {*} data 
+     * @returns 
+     */
+    auditTask(data){
+        return axios.post('/permission/api/businessTask/auditTask',data)
+    },
+}

+ 3 - 1
src/api/index.js

@@ -11,6 +11,7 @@ import department from "./department";
 import position from "./position";
 import admin from "./admin"
 import common from "./common"
+import examine from "./examine";
 
 
 export default {
@@ -25,5 +26,6 @@ export default {
   ...department,
   ...position,
   ...admin,
-  ...common
+  ...common,
+  ...examine
 }

+ 111 - 30
src/views/backStageManage/examine/examine/components/examine.vue

@@ -3,11 +3,20 @@
     <el-container>
         <el-header>
             <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"  label-width="68px">
-                <el-form-item label="审核类型" prop="examineType">
-                    <el-input v-model="queryParams.examineType" placeholder="请输入审核类型"/>
+                <el-form-item label="审核类型" prop="type">
+                    <el-select v-model="queryParams.type" placeholder="请选择">
+                        <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-input v-model="queryParams.status" placeholder="请输入状态"/>
+                <el-form-item label="任务状态" prop="status">
+                    <el-select v-model="queryParams.status" placeholder="请选择">
+                        <el-option v-for="(item, key) in status" :key="key" :label="item" :value="key"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="审核结果" prop="auditResult">
+                    <el-select v-model="queryParams.auditResult" placeholder="请选择">
+                        <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>
@@ -59,32 +68,33 @@
 </template>
 
 <script>
+const that = this
 const defaultColumn = [
     {
-        field:'name',
+        field:'personnelName',
         name:'姓名',
-        ifSort:true,
+        ifSort:false,
         width:'120px'
     },
     {
-        field:'phone',
+        field:'personnelPhone',
         name:'电话',
-        ifSort:true
+        ifSort:false
     },
     {
-        field:'email',
+        field:'personnelEmail',
         name:'邮箱',
-        ifSort:true
+        ifSort:false
     },
     {
-        field:'userName',
+        field:'personnelUserName',
         name:'账号',
-        ifSort:true
+        ifSort:false
     },
     // {
     //     field:'password',
     //     name:'密码',
-    //     ifSort:true
+    //     ifSort:false
     // },
     {
         field:'departmentalPosition',
@@ -92,44 +102,80 @@ const defaultColumn = [
         ifSort:false,
         type:"function",
         useFunction:(data)=>{
-            return `部门:${data.department}<br>职位:${data.position}`
+            return `部门:${data.departmentName}<br>职位:${data.positionName}`
         }
     },
+    // {
+    //     field:'enterprise',
+    //     name:'所属企业',
+    //     ifSort:false,
+    //     type:"function",
+    //     useFunction:(data)=>{
+    //         return `名称:${data.enterpriseName}<br>地址:${data.enterpriseAddress}<br>类型:${data.enterpriseType}`
+    //     }
+    // },
     {
-        field:'enterprise',
-        name:'所属企业',
+        field:'type',
+        name:'审核类型',
         ifSort:false,
+        width:'120px',
         type:"function",
         useFunction:(data)=>{
-            return `名称:${data.enterpriseName}<br>地址:${data.enterpriseAddress}<br>类型:${data.enterpriseType}`
+            return that.examineType[data.type]
         }
     },
     {
-        field:'type',
-        name:'审核类型',
-        ifSort:true,
-        width:'120px'
+        field:'status',
+        name:'任务状态',
+        ifSort:false,
+        width:'120px',
+        type:"function",
+        useFunction:(data)=>{
+            return that.status[data.status]
+        }
     },
     {
-        field:'status',
-        name:'状态',
-        ifSort:true,
-        width:'120px'
+        field:'auditResult',
+        name:'审核结果',
+        ifSort:false,
+        width:'120px',
+        type:"function",
+        useFunction:(data)=>{
+            return that.auditResult[data.auditResult]
+        }
+    },
+    {
+        field:'createName',
+        name:'发起人',
+        ifSort:false,
+        width:'120px',
+        type:"function",
+        useFunction:(data)=>{
+            return data.createName || data.personnelPhone
+        }
     },
     {
         field:'createTime',
         name:'创建时间',
-        ifSort:true
+        ifSort:false
     },
 ]
+const defaultSearchForm = {
+    status:null,
+    type:null,
+    auditResult:null,
+}
+import commonData from './mixins/commonData'
 export default {
   components: {},
+  mixins:[commonData],
   props: {},
   data() {
     return {
         queryParams:{
             current:1,
             size:10,
+            ...defaultSearchForm
         },
         total:0,
         tableData:[],
@@ -146,11 +192,33 @@ export default {
   },
   methods: {
     //查询审核任务列表
-    getList(){},
+    getList(){
+        this.loading = true
+        this.$api.queryAuditTask(this.queryParams).then(response=>{
+            if(response.code == 200){
+                this.tableData = response.data.records
+                this.total = response.data.total
+                this.loading = false
+            }
+        }).catch(error=>{
+            this.tableData = []
+            this.total = 0
+            this.loading = false
+        })
+    },
     //检索
-    search(){},
+    search(){
+        this.queryParams.current = 1;
+        this.getList();
+    },
     //重置检索条件
-    resetQuery(){},
+    resetQuery(){
+        this.queryParams = {
+            ...this.queryParams,
+            ...defaultSearchForm
+        }
+        this.getList()
+    },
     //切换分页
     handleCurrentChange(val){
         this.queryParams.current = val
@@ -187,8 +255,21 @@ export default {
     submitExamine(data,type){
         var params = {
             ids:data,
-            type:type
+            result:type
         }
+        var message = this.$message({
+            type:'warning',
+            message: '任务处理中...',
+            duration: 0 // 设置为0表示不自动关闭
+        })
+        this.$api.auditTask(params).then(response=>{
+            if(response.code == 200){
+                message.close()
+                this.$message.success('任务处理完成')
+            }
+        }).catch(error=>{
+            message.close()
+        })
     },
   },
 };

+ 18 - 0
src/views/backStageManage/examine/examine/components/mixins/commonData.js

@@ -0,0 +1,18 @@
+export default{
+    data() {
+        return {
+            examineType:{
+                1:'注册审核任务',
+                2:'版本发布审核任务'
+            },
+            status:{
+                0:"未完成",
+                1:'已完成'
+            },
+            auditResult:{
+                0:'不通过',
+                1:'通过'
+            }
+        }
+    },
+}