|
@@ -49,6 +49,9 @@
|
|
<el-form-item label="URL" prop="url">
|
|
<el-form-item label="URL" prop="url">
|
|
<el-input placeholder="请输入URL" v-model="addParentForm.url"></el-input>
|
|
<el-input placeholder="请输入URL" v-model="addParentForm.url"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="全URL" prop="fullUrl">
|
|
|
|
+ <el-input placeholder="请输入全URL" v-model="addParentForm.fullUrl" :disabled="!isAdmin"></el-input>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="图标" prop="icon">
|
|
<el-form-item label="图标" prop="icon">
|
|
<div class="iconInput">
|
|
<div class="iconInput">
|
|
<div class="icon" v-if="addParentForm.icon"><i :class="addParentForm.icon"></i></div>
|
|
<div class="icon" v-if="addParentForm.icon"><i :class="addParentForm.icon"></i></div>
|
|
@@ -91,6 +94,9 @@
|
|
<el-form-item label="URL" prop="url">
|
|
<el-form-item label="URL" prop="url">
|
|
<el-input placeholder="请输入URL" v-model="addChildForm.url"></el-input>
|
|
<el-input placeholder="请输入URL" v-model="addChildForm.url"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="全URL" prop="fullUrl">
|
|
|
|
+ <el-input placeholder="请输入全URL" v-model="addChildForm.fullUrl" :disabled="!isAdmin"></el-input>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="图标" prop="icon">
|
|
<el-form-item label="图标" prop="icon">
|
|
<div class="iconInput">
|
|
<div class="iconInput">
|
|
<div class="icon" v-if="addChildForm.icon"><i :class="addChildForm.icon"></i></div>
|
|
<div class="icon" v-if="addChildForm.icon"><i :class="addChildForm.icon"></i></div>
|
|
@@ -124,7 +130,6 @@
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
import { getToken } from '@/utils/auth'
|
|
import { getToken } from '@/utils/auth'
|
|
import { getMenuList, addMenu, editMenu, deleteMenu, getMenuDetail } from '@/api/setting'
|
|
import { getMenuList, addMenu, editMenu, deleteMenu, getMenuDetail } from '@/api/setting'
|
|
-import { findElem } from '@/utils/util.js';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -145,6 +150,7 @@ export default {
|
|
oneMenu: '',
|
|
oneMenu: '',
|
|
code: '',
|
|
code: '',
|
|
url: '',
|
|
url: '',
|
|
|
|
+ fullUrl: '',
|
|
icon: '',
|
|
icon: '',
|
|
sort: 0,
|
|
sort: 0,
|
|
},
|
|
},
|
|
@@ -171,6 +177,7 @@ export default {
|
|
twoMenu: '',
|
|
twoMenu: '',
|
|
code: '',
|
|
code: '',
|
|
url: '',
|
|
url: '',
|
|
|
|
+ fullUrl: '',
|
|
icon: '',
|
|
icon: '',
|
|
sort: 0,
|
|
sort: 0,
|
|
},
|
|
},
|
|
@@ -508,7 +515,11 @@ export default {
|
|
...mapGetters([
|
|
...mapGetters([
|
|
'userid',
|
|
'userid',
|
|
'name'
|
|
'name'
|
|
- ])
|
|
|
|
|
|
+ ]),
|
|
|
|
+ isAdmin() {
|
|
|
|
+ let type = JSON.parse(localStorage.getItem("supply_user")).type;
|
|
|
|
+ return type === 2;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList();
|
|
this.getList();
|
|
@@ -542,6 +553,7 @@ export default {
|
|
oneMenu: res.data.moduleName,
|
|
oneMenu: res.data.moduleName,
|
|
code: res.data.code,
|
|
code: res.data.code,
|
|
url: res.data.url,
|
|
url: res.data.url,
|
|
|
|
+ fullUrl: res.data.fullUrl,
|
|
icon: res.data.icon,
|
|
icon: res.data.icon,
|
|
sort: res.data.sortNum
|
|
sort: res.data.sortNum
|
|
}
|
|
}
|
|
@@ -563,6 +575,7 @@ export default {
|
|
moduleName: this.addParentForm.oneMenu,
|
|
moduleName: this.addParentForm.oneMenu,
|
|
code: this.addParentForm.code,
|
|
code: this.addParentForm.code,
|
|
url: this.addParentForm.url,
|
|
url: this.addParentForm.url,
|
|
|
|
+ fullUrl: this.addParentForm.fullUrl,
|
|
icon: this.addParentForm.icon,
|
|
icon: this.addParentForm.icon,
|
|
sortNum: this.addParentForm.sort,
|
|
sortNum: this.addParentForm.sort,
|
|
parentId: 0,
|
|
parentId: 0,
|
|
@@ -575,7 +588,7 @@ export default {
|
|
this.$successMsg('编辑成功');
|
|
this.$successMsg('编辑成功');
|
|
})
|
|
})
|
|
}else {
|
|
}else {
|
|
- params.type = 2;
|
|
|
|
|
|
+ // params.type = 2;
|
|
addMenu(params).then(res => {
|
|
addMenu(params).then(res => {
|
|
this.cancelAddParentForm();
|
|
this.cancelAddParentForm();
|
|
this.getList();
|
|
this.getList();
|
|
@@ -603,6 +616,7 @@ export default {
|
|
twoMenu: res.data.moduleName,
|
|
twoMenu: res.data.moduleName,
|
|
code: res.data.code,
|
|
code: res.data.code,
|
|
url: res.data.url,
|
|
url: res.data.url,
|
|
|
|
+ fullUrl: res.data.fullUrl,
|
|
icon: res.data.icon,
|
|
icon: res.data.icon,
|
|
sort: res.data.sortNum
|
|
sort: res.data.sortNum
|
|
}
|
|
}
|
|
@@ -634,6 +648,7 @@ export default {
|
|
moduleName: this.addChildForm.twoMenu,
|
|
moduleName: this.addChildForm.twoMenu,
|
|
code: this.addChildForm.code,
|
|
code: this.addChildForm.code,
|
|
url: this.addChildForm.url,
|
|
url: this.addChildForm.url,
|
|
|
|
+ fullUrl: this.addChildForm.fullUrl,
|
|
icon: this.addChildForm.icon,
|
|
icon: this.addChildForm.icon,
|
|
sortNum: this.addChildForm.sort
|
|
sortNum: this.addChildForm.sort
|
|
}
|
|
}
|
|
@@ -648,9 +663,10 @@ export default {
|
|
moduleName: this.addChildForm.twoMenu,
|
|
moduleName: this.addChildForm.twoMenu,
|
|
code: this.addChildForm.code,
|
|
code: this.addChildForm.code,
|
|
url: this.addChildForm.url,
|
|
url: this.addChildForm.url,
|
|
|
|
+ fullUrl: this.addChildForm.fullUrl,
|
|
icon: this.addChildForm.icon,
|
|
icon: this.addChildForm.icon,
|
|
sortNum: this.addChildForm.sort,
|
|
sortNum: this.addChildForm.sort,
|
|
- type: 2
|
|
|
|
|
|
+ // type: 2
|
|
}
|
|
}
|
|
addMenu(params).then(res => {
|
|
addMenu(params).then(res => {
|
|
this.cancelAddChildForm();
|
|
this.cancelAddChildForm();
|