1 Star 0 Fork 0

高瑞山/pda-h5

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
LabResultListFragment.html 4.95 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="(itm2,idx2) in labOrderList" :key="itm2.oeordId"
@click="onItemClick(itm2.oeordId,itm2.orderName)"
class="bgwhite padding8 margin5 radius5">
<div class="flexHL">
<div class="font12 width40 marginT5 radius20 center" :style="getStaColor(itm2.resultStatus)">
{{itm2.resultStatus == "Y" ? "已出" : "未出"}}
</div>
<div class="flexHR flexG">
<div class="padding5 radiusTRBL5 center font14 gray"
>{{itm2.resultDateTime}}
</div>
</div>
</div>
<div class="flexVL marginT5">
<div class="font17 fontBold marginT5">{{itm2.orderName}}</div>
<div class="font14 gray marginT5">{{"标本号:" + itm2.labNo}}</div>
<div class="line marginTB5"></div>
<div :class="getStaClass(itm2.resultStatus)">查看检验结果</div>
</div>
</div>
<div v-if="emptyFlag" class="marginT50 flexHC">暂无检验项目</div>
</div>
</body>
<script>
new Vue({
el: '#app',
data: {
episodeId: "",
startDate: "",
endDate: "",
patmsg: "",
labOrderList: [],
emptyFlag: false,
},
mounted() {
//将要给原生调用的方法挂载到 window 上面
window.Config = this.Config
window.getScanMsg = this.getScanMsg
window.GetLabOrdList = this.GetLabOrdList
this.episodeId = this.GetQueryString('episodeId');
this.patmsg = this.GetQueryString('patmsg');
console.log(this.episodeId, this.patmsg);
document.title = this.episodeId + ' ' + this.patmsg; //网页改变title
this.Config()
this.initData()
},
methods: {
//获取配置
Config() {
var content = JSON.stringify({
title: this.patmsg,
hideToolBar: "",
toolBar: {
show: "1",
type: "text",
text: "确定",
image: "",
method: "save"
}
})
if (window.android) {
window.android.callAndroid(content, "config");
}
},
//获取扫码
getScanMsg(scanInfo) {
this.$toast(scanInfo)
},
GetLabOrdList(data) {
Http.hideLoading(this)
this.labOrderList = data.labOrderList
this.emptyFlag = this.labOrderList.length === 0
},
initData() {
var params = {
episodeId: this.episodeId,
startDate: this.startDate,
endDate: this.endDate,
}
Http.showLoading(this)
Http.postPlus("GetLabOrdList", params, (data) => {
console.log(data)
this.GetLabOrdList(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;
},
getStaColor(sta) {
if (sta === "Y") {
return 'background: #B8DA64; color:white'
}
return 'background: #FFC33C; color:white'
},
getStaClass(sta) {
if (sta === "Y") {
return "matchW center font13 colorblue"
}
return "matchW center font13 gray"
},
onItemClick(oeordId, orderName) {
window.location.href = "LabResultDetailFragment.html?oeordId=" + oeordId + "&orderName=" + orderName
}
}
})
</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

搜索帮助

D67c1975 1850385 1daf7b77 1850385