Merge branch 'refs/heads/abp' into digital-collectibles

This commit is contained in:
橙子
2024-12-21 15:06:15 +08:00
19 changed files with 303 additions and 212 deletions

1
.gitignore vendored
View File

@@ -275,3 +275,4 @@ database_backup
/Yi.Abp.Net8/src/Yi.Abp.Web/logs/
/Yi.Abp.Net8/src/Yi.Abp.Web/yi-abp-dev.db
package-lock.json

View File

@@ -9,6 +9,7 @@ using SqlSugar;
using Volo.Abp.Data;
using Volo.Abp.Domain;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Yi.Framework.SqlSugarCore.Abstractions;
using Yi.Framework.SqlSugarCore.Repositories;
using Yi.Framework.SqlSugarCore.Uow;
@@ -24,6 +25,31 @@ namespace Yi.Framework.SqlSugarCore
var configuration = service.GetConfiguration();
var section = configuration.GetSection("DbConnOptions");
Configure<DbConnOptions>(section);
var dbConnOptions = new DbConnOptions();
section.Bind(dbConnOptions);
//很多人遗漏了这一点,不同的数据库,对于主键的使用规约不一样,需要根据数据库进行判断
SequentialGuidType guidType;
switch (dbConnOptions.DbType)
{
case DbType.MySql:
case DbType.PostgreSQL:
guidType= SequentialGuidType.SequentialAsString;
break;
case DbType.SqlServer:
guidType = SequentialGuidType.SequentialAtEnd;
break;
case DbType.Oracle:
guidType = SequentialGuidType.SequentialAsBinary;
break;
default:
guidType = SequentialGuidType.SequentialAtEnd;
break;
}
Configure<AbpSequentialGuidGeneratorOptions>(options =>
{
options.DefaultSequentialGuidType = guidType;
});
service.TryAddScoped<ISqlSugarDbContext, SqlSugarDbContextFactory>();

View File

@@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Uow;
using Volo.Abp.Users;
using Yi.Framework.Core.Extensions;
using Yi.Framework.Core.Helper;
@@ -18,12 +19,15 @@ namespace Yi.Framework.Rbac.Domain.Operlog
private ILogger<OperLogGlobalAttribute> _logger;
private IRepository<OperationLogEntity> _repository;
private ICurrentUser _currentUser;
private IUnitOfWorkManager _unitOfWorkManager;
//注入一个日志服务
public OperLogGlobalAttribute(ILogger<OperLogGlobalAttribute> logger, IRepository<OperationLogEntity> repository, ICurrentUser currentUser)
public OperLogGlobalAttribute(ILogger<OperLogGlobalAttribute> logger, IRepository<OperationLogEntity> repository, ICurrentUser currentUser, IUnitOfWorkManager unitOfWorkManager)
{
_logger = logger;
_repository = repository;
_currentUser = currentUser;
_unitOfWorkManager = unitOfWorkManager;
}
public override async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
@@ -35,7 +39,8 @@ namespace Yi.Framework.Rbac.Domain.Operlog
if (resultContext.ActionDescriptor is not ControllerActionDescriptor controllerActionDescriptor) return;
//查找标签,获取标签对象
OperLogAttribute? operLogAttribute = controllerActionDescriptor.MethodInfo.GetCustomAttributes(inherit: true)
OperLogAttribute? operLogAttribute = controllerActionDescriptor.MethodInfo
.GetCustomAttributes(inherit: true)
.FirstOrDefault(a => a.GetType().Equals(typeof(OperLogAttribute))) as OperLogAttribute;
//空对象直接返回
if (operLogAttribute is null) return;
@@ -78,6 +83,7 @@ namespace Yi.Framework.Rbac.Domain.Operlog
{
logEntity.RequestResult = result.Content?.Replace("\r\n", "").Trim();
}
if (resultContext.Result is JsonResult result2)
{
logEntity.RequestResult = result2.Value?.ToString();
@@ -92,14 +98,13 @@ namespace Yi.Framework.Rbac.Domain.Operlog
if (operLogAttribute.IsSaveRequestData)
{
//不建议保存,吃性能
//保存请求参数
logEntity.RequestParam = JsonConvert.SerializeObject(context.ActionArguments);
}
using (var uow = _unitOfWorkManager.Begin())
{
await _repository.InsertAsync(logEntity);
}
}
}

