jsmapChange&bigScreen

This commit is contained in:
shijing 2022-07-04 17:17:12 +08:00
parent 57f192e39b
commit d0fa208280
12 changed files with 1267 additions and 259 deletions

BIN
public/img/alarm_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
public/img/b_quiet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

BIN
public/img/b_ring.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

BIN
public/img/car.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

BIN
public/img/rotate_line.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

BIN
public/img/round.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

BIN
public/img/speaker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
public/img/user.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

File diff suppressed because one or more lines are too long

View File

@ -9,25 +9,34 @@
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe @resetQuery="resetQuery" > <scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe
@resetQuery="resetQuery">
<el-table-column type="selection" width="50"></el-table-column> <el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="设备编号" prop="deviceCode" min-width="100"></el-table-column> <el-table-column label="设备编号" prop="deviceCode" min-width="100"></el-table-column>
<el-table-column label="通道编号" prop="channelCode" min-width="100"></el-table-column> <el-table-column label="通道编号" prop="channelCode" min-width="100"></el-table-column>
<el-table-column label="通道名称" prop="channelName" min-width="150"></el-table-column> <el-table-column label="通道名称" prop="channelName" min-width="150"></el-table-column>
<el-table-column label="通道状态" prop="stat" min-width="150"></el-table-column> <el-table-column label="通道状态" prop="stat" min-width="150">
<el-table-column label="通道类型" min-width="100"> <template #default="scope">
<template #default="scope">{{scope.row.channelType}}</template> <span v-if="scope.row.stat===0">不启用</span>
<span v-else>启用</span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="设备类型" min-width="100"> <el-table-column label="摄像头类型" min-width="100">
<template #default="scope">{{scope.row.cameraType}}</template> <template #default="scope">{{deviceTypes[scope.row.cameraType]}}</template>
</el-table-column> </el-table-column>
<el-table-column label="是否在线" prop="isOnline" min-width="180"></el-table-column> <el-table-column label="是否在线" prop="isOnline" min-width="180">
<el-table-column label="创建时间" prop="createTime" width="160"></el-table-column> <template #default="scope">
<el-table-column label="操作" fixed="right" align="center" width="160"> <span v-if="scope.row.isOnline===0">离线</span>
<span v-else>在线</span>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime" min-width="160"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="260">
<template #default="scope"> <template #default="scope">
<el-button-group> <el-button-group>
<el-button text type="primary" size="small" @click="handlePosition(scope.row)">标记位置</el-button> <el-button text type="primary" size="small" @click="handlePosition(scope.row)">标记位置
</el-button>
<el-button text type="primary" size="small" @click="handleView(scope.row)">实时监控</el-button> <el-button text type="primary" size="small" @click="handleView(scope.row)">实时监控</el-button>
<el-popconfirm title="确定删除吗?" @confirm="handleDel(scope.row, scope.$index)"> <el-popconfirm title="确定删除吗?" @confirm="handleDel(scope.row, scope.$index)">
<template #reference> <template #reference>
@ -53,42 +62,48 @@
<el-button @click="limitedVisible = false">关闭</el-button> <el-button @click="limitedVisible = false">关闭</el-button>
</template> </template>
</el-dialog> </el-dialog>
<video-channel-view v-if="dialogSave" ref="saveDialog" :channelType="60" :channelCode="channelCode" :channelName="channelName" @closed="dialogSave=false"></video-channel-view> <channel-view v-if="dialogSave" ref="saveDialog" :channelType="60" :channelCode="channelCode"
:channelName="channelName" @closed="dialogSave=false"></channel-view>
</template> </template>
<script> <script>
import videoChannelView from './vchannel_view' import channelView from './vchannel_view'
export default { export default {
name: 'monitor', name: 'monitor',
components: { components: {
videoChannelView channelView
}, },
data() { data() {
return { return {
apiObj: this.$API.am.video.list, apiObj: this.$API.am.video.list,
dialogSave: false, dialogSave: false,
limitedVisible: false, limitedVisible: false,
query: {}, query: {},
selection: [], selection: [],
search: { search: {
keyword: null keyword: null
}, },
channelId:'', channelId: '',
params:{ params: {
json:{ json: {
data: { data: {
channelId: "", channelId: "",
streamType: "2", streamType: "2",
type: "flv" type: "flv"
} }
}, },
code:'video_realtime' code: 'video_realtime'
}, },
deviceTypes: {
'1': '枪机',
'2': '球机',
'3': '半球'
}
} }
}, },
created(){ created() {
const scriptInfo = document.createElement("script"); const scriptInfo = document.createElement("script");
scriptInfo.setAttribute("data-callType","callScript"); scriptInfo.setAttribute("data-callType", "callScript");
scriptInfo.src = "https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.js"; scriptInfo.src = "https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.js";
document.head.appendChild(scriptInfo) document.head.appendChild(scriptInfo)
}, },
@ -97,7 +112,7 @@
this.params.json.data.channelId = row.channelCode; this.params.json.data.channelId = row.channelCode;
this.channelName = row.channelName; this.channelName = row.channelName;
this.limitedVisible = true; this.limitedVisible = true;
this.$API.am.video.item.req(this.params).then(res=>{ this.$API.am.video.item.req(this.params).then(res => {
debugger; debugger;
console.log(res); console.log(res);
this.url = res.url; this.url = res.url;
@ -113,17 +128,17 @@
} }
}) })
}, },
handlePosition(row){ handlePosition(row) {
this.channelCode = row.channelCode; this.channelCode = row.channelCode;
this.channelName = row.channelName; this.channelName = row.channelName;
this.dialogSave = true; this.dialogSave = true;
}, },
// //
async handleDel(row){ async handleDel(row) {
await this.$API.am.area.delete.req(row.id).then(res=>{ await this.$API.am.area.delete.req(row.id).then(res => {
if(res.err_msg){ if (res.err_msg) {
this.$message.error(res.err_msg); this.$message.error(res.err_msg);
}else{ } else {
this.$refs.table.refresh(); this.$refs.table.refresh();
this.$message.success("删除成功") this.$message.success("删除成功")
} }
@ -131,17 +146,17 @@
}, },
// //
async batch_del(){ async batch_del() {
this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`, '提示', { this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const loading = this.$loading(); const loading = this.$loading();
let params = {pk:{pks:this.selection}}; let params = {pk: {pks: this.selection}};
this.$API.am.area.deletes.req(params).then(res=>{ this.$API.am.area.deletes.req(params).then(res => {
loading.close(); loading.close();
if(res.err_msg){ if (res.err_msg) {
this.$message.error(res.err_msg); this.$message.error(res.err_msg);
}else{ } else {
this.$refs.table.refresh(); this.$refs.table.refresh();
this.$message.success("删除成功") this.$message.success("删除成功")
} }
@ -150,17 +165,17 @@
}) })
}, },
// //
selectionChange(selection){ selectionChange(selection) {
this.selection = selection; this.selection = selection;
}, },
// //
upsearch(){ upsearch() {
}, },
resetQuery(){ resetQuery() {
this.query = {} this.query = {}
} }
} }

View File

@ -200,6 +200,7 @@
that.form.location = pixel;*/ that.form.location = pixel;*/
this.form.code = this.channelCode; this.form.code = this.channelCode;
this.form.type = this.channelType; this.form.type = this.channelType;
this.form.name = this.channelName;
that.$API.am.tdevice.labelLocation.req(that.form) that.$API.am.tdevice.labelLocation.req(that.form)
.then(res => { .then(res => {
that.isSaveing = false; that.isSaveing = false;

File diff suppressed because it is too large Load Diff