控制器添加复杂接口
This commit is contained in:
@@ -5,12 +5,13 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Yi.Framework.Common.Models;
|
using Yi.Framework.Common.Models;
|
||||||
|
using Yi.Framework.DTOModel;
|
||||||
using Yi.Framework.Interface;
|
using Yi.Framework.Interface;
|
||||||
using Yi.Framework.Model.Models;
|
using Yi.Framework.Model.Models;
|
||||||
|
|
||||||
namespace Yi.Framework.ApiMicroservice.Controllers
|
namespace Yi.Framework.ApiMicroservice.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]/[action]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
public class MenuController : ControllerBase
|
public class MenuController : ControllerBase
|
||||||
{
|
{
|
||||||
@@ -61,5 +62,15 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
|||||||
await _menuService.AddAsync(_menu);
|
await _menuService.AddAsync(_menu);
|
||||||
return Result.Success();
|
return Result.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 给一个菜单设置一个接口,Id1为菜单id,Id2为接口id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<Result> SetMouldByMenu(IdDto<int> idDto)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using Yi.Framework.Model.Models;
|
|||||||
|
|
||||||
namespace Yi.Framework.ApiMicroservice.Controllers
|
namespace Yi.Framework.ApiMicroservice.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]/[action]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
public class MouldController : ControllerBase
|
public class MouldController : ControllerBase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,12 +5,13 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Yi.Framework.Common.Models;
|
using Yi.Framework.Common.Models;
|
||||||
|
using Yi.Framework.DTOModel;
|
||||||
using Yi.Framework.Interface;
|
using Yi.Framework.Interface;
|
||||||
using Yi.Framework.Model.Models;
|
using Yi.Framework.Model.Models;
|
||||||
|
|
||||||
namespace Yi.Framework.ApiMicroservice.Controllers
|
namespace Yi.Framework.ApiMicroservice.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]/[action]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
public class RoleController : ControllerBase
|
public class RoleController : ControllerBase
|
||||||
{
|
{
|
||||||
@@ -20,7 +21,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
|||||||
_roleService = roleService;
|
_roleService = roleService;
|
||||||
}
|
}
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<Result> GetURole()
|
public async Task<Result> GetRole()
|
||||||
{
|
{
|
||||||
return Result.Success().SetData(await _roleService.GetAllEntitiesTrueAsync());
|
return Result.Success().SetData(await _roleService.GetAllEntitiesTrueAsync());
|
||||||
}
|
}
|
||||||
@@ -61,5 +62,15 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
|||||||
await _roleService.AddAsync(_role);
|
await _roleService.AddAsync(_role);
|
||||||
return Result.Success();
|
return Result.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 给角色设置菜单,多个角色与多个菜单,让每一个角色都设置,ids1为角色,ids2为菜单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idsListDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<Result> SetMenuByRole(IdsListDto<int> idsListDto)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Yi.Framework.Common.Models;
|
using Yi.Framework.Common.Models;
|
||||||
|
using Yi.Framework.DTOModel;
|
||||||
using Yi.Framework.Interface;
|
using Yi.Framework.Interface;
|
||||||
using Yi.Framework.Model.Models;
|
using Yi.Framework.Model.Models;
|
||||||
using Yi.Framework.WebCore;
|
using Yi.Framework.WebCore;
|
||||||
@@ -82,5 +83,15 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
|||||||
var menu_data = await _userService.GetMenusByUser(_user);
|
var menu_data = await _userService.GetMenusByUser(_user);
|
||||||
return Result.Success().SetData(menu_data);
|
return Result.Success().SetData(menu_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 给单个用户设置多个角色,ids有用户id与 角列表色ids,1对多
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idsDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<Result> SetRoleByUser(IdsDto<int> idsDto)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,97 @@
|
|||||||
<name>Yi.Framework.ApiMicroservice</name>
|
<name>Yi.Framework.ApiMicroservice</name>
|
||||||
</assembly>
|
</assembly>
|
||||||
<members>
|
<members>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.Login(Yi.Framework.Model.Models.user)">
|
||||||
|
<summary>
|
||||||
|
登录方法,要返回data:{user,token} token先写123456789,不要有导航属性
|
||||||
|
</summary>
|
||||||
|
<param name="_user"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.Logout">
|
||||||
|
<summary>
|
||||||
|
不用写,单纯制作日志
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.Register(Yi.Framework.Model.Models.user,System.String)">
|
||||||
|
<summary>
|
||||||
|
code为验证码,判断一下,假装验证码都是对的
|
||||||
|
</summary>
|
||||||
|
<param name="_user"></param>
|
||||||
|
<param name="code"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.Email(System.String)">
|
||||||
|
<summary>
|
||||||
|
传入邮箱,需要先到数据库判断该邮箱是否被人注册过,到userservice写mail_exist方法,还有接口别忘了。这个接口不需要洞,只需要完成userservice写mail_exist与接口即可
|
||||||
|
</summary>
|
||||||
|
<param name="emailAddress"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.MenuController.UpdateMenu(Yi.Framework.Model.Models.menu)">
|
||||||
|
<summary>
|
||||||
|
更
|
||||||
|
</summary>
|
||||||
|
<param name="_menu"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.MenuController.DelListMenu(System.Collections.Generic.List{System.Int32})">
|
||||||
|
<summary>
|
||||||
|
删
|
||||||
|
</summary>
|
||||||
|
<param name="_ids"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.MenuController.AddMenu(Yi.Framework.Model.Models.menu)">
|
||||||
|
<summary>
|
||||||
|
增
|
||||||
|
</summary>
|
||||||
|
<param name="_menu"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.MouldController.UpdateMould(Yi.Framework.Model.Models.mould)">
|
||||||
|
<summary>
|
||||||
|
更
|
||||||
|
</summary>
|
||||||
|
<param name="_mould"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.MouldController.DelListMould(System.Collections.Generic.List{System.Int32})">
|
||||||
|
<summary>
|
||||||
|
删
|
||||||
|
</summary>
|
||||||
|
<param name="_ids"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.MouldController.AddMould(Yi.Framework.Model.Models.mould)">
|
||||||
|
<summary>
|
||||||
|
增
|
||||||
|
</summary>
|
||||||
|
<param name="_mould"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.RoleController.UpdateRole(Yi.Framework.Model.Models.role)">
|
||||||
|
<summary>
|
||||||
|
更
|
||||||
|
</summary>
|
||||||
|
<param name="_role"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.RoleController.DelListRole(System.Collections.Generic.List{System.Int32})">
|
||||||
|
<summary>
|
||||||
|
删
|
||||||
|
</summary>
|
||||||
|
<param name="_ids"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.RoleController.AddRole(Yi.Framework.Model.Models.role)">
|
||||||
|
<summary>
|
||||||
|
增
|
||||||
|
</summary>
|
||||||
|
<param name="_role"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.GetUser">
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.GetUser">
|
||||||
<summary>
|
<summary>
|
||||||
查
|
查
|
||||||
@@ -31,6 +122,12 @@
|
|||||||
<param name="_user"></param>
|
<param name="_user"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.GetMenuMould">
|
||||||
|
<summary>
|
||||||
|
通过上下文对象获取user(注意,_user下只有userId),返回值为该用户下所有的menu,(注意子类递归)并且需要关联mould
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:Yi.Framework.ApiMicroservice.Utility.CustomHostingStartup">
|
<member name="T:Yi.Framework.ApiMicroservice.Utility.CustomHostingStartup">
|
||||||
<summary>
|
<summary>
|
||||||
必须实现IHostingStartup接口
|
必须实现IHostingStartup接口
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Yi.Framework.DTOModel
|
|
||||||
{
|
|
||||||
public class Class1
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
23
Yi.Framework/Yi.Framework.DTOModel/IdsDto.cs
Normal file
23
Yi.Framework/Yi.Framework.DTOModel/IdsDto.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Yi.Framework.DTOModel
|
||||||
|
{
|
||||||
|
public class IdDto<T>
|
||||||
|
{
|
||||||
|
public T id1 { get; set; }
|
||||||
|
public T id2 { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class IdsDto<T>
|
||||||
|
{
|
||||||
|
public T id{ get; set; }
|
||||||
|
public List<T> ids { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class IdsListDto<T>
|
||||||
|
{
|
||||||
|
public List<T> ids1 { get; set; }
|
||||||
|
public List<T> ids2 { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
v-model="selected"
|
v-model="selected"
|
||||||
:search="search"
|
:search="search"
|
||||||
>
|
>
|
||||||
|
<slot/>
|
||||||
<template v-slot:top>
|
<template v-slot:top>
|
||||||
<!-- 搜索框 -->
|
<!-- 搜索框 -->
|
||||||
<v-toolbar flat>
|
<v-toolbar flat>
|
||||||
@@ -23,12 +24,22 @@
|
|||||||
class="mx-4"
|
class="mx-4"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
|
|
||||||
<v-btn color="primary" dark class="mb-2 mx-2" @click="dialog = true">
|
<v-btn
|
||||||
|
v-if="axiosUrls.hasOwnProperty('add')"
|
||||||
|
color="primary"
|
||||||
|
dark
|
||||||
|
class="mb-2 mx-2"
|
||||||
|
@click="dialog = true"
|
||||||
|
>
|
||||||
添加新项
|
添加新项
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
<!-- 添加提示框 -->
|
<!-- 添加提示框 -->
|
||||||
<v-dialog v-model="dialog" max-width="500px">
|
<v-dialog
|
||||||
|
v-if="axiosUrls.hasOwnProperty('add')"
|
||||||
|
v-model="dialog"
|
||||||
|
max-width="500px"
|
||||||
|
>
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
<span class="headline">{{ formTitle }}</span>
|
<span class="headline">{{ formTitle }}</span>
|
||||||
@@ -61,35 +72,35 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|
||||||
<v-btn color="red" dark class="mb-2" @click="deleteItem(null)">
|
<v-btn
|
||||||
|
v-if="axiosUrls.hasOwnProperty('del')"
|
||||||
|
color="red"
|
||||||
|
dark
|
||||||
|
class="mb-2"
|
||||||
|
@click="deleteItem(null)"
|
||||||
|
>
|
||||||
删除所选
|
删除所选
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
<!-- 删除提示框 -->
|
|
||||||
<v-dialog v-model="dialogDelete" max-width="500px">
|
|
||||||
<v-card>
|
|
||||||
<v-card-title class="headline"
|
|
||||||
>你确定要删除此条记录吗?</v-card-title
|
|
||||||
>
|
|
||||||
<v-card-actions>
|
|
||||||
<v-spacer></v-spacer>
|
|
||||||
<v-btn color="blue darken-1" text @click="closeDelete"
|
|
||||||
>取消</v-btn
|
|
||||||
>
|
|
||||||
<v-btn color="blue darken-1" text @click="deleteItemConfirm"
|
|
||||||
>确定</v-btn
|
|
||||||
>
|
|
||||||
<v-spacer></v-spacer>
|
|
||||||
</v-card-actions>
|
|
||||||
</v-card>
|
|
||||||
</v-dialog>
|
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 表格中的删除和修改 -->
|
<!-- 表格中的删除和修改 -->
|
||||||
<template v-slot:item.actions="{ item }">
|
<template v-slot:item.actions="{ item }">
|
||||||
<v-icon small class="mr-2" @click="editItem(item)"> mdi-pencil </v-icon>
|
<v-icon
|
||||||
<v-icon small @click="deleteItem(item)"> mdi-delete </v-icon>
|
v-if="axiosUrls.hasOwnProperty('update')"
|
||||||
|
small
|
||||||
|
class="mr-2"
|
||||||
|
@click="editItem(item)"
|
||||||
|
>
|
||||||
|
mdi-pencil
|
||||||
|
</v-icon>
|
||||||
|
<v-icon
|
||||||
|
v-if="axiosUrls.hasOwnProperty('del')"
|
||||||
|
small
|
||||||
|
@click="deleteItem(item)"
|
||||||
|
>
|
||||||
|
mdi-delete
|
||||||
|
</v-icon>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 初始化 -->
|
<!-- 初始化 -->
|
||||||
@@ -100,9 +111,9 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import itemApi from './TableApi.js'
|
import itemApi from "./TableApi.js";
|
||||||
export default {
|
export default {
|
||||||
name: 'Tables',
|
name: "Tables",
|
||||||
props: {
|
props: {
|
||||||
defaultItem: {
|
defaultItem: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -110,9 +121,9 @@ export default {
|
|||||||
headers: {
|
headers: {
|
||||||
type: Array,
|
type: Array,
|
||||||
},
|
},
|
||||||
axiosUrls:{
|
axiosUrls: {
|
||||||
type: Object,
|
type: Object,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
data: () => ({
|
data: () => ({
|
||||||
@@ -120,7 +131,6 @@ export default {
|
|||||||
selected: [],
|
selected: [],
|
||||||
search: "",
|
search: "",
|
||||||
dialog: false,
|
dialog: false,
|
||||||
dialogDelete: false,
|
|
||||||
desserts: [],
|
desserts: [],
|
||||||
editedIndex: -1,
|
editedIndex: -1,
|
||||||
editedItem: {},
|
editedItem: {},
|
||||||
@@ -135,10 +145,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
dialog(val) {
|
dialog(val) {
|
||||||
val || this.close();
|
val || this.close();
|
||||||
},
|
}
|
||||||
dialogDelete(val) {
|
|
||||||
val || this.closeDelete();
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
@@ -147,10 +154,10 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
initialize() {
|
initialize() {
|
||||||
itemApi.getItem(this.axiosUrls.get).then((resp) => {
|
itemApi.getItem(this.axiosUrls.get).then((resp) => {
|
||||||
const response = resp.data;
|
const response = resp.data;
|
||||||
this.desserts = response;
|
this.desserts = response;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.editedItem = Object.assign({}, this.defaultItem);
|
this.editedItem = Object.assign({}, this.defaultItem);
|
||||||
@@ -165,10 +172,21 @@ export default {
|
|||||||
this.dialog = true;
|
this.dialog = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteItem(item) {
|
async deleteItem(item) {
|
||||||
this.editedIndex = this.desserts.indexOf(item);
|
this.editedIndex = this.desserts.indexOf(item);
|
||||||
this.editedItem = Object.assign({}, item);
|
this.editedItem = Object.assign({}, item);
|
||||||
this.dialogDelete = true;
|
|
||||||
|
var p = await this.$dialog.warning({
|
||||||
|
text: "你确定要删除此条记录吗??",
|
||||||
|
title: "警告",
|
||||||
|
actions: {
|
||||||
|
false: "取消",
|
||||||
|
true: "确定",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
if (p) {
|
||||||
|
this.deleteItemConfirm();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deleteItemConfirm() {
|
deleteItemConfirm() {
|
||||||
var Ids = [];
|
var Ids = [];
|
||||||
@@ -179,7 +197,9 @@ export default {
|
|||||||
Ids.push(item.id);
|
Ids.push(item.id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
itemApi.delItemList(this.axiosUrls.del,Ids).then(() => this.initialize());
|
itemApi
|
||||||
|
.delItemList(this.axiosUrls.del, Ids)
|
||||||
|
.then(() => this.initialize());
|
||||||
this.closeDelete();
|
this.closeDelete();
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
@@ -200,9 +220,13 @@ export default {
|
|||||||
|
|
||||||
save() {
|
save() {
|
||||||
if (this.editedIndex > -1) {
|
if (this.editedIndex > -1) {
|
||||||
itemApi.updateItem(this.axiosUrls.update,this.editedItem).then(() => this.initialize());
|
itemApi
|
||||||
|
.updateItem(this.axiosUrls.update, this.editedItem)
|
||||||
|
.then(() => this.initialize());
|
||||||
} else {
|
} else {
|
||||||
itemApi.addItem(this.axiosUrls.add,this.editedItem).then(() => this.initialize());
|
itemApi
|
||||||
|
.addItem(this.axiosUrls.add, this.editedItem)
|
||||||
|
.then(() => this.initialize());
|
||||||
}
|
}
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -120,7 +120,7 @@
|
|||||||
{
|
{
|
||||||
title:"角色菜单分配管理",
|
title:"角色菜单分配管理",
|
||||||
icon:"mdi-account",
|
icon:"mdi-account",
|
||||||
to:"/admrole/",
|
to:"/admRoleMenu/",
|
||||||
children:[]
|
children:[]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -2,11 +2,17 @@ import Vue from 'vue'
|
|||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import vuetify from './plugins/vuetify'
|
import vuetify from './plugins/vuetify'
|
||||||
|
import VuetifyDialog from 'vuetify-dialog'
|
||||||
|
import 'vuetify-dialog/dist/vuetify-dialog.css'
|
||||||
import './plugins'
|
import './plugins'
|
||||||
import store from './store/index'
|
import store from './store/index'
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
Vue.use(VuetifyDialog, {
|
||||||
|
context: {
|
||||||
|
vuetify
|
||||||
|
}
|
||||||
|
});
|
||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
store,
|
store,
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ const router = new VueRouter({
|
|||||||
route('AdmRole', null, 'AdmRole'),
|
route('AdmRole', null, 'AdmRole'),
|
||||||
route('AdmMenu', null, 'AdmMenu'),
|
route('AdmMenu', null, 'AdmMenu'),
|
||||||
route('AdmMould', null, 'AdmMould'),
|
route('AdmMould', null, 'AdmMould'),
|
||||||
|
route('AdmRoleMenu', null, 'AdmRoleMenu'),
|
||||||
]),
|
]),
|
||||||
layout('Login', [
|
layout('Login', [
|
||||||
route('login', null, 'login'),
|
route('login', null, 'login'),
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-card class="mx-auto" width="100%">
|
<v-card class="mx-auto" width="100%">
|
||||||
|
<v-btn>设置接口权限</v-btn>
|
||||||
|
|
||||||
<ccTable :defaultItem="defaultItem" :headers="headers" :axiosUrls="axiosUrls" ></ccTable>
|
<ccTable :defaultItem="defaultItem" :headers="headers" :axiosUrls="axiosUrls" ></ccTable>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-card class="mx-auto" width="100%">
|
<v-card class="mx-auto" width="100%">
|
||||||
<ccTable :defaultItem="defaultItem" :headers="headers" :axiosUrls="axiosUrls" ></ccTable>
|
<ccTable :defaultItem="defaultItem" :headers="headers" :axiosUrls="axiosUrls" >
|
||||||
|
|
||||||
|
|
||||||
|
</ccTable>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
148
Yi.Vue/src/views/AdmRoleMenu.vue
Normal file
148
Yi.Vue/src/views/AdmRoleMenu.vue
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<template>
|
||||||
|
<v-card class="mx-auto" width="100%">
|
||||||
|
|
||||||
|
<v-row>
|
||||||
|
<v-col cols="6">
|
||||||
|
<v-list
|
||||||
|
flat
|
||||||
|
subheader
|
||||||
|
three-line
|
||||||
|
>
|
||||||
|
<v-subheader>General</v-subheader>
|
||||||
|
|
||||||
|
<v-list-item-group
|
||||||
|
v-model="settings"
|
||||||
|
multiple
|
||||||
|
active-class=""
|
||||||
|
>
|
||||||
|
<v-list-item>
|
||||||
|
<template v-slot:default="{ active }">
|
||||||
|
<v-list-item-action>
|
||||||
|
<v-checkbox :input-value="active"></v-checkbox>
|
||||||
|
</v-list-item-action>
|
||||||
|
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>Notifications</v-list-item-title>
|
||||||
|
<v-list-item-subtitle>Notify me about updates to apps or games that I downloaded</v-list-item-subtitle>
|
||||||
|
</v-list-item-content>
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
|
||||||
|
<v-list-item>
|
||||||
|
<template v-slot:default="{ active }">
|
||||||
|
<v-list-item-action>
|
||||||
|
<v-checkbox :input-value="active"></v-checkbox>
|
||||||
|
</v-list-item-action>
|
||||||
|
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>Sound</v-list-item-title>
|
||||||
|
<v-list-item-subtitle>Auto-update apps at any time. Data charges may apply</v-list-item-subtitle>
|
||||||
|
</v-list-item-content>
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
|
||||||
|
<v-list-item>
|
||||||
|
<template v-slot:default="{ active }">
|
||||||
|
<v-list-item-action>
|
||||||
|
<v-checkbox :input-value="active"></v-checkbox>
|
||||||
|
</v-list-item-action>
|
||||||
|
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>Auto-add widgets</v-list-item-title>
|
||||||
|
<v-list-item-subtitle>Automatically add home screen widgets when downloads complete</v-list-item-subtitle>
|
||||||
|
</v-list-item-content>
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
</v-list-item-group>
|
||||||
|
</v-list>
|
||||||
|
|
||||||
|
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="6"> <v-treeview
|
||||||
|
selectable
|
||||||
|
:items="items"
|
||||||
|
></v-treeview></v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data: () => ({
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: 'Applications :',
|
||||||
|
children: [
|
||||||
|
{ id: 2, name: 'Calendar : app' },
|
||||||
|
{ id: 3, name: 'Chrome : app' },
|
||||||
|
{ id: 4, name: 'Webstorm : app' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
name: 'Documents :',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
id: 6,
|
||||||
|
name: 'vuetify :',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
id: 7,
|
||||||
|
name: 'src :',
|
||||||
|
children: [
|
||||||
|
{ id: 8, name: 'index : ts' },
|
||||||
|
{ id: 9, name: 'bootstrap : ts' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 10,
|
||||||
|
name: 'material2 :',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
id: 11,
|
||||||
|
name: 'src :',
|
||||||
|
children: [
|
||||||
|
{ id: 12, name: 'v-btn : ts' },
|
||||||
|
{ id: 13, name: 'v-card : ts' },
|
||||||
|
{ id: 14, name: 'v-window : ts' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 15,
|
||||||
|
name: 'Downloads :',
|
||||||
|
children: [
|
||||||
|
{ id: 16, name: 'October : pdf' },
|
||||||
|
{ id: 17, name: 'November : pdf' },
|
||||||
|
{ id: 18, name: 'Tutorial : html' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 19,
|
||||||
|
name: 'Videos :',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
id: 20,
|
||||||
|
name: 'Tutorials :',
|
||||||
|
children: [
|
||||||
|
{ id: 21, name: 'Basic layouts : mp4' },
|
||||||
|
{ id: 22, name: 'Advanced techniques : mp4' },
|
||||||
|
{ id: 23, name: 'All about app : dir' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{ id: 24, name: 'Intro : mov' },
|
||||||
|
{ id: 25, name: 'Conference introduction : avi' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
|
|
||||||
<v-card class="mx-auto" width="100%">
|
<v-card class="mx-auto" width="100%">
|
||||||
|
<v-btn>设置角色</v-btn>
|
||||||
<ccTable :defaultItem="defaultItem" :headers="headers" :axiosUrls="axiosUrls" ></ccTable>
|
<ccTable :defaultItem="defaultItem" :headers="headers" :axiosUrls="axiosUrls" ></ccTable>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>还有谁</div>
|
<div>首页</div>
|
||||||
</template>
|
</template>
|
||||||
Reference in New Issue
Block a user