littlegreen 2 жил өмнө
parent
commit
0f2d424d92

+ 1 - 1
ruoyi-ui/src/api/system/contract.js

@@ -54,7 +54,7 @@ export function getCert(data) {
     data: data
   })
 }
-
+// 检查code是否正确
 export function checkCode(data){
   return request({
     url: '/system/contract/captchaCheck',

+ 43 - 5
ruoyi-ui/src/views/cert/grad/index.vue

@@ -146,7 +146,12 @@
       </el-table-column>
       <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="templateId" width="150">
+        <template slot-scope="scope">
+          <span>{{scope.row.templateId?tempHandle(scope.row.templateId):""}}</span>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column label="自增id" align="center" prop="id" /> -->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -229,13 +234,20 @@
         <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="templateId">
+          <el-select v-model="form.templateId" placeholder="请选择证书模板" filterable clearable
+            :style="{width: '100%'}">
+            <el-option v-for="(item, index) in tempValueOptions" :key="index" :label="item.label"
+              :value="item.value" ></el-option>
+          </el-select>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -248,7 +260,7 @@
 
 <script>
 import { listGrad, getGrad, delGrad, addGrad, updateGrad } from "@/api/system/grad";
-
+import {listTemp} from "@/api/system/temp";
 export default {
   name: "Grad",
   dicts: ['cert_a_type'],
@@ -289,14 +301,30 @@ export default {
       form: {},
       // 表单校验
       rules: {
-      }
+        templateId: [
+          { required: true, message: '请选择证书模板', trigger: 'blur' }
+        ]
+      },
+      tempValueOptions:[{
+        "label": "11",
+        "value": 11
+      }, {
+        "label": "22",
+        "value": 22
+      }]
     };
   },
   created() {
     this.getList();
+    this.getTemp();
   },
   methods: {
     /** 查询A类证书列表 */
+    tempHandle(val){
+      console.log(val,this.tempValueOptions)
+      let arr = this.tempValueOptions.filter(item=>item.value===val)
+      return arr[0].label
+    },
     getList() {
       this.loading = true;
       listGrad(this.queryParams).then(response => {
@@ -327,7 +355,8 @@ export default {
         userPhone: null,
         userEmail: null,
         updateDate: null,
-        id: null
+        id: null,
+        templateId:null
       };
       this.resetForm("form");
     },
@@ -398,6 +427,15 @@ export default {
       this.download('system/grad/export', {
         ...this.queryParams
       }, `grad_${new Date().getTime()}.xlsx`)
+    },
+    getTemp(){
+      listTemp().then(res=>{
+        let arr = res.rows.map(item => {
+          return { label: item.name, value: item.id }
+        });
+      // console.log(arr,22)
+        this.tempValueOptions = arr
+      })
     }
   }
 };