فهرست منبع

修改了A类证书的代码:照片上传以及一些样式

littlegreen 2 سال پیش
والد
کامیت
04150a4659

+ 15 - 15
ruoyi-system/src/main/java/com/ruoyi/system/controller/GradTableController.java

@@ -22,10 +22,10 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.page.TableDataInfo;
 
 /**
- * A类Controller
+ * A类证书Controller
  * 
  * @author ruoyi
- * @date 2022-11-25
+ * @date 2022-11-28
  */
 @RestController
 @RequestMapping("/system/grad")
@@ -35,7 +35,7 @@ public class GradTableController extends BaseController
     private IGradTableService gradTableService;
 
     /**
-     * 查询A类列表
+     * 查询A类证书列表
      */
     @PreAuthorize("@ss.hasPermi('system:grad:list')")
     @GetMapping("/list")
@@ -47,33 +47,33 @@ public class GradTableController extends BaseController
     }
 
     /**
-     * 导出A类列表
+     * 导出A类证书列表
      */
     @PreAuthorize("@ss.hasPermi('system:grad:export')")
-    @Log(title = "A类", businessType = BusinessType.EXPORT)
+    @Log(title = "A类证书", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, GradTable gradTable)
     {
         List<GradTable> list = gradTableService.selectGradTableList(gradTable);
         ExcelUtil<GradTable> util = new ExcelUtil<GradTable>(GradTable.class);
-        util.exportExcel(response, list, "A类数据");
+        util.exportExcel(response, list, "A类证书数据");
     }
 
     /**
-     * 获取A类详细信息
+     * 获取A类证书详细信息
      */
     @PreAuthorize("@ss.hasPermi('system:grad:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
+    public AjaxResult getInfo(@PathVariable("id") Integer id)
     {
         return success(gradTableService.selectGradTableById(id));
     }
 
     /**
-     * 新增A类
+     * 新增A类证书
      */
     @PreAuthorize("@ss.hasPermi('system:grad:add')")
-    @Log(title = "A类", businessType = BusinessType.INSERT)
+    @Log(title = "A类证书", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody GradTable gradTable)
     {
@@ -81,10 +81,10 @@ public class GradTableController extends BaseController
     }
 
     /**
-     * 修改A类
+     * 修改A类证书
      */
     @PreAuthorize("@ss.hasPermi('system:grad:edit')")
-    @Log(title = "A类", businessType = BusinessType.UPDATE)
+    @Log(title = "A类证书", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody GradTable gradTable)
     {
@@ -92,12 +92,12 @@ public class GradTableController extends BaseController
     }
 
     /**
-     * 删除A类
+     * 删除A类证书
      */
     @PreAuthorize("@ss.hasPermi('system:grad:remove')")
-    @Log(title = "A类", businessType = BusinessType.DELETE)
+    @Log(title = "A类证书", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
+    public AjaxResult remove(@PathVariable Integer[] ids)
     {
         return toAjax(gradTableService.deleteGradTableByIds(ids));
     }

+ 22 - 22
ruoyi-system/src/main/java/com/ruoyi/system/domain/GradTable.java

@@ -8,79 +8,79 @@ import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
- * A类对象 grad_table
+ * A类证书对象 grad_table
  * 
  * @author ruoyi
- * @date 2022-11-25
+ * @date 2022-11-28
  */
 public class GradTable extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
     /** 姓名 */
-    @Excel(name = "姓名",type = Excel.Type.ALL)
+    @Excel(name = "姓名")
     private String uesrName;
 
     /** 身份证 */
-    @Excel(name = "身份证",type = Excel.Type.ALL)
+    @Excel(name = "身份证")
     private String userId;
 
     /** 证书编号 */
-    @Excel(name = "证书编号",type = Excel.Type.ALL)
+    @Excel(name = "证书编号")
     private String certId;
 
     /** 发证时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "发证时间", width = 30, dateFormat = "yyyy-MM-dd",type = Excel.Type.ALL)
+    @Excel(name = "发证时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date issueDate;
 
     /** 培训名称 */
-    @Excel(name = "培训名称",type = Excel.Type.ALL)
+    @Excel(name = "培训名称")
     private String certName;
 
     /** 课程名称 */
-    @Excel(name = "课程名称",type = Excel.Type.ALL)
+    @Excel(name = "课程名称")
     private String courseName;
 
     /** 学时数 */
-    @Excel(name = "学时数",type = Excel.Type.ALL)
+    @Excel(name = "学时数")
     private String courseHours;
 
     /** 等级 */
-    @Excel(name = "等级",type = Excel.Type.ALL)
+    @Excel(name = "等级")
     private String level;
 
     /** 培训起始时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "培训起始时间", width = 30, dateFormat = "yyyy-MM-dd",type = Excel.Type.ALL)
+    @Excel(name = "培训起始时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date startDate;
 
     /** 培训截止时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "培训截止时间", width = 30, dateFormat = "yyyy-MM-dd",type = Excel.Type.ALL)
+    @Excel(name = "培训截止时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date endDate;
 
     /** 照片 */
-    @Excel(name = "照片",type = Excel.Type.ALL)
+    @Excel(name = "照片")
     private String picture;
 
     /** 手机号码 */
-    @Excel(name = "手机号码",type = Excel.Type.ALL)
+    @Excel(name = "手机号码")
     private String userPhone;
 
     /** 邮箱 */
-    @Excel(name = "邮箱",type = Excel.Type.ALL)
+    @Excel(name = "邮箱")
     private String userEmail;
 
     /** 导入系统的时间戳 */
     private Date updateDate;
 
     /** 自增id */
-    private Long id;
+    private Integer id;
 
     /** 证书类型 */
-    @Excel(name = "证书类型", readConverterExp = "0=专业能力证书,1=培训结业证书,2=学时证明",type = Excel.Type.ALL)
-    private Long certType;
+    @Excel(name = "证书类型")
+    private Integer certType;
 
     public void setUesrName(String uesrName) 
     {
@@ -208,21 +208,21 @@ public class GradTable extends BaseEntity
     {
         return updateDate;
     }
-    public void setId(Long id) 
+    public void setId(Integer id) 
     {
         this.id = id;
     }
 
-    public Long getId() 
+    public Integer getId() 
     {
         return id;
     }
-    public void setCertType(Long certType) 
+    public void setCertType(Integer certType) 
     {
         this.certType = certType;
     }
 
-    public Long getCertType() 
+    public Integer getCertType() 
     {
         return certType;
     }

+ 18 - 18
ruoyi-system/src/main/java/com/ruoyi/system/mapper/GradTableMapper.java

@@ -4,58 +4,58 @@ import java.util.List;
 import com.ruoyi.system.domain.GradTable;
 
 /**
- * A类Mapper接口
+ * A类证书Mapper接口
  * 
  * @author ruoyi
- * @date 2022-11-25
+ * @date 2022-11-28
  */
 public interface GradTableMapper 
 {
     /**
-     * 查询A类
+     * 查询A类证书
      * 
-     * @param id A类主键
-     * @return A类
+     * @param id A类证书主键
+     * @return A类证书
      */
-    public GradTable selectGradTableById(Long id);
+    public GradTable selectGradTableById(Integer id);
 
     /**
-     * 查询A类列表
+     * 查询A类证书列表
      * 
-     * @param gradTable A类
-     * @return A类集合
+     * @param gradTable A类证书
+     * @return A类证书集合
      */
     public List<GradTable> selectGradTableList(GradTable gradTable);
 
     /**
-     * 新增A类
+     * 新增A类证书
      * 
-     * @param gradTable A类
+     * @param gradTable A类证书
      * @return 结果
      */
     public int insertGradTable(GradTable gradTable);
 
     /**
-     * 修改A类
+     * 修改A类证书
      * 
-     * @param gradTable A类
+     * @param gradTable A类证书
      * @return 结果
      */
     public int updateGradTable(GradTable gradTable);
 
     /**
-     * 删除A类
+     * 删除A类证书
      * 
-     * @param id A类主键
+     * @param id A类证书主键
      * @return 结果
      */
-    public int deleteGradTableById(Long id);
+    public int deleteGradTableById(Integer id);
 
     /**
-     * 批量删除A类
+     * 批量删除A类证书
      * 
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
-    public int deleteGradTableByIds(Long[] ids);
+    public int deleteGradTableByIds(Integer[] ids);
 }

+ 19 - 19
ruoyi-system/src/main/java/com/ruoyi/system/service/IGradTableService.java

@@ -4,58 +4,58 @@ import java.util.List;
 import com.ruoyi.system.domain.GradTable;
 
 /**
- * A类Service接口
+ * A类证书Service接口
  * 
  * @author ruoyi
- * @date 2022-11-25
+ * @date 2022-11-28
  */
 public interface IGradTableService 
 {
     /**
-     * 查询A类
+     * 查询A类证书
      * 
-     * @param id A类主键
-     * @return A类
+     * @param id A类证书主键
+     * @return A类证书
      */
-    public GradTable selectGradTableById(Long id);
+    public GradTable selectGradTableById(Integer id);
 
     /**
-     * 查询A类列表
+     * 查询A类证书列表
      * 
-     * @param gradTable A类
-     * @return A类集合
+     * @param gradTable A类证书
+     * @return A类证书集合
      */
     public List<GradTable> selectGradTableList(GradTable gradTable);
 
     /**
-     * 新增A类
+     * 新增A类证书
      * 
-     * @param gradTable A类
+     * @param gradTable A类证书
      * @return 结果
      */
     public int insertGradTable(GradTable gradTable);
 
     /**
-     * 修改A类
+     * 修改A类证书
      * 
-     * @param gradTable A类
+     * @param gradTable A类证书
      * @return 结果
      */
     public int updateGradTable(GradTable gradTable);
 
     /**
-     * 批量删除A类
+     * 批量删除A类证书
      * 
-     * @param ids 需要删除的A类主键集合
+     * @param ids 需要删除的A类证书主键集合
      * @return 结果
      */
-    public int deleteGradTableByIds(Long[] ids);
+    public int deleteGradTableByIds(Integer[] ids);
 
     /**
-     * 删除A类信息
+     * 删除A类证书信息
      * 
-     * @param id A类主键
+     * @param id A类证书主键
      * @return 结果
      */
-    public int deleteGradTableById(Long id);
+    public int deleteGradTableById(Integer id);
 }

+ 19 - 19
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GradTableServiceImpl.java

@@ -8,10 +8,10 @@ import com.ruoyi.system.domain.GradTable;
 import com.ruoyi.system.service.IGradTableService;
 
 /**
- * A类Service业务层处理
+ * A类证书Service业务层处理
  * 
  * @author ruoyi
- * @date 2022-11-25
+ * @date 2022-11-28
  */
 @Service
 public class GradTableServiceImpl implements IGradTableService 
@@ -20,22 +20,22 @@ public class GradTableServiceImpl implements IGradTableService
     private GradTableMapper gradTableMapper;
 
     /**
-     * 查询A类
+     * 查询A类证书
      * 
-     * @param id A类主键
-     * @return A类
+     * @param id A类证书主键
+     * @return A类证书
      */
     @Override
-    public GradTable selectGradTableById(Long id)
+    public GradTable selectGradTableById(Integer id)
     {
         return gradTableMapper.selectGradTableById(id);
     }
 
     /**
-     * 查询A类列表
+     * 查询A类证书列表
      * 
-     * @param gradTable A类
-     * @return A类
+     * @param gradTable A类证书
+     * @return A类证书
      */
     @Override
     public List<GradTable> selectGradTableList(GradTable gradTable)
@@ -44,9 +44,9 @@ public class GradTableServiceImpl implements IGradTableService
     }
 
     /**
-     * 新增A类
+     * 新增A类证书
      * 
-     * @param gradTable A类
+     * @param gradTable A类证书
      * @return 结果
      */
     @Override
@@ -56,9 +56,9 @@ public class GradTableServiceImpl implements IGradTableService
     }
 
     /**
-     * 修改A类
+     * 修改A类证书
      * 
-     * @param gradTable A类
+     * @param gradTable A类证书
      * @return 结果
      */
     @Override
@@ -68,25 +68,25 @@ public class GradTableServiceImpl implements IGradTableService
     }
 
     /**
-     * 批量删除A类
+     * 批量删除A类证书
      * 
-     * @param ids 需要删除的A类主键
+     * @param ids 需要删除的A类证书主键
      * @return 结果
      */
     @Override
-    public int deleteGradTableByIds(Long[] ids)
+    public int deleteGradTableByIds(Integer[] ids)
     {
         return gradTableMapper.deleteGradTableByIds(ids);
     }
 
     /**
-     * 删除A类信息
+     * 删除A类证书信息
      * 
-     * @param id A类主键
+     * @param id A类证书主键
      * @return 结果
      */
     @Override
-    public int deleteGradTableById(Long id)
+    public int deleteGradTableById(Integer id)
     {
         return gradTableMapper.deleteGradTableById(id);
     }

+ 17 - 19
ruoyi-system/src/main/resources/mapper/system/GradTableMapper.xml

@@ -35,15 +35,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="certId != null  and certId != ''"> and cert_id = #{certId}</if>
             <if test="certName != null  and certName != ''"> and cert_name like concat('%', #{certName}, '%')</if>
             <if test="courseName != null  and courseName != ''"> and course_name like concat('%', #{courseName}, '%')</if>
-            <if test="courseHours != null  and courseHours != ''"> and course_hours = #{courseHours}</if>
-            <if test="level != null  and level != ''"> and level = #{level}</if>
             <if test="userPhone != null  and userPhone != ''"> and user_phone = #{userPhone}</if>
             <if test="userEmail != null  and userEmail != ''"> and user_email = #{userEmail}</if>
             <if test="certType != null "> and cert_type = #{certType}</if>
         </where>
     </select>
     
-    <select id="selectGradTableById" parameterType="Long" resultMap="GradTableResult">
+    <select id="selectGradTableById" parameterType="Integer" resultMap="GradTableResult">
         <include refid="selectGradTableVo"/>
         where id = #{id}
     </select>
@@ -51,13 +49,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertGradTable" parameterType="GradTable" useGeneratedKeys="true" keyProperty="id">
         insert into grad_table
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="uesrName != null and uesrName != ''">uesr_name,</if>
-            <if test="userId != null and userId != ''">user_id,</if>
-            <if test="certId != null and certId != ''">cert_id,</if>
+            <if test="uesrName != null">uesr_name,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="certId != null">cert_id,</if>
             <if test="issueDate != null">issue_date,</if>
-            <if test="certName != null and certName != ''">cert_name,</if>
+            <if test="certName != null">cert_name,</if>
             <if test="courseName != null">course_name,</if>
-            <if test="courseHours != null and courseHours != ''">course_hours,</if>
+            <if test="courseHours != null">course_hours,</if>
             <if test="level != null">level,</if>
             <if test="startDate != null">start_date,</if>
             <if test="endDate != null">end_date,</if>
@@ -68,13 +66,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="certType != null">cert_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="uesrName != null and uesrName != ''">#{uesrName},</if>
-            <if test="userId != null and userId != ''">#{userId},</if>
-            <if test="certId != null and certId != ''">#{certId},</if>
+            <if test="uesrName != null">#{uesrName},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="certId != null">#{certId},</if>
             <if test="issueDate != null">#{issueDate},</if>
-            <if test="certName != null and certName != ''">#{certName},</if>
+            <if test="certName != null">#{certName},</if>
             <if test="courseName != null">#{courseName},</if>
-            <if test="courseHours != null and courseHours != ''">#{courseHours},</if>
+            <if test="courseHours != null">#{courseHours},</if>
             <if test="level != null">#{level},</if>
             <if test="startDate != null">#{startDate},</if>
             <if test="endDate != null">#{endDate},</if>
@@ -89,13 +87,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateGradTable" parameterType="GradTable">
         update grad_table
         <trim prefix="SET" suffixOverrides=",">
-            <if test="uesrName != null and uesrName != ''">uesr_name = #{uesrName},</if>
-            <if test="userId != null and userId != ''">user_id = #{userId},</if>
-            <if test="certId != null and certId != ''">cert_id = #{certId},</if>
+            <if test="uesrName != null">uesr_name = #{uesrName},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="certId != null">cert_id = #{certId},</if>
             <if test="issueDate != null">issue_date = #{issueDate},</if>
-            <if test="certName != null and certName != ''">cert_name = #{certName},</if>
+            <if test="certName != null">cert_name = #{certName},</if>
             <if test="courseName != null">course_name = #{courseName},</if>
-            <if test="courseHours != null and courseHours != ''">course_hours = #{courseHours},</if>
+            <if test="courseHours != null">course_hours = #{courseHours},</if>
             <if test="level != null">level = #{level},</if>
             <if test="startDate != null">start_date = #{startDate},</if>
             <if test="endDate != null">end_date = #{endDate},</if>
@@ -108,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
-    <delete id="deleteGradTableById" parameterType="Long">
+    <delete id="deleteGradTableById" parameterType="Integer">
         delete from grad_table where id = #{id}
     </delete>
 

+ 5 - 5
ruoyi-ui/src/api/system/grad.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-// 查询A类列表
+// 查询A类证书列表
 export function listGrad(query) {
   return request({
     url: '/system/grad/list',
@@ -9,7 +9,7 @@ export function listGrad(query) {
   })
 }
 
-// 查询A类详细
+// 查询A类证书详细
 export function getGrad(id) {
   return request({
     url: '/system/grad/' + id,
@@ -17,7 +17,7 @@ export function getGrad(id) {
   })
 }
 
-// 新增A类
+// 新增A类证书
 export function addGrad(data) {
   return request({
     url: '/system/grad',
@@ -26,7 +26,7 @@ export function addGrad(data) {
   })
 }
 
-// 修改A类
+// 修改A类证书
 export function updateGrad(data) {
   return request({
     url: '/system/grad',
@@ -35,7 +35,7 @@ export function updateGrad(data) {
   })
 }
 
-// 删除A类
+// 删除A类证书
 export function delGrad(id) {
   return request({
     url: '/system/grad/' + id,

+ 14 - 11
ruoyi-ui/src/views/cert/contract/index.vue

@@ -100,14 +100,17 @@
           v-hasPermi="['system:contract:remove']"
         >删除</el-button>
       </el-col>
-      <el-button
+      <el-col :span="1.5">
+        <el-button
         type="info"
         plain
         icon="el-icon-upload2"
         size="mini"
         @click="handleImport"
-        v-hasPermi="['collegeManage:studentBase:import']"
-      >导入</el-button>
+        v-hasPermi="['system:contract:import']"
+        >导入</el-button>
+        <!-- v-hasPermi="['collegeManage:studentBase:import']" -->
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -146,7 +149,7 @@
       <el-table-column label="邮箱" align="center" prop="dEmail" width="200"/>
       <el-table-column label="手机号" align="center" prop="dPhone" width="120"/>
       <el-table-column label="证书文字" align="center" prop="certContent" width="250"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -256,13 +259,13 @@
       >
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-        <div class="el-upload__tip text-center" slot="tip">
+        <!-- <div class="el-upload__tip text-center" slot="tip">
           <div class="el-upload__tip" slot="tip">
             <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
           </div>
           <span>仅允许导入xls、xlsx格式文件。</span>
           <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
-        </div>
+        </div> -->
       </el-upload>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitFileForm">确 定</el-button>
@@ -454,14 +457,14 @@ export default {
     },
     /** 导入按钮操作 */
     handleImport() {
-      this.upload.title = "学生基本信息导入"; // todo
+      this.upload.title = "B类证书信息导入"; // todo
       this.upload.open = true;
     },
     /** 下载模板操作 */
-    importTemplate() {
-      this.download('system/contract/importTemplate', {
-      }, `stu_base_template_${new Date().getTime()}.xlsx`)  // todo
-    },
+    // importTemplate() {
+    //   this.download('system/contract/importTemplate', {
+    //   }, `stu_base_template_${new Date().getTime()}.xlsx`)  // todo
+    // },
     // 文件上传中处理
     handleFileUploadProgress(event, file, fileList) {
       this.upload.isUploading = true;

+ 60 - 90
ruoyi-ui/src/views/cert/grad/index.vue

@@ -1,6 +1,16 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="证书类型" prop="certType">
+        <el-select v-model="queryParams.certType" placeholder="请选择证书类型" clearable>
+          <el-option
+            v-for="dict in dict.type.cert_a_type"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item label="姓名" prop="uesrName">
         <el-input
           v-model="queryParams.uesrName"
@@ -41,22 +51,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="学时数" prop="courseHours">
-        <el-input
-          v-model="queryParams.courseHours"
-          placeholder="请输入学时数"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="等级" prop="level">
-        <el-input
-          v-model="queryParams.level"
-          placeholder="请输入等级"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="手机号码" prop="userPhone">
         <el-input
           v-model="queryParams.userPhone"
@@ -73,23 +67,12 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="证书类型" prop="certType">
-        <el-select v-model="queryParams.certType" placeholder="请选择证书类型" clearable>
-          <el-option
-            v-for="dict in dict.type.cert_a_type"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button style="margin-left:20px" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-
-    <el-row :gutter="10" class="mb8">
+    <el-row :gutter="10" class="mb18">
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -137,18 +120,23 @@
 
     <el-table v-loading="loading" :data="gradList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="姓名" align="center" prop="uesrName" />
-      <el-table-column label="身份证" align="center" prop="userId" />
-      <el-table-column label="证书编号" align="center" prop="certId" />
+      <el-table-column label="证书类型" align="center" prop="certType" width="120">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.cert_a_type" :value="scope.row.certType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="姓名" align="center" prop="uesrName" width="120"/>
+      <el-table-column label="身份证" align="center" prop="userId" width="200"/>
+      <el-table-column label="证书编号" align="center" prop="certId" width="200"/>
       <el-table-column label="发证时间" align="center" prop="issueDate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.issueDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="培训名称" align="center" prop="certName" />
-      <el-table-column label="课程名称" align="center" prop="courseName" />
-      <el-table-column label="学时数" align="center" prop="courseHours" />
-      <el-table-column label="等级" align="center" prop="level" />
+      <el-table-column label="培训名称" align="center" prop="certName" width="200"/>
+      <el-table-column label="课程名称" align="center" prop="courseName" width="200"/>
+      <el-table-column label="学时数" align="center" prop="courseHours" width="100"/>
+      <el-table-column label="等级" align="center" prop="level" width="100"/>
       <el-table-column label="培训起始时间" align="center" prop="startDate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
@@ -159,16 +147,15 @@
           <span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="照片" align="center" prop="picture" />
-      <el-table-column label="手机号码" align="center" prop="userPhone" />
-      <el-table-column label="邮箱" align="center" prop="userEmail" />
-      <el-table-column label="自增id" align="center" prop="id" />
-      <el-table-column label="证书类型" align="center" prop="certType">
+      <el-table-column label="照片" align="center" prop="picture" width="100">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.cert_a_type" :value="scope.row.certType"/>
+          <image-preview :src="scope.row.picture" :width="50" :height="50"/>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="手机号码" align="center" prop="userPhone" width="120"/>
+      <el-table-column label="邮箱" align="center" prop="userEmail" width="200"/>
+      <!-- <el-table-column label="自增id" align="center" prop="id" /> -->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -196,9 +183,19 @@
       @pagination="getList"
     />
 
-    <!-- 添加或修改A类对话框 -->
+    <!-- 添加或修改A类证书对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="证书类型" prop="certType">
+          <el-select v-model="form.certType" placeholder="请选择证书类型" style="width:100%">
+            <el-option
+              v-for="dict in dict.type.cert_a_type"
+              :key="dict.value"
+              :label="dict.label"
+:value="parseInt(dict.value)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="姓名" prop="uesrName">
           <el-input v-model="form.uesrName" placeholder="请输入姓名" />
         </el-form-item>
@@ -213,7 +210,7 @@
             v-model="form.issueDate"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="请选择发证时间">
+            placeholder="请选择发证时间" style="width:100%">
           </el-date-picker>
         </el-form-item>
         <el-form-item label="培训名称" prop="certName">
@@ -228,12 +225,12 @@
         <el-form-item label="等级" prop="level">
           <el-input v-model="form.level" placeholder="请输入等级" />
         </el-form-item>
-        <el-form-item label="培训起始时间" prop="startDate">
+        <el-form-item label="培训起始时间" prop="startDate"  >
           <el-date-picker clearable
             v-model="form.startDate"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="请选择培训起始时间">
+            placeholder="请选择培训起始时间" style="width:100%" >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="培训截止时间" prop="endDate">
@@ -241,11 +238,11 @@
             v-model="form.endDate"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="请选择培训截止时间">
+            placeholder="请选择培训截止时间" style="width:100%">
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="照片" prop="picture">
-          <el-input v-model="form.picture" placeholder="请输入照片" />
+        <el-form-item label="照片">
+          <image-upload v-model="form.picture" />
         </el-form-item>
         <el-form-item label="手机号码" prop="userPhone">
           <el-input v-model="form.userPhone" placeholder="请输入手机号码" />
@@ -253,24 +250,15 @@
         <el-form-item label="邮箱" prop="userEmail">
           <el-input v-model="form.userEmail" placeholder="请输入邮箱" />
         </el-form-item>
-        <el-form-item label="导入系统的时间戳" prop="updateDate">
+        <!-- <el-form-item label="导入系统的时间戳" prop="updateDate">
           <el-date-picker clearable
             v-model="form.updateDate"
             type="date"
             value-format="yyyy-MM-dd"
             placeholder="请选择导入系统的时间戳">
           </el-date-picker>
-        </el-form-item>
-        <el-form-item label="证书类型" prop="certType">
-          <el-select v-model="form.certType" placeholder="请选择证书类型">
-            <el-option
-              v-for="dict in dict.type.cert_a_type"
-              :key="dict.value"
-              :label="dict.label"
-:value="parseInt(dict.value)"
-            ></el-option>
-          </el-select>
-        </el-form-item>
+        </el-form-item> -->
+        
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -300,7 +288,7 @@ export default {
       showSearch: true,
       // 总条数
       total: 0,
-      // A类表格数据
+      // A类证书表格数据
       gradList: [],
       // 弹出层标题
       title: "",
@@ -315,8 +303,6 @@ export default {
         certId: null,
         certName: null,
         courseName: null,
-        courseHours: null,
-        level: null,
         userPhone: null,
         userEmail: null,
         certType: null
@@ -325,27 +311,6 @@ export default {
       form: {},
       // 表单校验
       rules: {
-        uesrName: [
-          { required: true, message: "姓名不能为空", trigger: "blur" }
-        ],
-        userId: [
-          { required: true, message: "身份证不能为空", trigger: "blur" }
-        ],
-        certId: [
-          { required: true, message: "证书编号不能为空", trigger: "blur" }
-        ],
-        issueDate: [
-          { required: true, message: "发证时间不能为空", trigger: "blur" }
-        ],
-        certName: [
-          { required: true, message: "培训名称不能为空", trigger: "blur" }
-        ],
-        courseHours: [
-          { required: true, message: "学时数不能为空", trigger: "blur" }
-        ],
-        certType: [
-          { required: true, message: "证书类型不能为空", trigger: "change" }
-        ]
       }
     };
   },
@@ -353,7 +318,7 @@ export default {
     this.getList();
   },
   methods: {
-    /** 查询A类列表 */
+    /** 查询A类证书列表 */
     getList() {
       this.loading = true;
       listGrad(this.queryParams).then(response => {
@@ -409,7 +374,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加A类";
+      this.title = "添加A类证书";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -418,7 +383,7 @@ export default {
       getGrad(id).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改A类";
+        this.title = "修改A类证书";
       });
     },
     /** 提交按钮 */
@@ -444,7 +409,7 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除A类编号为"' + ids + '"的数据项?').then(function() {
+      this.$modal.confirm('是否确认删除A类证书编号为"' + ids + '"的数据项?').then(function() {
         return delGrad(ids);
       }).then(() => {
         this.getList();
@@ -460,3 +425,8 @@ export default {
   }
 };
 </script>
+<style lang="scss" scoped>
+.mb18{
+  margin-bottom: 18px;
+}
+</style>