微调
This commit is contained in:
@@ -18,5 +18,6 @@ VITE_PWA=false
|
|||||||
VITE_API_URL=/api
|
VITE_API_URL=/api
|
||||||
|
|
||||||
# 开发环境跨域代理,支持配置多个
|
# 开发环境跨域代理,支持配置多个
|
||||||
# VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
|
VITE_PROXY=[["/api","http://192.168.1.122:18092/"]]
|
||||||
VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]
|
# VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
|
||||||
|
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
v-bind="dialogSmall">
|
v-bind="dialogSmall">
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="formContent" ref="dialogFormRef" :rules="rules">
|
<el-form :model="formContent" ref="dialogFormRef" :rules="rules">
|
||||||
<el-form-item label="字典类型编码" :label-width="100">
|
<el-form-item label="字典类型" :label-width="100">
|
||||||
<el-input :value="dictTypeCode" disabled/>
|
<el-input :value="dictTypeName" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="名称" :label-width="100" prop="name">
|
<el-form-item label="名称" :label-width="100" prop="name">
|
||||||
<el-input v-model="formContent.name" placeholder="请输入" autocomplete="off"/>
|
<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 dialogFormRef = ref()
|
||||||
const {dialogVisible, titleType, formContent, dictTypeCode} = useMetaInfo();
|
const {dialogVisible, titleType, formContent, dictTypeName} = useMetaInfo();
|
||||||
|
|
||||||
function useMetaInfo() {
|
function useMetaInfo() {
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const titleType = ref('add')
|
const titleType = ref('add')
|
||||||
const dictTypeCode = ref('')
|
const dictTypeName = ref('')
|
||||||
|
|
||||||
const formContent = ref<Dict.ResDictData>({
|
const formContent = ref<Dict.ResDictData>({
|
||||||
id: "",
|
id: "",
|
||||||
@@ -62,7 +62,7 @@ function useMetaInfo() {
|
|||||||
state: 1,
|
state: 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
return {dialogVisible, titleType, formContent, dictTypeCode};
|
return {dialogVisible, titleType, formContent, dictTypeName};
|
||||||
}
|
}
|
||||||
|
|
||||||
let dialogTitle = computed(() => {
|
let dialogTitle = computed(() => {
|
||||||
@@ -86,12 +86,12 @@ const close = () => {
|
|||||||
resetFormContent()
|
resetFormContent()
|
||||||
dialogFormRef.value?.resetFields()
|
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()
|
resetFormContent()
|
||||||
|
|
||||||
titleType.value = sign
|
titleType.value = sign
|
||||||
formContent.value.typeId = typeId
|
formContent.value.typeId = typeId
|
||||||
dictTypeCode.value = code
|
dictTypeName.value = name
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
if (data.id) {
|
if (data.id) {
|
||||||
formContent.value = {...data}
|
formContent.value = {...data}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const proTable = ref<ProTableInstance>()
|
|||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
//字典数据所属的字典类型Id
|
//字典数据所属的字典类型Id
|
||||||
const dictTypeId = ref('')
|
const dictTypeId = ref('')
|
||||||
const dictTypeCode = ref('')
|
const dictTypeName = ref('')
|
||||||
|
|
||||||
|
|
||||||
const initParam = reactive({typeId: ''})
|
const initParam = reactive({typeId: ''})
|
||||||
@@ -113,7 +113,7 @@ const columns = reactive<ColumnProps<Dict.ResDictData>[]>([
|
|||||||
const open = (row: Dict.ResDictType) => {
|
const open = (row: Dict.ResDictType) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
dictTypeId.value = row.id
|
dictTypeId.value = row.id
|
||||||
dictTypeCode.value = row.code
|
dictTypeName.value = row.name
|
||||||
initParam.typeId = row.id
|
initParam.typeId = row.id
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ defineExpose({open})
|
|||||||
|
|
||||||
// 打开 dialog(新增、查看、编辑)
|
// 打开 dialog(新增、查看、编辑)
|
||||||
const openDialog = (titleType: string, row: Partial<Dict.ResDictData> = {}) => {
|
const openDialog = (titleType: string, row: Partial<Dict.ResDictData> = {}) => {
|
||||||
dataPopup.value?.open(titleType, dictTypeId.value, dictTypeCode.value, row)
|
dataPopup.value?.open(titleType, dictTypeId.value, dictTypeName.value, row)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 批量删除字典数据
|
// 批量删除字典数据
|
||||||
|
|||||||
Reference in New Issue
Block a user