fix: BUG修改

This commit is contained in:
kun 2024-05-16 18:10:38 +08:00
parent eb5e2ec392
commit 995556a25f
2 changed files with 70 additions and 66 deletions

View File

@ -78,8 +78,8 @@
<div
class="downDiv"
style="text-align: center;"
:style="{ height: backimgheightDown + 'px' }"
>
<!-- :style="{ height: backimgheightDown + 'px' }" -->
<div
class="downHear"
:style="{
@ -118,36 +118,38 @@
>通过后台查询到您有以下扣分记录</div>
<ul
class="text2-content"
v-infinite-scroll="load"
style="overflow:auto"
:style="{ fontSize: backimgFontSize * 0.5 + 'px', height: backimgFontSize * 6 + 'px', }"
style="overflow-y:scroll"
:style="{ fontSize: backimgFontSize * 0.5 + 'px' }"
>
<li
class="text2-item"
v-for="( item, i ) in scoreRecord "
:key="item.id"
:style="{ height: backimgFontSize * 2 + 'px', paddingTop: backimgFontSize * 0.33 + 'px', width: ((backimgFontSize * 13.35) - 25) + 'px' }"
>{{ i + 1 }}. {{ item.deductReason }}</li>
<vue-scroll :style="{height: backimgFontSize * 6 + 'px'}">
<li
class="text2-item"
v-for="( item, i ) in scoreRecord "
:key="item.id"
:style="{ paddingTop: backimgFontSize * 0.33 + 'px', width: ((backimgFontSize * 13.35) - 25) + 'px' }"
>{{ i + 1 }}. {{ item.deductReason }}</li>
<!-- height: backimgFontSize * 2 + 'px', -->
</vue-scroll>
</ul>
</div>
<div
class="foot"
v-if="WorkerInfo.safeScore >= 90"
:style="{ 'color': fontColor, paddingTop: backimgFontSize * 0.4 + 'px', fontSize: backimgFontSize * 0.9 + 'px' }"
:style="{ 'color': fontColor, 'left': '40%', paddingTop: backimgFontSize * 0.4 + 'px', fontSize: backimgFontSize * 0.9 + 'px' }"
>
可通行
</div>
<div
class="foot"
v-if="WorkerInfo.safeScore >= 80 && WorkerInfo.safeScore < 90"
:style="{ 'color': fontColor, paddingTop: backimgFontSize * 0.2 + 'px', fontSize: backimgFontSize * 0.9 + 'px' }"
:style="{ 'color': fontColor, 'left': '21%', paddingTop: backimgFontSize * 0.2 + 'px', fontSize: backimgFontSize * 0.9 + 'px' }"
>
安全分已经低于90分
</div>
<div
class="foot"
v-if="WorkerInfo.safeScore < 80"
:style="{ 'color': fontColor, paddingTop: backimgFontSize * 0.2 + 'px', fontSize: backimgFontSize * 0.9 + 'px' }"
:style="{ 'color': fontColor, 'left': '21%', paddingTop: backimgFontSize * 0.2 + 'px', fontSize: backimgFontSize * 0.9 + 'px' }"
>
安全分已经低于80分
</div>
@ -452,7 +454,8 @@ export default {
}
.content-down {
height: 45.5%;
// height: 45.5%;
height: 40.5%;
}
.upDiv {
@ -535,6 +538,9 @@ li {
font-size: 1.3rem;
font-weight: bold;
text-align: center;
position: absolute;
bottom: 4%;
z-index: 10;
}
.down-up {
@ -545,8 +551,10 @@ li {
.downDiv {
/* height: 100%; */
height: 100%;
position: relative;
display: flex;
flex-direction: column;
}
.downHear {

View File

@ -10,14 +10,9 @@
placeholder="请输入身份证号码"
v-model="value"
maxlength="18"
>
</div>
<div
class="anniu"
@click="toQR"
>
查看二维码
/>
</div>
<div class="anniu" @click="toQR">查看二维码</div>
<div class="p">
<p v-if="!isValidIdCard">请输入有效的身份证号码!</p>
</div>
@ -29,10 +24,10 @@
</template>
<script>
import { entryCodeApi } from '@/assets/js/api/safeManage.js'
import { entryCodeApi } from "@/assets/js/api/safeManage.js";
export default {
name: 'myLogin',
data () {
name: "myLogin",
data() {
return {
value: "",
isValidIdCard: true,
@ -40,24 +35,23 @@ export default {
projectSn: "",
userId: "",
id: "",
}
};
},
mounted () {
mounted() {
this.getQuery();
},
methods: {
getQuery () {
getQuery() {
this.projectSn = this.$route.query.projectSn;
this.userId = this.$route.query.userId;
},
async selectWorkerInfo () {
async selectWorkerInfo() {
const params = {
// projectSn: this.projectSn,
idCard: this.value
idCard: this.value,
};
// const idCard = this.value;
const res = await entryCodeApi(params);
@ -65,36 +59,38 @@ export default {
if (res.success == true) {
this.id = res.result.id;
console.log("this.id:" + this.id);
this.$router.push({ name: '准入二维码_详情', params: { WorkerInfo: res.result, projectSn: this.projectSn } })
this.$router.push({
name: "准入二维码_详情",
params: { WorkerInfo: res.result, projectSn: this.projectSn },
});
// this.$router.push({path: '/entryCodeDetail'});
} else {
console.log("没有查到信息");
}
},
validateIdCard () {
validateIdCard() {
//
const idCardRegex = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])([0-2][1-9]|10|20|30)\d{3}[\dX]$/;
const idCardRegex =
/^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])([0-2][1-9]|10|20|30)\d{3}[\dX]$/;
//
this.isValidIdCard = idCardRegex.test(this.value);
},
toQR () {
toQR() {
if (this.value != null && this.value != "") {
this.iscunzai = true
this.iscunzai = true;
this.validateIdCard();
if (this.isValidIdCard) {
console.log("身份证号:" + this.value);
this.selectWorkerInfo();
}
} else {
this.isValidIdCard = true
this.iscunzai = false
this.isValidIdCard = true;
this.iscunzai = false;
}
},
}
}
},
};
</script>
<style scoped lang="less">
@ -119,39 +115,39 @@ export default {
}
.input {
width: 90%;
margin: 0 auto;
margin-top: 40%;
}
input {
font-size: 1.3rem;
text-align: center;
height: 2.5rem;
width: 100%;
border: rgb(165, 165, 165) solid 0.08rem;
border-radius: 0.41rem;
}
margin-top: 40%;
display: flex;
justify-content: center;
input {
font-size: 1.3rem;
text-align: center;
height: 2.5rem;
width: 88%;
border: rgb(165, 165, 165) solid 0.08rem;
border-radius: 0.41rem;
}
input::placeholder {
font-weight: bold;
font-size: 1.2rem;
color: rgb(123, 123, 123);
}
input::placeholder {
font-weight: bold;
font-size: 1.2rem;
color: rgb(123, 123, 123);
}
input::-ms-input-placeholder {
text-align: center;
}
input::-ms-input-placeholder {
text-align: center;
}
input::-webkit-input-placeholder {
text-align: center;
input::-webkit-input-placeholder {
text-align: center;
}
}
.title {
font-size: 1.6rem;
font-weight: bold;
margin-top: 30%;
p{
p {
text-align: center;
}
}