门口门禁-对接后端修改

pet_li_6.6
water_xu 2024-06-04 10:19:57 +08:00
parent 8c492a0a96
commit 8d3e04e9fe
4 changed files with 26 additions and 31 deletions

View File

@ -69,8 +69,8 @@
<el-button type="info" icon="el-icon-location-information" size="mini" @click="handleMap(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" 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="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.VIDEO_RESOURCE_ID)"></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.VIDEO_RESOURCE_ID)"></el-button> <el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="handleDelete(row.GATE_VIDEO_ID)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -99,11 +99,11 @@
<el-form ref="form" :model="form" :rules="rules" label-width="110px" style="width: 500px;"> <el-form ref="form" :model="form" :rules="rules" label-width="110px" style="width: 500px;">
<el-form-item label="视频类型"> <el-form-item label="视频类型">
<el-radio-group v-model="form.VIDEO_TYPE" @change="changeType($event)"> <el-radio-group v-model="form.VIDEO_TYPE" @change="changeType($event)">
<el-radio :label="0">移动摄像头</el-radio> <el-radio :label="1">移动摄像头</el-radio>
<el-radio :label="1">固定摄像头</el-radio> <el-radio :label="2">固定摄像头</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="form.VIDEO_TYPE===0" label="视频监控信息" prop="VIDEO_RESOURCES_ID"> <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-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-select v-model="form.VIDEO_RESOURCES_ID" filterable placeholder="输入可筛选" @change="changeRid($event)">-->
<!-- <el-option--> <!-- <el-option-->
@ -114,14 +114,14 @@
<!-- </el-select>--> <!-- </el-select>-->
</el-form-item> </el-form-item>
<el-form-item v-if="form.VIDEO_TYPE===1" label="视频选择"> <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-button type="success" icon="el-icon-caret-right" size="mini" @click="selectVideo()"></el-button>
</el-form-item> </el-form-item>
<el-form-item label="视频名称" prop="VIDEONAME"> <el-form-item label="视频名称" prop="VIDEONAME">
<el-input :disabled="true" v-model="form.VIDEONAME" placeholder="这里输入视频名称..." /> <el-input :disabled="true" v-model="form.VIDEONAME" placeholder="这里输入视频名称..." />
</el-form-item> </el-form-item>
<el-form-item v-if="form.VIDEO_TYPE===0" label="播放地址" prop="VIDEOURL"> <el-form-item v-if="form.VIDEO_TYPE===1" label="播放地址" prop="VIDEOURL">
<el-input :disabled="true" v-model="form.VIDEOURL" placeholder="这里输入播放地址..." /> <el-input :disabled="true" v-model="form.VIDEOURL" placeholder="这里输入播放地址..." />
</el-form-item> </el-form-item>
@ -529,10 +529,10 @@ export default {
}, },
// //
handleEdit(id) { handleEdit(row) {
this.msg = 'edit' this.msg = 'edit'
this.form.VIDEO_RESOURCE_ID = id this.getData(row)
this.getData() this.form.GATE_VIDEO_ID = row.GATE_VIDEO_ID
this.dialogForm = true this.dialogForm = true
}, },
@ -557,22 +557,24 @@ export default {
}, },
// //
getData() { getData(row) {
this.listLoading = true this.listLoading = true
requestFN( requestFN(
'mkmjGateVideo/getVideo', 'mkmjGateVideo/getVideo',
{ {
VIDEO_RESOURCE_ID: this.form.VIDEO_RESOURCE_ID AREA_GATE_ID: row.AREA_GATE_ID ,
AREA_ID: row.AREA_ID
} }
).then((data) => { ).then((data) => {
Object.assign(this.form, data.pd) Object.assign(this.form, data.pd)
if (this.form.PLATFORMVIDEOMANAGEMENT_ID) { if (this.form.PLATFORMVIDEOMANAGEMENT_ID) {
this.form.VIDEO_TYPE = 1 this.form.VIDEO_TYPE = 2
} else { } else {
if (this.form.VIDEO_RESOURCES_ID) { if (this.form.VIDEO_RESOURCES_ID) {
this.form.VIDEO_TYPE = 0
} else {
this.form.VIDEO_TYPE = 1 this.form.VIDEO_TYPE = 1
} else {
this.form.VIDEO_TYPE = 2
} }
} }
this.VIDEOURL = data.pd.VIDEOURL + '&aspect=600x380' this.VIDEOURL = data.pd.VIDEOURL + '&aspect=600x380'
@ -593,10 +595,9 @@ export default {
requestFN( requestFN(
'/mkmjGateVideo/' + this.msg, '/mkmjGateVideo/' + this.msg,
{ {
VIDEO_RESOURCE_ID: this.form.VIDEO_RESOURCE_ID, VIDEO_RESOURCE_ID: this.form.VIDEO_TYPE === 1 ? this.form.VIDEO_RESOURCES_ID : this.form.PLATFORMVIDEOMANAGEMENT_ID,
VIDEO_RESOURCES_ID: this.form.VIDEO_TYPE === 0 ? this.form.VIDEO_RESOURCES_ID : '',
VIDEONAME: this.form.VIDEONAME, VIDEONAME: this.form.VIDEONAME,
VIDEOURL: this.form.VIDEO_TYPE === 0 ? this.form.VIDEOURL : '', VIDEOURL: this.form.VIDEO_TYPE === 1 ? this.form.VIDEOURL : '',
CODE: this.form.CODE, CODE: this.form.CODE,
LONGITUDE: this.form.LONGITUDE, LONGITUDE: this.form.LONGITUDE,
LATITUDE: this.form.LATITUDE, LATITUDE: this.form.LATITUDE,
@ -604,7 +605,7 @@ export default {
AREA_ID: this.$parent.CAMERA_TYPE === 'area' ? this.$parent.CAMERA_ID : '', AREA_ID: this.$parent.CAMERA_TYPE === 'area' ? this.$parent.CAMERA_ID : '',
AREA_GATE_ID: this.$parent.CAMERA_TYPE === 'equipment' ? 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, DEVICE_TYPE: this.$parent.CAMERA_TYPE === 'area' ? 1 : 2,
PLATFORMVIDEOMANAGEMENT_ID: this.form.VIDEO_TYPE === 1 ? this.form.PLATFORMVIDEOMANAGEMENT_ID : '' GATE_VIDEO_ID: this.form.GATE_VIDEO_ID
} }
).then((data) => { ).then((data) => {
this.listLoading = false this.listLoading = false
@ -626,7 +627,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.listLoading = true this.listLoading = true
console.log(this.VIDEO_RESOURCE_ID) console.log(this.GATE_VIDEO_ID)
requestFN( requestFN(
'/mkmjGateVideo/removeByIds', '/mkmjGateVideo/removeByIds',
{ {
@ -657,7 +658,7 @@ export default {
return false return false
} }
const ids = _selectData.map((item, index) => { const ids = _selectData.map((item, index) => {
return item.VIDEO_RESOURCE_ID return item.GATE_VIDEO_ID
}).join(',') }).join(',')
this.$confirm('确定要删除选中的数据吗?', { this.$confirm('确定要删除选中的数据吗?', {
@ -708,7 +709,7 @@ export default {
if (e === 1) { if (e === 1) {
this.form.VIDEO_TYPE = 1 this.form.VIDEO_TYPE = 1
} else { } else {
this.form.VIDEO_TYPE = 0 this.form.VIDEO_TYPE = 2
} }
this.form.VIDEO_RESOURCES_ID = '' this.form.VIDEO_RESOURCES_ID = ''
this.form.VIDEONAME = '' this.form.VIDEONAME = ''

View File

@ -202,9 +202,7 @@ export default {
PASSAGE_STATUS: [ PASSAGE_STATUS: [
{ required: true, message: '请选择状态', trigger: 'change' } { required: true, message: '请选择状态', trigger: 'change' }
], ],
LONGITUDE: [
{ required: true, message: '请选择位置', trigger: 'change' }
]
} }
}, },
mapDialog: { mapDialog: {

View File

@ -248,9 +248,7 @@ export default {
GATE_POSITION: [ GATE_POSITION: [
{ required: true, message: '请输入闸机位置', trigger: 'blur' } { required: true, message: '请输入闸机位置', trigger: 'blur' }
], ],
LONGITUDE: [
{ required: true, message: '请选择位置', trigger: 'change' }
]
} }
}, },
mapDialog: { mapDialog: {

View File

@ -245,9 +245,7 @@ export default {
AREA_STATUS: [ AREA_STATUS: [
{ required: true, message: '请选择状态', trigger: 'change' } { required: true, message: '请选择状态', trigger: 'change' }
], ],
LONGITUDE: [
{ required: true, message: '请选择位置', trigger: 'change' }
]
} }
}, },
mapDialog: { mapDialog: {