1 Star 0 Fork 0

高瑞山/pda-h5

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
LabResultDetailFragment.html 3.97 KB
一键复制 编辑 原始数据 按行查看 历史
高瑞山 提交于 2023-05-15 10:06 . 中文字符串传参问题
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script>
document.getElementsByTagName('html')[0].style.fontSize = '15px'
</script>
<!-- 引入样式 -->
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/icon.css">
<link rel="stylesheet" href="./css/mint.min.css">
<!-- 先引入 Vue -->
<script src="js/vue.min.js"></script>
<!-- 引入组件库 -->
<script src="js/mint.min.js"></script>
<!--web请求-->
<script src="js/webservice.js"></script>
<title> </title>
</head>
<body>
<div class="bgcolor" id="app">
<div v-for="(itm,idx) in resultDetail" :key="itm.oeordId"
class="bgwhite padding5 marginT2">
<div class="flexHL">
<div v-if="itm.resultAbFlag == 'H'" class="height30 width30 marginT5 radius20 base64_ic_highvalue"></div>
<div v-if="itm.resultAbFlag == 'L'" class="height30 width30 marginT5 radius20 base64_ic_lowvalue"></div>
<div v-if="itm.resultAbFlag == 'M'||itm.resultAbFlag == 'A'" class="height30 width30 marginT5 radius20 base64_ic_positive"></div>
<div class="font17 fontBold marginT5 marginL10">{{itm.resultName}}</div>
<div class="flexHR flexG">
<div :class="getClassColor(itm.resultAbFlag)">{{itm.resultValue}}</div>
</div>
</div>
<div class="flexHR matchW marginT5">
<div class="font12 gray2">{{itm.resultRefRanges}}</div>
</div>
</div>
</div>
</body>
<script>
new Vue({
el: '#app',
data: {
oeordId:"",
orderName:"",
resultDetail:[],
},
mounted() {
//将要给原生调用的方法挂载到 window 上面
window.Config = this.Config
window.getScanMsg = this.getScanMsg
window.GetLabResult = this.GetLabResult
this.oeordId = this.GetQueryString('oeordId');
this.orderName = this.GetQueryString('orderName');
console.log(this.oeordId +" "+this.orderName)
document.title = this.orderName ; //网页改变title
this.Config()
this.initData()
},
methods: {
//获取配置
Config() {
var content = JSON.stringify({
title: this.orderName,
})
if (window.android) {
window.android.callAndroid(content, "config");
}
},
//获取扫码
getScanMsg(scanInfo) {
this.$toast(scanInfo)
},
GetLabResult(data) {
Http.hideLoading(this)
this.resultDetail=data.resultDetail
},
initData() {
var params = {
oeoreId: this.oeordId,
}
Http.showLoading(this)
Http.postPlus("GetLabResult", params, (data) => {
console.log(data)
this.GetLabResult(data);
})
},
GetQueryString(name) {
console.log(name);
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) {
if(r[2].indexOf('%') > -1) {
var rStr= r[2].replace(/%/g,'%25')
return decodeURI(rStr);
}
return decodeURI(r[2]);
}
return null;
},
getClassColor(sta) {
if (sta == "H"||sta == "L"||sta == "M"||sta == "A") {
return "padding5 radiusTRBL5 center font15 marginR10 red"
}
return "padding5 radiusTRBL5 center font15 marginR10"
}
}
})
</script>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/gaoruishan/pda-h5.git
git@gitee.com:gaoruishan/pda-h5.git
gaoruishan
pda-h5
pda-h5
master

搜索帮助