Commit 5dee8d3c authored by 王's avatar

菜单调序

parent 754f2fcf
......@@ -57,7 +57,14 @@
<el-input type="password" v-model="dialog.form.surePassword"></el-input>
</el-form-item>
<el-form-item label="角色" prop="role_id" v-if="dialog.dialogType !== 2">
<el-input v-model="dialog.form.role_id"></el-input>
<el-select v-model="dialog.form.role_id" placeholder="请选择">
<el-option
v-for="item in roleList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="简述" prop="desc" v-if="dialog.dialogType !== 2">
<el-input v-model="dialog.form.desc"></el-input>
......@@ -82,7 +89,7 @@
</template>
<script>
import {getAdminListApi,editAdminListApi,addAdminListApi,delAdminListApi,editPasswordApi} from "../../service/api";
import {getAdminListApi,editAdminListApi,addAdminListApi,delAdminListApi,editPasswordApi,getRoleListApi} from "../../service/api";
import {ADMINSTATUS} from "../../util/wordbook";
import page from '../framework/page'
......@@ -173,6 +180,7 @@
desc:''
}
},
roleList: []
}
},
filters:{
......@@ -181,9 +189,17 @@
},
},
created(){
this.getList()
this.getList();
this.getRoleList();
},
methods:{
getRoleList(){
getRoleListApi({page: 1,limit: 100}).then(res=>{
if (res) {
this.roleList = res.list;
}
})
},
getList(){
getAdminListApi().then(res=>{
this.adminList = res.list
......
......@@ -68,7 +68,8 @@
</el-form-item>
<div class="upload-block">
<el-upload
action="/api/public/upload"
action="/api/public/upload/zone"
:http-request="uploadFile"
:class="{disabled:!uploadShow}"
:before-upload="beforeAvatarUpload"
list-type="picture-card"
......@@ -88,7 +89,7 @@
</template>
<script>
import {getBannerListApi,addBannerApi,editBannerApi,getBannerDetailApi,delBannerApi,moveApi} from "../../service/api";
import {getBannerListApi,addBannerApi,editBannerApi,getBannerDetailApi,delBannerApi,moveApi,uploadFileApi} from "../../service/api";
export default {
name: "banner",
data(){
......@@ -232,6 +233,24 @@
this.loading = false;
this.getList();
})
},
uploadFile(a) {
this.loading = true;
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid});
this.fileUid = a.file.uid;
this.showProgress = true;
uploadFileApi({file:a.file,type:'local'}).then(res=>{
this.imageList = [{name:res.url,url:process.env.IMAGE_URL_HEAD + res.url}]
this.loading = false;
this.showProgress = false;
this.$message({
type: 'success',
message: '上传成功!'
});
}).catch(()=>{
this.loading = false;
this.showProgress = false;
})
}
}
}
......
......@@ -69,7 +69,7 @@
return{
loading:false,
total:0,
nowPage:0,
nowPage:1,
id: null,
form:{
key:'focus_reply',
......
......@@ -19,39 +19,23 @@ export default [
value:'课程列表',
routerName:'lesson',
path:'/lesson'
}
]
},{
name: '',
value: '期数管理',
icon: 'icon-rili',
list: [
},
{
value:'期数列表',
routerName:'periods',
path:'/periods'
},
{
value:'班级列表',
routerName:'class',
path:'/class'
},
{
value:'期数列表',
routerName:'periods',
path:'/periods'
},{
value:'不上课日期',
routerName:'noLesson',
path:'/noLesson'
},
]
},{
name: '',
value: '商品管理',
icon: 'icon-shangpin1',
list: [
{
value:'商品列表',
routerName:'shop',
path:'/shop'
}
]
},{
name: '',
value: '人员管理',
......@@ -68,6 +52,17 @@ export default [
path:'/user'
}
]
},{
name: '',
value: '商品管理',
icon: 'icon-shangpin1',
list: [
{
value:'商品列表',
routerName:'shop',
path:'/shop'
}
]
},{
name: '',
value: '订单管理',
......@@ -161,16 +156,17 @@ export default [
path:'/sysConfig'
}
]
},{
name: '',
value: '帮助中心',
icon: 'icon-bangzhu',
list: [
{
value:'帮助中心',
routerName:'help',
path:'/help'
}
]
}
]
// {
// name: '',
// value: '帮助中心',
// icon: 'icon-bangzhu',
// list: [
// {
// value:'帮助中心',
// routerName:'help',
// path:'/help'
// }
// ]
// }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment