mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 00:40:30 +08:00
4f79e10bd6
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
1 line
6.8 KiB
JavaScript
1 line
6.8 KiB
JavaScript
webpackJsonp([176],{"9Y3m":function(t,n,i){var e=i("WBnG");"string"==typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);i("rjj0")("509eb7f8",e,!0)},WBnG:function(t,n,i){(t.exports=i("FZ+f")(!1)).push([t.i,"\n@media screen and (max-width: 1590px) {\n.up-box[data-v-4bf7c7d6] {\n width: 386px;\n}\n}\n@media screen and (min-width: 1590px) {\n.up-box[data-v-4bf7c7d6] {\n width: 486px;\n}\n}\n.card-box[data-v-4bf7c7d6] {\n width: 486px;\n}\n.avatar[data-v-4bf7c7d6] {\n max-width: 486px;\n}\n.none-data[data-v-4bf7c7d6] {\n font-size: 16px;\n color: #74777c;\n line-height: 308px;\n}\n.card-box[data-v-4bf7c7d6] {\n height: 335px;\n display: inline-block;\n margin-top: 80px;\n text-align: center;\n position: relative;\n background: #f4f5f9;\n}\n.imageBox[data-v-4bf7c7d6] {\n position: absolute;\n top: 0;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n left: 50%;\n top: 50%;\n}\n.frame[data-v-4bf7c7d6] {\n border: 2px solid #3399ff;\n position: absolute;\n display: none;\n}\n.avatar-uploader .el-upload[data-v-4bf7c7d6] {\n border: 1px dashed #aaa;\n border-radius: 6px;\n cursor: pointer;\n position: relative;\n overflow: hidden;\n}\n.avatar-uploader .el-upload[data-v-4bf7c7d6]:hover {\n border-color: #409eff;\n}\n.avatar-uploader-icon[data-v-4bf7c7d6] {\n border: 1px dashed #aaa;\n font-size: 28px;\n color: #8c939d;\n width: 178px;\n height: 178px;\n line-height: 178px;\n text-align: center;\n display: none;\n}\n.up-box[data-v-4bf7c7d6] {\n vertical-align: middle;\n text-align: center;\n height: 335px;\n display: inline-block;\n float: left;\n margin-right: 80px;\n margin-top: 80px;\n margin-bottom: 74px;\n display: table-cell;\n background: #f4f5f9;\n}\n.avatar[data-v-4bf7c7d6] {\n max-height: 335px;\n vertical-align: middle;\n text-align: center;\n margin-top: -2px;\n /* position: absolute; */\n}\n.card-info[data-v-4bf7c7d6] {\n position: relative;\n height: 335px;\n margin: 0 auto;\n width: 486px;\n}\n.img-box[data-v-4bf7c7d6] {\n width: auto;\n position: relative;\n}\n.point[data-v-4bf7c7d6] {\n color: #13C39C;\n height: 2px;\n line-height: 2px;\n width: 2px;\n background: #fff;\n position: absolute;\n}\n.simulator-box[data-v-4bf7c7d6] {\n position: relative;\n min-height: 280px;\n width: 1500px;\n}\n[data-v-4bf7c7d6] .el-upload--picture-card {\n width: 170px;\n height: 170px;\n}\n[data-v-4bf7c7d6] .el-upload-list--picture-card .el-upload-list__item {\n width: 170px;\n height: 170px;\n text-align: center;\n vertical-align: middle;\n}\n[data-v-4bf7c7d6] .el-upload-list--picture-card .el-upload-list__item-thumbnail {\n max-width: 170px;\n max-height: 170px;\n width: auto;\n height: auto;\n}\n.default-frame[data-v-4bf7c7d6] {\n height: 147px;\n width: 110px;\n margin-bottom: 13px;\n margin-right: 24px;\n background: url("+i("gpWv")+") center no-repeat;\n}\n.card-avatar[data-v-4bf7c7d6] {\n display: inline-block;\n position: absolute;\n right: 58px;\n top: 45px;\n}\n.avatar-title[data-v-4bf7c7d6] {\n display: inline-block;\n position: absolute;\n right: 132px;\n top: 10px;\n}\n.card-avatar img[data-v-4bf7c7d6] {\n max-height: 100px;\n max-width: 100px;\n}\n",""])},qCCE:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var e=i("+giH"),a=i("MZdq"),o=(i("9Zzp"),{data:function(){return{tips:"请上传人脸图片",formatTips:"图片支持jpg、jpeg、png、bmp、jfif 格式,像素4000*3000以内,最大支持3MB",imageUrl:"",ajax:e.a,responseText:"",faceInfo:{},isShowInfo:!1,proportion:"",boxWidth:"",err:"",imgSrc:"",keyPointList:[],scale:1,imgWidth:486,imgHeight:335}},mounted:function(){var t=this,n=this;window.onresize=function(){n.boxWidth=t.$refs.imgBox.offsetWidth}},beforeDestroy:function(){window.onresize=null},methods:{upload:function(t,n){var i=this,e=this;e.imgWidth=486,e.imgHeight=335,this.imgSrc=n;var o={channelCode:"system",image:t,mode:"true"};a.b.facialDetect(o).then(function(t){if(i.err=t.message,t.success&&t.data){var a=new Image;a.src=n,a.onload=function(){e.scale=a.height/335,e.imgWidth=a.width/e.scale,e.imgWidth>486&&(e.scale=a.width/486,e.imgWidth=486,e.imgHeight=a.height/e.scale),e.responseText=t,e.isShowInfo=!0,e.faceInfo=t.data.faces[0],e.keyPointList=t.data.faces[0].keypt},e.change()}else i.$nextTick(function(){i.isShowInfo=!1,i.$message.error(t.message),i.responseText=t})}).catch(function(t){i.$message.error(i.err)})},change:function(){var t=this,n=new Image;n.src=this.imageUrl,this.boxWidth=this.$refs.imgBox.offsetWidth,n.onload=function(){var i=n.height>=335?335:n.height;n.height<=n.width&&n.height<335||n.height<=n.width&&n.height<335&&document.body.clientWidth<1580&&n.width<386||n.height<=n.width&&n.height<335&&document.body.clientWidth>1580&&n.width<486?t.proportion=1:t.proportion=n.height>n.width?n.height/i:n.width/t.boxWidth,t.$refs.frame.style.display="inline-block",t.$refs.frame.style.width=t.faceInfo.width/t.proportion+"px",t.$refs.frame.style.height=t.faceInfo.height/t.proportion+"px",t.$refs.frame.style.top=t.faceInfo.y/t.proportion+"px",t.$refs.frame.style.left=t.faceInfo.x/t.proportion+"px"}}},watch:{boxWidth:function(t,n){this.change()}},components:{responseText:i("COE1").a}}),d={render:function(){var t=this,n=t.$createElement,i=t._self._c||n;return i("div",{staticClass:"app-container"},[i("el-card",{attrs:{shadow:"hover"}},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",{staticStyle:{"font-size":"14px"}},[t._v("通过上传的人脸图片,计算人脸轮廓的点,包括眉毛、眼睛、鼻子、嘴巴、脸型轮廓、眼珠或瞳孔。")])]),t._v(" "),i("div",{staticClass:"simulator-box"},[i("div",{ref:"imgBox",staticClass:"up-box",staticStyle:{position:"relative"}},[i("img-upload",{attrs:{buttonText:t.上传图片,tips:t.tips,formatTip:t.formatTips,types:t.types,fileSize:3},on:{upload:t.upload}})],1),t._v(" "),i("div",{staticClass:"card-box"},[t.isShowInfo?i("div",{staticClass:"card-info",style:{paddingLeft:(486-t.imgWidth)/2+"px",paddingRight:(486-t.imgWidth)/2+"px",paddingTop:(335-t.imgHeight)/2+"px",paddingBottom:(335-t.imgHeight)/2+"px"}},[i("div",{staticClass:"img-box"},[i("img",{staticClass:"avatar",attrs:{src:t.imgSrc}}),t._v(" "),t._l(t.keyPointList,function(n,e){return i("div",{key:e,staticClass:"point",style:{left:n.x/t.scale+"px",top:n.y/t.scale+"px"}})})],2)]):t._e(),t._v(" "),t.isShowInfo?t._e():i("span",{staticClass:"none-data"},[t._v("暂无数据")]),t._v(" "),i("br"),t._v(" "),i("el-row",{staticStyle:{position:"absolute",top:"-50px",left:"0px"}},[i("span",{staticStyle:{"padding-left":"5px","border-left":"4px solid #3399FF",display:"inline-block",height:"18px","line-height":"18px","font-size":"14px"}},[t._v("识别结果")])])],1)])]),t._v(" "),i("response-text",{attrs:{responseText:t.responseText}})],1)},staticRenderFns:[]};var s=i("VU/8")(o,d,!1,function(t){i("9Y3m")},"data-v-4bf7c7d6",null);n.default=s.exports}}); |