|
|
@@ -40,7 +40,7 @@
|
|
|
<el-tree-select
|
|
|
v-model="formData.workstationId"
|
|
|
:data="workstationOptions"
|
|
|
- :props="{ label: 'workstationName', value: 'workstationId', children: 'children' }"
|
|
|
+ :props="{ label: 'workstationName', value: 'id', children: 'children' }"
|
|
|
placeholder="请选择岗位"
|
|
|
class="!w-240px"
|
|
|
/>
|
|
|
@@ -126,7 +126,7 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|
|
import { handleTree } from '@/utils/tree'
|
|
|
import * as LockCabinetApi from '@/api/hw/hardware/lockCabinet/index'
|
|
|
import * as HardwareApi from '@/api/hw/hardware/information/index'
|
|
|
-// import * as MarsDeptApi from '@/api/system/marsdept'
|
|
|
+import * as MarsDeptApi from '@/api/system/marsdept/index'
|
|
|
// import * as AutocodeApi from '@/api/system/autocode/rule'
|
|
|
|
|
|
defineOptions({ name: 'LockCabinetForm' })
|
|
|
@@ -244,7 +244,8 @@ const handleSelectHardware = (value: string) => {
|
|
|
const getHardwareList = async () => {
|
|
|
const data = { pageNo: 1, pageSize: -1 }
|
|
|
const response = await HardwareApi.listHardware(data)
|
|
|
- hardwareOptions.value = response.records.map(item => ({
|
|
|
+ console.log(response,'aa')
|
|
|
+ hardwareOptions.value = response.list.map(item => ({
|
|
|
value: item.id,
|
|
|
label: item.hardwareName
|
|
|
}))
|
|
|
@@ -254,7 +255,7 @@ const getHardwareList = async () => {
|
|
|
const getWorkstationList = async () => {
|
|
|
const data = { pageNo: 1, pageSize: -1 }
|
|
|
const response = await MarsDeptApi.listMarsDept(data)
|
|
|
- workstationOptions.value = handleTree(response.records, 'workstationId', 'parentId')
|
|
|
+ workstationOptions.value = handleTree(response.list, 'id', 'parentId')
|
|
|
}
|
|
|
|
|
|
/** 初始化 **/
|