huangli865118801 4 years ago
parent
commit
f510185581
  1. 25
      pages/assembleList/assembleList.vue
  2. 27
      pages/hardwareList/hardwareList.vue
  3. 18
      pages/index/index.vue
  4. 6
      pages/rawMaterial/rawMaterial.vue
  5. 31
      pages/sprayList/sprayList.vue
  6. 25
      pages/tcqList/tcqList.vue

25
pages/assembleList/assembleList.vue

@ -42,7 +42,7 @@
<view @tap="firstInspectionInfo(item.id,item)"> <view @tap="firstInspectionInfo(item.id,item)">
查看详情 查看详情
</view> </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(40)&&item.two_id==0">
审核 审核
</view> </view>
</view> </view>
@ -56,7 +56,7 @@
</view> </view>
</view> </view>
<view class="submit-btn"> <view class="submit-btn">
<button type="primary" v-if="isMenu('组装提交')" @tap="addRecord()">新增巡检记录</button> <button type="primary" v-if="isMenu(35)" @tap="addRecord()">新增巡检记录</button>
</view> </view>
</view> </view>
</view> </view>
@ -100,21 +100,20 @@
this.isMenu(); this.isMenu();
}, },
methods: { methods: {
getArr() { getArr() {
let newArr = this.power.map(item => { if (this.power.length > 0) {
if (item.children) { 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) console.log("xinshuzu", this.jurisdiction)
}, },
isMenu(title) { isMenu(id) {
return this.jurisdiction.includes(title); console.log("id", id)
return this.jurisdiction.includes(id);
}, },
getData() { getData() {
let param = { let param = {

27
pages/hardwareList/hardwareList.vue

@ -42,7 +42,7 @@
<view @tap="firstInspectionInfo(item.id,item)"> <view @tap="firstInspectionInfo(item.id,item)">
查看详情 查看详情
</view> </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(38)&&item.two_id==0">
审核 审核
</view> </view>
</view> </view>
@ -56,7 +56,7 @@
</view> </view>
</view> </view>
<view class="submit-btn"> <view class="submit-btn">
<button type="primary" v-if="isMenu('五金提交')" @tap="addRecord()">新增巡检记录</button> <button type="primary" v-if="isMenu(37)" @tap="addRecord()">新增巡检记录</button>
</view> </view>
</view> </view>
</view> </view>
@ -101,20 +101,19 @@
}, },
methods: { methods: {
getArr() { getArr() {
let newArr = this.power.map(item => { if (this.power.length > 0) {
if (item.children) { 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) console.log("xinshuzu", this.jurisdiction)
}, },
isMenu(title) { isMenu(id) {
return this.jurisdiction.includes(title); console.log("id", id)
return this.jurisdiction.includes(id);
}, },
getData() { getData() {
let param = { let param = {

18
pages/index/index.vue

@ -3,7 +3,7 @@
<view class="card"> <view class="card">
<view class="card-title">检验</view> <view class="card-title">检验</view>
<view class="card-content"> <view class="card-content">
<view v-if="isMenu('原材料检')" class="card-list" @tap="rawMaterial()"> <view v-if="isMenu(14)" class="card-list" @tap="rawMaterial()">
<view class="card-list-img"> <view class="card-list-img">
<image class="icon-yclj" src="../../static/yclj.png"></image> <image class="icon-yclj" src="../../static/yclj.png"></image>
</view> </view>
@ -19,7 +19,7 @@
首检记录 首检记录
</view> </view>
</view> --> </view> -->
<view v-if="isMenu('冲压巡检')" class="card-list" @tap="stampingInspection()"> <view v-if="isMenu(16)" class="card-list" @tap="stampingInspection()">
<view class="card-list-img"> <view class="card-list-img">
<image class="icon-yclj" src="../../static/cyxj.png"></image> <image class="icon-yclj" src="../../static/cyxj.png"></image>
</view> </view>
@ -27,7 +27,7 @@
冲压巡检 冲压巡检
</view> </view>
</view> </view>
<view v-if="isMenu('喷涂巡检')" class="card-list" @tap="spray()"> <view v-if="isMenu(17)" class="card-list" @tap="spray()">
<view class="card-list-img"> <view class="card-list-img">
<image class="icon-yclj" src="../../static/ptxj.png"></image> <image class="icon-yclj" src="../../static/ptxj.png"></image>
</view> </view>
@ -35,7 +35,7 @@
喷涂巡检 喷涂巡检
</view> </view>
</view> </view>
<view v-if="isMenu('组装巡检')" class="card-list" @click="assemble()"> <view v-if="isMenu(18)" class="card-list" @click="assemble()">
<view class="card-list-img"> <view class="card-list-img">
<image class="icon-yclj" src="../../static/zzxj.png"></image> <image class="icon-yclj" src="../../static/zzxj.png"></image>
</view> </view>
@ -43,7 +43,7 @@
组装巡检 组装巡检
</view> </view>
</view> </view>
<view v-if="isMenu('五金巡检')" class="card-list" @tap="hardware()"> <view v-if="isMenu(19)" class="card-list" @tap="hardware()">
<view class="card-list-img"> <view class="card-list-img">
<image class="icon-yclj" src="../../static/wjxj.png"></image> <image class="icon-yclj" src="../../static/wjxj.png"></image>
</view> </view>
@ -67,7 +67,7 @@
成品巡检 成品巡检
</view> </view>
</view> </view>
<view v-if="isMenu('三次元检测')" class="card-list" @tap="TCQ()"> <view v-if="isMenu(20)" class="card-list" @tap="TCQ()">
<view class="card-list-img"> <view class="card-list-img">
<image class="icon-yclj" src="../../static/cto.png"></image> <image class="icon-yclj" src="../../static/cto.png"></image>
</view> </view>
@ -189,13 +189,13 @@
onLoad() { onLoad() {
power({}).then(res => { power({}).then(res => {
res.map(item => { res.map(item => {
this.menuNameList.push(item.title); this.menuNameList.push(item.id);
}) })
}) })
}, },
methods: { methods: {
isMenu(title) { isMenu(id) {
return this.menuNameList.includes(title); return this.menuNameList.includes(id);
}, },
rawMaterial() { rawMaterial() {
uni.navigateTo({ uni.navigateTo({

6
pages/rawMaterial/rawMaterial.vue

@ -7,9 +7,11 @@
<view>材料名称:</view><text>{{item.title}}</text> <view>材料名称:</view><text>{{item.title}}</text>
</view> </view>
<view class="card-right"> <view class="card-right">
<image class="glass-cion" v-if="item.examine_status==0" src="../../static/search.png"></image> <!-- <image class="glass-cion" v-if="item.examine_status==0" src="../../static/search.png"></image>
<image class="sh-cion" v-if="item.examine_status==1" src="../../static/dsh.png"></image> <image class="sh-cion" v-if="item.examine_status==1" src="../../static/dsh.png"></image>
<image class="sh-cion" v-if="item.examine_status==2" src="../../static/ysh.png"></image> <image class="sh-cion" v-if="item.examine_status==2" src="../../static/ysh.png"></image> -->
<text v-if="item.m_id==null" style="font-size: 26upx;color: #4CD964;">待提交</text>
<text v-else style="font-size: 26upx;color: #007AFF;">查看</text>
</view> </view>
</view> </view>
<view class="card-dow-list"> <view class="card-dow-list">

31
pages/sprayList/sprayList.vue

@ -42,7 +42,7 @@
<view @tap="firstInspectionInfo(item.id,item)"> <view @tap="firstInspectionInfo(item.id,item)">
查看详情 查看详情
</view> </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(34)&&item.two_id==0">
审核 审核
</view> </view>
</view> </view>
@ -56,7 +56,7 @@
</view> </view>
</view> </view>
<view class="submit-btn"> <view class="submit-btn">
<button type="primary" v-if="isMenu('喷涂提交')" @tap="addRecord()">新增巡检记录</button> <button type="primary" v-if="isMenu(33)" @tap="addRecord()">新增巡检记录</button>
</view> </view>
</view> </view>
</view> </view>
@ -100,22 +100,21 @@
this.getArr() this.getArr()
}, },
methods: { methods: {
getArr() { getArr() {
if (this.power.length > 0) {
let newArr = this.power.map(item => { let newArr = this.power.map(item => {
if (item.children) { this.jurisdiction.push(item.id)
item.children.map(items => {
this.jurisdiction.push(items.title)
return items
})
}
}) })
console.log("xinshuzu", this.jurisdiction)
}, }
isMenu(title) { console.log("xinshuzu", this.jurisdiction)
return this.jurisdiction.includes(title);
}, },
isMenu(id) {
console.log("id", id)
return this.jurisdiction.includes(id);
},
getData() { getData() {
let param = { let param = {
plan_id: this.plan_id, plan_id: this.plan_id,

25
pages/tcqList/tcqList.vue

@ -56,7 +56,7 @@
</view> </view>
</view> </view>
<view class="submit-btn"> <view class="submit-btn">
<button type="primary" v-if="isMenu('TCQ提交')" @tap="addRecord()">新增巡检记录</button> <button type="primary" v-if="isMenu(39)" @tap="addRecord()">新增巡检记录</button>
</view> </view>
</view> </view>
</view> </view>
@ -101,20 +101,19 @@
}, },
methods: { methods: {
getArr() { getArr() {
let newArr = this.power.map(item => { if (this.power.length > 0) {
if (item.children) { 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) console.log("xinshuzu", this.jurisdiction)
}, },
isMenu(title) { isMenu(id) {
return this.jurisdiction.includes(title); console.log("id", id)
return this.jurisdiction.includes(id);
}, },
getData() { getData() {
let param = { let param = {

Loading…
Cancel
Save