fix: BUG修改

This commit is contained in:
kun 2024-04-27 21:59:29 +08:00
parent da5622e6d1
commit 1e491f3f95
32 changed files with 825 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>人员录入</title><link href=/doc/h5Entry/static/css/app.631710d5449813ac30b2fa9636aa3780.css rel=stylesheet></head><body><div id=app></div><script>var host = window.location.origin;
// var rootURL = host + "/";
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>人员录入</title><link href=/doc/h5Entry/static/css/app.e9923a1c8a5b0cec30f8fc37feaf4583.css rel=stylesheet></head><body><div id=app></div><script>var host = window.location.origin;
var rootURL = host + "/";
// var rootURL = "http://192.168.34.221:28888/";
var rootURL = "http://192.168.34.221:9111/"; //本地
// var rootURL = "http://192.168.34.221:9111/"; //本地
var locationURL = window.location.href;
// ||
// host.indexOf("192.168") != -1
@ -16,4 +16,4 @@
// rootURL = "http://192.168.34.155:19111/" //本地
// locationURL=rootURL+'doc/h5Entry/index.html?userId=4&projectSn=a2ef0238b59146aa814b93f47710dbf2#/'
locationURL=rootURL+'doc/h5Entry/index.html?userId=1779721457571291137&projectSn=BD3137498CB84BF0969979E0342CDBCA&educationId=1666278624304615426#/'
}</script><script type=text/javascript src=/doc/h5Entry/static/js/manifest.cc4eb129f56cae141b2f.js></script><script type=text/javascript src=/doc/h5Entry/static/js/vendor.08fb8d13d88c906352f9.js></script><script type=text/javascript src=/doc/h5Entry/static/js/app.8c1a3bfdc0f0fe08ad2f.js></script></body></html>
}</script><script type=text/javascript src=/doc/h5Entry/static/js/manifest.68b53c7d31f6c28b0cb4.js></script><script type=text/javascript src=/doc/h5Entry/static/js/vendor.08fb8d13d88c906352f9.js></script><script type=text/javascript src=/doc/h5Entry/static/js/app.c6b3cb802133ea2879cb.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
webpackJsonp([2],{"2NXm":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("mvHQ"),o=n.n(i),a=n("woOf"),r=n.n(a),s=n("bOdI"),c=n.n(s),l={data:function(){return{userData:{}}},created:function(){this.httpUrl=rootURL;var t=locationURL,e=t.split("?")[1];console.log(t);var n={};e.split("&").forEach(function(t,e){if(console.log(t),2==e){var i=t.split("=")[0],o=t.split("=")[1].split("#")[0],a=c()({},i,o);r()(n,a)}else{var s=t.split("=")[0],l=t.split("=")[1],u=c()({},s,l);r()(n,u)}}),console.log(n,777888),localStorage.setItem("userData",o()(n)),this.userData=n},methods:{memberRegister:function(){this.$router.push({path:"/infoInput"})},educationEnter:function(){window.open(window.location.origin+"#/authentication?eduId="+this.userData.educationId+"&projectSn="+this.userData.projectSn)},entryCodeEnter:function(){window.open(window.location.origin+"/doc/h5EntryCode/index.html")}}},u={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"home"},[n("div",{staticClass:"content-part"},[n("div",{staticClass:"part-title"},[t._v("人员登记考试系统")]),t._v(" "),n("div",{staticClass:"part-alarm"},[t._v("请先进行人员登记,再进行考试")]),t._v(" "),n("div",{staticClass:"btn member",on:{click:t.memberRegister}},[t._v("人员登记")]),t._v(" "),n("div",{staticClass:"btn education",on:{click:t.educationEnter}},[t._v("教育培训")]),t._v(" "),n("div",{staticClass:"btn entry",on:{click:t.entryCodeEnter}},[t._v("准入二维码")])])])},staticRenderFns:[]};var d=n("VU/8")(l,u,!1,function(t){n("z8+f")},"data-v-63183ce9",null);e.default=d.exports},"9bBU":function(t,e,n){n("mClu");var i=n("FeBl").Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},C4MV:function(t,e,n){t.exports={default:n("9bBU"),__esModule:!0}},bOdI:function(t,e,n){"use strict";e.__esModule=!0;var i,o=n("C4MV"),a=(i=o)&&i.__esModule?i:{default:i};e.default=function(t,e,n){return e in t?(0,a.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},mClu:function(t,e,n){var i=n("kM2E");i(i.S+i.F*!n("+E39"),"Object",{defineProperty:n("evD5").f})},"z8+f":function(t,e){}});
//# sourceMappingURL=2.47c7679f61b8e678b8e9.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
webpackJsonp([3],{"9bBU":function(t,a,s){s("mClu");var e=s("FeBl").Object;t.exports=function(t,a,s){return e.defineProperty(t,a,s)}},A4ZW:function(t,a,s){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var e=s("woOf"),i=s.n(e),r=s("bOdI"),n=s.n(r),o={data:function(){return{formData:{laboratoryName:"",laboratoryDirector:"",sampleName:"",concreteLabel:"",putStorageTime:"",standardCycleType:1,curingPeriod:""},userId:"",detailId:""}},created:function(){this.httpUrl=rootURL;var t={};window.location.href.split("?")[1].split("&").forEach(function(a,s){if(1==s){var e=a.split("=")[0],r=a.split("=")[1].split("#")[0],o=n()({},e,r);i()(t,o)}else{var l=a.split("=")[0],d=a.split("=")[1],c=n()({},l,d);i()(t,c)}}),this.userId=t.userId,this.detailId=t.id,console.log(t),this.getToken()},methods:{getToken:function(){var t=this,a=this.httpUrl+"xmgl/base/getToken",s={userId:this.userId};this.$axios.post(a,s).then(function(a){200==a.data.code?(t.token="Bearer "+a.data.result.token,t.getDetailData()):t.$toast(a.message)})},getDetailData:function(){var t=this,a=this.httpUrl+"xmgl/massReboundSampleStorageRecord/queryById",s={id:this.detailId};this.$axios.post(a,s,{headers:{Authorization:this.token}}).then(function(a){200==a.data.code?(console.log(a),t.formData=a.data.result):t.$toast(a.data.message)})}}},l={render:function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"pages"},[s("div",{staticClass:"title"},[t._v("\n 试块详情\n ")]),t._v(" "),s("div",{staticClass:"content"},[s("div",{staticClass:"form_box"},[s("div",{staticClass:"form_item"},[s("div",{staticClass:"form_label"},[t._v("\n 实验室:\n ")]),t._v(" "),s("div",{staticClass:"form_input"},[t._v("\n "+t._s(t.formData.laboratoryName)+"\n ")])]),t._v(" "),s("div",{staticClass:"form_item"},[s("div",{staticClass:"form_label"},[t._v("\n 实验负责人:\n ")]),t._v(" "),s("div",{staticClass:"form_input"},[t._v("\n "+t._s(t.formData.laboratoryDirector)+"\n ")])]),t._v(" "),s("div",{staticClass:"form_item"},[s("div",{staticClass:"form_label"},[t._v("\n 试块/组名称:\n ")]),t._v(" "),s("div",{staticClass:"form_input"},[t._v("\n "+t._s(t.formData.sampleName)+"\n ")])]),t._v(" "),s("div",{staticClass:"form_item"},[s("div",{staticClass:"form_label"},[t._v("\n 混凝土标号:\n ")]),t._v(" "),s("div",{staticClass:"form_input"},[t._v("\n "+t._s(t.formData.concreteLabel)+"\n ")])]),t._v(" "),s("div",{staticClass:"form_item"},[s("div",{staticClass:"form_label"},[t._v("\n 入库时间:\n ")]),t._v(" "),s("div",{staticClass:"form_input"},[t._v("\n "+t._s(t.formData.putStorageTime)+"\n ")])]),t._v(" "),s("div",{staticClass:"form_item"},[s("div",{staticClass:"form_label"},[t._v("\n 是否需要按照标准28天养护周期\n ")]),t._v(" "),s("div",{staticClass:"form_input"},[t._v("\n "+t._s(1==t.formData.standardCycleType?"否":2==t.formData.standardCycleType?"是":"")+"\n ")])]),t._v(" "),1==t.formData.standardCycleType?s("div",{staticClass:"form_item"},[s("div",{staticClass:"form_label"},[t._v("\n 养护周期(天)\n ")]),t._v(" "),s("div",{staticClass:"form_input"},[t._v("\n "+t._s(t.formData.curingPeriod)+"\n ")])]):t._e()])])])},staticRenderFns:[]};var d=s("VU/8")(o,l,!1,function(t){s("JsSh")},"data-v-60bdc46d",null);a.default=d.exports},C4MV:function(t,a,s){t.exports={default:s("9bBU"),__esModule:!0}},JsSh:function(t,a){},bOdI:function(t,a,s){"use strict";a.__esModule=!0;var e,i=s("C4MV"),r=(e=i)&&e.__esModule?e:{default:e};a.default=function(t,a,s){return a in t?(0,r.default)(t,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[a]=s,t}},mClu:function(t,a,s){var e=s("kM2E");e(e.S+e.F*!s("+E39"),"Object",{defineProperty:s("evD5").f})}});
//# sourceMappingURL=3.4dbc61fae8f9d7188195.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
webpackJsonp([7],{"4ml/":function(e,n){},NGWz:function(e,n){!function(e,n){const t=e.documentElement;function i(){const e=Math.min(t.getBoundingClientRect().width,768);t.style.fontSize=e/7.5+"px"}i(),n.addEventListener("resize",i)}(document,window)},NHnr:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t("7+uW"),o={render:function(){var e=this.$createElement,n=this._self._c||e;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},staticRenderFns:[]};var a=t("VU/8")({name:"App"},o,!1,function(e){t("RvT9")},null,null).exports,l=t("mtWM"),u=t.n(l),r=t("/ocq");i.a.use(r.a);var c=new r.a({routes:[{path:"/",name:"index",component:function(){return Promise.all([t.e(0),t.e(2)]).then(t.bind(null,"2NXm"))},meta:{title:"在线测试"}},{path:"/infoInput",name:"home",component:function(){return Promise.all([t.e(0),t.e(4)]).then(t.bind(null,"vkyI"))},meta:{title:"人员录入"}},{path:"/submitPage",name:"submitPage",component:function(){return Promise.all([t.e(0),t.e(1)]).then(t.bind(null,"SHNa"))},meta:{title:"人员录入"}},{path:"/blockDetails",name:"blockDetails",component:function(){return Promise.all([t.e(0),t.e(3)]).then(t.bind(null,"A4ZW"))},meta:{title:"试块详情"}},{path:"/finish",name:"finish",component:function(){return t.e(5).then(t.bind(null,"66ch"))},meta:{title:""}}]}),m=t("Fd2+"),p=(t("4ml/"),t("NGWz"),t("nrAE")),s=t.n(p);i.a.use(s.a),i.a.use(m.a),i.a.prototype.$axios=u.a,i.a.config.productionTip=!1,c.beforeEach(function(e,n,t){e.meta.title&&(document.title=e.meta.title),t()}),new i.a({el:"#app",router:c,components:{App:a},template:"<App/>"})},RvT9:function(e,n){}},["NHnr"]);
//# sourceMappingURL=app.c6b3cb802133ea2879cb.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={8:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"fbf64467c6abbbc1eb98",1:"578ea456fe8c81e20520",2:"47c7679f61b8e678b8e9",3:"4dbc61fae8f9d7188195",4:"cc318b807ecd505f3946",5:"ef7329314c5270b36976"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/doc/h5Entry/",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.68b53c7d31f6c28b0cb4.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;font-size:12px;width:100%;height:100%}nav{padding:30px}nav a{font-weight:700;color:#2c3e50}nav a.router-link-exact-active{color:#42b983}.p[data-v-431fa495]{color:red;font-size:1rem}.anniu[data-v-431fa495]{color:#fff;margin:3.3rem 2.5rem;height:4.16rem;font-size:1.2rem;background-color:#4a89ee;border-radius:2.5rem;align-items:center;line-height:4.16rem}.input[data-v-431fa495]{margin:0 20px}input[data-v-431fa495]{font-size:1.3rem;text-align:center;height:3.33rem;width:100%;border:.08rem solid #a5a5a5;border-radius:.41rem}input[data-v-431fa495]::-moz-placeholder{font-weight:700;font-size:1.2rem;color:#7b7b7b}input[data-v-431fa495]::placeholder{font-weight:700;font-size:1.2rem;color:#7b7b7b}input[data-v-431fa495]::-ms-input-placeholder{text-align:center}input[data-v-431fa495]::-webkit-input-placeholder{text-align:center}.title[data-v-431fa495]{font-size:2.2rem;font-weight:700;padding:3.5rem 0}.iconBack[data-v-431fa495]{position:absolute;left:0;font-size:2.08rem}.tou[data-v-431fa495]{margin:0}.login[data-v-431fa495]{width:100%;height:100%}.nav[data-v-431fa495]{width:100%;height:3.33rem;display:flex;align-items:center;justify-content:center}.content[data-v-431fa495]{width:100%;height:calc(100% - 3.33rem);background-size:cover;background-position:100%;background-image:url(/img/%E5%B7%A5%E5%9C%B0%E8%83%8C%E6%99%AF.8fff779f.jpg)}h1[data-v-431fa495]{font-size:1.5rem}.content[data-v-3235d4cc]{width:100%;height:calc(100% - 3.33rem)}.content[data-v-3235d4cc],.place[data-v-3235d4cc]{display:flex;align-items:center;justify-content:center}.place[data-v-3235d4cc]{width:90%;height:100%;background-image:url(/img/%E5%81%A5%E5%BA%B7.8ee36e4f.png);background-size:contain;background-repeat:no-repeat;background-position:50%;flex-direction:column}.content-up[data-v-3235d4cc]{width:100%;height:54.5%;display:flex;flex-direction:column;justify-content:flex-end}.content-down[data-v-3235d4cc]{height:45.5%}.upDiv[data-v-3235d4cc]{display:flex;flex-direction:column;justify-content:flex-end}.hear[data-v-3235d4cc]{display:flex;align-items:center;justify-content:center}.tip[data-v-3235d4cc]{font-weight:700;border-bottom:.16rem dashed gray}.text2-title[data-v-3235d4cc]{display:flex;font-size:.6rem}.text2-content[data-v-3235d4cc]{display:flex;flex-direction:column;justify-content:space-around;margin-top:0}.text2-item[data-v-3235d4cc]{float:left}ul[data-v-3235d4cc]{padding-inline-start:10px}li[data-v-3235d4cc]{text-align:left}.text2[data-v-3235d4cc]{font-weight:700}.text[data-v-3235d4cc]{display:flex;align-items:center;justify-content:center;font-size:1rem;font-weight:700}.foot[data-v-3235d4cc]{font-size:1.3rem;font-weight:700}.down-up[data-v-3235d4cc]{display:flex;justify-content:space-between}.downHear[data-v-3235d4cc]{display:flex;flex-direction:column;justify-content:space-between;font-weight:700;border-bottom:1px solid gray}.home[data-v-3235d4cc]{width:100%;height:100%}.nav[data-v-3235d4cc]{background-color:#0080ff;width:100%;height:3.33rem;display:flex;align-items:center;justify-content:center}.iconBack[data-v-3235d4cc]{left:0}.iconBack[data-v-3235d4cc],.warnToken[data-v-3235d4cc]{position:absolute;font-size:2.08rem}.tou[data-v-3235d4cc]{margin:0;color:#fff}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 KiB

