Browse Source

feat(设备库存): 使用name查询设备类型

master
betaqi 1 month ago
parent
commit
37fa4bd0cc
  1. 12
      src/pages/deviceStorage/components/data-filter.vue

12
src/pages/deviceStorage/components/data-filter.vue

@ -60,18 +60,18 @@
</div> </div>
<div class="item"> <div class="item">
<el-cascader <el-cascader
v-model="filterData.categoryId" v-model="filterData.categoryName"
:options="categoryTreeData" :options="categoryTreeData"
placeholder="请选择设备分类" placeholder="请选择设备分类"
style="width: 100%" style="width: 100%"
:props="{ :props="{
checkStrictly: true, checkStrictly: true,
value: 'id', value: 'name', //! 使: 使id
label: 'name', label: 'name',
emitPath: false, emitPath: false,
}" }"
/> />
<el-checkbox v-model="checkbox.categoryId" size="large" /> <el-checkbox v-model="checkbox.categoryName" size="large" />
</div> </div>
<div class="item item-btn"> <div class="item item-btn">
<EdfsButton <EdfsButton
@ -94,7 +94,7 @@ import { isResError } from '@/hooks/useMessage'
import type { CustomerVO } from '@/api/module/eam/customer' import type { CustomerVO } from '@/api/module/eam/customer'
import { statusList } from '../utils' import { statusList } from '../utils'
import { useMessage } from '@/hooks/useMessage' import { useMessage } from '@/hooks/useMessage'
import { getCategoryTree, ICategoryTree } from "@/api/module/eam/device/category"; import { getCategoryTree, type ICategoryTree } from "@/api/module/eam/device/category";
const locale = zhCn const locale = zhCn
const msg = useMessage() const msg = useMessage()
@ -120,7 +120,7 @@ const filterData = ref({
endDay: '', endDay: '',
status: 3, status: 3,
sn: '', sn: '',
customerId: '', categoryName: '',
}) })
const checkbox = ref<Record<FilterKeys, boolean>>({ const checkbox = ref<Record<FilterKeys, boolean>>({
@ -129,7 +129,7 @@ const checkbox = ref<Record<FilterKeys, boolean>>({
endDay: false, endDay: false,
status: true, status: true,
sn: false, sn: false,
customerId: false, categoryName: false,
}) })
watch( watch(

Loading…
Cancel
Save