Compare commits
No commits in common. "ceb4d1fff9d71a8b610a4f26601a6d946ad75cfc" and "969842078a415cbca4186a5c1b61549b401c0eed" have entirely different histories.
ceb4d1fff9
...
969842078a
|
|
@ -1,404 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form
|
|
||||||
:model="queryParams"
|
|
||||||
ref="queryRef"
|
|
||||||
:inline="true"
|
|
||||||
v-show="showSearch"
|
|
||||||
>
|
|
||||||
<el-row>
|
|
||||||
<el-form-item class="search" label="监控名称" prop="videoId">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.videoId"
|
|
||||||
placeholder="监控名称"
|
|
||||||
clearable
|
|
||||||
style="width: 200px;"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in jkList"
|
|
||||||
:key="dict.id"
|
|
||||||
:label="dict.name"
|
|
||||||
:value="dict.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="dfjb">
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
@click="handleAdd"
|
|
||||||
class="circle-plus-btn"
|
|
||||||
>
|
|
||||||
新增
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="Edit"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<!-- <el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['large:data:export']"
|
|
||||||
>导出</el-button
|
|
||||||
>
|
|
||||||
</el-col> -->
|
|
||||||
</el-row>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
|
||||||
>搜索</el-button
|
|
||||||
>
|
|
||||||
<el-button icon="RefreshLeft" class="Refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="tablebox">
|
|
||||||
<el-table
|
|
||||||
v-loading="loading"
|
|
||||||
stripe
|
|
||||||
:data="dataList"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<!-- <el-table-column label="id" align="center" prop="id" /> -->
|
|
||||||
<el-table-column label="监控名称" align="center" prop="videoName" />
|
|
||||||
<el-table-column
|
|
||||||
label="获取时间"
|
|
||||||
align="center"
|
|
||||||
prop="acquisitionTime"
|
|
||||||
/>
|
|
||||||
<el-table-column label="人数" align="center" prop="numberPeople" />
|
|
||||||
<el-table-column label="是否出现异常" align="center" prop="isAbnormal">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="sys_yes_no" :value="scope.row.isAbnormal" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
align="center"
|
|
||||||
class-name="small-padding fixed-width"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
v-model:page="queryParams.pageNum"
|
|
||||||
v-model:limit="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 添加或修改大客流视频数据获取对话框 -->
|
|
||||||
<el-dialog
|
|
||||||
:style="{ height: '420px' }"
|
|
||||||
:title="title"
|
|
||||||
v-model="open"
|
|
||||||
width="680px"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
label-position="top"
|
|
||||||
ref="dataRef"
|
|
||||||
:model="form"
|
|
||||||
:rules="rules"
|
|
||||||
label-width="120px"
|
|
||||||
>
|
|
||||||
<el-form-item label="监控名称" prop="videoId">
|
|
||||||
<el-select
|
|
||||||
v-model="form.videoId"
|
|
||||||
placeholder="监控名称"
|
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in jkList"
|
|
||||||
:key="dict.id"
|
|
||||||
:label="dict.name"
|
|
||||||
:value="dict.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="获取时间" prop="acquisitionTime">
|
|
||||||
<el-date-picker
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="form.acquisitionTime"
|
|
||||||
type="datetime"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
placeholder="请选择获取时间"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="人数" prop="numberPeople">
|
|
||||||
<el-input v-model="form.numberPeople" placeholder="请输入人数" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否出现异常" prop="isAbnormal">
|
|
||||||
<el-select
|
|
||||||
v-model="form.isAbnormal"
|
|
||||||
placeholder="是否出现异常"
|
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in sys_yes_no"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<!-- <el-input v-model="form.isAbnormal" placeholder="请输入区域" /> -->
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="Data">
|
|
||||||
import {
|
|
||||||
listData,
|
|
||||||
getData,
|
|
||||||
delData,
|
|
||||||
addData,
|
|
||||||
updateData,
|
|
||||||
getjkList,
|
|
||||||
} from "@/api/videoData.js";
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
|
||||||
const { sys_yes_no } = proxy.useDict("sys_yes_no");
|
|
||||||
|
|
||||||
const dataList = ref([]);
|
|
||||||
const open = ref(false);
|
|
||||||
const loading = ref(true);
|
|
||||||
const showSearch = ref(true);
|
|
||||||
const ids = ref([]);
|
|
||||||
const single = ref(true);
|
|
||||||
const multiple = ref(true);
|
|
||||||
const total = ref(0);
|
|
||||||
const title = ref("");
|
|
||||||
const jkList = ref([]);
|
|
||||||
const data = reactive({
|
|
||||||
form: {},
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
videoId: null,
|
|
||||||
delFlag: 0,
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
videoId: [{ required: true, message: "监控编号不能为空", trigger: "blur" }],
|
|
||||||
acquisitionTime: [
|
|
||||||
{ required: true, message: "请选择获取时间", trigger: "change" },
|
|
||||||
],
|
|
||||||
numberPeople: [
|
|
||||||
{ required: true, message: "人数不能为空", trigger: "blur" },
|
|
||||||
{
|
|
||||||
pattern: /^[1-9]\d*$/,
|
|
||||||
message: "请输入正整数",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (value > 10000) {
|
|
||||||
callback(new Error("人数不能超过10000"));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
isAbnormal: [
|
|
||||||
{ required: true, message: "请选择是否出现异常", trigger: "change" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
|
||||||
|
|
||||||
/** 查询大客流视频数据获取列表 */
|
|
||||||
function getList() {
|
|
||||||
loading.value = true;
|
|
||||||
listData(queryParams.value).then((response) => {
|
|
||||||
dataList.value = response.rows;
|
|
||||||
total.value = response.total;
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 取消按钮
|
|
||||||
function cancel() {
|
|
||||||
open.value = false;
|
|
||||||
reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 表单重置
|
|
||||||
function reset() {
|
|
||||||
form.value = {
|
|
||||||
id: null,
|
|
||||||
videoId: null,
|
|
||||||
acquisitionTime: null,
|
|
||||||
numberPeople: null,
|
|
||||||
isAbnormal: null,
|
|
||||||
createBy: null,
|
|
||||||
createTime: null,
|
|
||||||
updateBy: null,
|
|
||||||
updateTime: null,
|
|
||||||
delFlag: null,
|
|
||||||
originalData: null,
|
|
||||||
deptId: null,
|
|
||||||
};
|
|
||||||
proxy.resetForm("dataRef");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
function handleQuery() {
|
|
||||||
queryParams.value.pageNum = 1;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
function resetQuery() {
|
|
||||||
proxy.resetForm("queryRef");
|
|
||||||
handleQuery();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 多选框选中数据
|
|
||||||
function handleSelectionChange(selection) {
|
|
||||||
console.log(selection);
|
|
||||||
|
|
||||||
ids.value = selection.map((item) => item.id);
|
|
||||||
single.value = selection.length != 1;
|
|
||||||
multiple.value = !selection.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
function handleAdd() {
|
|
||||||
reset();
|
|
||||||
open.value = true;
|
|
||||||
title.value = "添加大客流视频数据获取";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
function handleUpdate(row) {
|
|
||||||
reset();
|
|
||||||
const _id = row.id || ids.value;
|
|
||||||
getData(_id).then((response) => {
|
|
||||||
form.value = response.data;
|
|
||||||
open.value = true;
|
|
||||||
title.value = "修改大客流视频数据获取";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
function submitForm() {
|
|
||||||
proxy.$refs["dataRef"].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if (form.value.id != null) {
|
|
||||||
updateData(form.value).then((response) => {
|
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
|
||||||
open.value = false;
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addData(form.value).then((response) => {
|
|
||||||
proxy.$modal.msgSuccess("新增成功");
|
|
||||||
open.value = false;
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
function handleDelete(row) {
|
|
||||||
const _ids = row.id || ids.value;
|
|
||||||
proxy.$modal
|
|
||||||
.confirm("是否确认删除所选数据项?")
|
|
||||||
.then(function () {
|
|
||||||
return delData(_ids);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
getList();
|
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
function handleExport() {
|
|
||||||
proxy.download(
|
|
||||||
"large/data/export",
|
|
||||||
{
|
|
||||||
...queryParams.value,
|
|
||||||
},
|
|
||||||
`data_${new Date().getTime()}.xlsx`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
function getjkLists() {
|
|
||||||
getjkList().then((res) => {
|
|
||||||
jkList.value = res.rows;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
|
||||||
getList();
|
|
||||||
getjkLists();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.map {
|
|
||||||
cursor: pointer;
|
|
||||||
color: #203f73;
|
|
||||||
}
|
|
||||||
/* 修改斑马纹的浅色行背景 */
|
|
||||||
::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
|
|
||||||
background-color: #dbe4f5 !important; /* 改为淡蓝色 */
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
@ -1,818 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form
|
|
||||||
:model="queryParams"
|
|
||||||
ref="queryRef"
|
|
||||||
:inline="true"
|
|
||||||
v-show="showSearch"
|
|
||||||
>
|
|
||||||
<el-row>
|
|
||||||
<el-form-item label="名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入名称"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="类型" prop="types">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.types"
|
|
||||||
placeholder="类型"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in monitoring_type"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="选择时间" prop="holidayName">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="dateRange"
|
|
||||||
type="datetimerange"
|
|
||||||
unlink-panels
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始时间"
|
|
||||||
end-placeholder="结束时间"
|
|
||||||
:shortcuts="filterShortcuts"
|
|
||||||
@change="handleDateChange"
|
|
||||||
class="custom-date-picker"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="dfjb">
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
@click="handleAdd"
|
|
||||||
class="circle-plus-btn"
|
|
||||||
>
|
|
||||||
新增
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
icon="Delete"
|
|
||||||
plain
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['system:post:remove']"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="Edit"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['large:information:edit']"
|
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="info"
|
|
||||||
plain
|
|
||||||
icon="Upload"
|
|
||||||
@click="handleImport"
|
|
||||||
>导入</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
@click="handleExport"
|
|
||||||
>导出</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
<el-form-item class="reset">
|
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
|
||||||
>搜索</el-button
|
|
||||||
>
|
|
||||||
<el-button icon="RefreshLeft" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<div class="tablebox">
|
|
||||||
<el-table @row-click="handleActivityRowClickJK"
|
|
||||||
v-loading="loading"
|
|
||||||
:data="postList"
|
|
||||||
stripe
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column
|
|
||||||
label="名称"
|
|
||||||
show-overflow-tooltip
|
|
||||||
align="center"
|
|
||||||
prop="name"
|
|
||||||
/>
|
|
||||||
<el-table-column label="类型" align="center" prop="types">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="monitoring_type" :value="scope.row.types" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column label="文件地址" align="center" prop="filePath" /> -->
|
|
||||||
<el-table-column label="经度" align="center" prop="lng" />
|
|
||||||
<el-table-column label="纬度" align="center" prop="lat" />
|
|
||||||
<el-table-column
|
|
||||||
show-overflow-tooltip
|
|
||||||
label="文件地址"
|
|
||||||
align="center"
|
|
||||||
prop="filePath"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="创建时间"
|
|
||||||
align="center"
|
|
||||||
prop="createTime"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
width="180"
|
|
||||||
align="center"
|
|
||||||
class-name="small-padding fixed-width"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Edit"
|
|
||||||
@click.stop="handleUpdate(scope.row)"
|
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Delete"
|
|
||||||
@click.stop="handleDelete(scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="VideoCamera"
|
|
||||||
@click.stop="handleVideo(scope.row)"
|
|
||||||
>视频</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
v-model:page="queryParams.pageNum"
|
|
||||||
v-model:limit="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 添加或修改岗位对话框 -->
|
|
||||||
<el-dialog
|
|
||||||
:style="{ height: '620px' }"
|
|
||||||
:title="title"
|
|
||||||
v-model="open"
|
|
||||||
width="800px"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
label-position="top"
|
|
||||||
ref="postRef"
|
|
||||||
:model="form"
|
|
||||||
:rules="rules"
|
|
||||||
label-width="100px"
|
|
||||||
>
|
|
||||||
<el-row :gutter="40">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="名称" prop="name">
|
|
||||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="类型" prop="types">
|
|
||||||
<el-select
|
|
||||||
v-model="form.types"
|
|
||||||
placeholder="类型"
|
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in monitoring_type"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="40">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="活动" prop="activityId">
|
|
||||||
<el-select
|
|
||||||
v-model="form.activityId"
|
|
||||||
placeholder="请选择活动"
|
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in sbList"
|
|
||||||
:key="dict.id"
|
|
||||||
:label="dict.activityName"
|
|
||||||
:value="dict.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="文件地址" prop="filePath">
|
|
||||||
<el-input v-model="form.filePath" placeholder="请输入文件地址" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="40">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="经度" prop="lng">
|
|
||||||
<el-input v-model="form.lng" placeholder="请输入经度" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="纬度" prop="lat">
|
|
||||||
<el-input v-model="form.lat" placeholder="请输入纬度" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="地图帮助">
|
|
||||||
<div class="map" @click="getMap">地图帮助</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="地址" prop="address">
|
|
||||||
<el-input
|
|
||||||
type="textarea"
|
|
||||||
v-model="form.address"
|
|
||||||
placeholder="请输入地址"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<!-- 添加或修改监控点摄像头信息对话框 -->
|
|
||||||
<el-dialog destroy-on-close title="视频监控" v-model="SPdialig" width="1400px" append-to-body :style="{ height: '1000px' }">
|
|
||||||
<VideoMonitor :video-url="currentVideoUrl" width="1400px" height="1000px" style="margin-left:40px;"/>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="handleVideoClose">确 定</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
<!-- 导入对话框 -->
|
|
||||||
<el-dialog
|
|
||||||
:title="upload.title"
|
|
||||||
v-model="upload.open"
|
|
||||||
width="600px"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<el-upload
|
|
||||||
ref="uploadRef"
|
|
||||||
:limit="1"
|
|
||||||
accept=".xlsx, .xls"
|
|
||||||
:headers="upload.headers"
|
|
||||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
||||||
:disabled="upload.isUploading"
|
|
||||||
:on-progress="handleFileUploadProgress"
|
|
||||||
:on-success="handleFileSuccess"
|
|
||||||
:auto-upload="false"
|
|
||||||
drag
|
|
||||||
>
|
|
||||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
||||||
<template #tip>
|
|
||||||
<div class="el-upload__tip text-center">
|
|
||||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
|
||||||
<el-link
|
|
||||||
type="primary"
|
|
||||||
:underline="false"
|
|
||||||
style="font-size: 12px; vertical-align: baseline"
|
|
||||||
@click="importTemplate"
|
|
||||||
>下载模板</el-link
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-upload>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
||||||
<el-button @click="upload.open = false">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="Post">
|
|
||||||
import { getToken } from "@/utils/auth";
|
|
||||||
import { ref, reactive, onMounted, getCurrentInstance } from "vue";
|
|
||||||
import {
|
|
||||||
listPost,
|
|
||||||
addPost,
|
|
||||||
delPost,
|
|
||||||
getPost,
|
|
||||||
updatePost,
|
|
||||||
} from "@/api/system/post";
|
|
||||||
import {
|
|
||||||
getklList,
|
|
||||||
getklListadd,
|
|
||||||
getklListedit,
|
|
||||||
getklListremove,
|
|
||||||
getklListedithx,
|
|
||||||
getsbLists,
|
|
||||||
getsbLists2,
|
|
||||||
} from "@/api/videoInfo.js";
|
|
||||||
const { proxy } = getCurrentInstance();
|
|
||||||
const { sys_yes_no, activity_area,monitoring_type } = proxy.useDict(
|
|
||||||
"sys_yes_no",
|
|
||||||
"activity_area","monitoring_type"
|
|
||||||
);
|
|
||||||
import moment from "moment";
|
|
||||||
/*** 用户导入参数 */
|
|
||||||
const upload = reactive({
|
|
||||||
// 是否显示弹出层(用户导入)
|
|
||||||
open: false,
|
|
||||||
// 弹出层标题(用户导入)
|
|
||||||
title: "",
|
|
||||||
// 是否禁用上传
|
|
||||||
isUploading: false,
|
|
||||||
// 是否更新已经存在的用户数据
|
|
||||||
updateSupport: 0,
|
|
||||||
// 设置上传的请求头部
|
|
||||||
headers: { Authorization: "Bearer " + getToken() },
|
|
||||||
// 上传的地址
|
|
||||||
url: import.meta.env.VITE_APP_BASE_API + "/large/videoStorageInformation/importData",
|
|
||||||
});
|
|
||||||
const dateRange = ref([]);
|
|
||||||
const filterShortcuts = ref([
|
|
||||||
{
|
|
||||||
text: "本周",
|
|
||||||
value: () => {
|
|
||||||
const now = new Date();
|
|
||||||
const firstDay = new Date(
|
|
||||||
now.setDate(
|
|
||||||
now.getDate() - now.getDay() + (now.getDay() === 0 ? -6 : 1)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
const lastDay = new Date(now.setDate(now.getDate() - now.getDay() + 7));
|
|
||||||
return [firstDay, lastDay];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "本月",
|
|
||||||
value: () => {
|
|
||||||
const now = new Date();
|
|
||||||
const firstDay = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
||||||
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
|
||||||
return [firstDay, lastDay];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "本季度",
|
|
||||||
value: () => {
|
|
||||||
const now = new Date();
|
|
||||||
const quarter = Math.floor(now.getMonth() / 3);
|
|
||||||
const firstDay = new Date(now.getFullYear(), quarter * 3, 1);
|
|
||||||
const lastDay = new Date(now.getFullYear(), quarter * 3 + 3, 0);
|
|
||||||
return [firstDay, lastDay];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "本年",
|
|
||||||
value: () => {
|
|
||||||
const now = new Date();
|
|
||||||
const firstDay = new Date(now.getFullYear(), 0, 1);
|
|
||||||
const lastDay = new Date(now.getFullYear(), 11, 31);
|
|
||||||
return [firstDay, lastDay];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const postList = ref([]);
|
|
||||||
const open = ref(false);
|
|
||||||
const loading = ref(true);
|
|
||||||
const showSearch = ref(true);
|
|
||||||
const ids = ref([]);
|
|
||||||
const single = ref(true);
|
|
||||||
const multiple = ref(true);
|
|
||||||
const total = ref(0);
|
|
||||||
const title = ref("");
|
|
||||||
const sbList = ref([]);
|
|
||||||
const sshebiList = ref([]);
|
|
||||||
const data = reactive({
|
|
||||||
form: {},
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
delFlag: 0,
|
|
||||||
name: undefined,
|
|
||||||
types: undefined,
|
|
||||||
startTime: undefined,
|
|
||||||
endTime: undefined,
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: [
|
|
||||||
{ required: true, message: "名称不能为空", trigger: "blur" },
|
|
||||||
{ max: 30, message: "名称长度不能超过30个字符", trigger: "blur" },
|
|
||||||
],
|
|
||||||
types: [
|
|
||||||
{ required: true, message: "类型不能为空", trigger: "blur" },
|
|
||||||
{ max: 30, message: "类型长度不能超过30个字符", trigger: "blur" },
|
|
||||||
],
|
|
||||||
activityId: [{ required: true, message: "请选择活动", trigger: "change" }],
|
|
||||||
deviceId: [
|
|
||||||
{ required: true, message: "请选择设备", trigger: "change" }
|
|
||||||
],
|
|
||||||
resolution: [
|
|
||||||
{ required: true, message: "分辨率不能为空", trigger: "blur" },
|
|
||||||
{
|
|
||||||
pattern: /^\d{3,4}[x×*]\d{3,4}$/i,
|
|
||||||
message: "请输入正确的分辨率格式(如1920x1080)",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
duration: [
|
|
||||||
{ required: true, message: "时长不能为空", trigger: "blur" },
|
|
||||||
{
|
|
||||||
pattern: /^[0-9]+(\.[0-9]{1,2})?$/,
|
|
||||||
message: "请输入有效的数字(可包含2位小数)",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
channelNumber: [
|
|
||||||
{ required: true, message: "通道号不能为空", trigger: "blur" },
|
|
||||||
{
|
|
||||||
pattern: /^[A-Za-z0-9-]+$/,
|
|
||||||
message: "通道号只能包含字母、数字和短横线",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
filePath: [
|
|
||||||
{ required: true, message: "文件地址不能为空", trigger: "blur" },
|
|
||||||
],
|
|
||||||
lng: [
|
|
||||||
{ required: true, message: "经度不能为空", trigger: "blur" },
|
|
||||||
{
|
|
||||||
pattern: /^-?\d{1,3}(\.\d{1,6})?$/,
|
|
||||||
message: "请输入有效的经度(-180到180之间)",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (value < -180 || value > 180) {
|
|
||||||
callback(new Error("经度范围应在-180到180之间"));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
lat: [
|
|
||||||
{ required: true, message: "纬度不能为空", trigger: "blur" },
|
|
||||||
{
|
|
||||||
pattern: /^-?\d{1,2}(\.\d{1,6})?$/,
|
|
||||||
message: "请输入有效的纬度(-90到90之间)",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (value < -90 || value > 90) {
|
|
||||||
callback(new Error("纬度范围应在-90到90之间"));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
address: [
|
|
||||||
{ required: true, message: "地址不能为空", trigger: "blur" },
|
|
||||||
{ max: 50, message: "地址长度不能超过50个字符", trigger: "blur" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
|
||||||
|
|
||||||
import { useRouter } from "vue-router";
|
|
||||||
const router = useRouter();
|
|
||||||
// 类型映射关系
|
|
||||||
const typeToTabMap = {
|
|
||||||
重点场所: "venue",
|
|
||||||
景区: "scenic",
|
|
||||||
景点: "scenic",
|
|
||||||
旅游景区: "scenic",
|
|
||||||
安保力量: "security",
|
|
||||||
安保: "security",
|
|
||||||
交通枢纽: "transport",
|
|
||||||
交通: "transport",
|
|
||||||
活动: "activity",
|
|
||||||
大型活动: "activity",
|
|
||||||
预警: "warning",
|
|
||||||
监测预警: "warning",
|
|
||||||
监控: "jiankong",
|
|
||||||
};
|
|
||||||
const handleActivityRowClickJK = (row) => {
|
|
||||||
|
|
||||||
// 关键:根据行数据的类型(row.types)匹配对应的地图标签
|
|
||||||
// 例如:如果 row.types 是 "监控",则匹配到 'jiankong' 标签
|
|
||||||
const monitoringTypeName = typeToTabMap[row.types] || 'jiankong'; // 默认为监控标签
|
|
||||||
goToMap(6, row.lat, row.lng, monitoringTypeName);
|
|
||||||
};
|
|
||||||
function goToMap(screenId, lat, lng, monitoringTypeName, extraParams = {}) {
|
|
||||||
if (!lat || !lng || isNaN(Number(lat)) || isNaN(Number(lng))) {
|
|
||||||
proxy.$modal.msgWarning("该记录缺少有效的经纬度信息,无法定位");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
router.push({
|
|
||||||
path: "/largeScreen",
|
|
||||||
query: {
|
|
||||||
screenId: screenId,
|
|
||||||
latitude: Number(lat).toFixed(6),
|
|
||||||
longitude: Number(lng).toFixed(6),
|
|
||||||
monitoringTypeName: monitoringTypeName,
|
|
||||||
...extraParams,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询设备list
|
|
||||||
function getsbList() {
|
|
||||||
getsbLists().then((res) => {
|
|
||||||
sbList.value = res.rows;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 查询设备list
|
|
||||||
function getsshebiList() {
|
|
||||||
getsbLists2().then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
sshebiList.value = res.rows;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/** 查询岗位列表 */
|
|
||||||
function getList() {
|
|
||||||
loading.value = true;
|
|
||||||
getklList(queryParams.value).then((response) => {
|
|
||||||
postList.value = response.rows;
|
|
||||||
total.value = response.total;
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 取消按钮 */
|
|
||||||
function cancel() {
|
|
||||||
open.value = false;
|
|
||||||
reset();
|
|
||||||
}
|
|
||||||
// 监控
|
|
||||||
import {
|
|
||||||
getvideoWws,
|
|
||||||
} from "@/api/camera";
|
|
||||||
import VideoMonitor from "../../../components/VideoMonitor.vue";
|
|
||||||
const currentVideoUrl = ref("");
|
|
||||||
const SPdialig = ref(false);
|
|
||||||
/** 查看监控 */
|
|
||||||
function handleVideo(row) {
|
|
||||||
if (row.filePath == null) {
|
|
||||||
proxy.$modal.msgSuccess("请检查该设备的国标编码");
|
|
||||||
} else {
|
|
||||||
// const _ids = row.id || ids.value;
|
|
||||||
let par = {
|
|
||||||
typeinfo: row.filePath,
|
|
||||||
};
|
|
||||||
getvideoWws(par).then((res) => {
|
|
||||||
if (res.code == 200 && res.msg != "") {
|
|
||||||
SPdialig.value = true;
|
|
||||||
nextTick(() => {
|
|
||||||
// initPlayer(1); // 单画面
|
|
||||||
// realplay(res.msg, 0); // 使用API返回的URL
|
|
||||||
currentVideoUrl.value = res.msg; // 假设API返回{ data: { url: 'ws://...' } }
|
|
||||||
SPdialig.value = true;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
proxy.$modal.msgWarning("暂无数据");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const handleVideoClose = () => {
|
|
||||||
SPdialig.value = false;
|
|
||||||
currentVideoUrl.value = ''
|
|
||||||
}
|
|
||||||
/** 表单重置 */
|
|
||||||
function reset() {
|
|
||||||
form.value = {
|
|
||||||
postId: undefined,
|
|
||||||
name: undefined,
|
|
||||||
types: undefined,
|
|
||||||
resolution: undefined,
|
|
||||||
duration: undefined,
|
|
||||||
isKeyDay: undefined,
|
|
||||||
startTime: undefined,
|
|
||||||
endTime: undefined,
|
|
||||||
standby: undefined,
|
|
||||||
dutyPhone: undefined,
|
|
||||||
lng: undefined,
|
|
||||||
lat: undefined,
|
|
||||||
};
|
|
||||||
proxy.resetForm("postRef");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
function handleQuery() {
|
|
||||||
queryParams.value.pageNum = 1;
|
|
||||||
|
|
||||||
// 这里修改为只更新时间参数,而不是覆盖整个queryParams
|
|
||||||
if (dateRange.value && dateRange.value.length === 2) {
|
|
||||||
queryParams.value.startTime = moment(dateRange.value[0]).format("YYYY-MM-DD HH:mm:ss");
|
|
||||||
queryParams.value.endTime = moment(dateRange.value[1]).format("YYYY-MM-DD HH:mm:ss");
|
|
||||||
} else {
|
|
||||||
// 如果dateRange为空,则清空时间参数
|
|
||||||
queryParams.value.startTime = undefined;
|
|
||||||
queryParams.value.endTime = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
function resetQuery() {
|
|
||||||
proxy.resetForm("queryRef");
|
|
||||||
dateRange.value = [];
|
|
||||||
handleQuery();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 多选框选中数据 */
|
|
||||||
function handleSelectionChange(selection) {
|
|
||||||
ids.value = selection.map((item) => item.id);
|
|
||||||
single.value = selection.length != 1;
|
|
||||||
multiple.value = !selection.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
function handleAdd() {
|
|
||||||
reset();
|
|
||||||
open.value = true;
|
|
||||||
title.value = "添加视频信息";
|
|
||||||
}
|
|
||||||
function getname(list, id) {
|
|
||||||
const item = list.find((item) => item.id == id);
|
|
||||||
return item ? item.activityName : undefined;
|
|
||||||
}
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
function handleUpdate(row) {
|
|
||||||
reset();
|
|
||||||
const postId = row.id || ids.value;
|
|
||||||
getklListedithx(postId).then((response) => {
|
|
||||||
// console.log(getname(sbList.value, response.data.deviceId));
|
|
||||||
form.value = response.data;
|
|
||||||
// form.value.deviceId = getname(sbList.value, response.data.deviceId);
|
|
||||||
open.value = true;
|
|
||||||
title.value = "修改视频信息";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
function submitForm() {
|
|
||||||
console.log(typeof form.value.name);
|
|
||||||
|
|
||||||
proxy.$refs["postRef"].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if (form.value.id != undefined) {
|
|
||||||
getklListedit(form.value).then((response) => {
|
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
|
||||||
open.value = false;
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
getklListadd(form.value).then((response) => {
|
|
||||||
proxy.$modal.msgSuccess("新增成功");
|
|
||||||
open.value = false;
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
function handleDelete(row) {
|
|
||||||
const postIds = row.id || ids.value;
|
|
||||||
console.log(postIds);
|
|
||||||
proxy.$modal
|
|
||||||
.confirm("是否确认删除所选数据项?")
|
|
||||||
.then(function () {
|
|
||||||
return getklListremove(postIds);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
getList();
|
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
function handleExport() {
|
|
||||||
proxy.download(
|
|
||||||
"large/videoStorageInformation/export",
|
|
||||||
{
|
|
||||||
...queryParams.value,
|
|
||||||
},
|
|
||||||
`活动监控信息_${new Date().getTime()}.xlsx`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
function getMap() {
|
|
||||||
window.open(
|
|
||||||
"https://lbs.amap.com/tools/picker",
|
|
||||||
"_blank",
|
|
||||||
"width=950,height=700"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
/** 导入按钮操作 */
|
|
||||||
function handleImport() {
|
|
||||||
upload.title = "活动监控信息导入";
|
|
||||||
upload.open = true;
|
|
||||||
}
|
|
||||||
/** 下载模板操作 */
|
|
||||||
function importTemplate() {
|
|
||||||
proxy.download(
|
|
||||||
"large/videoStorageInformation/importTemplate",
|
|
||||||
{},
|
|
||||||
`活动监控信息_${new Date().getTime()}.xlsx`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
/**文件上传中处理 */
|
|
||||||
const handleFileUploadProgress = (event, file, fileList) => {
|
|
||||||
upload.isUploading = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 文件上传成功处理 */
|
|
||||||
const handleFileSuccess = (response, file, fileList) => {
|
|
||||||
upload.open = false;
|
|
||||||
upload.isUploading = false;
|
|
||||||
proxy.$refs["uploadRef"].handleRemove(file);
|
|
||||||
proxy.$alert(
|
|
||||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
||||||
response.msg +
|
|
||||||
"</div>",
|
|
||||||
"导入结果",
|
|
||||||
{ dangerouslyUseHTMLString: true }
|
|
||||||
);
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 提交上传文件 */
|
|
||||||
function submitFileForm() {
|
|
||||||
proxy.$refs["uploadRef"].submit();
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
|
||||||
getList();
|
|
||||||
getsbList();
|
|
||||||
getsshebiList();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.map {
|
|
||||||
cursor: pointer;
|
|
||||||
color: #203f73;
|
|
||||||
}
|
|
||||||
/* 修改斑马纹的浅色行背景 */
|
|
||||||
::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
|
|
||||||
background-color: #dbe4f5 !important; /* 改为淡蓝色 */
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Loading…
Reference in New Issue