feat: webfrist基本流程已完成
This commit is contained in:
@@ -22,25 +22,29 @@ namespace Yi.Framework.Module.WebFirstManager.Domain
|
||||
public async Task BuildWebToCodeAsync(TableAggregateRoot tableEntity)
|
||||
{
|
||||
var templates = await _repository.GetListAsync();
|
||||
var fields = await _fieldRepository.GetListAsync();
|
||||
foreach (var template in templates)
|
||||
{
|
||||
string templateStr = template.TemplateStr;
|
||||
var handledTempalte = new HandledTemplate();
|
||||
handledTempalte.TemplateStr= template.TemplateStr;
|
||||
handledTempalte.BuildPath = template.BuildPath;
|
||||
foreach (var templateHandler in _templateHandlers)
|
||||
{
|
||||
templateHandler.SetTable(tableEntity);
|
||||
templateStr = templateHandler.Invoker(templateStr);
|
||||
handledTempalte = templateHandler.Invoker(handledTempalte.TemplateStr, handledTempalte.BuildPath);
|
||||
}
|
||||
await BuildToFileAsync(handledTempalte);
|
||||
|
||||
await BuildToFileAsync(templateStr, template);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async Task BuildToFileAsync(string str, TemplateEntity templateEntity)
|
||||
private async Task BuildToFileAsync(HandledTemplate handledTemplate)
|
||||
{
|
||||
|
||||
//await File.WriteAllTextAsync(str, templateEntity.BuildPath);
|
||||
if (!Directory.Exists(Path.GetDirectoryName(handledTemplate.BuildPath)))
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(handledTemplate.BuildPath));
|
||||
}
|
||||
await File.WriteAllTextAsync(handledTemplate.BuildPath,handledTemplate.TemplateStr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using EasyTool;
|
||||
using Furion;
|
||||
using Furion.DatabaseAccessor;
|
||||
using Furion.DependencyInjection;
|
||||
@@ -82,7 +82,7 @@ namespace Yi.Framework.Module.WebFirstManager.Domain
|
||||
{
|
||||
var fieldEntity = new FieldEntity();
|
||||
fieldEntity.Name = propertyInfo.Name;
|
||||
var enumName = typeof(FieldTypeEnum).GetFields(BindingFlags.Static | BindingFlags.Public).Where(x => x.GetCustomAttribute<DescriptionAttribute>()?.Description == propertyInfo.PropertyType.Name).FirstOrDefault()?.Name;
|
||||
var enumName = typeof(FieldTypeEnum).GetFields(BindingFlags.Static | BindingFlags.Public).Where(x => x.GetCustomAttribute<DisplayAttribute>()?.Name== propertyInfo.PropertyType.Name).FirstOrDefault()?.Name;
|
||||
if (enumName is null)
|
||||
{
|
||||
fieldEntity.FieldType = FieldTypeEnum.String;
|
||||
@@ -91,7 +91,7 @@ namespace Yi.Framework.Module.WebFirstManager.Domain
|
||||
}
|
||||
else
|
||||
{
|
||||
fieldEntity.FieldType = EnumUtil.Parse<FieldTypeEnum>(enumName);
|
||||
fieldEntity.FieldType =EasyTool.EnumUtil.Parse<FieldTypeEnum>(enumName);
|
||||
}
|
||||
|
||||
var colum = propertyInfo.GetCustomAttribute<SugarColumn>();
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
|
||||
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
|
||||
|
||||
namespace Yi.Framework.Module.WebFirstManager.Dtos.Template
|
||||
{
|
||||
@@ -20,5 +15,16 @@ namespace Yi.Framework.Module.WebFirstManager.Dtos.Template
|
||||
/// 生成路径
|
||||
/// </summary>
|
||||
public string BuildPath { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 模板名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,5 +9,11 @@ namespace Yi.Framework.Module.WebFirstManager.Dtos.Template
|
||||
{
|
||||
public class TemplateGetListInput : PagedAndSortedResultRequestDto
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 模板名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,11 +19,22 @@ namespace Yi.Framework.Module.WebFirstManager.Entities
|
||||
/// <summary>
|
||||
/// 模板字符串
|
||||
/// </summary>
|
||||
[SugarColumn(Length =99999)]
|
||||
public string TemplateStr { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 生成路径
|
||||
/// </summary>
|
||||
public string BuildPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remarks { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -10,13 +11,13 @@ namespace Yi.Framework.Module.WebFirstManager.Enums
|
||||
{
|
||||
public enum FieldTypeEnum
|
||||
{
|
||||
[Description("String")]
|
||||
[Display(Name ="string",Description = "String")]
|
||||
String,
|
||||
|
||||
[Description("Int32")]
|
||||
[Display(Name = "int", Description = "Int32")]
|
||||
Int,
|
||||
|
||||
[Description("Int64")]
|
||||
[Display(Name = "long", Description = "Int64")]
|
||||
Long,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
using System.Text;
|
||||
using EasyTool;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Furion.DependencyInjection;
|
||||
using Yi.Framework.Module.WebFirstManager.Enums;
|
||||
|
||||
namespace Yi.Framework.Module.WebFirstManager.Handler
|
||||
{
|
||||
public class FieldTemplateHandler : TemplateHandlerBase, ITemplateHandler, ISingleton
|
||||
{
|
||||
public string Invoker(string str)
|
||||
public HandledTemplate Invoker(string str,string path)
|
||||
{
|
||||
return str.Replace("@field", BuildFields());
|
||||
var output= new HandledTemplate();
|
||||
output.TemplateStr = str.Replace("@field", BuildFields());
|
||||
output.BuildPath = path;
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,15 +29,20 @@ namespace Yi.Framework.Module.WebFirstManager.Handler
|
||||
|
||||
foreach (var field in Table.Fields)
|
||||
{
|
||||
var typeStr = EnumUtil.GetDescriptionByValue(field.FieldType);
|
||||
var typeStr = typeof(FieldTypeEnum).GetFields().Where(x=> x.Name== field.FieldType.ToString())?.FirstOrDefault().GetCustomAttribute<DisplayAttribute>().Name;
|
||||
|
||||
if (typeStr is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var nameStr = field.Name;
|
||||
|
||||
//添加备注
|
||||
if (string.IsNullOrEmpty(field.Description))
|
||||
if (!string.IsNullOrEmpty(field.Description))
|
||||
{
|
||||
var desStr = "/// <summary>" +
|
||||
@$"///{field.Description}" +
|
||||
"/// </summary>";
|
||||
var desStr = "/// <summary>\n" +
|
||||
$"///{field.Description}\n" +
|
||||
"/// </summary>\n";
|
||||
fieldStrs.AppendLine(desStr);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Module.WebFirstManager.Handler
|
||||
{
|
||||
public class HandledTemplate
|
||||
{
|
||||
public string TemplateStr { get; set; }
|
||||
|
||||
public string BuildPath { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,6 @@ namespace Yi.Framework.Module.WebFirstManager.Handler
|
||||
public interface ITemplateHandler
|
||||
{
|
||||
void SetTable(TableAggregateRoot table);
|
||||
string Invoker(string str);
|
||||
HandledTemplate Invoker(string str, string path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,12 @@ namespace Yi.Framework.Module.WebFirstManager.Handler
|
||||
{
|
||||
public class ModelTemplateHandler : TemplateHandlerBase, ITemplateHandler, ISingleton
|
||||
{
|
||||
public string Invoker(string str)
|
||||
public HandledTemplate Invoker(string str, string path)
|
||||
{
|
||||
return str.Replace("@model", StrUtil.ToFirstLetterLowerCase(Table.Name)).Replace("@Model", StrUtil.ToFirstLetterUpperCase(Table.Name));
|
||||
var output = new HandledTemplate();
|
||||
output.TemplateStr= str.Replace("@model", StrUtil.ToFirstLetterLowerCase(Table.Name)).Replace("@Model", StrUtil.ToFirstLetterUpperCase(Table.Name));
|
||||
output.BuildPath = path.Replace("@model", StrUtil.ToFirstLetterLowerCase(Table.Name)).Replace("@Model", StrUtil.ToFirstLetterUpperCase(Table.Name));
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,12 @@ namespace Yi.Framework.Module.WebFirstManager.Handler
|
||||
{
|
||||
public class NameSpaceTemplateHandler : TemplateHandlerBase, ITemplateHandler, ISingleton
|
||||
{
|
||||
public string Invoker(string str)
|
||||
public HandledTemplate Invoker(string str, string path)
|
||||
{
|
||||
return str.Replace("@namespace", "");
|
||||
var output = new HandledTemplate();
|
||||
output.TemplateStr = str.Replace("@namespace", "");
|
||||
output.BuildPath = path;
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Yi.Framework.Infrastructure.Ddd.Services;
|
||||
using Yi.Framework.Module.WebFirstManager.Dtos.Table;
|
||||
using Yi.Framework.Module.WebFirstManager.Dtos.Template;
|
||||
using Yi.Framework.Module.WebFirstManager.Entities;
|
||||
|
||||
namespace Yi.Framework.Module.WebFirstManager.Impl
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Infrastructure.Ddd.Dtos;
|
||||
using Yi.Framework.Infrastructure.Ddd.Services;
|
||||
using Yi.Framework.Module.WebFirstManager.Dtos.Template;
|
||||
using Yi.Framework.Module.WebFirstManager.Entities;
|
||||
@@ -15,5 +12,17 @@ namespace Yi.Framework.Module.WebFirstManager.Impl
|
||||
[ApiDescriptionSettings("WebFirstManager")]
|
||||
public class TemplateService : CrudAppService<TemplateEntity, TemplateDto, long, TemplateGetListInput>, ITemplateService, IDynamicApiController, ITransient
|
||||
{
|
||||
public async override Task<PagedResultDto<TemplateDto>> GetListAsync([FromQuery] TemplateGetListInput input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
var entities = await _DbQueryable.WhereIF(input.Name is not null, x => x.Name.Equals(input.Name!))
|
||||
.ToPageListAsync(input.PageNum, input.PageSize, total);
|
||||
|
||||
return new PagedResultDto<TemplateDto>
|
||||
{
|
||||
Total = total,
|
||||
Items = await MapToGetListOutputDtosAsync(entities)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -27,17 +28,17 @@ namespace Yi.Framework.Module.WebFirstManager.Impl
|
||||
{
|
||||
_tableRepository = tableRepository;
|
||||
_codeFileManager = codeFileManager;
|
||||
_webTemplateManager= webTemplateManager;
|
||||
_webTemplateManager = webTemplateManager;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Web To Code
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task PostWebBuildCodeAsync()
|
||||
public async Task PostWebBuildCodeAsync(List<long> ids)
|
||||
{
|
||||
//获取全部表
|
||||
var tables = await _tableRepository.GetListAsync();
|
||||
var tables = await _tableRepository._DbQueryable.Where(x => ids.Contains(x.Id)).Includes(x => x.Fields).ToListAsync();
|
||||
foreach (var table in tables)
|
||||
{
|
||||
await _codeFileManager.BuildWebToCodeAsync(table);
|
||||
@@ -61,7 +62,7 @@ namespace Yi.Framework.Module.WebFirstManager.Impl
|
||||
[UnitOfWork]
|
||||
public async Task PostCodeBuildWebAsync()
|
||||
{
|
||||
var tableAggregateRoots =await _webTemplateManager.BuildCodeToWebAsync();
|
||||
var tableAggregateRoots = await _webTemplateManager.BuildCodeToWebAsync();
|
||||
//覆盖数据库,将聚合根保存到数据库
|
||||
_tableRepository._Db.DbMaintenance.TruncateTable<TableAggregateRoot>();
|
||||
_tableRepository._Db.DbMaintenance.TruncateTable<FieldEntity>();
|
||||
@@ -69,7 +70,7 @@ namespace Yi.Framework.Module.WebFirstManager.Impl
|
||||
//导航插入即可
|
||||
await _tableRepository._Db.InsertNav(tableAggregateRoots).Include(x => x.Fields).ExecuteCommandAsync();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -80,5 +81,17 @@ namespace Yi.Framework.Module.WebFirstManager.Impl
|
||||
public async Task PostCodeBuildDbAsync()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开目录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task PostDir(string path)
|
||||
{
|
||||
path = Uri.UnescapeDataString(path);
|
||||
//去除包含@的目录
|
||||
path = string.Join("\\", path.Split("\\").Where(x => !x.Contains("@")).ToList());
|
||||
Process.Start("explorer.exe", path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -462,6 +462,21 @@
|
||||
生成路径
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Module.WebFirstManager.Dtos.Template.TemplateDto.Name">
|
||||
<summary>
|
||||
模板名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Module.WebFirstManager.Dtos.Template.TemplateDto.Remarks">
|
||||
<summary>
|
||||
备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Module.WebFirstManager.Dtos.Template.TemplateGetListInput.Name">
|
||||
<summary>
|
||||
模板名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Module.WebFirstManager.Entities.FieldEntity.Name">
|
||||
<summary>
|
||||
字段名称
|
||||
@@ -512,6 +527,16 @@
|
||||
生成路径
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Module.WebFirstManager.Entities.TemplateEntity.Name">
|
||||
<summary>
|
||||
模板名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Module.WebFirstManager.Entities.TemplateEntity.Remarks">
|
||||
<summary>
|
||||
备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Module.WebFirstManager.Handler.FieldTemplateHandler.BuildFields">
|
||||
<summary>
|
||||
生成Fields
|
||||
@@ -529,7 +554,7 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Module.WebFirstManager.Impl.WebFirstService.PostWebBuildCodeAsync">
|
||||
<member name="M:Yi.Framework.Module.WebFirstManager.Impl.WebFirstService.PostWebBuildCodeAsync(System.Collections.Generic.List{System.Int64})">
|
||||
<summary>
|
||||
Web To Code
|
||||
</summary>
|
||||
@@ -553,6 +578,12 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Module.WebFirstManager.Impl.WebFirstService.PostDir(System.String)">
|
||||
<summary>
|
||||
打开目录
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Module.WeChat.IWeChatManager.Code2SessionAsync(Yi.Framework.Module.WeChat.Model.Code2SessionInput)">
|
||||
<summary>
|
||||
获取用户openid
|
||||
|
||||
@@ -73,6 +73,47 @@ namespace Yi.Furion.Core.Rbac.DataSeeds
|
||||
};
|
||||
entities.Add(table);
|
||||
|
||||
//字段管理
|
||||
MenuEntity field = new MenuEntity()
|
||||
{
|
||||
Id = SnowflakeHelper.NextId,
|
||||
MenuName = "字段管理",
|
||||
PermissionCode = "webfirst:field:list",
|
||||
MenuType = MenuTypeEnum.Menu,
|
||||
Router = "field",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
IsCache = true,
|
||||
Component = "webfirst/field/index",
|
||||
MenuIcon = "number",
|
||||
OrderNum = 99,
|
||||
ParentId = webfirst.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(field);
|
||||
|
||||
|
||||
//模板管理
|
||||
MenuEntity template = new MenuEntity()
|
||||
{
|
||||
Id = SnowflakeHelper.NextId,
|
||||
MenuName = "模板管理",
|
||||
PermissionCode = "webfirst:template:list",
|
||||
MenuType = MenuTypeEnum.Menu,
|
||||
Router = "template",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
IsCache = true,
|
||||
Component = "webfirst/template/index",
|
||||
MenuIcon = "documentation",
|
||||
OrderNum = 98,
|
||||
ParentId = webfirst.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(template);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import useSettingsStore from '@/store/modules/settings'
|
||||
import { handleThemeStyle } from '@/utils/theme'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import { storeToRefs } from 'pinia';
|
||||
import signalR from '@/utils/signalR'
|
||||
// import signalR from '@/utils/signalR'
|
||||
|
||||
const {token}=storeToRefs(useUserStore());
|
||||
|
||||
@@ -21,9 +21,8 @@ onMounted(() => {
|
||||
|
||||
//这里还需要监视token的变化,重新进行signalr连接
|
||||
watch(()=>token.value,async (newValue,oldValue)=>{
|
||||
console.log("重新连接");
|
||||
// await signalR.close();
|
||||
await signalR.start();
|
||||
// await signalR.start();
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
43
Yi.RuoYi.Vue3/src/api/webfirst/templateApi.js
Normal file
43
Yi.RuoYi.Vue3/src/api/webfirst/templateApi.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import request from '@/utils/request'
|
||||
// 分页查询
|
||||
export function listData(query) {
|
||||
return request({
|
||||
url: 'template',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// id查询
|
||||
export function getData(id) {
|
||||
return request({
|
||||
url: `template/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function addData(data) {
|
||||
return request({
|
||||
url: 'template',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function updateData(id,data) {
|
||||
return request({
|
||||
url: `template/${id}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delData(ids) {
|
||||
return request({
|
||||
url: `template/${ids}`,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
24
Yi.RuoYi.Vue3/src/api/webfirst/webfirstApi.js
Normal file
24
Yi.RuoYi.Vue3/src/api/webfirst/webfirstApi.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import request from '@/utils/request'
|
||||
// code to web
|
||||
export function codeToWeb() {
|
||||
return request({
|
||||
url: 'web-first/code-build-web',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
// code to web
|
||||
export function webToCode(ids) {
|
||||
return request({
|
||||
url: 'web-first/web-build-code',
|
||||
method: 'post',
|
||||
data:ids
|
||||
})
|
||||
}
|
||||
|
||||
// open zhe path
|
||||
export function openPath(path) {
|
||||
return request({
|
||||
url: `web-first/dir/${encodeURIComponent(path)}`,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import { download } from '@/utils/ruoyi.js'
|
||||
import 'virtual:svg-icons-register'
|
||||
import SvgIcon from '@/components/SvgIcon'
|
||||
import elementIcons from '@/components/SvgIcon/svgicon'
|
||||
import signalR from '@/utils/signalR'
|
||||
// import signalR from '@/utils/signalR'
|
||||
|
||||
import './permission' // permission control
|
||||
|
||||
@@ -80,7 +80,7 @@ app.use(ElementPlus, {
|
||||
})
|
||||
// app.prototype.signalr = signalR
|
||||
|
||||
signalR.init(`${import.meta.env.VITE_APP_BASE_WS}/hub/main`);
|
||||
// signalR.init(`${import.meta.env.VITE_APP_BASE_WS}/hub/main`);
|
||||
// signalR.start();
|
||||
app.mount('#app')
|
||||
|
||||
|
||||
@@ -103,9 +103,9 @@
|
||||
<template #default="scope">
|
||||
|
||||
<el-button type="text" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['business:article:edit']">修改</el-button>
|
||||
v-hasPermi="['@per:per@:edit']">修改</el-button>
|
||||
<el-button type="text" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['business:article:remove']">删除</el-button>
|
||||
v-hasPermi="['@per:per@:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -155,7 +155,7 @@ import {
|
||||
delData,
|
||||
addData,
|
||||
updateData,
|
||||
} from "@/api/@model@";
|
||||
} from "@/api/@api@";
|
||||
import { ref } from "@vue/reactivity";
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="表名称" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入表名称" clearable style="width: 240px"
|
||||
@keyup.enter="handleQuery" prop="name" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="表编号" prop="code">
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="表名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入表名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
prop="name"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="表编号" prop="code">
|
||||
<el-input v-model="queryParams.code" placeholder="请输入表编号" clearable style="width: 240px"
|
||||
@keyup.enter="handleQuery" prop="code" />
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="状态" prop="isDeleted">
|
||||
<!-- <el-form-item label="状态" prop="isDeleted">
|
||||
<el-select
|
||||
v-model="queryParams.isDeleted"
|
||||
placeholder="状态"
|
||||
@@ -25,7 +36,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="创建时间" style="width: 308px">
|
||||
<!-- <el-form-item label="创建时间" style="width: 308px">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
value-format="YYYY-MM-DD"
|
||||
@@ -35,49 +46,119 @@
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['webfirst:table:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['webfirst:table:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['webfirst:table:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['webfirst:table:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['webfirst:table:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['webfirst:table:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['webfirst:table:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['webfirst:table:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Switch"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['webfirst:table:export']"
|
||||
>同步数据库WebToDb</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Switch"
|
||||
@click="handleWebToCode"
|
||||
:disabled="ids.length==0"
|
||||
v-hasPermi="['webfirst:table:export']"
|
||||
>代码生成WebToCode</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<!-----------------------这里开始就是数据表单的全部列------------------------>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Switch"
|
||||
@click="handleCodeToWeb"
|
||||
v-hasPermi="['webfirst:table:export']"
|
||||
>实体同步CodeToWeb</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table-column label="表名称" align="center" prop="name" :show-overflow-tooltip="true" />
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dataList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
|
||||
|
||||
<!-----------------------这里开始就是数据表单的全部列------------------------>
|
||||
|
||||
<el-table-column
|
||||
label="描述"
|
||||
align="center"
|
||||
prop="description"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
<el-table-column
|
||||
label="表名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="描述"
|
||||
align="center"
|
||||
prop="description"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
@@ -87,29 +168,46 @@
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['business:article:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['business:article:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-button type="text" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['business:article:edit']">修改</el-button>
|
||||
<el-button type="text" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['business:article:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="Number(total)"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<pagination v-show="total > 0" :total="Number(total)" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<!-- ---------------------这里是新增和更新的对话框--------------------- -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||
<el-form ref="dataRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="表名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入表名称" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- ---------------------这里是新增和更新的对话框--------------------- -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||
<el-form ref="dataRef" :model="form" :rules="rules" label-width="100px">
|
||||
|
||||
<el-form-item label="表名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入表名称" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="状态" prop="isDeleted">
|
||||
<!-- <el-form-item label="状态" prop="isDeleted">
|
||||
<el-radio-group v-model="form.isDeleted">
|
||||
<el-radio
|
||||
v-for="dict in sys_normal_disable"
|
||||
@@ -119,29 +217,33 @@
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="form.description" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input
|
||||
v-model="form.description"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
listData,
|
||||
getData,
|
||||
delData,
|
||||
addData,
|
||||
updateData,
|
||||
listData,
|
||||
getData,
|
||||
delData,
|
||||
addData,
|
||||
updateData,
|
||||
} from "@/api/webfirst/tableApi";
|
||||
|
||||
import { codeToWeb,webToCode } from "@/api/webfirst/webfirstApi";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
|
||||
|
||||
@@ -156,113 +258,127 @@ const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
code: undefined,
|
||||
},
|
||||
rules: {
|
||||
code: [{ required: true, message: "表编号不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "表名称不能为空", trigger: "blur" }],
|
||||
},
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
code: undefined,
|
||||
},
|
||||
rules: {
|
||||
code: [{ required: true, message: "表编号不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "表名称不能为空", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listData(proxy.addDateRange(queryParams.value, dateRange.value)).then(
|
||||
(response) => {
|
||||
dataList.value = response.data.items;
|
||||
total.value = response.data.total;
|
||||
loading.value = false;
|
||||
}
|
||||
);
|
||||
loading.value = true;
|
||||
listData(proxy.addDateRange(queryParams.value, dateRange.value)).then(
|
||||
(response) => {
|
||||
dataList.value = response.data.items;
|
||||
total.value = response.data.total;
|
||||
loading.value = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
proxy.resetForm("dataRef");
|
||||
proxy.resetForm("dataRef");
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加表";
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加表";
|
||||
}
|
||||
/** 多选框选中数据 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const id = row.id || ids.value;
|
||||
getData(id).then((response) => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改表";
|
||||
});
|
||||
reset();
|
||||
const id = row.id || ids.value;
|
||||
getData(id).then((response) => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改表";
|
||||
});
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["dataRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
updateData(form.value.id, form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addData(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
proxy.$refs["dataRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
updateData(form.value.id, form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addData(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const delIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除编号为"' + delIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delData(delIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
const delIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除编号为"' + delIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delData(delIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() { }
|
||||
function handleExport() {}
|
||||
|
||||
/** CodeToWeb */
|
||||
const handleCodeToWeb = async () => {
|
||||
await codeToWeb();
|
||||
proxy.$modal.msgSuccess("实体同步成功");
|
||||
getList();
|
||||
};
|
||||
|
||||
/** CodeToWeb */
|
||||
const handleWebToCode = async () => {
|
||||
const response= await webToCode(ids.value);
|
||||
if(response.statusCode==200)
|
||||
{
|
||||
proxy.$modal.msgSuccess("代码生成成功");
|
||||
}
|
||||
|
||||
};
|
||||
getList();
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-col :offset="6" :span="8">
|
||||
<el-input v-model="oldStr" placeholder="输入需替换内容"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="newStr" placeholder="输入替换后内容"></el-input>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="2" class="btn">
|
||||
<el-button @click="replace" type="primary" :disabled="oldStr==''||newStr==''">替换字符串</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps(['text'])
|
||||
const emit = defineEmits(['handleText'])
|
||||
const oldStr=ref("");
|
||||
const newStr=ref("");
|
||||
const replace=()=>{
|
||||
const resultStr= props.text.replace(new RegExp(oldStr.value,'g'),newStr.value);
|
||||
emit("handleText",resultStr);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.btn{
|
||||
justify-content: right;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<p><el-icon><InfoFilled /></el-icon> 以下模板变量将会被替换:</p>
|
||||
<p v-for="(item,i) in text" :key="i">
|
||||
<el-text class="mx-1" type="primary">【{{item.oldValue}}】</el-text>替换为
|
||||
<el-text class="mx-1" type="Default">【{{item.newValue}}】</el-text>
|
||||
</p>
|
||||
</template>
|
||||
<script setup>
|
||||
const text=[
|
||||
{
|
||||
oldValue:"@model",
|
||||
newValue:"实体名字,小写开头"
|
||||
},
|
||||
{
|
||||
oldValue:"@Model",
|
||||
newValue:"实体名字,大写开头"
|
||||
},
|
||||
{
|
||||
oldValue:"@namespace",
|
||||
newValue:"命名空间"
|
||||
},
|
||||
{
|
||||
oldValue:"@field",
|
||||
newValue:"实体字段"
|
||||
}
|
||||
]
|
||||
</script>
|
||||
<style scoped>
|
||||
.mx-1
|
||||
{
|
||||
margin-right: 10px;
|
||||
}
|
||||
p{
|
||||
padding-left: 100px;
|
||||
}
|
||||
</style>
|
||||
377
Yi.RuoYi.Vue3/src/views/webfirst/template/index.vue
Normal file
377
Yi.RuoYi.Vue3/src/views/webfirst/template/index.vue
Normal file
@@ -0,0 +1,377 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="模板名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入模板名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
prop="name"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="模板编号" prop="code">
|
||||
<el-input v-model="queryParams.code" placeholder="请输入模板编号" clearable style="width: 240px"
|
||||
@keyup.enter="handleQuery" prop="code" />
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="创建时间" style="width: 308px">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['webfirst:template:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['webfirst:template:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['webfirst:template:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['webfirst:template:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dataList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
<!-----------------------这里开始就是数据表单的全部列------------------------>
|
||||
|
||||
<el-table-column
|
||||
label="模板名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生成路径"
|
||||
align="center"
|
||||
prop="buildPath"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<!-- <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" /> -->
|
||||
<!-- <el-table-column label="状态" align="center" prop="isDeleted">
|
||||
<template #default="scope">
|
||||
<dict-tag
|
||||
:options="sys_normal_disable"
|
||||
:value="scope.row.isDeleted"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="remarks"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['webfirst:template:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['webfirst:template:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="Number(total)"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- ---------------------这里是新增和更新的对话框--------------------- -->
|
||||
<el-dialog :title="title" v-model="open" width="1200px" append-to-body>
|
||||
<el-form ref="dataRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="模板名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入模板名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="构建路径" prop="buildPath">
|
||||
|
||||
<el-input v-model="form.buildPath" placeholder="请输入构建路径" />
|
||||
<el-button type="primary" @click="openDir(form.buildPath)">打开目录</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="状态" prop="isDeleted">
|
||||
<el-radio-group v-model="form.isDeleted">
|
||||
<el-radio
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="JSON.parse(dict.value)"
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
|
||||
<TempalteTip/>
|
||||
<el-form-item label="模板内容" prop="templateStr">
|
||||
<el-input
|
||||
v-model="form.templateStr"
|
||||
type="textarea"
|
||||
:rows="30"
|
||||
placeholder="请输入模板内容"
|
||||
></el-input>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<ReplaceText style="margin-bottom: 15px;" :text="form.templateStr" @handleText='hanldeReplaceText'></ReplaceText>
|
||||
|
||||
|
||||
|
||||
<el-form-item label="备注" prop="remarks">
|
||||
<el-input
|
||||
v-model="form.remarks"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
listData,
|
||||
getData,
|
||||
delData,
|
||||
addData,
|
||||
updateData,
|
||||
} from "@/api/webfirst/templateApi";
|
||||
import {openPath} from "@/api/webfirst/webfirstApi";
|
||||
import { ref } from "@vue/reactivity";
|
||||
import ReplaceText from './components/ReplaceText'
|
||||
import TempalteTip from './components/TempalteTip.vue'
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
|
||||
|
||||
const dataList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "模板名称不能为空", trigger: "blur" }],
|
||||
buildPath: [
|
||||
{ required: true, message: "构建路径不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listData(proxy.addDateRange(queryParams.value, dateRange.value)).then(
|
||||
(response) => {
|
||||
dataList.value = response.data.items;
|
||||
total.value = response.data.total;
|
||||
loading.value = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
proxy.resetForm("dataRef");
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加模板";
|
||||
}
|
||||
/** 多选框选中数据 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const id = row.id || ids.value;
|
||||
getData(id).then((response) => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改模板";
|
||||
});
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["dataRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
updateData(form.value.id, form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addData(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const delIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除编号为"' + delIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delData(delIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {}
|
||||
|
||||
|
||||
/** 处理字符串替换 */
|
||||
function hanldeReplaceText(text)
|
||||
{
|
||||
form.value.templateStr=text;
|
||||
}
|
||||
getList();
|
||||
|
||||
/** 打开目录 */
|
||||
async function openDir(path)
|
||||
{
|
||||
const response= await openPath(path);
|
||||
if(response.statusCode==200)
|
||||
{
|
||||
proxy.$modal.msgSuccess("目录打开成功");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,440 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1621797307555123200,
|
||||
"parentId": 0,
|
||||
"orderNum": 100,
|
||||
"name": "System",
|
||||
"path": "/system",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "系统管理",
|
||||
"icon": "system",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317541,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "User",
|
||||
"path": "user",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/user/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "用户管理",
|
||||
"icon": "user",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317546,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Role",
|
||||
"path": "role",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/role/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "角色管理",
|
||||
"icon": "peoples",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317551,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Menu",
|
||||
"path": "menu",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/menu/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "菜单管理",
|
||||
"icon": "tree-table",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317556,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Dept",
|
||||
"path": "dept",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/dept/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "部门管理",
|
||||
"icon": "tree",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317561,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Post",
|
||||
"path": "post",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/post/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "岗位管理",
|
||||
"icon": "post",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317566,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Dict",
|
||||
"path": "dict",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/dict/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "字典管理",
|
||||
"icon": "dict",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317571,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Config",
|
||||
"path": "config",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/config/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "参数设置",
|
||||
"icon": "edit",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317576,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Log",
|
||||
"path": "log",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "ParentView",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "日志管理",
|
||||
"icon": "log",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317577,
|
||||
"parentId": 1621797307559317576,
|
||||
"orderNum": 100,
|
||||
"name": "Operlog",
|
||||
"path": "operlog",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "monitor/operlog/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "操作日志",
|
||||
"icon": "form",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317580,
|
||||
"parentId": 1621797307559317576,
|
||||
"orderNum": 100,
|
||||
"name": "Logininfor",
|
||||
"path": "logininfor",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "monitor/logininfor/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "登录日志",
|
||||
"icon": "logininfor",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317504,
|
||||
"parentId": 0,
|
||||
"orderNum": 99,
|
||||
"name": "Monitor",
|
||||
"path": "/monitor",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "系统监控",
|
||||
"icon": "monitor",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317505,
|
||||
"parentId": 1621797307559317504,
|
||||
"orderNum": 100,
|
||||
"name": "Online",
|
||||
"path": "online",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "monitor/online/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "在线用户",
|
||||
"icon": "online",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317506,
|
||||
"parentId": 0,
|
||||
"orderNum": 98,
|
||||
"name": "Tool",
|
||||
"path": "/tool",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "系统工具",
|
||||
"icon": "tool",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317507,
|
||||
"parentId": 1621797307559317506,
|
||||
"orderNum": 100,
|
||||
"name": "Localhost:19001",
|
||||
"path": "http://localhost:19001",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": null,
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "接口文档",
|
||||
"icon": "list",
|
||||
"noCache": true,
|
||||
"link": "http://localhost:19001"
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317508,
|
||||
"parentId": 0,
|
||||
"orderNum": 97,
|
||||
"name": "S",
|
||||
"path": "s",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "BBS",
|
||||
"icon": "international",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317509,
|
||||
"parentId": 1621797307559317508,
|
||||
"orderNum": 100,
|
||||
"name": "Article",
|
||||
"path": "article",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "bbs/article/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "文章管理",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317514,
|
||||
"parentId": 0,
|
||||
"orderNum": 96,
|
||||
"name": "Erp",
|
||||
"path": "/erp",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "ERP",
|
||||
"icon": "international",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317515,
|
||||
"parentId": 1621797307559317514,
|
||||
"orderNum": 100,
|
||||
"name": "Supplier",
|
||||
"path": "supplier",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "erp/supplier/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "供应商定义",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317520,
|
||||
"parentId": 1621797307559317514,
|
||||
"orderNum": 100,
|
||||
"name": "Warehouse",
|
||||
"path": "warehouse",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "erp/warehouse/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "仓库定义",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317525,
|
||||
"parentId": 1621797307559317514,
|
||||
"orderNum": 100,
|
||||
"name": "Unit",
|
||||
"path": "unit",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "erp/unit/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "单位定义",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317530,
|
||||
"parentId": 1621797307559317514,
|
||||
"orderNum": 100,
|
||||
"name": "Material",
|
||||
"path": "material",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "erp/material/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "物料定义",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317535,
|
||||
"parentId": 1621797307559317514,
|
||||
"orderNum": 100,
|
||||
"name": "Purchase",
|
||||
"path": "purchase",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "erp/purchase/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "采购订单",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317540,
|
||||
"parentId": 0,
|
||||
"orderNum": 90,
|
||||
"name": "Yi",
|
||||
"path": "https://gitee.com/ccnetcore/yi",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "Yi框架",
|
||||
"icon": "guide",
|
||||
"noCache": true,
|
||||
"link": "https://gitee.com/ccnetcore/yi"
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
@@ -1,440 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1621797307555123200,
|
||||
"parentId": 0,
|
||||
"orderNum": 100,
|
||||
"name": "System",
|
||||
"path": "/system",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "系统管理",
|
||||
"icon": "system",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317541,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "User",
|
||||
"path": "user",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/user/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "用户管理",
|
||||
"icon": "user",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317546,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Role",
|
||||
"path": "role",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/role/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "角色管理",
|
||||
"icon": "peoples",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317551,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Menu",
|
||||
"path": "menu",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/menu/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "菜单管理",
|
||||
"icon": "tree-table",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317556,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Dept",
|
||||
"path": "dept",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/dept/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "部门管理",
|
||||
"icon": "tree",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317561,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Post",
|
||||
"path": "post",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/post/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "岗位管理",
|
||||
"icon": "post",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317566,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Dict",
|
||||
"path": "dict",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/dict/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "字典管理",
|
||||
"icon": "dict",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317571,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Config",
|
||||
"path": "config",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "system/config/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "参数设置",
|
||||
"icon": "edit",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317576,
|
||||
"parentId": 1621797307555123200,
|
||||
"orderNum": 100,
|
||||
"name": "Log",
|
||||
"path": "log",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "ParentView",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "日志管理",
|
||||
"icon": "log",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317577,
|
||||
"parentId": 1621797307559317576,
|
||||
"orderNum": 100,
|
||||
"name": "Operlog",
|
||||
"path": "operlog",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "monitor/operlog/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "操作日志",
|
||||
"icon": "form",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317580,
|
||||
"parentId": 1621797307559317576,
|
||||
"orderNum": 100,
|
||||
"name": "Logininfor",
|
||||
"path": "logininfor",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "monitor/logininfor/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "登录日志",
|
||||
"icon": "logininfor",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317504,
|
||||
"parentId": 0,
|
||||
"orderNum": 99,
|
||||
"name": "Monitor",
|
||||
"path": "/monitor",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "系统监控",
|
||||
"icon": "monitor",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317505,
|
||||
"parentId": 1621797307559317504,
|
||||
"orderNum": 100,
|
||||
"name": "Online",
|
||||
"path": "online",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "monitor/online/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "在线用户",
|
||||
"icon": "online",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317506,
|
||||
"parentId": 0,
|
||||
"orderNum": 98,
|
||||
"name": "Tool",
|
||||
"path": "/tool",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "系统工具",
|
||||
"icon": "tool",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317507,
|
||||
"parentId": 1621797307559317506,
|
||||
"orderNum": 100,
|
||||
"name": "Localhost:19001",
|
||||
"path": "http://localhost:19001",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": null,
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "接口文档",
|
||||
"icon": "list",
|
||||
"noCache": true,
|
||||
"link": "http://localhost:19001"
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317508,
|
||||
"parentId": 0,
|
||||
"orderNum": 97,
|
||||
"name": "S",
|
||||
"path": "s",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "BBS",
|
||||
"icon": "international",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317509,
|
||||
"parentId": 1621797307559317508,
|
||||
"orderNum": 100,
|
||||
"name": "Article",
|
||||
"path": "article",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "bbs/article/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "文章管理",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317514,
|
||||
"parentId": 0,
|
||||
"orderNum": 96,
|
||||
"name": "Erp",
|
||||
"path": "/erp",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": true,
|
||||
"meta": {
|
||||
"title": "ERP",
|
||||
"icon": "international",
|
||||
"noCache": true,
|
||||
"link": ""
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 1621797307559317515,
|
||||
"parentId": 1621797307559317514,
|
||||
"orderNum": 100,
|
||||
"name": "Supplier",
|
||||
"path": "supplier",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "erp/supplier/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "供应商定义",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317520,
|
||||
"parentId": 1621797307559317514,
|
||||
"orderNum": 100,
|
||||
"name": "Warehouse",
|
||||
"path": "warehouse",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "erp/warehouse/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "仓库定义",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317525,
|
||||
"parentId": 1621797307559317514,
|
||||
"orderNum": 100,
|
||||
"name": "Unit",
|
||||
"path": "unit",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "erp/unit/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "单位定义",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317530,
|
||||
"parentId": 1621797307559317514,
|
||||
"orderNum": 100,
|
||||
"name": "Material",
|
||||
"path": "material",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "erp/material/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "物料定义",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317535,
|
||||
"parentId": 1621797307559317514,
|
||||
"orderNum": 100,
|
||||
"name": "Purchase",
|
||||
"path": "purchase",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "erp/purchase/index",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "采购订单",
|
||||
"icon": "education",
|
||||
"noCache": false,
|
||||
"link": ""
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1621797307559317540,
|
||||
"parentId": 0,
|
||||
"orderNum": 90,
|
||||
"name": "Yi",
|
||||
"path": "https://gitee.com/ccnetcore/yi",
|
||||
"hidden": false,
|
||||
"redirect": "noRedirect",
|
||||
"component": "Layout",
|
||||
"alwaysShow": false,
|
||||
"meta": {
|
||||
"title": "Yi框架",
|
||||
"icon": "guide",
|
||||
"noCache": true,
|
||||
"link": "https://gitee.com/ccnetcore/yi"
|
||||
},
|
||||
"children": null
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user