|
@@ -74,8 +74,8 @@
|
|
|
worktop: `${baseUrlImg}/working/worktop.png`, //图片
|
|
|
zhudongjiancha: `${baseUrlImg}/working/zhudongjiancha.png`,
|
|
|
yinhuanguanli: `${baseUrlImg}/working/yinhuanguanli.png`,
|
|
|
- yinhuanfucha:`${baseUrlImg}/working/yinhuanfucha.png`,//隐患复查
|
|
|
- check_inspection:`${baseUrlImg}/working/check_inspection.png`,//主动检查
|
|
|
+ yinhuanfucha: `${baseUrlImg}/working/yinhuanfucha.png`, //隐患复查
|
|
|
+ check_inspection: `${baseUrlImg}/working/check_inspection.png`, //主动检查
|
|
|
user_business: `${baseUrlImg}/working/user_business.png`,
|
|
|
tabler_clock_edit: `${baseUrlImg}/working/tabler_clock_edit.png`,
|
|
|
tabler_chart_histogram: `${baseUrlImg}/working/tabler_chart_histogram.png`, //数据统计
|
|
@@ -93,10 +93,10 @@
|
|
|
drill: `${baseUrlImg}/working/drill.png`,
|
|
|
// archive: `${baseUrlImg}/working/gongzuodangan.png`,
|
|
|
archive: `${baseUrlImg}/working/archive.png`,
|
|
|
- fireSpecial:`${baseUrlImg}/working/fireSpecial.png`,
|
|
|
- fireWork:`${baseUrlImg}/working/fireWork.png`,
|
|
|
- fire_inspetItem:`${baseUrlImg}/working/fire_inspetItem.png`,
|
|
|
- fire_street:`${baseUrlImg}/working/fire_street.png`,
|
|
|
+ fireSpecial: `${baseUrlImg}/working/fireSpecial.png`,
|
|
|
+ fireWork: `${baseUrlImg}/working/fireWork.png`,
|
|
|
+ fire_inspetItem: `${baseUrlImg}/working/fire_inspetItem.png`,
|
|
|
+ fire_street: `${baseUrlImg}/working/fire_street.png`,
|
|
|
items: ['事件中心', '管理中心'],
|
|
|
current: 0,
|
|
|
urlList: [],
|
|
@@ -112,10 +112,20 @@
|
|
|
this.urlList = []
|
|
|
this.urlList1 = []
|
|
|
this.urlList2 = [];
|
|
|
- if(this.$store.state.user&&this.$store.state.user.id){
|
|
|
- this.getData()
|
|
|
- this.getMenu()
|
|
|
- }
|
|
|
+ let count = 0;
|
|
|
+ const intervalId = setInterval(() => {
|
|
|
+ if (this.$store.state.user && this.$store.state.user.id) {
|
|
|
+ this.getData();
|
|
|
+ this.getMenu();
|
|
|
+ clearInterval(intervalId); // 中止循环
|
|
|
+ }
|
|
|
+
|
|
|
+ count++;
|
|
|
+
|
|
|
+ if (count >= 5) {
|
|
|
+ clearInterval(intervalId); // 如果超过5秒仍未找到用户ID,中止循环
|
|
|
+ }
|
|
|
+ }, 1000);
|
|
|
},
|
|
|
methods: {
|
|
|
getData() {
|
|
@@ -129,6 +139,7 @@
|
|
|
getMenusByUser({
|
|
|
id: this.$store.state.user.id
|
|
|
}).then(response => {
|
|
|
+ console.log('response======',response)
|
|
|
response.data.map(i => {
|
|
|
if (i.menuSort.toString().startsWith("1")) {
|
|
|
this.urlList1.push(i);
|
|
@@ -190,10 +201,10 @@
|
|
|
} else if (val == 'fire_inspetItem') {
|
|
|
// return this.archive;
|
|
|
return this.fire_inspetItem
|
|
|
- } else if(val=='fire_street'){
|
|
|
+ } else if (val == 'fire_street') {
|
|
|
// return this.archive;
|
|
|
return this.fire_street
|
|
|
- }else if (val == 'fireWork') {
|
|
|
+ } else if (val == 'fireWork') {
|
|
|
// return this.archive;
|
|
|
return this.fireWork
|
|
|
} else if (val == 'fireSpecial') {
|