|
@@ -4,8 +4,8 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|
|
import * as BomApi from '@/api/pms/bom'
|
|
import * as BomApi from '@/api/pms/bom'
|
|
|
import { CommonBomMaterialApi, CommonBomMaterialVO } from '@/api/pms/commonbommaterial'
|
|
import { CommonBomMaterialApi, CommonBomMaterialVO } from '@/api/pms/commonbommaterial'
|
|
|
import { useTreeStore } from '@/store/modules/treeStore'
|
|
import { useTreeStore } from '@/store/modules/treeStore'
|
|
|
-import { useUserStore } from '@/store/modules/user'
|
|
|
|
|
import BomForm from './BomForm.vue'
|
|
import BomForm from './BomForm.vue'
|
|
|
|
|
+import DeviceCategoryTree from '@/components/DeviceCategoryTree/index.vue'
|
|
|
import MaterialList from '@/views/pms/bom/MaterialList.vue'
|
|
import MaterialList from '@/views/pms/bom/MaterialList.vue'
|
|
|
import MaterialListDrawer from '@/views/pms/bom/MaterialListDrawer.vue'
|
|
import MaterialListDrawer from '@/views/pms/bom/MaterialListDrawer.vue'
|
|
|
|
|
|
|
@@ -23,13 +23,10 @@ const message = useMessage()
|
|
|
const treeStore = useTreeStore()
|
|
const treeStore = useTreeStore()
|
|
|
const { ZmTable, ZmTableColumn } = useTableComponents<BomRow>()
|
|
const { ZmTable, ZmTableColumn } = useTableComponents<BomRow>()
|
|
|
|
|
|
|
|
-const rootDeptId = 156
|
|
|
|
|
-const deptId = useUserStore().getUser.deptId || rootDeptId
|
|
|
|
|
-
|
|
|
|
|
const initQuery: BomApi.BomListTreeReqVO = {
|
|
const initQuery: BomApi.BomListTreeReqVO = {
|
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
- deptId: undefined,
|
|
|
|
|
|
|
+ deviceCategoryId: undefined,
|
|
|
name: undefined,
|
|
name: undefined,
|
|
|
status: undefined
|
|
status: undefined
|
|
|
}
|
|
}
|
|
@@ -119,9 +116,9 @@ const handleCurrentChange = (val: number) => {
|
|
|
getList()
|
|
getList()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const handleDeptNodeClick = async (row: Tree) => {
|
|
|
|
|
|
|
+const handleDeviceCategoryTreeNodeClick = async (row: Tree) => {
|
|
|
clearRowSelection()
|
|
clearRowSelection()
|
|
|
- queryParams.deptId = row.id
|
|
|
|
|
|
|
+ queryParams.deviceCategoryId = row.id
|
|
|
queryParams.pageNo = 1
|
|
queryParams.pageNo = 1
|
|
|
await getList()
|
|
await getList()
|
|
|
}
|
|
}
|
|
@@ -252,13 +249,11 @@ onMounted(() => {
|
|
|
<template>
|
|
<template>
|
|
|
<div
|
|
<div
|
|
|
class="grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
|
|
class="grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
|
|
|
- <DeptTreeSelect
|
|
|
|
|
- :top-id="rootDeptId"
|
|
|
|
|
- :deptId="deptId"
|
|
|
|
|
- v-model="queryParams.deptId"
|
|
|
|
|
|
|
+ <DeviceCategoryTree
|
|
|
|
|
+ v-model="queryParams.deviceCategoryId"
|
|
|
:show-title="false"
|
|
:show-title="false"
|
|
|
- request-api="getSimpleDeptList"
|
|
|
|
|
- class="row-span-2" />
|
|
|
|
|
|
|
+ class="row-span-2"
|
|
|
|
|
+ @node-click="handleDeviceCategoryTreeNodeClick" />
|
|
|
|
|
|
|
|
<el-form
|
|
<el-form
|
|
|
ref="queryFormRef"
|
|
ref="queryFormRef"
|