Browse Source

修改了B类证书的列表显示效果

littlegreen 2 năm trước cách đây
mục cha
commit
f5601abef9
1 tập tin đã thay đổi với 20 bổ sung9 xóa
  1. 20 9
      ruoyi-ui/src/views/cert/contract/index.vue

+ 20 - 9
ruoyi-ui/src/views/cert/contract/index.vue

@@ -148,7 +148,11 @@
       <el-table-column label="邮箱" align="center" prop="email" width="200"/>
       <el-table-column label="手机号" align="center" prop="phone" width="120"/>
       <el-table-column label="证书文字" align="center" prop="certContent" width="250"/>
-      <el-table-column label="证书模板" align="center" prop="templateId" width="250"/>
+      <el-table-column label="证书模板" align="center" prop="templateId" width="250">
+        <template slot-scope="scope">
+          <span>{{scope.row.templateId?tempHandle(scope.row.templateId):""}}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
         <template slot-scope="scope">
           <el-button
@@ -375,9 +379,15 @@ export default {
   },
   created() {
     this.getList();
+    this.getTemp();
   },
   methods: {
     /** 查询B类证书列表 */
+    tempHandle(val){
+      console.log(val,this.tempValueOptions)
+      let arr = this.tempValueOptions.filter(item=>item.value===val)
+      return arr[0].label
+    },
     getList() {
       this.loading = true;
       listContract(this.queryParams).then(response => {
@@ -431,14 +441,6 @@ export default {
       this.reset();
       this.open = true;
       this.title = "添加证书";
-      listTemp().then(res=>{
-        console.log(res.rows)
-        let arr = res.rows.map(item => {
-          return { label: item.name, value: item.id }
-        });
-        // console.log(arr,22)
-        this.tempValueOptions = arr
-      })
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -512,6 +514,15 @@ export default {
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();
+    },
+    getTemp(){
+      listTemp().then(res=>{
+        let arr = res.rows.map(item => {
+          return { label: item.name, value: item.id }
+        });
+      // console.log(arr,22)
+        this.tempValueOptions = arr
+      })
     }
   }
 };