|
|
@@ -18,9 +18,9 @@
|
|
|
<div class="l-flex--row c-table__header">
|
|
|
<div class="l-flex__auto c-sibling-item">
|
|
|
<button
|
|
|
- v-if="canEdit"
|
|
|
+ v-if="isSuperAdmin"
|
|
|
class="o-button"
|
|
|
- @click="addbtn"
|
|
|
+ @click="onAdd"
|
|
|
>
|
|
|
<i class="o-button__icon el-icon-circle-plus-outline" />新增
|
|
|
</button>
|
|
|
@@ -71,16 +71,16 @@
|
|
|
</div>
|
|
|
<div class="o-video_buttom l-flex--row">
|
|
|
<div class="l-flex__auto">{{ video.name }}</div>
|
|
|
- <template v-if="canEdit">
|
|
|
+ <template v-if="isSuperAdmin">
|
|
|
<img
|
|
|
class="o-video_edit"
|
|
|
:src="imgUrl.edit"
|
|
|
- @click.stop="editbtn(video)"
|
|
|
+ @click.stop="onEdit(video)"
|
|
|
>
|
|
|
<img
|
|
|
class="o-video_delete"
|
|
|
:src="imgUrl.delete"
|
|
|
- @click.stop="deletebtn(video)"
|
|
|
+ @click.stop="onDel(video)"
|
|
|
>
|
|
|
</template>
|
|
|
</div>
|
|
|
@@ -99,66 +99,6 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
- <!-- <el-tab-pane label="视频回传" name="second">
|
|
|
- <div class="has-padding">
|
|
|
- <div class="l-flex--row c-table__header">
|
|
|
- <div class="l-flex__auto c-sibling-item">
|
|
|
- <el-checkbox-group v-model="checkList" @change="chechChange">
|
|
|
- <el-checkbox label="视频回采"></el-checkbox>
|
|
|
- <el-checkbox label="模拟终端"></el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
- </div>
|
|
|
- <div class="l-flex__none c-sibling-item">
|
|
|
- <img
|
|
|
- class="c-sibling-item"
|
|
|
- @click="rowChange(24)"
|
|
|
- :src="require('@/assets/icon_one_normal.png')"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- <img
|
|
|
- class="c-sibling-item"
|
|
|
- @click="rowChange(12)"
|
|
|
- :src="require('@/assets/icon_four_normal.png')"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- <img
|
|
|
- class="c-sibling-item"
|
|
|
- @click="rowChange(8)"
|
|
|
- :src="require('@/assets/icon_nine_focus.png')"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- </div>
|
|
|
- <button
|
|
|
- class="l-flex__none c-sibling-item o-button"
|
|
|
- @click="search"
|
|
|
- >
|
|
|
- <i class="o-button__icon el-icon-full-screen" />
|
|
|
- 全屏
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <el-row :gutter="16" class="rowheight">
|
|
|
- <el-col
|
|
|
- :span="rowNum"
|
|
|
- v-for="(item, index) in returnList.list"
|
|
|
- :key="index"
|
|
|
- class="cameraRow"
|
|
|
- >
|
|
|
- <div class="return_item bg-purple"
|
|
|
- ref="returnB"
|
|
|
- :style="{ height: returnheight }">
|
|
|
- <div class="o-video_buttom l-flex--row">
|
|
|
- <div class="l-flex__auto">{{ item.name }}</div>
|
|
|
- <img
|
|
|
- :src="require('@/assets/icon_address.png')"
|
|
|
- class="o-video_edit"
|
|
|
- />
|
|
|
- <div class="return_local">{{ item.name }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </el-tab-pane> -->
|
|
|
</el-tabs>
|
|
|
<!-- 新增和编辑 -->
|
|
|
<el-dialog
|
|
|
@@ -265,6 +205,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
import flvjs from 'flv.js'
|
|
|
import {
|
|
|
getCamera,
|
|
|
@@ -290,9 +231,7 @@ export default {
|
|
|
edit: require('@/assets/icon_edit.png'),
|
|
|
delete: require('@/assets/icon_delete.png')
|
|
|
},
|
|
|
- videoOption: createListOptions({
|
|
|
- pageSize: 6
|
|
|
- }),
|
|
|
+ videoOption: createListOptions({ pageSize: 6 }),
|
|
|
dialogTitle: '新增',
|
|
|
adding: false,
|
|
|
camera: {
|
|
|
@@ -314,20 +253,11 @@ export default {
|
|
|
editOption: {},
|
|
|
detailing: false,
|
|
|
videoheight: '',
|
|
|
- playerList: {},
|
|
|
-
|
|
|
- checkList: [],
|
|
|
- returnList: createListOptions({
|
|
|
- pageSize: 9
|
|
|
- }),
|
|
|
- returnheight: 0,
|
|
|
- rowNum: 8
|
|
|
+ playerList: {}
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- canEdit () {
|
|
|
- return this.accessSet.has(this.Access.MANAGE_DEVICES)
|
|
|
- }
|
|
|
+ ...mapGetters(['isSuperAdmin'])
|
|
|
},
|
|
|
created () {
|
|
|
this.getCamera()
|
|
|
@@ -336,19 +266,9 @@ export default {
|
|
|
this.destroyPlayer()
|
|
|
},
|
|
|
methods: {
|
|
|
- rowChange (num) {
|
|
|
- this.rowNum = num
|
|
|
- this.$nextTick(() => {
|
|
|
- this.returnheight = (this.$refs.returnB[0].clientWidth * 9) / 16 + 'px'
|
|
|
- })
|
|
|
- },
|
|
|
- chechChange (val) {
|
|
|
- console.log(val)
|
|
|
- },
|
|
|
destroyPlayer () {
|
|
|
for (const key in this.playerList) {
|
|
|
if (Object.hasOwnProperty.call(this.playerList, key)) {
|
|
|
- // const element = object[key];
|
|
|
if (this.playerList[key]) {
|
|
|
this.playerList[key].pause()
|
|
|
this.playerList[key].unload()
|
|
|
@@ -373,25 +293,13 @@ export default {
|
|
|
({ data, totalCount }) => {
|
|
|
options.totalCount = totalCount
|
|
|
options.list = data
|
|
|
- // for (let i = 0; i < 34; i++) {
|
|
|
- // data.push({
|
|
|
- // deviceId: Math.random(),
|
|
|
- // })
|
|
|
- // }
|
|
|
- this.$nextTick(() => {
|
|
|
- this.videoheight =
|
|
|
- (this.$refs.videoB[0].clientWidth * 9) / 16 + 'px'
|
|
|
+ options.totalCount && this.$nextTick(() => {
|
|
|
+ this.videoheight = (this.$refs.videoB[0].clientWidth * 9) / 16 + 'px'
|
|
|
this.destroyPlayer()
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
if (options.list[i].online) {
|
|
|
this.getflv(options.list[i].deviceId)
|
|
|
}
|
|
|
- // getOnline(options.list[i].deviceId).then(({ data }) => {
|
|
|
- // options.list[i].online = data
|
|
|
- // if (data) {
|
|
|
- // this.getflv(options.list[i].deviceId)
|
|
|
- // }
|
|
|
- // })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -416,7 +324,7 @@ export default {
|
|
|
this.getCamera()
|
|
|
})
|
|
|
},
|
|
|
- addbtn () {
|
|
|
+ onAdd () {
|
|
|
this.camera = {
|
|
|
name: '',
|
|
|
deviceId: '',
|
|
|
@@ -446,7 +354,7 @@ export default {
|
|
|
this.adding = false
|
|
|
this.$refs[formName].resetFields()
|
|
|
},
|
|
|
- editbtn (item) {
|
|
|
+ onEdit (item) {
|
|
|
this.adding = true
|
|
|
this.isEdit = true
|
|
|
this.dialogTitle = '编辑'
|
|
|
@@ -472,7 +380,7 @@ export default {
|
|
|
this.getCamera()
|
|
|
})
|
|
|
},
|
|
|
- deletebtn (item) {
|
|
|
+ onDel (item) {
|
|
|
const videoOption = this.videoOption
|
|
|
deleteCamera({ id: item.id, name: item.name }).then(() => {
|
|
|
if (videoOption.list.length === 1 && videoOption.params.pageNum > 1) {
|
|
|
@@ -603,8 +511,8 @@ video::-webkit-media-controls-enclosure {
|
|
|
height: 100%;
|
|
|
}
|
|
|
}
|
|
|
-.c-form__item_padding{
|
|
|
- .el-input__inner{
|
|
|
+.c-form__item_padding {
|
|
|
+ .el-input__inner {
|
|
|
padding-right: 50px;
|
|
|
}
|
|
|
}
|