|
@@ -33,7 +33,7 @@
|
|
|
<CellTip title="运维管理" v-if="operationsList.length > 0"></CellTip>
|
|
<CellTip title="运维管理" v-if="operationsList.length > 0"></CellTip>
|
|
|
<view class="nav">
|
|
<view class="nav">
|
|
|
<view class="nav-content">
|
|
<view class="nav-content">
|
|
|
- <view class="nav-item" v-for="(item, index) in operationsList" @click="toNav(item.url)">
|
|
|
|
|
|
|
+ <view class="nav-item" v-for="(item, index) in operationsList" @click="toNav(item.path)">
|
|
|
<span :class="'iconfont ' + item.icon"></span>
|
|
<span :class="'iconfont ' + item.icon"></span>
|
|
|
<i class="badge" v-if="item.badge">{{ item.badge }}</i>
|
|
<i class="badge" v-if="item.badge">{{ item.badge }}</i>
|
|
|
<label>{{ item.name }}</label>
|
|
<label>{{ item.name }}</label>
|
|
@@ -88,9 +88,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import CellTip from '@/components/CellTip.vue'
|
|
import CellTip from '@/components/CellTip.vue'
|
|
|
- import {
|
|
|
|
|
- statistics
|
|
|
|
|
- } from '@/api/myTicket'
|
|
|
|
|
|
|
+ import { statistics } from '@/api/myTicket'
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
CellTip
|
|
CellTip
|
|
@@ -260,7 +258,8 @@
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
//运维类
|
|
//运维类
|
|
|
- operationsList: [{
|
|
|
|
|
|
|
+ operationsList: [
|
|
|
|
|
+ {
|
|
|
name: '保养工单',
|
|
name: '保养工单',
|
|
|
type: 'maintenance',
|
|
type: 'maintenance',
|
|
|
workOrderType: 2,
|
|
workOrderType: 2,
|
|
@@ -358,7 +357,7 @@
|
|
|
icon: 'icon-gongdanguanli',
|
|
icon: 'icon-gongdanguanli',
|
|
|
badge: 0
|
|
badge: 0
|
|
|
//"num": 34
|
|
//"num": 34
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
],
|
|
],
|
|
|
treeList: []
|
|
treeList: []
|
|
|
}
|
|
}
|
|
@@ -366,14 +365,16 @@
|
|
|
created() {
|
|
created() {
|
|
|
this.getTree()
|
|
this.getTree()
|
|
|
},
|
|
},
|
|
|
- onShow() {
|
|
|
|
|
- this.getStatistics()
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // onShow() {
|
|
|
|
|
+ // this.getStatistics()
|
|
|
|
|
+ // },
|
|
|
methods: {
|
|
methods: {
|
|
|
getStatistics() {
|
|
getStatistics() {
|
|
|
// 获取工单统计数
|
|
// 获取工单统计数
|
|
|
statistics().then(res => {
|
|
statistics().then(res => {
|
|
|
this.workOrder = res
|
|
this.workOrder = res
|
|
|
|
|
+ console.log('this.operationsList---', this.operationsList)
|
|
|
|
|
+ console.log('res', res)
|
|
|
this.operationsList.forEach(item => {
|
|
this.operationsList.forEach(item => {
|
|
|
if (item.name == '保养工单') item.badge = res.maintenanceNum
|
|
if (item.name == '保养工单') item.badge = res.maintenanceNum
|
|
|
if (item.name == '巡点检工单') item.badge = res.patrolInspection
|
|
if (item.name == '巡点检工单') item.badge = res.patrolInspection
|
|
@@ -381,6 +382,7 @@
|
|
|
if (item.name == '维修工单') item.badge = res.repairsNum
|
|
if (item.name == '维修工单') item.badge = res.repairsNum
|
|
|
// if(item.badge)
|
|
// if(item.badge)
|
|
|
})
|
|
})
|
|
|
|
|
+ console.log(this.operationsList)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
getTree() {
|
|
getTree() {
|
|
@@ -393,8 +395,17 @@
|
|
|
if (f.path == 'productionManage') {
|
|
if (f.path == 'productionManage') {
|
|
|
this.productionList = f.children
|
|
this.productionList = f.children
|
|
|
} else if (f.path == 'operationsList') {
|
|
} else if (f.path == 'operationsList') {
|
|
|
- // this.operationsList = f.children
|
|
|
|
|
- // console.log(this.operationsList)
|
|
|
|
|
|
|
+ statistics().then(res => {
|
|
|
|
|
+ this.workOrder = res
|
|
|
|
|
+ console.log('this.operationsList---', this.operationsList)
|
|
|
|
|
+ console.log('res', res)
|
|
|
|
|
+ f.children.forEach(item => {
|
|
|
|
|
+ if (item.name == '保养工单') item.badge = res.maintenanceNum
|
|
|
|
|
+ if (item.name == '巡点检工单') item.badge = res.patrolInspection
|
|
|
|
|
+ if (item.name == '维修工单') item.badge = res.repairsNum
|
|
|
|
|
+ })
|
|
|
|
|
+ this.operationsList = f.children
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -409,7 +420,7 @@
|
|
|
HandlScanCode() {
|
|
HandlScanCode() {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
uni.scanCode({
|
|
uni.scanCode({
|
|
|
- success: function(res) {
|
|
|
|
|
|
|
+ success: function (res) {
|
|
|
_this.scantoRouter(res.result)
|
|
_this.scantoRouter(res.result)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|