Commit 58a15a4d by 张杰

增加手动获取权限

1 parent 5fa2f96d
...@@ -871,15 +871,17 @@ export default { ...@@ -871,15 +871,17 @@ export default {
// this.vehicleDefalutData.find((item) => item.prop == "configId").options = // this.vehicleDefalutData.find((item) => item.prop == "configId").options =
// res.data; // res.data;
}); */ }); */
console.log(this.$root.parentVuex.getters.curMenuAuth.data); console.log(this.$root);
let _this = this;
let o = history.state; let o = history.state;
if (o.vin) { if (o.vin) {
this.searchForm.keywords = o.vin; this.searchForm.keywords = o.vin;
this.$nextTick(function () { this.$nextTick(function () {
let tag = this.$refs.serchButton; let tag = _this.$refs.serchButton;
if (tag) { if (tag) {
tag.$el.click(); tag.$el.click();
} }
_this.getMenuPath();
}); });
} }
}, },
...@@ -887,7 +889,6 @@ export default { ...@@ -887,7 +889,6 @@ export default {
methods: { methods: {
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log(this.searchForm.date);
if (this.searchForm.date) { if (this.searchForm.date) {
this.searchForm.activateTimeStart = this.searchForm.date[0]; this.searchForm.activateTimeStart = this.searchForm.date[0];
this.searchForm.activateTimeEnd = this.searchForm.date[1]; this.searchForm.activateTimeEnd = this.searchForm.date[1];
...@@ -972,7 +973,7 @@ export default { ...@@ -972,7 +973,7 @@ export default {
data.brandId, data.brandId,
data.subBrandId, data.subBrandId,
data.seriesId, data.seriesId,
data.typeId||data.modelId, data.typeId || data.modelId,
]; ];
} }
...@@ -1002,7 +1003,7 @@ export default { ...@@ -1002,7 +1003,7 @@ export default {
data.brandId, data.brandId,
data.subBrandId, data.subBrandId,
data.seriesId, data.seriesId,
data.typeId||data.modelId, data.typeId || data.modelId,
]; ];
this.snForm = { ...data }; this.snForm = { ...data };
console.log(this.snForm); console.log(this.snForm);
...@@ -1544,6 +1545,22 @@ export default { ...@@ -1544,6 +1545,22 @@ export default {
"/oEshield#/monitor/monitor?vin=" + this.snForm.vin "/oEshield#/monitor/monitor?vin=" + this.snForm.vin
); );
}, },
// 手动获取二级菜单权限
getMenuPath() {
let root = this.$root;
let list = root.parentVuex.getters.menuList;
console.log(list);
let o = list.find((k) => k.label == "车辆管理");
if (!o) {
return false;
}
let m = o.children.find((j) => j.label == "车辆列表");
console.log(m);
if (m) {
root.parentCommon.getSecondMenu(m.id, m.label);
}
},
}, },
}; };
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!