|
@@ -57,8 +57,10 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList"/>
|
|
|
- <el-dialog :title="title" :visible.sync="dialogVisible" width="30%" @closed="handleClose">
|
|
|
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList" />
|
|
|
+ <el-dialog :title="title" :visible.sync="dialogVisible" width="30%" @closed="handleClose"
|
|
|
+ :close-on-click-modal="false">
|
|
|
<span>
|
|
|
<el-form :model="form" :rules="rules" ref="queryForm" label-width="100px">
|
|
|
<el-form-item label="仓库" prop="fWarehouseId">
|
|
@@ -90,9 +92,9 @@
|
|
|
<el-button type="primary" @click="submit(title)">{{ title == '添加' ? '保 存' : '修 改' }}</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <el-dialog title="查看监控" v-dialogDrag :visible.sync="dialogVideo">
|
|
|
+ <el-dialog title="查看监控" v-dialogDrag :visible.sync="dialogVideo" :close-on-click-modal="false" @closed="videoClose">
|
|
|
<div style="width:100%; height:80vh;">
|
|
|
- <iframe :src="iframeSrc" width="100%" height="100%" frameborder="0" scrolling="no">
|
|
|
+ <iframe v-if="dialogVideo" :src="iframeSrc" width="100%" height="100%" frameborder="0" scrolling="no">
|
|
|
</iframe>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -147,7 +149,8 @@ export default {
|
|
|
code: [
|
|
|
{ required: true, message: ' ', trigger: 'blur' }
|
|
|
]
|
|
|
- }
|
|
|
+ },
|
|
|
+ timer: null
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -230,12 +233,12 @@ export default {
|
|
|
|
|
|
},
|
|
|
rowView(row) {
|
|
|
- Axios.post("/dev-api/api/LiveBroadcast/getAccessToken").then(res => {
|
|
|
- Axios.post(`/dev-api/api/LiveBroadcast/getToken?productCode=1640070936703286&token=${res.data.data.access_token}`).then(res2 => {
|
|
|
+ Axios.post("/prod-api/api/LiveBroadcast/getAccessToken").then(res => {
|
|
|
+ Axios.post(`/prod-api/api/LiveBroadcast/getToken?productCode=1640070936703286&token=${res.data.data.access_token}`).then(res2 => {
|
|
|
console.log(res2)
|
|
|
Axios({
|
|
|
method: 'POST',
|
|
|
- url: '/dev-api/api/LiveBroadcast/videoWeb',
|
|
|
+ url: '/prod-api/api/LiveBroadcast/videoWeb',
|
|
|
params: {
|
|
|
deviceSerial: row.deviceSerial,
|
|
|
projectId: row.projectId,
|
|
@@ -247,6 +250,7 @@ export default {
|
|
|
.then(response => {
|
|
|
this.dialogVideo = true
|
|
|
this.iframeSrc = response.data.data.data.previewUrl
|
|
|
+ this.start()
|
|
|
});
|
|
|
})
|
|
|
})
|
|
@@ -259,6 +263,20 @@ export default {
|
|
|
handleClose() {
|
|
|
this.form = this.$options.data().form;
|
|
|
this.dialogVisible = false;
|
|
|
+ },
|
|
|
+ videoClose() {
|
|
|
+ this.iframeSrc = this.$options.data().iframeSrc;
|
|
|
+ this.end()
|
|
|
+ },
|
|
|
+ start() {
|
|
|
+ // 将定时器名字赋值到变量中
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ this.dialogVideo = false;
|
|
|
+ }, 60000);
|
|
|
+ },
|
|
|
+ end() {
|
|
|
+ clearInterval(this.timer);
|
|
|
+ this.timer = null
|
|
|
}
|
|
|
}
|
|
|
};
|