skyouc
2025-02-24 ec99136e6a43f0a251b476cf1d4782cf3691ea8c
#修改
字典页修改
9个文件已修改
52 ■■■■ 已修改文件
rsf-admin/src/i18n/en.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/zh.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/basicInfo/companys/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/dictType/DictTypeCreate.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/dictType/DictTypeEdit.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/dictType/DictTypeList.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/dictType/DictTypePanel.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/system/entity/DictType.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/en.js
@@ -343,8 +343,9 @@
                name: "name",
            },
            dictType: {
                name: "name",
                description: "description",
                code: "Code",
                name: "Name",
                description: "Description",
            },
            dictData: {
                dictTypeId: "dictTypeId",
rsf-admin/src/i18n/zh.js
@@ -342,6 +342,7 @@
                name: "名称",
            },
            dictType: {
                code: "字典编码",
                name: "字典名称",
                description: "内容描述",
            },
rsf-admin/src/page/basicInfo/companys/index.jsx
@@ -12,7 +12,7 @@
    list: CompanysList,
    edit: CompanysEdit,
    show: ShowGuesser,
    recordRepresentation: (record) => {
    recordRepresentation: (record) => {0
        return `${record.name}`
    }
};
rsf-admin/src/page/dictType/DictTypeCreate.jsx
@@ -84,6 +84,13 @@
                        </DialogTitle>
                        <DialogContent sx={{ mt: 2 }}>
                            <Grid container rowSpacing={2} columnSpacing={2}>
                            <Grid item xs={6} display="flex" gap={1}>
                                    <TextInput
                                        label="table.field.dictType.code"
                                        source="code"
                                        parse={v => v}
                                    />
                                </Grid>
                                <Grid item xs={6} display="flex" gap={1}>
                                    <TextInput
                                        label="table.field.dictType.name"
rsf-admin/src/page/dictType/DictTypeEdit.jsx
@@ -65,6 +65,13 @@
                        </Typography>
                        <Stack direction='row' gap={2}>
                            <TextInput
                                label="table.field.dictType.code"
                                source="code"
                                parse={v => v}
                            />
                        </Stack>
                        <Stack direction='row' gap={2}>
                            <TextInput
                                label="table.field.dictType.name"
                                source="name"
                                parse={v => v}
rsf-admin/src/page/dictType/DictTypeList.jsx
@@ -63,7 +63,7 @@
    <DateInput label='common.time.after' source="timeStart" alwaysOn />,
    <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
    <TextInput source="uuid" label="table.field.dictType.uuid" />,
    <TextInput source="code" label="table.field.dictType.code" />,
    <TextInput source="name" label="table.field.dictType.name" />,
    <TextInput source="description" label="table.field.dictType.description" />,
@@ -119,6 +119,7 @@
                    omit={['id', 'createTime', 'createBy', 'memo']}
                >
                    <NumberField source="id" />
                    <TextField source="code" label="table.field.dictType.code" />
                    <TextField source="name" label="table.field.dictType.name" />
                    <TextField source="description" label="table.field.dictType.description" />
rsf-admin/src/page/dictType/DictTypePanel.jsx
@@ -40,6 +40,12 @@
                    </Grid>
                    <Box height={20}>&nbsp;</Box>
                    <Grid container spacing={2}>
                    <Grid item xs={6}>
                            <PanelTypography
                                title="table.field.dictType.code"
                                property={record.code}
                            />
                        </Grid>
                        <Grid item xs={6}>
                            <PanelTypography
                                title="table.field.dictType.name" 
rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.vincent.rsf.framework.common.Cools;
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.framework.exception.CoolException;
import com.vincent.rsf.server.common.utils.ExcelUtil;
import com.vincent.rsf.server.common.annotation.OperationLog;
import com.vincent.rsf.server.common.domain.BaseParam;
@@ -56,9 +57,17 @@
    @PostMapping("/dictType/save")
    public R save(@RequestBody DictType dictType) {
        dictType.setCreateBy(getLoginUserId());
        dictType.setCreateTime(new Date());
        dictType.setUpdateBy(getLoginUserId());
        dictType.setUpdateTime(new Date());
        if (Objects.isNull(dictType.getName())) {
            throw new CoolException("字典名称不能为空!!");
        }
        if (Objects.isNull(dictType.getDescription())) {
            throw new CoolException("字典描述不能为空!!");
        }
        if (Objects.isNull(dictType.getCode())) {
            throw new CoolException("字典编码不能为空!!");
        }
        if (!dictTypeService.save(dictType)) {
            return R.error("Save Fail");
        }
rsf-server/src/main/java/com/vincent/rsf/server/system/entity/DictType.java
@@ -37,8 +37,8 @@
    /**
     * 编号
     */
    @ApiModelProperty(value= "编号")
    private String uuid;
    @ApiModelProperty(value= "编码")
    private String code;
    /**
     * 名称
@@ -105,8 +105,8 @@
    public DictType() {}
    public DictType(String uuid,String name,String description,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
        this.uuid = uuid;
    public DictType(String code,String name,String description,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
        this.code = code;
        this.name = name;
        this.description = description;
        this.status = status;