|
@@ -68,11 +68,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import * as DictDataApi from '@/api/system/dict/dict.data'
|
|
|
-import * as ModelApi from '@/api/pms/model/index'
|
|
|
import { DictDataVO } from '@/api/system/dict/dict.data'
|
|
|
+import * as ModelApi from '@/api/pms/model'
|
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
+import {propTypes} from "@/utils/propTypes";
|
|
|
|
|
|
const emit = defineEmits(['choose']) // 定义 success 事件,用于操作成功后的回调
|
|
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
@@ -82,11 +82,16 @@ const list = ref<DictDataVO[]>([]) // 列表的数据
|
|
|
const total = ref(0) // 列表的总页数
|
|
|
const queryParams = reactive({
|
|
|
pageNo: 1,
|
|
|
+ brand: undefined,
|
|
|
pageSize: 10,
|
|
|
name: '',
|
|
|
status: undefined
|
|
|
})
|
|
|
|
|
|
+const props = defineProps({
|
|
|
+ brand: propTypes.oneOfType<string | string[]>([String, Array<String>]).isRequired,
|
|
|
+})
|
|
|
+
|
|
|
const selectedRow = ref(null)
|
|
|
|
|
|
// 处理单选逻辑
|
|
@@ -101,13 +106,16 @@ const handleRowClick = (row) => {
|
|
|
selectRow(row)
|
|
|
}
|
|
|
const open = async (type: string, id?: number) => {
|
|
|
+ queryParams.brand = props.brand
|
|
|
+ console.log('333333333333'+props.brand)
|
|
|
dialogVisible.value = true
|
|
|
+ await getList()
|
|
|
}
|
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
|
const getList = async () => {
|
|
|
loading.value = true
|
|
|
try {
|
|
|
- const data = await ModelApi.getModelPage(queryParams)
|
|
|
+ const data = await ModelApi.IotModelApi.getIotModelPage(queryParams)
|
|
|
list.value = data.list
|
|
|
total.value = data.total
|
|
|
} finally {
|
|
@@ -130,10 +138,10 @@ const resetQuery = () => {
|
|
|
handleQuery()
|
|
|
}
|
|
|
/** 初始化 **/
|
|
|
-onMounted(async () => {
|
|
|
- await getList()
|
|
|
- // 查询字典(精简)列表
|
|
|
-})
|
|
|
+// onMounted(async () => {
|
|
|
+// await getList()
|
|
|
+// // 查询字典(精简)列表
|
|
|
+// })
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
.no-label-radio .el-radio__label {
|