<template>
|
<a-card :bordered="false">
|
<!-- 查询区域 -->
|
<div class="table-page-search-wrapper">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-row :gutter="24">
|
<a-col :xl="4" :md="8" :sm="24">
|
<a-form-item label="摄像头名称">
|
<a-input placeholder="请输入摄像头名称" v-model="queryParam.name"></a-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="4" :md="8" :sm="24">
|
<a-form-item label="厂家">
|
<j-dict-select-tag v-model="queryParam.factory" placeholder="请选择厂家" dictCode="factory"/>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="4" :md="8" :sm="24">
|
<a-form-item label="所属区域">
|
<j-dict-select-tag v-model="queryParam.installAddress" placeholder="请选择所属区域" dictCode="install_address"/>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="4" :md="8" :sm="24">
|
<a-form-item label="状态">
|
<j-dict-select-tag placeholder="请选择状态" v-model="queryParam.status" dictCode="online_status"></j-dict-select-tag>
|
</a-form-item>
|
</a-col>
|
<template v-if="toggleSearchStatus">
|
<!-- 需要展开收起的搜索项可以挪到这里 -->
|
</template>
|
<span style="float: left;overflow: hidden;" class="table-page-search-submit-buttons">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-space>
|
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
<a-button type="primary" @click="handleAdd" icon="plus">新增</a-button>
|
<a-button type="primary" icon="download" @click="handleExportXls('Camera')">导出</a-button>
|
</a-space>
|
</a-col>
|
</span>
|
</a-row>
|
</a-form>
|
</div>
|
|
<!-- 操作按钮区域 -->
|
<div class="table-operator">
|
|
</div>
|
|
<!-- table区域-begin -->
|
<split-pane :min-percent='10' :default-percent='15' split="vertical">
|
<template slot="paneL">
|
<organ-tree ref="orgTree" @on-tree-node-select="onTreeNodeSelect"></organ-tree>
|
</template>
|
<template slot="paneR">
|
<!--<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
|
<!--<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择-->
|
<!--<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>-->
|
<!--项-->
|
<!--<a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
|
<!--<span style="float:right;">-->
|
<!--<a @click="loadData()"><a-icon type="sync" />刷新</a>-->
|
<!--<a-divider type="vertical" />-->
|
<!--</span>-->
|
<!--</div>-->
|
<!--<column-filter v-model="columns" :defaultColumns="defaultColumns"></column-filter>-->
|
<a-table
|
ref="table"
|
size="middle"
|
bordered
|
rowKey="id"
|
:scroll="{x: true}"
|
:columns="defaultColumns"
|
:dataSource="dataSource"
|
:pagination="ipagination"
|
:loading="loading"
|
@change="handleTableChange"
|
>
|
<span slot="action" slot-scope="text, record">
|
<a @click="handleEdit(record)">编辑</a>
|
<a-divider type="vertical" />
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
<a>删除</a>
|
</a-popconfirm>
|
</span>
|
<span slot="status" slot-scope="text, record" :style="{'color': record.status==1?'green':'red'}">
|
{{text}}
|
</span>
|
</a-table>
|
</template>
|
</split-pane>
|
<!-- table区域-end -->
|
|
<!-- 表单区域 -->
|
<camera-modal ref="modalForm" @ok="modalFormOk"></camera-modal>
|
</a-card>
|
</template>
|
|
<script>
|
import CameraModal from './modules/CameraModal'
|
import { JeecgListMixin } from '@tievd/cube-block/lib/mixins/JeecgListMixin'
|
import OrganTree from '../tools/OrganTree'
|
import splitPane from 'vue-splitpane'
|
|
export default {
|
name: 'CameraList',
|
|
mixins: [JeecgListMixin],
|
|
components: {
|
CameraModal,
|
OrganTree,
|
splitPane,
|
},
|
|
data() {
|
return {
|
description: 'Camera列表',
|
// 表头
|
columns: [],
|
// 列定义
|
defaultColumns: [
|
{
|
title: '序号',
|
dataIndex: '',
|
key: 'rowIndex',
|
width: 60,
|
align: 'center',
|
customRender: function(t, r, index) {
|
return parseInt(index) + 1
|
}
|
},
|
{
|
title: '终端ID',
|
align: 'center',
|
dataIndex: 'id',
|
},
|
{
|
title: '终端名称',
|
align: 'center',
|
dataIndex: 'name',
|
},
|
{
|
title: '终端厂家',
|
align: 'center',
|
// dataIndex: 'factory',
|
dataIndex: 'factory_dictText',
|
},
|
{
|
title: '所属网关',
|
align: 'center',
|
dataIndex: 'deviceName',
|
},
|
{
|
title: '所属机构',
|
align: 'center',
|
dataIndex: 'orgName',
|
},
|
{
|
title: '所属区域',
|
align: 'center',
|
dataIndex: 'installAddress_dictText',
|
},
|
{
|
title: '协议类型',
|
align: 'center',
|
dataIndex: 'buttMethod_dictText',
|
},
|
{
|
title: 'IP地址',
|
align: 'center',
|
dataIndex: 'ipAddress',
|
},
|
{
|
title: '状态',
|
align: 'center',
|
dataIndex: 'status_dictText',
|
scopedSlots: { customRender: 'status' }
|
},
|
{
|
title: '创建时间',
|
align: 'center',
|
dataIndex: 'createTime',
|
},
|
{
|
title: '操作',
|
dataIndex: 'action',
|
width: 150,
|
align: 'center',
|
scopedSlots: { customRender: 'action' }
|
}
|
],
|
url: {
|
list: '/jyz/camera/list',
|
delete: '/jyz/camera/delete',
|
deleteBatch: '/jyz/camera/deleteBatch',
|
exportXlsUrl: '/jyz/camera/exportXls',
|
importXlsUrl: '/jyz/camera/importExcel',
|
},
|
selectOrg: '',
|
}
|
},
|
|
methods: {
|
onTreeNodeSelect(id, node) {
|
this.selectOrg = this.queryParam.orgCode = node.selectedNodes[0].data.props.orgCode;
|
console.log(id, this.selectOrg);
|
this.loadData();
|
},
|
showImport() {
|
this.$refs.importModal.show();
|
},
|
getImportXlsUrl() {
|
return window._CONFIG['domianURL'] + this.url.importXlsUrl;
|
},
|
},
|
|
created() {}
|
}
|
</script>
|
<style scoped lang="less">
|
@import '~@assets/less/common.less';
|
</style>
|