View File

@@ -8,6 +8,8 @@ EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ./common.props ./
COPY ["src/Yi.Abp.Web/Yi.Abp.Web.csproj", "src/Yi.Abp.Web/"]
COPY ["framework/Yi.Framework.AspNetCore.Authentication.OAuth/Yi.Framework.AspNetCore.Authentication.OAuth.csproj", "framework/Yi.Framework.AspNetCore.Authentication.OAuth/"]
COPY ["framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.csproj", "framework/Yi.Framework.AspNetCore/"]

View File

@@ -0,0 +1,22 @@
# Docker 构建说明
## 执行命令
```shell
# 在Yi.Abp.Net8 目录下执行
docker build -t admin-server:${BUILD_NUMBER} -f ./src/Yi.Abp.Web/Dockerfile .
```
## 注意
NuGet 源国内访问有时候会报错,可以考虑切换成华为源,加上参数
```shell
RUN dotnet restore --source https://repo.huaweicloud.com/repository/nuget/v3/index.json "./src/Yi.Abp.Web/./Yi.Abp.Web.csproj"
RUN dotnet build --source https://repo.huaweicloud.com/repository/nuget/v3/index.json "./Yi.Abp.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build
RUN dotnet publish --source https://repo.huaweicloud.com/repository/nuget/v3/index.json "./Yi.Abp.Web.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
```

View File

@@ -10,6 +10,10 @@
<ItemGroup>
<PackageReference Include="Hangfire.MemoryStorage" Version="1.8.1.1" />
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.9.4" />
<!-- 解决 docker 构建冲突问题,冲突版本信息如下 -->
<!-- Yi.Abp.Web -> Hangfire.Redis.StackExchange 1.9.4 -> Hangfire.Core (>= 1.8.7) -->
<!-- Yi.Abp.Web -> Yi.Abp.Application -> Yi.Framework.Rbac.Application -> Volo.Abp.BackgroundJobs.HangFire 0.4.1 -> Volo.Abp.HangFire 0.4.1 -> Hangfire.AspNetCore 1.6.19 -> Hangfire.Core (= 1.6.19). -->
<PackageReference Include="Hangfire.Core" Version="1.8.14" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.3" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.3" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />

View File

@@ -1,4 +1,4 @@
using System.Globalization;
using System.Globalization;
using System.Text;
using System.Text.Json.Serialization;
using System.Text.Json.Serialization.Metadata;
@@ -103,10 +103,10 @@ namespace Yi.Abp.Web
var service = context.Services;
//请求日志
Configure<AbpAuditingOptions>(optios =>
Configure<AbpAuditingOptions>(options =>
{
//默认关闭,开启会有大量的审计日志
optios.IsEnabled = true;
options.IsEnabled = true;
});
//忽略审计日志路径
Configure<AbpAspNetCoreAuditingOptions>(options =>

View File

@@ -94,6 +94,7 @@ export const useUserStore = defineStore({
storeData.avatar = resInfo.data.user.icon;
storeData.nickname = resInfo.data.user.nick;
storeData.roles = resInfo.data.roleCodes;
storeData.permissions = resInfo.data.permissions;
setToken(storeData);
resolve(resInfo);
});

View File

@@ -12,7 +12,8 @@ const props = withDefaults(defineProps<FormProps>(), {
configValue: "",
configKey: "",
configType: "",
remark: ""
remark: "",
creationTime: ""
})
});
const ruleFormRef = ref();
@@ -31,35 +32,59 @@ defineExpose({ getRef });
ref="ruleFormRef"
:model="newFormInline"
:rules="formRules"
label-width="82px">
label-width="82px"
>
<el-row :gutter="30">
<re-col :value="12" :xs="24" :sm="24">
<el-form-item label="参数名称" prop="configName">
<el-input v-model="newFormInline.configName" clearable placeholder="请输入参数名称" />
<el-input
v-model="newFormInline.configName"
clearable
placeholder="请输入参数名称"
/>
</el-form-item>
</re-col>
<re-col :value="12" :xs="24" :sm="24">
<el-form-item label="参数键名" prop="configKey">
<el-input v-model="newFormInline.configKey" clearable placeholder="请输入参数键名" />
<el-input
v-model="newFormInline.configKey"
clearable
placeholder="请输入参数键名"
/>
</el-form-item>
</re-col>
<re-col :value="12" :xs="24" :sm="24">
<el-form-item label="参数键值" prop="configValue">
<el-input v-model="newFormInline.configValue" clearable placeholder="请输入参数键值" />
<el-input
v-model="newFormInline.configValue"
clearable
placeholder="请输入参数键值"
/>
</el-form-item>
</re-col>
<re-col :value="12" :xs="24" :sm="24">
<el-form-item label="系统内置">
<el-switch v-model="newFormInline.configType" inline-prompt :active-value="true" :inactive-value="false"
active-text="" inactive-text="" :style="switchStyle" />
<el-switch
v-model="newFormInline.configType"
inline-prompt
:active-value="true"
:inactive-value="false"
active-text=""
inactive-text=""
:style="switchStyle"
/>
</el-form-item>
</re-col>
<re-col>
<el-form-item label="备注" prop="remark">
<el-input v-model="newFormInline.remark" placeholder="请输入备注信息" type="textarea" />
<el-input
v-model="newFormInline.remark"
placeholder="请输入备注信息"
type="textarea"
/>
</el-form-item>
</re-col>
</el-row>

