bug修复

This commit is contained in:
wuhongjian 2022-10-18 15:23:33 +08:00
parent 3f6e432d0b
commit e96c0c11b1
1 changed files with 45 additions and 42 deletions

View File

@ -2,7 +2,7 @@
* @Author: kongjun qdkongjun@gmail.com * @Author: kongjun qdkongjun@gmail.com
* @Date: 2022-06-20 09:29:59 * @Date: 2022-06-20 09:29:59
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-10-18 15:15:37 * @LastEditTime: 2022-10-18 15:22:45
* @FilePath: \back\src\views\main-sidebar.vue * @FilePath: \back\src\views\main-sidebar.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
@ -35,8 +35,8 @@
<script> <script>
import http from '@/utils/request' import http from '@/utils/request'
import SubMenu from "./main-sidebar-sub-menu"; import SubMenu from './main-sidebar-sub-menu'
import returnLocationStr from '@/utils/location'; import returnLocationStr from '@/utils/location'
import bus from '@/views/bus.js' import bus from '@/views/bus.js'
export default { export default {
data () { data () {
@ -49,51 +49,54 @@ export default {
}, },
created () { created () {
this.getNum() this.getNum()
//this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"]; // this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
// //
bus.$off('updateTaskNum') bus.$off('updateTaskNum')
bus.$on('updateTaskNum', () => { bus.$on('updateTaskNum', () => {
this.getNum() this.getNum()
}) })
}, },
methods: { methods: {
getNum(){ getNum () {
http.get('/act/task/myToDoTaskNum').then(({ data: res }) => { http.get('/act/task/myToDoTaskNum').then(({ data: res }) => {
this.numObject=res.data this.numObject = res.data
let menuList= window.SITE_CONFIG["menuList"]; const menuList = window.SITE_CONFIG.menuList
console.log('menuList====>',menuList); console.log('menuList====>', menuList)
console.log('this.numObject====>',this.numObject); console.log('this.numObject====>', this.numObject)
for(var i=0;i<menuList.length;i++){ for (var i = 0; i < menuList.length; i++) {
let menu=menuList[i]; const menu = menuList[i]
if(menu.id=='1541261628388888578'){// if (menu.id == '1541261628388888578') { //
let daibanNum=0 let daibanNum = 0
for(let j=0;j<menu.children.length;j++){ for (let j = 0; j < menu.children.length; j++) {
let children=menu.children[j] const children = menu.children[j]
if(children.id=="1541261780432408577"){// v2 if (children.id == '1541261780432408577') { // v2
//西 v2 v3 // 西 v2 v3
children.total= returnLocationStr() == 'qingdao' ? Number(this.numObject.abilityprocess_v3) : Number(this.numObject.abilityprocess_v2) children.total = returnLocationStr() == 'qingdao' ? Number(this.numObject.abilityprocess_v3) : Number(this.numObject.abilityprocess_v2)
daibanNum=Number(daibanNum)+Number(children.total) daibanNum = Number(daibanNum) + Number(children.total)
} if(children.id=="1559376285703081986"){// } if (children.id == '1559376285703081986') { //
children.total=Number(this.numObject.meetingroom_book) children.total = Number(this.numObject.meetingroom_book)
daibanNum=Number(daibanNum)+Number(children.total) daibanNum = Number(daibanNum) + Number(children.total)
}if(children.id=="1545292602084827138"){// } if (children.id == '1545292602084827138') { //
children.total=Number(this.numObject.resourcemountapply) children.total = Number(this.numObject.resourcemountapply)
daibanNum=Number(daibanNum)+Number(children.total) daibanNum = Number(daibanNum) + Number(children.total)
}if(children.id=="1545312045695377410"){// } if (children.id == '1545312045695377410') { //
children.total=Number(this.numObject.abilitydemandapply) children.total = Number(this.numObject.abilitydemandapply)
daibanNum=Number(daibanNum)+Number(children.total) daibanNum = Number(daibanNum) + Number(children.total)
}if(children.id=="1545313018614521857"){// } if (children.id == '1545313018614521857') { //
children.total=Number(this.numObject.resourcundercarriageapply) children.total = Number(this.numObject.resourcundercarriageapply)
daibanNum=Number(daibanNum)+Number(children.total) daibanNum = Number(daibanNum) + Number(children.total)
}if(children.id=="1545313754106699777"){// } if (children.id == '1545313754106699777') { //
children.total=Number(this.numObject.comment_review) children.total = Number(this.numObject.comment_review)
daibanNum=Number(daibanNum)+Number(children.total) daibanNum = Number(daibanNum) + Number(children.total)
}if(children.id=="1554294862931562498"){// } if (children.id == '1554294862931562498') { //
children.total=0 children.total = 0
daibanNum=Number(daibanNum)+Number(children.total) daibanNum = Number(daibanNum) + Number(children.total)
} }
} }
menu.total=daibanNum menu.total = daibanNum
}
}
})
} }
} }
} }