Эх сурвалжийг харах

Merge remote-tracking branch 'origin/main'

ljx 2 жил өмнө
parent
commit
f479bd3237

+ 45 - 2
ruoyi-ui/src/views/cert/contract/index.vue

@@ -148,6 +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">
+        <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
@@ -209,6 +214,13 @@
             ></el-option>
           </el-select>
         </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-item label="发证时间" prop="issueDate" >
           <el-date-picker clearable
             v-model="form.issueDate"
@@ -277,6 +289,7 @@
 
 <script>
 import { listContract, getContract, delContract, addContract, updateContract } from "@/api/system/contract";
+import {listTemp} from "@/api/system/temp";
 import { getToken } from "@/utils/auth";
 export default {
   name: "Contract",
@@ -335,6 +348,11 @@ export default {
         validTerm: [
           { required: true, message: "证书有效期不能为空", trigger: "blur" }
         ],
+        templateId: [{
+          required: true,
+          message: '请选择证书模板',
+          trigger: 'blur'
+        }]
       },
       upload: {
         // 是否显示弹出层(用户导入)
@@ -349,14 +367,27 @@ export default {
         headers: { Authorization: "Bearer " + getToken() },
         // 上传的地址
         url: process.env.VUE_APP_BASE_API + "system/contract/importData" // todo
-      }
+      },
+      tempValueOptions:[{
+        "label": "11",
+        "value": 11
+      }, {
+        "label": "22",
+        "value": 22
+      }]
     };
   },
   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 => {
@@ -383,7 +414,8 @@ export default {
         validTerm: null,
         email: null,
         phone: null,
-        certContent: null
+        certContent: null,
+        templateId:null
       };
       this.resetForm("form");
     },
@@ -405,6 +437,7 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
+      // const that = this
       this.reset();
       this.open = true;
       this.title = "添加证书";
@@ -430,6 +463,7 @@ export default {
               this.getList();
             });
           } else {
+            console.log(this.form)
             addContract(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
@@ -480,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
+      })
     }
   }
 };

+ 136 - 4
ruoyi-ui/src/views/certInquire/index.vue

@@ -1,8 +1,5 @@
 <template>
     <div class="main">
-        <div class="img-box">
-            <img src="../../assets/logo/logo2.png" alt="广东省教师继续教育学会">
-        </div>
         <div>
             <router-view></router-view>
         </div>
@@ -13,8 +10,21 @@
 <style lang="scss">
 .main {
   text-align: left;
-  margin: 100px auto;
+  height: 100%;
+  width: 100%;
+  // margin: 100px auto;
+  // width: 500px;
+  // position: absolute;
+  // left: 50%;
+  // top: 50%;
+  // transform: translate(-50%, -50%);
+}
+.main-content{
   width: 500px;
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%, -50%);
 }
 .img-box {
   width: 360px;
@@ -79,4 +89,126 @@
 .activeSpan{
     color: #50ac55;
 }
+
+.zs-title-img{
+  display: block;
+    margin: auto;
+    height: 75px;
+    transform: scale(1.7);
+}
+
+
+::v-deep .el-dialog__body {
+  padding: 0px;
+  display: flex;
+  justify-content: center;
+}
+#pdfDom {
+  /* 要想pdf周边留白,要在这里设置 */
+  /* padding: 20px; */
+  width: 750px;
+  margin: auto;
+}
+.proBox {
+  /* background: url("../assets/Appointment_page-0001.jpg") no-repeat; */
+  background-size: cover;
+  width: 750px;
+  height: 525px;
+  /* padding: 90px 94px; */
+  padding: 40px 60px;
+  box-sizing: border-box;
+  margin: 0 auto;
+  position: relative;
+  color: #000;
+  font-family: 楷体;
+  font-size: 16px;
+}
+.tit {
+  color: #000;
+  /* color: #892f27; */
+  /* font-size: 36px; */
+  font-size: 22px;
+  font-weight: 700;
+  position: relative;
+  top: -6px;
+  left: 8px;
+  letter-spacing: 2px;
+  font-family: STHeiti;
+  margin: 10px 0;
+  text-align: center;
+}
+.proid {
+  text-align: right;
+  margin: 0;
+  font-weight: 500;
+  /* margin-right: 5px; */
+}
+.con {
+  font-size: 20px;
+  /* font-weight: 700; */
+  text-align: left;
+  margin: 10px 0;
+  line-height: 32px;
+  text-indent: 2em;
+  position: absolute;
+    /* top: 129px; */
+    bottom: 265px;
+}
+.con-name {
+  font-family:黑体 ;
+  margin-right: 10px;
+  font-size: 24px;
+}
+.con-unit {
+  font-size: 20px;
+  font-weight: 700;
+  position: absolute;
+  right: 45px;
+  bottom: 100px;
+  z-index: 10;
+  text-align: center;
+  /* letter-spacing: 2px; */
+}
+.con-unit p {
+  margin: 5px 0;
+}
+.con-footer {
+  position: absolute;
+  right: 0;
+  right: 45px;
+  bottom: 65px;
+  font-size: 10px;
+  z-index: 10;
+}
+.con-footer p{
+  margin: 0;
+}
+.chapter {
+  border-radius: 50%;
+  position: absolute;
+  bottom: 45px;
+  right: 40px;
+}
+.cert-msg{
+  font-size: 20px;
+  font-size: 15px;
+  position: absolute;
+  bottom: 50px;
+  left: 90px;
+}
+.foot-term{
+  position: absolute;
+  bottom: 124px;
+  left: 175px;
+}
+.foot-cert{
+  position: absolute;
+  bottom: 94px;
+  left: 175px;
+}
+.foot-date{
+  position: absolute;
+  bottom: 64px;
+  left: 175px;
+}
 </style>