Merge remote-tracking branch 'origin/pet_li_6.6' into liujun-2024-06-06-相关方新需求
commit
64e8c9a674
|
@ -0,0 +1,799 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="关键字搜索">
|
||||
<el-input v-model="VIDEONAME" placeholder="搜索关键字" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="视频类型">
|
||||
<el-select v-model="VIDEO_TYPE">
|
||||
<el-option label="移动" value="1"/>
|
||||
<el-option label="平台" value="2"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="VIDEONAME" label="视频名称" >
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.VIDEONAME">{{row.VIDEONAME}}</span>
|
||||
<span v-else>{{row.NAME}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="CODE" label="视频编码" />-->
|
||||
<el-table-column prop="VIDEOURL" label="播放地址" >
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.VIDEOURL">{{row.VIDEOURL}}</span>
|
||||
<span v-else>{{row.REGIONPATH}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="POSITION" label="状态" width="100">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.LATITUDE && row.LONGITUDE">已定位</span>
|
||||
<span v-else>未定位</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="ONLINE_STATUS" label="是否在线" width="100">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.ONLINE_STATUS">{{ row.ONLINE_STATUS }}</span>
|
||||
<span v-else>/</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="left" width="500">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="success" icon="el-icon-caret-right" size="mini" @click="showVideo(row)">播放</el-button>
|
||||
<el-button type="info" icon="el-icon-location-information" size="mini" @click="handleMap(row)">定位</el-button>
|
||||
<el-button v-show="!row.PLATFORMVIDEOMANAGEMENT_ID" type="warning" icon="el-icon-caret-right" size="mini" @click="showVideoBack(row.VIDEOURL)">回放</el-button>
|
||||
<el-button v-show="row.PLATFORMVIDEOMANAGEMENT_ID" type="warning" size="mini" @click="getRTSP(row)">获取rtsp地址</el-button>
|
||||
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="handleDelete(row.GATE_VIDEO_ID)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group" style="margin-bottom: 50px;">
|
||||
<div>
|
||||
<el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
<el-button type="success" icon="el-icon-caret-right" @click="showAll">播放全部</el-button>
|
||||
<el-button icon="el-icon-arrow-left" @click="goBack">返回</el-button>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormMap" title="定位" width="1050px" class="dy-dialog">
|
||||
<div id="map" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<span>经度:</span>
|
||||
<el-input v-model="form.LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled />
|
||||
<span>纬度:</span>
|
||||
<el-input v-model="form.LATITUDE" style="width: 200px" placeholder="请输入内容" disabled />
|
||||
<el-button @click="dialogFormMap = false">取 消</el-button>
|
||||
<el-button type="primary" @click="setPosition">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogForm" :title="msg==='add'?'新增':'编辑'" width="600px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" style="width: 500px;">
|
||||
<el-form-item label="视频类型">
|
||||
<el-radio-group v-model="form.VIDEO_TYPE" @change="changeType($event)">
|
||||
<el-radio :label="1">移动摄像头</el-radio>
|
||||
<el-radio :label="2">固定摄像头</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.VIDEO_TYPE===1" label="视频监控信息" prop="VIDEO_RESOURCES_ID">
|
||||
<el-button type="success" icon="el-icon-caret-right" size="mini" @click="selectBobileVideo()">选择</el-button>
|
||||
<!-- <el-select v-model="form.VIDEO_RESOURCES_ID" filterable placeholder="输入可筛选" @change="changeRid($event)">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in videoResourcesList"-->
|
||||
<!-- :key="item.VIDEO_RESOURCES_ID"-->
|
||||
<!-- :label="item.VIDEONAME"-->
|
||||
<!-- :value="item.VIDEO_RESOURCES_ID"/>-->
|
||||
<!-- </el-select>-->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.VIDEO_TYPE===2" label="视频选择">
|
||||
<el-button type="success" icon="el-icon-caret-right" size="mini" @click="selectVideo()">选择</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="视频名称" prop="VIDEONAME">
|
||||
<el-input :disabled="true" v-model="form.VIDEONAME" placeholder="这里输入视频名称..." />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.VIDEO_TYPE===1" label="播放地址" prop="VIDEOURL">
|
||||
<el-input :disabled="true" v-model="form.VIDEOURL" placeholder="这里输入播放地址..." />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="摄像头编号" prop="CODE">
|
||||
<el-input :disabled="true" v-model="form.CODE" placeholder="这里输入摄像头编号..." />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="back">取 消</el-button>
|
||||
<el-button type="primary" @click="upload">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-if="dialogVideo" :visible.sync="dialogVideo" :show-close="false" title="视频" width="600px">
|
||||
<iframe :src="VIDEOURL" width="100%" height="380" allowfullscreen allow="autoplay; fullscreen;microphone" style="position: relative;border:none"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="back">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-if="dialogVideoHLS" :visible.sync="dialogVideoHLS" :before-close="handleBack" :show-close="false" title="视频" width="600px">
|
||||
<div id="aLiVideoPlayer" class="prism-player"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="back">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-if="dialogVideoBack" :visible.sync="dialogVideoBack" :show-close="false" title="视频回放" width="800px">
|
||||
<iframe :src="VIDEOURL" width="100%" height="620" allowfullscreen allow="autoplay; fullscreen;microphone" style="position: relative;border:none"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="back">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-if="dialogVideoAll" :visible.sync="dialogVideoAll" :before-close="handleBack" :show-close="false" title="视频" width="1200px">
|
||||
<!-- <iframe src="http://192.168.192.121:10800/?menu=no/#/screen" width="100%" height="500px" allowfullscreen allow="autoplay; fullscreen" style="position: relative;border:none"/>-->
|
||||
<div style="display: flex;flex-wrap: wrap;justify-content: space-between">
|
||||
<div v-for="(video,index) in videoList" :key="index" style="margin-bottom: 10px;width: 45%">
|
||||
<iframe v-if="video.GBSVIDEOURL" :src="video.GBSVIDEOURL" width="100%" height="380" allowfullscreen allow="autoplay; fullscreen;microphone" style="position: relative;border:none"/>
|
||||
<div v-if="video.HLSVIDEOURL" :id="'aLiVideoPlayer'+index" class="prism-player"/>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="back">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<platformvideo ref="platformvideo" @handleSelected="handleSelected"/>
|
||||
<BobileCamer ref="bobileCamer" @bobilehandleSelected="bobilehandleSelected"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves'
|
||||
import Platformvideo from '@/views/keyprojects/videomanager/components/platformvideo.vue'
|
||||
import BobileCamer from '@/views/keyprojects/videomanager/components/bobileCamer.vue'
|
||||
|
||||
export default {
|
||||
components: { Platformvideo, Pagination, BobileCamer },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
timer: '',
|
||||
marker: null,
|
||||
BMap: '',
|
||||
clientHeight: 500,
|
||||
inputLocation: '',
|
||||
msg: 'add',
|
||||
config: config,
|
||||
listLoading: true,
|
||||
dialogForm: false,
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
dialogSelect: false,
|
||||
add: true,
|
||||
del: true,
|
||||
edit: true,
|
||||
dialogFormMap: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
VIDEONAME: '',
|
||||
VIDEO_TYPE: '',
|
||||
dates: [],
|
||||
videoList: [],
|
||||
videoResourcesList: [],
|
||||
varList: [],
|
||||
LATITUDE: '',
|
||||
LONGITUDE: '',
|
||||
disabledForm: true,
|
||||
form: {
|
||||
VIDEO_RESOURCE_ID: '',
|
||||
VIDEO_RESOURCES_ID: '',
|
||||
VIDEO_TYPE: 0,
|
||||
VIDEONAME: '', //
|
||||
VIDEOURL: '',
|
||||
CODE: '',
|
||||
PLATFORMVIDEOMANAGEMENT_ID: '',
|
||||
LATITUDE: '',
|
||||
LONGITUDE: ''
|
||||
},
|
||||
zoom: 10,
|
||||
rules: {
|
||||
VIDEONAME: [{ required: true, message: '视频名称不能为空', trigger: 'blur' }],
|
||||
VIDEOURL: [{ required: true, message: '播放地址不能为空', trigger: 'blur' }],
|
||||
VIDEO_RESOURCES_ID: [{ required: true, message: '不能为空', trigger: 'change' }],
|
||||
CODE: [{ required: true, message: '摄像头编号不能为空', trigger: 'blur' }]
|
||||
},
|
||||
dialogVideo: false,
|
||||
dialogVideoHLS: false,
|
||||
dialogVideoBack: false,
|
||||
dialogVideoAll: false,
|
||||
VIDEOURL: '',
|
||||
player: {},
|
||||
playerList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getVideoResourcesSelect()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.map && this.map.removeEventListener('click', this.MapClick)
|
||||
console.log('定时器关闭')
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
// 五分钟关闭视频播放页面定时任务
|
||||
start() {
|
||||
console.log('定时器开启')
|
||||
this.timer = setInterval(this.closeVideoStart, (5 * 60 * 1000)) // 5分钟;
|
||||
},
|
||||
over() {
|
||||
// 定时器手动关闭
|
||||
console.log('定时器自动关闭')
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
closeVideoStart() {
|
||||
this.dialogVideo = false
|
||||
this.dialogVideoHLS = false
|
||||
this.dialogVideoBack = false
|
||||
this.dialogVideoAll = false
|
||||
this.over()
|
||||
},
|
||||
getVideoResourcesSelect() {
|
||||
requestFN(
|
||||
'/videoResources/listAll', {
|
||||
UNITS_ID: this.$parent.UNITS_ID
|
||||
}
|
||||
).then((res) => {
|
||||
this.videoResourcesList = res.varList
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 初始化天地图对象
|
||||
*/
|
||||
initTDT() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (window.T) {
|
||||
console.log('天地图初始化成功...')
|
||||
resolve(window.T)
|
||||
reject('error')
|
||||
}
|
||||
}).then(T => {
|
||||
window.T = T
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 初始化地图
|
||||
* @param {*} lng 经度
|
||||
* @param {*} lat 纬度
|
||||
* @param {*} zoom 缩放比例(1~18)
|
||||
*/
|
||||
initMap(lng, lat, zoom) {
|
||||
this.initTDT().then((T) => {
|
||||
const imageURL = 'http://t0.tianditu.gov.cn/img_w/wmts?' + 'SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles' + '&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce'
|
||||
// 创建自定义图层对象
|
||||
this.lay = new window.T.TileLayer(imageURL, { minZoom: 1, maxZoom: 18 })
|
||||
// 初始化地图对象
|
||||
this.map = new window.T.Map('map')
|
||||
this.initCenter(lng, lat, zoom)
|
||||
})
|
||||
},
|
||||
initCenter(lng, lat, zoom) {
|
||||
// 设置显示地图的中心点和级别
|
||||
if (!this.form.LONGITUDE && !this.form.LATITUDE) {
|
||||
this.map.centerAndZoom(new window.T.LngLat(119.58, 39.94), zoom)
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
} else {
|
||||
this.map.centerAndZoom(new window.T.LngLat(lng, lat), zoom)
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.form.LONGITUDE = lng
|
||||
this.form.LATITUDE = lat
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(lng, lat))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
}
|
||||
// 创建卫星和路网的混合视图
|
||||
this.map.setMapType(window.TMAP_HYBRID_MAP)
|
||||
// 允许鼠标滚轮缩放地图
|
||||
this.map.enableScrollWheelZoom()
|
||||
// 允许鼠标移动地图
|
||||
this.map.enableInertia()
|
||||
// 向地图上添加标注
|
||||
this.map.addEventListener('click', this.MapClick)
|
||||
},
|
||||
MapClick(event) {
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.form.LONGITUDE = event.lnglat.getLng()
|
||||
this.form.LATITUDE = event.lnglat.getLat()
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(event.lnglat.getLng(), event.lnglat.getLat()))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
},
|
||||
handleMap(row) {
|
||||
this.dialogFormMap = true
|
||||
this.VIDEO_RESOURCE_ID = row.VIDEO_RESOURCE_ID
|
||||
this.form = {
|
||||
...this.form,
|
||||
LATITUDE: row.LATITUDE,
|
||||
LONGITUDE: row.LONGITUDE
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (!this.map) this.initMap(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
else this.initCenter(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
})
|
||||
},
|
||||
getRowKey(row) {
|
||||
return row.VIDEO_RESOURCE_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 播放
|
||||
showVideo(row) {
|
||||
// this.$message.warning('单次播放最多五分钟')
|
||||
// this.start()
|
||||
if (!row.PLATFORMVIDEOMANAGEMENT_ID) {
|
||||
this.VIDEOURL = row.VIDEOURL
|
||||
this.dialogVideo = true
|
||||
} else {
|
||||
requestFN(
|
||||
'/platformvideomanagement/getHlsPath',
|
||||
{
|
||||
INDEXCODE: row.INDEXCODE
|
||||
}
|
||||
).then((res) => {
|
||||
this.dialogVideoHLS = true
|
||||
this.$nextTick(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
this.player = new Aliplayer({
|
||||
'id': 'aLiVideoPlayer',
|
||||
'source': res.data.url,
|
||||
'width': '100%',
|
||||
'height': '500px',
|
||||
'autoplay': true,
|
||||
'isLive': true,
|
||||
'rePlay': false,
|
||||
'playsinline': true,
|
||||
'preload': true,
|
||||
'controlBarVisibility': 'hover',
|
||||
'useH5Prism': true
|
||||
}, function(player) {
|
||||
console.log('The player is created')
|
||||
})
|
||||
})
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
this.over()
|
||||
})
|
||||
}
|
||||
},
|
||||
setPosition() {
|
||||
this.dialogFormMap = false
|
||||
this.listLoading = true
|
||||
console.log(132)
|
||||
requestFN(
|
||||
'mkmjGateVideo/getVideo',
|
||||
{
|
||||
VIDEO_RESOURCE_ID: this.VIDEO_RESOURCE_ID
|
||||
}
|
||||
).then((data) => {
|
||||
requestFN(
|
||||
'/mkmjGateVideo/edit',
|
||||
{
|
||||
...data.pd,
|
||||
LATITUDE: this.form.LATITUDE,
|
||||
LONGITUDE: this.form.LONGITUDE,
|
||||
VIDEO_RESOURCE_ID: this.VIDEO_RESOURCE_ID
|
||||
}
|
||||
).then(() => {
|
||||
this.listLoading = false
|
||||
this.dialogForm = false
|
||||
this.getList()
|
||||
}).catch(() => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
getRTSP(row) {
|
||||
requestFN(
|
||||
'/platformvideomanagement/getRtspPath',
|
||||
{
|
||||
INDEXCODE: row.INDEXCODE
|
||||
}
|
||||
).then((res) => {
|
||||
this.notify(res.data.url)
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 回放
|
||||
showVideoBack(path) {
|
||||
this.VIDEOURL = path.replace('play.html', 'playback.html')
|
||||
this.dialogVideoBack = true
|
||||
},
|
||||
|
||||
showAll() {
|
||||
const _selectData = this.$refs.multipleTable.selection
|
||||
if (_selectData == null || _selectData.length == 0) {
|
||||
this.$message({
|
||||
message: '请选中要播放的视频...',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
const ids = _selectData.map((item, index) => {
|
||||
return item.VIDEO_RESOURCE_ID
|
||||
}).join(',')
|
||||
this.videoList = []
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/videomanager/goAllVideo',
|
||||
{
|
||||
DATA_IDS: ids
|
||||
}
|
||||
).then((data) => {
|
||||
this.videoList = data.videoList
|
||||
this.listLoading = false
|
||||
this.dialogVideoAll = true
|
||||
this.playerList = []
|
||||
this.$nextTick(() => {
|
||||
for (let i = 0; i < this.videoList.length; i++) {
|
||||
if (!this.videoList[i].HLSVIDEOURL) continue
|
||||
console.log(this.videoList[i].HLSVIDEOURL.data.url)
|
||||
// eslint-disable-next-line no-undef
|
||||
const player = new Aliplayer({
|
||||
'id': 'aLiVideoPlayer' + i,
|
||||
'source': this.videoList[i].HLSVIDEOURL.data.url,
|
||||
'width': '100%',
|
||||
'height': '500px',
|
||||
'autoplay': true,
|
||||
'isLive': true,
|
||||
'rePlay': false,
|
||||
'playsinline': true,
|
||||
'preload': true,
|
||||
'controlBarVisibility': 'hover',
|
||||
'useH5Prism': true
|
||||
}, function(player) {
|
||||
console.log('The player is created')
|
||||
})
|
||||
this.playerList.push(player)
|
||||
console.log(this.playerList)
|
||||
}
|
||||
})
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjGateVideo/page?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
VIDEONAME: this.VIDEONAME,
|
||||
VIDEO_TYPE: this.VIDEO_TYPE,
|
||||
AREA_ID: this.$parent.CAMERA_TYPE === 'area' ? this.$parent.CAMERA_ID : '',
|
||||
AREA_GATE_ID: this.$parent.CAMERA_TYPE === 'equipment' ? this.$parent.CAMERA_ID : ''
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
// this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.msg = 'add'
|
||||
this.resetForm()
|
||||
this.dialogForm = true
|
||||
},
|
||||
|
||||
// 修改
|
||||
handleEdit(row) {
|
||||
this.msg = 'edit'
|
||||
this.getData(row)
|
||||
this.form.GATE_VIDEO_ID = row.GATE_VIDEO_ID
|
||||
this.dialogForm = true
|
||||
},
|
||||
|
||||
selectVideo(row) {
|
||||
this.$refs.platformvideo.init()
|
||||
},
|
||||
selectBobileVideo() {
|
||||
this.$refs.bobileCamer.init(this.$parent.UNITS_ID)
|
||||
},
|
||||
bobilehandleSelected(row) {
|
||||
this.$set(this.form, 'VIDEOURL', row.VIDEOURL)
|
||||
this.$set(this.form, 'VIDEONAME', row.VIDEONAME)
|
||||
this.$set(this.form, 'CODE', row.CODE)
|
||||
this.$set(this.form, 'VIDEO_RESOURCES_ID', row.VIDEO_RESOURCES_ID)
|
||||
},
|
||||
handleSelected(row) {
|
||||
this.$set(this.form, 'VIDEONAME', row.NAME)
|
||||
this.$set(this.form, 'CODE', row.INDEXCODE)
|
||||
this.$set(this.form, 'LATITUDE', row.LATITUDE)
|
||||
this.$set(this.form, 'LONGITUDE', row.LONGITUDE)
|
||||
this.$set(this.form, 'PLATFORMVIDEOMANAGEMENT_ID', row.PLATFORMVIDEOMANAGEMENT_ID)
|
||||
},
|
||||
|
||||
// 获取详情
|
||||
getData(row) {
|
||||
this.listLoading = true
|
||||
|
||||
requestFN(
|
||||
'mkmjGateVideo/getVideo',
|
||||
{
|
||||
AREA_GATE_ID: row.AREA_GATE_ID ,
|
||||
AREA_ID: row.AREA_ID
|
||||
}
|
||||
).then((data) => {
|
||||
Object.assign(this.form, data.pd)
|
||||
if (this.form.PLATFORMVIDEOMANAGEMENT_ID) {
|
||||
this.form.VIDEO_TYPE = 2
|
||||
} else {
|
||||
if (this.form.VIDEO_RESOURCES_ID) {
|
||||
this.form.VIDEO_TYPE = 1
|
||||
} else {
|
||||
this.form.VIDEO_TYPE = 2
|
||||
}
|
||||
}
|
||||
this.VIDEOURL = data.pd.VIDEOURL + '&aspect=600x380'
|
||||
this.listLoading = false
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
this.$parent.CAMERA_ID = ''
|
||||
this.$parent.activeName = this.$parent.CAMERA_TYPE === 'area' ? 'List' : 'Equipment'
|
||||
},
|
||||
// 保存
|
||||
upload() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjGateVideo/' + this.msg,
|
||||
{
|
||||
VIDEO_RESOURCE_ID: this.form.VIDEO_TYPE === 1 ? this.form.VIDEO_RESOURCES_ID : this.form.PLATFORMVIDEOMANAGEMENT_ID,
|
||||
VIDEONAME: this.form.VIDEONAME,
|
||||
VIDEOURL: this.form.VIDEO_TYPE === 1 ? this.form.VIDEOURL : '',
|
||||
CODE: this.form.CODE,
|
||||
LONGITUDE: this.form.LONGITUDE,
|
||||
LATITUDE: this.form.LATITUDE,
|
||||
VIDEO_TYPE: this.form.VIDEO_TYPE,
|
||||
AREA_ID: this.$parent.CAMERA_TYPE === 'area' ? this.$parent.CAMERA_ID : '',
|
||||
AREA_GATE_ID: this.$parent.CAMERA_TYPE === 'equipment' ? this.$parent.CAMERA_ID : '',
|
||||
DEVICE_TYPE: this.$parent.CAMERA_TYPE === 'area' ? 1 : 2,
|
||||
GATE_VIDEO_ID: this.form.GATE_VIDEO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.dialogForm = false
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
handleDelete(id) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
console.log(this.GATE_VIDEO_ID)
|
||||
requestFN(
|
||||
'/mkmjGateVideo/removeByIds',
|
||||
{
|
||||
GATE_VIDEO_IDS: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
batchDel() {
|
||||
const _selectData = this.$refs.multipleTable.selection
|
||||
if (_selectData == null || _selectData.length == 0) {
|
||||
this.$message({
|
||||
message: '请选中要删除的项...',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
const ids = _selectData.map((item, index) => {
|
||||
return item.GATE_VIDEO_ID
|
||||
}).join(',')
|
||||
|
||||
this.$confirm('确定要删除选中的数据吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/videomanager/deleteAll',
|
||||
{
|
||||
DATA_IDS: ids
|
||||
}
|
||||
).then(() => {
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
var keys = 'videomanager:add,videomanager:del,videomanager:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.videomanagerfhadminadd // 新增权限
|
||||
this.del = data.videomanagerfhadmindel // 删除权限
|
||||
this.edit = data.videomanagerfhadminedit // 修改权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
goKeyReset() {
|
||||
this.VIDEONAME = ''
|
||||
this.VIDEO_TYPE = ''
|
||||
this.getList()
|
||||
},
|
||||
changeType(e) {
|
||||
if (e === 1) {
|
||||
this.form.VIDEO_TYPE = 1
|
||||
} else {
|
||||
this.form.VIDEO_TYPE = 2
|
||||
}
|
||||
this.form.VIDEO_RESOURCES_ID = ''
|
||||
this.form.VIDEONAME = ''
|
||||
this.form.VIDEOURL = ''
|
||||
this.form.CODE = ''
|
||||
},
|
||||
changeRid(e) {
|
||||
console.log(e)
|
||||
this.disabledForm = true
|
||||
requestFN(
|
||||
'/videoResources/findById',
|
||||
{
|
||||
VIDEO_RESOURCES_ID: e
|
||||
}
|
||||
).then((data) => {
|
||||
this.form.VIDEOURL = data.pd.VIDEOURL
|
||||
this.form.VIDEONAME = data.pd.VIDEONAME
|
||||
this.form.CODE = data.pd.CODE
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
back() {
|
||||
console.log('手动关闭定时器')
|
||||
clearInterval(this.timer)
|
||||
if (this.dialogVideo) this.dialogVideo = false
|
||||
if (this.dialogVideoBack) this.dialogVideoBack = false
|
||||
if (this.dialogVideoAll) {
|
||||
this.dialogVideoAll = false
|
||||
for (let i = 0; i < this.playerList.length; i++) {
|
||||
this.playerList[i].dispose()
|
||||
}
|
||||
}
|
||||
if (this.dialogForm) this.dialogForm = false
|
||||
if (this.dialogVideoHLS) {
|
||||
this.dialogVideoHLS = false
|
||||
this.player.dispose()
|
||||
}
|
||||
},
|
||||
|
||||
handleBack() {
|
||||
if (this.dialogVideoAll) {
|
||||
for (let i = 0; i < this.playerList.length; i++) {
|
||||
this.playerList[i].dispose()
|
||||
}
|
||||
this.dialogVideoAll = false
|
||||
}
|
||||
if (this.dialogVideoHLS) {
|
||||
this.player.dispose()
|
||||
this.dialogVideoHLS = false
|
||||
}
|
||||
},
|
||||
|
||||
resetForm() {
|
||||
this.form = {
|
||||
VIDEO_RESOURCE_ID: '',
|
||||
VIDEO_TYPE: 0,
|
||||
VIDEONAME: '', //
|
||||
VIDEOURL: '',
|
||||
CODE: '',
|
||||
PLATFORMVIDEOMANAGEMENT_ID: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.hide .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
#map{
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,428 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
<el-form label-width="50px">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="通道名称:" label-width="110px">
|
||||
<el-input v-model="searchForm.KEYWORDS" style="width:206px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="通道状态" label-width="110px">
|
||||
<el-select v-model="searchForm.PASSAGE_STATUS" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in passageStatusList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="通道类型" label-width="110px">
|
||||
<el-select v-model="searchForm.PASSAGE_TYPE" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in passageTypeList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="PASSAGE_NAME" label="通道名称"/>
|
||||
<el-table-column label="通道类型">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.PASSAGE_TYPE==1">人行通道</span>
|
||||
<span v-if="row.PASSAGE_TYPE==2">车型通道</span>
|
||||
<span v-if="row.PASSAGE_TYPE==3">综合通道</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DEVICE_COUNT" label="设备数"/>
|
||||
<el-table-column label="操作" align="center" width="350px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleAddOrEdit(row.PASSAGE_ID,'edit')"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleDelete(row.PASSAGE_ID,row.PASSAGE_NAME)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAddEquipment(row.PASSAGE_ID)"
|
||||
>
|
||||
添加设备
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAddOrEdit('','add')">新增</el-button>
|
||||
<el-button icon="el-icon-arrow-left" @click="goBack">返回</el-button>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog :visible.sync="addDialog.visible" :title="addDialog.type === 'add' ? '新增' : '修改'">
|
||||
<el-form ref="addFormRef" :model="addDialog.form" :rules="addDialog.rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="通道名称" prop="PASSAGE_NAME">
|
||||
<el-input v-model="addDialog.form.PASSAGE_NAME" placeholder="请输入口门名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="通道类型" prop="PASSAGE_TYPE">
|
||||
<el-select v-model="addDialog.form.PASSAGE_TYPE" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="(item,index) in passageTypeList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="状态" prop="PASSAGE_STATUS">
|
||||
<el-select v-model="addDialog.form.PASSAGE_STATUS" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="(item,index) in passageStatusList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="经纬度" prop="LONGITUDE">
|
||||
<div style="display: flex">
|
||||
<el-input :value="addDialog.form.LONGITUDE + '---' + addDialog.form.LATITUDE" placeholder="请选择" disabled style="flex: 1"/>
|
||||
<el-button style="margin-left: 10px" type="primary" @click="handleMap">点击定位</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="addDialog.visible = false">关闭</el-button>
|
||||
<el-button type="primary" @click="handleAddOrEditSubmit">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="mapDialog.visible" title="定位" width="1050px">
|
||||
<div id="map"/>
|
||||
<template #footer>
|
||||
<span>经度:</span>
|
||||
<el-input v-model="mapDialog.LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled/>
|
||||
<span>纬度:</span>
|
||||
<el-input v-model="mapDialog.LATITUDE" style="width: 200px" placeholder="请输入内容" disabled/>
|
||||
<el-button @click="mapDialog.visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="setPosition">确 定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
components: { Pagination, SelectTree },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
varList: [],
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
searchForm: {
|
||||
KEYWORDS: '',
|
||||
PASSAGE_TYPE: '',
|
||||
PASSAGE_STATUS: ''
|
||||
},
|
||||
total: 0,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
passageStatusList: [
|
||||
{ value: '0', label: '停用' },
|
||||
{ value: '1', label: '正常' },
|
||||
{ value: '2', label: '暂时关闭' }
|
||||
],
|
||||
passageTypeList: [
|
||||
{ value: '1', label: '人行通道' },
|
||||
{ value: '2', label: '车型通道' },
|
||||
{ value: '3', label: '综合通道' }
|
||||
],
|
||||
addDialog: {
|
||||
visible: false,
|
||||
type: '',
|
||||
form: {
|
||||
PASSAGE_NAME: '',
|
||||
PASSAGE_TYPE: '',
|
||||
PASSAGE_STATUS: '',
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
|
||||
LONGITUDE: '',
|
||||
LATITUDE: ''
|
||||
},
|
||||
rules: {
|
||||
PASSAGE_NAME: [
|
||||
{ required: true, message: '请输入通道名称', trigger: 'blur' }
|
||||
],
|
||||
PASSAGE_TYPE: [
|
||||
{ required: true, message: '请选择通道类型', trigger: 'change' }
|
||||
],
|
||||
PASSAGE_STATUS: [
|
||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
||||
],
|
||||
|
||||
}
|
||||
},
|
||||
mapDialog: {
|
||||
visible: false,
|
||||
LONGITUDE: '',
|
||||
LATITUDE: ''
|
||||
},
|
||||
lay: null,
|
||||
map: null,
|
||||
marker: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
// this.hasButton()
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.GATE_MACHINE_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
requestFN(
|
||||
'/mkmjPassage/page?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{ ...this.searchForm, AREA_ID: this.$parent.AREA_ID }
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
// this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
goKeyReset() {
|
||||
this.searchForm.KEYWORDS = ''
|
||||
this.searchForm.PASSAGE_TYPE = ''
|
||||
this.searchForm.PASSAGE_STATUS = ''
|
||||
this.getList()
|
||||
},
|
||||
getDict() {
|
||||
// requestFN(
|
||||
// 'dictionaries/getLevels',
|
||||
// {
|
||||
// DICTIONARIES_ID: '1c73fa2717f2835165104aee234caefe'
|
||||
// }
|
||||
// ).then((data) => {
|
||||
// this.areaRegionList = data.list
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// this.listLoading = false
|
||||
// })
|
||||
},
|
||||
hasButton: function() {
|
||||
var keys = 'fireresources:add,fireresources:del,fireresources:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.fireresourcesfhadminadd // 新增权限
|
||||
this.del = data.fireresourcesfhadmindel // 删除权限
|
||||
this.edit = data.fireresourcesfhadminedit // 修改权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDelete(id, name) {
|
||||
this.$confirm('确定要删除名称为[' + name + ']的通道吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjPassage/removeByIds',
|
||||
{
|
||||
PASSAGE_ID: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
async handleAddOrEdit(PASSAGE_ID, type) {
|
||||
this.addDialog.visible = true
|
||||
this.addDialog.type = type
|
||||
await this.$nextTick()
|
||||
this.$refs.addFormRef.resetFields()
|
||||
if (type === 'edit') {
|
||||
requestFN(
|
||||
'/mkmjPassage/getPassage',
|
||||
{ PASSAGE_ID }
|
||||
).then((data) => {
|
||||
this.addDialog.form = data.pd
|
||||
}).catch((e) => {
|
||||
})
|
||||
}
|
||||
},
|
||||
handleMap() {
|
||||
this.mapDialog.visible = true
|
||||
this.$nextTick(() => {
|
||||
if (!this.map) this.initMap(this.mapDialog.LONGITUDE, this.mapDialog.LATITUDE, 16)
|
||||
else this.initCenter(this.mapDialog.LONGITUDE, this.mapDialog.LATITUDE, 16)
|
||||
})
|
||||
},
|
||||
initTDT() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (window.T) {
|
||||
resolve(window.T)
|
||||
reject('error')
|
||||
}
|
||||
}).then(T => {
|
||||
window.T = T
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 初始化地图
|
||||
* @param {*} lng 经度
|
||||
* @param {*} lat 纬度
|
||||
* @param {*} zoom 缩放比例(1~18)
|
||||
*/
|
||||
initMap(lng, lat, zoom) {
|
||||
this.initTDT().then((T) => {
|
||||
const imageURL = 'http://t0.tianditu.gov.cn/img_w/wmts?' + 'SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles' + '&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce'
|
||||
// 创建自定义图层对象
|
||||
this.lay = new window.T.TileLayer(imageURL, { minZoom: 1, maxZoom: 18 })
|
||||
// 初始化地图对象
|
||||
this.map = new window.T.Map('map')
|
||||
this.initCenter(lng, lat, zoom)
|
||||
})
|
||||
},
|
||||
initCenter(lng, lat, zoom) {
|
||||
// 设置显示地图的中心点和级别
|
||||
if (!this.mapDialog.LONGITUDE && !this.mapDialog.LATITUDE) {
|
||||
this.map.centerAndZoom(new window.T.LngLat(119.58, 39.94), zoom)
|
||||
console.log(123)
|
||||
} else {
|
||||
this.map.centerAndZoom(new window.T.LngLat(lng, lat), zoom)
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.mapDialog.LONGITUDE = lng
|
||||
this.mapDialog.LATITUDE = lat
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(lng, lat))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
}
|
||||
// 创建卫星和路网的混合视图
|
||||
this.map.setMapType(window.TMAP_HYBRID_MAP)
|
||||
// 允许鼠标滚轮缩放地图
|
||||
this.map.enableScrollWheelZoom()
|
||||
// 允许鼠标移动地图
|
||||
this.map.enableInertia()
|
||||
// 向地图上添加标注
|
||||
this.map.addEventListener('click', this.MapClick)
|
||||
},
|
||||
MapClick(event) {
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.mapDialog.LONGITUDE = event.lnglat.getLng()
|
||||
this.mapDialog.LATITUDE = event.lnglat.getLat()
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(event.lnglat.getLng(), event.lnglat.getLat()))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
},
|
||||
setPosition() {
|
||||
this.addDialog.form.LATITUDE = this.mapDialog.LATITUDE
|
||||
this.addDialog.form.LONGITUDE = this.mapDialog.LONGITUDE
|
||||
this.mapDialog.visible = false
|
||||
},
|
||||
handleAddOrEditSubmit() {
|
||||
this.$refs.addFormRef.validate((valid) => {
|
||||
if (valid) {
|
||||
requestFN(
|
||||
'/mkmjPassage/' + this.addDialog.type,
|
||||
{ ...this.addDialog.form, AREA_ID: this.$parent.AREA_ID }
|
||||
).then((data) => {
|
||||
this.addDialog.visible = false
|
||||
this.$message.success('操作成功')
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请填写完整信息')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAddEquipment(PASSAGE_ID) {
|
||||
this.$parent.activeName = 'Equipment'
|
||||
this.$parent.PASSAGE_ID = PASSAGE_ID
|
||||
},
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
this.$parent.AREA_ID = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#map {
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,476 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
<el-form label-width="50px">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="闸机名称:" label-width="110px">
|
||||
<el-input v-model="searchForm.KEYWORDS" style="width:206px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="通道状态" label-width="110px">
|
||||
<el-select v-model="searchForm.GATE_STATUS" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in gateStatusList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="闸机类型" label-width="110px">
|
||||
<el-select v-model="searchForm.GATE_TYPE" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in gateTypeList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="闸机类别" label-width="110px">
|
||||
<el-select v-model="searchForm.GATE_CATEGORY" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in gateCategoryList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="GATE_NAME" label="闸机名称"/>
|
||||
<el-table-column label="闸机类型">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.GATE_TYPE==1">入</span>
|
||||
<span v-if="row.GATE_TYPE==2">出</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="闸机类别">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.GATE_CATEGORY==0">人行口门</span>
|
||||
<span v-if="row.GATE_CATEGORY==1">车行口门</span>
|
||||
<span v-if="row.GATE_CATEGORY==2">综合口门</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="350px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleAddOrEdit(row.AREA_GATE_ID,'edit')"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleDelete(row.AREA_GATE_ID,row.GATE_NAME)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAddCamera(row.AREA_GATE_ID)"
|
||||
>
|
||||
添加摄像头
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAddOrEdit('','add')">新增</el-button>
|
||||
<el-button icon="el-icon-arrow-left" @click="goBack">返回</el-button>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog :visible.sync="addDialog.visible" :title="addDialog.type === 'add' ? '新增' : '修改'">
|
||||
<el-form ref="addFormRef" :model="addDialog.form" :rules="addDialog.rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="闸机名称" prop="GATE_NAME">
|
||||
<el-input v-model="addDialog.form.GATE_NAME" placeholder="请输入口门名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="闸机类型" prop="GATE_TYPE">
|
||||
<el-select v-model="addDialog.form.GATE_TYPE" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="(item,index) in gateTypeList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="状态" prop="GATE_STATUS">
|
||||
<el-select v-model="addDialog.form.GATE_STATUS" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="(item,index) in gateStatusList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="闸机类别" prop="GATE_CATEGORY">
|
||||
<el-select v-model="addDialog.form.GATE_CATEGORY" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="(item,index) in gateCategoryList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="闸机型号" prop="GATE_MODEL">
|
||||
<el-input v-model="addDialog.form.GATE_MODEL" placeholder="请输入口门名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="闸机位置" prop="GATE_POSITION">
|
||||
<el-input v-model="addDialog.form.GATE_POSITION" placeholder="请输入口门名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="经纬度" prop="LONGITUDE">
|
||||
<div style="display: flex">
|
||||
<el-input :value="addDialog.form.LONGITUDE + '---' + addDialog.form.LATITUDE" placeholder="请选择" disabled style="flex: 1"/>
|
||||
<el-button style="margin-left: 10px" type="primary" @click="handleMap">点击定位</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="addDialog.visible = false">关闭</el-button>
|
||||
<el-button type="primary" @click="handleAddOrEditSubmit">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="mapDialog.visible" title="定位" width="1050px">
|
||||
<div id="map"/>
|
||||
<template #footer>
|
||||
<span>经度:</span>
|
||||
<el-input v-model="mapDialog.LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled/>
|
||||
<span>纬度:</span>
|
||||
<el-input v-model="mapDialog.LATITUDE" style="width: 200px" placeholder="请输入内容" disabled/>
|
||||
<el-button @click="mapDialog.visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="setPosition">确 定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
components: { Pagination, SelectTree },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
varList: [],
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
searchForm: {
|
||||
KEYWORDS: '',
|
||||
GATE_TYPE: '',
|
||||
GATE_STATUS: '',
|
||||
GATE_CATEGORY: ''
|
||||
},
|
||||
total: 0,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
gateStatusList: [
|
||||
{ value: 0, label: '停用' },
|
||||
{ value: 1, label: '正常' },
|
||||
{ value: 2, label: '暂时关闭' }
|
||||
],
|
||||
gateTypeList: [
|
||||
{ value: '1', label: '入' },
|
||||
{ value: '2', label: '出' }
|
||||
],
|
||||
gateCategoryList: [
|
||||
{ value: '0', label: '人行口门' },
|
||||
{ value: '1', label: '车行口门' },
|
||||
{ value: '2', label: '综合口门' }
|
||||
],
|
||||
addDialog: {
|
||||
visible: false,
|
||||
type: '',
|
||||
form: {
|
||||
GATE_NAME: '',
|
||||
GATE_TYPE: '',
|
||||
GATE_STATUS: '',
|
||||
GATE_CATEGORY: '',
|
||||
GATE_MODEL: '',
|
||||
GATE_POSITION: '',
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
|
||||
LONGITUDE: '',
|
||||
LATITUDE: ''
|
||||
},
|
||||
rules: {
|
||||
GATE_NAME: [
|
||||
{ required: true, message: '请输入闸机名称', trigger: 'blur' }
|
||||
],
|
||||
GATE_TYPE: [
|
||||
{ required: true, message: '请选择闸机类型', trigger: 'change' }
|
||||
],
|
||||
GATE_STATUS: [
|
||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
||||
],
|
||||
GATE_CATEGORY: [
|
||||
{ required: true, message: '请选择闸机类别', trigger: 'change' }
|
||||
],
|
||||
GATE_MODEL: [
|
||||
{ required: true, message: '请输入闸机型号', trigger: 'blur' }
|
||||
],
|
||||
GATE_POSITION: [
|
||||
{ required: true, message: '请输入闸机位置', trigger: 'blur' }
|
||||
],
|
||||
|
||||
}
|
||||
},
|
||||
mapDialog: {
|
||||
visible: false,
|
||||
LONGITUDE: '',
|
||||
LATITUDE: ''
|
||||
},
|
||||
lay: null,
|
||||
map: null,
|
||||
marker: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
// this.hasButton()
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.GATE_MACHINE_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
requestFN(
|
||||
'/mkmjAreaGate/page?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{ ...this.searchForm, PASSAGE_ID: this.$parent.PASSAGE_ID }
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
// this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
goKeyReset() {
|
||||
this.searchForm.KEYWORDS = ''
|
||||
this.searchForm.GATE_TYPE = ''
|
||||
this.searchForm.GATE_CATEGORY = ''
|
||||
this.searchForm.GATE_STATUS = ''
|
||||
this.getList()
|
||||
},
|
||||
getDict() {
|
||||
// requestFN(
|
||||
// 'dictionaries/getLevels',
|
||||
// {
|
||||
// DICTIONARIES_ID: '1c73fa2717f2835165104aee234caefe'
|
||||
// }
|
||||
// ).then((data) => {
|
||||
// this.areaRegionList = data.list
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// this.listLoading = false
|
||||
// })
|
||||
},
|
||||
hasButton: function() {
|
||||
var keys = 'fireresources:add,fireresources:del,fireresources:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.fireresourcesfhadminadd // 新增权限
|
||||
this.del = data.fireresourcesfhadmindel // 删除权限
|
||||
this.edit = data.fireresourcesfhadminedit // 修改权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDelete(id, name) {
|
||||
this.$confirm('确定要删除名称为[' + name + ']的闸机吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjAreaGate/removeByIds',
|
||||
{
|
||||
AREA_GATE_IDS: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
async handleAddOrEdit(AREA_GATE_ID, type) {
|
||||
this.addDialog.visible = true
|
||||
this.addDialog.type = type
|
||||
await this.$nextTick()
|
||||
this.$refs.addFormRef.resetFields()
|
||||
if (type === 'edit') {
|
||||
requestFN(
|
||||
'/mkmjAreaGate/getGate',
|
||||
{ AREA_GATE_ID }
|
||||
).then((data) => {
|
||||
this.addDialog.form = data.pd
|
||||
}).catch((e) => {
|
||||
})
|
||||
}
|
||||
},
|
||||
handleMap() {
|
||||
this.mapDialog.visible = true
|
||||
this.$nextTick(() => {
|
||||
if (!this.map) this.initMap(this.mapDialog.LONGITUDE, this.mapDialog.LATITUDE, 16)
|
||||
else this.initCenter(this.mapDialog.LONGITUDE, this.mapDialog.LATITUDE, 16)
|
||||
})
|
||||
},
|
||||
initTDT() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (window.T) {
|
||||
resolve(window.T)
|
||||
reject('error')
|
||||
}
|
||||
}).then(T => {
|
||||
window.T = T
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 初始化地图
|
||||
* @param {*} lng 经度
|
||||
* @param {*} lat 纬度
|
||||
* @param {*} zoom 缩放比例(1~18)
|
||||
*/
|
||||
initMap(lng, lat, zoom) {
|
||||
this.initTDT().then((T) => {
|
||||
const imageURL = 'http://t0.tianditu.gov.cn/img_w/wmts?' + 'SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles' + '&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce'
|
||||
// 创建自定义图层对象
|
||||
this.lay = new window.T.TileLayer(imageURL, { minZoom: 1, maxZoom: 18 })
|
||||
// 初始化地图对象
|
||||
this.map = new window.T.Map('map')
|
||||
this.initCenter(lng, lat, zoom)
|
||||
})
|
||||
},
|
||||
initCenter(lng, lat, zoom) {
|
||||
// 设置显示地图的中心点和级别
|
||||
if (!this.mapDialog.LONGITUDE && !this.mapDialog.LATITUDE) {
|
||||
this.map.centerAndZoom(new window.T.LngLat(119.58, 39.94), zoom)
|
||||
console.log(123)
|
||||
} else {
|
||||
this.map.centerAndZoom(new window.T.LngLat(lng, lat), zoom)
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.mapDialog.LONGITUDE = lng
|
||||
this.mapDialog.LATITUDE = lat
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(lng, lat))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
}
|
||||
// 创建卫星和路网的混合视图
|
||||
this.map.setMapType(window.TMAP_HYBRID_MAP)
|
||||
// 允许鼠标滚轮缩放地图
|
||||
this.map.enableScrollWheelZoom()
|
||||
// 允许鼠标移动地图
|
||||
this.map.enableInertia()
|
||||
// 向地图上添加标注
|
||||
this.map.addEventListener('click', this.MapClick)
|
||||
},
|
||||
MapClick(event) {
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.mapDialog.LONGITUDE = event.lnglat.getLng()
|
||||
this.mapDialog.LATITUDE = event.lnglat.getLat()
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(event.lnglat.getLng(), event.lnglat.getLat()))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
},
|
||||
setPosition() {
|
||||
this.addDialog.form.LATITUDE = this.mapDialog.LATITUDE
|
||||
this.addDialog.form.LONGITUDE = this.mapDialog.LONGITUDE
|
||||
this.mapDialog.visible = false
|
||||
},
|
||||
handleAddOrEditSubmit() {
|
||||
this.$refs.addFormRef.validate((valid) => {
|
||||
if (valid) {
|
||||
requestFN(
|
||||
'/mkmjAreaGate/' + this.addDialog.type,
|
||||
{ ...this.addDialog.form, PASSAGE_ID: this.$parent.PASSAGE_ID }
|
||||
).then((data) => {
|
||||
this.addDialog.visible = false
|
||||
this.$message.success('操作成功')
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请填写完整信息')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAddCamera(AREA_GATE_ID) {
|
||||
this.$parent.activeName = 'Camera'
|
||||
this.$parent.CAMERA_ID = AREA_GATE_ID
|
||||
this.$parent.CAMERA_TYPE = 'equipment'
|
||||
},
|
||||
goBack() {
|
||||
this.$parent.activeName = 'Channel'
|
||||
this.$parent.PASSAGE_ID = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#map {
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,473 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
<el-form label-width="50px">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="口门名称:" label-width="110px">
|
||||
<el-input v-model="searchForm.KEYWORDS" style="width:206px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="口门状态" label-width="110px">
|
||||
<el-select v-model="searchForm.AREA_STATUS" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in areaStatusList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="口门类型" label-width="110px">
|
||||
<el-select v-model="searchForm.AREA_TYPE" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in areaTypeList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="所属区域" label-width="110px">
|
||||
<el-select v-model="searchForm.BIANMA" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in areaRegionList" :key="index" :label="item.NAME" :value="item.BIANMA"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="AREA_REGION" label="所属区域"/>
|
||||
<el-table-column prop="AREA_NAME" label="口门名称"/>
|
||||
<el-table-column label="口门类型">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.AREA_TYPE==1">人行口门</span>
|
||||
<span v-if="row.AREA_TYPE==2">车型口门</span>
|
||||
<span v-if="row.AREA_TYPE==3">综合口门</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="地理位置">
|
||||
<template slot-scope="{row}">
|
||||
{{ row.LONGITUDE }}--{{ row.LATITUDE }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="VIDEO_COUNT" label="视频个数"/>
|
||||
<el-table-column label="操作" align="center" width="450px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleAddOrEdit(row.AREA_ID,'edit')"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleDelete(row.AREA_ID,row.AREA_NAME)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAddChannel(row.AREA_ID)"
|
||||
>
|
||||
添加通道
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAddCamera(row.AREA_ID)"
|
||||
>
|
||||
添加摄像头
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAddOrEdit('','add')">新增</el-button>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog :visible.sync="addDialog.visible" :title="addDialog.type === 'add' ? '新增' : '修改'">
|
||||
<el-form ref="addFormRef" :model="addDialog.form" :rules="addDialog.rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="口门名称" prop="AREA_NAME">
|
||||
<el-input v-model="addDialog.form.AREA_NAME" placeholder="请输入口门名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="口门类型" prop="AREA_TYPE">
|
||||
<el-select v-model="addDialog.form.AREA_TYPE" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="(item,index) in areaTypeList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属区域" prop="AREA_PARENT_ID">
|
||||
<el-select v-model="addDialog.form.AREA_PARENT_ID" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="(item,index) in areaRegionList" :key="index" :label="item.NAME" :value="item.BIANMA"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="口门位置" prop="AREA_RANGE">
|
||||
<el-input v-model="addDialog.form.AREA_RANGE" placeholder="请输入口门位置"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="状态" prop="AREA_STATUS">
|
||||
<el-select v-model="addDialog.form.AREA_STATUS" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="(item,index) in areaStatusList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="经纬度" prop="LONGITUDE">
|
||||
<div style="display: flex">
|
||||
<el-input :value="addDialog.form.LONGITUDE + '---' + addDialog.form.LATITUDE" placeholder="请选择" disabled style="flex: 1"/>
|
||||
<el-button style="margin-left: 10px" type="primary" @click="handleMap">点击定位</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="addDialog.visible = false">关闭</el-button>
|
||||
<el-button type="primary" @click="handleAddOrEditSubmit">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="mapDialog.visible" title="定位" width="1050px">
|
||||
<div id="map"/>
|
||||
<template #footer>
|
||||
<span>经度:</span>
|
||||
<el-input v-model="mapDialog.LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled/>
|
||||
<span>纬度:</span>
|
||||
<el-input v-model="mapDialog.LATITUDE" style="width: 200px" placeholder="请输入内容" disabled/>
|
||||
<el-button @click="mapDialog.visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="setPosition">确 定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
components: { Pagination, SelectTree },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
varList: [],
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
searchForm: {
|
||||
KEYWORDS: '',
|
||||
AREA_TYPE: '',
|
||||
AREA_STATUS: '',
|
||||
BIANMA: ''
|
||||
},
|
||||
total: 0,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
areaRegionList: [],
|
||||
areaStatusList: [
|
||||
{ value: '0', label: '停用' },
|
||||
{ value: '1', label: '正常' },
|
||||
{ value: '2', label: '暂时关闭' }
|
||||
],
|
||||
areaTypeList: [
|
||||
{ value: '1', label: '人行口门' },
|
||||
{ value: '2', label: '车型口门' },
|
||||
{ value: '3', label: '综合口门' }
|
||||
],
|
||||
addDialog: {
|
||||
visible: false,
|
||||
type: '',
|
||||
form: {
|
||||
AREA_NAME: '',
|
||||
AREA_RANGE: '',
|
||||
AREA_LEVEL: '1',
|
||||
AREA_PARENT_ID: '',
|
||||
AREA_TYPE: '',
|
||||
AREA_STATUS: '',
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
|
||||
LONGITUDE: '',
|
||||
LATITUDE: ''
|
||||
},
|
||||
rules: {
|
||||
AREA_NAME: [
|
||||
{ required: true, message: '请输入口门名称', trigger: 'blur' }
|
||||
],
|
||||
AREA_TYPE: [
|
||||
{ required: true, message: '请选择口门类型', trigger: 'change' }
|
||||
],
|
||||
AREA_PARENT_ID: [
|
||||
{ required: true, message: '请选择所属区域', trigger: 'change' }
|
||||
],
|
||||
AREA_RANGE: [
|
||||
{ required: true, message: '请输入口门位置', trigger: 'blur' }
|
||||
],
|
||||
AREA_STATUS: [
|
||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
||||
],
|
||||
|
||||
}
|
||||
},
|
||||
mapDialog: {
|
||||
visible: false,
|
||||
LONGITUDE: '',
|
||||
LATITUDE: ''
|
||||
},
|
||||
lay: null,
|
||||
map: null,
|
||||
marker: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
// this.hasButton()
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.GATE_MACHINE_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
requestFN(
|
||||
'/mkmjArea/page?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{ ...this.searchForm }
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
// this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
goKeyReset() {
|
||||
this.searchForm.KEYWORDS = ''
|
||||
this.searchForm.AREA_TYPE = ''
|
||||
this.searchForm.AREA_STATUS = ''
|
||||
this.searchForm.BIANMA = ''
|
||||
this.getList()
|
||||
},
|
||||
getDict() {
|
||||
requestFN(
|
||||
'dictionaries/getLevels',
|
||||
{
|
||||
DICTIONARIES_ID: '1c73fa2717f2835165104aee234caefe'
|
||||
}
|
||||
).then((data) => {
|
||||
this.areaRegionList = data.list
|
||||
})
|
||||
.catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
hasButton: function() {
|
||||
var keys = 'fireresources:add,fireresources:del,fireresources:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.fireresourcesfhadminadd // 新增权限
|
||||
this.del = data.fireresourcesfhadmindel // 删除权限
|
||||
this.edit = data.fireresourcesfhadminedit // 修改权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDelete(id, name) {
|
||||
this.$confirm('确定要删除名称为[' + name + ']的口门吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjArea/removeByIds',
|
||||
{
|
||||
AREA_IDS: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
async handleAddOrEdit(AREA_ID, type) {
|
||||
this.addDialog.visible = true
|
||||
this.addDialog.type = type
|
||||
await this.$nextTick()
|
||||
this.$refs.addFormRef.resetFields()
|
||||
if (type === 'edit') {
|
||||
requestFN(
|
||||
'/mkmjArea/getArea',
|
||||
{ AREA_ID }
|
||||
).then((data) => {
|
||||
this.addDialog.form = data.pd
|
||||
}).catch((e) => {
|
||||
})
|
||||
}
|
||||
},
|
||||
handleMap() {
|
||||
this.mapDialog.visible = true
|
||||
this.$nextTick(() => {
|
||||
if (!this.map) this.initMap(this.mapDialog.LONGITUDE, this.mapDialog.LATITUDE, 16)
|
||||
else this.initCenter(this.mapDialog.LONGITUDE, this.mapDialog.LATITUDE, 16)
|
||||
})
|
||||
},
|
||||
initTDT() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (window.T) {
|
||||
resolve(window.T)
|
||||
reject('error')
|
||||
}
|
||||
}).then(T => {
|
||||
window.T = T
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 初始化地图
|
||||
* @param {*} lng 经度
|
||||
* @param {*} lat 纬度
|
||||
* @param {*} zoom 缩放比例(1~18)
|
||||
*/
|
||||
initMap(lng, lat, zoom) {
|
||||
this.initTDT().then((T) => {
|
||||
const imageURL = 'http://t0.tianditu.gov.cn/img_w/wmts?' + 'SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles' + '&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce'
|
||||
// 创建自定义图层对象
|
||||
this.lay = new window.T.TileLayer(imageURL, { minZoom: 1, maxZoom: 18 })
|
||||
// 初始化地图对象
|
||||
this.map = new window.T.Map('map')
|
||||
this.initCenter(lng, lat, zoom)
|
||||
})
|
||||
},
|
||||
initCenter(lng, lat, zoom) {
|
||||
// 设置显示地图的中心点和级别
|
||||
if (!this.mapDialog.LONGITUDE && !this.mapDialog.LATITUDE) {
|
||||
this.map.centerAndZoom(new window.T.LngLat(119.58, 39.94), zoom)
|
||||
console.log(123)
|
||||
} else {
|
||||
this.map.centerAndZoom(new window.T.LngLat(lng, lat), zoom)
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.mapDialog.LONGITUDE = lng
|
||||
this.mapDialog.LATITUDE = lat
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(lng, lat))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
}
|
||||
// 创建卫星和路网的混合视图
|
||||
this.map.setMapType(window.TMAP_HYBRID_MAP)
|
||||
// 允许鼠标滚轮缩放地图
|
||||
this.map.enableScrollWheelZoom()
|
||||
// 允许鼠标移动地图
|
||||
this.map.enableInertia()
|
||||
// 向地图上添加标注
|
||||
this.map.addEventListener('click', this.MapClick)
|
||||
},
|
||||
MapClick(event) {
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.mapDialog.LONGITUDE = event.lnglat.getLng()
|
||||
this.mapDialog.LATITUDE = event.lnglat.getLat()
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(event.lnglat.getLng(), event.lnglat.getLat()))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
},
|
||||
setPosition() {
|
||||
this.addDialog.form.LATITUDE = this.mapDialog.LATITUDE
|
||||
this.addDialog.form.LONGITUDE = this.mapDialog.LONGITUDE
|
||||
this.mapDialog.visible = false
|
||||
},
|
||||
handleAddOrEditSubmit() {
|
||||
this.$refs.addFormRef.validate((valid) => {
|
||||
if (valid) {
|
||||
requestFN(
|
||||
'/mkmjArea/' + this.addDialog.type,
|
||||
{ ...this.addDialog.form }
|
||||
).then((data) => {
|
||||
this.addDialog.visible = false
|
||||
this.$message.success('操作成功')
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请填写完整信息')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAddChannel(AREA_ID) {
|
||||
this.$parent.activeName = 'Channel'
|
||||
this.$parent.AREA_ID = AREA_ID
|
||||
},
|
||||
handleAddCamera(AREA_ID) {
|
||||
this.$parent.activeName = 'Camera'
|
||||
this.$parent.CAMERA_ID = AREA_ID
|
||||
this.$parent.CAMERA_TYPE = 'area'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#map {
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,33 @@
|
|||
<template>
|
||||
<div>
|
||||
<component :is="activeName" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list.vue'
|
||||
import Channel from './components/channel.vue'
|
||||
import Equipment from './components/equipment.vue'
|
||||
import Camera from './components/camera.vue'
|
||||
export default {
|
||||
components: {
|
||||
List: List,
|
||||
Channel: Channel,
|
||||
Equipment: Equipment,
|
||||
Camera: Camera
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List',
|
||||
AREA_ID: '',
|
||||
PASSAGE_ID: '',
|
||||
CAMERA_TYPE: '',
|
||||
CAMERA_ID: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
:cell-style="getPlateColor"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="vehicle_plate_number" label="车牌号" width="100px" align="center"/>
|
||||
<el-table-column prop="vehicle_category_name" label="车辆类型" width="150px" align="center"/>
|
||||
<el-table-column prop="vehicle_contact_name" label="车辆联系人" width="150ox" align="center"/>
|
||||
<el-table-column prop="vehicle_contact_phone_number" label="联系人手机号" width="120px" align="center"/>
|
||||
<el-table-column prop="vehicle_arrival_barrier" label="入港闸口" align="center"/>
|
||||
<el-table-column prop="vehicle_arrival_time" label="入港时间" align="center"/>
|
||||
<el-table-column prop="vehicle_departure_barrier" label="离港闸口" align="center"/>
|
||||
<el-table-column prop="vehicle_departure_time" label="离港时间" align="center"/>
|
||||
<el-table-column prop="vehicle_arrival_status" label="车辆在港状态" width="100px" align="center"/>
|
||||
<el-table-column prop="vehicle_filing_info_recording_org" label="车辆备案单位" align="center"/>
|
||||
<el-table-column prop="vehicle_filing_method" label="车辆备案方式" width="100px" align="center"/>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
varList: [],
|
||||
pd: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getPlateColor(row , column , rowIndex , columnIndex){
|
||||
if(row.column.label == '车牌号'){
|
||||
switch(row.row.vehicle_plate_color){
|
||||
case '蓝牌':
|
||||
return 'background-color: blue;color: white'
|
||||
break
|
||||
case '黄牌':
|
||||
return 'background-color: yellow;color: black'
|
||||
break
|
||||
case '新能源':
|
||||
return 'background-color: green;color: white'
|
||||
break
|
||||
case '白牌':
|
||||
return 'background-color: gray;color: black'
|
||||
break
|
||||
case '黑牌':
|
||||
return 'background-color: black;color: white'
|
||||
break
|
||||
case '其他':
|
||||
return 'background-color: white;color: black'
|
||||
break
|
||||
default:
|
||||
return 'background-color: white;color: black'
|
||||
}
|
||||
}
|
||||
},
|
||||
getRowKey(row) {
|
||||
return row.id_sequence
|
||||
},
|
||||
|
||||
getQuery() {
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
requestFN(
|
||||
'/mkmjGateLog/page?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
getDict() {
|
||||
requestFN(
|
||||
'/corpinfo/getSelectByCorpInfo',
|
||||
{
|
||||
}
|
||||
).then((data) => {
|
||||
this.corpList = JSON.parse(data.corpInfoJson)
|
||||
}).catch((e) => {
|
||||
})
|
||||
requestFN(
|
||||
'dictionaries/getLevels',
|
||||
{
|
||||
DICTIONARIES_ID: '6bba977985f6427e9d0b52afe8884d1a'
|
||||
}
|
||||
).then((data) => {
|
||||
this.typeData = data.list
|
||||
})
|
||||
.catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.returnBtn {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
display: flex; /**/
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.rightCont {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
</style>
|
|
@ -0,0 +1,23 @@
|
|||
<template>
|
||||
<div>
|
||||
<component :is="activeName" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list.vue'
|
||||
export default {
|
||||
components: {
|
||||
List: List,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List',
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<script>
|
||||
export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<router-view/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,100 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="用户名">
|
||||
<el-input v-model="NAME" placeholder="请输入用户名"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:header-cell-style="{'font-weight': 'bold','color': '#000'}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row>
|
||||
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||
<el-table-column prop="NAME" label="姓名" align="center"/>
|
||||
<el-table-column prop="RELEVANT_UNIT_NAME_HIS" label="原企业" align="center"/>
|
||||
<el-table-column prop="RELEVANT_UNIT_NAME_NOW" label="入住企业" align="center"/>
|
||||
<el-table-column prop="CREATETIME" label="入住时间" align="center"/>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
total: 0,
|
||||
varList: [],
|
||||
NAME: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getQuery() {
|
||||
if (this.$refs.multipleTable) {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
}
|
||||
this.listQuery = {
|
||||
page: 1,
|
||||
limit: 10
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
goKeyReset() {
|
||||
this.NAME = ''
|
||||
this.getQuery()
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/xgf/coerce/getCoerceIntakeLoglistPage?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
NAME: this.NAME
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
})
|
||||
.catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<template>
|
||||
<component :is="activeName" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
export default {
|
||||
components: {
|
||||
List: List
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List',
|
||||
SUPERVISE_CORPINFO_ID: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
Loading…
Reference in New Issue