作者 lihongjuan

Merge branch 'master' of http://114.215.101.231:8099/miniprogram/appui into lhj

# Conflicts:
#	app.json
... ... @@ -12,7 +12,6 @@
"pages/companybox/zhishudetail/yuanliaomsg/yuanliao/yuanliao",
"pages/qiye/qiye",
"pages/changqu/changqu",
"pages/companybox/zhishudetail/yuanliaomsg/yuanliaoDetail/yuanliaoDetail",
... ... @@ -26,10 +25,15 @@
"pages/mine/mine",
"pages/index/index",
"pages/logs/logs",
"pages/yujing/yujing",
"pages/yujing/yujing/yujing",
"pages/companybox/zhishudetail/qiyeyongdian/qyyd/qyyd",
"pages/ditu/ditu",
"pages/companybox/zhishudetail/chengpindetail/chengpindetail"
"pages/companybox/zhishudetail/member/member",
"pages/companybox/zhishudetail/chengpin/chengpin",
"pages/companybox/zhishudetail/yuanliaomsg/yuanliaoDetail/yuanliaoDetail",
"pages/yujing/yujingSet/yujingSet/yujingSet",
"pages/yujing/yujingSet/yujingAdd/yujingAdd",
"pages/yujing/yujingSet/yujingType/yujingType",
"pages/yujing/yujingSet/yujingPerson/yujingPerson"
],
"window": {
"backgroundTextStyle": "light",
... ... @@ -55,7 +59,7 @@
"selectedIconPath": "img/demo (16).png"
},
{
"pagePath": "pages/yujing/yujing",
"pagePath": "pages/yujing/yujing/yujing",
"text": "预警",
"selectedColor": "#FF9400",
"iconPath": "img/demo (12).png",
... ...
... ... @@ -23,4 +23,33 @@ image{
left: 0;
right: 0;
z-index: 5;
}
/* 预警 */
/* 添加 */
.add_btn{
width: 100%;
height: 80rpx;
background-color: #fff;
color: #FF9400;
position: fixed;
bottom: 0;
left: 0;
font-size: 30rpx;
text-align: center;
line-height: 80rpx;
}
.type_box{
border-top:1rpx solid #f5f5f5;
}
.type_single{
display: flex;
flex-direction: row;
padding: 30rpx;
border-bottom: 1rpx solid #f5f5f5;
align-items: center;
}
.type_img{
width: 36rpx;
height: 36rpx;
margin-right: 15rpx;
}
\ No newline at end of file
... ...

592 字节

<!--pages/yujing/yujing.wxml-->
<text>pages/yujing/yujing.wxml</text>
/* pages/yujing/yujing.wxss */
\ No newline at end of file
// pages/yujing/yujing.js
// pages/yujing/yujing/yujing.js
Page({
/**
... ...
<!--pages/yujing/yujing/yujing.wxml-->
<text>pages/yujing/yujing/yujing.wxml</text>
... ...
/* pages/yujing/yujing/yujing.wxss */
\ No newline at end of file
... ...
// pages/yujing/yujingSet/yujingAdd/yujingAdd.js
Page({
/**
* 页面的初始数据
*/
data: {
haveType:0,
havePerson:0,
type1:"",
person:"",
typeId: '',
personId:""
},
toType(){
wx.navigateTo({
url: '/pages/yujing/yujingSet/yujingType/yujingType',
})
},
toPerson(){
wx.navigateTo({
url: '/pages/yujing/yujingSet/yujingPerson/yujingPerson',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTextStyle": "black",
"navigationBarTitleText": "预警设置",
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/yujing/yujingSet/yujingAdd/yujingAdd.wxml-->
<view class="add_box">
<view class="add_wrap" bindtap='toType'>
<view class="warn_type">
<view class="{{type1?'isBlue':''}}">{{type1?type1:'预警类型'}}</view>
<view class="right_img">
<image src='/img/row.png'></image>
</view>
</view>
</view>
<view class="add_wrap" bindtap='toPerson'>
<view class="warn_type">
<view>请选择推送人员
<view class="isBlue person_name">{{person}}</view>
</view>
<view class="right_img">
<image src='/img/row.png'></image>
</view>
</view>
</view>
<view class="add_wrap">
<view class="uni-form-item uni-column warn_type">
<view class="title">参数值</view>
<input class="uni-input" type="number" placeholder="请输入参数值" />
</view>
</view>
</view>
<view class="add_btn" bindtap='submit'>保存</view>
\ No newline at end of file
... ...
/* pages/yujing/yujingSet/yujingAdd/yujingAdd.wxss */
.add_box{
border-top:1rpx solid #f5f5f5;
}
.add_wrap{
padding: 30rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.warn_type{
font-size: 32rpx;
color: #333;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.right_img{
width: 30rpx;
height: 30rpx;
line-height: 30rpx;
}
.person_name{
margin-top: 10rpx
}
.uni-column{
justify-content: flex-start;
}
.uni-input{
margin-left: 20rpx;
font-size: 28rpx;
color: #5797F5
}
.isBlue{
color: #5797F5
}
/* 保存 */
.add_btn{
background-color: #f5f5f5;
}
\ No newline at end of file
... ...
// pages/yujing/yujingSet/yujingPerson/yujingPerson.js
Page({
/**
* 页面的初始数据
*/
data: {
typeList: [{
id: 1,
type: false,
name: "张三"
}, {
id: 2,
type: false,
name: "张三1"
}, {
id: 3,
type: false,
name: "张三2"
}, {
id: 4,
type: false,
name: "张三3"
}],
// arr :[]
},
choicePerson(e) {
let list = this.data.typeList;
let index = e.currentTarget.dataset.index;
let id = e.currentTarget.dataset.id;
list[index].type = !list[index].type;
this.setData({
typeList: list
});
let arr = [];
for (let obj of list) {
if (obj.type) {
arr.push(obj.name)
}
}
let pages = getCurrentPages();
let currPage = pages[pages.length - 1]; //当前页面
let prevPage = pages[pages.length - 2]; //上一个页面
let person = prevPage.data.person;
let personId = prevPage.data.personId;
person = arr;
personId = id;
//直接调用上一个页面的setData()方法,把数据存到上一个页面中去
prevPage.setData({
person: person,
personId: personId
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTextStyle": "black",
"navigationBarTitleText": "推送人员",
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/yujing/yujingSet/yujingPerson/yujingPerson.wxml-->
<!--pages/yujing/yujingSet/yujingType/yujingType.wxml-->
<view class="type_box">
<view class="type_single" wx:for="{{typeList}}" wx:key="" bindtap='choicePerson' data-id="{{item.id}}" data-index="{{index}}" data-name="{{item.name}}">
<view class="type_img">
<image src='{{item.type?"/img/perYes.png":"/img/perNo.png"}}'></image>
</view>
<view>{{item.name}}</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/yujing/yujingSet/yujingPerson/yujingPerson.wxss */
... ...
// pages/yujing/yujingSet/yujingSet/yujingSet.js
Page({
/**
* 页面的初始数据
*/
data: {
list:[
{
title:"连续不开工时长(天):5",
msg:"推送人员:张三、李四、王五"
},
{
title: "电量持续减少时长(天):3",
msg: "推送人员:张三、李四、王五"
},
{
title: "企业平均开工时间下限(小时):6",
msg: "推送人员:张三、李四、王五"
},
]
},
addWarn(){
wx.navigateTo({
url: '/pages/yujing/yujingSet/yujingAdd/yujingAdd',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTextStyle": "black",
"navigationBarTitleText": "预警设置",
"usingComponents": {
}
}
\ No newline at end of file
... ...
<view class="warn_box">
<view class="warn_single"wx:for="{{list}}" wx:key="">
<view class="warn_wrap">
<view class="warn_title">{{item.title}}</view>
</view>
<view class="warn_wrap">
<view class="warn_msg">{{item.msg}}</view>
</view>
<view class="warn_btns">
<view class="modify_btn">修改</view>
<view class="cancle_btn">删除</view>
</view>
</view>
</view>
<view class="add_btn" bindtap='addWarn'>添加</view>
\ No newline at end of file
... ...
/* pages/yujing/yujingSet/yujingSet/yujingSet.wxss */
page{
background-color: #f5f5f5;
}
.warn_box{
padding:30rpx;
}
.warn_single{
background-color: #fff;
width: 100%;
border:1rpx solid rgba(197,197,197,1);
border-radius: 10rpx;
height: 300rpx;
display: flex;
flex-direction: column;
align-items:left;
margin-bottom: 30rpx;
}
.warn_wrap{
width: 100%;
}
.warn_title,.warn_msg{
padding: 32rpx;
border-bottom: 1rpx solid #e5e5e5;
}
.warn_title{
color: #333;
font-size: 32rpx;
font-weight: 600
}
.warn_msg{
font-size: 24rpx;
color: #666;
}
.warn_btns{
display: flex;
flex-direction: row;
align-items: center;
line-height: 102rpx;
color: #FF9400;
font-size: 30rpx;
width: 100%;
}
.modify_btn,.cancle_btn{
width: 50%;
border-right: 1rpx solid #e5e5e5;
text-align: center
}
.cancle_btn{
border:none;
color: #FF3038
}
... ...
// pages/yujing/yujingSet/yujingType/yujingType.js
Page({
/**
* 页面的初始数据
*/
data: {
typeList: [{
id: 1,
type: false,
name: "连续不开工预警"
}, {
id: 2,
type: false,
name: "电量低预警"
}, {
id: 3,
type: false,
name: "啦啦啦啦啊啦啦啦啦"
}, {
id: 4,
type: false,
name: "时长低预警"
}]
},
choiceType(e) {
let t = this;
let list = this.data.typeList;
let id = e.currentTarget.dataset.id;
let name = e.currentTarget.dataset.name;
let arr = [];
for (let obj of list) {
obj.type = false;
if (obj.id == id) {
obj.type = true
}
}
this.setData({
typeList: list
})
let pages = getCurrentPages();
let currPage = pages[pages.length - 1]; //当前页面
let prevPage = pages[pages.length - 2]; //上一个页面
let type = prevPage.data.type;
let type1 = prevPage.data.type1;
let typeId = prevPage.data.typeId;
type = name;
type1 = name;
typeId = id;
//直接调用上一个页面的setData()方法,把数据存到上一个页面中去
prevPage.setData({
type: type,
typeId: typeId,
type1:type1
});
// 选择后立刻返回
// wx.navigateBack({
// delta: 1
// })
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
wx.removeStorage({
key: 'type',
success: function(res) {},
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTextStyle": "black",
"navigationBarTitleText": "预警类型",
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/yujing/yujingSet/yujingType/yujingType.wxml-->
<view class="type_box">
<view class="type_single" wx:for="{{typeList}}" wx:key="" bindtap='choiceType' data-id="{{item.id}}" data-name="{{item.name}}">
<view class="type_img">
<image src='{{item.type?"/img/yes.png":"/img/no.png"}}'></image>
</view>
<view>{{item.name}}</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/yujing/yujingSet/yujingType/yujingType.wxss */
... ...
... ... @@ -39,17 +39,10 @@
"list": []
},
"miniprogram": {
"current": 5,
"current": 9,
"list": [
{
"id": -1,
"name": "qiyeyongdian",
"pathName": "pages/qiyeyongdian/qyyd/qyyd",
"query": "",
"scene": null
},
{
"id": -1,
"name": "企业用电",
"pathName": "pages/qiyeyongdian/detail/detail",
"query": "",
... ... @@ -72,7 +65,7 @@
{
"id": 4,
"name": "原料",
"pathName": "pages/yuanliaomsg/yuanliao/yuanliao",
"pathName": "pages/companybox/zhishudetail/yuanliaomsg/yuanliao/yuanliao",
"query": "",
"scene": null
},
... ... @@ -82,6 +75,41 @@
"pathName": "pages/yuanliaomsg/yuanliaoDetail/yuanliaoDetail",
"query": "",
"scene": null
},
{
"id": 5,
"name": "预警",
"pathName": "pages/yujing/yujing/yujing",
"query": "",
"scene": null
},
{
"id": -1,
"name": "预警设置",
"pathName": "pages/yujing/yujingSet/yujingSet/yujingSet",
"query": "",
"scene": null
},
{
"id": -1,
"name": "预警设置添加",
"pathName": "pages/yujing/yujingSet/yujingAdd/yujingAdd",
"query": "",
"scene": null
},
{
"id": -1,
"name": "预警类型",
"pathName": "pages/yujing/yujingSet/yujingType/yujingType",
"query": "",
"scene": null
},
{
"id": -1,
"name": "推送人员",
"pathName": "pages/yujing/yujingSet/yujingPerson/yujingPerson",
"query": "",
"scene": null
}
]
}
... ...