|
|
|
@ -42,7 +42,8 @@
|
|
|
|
|
<view @tap="firstInspectionInfo(item.id,item)"> |
|
|
|
|
查看详情 |
|
|
|
|
</view> |
|
|
|
|
<view class="red" @tap="firstInspectionInfoSh(item.id,item)" v-if="isMenu('冲压审核')&&item.two_id==0"> |
|
|
|
|
<view class="red" @tap="firstInspectionInfoSh(item.id,item)" |
|
|
|
|
v-if="isMenu(36)&&item.two_id==0"> |
|
|
|
|
审核 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -56,7 +57,7 @@
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="submit-btn"> |
|
|
|
|
<button type="primary" v-if="isMenu('冲压提交')" @tap="addRecord()">新增巡检记录</button> |
|
|
|
|
<button type="primary" v-if="isMenu(31)" @tap="addRecord()">新增巡检记录</button> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -78,7 +79,7 @@
|
|
|
|
|
info: {}, |
|
|
|
|
power: [], |
|
|
|
|
jurisdiction: [], |
|
|
|
|
product_id:0, |
|
|
|
|
product_id: 0, |
|
|
|
|
list: [], |
|
|
|
|
limit: 10, |
|
|
|
|
page: 1 |
|
|
|
@ -94,27 +95,26 @@
|
|
|
|
|
onLoad(e) { |
|
|
|
|
this.plan_id = e.plan_id; |
|
|
|
|
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo)); |
|
|
|
|
this.product_id=this.CyInfo.product_id; |
|
|
|
|
this.product_id = this.CyInfo.product_id; |
|
|
|
|
this.power = this.userInfo.power |
|
|
|
|
this.getArr(); |
|
|
|
|
this.isMenu(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getArr() { |
|
|
|
|
let newArr = this.power.map(item => { |
|
|
|
|
if (item.children) { |
|
|
|
|
if (this.power.length > 0) { |
|
|
|
|
let newArr = this.power.map(item => { |
|
|
|
|
this.jurisdiction.push(item.id) |
|
|
|
|
|
|
|
|
|
item.children.map(items => { |
|
|
|
|
this.jurisdiction.push(items.title) |
|
|
|
|
return items |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
console.log("xinshuzu", this.jurisdiction) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
isMenu(title) { |
|
|
|
|
return this.jurisdiction.includes(title); |
|
|
|
|
isMenu(id) { |
|
|
|
|
console.log("id", id) |
|
|
|
|
return this.jurisdiction.includes(id); |
|
|
|
|
}, |
|
|
|
|
getData() { |
|
|
|
|
let param = { |
|
|
|
@ -136,7 +136,7 @@
|
|
|
|
|
complete: () => {} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
firstInspectionInfo(id,type) { |
|
|
|
|
firstInspectionInfo(id, type) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${this.plan_id}&product_id=${this.product_id}&id=${id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}&type=2`, |
|
|
|
|
success: res => {}, |
|
|
|
@ -144,7 +144,7 @@
|
|
|
|
|
complete: () => {} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
firstInspectionInfoSh(id,type) { |
|
|
|
|
firstInspectionInfoSh(id, type) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${this.plan_id}&&type=3&product_id=${this.product_id}&id=${id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}`, |
|
|
|
|
success: res => {}, |
|
|
|
|