修改bug
This commit is contained in:
parent
79d43b90c0
commit
0cfabe82ab
|
@ -46,8 +46,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</u-card> -->
|
||||
|
||||
<view v-show="currentIndex==0" style="text-align: right;">
|
||||
<view v-show="currentIndex==0" style="text-align: right;position:sticky;top:0;z-index: 9999;background-color: white;
|
||||
border-bottom:dotted #ff0000;">
|
||||
<view style="height: 12rpx;"></view>
|
||||
<u-checkbox v-model="mutiSelect" @change="mutiSelectChange" v-if="initData.leader==vuex_user.id">多选</u-checkbox>
|
||||
<u-button type="primary" size="mini" style="margin-left:6rpx" @click="membersShow"
|
||||
v-if="initData.leader==vuex_user.id && mutiSelect">指派给</u-button>
|
||||
|
@ -65,7 +66,7 @@
|
|||
{{item.item_.sortnum}}.{{item.item_.name}}
|
||||
</view>
|
||||
<view class="u-body-item">
|
||||
<span v-if="item.checker_">{{item.checker_.name}}</span>
|
||||
<span v-if="item.checker_" style="color:gray">{{item.checker_.name}}</span>
|
||||
<span v-if="item.result=='发现'" style="color:red;margin-left:8rpx">{{item.result}}</span>
|
||||
<span v-else-if="item.result=='未发现'" style="color:green;margin-left:8rpx">{{item.result}}</span>
|
||||
<span v-else-if="item.result=='不适用'" style="color:green;margin-left:8rpx">{{item.result}}</span>
|
||||
|
@ -156,11 +157,23 @@
|
|||
this.members = res.data.members
|
||||
})
|
||||
}
|
||||
|
||||
this.getRecords();
|
||||
},
|
||||
onShow() {
|
||||
this.getSubtaskDept();
|
||||
this.getRecords();
|
||||
let rd = uni.getStorageSync('inspectrecord')
|
||||
if(rd){
|
||||
for(var i=0;i<this.records.length;i++){
|
||||
if(this.records[i].id==rd.id){
|
||||
this.records[i] = rd
|
||||
}
|
||||
}
|
||||
for(var i=0;i<this.records_.length;i++){
|
||||
if(this.records_[i].id==rd.id){
|
||||
this.records_[i] = rd
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getSubtaskDept() {
|
||||
|
@ -172,11 +185,16 @@
|
|||
})
|
||||
},
|
||||
getRecords() {
|
||||
uni.showLoading({
|
||||
title:'加载中...',
|
||||
mask:true
|
||||
})
|
||||
this.$u.api.getInspectRecords({
|
||||
subtask: this.initData.subtask,
|
||||
dept: this.initData.dept,
|
||||
pageoff: true
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
this.records_ = res.data
|
||||
this.records = res.data
|
||||
// for(var i=0;i<this.records.length;i++){
|
||||
|
@ -184,8 +202,9 @@
|
|||
// }
|
||||
this.mutiSelect = false
|
||||
this.sectionChange(this.currentIndex)
|
||||
this.selfChange({value:this.is_self})
|
||||
// this.setCollapse(this.records_)
|
||||
})
|
||||
}).catch(e=>{uni.hideLoading()})
|
||||
},
|
||||
selfChange(val) {
|
||||
if (val.value) {
|
||||
|
|
|
@ -81,7 +81,6 @@
|
|||
})
|
||||
}
|
||||
this.fileList = fileList
|
||||
console.log(this.fileList)
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
|
@ -116,7 +115,12 @@
|
|||
// console.log(sData.imgs)
|
||||
|
||||
this.$u.api.checkInspectRecord(sData.id, sData).then(res => {
|
||||
uni.setStorageSync('inspectrecord', res.data)
|
||||
this.$u.toast('提交成功');
|
||||
|
||||
|
||||
|
||||
|
||||
uni.navigateBack({
|
||||
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue