|
|
@@ -11,7 +11,7 @@
|
|
|
<el-tree-select
|
|
|
v-model="formData.locksetTypeId"
|
|
|
:data="locksetTypeOptions"
|
|
|
- :props="{ label: 'locksetTypeName', value: 'locksetTypeId', children: 'children' }"
|
|
|
+ :props="{ label: 'locksetTypeName', value: 'id', children: 'children' }"
|
|
|
placeholder="请选择锁具机构类型"
|
|
|
class="!w-240px"
|
|
|
/>
|
|
|
@@ -95,8 +95,9 @@ import { ref, reactive } from 'vue'
|
|
|
import { handleTree } from '@/utils/tree'
|
|
|
import * as LocksetApi from '@/api/hw/hardware/lockset/index'
|
|
|
import * as LocksetTypeApi from '@/api/hw/type/locksettype/index'
|
|
|
-import {listLocksetType} from "@/api/hw/type/locksettype/index";
|
|
|
-// import * as MaterialApi from '@/api/mes/material/information'
|
|
|
+
|
|
|
+import * as MaterialApi from '@/api/material/information'
|
|
|
+import {getLocksetInfoAPI} from "@/api/hw/hardware/lockset/index";
|
|
|
// import * as AutocodeApi from '@/api/system/autocode/rule'
|
|
|
|
|
|
defineOptions({ name: 'LockForm' })
|
|
|
@@ -142,7 +143,7 @@ const open = async (type: string, id?: number) => {
|
|
|
if (id) {
|
|
|
formLoading.value = true
|
|
|
try {
|
|
|
- formData.value = await LocksetApi.getLockInfoAPI(id)
|
|
|
+ formData.value = await LocksetApi.getLocksetInfoAPI(id)
|
|
|
} finally {
|
|
|
formLoading.value = false
|
|
|
}
|
|
|
@@ -162,10 +163,10 @@ const submitForm = async () => {
|
|
|
try {
|
|
|
const data = formData.value
|
|
|
if (formType.value === 'create') {
|
|
|
- await LocksetApi.addLocksetApi(data)
|
|
|
+ await LocksetApi.addLocksetAPI(data)
|
|
|
message.success(t('common.createSuccess'))
|
|
|
} else {
|
|
|
- await LocksetApi.updateLocksetApi(data)
|
|
|
+ await LocksetApi.updateLocksetAPI(data)
|
|
|
message.success(t('common.updateSuccess'))
|
|
|
}
|
|
|
dialogVisible.value = false
|
|
|
@@ -205,7 +206,7 @@ const resetForm = () => {
|
|
|
const getLockTypeList = async () => {
|
|
|
const data = { pageNo: 1, pageSize: -1 }
|
|
|
const response = await LocksetTypeApi.listLocksetType(data)
|
|
|
- locksetTypeOptions.value = handleTree(response.records, 'locksetTypeId', 'parentTypeId', 'children')
|
|
|
+ locksetTypeOptions.value = handleTree(response.list, 'id', 'parentTypeId', )
|
|
|
}
|
|
|
|
|
|
/** 获取物资列表 */
|