<template>
  <List :params="params">
    <template v-slot:header>
      <el-form-item label="所属架构：">
        <com-select v-model="params.pagging.state.query.deptId" />
      </el-form-item>
      <el-form-item label="S/N码：" v-if="!params.isSwmx">
        <el-input
          v-model="params.pagging.state.query.snCode"
          placeholder="请输入"
        ></el-input>
      </el-form-item>
      <el-form-item label="标题：">
        <el-input v-model="params.keyword" placeholder="请输入"></el-input>
      </el-form-item>
    </template>
    <template v-slot:content>
      <component :is="component" :pagging="params.pagging" />
    </template>
  </List>
</template>

<script setup lang="ts">
import comSelect from "@/components/company-select/index.vue";
import List from "./list.vue";
import SceneContent from "./sceneContent.vue";
import ModelContent from "./modelContent.vue";
import { useScenePaggingParams } from "./pagging";
import { computed } from "vue";

const params = useScenePaggingParams();
const component = computed(() => (params.isSwmx ? ModelContent : SceneContent));
</script>
