feat(新增加班申请功能): 新增申请功能,可在工作台进行审核。
fix(dict_data): 在字典数据新增、编辑时可以操作颜色类型字段(color_type)。
This commit is contained in:
@@ -93,6 +93,10 @@ function getDictStatusTagType(status: Api.Dict.DictStatus): UI.ThemeColor {
|
||||
return status === 0 ? 'success' : 'info';
|
||||
}
|
||||
|
||||
function formatColorType(value?: string | null) {
|
||||
return value?.trim() || '--';
|
||||
}
|
||||
|
||||
const dictTypeSearchParams = reactive(getInitDictTypeSearchParams());
|
||||
const dictDataSearchParams = reactive(getInitDictDataSearchParams());
|
||||
|
||||
@@ -177,6 +181,13 @@ const {
|
||||
{ prop: 'index', type: 'index', label: $t('common.index'), width: 64 },
|
||||
{ prop: 'label', label: $t('page.system.dict.dictLabel'), minWidth: 160 },
|
||||
{ prop: 'value', label: $t('page.system.dict.dictValue'), minWidth: 180 },
|
||||
{
|
||||
prop: 'colorType',
|
||||
label: $t('page.system.dict.colorType'),
|
||||
width: 120,
|
||||
align: 'center',
|
||||
formatter: row => formatColorType(row.colorType)
|
||||
},
|
||||
{ prop: 'sort', label: $t('page.system.dict.sort'), width: 90, align: 'center' },
|
||||
{
|
||||
prop: 'status',
|
||||
|
||||
@@ -53,6 +53,7 @@ function createDefaultModel(): Model {
|
||||
label: '',
|
||||
value: '',
|
||||
dictType: '',
|
||||
colorType: '',
|
||||
sort: 0,
|
||||
status: 0,
|
||||
remark: ''
|
||||
@@ -81,6 +82,7 @@ function handleInitModel() {
|
||||
label: props.rowData.label,
|
||||
value: props.rowData.value,
|
||||
dictType: props.rowData.dictType,
|
||||
colorType: props.rowData.colorType ?? '',
|
||||
sort: props.rowData.sort,
|
||||
status: props.rowData.status,
|
||||
remark: props.rowData.remark ?? ''
|
||||
@@ -168,6 +170,11 @@ watch(visible, value => {
|
||||
<ElInput v-model="model.value" :placeholder="$t('page.system.dict.form.dictValue')" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :span="12">
|
||||
<ElFormItem :label="$t('page.system.dict.colorType')" prop="colorType">
|
||||
<ElInput v-model="model.colorType" clearable :placeholder="$t('page.system.dict.form.colorType')" />
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :span="12">
|
||||
<ElFormItem :label="$t('page.system.dict.sort')" prop="sort">
|
||||
<ElInputNumber
|
||||
|
||||
Reference in New Issue
Block a user