<template>
|
<div class="app-container">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
|
<el-form-item label="部署位置" prop="buildingId">
|
<building v-model="queryParams.buildingId" :schoolId="schoolId"></building>
|
</el-form-item>
|
<el-form-item label="部署名称" prop="name">
|
<el-input v-model="queryParams.deploymentName" @keyup.enter.native="handleQuery" placeholder="请输入部署名称" />
|
</el-form-item>
|
<!-- <el-form-item label="所属单位" prop="organizationId">-->
|
<!-- <organization v-model="queryParams.organizationId" :schoolId="schoolId"></organization>-->
|
<!-- </el-form-item>-->
|
<!-- <el-form-item label="施工批次" prop="constructionBatchId">-->
|
<!-- <construction-batch v-model="queryParams.constructionBatchId" :schoolId="schoolId"></construction-batch>-->
|
<!-- </el-form-item>-->
|
<!-- <el-form-item label="型号" prop="model">-->
|
<!-- <el-input-->
|
<!-- v-model="queryParams.model"-->
|
<!-- placeholder="请输入型号"-->
|
<!-- clearable-->
|
<!-- size="small"-->
|
<!-- @keyup.enter.native="handleQuery"-->
|
<!-- />-->
|
<!-- </el-form-item>-->
|
<!-- <el-form-item label="生产厂商" prop="manufacturerId">-->
|
<!-- <manufacturer v-model="queryParams.manufacturerId"></manufacturer>-->
|
<!-- </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="serverList" highlight-current-row
|
@current-change="handleCurrentChange">
|
<el-table-column label="序号" type="index" align="center">
|
<template slot-scope="scope">
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="部署名称" min-width="150" show-overflow-tooltip align="center" prop="deploymentName"/>
|
<el-table-column label="LAN" min-width="150" show-overflow-tooltip align="center" prop="lan"/>
|
<el-table-column label="IP" min-width="150" show-overflow-tooltip align="center" prop="ip"/>
|
<el-table-column label="操作系统" align="center" show-overflow-tooltip min-width="200" prop="operatingSystem">
|
<template slot-scope="scope">
|
<dict-tag :options="dict.type.DICT115" :value="scope.row.operatingSystem"/>
|
</template>
|
</el-table-column>
|
<!-- <el-table-column label="账户" align="center" prop="account" />-->
|
<el-table-column label="部署位置" align="center" show-overflow-tooltip min-width="200" prop="buildingId_dictText"/>
|
<el-table-column label="机柜号" align="center" show-overflow-tooltip prop="cabinetNumber"/>
|
<el-table-column label="机架号" align="center" show-overflow-tooltip prop="rackNumber"/>
|
<el-table-column label="所属单位" align="center" show-overflow-tooltip min-width="200" prop="organizationId_dictText"/>
|
<el-table-column label="施工批次" align="center" show-overflow-tooltip prop="constructionBatchId_dictText"/>
|
<!-- <el-table-column label="序列号" align="center" prop="serialNumber" />-->
|
<el-table-column label="型号" align="center" prop="model" show-overflow-tooltip/>
|
<el-table-column label="生产厂商" align="center" min-width="200" show-overflow-tooltip prop="manufacturerId_dictText"/>
|
<!-- <el-table-column label="性能指标" align="center" prop="performanceIndex" />-->
|
<!-- <el-table-column label="备注" align="center" prop="remarks" />-->
|
<!-- <el-table-column label="附件" align="center" prop="filePath" />-->
|
</el-table>
|
|
<pagination
|
v-show="total>0"
|
:total="total"
|
:page.sync="queryParams.pageNum"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getList"
|
/>
|
</div>
|
</template>
|
|
<script>
|
import {listServer, getServer, delServer, addServer, updateServer} from "@/api/oa/server";
|
import building from "../../components/building";
|
import organization from "../../components/organization";
|
import constructionBatch from "../../components/constructionBatch";
|
import manufacturer from "../../components/manufacturer";
|
import nvr from "../../components/nvr";
|
|
export default {
|
name: "Server",
|
dicts: ['DICT115'],
|
components: {
|
building,
|
organization,
|
constructionBatch,
|
manufacturer,
|
nvr
|
},
|
props: {
|
schoolId: {
|
type: Number,
|
default: undefined
|
}
|
},
|
data() {
|
return {
|
// 按钮loading
|
buttonLoading: false,
|
// 遮罩层
|
loading: true,
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
// 服务器表格数据
|
serverList: [],
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
buildingId: undefined,
|
organizationId: undefined,
|
constructionBatchId: undefined,
|
model: undefined,
|
manufacturerId: undefined,
|
deploymentName: undefined
|
},
|
currentRow: undefined
|
};
|
},
|
created() {
|
this.getList();
|
},
|
methods: {
|
/** 查询服务器列表 */
|
getList() {
|
this.loading = true;
|
listServer(Object.assign({}, this.queryParams, {schoolId: this.schoolId})).then(response => {
|
this.serverList = 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>
|