设备异常抄送
This commit is contained in:
parent
1b9c79c1b5
commit
d5cbda9f89
|
@ -29,5 +29,5 @@
|
|||
<view style="position:fixed;bottom:0;left:0;width:100%;">
|
||||
<view style="color:red;text-align:center">{{msg}}</view>
|
||||
<button class="weui-btn" type="primary" bindtap="start" disabled="{{testdisable}}">开始考试</button>
|
||||
<button class="weui-btn" bindtap="start" wx:if="{{remainnum>0 && state==1 && notinTime ==0}}">重考({{remainnum}})</button>
|
||||
<button class="weui-btn" bindtap="start" wx:if="{{remainnum>0 && state==1 && notinTime ==0 && testnum!=0}}">重考({{remainnum}})</button>
|
||||
</view>
|
|
@ -12,7 +12,9 @@ Page({
|
|||
serverUrl: getApp().globalData.serverUrl,
|
||||
state:1,
|
||||
selected:false,
|
||||
selected1:true
|
||||
selected1:true,
|
||||
csry:"",
|
||||
isok:true
|
||||
},
|
||||
selected:function(e){
|
||||
this.setData({
|
||||
|
@ -44,6 +46,7 @@ Page({
|
|||
},
|
||||
changeItems:function(val){
|
||||
var x = []
|
||||
|
||||
for(var i=0;i<this.data.itemscheck0.length;i++){
|
||||
if(this.data.itemscheck0[i].type == val){
|
||||
x.push(this.data.itemscheck0[i])
|
||||
|
@ -69,12 +72,14 @@ Page({
|
|||
that.data.itemscheck[e.currentTarget.dataset.index].state = '正常'
|
||||
}
|
||||
else if (e.detail.value == '异常'){
|
||||
this.setData({
|
||||
isok:false
|
||||
})
|
||||
that.data.itemscheck[e.currentTarget.dataset.index].state = '异常待处理'
|
||||
}
|
||||
that.setData({
|
||||
itemscheck:that.data.itemscheck
|
||||
})
|
||||
console.log(that.data.itemscheck)
|
||||
},
|
||||
bindcontentInput: function (e) {
|
||||
this.data.content = e.detail.value
|
||||
|
@ -196,7 +201,19 @@ submit:function(){
|
|||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
let lst = getApp().globalData.selectPeopleList
|
||||
let nst = []
|
||||
let nst1 = []
|
||||
if (lst) {
|
||||
for (var i = 0; i < lst.length; i++) {
|
||||
nst.push(lst[i]['name'])
|
||||
nst1.push(lst[i]['id'])
|
||||
}
|
||||
this.setData({
|
||||
csryname: nst.join(','),
|
||||
csry: nst1.join(','),
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -310,12 +327,15 @@ submit:function(){
|
|||
let data1 = {
|
||||
equipment: this.data.equipment.id,
|
||||
state: 1,
|
||||
type: this.data.jclx
|
||||
type: this.data.jclx,
|
||||
csry: this.data.csry
|
||||
}
|
||||
let data2 = that.data.itemscheck
|
||||
for(var i=0;i<that.data.itemscheck.length;i++){
|
||||
if (that.data.itemscheck[i].state == '异常待处理'){
|
||||
if (!that.data.itemscheck[i].img||!that.data.itemscheck[i].desc){
|
||||
if (that.data.itemscheck[i].img||that.data.itemscheck[i].desc){
|
||||
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: '存在异常项目没有描述或图片!',
|
||||
icon:'none'
|
||||
|
|
|
@ -72,7 +72,19 @@
|
|||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class="weui-cell weui-cell_select" wx:if="{{!isok}}">
|
||||
<view class="weui-cell__hd weui-cell__hd_in-select-after">
|
||||
<view class="weui-label">抄送给</view>
|
||||
</view>
|
||||
<view class="weui-cell__bd">
|
||||
<navigator url="/pages/userSelect/userSelect">
|
||||
<view class="weui-select">请选择</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weui-cell weui-cell_access" style="height: 5.3em" wx:if="{{!isok}}">
|
||||
{{csryname}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-area ">
|
||||
<button class="weui-btn" type="primary" bindtap="submit3" >提交</button>
|
||||
|
|
Loading…
Reference in New Issue