Fix: 修改演示平台机械设备智能安全帽模块

This commit is contained in:
Vce 2024-03-25 20:11:36 +08:00
parent 6082499024
commit a1c3eddc6f
5 changed files with 236 additions and 126 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -158,7 +158,7 @@
</el-checkbox-group> </el-checkbox-group>
</el-scrollbar> </el-scrollbar>
</div> </div>
<div v-else style="text-align: center; margin-top: 100px; color: #fff">暂无围栏</div> <div v-else style="text-align: center; margin-top: 65px; color: #fff">暂无围栏</div>
</div> </div>
<!-- 创建围栏弹窗 --> <!-- 创建围栏弹窗 -->
<div class="fenceCreate" v-if="fenceCreateShow"> <div class="fenceCreate" v-if="fenceCreateShow">
@ -168,7 +168,7 @@
</div> </div>
<!-- <div class="fence-title">创建围栏</div> --> <!-- <div class="fence-title">创建围栏</div> -->
<el-form size="medium" :model="addForm" ref="addFormRef" label-width="80px" :rules="formFenceRules"> <el-form size="medium" :model="addForm" ref="addFormRef" label-width="80px" :rules="formFenceRules">
<div class="bigFormBox"> <!-- <div class="bigFormBox">
<div class="itemBox1"> <div class="itemBox1">
<div>围栏名称</div> <div>围栏名称</div>
<div><el-input v-model="addForm.fenceName" placeholder="请输入"></el-input></div> <div><el-input v-model="addForm.fenceName" placeholder="请输入"></el-input></div>
@ -201,20 +201,19 @@
<div class="itemBox4" v-if="addForm.rangeType === 2"> <div class="itemBox4" v-if="addForm.rangeType === 2">
<div>围栏形状</div> <div>围栏形状</div>
<div> <div>
<!-- <div class="fence-shape">多边形</div> -->
<div class="">多边形</div> <div class="">多边形</div>
</div> </div>
</div> </div>
</div> </div> -->
<!-- <el-form-item class="el-form-item__label" label="围栏名称" prop="fenceName"> <div style="margin-top: 15%">
<el-form-item class="el-form-item__label" label="围栏名称" prop="fenceName">
<el-input v-model="addForm.fenceName" placeholder="请输入"></el-input> <el-input v-model="addForm.fenceName" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="范围类型" prop="rangeType"> <el-form-item label="范围类型" prop="rangeType">
<el-radio-group <el-radio-group
v-model="addForm.rangeType" v-model="addForm.rangeType"
style="display: flex; justify-content: space-between; padding-top: 10px; padding-right: 10px" style="display: flex; justify-content: space-between; padding-top: 0px; padding-right: 0px"
@change="changeAreaType" @change="changeAreaType"
> >
<el-radio :label="1">标准区域</el-radio> <el-radio :label="1">标准区域</el-radio>
@ -232,9 +231,10 @@
</el-form-item> </el-form-item>
<el-form-item label="围栏形状" prop="fenceShape" v-if="addForm.rangeType === 2"> <el-form-item label="围栏形状" prop="fenceShape" v-if="addForm.rangeType === 2">
<div class="fence-shape">多边形</div> <div class="fence-shape">多边形</div>
</el-form-item> --> </el-form-item>
</div>
<div class="cFooter"> <div class="cFooter">
<div class="tool tool1" @click="handleCancel">取消</div> <div class="tool tool1" @click="closeFenceCreate">取消</div>
<div class="tool tool2" @click="submitFence(addFormRef)">保存</div> <div class="tool tool2" @click="submitFence(addFormRef)">保存</div>
</div> </div>
</el-form> </el-form>
@ -281,20 +281,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
// import { getWorkerInfoList } from "@/assets/js/api/laborPerson";
import {
getAlarmRecordInfo,
getCarDevOption,
addstandardDevApi,
getRealtimeRecordInfo,
getRealtimeRecordList,
getVehiclePositionDayRecord
} from "@/api/modules/equipmentPosition";
import { import {
getFenceTypeTotal,
getVehiclePositionFence,
addVehiclePositionFence,
getEpDevOptionApi, getEpDevOptionApi,
getEpTypeTotalApi, getEpTypeTotalApi,
getEpSuroundInfoApi, getEpSuroundInfoApi,
@ -314,7 +302,8 @@ import personOff from "@/assets/images/carPosition/personOff.png";
import startIcon from "@/assets/images/carPosition/startIcon.png"; import startIcon from "@/assets/images/carPosition/startIcon.png";
import endIcon from "@/assets/images/carPosition/endIcon.png"; import endIcon from "@/assets/images/carPosition/endIcon.png";
import personOn from "@/assets/images/carPosition/personOn.png"; import personOn from "@/assets/images/carPosition/personOn.png";
import equipmentPosition from "@/assets/images/carPosition/equipmentPosition2.png"; import equipmentPosition2 from "@/assets/images/carPosition/equipmentPosition2.png";
import equipmentPosition3 from "@/assets/images/carPosition/equipmentPosition3.png";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import type { FormInstance, FormRules } from "element-plus"; import type { FormInstance, FormRules } from "element-plus";
@ -366,6 +355,23 @@ let addForm = ref({
projectSn: "", projectSn: "",
enterpriseId: "" enterpriseId: ""
}); });
let formFenceRules = ref({
fenceName: [
{
required: true,
message: "必填",
trigger: "blur"
},
{ min: 1, max: 20, message: "长度在 1 到 20 个字符", trigger: "blur" }
], //
areaRadius: [
{
required: true,
message: "必填",
trigger: "change"
}
]
});
let pagInfo = ref({ let pagInfo = ref({
pageNo: 1, // pageNo: 1, //
pageSize: 10, // pageSize: 10, //
@ -399,7 +405,7 @@ let addEditForm = ref({
driver: "" driver: ""
}); });
onMounted(() => { onMounted(() => {
// choiceMonth.value = formatMonthTime(dayValue.value); choiceMonth.value = formatMonthTime(dayValue.value);
// console.log("", choiceMonth.value); // console.log("", choiceMonth.value);
initMap(); initMap();
getProgressListData(); getProgressListData();
@ -431,6 +437,24 @@ watch(choiceMonth, newVal => {
}); });
function handleCancel() { function handleCancel() {
fenceCreateShow.value = false; fenceCreateShow.value = false;
addForm.value = {
areaRadius: 100, //
fenceName: "", //
addr: "",
rangeType: 1,
locationList: [
{
fenceId: 0,
id: 0,
latitude: "",
longitude: "",
sortNum: 0
}
],
projectSn: "",
enterpriseId: ""
};
exitEditFn();
clearFn(); clearFn();
} }
@ -507,7 +531,7 @@ function deleteFenceInfo(idGroups) {
}); });
} }
const submitFence = async (formEL: FormInstance | undefined) => { const submitFence = async (formEL: FormInstance | undefined) => {
if (locationList.value.length == 0) { if (locationList.value.length === 0) {
ElMessage({ ElMessage({
showClose: true, showClose: true,
message: "未设置围栏区域!", message: "未设置围栏区域!",
@ -607,7 +631,7 @@ function getTodayTrack(day) {
const element = res.result[index]; const element = res.result[index];
path.unshift([element.longitude, element.latitude]); path.unshift([element.longitude, element.latitude]);
} }
trackMapInit(path, currentData); if(checked.value == 2) trackMapInit(path, currentData);
} }
console.log("当前数据", path, currentData); console.log("当前数据", path, currentData);
}); });
@ -710,12 +734,7 @@ function openFenceCreate() {
// //
function closeFenceCreate() { function closeFenceCreate() {
fenceCreateShow.value = false; fenceCreateShow.value = false;
addForm.value = { let tempArr = [
areaRadius: 100, //
fenceName: "", //
addr: "",
rangeType: 1,
locationList: [
{ {
fenceId: 0, fenceId: 0,
id: 0, id: 0,
@ -723,7 +742,13 @@ function closeFenceCreate() {
longitude: "", longitude: "",
sortNum: 0 sortNum: 0
} }
], ];
addForm.value = {
areaRadius: 100, //
fenceName: "", //
addr: "",
rangeType: 1,
locationList: tempArr,
projectSn: "", projectSn: "",
enterpriseId: "" enterpriseId: ""
}; };
@ -1037,7 +1062,8 @@ function trackMapInit(path: any, item: any) {
map: map, map: map,
position: path[0], position: path[0],
// icon: "https://webapi.amap.com/images/car.png", // icon: "https://webapi.amap.com/images/car.png",
icon: "src/assets/images/carPosition/equipmentPosition2.png", // icon: "src/assets/images/equipmentPosition2.png",
icon: equipmentPosition3,
offset: new AMap.Pixel(-26, -13), offset: new AMap.Pixel(-26, -13),
autoRotation: true, autoRotation: true,
angle: -90 angle: -90
@ -1077,6 +1103,7 @@ function trackMapInit(path: any, item: any) {
info.push('<p style="padding:7px;">设备名称: ' + item.equipmentName + "</p>"); info.push('<p style="padding:7px;">设备名称: ' + item.equipmentName + "</p>");
info.push('<p style="padding:7px;">最后更新时间: ' + item.updateTime + "</p>"); info.push('<p style="padding:7px;">最后更新时间: ' + item.updateTime + "</p>");
info.push('<p style="padding:7px;">位置: ' + address + "</p>"); info.push('<p style="padding:7px;">位置: ' + address + "</p>");
info.push('<p style="padding:7px;">经纬度: ' + item.longitude + "|" + item.latitude + "</p>");
var infoWindow = new AMap.InfoWindow({ var infoWindow = new AMap.InfoWindow({
offset: new AMap.Pixel(10, -30), offset: new AMap.Pixel(10, -30),
content: info.join("") //使 content: info.join("") //使
@ -1358,7 +1385,8 @@ function echoCarMarker(item) {
position: lnglats[i], position: lnglats[i],
map: map, map: map,
// icon: "https://webapi.amap.com/images/car.png" // // icon: "https://webapi.amap.com/images/car.png" //
icon: "src/assets/images/carPosition/equipmentPosition2.png" // icon: "src/assets/images/equipmentPosition2.png"
icon: equipmentPosition2
}); });
// marker.content = '' + (i + 1) + 'Marker'; // marker.content = '' + (i + 1) + 'Marker';
marker.on("click", markerClick); marker.on("click", markerClick);
@ -1412,13 +1440,14 @@ function echoPersonMarker(item) {
position: lnglats[i], position: lnglats[i],
map: map, map: map,
// icon: personOn // // icon: personOn //
icon: "src/assets/images/carPosition/equipmentPosition2.png" // // icon: "src/assets/images/equipmentPosition2.png" //
icon: equipmentPosition2 //
}); });
marker.on("click", markerClick); marker.on("click", markerClick);
marker.emit("click", { target: marker }); marker.emit("click", { target: marker });
} }
} }
let address = "未知"; let address = "<text style='color: darkred;font-weight:bolder'>未知</text>";
AMap.plugin("AMap.Geocoder", function () { AMap.plugin("AMap.Geocoder", function () {
let geocoder = new AMap.Geocoder(); let geocoder = new AMap.Geocoder();
@ -1447,6 +1476,7 @@ function echoPersonMarker(item) {
info.push('<p style="padding:7px;">设备名称: ' + item.equipmentName + "</p>"); info.push('<p style="padding:7px;">设备名称: ' + item.equipmentName + "</p>");
info.push('<p style="padding:7px;">最后更新时间: ' + item.updateTime + "</p>"); info.push('<p style="padding:7px;">最后更新时间: ' + item.updateTime + "</p>");
info.push('<p style="padding:7px;">位置: ' + address + "</p>"); info.push('<p style="padding:7px;">位置: ' + address + "</p>");
info.push('<p style="padding:7px;">经纬度: ' + item.longitude + " | " + item.latitude + "</p>");
var infoWindow = new AMap.InfoWindow({ var infoWindow = new AMap.InfoWindow({
offset: new AMap.Pixel(10, -30), offset: new AMap.Pixel(10, -30),
@ -1533,7 +1563,7 @@ function echoPersonMarker(item) {
background-size: 100% 100%; background-size: 100% 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 25px; padding: 25px;
width: 330px; width: 360px;
height: 380px; height: 380px;
left: 40px; left: 40px;
top: 40px; top: 40px;
@ -1560,6 +1590,12 @@ function echoPersonMarker(item) {
color: rgba(255, 255, 255, 0.6); color: rgba(255, 255, 255, 0.6);
font-size: 18px; font-size: 18px;
} }
:deep(.el-form-item__label) {
color: #fff;
}
:deep(.el-radio__label) {
color: #fff;
}
.cFooter { .cFooter {
width: 70%; width: 70%;
display: flex; display: flex;
@ -1902,6 +1938,16 @@ function echoPersonMarker(item) {
margin-top: 1% !important; margin-top: 1% !important;
} }
} }
:deep(.titltText) {
margin: 0 0 0 0;
height: 100%;
margin-left: 0.08rem;
margin-top: -0.03rem;
display: flex;
align-items: center;
letter-spacing: 0.01rem;
}
.wei-lan { .wei-lan {
.icon-off { .icon-off {
position: absolute; position: absolute;
@ -1961,9 +2007,18 @@ function echoPersonMarker(item) {
position: relative; position: relative;
:deep(.h-card) { :deep(.h-card) {
.content { .content {
margin-top: 1% !important; margin-top: 1.25% !important;
} }
} }
:deep(.titltText) {
margin: 0 0 0 0;
height: 100%;
margin-left: 0.08rem;
margin-top: -0.025rem;
display: flex;
align-items: center;
letter-spacing: 0.01rem;
}
.bottom-left { .bottom-left {
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@ -17,7 +17,12 @@
<el-form :inline="true" size="medium" :model="queryInfo" class="demo-form-inline" style="margin-left: 15px"> <el-form :inline="true" size="medium" :model="queryInfo" class="demo-form-inline" style="margin-left: 15px">
<el-form-item> <el-form-item>
<el-select filterable v-model="queryInfo.devSn" placeholder="请选择或搜索" @change="devChange"> <el-select filterable v-model="queryInfo.devSn" placeholder="请选择或搜索" @change="devChange">
<el-option v-for="(item, index) in nameOptions" :key="index" :label="item.label" :value="item.value"></el-option> <el-option
v-for="(item, index) in nameOptions"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
<!-- <el-option v-for="(item, index) in devList" :key="index" :label="item.workerName" :value="item.devSn" ></el-option> --> <!-- <el-option v-for="(item, index) in devList" :key="index" :label="item.workerName" :value="item.devSn" ></el-option> -->
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -70,7 +75,12 @@
<el-form-item> <el-form-item>
<span style="color: #fff; margin-left: 25px; margin-right: 10px">人员名称</span> <span style="color: #fff; margin-left: 25px; margin-right: 10px">人员名称</span>
<el-select filterable v-model="queryInfo.devSn" placeholder="请选择或搜索" @change="devChange" clearable> <el-select filterable v-model="queryInfo.devSn" placeholder="请选择或搜索" @change="devChange" clearable>
<el-option v-for="(item, index) in nameOptions" :key="index" :label="item.label" :value="item.value"></el-option> <el-option
v-for="(item, index) in nameOptions"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
<!-- <el-option v-for="(item, index) in devList" :key="index" :label="item.workerName" :value="item.workerInfoId" ></el-option> --> <!-- <el-option v-for="(item, index) in devList" :key="index" :label="item.workerName" :value="item.workerInfoId" ></el-option> -->
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -106,7 +116,7 @@
<div style="width: 50%">{{ item.fenceName }}</div> <div style="width: 50%">{{ item.fenceName }}</div>
<div style="width: 50%">{{ item.workerNum }}</div> <div style="width: 50%">{{ item.workerNum }}</div>
</div> </div>
<div class="not-data" v-if="fenceList.length == 0"> <div class="not-data" style="top: 20%" v-if="fenceList.length == 0">
<img src="@/assets/images/noData.png" alt="" /> <img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
@ -167,7 +177,7 @@
</el-checkbox-group> </el-checkbox-group>
</el-scrollbar> </el-scrollbar>
</div> </div>
<div v-else style="text-align: center; margin-top: 100px; color: #fff">暂无围栏</div> <div v-else style="text-align: center; margin-top: 65px; color: #fff">暂无围栏</div>
</div> </div>
<!-- 创建围栏弹窗 --> <!-- 创建围栏弹窗 -->
@ -178,7 +188,7 @@
</div> </div>
<!-- <div class="fence-title">创建围栏</div> --> <!-- <div class="fence-title">创建围栏</div> -->
<el-form size="medium" :model="addForm" ref="addFormRef" label-width="80px" :rules="formFenceRules"> <el-form size="medium" :model="addForm" ref="addFormRef" label-width="80px" :rules="formFenceRules">
<div class="bigFormBox"> <!-- <div class="bigFormBox">
<div class="itemBox1"> <div class="itemBox1">
<div>围栏名称</div> <div>围栏名称</div>
<div><el-input v-model="addForm.fenceName" placeholder="请输入"></el-input></div> <div><el-input v-model="addForm.fenceName" placeholder="请输入"></el-input></div>
@ -211,19 +221,19 @@
<div class="itemBox4" v-if="addForm.rangeType === 2"> <div class="itemBox4" v-if="addForm.rangeType === 2">
<div>围栏形状</div> <div>围栏形状</div>
<div> <div>
<!-- <div class="fence-shape">多边形</div> -->
<div class="">多边形</div> <div class="">多边形</div>
</div> </div>
</div> </div>
</div> </div> -->
<!-- <el-form-item label="围栏名称" prop="fenceName"> <div style="margin-top: 15%">
<el-form-item label="围栏名称" prop="fenceName">
<el-input v-model="addForm.fenceName" placeholder="请输入"></el-input> <el-input v-model="addForm.fenceName" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="范围类型" prop="rangeType"> <el-form-item label="范围类型" prop="rangeType">
<el-radio-group <el-radio-group
v-model="addForm.rangeType" v-model="addForm.rangeType"
style="display: flex; justify-content: space-between; padding-top: 10px; padding-right: 10px" style="display: flex; justify-content: space-between; padding-top: 0px; padding-right: 0px"
@change="changeAreaType" @change="changeAreaType"
> >
<el-radio :label="1">标准区域</el-radio> <el-radio :label="1">标准区域</el-radio>
@ -242,7 +252,9 @@
<el-form-item label="围栏形状" prop="fenceShape" v-if="addForm.rangeType === 2"> <el-form-item label="围栏形状" prop="fenceShape" v-if="addForm.rangeType === 2">
<div class="fence-shape">多边形</div> <div class="fence-shape">多边形</div>
</el-form-item> </el-form-item>
<div class="create-footer"> </div>
<!-- <div class="create-footer">
<el-button class="cancleBtn" @click="fenceCreateShow = false" icon="el-icon-circle-close" size="medium" <el-button class="cancleBtn" @click="fenceCreateShow = false" icon="el-icon-circle-close" size="medium"
>取消 >取消
</el-button> </el-button>
@ -252,7 +264,7 @@
</div> --> </div> -->
<div class="cFooter"> <div class="cFooter">
<div class="tool tool1" @click="handleCancel">取消</div> <div class="tool tool1" @click="closeFenceCreate">取消</div>
<div class="tool tool2" @click="submitFence(addFormRef)">保存</div> <div class="tool tool2" @click="submitFence(addFormRef)">保存</div>
</div> </div>
</el-form> </el-form>
@ -289,18 +301,18 @@
<div class="bottom-left"> <div class="bottom-left">
<div class="left-content"> <div class="left-content">
<div class="tab-list"> <div class="tab-list">
<div style="width: 5%">序号</div> <div style="width: 10%">序号</div>
<div style="width: 15%">人员名称</div> <div style="width: 15%">人员名称</div>
<div style="width: 15%">设备序号</div> <div style="width: 15%">设备序号</div>
<div style="width: 25%">报警时间</div> <div style="width: 20%">报警时间</div>
<div style="width: 40%">报警信息</div> <div style="width: 40%">报警信息</div>
</div> </div>
<el-scrollbar class="list-box"> <el-scrollbar class="list-box">
<div v-for="(item, index) in listData" class="list-style" :key="item.id"> <div v-for="(item, index) in listData" class="list-style" :key="item.id">
<div style="width: 5%">{{ index + 1 }}</div> <div style="width: 10%">{{ index + 1 }}</div>
<div style="width: 15%">{{ item.workerName }}</div> <div style="width: 15%">{{ item.workerName }}</div>
<div style="width: 15%">{{ item.devSn }}</div> <div style="width: 15%">{{ item.devSn }}</div>
<div style="width: 25%">{{ item.createTime }}</div> <div style="width: 20%">{{ item.createTime }}</div>
<div style="width: 40%">{{ item.alarmInfo }}</div> <div style="width: 40%">{{ item.alarmInfo }}</div>
</div> </div>
<div class="not-data" v-if="listData.length == 0"> <div class="not-data" v-if="listData.length == 0">
@ -382,7 +394,12 @@ let isIndeterminateFence = ref(true);
let checked = ref(1); let checked = ref(1);
let devName = ref(""); let devName = ref("");
let locationList = ref([]); let locationList = ref([]);
interface RuleForm {
// fenceName: string
// areaRadius: number
}
let addFormRef = ref<FormInstance>(); let addFormRef = ref<FormInstance>();
// const addForm = reactive<RuleForm>({
let addForm = ref({ let addForm = ref({
areaRadius: 100, // areaRadius: 100, //
fenceName: "", // fenceName: "", //
@ -432,6 +449,7 @@ let addEditForm = ref({
type: 1, type: 1,
driver: "" driver: ""
}); });
// const formFenceRules = reactive<FormRules<RuleForm>({
let formFenceRules = ref({ let formFenceRules = ref({
fenceName: [ fenceName: [
{ {
@ -600,7 +618,7 @@ function deleteFenceInfo(idGroups) {
}); });
} }
const submitFence = async (formEL: FormInstance | undefined) => { const submitFence = async (formEL: FormInstance | undefined) => {
if (locationList.value.length == 0) { if (locationList.value.length === 0) {
ElMessage({ ElMessage({
showClose: true, showClose: true,
message: "未设置围栏区域!", message: "未设置围栏区域!",
@ -1324,7 +1342,8 @@ function trackMapInit(path: any, item: any) {
map: map, map: map,
position: path[0], position: path[0],
// icon: "https://webapi.amap.com/images/car.png", // icon: "https://webapi.amap.com/images/car.png",
icon: "src/assets/images/smartSafeHat.png", // // icon: "src/assets/images/smartSafeHat.png", //
icon: smartSafeHat, //
// icon: "@/assets/images/carPosition/carIcon.png", // // icon: "@/assets/images/carPosition/carIcon.png", //
// icon: "src/assets/images/carPosition/carIcon.png", // // icon: "src/assets/images/carPosition/carIcon.png", //
offset: new AMap.Pixel(-26, -13), offset: new AMap.Pixel(-26, -13),
@ -1367,6 +1386,7 @@ function trackMapInit(path: any, item: any) {
info.push('<p style="padding:7px;">人员名称: ' + item.workerName + "</p>"); info.push('<p style="padding:7px;">人员名称: ' + item.workerName + "</p>");
info.push('<p style="padding:7px;">最后更新时间: ' + item.updateTime + "</p>"); info.push('<p style="padding:7px;">最后更新时间: ' + item.updateTime + "</p>");
info.push('<p style="padding:7px;">位置: ' + address + "</p>"); info.push('<p style="padding:7px;">位置: ' + address + "</p>");
// info.push('<p style="padding:7px;">: ' + address + "</p>");
var infoWindow = new AMap.InfoWindow({ var infoWindow = new AMap.InfoWindow({
offset: new AMap.Pixel(30, -30), offset: new AMap.Pixel(30, -30),
content: info.join("") //使 content: info.join("") //使
@ -1396,11 +1416,15 @@ function initMap() {
var autoOptions = { var autoOptions = {
input: "tipinput" input: "tipinput"
}; };
let auto = new AMap.Autocomplete(autoOptions); // >>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<
placeSearch = new AMap.PlaceSearch({
map: map // let auto = new AMap.Autocomplete(autoOptions);
}); // // placeSearch = new AMap.PlaceSearch({
AMap.event.addListener(auto, "select", select); // // map: map
// }); //
// AMap.event.addListener(auto, "select", select); //
// >>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<
mouseTool = new AMap.MouseTool(map); mouseTool = new AMap.MouseTool(map);
mouseTool.on("draw", function (event) { mouseTool.on("draw", function (event) {
// event.obj // event.obj
@ -1660,7 +1684,8 @@ function echoCarMarker(item) {
position: lnglats[i], position: lnglats[i],
map: map, map: map,
// icon: "https://webapi.amap.com/images/car.png" // // icon: "https://webapi.amap.com/images/car.png" //
icon: "src/assets/images/smartSafeHat.png" // // icon: "src/assets/images/smartSafeHat.png" //
icon: smartSafeHat //
// icon: "@/assets/images/carPosition/carIcon.png" // // icon: "@/assets/images/carPosition/carIcon.png" //
// icon: "src/assets/images/carPosition/carIcon.png" // // icon: "src/assets/images/carPosition/carIcon.png" //
}); });
@ -1716,13 +1741,14 @@ function echoPersonMarker(item) {
// position: lnglats[i], // position: lnglats[i],
position: lnglats[0], position: lnglats[0],
map: map, map: map,
icon: personOn // // icon: personOn //
icon: smartSafeHat2 //
}); });
marker.on("click", markerClick); marker.on("click", markerClick);
marker.emit("click", { target: marker }); marker.emit("click", { target: marker });
} }
} }
let address = "未知"; let address = "<text style='color: darkred;font-weight:bolder'>未知</text>";
AMap.plugin("AMap.Geocoder", function () { AMap.plugin("AMap.Geocoder", function () {
let geocoder = new AMap.Geocoder(); let geocoder = new AMap.Geocoder();
@ -1754,6 +1780,7 @@ function echoPersonMarker(item) {
info.push('<p style="padding:7px;">人员名称: ' + item.workerName + "</p>"); info.push('<p style="padding:7px;">人员名称: ' + item.workerName + "</p>");
info.push('<p style="padding:7px;">最后更新时间: ' + item.updateTime + "</p>"); info.push('<p style="padding:7px;">最后更新时间: ' + item.updateTime + "</p>");
info.push('<p style="padding:7px;">位置: ' + address + "</p>"); info.push('<p style="padding:7px;">位置: ' + address + "</p>");
info.push('<p style="padding:7px;">经纬度: ' + item.longitude + "|" + item.latitude + "</p>");
var infoWindow = new AMap.InfoWindow({ var infoWindow = new AMap.InfoWindow({
offset: new AMap.Pixel(10, -30), offset: new AMap.Pixel(10, -30),
@ -1838,7 +1865,7 @@ function echoPersonMarker(item) {
background-size: 100% 100%; background-size: 100% 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 25px; padding: 25px;
width: 330px; width: 360px;
height: 380px; height: 380px;
left: 40px; left: 40px;
top: 40px; top: 40px;
@ -1856,7 +1883,6 @@ function echoPersonMarker(item) {
.create-footer { .create-footer {
margin: 100px 0 0 50px; margin: 100px 0 0 50px;
} }
}
.close-icon { .close-icon {
position: absolute; position: absolute;
right: 0%; right: 0%;
@ -1865,6 +1891,12 @@ function echoPersonMarker(item) {
color: rgba(255, 255, 255, 0.6); color: rgba(255, 255, 255, 0.6);
font-size: 18px; font-size: 18px;
} }
:deep(.el-form-item__label) {
color: #fff;
}
:deep(.el-radio__label) {
color: #fff;
}
.cFooter { .cFooter {
width: 70%; width: 70%;
display: flex; display: flex;
@ -1898,7 +1930,6 @@ function echoPersonMarker(item) {
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
.bigFormBox { .bigFormBox {
width: 100%; width: 100%;
display: flex; display: flex;
@ -1989,6 +2020,7 @@ function echoPersonMarker(item) {
} }
} }
} }
}
.fence-box { .fence-box {
position: relative; position: relative;
.dialog-title { .dialog-title {
@ -2188,14 +2220,20 @@ function echoPersonMarker(item) {
} }
.bottom-data { .bottom-data {
margin-top: 1%; margin-top: 1%;
height: 40%; height: 40.8%;
:deep(.h-card) {
.content {
margin-top: 4% !important;
}
}
.left-content { .left-content {
height: 100%; height: 100%;
width: 100%; width: 100%;
.tab-list { .tab-list {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
width: 100%; width: 100%;
height: 10%; height: 10%;
background: url("@/assets/images/vehicleManagement/ListTitleImg.png") no-repeat; background: url("@/assets/images/vehicleManagement/ListTitleImg.png") no-repeat;
@ -2265,6 +2303,15 @@ function echoPersonMarker(item) {
margin-top: 1% !important; margin-top: 1% !important;
} }
} }
:deep(.titltText) {
margin: 0 0 0 0;
height: 100%;
margin-left: 0.08rem;
margin-top: -0.03rem;
display: flex;
align-items: center;
letter-spacing: 0.01rem;
}
.wei-lan { .wei-lan {
.icon-off { .icon-off {
position: absolute; position: absolute;
@ -2331,7 +2378,8 @@ function echoPersonMarker(item) {
position: relative; position: relative;
:deep(.h-card) { :deep(.h-card) {
.content { .content {
margin-top: 1% !important; margin-top: 4.65% !important;
// margin-top: 0;
} }
} }
.hat-container { .hat-container {
@ -2380,10 +2428,8 @@ function echoPersonMarker(item) {
margin-top: 20px; margin-top: 20px;
height: 100%; height: 100%;
position: relative; position: relative;
:deep(.h-card) { :deep(.content) {
.content { margin-top: 4.2% !important;
margin-top: 1% !important;
}
} }
div { div {
} }
@ -2396,14 +2442,23 @@ function echoPersonMarker(item) {
position: relative; position: relative;
:deep(.h-card) { :deep(.h-card) {
.content { .content {
margin-top: 1% !important; margin-top: 2.1% !important;
} }
} }
:deep(.titltText) {
// margin: 0 0 0 0;
// height: 100%;
// margin-left: 0.08rem;
// margin-top: -0.025rem;
// display: flex;
// align-items: center;
// letter-spacing: 0.01rem;
}
.bottom-left { .bottom-left {
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 2%; // padding: 0 2%;
.left-content { .left-content {
height: 100%; height: 100%;
width: 100%; width: 100%;