微调
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
v-bind="dialogSmall">
|
||||
<div>
|
||||
<el-form :model="formContent" ref="dialogFormRef" :rules="rules">
|
||||
<el-form-item label="字典类型编码" :label-width="100">
|
||||
<el-input :value="dictTypeCode" disabled/>
|
||||
<el-form-item label="字典类型" :label-width="100">
|
||||
<el-input :value="dictTypeName" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" :label-width="100" prop="name">
|
||||
<el-input v-model="formContent.name" placeholder="请输入" autocomplete="off"/>
|
||||
@@ -44,12 +44,12 @@ const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
||||
})
|
||||
|
||||
const dialogFormRef = ref()
|
||||
const {dialogVisible, titleType, formContent, dictTypeCode} = useMetaInfo();
|
||||
const {dialogVisible, titleType, formContent, dictTypeName} = useMetaInfo();
|
||||
|
||||
function useMetaInfo() {
|
||||
const dialogVisible = ref(false)
|
||||
const titleType = ref('add')
|
||||
const dictTypeCode = ref('')
|
||||
const dictTypeName = ref('')
|
||||
|
||||
const formContent = ref<Dict.ResDictData>({
|
||||
id: "",
|
||||
@@ -62,7 +62,7 @@ function useMetaInfo() {
|
||||
state: 1,
|
||||
})
|
||||
|
||||
return {dialogVisible, titleType, formContent, dictTypeCode};
|
||||
return {dialogVisible, titleType, formContent, dictTypeName};
|
||||
}
|
||||
|
||||
let dialogTitle = computed(() => {
|
||||
@@ -86,12 +86,12 @@ const close = () => {
|
||||
resetFormContent()
|
||||
dialogFormRef.value?.resetFields()
|
||||
}
|
||||
const open = (sign: string, typeId: string, code: string, data: Dict.ResDictData) => {
|
||||
const open = (sign: string, typeId: string, name: string, data: Dict.ResDictData) => {
|
||||
resetFormContent()
|
||||
|
||||
titleType.value = sign
|
||||
formContent.value.typeId = typeId
|
||||
dictTypeCode.value = code
|
||||
dictTypeName.value = name
|
||||
dialogVisible.value = true
|
||||
if (data.id) {
|
||||
formContent.value = {...data}
|
||||
|
||||
Reference in New Issue
Block a user