View File

@ -0,0 +1,6 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>study-vue</title><script defer="defer" src="/js/chunk-vendors.ab65c396.js"></script><script defer="defer" src="/js/app.b75fb4b2.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.4309b581.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but study-vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body><style>html,body{
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
}</style></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -83,4 +83,6 @@ export const addSafeRegionApi = data => post('xmgl/hiddenDangerInspectRegion/add
export const editSafeRegionListApi = data => post('xmgl/hiddenDangerInspectRegion/edit', data);
export const deleteSafeRegionListApi = data => post('xmgl/hiddenDangerInspectRegion/delete', data);
// 准入二维码
export const entryCodeApi = data => post('xmgl/workerInfo/selectWorkerInfoByIdCard', data);

View File

@ -2994,6 +2994,19 @@ const routes2 = [
component: () =>
import("@/views/projectFront/examination/videoLearning.vue"),
},
//准入二维码-验证
// {
// path: "/entryCode",
// name: "准入二维码_验证",
// component: () =>
// import("@/views/projectFront/entryCode/myLogin.vue"),
// },
// {
// path: "/entryCodeDetail",
// name: "准入二维码_详情",
// component: () =>
// import("@/views/projectFront/entryCode/myHome.vue"),
// },
// 用户中心
{
path: "/userPage",

View File

@ -0,0 +1,543 @@
<template>
<div class="home">
<div class="nav">
<div class="iconBack"><i
class="el-icon-arrow-left"
style="color: white"
></i></div>
<div class="pageName">
<h2 class="tou">人员二维码</h2>
</div>
</div>
<div class="content">
<div
class="place"
ref="backgroundElement"
:style="{
backgroundImage: 'url(' + srcImgUrl + ')'
}"
>
<div :style="{
height: backimgheight + 'px'
}">
<div
class="
content-up"
:style="{ width: backimgwidth + 'px' }"
>
<div
class="upDiv"
:style="{ width: backimgwidth + 'px', height: backimgheightUp + 'px', }"
>
<div
class="hear"
:style="{ fontSize: backimgFontSize * 0.9 + 'px', padding: backimgFontSize * 0.7 + 'px' }"
>
{{ currentTime }}
</div>
<div class="qr">
<div
:style="{ paddingTop: backimgFontSize + 'px' }"
v-if="backimgwidth != 0"
>
<vue-qr
:text="qrUrl"
:callback="qrCallBack"
:size="qrsize"
:margin="0"
:colorDark="fontColor"
colorLight="white"
:logoScale="0.2"
:dotScale="0.7"
>
</vue-qr>
</div>
<div
class="tip"
:style="{ 'color': fontColor, fontSize: backimgFontSize * 0.9 + 'px' }"
>
<p v-if="WorkerInfo.safeScore >= 90">无风险</p>
<p v-if="WorkerInfo.safeScore >= 80 && WorkerInfo.safeScore < 90"><i
v-if="WorkerInfo.safeScore < 90"
class="el-icon-warning"
:style="{ 'color': fontColor }"
></i>低风险</p>
<p v-if="WorkerInfo.safeScore < 80"><i
v-if="WorkerInfo.safeScore < 90"
class="el-icon-warning"
:style="{ 'color': fontColor }"
></i>高风险</p>
</div>
</div>
</div>
</div>
<div class="content-down">
<div
class="downDiv"
style="text-align: center;"
:style="{ height: backimgheightDown + 'px' }"
>
<div
class="downHear"
:style="{
fontSize: backimgFontSize * 0.65 + 'px',
width: backimgwidth + 'px',
paddingTop: backimgFontSize * 0.4 + 'px',
paddingBottom: backimgFontSize * 0.4 + 'px'
}"
>
<div class="down-up">
<div class="left-downHear">姓名</div>
<div class="right-downHear">{{ WorkerInfo.workerName | hideName }}</div>
</div>
<div class="down-up">
<div class="left-downHear">证件号码</div>
<div class="right-downHear">{{ WorkerInfo.idCard | hideIdNum }}</div>
</div>
</div>
<div
class="text"
v-if="WorkerInfo.safeScore >= 90 && backimgwidth != 0"
:style="{ 'color': fontColor, paddingTop: backimgFontSize * 0.3 + 'px', height: backimgFontSize * 8.27 + 'px' }"
>
通过后台查询到您无扣分风险
</div>
<div
class="text2"
v-if="WorkerInfo.safeScore < 90 && backimgwidth != 0"
:style="{ 'color': fontColor, paddingTop: backimgFontSize * 0.3 + 'px', paddingBottom: backimgFontSize * 0.3 + 'px', height: backimgFontSize * 8.27 + 'px', width: backimgFontSize * 13.35 + 'px' }"
>
<div
class="text2-title"
:style="{ fontSize: backimgFontSize * 0.6 + 'px', }"
>通过后台查询到您有以下扣分记录</div>
<ul
class="text2-content"
v-infinite-scroll="load"
style="overflow:auto"
:style="{ fontSize: backimgFontSize * 0.5 + 'px', height: backimgFontSize * 7.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>
</ul>
</div>
<div
class="foot"
v-if="WorkerInfo.safeScore >= 90"
:style="{ 'color': fontColor, 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.4 + 'px', fontSize: backimgFontSize * 0.9 + 'px' }"
>
安全分已经低于90分
</div>
<div
class="foot"
v-if="WorkerInfo.safeScore < 80"
:style="{ 'color': fontColor, paddingTop: backimgFontSize * 0.4 + 'px', fontSize: backimgFontSize * 0.9 + 'px' }"
>
安全分已经低于80分
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import vueQr from 'vue-qr'
// import imgerr from '../assets'
export default {
name: 'myLogin',
components: {
vueQr
},
data () {
return {
//
qrsize: 230,
//
backimgwidth: 0,
//
backimgheight: 0,
//()
backimgheightUp: 0,
//()
backimgheightDown: 0,
//
backimgFontSize: 0,
//
scoreRecord: [],
//
currentTime: "",
//
name: "王富贵",
idNum: "210811196005132133",
//
srcImgUrl: "",
//
// imgUrl: ["../../assets/.png", "../../assets/.png", "../../assets/.png"],
imgUrl: {
img1: require("../../assets/健康.png"),
img2: require("../../assets/低险.png"),
img3: require("../../assets/危险.png")
},
id: "",
// url
qrUrl: "",
// base64
qrDownloadUrl: "",
//
fontColor: "green",
//
flag: true,
//
WorkerInfo: {},
}
},
// beforeCreate () {
// this.getBackgroundImageSize();
// },
created () {
this.updateTime();
setInterval(() => {
this.updateTime();
}, 1);
this.getId();
},
mounted () {
this.setColor(this.WorkerInfo.safeScore);
this.setImg(this.WorkerInfo.safeScore);
this.getScoreRecord();
setTimeout(() => {
this.getBackgroundImageSize();
}, 1000); // 1
},
methods: {
getBackgroundImageSize () {
var backgroundImage = new Image();
var imageUrl = getComputedStyle(document.querySelector('.place')).backgroundImage.slice(4, -1).replace(/['"]/g, "");
backgroundImage.src = imageUrl;
var self = this; // thisself
backgroundImage.onload = function () {
var containerWidth = document.querySelector('.place').clientWidth;
var containerHeight = document.querySelector('.place').clientHeight;
var imageWidth = backgroundImage.width;
var imageHeight = backgroundImage.height;
console.log("containerWidth :" + containerWidth);
console.log("containerHeight :" + containerHeight);
console.log("imageWidth :" + imageWidth);
console.log("imageHeight :" + imageHeight);
var scaleX = containerWidth / imageWidth;
var scaleY = containerHeight / imageHeight;
var displayWidth, displayHeight;
if (scaleX < scaleY) {
displayWidth = containerWidth;
displayHeight = imageHeight * scaleX;
} else {
displayWidth = imageWidth * scaleY;
displayHeight = containerHeight;
}
self.backimgwidth = displayWidth * 0.8;
self.backimgheight = displayHeight;
self.qrsize = displayWidth * 0.6;
self.backimgheightUp = self.backimgheight * (53 / 100);
self.backimgheightDown = self.backimgheight * (47 / 100);
self.backimgFontSize = self.qrsize * 0.1;
console.log("处理过的背景图宽度: " + self.backimgwidth);
console.log("处理过的背景图高度: " + self.backimgheight);
console.log("二维码大小: " + self.qrsize);
console.log("动态字体大小: " + self.backimgFontSize);
}
},
async getScoreRecord () {
const params = {
workerId: this.id,
};
const { data: res } = await this.$http.get('/xmgl/xzDeductScoreRecord/list', params);
console.log(res);
if (res.success == true && res.result.length != 0) {
this.scoreRecord = res.result;
console.log(this.scoreRecord);
}
},
load () { },
updateTime () {
const date = new Date();
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
this.currentTime = `${year}-${month}-${day} ${hours}:${minutes}`;
},
setImg (fenshu) {
if (fenshu >= 90) {
this.srcImgUrl = this.imgUrl.img1;
} else if (fenshu >= 80 && fenshu < 90) {
this.srcImgUrl = this.imgUrl.img2;
} else if (fenshu < 80) {
this.srcImgUrl = this.imgUrl.img3;
}
},
setColor (fenshu) {
if (fenshu >= 90) {
this.fontColor = "green";
} else if (fenshu >= 80 && fenshu < 90) {
this.fontColor = "rgb(255, 230, 0)";
} else if (fenshu < 80) {
this.fontColor = "red";
}
},
getId () {
// console.log(this.$route.params);
this.WorkerInfo = this.$route.params.WorkerInfo;
console.log(this.WorkerInfo);
this.qrUrl = this.WorkerInfo.id;
},
//
qrCallBack (qrUrl) {
this.qrDownloadUrl = qrUrl;
},
//
downloadQrcode () {
let a = document.createElement('a');
a.download = '我的二维码';
a.href = this.qrDownloadUrl;
a.click();
},
//
handleQrCode (type) {
switch (type) {
case 1:
this.fontColor = 'green'
break
case 2:
this.fontColor = 'orange'
break
case 3:
this.fontColor = 'red'
break
}
},
},
filters: {
//
hideIdNum (val) {
return `${val.substring(0, 3)}*************${val.substring(val.length - 2)}`
},
//
hideName (val) {
return `${val.substring(0, 1)}**`
}
}
}
</script>
<style scoped>
.content {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: calc(100% - 3.33rem);
}
.place {
width: 90%;
height: 100%;
background-image: url(../../assets/健康.png);
background-size: contain;
background-repeat: no-repeat;
background-position: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.content-up {
width: 100%;
height: 54.5%;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.content-down {
height: 45.5%;
}
.upDiv {
/* background-color: yellow; */
/* position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%); */
display: flex;
flex-direction: column;
justify-content: flex-end;
/* height: 500px; */
}
.hear {
display: flex;
align-items: center;
justify-content: center;
}
.qr {}
.tip {
font-weight: bold;
border-bottom: 0.16rem dashed gray;
}
.text2-title {
display: flex;
font-size: 0.6rem;
}
.text2-content {
display: flex;
flex-direction: column;
justify-content: space-around;
margin-top: 0;
}
.text2-item {
/* display: flex;
padding-left: 0; */
float: left;
/* 设置元素浮动 */
}
ul {
padding-inline-start: 10px;
}
li {
text-align: left;
/* 保持文本从左边开始 */
}
.text2 {
/* height: 40%; */
/* line-height: 1rem; */
/* font-size: 0.5rem; */
font-weight: bold;
}
.text {
/* height: 40%; */
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
font-weight: bold;
}
.foot {
font-size: 1.3rem;
font-weight: bold;
}
.down-up {
display: flex;
justify-content: space-between;
}
.downDiv {
/* height: 100%; */
}
.downHear {
display: flex;
flex-direction: column;
justify-content: space-between;
/* height: 15%; */
font-weight: bold;
border-bottom: 1px solid gray;
}
.home {
width: 100%;
height: 100%;
}
.nav {
background-color: rgb(0, 128, 255);
width: 100%;
height: 3.33rem;
display: flex;
align-items: center;
justify-content: center;
}
.iconBack {
position: absolute;
left: 0;
font-size: 2.08rem;
}
.warnToken {
position: absolute;
font-size: 2.08rem;
}
.pageName {}
.tou {
margin: 0;
color: white;
}
</style>

View File

@ -0,0 +1,191 @@
<template>
<div class="login">
<div class="nav">
<div class="iconBack"><i class="el-icon-arrow-left"></i></div>
<div class="pageName">
<h2 class="tou">准入二维码</h2>
</div>
</div>
<div class="content">
<div class="title">
<p>准入二维码</p>
</div>
<div class="input">
<input
type="text"
placeholder="请输入身份证号码"
v-model="value"
maxlength="18"
>
</div>
<div
class="anniu"
@click="toQR"
>
查看二维码
</div>
<div class="p">
<p v-if="!isValidIdCard">请输入有效的身份证号码!</p>
</div>
<div class="p">
<p v-if="!iscunzai">身份证号码不能为空!</p>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'myLogin',
data () {
return {
value: "",
isValidIdCard: true,
iscunzai: true,
projectSn: "",
userId: "",
id: "",
}
},
mounted () {
this.getQuery();
},
methods: {
getQuery () {
this.projectSn = this.$route.query.projectSn;
this.userId = this.$route.query.userId;
},
async selectWorkerInfo () {
const params = {
// projectSn: this.projectSn,
idCard: this.value
};
// const idCard = this.value;
const { data: res } = await this.$http.post('/xmgl/workerInfo/selectWorkerInfoByIdCard', params);
console.log(res);
if (res.success == true) {
this.id = res.result.id;
console.log("this.id:" + this.id);
this.$router.push({ name: 'home', params: { WorkerInfo: res.result } })
} else {
console.log("没有查到信息");
}
},
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]$/;
//
this.isValidIdCard = idCardRegex.test(this.value);
},
toQR () {
if (this.value != null && this.value != "") {
this.iscunzai = true
this.validateIdCard();
if (this.isValidIdCard) {
console.log("身份证号:" + this.value);
this.selectWorkerInfo();
}
} else {
this.isValidIdCard = true
this.iscunzai = false
}
},
}
}
</script>
<style scoped>
.p {
color: red;
font-size: 1rem;
}
.anniu {
color: white;
margin: 3.3rem 2.5rem;
height: 4.16rem;
font-size: 1.2rem;
background-color: rgb(74, 137, 238);
border-radius: 2.5rem;
align-items: center;
line-height: 4.16rem;
}
.input {
margin: 0 20px;
}
input {
font-size: 1.3rem;
text-align: center;
height: 3.33rem;
width: 100%;
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::-ms-input-placeholder {
text-align: center;
}
input::-webkit-input-placeholder {
text-align: center;
}
.title {
font-size: 2.2rem;
font-weight: bold;
padding: 3.5rem 0;
}
.iconBack {
position: absolute;
left: 0;
font-size: 2.08rem;
}
.pageName {}
.tou {
margin: 0;
}
.login {
width: 100%;
height: 100%;
}
.nav {
width: 100%;
height: 3.33rem;
display: flex;
align-items: center;
justify-content: center;
}
.content {
width: 100%;
height: calc(100% - 3.33rem);
background-size: cover;
background-position: right;
background-image: url("../../assets/工地背景.jpg");
}
h1 {
font-size: 1.5rem;
}
</style>