324 lines
10 KiB
HTML
324 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>消防点位</title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
|
|
<link rel="stylesheet" type="text/css" href="../../assets/css/weui.css" />
|
|
<link rel="stylesheet" type="text/css" href="../../assets/css/weuix.css" />
|
|
|
|
<!-- vue -->
|
|
<script src="../../../bi/js/vue.js"></script>
|
|
<script src="../../../bi/js/flexible.js"></script>
|
|
<!--全局配置-->
|
|
<script src="../../../config.js"></script>
|
|
</head>
|
|
<body ontouchstart >
|
|
<div id="app">
|
|
<div class="page-bg">
|
|
<div class="tab-box">
|
|
<div class="weui-tab" id="t4">
|
|
<div class="weui-tab-nav">
|
|
<a href="javascript:" @click="switchoverTab('2')" :class="tab=='2'?' bg-green':''" class="weui-navbar__item weui-nav-green">点位信息</a>
|
|
<a href="javascript:" @click="switchoverTab('1')" :class="tab=='1'?' bg-green':''" class="weui-navbar__item weui-nav-green">检查记录</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="weui-search-bar" v-show="tab=='1'">
|
|
<input type="search" v-model="KEYWORDS" class="search-input" style="height: 30px" id='search' placeholder='请输入关键字...' />
|
|
<div>
|
|
<button class="weui-btn weui-btn_primary" style="height: 32px;font-size: 0.4rem;" v-on:click="getList">
|
|
<i class="icon icon-4" ></i>搜索</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="weui-news" v-show="tab=='1'">
|
|
<ul class="weui-news-list">
|
|
<template v-for="(data,index) in list">
|
|
<li class="weui-news-item" v-on:click="goToDetail(data.EQUIPMENT_POINT_ID,data.FIRE_RECORD_ID,data.FIRE_POINT_ID)">
|
|
<div class="weui-news-inner">
|
|
<div class="weui-news-inners">
|
|
<div class="weui-news-text">
|
|
<div class="weui-news-title">检查清单名:{{data.FIRE_CHECK_STANDARD_NAME}}</div>
|
|
</div>
|
|
<div class="wui-news-info">
|
|
<div class="wui-subinfo">清单类型:{{data.dicName}}</div>
|
|
<div class="wui-subinfo">检查区域:{{data.FIRE_REGION_NAME}}</div>
|
|
<div class="wui-subinfo">检查点位:{{data.FIRE_POINT_NAME}}</div>
|
|
<div v-if="data.FIRE_CHECK_TYPE != 'checkPeriod0001'" class="wui-subinfo">检查周期:{{data.PERIODSTART.split(" ")[0]}}~{{data.PERIODEND.split(" ")[0]}}</div>
|
|
<div v-else class="wui-subinfo">检查周期:{{data.PERIODSTART.split(" ")[0]}}</div>
|
|
<div class="wui-subinfo">检查时间:{{data.CHECK_TIME}}</div>
|
|
<div class="wui-subinfo">检查人:{{data.USERNAME}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="weui-cell__ft"></div>
|
|
</div>
|
|
</li>
|
|
</template>
|
|
</ul>
|
|
</div>
|
|
<div class="dy-card" v-show="tab=='2'">
|
|
<div class="dy-card-title-now">
|
|
<span>{{ '消防区域:' + pd.FIRE_REGION_NAME }}</span><br>
|
|
<span>{{ '消防点位:' + pd.FIRE_POINT_NAME }}</span>
|
|
</div>
|
|
<div class="dy-card-content" v-for="(item,index) in deviceList">
|
|
<div class="dy-card-content-item" >
|
|
<div class="title">
|
|
<span class="l"></span>
|
|
<span>消防设备</span>
|
|
</div>
|
|
<div class="content">
|
|
<ul>
|
|
<li>{{'消防设备类型: ' + item.FIRE_DEVICE_TYPE_NAME}}</li>
|
|
<li>{{'消防设备编码: ' + item.FIRE_DEVICE_CODE}}</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="dy-card-content-item">
|
|
<div class="title">
|
|
<span class="l"></span>
|
|
<span>消防设备检查标准</span>
|
|
</div>
|
|
<div class="content">
|
|
<ul>
|
|
<li v-for="(item,index) in item.FIRE_CHECK_STANDARD_ITEM">{{index+1}}. {{item}}</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="dy-card-content-item">
|
|
<div class="title">
|
|
<span class="l"></span>
|
|
<span>责任部门</span>
|
|
</div>
|
|
<div class="name">
|
|
<span>{{pd.DEPARTMENT_NAME}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="dy-card-content">
|
|
<div v-if="images.length > 0 " class="dy-card-content-item">
|
|
<div class="title">
|
|
<span class="l"></span>
|
|
<span>点位检查合格标准照片</span>
|
|
</div>
|
|
<div class="name">
|
|
<div v-for="(image, index) in images" :key="index">
|
|
<img style="width: auto; height: auto; max-width: 100%; max-height: 100%;" :src="config.fileUrl + image.FILEPATH" />
|
|
<div>
|
|
</div>
|
|
</div>
|
|
<div style="border-bottom: 1px solid #eee;margin-top: 10px;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
|
|
<script type="text/javascript" src="../../../bi/js/pre-loader.js"></script>
|
|
<script src="../../../bi/js/sweetalert.min.js"></script>
|
|
<script src="../../assets/js/vant.min.js"></script>
|
|
<script type="text/javascript">
|
|
var vm = new Vue({
|
|
el: '#app',
|
|
data:{
|
|
config:config,
|
|
list:[],//返回数据
|
|
images: [],
|
|
page:1,//分页参数--页数
|
|
rows:1000,//分页参数--每页数据条数
|
|
totalCount:0,//分页参数--初始化页数
|
|
isEnd:false,//防止多次刷新
|
|
totalPage:0,//分页参数--分页数量
|
|
KEYWORDS : "",
|
|
loading:false, //加载状态
|
|
IDENTIFICATIONPARTS_ID:"",
|
|
FIRE_POINT_ID: '',
|
|
tab:'2',//tab签
|
|
deviceStandardList: [],
|
|
deviceList: [],
|
|
pd:[],
|
|
LEVELID:'',
|
|
ACCIDENTS_NAME:"",
|
|
},
|
|
|
|
methods: {
|
|
//初始执行
|
|
init() {
|
|
this.IDENTIFICATIONPARTS_ID =this.getUrlKey('id');
|
|
this.FIRE_POINT_ID =this.getUrlKey('id');
|
|
this.LEVELID=this.getUrlKey('LEVELID');
|
|
//复选框控制全选,全不选
|
|
$('#zcheckbox').click(function(){
|
|
if($(this).is(':checked')){
|
|
$("input[name='ids']").click();
|
|
}else{
|
|
$("input[name='ids']").attr("checked", false);
|
|
}
|
|
});
|
|
this.getList();
|
|
this.getData();
|
|
this.getPointQualifiedPhotos();
|
|
},
|
|
getList: function(){
|
|
var _this = this;
|
|
_this.loading = true;
|
|
$.ajax({
|
|
xhrFields: {
|
|
withCredentials: true
|
|
},
|
|
type: "POST",
|
|
url: config.httpurlWaiwang +'/app/fireRecordManger/getCheckRecordByPid',
|
|
dataType: 'json',
|
|
data: {
|
|
FIRE_POINT_ID: _this.FIRE_POINT_ID,
|
|
KEYWORDS: _this.KEYWORDS
|
|
},
|
|
success: function(data){
|
|
vm.loading = false;
|
|
if("success" == data.result){
|
|
vm.list = data.varList;
|
|
}
|
|
}
|
|
})
|
|
},
|
|
getData: function(){
|
|
var _this = this;
|
|
_this.loading = true;
|
|
$.ajax({
|
|
xhrFields: {
|
|
withCredentials: true
|
|
},
|
|
type: "POST",
|
|
url: config.httpurlWaiwang +'/app/fireRecordManger/getPointInfoADeviceByPid' ,
|
|
dataType: 'json',
|
|
data: {
|
|
FIRE_POINT_ID: _this.FIRE_POINT_ID
|
|
},
|
|
success: function(data){
|
|
vm.loading = false;
|
|
if("success" == data.result){
|
|
vm.pd = data.pointInfo
|
|
if (data.deviceList.length > 0) {
|
|
vm.deviceList = data.deviceList
|
|
}
|
|
}
|
|
}
|
|
})
|
|
//
|
|
// var _this = this;
|
|
// _this.loading = true;
|
|
// $.ajax({
|
|
// xhrFields: {
|
|
// withCredentials: true
|
|
// },
|
|
// type: "POST",
|
|
// url: config.httpurlWaiwang +'/app/identificationparts/goEdit' ,
|
|
// dataType: 'json',
|
|
// data: {
|
|
// IDENTIFICATIONPARTS_ID: _this.IDENTIFICATIONPARTS_ID,
|
|
// },
|
|
// success: function(data){
|
|
// vm.loading = false;
|
|
// if("success" == data.result){
|
|
// vm.pd = data.pd;
|
|
// }
|
|
// }
|
|
// })
|
|
},
|
|
getPointQualifiedPhotos: function(){
|
|
var _this = this;
|
|
_this.loading = true;
|
|
$.ajax({
|
|
xhrFields: {
|
|
withCredentials: true
|
|
},
|
|
type: "POST",
|
|
url: config.httpurlWaiwang +'/app/fireRecordManger/getPointQualifiedPhotos' ,
|
|
dataType: 'json',
|
|
data: {
|
|
FIRE_POINT_ID: _this.FIRE_POINT_ID
|
|
},
|
|
success: function(data){
|
|
vm.loading = false;
|
|
if("success" == data.result){
|
|
if (data.varList.length > 0) {
|
|
vm.images = data.varList
|
|
}
|
|
}
|
|
}
|
|
})
|
|
//
|
|
// var _this = this;
|
|
// _this.loading = true;
|
|
// $.ajax({
|
|
// xhrFields: {
|
|
// withCredentials: true
|
|
// },
|
|
// type: "POST",
|
|
// url: config.httpurlWaiwang +'/app/identificationparts/goEdit' ,
|
|
// dataType: 'json',
|
|
// data: {
|
|
// IDENTIFICATIONPARTS_ID: _this.IDENTIFICATIONPARTS_ID,
|
|
// },
|
|
// success: function(data){
|
|
// vm.loading = false;
|
|
// if("success" == data.result){
|
|
// vm.pd = data.pd;
|
|
// }
|
|
// }
|
|
// })
|
|
},
|
|
|
|
goToDetail: function (EQUIPMENT_POINT_ID, FIRE_RECORD_ID, FIRE_POINT_ID) {
|
|
window.location.href = './point-info.html?RID='+FIRE_RECORD_ID+'&PID='+FIRE_POINT_ID+'&EPID='+EQUIPMENT_POINT_ID;
|
|
},
|
|
//根据url参数名称获取参数值
|
|
getUrlKey: function(name) {
|
|
return decodeURIComponent(
|
|
(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [,
|
|
""
|
|
])[1].replace(/\+/g, '%20')) || null;
|
|
},
|
|
switchoverTab: function (tabNum){
|
|
this.tab = tabNum;
|
|
}
|
|
},
|
|
mounted(){
|
|
this.init();
|
|
}
|
|
})
|
|
|
|
function back(e) {
|
|
window.history.go(-1);
|
|
}
|
|
</script>
|
|
|
|
</html>
|
|
<style type="text/css">
|
|
.search-input {
|
|
padding-left: 10px;
|
|
}
|
|
.my-swipe .van-swipe-item {
|
|
color: #fff;
|
|
height: 300px;
|
|
}
|
|
.wui-news-info{
|
|
padding-bottom: 0.4rem;
|
|
}
|
|
.wui-subinfo{
|
|
font-size: 0.4rem;
|
|
color: #999;
|
|
}
|
|
.weui-search-bar .weui-btn{
|
|
text-align: center;
|
|
width:110px;
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 0.65rem;
|
|
padding: 0rem 0.8rem;
|
|
line-height:2.26;
|
|
}
|
|
</style>
|