|
|
@@ -268,24 +268,38 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
openEdit(type, row) {
|
|
|
- let id = '';
|
|
|
- let qualityType = null;
|
|
|
- let qualityTimeStart = row.qualityTimeStart;
|
|
|
- if (type != 'add') {
|
|
|
- id = row.id;
|
|
|
- qualityType = row.qualityType;
|
|
|
- }
|
|
|
- // this.$refs.edit.open(type, row);
|
|
|
- this.$router.push({
|
|
|
- path: '/inspectionWork/edit',
|
|
|
- query: {
|
|
|
- type: type,
|
|
|
- id: id || '',
|
|
|
- qualityType: qualityType,
|
|
|
- qualityTimeStart: qualityTimeStart || ''
|
|
|
+ const menusList = this.$store.state.user.menus;
|
|
|
+ let found = false;
|
|
|
+ console.log(menusList, 'menusList')
|
|
|
+ for (const item of menusList) {
|
|
|
+ console.log(item, 'item')
|
|
|
+ if (item.children) {
|
|
|
+ for (const item2 of item.children) {
|
|
|
+ if (item2.path === '/inspectionWork/edit') {
|
|
|
+ found = true;
|
|
|
+ const id = type !== 'add' ? row.id : '';
|
|
|
+ const qualityType = type !== 'add' ? row.qualityType : null;
|
|
|
+ const qualityTimeStart = row.qualityTimeStart || '';
|
|
|
|
|
|
+ this.$router.push({
|
|
|
+ path: '/inspectionWork/edit',
|
|
|
+ query: {
|
|
|
+ type,
|
|
|
+ id,
|
|
|
+ qualityType,
|
|
|
+ qualityTimeStart
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!found) {
|
|
|
+ this.$message.error('请到角色管理配置菜单权限!');
|
|
|
+ }
|
|
|
},
|
|
|
downloadFile(file) {
|
|
|
getFile({ objectName: file.storePath }, file.name);
|