Merge branch 'master' into net6.0
This commit is contained in:
commit
7411b7008b
24
README.md
24
README.md
@ -1,5 +1,5 @@
|
|||||||
<h2 align="center"> ZRAdmin.NET后台管理系统</h2>
|
<h2 align="center"> ZRAdmin.NET后台管理系统</h2>
|
||||||
<h4 align="center">基于.NET5 + vue前后端分离的.net快速开发框架</h4>
|
<h4 align="center">基于.NET5/.NET6 + vue2.x/vue3.x前后端分离的.net快速开发框架</h4>
|
||||||
|
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@ -11,7 +11,7 @@
|
|||||||
* 本项目适合有一定NetCore和 vue基础的开发人员
|
* 本项目适合有一定NetCore和 vue基础的开发人员
|
||||||
* 基于.NET5/.NET6实现的通用权限管理平台(RBAC模式)。整合最新技术高效快速开发,前后端分离模式,开箱即用。
|
* 基于.NET5/.NET6实现的通用权限管理平台(RBAC模式)。整合最新技术高效快速开发,前后端分离模式,开箱即用。
|
||||||
* 代码量少、学习简单、通俗易懂、功能强大、易扩展、轻量级,让web开发更快速、简单高效(从此告别996),解决70%的重复工作,专注您的业务,轻松开发从现在开始!
|
* 代码量少、学习简单、通俗易懂、功能强大、易扩展、轻量级,让web开发更快速、简单高效(从此告别996),解决70%的重复工作,专注您的业务,轻松开发从现在开始!
|
||||||
* 前端采用Vue2.0/vue3、Element UI/Element-UI plus、vite。
|
* 前端采用vue2.x/vue3.x、Element UI/Element-UI plus、vite。
|
||||||
* 后端采用Net5/Net6、Sqlsugar、MySQL等,可以自动分库分表。
|
* 后端采用Net5/Net6、Sqlsugar、MySQL等,可以自动分库分表。
|
||||||
* 权限认证使用Jwt,支持多终端认证系统。
|
* 权限认证使用Jwt,支持多终端认证系统。
|
||||||
* 支持加载动态权限菜单,多方式轻松权限控制
|
* 支持加载动态权限菜单,多方式轻松权限控制
|
||||||
@ -26,15 +26,22 @@
|
|||||||
|
|
||||||
## 🍿在线体验
|
## 🍿在线体验
|
||||||
- 官方文档:http://www.izhaorui.cn/doc
|
- 官方文档:http://www.izhaorui.cn/doc
|
||||||
- 体验地址:http://www.izhaorui.cn/admin
|
- vue3.x版本体验:http://www.izhaorui.cn/vue3
|
||||||
- 管理员:admin
|
- vue2.x版本体验:http://www.izhaorui.cn/admin
|
||||||
- 密 码:123456
|
- 账号密码:admin/123456
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
由于是个人项目,资金有限,体验服是低配,请大家爱惜,轻戳,不胜感激!!!
|
由于是个人项目,资金有限,体验服是低配,请大家爱惜,轻戳,不胜感激!!!
|
||||||
```
|
```
|
||||||
|
## 💒代码仓库
|
||||||
|
- [【Gitee】 vue2+后端代码](https://gitee.com/izory/ZrAdminNetCore/)
|
||||||
|
- [【Github】vue2+后端代码](https://github.com/izhaorui/ZrAdmin.NET/)
|
||||||
|
- [【NET6版本】](https://gitee.com/izory/ZrAdminNetCore/tree/net6.0/)
|
||||||
|
- [【Gitee】vue3地址](https://gitee.com/izory/ZRAdmin-vue)
|
||||||
|
|
||||||
## 🍁前端技术
|
## 🍁前端技术
|
||||||
Vue版前端技术栈 :基于vue、vuex、vue-router 、vue-cli 、axios 和 element-ui,前端采用vscode工具开发
|
Vue版前端技术栈 :基于vue2.x/vue3.x、vuex、vue-router 、vue-cli 、axios 和 element-ui/element-ui-plus,前端采用vscode工具开发
|
||||||
|
|
||||||
## 🍀后端技术
|
## 🍀后端技术
|
||||||
核心框架:.Net5.0/.Net6 + Web API + sqlsugar + swagger + signalR + IpRateLimit
|
核心框架:.Net5.0/.Net6 + Web API + sqlsugar + swagger + signalR + IpRateLimit
|
||||||
@ -147,8 +154,3 @@ Vue版前端技术栈 :基于vue、vuex、vue-router 、vue-cli 、axios 和 e
|
|||||||
如果部署iis访问不了情况可以有以下两种办法:
|
如果部署iis访问不了情况可以有以下两种办法:
|
||||||
1. 直接打开ZR.Admin.WebApi.exe文件然后看控制台的错误日志
|
1. 直接打开ZR.Admin.WebApi.exe文件然后看控制台的错误日志
|
||||||
2. web.config里面有个false 改为 true,iis重启项目后运行网站后,跟目录下面 有个文件夹 log 里面有错误日志文件
|
2. web.config里面有个false 改为 true,iis重启项目后运行网站后,跟目录下面 有个文件夹 log 里面有错误日志文件
|
||||||
|
|
||||||
## 源码地址
|
|
||||||
- [Gitee](https://gitee.com/izory/ZrAdminNetCore/)
|
|
||||||
- [Github](https://github.com/izhaorui/ZrAdmin.NET/)
|
|
||||||
- [NET6版本](https://gitee.com/izory/ZrAdminNetCore/tree/net6.0/)
|
|
||||||
@ -141,7 +141,7 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
{
|
{
|
||||||
//从 Dto 映射到 实体
|
//从 Dto 映射到 实体
|
||||||
var addModel = parm.Adapt<Article>().ToCreate(context: HttpContext);
|
var addModel = parm.Adapt<Article>().ToCreate(context: HttpContext);
|
||||||
addModel.AuthorName = User.Identity.Name;
|
addModel.AuthorName = HttpContext.GetName();
|
||||||
|
|
||||||
var response = _ArticleService.Update(it => it.Cid == addModel.Cid,
|
var response = _ArticleService.Update(it => it.Cid == addModel.Cid,
|
||||||
f => new Article
|
f => new Article
|
||||||
@ -149,7 +149,7 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
Title = addModel.Title,
|
Title = addModel.Title,
|
||||||
Content = addModel.Content,
|
Content = addModel.Content,
|
||||||
Tags = addModel.Tags,
|
Tags = addModel.Tags,
|
||||||
Category_id = addModel.Category_id,
|
Category_Id = addModel.Category_Id,
|
||||||
UpdateTime = addModel.UpdateTime,
|
UpdateTime = addModel.UpdateTime,
|
||||||
Status = addModel.Status
|
Status = addModel.Status
|
||||||
}).ToCreate();
|
}).ToCreate();
|
||||||
|
|||||||
@ -9,6 +9,7 @@ using ZR.Model.System.Dto;
|
|||||||
using ZR.Model.System;
|
using ZR.Model.System;
|
||||||
using ZR.Service.System.IService;
|
using ZR.Service.System.IService;
|
||||||
using ZR.Model;
|
using ZR.Model;
|
||||||
|
using Mapster;
|
||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.System
|
namespace ZR.Admin.WebApi.Controllers.System
|
||||||
{
|
{
|
||||||
@ -87,28 +88,34 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改菜单 √
|
/// 修改菜单 √
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="MenuDto"></param>
|
/// <param name="menuDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("edit")]
|
[HttpPost("edit")]
|
||||||
[Log(Title = "菜单管理", BusinessType = BusinessType.UPDATE)]
|
[Log(Title = "菜单管理", BusinessType = BusinessType.UPDATE)]
|
||||||
[ActionPermissionFilter(Permission = "system:menu:edit")]
|
[ActionPermissionFilter(Permission = "system:menu:edit")]
|
||||||
public IActionResult MenuEdit([FromBody] SysMenu MenuDto)
|
public IActionResult MenuEdit([FromBody] MenuDto menuDto)
|
||||||
{
|
{
|
||||||
if (MenuDto == null) { return ToResponse(ApiResult.Error(101, "请求参数错误")); }
|
if (menuDto == null) { return ToResponse(ApiResult.Error(101, "请求参数错误")); }
|
||||||
//if (UserConstants.NOT_UNIQUE.Equals(sysMenuService.CheckMenuNameUnique(MenuDto)))
|
//if (UserConstants.NOT_UNIQUE.Equals(sysMenuService.CheckMenuNameUnique(MenuDto)))
|
||||||
//{
|
//{
|
||||||
// return ToResponse(ApiResult.Error($"修改菜单'{MenuDto.menuName}'失败,菜单名称已存在"));
|
// return ToResponse(ApiResult.Error($"修改菜单'{MenuDto.menuName}'失败,菜单名称已存在"));
|
||||||
//}
|
//}
|
||||||
if (UserConstants.YES_FRAME.Equals(MenuDto.isFrame) && !MenuDto.path.StartsWith("http"))
|
var config = new TypeAdapterConfig();
|
||||||
|
//映射规则
|
||||||
|
config.ForType<SysMenu, MenuDto>()
|
||||||
|
.NameMatchingStrategy(NameMatchingStrategy.IgnoreCase);//忽略字段名称的大小写;//忽略除以上配置的所有字段
|
||||||
|
|
||||||
|
var modal = menuDto.Adapt<SysMenu>(config).ToUpdate(HttpContext);
|
||||||
|
if (UserConstants.YES_FRAME.Equals(modal.isFrame) && !modal.path.StartsWith("http"))
|
||||||
{
|
{
|
||||||
return ToResponse(ApiResult.Error($"修改菜单'{MenuDto.menuName}'失败,地址必须以http(s)://开头"));
|
return ToResponse(ApiResult.Error($"修改菜单'{modal.MenuName}'失败,地址必须以http(s)://开头"));
|
||||||
}
|
}
|
||||||
if (MenuDto.menuId.Equals(MenuDto.parentId))
|
if (modal.MenuId.Equals(modal.parentId))
|
||||||
{
|
{
|
||||||
return ToResponse(ApiResult.Error($"修改菜单'{MenuDto.menuName}'失败,上级菜单不能选择自己"));
|
return ToResponse(ApiResult.Error($"修改菜单'{modal.MenuName}'失败,上级菜单不能选择自己"));
|
||||||
}
|
}
|
||||||
MenuDto.Update_by = User.Identity.Name;
|
modal.Update_by = HttpContext.GetName();
|
||||||
int result = sysMenuService.EditMenu(MenuDto);
|
int result = sysMenuService.EditMenu(modal);
|
||||||
|
|
||||||
return ToResponse(result);
|
return ToResponse(result);
|
||||||
}
|
}
|
||||||
@ -126,11 +133,11 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
if (MenuDto == null) { return ToResponse(ApiResult.Error(101, "请求参数错误")); }
|
if (MenuDto == null) { return ToResponse(ApiResult.Error(101, "请求参数错误")); }
|
||||||
if (UserConstants.NOT_UNIQUE.Equals(sysMenuService.CheckMenuNameUnique(MenuDto)))
|
if (UserConstants.NOT_UNIQUE.Equals(sysMenuService.CheckMenuNameUnique(MenuDto)))
|
||||||
{
|
{
|
||||||
return ToResponse(ApiResult.Error($"新增菜单'{MenuDto.menuName}'失败,菜单名称已存在"));
|
return ToResponse(ApiResult.Error($"新增菜单'{MenuDto.MenuName}'失败,菜单名称已存在"));
|
||||||
}
|
}
|
||||||
if (UserConstants.YES_FRAME.Equals(MenuDto.isFrame) && !MenuDto.path.StartsWith("http"))
|
if (UserConstants.YES_FRAME.Equals(MenuDto.isFrame) && !MenuDto.path.StartsWith("http"))
|
||||||
{
|
{
|
||||||
return ToResponse(ApiResult.Error($"新增菜单'{MenuDto.menuName}'失败,地址必须以http(s)://开头"));
|
return ToResponse(ApiResult.Error($"新增菜单'{MenuDto.MenuName}'失败,地址必须以http(s)://开头"));
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuDto.Create_by = User.Identity.Name;
|
MenuDto.Create_by = User.Identity.Name;
|
||||||
|
|||||||
@ -38,30 +38,30 @@ $end
|
|||||||
$end
|
$end
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button icon="search" size="small" type="primary" @click="handleQuery">搜索</el-button>
|
<el-button icon="search" type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="refresh" size="small" @click="resetQuery">重置</el-button>
|
<el-button icon="refresh" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 工具区域 -->
|
<!-- 工具区域 -->
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
$if(replaceDto.ShowBtnAdd)
|
$if(replaceDto.ShowBtnAdd)
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" size="small" v-hasPermi="['${replaceDto.PermissionPrefix}:add']" plain icon="plus" @click="handleAdd">新增</el-button>
|
<el-button type="primary" v-hasPermi="['${replaceDto.PermissionPrefix}:add']" plain icon="plus" @click="handleAdd">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
$end
|
$end
|
||||||
$if(replaceDto.ShowBtnEdit)
|
$if(replaceDto.ShowBtnEdit)
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" size="small" :disabled="single" v-hasPermi="['${replaceDto.PermissionPrefix}:edit']" plain icon="edit" @click="handleUpdate">修改</el-button>
|
<el-button type="success" :disabled="single" v-hasPermi="['${replaceDto.PermissionPrefix}:edit']" plain icon="edit" @click="handleUpdate">修改</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
$end
|
$end
|
||||||
$if(replaceDto.ShowBtnDelete)
|
$if(replaceDto.ShowBtnDelete)
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" size="small" :disabled="multiple" v-hasPermi="['${replaceDto.PermissionPrefix}:delete']" plain icon="delete" @click="handleDelete">删除</el-button>
|
<el-button type="danger" :disabled="multiple" v-hasPermi="['${replaceDto.PermissionPrefix}:delete']" plain icon="delete" @click="handleDelete">删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
$end
|
$end
|
||||||
$if(replaceDto.ShowBtnExport)
|
$if(replaceDto.ShowBtnExport)
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" size="small" plain icon="download" @click="handleExport" v-hasPermi="['${replaceDto.PermissionPrefix}:export']">导出</el-button>
|
<el-button type="warning" plain icon="download" @click="handleExport" v-hasPermi="['${replaceDto.PermissionPrefix}:export']">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
$end
|
$end
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
@ -88,16 +88,15 @@ $if(column.IsList == true)
|
|||||||
$if(column.HtmlType == "customInput" && column.IsPk == false)
|
$if(column.HtmlType == "customInput" && column.IsPk == false)
|
||||||
<el-table-column prop="${columnName}" label="${labelName}" width="90" sortable align="center">
|
<el-table-column prop="${columnName}" label="${labelName}" width="90" sortable align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-show="editIndex != scope.${index}index" @click="editCurrRow(scope.${index}index,'rowkeY')">{{scope.row.${columnName}}}</span>
|
<span v-show="editIndex != scope.$${index}index" @click="editCurrRow(scope.$${index}index)">{{scope.row.${columnName}}}</span>
|
||||||
<el-input :id="scope.${index}index+'rowkeY'" size="mini" v-show="(editIndex == scope.${index}index)"
|
<el-input :id="scope.$${index}index" v-show="(editIndex == scope.$${index}index)" v-model="scope.row.${columnName}" @blur="handleChangeSort(scope.row)"></el-input>
|
||||||
v-model="scope.row.${columnName}" @blur="handleChangeSort(scope.row)"></el-input>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
$elseif(column.HtmlType == "imageUpload")
|
$elseif(column.HtmlType == "imageUpload")
|
||||||
<el-table-column prop="${columnName}" label="${labelName}" align="center">
|
<el-table-column prop="${columnName}" label="${labelName}" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image class="table-td-thumb" fit="contain" :src="scope.row.${columnName}" :preview-src-list="[scope.row.${columnName}]">
|
<el-image class="table-td-thumb" fit="contain" :src="scope.row.${columnName}" :preview-src-list="[scope.row.${columnName}]">
|
||||||
<div><i class="el-icon-document" /></div>
|
<div><el-icon :size="15"><document /></el-icon></div>
|
||||||
</el-image>
|
</el-image>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -185,13 +184,13 @@ $elseif(column.HtmlType == "datetime")
|
|||||||
$elseif(column.HtmlType == "imageUpload")
|
$elseif(column.HtmlType == "imageUpload")
|
||||||
<el-col :lg="24">
|
<el-col :lg="24">
|
||||||
<el-form-item label="${labelName}" prop="${columnName}">
|
<el-form-item label="${labelName}" prop="${columnName}">
|
||||||
<UploadImage v-model="form.${columnName}" column="${columnName}" @success="handleUploadSuccess" />
|
<UploadImage v-model="form.${columnName}" :data="{ uploadType: 1 }" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
$elseif(column.HtmlType == "fileUpload")
|
$elseif(column.HtmlType == "fileUpload")
|
||||||
<el-col :lg="24">
|
<el-col :lg="24">
|
||||||
<el-form-item label="${labelName}" prop="${columnName}">
|
<el-form-item label="${labelName}" prop="${columnName}">
|
||||||
<UploadFile v-model="form.${columnName}" column="${columnName}" @success="handleUploadSuccess" />
|
<UploadFile v-model="form.${columnName}" :data="{ uploadType: 1 }" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
$elseif(column.HtmlType == "radio")
|
$elseif(column.HtmlType == "radio")
|
||||||
@ -253,36 +252,27 @@ $end
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script setup name="${genTable.BusinessName.ToLower()}">
|
||||||
import {
|
import { list${genTable.BusinessName}, add${genTable.BusinessName}, del${genTable.BusinessName}, update${genTable.BusinessName}, get${genTable.BusinessName},
|
||||||
list${genTable.BusinessName},
|
|
||||||
add${genTable.BusinessName},
|
|
||||||
del${genTable.BusinessName},
|
|
||||||
update${genTable.BusinessName},
|
|
||||||
get${genTable.BusinessName},
|
|
||||||
$if(replaceDto.ShowBtnExport)
|
$if(replaceDto.ShowBtnExport)
|
||||||
export${genTable.BusinessName},
|
export${genTable.BusinessName},
|
||||||
$end
|
$end
|
||||||
$if(showCustomInput)
|
$if(showCustomInput)
|
||||||
changeSort
|
changeSort
|
||||||
$end
|
$end
|
||||||
} from '@/api/${tool.FirstLowerCase(genTable.ModuleName)}/${tool.FirstLowerCase(genTable.BusinessName)}.js';
|
} from '@/api/${tool.FirstLowerCase(genTable.ModuleName)}/${genTable.BusinessName.ToLower()}.js'
|
||||||
|
|
||||||
import { reactive, ref, toRefs, getCurrentInstance } from "vue";
|
const { proxy } = getCurrentInstance()
|
||||||
export default {
|
|
||||||
name: "${genTable.BusinessName.ToLower()}",
|
|
||||||
setup() {
|
|
||||||
const { proxy } = getCurrentInstance();
|
|
||||||
// 选中${replaceDto.FistLowerPk}数组数组
|
// 选中${replaceDto.FistLowerPk}数组数组
|
||||||
const ids = ref([]);
|
const ids = ref([])
|
||||||
// 非单选禁用
|
// 非单选禁用
|
||||||
const single = ref(true);
|
const single = ref(true)
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
const multiple = ref(true);
|
const multiple = ref(true)
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
const loading = ref(false);
|
const loading = ref(false)
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true)
|
||||||
// 查询参数
|
// 查询参数
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -294,32 +284,68 @@ $if(item.IsQuery == true)
|
|||||||
${item.CsharpFieldFl}: undefined,
|
${item.CsharpFieldFl}: undefined,
|
||||||
$end
|
$end
|
||||||
$end
|
$end
|
||||||
});
|
})
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
const title = ref("");
|
const title = ref("")
|
||||||
// 操作类型 1、add 2、edit
|
// 操作类型 1、add 2、edit
|
||||||
const opertype = ref(0);
|
const opertype = ref(0)
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
const open = ref(false);
|
const open = ref(false)
|
||||||
// 表单参数
|
// 表单参数
|
||||||
const data = reactive({
|
const state = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
});
|
rules: {
|
||||||
const { form } = toRefs(data);
|
$foreach(column in genTable.Columns)
|
||||||
|
$if(column.IsRequired && column.IsIncrement == false)
|
||||||
|
${column.CsharpFieldFl}: [
|
||||||
|
{ required: true, message: "${column.ColumnComment}不能为空", trigger: $if(column.htmlType == "select")"change"$else"blur"$end
|
||||||
|
$if(column.CsharpType == "int" || column.CsharpType == "long"), type: "number"$end }
|
||||||
|
],
|
||||||
|
$end
|
||||||
|
$end
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const { form, rules } = toRefs(state)
|
||||||
// 总记录数
|
// 总记录数
|
||||||
const total = ref(0);
|
const total = ref(0)
|
||||||
const dataList = ref([]);
|
const dataList = ref([])
|
||||||
const queryRef = ref(null);
|
const queryRef = ref()
|
||||||
const formRef = ref(null);
|
const formRef = ref()
|
||||||
$foreach(item in genTable.Columns)
|
$foreach(item in genTable.Columns)
|
||||||
$if((item.HtmlType == "radio" || item.HtmlType == "select" || item.HtmlType == "checkbox"))
|
$if((item.HtmlType == "radio" || item.HtmlType == "select" || item.HtmlType == "checkbox"))
|
||||||
// ${item.ColumnComment}选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
// ${item.ColumnComment}选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||||
const ${item.CsharpFieldFl}Options = ref([]);
|
const ${item.CsharpFieldFl}Options = ref([])
|
||||||
$elseif(item.HtmlType == "datetime" && item.IsQuery == true)
|
$elseif(item.HtmlType == "datetime" && item.IsQuery == true)
|
||||||
// ${item.ColumnComment}时间范围
|
// ${item.ColumnComment}时间范围
|
||||||
const dateRange${item.CsharpField} = ref([]);
|
const dateRange${item.CsharpField} = ref([])
|
||||||
|
|
||||||
$elseif(item.HtmlType == "customInput")
|
$elseif(item.HtmlType == "customInput")
|
||||||
const editIndex = ref(-1);
|
// ******************自定义编辑 start **********************
|
||||||
|
const editIndex = ref(-1)
|
||||||
|
// 显示编辑排序
|
||||||
|
function editCurrRow(rowId) {
|
||||||
|
editIndex.value = rowId
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
document.getElementById(rowId).focus()
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
// 保存排序
|
||||||
|
function handleChangeSort(info) {
|
||||||
|
editIndex.value = -1
|
||||||
|
proxy
|
||||||
|
.${confirm}confirm('是否保存数据?')
|
||||||
|
.then(function () {
|
||||||
|
return changeSort({ value: info.${item.CsharpFieldFl}, id: info.${replaceDto.FistLowerPk} })
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
handleQuery()
|
||||||
|
proxy.${modal}modal.msgSuccess('修改成功')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// ******************自定义编辑 end **********************
|
||||||
|
|
||||||
$end
|
$end
|
||||||
$end
|
$end
|
||||||
|
|
||||||
@ -331,86 +357,81 @@ $if((item.HtmlType == "radio" || item.HtmlType == "select" || item.HtmlType == "
|
|||||||
$set(index = index + 1)
|
$set(index = index + 1)
|
||||||
$end
|
$end
|
||||||
$end
|
$end
|
||||||
];
|
]
|
||||||
$if(index > 0)
|
$if(index > 0)
|
||||||
proxy.getDicts(dictParams).then((response) => {
|
proxy.getDicts(dictParams).then((response) => {
|
||||||
response.data.forEach((element) => {
|
response.data.forEach((element) => {
|
||||||
proxy[element.columnName] = element.list;
|
proxy[element.columnName] = element.list
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
$end
|
$end
|
||||||
|
|
||||||
// 表单规则校验
|
|
||||||
const rules = reactive({
|
|
||||||
$foreach(column in genTable.Columns)
|
|
||||||
$if(column.IsRequired && column.IsIncrement == false)
|
|
||||||
${column.CsharpFieldFl}: [
|
|
||||||
{ required: true, message: "${column.ColumnComment}不能为空", trigger: $if(column.htmlType == "select")"change"$else"blur"$end
|
|
||||||
$if(column.CsharpType == "int" || column.CsharpType == "long"), type: "number"$end }
|
|
||||||
],
|
|
||||||
$end
|
|
||||||
$end
|
|
||||||
});
|
|
||||||
function getList(){
|
function getList(){
|
||||||
$foreach(item in genTable.Columns)
|
$foreach(item in genTable.Columns)
|
||||||
$if(item.HtmlType == "datetime" && item.IsQuery == true)
|
$if(item.HtmlType == "datetime" && item.IsQuery == true)
|
||||||
proxy.addDateRange(queryParams, proxy.dateRange${item.CsharpField}, '${item.CsharpField}');
|
proxy.addDateRange(queryParams, proxy.dateRange${item.CsharpField}, '${item.CsharpField}');
|
||||||
$end
|
$end
|
||||||
$end
|
$end
|
||||||
loading.value = true;
|
loading.value = true
|
||||||
list${genTable.BusinessName}(queryParams).then(res => {
|
list${genTable.BusinessName}(queryParams).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
dataList.value = res.data.result;
|
dataList.value = res.data.result
|
||||||
total.value = res.data.totalNum;
|
total.value = res.data.totalNum
|
||||||
loading.value = false;
|
loading.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 关闭dialog
|
||||||
function cancel(){
|
function cancel(){
|
||||||
open.value = false;
|
open.value = false
|
||||||
reset();
|
reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重置表单
|
// 重置表单
|
||||||
function reset() {
|
function reset() {
|
||||||
proxy.resetForm("formRef");
|
proxy.resetForm("formRef")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询
|
// 查询
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
queryParams.pageNum = 1;
|
queryParams.pageNum = 1
|
||||||
getList();
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加
|
// 添加
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
reset();
|
reset();
|
||||||
open.value = true;
|
open.value = true
|
||||||
title.value = '添加';
|
title.value = '添加'
|
||||||
opertype.value = 1;
|
opertype.value = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除按钮操作
|
// 删除按钮操作
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
const Ids = row.${replaceDto.FistLowerPk} || ids.value;
|
const Ids = row.${replaceDto.FistLowerPk} || ids.value
|
||||||
|
|
||||||
proxy.${confirm}confirm('是否确认删除参数编号为"' + Ids + '"的数据项?')
|
proxy.${confirm}confirm('是否确认删除参数编号为"' + Ids + '"的数据项?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
//return del${genTable.BusinessName}(Ids);
|
return del${genTable.BusinessName}(Ids)
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
handleQuery();
|
handleQuery()
|
||||||
proxy.${modal}modal.msgSuccess("删除成功");
|
proxy.${modal}modal.msgSuccess("删除成功")
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改按钮操作
|
// 修改按钮操作
|
||||||
function handleUpdate(row) {
|
function handleUpdate(row) {
|
||||||
reset();
|
reset()
|
||||||
const id = row.${replaceDto.FistLowerPk} || ids.value;
|
const id = row.${replaceDto.FistLowerPk} || ids.value
|
||||||
get${genTable.BusinessName}(id).then((res) => {
|
get${genTable.BusinessName}(id).then((res) => {
|
||||||
const { code, data } = res;
|
const { code, data } = res
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
open.value = true;
|
open.value = true
|
||||||
title.value = "修改数据";
|
title.value = "修改数据"
|
||||||
opertype.value = 2;
|
opertype.value = 2
|
||||||
|
|
||||||
form.value = {
|
form.value = {
|
||||||
...data,
|
...data,
|
||||||
@ -419,9 +440,9 @@ $if(item.HtmlType == "checkbox")
|
|||||||
${item.CsharpFieldFl}Checked: data.${item.CsharpFieldFl} ? data.${item.CsharpFieldFl}.split(',') : [],
|
${item.CsharpFieldFl}Checked: data.${item.CsharpFieldFl} ? data.${item.CsharpFieldFl}.split(',') : [],
|
||||||
$end
|
$end
|
||||||
$end
|
$end
|
||||||
};
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单提交
|
// 表单提交
|
||||||
@ -429,123 +450,74 @@ $end
|
|||||||
proxy.${refs}refs["formRef"].validate((valid) => {
|
proxy.${refs}refs["formRef"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (form.value.${replaceDto.FistLowerPk} != undefined && opertype.value === 2) {
|
if (form.value.${replaceDto.FistLowerPk} != undefined && opertype.value === 2) {
|
||||||
update${genTable.BusinessName}(form.value)
|
update${genTable.BusinessName}(form.value).then((res) => {
|
||||||
.then((res) => {
|
proxy.${modal}modal.msgSuccess("修改成功")
|
||||||
proxy.${modal}modal.msgSuccess("修改成功");
|
open.value = false
|
||||||
open.value = false;
|
getList()
|
||||||
getList();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch(() => {})
|
||||||
//TODO 错误逻辑
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
add${genTable.BusinessName}(form.value)
|
add${genTable.BusinessName}(form.value).then((res) => {
|
||||||
.then((res) => {
|
proxy.${modal}modal.msgSuccess("新增成功")
|
||||||
proxy.${modal}modal.msgSuccess("新增成功");
|
open.value = false
|
||||||
open.value = false;
|
getList()
|
||||||
getList();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
//TODO 错误逻辑
|
//TODO 错误逻辑
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重置查询操作
|
// 重置查询操作
|
||||||
function resetQuery(){
|
function resetQuery(){
|
||||||
$foreach(item in genTable.Columns)
|
$foreach(item in genTable.Columns)
|
||||||
$if(item.HtmlType == "datetime" && item.IsQuery == true)
|
$if(item.HtmlType == "datetime" && item.IsQuery == true)
|
||||||
// ${item.ColumnComment}时间范围
|
// ${item.ColumnComment}时间范围
|
||||||
dateRange${item.CsharpField}.value = [];
|
dateRange${item.CsharpField}.value = []
|
||||||
$end
|
$end
|
||||||
$end
|
$end
|
||||||
proxy.resetForm("queryRef");
|
proxy.resetForm("queryRef")
|
||||||
handleQuery();
|
handleQuery()
|
||||||
}
|
}
|
||||||
$if(replaceDto.ShowBtnExport)
|
$if(replaceDto.ShowBtnExport)
|
||||||
// 导出按钮操作
|
// 导出按钮操作
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
proxy.${confirm}confirm("是否确认导出所有${genTable.functionName}数据项?", "警告", {
|
proxy
|
||||||
|
.${confirm}confirm("是否确认导出所有${genTable.functionName}数据项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return export${genTable.BusinessName}(queryParams);
|
return export${genTable.BusinessName}(queryParams)
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
proxy.download(response.data.path);
|
proxy.download(response.data.path)
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
$end
|
$end
|
||||||
|
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
function handleSelectionChange(selection) {
|
function handleSelectionChange(selection) {
|
||||||
ids.value = selection.map((item) => item.${replaceDto.FistLowerPk});
|
ids.value = selection.map((item) => item.${replaceDto.FistLowerPk});
|
||||||
single.value = selection.length != 1
|
single.value = selection.length != 1
|
||||||
multiple.value = !selection.length;
|
multiple.value = !selection.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自定义排序
|
// 自定义排序
|
||||||
function sortChange(column) {
|
function sortChange(column) {
|
||||||
if (column.prop == null || column.order == null) {
|
if (column.prop == null || column.order == null) {
|
||||||
queryParams.sort = undefined;
|
queryParams.sort = undefined
|
||||||
queryParams.sortType = undefined;
|
queryParams.sortType = undefined
|
||||||
} else {
|
} else {
|
||||||
queryParams.sort = column.prop;
|
queryParams.sort = column.prop
|
||||||
queryParams.sortType = column.order;
|
queryParams.sortType = column.order
|
||||||
}
|
}
|
||||||
|
|
||||||
handleQuery();
|
handleQuery()
|
||||||
}
|
}
|
||||||
$if(replaceDto.UploadFile == 1)
|
|
||||||
//图片上传成功方法
|
|
||||||
function handleUploadSuccess(column, filelist) {
|
|
||||||
form[column] = filelist;
|
|
||||||
}
|
|
||||||
$end
|
|
||||||
|
|
||||||
return {
|
handleQuery()
|
||||||
single,
|
|
||||||
multiple,
|
|
||||||
loading,
|
|
||||||
showSearch,
|
|
||||||
queryParams,
|
|
||||||
total,
|
|
||||||
rules,
|
|
||||||
title,
|
|
||||||
opertype,
|
|
||||||
open,
|
|
||||||
form,
|
|
||||||
dataList,
|
|
||||||
$foreach(item in genTable.Columns)
|
|
||||||
$if((item.HtmlType == "radio" || item.HtmlType == "select" || item.HtmlType == "checkbox"))
|
|
||||||
${item.CsharpFieldFl}Options,
|
|
||||||
$elseif(item.HtmlType == "datetime" && item.IsQuery == true)
|
|
||||||
dateRange${item.CsharpField},
|
|
||||||
$elseif(item.HtmlType == "customInput")
|
|
||||||
editIndex,
|
|
||||||
$end
|
|
||||||
$end
|
|
||||||
handleQuery,
|
|
||||||
handleAdd,
|
|
||||||
submitForm,
|
|
||||||
$if(replaceDto.ShowBtnExport)
|
|
||||||
handleExport,
|
|
||||||
$end
|
|
||||||
resetQuery,
|
|
||||||
handleDelete,
|
|
||||||
handleUpdate,
|
|
||||||
reset,
|
|
||||||
cancel,
|
|
||||||
queryRef,
|
|
||||||
formRef,
|
|
||||||
sortChange,
|
|
||||||
getList,
|
|
||||||
handleSelectionChange,
|
|
||||||
$if(replaceDto.UploadFile == 1)
|
|
||||||
handleUploadSuccess,
|
|
||||||
$end
|
|
||||||
};
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
@ -211,7 +211,7 @@ namespace ZR.CodeGenerator
|
|||||||
var tpl = FileHelper.ReadJtTemplate(fileName);
|
var tpl = FileHelper.ReadJtTemplate(fileName);
|
||||||
|
|
||||||
var result = tpl.Render();
|
var result = tpl.Render();
|
||||||
var fullPath = generateDto.IsPreview ? string.Empty : Path.Combine(generateDto.GenCodePath, "ZR.Vue3", "src", "views", generateDto.GenTable.ModuleName.FirstLowerCase(), $"{generateDto.GenTable.BusinessName.FirstUpperCase()}.vue");
|
var fullPath = generateDto.IsPreview ? string.Empty : Path.Combine(generateDto.GenCodePath, "ZRAdmin-vue", "src", "views", generateDto.GenTable.ModuleName.FirstLowerCase(), $"{generateDto.GenTable.BusinessName.FirstUpperCase()}.vue");
|
||||||
//Console.WriteLine(result);
|
//Console.WriteLine(result);
|
||||||
generateDto.GenCodes.Add(new GenCode(16, "vue3.vue", fullPath, result));
|
generateDto.GenCodes.Add(new GenCode(16, "vue3.vue", fullPath, result));
|
||||||
}
|
}
|
||||||
@ -226,8 +226,11 @@ namespace ZR.CodeGenerator
|
|||||||
var tpl = FileHelper.ReadJtTemplate("TplVueApi.txt");
|
var tpl = FileHelper.ReadJtTemplate("TplVueApi.txt");
|
||||||
var result = tpl.Render();
|
var result = tpl.Render();
|
||||||
|
|
||||||
string fullPath = generateDto.IsPreview ? string.Empty : Path.Combine(generateDto.GenCodePath, "ZR.Vue", "src", "api", generateDto.GenTable.ModuleName.FirstLowerCase(), generateDto.GenTable.BusinessName.FirstLowerCase() + ".js");
|
string fullPath = generateDto.IsPreview ? string.Empty : Path.Combine(generateDto.GenCodePath, "ZR.Vue", "src", "api", generateDto.GenTable.ModuleName.FirstLowerCase(), generateDto.GenTable.BusinessName.FirstUpperCase() + ".js");
|
||||||
generateDto.GenCodes.Add(new GenCode(7, "api.js", fullPath, result));
|
generateDto.GenCodes.Add(new GenCode(7, "api.js", fullPath, result));
|
||||||
|
|
||||||
|
string fullPathV3 = generateDto.IsPreview ? string.Empty : Path.Combine(generateDto.GenCodePath, "ZRAdmin-vue", "src", "api", generateDto.GenTable.ModuleName.FirstLowerCase(), generateDto.GenTable.BusinessName.ToLower() + ".js");
|
||||||
|
generateDto.GenCodes.Add(new GenCode(7, "api.js", fullPathV3, result));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -286,7 +289,7 @@ namespace ZR.CodeGenerator
|
|||||||
{
|
{
|
||||||
var tpl = FileHelper.ReadJtTemplate("CurdForm.txt");
|
var tpl = FileHelper.ReadJtTemplate("CurdForm.txt");
|
||||||
var result = tpl.Render();
|
var result = tpl.Render();
|
||||||
Console.WriteLine(result);
|
//Console.WriteLine(result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -12,6 +12,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JinianNet.JNTemplate" Version="2.2.5" />
|
<PackageReference Include="JinianNet.JNTemplate" Version="2.2.5" />
|
||||||
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.0.6.6" />
|
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.0.7.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -8,15 +8,15 @@ namespace ZR.Model.System
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 文章表
|
/// 文章表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SqlSugar.SugarTable("article")]
|
[SugarTable("article")]
|
||||||
[Tenant("0")]
|
[Tenant("0")]
|
||||||
public class Article
|
public class Article
|
||||||
{
|
{
|
||||||
[SqlSugar.SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||||
public int Cid { get; set; }
|
public int Cid { get; set; }
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public DateTime? CreateTime { get; set; }
|
public DateTime? CreateTime { get; set; }
|
||||||
[SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true)]
|
[SugarColumn(IsOnlyIgnoreInsert = true)]
|
||||||
public DateTime UpdateTime { get; set; }
|
public DateTime UpdateTime { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 文章内容
|
/// 文章内容
|
||||||
@ -44,6 +44,6 @@ namespace ZR.Model.System
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Tags { get; set; }
|
public string Tags { get; set; }
|
||||||
public int Hits { get; set; }
|
public int Hits { get; set; }
|
||||||
public int Category_id { get; set; }
|
public int Category_Id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,6 +22,7 @@ namespace ZR.Model.System.Dto
|
|||||||
public string GenType { get; set; }
|
public string GenType { get; set; }
|
||||||
public string GenPath { get; set; }
|
public string GenPath { get; set; }
|
||||||
public string PermissionPrefix { get; set; }
|
public string PermissionPrefix { get; set; }
|
||||||
|
public string Remark { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 额外参数
|
/// 额外参数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ZR.Model.System.Dto
|
namespace ZR.Model.System.Dto
|
||||||
@ -7,18 +8,65 @@ namespace ZR.Model.System.Dto
|
|||||||
public class MenuDto
|
public class MenuDto
|
||||||
{
|
{
|
||||||
//{"parentId":0,"menuName":"aaa","icon":"documentation","menuType":"M","orderNum":999,"visible":0,"status":0,"path":"aaa"}
|
//{"parentId":0,"menuName":"aaa","icon":"documentation","menuType":"M","orderNum":999,"visible":0,"status":0,"path":"aaa"}
|
||||||
public int parentId { get; set; }
|
[Required(ErrorMessage = "菜单id不能为空")]
|
||||||
public string menuName { get; set; }
|
|
||||||
public string icon { get; set; } = "";
|
|
||||||
public string menuType { get; set; }
|
|
||||||
public int orderNum { get; set; }
|
|
||||||
public int visible { get; set; }
|
|
||||||
public int status { get; set; }
|
|
||||||
public string path { get; set; } = "#";
|
|
||||||
public int MenuId { get; set; }
|
public int MenuId { get; set; }
|
||||||
|
public string MenuName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 父菜单ID
|
||||||
|
/// </summary>
|
||||||
|
public long parentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示顺序
|
||||||
|
/// </summary>
|
||||||
|
public int orderNum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 路由地址
|
||||||
|
/// </summary>
|
||||||
|
public string path { get; set; } = "#";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组件路径
|
||||||
|
/// </summary>
|
||||||
public string component { get; set; }
|
public string component { get; set; }
|
||||||
public int isCache { get; set; }
|
|
||||||
public int isFrame { get; set; }
|
/// <summary>
|
||||||
public string perms { get; set; } = "";
|
/// 是否缓存(1缓存 0不缓存)
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage = "是否缓存不能为空")]
|
||||||
|
public string isCache { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否外链 1、是 0、否
|
||||||
|
/// </summary>
|
||||||
|
public string isFrame { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 类型(M目录 C菜单 F按钮 L链接)
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage = "菜单类型不能为空")]
|
||||||
|
public string menuType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示状态(0显示 1隐藏)
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage = "显示状态不能为空")]
|
||||||
|
public string visible { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单状态(0正常 1停用)
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage = "菜单状态不能为空")]
|
||||||
|
public string status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 权限字符串
|
||||||
|
/// </summary>
|
||||||
|
public string perms { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 菜单图标
|
||||||
|
/// </summary>
|
||||||
|
public string icon { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,12 +14,12 @@ namespace ZR.Model.System
|
|||||||
/// 菜单ID
|
/// 菜单ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[Key]//非自动增长主键时使用ExplicitKey
|
//[Key]//非自动增长主键时使用ExplicitKey
|
||||||
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||||
public long menuId { get; set; }
|
public long MenuId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 菜单名称
|
/// 菜单名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string menuName { get; set; }
|
public string MenuName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 父菜单名称
|
/// 父菜单名称
|
||||||
|
|||||||
@ -24,8 +24,8 @@ namespace ZR.Model.System.Vo
|
|||||||
|
|
||||||
public TreeSelectVo(SysMenu menu)
|
public TreeSelectVo(SysMenu menu)
|
||||||
{
|
{
|
||||||
Id = menu.menuId;
|
Id = menu.MenuId;
|
||||||
Label = menu.menuName;
|
Label = menu.MenuName;
|
||||||
|
|
||||||
//menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); java写法
|
//menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); java写法
|
||||||
List<TreeSelectVo> child = new List<TreeSelectVo>();
|
List<TreeSelectVo> child = new List<TreeSelectVo>();
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="EPPlus" Version="5.8.6" />
|
<PackageReference Include="EPPlus" Version="5.8.6" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.0.6.6" />
|
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.0.7.6" />
|
||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ namespace ZR.Repository.System
|
|||||||
public List<SysMenu> SelectTreeMenuList(SysMenu menu)
|
public List<SysMenu> SelectTreeMenuList(SysMenu menu)
|
||||||
{
|
{
|
||||||
return Context.Queryable<SysMenu>()
|
return Context.Queryable<SysMenu>()
|
||||||
.WhereIF(!string.IsNullOrEmpty(menu.menuName), it => it.menuName.Contains(menu.menuName))
|
.WhereIF(!string.IsNullOrEmpty(menu.MenuName), it => it.MenuName.Contains(menu.MenuName))
|
||||||
.WhereIF(!string.IsNullOrEmpty(menu.visible), it => it.visible == menu.visible)
|
.WhereIF(!string.IsNullOrEmpty(menu.visible), it => it.visible == menu.visible)
|
||||||
.WhereIF(!string.IsNullOrEmpty(menu.status), it => it.status == menu.status)
|
.WhereIF(!string.IsNullOrEmpty(menu.status), it => it.status == menu.status)
|
||||||
.OrderBy(it => new { it.parentId, it.orderNum })
|
.OrderBy(it => new { it.parentId, it.orderNum })
|
||||||
@ -40,8 +40,8 @@ namespace ZR.Repository.System
|
|||||||
.Where(r => roles.Contains(r.Role_id));
|
.Where(r => roles.Contains(r.Role_id));
|
||||||
|
|
||||||
return Context.Queryable<SysMenu>()
|
return Context.Queryable<SysMenu>()
|
||||||
.InnerJoin(roleMenus, (c, j) => c.menuId == j.Menu_id)
|
.InnerJoin(roleMenus, (c, j) => c.MenuId == j.Menu_id)
|
||||||
.WhereIF(!string.IsNullOrEmpty(sysMenu.menuName), (c, j) => c.menuName.Contains(sysMenu.menuName))
|
.WhereIF(!string.IsNullOrEmpty(sysMenu.MenuName), (c, j) => c.MenuName.Contains(sysMenu.MenuName))
|
||||||
.WhereIF(!string.IsNullOrEmpty(sysMenu.visible), (c, j) => c.visible == sysMenu.visible)
|
.WhereIF(!string.IsNullOrEmpty(sysMenu.visible), (c, j) => c.visible == sysMenu.visible)
|
||||||
.WhereIF(!string.IsNullOrEmpty(sysMenu.status), (c, j) => c.status == sysMenu.status)
|
.WhereIF(!string.IsNullOrEmpty(sysMenu.status), (c, j) => c.status == sysMenu.status)
|
||||||
.OrderBy((c, j) => new { c.parentId, c.orderNum })
|
.OrderBy((c, j) => new { c.parentId, c.orderNum })
|
||||||
@ -56,7 +56,7 @@ namespace ZR.Repository.System
|
|||||||
public List<SysMenu> SelectMenuList(SysMenu menu)
|
public List<SysMenu> SelectMenuList(SysMenu menu)
|
||||||
{
|
{
|
||||||
return Context.Queryable<SysMenu>()
|
return Context.Queryable<SysMenu>()
|
||||||
.WhereIF(!string.IsNullOrEmpty(menu.menuName), it => it.menuName.Contains(menu.menuName))
|
.WhereIF(!string.IsNullOrEmpty(menu.MenuName), it => it.MenuName.Contains(menu.MenuName))
|
||||||
.WhereIF(!string.IsNullOrEmpty(menu.visible), it => it.visible == menu.visible)
|
.WhereIF(!string.IsNullOrEmpty(menu.visible), it => it.visible == menu.visible)
|
||||||
.WhereIF(!string.IsNullOrEmpty(menu.status), it => it.status == menu.status)
|
.WhereIF(!string.IsNullOrEmpty(menu.status), it => it.status == menu.status)
|
||||||
.OrderBy(it => new { it.parentId, it.orderNum })
|
.OrderBy(it => new { it.parentId, it.orderNum })
|
||||||
@ -75,9 +75,9 @@ namespace ZR.Repository.System
|
|||||||
.Where(r => roles.Contains(r.Role_id));
|
.Where(r => roles.Contains(r.Role_id));
|
||||||
|
|
||||||
return Context.Queryable<SysMenu>()
|
return Context.Queryable<SysMenu>()
|
||||||
.InnerJoin(roleMenus, (c, j) => c.menuId == j.Menu_id)
|
.InnerJoin(roleMenus, (c, j) => c.MenuId == j.Menu_id)
|
||||||
.Where((c, j) => c.status == "0")
|
.Where((c, j) => c.status == "0")
|
||||||
.WhereIF(!string.IsNullOrEmpty(sysMenu.menuName), (c, j) => c.menuName.Contains(sysMenu.menuName))
|
.WhereIF(!string.IsNullOrEmpty(sysMenu.MenuName), (c, j) => c.MenuName.Contains(sysMenu.MenuName))
|
||||||
.WhereIF(!string.IsNullOrEmpty(sysMenu.visible), (c, j) => c.visible == sysMenu.visible)
|
.WhereIF(!string.IsNullOrEmpty(sysMenu.visible), (c, j) => c.visible == sysMenu.visible)
|
||||||
.OrderBy((c, j) => new { c.parentId, c.orderNum })
|
.OrderBy((c, j) => new { c.parentId, c.orderNum })
|
||||||
.Select(c => c)
|
.Select(c => c)
|
||||||
@ -111,7 +111,7 @@ namespace ZR.Repository.System
|
|||||||
.Where((menu) =>
|
.Where((menu) =>
|
||||||
menuTypes.Contains(menu.menuType)
|
menuTypes.Contains(menu.menuType)
|
||||||
&& menu.status == "0"
|
&& menu.status == "0"
|
||||||
&& SqlFunc.Subqueryable<SysRoleMenu>().Where( s => roleIds.Contains(s.Role_id) && s.Menu_id == menu.menuId).Any())
|
&& SqlFunc.Subqueryable<SysRoleMenu>().Where( s => roleIds.Contains(s.Role_id) && s.Menu_id == menu.MenuId).Any())
|
||||||
.OrderBy((menu) => new { menu.parentId, menu.orderNum })
|
.OrderBy((menu) => new { menu.parentId, menu.orderNum })
|
||||||
.Select((menu) => menu).ToList();
|
.Select((menu) => menu).ToList();
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@ namespace ZR.Repository.System
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public SysMenu SelectMenuById(int menuId)
|
public SysMenu SelectMenuById(int menuId)
|
||||||
{
|
{
|
||||||
return Context.Queryable<SysMenu>().Where(it => it.menuId == menuId).Single();
|
return Context.Queryable<SysMenu>().Where(it => it.MenuId == menuId).Single();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -137,7 +137,7 @@ namespace ZR.Repository.System
|
|||||||
{
|
{
|
||||||
var Db = Context;
|
var Db = Context;
|
||||||
menu.Create_time = Db.GetDate();
|
menu.Create_time = Db.GetDate();
|
||||||
menu.menuId = Db.Insertable(menu).ExecuteReturnIdentity();
|
menu.MenuId = Db.Insertable(menu).ExecuteReturnIdentity();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ namespace ZR.Repository.System
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int DeleteMenuById(int menuId)
|
public int DeleteMenuById(int menuId)
|
||||||
{
|
{
|
||||||
return Context.Deleteable<SysMenu>().Where(it => it.menuId == menuId).ExecuteCommand();
|
return Context.Deleteable<SysMenu>().Where(it => it.MenuId == menuId).ExecuteCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -168,7 +168,7 @@ namespace ZR.Repository.System
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public int ChangeSortMenu(MenuDto menuDto)
|
public int ChangeSortMenu(MenuDto menuDto)
|
||||||
{
|
{
|
||||||
var result = Context.Updateable(new SysMenu() { menuId = menuDto.MenuId, orderNum = menuDto.orderNum })
|
var result = Context.Updateable(new SysMenu() { MenuId = menuDto.MenuId, orderNum = menuDto.orderNum })
|
||||||
.UpdateColumns(it => new { it.orderNum }).ExecuteCommand();
|
.UpdateColumns(it => new { it.orderNum }).ExecuteCommand();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ namespace ZR.Repository.System
|
|||||||
public List<SysMenu> SelectMenuPermsByUserId(long userId)
|
public List<SysMenu> SelectMenuPermsByUserId(long userId)
|
||||||
{
|
{
|
||||||
return Context.Queryable<SysMenu, SysRoleMenu, SysUserRole, SysRole>((m, rm, ur, r) => new JoinQueryInfos(
|
return Context.Queryable<SysMenu, SysRoleMenu, SysUserRole, SysRole>((m, rm, ur, r) => new JoinQueryInfos(
|
||||||
JoinType.Left, m.menuId == rm.Menu_id,
|
JoinType.Left, m.MenuId == rm.Menu_id,
|
||||||
JoinType.Left, rm.Role_id == ur.RoleId,
|
JoinType.Left, rm.Role_id == ur.RoleId,
|
||||||
JoinType.Left, ur.RoleId == r.RoleId
|
JoinType.Left, ur.RoleId == r.RoleId
|
||||||
))
|
))
|
||||||
@ -198,7 +198,7 @@ namespace ZR.Repository.System
|
|||||||
public SysMenu CheckMenuNameUnique(SysMenu menu)
|
public SysMenu CheckMenuNameUnique(SysMenu menu)
|
||||||
{
|
{
|
||||||
return Context.Queryable<SysMenu>()
|
return Context.Queryable<SysMenu>()
|
||||||
.Where(it => it.menuName == menu.menuName && it.parentId == menu.parentId).Single();
|
.Where(it => it.MenuName == menu.MenuName && it.parentId == menu.parentId).Single();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<PackageReference Include="MySql.Data" Version="8.0.25" />
|
<PackageReference Include="MySql.Data" Version="8.0.25" />
|
||||||
<PackageReference Include="NETCore.Encrypt" Version="2.1.0" />
|
<PackageReference Include="NETCore.Encrypt" Version="2.1.0" />
|
||||||
<PackageReference Include="SqlSugar.IOC" Version="1.8.0" />
|
<PackageReference Include="SqlSugar.IOC" Version="1.8.0" />
|
||||||
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.0.6.6" />
|
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.0.7.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -113,14 +113,14 @@ namespace ZR.Service
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string CheckMenuNameUnique(SysMenu menu)
|
public string CheckMenuNameUnique(SysMenu menu)
|
||||||
{
|
{
|
||||||
long menuId = menu.menuId == 0 ? -1 : menu.menuId;
|
long menuId = menu.MenuId == 0 ? -1 : menu.MenuId;
|
||||||
SysMenu info = MenuRepository.CheckMenuNameUnique(menu);
|
SysMenu info = MenuRepository.CheckMenuNameUnique(menu);
|
||||||
|
|
||||||
//if (info != null && menuId != info.menuId && menu.menuName.Equals(info.menuName))
|
//if (info != null && menuId != info.menuId && menu.menuName.Equals(info.menuName))
|
||||||
//{
|
//{
|
||||||
// return UserConstants.NOT_UNIQUE;
|
// return UserConstants.NOT_UNIQUE;
|
||||||
//}
|
//}
|
||||||
if (info != null && info.menuId != menu.menuId)
|
if (info != null && info.MenuId != menu.MenuId)
|
||||||
{
|
{
|
||||||
return UserConstants.NOT_UNIQUE;
|
return UserConstants.NOT_UNIQUE;
|
||||||
}
|
}
|
||||||
@ -252,7 +252,7 @@ namespace ZR.Service
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private List<SysMenu> GetChildList(List<SysMenu> list, SysMenu sysMenu)
|
private List<SysMenu> GetChildList(List<SysMenu> list, SysMenu sysMenu)
|
||||||
{
|
{
|
||||||
return list.Where(p => p.parentId == sysMenu.menuId).ToList();
|
return list.Where(p => p.parentId == sysMenu.MenuId).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -272,7 +272,7 @@ namespace ZR.Service
|
|||||||
Name = GetRouteName(menu),
|
Name = GetRouteName(menu),
|
||||||
Path = GetRoutePath(menu),
|
Path = GetRoutePath(menu),
|
||||||
Component = GetComponent(menu),
|
Component = GetComponent(menu),
|
||||||
Meta = new Meta(menu.menuName, menu.icon, "1".Equals(menu.isCache))
|
Meta = new Meta(menu.MenuName, menu.icon, "1".Equals(menu.isCache))
|
||||||
};
|
};
|
||||||
|
|
||||||
List<SysMenu> cMenus = menu.children;
|
List<SysMenu> cMenus = menu.children;
|
||||||
@ -291,7 +291,7 @@ namespace ZR.Service
|
|||||||
Path = menu.path,
|
Path = menu.path,
|
||||||
Component = menu.component,
|
Component = menu.component,
|
||||||
Name = string.IsNullOrEmpty(menu.path) ? "" : menu.path.ToLower(),
|
Name = string.IsNullOrEmpty(menu.path) ? "" : menu.path.ToLower(),
|
||||||
Meta = new Meta(menu.menuName, menu.icon, "1".Equals(menu.isCache))
|
Meta = new Meta(menu.MenuName, menu.icon, "1".Equals(menu.isCache))
|
||||||
};
|
};
|
||||||
childrenList.Add(children);
|
childrenList.Add(children);
|
||||||
router.Children = childrenList;
|
router.Children = childrenList;
|
||||||
@ -310,7 +310,7 @@ namespace ZR.Service
|
|||||||
public List<SysMenu> BuildMenuTree(List<SysMenu> menus)
|
public List<SysMenu> BuildMenuTree(List<SysMenu> menus)
|
||||||
{
|
{
|
||||||
List<SysMenu> returnList = new List<SysMenu>();
|
List<SysMenu> returnList = new List<SysMenu>();
|
||||||
List<long> tempList = menus.Select(f => f.menuId).ToList();
|
List<long> tempList = menus.Select(f => f.MenuId).ToList();
|
||||||
|
|
||||||
foreach (var menu in menus)
|
foreach (var menu in menus)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -57,12 +57,12 @@ service.interceptors.response.use(res => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||||
} else if (code == 0 || code == 1 || code == 110 || code == 101 || code == 103 || code == 403 || code == 500 || code == 429) {
|
} else if (code == 0 || code == 1 || code == 110 || code == 101 || code == 403 || code == 500 || code == 429) {
|
||||||
Message({
|
Message({
|
||||||
message: msg,
|
message: msg,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return Promise.reject(msg)
|
return Promise.reject(res.data)
|
||||||
} else {
|
} else {
|
||||||
//返回标准 code/msg/data字段
|
//返回标准 code/msg/data字段
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|||||||
@ -134,7 +134,8 @@ export default {
|
|||||||
this.msgSuccess('登录成功')
|
this.msgSuccess('登录成功')
|
||||||
this.$router.push({ path: this.redirect || '/' })
|
this.$router.push({ path: this.redirect || '/' })
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch((error) => {
|
||||||
|
this.msgError(error.msg);
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.getCode()
|
this.getCode()
|
||||||
this.$refs.codeTxt.focus()
|
this.$refs.codeTxt.focus()
|
||||||
|
|||||||
@ -681,7 +681,7 @@ insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.
|
|||||||
insert into sys_config values(4, '账号自助-验证码开关', 'sys.account.captchaOnOff', 'true', 'Y', 'admin', sysdate(), '', null, '是否开启验证码功能(off、关闭,1、动态验证码 2、动态gif泡泡 3、泡泡 4、静态验证码)');
|
insert into sys_config values(4, '账号自助-验证码开关', 'sys.account.captchaOnOff', 'true', 'Y', 'admin', sysdate(), '', null, '是否开启验证码功能(off、关闭,1、动态验证码 2、动态gif泡泡 3、泡泡 4、静态验证码)');
|
||||||
INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (5, '本地文件上传访问域名', 'sys.file.uploadurl', 'http://localhost:8888', 'Y', '', sysdate(), '', NULL, NULL);
|
INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (5, '本地文件上传访问域名', 'sys.file.uploadurl', 'http://localhost:8888', 'Y', '', sysdate(), '', NULL, NULL);
|
||||||
INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (6, '开启注册功能', 'sys.account.register', 'true', 'Y', 'admin', sysdate(), 'admin', NULL, NULL);
|
INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (6, '开启注册功能', 'sys.account.register', 'true', 'Y', 'admin', sysdate(), 'admin', NULL, NULL);
|
||||||
INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (7, '文章预览地址', 'sys.article.preview.url', 'http://www.izhaorui.cn/article/details/', 'Y', 'admin', sysdate(), '', NULL, NULL);
|
INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (7, '文章预览地址', 'sys.article.preview.url', 'http://www.izhaorui.cn/article/details/', 'Y', 'admin', sysdate(), '', NULL, '格式:http://www.izhaorui.cn/article/details/{aid},其中{aid}为文章的id');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 18、代码生成业务表
|
-- 18、代码生成业务表
|
||||||
@ -772,7 +772,7 @@ DROP TABLE IF EXISTS `sys_file`;
|
|||||||
CREATE TABLE `sys_file` (
|
CREATE TABLE `sys_file` (
|
||||||
`id` BIGINT(11) NOT NULL,
|
`id` BIGINT(11) NOT NULL,
|
||||||
`realName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件真实名',
|
`realName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件真实名',
|
||||||
`fileName` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名',
|
`fileName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名',
|
||||||
`fileUrl` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件存储地址',
|
`fileUrl` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件存储地址',
|
||||||
`storePath` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '仓库位置',
|
`storePath` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '仓库位置',
|
||||||
`accessUrl` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '访问路径',
|
`accessUrl` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '访问路径',
|
||||||
|
|||||||
@ -699,7 +699,7 @@ insert into sys_config values('主框架页-侧边栏主题', 'sys.ind
|
|||||||
insert into sys_config values('账号自助-验证码开关', 'sys.account.captchaOnOff', '1', 'Y', 'admin', GETDATE(), '', null, '开启验证码功能(off、关闭,1、动态验证码 2、动态gif泡泡 3、泡泡 4、静态验证码)');
|
insert into sys_config values('账号自助-验证码开关', 'sys.account.captchaOnOff', '1', 'Y', 'admin', GETDATE(), '', null, '开启验证码功能(off、关闭,1、动态验证码 2、动态gif泡泡 3、泡泡 4、静态验证码)');
|
||||||
INSERT INTO sys_config VALUES('本地文件上传访问域名', 'sys.file.uploadurl', 'http://localhost:8888', 'Y', 'admin', GETDATE(), '', NULL, NULL);
|
INSERT INTO sys_config VALUES('本地文件上传访问域名', 'sys.file.uploadurl', 'http://localhost:8888', 'Y', 'admin', GETDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_config VALUES('开启注册功能', 'sys.account.register', 'true', 'Y', 'admin', GETDATE(), '', NULL, NULL);
|
INSERT INTO sys_config VALUES('开启注册功能', 'sys.account.register', 'true', 'Y', 'admin', GETDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_config VALUES('文章预览地址', 'sys.article.preview.url', 'http://www.izhaorui.cn/article/details/', 'Y', 'admin', GETDATE(), '', NULL, NULL);
|
INSERT INTO sys_config VALUES('文章预览地址', 'sys.article.preview.url', 'http://www.izhaorui.cn/article/details/', 'Y', 'admin', GETDATE(), '', NULL, '格式:http://www.izhaorui.cn/article/details/{aid},其中{aid}为文章的id');
|
||||||
|
|
||||||
GO
|
GO
|
||||||
|
|
||||||
@ -739,7 +739,7 @@ GO
|
|||||||
CREATE TABLE [dbo].[sys_file](
|
CREATE TABLE [dbo].[sys_file](
|
||||||
[id] [BIGINT] NOT NULL PRIMARY KEY,
|
[id] [BIGINT] NOT NULL PRIMARY KEY,
|
||||||
[realName] VARCHAR(50) NULL,
|
[realName] VARCHAR(50) NULL,
|
||||||
[fileName] [VARCHAR](20) NULL,
|
[fileName] [VARCHAR](50) NULL,
|
||||||
[fileUrl] [VARCHAR](500) NULL,
|
[fileUrl] [VARCHAR](500) NULL,
|
||||||
[storePath] [VARCHAR](50) NULL,
|
[storePath] [VARCHAR](50) NULL,
|
||||||
[accessUrl] [VARCHAR](300) NULL,
|
[accessUrl] [VARCHAR](300) NULL,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user