huangli865118801 3 years ago
parent
commit
faacd865f6
  1. 33
      pages/index/index.vue
  2. 8
      pages/stampingRecordList/stampingRecordList.vue
  3. 2
      pages/stopLineList/stopLineList.vue
  4. 48
      unpackage/cache/wgt/__UNI__E896C30/app-service.js
  5. 2
      unpackage/cache/wgt/__UNI__E896C30/app-view.js
  6. 48
      unpackage/dist/build/app-plus/app-service.js
  7. 2
      unpackage/dist/build/app-plus/app-view.js

33
pages/index/index.vue

@ -8,7 +8,7 @@
<image class="icon-yclj" src="../../static/yclj.png"></image>
</view>
<view class="menu-text">
原材料检
来料检验
</view>
</view>
<!-- <view v-if="isMenu('首检记录')" class="card-list" @tap="firstInspection()">
@ -179,14 +179,28 @@
import {
power
} from "../../api/user.js";
import {
mapGetters,
mapMutations
} from 'vuex';
export default {
data() {
return {
title: 'Hello',
menuNameList: []
menuNameList: [],
power: [],
jurisdiction: [],
}
},
onShow() {
this.isMenu();
},
computed: {
...mapGetters(['userInfo', 'roleType'])
},
onLoad() {
this.power = this.userInfo.power
power({}).then(res => {
res.map(item => {
this.menuNameList.push(item.id);
@ -194,8 +208,21 @@
})
},
methods: {
getArr() {
let newArr = this.power.map(item => {
if (item.children) {
item.children.map(items => {
this.jurisdiction.push(items.id)
return items
})
}
})
console.log("xinshuzu", this.jurisdiction)
},
isMenu(id) {
return this.menuNameList.includes(id);
return this.jurisdiction.includes(id);
},
rawMaterial() {
uni.navigateTo({

8
pages/stampingRecordList/stampingRecordList.vue

@ -169,10 +169,8 @@
}).then(res => {
this.list = res;
this.list.map(item => {
if (item.open_time > 0) {
let openTime = moment(item.open_time * 1000).format("YYYY-MM-DD hh:mm:ss");
item.tr = this.getRemainderTime(openTime);
@ -244,7 +242,7 @@
second = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
month >= 1 && month <= 9 ? (month = "0" + month) : "";
day >= 0 && day <= 9 ? (day = "0" + day) : "";
var timer = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
var timer = year + '-' + month + '-' + day + '' + hour + ':' + minute + ':' + second;
console.log("当前时间", timer)
return timer;
@ -265,10 +263,10 @@
runTime = runTime % 60;
var second = runTime;
// console.log(year,month,day,hour,minute,second);
if (month > 0) {
if (month > 0&&day>0) {
return month + '月' + day + '天' + hour + '小时' + minute + '分' + second + "秒";
} else {
return day + '天' + hour + '小时' + minute + '分' + second + "秒";
return hour + '小时' + minute + '分' + second + "秒";
}
}

2
pages/stopLineList/stopLineList.vue

@ -31,7 +31,7 @@
<view class="list-left-up-mid">停线原因:{{item.reason}}</view>
</view>
<view class="list-left-dow">
<view class="list-left-dow-left">产线状态:{{item.status==0?'已停线':'已恢复开线'}}</view>
<!-- <view class="list-left-dow-left">产线状态:{{item.status==0?'已停线':'已恢复开线'}}</view> -->
<view class="list-left-dow-btn">
<view @tap="editRecord(item.id)">
查看详情

48
unpackage/cache/wgt/__UNI__E896C30/app-service.js vendored

File diff suppressed because one or more lines are too long

2
unpackage/cache/wgt/__UNI__E896C30/app-view.js vendored

File diff suppressed because one or more lines are too long

48
unpackage/dist/build/app-plus/app-service.js vendored

File diff suppressed because one or more lines are too long

2
unpackage/dist/build/app-plus/app-view.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save