优化更新

This commit is contained in:
2026-09-13 18:12:07 +08:00
parent 7f758cc6e9
commit d7a081e8b7
92 changed files with 2429 additions and 1117 deletions
@@ -181,23 +181,23 @@ export function getDictItemByCode(code) {
```typescript
// src/views/system/param/columns.ts
{
label: '参数类型',
prop: 'type',
title: '参数类型',
key: 'type',
width: 100,
render(record) {
return h(ElTag,
{ type: record.row.type == 0 ? 'primary' : 'warning' },
{ default: () => record.row.type == 0 ? '系统' : '业务' });
return h(NTag,
{ bordered: false, type: record.type == 0 ? 'info' : 'warning' },
{ default: () => record.type == 0 ? '系统' : '业务' });
},
},
{
label: '状态',
prop: 'status',
title: '状态',
key: 'status',
width: 100,
render(record) {
return h(ElTag,
{ type: record.row.status == 1 ? 'success' : 'danger' },
{ default: () => record.row.status == 1 ? '正常' : '禁用' });
return h(NTag,
{ bordered: false, type: record.status == 1 ? 'success' : 'error' },
{ default: () => record.status == 1 ? '正常' : '禁用' });
},
},
```
@@ -218,8 +218,8 @@ const options = [
// 业务字段为数字
formData.type = 0;
// el-option 绑定时需要转换
<el-option :value="Number(item.value)" />
// n-select 的 options 中 value 为字符串,后端需要数字时需转换
// options: [{ label: '业务', value: 1 }] 直接使用数字
```
搜索表单中的 `options` 的 `value` 为字符串 `'0'`/`'1'`,后端筛选字段期望数字。前端 API 传参时自动转换。