main
parent
611055b051
commit
f423396a8f
|
@ -11,7 +11,6 @@
|
|||
"pages/map/map",
|
||||
"pages/shebeiguanli-map/jixiedingwei",
|
||||
"pages/deepExcavation/index",
|
||||
"pages/Information-review/index",
|
||||
"pages/newAddPage/safetyManagement/index",
|
||||
"pages/learn-page/index",
|
||||
"pages/winter-training/index",
|
||||
|
@ -31,7 +30,8 @@
|
|||
"pages/construction-details/index",
|
||||
"pages/measures/index",
|
||||
"pages/measures-Chakan/index",
|
||||
"pages/updatePassword/updatePassword"
|
||||
"pages/updatePassword/updatePassword",
|
||||
"pages/safety_manage/index"
|
||||
],
|
||||
"subpackages": [
|
||||
{
|
||||
|
@ -103,7 +103,10 @@
|
|||
"project_checkDetection/list/index",
|
||||
"project_checkDetection/add/index",
|
||||
"project_checkDetection/info/index",
|
||||
"project_checkDetection/check/index"
|
||||
"project_checkDetection/check/index",
|
||||
"project_insurance/add/index",
|
||||
"project_insurance/info/index",
|
||||
"project_insurance/list/index"
|
||||
],
|
||||
"independent": false
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ page{
|
|||
background: #191d28;
|
||||
color: #ffffff;
|
||||
font-size: 30rpx;
|
||||
height:100vh;
|
||||
}
|
||||
|
||||
/* 自定义顶部样式 */
|
||||
|
@ -53,6 +54,9 @@ page{
|
|||
.max_content{
|
||||
padding: 166rpx 0 180rpx;
|
||||
}
|
||||
.max_content_scroll{
|
||||
padding: 166rpx 0 180rpx;
|
||||
}
|
||||
.min_content{
|
||||
padding: 166rpx 0 20rpx;
|
||||
}
|
||||
|
@ -99,6 +103,7 @@ page{
|
|||
background: #2b345b;
|
||||
border-radius: 100rpx;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.left_manage:active{
|
||||
background: #232a4a;
|
||||
|
@ -111,6 +116,7 @@ page{
|
|||
.left_icon{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
float: left;
|
||||
}
|
||||
.left_flaot{
|
||||
width: 40rpx;
|
||||
|
@ -513,19 +519,21 @@ page{
|
|||
color: #43aeff;
|
||||
}
|
||||
.timeline_for_state_1{
|
||||
padding: 2px 24rpx;
|
||||
height: 40rpx;
|
||||
width: 160rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
font-size: 26rpx;
|
||||
background: url("http://fileimg.makalu.cc/WEB_F5E44186F6C44161B99491284E33EEE6.png") no-repeat center/100% 100%;
|
||||
}
|
||||
.timeline_for_state_2{
|
||||
padding: 2px 24rpx;
|
||||
height: 40rpx;
|
||||
width: 160rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
font-size: 26rpx;
|
||||
background: url("http://fileimg.makalu.cc/WEB_345B9059DAD1492EB37EC4814EB340F0.png") no-repeat center/100% 100%;
|
||||
}
|
||||
.timeline_for_file{
|
||||
|
@ -640,22 +648,7 @@ page{
|
|||
.timeline_for_time{
|
||||
color: #43aeff;
|
||||
}
|
||||
.timeline_for_state_1{
|
||||
height: 40rpx;
|
||||
width: 160rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
background: url("http://fileimg.makalu.cc/WEB_F5E44186F6C44161B99491284E33EEE6.png") no-repeat center/100% 100%;
|
||||
}
|
||||
.timeline_for_state_2{
|
||||
height: 40rpx;
|
||||
width: 160rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
background: url("http://fileimg.makalu.cc/WEB_345B9059DAD1492EB37EC4814EB340F0.png") no-repeat center/100% 100%;
|
||||
}
|
||||
|
||||
.timeline_for_file{
|
||||
padding: 10rpx 0 10rpx 40rpx;
|
||||
font-size: 28rpx;
|
||||
|
@ -1099,10 +1092,22 @@ swiper-item video{
|
|||
.inspect_list{
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.inspect_max_scroll{
|
||||
height:125vh;
|
||||
}
|
||||
.inspect_list_scroll{
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.inspect_for{
|
||||
padding: 20rpx 0;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.inspect_for_scroll{
|
||||
padding: 20rpx 30rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.inspect_for_bgd{
|
||||
background: #1e2336;
|
||||
padding:0 30rpx;
|
||||
|
@ -1163,6 +1168,12 @@ swiper-item video{
|
|||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.inspect_list_title_text_2{
|
||||
width: calc(100% - 240rpx);
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.inspect_list_info{
|
||||
padding: 30rpx 5rpx;
|
||||
color: #d5dbeb;
|
||||
|
@ -1531,6 +1542,11 @@ swiper-item video{
|
|||
word-break: break-all;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.zxjc{
|
||||
border: 5rpx solid #3fabb7;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -56,15 +56,17 @@ Component({
|
|||
initChart(){
|
||||
var id ='#' + this.data.chartId;
|
||||
this.component = this.selectComponent(id);
|
||||
this.component.init((canvas, width, height, dpr) => {
|
||||
let chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr
|
||||
if(this.component!=null){
|
||||
this.component.init((canvas, width, height, dpr) => {
|
||||
let chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr
|
||||
})
|
||||
chart.setOption(this.getData());
|
||||
return chart;
|
||||
})
|
||||
chart.setOption(this.getData());
|
||||
return chart;
|
||||
})
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
var data = this.data.chartData
|
||||
|
|
|
@ -0,0 +1,266 @@
|
|||
// pageage/safetyManagement/addSafetyInspect/index.js
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
deptId:"",
|
||||
projectId:"",
|
||||
projectName:"",
|
||||
loginName:"",
|
||||
insuranceType:"1",
|
||||
companyName:"",
|
||||
insuranceNumber:"",
|
||||
insuranceTypeList:[],
|
||||
fileData:[],
|
||||
limit:1,
|
||||
fileType:["pdf"]
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {projectId,projectName} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
projectId,
|
||||
projectName,
|
||||
deptId:res.data.deptId,
|
||||
loginName:res.data.loginName
|
||||
})
|
||||
this.getDictData();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//获取字典数据
|
||||
getDictData(){
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectInsurance/queryInsuranceType',
|
||||
method:"get",
|
||||
data:{},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let temData=[];
|
||||
res.data.forEach(item =>{
|
||||
temData.push({id:item.dictValue,text:item.dictLabel});
|
||||
});
|
||||
that.setData({
|
||||
insuranceTypeList:temData
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//取消页面
|
||||
cancelSaveView(){
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index'
|
||||
})
|
||||
},
|
||||
|
||||
//保存
|
||||
onSave(){
|
||||
this.setData({
|
||||
loadShow:true
|
||||
})
|
||||
let that = this
|
||||
let {projectId,projectName,deptId,loginName,insuranceType,insuranceNumber,companyName,fileData} = that.data;
|
||||
//数据效验
|
||||
if(projectId==""||loginName==""||deptId==""){
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(insuranceType==""){
|
||||
app.toast("请选择保险类型!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(companyName==""){
|
||||
app.toast("请填写保险公司名称!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(fileData.length==0){
|
||||
app.toast("请上传保险合同!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
});
|
||||
return;
|
||||
}
|
||||
let _fileType = fileData[0].path.split('.');
|
||||
_fileType = _fileType[_fileType.length-1].toLowerCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if(this.data.fileType.indexOf(_fileType)==-1){
|
||||
app.toast("保险合同不支持 [ "+_fileType+" ] 格式!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
});
|
||||
return;
|
||||
}
|
||||
fileData.forEach(async (item)=>{
|
||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
||||
let uploadName = "file"
|
||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||
let obj = await that.syncUploadImage(uploadUrl,fileData[0].path,uploadName);
|
||||
let params = {
|
||||
projectId,
|
||||
deptId,
|
||||
insuranceType,
|
||||
companyName,insuranceNumber,
|
||||
credentialFile:obj.data.fileName,
|
||||
createBy:loginName
|
||||
}
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + "/wechat/projectInsurance/add",
|
||||
method:"POST",
|
||||
data:params,
|
||||
header: {
|
||||
"Username": loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res){
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if(res.data==-1){
|
||||
app.toast("办理失败,当前单位已办理此类保险!")
|
||||
}else{
|
||||
app.toast("添加成功!")
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},200)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 这里考虑上传图片异步问题,封装为同步
|
||||
*/
|
||||
syncUploadImage(url,uploadFile,name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: { user: 'test' },
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
companyNameAction: function (options) {
|
||||
this.data.companyName = options.detail.value;
|
||||
},
|
||||
|
||||
insuranceNumberAction: function (options) {
|
||||
this.data.insuranceNumber = options.detail.value
|
||||
},
|
||||
|
||||
fileUpload(options){
|
||||
let file=options.detail;
|
||||
this.setData({
|
||||
fileData: file
|
||||
});
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">办理项目保险</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<view class="inspect_info">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">保险类型</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{insuranceTypeList}}" placeholder="请选择保险类型" bindchange="onSelectInsuranceType" ></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">保险公司</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写保险公司" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="companyNameAction" maxlength="20" value="{{phoneNumber}}"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">保险单号</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写保险单号(可不填)" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="insuranceNumberAction" maxlength="50"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" style="width: 100%;">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">保险合同
|
||||
<text style="font-size: small;">[仅可上传PDF格式]</text>
|
||||
</view>
|
||||
<view class="problem_list_info_con">
|
||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSave">保存</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-overlay show="{{loadShow}}">
|
||||
<view class="gif">
|
||||
<image src="../../../images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
|
||||
.van-popup{
|
||||
background: none !important;
|
||||
}
|
||||
.van-image__img{
|
||||
border-radius: 10rpx !important;
|
||||
}
|
||||
.radio_custom_class{
|
||||
padding: 10rpx 100rpx 10rpx 0;
|
||||
}
|
||||
.radio_label_class{
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.max_tab_name{
|
||||
padding: 0 40rpx;
|
||||
font-size:30rpx;
|
||||
height: 460rpx;
|
||||
overflow: auto;
|
||||
margin-top: 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.van-popup.van-popup--bottom{
|
||||
background: #232a44;
|
||||
}
|
||||
.van-popup {
|
||||
background-color: var(--popup-background-color,#232a44) !important;
|
||||
}
|
||||
.font_color{
|
||||
padding: 15rpx 0;
|
||||
color: #157dd2;
|
||||
}
|
||||
.active{
|
||||
font-size:30rpx;
|
||||
font-weight: 600;
|
||||
color: #14feff
|
||||
}
|
|
@ -0,0 +1,181 @@
|
|||
// pageage/project_checking/info/index.js
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id:"",
|
||||
infoData:{},
|
||||
loadShow:false,
|
||||
loginName:"",
|
||||
showDel:false,
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {id} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
id,
|
||||
loginName:res.data.loginName
|
||||
})
|
||||
this.getInfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo(){
|
||||
let {id} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectInsurance/info',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
that.setData({
|
||||
infoData:res.data,
|
||||
loadShow:false
|
||||
})
|
||||
//判断当前能否删除
|
||||
if(res.data.createBy==that.data.loginName){
|
||||
that.setData({
|
||||
showDel:true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(){
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData(){
|
||||
let {id} = this.data
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+"/wechat/projectInsurance/remove",
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
method:"get",
|
||||
success(res){
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
downFile:function(e){
|
||||
let idx = e.currentTarget.dataset['index'];
|
||||
let that = this;
|
||||
wx.downloadFile({
|
||||
// 示例 url,并非真实存在
|
||||
url: that.data.request+that.imageList[idx],
|
||||
success: function (res) {
|
||||
const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
filePath: filePath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail:function(res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-popup": "@vant/weapp/popup/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"navigationBarTitleText": "形象进度详情"
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
<!--pageage/safetyManagement/problemRectification/index.wxml-->
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">项目保险详情</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="module_title module_title_padding">
|
||||
<view>{{infoData.projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">保险类型</text></van-col>
|
||||
<van-col span="18">
|
||||
{{infoData.insuranceTypeName}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">保险合同</text></van-col>
|
||||
<view class="problem_list_info_con in-img-max">
|
||||
<view class="in-img-div">
|
||||
<image src='https://cf.makalu.cc/profile/wechat/icon/pdf.png'></image>
|
||||
<text class="files" style="color:#89a3ed;margin-left:50rpx;" bindtap='downFile' data-index="{{0}}" >下载附件</text>
|
||||
</view>
|
||||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_blue">投保状态</text></van-col>
|
||||
<van-col span="18" class="color_blue">
|
||||
<text class="timeline_for_state_1" wx:if="{{infoData.insuranceState=='Y'}}" style="color: aqua;padding: 6rpx 75rpx;">已办理</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{infoData.insuranceState=='N'}}" style="color: #fbfdfd;padding: 6rpx 75rpx;">未办理</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">投保单位</text></van-col>
|
||||
<van-col span="18">
|
||||
{{infoData.deptName}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_orange">保险公司</text></van-col>
|
||||
<van-col span="18" class="color_orange">{{infoData.companyName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">保险单号</text></van-col>
|
||||
<van-col class="safety_issue_number" span="18" style="padding:0;">{{infoData.insuranceNumber}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交用户</text></van-col>
|
||||
<van-col span="18">{{infoData.createBy}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交时间</text></van-col>
|
||||
<van-col span="18">{{infoData.createTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to" wx:if="{{showDel}}">
|
||||
<view class="problem_submit_to_btn problem_submit_to_delete" bindtap="onDelete">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
/* pageage/project_checking/info/index.wxss */
|
||||
.in-img-max:after{
|
||||
display:block;
|
||||
clear:both;
|
||||
content:"";
|
||||
visibility:hidden;
|
||||
height:0
|
||||
}
|
||||
.in-img-max{
|
||||
width: auto;
|
||||
zoom:1
|
||||
}
|
||||
.in-img-div{
|
||||
position: relative;
|
||||
margin: 0 8px 8px 0;
|
||||
float: left;
|
||||
}
|
||||
.in-img-div image{
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 15rpx;
|
||||
position: relative;
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
// pageage/safetyManagement/securityCheckGR/index.js
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
deptId:"",
|
||||
loginName:"",
|
||||
userName:"",
|
||||
projectId:"",
|
||||
projectData:{},
|
||||
projectNameArgs:"",
|
||||
initData: {},
|
||||
show:false,
|
||||
listData:[],
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
|
||||
onClose(){
|
||||
this.setData({ show: false });
|
||||
},
|
||||
showPopup() {
|
||||
this.setData({ show: true });
|
||||
},
|
||||
|
||||
skipAdd(){
|
||||
wx.redirectTo({
|
||||
url: `../add/index?projectId=${this.data.initData.id}&projectName=${this.data.initData.text}`,
|
||||
})
|
||||
},
|
||||
|
||||
getInfo(e){
|
||||
let {id} = e.currentTarget.dataset.set;
|
||||
if(!id){
|
||||
app.toast("当前合同未办理,不能查看详情!");
|
||||
return;
|
||||
}
|
||||
wx.redirectTo({
|
||||
url: `../info/index?id=${id}`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
deptId:res.data.deptId,
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.userName,
|
||||
projectId:app.globalData.projectId,
|
||||
projectNameArgs:app.globalData.projectName,
|
||||
minRoleId:res.data.minRoleId,
|
||||
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
|
||||
})
|
||||
this.getListData(app.globalData.projectId,res.data.deptId,res.data.minRoleId);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询项目特种人员数据
|
||||
*/
|
||||
getListData(projectId,deptId,minRoleId) {
|
||||
var that = this;
|
||||
//判断角色,
|
||||
if(minRoleId==2||minRoleId==3||minRoleId==4){
|
||||
deptId=0;
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectInsurance/list',
|
||||
data: {
|
||||
"deptId":deptId,
|
||||
"projectId": projectId
|
||||
},
|
||||
method: "get",
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
listData:res.data.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
if(wx.getStorageSync('nav-menu')=="gd"){
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/gengduogongneng/gengduogongneng',
|
||||
})
|
||||
}else{
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/safety_manage/index',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
onProjectSelect(e){
|
||||
let projectId = e.detail.id;
|
||||
let projectName = e.detail.text;
|
||||
app.globalData.projectId = projectId;
|
||||
app.globalData.projectName = projectName;
|
||||
this.onLoad();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-overlay": "@vant/weapp/overlay/index" ,
|
||||
"van-popup": "@vant/weapp/popup/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">项目保险管理</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<view class="inspect_max">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text"> 保险类型:{{' '+item.insuranceTypeName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info">
|
||||
<view class="inspect_list_info_details">
|
||||
<view class="inspect_list_info_data">
|
||||
<view class="inspect_list_info_data_prop color_blue">投保状态:
|
||||
<text class="timeline_for_state_1" wx:if="{{item.insuranceState=='1'}}" style="color: aqua;padding: 6rpx 75rpx;">已办理</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{item.insuranceState=='0'}}" style="color: #fbfdfd;padding: 6rpx 75rpx;">未办理</text>
|
||||
</view>
|
||||
<view class="inspect_list_info_data_prop color_orange">单位名称:{{item.deptName}}</view>
|
||||
<view class="inspect_list_info_data_prop">保险公司:{{item.companyName?item.companyName:''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="../../../images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="inspect_add_to" bindtap="skipAdd">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="../../../images/new_add.png"></image>
|
||||
<view>新增</view>
|
||||
</view>
|
||||
</view></view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
/* pageage/project_checking_list/project_checking_list.wxss */
|
|
@ -30,7 +30,9 @@ Page({
|
|||
dangerType:"",
|
||||
dangerTypeList:[],
|
||||
selectValue:"",
|
||||
selectIndex:""
|
||||
selectIndex:"",
|
||||
problemType:"1",
|
||||
problemTypeList:[{id:"1",text:"常规检查"},{id:"2",text:"专项检查"}]
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -356,7 +358,14 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
//选择培训类型
|
||||
//选择检查类型
|
||||
onSelectProblemType(e){
|
||||
this.setData({
|
||||
problemType:e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
//选择隐患类型
|
||||
onSelectDangerType(e){
|
||||
this.setData({
|
||||
dangerType:e.detail.id
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">检查类型</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{problemTypeList}}" placeholder="请选择检查类型" bindchange="onSelectProblemType"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">隐患类型</view>
|
||||
<view class="inspect_info_content">
|
||||
|
|
|
@ -29,6 +29,15 @@
|
|||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">问题类型</text></van-col>
|
||||
<van-col span="18">
|
||||
<text class="timeline_for_state_1" wx:if="{{infoData.problemType=='1'}}">常规检查</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{infoData.problemType=='2'}}">专项检查</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">隐患类型</text></van-col>
|
||||
|
|
|
@ -29,6 +29,15 @@
|
|||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">问题类型</text></van-col>
|
||||
<van-col span="18">
|
||||
<text class="timeline_for_state_1" wx:if="{{infoData.problemType=='1'}}">常规检查</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{infoData.problemType=='2'}}">专项检查</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">隐患类型</text></van-col>
|
||||
|
|
|
@ -19,14 +19,11 @@ Page({
|
|||
dzgCount:0,
|
||||
yclCount:0,
|
||||
zgcsCOunt:0,
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
|
||||
onClose(){
|
||||
this.setData({ show: false });
|
||||
},
|
||||
showPopup() {
|
||||
this.setData({ show: true });
|
||||
request:app.globalData.reqUrl,
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
lastDataSize:10,
|
||||
minRoleId:""
|
||||
},
|
||||
|
||||
skipAdd(){
|
||||
|
@ -66,9 +63,14 @@ Page({
|
|||
deptId:res.data.deptId,
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.userName,
|
||||
minRoleId:res.data.minRoleId,
|
||||
projectId:app.globalData.projectId,
|
||||
projectNameArgs:app.globalData.projectName,
|
||||
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
|
||||
initData:{text:app.globalData.projectName,id:app.globalData.projectId},
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
lastDataSize:10,
|
||||
listData:[]
|
||||
})
|
||||
this.getListData();
|
||||
}
|
||||
|
@ -79,55 +81,78 @@ Page({
|
|||
* 查询项目举牌验收数据
|
||||
*/
|
||||
getListData() {
|
||||
var that = this;
|
||||
//进入这里说明数据加载完毕
|
||||
if(this.data.lastDataSize<this.data.pageSize){
|
||||
//app.toast("已经到底了,暂无可继续加载数据!")
|
||||
return;
|
||||
}
|
||||
let nowRole = "99";
|
||||
//判断角色,
|
||||
if(this.data.minRoleId==2||this.data.minRoleId==3||this.data.minRoleId==4){
|
||||
nowRole="-1";
|
||||
}
|
||||
let param = {
|
||||
"infoType":"1",//1质量类,0安全类
|
||||
"projectId": that.data.projectId,
|
||||
"nowRole":"99",//默认传普通角色,真实角色查看的数据量太大,这里只查看自己相关的数据
|
||||
"nowUser":that.data.loginName,
|
||||
"activeName":that.data.activeState
|
||||
"projectId": this.data.projectId,
|
||||
"nowRole":nowRole,//默认传普通角色,真实角色查看的数据量太大,这里只查看自己相关的数据
|
||||
"nowUser":this.data.loginName,
|
||||
"activeName":this.data.activeState
|
||||
}
|
||||
var that = this;
|
||||
that.queryCount(param);
|
||||
param.pageNum=that.data.pageNum;
|
||||
param.pageSize=that.data.pageSize;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/list',
|
||||
data:param,
|
||||
method: "get",
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
listData:res.data.data
|
||||
})
|
||||
res = res.data;
|
||||
if(res.code=="200"){
|
||||
that.setData({
|
||||
pageNum:that.data.pageNum+1,
|
||||
lastDataSize:res.data.length,
|
||||
listData:that.data.listData.concat(res.data)
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
//查询统计数量
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/queryCount',
|
||||
data: param,
|
||||
method: "get",
|
||||
success: function (res) {
|
||||
let sum1=0;
|
||||
if(res.data.data.check0){
|
||||
sum1+=res.data.data.check0;
|
||||
|
||||
},
|
||||
|
||||
queryCount(param){
|
||||
let that = this;
|
||||
//查询统计数量
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/queryCount',
|
||||
data: param,
|
||||
method: "get",
|
||||
success: function (res) {
|
||||
let sum1=0;
|
||||
if(res.data.data.check0){
|
||||
sum1+=res.data.data.check0;
|
||||
}
|
||||
if(res.data.data.check1){
|
||||
sum1+=res.data.data.check1;
|
||||
}
|
||||
if(res.data.data.check3){
|
||||
sum1+=res.data.data.check3;
|
||||
}
|
||||
let sum4=0;
|
||||
let sum99=0;
|
||||
if(res.data.data.check4){
|
||||
sum4+=res.data.data.check4;
|
||||
}
|
||||
if(res.data.data.check99){
|
||||
sum99+=res.data.data.check99;
|
||||
}
|
||||
that.setData({
|
||||
dzgCount:sum1,
|
||||
yclCount:sum4,
|
||||
zgcsCount:sum99
|
||||
});
|
||||
}
|
||||
if(res.data.data.check1){
|
||||
sum1+=res.data.data.check1;
|
||||
}
|
||||
if(res.data.data.check3){
|
||||
sum1+=res.data.data.check3;
|
||||
}
|
||||
let sum4=0;
|
||||
let sum99=0;
|
||||
if(res.data.data.check4){
|
||||
sum4+=res.data.data.check4;
|
||||
}
|
||||
if(res.data.data.check99){
|
||||
sum99+=res.data.data.check99;
|
||||
}
|
||||
that.setData({
|
||||
dzgCount:sum1,
|
||||
yclCount:sum4,
|
||||
zgcsCount:sum99
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -145,7 +170,11 @@ Page({
|
|||
}
|
||||
|
||||
this.setData({
|
||||
activeState:nav
|
||||
activeState:nav,
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
lastDataSize:10,
|
||||
listData:[]
|
||||
});
|
||||
this.getListData();
|
||||
},
|
||||
|
@ -166,9 +195,15 @@ Page({
|
|||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../../../../pages/gengduogongneng/gengduogongneng',
|
||||
})
|
||||
if(wx.getStorageSync('nav-menu')=="gd"){
|
||||
wx.redirectTo({
|
||||
url: '../../../../pages/gengduogongneng/gengduogongneng',
|
||||
})
|
||||
}else{
|
||||
wx.redirectTo({
|
||||
url: '../../../../pages/quality_manage/index',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
|
@ -180,6 +215,11 @@ Page({
|
|||
this.onLoad();
|
||||
},
|
||||
|
||||
onScrollToLower(){
|
||||
console.log("滚动条到底了,开始加载新数据");
|
||||
this.getListData();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
|
|
|
@ -10,21 +10,22 @@
|
|||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='dzg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>待我办理({{dzgCount}})</text></view>
|
||||
<view class="{{activeState=='ycl'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>整改完成({{yclCount}})</text></view>
|
||||
<view class="{{activeState=='zgcs'?'active':''}}" bindtap="trainingTypeJump" data-index="3"><text>整改超时({{zgcsCount}})</text></view>
|
||||
</view>
|
||||
<view class="inspect_max">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" v-if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
|
||||
<view class="inspect_max_scroll">
|
||||
<view class="inspect_for_scroll {{item.problemType=='2'?'zxjc':''}}" v-if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">{{item.workParts}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text_2">{{item.workParts}}</view>
|
||||
<text class="timeline_for_state_1" wx:if="{{item.problemType=='1'}}">常规检查</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{item.problemType=='2'}}">专项检查</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info">
|
||||
|
@ -42,7 +43,9 @@
|
|||
<view class="inspect_list_info_data_prop">检查时间:<text class="color_blue">{{item.createTime}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info_position">整改要求:<text class="color_purple">{{item.changeInfo}}</text></view>
|
||||
<view class="inspect_list_info_position">
|
||||
整改要求:<text class="color_purple">{{item.changeInfo}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -52,15 +55,15 @@
|
|||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_add_to" bindtap="skipAdd">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="../../../../images/new_add.png"></image>
|
||||
<view>新增</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_add_to" bindtap="skipAdd">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="../../../../images/new_add.png"></image>
|
||||
<view>新增</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -29,6 +29,15 @@
|
|||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">问题类型</text></van-col>
|
||||
<van-col span="18">
|
||||
<text class="timeline_for_state_1" wx:if="{{infoData.problemType=='1'}}">常规检查</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{infoData.problemType=='2'}}">专项检查</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">隐患类型</text></van-col>
|
||||
|
|
|
@ -30,7 +30,9 @@ Page({
|
|||
dangerType:"",
|
||||
dangerTypeList:[],
|
||||
selectValue:"",
|
||||
selectIndex:""
|
||||
selectIndex:"",
|
||||
problemType:"1",
|
||||
problemTypeList:[{id:"1",text:"常规检查"},{id:"2",text:"专项检查"}]
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -363,7 +365,14 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
//选择培训类型
|
||||
//选择检查类型
|
||||
onSelectProblemType(e){
|
||||
this.setData({
|
||||
problemType:e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
//选择隐患类型
|
||||
onSelectDangerType(e){
|
||||
this.setData({
|
||||
dangerType:e.detail.id
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">检查类型</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{problemTypeList}}" placeholder="请选择检查类型" bindchange="onSelectProblemType"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">隐患类型</view>
|
||||
<view class="inspect_info_content">
|
||||
|
|
|
@ -29,6 +29,15 @@
|
|||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">问题类型</text></van-col>
|
||||
<van-col span="18">
|
||||
<text class="timeline_for_state_1" wx:if="{{infoData.problemType=='1'}}">常规检查</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{infoData.problemType=='2'}}">专项检查</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">隐患类型</text></van-col>
|
||||
|
|
|
@ -29,6 +29,15 @@
|
|||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">问题类型</text></van-col>
|
||||
<van-col span="18">
|
||||
<text class="timeline_for_state_1" wx:if="{{infoData.problemType=='1'}}">常规检查</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{infoData.problemType=='2'}}">专项检查</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">隐患类型</text></van-col>
|
||||
|
|
|
@ -19,14 +19,11 @@ Page({
|
|||
dzgCount:0,
|
||||
yclCount:0,
|
||||
zgcsCOunt:0,
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
|
||||
onClose(){
|
||||
this.setData({ show: false });
|
||||
},
|
||||
showPopup() {
|
||||
this.setData({ show: true });
|
||||
request:app.globalData.reqUrl,
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
lastDataSize:10,
|
||||
minRoleId:""
|
||||
},
|
||||
|
||||
skipAdd(){
|
||||
|
@ -66,9 +63,14 @@ Page({
|
|||
deptId:res.data.deptId,
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.userName,
|
||||
minRoleId:res.data.minRoleId,
|
||||
projectId:app.globalData.projectId,
|
||||
projectNameArgs:app.globalData.projectName,
|
||||
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
|
||||
initData:{text:app.globalData.projectName,id:app.globalData.projectId},
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
lastDataSize:10,
|
||||
listData:[]
|
||||
})
|
||||
this.getListData();
|
||||
}
|
||||
|
@ -79,25 +81,47 @@ Page({
|
|||
* 查询项目举牌验收数据
|
||||
*/
|
||||
getListData() {
|
||||
var that = this;
|
||||
//进入这里说明数据加载完毕
|
||||
if(this.data.lastDataSize<this.data.pageSize){
|
||||
//app.toast("已经到底了,暂无可继续加载数据!")
|
||||
return;
|
||||
}
|
||||
let nowRole = "99";
|
||||
//判断角色,
|
||||
if(this.data.minRoleId==2||this.data.minRoleId==3||this.data.minRoleId==4){
|
||||
nowRole="-1";
|
||||
}
|
||||
let param = {
|
||||
"infoType":"0",//1质量类,0安全类
|
||||
"projectId": that.data.projectId,
|
||||
"nowRole":"99",//默认传普通角色,真实角色查看的数据量太大,这里只查看自己相关的数据
|
||||
"nowUser":that.data.loginName,
|
||||
"activeName":that.data.activeState
|
||||
"projectId": this.data.projectId,
|
||||
"nowRole":nowRole,//默认传普通角色,真实角色查看的数据量太大,这里只查看自己相关的数据
|
||||
"nowUser":this.data.loginName,
|
||||
"activeName":this.data.activeState
|
||||
}
|
||||
var that = this;
|
||||
that.queryCount(param);
|
||||
param.pageNum=that.data.pageNum;
|
||||
param.pageSize=that.data.pageSize;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/list',
|
||||
data:param,
|
||||
method: "get",
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
listData:res.data.data
|
||||
})
|
||||
res = res.data;
|
||||
if(res.code=="200"){
|
||||
that.setData({
|
||||
pageNum:that.data.pageNum+1,
|
||||
lastDataSize:res.data.length,
|
||||
listData:that.data.listData.concat(res.data)
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
//查询统计数量
|
||||
},
|
||||
|
||||
queryCount(param){
|
||||
//查询统计数量
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/queryCount',
|
||||
data: param,
|
||||
|
@ -128,7 +152,7 @@ Page({
|
|||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 标签切换
|
||||
|
@ -143,17 +167,26 @@ Page({
|
|||
}else if(index == 3){
|
||||
nav = 'zgcs';
|
||||
}
|
||||
|
||||
this.setData({
|
||||
activeState:nav
|
||||
activeState:nav,
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
lastDataSize:10,
|
||||
listData:[]
|
||||
});
|
||||
this.getListData();
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
wx.redirectTo({
|
||||
url: '../../../../pages/gengduogongneng/gengduogongneng',
|
||||
})
|
||||
if(wx.getStorageSync('nav-menu')=="gd"){
|
||||
wx.redirectTo({
|
||||
url: '../../../../pages/gengduogongneng/gengduogongneng',
|
||||
})
|
||||
}else{
|
||||
wx.redirectTo({
|
||||
url: '../../../../pages/safety_manage/index',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
|
@ -165,6 +198,11 @@ Page({
|
|||
this.onLoad();
|
||||
},
|
||||
|
||||
onScrollToLower(){
|
||||
console.log("滚动条到底了,开始加载新数据");
|
||||
this.getListData();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
|
|
@ -10,21 +10,22 @@
|
|||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='dzg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>待我办理({{dzgCount}})</text></view>
|
||||
<view class="{{activeState=='ycl'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>整改完成({{yclCount}})</text></view>
|
||||
<view class="{{activeState=='zgcs'?'active':''}}" bindtap="trainingTypeJump" data-index="3"><text>整改超时({{zgcsCount}})</text></view>
|
||||
</view>
|
||||
<view class="inspect_max">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
|
||||
</view>
|
||||
<view class="inspect_max_scroll">
|
||||
<view class="inspect_for_scroll {{item.problemType=='2'?'zxjc':''}}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">{{item.workParts}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text_2">{{item.workParts}}</view>
|
||||
<text class="timeline_for_state_1" wx:if="{{item.problemType=='1'}}">常规检查</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{item.problemType=='2'}}">专项检查</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info">
|
||||
|
@ -42,7 +43,9 @@
|
|||
<view class="inspect_list_info_data_prop">检查时间:<text class="color_blue">{{item.createTime}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info_position">整改要求:<text class="color_purple">{{item.changeInfo}}</text></view>
|
||||
<view class="inspect_list_info_position">
|
||||
整改要求:<text class="color_purple">{{item.changeInfo}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -52,15 +55,14 @@
|
|||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_add_to" bindtap="skipAdd">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="../../../../images/new_add.png"></image>
|
||||
<view>新增</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_add_to" bindtap="skipAdd">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="../../../../images/new_add.png"></image>
|
||||
<view>新增</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -28,6 +28,15 @@
|
|||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">问题类型</text></van-col>
|
||||
<van-col span="18">
|
||||
<text class="timeline_for_state_1" wx:if="{{infoData.problemType=='1'}}">常规检查</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{infoData.problemType=='2'}}">专项检查</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">隐患类型</text></van-col>
|
||||
|
|
|
@ -86,9 +86,15 @@ Page({
|
|||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/gengduogongneng/gengduogongneng',
|
||||
})
|
||||
if(wx.getStorageSync('nav-menu')=="gd"){
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/gengduogongneng/gengduogongneng',
|
||||
})
|
||||
}else{
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/safety_manage/index',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
|
|
|
@ -104,9 +104,15 @@ Page({
|
|||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/gengduogongneng/gengduogongneng',
|
||||
})
|
||||
if(wx.getStorageSync('nav-menu')=="gd"){
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/gengduogongneng/gengduogongneng',
|
||||
})
|
||||
}else{
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/safety_manage/index',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
|
|
|
@ -1,108 +0,0 @@
|
|||
// pages/Information-review/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
dataList:[{name:'待审核(6)'},{name:'已通过(13)'},{name:'已驳回(5)'}],
|
||||
nactive:0,
|
||||
successList:[{title:'陕西马卡鲁信息技术有限公司劳务队',worktype:'电工',name:'张飞',time:'2021-02-26 11:23',type:'已通过'},{title:'陕西马卡鲁信息技术有限公司劳务队',worktype:'电工',name:'张飞',time:'2021-02-26 11:23',type:'已通过'},{title:'陕西马卡鲁信息技术有限公司劳务队',worktype:'电工',name:'张飞',time:'2021-02-26 11:23',type:'已通过'},{title:'陕西马卡鲁信息技术有限公司劳务队',worktype:'电工',name:'张飞',time:'2021-02-26 11:23',type:'已通过'}],
|
||||
UnauditedList:[{title:'陕西马卡鲁信息技术有限公司劳务队',worktype:'电工',name:'张飞',time:'2021-02-26 11:23',type:'已通过',check:false},{title:'陕西马卡鲁信息技术有限公司劳务队',worktype:'电工',name:'张飞',time:'2021-02-26 11:23',type:'已通过',check:false},{title:'陕西马卡鲁信息技术有限公司劳务队',worktype:'电工',name:'张飞',time:'2021-02-26 11:23',type:'已通过',check:false},{title:'陕西马卡鲁信息技术有限公司劳务队',worktype:'电工',name:'张飞',time:'2021-02-26 11:23',type:'已通过',check:false}],
|
||||
selected:false
|
||||
},
|
||||
// 事件委托
|
||||
selected(e){
|
||||
// console.log(e);
|
||||
this.setData({
|
||||
nactive:e.target.dataset.set
|
||||
})
|
||||
},
|
||||
// 点击进行全选
|
||||
allSelected(){
|
||||
// console.log('000');
|
||||
const select=this.data.UnauditedList.map((item,i)=>{
|
||||
if(this.data.selected){
|
||||
item.check=false
|
||||
}else{
|
||||
item.check=true
|
||||
}
|
||||
return item
|
||||
})
|
||||
console.log(select);
|
||||
this.setData({
|
||||
selected:!this.data.selected,
|
||||
UnauditedList:select
|
||||
})
|
||||
},
|
||||
// 点击进行选中未选中
|
||||
radioCheck(e){
|
||||
let index = e.target.dataset.set
|
||||
const temp= this.data.UnauditedList.map(function(item,i){
|
||||
if(i===index){
|
||||
item.check=!item.check
|
||||
}
|
||||
return item
|
||||
})
|
||||
|
||||
this.setData({
|
||||
UnauditedList:temp,
|
||||
selected:this.data.UnauditedList.every(item=>item.check)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText":"临时人员信息审核"
|
||||
}
|
|
@ -1,183 +0,0 @@
|
|||
<!-- 信息审核 -->
|
||||
<view class="information-review">
|
||||
<!-- tab栏切换 -->
|
||||
<view class="information-review-tab" bindtap="selected">
|
||||
<view class="{{nactive===index?'active':''}}" data-set="{{index}}" wx:for="{{dataList}}" wx:key="index">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 下面对应内容 -->
|
||||
<view class="information-review-content">
|
||||
<!-- 待审核对应模块 -->
|
||||
<view class="{{nactive===0?'information-review-show shows':'information-review-show'}}" >
|
||||
<!-- 筛选 -->
|
||||
<view class="screen-style" >
|
||||
<!-- 左部分 200+25-->
|
||||
<view class="screen-style-left" style="display: flex;align-items: center;">
|
||||
<view style="width:50rpx;height: 50rpx;">
|
||||
<image src="http://fileimg.makalu.cc/WEB_6AF4FEC2B2724A4DB80D40516303612C.png" mode="" style="width: 100%;height: 100%;transform: scale(0.8);"/>
|
||||
</view>
|
||||
<view style="margin-left: 16rpx;">
|
||||
待审核人员列表
|
||||
</view>
|
||||
</view>
|
||||
<!-- 右部分 -->
|
||||
<view class="screen-style-right" style="display: flex;justify-content: flex-end;align-items: center;">
|
||||
<view style="width: 50rpx;height: 50rpx;">
|
||||
<image src="http://fileimg.makalu.cc/WEB_3F11BBC019F445688636A521EBBE43B9.png" mode="" style="width: 100%;height: 100%;transform: scale(0.8);"/>
|
||||
</view>
|
||||
<view style="margin-left:16rpx">
|
||||
筛选
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="information-review-Audit-Not">
|
||||
<!--需要循环的模块 328+120 -->
|
||||
<view class="information-review-Audit-box-Not" wx:for="{{UnauditedList}}" wx:key="index">
|
||||
<!-- 单选框 -->
|
||||
<radio data-set="{{index}}" checked="{{item.check}}" bindtap="radioCheck" color="#89a3ec" style="position: absolute;top: 24rpx;left: 14rpx;"/>
|
||||
<view style="letter-spacing: 6rpx;display: flex;justify-content: space-between;font-size: 28rpx;">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view style="font-size: 26rpx;letter-spacing: 4rpx;color: #848fce;display: flex;">
|
||||
归属工种: <view style="margin-left: 6rpx;">
|
||||
{{item.worktype}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 26rpx;letter-spacing: 4rpx;color: #848fce;display: flex;">
|
||||
姓名: <view style="margin-left: 6rpx;">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 26rpx;letter-spacing: 4rpx;color: #848fce;display: flex;">
|
||||
注册时间: <view style="margin-left: 6rpx;">
|
||||
{{item.time}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 全选框 -->
|
||||
<view class="information-review-Audit-footer">
|
||||
<!-- 左盒子 -->
|
||||
<view style="display: flex;align-items: center;">
|
||||
<view>
|
||||
<radio value="1" color="#89a3ec" bindtap="allSelected" checked="{{selected}}" />
|
||||
</view>
|
||||
<view style="font-size: 28rpx;color:#848fce ;" >
|
||||
全选
|
||||
</view>
|
||||
</view>
|
||||
<!-- 右盒子 -->
|
||||
<view style="display: flex;align-items: center;">
|
||||
<view style="font-size: 28rpx;">
|
||||
已选({{UnauditedList.length}})
|
||||
</view>
|
||||
<view style="width:168rpx;height: 64rpx;line-height: 64rpx;text-align: center;border: 1px solid #874df6;border-radius: 30rpx;margin-left: 30rpx;font-size: 28rpx;background-color: #874df6;">
|
||||
去审核
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 已通过对应模块 -->
|
||||
<view class="{{nactive===1?'information-review-show shows':'information-review-show'}}" >
|
||||
<!-- 筛选 -->
|
||||
<view class="screen-style" >
|
||||
<!-- 左部分 200+25-->
|
||||
<view class="screen-style-left" style="display: flex;align-items: center;">
|
||||
<view style="width:50rpx;height: 50rpx;">
|
||||
<image src="http://fileimg.makalu.cc/WEB_6AF4FEC2B2724A4DB80D40516303612C.png" mode="" style="width: 100%;height: 100%;transform: scale(0.8);"/>
|
||||
</view>
|
||||
<view style="margin-left: 16rpx;">
|
||||
已通过人员列表
|
||||
</view>
|
||||
</view>
|
||||
<!-- 右部分 -->
|
||||
<view class="screen-style-right" style="display: flex;justify-content: flex-end;align-items: center;">
|
||||
<view style="width: 50rpx;height: 50rpx;transform: scale(0.6)">
|
||||
<image src="http://fileimg.makalu.cc/WEB_3F11BBC019F445688636A521EBBE43B9.png" mode="" style="width: 100%;height: 100%;;"/>
|
||||
</view>
|
||||
<view style="margin-left:16rpx">
|
||||
筛选
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="information-review-Audit">
|
||||
<!--需要循环的模块 328+120 -->
|
||||
<view class="information-review-Audit-box" wx:for="{{successList}}" wx:key="index">
|
||||
<view style="letter-spacing: 6rpx;display: flex;justify-content: space-between;font-size: 28rpx;">
|
||||
{{item.title}}
|
||||
<view style="font-size: 22rpx;letter-spacing: 4rpx;">
|
||||
{{item.type}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 26rpx;letter-spacing: 4rpx;color: #848fce;display: flex;">
|
||||
归属工种: <view style="margin-left: 6rpx;">
|
||||
{{item.worktype}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 26rpx;letter-spacing: 4rpx;color: #848fce;display: flex;">
|
||||
姓名: <view style="margin-left: 6rpx;">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 26rpx;letter-spacing: 4rpx;color: #848fce;display: flex;">
|
||||
注册时间: <view style="margin-left: 6rpx;">
|
||||
{{item.time}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 已驳回对应模块 -->
|
||||
<view class="{{nactive===2?'information-review-show shows':'information-review-show'}}">
|
||||
<!-- 筛选 -->
|
||||
<view class="screen-style" >
|
||||
<!-- 左部分 200+25-->
|
||||
<view class="screen-style-left" style="display: flex;align-items: center;">
|
||||
<view style="width:50rpx;height: 50rpx;">
|
||||
<image src="http://fileimg.makalu.cc/WEB_6AF4FEC2B2724A4DB80D40516303612C.png" mode="" style="width: 100%;height: 100%;transform: scale(0.8);"/>
|
||||
</view>
|
||||
<view style="margin-left: 16rpx;">
|
||||
已驳回人员列表
|
||||
</view>
|
||||
</view>
|
||||
<!-- 右部分 -->
|
||||
<view class="screen-style-right" style="display: flex;justify-content: flex-end;align-items: center;">
|
||||
<view style="width: 50rpx;height: 50rpx;">
|
||||
<image src="http://fileimg.makalu.cc/WEB_3F11BBC019F445688636A521EBBE43B9.png" mode="" style="width: 100%;height: 100%;transform: scale(0.8);"/>
|
||||
</view>
|
||||
<view style="margin-left:16rpx">
|
||||
筛选
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="information-review-Audit">
|
||||
<!--需要循环的模块 328+120 -->
|
||||
<view class="information-review-Audit-box" wx:for="{{successList}}" wx:key="index">
|
||||
<view style="letter-spacing: 6rpx;display: flex;justify-content: space-between;font-size: 28rpx;">
|
||||
{{item.title}}
|
||||
<view style="font-size: 22rpx;letter-spacing: 4rpx;">
|
||||
{{item.type}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 26rpx;letter-spacing: 4rpx;color: #848fce;display: flex;">
|
||||
归属工种: <view style="margin-left: 6rpx;">
|
||||
{{item.worktype}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 26rpx;letter-spacing: 4rpx;color: #848fce;display: flex;">
|
||||
姓名: <view style="margin-left: 6rpx;">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 26rpx;letter-spacing: 4rpx;color: #848fce;display: flex;">
|
||||
注册时间: <view style="margin-left: 6rpx;">
|
||||
{{item.time}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
|
@ -1,104 +0,0 @@
|
|||
/* 信息审核 */
|
||||
/* tab栏切换 */
|
||||
.information-review{
|
||||
padding: 20rpx ;
|
||||
}
|
||||
.information-review-tab{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 130rpx;
|
||||
color: #5e626d;
|
||||
}
|
||||
.active{
|
||||
color: #848fce;
|
||||
}
|
||||
/* 筛选 */
|
||||
.screen-style{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
}
|
||||
/* 左部分 */
|
||||
.screen-style-left{
|
||||
width: 400rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
/* 右部分 */
|
||||
.screen-style-right{
|
||||
width: 240rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
/* 下面对应内容 */
|
||||
.information-review-content{
|
||||
|
||||
|
||||
}
|
||||
.information-review-show{
|
||||
display: none;
|
||||
}
|
||||
.shows{
|
||||
display: block;
|
||||
}
|
||||
/* 已通过 */
|
||||
.information-review-Audit{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.information-review-Audit-box{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
border: 1px solid #171e28;
|
||||
box-sizing: border-box;
|
||||
width: 710rpx;
|
||||
height: 240rpx;
|
||||
margin-bottom: 44rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 26rpx;
|
||||
background-color: #222943;
|
||||
}
|
||||
/* 待审核 */
|
||||
.information-review-Audit-box-Not{
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
border: 1px solid #171e28;
|
||||
box-sizing: border-box;
|
||||
width: 710rpx;
|
||||
height: 240rpx;
|
||||
margin-bottom: 44rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 26rpx;
|
||||
padding-left: 62rpx;
|
||||
background-color: #222943;
|
||||
}
|
||||
.information-review-Audit-Not{
|
||||
margin-bottom: 152rpx;
|
||||
}
|
||||
/* 单选框 */
|
||||
/* 未选中样式 */
|
||||
.wx-radio-input {
|
||||
width: 33rpx !important;
|
||||
height: 33rpx !important;
|
||||
background-color: #222943;
|
||||
}
|
||||
/* 全选框 */
|
||||
.information-review-Audit-footer{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 110rpx;
|
||||
border: 1px solid #222943;
|
||||
box-sizing: border-box;
|
||||
background-color:#222943 ;
|
||||
padding: 0 40rpx;
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
// pages/Security-control-echarts/index.js
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
|
@ -7,82 +6,14 @@ Page({
|
|||
*/
|
||||
data: {
|
||||
|
||||
biaoyangList: {},
|
||||
peidianList: [{
|
||||
text: '配电箱监测',
|
||||
id: 0
|
||||
}],
|
||||
PWRList: [{
|
||||
text: 'PWR.02731XTJ',
|
||||
id: 0
|
||||
}],
|
||||
indexNum: 0,
|
||||
indexNums: 0,
|
||||
lastChooseDevice: {},
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
initData: {},
|
||||
projectId: '',
|
||||
projectData: {},
|
||||
tumidityTrendData:{},
|
||||
show:false
|
||||
},
|
||||
onClickBtn(e){
|
||||
this.setData({
|
||||
indexNum:e.currentTarget.dataset.set
|
||||
})
|
||||
this.onClickTemperatureTrend(e.currentTarget.dataset.set)
|
||||
},
|
||||
onClickBtns(e){
|
||||
this.setData({
|
||||
indexNums:e.currentTarget.dataset.set
|
||||
})
|
||||
this.onClickTumidityTrend(e.currentTarget.dataset.set)
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
var that = this;
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:function(res){
|
||||
that.setData({
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.userName,
|
||||
projectId:app.globalData.projectId,
|
||||
projectNameArgs:app.globalData.projectName,
|
||||
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
|
||||
})
|
||||
}
|
||||
})
|
||||
that.setData({
|
||||
endTime:that.dateFormat(new Date(),"yyyy-MM-dd")+ " 23:59:59"
|
||||
})
|
||||
that.getProjectCorrespondence(app.globalData.projectId)
|
||||
},
|
||||
|
||||
/**
|
||||
* 项目对应关系
|
||||
*/
|
||||
getProjectCorrespondence(projectId) {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/weixin/training/getProjectCorrespondence',
|
||||
data: {
|
||||
"projectId": projectId,
|
||||
},
|
||||
method: "get",
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
projectData: res.data
|
||||
})
|
||||
//获取设备列表
|
||||
that.gainDeviceList()
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
@ -131,227 +62,5 @@ Page({
|
|||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
//获取配电箱装置
|
||||
gainDeviceList() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.szhUrl + '/api/iot/power/deviceList',
|
||||
data: {
|
||||
typeName: "配电箱"
|
||||
},
|
||||
method: "POST",
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success: function (res) {
|
||||
for(let row of res.data.rows){
|
||||
row.id = row.deviceId
|
||||
row.text = row.deviceId
|
||||
}
|
||||
that.setData({
|
||||
selectData :res.data.rows,
|
||||
lastChooseDevice:res.data.rows[0]
|
||||
})
|
||||
//温度监控
|
||||
that.onClickTemperatureTrend(that.data.indexNum)
|
||||
that.onClickTumidityTrend(that.data.indexNums)
|
||||
}
|
||||
})
|
||||
},
|
||||
//温度趋势
|
||||
onClickTemperatureTrend(n) {
|
||||
var that = this
|
||||
that.setData({
|
||||
indexNum:n,
|
||||
endTime:that.dateFormat(new Date(),"yyyy-MM-dd")+ " 23:59:59"
|
||||
})
|
||||
|
||||
if (n == 0) {
|
||||
var time = that.getBeforeDate(-6)+" 00:00:00"
|
||||
that.setData({
|
||||
startTime:time
|
||||
})
|
||||
} else {
|
||||
var time = that.getBeforeDate(-29)+" 00:00:00"
|
||||
that.setData({
|
||||
startTime:time
|
||||
})
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.szhUrl + '/api/iot/power/runList',
|
||||
data: {
|
||||
projectId: parseInt(that.data.projectData.szh),
|
||||
uid: that.data.lastChooseDevice.deviceId,
|
||||
startTime: that.data.startTime,
|
||||
endTime: that.data.endTime
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
method: "POST",
|
||||
success: function (res) {
|
||||
if (res.data.code == 0) {
|
||||
var data = {}
|
||||
data.lineData = []
|
||||
data.color = ['#008ffd', '#f6d023', '#5af9fd', '#fc6902']
|
||||
data.legend = ['A相温度', 'B相温度', 'C相温度', '零线温度']
|
||||
data.unit = '℃'
|
||||
data.date = []
|
||||
var data1 = []
|
||||
var data2 = []
|
||||
var data3 = []
|
||||
var data4 = []
|
||||
for (let row of res.data.rows) {
|
||||
data.date.push((row.time.slice(0, row.time.length - 3)))
|
||||
data1.push(row.t1)
|
||||
data2.push(row.t2)
|
||||
data3.push(row.t3)
|
||||
data4.push(row.t4)
|
||||
}
|
||||
data.lineData.push(data1)
|
||||
data.lineData.push(data2)
|
||||
data.lineData.push(data3)
|
||||
data.lineData.push(data4)
|
||||
that.setData({
|
||||
biaoyangList: data
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
biaoyangList:{}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//电流监控
|
||||
onClickTumidityTrend(n) {
|
||||
var that = this
|
||||
that.setData({
|
||||
indexNums:n,
|
||||
endTime:that.dateFormat(new Date(),"yyyy-MM-dd")+ " 23:59:59"
|
||||
})
|
||||
|
||||
if (n == 0) {
|
||||
var time = that.getBeforeDate(-6)+" 00:00:00"
|
||||
that.setData({
|
||||
startTime:time
|
||||
})
|
||||
} else {
|
||||
var time = that.getBeforeDate(-29)+" 00:00:00"
|
||||
that.setData({
|
||||
startTime:time
|
||||
})
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.szhUrl + '/api/iot/power/runList',
|
||||
data: {
|
||||
projectId: parseInt(that.data.projectData.szh),
|
||||
uid: that.data.lastChooseDevice.deviceId,
|
||||
startTime: that.data.startTime,
|
||||
endTime: that.data.endTime
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
method: "POST",
|
||||
success: function (res) {
|
||||
if (res.data.code == 0) {
|
||||
var data = {}
|
||||
data.lineData = []
|
||||
data.color = ['#008ffd', '#f6d023', '#5af9fd', '#fc6902']
|
||||
data.legend = ['A相电流', 'B相电流', 'C相电流', '电流阈值']
|
||||
data.unit = 'A'
|
||||
data.date = []
|
||||
var data1 = []
|
||||
var data2 = []
|
||||
var data3 = []
|
||||
var data4 = []
|
||||
for (let row of res.data.rows) {
|
||||
data.date.push((row.time.slice(0, row.time.length - 3)))
|
||||
data1.push(row.c1)
|
||||
data2.push(row.c2)
|
||||
data3.push(row.c3)
|
||||
data4.push(131)
|
||||
}
|
||||
data.lineData.push(data1)
|
||||
data.lineData.push(data2)
|
||||
data.lineData.push(data3)
|
||||
data.lineData.push(data4)
|
||||
that.setData({
|
||||
tumidityTrendData: data
|
||||
})
|
||||
}else {
|
||||
that.setData({
|
||||
tumidityTrendData:{}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 格式化时间
|
||||
*/
|
||||
dateFormat(date,fmt) {
|
||||
let ret;
|
||||
const opt = {
|
||||
"y+": date.getFullYear().toString(), // 年
|
||||
"M+": (date.getMonth() + 1).toString(), // 月
|
||||
"d+": date.getDate().toString(), // 日
|
||||
"H+": date.getHours().toString(), // 时
|
||||
"m+": date.getMinutes().toString(), // 分
|
||||
"s+": date.getSeconds().toString() // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
};
|
||||
for (let k in opt) {
|
||||
ret = new RegExp("(" + k + ")").exec(fmt);
|
||||
if (ret) {
|
||||
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
|
||||
};
|
||||
};
|
||||
return fmt;
|
||||
},
|
||||
//获取之前的时间
|
||||
getBeforeDate(num) {
|
||||
var date1 = new Date()
|
||||
var date2 = new Date(date1)
|
||||
date2.setDate(date1.getDate() + num)
|
||||
var time2 = date2.getFullYear() + "-" + ((date2.getMonth() + 1) <= 9?"0"+(date2.getMonth() + 1):(date2.getMonth() + 1)) + "-" + date2.getDate()
|
||||
return time2
|
||||
},
|
||||
//项目切换 返回值
|
||||
onProjectSelect(e){
|
||||
var that = this
|
||||
let projectId = e.detail.id;
|
||||
let projectName = e.detail.text;
|
||||
app.globalData.projectId = projectId;
|
||||
app.globalData.projectName = projectName;
|
||||
that.setData({
|
||||
projectId:projectId,
|
||||
projectName:projectName
|
||||
})
|
||||
|
||||
that.onLoad();
|
||||
},
|
||||
//返回到安全管理页面
|
||||
goGCLB:function(){
|
||||
wx.redirectTo({
|
||||
url:'../newAddPage/safetyManagement/index'
|
||||
})
|
||||
},
|
||||
showPopup() {
|
||||
this.setData({ show: true });
|
||||
},
|
||||
|
||||
onClose() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
//配电箱改变
|
||||
peidianChange(e){
|
||||
console.log(e)
|
||||
},
|
||||
//设备改变
|
||||
pwdChange(e){
|
||||
console.log(e)
|
||||
},
|
||||
}
|
||||
})
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "配电箱监测"
|
||||
|
||||
}
|
|
@ -1,124 +1,2 @@
|
|||
<!--pages/Security-control-echarts/index.wxml-->
|
||||
<!-- 安全管控 -->
|
||||
<!-- <view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<view class="header_img" bindtap="showPopup"><image src="/images/core.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="goGCLB">
|
||||
<image src="/images/left.png"></image>
|
||||
<text class="header_fh">返回</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="10">
|
||||
<view class="header_name">配电箱监测</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="max_new_content">
|
||||
<!-- 头部nav栏 -->
|
||||
<view style="margin-top: 20rpx;width: 710rpx; margin-bottom: 20rpx;">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
</view>
|
||||
<!-- 配电箱选项 -->
|
||||
|
||||
<view class="deep_select">
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="deep_select_padding">
|
||||
<voucher-select columns="{{peidianList}}" bindchange="peidianChange"></voucher-select>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="deep_select_padding">
|
||||
<voucher-select columns="{{PWRList}}" bindchange="pwdChange"></voucher-select>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view class="peidianxiang">
|
||||
<view class="peidianxiang-left">
|
||||
<voucher-select columns="{{peidianList}}" bindchange="peidianChange"></voucher-select>
|
||||
</view>
|
||||
<view class="peidianxiang-right">
|
||||
<voucher-select columns="{{PWRList}}" bindchange="pwdChange"></voucher-select>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- echarts图 -->
|
||||
<view class="echarts-picture">
|
||||
<!-- 标签 -->
|
||||
<view class="echarts-title" style="margin-bottom: 30rpx;">
|
||||
<view class="echarts-title-left">
|
||||
<view style="border: 1px solid #028cf3;width: 38rpx;height: 38rpx;text-align: center;line-height: 38rpx;margin: 0 16rpx;border-radius: 50%;font-size: 28rpx;">
|
||||
T
|
||||
</view>
|
||||
<view style="font-size: 28rpx;">
|
||||
温度监控
|
||||
</view>
|
||||
</view>
|
||||
<view class="echarts-title-right" style="padding-right: 20rpx;">
|
||||
<view class="{{indexNum==0?'echarts-title-right-content active':'echarts-title-right-content'}}" data-set="{{0}}" bindtap="onClickBtn">
|
||||
近七天
|
||||
</view>
|
||||
<view class="{{indexNum==1?'echarts-title-left-content active':'echarts-title-left-content'}}" data-set="{{1}}" bindtap="onClickBtn">
|
||||
近30天
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 数据图展示 -->
|
||||
<view class="echarts-data">
|
||||
<curve-echarts-copy chart-id="chartData" chart-data="{{biaoyangList}}"></curve-echarts-copy>
|
||||
</view>
|
||||
</view>
|
||||
<!-- echarts图1 -->
|
||||
<view class="echarts-picture">
|
||||
<!-- 标签 -->
|
||||
<view class="echarts-title" style="margin-bottom: 30rpx;">
|
||||
<view class="echarts-title-left">
|
||||
<view style="border: 1px solid #028cf3;width: 38rpx;height: 38rpx;text-align: center;line-height: 38rpx;margin: 0 16rpx;border-radius: 50%;font-size: 28rpx;">
|
||||
A
|
||||
</view>
|
||||
<view style="font-size: 28rpx;">
|
||||
电流监控
|
||||
</view>
|
||||
</view>
|
||||
<view class="echarts-title-right" style="padding-right: 20rpx;">
|
||||
<view class="{{indexNums==0?'echarts-title-right-content active':'echarts-title-right-content'}}" data-set="{{0}}" bindtap="onClickBtns">
|
||||
近七天
|
||||
</view>
|
||||
<view class="{{indexNums==1?'echarts-title-left-content active':'echarts-title-left-content'}}" data-set="{{1}}" bindtap="onClickBtns">
|
||||
近30天
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 数据图展示 -->
|
||||
<view class="echarts-data">
|
||||
<curve-echarts-copy chart-id="chartData1" chart-data="{{tumidityTrendData}}" ></curve-echarts-copy>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- 左侧账号信息 -->
|
||||
<!-- <van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onClose" >
|
||||
<view class="left_max">
|
||||
<van-row class="demo clearfix">
|
||||
<van-col span="10">
|
||||
<view class="left_head"><image src="http://fileimg.makalu.cc/szgl/9015e824c5004e629049c4f72967cfdc.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="14">
|
||||
<view class="left_info">
|
||||
<view class="left_info_name">{{userName}}</view>
|
||||
<view class="left_info_name">{{loginName}}</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</van-popup> -->
|
||||
<text>pages/Security-control-echarts/index.wxml</text>
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
/* pages/Security-control-echarts/index.wxss */
|
||||
/* 安全管控 */
|
||||
.control{
|
||||
padding: 20rpx 40rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* 配电箱选项 */
|
||||
.peidianxiang{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 60rpx 0;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
|
||||
}
|
||||
.peidianxiang-left{
|
||||
width: 42%;
|
||||
height: 100rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.peidianxiang-right{
|
||||
width: 52%;
|
||||
height: 100rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
/* echarts图 286*/
|
||||
.echarts-picture{
|
||||
width: 100%;
|
||||
border: 1px solid #1e2336;
|
||||
border-radius: 10rpx;
|
||||
background-color: #1e2336;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
.echarts-title{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.echarts-title-left{
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.echarts-title-right{
|
||||
display: flex;
|
||||
width: 260rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
.echarts-title-right-content{
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
font-size: 26rpx;
|
||||
border-top-left-radius: 30rpx;
|
||||
border-bottom-left-radius: 30rpx;
|
||||
border: 1px solid #2f3560;
|
||||
}
|
||||
.echarts-title-left-content{
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
font-size: 26rpx;
|
||||
border-top-right-radius: 30rpx;
|
||||
border-bottom-right-radius: 30rpx;
|
||||
border: 1px solid #2f3560;
|
||||
}
|
||||
.active{
|
||||
background-color: #2c365b;
|
||||
}
|
||||
.echarts-data{
|
||||
width: 100%;
|
||||
height: 620rpx;
|
||||
}
|
|
@ -123,6 +123,7 @@ Page({
|
|||
url: '../check_accept_list/index',
|
||||
})
|
||||
}else{
|
||||
wx.setStorageSync('nav-menu', "gd");
|
||||
wx.navigateTo({
|
||||
url: event.currentTarget.dataset.url
|
||||
})
|
||||
|
@ -169,10 +170,9 @@ Page({
|
|||
|
||||
//跳转到安全管理
|
||||
XMSP:function(){
|
||||
app.toast("敬请期待!");
|
||||
// wx.redirectTo({
|
||||
// url:'../Quality-Assurance/index'
|
||||
// })
|
||||
wx.redirectTo({
|
||||
url:'../safety_manage/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到质量管理
|
||||
|
@ -211,7 +211,7 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
onClose1() {
|
||||
onClosePopup() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 左侧账号信息 -->
|
||||
<van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onClose1" >
|
||||
<van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onClosePopup" >
|
||||
<view class="left_max">
|
||||
<van-row class="demo clearfix">
|
||||
<van-col span="24">
|
||||
|
|
|
@ -1,236 +1,20 @@
|
|||
// pages/Standard-maintenance-room-monitoring/index.js
|
||||
const app = getApp();
|
||||
// pages/hnt-strong/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
projectId:'',
|
||||
startTime:"",
|
||||
endTime:"",
|
||||
startTime2:"",
|
||||
endTime2:"",
|
||||
deviceNo:"1650041930114977794",
|
||||
jianceList: [
|
||||
{text:'1650041930114977794',id:'1650041930114977794'},
|
||||
{text:'1650042067465850882',id:'1650042067465850882'},
|
||||
{text:'1650042162466836481',id:'1650042162466836481'},
|
||||
{text:'1650042250748547074',id:'1650042250748547074'}
|
||||
],
|
||||
indexNum: 0,
|
||||
biaoyangList: [
|
||||
{ name: '内置平均温度', biaoyangX: [], biaoyangY: [] },
|
||||
{ name: '外置平均温度', biaoyangX: [], biaoyangY: [] },
|
||||
|
||||
],
|
||||
value:'本月',
|
||||
value1:'本月',
|
||||
actions: [{ name: '本月',id:0 }, { name: '累计', id:1},],
|
||||
actions1: [{ name: '本月',id:0 }, { name: '累计', id:1},],
|
||||
indexNum2: 0,
|
||||
biaoyangList2: [
|
||||
{ name: '内置成熟度', biaoyangX: [], biaoyangY: [] },
|
||||
{ name: '外置成熟度', biaoyangX: [], biaoyangY: [] },
|
||||
{ name: '内置强度', biaoyangX: [], biaoyangY: [] },
|
||||
{ name: '外置强度', biaoyangX: [], biaoyangY: [] },
|
||||
],
|
||||
},
|
||||
// 点击进行超耗tab切换
|
||||
onSelect(e) {
|
||||
if(e.currentTarget.dataset.set ==0){
|
||||
this.setData({
|
||||
startTime:this.getDate(-6,1),
|
||||
endTime:this.getDate(0,2),
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
startTime:this.getDate(-29,1),
|
||||
endTime:this.getDate(0,2),
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
indexNum: e.currentTarget.dataset.set,
|
||||
})
|
||||
this.runList();
|
||||
},
|
||||
showPopup() {
|
||||
this.setData({ show: true });
|
||||
},
|
||||
onClick(){
|
||||
this.setData({
|
||||
show1:true
|
||||
})
|
||||
},
|
||||
onClick1(){
|
||||
this.setData({
|
||||
show2:true
|
||||
})
|
||||
},
|
||||
onClose(){
|
||||
this.setData({
|
||||
show:false,
|
||||
show1:false,
|
||||
show2:false
|
||||
})
|
||||
},
|
||||
goGCLB:function(){
|
||||
wx.redirectTo({
|
||||
url: '../../pages/Quality-Assurance/index'
|
||||
})
|
||||
},
|
||||
onSelect1(e) {
|
||||
if(e.currentTarget.dataset.set ==0){
|
||||
this.setData({
|
||||
startTime2:this.getDate(-6,1),
|
||||
endTime2:this.getDate(0,2),
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
startTime2:this.getDate(-29,1),
|
||||
endTime2:this.getDate(0,2),
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
indexNum2: e.currentTarget.dataset.set,
|
||||
})
|
||||
this.runList2();
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.userName,
|
||||
projectId:app.globalData.projectId,
|
||||
projectNameArgs:app.globalData.projectName,
|
||||
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
|
||||
})
|
||||
this.getProjectCorrespondence(app.globalData.projectId)
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
startTime:this.getDate(-6,1),
|
||||
endTime:this.getDate(0,2),
|
||||
startTime2:this.getDate(-6,1),
|
||||
endTime2:this.getDate(0,2),
|
||||
})
|
||||
this.getProjectCorrespondence();
|
||||
},
|
||||
getDate(num,type){
|
||||
var date = new Date(new Date().getTime()+num*24*60*60*1000);
|
||||
var year = date.getFullYear();
|
||||
var month = (date.getMonth()+1) > 9 ? (date.getMonth()+1):'0'+(date.getMonth()+1)
|
||||
var day = date.getDate() > 9 ? date.getDate():'0'+date.getDate()
|
||||
return year+"-"+month+"-"+day+(type==1?" 00:00:00":" 23:59:59");
|
||||
},
|
||||
/**
|
||||
* 项目对应关系
|
||||
*/
|
||||
getProjectCorrespondence() {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/weixin/training/getProjectCorrespondence',
|
||||
data: {
|
||||
"projectId": 3//app.globalData.projectId,
|
||||
},
|
||||
method: "get",
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
projectId :res.data.szh
|
||||
})
|
||||
that.runList();
|
||||
that.runList2();
|
||||
}
|
||||
})
|
||||
},
|
||||
runList() {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.szhUrl + '/api/iot/power/gainHntRunList',
|
||||
data: {
|
||||
"projectId": '1649949529732075522',
|
||||
"startTime": that.data.startTime,
|
||||
"endTime": that.data.endTime,
|
||||
"deviceNo": that.data.deviceNo
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
method: "post",
|
||||
success: function (res) {
|
||||
var data = {}
|
||||
data.lineData = []
|
||||
data.color = ['#008ffd', '#f6d023']
|
||||
data.legend = ['内置平均温度', '外置平均温度']
|
||||
data.unit = '℃'
|
||||
data.date = []
|
||||
var data1 = []
|
||||
var data2 = []
|
||||
|
||||
for (let row of res.data.data) {
|
||||
data.date.push(row.add_time.substr(0, 14) + "00");
|
||||
data1.push(row.min_temp)
|
||||
data2.push(row.max_temp)
|
||||
}
|
||||
data.lineData.push(data1)
|
||||
data.lineData.push(data2)
|
||||
that.setData({
|
||||
biaoyangList: data,
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
runList2() {
|
||||
var that = this;
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.szhUrl + '/api/iot/power/gainHntRunList',
|
||||
data: {
|
||||
"projectId": '1649949529732075522',
|
||||
"startTime": that.data.startTime,
|
||||
"endTime": that.data.endTime,
|
||||
"deviceNo": that.data.deviceNo
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
method: "post",
|
||||
success: function (res) {
|
||||
var data = {}
|
||||
data.lineData = []
|
||||
data.color = ['#008ffd', '#f6d023', '#5af9fd', '#fc6902']
|
||||
data.legend = ['内置成熟度', '外置成熟度','内置强度','外置强度']
|
||||
data.unit = '%RH'
|
||||
data.date = []
|
||||
var data1 = []
|
||||
var data2 = []
|
||||
var data3 = []
|
||||
var data4 = []
|
||||
for (let row of res.data.data) {
|
||||
data.date.push(row.add_time.substr(0, 14) + "00");
|
||||
data1.push(row.strength)
|
||||
data2.push(row.current_stre_outside)
|
||||
data3.push(row.marturity)
|
||||
data4.push(row.marturity_outside)
|
||||
}
|
||||
data.lineData.push(data1)
|
||||
data.lineData.push(data2)
|
||||
data.lineData.push(data3)
|
||||
data.lineData.push(data4)
|
||||
that.setData({
|
||||
biaoyangList2: data,
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
@ -278,14 +62,5 @@ Page({
|
|||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
|
||||
getData1(e){
|
||||
this.setData({
|
||||
deviceNo:e.detail.text
|
||||
})
|
||||
this.runList();
|
||||
this.runList2();
|
||||
|
||||
}
|
||||
})
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-action-sheet": "@vant/weapp/action-sheet"
|
||||
},
|
||||
"navigationBarTitleText": "混凝土强度监测"
|
||||
}
|
|
@ -1,91 +1,2 @@
|
|||
<!--pages/Standard-maintenance-room-monitoring/index.wxml-->
|
||||
<!-- 标养室监测 -->
|
||||
<!-- <view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<view class="header_img" bindtap="showPopup"><image src="/images/core.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="goGCLB">
|
||||
<image src="/images/left.png"></image>
|
||||
<text class="header_fh">返回</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="10">
|
||||
<view class="header_name">混凝土强度监测</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onClose" >
|
||||
<view class="left_max">
|
||||
<van-row class="demo clearfix">
|
||||
<van-col span="10">
|
||||
<view class="left_head"><image src="http://fileimg.makalu.cc/szgl/9015e824c5004e629049c4f72967cfdc.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="14">
|
||||
<view class="left_info">
|
||||
<view class="left_info_name">{{userName}}</view>
|
||||
<view class="left_info_name">{{loginName}}</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</van-popup> -->
|
||||
<view class="jiance" style="padding-top: 30rpx;">
|
||||
<!-- nav头部分 -->
|
||||
<view class="nav-jiance" style="margin-bottom: 60rpx;">
|
||||
<voucher-select background="#2b345b" columns="{{jianceList}}" placeholder="" bindchange="getData1"></voucher-select>
|
||||
</view>
|
||||
<!-- 监测内容 -->
|
||||
<view class="jiance-content">
|
||||
<!-- 头部 -->
|
||||
<view class="header-cailiao">
|
||||
<!-- 头部左边 -->
|
||||
<view class="eharts_title">
|
||||
温度趋势
|
||||
</view>
|
||||
<!-- 头部右边 -->
|
||||
<!-- <view class="header-cailiao-right">
|
||||
<view class="{{indexNum==0?'header-cailiao-right-left active':'header-cailiao-right-left'}}" data-set="{{0}}" bindtap="onClick">
|
||||
近七天
|
||||
</view>
|
||||
<view class="{{indexNum==1?'header-cailiao-right-right active':'header-cailiao-right-right'}}" data-set="{{1}}" bindtap="onClick">
|
||||
近30天
|
||||
</view>
|
||||
</view> -->
|
||||
<text class="hj_float" bindtap="onClick" style="margin-left: 256rpx;">{{value}} </text>
|
||||
<van-action-sheet show="{{ show1 }}" actions="{{ actions }}" bind:close="onClose" bind:select="onSelect" />
|
||||
</view>
|
||||
<!-- 数据图展示 -->
|
||||
<view class="jiance-echarts">
|
||||
<curve-echarts-copy chart-id="chartData" chart-data="{{biaoyangList}}" title="单位:℃"></curve-echarts-copy>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 监测内容 -->
|
||||
<view class="jiance-content">
|
||||
<!-- 头部 -->
|
||||
<view class="header-cailiao">
|
||||
<!-- 头部左边 -->
|
||||
<view class="eharts_title">
|
||||
成熟度趋势
|
||||
</view>
|
||||
<!-- 头部右边 -->
|
||||
<!-- <view class="header-cailiao-right">
|
||||
<view class="{{indexNum2==0?'header-cailiao-right-left active':'header-cailiao-right-left'}}" data-set="{{0}}" bindtap="onClick1">
|
||||
近七天
|
||||
</view>
|
||||
<view class="{{indexNum2==1?'header-cailiao-right-right active':'header-cailiao-right-right'}}" data-set="{{1}}" bindtap="onClick1">
|
||||
近30天
|
||||
</view>
|
||||
</view> -->
|
||||
<text class="hj_float" bindtap="onClick1" style="margin-left: 256rpx;">{{value1}} </text>
|
||||
<van-action-sheet show="{{ show2 }}" actions="{{ actions1 }}" bind:close="onClose" bind:select="onSelect1" />
|
||||
</view>
|
||||
<!-- 数据图展示 -->
|
||||
<view class="jiance-echarts">
|
||||
<curve-echarts-copy chart-id="chartData" chart-data="{{biaoyangList2}}" title="单位:%RH"></curve-echarts-copy>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--pages/hnt-strong/index.wxml-->
|
||||
<text>pages/hnt-strong/index.wxml</text>
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
/* pages/Standard-maintenance-room-monitoring/index.wxss */
|
||||
/* 标养室监测 */
|
||||
.jiance{
|
||||
padding: 60rpx 40rpx 30rpx;
|
||||
}
|
||||
/* 监测-nav */
|
||||
.nav-jiance{
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
}
|
||||
.jiance-content{
|
||||
width: 100%;
|
||||
border: 1px solid #1e2336;
|
||||
background-color: #1e2336;
|
||||
padding-top: 20rpx;
|
||||
margin-bottom: 40rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.header-cailiao{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.eharts_title{
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
padding-left: 50rpx;
|
||||
margin-left: 20rpx;
|
||||
background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx;
|
||||
}
|
||||
.header-cailiao-right{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 300rpx;
|
||||
height: 80rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgb(155, 154, 154);
|
||||
}
|
||||
.header-cailiao-right-left{
|
||||
width: 120rpx;
|
||||
height: 46rpx;
|
||||
line-height: 46rpx;
|
||||
text-align: center;
|
||||
border-top-left-radius: 36rpx;
|
||||
border-bottom-left-radius: 36rpx;
|
||||
border: 1px solid #2e355f;
|
||||
}
|
||||
.header-cailiao-right-right{
|
||||
width: 120rpx;
|
||||
height: 46rpx;
|
||||
line-height: 46rpx;
|
||||
text-align: center;
|
||||
border-top-right-radius: 36rpx;
|
||||
border-bottom-right-radius: 36rpx;
|
||||
border: 1px solid #2e355f;
|
||||
}
|
||||
.active{
|
||||
color: #fff;
|
||||
background-color: #2e355f;
|
||||
}
|
||||
/* 展示数据echarts图 */
|
||||
.jiance-echarts{
|
||||
width: 100%;
|
||||
/* height: 600rpx; */
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
}
|
|
@ -5,19 +5,14 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
szhprojectId:"",
|
||||
smzProjectId:""
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {szhprojectId,smzProjectId} = options
|
||||
this.setData({
|
||||
szhprojectId,
|
||||
smzProjectId
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -67,22 +62,5 @@ Page({
|
|||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
/**
|
||||
* 确认绑定
|
||||
*/
|
||||
affirmBind(){
|
||||
let { szhprojectId,smzProjectId} = this.data
|
||||
wx.navigateTo({
|
||||
url: `../saft-education-user-bind/index?szhprojectId=${szhprojectId}&smzProjectId=${smzProjectId}`,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 取消绑定
|
||||
*/
|
||||
cancelBind(){
|
||||
wx.redirectTo({
|
||||
url: '../gengduogongneng/gengduogongneng'
|
||||
})
|
||||
}
|
||||
})
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "安全学习确认"
|
||||
}
|
|
@ -1,20 +1,2 @@
|
|||
<!-- 学习绑定 -->
|
||||
<view class="learn-binding">
|
||||
<!-- 头像部分 172-->
|
||||
<view class="learn-header">
|
||||
<image src="http://fileimg.makalu.cc/WEB_77C2BB6ECBEA4F39B7E22CF5E96DB652.png" mode=""/>
|
||||
</view>
|
||||
<!-- 文字部分 -->
|
||||
<view style="font-size:26rpx;margin-top: 88rpx;margin-bottom: 168rpx;">
|
||||
您暂未绑定,请先进行基本信息绑定
|
||||
</view>
|
||||
<!-- 底部部分 -->
|
||||
<view class="learn-footer" style="display: flex;flex-direction: column;justify-content: space-between;align-items: center;">
|
||||
<view bindtap="affirmBind" style="width:416rpx;height:88rpx;display: flex;justify-content: center;align-items: center;border-radius: 50rpx;background-color: #523fa8;">
|
||||
立即绑定
|
||||
</view>
|
||||
<view bindtap="cancelBind" style="color: #848fce;">
|
||||
返回
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--pages/learn-page/index.wxml-->
|
||||
<text>pages/learn-page/index.wxml</text>
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
/* 学习绑定界面 */
|
||||
.learn-binding{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
/* 头部部分 */
|
||||
.learn-header{
|
||||
width: 344rpx;
|
||||
height: 344rpx;
|
||||
margin-top: 88rpx;
|
||||
}
|
||||
.learn-header image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
/* 底部部分 */
|
||||
.learn-footer{
|
||||
width: 100%;
|
||||
height: 164rpx;
|
||||
}
|
|
@ -5,7 +5,7 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
initData: { text: '请选择你的项目', id: 0 }
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "测量仪器"
|
||||
}
|
|
@ -1,261 +1,2 @@
|
|||
<!-- 测量页面 -->
|
||||
<view class="max_new_content">
|
||||
<!-- 头部筛选 -->
|
||||
<view class="content" style="margin-top: 34rpx;">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
</view>
|
||||
<!-- 数据回显 -->
|
||||
<view class="outside-content">
|
||||
<!-- 每一个数据框 -->
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
仪器名称:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
使用状态:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
管理编号:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
规则型号:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
购买日期:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
原值:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
净值:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
附属设备:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
标称精度:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
生产厂家:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
出厂编号:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
检定日期:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
检定周期(月):
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
检定有效截至日期:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
检定有效期:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
检定单位:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
检定结论:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
检定证书编号:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox" style="height: 180rpx;justify-content: flex-start;display: flex;align-items: center;">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
检定证书文件上传(PDF/图片):
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-file">
|
||||
+
|
||||
<textarea value="" style="width: 100%;height: 100%;"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
使用单位:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
是否可调拨:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
<view class="every-shujubox">
|
||||
<view class="left-shujubox">
|
||||
<view class="leftStyle">
|
||||
*
|
||||
</view>
|
||||
<view>
|
||||
备注:
|
||||
</view>
|
||||
</view>
|
||||
<input type="text" class="right-shujubox"/>
|
||||
</view>
|
||||
|
||||
<view class="switch_button">
|
||||
<button class="switch_button_down" bindtap="onClickDown">取消</button>
|
||||
<button class="switch_button_to" bindtap="onClickTo">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--pages/measures/index.wxml-->
|
||||
<text>pages/measures/index.wxml</text>
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
/* 测量仪器 */
|
||||
.outside-content{
|
||||
margin-top: 70rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.every-shujubox{
|
||||
margin: 30rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
}
|
||||
.left-shujubox{
|
||||
display: flex;
|
||||
/* justify-content: flex-end; */
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 260rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
.leftStyle{
|
||||
color: red;
|
||||
}
|
||||
.right-shujubox{
|
||||
width: 380rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.right-file{
|
||||
height: 180rpx;
|
||||
width: 180rpx;
|
||||
border: 1px solid #fff;
|
||||
margin-left: 46rpx;
|
||||
border-radius: 12rpx;
|
||||
text-align: center;
|
||||
line-height: 180rpx;
|
||||
font-size: 120rpx;
|
||||
}
|
|
@ -1,336 +1,66 @@
|
|||
// pages/new-map/map.js
|
||||
const app = getApp();
|
||||
// pages/ranyuanguanli-map/map.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
currentId: '', //传值与list id 相同
|
||||
showPopup: false,
|
||||
bottom: "500rpx",
|
||||
showUp: false,
|
||||
longitude:'',
|
||||
latitude:'',
|
||||
markers: [],
|
||||
userLongitude:'',
|
||||
userLatitude:'',
|
||||
userMarkers:[],
|
||||
list:[],
|
||||
lists:[],
|
||||
userHatId:'',
|
||||
//页面跳转参数
|
||||
loginName:'',
|
||||
userName:'',
|
||||
projectId:'',
|
||||
projectName:'' ,
|
||||
index:'',
|
||||
userLocationList:{},
|
||||
active1:true,
|
||||
active2:false,
|
||||
active3:false,
|
||||
ryshow:false,
|
||||
},
|
||||
onClickShow() {
|
||||
this.setData({ ryshow: true });
|
||||
},
|
||||
onClickHide() {
|
||||
this.setData({ ryshow: false });
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
upward() {
|
||||
this.setData({ showUp: true });
|
||||
this.setData({ bottom: "500rpx" });
|
||||
let userLocationList = this.data.userLocationList;
|
||||
this.selectUserHardHatById(userLocationList[0].id,userLocationList)
|
||||
},
|
||||
downward() {
|
||||
this.setData({ showUp: false });
|
||||
this.setData({ bottom: "50rpx" });
|
||||
},
|
||||
},
|
||||
|
||||
showPopup() {
|
||||
this.setData({ showPopup: true });
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
onClose() {
|
||||
this.setData({ showPopup: false });
|
||||
},
|
||||
},
|
||||
|
||||
selectList(){
|
||||
this.setData({ showPopup: false });
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
showActive:function(event){
|
||||
this.onClickShow();
|
||||
var type = event.currentTarget.dataset.type;
|
||||
if(type =="1"){
|
||||
this.setData({
|
||||
active1:true,
|
||||
active2:false,
|
||||
active3:false,
|
||||
showUp: false,
|
||||
currentId:''
|
||||
})
|
||||
//查询当天工时排行
|
||||
this.selectUserAttendance(this.data.projectId,"day");
|
||||
}else if(type == "2"){
|
||||
this.setData({
|
||||
active1:false,
|
||||
active2:true,
|
||||
active3:false,
|
||||
showUp: false,
|
||||
currentId:''
|
||||
})
|
||||
//查询本周工时排行
|
||||
this.selectUserAttendance(this.data.projectId,"week");
|
||||
}else{
|
||||
this.setData({
|
||||
active1:false,
|
||||
active2:false,
|
||||
active3:true,
|
||||
showUp: false,
|
||||
currentId:''
|
||||
})
|
||||
//查询本月工时排行
|
||||
this.selectUserAttendance(this.data.projectId,"month");
|
||||
}
|
||||
},
|
||||
|
||||
//页面初始化
|
||||
onLoad: function (options) {
|
||||
this.onClickShow();
|
||||
var that = this;
|
||||
//调用wx.getSystemInfo接口,然后动态绑定组件高度
|
||||
wx.getSystemInfo({
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
height: res.windowHeight
|
||||
})
|
||||
}
|
||||
}),
|
||||
//获取缓存中数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:function(res){
|
||||
that.setData({
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.userName,
|
||||
projectId:app.globalData.projectId,
|
||||
projectName:app.globalData.projectName,
|
||||
index:options.index,
|
||||
userLocationList:JSON.parse(options.userLocationList),
|
||||
userHatId:options.id,
|
||||
currentId:options.id,
|
||||
})
|
||||
}
|
||||
})
|
||||
//页面初始化判断页面显示
|
||||
if(options.skipState =="1"){
|
||||
this.setData({ showUp: true })
|
||||
//查询单个人员安全帽信息
|
||||
this.selectUserHardHatById(options.id,JSON.parse(options.userLocationList));
|
||||
}else{
|
||||
this.setData({ showPopup:true })
|
||||
}
|
||||
|
||||
//判断列表今日、本周、本月显示
|
||||
that.decideData(options.state);
|
||||
//获取当天的工时排行
|
||||
that.selectUserAttendance(app.globalData.projectId,options.state,options.skipState);
|
||||
},
|
||||
|
||||
//根据id查询安全帽数据
|
||||
selectUserHardHatById:function(id,userLocationList){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/userinfo/selectUserHardhatById',
|
||||
data:{
|
||||
"id":id
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
that.onClickHide();
|
||||
if(res.data.length>0){
|
||||
var markers = [];
|
||||
for(var i=0;i<userLocationList.length;i++){
|
||||
if(userLocationList[i].id == res.data[0].id){
|
||||
var marker = {id:res.data[0].id,projectId:res.data[0].projectId,longitude:res.data[0].longitude,latitude:res.data[0].latitude,projectName:res.data[0].projectName,iconPath:"http://fileimg.makalu.cc/051dbbe42b9542568665033cd8a35aea.png",width: 40, height: 40};
|
||||
markers.push(marker);
|
||||
}else{
|
||||
var marker = {id:userLocationList[i].id,projectId:userLocationList[i].projectId,longitude:userLocationList[i].longitude,latitude:userLocationList[i].latitude,projectName:userLocationList[i].projectName
|
||||
}
|
||||
markers.push(marker);
|
||||
}
|
||||
}
|
||||
that.setData({
|
||||
list:res.data,
|
||||
markers:markers,
|
||||
longitude:res.data[0].longitude,
|
||||
latitude:res.data[0].latitude,
|
||||
userLongitude:res.data[0].longitude,
|
||||
userLatitude:res.data[0].latitude,
|
||||
userMarkers:markers,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//工时排行
|
||||
selectUserAttendance:function(projectId,state,skipState){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/userinfo/selectUserAttendance',
|
||||
data:{
|
||||
"projectId":projectId,
|
||||
"state":state
|
||||
},
|
||||
method:"GET",
|
||||
success:function(gsph){
|
||||
that.onClickHide();
|
||||
if(gsph.data.userLocationList.length >0){
|
||||
var markers = [];
|
||||
var userLocationList = gsph.data.userLocationList;
|
||||
for(var i=0;i<userLocationList.length;i++){
|
||||
if(userLocationList[i].id == that.data.userHatId){
|
||||
var marker = {id:userLocationList[0].id,projectId:userLocationList[0].projectId,longitude:userLocationList[0].longitude,latitude:userLocationList[0].latitude,projectName:userLocationList[0].projectName,iconPath:"http://fileimg.makalu.cc/051dbbe42b9542568665033cd8a35aea.png",width: 40, height: 40};
|
||||
markers.push(marker);
|
||||
}else{
|
||||
var marker = {id:userLocationList[i].id,projectId:userLocationList[i].projectId,longitude:userLocationList[i].longitude,latitude:userLocationList[i].latitude,projectName:userLocationList[i].projectName
|
||||
}
|
||||
markers.push(marker);
|
||||
}
|
||||
}
|
||||
if(skipState == "1"){
|
||||
that.setData({
|
||||
lists:gsph.data.userLocationList,
|
||||
userLocationList:gsph.data.userLocationList,
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
lists:gsph.data.userLocationList,
|
||||
userLocationList:gsph.data.userLocationList,
|
||||
markers:markers,
|
||||
longitude:gsph.data.userLocationList[0].longitude,
|
||||
latitude:gsph.data.userLocationList[0].latitude,
|
||||
})
|
||||
}
|
||||
}else{
|
||||
that.setData({
|
||||
lists:[],
|
||||
markers:[],
|
||||
longitude:'',
|
||||
latitude:'',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//判断列表显示
|
||||
decideData:function(event){
|
||||
if(event == "day"){
|
||||
this.setData({
|
||||
active1:true,
|
||||
active2:false,
|
||||
active3:false,
|
||||
})
|
||||
}else if(event == "week"){
|
||||
this.setData({
|
||||
active1:false,
|
||||
active2:true,
|
||||
active3:false,
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
active1:false,
|
||||
active2:false,
|
||||
active3:true,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
///向左切换人员数据
|
||||
changeLeftData:function(event){
|
||||
var userLocationList = this.data.userLocationList;
|
||||
if(this.data.index == "0"){
|
||||
app.toast("已经到头了,无法进行点击");
|
||||
}else{
|
||||
this.selectUserHardHatById(userLocationList[this.data.index-1].id,this.data.userLocationList);
|
||||
this.setData({
|
||||
currentId:userLocationList[this.data.index-1].id,
|
||||
index:this.data.index-1
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//向右切换
|
||||
changeRightData:function(event){
|
||||
var userLocationList = this.data.userLocationList;
|
||||
if(this.data.index == (userLocationList.length-1)){
|
||||
app.toast("已经到头了,无法进行点击");
|
||||
}else{
|
||||
this.selectUserHardHatById(userLocationList[(this.data.index-1+2)].id,this.data.userLocationList);
|
||||
this.setData({
|
||||
currentId:userLocationList[(this.data.index-1+2)].id,
|
||||
index:this.data.index-1+2
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//点击列表数据查看
|
||||
skipUserMap:function(event){
|
||||
//查询单个数据
|
||||
this.selectUserHardHatById(event.currentTarget.dataset.itemid,this.data.userLocationList);
|
||||
this.setData({
|
||||
currentId:event.currentTarget.dataset.itemid,
|
||||
index:event.currentTarget.dataset.index,
|
||||
showUp: true
|
||||
})
|
||||
},
|
||||
|
||||
//获取人员定位
|
||||
userLocation:function(event){
|
||||
this.setData({
|
||||
longitude:this.data.userLongitude,
|
||||
latitude:this.data.userLatitude,
|
||||
markers:this.data.userMarkers
|
||||
})
|
||||
},
|
||||
|
||||
//获取个人定位
|
||||
personalLocation:function(even){
|
||||
this.setData({
|
||||
longitude:app.globalData.initialLon,
|
||||
latitude:app.globalData.initialLat,
|
||||
markers:app.globalData.markers,
|
||||
})
|
||||
},
|
||||
|
||||
//点击定位点查询数据
|
||||
getListById:function(event){
|
||||
//查询单个数据
|
||||
this.selectUserHardHatById(event.markerId,this.data.userLocationList);
|
||||
var markers = this.data.markers;
|
||||
var index = "";
|
||||
for(var i = 0;i<markers.length;i++){
|
||||
if(markers[i].id == event.markerId){
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
currentId:event.markerId,
|
||||
index:index,
|
||||
showUp: true
|
||||
})
|
||||
},
|
||||
|
||||
//返回到人员管理页面
|
||||
goRYGL:function(){
|
||||
wx.redirectTo({
|
||||
url: '../renyuanguanli/renyuanguanli'
|
||||
})
|
||||
}
|
||||
})
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-row": "@vant/weapp/row",
|
||||
"van-col": "@vant/weapp/col",
|
||||
"van-popup": "@vant/weapp/popup",
|
||||
"van-picker": "@vant/weapp/picker",
|
||||
"van-area": "@vant/weapp/area",
|
||||
"van-tag": "@vant/weapp/tag",
|
||||
"van-transition": "@vant/weapp/transition",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -1,199 +1,2 @@
|
|||
<view class="header_title">
|
||||
<view class="">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="goRYGL">
|
||||
<image src="/images/left.png"></image>
|
||||
<text class="header_fh">返回</text>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<map class="map"
|
||||
id="map" scale="16"
|
||||
latitude="{{latitude}}" longitude="{{longitude}}"
|
||||
markers="{{markers}}"
|
||||
style="width: 100%; height: {{height}}px;"
|
||||
bindmarkertap="getListById"
|
||||
bindcallouttap="controltap"
|
||||
subkey="A2GBZ-AGALG-MP2QK-IJGFW-MRU36-4SF4O"
|
||||
bindtap="checkMap"></map>
|
||||
</view>
|
||||
|
||||
<view class="map_address">
|
||||
<view class="map_add">
|
||||
{{projectName}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="map_left" style="bottom:{{ bottom }}">
|
||||
<view class="map_left_img">
|
||||
<image src="/images/i_location.png" bindtap="personalLocation"></image>
|
||||
</view>
|
||||
<view class="map_left_img">
|
||||
<image src="/images/i_personnel.png" bindtap="userLocation"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="map_right" style="bottom:{{ bottom }}">
|
||||
<view class="map_right_img">
|
||||
<view class="map_right_zi" bindtap="upward">
|
||||
<image src="/images/img_11.png"></image>
|
||||
刷新
|
||||
</view>
|
||||
</view>
|
||||
<view class="map_right_img">
|
||||
<view class="map_right_zi" is-link bindtap="showPopup" >
|
||||
<image src="/images/img_12.png"></image>
|
||||
列表
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-transition name="fade-up" show="{{ showUp }}">
|
||||
<view class="sliding_up" wx:for="{{list}}">
|
||||
<view class="sliding_up_btn">
|
||||
<view bindtap="downward">
|
||||
<image src="/images/sliding_up.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sliding_up_content">
|
||||
|
||||
<view class="sliding_up_top">
|
||||
<view class="ranking_middle_quantity">
|
||||
<view class="ranking_middle_img {{item.batteryPercent > 20 ? 'ranking_green' :'ranking_red' }}">
|
||||
<view class="battery">
|
||||
<view class="{{item.batteryPercent > 20 ? 'green_battery' :'red_battery'}}" style="width:{{item.batteryPercent}}%">
|
||||
<!-- 电池 -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ranking_middle_quantity_proportion {{item.batteryPercent > 20 ? 'number_green' :'number_red' }}">{{item.batteryPercent}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="sliding_up_middle">
|
||||
<van-row>
|
||||
<van-col span="2">
|
||||
<view class="sliding_up_middle_left">
|
||||
<image src="/images/middle_left.png" bindtap="changeLeftData"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="4">
|
||||
<view class="sliding_up_middle_head">
|
||||
<image src="{{item.userphoto}}"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="16">
|
||||
<view class="sliding_up_middle_center">
|
||||
<view class="ranking_middle_name">
|
||||
{{item.name}} <text> ({{item.workType}})</text>
|
||||
<van-tag mark type="{{item.onlineEvent == '在线' ?'success':'danger'}}">{{item.onlineEvent}}</van-tag>
|
||||
</view>
|
||||
<view class="ranking_middle_company">
|
||||
{{item.uninName}}
|
||||
</view>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="2">
|
||||
<view class="sliding_up_middle_right">
|
||||
<image src="/images/middl_right.png" bindtap="changeRightData"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="sliding_up_bottom">
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="sliding_up_bottom_title">
|
||||
今日工时:<text>{{item.sc}}</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="sliding_up_bottom_title">
|
||||
本月出勤:<text>{{item.attenCount}}天</text>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<view class="sliding_up_bottom_info">
|
||||
项目名称:<text>{{item.projectName}}</text>
|
||||
</view>
|
||||
<view class="sliding_up_bottom_info">
|
||||
定位时间:<text>{{item.time}}</text>
|
||||
</view>
|
||||
<view class="sliding_up_bottom_address">
|
||||
{{item.projectAddress}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-transition>
|
||||
|
||||
|
||||
<van-popup show="{{ showPopup }}" round position="bottom" custom-style="height: 930rpx" bind:close="onClose">
|
||||
<view class="lits_content">
|
||||
<van-row>
|
||||
<van-col span="8" bindtap="showActive" data-type="1">
|
||||
<view class="list_screen {{active1 ?'active':''}}">今日</view>
|
||||
</van-col>
|
||||
<van-col span="8" bindtap="showActive" data-type="2">
|
||||
<view class="list_screen {{active2 ?'active':''}}">本周</view>
|
||||
</van-col>
|
||||
<van-col span="8" bindtap="showActive" data-type="3">
|
||||
<view class="list_screen {{active3 ?'active':''}}">本月</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<view class="ranking_max">
|
||||
<view class="ranking_min {{currentId == item.id ?'active':' '}}" wx:for="{{lists}}" bindtap="selectList">
|
||||
<van-row bindtap="skipUserMap" data-itemid="{{item.id}}" data-index="{{index}}">
|
||||
<van-col span="3">
|
||||
<view class="ranking_left">
|
||||
<text>{{index}}</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="21">
|
||||
<view class="ranking_middle">
|
||||
<view class="ranking_middle_name">
|
||||
{{item.name}} <text> {{item.workType}} </text>
|
||||
<van-tag mark type="{{item.onlineEvent == '在线' ?'success':'danger'}}">{{item.onlineEvent}}</van-tag>
|
||||
<view class="ranking_middle_quantity">
|
||||
<view class="ranking_middle_img {{item.batteryPercent > 20 ? 'ranking_green' :'ranking_red' }} ">
|
||||
<view class="battery">
|
||||
<view class="{{item.batteryPercent > 20 ? 'green_battery' :'red_battery'}}" style="width:{{item.batteryPercent}}%">
|
||||
<!-- 电池 -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ranking_middle_quantity_proportion {{item.batteryPercent > 20 ? 'number_green' :'number_red' }} ">{{item.batteryPercent}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ranking_middle_company">
|
||||
{{item.uninName}}
|
||||
</view>
|
||||
<view class="ranking_middle_days">
|
||||
本月出勤:<text>{{item.attenCount}}</text> 天
|
||||
<view class="ranking_middle_time">{{item.sc}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
<van-overlay show="{{ryshow}}">
|
||||
<view class="gif">
|
||||
<image src="../../images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--pages/ranyuanguanli-map/map.wxml-->
|
||||
<text>pages/ranyuanguanli-map/map.wxml</text>
|
||||
|
|
|
@ -1,277 +0,0 @@
|
|||
/* pages/new-map/map.wxss */
|
||||
.map_address{
|
||||
width: 90%;
|
||||
position: absolute;
|
||||
top: 196rpx;
|
||||
left: 5%;
|
||||
color: #8aa3ec;
|
||||
background: url("http://fileimg.makalu.cc/CORE_1F1F3A2778334D3EAC1226DDCEBD48D0.png") no-repeat left/40rpx;
|
||||
}
|
||||
.map_add{
|
||||
padding-left: 50rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.map_left{
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
}
|
||||
.map_right{
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
}
|
||||
.map_left_img{
|
||||
background: #333343;
|
||||
border-radius: 50%;
|
||||
height: 70rpx;
|
||||
width: 70rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.map_left_img image{
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
.map_left_img:active{
|
||||
background: #252530;
|
||||
}
|
||||
.map_right_img{
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.map_right_zi{
|
||||
height: 70rpx;
|
||||
background: #333343;
|
||||
width: 150rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
line-height: 70rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.map_right_zi image{
|
||||
width: 40rpx;
|
||||
height:40rpx;
|
||||
position: relative;
|
||||
top: 10rpx;
|
||||
}
|
||||
.map_right_zi:active{
|
||||
background: #252530;
|
||||
}
|
||||
/* 底部信息 */
|
||||
.sliding_up{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
}
|
||||
.sliding_up_btn view{
|
||||
width:150rpx;
|
||||
height: 40rpx;
|
||||
background: rgba(42,52,91,0.8);
|
||||
margin: auto;
|
||||
border-radius: 50rpx 50rpx 0 0;
|
||||
text-align: center;
|
||||
}
|
||||
.sliding_up_btn view image{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.sliding_up_content{
|
||||
background: rgba(42,52,91,0.8);
|
||||
height:460rpx;
|
||||
}
|
||||
.sliding_up_top{
|
||||
height:50rpx;
|
||||
}
|
||||
.sliding_up_middle{
|
||||
border-top: 2px solid #2e3e69;
|
||||
border-bottom: 2px solid #2e3e69;
|
||||
height: 120rpx;
|
||||
}
|
||||
.sliding_up_middle_left{
|
||||
padding-top: 25rpx;
|
||||
}
|
||||
.sliding_up_middle_left image{
|
||||
width: 50rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
.sliding_up_middle_right{
|
||||
padding-top: 25rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.sliding_up_middle_right image{
|
||||
width: 50rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
.sliding_up_middle_head{
|
||||
text-align: center;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
.sliding_up_middle_head image{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.ranking_middle_name{
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.ranking_middle_name text{
|
||||
color: #8aa3ec;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.ranking_middle_company{
|
||||
color: #8aa3ec;
|
||||
padding: 20rpx 0;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.ranking_middle_days{
|
||||
color: #8aa3ec;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.ranking_middle_days text{
|
||||
color: #00baff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.ranking_middle_time{
|
||||
float: right;
|
||||
font-size: 30rpx;
|
||||
color: #00baff;
|
||||
}
|
||||
.ranking_max{
|
||||
height:800rpx;
|
||||
overflow: auto;
|
||||
}
|
||||
.ranking_min{
|
||||
padding:15rpx 20rpx;
|
||||
border-radius: 5rpx;
|
||||
background-color: #272f51;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.ranking_min.active{
|
||||
border: 2px solid #4465a5;
|
||||
}
|
||||
|
||||
.ranking_left{
|
||||
height: 150rpx;
|
||||
line-height: 150rpx;
|
||||
padding-left: 5rpx;
|
||||
}
|
||||
.ranking_left text{
|
||||
padding: 0 15rpx;
|
||||
background: #00a0e9;
|
||||
font-size: 20rpx;
|
||||
border-radius: 5rpx;
|
||||
color: #191d28;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.sliding_up_middle_center{
|
||||
padding-top:18rpx;
|
||||
}
|
||||
.sliding_up_bottom{
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.sliding_up_bottom_title{
|
||||
text-align: center;
|
||||
padding: 10rpx 0;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.sliding_up_bottom_title text{
|
||||
color: #00baff;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.sliding_up_bottom_info{
|
||||
padding: 10rpx 40rpx;
|
||||
font-size: 24rpx;
|
||||
color: #8aa3ec;
|
||||
}
|
||||
.sliding_up_bottom_info text{
|
||||
color: #ffffff;
|
||||
}
|
||||
.sliding_up_bottom_address{
|
||||
color: #8aa3ec;
|
||||
font-size: 28rpx;
|
||||
padding: 10rpx 40rpx;
|
||||
}
|
||||
|
||||
|
||||
/* 电池 */
|
||||
.ranking_middle_quantity{
|
||||
float: right;
|
||||
font-size: 26rpx;
|
||||
width: 120rpx;
|
||||
padding-top: 15rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.ranking_middle_quantity_proportion{
|
||||
float: right;
|
||||
top: -6rpx;
|
||||
position: relative;
|
||||
}
|
||||
.ranking_middle_img{
|
||||
float: left;
|
||||
}
|
||||
.ranking_middle_img{
|
||||
width: 50rpx;
|
||||
height: 25rpx;
|
||||
}
|
||||
.ranking_green{
|
||||
background: url("http://fileimg.makalu.cc/CORE_56270CFFB87746E1968AF87C8D704B26.png") no-repeat left/100% 100%;
|
||||
}
|
||||
.ranking_red{
|
||||
background: url("http://fileimg.makalu.cc/CORE_3A01CFC1FDA540B6A29F8A9750A258B0.png") no-repeat left/100% 100%;
|
||||
}
|
||||
.battery{
|
||||
|
||||
width:85%;
|
||||
height: 22rpx;
|
||||
border-radius: 5rpx;
|
||||
padding: 2rpx;
|
||||
}
|
||||
.green_battery{
|
||||
background: #1ab800;
|
||||
height: 100%;
|
||||
}
|
||||
.red_battery{
|
||||
background: #fe1e00;
|
||||
width: 10%;
|
||||
height: 100%;
|
||||
}
|
||||
.number_red{
|
||||
color: #fe1e00;
|
||||
}
|
||||
.number_green{
|
||||
color: #1ab800;
|
||||
}
|
||||
|
||||
/* 列表 */
|
||||
.lits_content{
|
||||
padding:20rpx 30rpx 10rpx;
|
||||
}
|
||||
.list_screen{
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
color: #8aa3ec;
|
||||
}
|
||||
.list_screen.active{
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.van-tag--mark,.van-tag--mark:after {
|
||||
border-radius: 15rpx 0 15rpx 0 !important;
|
||||
position: relative;
|
||||
top: -5rpx;
|
||||
}
|
||||
|
||||
.van-popup{
|
||||
background: #232a44 !important;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,400 @@
|
|||
// pages/newAddPage/safetyManagement/index.js
|
||||
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
loginName:"",
|
||||
userName:"",
|
||||
deptId:"",
|
||||
deptName:"",
|
||||
projectName: '',
|
||||
projectId: '',
|
||||
//教育培训
|
||||
videoSurvey: [
|
||||
{ name: '应急演练', value: 0, prop: 0 },
|
||||
{ name: '专项培训', value: 0, prop: 0 }
|
||||
],
|
||||
trainList:[],
|
||||
trainTotal:0,
|
||||
emergencyDrillList:[],
|
||||
emergencyDrillTotal:0,
|
||||
//特种作业人员
|
||||
specialStatistics:[{name:'其它', value: 0, prop: 0 }],
|
||||
insuranceStatistics:[{name:'安责险', value: 0, prop: 0 },{name:'一切险', value: 0, prop: 0 }],
|
||||
deptWorksStatistics:[{name:'劳务人员', value: 0, prop: 0 },{name:'监理人员', value: 0, prop: 0 },{name:'总包人员', value: 0, prop: 0 }],
|
||||
securityCheck: {
|
||||
routineRectificationRate: 0, //常规整改率
|
||||
routineProblemTotal: 0,//常规问题总数
|
||||
routineCheckNumber: 0,//常规检查次数
|
||||
specialRectificationRate: 0, //专项整改率
|
||||
specialProblemTotal: 0,//专项问题总数
|
||||
specialCheckNumber: 0,//专项检查次数
|
||||
},
|
||||
menuList:[],
|
||||
},
|
||||
showPopup() {
|
||||
this.setData({ show: true });
|
||||
},
|
||||
onClose() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
onClickShow() {
|
||||
this.setData({ loadShow: true });
|
||||
},
|
||||
onClickHide() {
|
||||
this.setData({ loadShow: false });
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
onProjectSelect(e) {
|
||||
this.onClickShow();
|
||||
let projectId = e.detail.id;
|
||||
let projectName = e.detail.text;
|
||||
app.globalData.projectId = projectId;
|
||||
app.globalData.projectName = projectName;
|
||||
this.setData({
|
||||
projectId: projectId,
|
||||
projectName: projectName,
|
||||
})
|
||||
this.onLoad()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
var that = this
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: function (res) {
|
||||
console.log(res.data);
|
||||
that.setData({
|
||||
loginName: res.data.loginName,
|
||||
userName: res.data.userName,
|
||||
deptId: res.data.deptId,
|
||||
deptName:res.data.deptName,
|
||||
projectName: app.globalData.projectName,
|
||||
projectId: app.globalData.projectId,
|
||||
initData: { text: app.globalData.projectName, id: app.globalData.projectId }
|
||||
})
|
||||
that.selectMenuList(res.data.loginName);
|
||||
that.initPage(app.globalData.projectId);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化项目安全管理
|
||||
*/
|
||||
initPage(projectId) {
|
||||
this.getTrainList(projectId,0);
|
||||
this.getSecurityCheck(projectId);
|
||||
this.getSpecial(projectId);
|
||||
this.getDeptWorks(projectId);
|
||||
this.getPojectInsurance(projectId);
|
||||
//this.getTraining(projectId);
|
||||
this.getTrainList(projectId,1);
|
||||
},
|
||||
|
||||
selectMenuList:function(loginName){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/selectRoleMenuList',
|
||||
data:{
|
||||
username:loginName,
|
||||
type:"aq"
|
||||
},
|
||||
method:"get",
|
||||
success:function(res){
|
||||
res=res.data;
|
||||
if(res.code =='200'){
|
||||
that.setData({
|
||||
menuList:res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 教育培训
|
||||
*/
|
||||
getTraining(projectId) {
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectTrain/selectGroupCountByProjectId',
|
||||
data:{projectId:projectId},
|
||||
method:"get",
|
||||
success: res => {
|
||||
res = res.data;
|
||||
if(res.code == 200){
|
||||
let sum=0;
|
||||
res.data.forEach((it,idx)=>{
|
||||
sum+=it.total;
|
||||
});
|
||||
let videoSurvey=[];
|
||||
res.data.forEach((it,idx)=>{
|
||||
videoSurvey.push({ name: it.typeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)});
|
||||
});
|
||||
//数据绑定
|
||||
this.setData({
|
||||
videoSurvey
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 特种人员
|
||||
*/
|
||||
getSpecial(projectId) {
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectSpecial/selectGroupCountByProjectId',
|
||||
data:{projectId:projectId},
|
||||
method:"get",
|
||||
success: res => {
|
||||
res = res.data;
|
||||
if(res.code == 200){
|
||||
let sum=0;
|
||||
res.data.forEach((it,idx)=>{
|
||||
sum+=it.total;
|
||||
});
|
||||
let specialStatistics=[];
|
||||
res.data.forEach((it,idx)=>{
|
||||
specialStatistics.push({ name: it.typeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)});
|
||||
});
|
||||
//数据绑定
|
||||
this.setData({
|
||||
specialStatistics
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 专项培训&&应急演练
|
||||
*/
|
||||
getTrainList(projectId,type){
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectTrain/list',
|
||||
data:{projectId:projectId,trainType:type,deptId:0},
|
||||
method:"get",
|
||||
success: res => {
|
||||
res = res.data;
|
||||
if(res.code == 200){
|
||||
if(type=="1"){
|
||||
//数据绑定
|
||||
this.setData({
|
||||
emergencyDrillList: res.data,
|
||||
emergencyDrillTotal: res.data.length
|
||||
})
|
||||
}else{
|
||||
//数据绑定
|
||||
this.setData({
|
||||
trainList: res.data,
|
||||
trainTotal: res.data.length
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 项目人员
|
||||
*/
|
||||
getDeptWorks(projectId) {
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectDeptWroks/findSumByProjectId',
|
||||
data:{projectId:projectId},
|
||||
method:"get",
|
||||
success: res => {
|
||||
res = res.data;
|
||||
if(res.code == 200){
|
||||
if(res.data){
|
||||
let sum=0;
|
||||
let deptWorksStatistics=[];
|
||||
if(res.data.contractorPersonnel){
|
||||
sum+=res.data.contractorPersonnel;
|
||||
}
|
||||
if(res.data.servicePersonnel){
|
||||
sum+=res.data.servicePersonnel;
|
||||
}
|
||||
if(res.data.supervisorPersonnel){
|
||||
sum+=res.data.supervisorPersonnel;
|
||||
}
|
||||
if(res.data.servicePersonnel){
|
||||
deptWorksStatistics.push({ name: "劳务人员", value: res.data.servicePersonnel, prop: (res.data.servicePersonnel / sum * 100).toFixed(2)});
|
||||
}else{
|
||||
deptWorksStatistics.push({ name: "劳务人员", value: 0, prop: (0 / sum * 100).toFixed(2)});
|
||||
}
|
||||
if(res.data.supervisorPersonnel){
|
||||
deptWorksStatistics.push({ name: "监理人员", value: res.data.supervisorPersonnel, prop: (res.data.supervisorPersonnel / sum * 100).toFixed(2)});
|
||||
}else{
|
||||
deptWorksStatistics.push({ name: "监理人员", value: 0, prop: (0 / sum * 100).toFixed(2)});
|
||||
}
|
||||
if(res.data.contractorPersonnel){
|
||||
deptWorksStatistics.push({ name: "总包人员", value: res.data.contractorPersonnel, prop: (res.data.contractorPersonnel / sum * 100).toFixed(2)});
|
||||
}else{
|
||||
deptWorksStatistics.push({ name: "总包人员", value: 0, prop: (0 / sum * 100).toFixed(2)});
|
||||
}
|
||||
//数据绑定
|
||||
this.setData({
|
||||
deptWorksStatistics
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取项目保险数据
|
||||
*/
|
||||
getPojectInsurance(projectId){
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectInsurance/selectGroupCountByProjectId',
|
||||
data:{projectId:projectId},
|
||||
method:"get",
|
||||
success: res => {
|
||||
res = res.data;
|
||||
if(res.code == 200){
|
||||
let sum=0;
|
||||
res.data.forEach((it,idx)=>{
|
||||
sum+=it.total;
|
||||
});
|
||||
let insuranceStatistics=[];
|
||||
if(res.data.length==2){
|
||||
res.data.forEach((it,idx)=>{
|
||||
insuranceStatistics.push({ name: it.insuranceTypeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)});
|
||||
});
|
||||
}else{
|
||||
res.data.forEach((it,idx)=>{
|
||||
if(it.insuranceType=="1"){
|
||||
insuranceStatistics.push({ name: it.insuranceTypeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)});
|
||||
insuranceStatistics.push({ name: "安责险", value: 0, prop:0});
|
||||
}else{
|
||||
insuranceStatistics.push({ name: it.insuranceTypeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)});
|
||||
insuranceStatistics.push({ name: "一切险", value: 0, prop: 0});
|
||||
}
|
||||
});
|
||||
}
|
||||
//数据绑定
|
||||
this.setData({
|
||||
insuranceStatistics
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取安全检查数据
|
||||
*/
|
||||
getSecurityCheck(projectId) {
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/selectGroupCountByProjectId',
|
||||
data:{projectId:projectId,infoType:"0"},
|
||||
method:"get",
|
||||
success: res => {
|
||||
res = res.data;
|
||||
if(res.code == 200){
|
||||
//数据绑定
|
||||
res.data.forEach((it,idx)=>{
|
||||
if(it.problemType=="1"){
|
||||
this.setData({
|
||||
"securityCheck.routineRectificationRate": (it.comTotal / it.total * 100).toFixed(2),
|
||||
"securityCheck.routineProblemTotal": it.total,
|
||||
"securityCheck.routineCheckNumber": it.total
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
"securityCheck.specialRectificationRate": (it.comTotal / it.total * 100).toFixed(2),
|
||||
"securityCheck.specialProblemTotal": it.total,
|
||||
"securityCheck.specialCheckNumber": it.total,
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
goHighLightPage() {
|
||||
wx.navigateTo({
|
||||
url: '../../Highlight-photos/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 教育培训页面
|
||||
*/
|
||||
goEducations() {
|
||||
wx.navigateTo({
|
||||
url: '../../../pageage/educations-list/index?jumpState=1',
|
||||
})
|
||||
},
|
||||
|
||||
onClosePopup() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
|
||||
/****************************底部导航********************************/
|
||||
goMenu:function(event){
|
||||
wx.setStorageSync('nav-menu', "aq");
|
||||
wx.navigateTo({
|
||||
url: event.currentTarget.dataset.url
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 项目概况页面
|
||||
*/
|
||||
XMGK: function () {
|
||||
wx.redirectTo({
|
||||
url: '../xiangmugaikuang/xiangmugaikuang'
|
||||
})
|
||||
},
|
||||
//跳转到质量管理
|
||||
ZLGL:function(){
|
||||
wx.redirectTo({
|
||||
url:'../Quality-Assurance/index'
|
||||
})
|
||||
},
|
||||
//跳转到进度管理
|
||||
JDGL:function(){
|
||||
wx.redirectTo({
|
||||
url:'../../pageage/Progress-management/index'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 更多功能
|
||||
*/
|
||||
GDGN: function () {
|
||||
wx.redirectTo({
|
||||
url: '../gengduogongneng/gengduogongneng'
|
||||
})
|
||||
},
|
||||
//退出登录
|
||||
TCDL:function(){
|
||||
wx.clearStorageSync();
|
||||
wx.setStorageSync('isReload', "1")
|
||||
wx.redirectTo({
|
||||
url: '../login/login',
|
||||
})
|
||||
},
|
||||
//修改密码
|
||||
XGMM:function(){
|
||||
wx.redirectTo({
|
||||
url: '../updatePassword/updatePassword'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
})
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-tabbar": "@vant/weapp/tabbar",
|
||||
"van-tabbar-item": "@vant/weapp/tabbar-item"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -0,0 +1,267 @@
|
|||
<!--pages/newAddPage/safetyManagement/index.wxml-->
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<view class="header_img" bindtap="showPopup"><image src="/images/core.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="XMGK">
|
||||
<image src="/images/left.png"></image>
|
||||
<text class="header_fh">返回</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="10">
|
||||
<view class="header_name">安全管理</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 左侧账号信息 -->
|
||||
<van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28;" bind:close="onClosePopup" >
|
||||
<view class="left_max">
|
||||
<van-row class="demo clearfix">
|
||||
<van-col span="24">
|
||||
<view class="left_info_dept">{{deptName}}</view>
|
||||
</van-col>
|
||||
<van-col span="10">
|
||||
<view class="left_head"><image src="../../images/user_3.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="14">
|
||||
<view class="left_info">
|
||||
<view class="left_info_name">{{nickName}}</view>
|
||||
<view class="left_info_name">{{loginName}}</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<view class="left_manage_min">
|
||||
<view class="left_manage" bindtap="XGMM">
|
||||
<image src="/images/set.png" class="left_icon"></image>
|
||||
<text class="left_password">修改密码</text>
|
||||
<image src="/images/right.png" class="left_flaot"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="left_manage_min">
|
||||
<view class="left_manage" bindtap="TCDL">
|
||||
<image src="/images/set.png" class="left_icon"></image>
|
||||
<text class="left_sign">退出登录</text>
|
||||
<image src="/images/right.png" class="left_flaot"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
<view class="max_content">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<view class="gd_max" style="margin-top: 20rpx;">
|
||||
<van-row class="demo clearfix">
|
||||
<van-col span="8" wx:for="{{menuList}}" wx:key="unique">
|
||||
<view class="gd_min" data-id="{{item.menu_identi}}" data-url="{{item.menu_url}}" bindtap="goMenu">
|
||||
<image src="{{item.menu_img}}"></image>
|
||||
<view>{{item.menu_name}}</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
|
||||
<view class="module_max" >
|
||||
<view class="module_min" style="padding: 30rpx 20rpx 20rpx 20rpx;">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>专项培训({{trainTotal}})</view>
|
||||
<view class="module_see_info" bindtap="goHighLightPage">查看详情<van-icon name="arrow" /></view>
|
||||
</view>
|
||||
<view class="safety_highlights">
|
||||
<van-row>
|
||||
<swiper circular indicator-dots="{{true}}" autoplay="true" indicator-active-color="#028ffb">
|
||||
<swiper-item wx:for="{{trainList}}" wx:key="videoIndex">
|
||||
<image src="{{item.mainImage}}" style="width: 100%;height: 100%;"/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="module_max">
|
||||
<view class="module_min">
|
||||
<view class="module_title module_title_flex" >
|
||||
<view>教育培训</view>
|
||||
<view class="module_see_info" bindtap="goEducations">查看详情<van-icon name="arrow" /></view>
|
||||
</view>
|
||||
<safety-pie-chart chart-id="chart1" title="教育总数" chart-data="{{videoSurvey}}"></safety-pie-chart>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="module_max">
|
||||
<view class="module_min">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>安全检查</view>
|
||||
<view class="module_see_info" bindtap="goCheckView">查看详情<van-icon name="arrow" /></view>
|
||||
</view>
|
||||
<view class="safety_inspect">
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="safety_inspect_title">常规检查次数</view>
|
||||
<safety-number number="{{securityCheck.routineCheckNumber}}"></safety-number>
|
||||
<view class="safety_prop">
|
||||
<view style="padding-right: 30rpx;">整改率</view>
|
||||
<view class="safety_prop_val"><text>{{securityCheck.routineRectificationRate}}</text> %</view>
|
||||
</view>
|
||||
<view class="safety_issue">
|
||||
<view class="safety_issue_number">
|
||||
<view style="padding-right: 30rpx;">检查问题数</view>
|
||||
<view>{{securityCheck.routineProblemTotal}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="safety_inspect_title">专项检查次数</view>
|
||||
<safety-number number="{{securityCheck.specialCheckNumber}}"></safety-number>
|
||||
<view class="safety_prop">
|
||||
<view style="padding-right: 30rpx;">整改率</view>
|
||||
<view class="safety_prop_val"><text>{{securityCheck.specialRectificationRate}}</text> %</view>
|
||||
</view>
|
||||
<view class="safety_issue">
|
||||
<view class="safety_issue_number">
|
||||
<view style="padding-right: 30rpx;">检查问题数</view>
|
||||
<view>{{securityCheck.specialProblemTotal}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="module_max">
|
||||
<view class="module_min">
|
||||
<view class="module_title module_title_flex" >
|
||||
<view>特种作业人员</view>
|
||||
<view class="module_see_info" bindtap="goSpecial">查看详情<van-icon name="arrow" /></view>
|
||||
</view>
|
||||
<safety-pie-chart chart-id="chart1" title="人员总数" chart-data="{{specialStatistics}}"></safety-pie-chart>
|
||||
</view>
|
||||
</view>
|
||||
<view class="module_max">
|
||||
<view class="module_min">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>项目保险</view>
|
||||
<view class="module_see_info" bindtap="goCheckView">查看详情<van-icon name="arrow" /></view>
|
||||
</view>
|
||||
<safety-pie-chart chart-id="chart2" title="保险总数" chart-data="{{insuranceStatistics}}"></safety-pie-chart>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="module_max">
|
||||
<view class="module_min">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>在岗人员</view>
|
||||
<view class="module_see_info" bindtap="goCheckView">查看详情<van-icon name="arrow" /></view>
|
||||
</view>
|
||||
<safety-pie-chart chart-id="chart3" title="在岗人员" chart-data="{{deptWorksStatistics}}"></safety-pie-chart>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="module_max" >
|
||||
<view class="module_min" style="padding: 30rpx 20rpx 20rpx 20rpx;">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>应急演练({{emergencyDrillTotal}})</view>
|
||||
<view class="module_see_info" bindtap="goHighLightPage">查看详情<van-icon name="arrow" /></view>
|
||||
</view>
|
||||
<view class="safety_highlights">
|
||||
<van-row>
|
||||
<swiper circular indicator-dots="{{true}}" autoplay="true" indicator-active-color="#028ffb">
|
||||
<swiper-item wx:for="{{emergencyDrillList}}" wx:key="videoIndex">
|
||||
<image src="{{item.mainImage}}" style="width: 100%;height: 100%;"/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 底部导航 -->
|
||||
<van-tabbar active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
|
||||
<van-tabbar-item bindtap="XMGK" >
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_5.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_5.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
项目概况
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item>
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_7.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_7.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
安全管理
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="ZLGL">
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_5.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_5.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
质量管理
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="JDGL">
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_6.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_6.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
进度管理
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="GDGN">
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_1.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_1.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height:40rpx;"
|
||||
/>
|
||||
更多功能
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
/* pages/newAddPage/safetyManagement/index.wxss */
|
||||
/* 内容部分 */
|
||||
.gangjin{
|
||||
padding:0 30rpx 40rpx 60rpx;
|
||||
}
|
||||
.gangjin-header{
|
||||
width: 100%;
|
||||
}
|
||||
.wanjieNum-over-bottom{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content:space-evenly ;
|
||||
padding: 100rpx 0 0 0;
|
||||
color: #b0c3e5;
|
||||
}
|
||||
.wanjieNum-over-bottom-top{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.wanjieNum-over-bottom-top-box{
|
||||
display: flex;
|
||||
width: 50%;
|
||||
height: 100rpx;
|
||||
}
|
||||
.wanjieNum-over-bottom-top-box-Img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 80%;
|
||||
height: 100rpx;
|
||||
background: url("http://fileimg.makalu.cc/WEB_20BAE0F4F7E14D048A818A10223B0BE1.gif") no-repeat center/100%;
|
||||
padding: 14rpx 0;
|
||||
}
|
||||
.wanjieNum-over-bottom-top-box-ImgBY{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 40%;
|
||||
height: 100rpx;
|
||||
background: url("http://fileimg.makalu.cc/WEB_EBD7748CB73A4D2D8BD74617F84528DE.png") no-repeat center/100%;
|
||||
padding: 14rpx 0;
|
||||
}
|
||||
.wanjieNum-over-bottom-top-box-Imgs{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 40%;
|
||||
height: 100rpx;
|
||||
background: url("http://fileimg.makalu.cc/WEB_FBB7B92F89A748CCA88C2D059D67CDCD.gif") no-repeat center/100%;
|
||||
padding: 14rpx 0;
|
||||
}
|
||||
.wanjieNum-over-bottom-top-box-ImgPC{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 40%;
|
||||
height: 100rpx;
|
||||
background: url("http://fileimg.makalu.cc/WEB_E219D45248B942248FE6561F24B536A9.png") no-repeat center/100%;
|
||||
padding: 14rpx 0;
|
||||
}
|
||||
.wanjieNum-over-bottom-top-box-ImgPS{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 50%;
|
||||
height: 100rpx;
|
||||
background: url("http://fileimg.makalu.cc/WEB_C8E00800A80E4D41B579855E50A57F3E.png") no-repeat center/100%;
|
||||
padding: 14rpx 0;
|
||||
}
|
||||
.wanjieNum-over-bottom-top-box-Img-small{
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.wanjieNum-over-bottom-top-box-Img-smallBY{
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.wanjieNum-over-bottom-top-box-title{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
/* padding-left:20rpx ; */
|
||||
width: 60%;
|
||||
height:100rpx ;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.wanjieNum-over-bottom-top-box-title-text{
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.gd_max{
|
||||
padding:10rpx 50rpx 0;
|
||||
}
|
||||
.gd_min{
|
||||
padding: 30rpx 0;
|
||||
text-align: center;
|
||||
}
|
||||
.gd_min image{
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
.gd_min view{
|
||||
padding: 10rpx;
|
||||
color: #89a4eb;
|
||||
}
|
|
@ -1,670 +1,66 @@
|
|||
// pages/new-map/map.js
|
||||
import * as echarts from '../../ec-canvas/echarts';
|
||||
const app = getApp();
|
||||
|
||||
//加载最近一周运行时长
|
||||
function initChart_1(chart_1, datas_1, datas_2) {
|
||||
var option_1={
|
||||
grid: {
|
||||
top: "20%",
|
||||
bottom: "18%",
|
||||
left:"0%",
|
||||
right:"0%"
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow",
|
||||
label: {
|
||||
show: true
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
data: datas_2,
|
||||
axisLine: {
|
||||
show: false //隐藏X轴轴线
|
||||
},
|
||||
axisTick: {
|
||||
show: false //隐藏X轴刻度
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: "#ebf8ac", //X轴文字颜色
|
||||
fontSize:'10'
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: [{
|
||||
type: "value",
|
||||
nameTextStyle: {
|
||||
color: "#ebf8ac"
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
nameTextStyle: {
|
||||
color: "#ebf8ac"
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
series: [{
|
||||
type: "line",
|
||||
yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
|
||||
smooth: true, //平滑曲线显示
|
||||
showAllSymbol: true, //显示所有图形。
|
||||
symbol: "circle", //标记的图形为实心圆
|
||||
symbolSize:7, //标记的大小
|
||||
itemStyle: {
|
||||
//折线拐点标志的样式
|
||||
color: "#fd9820"
|
||||
},
|
||||
lineStyle: {
|
||||
color: "#fd9820"
|
||||
},
|
||||
areaStyle:{
|
||||
color: "rgba(5,140,255, 0.2)"
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
textStyle: {
|
||||
color: '#ffffff',
|
||||
fontSize:'10'
|
||||
}
|
||||
},
|
||||
data: datas_1
|
||||
},
|
||||
{
|
||||
|
||||
type: "bar",
|
||||
barWidth: 12,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: "#51d7ff"
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#3637a3"
|
||||
}
|
||||
])
|
||||
}
|
||||
},
|
||||
data:datas_1
|
||||
}
|
||||
]
|
||||
};
|
||||
chart_1.setOption(option_1);
|
||||
return chart_1;
|
||||
}
|
||||
|
||||
//一周油耗
|
||||
function initChart_2(chart_2, datas_1, datas_2) {
|
||||
var option_2={
|
||||
grid: {
|
||||
top: "20%",
|
||||
bottom: "18%",
|
||||
left:"0%",
|
||||
right:"0%"
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow",
|
||||
label: {
|
||||
show: true
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
data:datas_2,
|
||||
axisLine: {
|
||||
show: false //隐藏X轴轴线
|
||||
},
|
||||
axisTick: {
|
||||
show: false //隐藏X轴刻度
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: "#ebf8ac", //X轴文字颜色
|
||||
fontSize:'10'
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: [{
|
||||
type: "value",
|
||||
nameTextStyle: {
|
||||
color: "#ebf8ac"
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
nameTextStyle: {
|
||||
color: "#ebf8ac"
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
series: [{
|
||||
type: "line",
|
||||
yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
|
||||
smooth: true, //平滑曲线显示
|
||||
showAllSymbol: true, //显示所有图形。
|
||||
symbol: "circle", //标记的图形为实心圆
|
||||
symbolSize:7, //标记的大小
|
||||
itemStyle: {
|
||||
//折线拐点标志的样式
|
||||
color: "#fd9820"
|
||||
},
|
||||
lineStyle: {
|
||||
color: "#fd9820"
|
||||
},
|
||||
areaStyle:{
|
||||
color: "rgba(5,140,255, 0.2)"
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
textStyle: {
|
||||
color: '#ffffff',
|
||||
fontSize:'10'
|
||||
}
|
||||
},
|
||||
data: datas_1
|
||||
},
|
||||
{
|
||||
|
||||
type: "bar",
|
||||
barWidth: 12,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: "#51d7ff"
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#3637a3"
|
||||
}
|
||||
])
|
||||
}
|
||||
},
|
||||
data:datas_1
|
||||
}
|
||||
]
|
||||
};
|
||||
chart_2.setOption(option_2);
|
||||
return chart_2;
|
||||
}
|
||||
|
||||
|
||||
// pages/shebeiguanli-map/jixiedingwei.js
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
ec_1: {
|
||||
lazyLoad: true //动态加载
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
ec_2: {
|
||||
lazyLoad: true //动态加载
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
option1: [],
|
||||
value1: '',
|
||||
currentId: '', //传值与list id 相同
|
||||
showPopup: false,
|
||||
show:false,
|
||||
bottom: "500rpx",
|
||||
showUp: false,
|
||||
list:[ {
|
||||
id:1,
|
||||
machine_key:"",
|
||||
name:"挖掘机12312",
|
||||
model:"z51110",
|
||||
state:"运行",
|
||||
class:"machinery_state_yx",
|
||||
battery:"50",
|
||||
workingHours:"8小时55分钟",
|
||||
oilCapacity:"358L",
|
||||
proportion:"80%",
|
||||
projectName: "西安地铁8号西安大白杨站智慧工地111",
|
||||
}],
|
||||
lists:[],
|
||||
height:"",
|
||||
longitude:'',
|
||||
latitude:'',
|
||||
markers: [],
|
||||
index:'',
|
||||
machineryTotalList:[],
|
||||
projectId:'',
|
||||
projectName:'',
|
||||
machineKey:"",
|
||||
//机械初始经纬度信息
|
||||
machineLongitude:'',
|
||||
machineLatitude:'',
|
||||
machineMarkers:[],
|
||||
//刷新字段
|
||||
initialMachineKey:"",
|
||||
timeLevenStatus:0,
|
||||
},
|
||||
|
||||
//页面加载
|
||||
onClickShow() {
|
||||
this.setData({ show: true });
|
||||
},
|
||||
onClickHide() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
upward() {
|
||||
this.setData({ showUp: true });
|
||||
this.setData({ bottom: "500rpx" });
|
||||
this.selectMachineryRun(this.data.projectId,this.data.initialMachineKey,this.data.machineryTotalList);
|
||||
},
|
||||
downward() {
|
||||
this.setData({ showUp: false });
|
||||
this.setData({ bottom: "50rpx" });
|
||||
},
|
||||
showPopup() {
|
||||
this.setData({ showPopup: true });
|
||||
},
|
||||
onClose() {
|
||||
this.setData({ showPopup: false });
|
||||
this.setData({ showType: false });
|
||||
},
|
||||
selectList(event){
|
||||
this.onClickShow();
|
||||
//加载数据
|
||||
this.selectMachineryRun(this.data.projectId,event.currentTarget.dataset.machinekey,this.data.machineryTotalList);
|
||||
let timeLevenStatus = this.data.timeLevenStatus;
|
||||
if(timeLevenStatus == 0){
|
||||
this.selectMachineryWeekTime(event.currentTarget.dataset.machinekey);
|
||||
}else{
|
||||
this.selectMachineryWeekTankLeven(event.currentTarget.dataset.machinekey);
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
this.setData({
|
||||
showPopup: false,
|
||||
index:event.currentTarget.dataset.index,
|
||||
showUp: true ,
|
||||
currentId:event.currentTarget.dataset.machinekey
|
||||
});
|
||||
},
|
||||
optionChange(event){
|
||||
this.onClickShow();
|
||||
var category = "";
|
||||
var option1 = this.data.option1;
|
||||
for(var i = 0;i<option1.length;i++){
|
||||
if(option1[i].value == event.detail){
|
||||
category = option1[i].text
|
||||
}
|
||||
}
|
||||
this.selectMachineryList(this.data.projectId,category);
|
||||
},
|
||||
|
||||
//页面初始化
|
||||
onLoad: function (option) {
|
||||
this.onClickShow();
|
||||
var that = this
|
||||
//调用wx.getSystemInfo接口,然后动态绑定组件高度
|
||||
wx.getSystemInfo({
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
height: res.windowHeight
|
||||
})
|
||||
}
|
||||
}),
|
||||
//获取缓存中数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:function(res){
|
||||
that.setData({
|
||||
userInfo:res.data,
|
||||
index:option.index,
|
||||
projectId:app.globalData.projectId,
|
||||
projectName:app.globalData.projectName,
|
||||
initialMachineKey:option.machineKey,
|
||||
currentId:option.machineKey
|
||||
})
|
||||
}
|
||||
})
|
||||
this.oneComponent = this.selectComponent('#mychart-one');
|
||||
this.twoComponent = this.selectComponent('#mychart-two');
|
||||
if(option.skipState =="1"){
|
||||
this.setData({ showUp: true })
|
||||
//页面初始化加载单个机械设备信息
|
||||
this.selectMachineryRun(app.globalData.projectId,option.machineKey,JSON.parse(option.machineryTotalList));
|
||||
}else{
|
||||
this.setData({ showPopup:true })
|
||||
}
|
||||
|
||||
//记载最近一周机械运行数据
|
||||
this.selectMachineryWeekTime(option.machineKey);
|
||||
//查询出机械列表
|
||||
this.selectMachineryList(app.globalData.projectId,option.type,option.skipState);
|
||||
//查询出机械类型
|
||||
this.selectMachineCategory(app.globalData.projectId);
|
||||
|
||||
},
|
||||
|
||||
//加载运行轨迹数据
|
||||
init_one: function (datas_1,datas_2) {
|
||||
this.oneComponent.init((canvas, width, height,dpr) => {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr //解决小程序视图模糊的问题,必写
|
||||
});
|
||||
initChart_1(chart,datas_1,datas_2);
|
||||
this.chart = chart;
|
||||
return chart;
|
||||
});
|
||||
},
|
||||
|
||||
//加载油耗数据
|
||||
init_two: function (datas_1,datas_2) {
|
||||
this.twoComponent.init((canvas, width, height,dpr) => {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr //解决小程序视图模糊的问题,必写
|
||||
});
|
||||
initChart_2(chart,datas_1,datas_2);
|
||||
this.chart = chart;
|
||||
return chart;
|
||||
});
|
||||
},
|
||||
|
||||
//查询出单个机械设备的基础数据
|
||||
selectMachineryRun:function(event,event1,event2){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/machicnery/selectMachineryRun',
|
||||
data:{
|
||||
"projectId":event,
|
||||
"machineKey":event1
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
if(res.data.partMachineryList.length >0){
|
||||
var markers = [];
|
||||
for(var i=0;i<event2.length;i++){
|
||||
if(event2[i].machine_key ==event1){
|
||||
var marker = {id:event2[i],longitude:res.data.partMachineryList[0].longitude,latitude:res.data.partMachineryList[0].latitude,machineKey:res.data.partMachineryList[0].machine_key,iconPath:"http://fileimg.makalu.cc/10127f663a454adea855fc852e715dd5.png",width: 40, height: 40};
|
||||
markers.push(marker);
|
||||
}else{
|
||||
var marker = {id:event2[i],longitude:event2[i].longitude,latitude:event2[i].latitude,machineKey:event2[i].machine_key
|
||||
}
|
||||
markers.push(marker);
|
||||
}
|
||||
}
|
||||
that.setData({
|
||||
list:res.data.partMachineryList,
|
||||
markers:markers,
|
||||
longitude:res.data.partMachineryList[0].longitude,
|
||||
latitude:res.data.partMachineryList[0].latitude,
|
||||
machineLongitude:res.data.partMachineryList[0].longitude,
|
||||
machineLatitude:res.data.partMachineryList[0].latitude,
|
||||
machineMarkers:markers,
|
||||
})
|
||||
}
|
||||
that.onClickHide();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询出机械列表
|
||||
selectMachineryList:function(event,category,skipState){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/machicnery/selectMachineryRun',
|
||||
data:{
|
||||
"projectId":event,
|
||||
"category":(category=="全部")?"":category,
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
var event2 = res.data.totalMachineryList;
|
||||
if(event2.length>0){
|
||||
var markers = [];
|
||||
for(var i=0;i<event2.length;i++){
|
||||
var marker = {id:event2[i],longitude:event2[i].longitude,latitude:event2[i].latitude,machineKey:event2[i].machine_key }
|
||||
markers.push(marker);
|
||||
}
|
||||
if(skipState == "1"){
|
||||
that.setData({
|
||||
lists:event2,
|
||||
machineryTotalList:event2,
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
lists:event2,
|
||||
markers:markers,
|
||||
longitude:event2[0].longitude,
|
||||
latitude:event2[0].latitude,
|
||||
machineryTotalList:event2,
|
||||
})
|
||||
}
|
||||
}else{
|
||||
that.setData({
|
||||
lists:[],
|
||||
markers:[],
|
||||
longitude:'',
|
||||
latitude:'',
|
||||
})
|
||||
}
|
||||
that.onClickHide();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询出机械类型
|
||||
selectMachineCategory:function(event){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/machicnery/selectMachineCategory',
|
||||
data:{
|
||||
"projectId":event,
|
||||
"type":"map"
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
that.onClickHide();
|
||||
that.setData({
|
||||
option1:res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询出最近一周运行数据
|
||||
selectMachineryWeekTime:function(event){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/machicnery/selectMachineryWeekTime',
|
||||
data:{
|
||||
"machineKey":event
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
that.onClickHide();
|
||||
that.init_one(res.data.valueList,res.data.timeList);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询出最近一周油耗
|
||||
selectMachineryWeekTankLeven:function(event){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/machicnery/selectMachineryWeekTankLeven',
|
||||
data:{
|
||||
"machineKey":event
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
that.onClickHide();
|
||||
that.init_two(res.data.valueList,res.data.timeList);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
///向左切换
|
||||
changeLeftData:function(event){
|
||||
this.onClickShow();
|
||||
var machineryTotalList = this.data.machineryTotalList;
|
||||
var projectId = this.data.projectId;
|
||||
if(this.data.index == "0"){
|
||||
app.toast("已经到头了,无法进行点击");
|
||||
this.onClickHide();
|
||||
}else{
|
||||
this.selectMachineryRun(projectId,machineryTotalList[this.data.index-1].machine_key,machineryTotalList);
|
||||
let timeLevenStatus = this.data.timeLevenStatus;
|
||||
if(timeLevenStatus == 0){
|
||||
this.selectMachineryWeekTime(machineryTotalList[this.data.index-1].machine_key);
|
||||
}else{
|
||||
this.selectMachineryWeekTankLeven(machineryTotalList[this.data.index-1].machine_key);
|
||||
}
|
||||
this.setData({
|
||||
machineKey:machineryTotalList[this.data.index-1].machine_key,
|
||||
index:this.data.index-1,
|
||||
currentId:machineryTotalList[this.data.index-1].machine_key,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//向右切换
|
||||
changeRightData:function(event){
|
||||
this.onClickShow();
|
||||
var machineryTotalList = this.data.machineryTotalList;
|
||||
var projectId = this.data.projectId;
|
||||
if(this.data.index == (machineryTotalList.length-1)){
|
||||
app.toast("已经到头了,无法进行点击");
|
||||
this.onClickHide();
|
||||
}else{
|
||||
this.selectMachineryRun(projectId,machineryTotalList[(this.data.index-1+2)].machine_key,machineryTotalList);
|
||||
let timeLevenStatus = this.data.timeLevenStatus;
|
||||
if(timeLevenStatus == 0){
|
||||
this.selectMachineryWeekTime(machineryTotalList[(this.data.index-1+2)].machine_key);
|
||||
}else{
|
||||
this.selectMachineryWeekTankLeven(machineryTotalList[(this.data.index-1+2)].machine_key);
|
||||
}
|
||||
this.setData({
|
||||
machineKey:machineryTotalList[(this.data.index-1+2)].machine_key,
|
||||
index:this.data.index-1+2,
|
||||
currentId:machineryTotalList[(this.data.index-1+2)].machine_key,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//点击定位点切换机械
|
||||
getListByMachineKey:function(event){
|
||||
this.onClickShow();
|
||||
this.selectMachineryRun(this.data.projectId,event.markerId.machine_key,this.data.machineryTotalList);
|
||||
let timeLevenStatus = this.data.timeLevenStatus;
|
||||
if(timeLevenStatus == 0){
|
||||
this.selectMachineryWeekTime(event.markerId.machine_key);
|
||||
}else{
|
||||
this.selectMachineryWeekTankLeven(event.markerId.machine_key);
|
||||
}
|
||||
var markers = this.data.markers;
|
||||
var index = "";
|
||||
for(var i = 0;i<markers.length;i++){
|
||||
if(markers[i].machineKey == event.markerId.machine_key){
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
index:index,
|
||||
showUp: true,
|
||||
currentId:event.markerId.machine_key
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//获取机械定位
|
||||
machineLocation:function(event){
|
||||
this.setData({
|
||||
longitude:this.data.machineLongitude,
|
||||
latitude:this.data.machineLatitude,
|
||||
markers:this.data.machineMarkers
|
||||
})
|
||||
},
|
||||
|
||||
//获取个人定位
|
||||
personalLocation:function(even){
|
||||
this.setData({
|
||||
longitude:app.globalData.initialLon,
|
||||
latitude:app.globalData.initialLat,
|
||||
markers:app.globalData.markers,
|
||||
})
|
||||
},
|
||||
|
||||
//切换最近一周工作时长和油耗
|
||||
cutTimeLeven(event){
|
||||
let machineKey = event.currentTarget.dataset.machinekey;
|
||||
this.onClickShow();
|
||||
if(event.detail.index == "0"){
|
||||
this.selectMachineryWeekTime(machineKey);
|
||||
this.setData({timeLevenStatus:0});
|
||||
}else{
|
||||
this.selectMachineryWeekTankLeven(machineKey);
|
||||
this.setData({timeLevenStatus:1});
|
||||
}
|
||||
},
|
||||
|
||||
//返回设备管理首页
|
||||
goRYGL:function(event){
|
||||
wx.redirectTo({
|
||||
url: '../shebieguanli-jxsb/shajiangguan'
|
||||
})
|
||||
},
|
||||
|
||||
})
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-row": "@vant/weapp/row",
|
||||
"van-col": "@vant/weapp/col",
|
||||
"van-popup": "@vant/weapp/popup",
|
||||
"van-picker": "@vant/weapp/picker",
|
||||
"van-area": "@vant/weapp/area",
|
||||
"van-tag": "@vant/weapp/tag",
|
||||
"van-transition": "@vant/weapp/transition",
|
||||
"van-dropdown-menu": "@vant/weapp/dropdown-menu",
|
||||
"van-dropdown-item": "@vant/weapp/dropdown-item",
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"ec-canvas": "../../ec-canvas/ec-canvas",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -1,210 +1,2 @@
|
|||
<view class="header_title">
|
||||
<view class="">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="goRYGL">
|
||||
<image src="/images/left.png"></image>
|
||||
<text class="header_fh">返回</text>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<map class="map"
|
||||
id="map" scale="16"
|
||||
latitude="{{latitude}}" longitude="{{longitude}}"
|
||||
markers="{{markers}}"
|
||||
style="width: 100%; height: {{height}}px;"
|
||||
bindmarkertap="getListByMachineKey"
|
||||
bindcallouttap="controltap"
|
||||
subkey="A2GBZ-AGALG-MP2QK-IJGFW-MRU36-4SF4O"
|
||||
bindtap="checkMap"></map>
|
||||
</view>
|
||||
|
||||
<view class="map_address">
|
||||
<view class="map_add">
|
||||
{{projectName}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="map_left" style="bottom:{{ bottom }}">
|
||||
<view class="map_left_img">
|
||||
<image src="/images/i_location.png" bindtap="personalLocation"></image>
|
||||
</view>
|
||||
<view class="map_left_img">
|
||||
<image src="/images/i_mechanics.png" bindtap="machineLocation"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="map_right" style="bottom:{{ bottom }}">
|
||||
<view class="map_right_img">
|
||||
<view class="map_right_zi" bindtap="upward">
|
||||
<image src="/images/img_11.png"></image>
|
||||
刷新
|
||||
</view>
|
||||
</view>
|
||||
<view class="map_right_img">
|
||||
<view class="map_right_zi" is-link bindtap="showPopup" >
|
||||
<image src="/images/img_12.png"></image>
|
||||
列表
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-transition name="fade-up" show="{{ showUp }}">
|
||||
<view class="sliding_up" wx:for="{{list}}">
|
||||
<view class="sliding_up_btn">
|
||||
<view bindtap="downward">
|
||||
<image src="/images/sliding_up.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sliding_up_content">
|
||||
<view class="sliding_up_top">
|
||||
|
||||
<view class="sliding_up_model">
|
||||
{{item.machine_model}}
|
||||
</view>
|
||||
<view class="ranking_middle_quantity">
|
||||
<view class="ranking_middle_img {{item.battery_percent > 20 ? 'ranking_green' :'ranking_red' }}">
|
||||
<view class="battery">
|
||||
<view class="{{item.battery_percent > 20 ? 'green_battery' :'red_battery'}}" style="width:{{item.battery_percent}}%">
|
||||
<!-- 电池 -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ranking_middle_quantity_proportion {{item.battery_percent > 20 ? 'number_green' :'number_red' }}">{{item.battery_percent}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="sliding_up_middle">
|
||||
<van-row>
|
||||
<van-col span="2">
|
||||
<view class="sliding_up_middle_left" bindtap="changeLeftData">
|
||||
<image src="/images/middle_left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="4">
|
||||
<view class="sliding_up_middle_head">
|
||||
<image src="{{item.head_img}}"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="16">
|
||||
<view class="sliding_up_middle_center">
|
||||
<view class="ranking_middle_name">
|
||||
{{item.category}}
|
||||
</view>
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="working_hours">
|
||||
今日工时:<text>{{item.workTime}}</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="working_hours">
|
||||
当前油量:<text>{{item.volume}}/{{item.percentage}}%</text>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<view class="ranking_middle_company">
|
||||
项目:<text>{{item.projectName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="2">
|
||||
<view class="sliding_up_middle_right" bindtap="changeRightData">
|
||||
<image src="/images/middl_right.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="sliding_up_bottom">
|
||||
<view class="chart_max">
|
||||
<van-tabs animated bind:click="cutTimeLeven" data-machineKey="{{item.machine_key}}">
|
||||
<van-tab title="最近一周日运转时长(s)" >
|
||||
<view class="chart_min">
|
||||
<ec-canvas ec="{{ ec_1 }}" id="mychart-one"></ec-canvas>
|
||||
</view>
|
||||
</van-tab>
|
||||
<van-tab title="最近一周油耗统计(L)">
|
||||
<view class="chart_min">
|
||||
<ec-canvas ec="{{ ec_2 }}" id="mychart-two"></ec-canvas>
|
||||
</view>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-transition>
|
||||
|
||||
|
||||
<van-popup show="{{ showPopup }}" round position="bottom" custom-style="height: 930rpx" bind:close="onClose">
|
||||
<view class="lits_content">
|
||||
<view class="hj_float_title">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="optionChange"/>
|
||||
</van-dropdown-menu>
|
||||
</view>
|
||||
<view class="ranking_max">
|
||||
<view class="machinery_list {{currentId == item.machine_key ?'active':' '}}" wx:for="{{lists}}" bindtap="selectList" data-index="{{index}}" data-machinekey="{{item.machine_key}}">
|
||||
<van-row>
|
||||
<van-col span="5">
|
||||
<view class="machinery_img">
|
||||
<image src="{{item.head_img}}"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="19">
|
||||
<view class="machinery_name">{{item.category}}</view>
|
||||
<view class="machinery_info">
|
||||
<view class="machinery_model">{{item.machine_model}}</view>
|
||||
<view class="ranking_middle_quantity_s">
|
||||
<view class="ranking_middle_img {{item.battery_percent > 20 ? 'ranking_green' :'ranking_red' }}">
|
||||
<view class="battery">
|
||||
<view class="{{item.battery_percent > 20 ? 'green_battery' :'red_battery'}}" style="width:{{item.battery_percent}}%">
|
||||
<!-- 电池 -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ranking_middle_quantity_proportion {{item.battery_percent > 20 ? 'number_green' :'number_red' }}"> {{item.battery_percent}}%</view>
|
||||
</view>
|
||||
<view class="machinery_state {{item.class}}">
|
||||
<view>{{item.state}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="working_hours_s">
|
||||
今日工时:<text>{{item.workTime}}</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="working_hours_s">
|
||||
当前油量:<text>{{item.volume}}/{{item.percentage}}</text>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<view class="project_name">
|
||||
项目:<text>{{item.projectName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
<van-overlay show="{{show}}">
|
||||
<view class="gif">
|
||||
<image src="../../images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--pages/shebeiguanli-map/jixiedingwei.wxml-->
|
||||
<text>pages/shebeiguanli-map/jixiedingwei.wxml</text>
|
||||
|
|
|
@ -1,454 +0,0 @@
|
|||
/* pages/new-map/map.wxss */
|
||||
.map_address{
|
||||
width: 90%;
|
||||
position: absolute;
|
||||
top: 196rpx;
|
||||
left: 5%;
|
||||
color: #8aa3ec;
|
||||
background: url("http://fileimg.makalu.cc/CORE_1F1F3A2778334D3EAC1226DDCEBD48D0.png") no-repeat left/40rpx;
|
||||
}
|
||||
.map_add{
|
||||
padding-left: 50rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.map_left{
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
}
|
||||
.map_right{
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
}
|
||||
.map_left_img{
|
||||
background: #333343;
|
||||
border-radius: 50%;
|
||||
height: 70rpx;
|
||||
width: 70rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.map_left_img image{
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
.map_left_img:active{
|
||||
background: #252530;
|
||||
}
|
||||
.map_right_img{
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.map_right_zi{
|
||||
height: 70rpx;
|
||||
background: #333343;
|
||||
width: 150rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
line-height: 70rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.map_right_zi image{
|
||||
width: 40rpx;
|
||||
height:40rpx;
|
||||
position: relative;
|
||||
top: 10rpx;
|
||||
}
|
||||
.map_right_zi:active{
|
||||
background: #252530;
|
||||
}
|
||||
/* 底部信息 */
|
||||
.sliding_up{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
}
|
||||
.sliding_up_btn view{
|
||||
width:150rpx;
|
||||
height: 40rpx;
|
||||
background: rgba(42,52,91,0.8);
|
||||
margin: auto;
|
||||
border-radius: 50rpx 50rpx 0 0;
|
||||
text-align: center;
|
||||
}
|
||||
.sliding_up_btn view image{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.sliding_up_content{
|
||||
background: rgba(42,52,91,0.8);
|
||||
height:460rpx;
|
||||
}
|
||||
.sliding_up_top{
|
||||
height:50rpx;
|
||||
}
|
||||
|
||||
.sliding_up_middle{
|
||||
border-top: 2px solid #2e3e69;
|
||||
border-bottom: 2px solid #2e3e69;
|
||||
height: 120rpx;
|
||||
}
|
||||
.sliding_up_middle_left{
|
||||
padding-top: 25rpx;
|
||||
}
|
||||
.sliding_up_middle_left image{
|
||||
width: 50rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
.sliding_up_middle_right{
|
||||
padding-top: 25rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.sliding_up_middle_right image{
|
||||
width: 50rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
.sliding_up_middle_head{
|
||||
text-align: center;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
.sliding_up_middle_head image{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.ranking_middle_name{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.ranking_middle_name text{
|
||||
color: #8aa3ec;
|
||||
font-size: 2rpx;
|
||||
}
|
||||
.ranking_middle_company{
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.ranking_middle_company text{
|
||||
color: #8aa3ec;
|
||||
}
|
||||
.ranking_middle_days{
|
||||
color: #8aa3ec;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.ranking_middle_days text{
|
||||
color: #00baff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.ranking_middle_time{
|
||||
float: right;
|
||||
font-size: 30rpx;
|
||||
color: #00baff;
|
||||
}
|
||||
.ranking_max{
|
||||
height:800rpx;
|
||||
overflow: auto;
|
||||
}
|
||||
.ranking_min{
|
||||
padding:15rpx 20rpx;
|
||||
border-radius: 5rpx;
|
||||
background-color: #272f51;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.ranking_min.active{
|
||||
border: 2px solid #4465a5;
|
||||
}
|
||||
|
||||
.ranking_left{
|
||||
height: 150rpx;
|
||||
line-height: 150rpx;
|
||||
padding-left: 5rpx;
|
||||
}
|
||||
.ranking_left text{
|
||||
padding: 0 15rpx;
|
||||
background: #00a0e9;
|
||||
font-size: 20rpx;
|
||||
border-radius: 5rpx;
|
||||
color: #191d28;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.sliding_up_middle_center{
|
||||
padding-top:10rpx;
|
||||
}
|
||||
.sliding_up_bottom{
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.sliding_up_bottom_title{
|
||||
text-align: center;
|
||||
padding: 10rpx 0;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.sliding_up_bottom_title text{
|
||||
color: #00baff;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.sliding_up_bottom_info{
|
||||
padding: 10rpx 40rpx;
|
||||
font-size: 24rpx;
|
||||
color: #8aa3ec;
|
||||
}
|
||||
.sliding_up_bottom_info text{
|
||||
color: #ffffff;
|
||||
}
|
||||
.sliding_up_bottom_address{
|
||||
color: #8aa3ec;
|
||||
font-size: 28rpx;
|
||||
padding: 10rpx 40rpx;
|
||||
}
|
||||
.working_hours{
|
||||
font-size: 20rpx;
|
||||
padding:5rpx 0;
|
||||
}
|
||||
.working_hours text{
|
||||
color: #fdce36;
|
||||
}
|
||||
.sliding_up_model{
|
||||
float: left;
|
||||
font-size: 24rpx;
|
||||
line-height: 50rpx;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
.hj_float_title{
|
||||
text-align: center;
|
||||
width: 200rpx;
|
||||
margin: auto;
|
||||
}
|
||||
.machinery_list{
|
||||
border: 2px solid #293859;
|
||||
margin-top: 20rpx;
|
||||
padding:20rpx;
|
||||
}
|
||||
.machinery_list.active{
|
||||
border: 2px solid #4465a5;
|
||||
}
|
||||
.machinery_img image{
|
||||
width: 100rpx;
|
||||
height:100rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.machinery_name{
|
||||
height: 60rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.machinery_info{
|
||||
height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.machinery_model{
|
||||
float: left;
|
||||
height: 40rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.machinery_state{
|
||||
float: right;
|
||||
font-size: 20rpx;
|
||||
padding: 2rpx;
|
||||
border-radius: 7rpx;
|
||||
}
|
||||
.machinery_state_yx{
|
||||
border: 1px solid #1ab800;
|
||||
color: #1ab800;
|
||||
}
|
||||
.machinery_state_yx view{
|
||||
background: rgba(0,194,61,0.3);
|
||||
padding:0 10rpx ;
|
||||
}
|
||||
.machinery_state_ds{
|
||||
border: 1px solid #fdce36;
|
||||
color: #fdce36;
|
||||
}
|
||||
.machinery_state_ds view{
|
||||
background: rgba(253,206,54,0.3);
|
||||
padding:0 10rpx ;
|
||||
}
|
||||
.machinery_state_jz{
|
||||
border: 1px solid #b041ff;
|
||||
color: #b041ff;
|
||||
}
|
||||
.machinery_state_jz view{
|
||||
background: rgba(176,65,255,0.3);
|
||||
padding:0 10rpx ;
|
||||
}
|
||||
.machinery_state_lx{
|
||||
border: 1px solid #bbbbbb;
|
||||
color: #bbbbbb;
|
||||
}
|
||||
.machinery_state_lx view{
|
||||
background: rgba(187,187,187,0.3);
|
||||
padding:0 10rpx ;
|
||||
}
|
||||
.project_name{
|
||||
font-size: 24rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
.project_name text{
|
||||
color: #88a4ed;
|
||||
}
|
||||
.personnel_orientation{
|
||||
padding-top: 30rpx;
|
||||
text-align: center;
|
||||
color: #8aa3ec;
|
||||
}
|
||||
.personnel_orientation text{
|
||||
color: #09c7fb;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.ranking_middle_quantity_s{
|
||||
float: left;
|
||||
font-size: 26rpx;
|
||||
padding-top: 5rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.ranking_max {
|
||||
height: 820rpx;
|
||||
overflow: auto;
|
||||
}
|
||||
.working_hours_s{
|
||||
font-size: 24rpx;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.working_hours_s text{
|
||||
color: #fdce36;
|
||||
}
|
||||
.chart_max{
|
||||
height: 250rpx;
|
||||
}
|
||||
.chart_min{
|
||||
height: 210rpx;
|
||||
}
|
||||
|
||||
/* 电池 */
|
||||
.ranking_middle_quantity{
|
||||
float: right;
|
||||
font-size: 26rpx;
|
||||
width: 120rpx;
|
||||
padding-top: 15rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.ranking_middle_quantity_proportion{
|
||||
float: right;
|
||||
top: -6rpx;
|
||||
position: relative;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.ranking_middle_img{
|
||||
float: left;
|
||||
}
|
||||
.ranking_middle_img{
|
||||
width: 50rpx;
|
||||
height: 25rpx;
|
||||
}
|
||||
.ranking_green{
|
||||
background: url("http://fileimg.makalu.cc/CORE_56270CFFB87746E1968AF87C8D704B26.png") no-repeat left/100% 100%;
|
||||
}
|
||||
.ranking_red{
|
||||
background: url("http://fileimg.makalu.cc/CORE_3A01CFC1FDA540B6A29F8A9750A258B0.png") no-repeat left/100% 100%;
|
||||
}
|
||||
.battery{
|
||||
|
||||
width:85%;
|
||||
height: 22rpx;
|
||||
border-radius: 5rpx;
|
||||
padding: 2rpx;
|
||||
}
|
||||
.green_battery{
|
||||
background: #1ab800;
|
||||
height: 100%;
|
||||
}
|
||||
.red_battery{
|
||||
background: #fe1e00;
|
||||
width: 10%;
|
||||
height: 100%;
|
||||
}
|
||||
.number_red{
|
||||
color: #fe1e00;
|
||||
}
|
||||
.number_green{
|
||||
color: #1ab800;
|
||||
}
|
||||
|
||||
/* 列表 */
|
||||
.lits_content{
|
||||
padding:20rpx 30rpx 10rpx;
|
||||
}
|
||||
.list_screen{
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
color: #8aa3ec;
|
||||
}
|
||||
.list_screen.active{
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.van-tag--mark,.van-tag--mark:after {
|
||||
border-radius: 15rpx 0 15rpx 0 !important;
|
||||
position: relative;
|
||||
top: -5rpx;
|
||||
}
|
||||
|
||||
.van-popup{
|
||||
background: #232a44 !important;
|
||||
}
|
||||
.van-dropdown-menu.van-dropdown-menu--top-bottom{
|
||||
height: 60rpx;
|
||||
background: #2e355f;
|
||||
border-radius: 80rpx;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
}
|
||||
.van-ellipsis{
|
||||
height: auto !important;
|
||||
}
|
||||
.van-dropdown-menu__title {
|
||||
color: #8ba3eb !important;
|
||||
}
|
||||
.van-popup--top{
|
||||
width: 50% !important;
|
||||
margin-left: 25%;
|
||||
}
|
||||
.van-cell{
|
||||
background: #2e355f !important;
|
||||
color: #aaaaaa !important;
|
||||
}
|
||||
.van-cell:after{
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.van-hairline--top-bottom:after{
|
||||
border: none !important;
|
||||
}
|
||||
.van-tabs__scroll--line{
|
||||
height:50rpx !important;
|
||||
background: none !important;
|
||||
}
|
||||
.van-tabs--line .van-tabs__wrap{
|
||||
height: 50rpx !important;
|
||||
}
|
||||
.van-tab {
|
||||
line-height: 50rpx !important;
|
||||
}
|
||||
.van-tabs__line{
|
||||
background: #00e4ff !important;
|
||||
height: 2px !important;
|
||||
}
|
||||
.van-ellipsis.van-tab{
|
||||
border: none;
|
||||
}
|
||||
.van-ellipsis{
|
||||
margin: auto;
|
||||
height: 50rpx;
|
||||
color: #00e4ff;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,224 +1,66 @@
|
|||
// pages/new-shebeiguanli/shebeiguanli.js
|
||||
const app = getApp();
|
||||
// pages/shebieguanli-jxsb/shajiangguan.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
active:1,
|
||||
show:false,
|
||||
leftShow:false,
|
||||
showType: false,
|
||||
type:"全部",
|
||||
actionsType: [],
|
||||
list:[],
|
||||
machineCount:"0",
|
||||
workingCount:"0",
|
||||
idlingCount:"0",
|
||||
offCount:"0",
|
||||
outWatchingCount:"0",
|
||||
machineryTotalCount:'0',
|
||||
machineryTotalList:[],
|
||||
//基础参数
|
||||
projectId:'',
|
||||
projectName:'' ,
|
||||
loginName:'',
|
||||
userName:'',
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
initData:{}
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
onProjectSelect(e){
|
||||
this.onClickShow();
|
||||
let projectId = e.detail.id;
|
||||
let projectName = e.detail.text;
|
||||
app.globalData.projectId = projectId;
|
||||
app.globalData.projectName = projectName;
|
||||
this.setData({
|
||||
projectId:projectId,
|
||||
projectName:projectName
|
||||
})
|
||||
this.onLoad();
|
||||
},
|
||||
|
||||
showPopup() {
|
||||
this.setData({ leftShow: true });
|
||||
},
|
||||
onLeftClose(){
|
||||
this.setData({ leftShow: false });
|
||||
},
|
||||
|
||||
onClose() {
|
||||
this.setData({ showType: false });
|
||||
},
|
||||
onclickType(){
|
||||
this.setData({ showType: true });
|
||||
},
|
||||
onSelectType(event) {
|
||||
this.onClickShow();
|
||||
this.setData({
|
||||
type: event.detail.name,
|
||||
});
|
||||
this.selectMachineryRun(this.data.projectId,(event.detail.name == "全部")?'':event.detail.name);
|
||||
},
|
||||
|
||||
//页面加载
|
||||
onClickShow() {
|
||||
this.setData({ show: true });
|
||||
},
|
||||
|
||||
onClickHide() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
|
||||
// 底部导航
|
||||
onChange(event) {
|
||||
// event.detail 的值为当前选中项的索引
|
||||
this.setData({ active: event.detail });
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.onClickShow();
|
||||
var that = this;
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:function(res){
|
||||
that.setData({
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.userName,
|
||||
projectId:app.globalData.projectId,
|
||||
projectName:app.globalData.projectName,
|
||||
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
|
||||
})
|
||||
}
|
||||
})
|
||||
//查询出机械设备基础信息
|
||||
this.selectMachineryRun(app.globalData.projectId,'');
|
||||
//查询出机械类型
|
||||
this.selectMachineCategory(app.globalData.projectId);
|
||||
},
|
||||
|
||||
//查询出机械设备的基础数据
|
||||
selectMachineryRun:function(event,event1){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/machicnery/selectMachineryRun',
|
||||
data:{
|
||||
"projectId":event,
|
||||
"category":event1
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
that.setData({
|
||||
machineCount:res.data.count,
|
||||
workingCount:res.data.working,
|
||||
idlingCount:res.data.idling,
|
||||
offCount:res.data.off,
|
||||
outWatchingCount:res.data.outWatching,
|
||||
list:res.data.partMachineryList,
|
||||
machineryTotalCount:res.data.totalMachineryListCount,
|
||||
machineryTotalList:res.data.totalMachineryList,
|
||||
})
|
||||
that.onClickHide();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询出机械类型
|
||||
selectMachineCategory:function(event){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/machicnery/selectMachineCategory',
|
||||
data:{
|
||||
"projectId":event,
|
||||
"type":"shouye"
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
that.setData({
|
||||
actionsType:res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//点击单个机械跳转到地图页面
|
||||
skipMap:function(event){
|
||||
wx.redirectTo({
|
||||
url: '../shebeiguanli-map/jixiedingwei?machineryTotalList='+JSON.stringify(this.data.machineryTotalList)+"&index="+event.currentTarget.dataset.index+"&machineKey="+event.currentTarget.dataset.machinekey+"&skipState=1"+"&type="+this.data.type
|
||||
})
|
||||
},
|
||||
|
||||
//查询所有设备信息
|
||||
shipTotalMap:function(event){
|
||||
wx.redirectTo({
|
||||
url: '../shebeiguanli-map/jixiedingwei?machineryTotalList='+JSON.stringify(this.data.machineryTotalList)+"&skipState=2"+"&type="+this.data.type
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到项目概况页面
|
||||
XMGK:function(){
|
||||
wx.redirectTo({
|
||||
url: '../xiangmugaikuang/xiangmugaikuang'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到人员管理
|
||||
RYGL:function(){
|
||||
wx.redirectTo({
|
||||
url: '../renyuanguanli/renyuanguanli'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到安全管控
|
||||
XMSP:function(){
|
||||
wx.redirectTo({
|
||||
//url: '../deepExcavation/index'
|
||||
url:'../newAddPage/safetyManagement/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到更多更能
|
||||
GDGN:function(event){
|
||||
wx.redirectTo({
|
||||
url: '../gengduogongneng/gengduogongneng',
|
||||
})
|
||||
},
|
||||
|
||||
//退出登录
|
||||
TCDL:function(){
|
||||
wx.clearStorageSync();
|
||||
wx.setStorageSync('isReload', "1")
|
||||
wx.redirectTo({
|
||||
url: '../login/login',
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
//跳转到特种设备
|
||||
gotzsb:function(event){
|
||||
wx.redirectTo({
|
||||
url: '../shebieguanli-tzsb/taji'
|
||||
})
|
||||
},
|
||||
|
||||
//返回到工程列表页面
|
||||
goGCLB:function(){
|
||||
wx.redirectTo({
|
||||
url: '../gongchengliebiao/gongchengliebiao'
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
//返回到地图页面
|
||||
GOMAP:function(){
|
||||
wx.redirectTo({
|
||||
url: '../map/map',
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-row": "@vant/weapp/row",
|
||||
"van-col": "@vant/weapp/col",
|
||||
"van-action-sheet": "@vant/weapp/action-sheet",
|
||||
"van-sticky": "@vant/weapp/sticky",
|
||||
"van-tabbar": "@vant/weapp/tabbar",
|
||||
"van-tabbar-item": "@vant/weapp/tabbar-item",
|
||||
"van-popup": "@vant/weapp/popup",
|
||||
"van-circle": "@vant/weapp/circle",
|
||||
"ec-canvas": "../../ec-canvas/ec-canvas",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -1,241 +1,2 @@
|
|||
<view class="header_title">
|
||||
<view class="">
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<view class="header_img" bindtap="showPopup"><image src="/images/core.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="goGCLB">
|
||||
<image src="/images/left.png"></image>
|
||||
<text class="header_fh">返回</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="10">
|
||||
<view class="header_name">设备管理</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 左侧账号信息 -->
|
||||
<van-popup show="{{ leftShow }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onLeftClose" >
|
||||
<view class="left_max">
|
||||
<van-row class="demo clearfix">
|
||||
<van-col span="10">
|
||||
<view class="left_head"><image src="http://fileimg.makalu.cc/szgl/9015e824c5004e629049c4f72967cfdc.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="14">
|
||||
<view class="left_info">
|
||||
<view class="left_info_name">{{userName}}</view>
|
||||
<view class="left_info_name">{{loginName}}</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<!-- <view class="left_manage_min">
|
||||
<view class="left_manage" bindtap="TCDL">
|
||||
<view class="left_sign">
|
||||
退出登录
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<view class="max_content">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
|
||||
<!-- <view class="video_add">
|
||||
<view class="video_address">
|
||||
<view class="video_address_min" bindtap="GOMAP">
|
||||
{{projectName}}
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view style="margin-top: 26rpx;">
|
||||
<van-row >
|
||||
<van-col span="12">
|
||||
<view class="device_types active">
|
||||
<text>机械设备</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="device_types" bindtap="gotzsb">
|
||||
<text>特种设备</text>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
|
||||
<view class="echarts_max">
|
||||
<view class="echarts_min">
|
||||
<view class="eharts_title">状态统计</view>
|
||||
<view class="status_statistics">
|
||||
{{machineCount}}台
|
||||
</view>
|
||||
<van-row>
|
||||
<van-col span="6">
|
||||
<view class="number_sets number_color_1">{{workingCount}}</view>
|
||||
<view class="name_sets number_color_1">运行</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="number_sets number_color_2">{{idlingCount}}</view>
|
||||
<view class="name_sets number_color_2">怠速</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="number_sets number_color_3">{{offCount}}</view>
|
||||
<view class="name_sets number_color_3">静止</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="number_sets number_color_4">{{outWatchingCount}}</view>
|
||||
<view class="name_sets number_color_4">离线</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="echarts_max">
|
||||
<view class="echarts_min">
|
||||
<view class="eharts_title">
|
||||
工时排名<text class="hj_float" bindtap="onclickType">{{type}} </text>
|
||||
<van-action-sheet show="{{ showType }}" actions="{{ actionsType }}" bind:close="onClose" bind:select="onSelectType" />
|
||||
</view>
|
||||
<view class="machinery_list" wx:for="{{list}}" bindtap="skipMap" data-machinekey="{{item.machine_key}}" data-index="{{index}}" wx:key wx:if="{{index<3}}">
|
||||
<van-row>
|
||||
<van-col span="5">
|
||||
<view class="machinery_img">
|
||||
<image src="{{item.head_img}}"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="19">
|
||||
<view class="machinery_name">{{item.category}}</view>
|
||||
<view class="machinery_info">
|
||||
<view class="machinery_model">{{item.machine_model}}</view>
|
||||
<view class="ranking_middle_quantity">
|
||||
<view class="ranking_middle_img {{item.battery_percent > 20 ? 'ranking_green' :'ranking_red' }}">
|
||||
<view class="battery">
|
||||
<view class="{{item.battery_percent > 20 ? 'green_battery' :'red_battery'}}" style="width:{{item.battery_percent}}+'%'">
|
||||
<!-- 电池 -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ranking_middle_quantity_proportion {{item.battery_percent > 20 ? 'number_green' :'number_red' }}"> {{item.battery_percent}}%</view>
|
||||
</view>
|
||||
<view class="machinery_state {{item.class}}">
|
||||
<view>{{item.state}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="working_hours">
|
||||
今日工时:<text>{{item.workTime}}</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="working_hours">
|
||||
当前油量:<text>{{item.volume}}/{{item.percentage}}%</text>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<view class="project_name">
|
||||
项目:<text>{{item.projectName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="personnel_orientation" bindtap="shipTotalMap">
|
||||
机械定位:<text>{{machineryTotalCount}}</text> >>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-overlay show="{{show}}">
|
||||
<view class="gif">
|
||||
<image src="../../images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
|
||||
<!-- 底部导航 -->
|
||||
<van-tabbar active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
|
||||
<van-tabbar-item bindtap="XMGK" >
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_5.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_5.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
项目概况
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item>
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_2.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_2.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
设备管理
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="RYGL">
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_3.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_3.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
人员管理
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="XMSP">
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_7.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_7.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
安全管理
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="GDGN">
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_1.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_1.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height:40rpx;"
|
||||
/>
|
||||
更多功能
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
<!--pages/shebieguanli-jxsb/shajiangguan.wxml-->
|
||||
<text>pages/shebieguanli-jxsb/shajiangguan.wxml</text>
|
||||
|
|
|
@ -1,261 +0,0 @@
|
|||
/* pages/new-jinduguanli/jinduguanli.wxss */
|
||||
.echarts_max{
|
||||
margin-top: 30rpx;
|
||||
padding:0 30rpx;
|
||||
}
|
||||
.echarts_min{
|
||||
background:#1e2336 ;
|
||||
font-size: 28rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
.eharts_title{
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
padding-left: 40rpx;
|
||||
background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx;
|
||||
}
|
||||
.eharts_head{
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
.eharts_head text{
|
||||
color:#0ad7ec;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.eharts_con{
|
||||
height: 350rpx;
|
||||
width: auto;
|
||||
}
|
||||
.eharts_number{
|
||||
font-size: 28rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.eharts_number text{
|
||||
color: #0ad7ec;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
.hj_float{
|
||||
float: right;
|
||||
padding: 5rpx 50rpx 5rpx 20rpx;
|
||||
background: #2e355f url("http://fileimg.makalu.cc/CORE_5F23F4664AAE44A0BD72BE4BB4C66083.png") no-repeat right/35rpx;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.device_types{
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.device_types.active{
|
||||
color: #89a4e9;
|
||||
}
|
||||
.device_types.active text{
|
||||
border-bottom: 2px solid #89a4e9;
|
||||
}
|
||||
.status_statistics{
|
||||
width: 160rpx;
|
||||
height: 100rpx;
|
||||
margin: 30rpx auto;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
color: #0ad7ec;
|
||||
font-size: 40rpx;
|
||||
background: url("http://fileimg.makalu.cc/CORE_49991230F56F409F9D6C801F84284B34.PNG") no-repeat center/100% 100%;
|
||||
}
|
||||
.number_sets{
|
||||
text-align: center;
|
||||
font-size: 50rpx;
|
||||
padding: 30rpx 0 10rpx;
|
||||
}
|
||||
.name_sets{
|
||||
text-align: center;
|
||||
}
|
||||
.number_color_1{
|
||||
color: #00c23d;
|
||||
}
|
||||
.number_color_2{
|
||||
color: #fccd35;
|
||||
}
|
||||
.number_color_3{
|
||||
color: #b141ff;
|
||||
}
|
||||
.number_color_4{
|
||||
color: #bbbbbb;
|
||||
}
|
||||
|
||||
/* 机械管理 工时排名 */
|
||||
.machinery_list{
|
||||
border: 2px solid #293859;
|
||||
margin-top: 30rpx;
|
||||
padding:20rpx;
|
||||
}
|
||||
.machinery_img image{
|
||||
width: 100rpx;
|
||||
height:100rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.machinery_name{
|
||||
height: 60rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.machinery_info{
|
||||
height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.machinery_model{
|
||||
float: left;
|
||||
height: 40rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.machinery_state{
|
||||
float: right;
|
||||
font-size: 20rpx;
|
||||
padding: 2rpx;
|
||||
border-radius: 7rpx;
|
||||
}
|
||||
.machinery_state_yx{
|
||||
border: 1px solid #1ab800;
|
||||
color: #1ab800;
|
||||
}
|
||||
.machinery_state_yx view{
|
||||
background: rgba(0,194,61,0.3);
|
||||
padding:0 10rpx ;
|
||||
}
|
||||
.machinery_state_ds{
|
||||
border: 1px solid #fdce36;
|
||||
color: #fdce36;
|
||||
}
|
||||
.machinery_state_ds view{
|
||||
background: rgba(253,206,54,0.3);
|
||||
padding:0 10rpx ;
|
||||
}
|
||||
.machinery_state_jz{
|
||||
border: 1px solid #b041ff;
|
||||
color: #b041ff;
|
||||
}
|
||||
.machinery_state_jz view{
|
||||
background: rgba(176,65,255,0.3);
|
||||
padding:0 10rpx ;
|
||||
}
|
||||
.machinery_state_lx{
|
||||
border: 1px solid #bbbbbb;
|
||||
color: #bbbbbb;
|
||||
}
|
||||
.machinery_state_lx view{
|
||||
background: rgba(187,187,187,0.3);
|
||||
padding:0 10rpx ;
|
||||
}
|
||||
.working_hours{
|
||||
font-size: 24rpx;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.working_hours text{
|
||||
color: #fdce36;
|
||||
}
|
||||
.project_name{
|
||||
font-size: 24rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
.project_name text{
|
||||
color: #88a4ed;
|
||||
}
|
||||
.personnel_orientation{
|
||||
padding-top: 30rpx;
|
||||
text-align: center;
|
||||
color: #8aa3ec;
|
||||
}
|
||||
.personnel_orientation text{
|
||||
color: #09c7fb;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* 电池 */
|
||||
.ranking_middle_quantity{
|
||||
float: left;
|
||||
font-size: 26rpx;
|
||||
padding-top: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.ranking_middle_quantity_proportion{
|
||||
float: right;
|
||||
top: -6rpx;
|
||||
position: relative;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
.ranking_middle_img{
|
||||
float: left;
|
||||
}
|
||||
.ranking_middle_img{
|
||||
width: 50rpx;
|
||||
height: 25rpx;
|
||||
}
|
||||
.ranking_green{
|
||||
background: url("http://fileimg.makalu.cc/CORE_56270CFFB87746E1968AF87C8D704B26.png") no-repeat left/100% 100%;
|
||||
}
|
||||
.ranking_red{
|
||||
background: url("http://fileimg.makalu.cc/CORE_3A01CFC1FDA540B6A29F8A9750A258B0.png") no-repeat left/100% 100%;
|
||||
}
|
||||
.battery{
|
||||
width:85%;
|
||||
height: 22rpx;
|
||||
border-radius: 5rpx;
|
||||
padding: 2rpx;
|
||||
}
|
||||
.green_battery{
|
||||
background: #1ab800;
|
||||
height: 100%;
|
||||
}
|
||||
.red_battery{
|
||||
background: #fe1e00;
|
||||
width: 10%;
|
||||
height: 100%;
|
||||
}
|
||||
.number_red{
|
||||
color: #fe1e00;
|
||||
}
|
||||
.number_green{
|
||||
color: #1ab800;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.van-popup--bottom.van-popup--round{
|
||||
border-radius: 0 !important
|
||||
}
|
||||
.van-popup{
|
||||
background-color: var(--popup-background-color,#232a44) !important
|
||||
}
|
||||
.van-action-sheet__cancel,.van-action-sheet__item{
|
||||
background-color: var(--popup-background-color,#232a44) !important;
|
||||
color: #0ad7ec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,249 +1,66 @@
|
|||
// pages/shebieguanli-taji/taji.js
|
||||
const app = getApp();
|
||||
// pages/shebieguanli-tzsb/taji.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
active:1,
|
||||
leftShow:false,
|
||||
show: false,
|
||||
loadShow:false,
|
||||
value:'',
|
||||
actions: [],
|
||||
//基础参数
|
||||
projectId:'',
|
||||
projectName:'' ,
|
||||
loginName:'',
|
||||
userName:'',
|
||||
//塔基数据
|
||||
deviceName:'',
|
||||
deviceID:'',
|
||||
chargePerson:'',
|
||||
towerBasicData:{},
|
||||
towerWarnData:{},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
initData:{}
|
||||
},
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
onProjectSelect(e){
|
||||
this.onClickShow();
|
||||
let projectId = e.detail.id;
|
||||
let projectName = e.detail.text;
|
||||
app.globalData.projectId = projectId;
|
||||
app.globalData.projectName = projectName;
|
||||
this.setData({
|
||||
projectId:projectId,
|
||||
projectName:projectName
|
||||
})
|
||||
|
||||
this.onLoad();
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
onClose() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
onclick(){
|
||||
this.setData({ show: true });
|
||||
},
|
||||
onSelect(event) {
|
||||
this.onClickShow();
|
||||
this.setData({
|
||||
value: event.detail.name,
|
||||
deviceName:event.detail.name,
|
||||
deviceID:event.detail.deviceSn,
|
||||
chargePerson:event.detail.chargePerson,
|
||||
});
|
||||
this.getTowerBasicData(event.detail.deviceID);
|
||||
this.selectTowerCraneDetails(event.detail.deviceID);
|
||||
},
|
||||
},
|
||||
|
||||
showPopup() {
|
||||
this.setData({ leftShow: true });
|
||||
},
|
||||
onLeftClose(){
|
||||
this.setData({ leftShow: false });
|
||||
},
|
||||
onClickShow() {
|
||||
this.setData({ loadShow: true });
|
||||
},
|
||||
onClickHide() {
|
||||
this.setData({ loadShow: false });
|
||||
},
|
||||
// 底部导航
|
||||
onChange(event) {
|
||||
// event.detail 的值为当前选中项的索引
|
||||
this.setData({ active: event.detail });
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
//this.onClickShow();
|
||||
var that = this;
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:function(res){
|
||||
that.setData({
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.userName,
|
||||
projectId:app.globalData.projectId,
|
||||
projectName:app.globalData.projectName,
|
||||
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.selectTowerCraneList(app.globalData.projectId);
|
||||
},
|
||||
},
|
||||
|
||||
//获取塔吊列表
|
||||
selectTowerCraneList:function(event){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/machicnery/selectTowerCraneList',
|
||||
data:{
|
||||
"projectId":event
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
that.onClickHide();
|
||||
if(res.data.code ==0 && res.data.data.length>0){
|
||||
let actions = [];
|
||||
for(let i = 0;i<res.data.data.length;i++){
|
||||
actions.push({"name":res.data.data[i].towerName,"deviceID":res.data.data[i].id,"deviceSn":res.data.data[i].deviceSn,"chargePerson":res.data.data[i].principalPhone1});
|
||||
}
|
||||
that.setData({
|
||||
value:res.data.data[0].towerName,
|
||||
deviceName:res.data.data[0].towerName,
|
||||
deviceID:res.data.data[0].deviceSn,
|
||||
chargePerson:res.data.data[0].principalPhone1,
|
||||
actions:actions
|
||||
})
|
||||
that.getTowerBasicData(res.data.data[0].id);
|
||||
that.selectTowerCraneDetails(res.data.data[0].id);
|
||||
}else{
|
||||
that.setData({
|
||||
value:'',
|
||||
deviceName:'',
|
||||
deviceID:'',
|
||||
chargePerson:'',
|
||||
actions:[],
|
||||
towerBasicData:{},
|
||||
towerWarnData:{}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
/**
|
||||
* 塔机基础信息
|
||||
* @param {*} deviceId
|
||||
*/
|
||||
getTowerBasicData:function(deviceId){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/machicnery/getTowerBasicData',
|
||||
data:{
|
||||
"projectId":this.data.projectId,
|
||||
"deviceId":deviceId
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
that.onClickHide();
|
||||
that.setData({
|
||||
towerBasicData:res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 塔吊预警阈值
|
||||
* @param {*} deviceId
|
||||
*/
|
||||
selectTowerCraneDetails:function(deviceId){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/weixin/machicnery/selectTowerCraneDetails',
|
||||
data:{
|
||||
"projectId":this.data.projectId,
|
||||
"deviceId":deviceId
|
||||
},
|
||||
method:"GET",
|
||||
success:function(res){
|
||||
that.onClickHide();
|
||||
if(res.data.code == 0){
|
||||
that.setData({
|
||||
towerWarnData:res.data.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
//跳转到项目概况页面
|
||||
XMGK:function(){
|
||||
wx.redirectTo({
|
||||
url: '../xiangmugaikuang/xiangmugaikuang'
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
//跳转到人员管理
|
||||
RYGL:function(){
|
||||
wx.redirectTo({
|
||||
url: '../renyuanguanli/renyuanguanli'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到安全管控
|
||||
XMSP:function(){
|
||||
wx.redirectTo({
|
||||
//url: '../deepExcavation/index'
|
||||
url:'../newAddPage/safetyManagement/index'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
//跳转到更多更能
|
||||
GDGN:function(event){
|
||||
wx.redirectTo({
|
||||
url: '../gengduogongneng/gengduogongneng',
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
//跳转到机械设备
|
||||
gojxsb:function(event){
|
||||
wx.redirectTo({
|
||||
url: '../shebieguanli-jxsb/shajiangguan'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
//退出登录
|
||||
TCDL:function(){
|
||||
wx.clearStorageSync();
|
||||
wx.setStorageSync('isReload', "1")
|
||||
wx.redirectTo({
|
||||
url: '../login/login',
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
//返回到工程列表页面
|
||||
goGCLB:function(){
|
||||
wx.redirectTo({
|
||||
url: '../gongchengliebiao/gongchengliebiao'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
//返回到地图页面
|
||||
GOMAP:function(){
|
||||
wx.redirectTo({
|
||||
url: '../map/map',
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-row": "@vant/weapp/row",
|
||||
"van-col": "@vant/weapp/col",
|
||||
"van-action-sheet": "@vant/weapp/action-sheet",
|
||||
"van-sticky": "@vant/weapp/sticky",
|
||||
"van-tabbar": "@vant/weapp/tabbar",
|
||||
"van-tabbar-item": "@vant/weapp/tabbar-item",
|
||||
"van-popup": "@vant/weapp/popup",
|
||||
"van-circle": "@vant/weapp/circle",
|
||||
"ec-canvas": "../../ec-canvas/ec-canvas",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -1,297 +1,2 @@
|
|||
<view class="header_title">
|
||||
<view class="">
|
||||
<van-row>
|
||||
<van-col span="3">
|
||||
<view class="header_img" bindtap="showPopup"><image src="/images/core.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="goGCLB">
|
||||
<image src="/images/left.png"></image>
|
||||
<text class="header_fh">返回</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="10">
|
||||
<view class="header_name">设备管理</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 左侧账号信息 -->
|
||||
<van-popup show="{{ leftShow }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onLeftClose" >
|
||||
<view class="left_max">
|
||||
<van-row class="demo clearfix">
|
||||
<van-col span="10">
|
||||
<view class="left_head"><image src="http://fileimg.makalu.cc/szgl/9015e824c5004e629049c4f72967cfdc.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="14">
|
||||
<view class="left_info">
|
||||
<view class="left_info_name">{{userName}}</view>
|
||||
<view class="left_info_name">{{loginName}}</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<!-- <view class="left_manage_min">
|
||||
<view class="left_manage" bindtap="TCDL">
|
||||
<view class="left_sign">
|
||||
退出登录
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
<view class="max_content">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
|
||||
<!-- <view class="video_add">
|
||||
<view class="video_address">
|
||||
<view class="video_address_min" bindtap="GOMAP">
|
||||
{{projectName}}
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="device_types" bindtap="gojxsb">
|
||||
<text>机械设备</text>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="device_types active">
|
||||
<text>特种设备</text>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<view class="equipment_list">
|
||||
<view class="equipment_click" bindtap="onclick">
|
||||
{{value}}
|
||||
</view>
|
||||
</view>
|
||||
<van-action-sheet show="{{ show }}" actions="{{ actions }}" bind:close="onClose" bind:select="onSelect" />
|
||||
|
||||
|
||||
<view class="echarts_max">
|
||||
|
||||
<view class="echarts_min">
|
||||
<view class="equipment_img">
|
||||
<image src="http://fileimg.makalu.cc/b8a3c4b64a5f4c0ab412781c5ad1e11f.png"></image>
|
||||
</view>
|
||||
|
||||
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left">设备名称:</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_right">{{deviceName}}</view>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left">设备编号:</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_right">{{deviceID}}</view>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left">负责人:</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_right">{{chargePerson}}</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="echarts_max">
|
||||
<view class="echarts_min">
|
||||
<view class="eharts_title">塔吊基本信息汇总</view>
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left active">安全吊重:</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_right active"><text>{{towerBasicData.overload}}</text> t</view>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left active">单臂长:</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_right active"><text>{{towerBasicData.foreArmLength}}</text> m</view>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left active">塔吊高:</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_right active"><text>{{towerBasicData.downHeight}}</text> m</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="echarts_max">
|
||||
<view class="echarts_min">
|
||||
<view class="eharts_title">具体检测情况</view>
|
||||
<view class="equipment_yuzhi">预警阈值</view>
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left active">幅度:</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_middle active"><text>{{towerBasicData.ampData}}</text> m</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_right active"><text>{{towerWarnData.ampDataWarn}}</text> m</view>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left active">高度:</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_middle active"><text>{{towerBasicData.heightData}}</text> m</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_right active"><text>{{towerWarnData.heightDataWarn}}</text> m</view>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left active">转角:</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_middle active"><text>{{towerBasicData.angleData}}</text> °</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_right active"><text>{{towerWarnData.angleDataWarn}}</text> °</view>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left active">吊重:</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_middle active"><text>{{towerBasicData.weightData}}</text> t</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_right active"><text>{{towerWarnData.weightWarn}}</text> t</view>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left active">风速:</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_middle active"><text>{{towerBasicData.windSpeedData}}</text> m/s</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_right active"><text>{{towerWarnData.windSpeedDataWarn}}</text> m/s</view>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<view class="equipment_info_left active">倾角:</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_middle active"><text>{{towerBasicData.tiltData}}</text> °</view>
|
||||
</van-col>
|
||||
<van-col span="6">
|
||||
<view class="equipment_info_right active"><text>{{towerWarnData.tiltDataWarn}}</text> °</view>
|
||||
</van-col>
|
||||
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部导航 -->
|
||||
<van-tabbar active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
|
||||
<van-tabbar-item bindtap="XMGK" >
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_5.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_5.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
项目概况
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item >
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_2.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_2.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
设备管理
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="RYGL">
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_3.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_3.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
人员管理
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="XMSP">
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_7.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_7.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
安全管理
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item bindtap="GDGN">
|
||||
<image
|
||||
slot="icon"
|
||||
src="/images/footer_1.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height: 40rpx;"
|
||||
/>
|
||||
<image
|
||||
slot="icon-active"
|
||||
src="/images/foot_1.png"
|
||||
mode="aspectFit"
|
||||
style="width:40rpx; height:40rpx;"
|
||||
/>
|
||||
更多功能
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
<van-overlay show="{{loadShow}}">
|
||||
<view class="gif">
|
||||
<image src="../../images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
<!--pages/shebieguanli-tzsb/taji.wxml-->
|
||||
<text>pages/shebieguanli-tzsb/taji.wxml</text>
|
||||
|
|
|
@ -1,132 +0,0 @@
|
|||
/* pages/shebieguanli-taji/taji.wxss */
|
||||
.equipment_nav{
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
background:#26355a;
|
||||
color: #aaa;
|
||||
}
|
||||
.equipment_nav.active{
|
||||
background: #43539c;
|
||||
color: #fff;
|
||||
}
|
||||
.equipment_img{
|
||||
text-align: center;
|
||||
}
|
||||
.equipment_img image{
|
||||
width: 500rpx;
|
||||
height: 500rpx;
|
||||
}
|
||||
.equipment_list{
|
||||
padding: 10rpx 50rpx;
|
||||
}
|
||||
.equipment_click{
|
||||
border-radius:10rpx;
|
||||
background: #2b345b url("http://fileimg.makalu.cc/CORE_A03B0CFF180E400EBF5B761F9851AC27.png") no-repeat right/100rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
padding-left: 30rpx;
|
||||
font-size: 30rpx;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
.equipment_max{
|
||||
background: #1e2336;
|
||||
margin: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
}
|
||||
.equipment_info_left{
|
||||
height:60rpx;
|
||||
padding-left:30rpx;
|
||||
line-height: 60rpx;
|
||||
font-size: 28rpx;
|
||||
margin: 30rpx 0 0;
|
||||
|
||||
}
|
||||
.equipment_info_left.active{
|
||||
background:#2b345b
|
||||
}
|
||||
.equipment_info_right{
|
||||
height: 60rpx;
|
||||
text-align: right;
|
||||
padding-right:30rpx;
|
||||
line-height: 60rpx;
|
||||
font-size: 28rpx;
|
||||
color:#01f0ff ;
|
||||
margin: 30rpx 0 0;
|
||||
}
|
||||
.equipment_info_right.active{
|
||||
background:#313b67
|
||||
}
|
||||
.equipment_info_middle{
|
||||
height: 60rpx;
|
||||
text-align: left;
|
||||
padding-left:30rpx;
|
||||
line-height: 60rpx;
|
||||
font-size: 28rpx;
|
||||
color:#01f0ff ;
|
||||
margin: 30rpx 0 0;
|
||||
}
|
||||
.equipment_info_middle.active{
|
||||
background:#313b67
|
||||
}
|
||||
|
||||
.echarts_max{
|
||||
margin-top: 30rpx;
|
||||
padding:0 30rpx;
|
||||
}
|
||||
.echarts_min{
|
||||
background:#1e2336 ;
|
||||
font-size: 28rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.eharts_title{
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
padding-left: 40rpx;
|
||||
background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx;
|
||||
}
|
||||
.equipment_yuzhi{
|
||||
text-align: right;
|
||||
padding-right: 30rpx;
|
||||
color: #aaa;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.device_types{
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.device_types.active{
|
||||
color: #89a4e9;
|
||||
}
|
||||
.device_types.active text{
|
||||
border-bottom: 2px solid #89a4e9;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.van-popup--bottom.van-popup--round{
|
||||
border-radius: 0 !important
|
||||
}
|
||||
.van-popup{
|
||||
background-color: var(--popup-background-color,#232a44) !important
|
||||
}
|
||||
.van-action-sheet__cancel,.van-action-sheet__item{
|
||||
background-color: var(--popup-background-color,#232a44) !important;
|
||||
color: #0ad7ec;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ Page({
|
|||
this.setData({ show: true });
|
||||
},
|
||||
|
||||
onClose1() {
|
||||
onClosePopup() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
|
||||
|
@ -612,28 +612,11 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
//跳转到设备管理
|
||||
SBGL:function(){
|
||||
app.toast("敬请期待!");
|
||||
// wx.redirectTo({
|
||||
// url: '../shebieguanli-jxsb/shajiangguan',
|
||||
// })
|
||||
},
|
||||
|
||||
//跳转到人员管理
|
||||
RYGL:function(){
|
||||
app.toast("敬请期待!");
|
||||
// wx.redirectTo({
|
||||
// url: '../renyuanguanli/renyuanguanli'
|
||||
// })
|
||||
},
|
||||
|
||||
//跳转到安全管控
|
||||
XMSP:function(){
|
||||
app.toast("敬请期待!");
|
||||
// wx.redirectTo({
|
||||
// url:'../newAddPage/safetyManagement/index'
|
||||
// })
|
||||
wx.redirectTo({
|
||||
url:'../safety_manage/index'
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到质量管理
|
||||
|
@ -660,19 +643,20 @@ Page({
|
|||
},
|
||||
|
||||
//退出登录
|
||||
TCDL:function(){
|
||||
wx.clearStorageSync();
|
||||
wx.setStorageSync('isReload', "1")
|
||||
wx.redirectTo({
|
||||
url: '../login/login',
|
||||
})
|
||||
},
|
||||
//修改密码
|
||||
XGMM:function(){
|
||||
wx.redirectTo({
|
||||
url: '../updatePassword/updatePassword'
|
||||
})
|
||||
},
|
||||
TCDL:function(){
|
||||
wx.clearStorageSync();
|
||||
wx.setStorageSync('isReload', "1")
|
||||
wx.redirectTo({
|
||||
url: '../login/login',
|
||||
})
|
||||
},
|
||||
|
||||
//修改密码
|
||||
XGMM:function(){
|
||||
wx.redirectTo({
|
||||
url: '../updatePassword/updatePassword'
|
||||
})
|
||||
},
|
||||
//返回到地图页面
|
||||
GOMAP:function(){
|
||||
wx.redirectTo({
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 左侧账号信息 -->
|
||||
<van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onClose1" >
|
||||
<van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onClosePopup" >
|
||||
<view class="left_max">
|
||||
<van-row class="demo clearfix">
|
||||
<van-col span="24">
|
||||
|
|
Loading…
Reference in New Issue