diff --git a/miniprogram/app.json b/miniprogram/app.json
index 9b98116..e927e71 100644
--- a/miniprogram/app.json
+++ b/miniprogram/app.json
@@ -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
}
diff --git a/miniprogram/app.wxss b/miniprogram/app.wxss
index ef7571a..8e574ff 100644
--- a/miniprogram/app.wxss
+++ b/miniprogram/app.wxss
@@ -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;
+}
diff --git a/miniprogram/newComponents/safety-pie-chart/index.js b/miniprogram/newComponents/safety-pie-chart/index.js
index 0a86526..7329cfe 100644
--- a/miniprogram/newComponents/safety-pie-chart/index.js
+++ b/miniprogram/newComponents/safety-pie-chart/index.js
@@ -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
diff --git a/miniprogram/pageage/project_insurance/add/index.js b/miniprogram/pageage/project_insurance/add/index.js
new file mode 100644
index 0000000..ee4571c
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/add/index.js
@@ -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() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_insurance/add/index.json b/miniprogram/pageage/project_insurance/add/index.json
new file mode 100644
index 0000000..aeb0384
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/add/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_insurance/add/index.wxml b/miniprogram/pageage/project_insurance/add/index.wxml
new file mode 100644
index 0000000..55334ac
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/add/index.wxml
@@ -0,0 +1,104 @@
+
+
+
+
+
+ {{projectName}}
+
+
+ 保险类型
+
+
+
+
+
+ 保险公司
+
+
+
+
+
+ 保险单号
+
+
+
+
+
+ 保险合同
+ [仅可上传PDF格式]
+
+
+
+
+
+
+
+ 取消
+ 保存
+
+
+
+
+
+ 数据加载中!请稍后...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miniprogram/pageage/project_insurance/add/index.wxss b/miniprogram/pageage/project_insurance/add/index.wxss
new file mode 100644
index 0000000..6a3c08a
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/add/index.wxss
@@ -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
+ }
diff --git a/miniprogram/pageage/project_insurance/info/index.js b/miniprogram/pageage/project_insurance/info/index.js
new file mode 100644
index 0000000..ac7bf16
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/info/index.js
@@ -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() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_insurance/info/index.json b/miniprogram/pageage/project_insurance/info/index.json
new file mode 100644
index 0000000..ef67f38
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/info/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "形象进度详情"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_insurance/info/index.wxml b/miniprogram/pageage/project_insurance/info/index.wxml
new file mode 100644
index 0000000..75095c5
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/info/index.wxml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+ {{infoData.projectName}}
+
+
+
+
+ 保险类型
+
+ {{infoData.insuranceTypeName}}
+
+
+
+
+
+ 保险合同
+
+
+
+ 下载附件
+
+
+
+
+
+
+ 投保状态
+
+ 已办理
+ 未办理
+
+
+
+
+
+ 投保单位
+
+ {{infoData.deptName}}
+
+
+
+
+
+ 保险公司
+ {{infoData.companyName}}
+
+
+
+
+ 保险单号
+ {{infoData.insuranceNumber}}
+
+
+
+
+ 提交用户
+ {{infoData.createBy}}
+
+
+
+
+ 提交时间
+ {{infoData.createTime}}
+
+
+
+
+
+
+ 删除
+
+
+
diff --git a/miniprogram/pageage/project_insurance/info/index.wxss b/miniprogram/pageage/project_insurance/info/index.wxss
new file mode 100644
index 0000000..e8ea92e
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/info/index.wxss
@@ -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;
+ }
\ No newline at end of file
diff --git a/miniprogram/pageage/project_insurance/list/index.js b/miniprogram/pageage/project_insurance/list/index.js
new file mode 100644
index 0000000..37f9636
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/list/index.js
@@ -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() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_insurance/list/index.json b/miniprogram/pageage/project_insurance/list/index.json
new file mode 100644
index 0000000..c38e268
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/list/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_insurance/list/index.wxml b/miniprogram/pageage/project_insurance/list/index.wxml
new file mode 100644
index 0000000..06f5d6d
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/list/index.wxml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+ {{index < 9 ?'0'+(index+1):(index+1)}}
+ 保险类型:{{' '+item.insuranceTypeName}}
+
+
+
+
+
+ 投保状态:
+ 已办理
+ 未办理
+
+ 单位名称:{{item.deptName}}
+ 保险公司:{{item.companyName?item.companyName:''}}
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
diff --git a/miniprogram/pageage/project_insurance/list/index.wxss b/miniprogram/pageage/project_insurance/list/index.wxss
new file mode 100644
index 0000000..f370194
--- /dev/null
+++ b/miniprogram/pageage/project_insurance/list/index.wxss
@@ -0,0 +1 @@
+/* pageage/project_checking_list/project_checking_list.wxss */
diff --git a/miniprogram/pageage/project_problemmodify/quality/add/index.js b/miniprogram/pageage/project_problemmodify/quality/add/index.js
index 99cce42..7f292ab 100644
--- a/miniprogram/pageage/project_problemmodify/quality/add/index.js
+++ b/miniprogram/pageage/project_problemmodify/quality/add/index.js
@@ -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
diff --git a/miniprogram/pageage/project_problemmodify/quality/add/index.wxml b/miniprogram/pageage/project_problemmodify/quality/add/index.wxml
index 4b42147..f07e0a1 100644
--- a/miniprogram/pageage/project_problemmodify/quality/add/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/quality/add/index.wxml
@@ -22,6 +22,12 @@
+
+ 检查类型
+
+
+
+
隐患类型
diff --git a/miniprogram/pageage/project_problemmodify/quality/check/index.wxml b/miniprogram/pageage/project_problemmodify/quality/check/index.wxml
index 1d46106..c60e0e8 100644
--- a/miniprogram/pageage/project_problemmodify/quality/check/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/quality/check/index.wxml
@@ -29,6 +29,15 @@
+
+
+ 问题类型
+
+ 常规检查
+ 专项检查
+
+
+
隐患类型
diff --git a/miniprogram/pageage/project_problemmodify/quality/info/index.wxml b/miniprogram/pageage/project_problemmodify/quality/info/index.wxml
index b91eaf3..d6ffd14 100644
--- a/miniprogram/pageage/project_problemmodify/quality/info/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/quality/info/index.wxml
@@ -29,6 +29,15 @@
+
+
+ 问题类型
+
+ 常规检查
+ 专项检查
+
+
+
隐患类型
diff --git a/miniprogram/pageage/project_problemmodify/quality/list/index.js b/miniprogram/pageage/project_problemmodify/quality/list/index.js
index 8e53ca8..9500629 100644
--- a/miniprogram/pageage/project_problemmodify/quality/list/index.js
+++ b/miniprogram/pageage/project_problemmodify/quality/list/index.js
@@ -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
-
+
待我办理({{dzgCount}})
整改完成({{yclCount}})
整改超时({{zgcsCount}})
-
-
-
+
+
{{index < 9 ?'0'+(index+1):(index+1)}}
- {{item.workParts}}
+ {{item.workParts}}
+ 常规检查
+ 专项检查
@@ -42,7 +43,9 @@
检查时间:{{item.createTime}}
- 整改要求:{{item.changeInfo}}
+
+ 整改要求:{{item.changeInfo}}
+
@@ -52,15 +55,15 @@
暂无数据
-
-
-
-
-
- 新增
-
-
+
+
+
+ 新增
+
+
+
+
diff --git a/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml b/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml
index f9bc05b..d21e830 100644
--- a/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml
@@ -29,6 +29,15 @@
+
+
+ 问题类型
+
+ 常规检查
+ 专项检查
+
+
+
隐患类型
diff --git a/miniprogram/pageage/project_problemmodify/security/add/index.js b/miniprogram/pageage/project_problemmodify/security/add/index.js
index f70b482..9600724 100644
--- a/miniprogram/pageage/project_problemmodify/security/add/index.js
+++ b/miniprogram/pageage/project_problemmodify/security/add/index.js
@@ -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
diff --git a/miniprogram/pageage/project_problemmodify/security/add/index.wxml b/miniprogram/pageage/project_problemmodify/security/add/index.wxml
index 2cf3ea9..5e187c5 100644
--- a/miniprogram/pageage/project_problemmodify/security/add/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/security/add/index.wxml
@@ -22,6 +22,12 @@
+
+ 检查类型
+
+
+
+
隐患类型
diff --git a/miniprogram/pageage/project_problemmodify/security/check/index.wxml b/miniprogram/pageage/project_problemmodify/security/check/index.wxml
index 1c91a48..bea23a0 100644
--- a/miniprogram/pageage/project_problemmodify/security/check/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/security/check/index.wxml
@@ -29,6 +29,15 @@
+
+
+ 问题类型
+
+ 常规检查
+ 专项检查
+
+
+
隐患类型
diff --git a/miniprogram/pageage/project_problemmodify/security/info/index.wxml b/miniprogram/pageage/project_problemmodify/security/info/index.wxml
index 93c66e0..0c6c52b 100644
--- a/miniprogram/pageage/project_problemmodify/security/info/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/security/info/index.wxml
@@ -29,6 +29,15 @@
+
+
+ 问题类型
+
+ 常规检查
+ 专项检查
+
+
+
隐患类型
diff --git a/miniprogram/pageage/project_problemmodify/security/list/index.js b/miniprogram/pageage/project_problemmodify/security/list/index.js
index ea15890..1f27b55 100644
--- a/miniprogram/pageage/project_problemmodify/security/list/index.js
+++ b/miniprogram/pageage/project_problemmodify/security/list/index.js
@@ -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
-
+
待我办理({{dzgCount}})
整改完成({{yclCount}})
整改超时({{zgcsCount}})
-
-
-
-
+
+
+
{{index < 9 ?'0'+(index+1):(index+1)}}
- {{item.workParts}}
+ {{item.workParts}}
+ 常规检查
+ 专项检查
@@ -42,7 +43,9 @@
检查时间:{{item.createTime}}
- 整改要求:{{item.changeInfo}}
+
+ 整改要求:{{item.changeInfo}}
+
@@ -52,15 +55,14 @@
暂无数据
-
-
-
-
- 新增
-
-
-
-
+
+
+
+ 新增
+
+
+
+
diff --git a/miniprogram/pageage/project_problemmodify/security/modify/index.wxml b/miniprogram/pageage/project_problemmodify/security/modify/index.wxml
index 300bf58..6731b9e 100644
--- a/miniprogram/pageage/project_problemmodify/security/modify/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/security/modify/index.wxml
@@ -28,6 +28,15 @@
+
+
+ 问题类型
+
+ 常规检查
+ 专项检查
+
+
+
隐患类型
diff --git a/miniprogram/pageage/project_special/list/index.js b/miniprogram/pageage/project_special/list/index.js
index 3e09134..8bfd951 100644
--- a/miniprogram/pageage/project_special/list/index.js
+++ b/miniprogram/pageage/project_special/list/index.js
@@ -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',
+ })
+ }
},
//项目切换 返回值
diff --git a/miniprogram/pageage/project_train/list/index.js b/miniprogram/pageage/project_train/list/index.js
index 0ea27ee..e00310c 100644
--- a/miniprogram/pageage/project_train/list/index.js
+++ b/miniprogram/pageage/project_train/list/index.js
@@ -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',
+ })
+ }
},
//项目切换 返回值
diff --git a/miniprogram/pages/Information-review/index.js b/miniprogram/pages/Information-review/index.js
deleted file mode 100644
index f9c4ae8..0000000
--- a/miniprogram/pages/Information-review/index.js
+++ /dev/null
@@ -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() {
-
- }
-})
\ No newline at end of file
diff --git a/miniprogram/pages/Information-review/index.json b/miniprogram/pages/Information-review/index.json
deleted file mode 100644
index 27ef2c0..0000000
--- a/miniprogram/pages/Information-review/index.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "usingComponents": {},
- "navigationBarTitleText":"临时人员信息审核"
-}
\ No newline at end of file
diff --git a/miniprogram/pages/Information-review/index.wxml b/miniprogram/pages/Information-review/index.wxml
deleted file mode 100644
index 53db68e..0000000
--- a/miniprogram/pages/Information-review/index.wxml
+++ /dev/null
@@ -1,183 +0,0 @@
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 待审核人员列表
-
-
-
-
-
-
-
-
- 筛选
-
-
-
-
-
-
-
-
-
- {{item.title}}
-
-
- 归属工种:
- {{item.worktype}}
-
-
-
- 姓名:
- {{item.name}}
-
-
-
- 注册时间:
- {{item.time}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 已通过人员列表
-
-
-
-
-
-
-
-
- 筛选
-
-
-
-
-
-
-
- {{item.title}}
-
- {{item.type}}
-
-
-
- 归属工种:
- {{item.worktype}}
-
-
-
- 姓名:
- {{item.name}}
-
-
-
- 注册时间:
- {{item.time}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 已驳回人员列表
-
-
-
-
-
-
-
-
- 筛选
-
-
-
-
-
-
-
- {{item.title}}
-
- {{item.type}}
-
-
-
- 归属工种:
- {{item.worktype}}
-
-
-
- 姓名:
- {{item.name}}
-
-
-
- 注册时间:
- {{item.time}}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/miniprogram/pages/Information-review/index.wxss b/miniprogram/pages/Information-review/index.wxss
deleted file mode 100644
index 3e98705..0000000
--- a/miniprogram/pages/Information-review/index.wxss
+++ /dev/null
@@ -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;
-}
\ No newline at end of file
diff --git a/miniprogram/pages/Security-control-echarts/index.js b/miniprogram/pages/Security-control-echarts/index.js
index d979188..1ba8ea8 100644
--- a/miniprogram/pages/Security-control-echarts/index.js
+++ b/miniprogram/pages/Security-control-echarts/index.js
@@ -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)
- },
+ }
})
\ No newline at end of file
diff --git a/miniprogram/pages/Security-control-echarts/index.json b/miniprogram/pages/Security-control-echarts/index.json
deleted file mode 100644
index 686e0c3..0000000
--- a/miniprogram/pages/Security-control-echarts/index.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "usingComponents": {},
- "navigationBarTitleText": "配电箱监测"
-
-}
\ No newline at end of file
diff --git a/miniprogram/pages/Security-control-echarts/index.wxml b/miniprogram/pages/Security-control-echarts/index.wxml
index 3276abe..2d26574 100644
--- a/miniprogram/pages/Security-control-echarts/index.wxml
+++ b/miniprogram/pages/Security-control-echarts/index.wxml
@@ -1,124 +1,2 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- T
-
-
- 温度监控
-
-
-
-
- 近七天
-
-
- 近30天
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A
-
-
- 电流监控
-
-
-
-
- 近七天
-
-
- 近30天
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+pages/Security-control-echarts/index.wxml
diff --git a/miniprogram/pages/Security-control-echarts/index.wxss b/miniprogram/pages/Security-control-echarts/index.wxss
deleted file mode 100644
index a6133d7..0000000
--- a/miniprogram/pages/Security-control-echarts/index.wxss
+++ /dev/null
@@ -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;
-}
\ No newline at end of file
diff --git a/miniprogram/pages/gengduogongneng/gengduogongneng.js b/miniprogram/pages/gengduogongneng/gengduogongneng.js
index e4cf112..24720e6 100644
--- a/miniprogram/pages/gengduogongneng/gengduogongneng.js
+++ b/miniprogram/pages/gengduogongneng/gengduogongneng.js
@@ -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 });
},
diff --git a/miniprogram/pages/gengduogongneng/gengduogongneng.wxml b/miniprogram/pages/gengduogongneng/gengduogongneng.wxml
index 50a2718..b57806a 100644
--- a/miniprogram/pages/gengduogongneng/gengduogongneng.wxml
+++ b/miniprogram/pages/gengduogongneng/gengduogongneng.wxml
@@ -19,7 +19,7 @@
-
+
diff --git a/miniprogram/pages/hnt-strong/index.js b/miniprogram/pages/hnt-strong/index.js
index b7df7ff..d8e9a2f 100644
--- a/miniprogram/pages/hnt-strong/index.js
+++ b/miniprogram/pages/hnt-strong/index.js
@@ -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();
-
}
})
\ No newline at end of file
diff --git a/miniprogram/pages/hnt-strong/index.json b/miniprogram/pages/hnt-strong/index.json
deleted file mode 100644
index f5c270b..0000000
--- a/miniprogram/pages/hnt-strong/index.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "usingComponents": {
- "van-action-sheet": "@vant/weapp/action-sheet"
- },
- "navigationBarTitleText": "混凝土强度监测"
-}
\ No newline at end of file
diff --git a/miniprogram/pages/hnt-strong/index.wxml b/miniprogram/pages/hnt-strong/index.wxml
index 5e45c4f..d05c5c4 100644
--- a/miniprogram/pages/hnt-strong/index.wxml
+++ b/miniprogram/pages/hnt-strong/index.wxml
@@ -1,91 +1,2 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+pages/hnt-strong/index.wxml
diff --git a/miniprogram/pages/hnt-strong/index.wxss b/miniprogram/pages/hnt-strong/index.wxss
deleted file mode 100644
index 4be9f50..0000000
--- a/miniprogram/pages/hnt-strong/index.wxss
+++ /dev/null
@@ -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;
-}
\ No newline at end of file
diff --git a/miniprogram/pages/learn-page/index.js b/miniprogram/pages/learn-page/index.js
index a462984..8be7a5d 100644
--- a/miniprogram/pages/learn-page/index.js
+++ b/miniprogram/pages/learn-page/index.js
@@ -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'
- })
}
})
\ No newline at end of file
diff --git a/miniprogram/pages/learn-page/index.json b/miniprogram/pages/learn-page/index.json
deleted file mode 100644
index d729faa..0000000
--- a/miniprogram/pages/learn-page/index.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "usingComponents": {},
- "navigationBarTitleText": "安全学习确认"
-}
\ No newline at end of file
diff --git a/miniprogram/pages/learn-page/index.wxml b/miniprogram/pages/learn-page/index.wxml
index 186df31..d866ba1 100644
--- a/miniprogram/pages/learn-page/index.wxml
+++ b/miniprogram/pages/learn-page/index.wxml
@@ -1,20 +1,2 @@
-
-
-
-
-
-
- 您暂未绑定,请先进行基本信息绑定
-
-
-
-
\ No newline at end of file
+
+pages/learn-page/index.wxml
diff --git a/miniprogram/pages/learn-page/index.wxss b/miniprogram/pages/learn-page/index.wxss
deleted file mode 100644
index 513fe6b..0000000
--- a/miniprogram/pages/learn-page/index.wxss
+++ /dev/null
@@ -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;
-}
\ No newline at end of file
diff --git a/miniprogram/pages/measures/index.js b/miniprogram/pages/measures/index.js
index 5b6ae85..9470b5a 100644
--- a/miniprogram/pages/measures/index.js
+++ b/miniprogram/pages/measures/index.js
@@ -5,7 +5,7 @@ Page({
* 页面的初始数据
*/
data: {
- initData: { text: '请选择你的项目', id: 0 }
+
},
/**
diff --git a/miniprogram/pages/measures/index.json b/miniprogram/pages/measures/index.json
deleted file mode 100644
index f80619c..0000000
--- a/miniprogram/pages/measures/index.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "usingComponents": {},
- "navigationBarTitleText": "测量仪器"
-}
\ No newline at end of file
diff --git a/miniprogram/pages/measures/index.wxml b/miniprogram/pages/measures/index.wxml
index fbb65fc..93f7958 100644
--- a/miniprogram/pages/measures/index.wxml
+++ b/miniprogram/pages/measures/index.wxml
@@ -1,261 +1,2 @@
-
-
-
-
-
-
-
-
-
-
-
-
- *
-
-
- 仪器名称:
-
-
-
-
-
-
-
- *
-
-
- 使用状态:
-
-
-
-
-
-
-
- *
-
-
- 管理编号:
-
-
-
-
-
-
-
- *
-
-
- 规则型号:
-
-
-
-
-
-
-
- *
-
-
- 购买日期:
-
-
-
-
-
-
-
- *
-
-
- 原值:
-
-
-
-
-
-
-
- *
-
-
- 净值:
-
-
-
-
-
-
-
- *
-
-
- 附属设备:
-
-
-
-
-
-
-
- *
-
-
- 标称精度:
-
-
-
-
-
-
-
- *
-
-
- 生产厂家:
-
-
-
-
-
-
-
- *
-
-
- 出厂编号:
-
-
-
-
-
-
-
- *
-
-
- 检定日期:
-
-
-
-
-
-
-
- *
-
-
- 检定周期(月):
-
-
-
-
-
-
-
- *
-
-
- 检定有效截至日期:
-
-
-
-
-
-
-
- *
-
-
- 检定有效期:
-
-
-
-
-
-
-
- *
-
-
- 检定单位:
-
-
-
-
-
-
-
- *
-
-
- 检定结论:
-
-
-
-
-
-
-
- *
-
-
- 检定证书编号:
-
-
-
-
-
-
-
- *
-
-
- 检定证书文件上传(PDF/图片):
-
-
-
- +
-
-
-
-
-
-
- *
-
-
- 使用单位:
-
-
-
-
-
-
-
- *
-
-
- 是否可调拨:
-
-
-
-
-
-
-
- *
-
-
- 备注:
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+pages/measures/index.wxml
diff --git a/miniprogram/pages/measures/index.wxss b/miniprogram/pages/measures/index.wxss
deleted file mode 100644
index 6c2c6c9..0000000
--- a/miniprogram/pages/measures/index.wxss
+++ /dev/null
@@ -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;
-}
\ No newline at end of file
diff --git a/miniprogram/pages/ranyuanguanli-map/map.js b/miniprogram/pages/ranyuanguanli-map/map.js
index 28c0a32..3c1b4a8 100644
--- a/miniprogram/pages/ranyuanguanli-map/map.js
+++ b/miniprogram/pages/ranyuanguanli-map/map.js
@@ -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;i0){
- var markers = [];
- var userLocationList = gsph.data.userLocationList;
- for(var i=0;i
-
-
-
-
-
-
-
- {{projectName}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 刷新
-
-
-
-
-
- 列表
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.batteryPercent}}%
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.name}} ({{item.workType}})
- {{item.onlineEvent}}
-
-
- {{item.uninName}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 今日工时:{{item.sc}}
-
-
-
-
- 本月出勤:{{item.attenCount}}天
-
-
-
-
- 项目名称:{{item.projectName}}
-
-
- 定位时间:{{item.time}}
-
-
- {{item.projectAddress}}
-
-
-
-
-
-
-
-
-
-
-
- 今日
-
-
- 本周
-
-
- 本月
-
-
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
- {{item.name}} {{item.workType}}
- {{item.onlineEvent}}
-
-
-
-
-
-
-
-
- {{item.batteryPercent}}%
-
-
-
- {{item.uninName}}
-
-
- 本月出勤:{{item.attenCount}} 天
- {{item.sc}}
-
-
-
-
-
-
-
-
-
-
-
-
- 数据加载中!请稍后...
-
-
-
-
-
-
-
+
+pages/ranyuanguanli-map/map.wxml
diff --git a/miniprogram/pages/ranyuanguanli-map/map.wxss b/miniprogram/pages/ranyuanguanli-map/map.wxss
deleted file mode 100644
index 573f5b5..0000000
--- a/miniprogram/pages/ranyuanguanli-map/map.wxss
+++ /dev/null
@@ -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;
- }
-
-
diff --git a/miniprogram/pages/safety_manage/index.js b/miniprogram/pages/safety_manage/index.js
new file mode 100644
index 0000000..869e5a8
--- /dev/null
+++ b/miniprogram/pages/safety_manage/index.js
@@ -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'
+ })
+ },
+
+
+})
diff --git a/miniprogram/pages/safety_manage/index.json b/miniprogram/pages/safety_manage/index.json
new file mode 100644
index 0000000..b516867
--- /dev/null
+++ b/miniprogram/pages/safety_manage/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-tabbar": "@vant/weapp/tabbar",
+ "van-tabbar-item": "@vant/weapp/tabbar-item"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/miniprogram/pages/safety_manage/index.wxml b/miniprogram/pages/safety_manage/index.wxml
new file mode 100644
index 0000000..61ab7d3
--- /dev/null
+++ b/miniprogram/pages/safety_manage/index.wxml
@@ -0,0 +1,267 @@
+
+
+
+
+
+
+
+ {{deptName}}
+
+
+
+
+
+
+ {{nickName}}
+ {{loginName}}
+
+
+
+
+
+
+ 修改密码
+
+
+
+
+
+
+ 退出登录
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.menu_name}}
+
+
+
+
+
+
+
+
+ 专项培训({{trainTotal}})
+ 查看详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 安全检查
+ 查看详情
+
+
+
+
+ 常规检查次数
+
+
+ 整改率
+ {{securityCheck.routineRectificationRate}} %
+
+
+
+ 检查问题数
+ {{securityCheck.routineProblemTotal}}
+
+
+
+
+ 专项检查次数
+
+
+ 整改率
+ {{securityCheck.specialRectificationRate}} %
+
+
+
+ 检查问题数
+ {{securityCheck.specialProblemTotal}}
+
+
+
+
+
+
+
+
+
+
+ 特种作业人员
+ 查看详情
+
+
+
+
+
+
+
+ 项目保险
+ 查看详情
+
+
+
+
+
+
+
+
+ 在岗人员
+ 查看详情
+
+
+
+
+
+
+
+
+ 应急演练({{emergencyDrillTotal}})
+ 查看详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 项目概况
+
+
+
+
+
+ 安全管理
+
+
+
+
+
+ 质量管理
+
+
+
+
+
+ 进度管理
+
+
+
+
+
+ 更多功能
+
+
+
+
+
diff --git a/miniprogram/pages/safety_manage/index.wxss b/miniprogram/pages/safety_manage/index.wxss
new file mode 100644
index 0000000..ead22de
--- /dev/null
+++ b/miniprogram/pages/safety_manage/index.wxss
@@ -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;
+ }
\ No newline at end of file
diff --git a/miniprogram/pages/shebeiguanli-map/jixiedingwei.js b/miniprogram/pages/shebeiguanli-map/jixiedingwei.js
index f6753ad..9a0152b 100644
--- a/miniprogram/pages/shebeiguanli-map/jixiedingwei.js
+++ b/miniprogram/pages/shebeiguanli-map/jixiedingwei.js
@@ -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 {
- 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;i0){
- var markers = [];
- for(var i=0;i