diff --git a/src/views/mes/dv/machinery/MachineryTypeTree.vue b/src/views/mes/dv/machinery/MachineryTypeTree.vue
new file mode 100644
index 000000000..e366c2b93
--- /dev/null
+++ b/src/views/mes/dv/machinery/MachineryTypeTree.vue
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mes/dv/machinery/index.vue b/src/views/mes/dv/machinery/index.vue
index ae9603994..0dd652db1 100644
--- a/src/views/mes/dv/machinery/index.vue
+++ b/src/views/mes/dv/machinery/index.vue
@@ -1,145 +1,141 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
- 新增
-
-
- 导出
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+ 导出
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
@@ -149,10 +145,9 @@
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { DvMachineryApi, DvMachineryVO } from '@/api/mes/dv/machinery'
-import { DvMachineryTypeApi } from '@/api/mes/dv/machinery/type'
import { MdWorkshopApi, MdWorkshopVO } from '@/api/mes/md/workstation/workshop'
-import { defaultProps, handleTree } from '@/utils/tree'
import MachineryForm from './MachineryForm.vue'
+import MachineryTypeTree from './MachineryTypeTree.vue'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
defineOptions({ name: 'MesDvMachinery' })
@@ -174,7 +169,6 @@ const queryParams = reactive({
})
const queryFormRef = ref() // 搜索的表单
const exportLoading = ref(false) // 导出的加载中
-const machineryTypeTree = ref([]) // 设备类型树
const workshopList = ref([]) // 车间列表
/** 查询列表 */
@@ -198,6 +192,13 @@ const handleQuery = () => {
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
+ queryParams.machineryTypeId = undefined
+ handleQuery()
+}
+
+/** 处理分类树节点点击 */
+const handleTypeNodeClick = (row: any) => {
+ queryParams.machineryTypeId = row?.id
handleQuery()
}
@@ -240,9 +241,6 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(async () => {
await getList()
- // 加载设备类型树
- const typeData = await DvMachineryTypeApi.getMachineryTypeSimpleList()
- machineryTypeTree.value = handleTree(typeData)
// 加载车间列表
workshopList.value = await MdWorkshopApi.getWorkshopSimpleList()
})