sunlupeng 1 gadu atpakaļ
vecāks
revīzija
bc077127c8
2 mainītis faili ar 17 papildinājumiem un 33 dzēšanām
  1. 2 2
      src/router/index.js
  2. 15 31
      src/views/certManage/certList.vue

+ 2 - 2
src/router/index.js

@@ -213,8 +213,8 @@ export const asyncRouterMap = [
       icon: 'lipin'
     },
     children: [
-      { path: 'certRules', component: _import('certManage/certRules'), name: 'certRules', meta: { title: '积分获取规则', icon: 'lipin', noCache: true }},
-      { path: 'certList', component: _import('certManage/certList'), name: 'certList', meta: { title: '证书列表', icon: 'lipin', noCache: true }},
+      { path: 'certRules', component: _import('certManage/certRules'), name: 'certRules', meta: { title: '积分获取规则', noCache: true }},
+      { path: 'certList', component: _import('certManage/certList'), name: 'certList', meta: { title: '证书列表', noCache: true }},
       
     ]
   },

+ 15 - 31
src/views/certManage/certList.vue

@@ -18,28 +18,31 @@
         element-loading-text="正在查询中。。。" border fit highlight-current-row>
         <el-table-column type="index" label="序号" header-align="center" align="center">
         </el-table-column>
-        <el-table-column align="center" min-width="80px" label="证书">
-            <template slot-scope="props">
-                <a style="color: #1e80ff;" target="_blank" :href="props.row.file">{{ props.row.title }}</a>
-            </template>
+        <el-table-column align="center" min-width="100px" label="证书">
+          <template slot-scope="props">
+                <div v-for="(item, index) in props.row.files" :key="index">
+                  <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+                </div>
+              </template>
         </el-table-column>
         <el-table-column align="center" min-width="80px" label="类型" prop="typeName">
         </el-table-column>
         <el-table-column align="center" min-width="80px" label="上传人" prop="userName">
         </el-table-column>
-        <el-table-column align="center" min-width="180px" label="公司" prop="companyName">
+        <el-table-column align="center" min-width="200px" label="公司" prop="companyName">
         </el-table-column>
-        <el-table-column align="center" min-width="180px" label="部门" prop="deptName">
+        <el-table-column align="center" min-width="200px" label="部门" prop="deptName">
         </el-table-column>
         <el-table-column align="center" min-width="80px" label="获得积分" prop="integral">
         </el-table-column>
         <el-table-column align="center" min-width="80px" label="审核状态" prop="statusName">
         </el-table-column>
-        <el-table-column align="center" min-width="80px" label="日期" prop="createTime">
+        <el-table-column align="center" min-width="100px" label="日期" prop="createTime">
         </el-table-column>
-        <el-table-column align="center" label="操作" width="100px" class-name="small-padding fixed-width">
+        <el-table-column align="center" label="操作" width="150px" class-name="small-padding fixed-width">
           <template slot-scope="scope">
-            <el-button :disabled="scope.row.status == 0?false:true" type="primary" size="small" @click="handleView(scope.row)">审批</el-button>
+            <el-button :disabled="scope.row.status == 0?false:true" type="primary" size="small" @click="handleComplete(scope.row.id,0)">通过</el-button>
+            <el-button :disabled="scope.row.status == 0?false:true" type="warning" size="small" @click="handleComplete(scope.row.id,1)">不通过</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -209,36 +212,17 @@
           this.$refs["dataForm"].clearValidate();
         });
       },
-      handleComplete(flag){
-        if(flag==0){
-            this.$refs["dataForm"].validate((valid) => {
-                if (valid) {
-                    this.dataForm.flag = flag;
-                    complete(this.dataForm).then(() => {
+      handleComplete(certificateId,flag){
+        complete({certificateId:certificateId,flag:flag}).then(() => {
                         this.dialogFormVisible = false;
                         this.$notify({
                         title: "成功",
-                        message: "审批成功",
+                        message: "操作成功",
                         type: "success",
                         duration: 2000,
                     });
                         this.getList();
                     });
-                }
-            });
-        }else{
-                    this.dataForm.flag = flag;
-                    complete(this.dataForm).then(() => {
-                        this.dialogFormVisible = false;
-                        this.$notify({
-                        title: "成功",
-                        message: "审批成功",
-                        type: "success",
-                        duration: 2000,
-                    });
-                        this.getList();
-                    });
-        }
 
         
       }