添加提示
This commit is contained in:
parent
c0c8a684bb
commit
040e4326a3
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -18,6 +18,9 @@ user-scalable: 用户是否能缩放页面 -->
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
.container{
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
.active{
|
.active{
|
||||||
color: #2698f0;
|
color: #2698f0;
|
||||||
}
|
}
|
||||||
|
@ -96,9 +99,40 @@ user-scalable: 用户是否能缩放页面 -->
|
||||||
margin: auto;
|
margin: auto;
|
||||||
margin: 0 auto 10px auto;
|
margin: 0 auto 10px auto;
|
||||||
}
|
}
|
||||||
|
.listItem{
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px dashed #2698f0;
|
||||||
|
border-radius: 5px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
.imgs{
|
.imgs{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.neishen{
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid orange;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0 3px;
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
left: 5px;
|
||||||
|
color: orange;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.info{
|
||||||
|
padding: 5px 20px;
|
||||||
|
color: #ffffff;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 10;
|
||||||
|
width: fit-content;
|
||||||
|
top: 40%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
background: rgba(0,0,0,.5);
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
@media screen and (max-width: 992px){
|
@media screen and (max-width: 992px){
|
||||||
.search-dialog{
|
.search-dialog{
|
||||||
width: 96%;
|
width: 96%;
|
||||||
|
@ -146,24 +180,39 @@ user-scalable: 用户是否能缩放页面 -->
|
||||||
<div v-if="type==0">
|
<div v-if="type==0">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span class="label"><span class="redStar">*</span>证书号</span>
|
<span class="label"><span class="redStar">*</span>证书号</span>
|
||||||
<input class="searchInput" type="text" id="username" v-model="form.number">
|
<input class="searchInput" type="text" id="number" v-model="form.number">
|
||||||
</div>
|
</div>
|
||||||
<div class="searchBtn" @click="searchClick(0)">查询</div>
|
<div class="searchBtn" @click="searchClick(0)">查询</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span class="label"><span class="redStar">*</span>姓名</span>
|
<span class="label"><span class="redStar">*</span>姓名</span>
|
||||||
<input class="searchInput" type="text" id="username" v-model="form.name">
|
<input class="searchInput" type="text" id="name" v-model="form.name">
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span class="label"><span class="redStar">*</span>单位</span>
|
<span class="label"><span class="redStar">*</span>单位</span>
|
||||||
<input class="searchInput" type="password" id="password" v-model="form.deptName">
|
<input class="searchInput" type="text" id="deptName" v-model="form.deptName">
|
||||||
</div>
|
</div>
|
||||||
<div class="searchBtn" @click="searchClick(1)">查询</div>
|
<div class="searchBtn" @click="searchClick(1)">查询</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div v-if="showImg">
|
||||||
<img class="imgs" :src="imgSrc">
|
<img class="imgs" :src="imgSrc">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="lists" v-if="dataList.length>0">
|
||||||
|
<div v-for="item in dataList" class="listItem" @click="showImage(item)">
|
||||||
|
<div>姓名:{{item.姓名}}</div>
|
||||||
|
<div>证书编号:{{item.证书编号}}</div>
|
||||||
|
<div>所属单位:{{item.所属单位}}</div>
|
||||||
|
<div v-if="item.职务!==null&&item.职务!=='/'">职务:{{item.职务}}</div>
|
||||||
|
<div class="neishen" v-if="item.内审员">内审员</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<p>暂未查询到您的相关证书!</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="showErr" class="info">
|
||||||
|
{{errMsg}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
@ -176,33 +225,76 @@ user-scalable: 用户是否能缩放页面 -->
|
||||||
name: '',
|
name: '',
|
||||||
deptName: ''
|
deptName: ''
|
||||||
},
|
},
|
||||||
imgSrc:''
|
imgSrc:'',
|
||||||
|
showImg:false,
|
||||||
|
dataList:[],
|
||||||
|
showErr:false,
|
||||||
|
errMsg:''
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
typeChange(index){
|
typeChange(index){
|
||||||
|
let that = this;
|
||||||
|
that.dataList = [];
|
||||||
this.type = index;
|
this.type = index;
|
||||||
|
that.showImg = fasle;
|
||||||
},
|
},
|
||||||
searchClick(type){
|
searchClick(type){
|
||||||
axios.get('https://testsearch.ctc.ac.cn/api/edu/certificate/',{params:{证书编号:this.form.number}})
|
let that = this;
|
||||||
|
that.dataList = [];
|
||||||
|
if(that.type==0){
|
||||||
|
if(that.form.number!==''){
|
||||||
|
axios.get('https://testsearch.ctc.ac.cn/api/edu/certificate/',{params:{证书编号:that.form.number}})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
let data = res.data.data[0];
|
if(res.data.data.length>0){
|
||||||
if(data.证书地址!==null){
|
that.dataList = res.data.data;
|
||||||
this.imgSrc = 'https://testsearch.ctc.ac.cn'+data.证书地址;
|
}
|
||||||
|
})
|
||||||
}else{
|
}else{
|
||||||
axios.get(`https://testsearch.ctc.ac.cn/api/edu/certificate/${data.id}/`).then(res1=>{
|
that.errMsg = '请输入证书编号';
|
||||||
|
that.showErr = true;
|
||||||
|
setTimeout(()=>{
|
||||||
|
that.showErr = false;
|
||||||
|
},1500)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(that.form.name!==''){
|
||||||
|
if(that.form.deptName!==''){
|
||||||
|
axios.get('https://testsearch.ctc.ac.cn/api/edu/certificate/',{params:{姓名:that.form.name,所属单位:that.form.deptName}})
|
||||||
|
.then(res => {
|
||||||
|
if(res.data.data.length>0){
|
||||||
|
that.dataList = res.data.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.errMsg = '请输入所属单位';
|
||||||
|
that.showErr = true;
|
||||||
|
setTimeout(()=>{
|
||||||
|
that.showErr = false;
|
||||||
|
},1500)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
that.errMsg = '请输入姓名';
|
||||||
|
that.showErr = true;
|
||||||
|
setTimeout(()=>{
|
||||||
|
that.showErr = false;
|
||||||
|
},1500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showImage(data){
|
||||||
|
let that = this;
|
||||||
|
if(data.证书地址!==null){
|
||||||
|
that.imgSrc = 'https://testsearch.ctc.ac.cn'+data.证书地址;
|
||||||
|
that.showImg = true;
|
||||||
|
}else{
|
||||||
|
axios.get(`https://testsearch.ctc.ac.cn/api/edu/certificate/${data.id}/`).then(res=>{
|
||||||
if(res.data){
|
if(res.data){
|
||||||
debugger;
|
let data1 = res.data.data;
|
||||||
console.log('res1.data:')
|
that.imgSrc = 'https://testsearch.ctc.ac.cn'+data1.证书地址;
|
||||||
console.log(res1.data.data)
|
that.showImg = true;
|
||||||
console.log(res1.data.data.证书地址)
|
|
||||||
let data1 = res1.data.data;
|
|
||||||
this.imgSrc = 'https://testsearch.ctc.ac.cn'+data1.证书地址;
|
|
||||||
console.log(this.imgSrc)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
|
Loading…
Reference in New Issue