<template> 
 | 
  <div class="app-container"> 
 | 
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="88px"> 
 | 
      <el-form-item label="通道(路)" prop="passageway"> 
 | 
        <el-select v-model="queryParams.passageway" placeholder="请选择通道(路)"> 
 | 
          <el-option 
 | 
              v-for="dict in dict.type.DICT109" 
 | 
              :key="dict.value" 
 | 
              :label="dict.label" 
 | 
              :value="dict.value" 
 | 
          /> 
 | 
        </el-select> 
 | 
      </el-form-item> 
 | 
      <el-form-item> 
 | 
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> 
 | 
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 
 | 
      </el-form-item> 
 | 
    </el-form> 
 | 
  
 | 
    <el-table v-loading="loading" :data="nvrList" highlight-current-row 
 | 
              @current-change="handleCurrentChange"> 
 | 
      <el-table-column label="序号" align="center" width="50"> 
 | 
        <template slot-scope="scope"> 
 | 
          <span>{{ scope.$index + (queryParams.pageNum - 1) * queryParams.pageSize + 1 }} </span> 
 | 
        </template> 
 | 
      </el-table-column> 
 | 
      <el-table-column label="部署名称" align="center" prop="deploymentName"/> 
 | 
      <el-table-column label="通道(路)" align="center" prop="passageway"/> 
 | 
      <el-table-column label="LAN1" align="center" prop="lanOne"/> 
 | 
      <el-table-column label="IP" align="center" prop="ipOne"/> 
 | 
      <el-table-column label="LAN2" align="center" prop="lanTwo"/> 
 | 
      <el-table-column label="IP" align="center" prop="ipTwo"/> 
 | 
      <el-table-column label="登录账户" align="center" prop="loginAccount"/> 
 | 
      <el-table-column label="硬盘" align="center" prop="hardDisk"/> 
 | 
      <el-table-column label="安装位置" align="center" prop="buildingId"/> 
 | 
      <el-table-column label="所属单位" align="center" prop="organizationId"/> 
 | 
      <!--      <el-table-column label="施工批次" align="center" prop="constructionBatchId" />--> 
 | 
      <!--      <el-table-column label="序列号" align="center" prop="serialNumber" />--> 
 | 
      <!--      <el-table-column label="型号" align="center" prop="model" />--> 
 | 
      <!--      <el-table-column label="生产厂商" align="center" prop="manufacturerId" />--> 
 | 
    </el-table> 
 | 
  
 | 
    <pagination 
 | 
        v-show="total>0" 
 | 
        :total="total" 
 | 
        :page.sync="queryParams.pageNum" 
 | 
        :limit.sync="queryParams.pageSize" 
 | 
        @pagination="getList" 
 | 
    /> 
 | 
  </div> 
 | 
</template> 
 | 
  
 | 
<script> 
 | 
import {listNvr, getNvr, delNvr, addNvr, updateNvr} from "@/api/oa/nvr"; 
 | 
import building from '../../components/building' 
 | 
import organization from '../../components/organization' 
 | 
import constructionBatch from '../../components/constructionBatch' 
 | 
import manufacturer from '../../components/manufacturer' 
 | 
  
 | 
export default { 
 | 
  name: "Nvr", 
 | 
  dicts: ['DICT109'], 
 | 
  components: { 
 | 
    building, 
 | 
    organization, 
 | 
    constructionBatch, 
 | 
    manufacturer 
 | 
  }, 
 | 
  props: { 
 | 
    schoolId: { 
 | 
      type: Number, 
 | 
      default: undefined 
 | 
    } 
 | 
  }, 
 | 
  data() { 
 | 
    return { 
 | 
      // 遮罩层 
 | 
      loading: true, 
 | 
      // 非单个禁用 
 | 
      single: true, 
 | 
      // 非多个禁用 
 | 
      multiple: true, 
 | 
      // 显示搜索条件 
 | 
      showSearch: true, 
 | 
      // 总条数 
 | 
      total: 0, 
 | 
      // NVR设备表格数据 
 | 
      nvrList: [], 
 | 
      // 查询参数 
 | 
      queryParams: { 
 | 
        pageNum: 1, 
 | 
        pageSize: 10, 
 | 
        passageway: undefined, 
 | 
        buildingId: undefined, 
 | 
        organizationId: undefined, 
 | 
        constructionBatchId: undefined, 
 | 
        model: undefined 
 | 
      }, 
 | 
      currentRow: undefined 
 | 
    }; 
 | 
  }, 
 | 
  created() { 
 | 
    this.getList(); 
 | 
  }, 
 | 
  methods: { 
 | 
    /** 查询NVR设备列表 */ 
 | 
    getList() { 
 | 
      this.loading = true; 
 | 
      listNvr(Object.assign({}, this.queryParams, {schoolId: this.schoolId})).then(response => { 
 | 
        this.nvrList = response.rows; 
 | 
        this.total = response.total; 
 | 
        this.loading = false; 
 | 
      }); 
 | 
    }, 
 | 
    /** 搜索按钮操作 */ 
 | 
    handleQuery() { 
 | 
      this.queryParams.pageNum = 1; 
 | 
      this.getList(); 
 | 
    }, 
 | 
    /** 重置按钮操作 */ 
 | 
    resetQuery() { 
 | 
      this.resetForm("queryForm"); 
 | 
      this.handleQuery(); 
 | 
    }, 
 | 
    handleCurrentChange(v) { 
 | 
      this.currentRow = v; 
 | 
    } 
 | 
  } 
 | 
}; 
 | 
</script> 
 |