Commit 5dee8d3c authored by 王's avatar

菜单调序

parent 754f2fcf
...@@ -57,7 +57,14 @@ ...@@ -57,7 +57,14 @@
<el-input type="password" v-model="dialog.form.surePassword"></el-input> <el-input type="password" v-model="dialog.form.surePassword"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="角色" prop="role_id" v-if="dialog.dialogType !== 2"> <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>
<el-form-item label="简述" prop="desc" v-if="dialog.dialogType !== 2"> <el-form-item label="简述" prop="desc" v-if="dialog.dialogType !== 2">
<el-input v-model="dialog.form.desc"></el-input> <el-input v-model="dialog.form.desc"></el-input>
...@@ -82,7 +89,7 @@ ...@@ -82,7 +89,7 @@
</template> </template>
<script> <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 {ADMINSTATUS} from "../../util/wordbook";
import page from '../framework/page' import page from '../framework/page'
...@@ -173,6 +180,7 @@ ...@@ -173,6 +180,7 @@
desc:'' desc:''
} }
}, },
roleList: []
} }
}, },
filters:{ filters:{
...@@ -181,9 +189,17 @@ ...@@ -181,9 +189,17 @@
}, },
}, },
created(){ created(){
this.getList() this.getList();
this.getRoleList();
}, },
methods:{ methods:{
getRoleList(){
getRoleListApi({page: 1,limit: 100}).then(res=>{
if (res) {
this.roleList = res.list;
}
})
},
getList(){ getList(){
getAdminListApi().then(res=>{ getAdminListApi().then(res=>{
this.adminList = res.list this.adminList = res.list
......
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
</el-form-item> </el-form-item>
<div class="upload-block"> <div class="upload-block">
<el-upload <el-upload
action="/api/public/upload" action="/api/public/upload/zone"
:http-request="uploadFile"
:class="{disabled:!uploadShow}" :class="{disabled:!uploadShow}"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
list-type="picture-card" list-type="picture-card"
...@@ -88,7 +89,7 @@ ...@@ -88,7 +89,7 @@
</template> </template>
<script> <script>
import {getBannerListApi,addBannerApi,editBannerApi,getBannerDetailApi,delBannerApi,moveApi} from "../../service/api"; import {getBannerListApi,addBannerApi,editBannerApi,getBannerDetailApi,delBannerApi,moveApi,uploadFileApi} from "../../service/api";
export default { export default {
name: "banner", name: "banner",
data(){ data(){
...@@ -232,6 +233,24 @@ ...@@ -232,6 +233,24 @@
this.loading = false; this.loading = false;
this.getList(); 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 @@ ...@@ -69,7 +69,7 @@
return{ return{
loading:false, loading:false,
total:0, total:0,
nowPage:0, nowPage:1,
id: null, id: null,
form:{ form:{
key:'focus_reply', key:'focus_reply',
......
...@@ -19,39 +19,23 @@ export default [ ...@@ -19,39 +19,23 @@ export default [
value:'课程列表', value:'课程列表',
routerName:'lesson', routerName:'lesson',
path:'/lesson' path:'/lesson'
} },
] {
},{ value:'期数列表',
name: '', routerName:'periods',
value: '期数管理', path:'/periods'
icon: 'icon-rili', },
list: [
{ {
value:'班级列表', value:'班级列表',
routerName:'class', routerName:'class',
path:'/class' path:'/class'
}, },
{ {
value:'期数列表',
routerName:'periods',
path:'/periods'
},{
value:'不上课日期', value:'不上课日期',
routerName:'noLesson', routerName:'noLesson',
path:'/noLesson' path:'/noLesson'
}, },
] ]
},{
name: '',
value: '商品管理',
icon: 'icon-shangpin1',
list: [
{
value:'商品列表',
routerName:'shop',
path:'/shop'
}
]
},{ },{
name: '', name: '',
value: '人员管理', value: '人员管理',
...@@ -68,6 +52,17 @@ export default [ ...@@ -68,6 +52,17 @@ export default [
path:'/user' path:'/user'
} }
] ]
},{
name: '',
value: '商品管理',
icon: 'icon-shangpin1',
list: [
{
value:'商品列表',
routerName:'shop',
path:'/shop'
}
]
},{ },{
name: '', name: '',
value: '订单管理', value: '订单管理',
...@@ -161,16 +156,17 @@ export default [ ...@@ -161,16 +156,17 @@ export default [
path:'/sysConfig' 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