View File

@@ -32,23 +32,46 @@ const {
<template>
<div class="main">
<el-form ref="formRef" :inline="true"
<el-form
ref="formRef"
:inline="true"
:model="form"
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto"
>
<el-form-item label="参数名称:" prop="name">
<el-input v-model="form.configName" placeholder="请输入参数名称" clearable class="!w-[180px]" />
<el-input
v-model="form.configName"
placeholder="请输入参数名称"
clearable
class="!w-[180px]"
/>
</el-form-item>
<el-form-item label="参数键名:" prop="key">
<el-input v-model="form.configKey" placeholder="请输入参数名称" clearable class="!w-[180px]" />
<el-input
v-model="form.configKey"
placeholder="请输入参数名称"
clearable
class="!w-[180px]"
/>
</el-form-item>
<el-form-item label="是否内置:" prop="state">
<el-select v-model="form.configType" placeholder="" clearable class="!w-[180px]">
<el-select
v-model="form.configType"
placeholder=""
clearable
class="!w-[180px]"
>
<el-option label="是" :value="true" />
<el-option label="否" :value="false" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" :icon="useRenderIcon('ri:search-line')" :loading="loading" @click="onSearch">
<el-button
type="primary"
:icon="useRenderIcon('ri:search-line')"
:loading="loading"
@click="onSearch"
>
搜索
</el-button>
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">
@@ -57,9 +80,18 @@ const {
</el-form-item>
</el-form>
<PureTableBar title="参数设置" :columns="columns" :tableRef="tableRef?.getTableRef()" @refresh="onSearch" >
<PureTableBar
title="参数设置"
:columns="columns"
:tableRef="tableRef?.getTableRef()"
@refresh="onSearch"
>
<template #buttons>
<el-button type="primary" :icon="useRenderIcon(AddFill)" @click="openDialog()">
<el-button
type="primary"
:icon="useRenderIcon(AddFill)"
@click="openDialog()"
>
新增参数
</el-button>
</template>
@@ -80,15 +112,31 @@ const {
background: 'var(--el-fill-color-light)',
color: 'var(--el-text-color-primary)'
}"
@selection-change="handleSelectionChange">
@selection-change="handleSelectionChange"
>
<template #operation="{ row }">
<el-button class="reset-margin" link type="primary" :size="size" :icon="useRenderIcon(EditPen)"
@click="openDialog('修改', row)">
<el-button
class="reset-margin"
link
type="primary"
:size="size"
:icon="useRenderIcon(EditPen)"
@click="openDialog('修改', row)"
>
修改
</el-button>
<el-popconfirm :title="`是否确认删除 ? 参数: ${row.configName}`" @confirm="handleDelete(row)">
<el-popconfirm
:title="`是否确认删除 ? 参数: ${row.configName}`"
@confirm="handleDelete(row)"
>
<template #reference>
<el-button class="reset-margin" link type="primary" :size="size" :icon="useRenderIcon(Delete)">
<el-button
class="reset-margin"
link
type="primary"
:size="size"
:icon="useRenderIcon(Delete)"
>
删除
</el-button>
</template>

View File

@@ -1,20 +1,23 @@
import editForm from "../form.vue";
import { handleTree } from "@/utils/tree";
import { message } from "@/utils/message";
import { usePublicHooks } from "../../hooks";
import { addDialog } from "@/components/ReDialog";
import { reactive, ref, onMounted, h, toRaw } from "vue";
import type { FormItemProps } from "../utils/types";
import type { PaginationProps } from "@pureadmin/table";
import { cloneDeep, isAllEmpty, deviceDetection } from "@pureadmin/utils";
import { addConfig, delConfig, getConfig, getConfigList, updateConfig } from "@/api/system/config";
import { getPlatformConfig } from "@/config/index";
import { deviceDetection } from "@pureadmin/utils";
import {
addConfig,
delConfig,
getConfig,
getConfigList,
updateConfig
} from "@/api/system/config";
export function useConfig() {
const form = reactive({
configName: "",
configKey:"",
configType:"",
configKey: "",
configType: ""
});
const pagination = reactive<PaginationProps>({
@@ -36,7 +39,6 @@ export function useConfig() {
const formRef = ref();
const dataList = ref([]);
const loading = ref(true);
const { tagStyle } = usePublicHooks();
const columns: TableColumnList = [
{
@@ -107,7 +109,6 @@ export function useConfig() {
loading.value = false;
}
async function openDialog(title = "新增", row?: FormItemProps) {
let data: any = null;
if (title == "修改") {
@@ -118,11 +119,11 @@ export function useConfig() {
title: `${title}参数`,
props: {
formInline: {
configName:data?.configName?? "",
configKey:data?.configKey?? "",
configValue:data?.configValue?? "",
configTYpe:data?.configType?? "",
remark:data?.remark?? "",
configName: data?.configName ?? "",
configKey: data?.configKey ?? "",
configValue: data?.configValue ?? "",
configTYpe: data?.configType ?? "",
remark: data?.remark ?? ""
}
},
width: "40%",
@@ -146,13 +147,13 @@ export function useConfig() {
// 表单规则校验通过
if (title === "新增") {
// 实际开发先调用新增接口,再进行下面操作
console.log('新增参数');
console.log("新增参数");
await addConfig(curData);
chores();
} else {
// 实际开发先调用修改接口,再进行下面操作
curData.id = row.id
curData.creationTime = row.creationTime
curData.id = row.id;
curData.creationTime = row.creationTime;
await updateConfig(row.id, curData);
chores();
}
@@ -164,7 +165,9 @@ export function useConfig() {
async function handleDelete(row) {
await delConfig([row.id]);
message(`您删除了参数名称为 ${row.configName} 的这条数据`, { type: "success" });
message(`您删除了参数名称为 ${row.configName} 的这条数据`, {
type: "success"
});
onSearch();
}

View File

@@ -5,7 +5,7 @@ interface FormItemProps {
configKey: string;
configType: string;
remark: string;
creationTime:string;
creationTime: string;
}
interface FormProps {
formInline: FormItemProps;

View File

@@ -9,7 +9,7 @@ const props = withDefaults(defineProps<FormProps>(), {
formInline: () => ({
title: "新增",
higherDeptOptions: [],
deptId: "",
deptId: null,
nick: "",
userName: "",
password: "",
@@ -31,6 +31,10 @@ const sexOptions = [
{
value: "Woman",
label: "女"
},
{
value: "Unknown",
label: "未知"
}
];
const ruleFormRef = ref();

View File

@@ -303,13 +303,13 @@ export function useUser(tableRef: Ref, treeRef: Ref) {
const resetForm = formEl => {
if (!formEl) return;
formEl.resetFields();
form.deptId = "";
form.deptId = null;
treeRef.value.onTreeReset();
onSearch();
};
function onTreeSelect({ id, selected }) {
form.deptId = selected ? id : "";
form.deptId = selected ? id : null;
onSearch();
}
@@ -338,13 +338,13 @@ export function useUser(tableRef: Ref, treeRef: Ref) {
formInline: {
title,
higherDeptOptions: formatHigherDeptOptions(higherDeptOptions.value),
deptId: data?.deptId ?? 0,
deptId: data?.deptId ?? null,
nick: data?.nick ?? "",
userName: data?.userName ?? "",
password: data?.password ?? "",
phone: data?.phone ?? "",
phone: data?.phone ?? null,
email: data?.email ?? "",
sex: data?.sex ?? "",
sex: data?.sex ?? "Unknown",
state: data?.state ?? true,
remark: data?.remark ?? "",
roleIds: data?.roles?.map(r => r.id),
@@ -362,7 +362,7 @@ export function useUser(tableRef: Ref, treeRef: Ref) {
const curData = options.props.formInline as FormItemProps;
function chores() {
message(`${title}了用户名称为${curData.userName}这条数据`, {
message(`${title}了用户名称为${curData.userName}用户`, {
type: "success"
});
done(); // 关闭弹框

View File

@@ -8,6 +8,7 @@ export const formRules = reactive(<FormRules>{
userName: [{ required: true, message: "用户名称为必填项", trigger: "blur" }],
password: [{ required: true, message: "用户密码为必填项", trigger: "blur" }],
phone: [
{ required: true, message: "手机号为必填项", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (value === "") {

19
Yi.RuoYi.Vue3/Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM node:18-alpine AS build
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn cache clean
RUN rm -rf node_modules
RUN yarn install --registry=https://registry.npmmirror.com
COPY . .
# RUN node --max-old-space-size=4096
RUN yarn build:prod
FROM nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -0,0 +1,13 @@
# Docker 构建说明
## 执行命令
```shell
# 在Yi.RuoYi.Vue3 目录下执行
docker build -t rouoyi-web:${BUILD_NUMBER} .
```
## 注意
nginx.conf 中替换为自己服务器后端地址

58
Yi.RuoYi.Vue3/nginx.conf Normal file
View File

@@ -0,0 +1,58 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html index.htm;
location /prod-api/ {
# 替换成自己的后端服务地址
proxy_pass http://localhost:19001/api/app/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Authorization $http_authorization;
proxy_set_header Cookie $http_cookie;
}
location /prod-ws/ {
# 替换成自己的后端服务地址
proxy_pass http://localhost:19001/hub/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
# rewrite ^/prod-ws(/.*)$ $1 break;
}
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 1y;
add_header Cache-Control "public, no-transform";
}
}
}

View File

@@ -230,149 +230,8 @@
></el-input>
</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="['system:dict:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:dict:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:dict:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['system:dict:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Close"
@click="handleClose"
>关闭</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="id" />
<el-table-column label="字典标签" align="center" prop="dictLabel">
<template #default="scope">
<span v-if="scope.row.listClass == '' || scope.row.listClass == 'default'">{{ scope.row.dictLabel }}</span>
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass">{{ scope.row.dictLabel }}</el-tag>
</template>
</el-table-column>
<el-table-column label="字典键值" align="center" prop="dictValue" />
<el-table-column label="字典排序" align="center" prop="orderNum" />
<el-table-column label="状态" align="center" prop="state">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.state" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="creationTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.creationTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
<template #default="scope">
<el-button
link
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:edit']"
>修改</el-button>
<el-button
link
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dict:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="Number(total)"
v-model:page="queryParams.skipCount"
v-model:limit="queryParams.maxResultCount"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="dataRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典类型">
<el-input v-model="form.dictType" :disabled="true" />
</el-form-item>
<el-form-item label="数据标签" prop="dictLabel">
<el-input v-model="form.dictLabel" placeholder="请输入数据标签" />
</el-form-item>
<el-form-item label="数据键值" prop="dictValue">
<el-input v-model="form.dictValue" placeholder="请输入数据键值" />
</el-form-item>
<el-form-item label="样式属性" prop="cssClass">
<el-input v-model="form.cssClass" placeholder="请输入样式属性" />
</el-form-item>
<el-form-item label="显示排序" prop="dictSort">
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="回显样式" prop="listClass">
<el-select v-model="form.listClass">
<el-option
v-for="item in listClassOptions"
:key="item.value"
:label="item.label + '(' + item.value + ')'"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-radio-group v-model="form.state">
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :value="JSON.parse(dict.value)">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" 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>