|
@@ -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
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
};
|