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