|
@@ -2,27 +2,62 @@
|
|
<Dialog custom-show type="xl" title="视频监控" class="dialog" hide-footer draggable @close="reset">
|
|
<Dialog custom-show type="xl" title="视频监控" class="dialog" hide-footer draggable @close="reset">
|
|
<div class="search-box">
|
|
<div class="search-box">
|
|
<div class="box-left">
|
|
<div class="box-left">
|
|
- <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="70px" label-position="left">
|
|
|
|
- <el-form-item prop="name">
|
|
|
|
- <el-input v-model="queryParams.name" class="custom-input2" placeholder="请输入摄像头名称" style="width: 500px" />
|
|
|
|
|
|
+ <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-position="left">
|
|
|
|
+ <el-form-item label="区划" prop="area" label-width="30px">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="treeData.area"
|
|
|
|
+ class="custom-select"
|
|
|
|
+ popper-class="custom-select-popper"
|
|
|
|
+ :teleported="false"
|
|
|
|
+ style="width: 150px; margin-left: 10px"
|
|
|
|
+ @change="handleAreaChange"
|
|
|
|
+ >
|
|
|
|
+ <el-option v-for="item in treeData.areaList" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="treeData.town"
|
|
|
|
+ class="custom-select"
|
|
|
|
+ popper-class="custom-select-popper"
|
|
|
|
+ :teleported="false"
|
|
|
|
+ style="width: 150px; margin-left: 10px"
|
|
|
|
+ @change="handleTownChange"
|
|
|
|
+ >
|
|
|
|
+ <el-option v-for="item in treeData.townList" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="treeData.village"
|
|
|
|
+ class="custom-select"
|
|
|
|
+ popper-class="custom-select-popper"
|
|
|
|
+ :teleported="false"
|
|
|
|
+ style="width: 150px; margin-left: 10px"
|
|
|
|
+ @change="handleVillageChange"
|
|
|
|
+ >
|
|
|
|
+ <el-option v-for="item in treeData.villageList" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="实景视频" prop="dict_value">
|
|
|
|
|
|
+ <el-form-item label="实景视频" prop="dict_value" label-width="70px">
|
|
<el-select
|
|
<el-select
|
|
v-model="queryParams.dict_value"
|
|
v-model="queryParams.dict_value"
|
|
class="custom-select"
|
|
class="custom-select"
|
|
popper-class="custom-select-popper"
|
|
popper-class="custom-select-popper"
|
|
:teleported="false"
|
|
:teleported="false"
|
|
|
|
+ style="width: 120px"
|
|
>
|
|
>
|
|
<el-option v-for="item in video_type" :key="item.value" :label="item.label" :value="item.value" />
|
|
<el-option v-for="item in video_type" :key="item.value" :label="item.label" :value="item.value" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item>
|
|
|
|
|
|
+ <el-form-item prop="name">
|
|
|
|
+ <el-input v-model="queryParams.name" class="custom-input2" placeholder="请输入摄像头名称" style="width: 313px" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item style="margin-right: 0">
|
|
<div class="common-btn-primary" @click="handleQuery">搜索</div>
|
|
<div class="common-btn-primary" @click="handleQuery">搜索</div>
|
|
<div class="common-btn" @click="resetQuery">重置</div>
|
|
<div class="common-btn" @click="resetQuery">重置</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
- <div v-show="!editVideo" class="common-btn-primary2 edit-icon" style="margin-top: -20px" @click="activeEdit">编辑首页视频</div>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <div style="display: flex; justify-content: flex-end; margin-bottom: 12px; margin-top: -20px">
|
|
|
|
+ <div v-show="!editVideo" class="common-btn-primary2 edit-icon" @click="activeEdit">编辑首页视频</div>
|
|
<div v-show="editVideo" class="edit-box">
|
|
<div v-show="editVideo" class="edit-box">
|
|
<div class="flex">
|
|
<div class="flex">
|
|
<div v-for="(item, index) in editData" :key="index" class="box-item">
|
|
<div v-for="(item, index) in editData" :key="index" class="box-item">
|
|
@@ -33,7 +68,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="flex" style="flex-direction: column; align-items: center">
|
|
<div class="flex" style="flex-direction: column; align-items: center">
|
|
- <div class="common-btn-primary3" @click="handleSave">保存</div>
|
|
|
|
|
|
+ <div class="common-btn-primary3" style="margin-top: -25px" @click="handleSave">保存</div>
|
|
<div class="common-btn-danger2" @click="handleCancel">取消</div>
|
|
<div class="common-btn-danger2" @click="handleCancel">取消</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -41,16 +76,16 @@
|
|
<div class="border"></div>
|
|
<div class="border"></div>
|
|
<div class="video-list2">
|
|
<div class="video-list2">
|
|
<div v-for="(item, index) in dialogListData" :key="index" class="video-box" @click="selectItem(item)">
|
|
<div v-for="(item, index) in dialogListData" :key="index" class="video-box" @click="selectItem(item)">
|
|
- <div class="video-label">
|
|
|
|
- <span class="label">{{ item.name }}</span>
|
|
|
|
- </div>
|
|
|
|
<div style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center">
|
|
<div style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center">
|
|
<div v-if="editVideo">
|
|
<div v-if="editVideo">
|
|
- <div v-if="item.sort" class="active-tag"></div>
|
|
|
|
- <div :class="item.sort ? 'common-checked-active' : 'common-checked'"></div>
|
|
|
|
|
|
+ <div v-if="getCheckStatus(item.video_code)" class="active-tag"></div>
|
|
|
|
+ <div :class="getCheckStatus(item.video_code) ? 'common-checked-active' : 'common-checked'"></div>
|
|
<div class="img"></div>
|
|
<div class="img"></div>
|
|
|
|
+ <div class="video-label">
|
|
|
|
+ <span class="label">{{ item.name }}</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <HKVideo v-else :dot_data="item" autoplay />
|
|
|
|
|
|
+ <HKVideo v-else :dot_data="item" autoplay :is-index="item.sort" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -63,7 +98,7 @@
|
|
layout="total, prev, pager, next"
|
|
layout="total, prev, pager, next"
|
|
@pagination="getList"
|
|
@pagination="getList"
|
|
/>
|
|
/>
|
|
- <div v-if="total === 0" style="width: 100%; text-align: center; font-size: 18px; font-weight: bold">暂无数据</div>
|
|
|
|
|
|
+ <div v-if="total === 0" style="width: 100%; text-align: center; font-size: 38px; font-weight: bold">暂无数据</div>
|
|
</div>
|
|
</div>
|
|
<div id="container" style="display: none"></div>
|
|
<div id="container" style="display: none"></div>
|
|
</Dialog>
|
|
</Dialog>
|
|
@@ -75,6 +110,9 @@ import { getEmergencyVideoCata, getUserVideoPoints, getVideoList, updateUserVide
|
|
import { deepClone } from '@/utils';
|
|
import { deepClone } from '@/utils';
|
|
import useAppStore from '@/store/modules/app';
|
|
import useAppStore from '@/store/modules/app';
|
|
import useMapStore from '@/store/modules/map';
|
|
import useMapStore from '@/store/modules/map';
|
|
|
|
+import HKVideo from '@/components/HKVideo/index2.vue';
|
|
|
|
+import { getRegionalTree } from '@/api/PreventionResponsible';
|
|
|
|
+
|
|
interface LngLat {
|
|
interface LngLat {
|
|
longitude: number;
|
|
longitude: number;
|
|
latitude: number;
|
|
latitude: number;
|
|
@@ -97,11 +135,20 @@ const { video_type } = toRefs<any>(proxy?.useDict('video_type'));
|
|
|
|
|
|
//查看更多数据
|
|
//查看更多数据
|
|
const queryFormRef = ref();
|
|
const queryFormRef = ref();
|
|
|
|
+const treeData = reactive({
|
|
|
|
+ area: '',
|
|
|
|
+ town: '',
|
|
|
|
+ village: '',
|
|
|
|
+ areaList: [],
|
|
|
|
+ townList: [],
|
|
|
|
+ villageList: []
|
|
|
|
+});
|
|
const queryParams = reactive({
|
|
const queryParams = reactive({
|
|
current: 1,
|
|
current: 1,
|
|
size: 8,
|
|
size: 8,
|
|
dict_value: '',
|
|
dict_value: '',
|
|
- name: ''
|
|
|
|
|
|
+ name: '',
|
|
|
|
+ area: ''
|
|
});
|
|
});
|
|
let total = ref(0);
|
|
let total = ref(0);
|
|
let editVideo = ref(false);
|
|
let editVideo = ref(false);
|
|
@@ -122,7 +169,7 @@ watch(
|
|
{ immediate: true }
|
|
{ immediate: true }
|
|
);
|
|
);
|
|
|
|
|
|
-const getList = () => {
|
|
|
|
|
|
+const getList = (flag?: boolean) => {
|
|
let newParams = {
|
|
let newParams = {
|
|
latitude: props.lngLat.latitude,
|
|
latitude: props.lngLat.latitude,
|
|
longitude: props.lngLat.longitude,
|
|
longitude: props.lngLat.longitude,
|
|
@@ -138,9 +185,10 @@ const getList = () => {
|
|
getEmergencyVideoCata(newParams).then((res) => {
|
|
getEmergencyVideoCata(newParams).then((res) => {
|
|
dialogListData.value = res.rows;
|
|
dialogListData.value = res.rows;
|
|
total.value = res.total;
|
|
total.value = res.total;
|
|
- if (editVideo.value && editData.value) {
|
|
|
|
- filterData(editData.value);
|
|
|
|
- }
|
|
|
|
|
|
+ getUserVideoPoints().then((res2) => {
|
|
|
|
+ filterData(res2.data.videoInfos);
|
|
|
|
+ editData.value = deepClone(res2.data.videoInfos);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
};
|
|
};
|
|
const getVideoInfoList = () => {
|
|
const getVideoInfoList = () => {
|
|
@@ -165,9 +213,6 @@ const deleteItem = (index) => {
|
|
};
|
|
};
|
|
/** 表单重置 */
|
|
/** 表单重置 */
|
|
const reset = () => {
|
|
const reset = () => {
|
|
- queryParams.current = 1;
|
|
|
|
- queryParams.dict_value = '';
|
|
|
|
- queryParams.name = '';
|
|
|
|
emits('update:modelValue', false);
|
|
emits('update:modelValue', false);
|
|
};
|
|
};
|
|
|
|
|
|
@@ -181,16 +226,18 @@ const handleQuery = () => {
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
const resetQuery = () => {
|
|
const resetQuery = () => {
|
|
queryFormRef.value?.resetFields();
|
|
queryFormRef.value?.resetFields();
|
|
|
|
+ treeData.area = '';
|
|
|
|
+ treeData.townList = [];
|
|
|
|
+ treeData.town = '';
|
|
|
|
+ treeData.villageList = [];
|
|
|
|
+ treeData.village = '';
|
|
|
|
+ queryParams.current = 1;
|
|
handleQuery();
|
|
handleQuery();
|
|
};
|
|
};
|
|
|
|
|
|
// 开启编辑视频
|
|
// 开启编辑视频
|
|
const activeEdit = () => {
|
|
const activeEdit = () => {
|
|
- getUserVideoPoints().then((res) => {
|
|
|
|
- filterData(res.data.videoInfos);
|
|
|
|
- editData.value = deepClone(res.data.videoInfos);
|
|
|
|
- editVideo.value = true;
|
|
|
|
- });
|
|
|
|
|
|
+ editVideo.value = true;
|
|
};
|
|
};
|
|
const filterData = (data) => {
|
|
const filterData = (data) => {
|
|
data.forEach((item) => {
|
|
data.forEach((item) => {
|
|
@@ -213,13 +260,46 @@ const handleSave = () => {
|
|
data.push(item.video_code_int);
|
|
data.push(item.video_code_int);
|
|
});
|
|
});
|
|
updateUserVideoPoints(data).then(() => {
|
|
updateUserVideoPoints(data).then(() => {
|
|
- getList();
|
|
|
|
|
|
+ getList(true);
|
|
handleCancel();
|
|
handleCancel();
|
|
});
|
|
});
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+// 区变化
|
|
|
|
+const handleAreaChange = () => {
|
|
|
|
+ getAreaTreeList('townList', treeData.area);
|
|
|
|
+ treeData.town = '';
|
|
|
|
+ treeData.village = '';
|
|
|
|
+ queryParams.area = treeData.area;
|
|
|
|
+};
|
|
|
|
+// 镇变化
|
|
|
|
+const handleTownChange = () => {
|
|
|
|
+ getAreaTreeList('villageList', treeData.town);
|
|
|
|
+ treeData.village = '';
|
|
|
|
+ queryParams.area = treeData.town;
|
|
|
|
+};
|
|
|
|
+// 村变化
|
|
|
|
+const handleVillageChange = () => {
|
|
|
|
+ queryParams.area = treeData.village;
|
|
|
|
+};
|
|
|
|
+// 获取区划树
|
|
|
|
+const getAreaTreeList = (datasource, id) => {
|
|
|
|
+ getRegionalTree(id).then((res) => {
|
|
|
|
+ treeData[datasource] = res.data;
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+const getCheckStatus = (id) => {
|
|
|
|
+ let flag = false;
|
|
|
|
+ for (let i = 0; i < editData.value.length; i++) {
|
|
|
|
+ if (editData.value[i].video_code_int === id) {
|
|
|
|
+ flag = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return flag;
|
|
|
|
+};
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getList();
|
|
getList();
|
|
|
|
+ getAreaTreeList('areaList', 2);
|
|
// getVideoInfoList();
|
|
// getVideoInfoList();
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
@@ -230,6 +310,7 @@ onMounted(() => {
|
|
width: 100%;
|
|
width: 100%;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
+ margin-top: -10px;
|
|
.el-form--inline .el-form-item {
|
|
.el-form--inline .el-form-item {
|
|
margin-right: 15px;
|
|
margin-right: 15px;
|
|
}
|
|
}
|
|
@@ -312,9 +393,9 @@ onMounted(() => {
|
|
height: 83px;
|
|
height: 83px;
|
|
background: url('@/assets/images/video/editBg.png') no-repeat;
|
|
background: url('@/assets/images/video/editBg.png') no-repeat;
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
- position: absolute;
|
|
|
|
- right: 20px;
|
|
|
|
- top: 27px;
|
|
|
|
|
|
+ //position: absolute;
|
|
|
|
+ //right: 20px;
|
|
|
|
+ //top: 27px;
|
|
}
|
|
}
|
|
.box-item {
|
|
.box-item {
|
|
position: relative;
|
|
position: relative;
|
|
@@ -396,7 +477,7 @@ onMounted(() => {
|
|
background-color: #15428d;
|
|
background-color: #15428d;
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 1px;
|
|
height: 1px;
|
|
- margin-bottom: 30px;
|
|
|
|
|
|
+ margin-bottom: 15px;
|
|
}
|
|
}
|
|
.edit-icon {
|
|
.edit-icon {
|
|
display: flex;
|
|
display: flex;
|