2025年05月14日18:12:38
This commit is contained in:
parent
c6c2e541f8
commit
b0f807597d
@ -1,11 +1,6 @@
|
||||
# VITE_APP_URL = 'http://192.168.3.116:8001/'
|
||||
# VITE_APP_URL_WEBSOCKET = 'http://192.168.3.116:8000/api/websocket'
|
||||
|
||||
# VITE_APP_URL = 'http://47.112.185.26:8001/'
|
||||
# VITE_APP_URL_WEBSOCKET = 'ws://47.112.185.26:8000/api/websocket'
|
||||
|
||||
VITE_APP_URL = 'http://api.handcuff.zhuhaiguangdun.cn'
|
||||
VITE_APP_URL_WEBSOCKET = 'ws://device.handcuff.zhuhaiguangdun.cn:8000/api/websocket'
|
||||
|
||||
# VITE_APP_URL = 'http://api.handcuff.youaikang.cn'
|
||||
# VITE_APP_URL_WEBSOCKET = 'http://device.handcuff.youaikang.cn:8000/api/websocket'
|
||||
|
@ -1,5 +1,5 @@
|
||||
VITE_APP_URL = 'http://47.112.185.26:8001/'
|
||||
VITE_APP_URL_WEBSOCKET = 'ws://47.112.185.26:8000/api/websocket'
|
||||
# VITE_APP_URL = 'http://47.112.185.26:8001/'
|
||||
# VITE_APP_URL_WEBSOCKET = 'ws://47.112.185.26:8000/api/websocket'
|
||||
|
||||
# VITE_APP_URL = 'http://api.handcuff.zhuhaiguangdun.cn'
|
||||
# VITE_APP_URL_WEBSOCKET = 'ws://device.handcuff.zhuhaiguangdun.cn:8000/api/websocket'
|
||||
VITE_APP_URL = 'http://api.handcuff.zhuhaiguangdun.cn'
|
||||
VITE_APP_URL_WEBSOCKET = 'ws://device.handcuff.zhuhaiguangdun.cn:8000/api/websocket'
|
@ -1,46 +0,0 @@
|
||||
{
|
||||
"list": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "管理员",
|
||||
"key": "admin",
|
||||
"status": true,
|
||||
"permiss": [
|
||||
"0",
|
||||
"1",
|
||||
"11",
|
||||
"12",
|
||||
"13",
|
||||
"2",
|
||||
"21",
|
||||
"22",
|
||||
"23",
|
||||
"24",
|
||||
"3",
|
||||
"31",
|
||||
"32",
|
||||
"33",
|
||||
"331",
|
||||
"332",
|
||||
"4",
|
||||
"41",
|
||||
"42",
|
||||
"5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "普通用户",
|
||||
"key": "user",
|
||||
"status": true,
|
||||
"permiss": [
|
||||
"0",
|
||||
"1",
|
||||
"11",
|
||||
"12",
|
||||
"13"
|
||||
]
|
||||
}
|
||||
],
|
||||
"pageTotal": 2
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
{
|
||||
"list": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "张三",
|
||||
"money": 123,
|
||||
"address": "广东省东莞市长安镇",
|
||||
"state": true,
|
||||
"date": "2019-11-1",
|
||||
"thumb": "https://lin-xin.gitee.io/images/post/wms.png"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "李四",
|
||||
"money": 456,
|
||||
"address": "广东省广州市白云区",
|
||||
"state": true,
|
||||
"date": "2019-10-11",
|
||||
"thumb": "https://lin-xin.gitee.io/images/post/node3.png"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "王五",
|
||||
"money": 789,
|
||||
"address": "湖南省长沙市",
|
||||
"state": false,
|
||||
"date": "2019-11-11",
|
||||
"thumb": "https://lin-xin.gitee.io/images/post/parcel.png"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "赵六",
|
||||
"money": 1011,
|
||||
"address": "福建省厦门市鼓浪屿",
|
||||
"state": true,
|
||||
"date": "2019-10-20",
|
||||
"thumb": "https://lin-xin.gitee.io/images/post/notice.png"
|
||||
}
|
||||
],
|
||||
"pageTotal": 4
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"list": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "张三",
|
||||
"password": "123",
|
||||
"email": "123@qq.com",
|
||||
"phone": "12345678944",
|
||||
"date": "2024-01-01",
|
||||
"role": "管理员"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "李四",
|
||||
"password": "123",
|
||||
"email": "1234@qq.com",
|
||||
"phone": "12345678945",
|
||||
"date": "2024-01-01",
|
||||
"role": "普通用户"
|
||||
}
|
||||
],
|
||||
"pageTotal": 2
|
||||
}
|
1
src/api/index.d.ts
vendored
1
src/api/index.d.ts
vendored
@ -337,6 +337,7 @@ export namespace TWarningDetail {
|
||||
creatUser: string
|
||||
createTime: string
|
||||
deviceId: string
|
||||
polygon?: string
|
||||
healthData: THealthData[]
|
||||
id: number
|
||||
lat: number
|
||||
|
@ -39,6 +39,25 @@ export class MapCustom {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
polygon(list) {
|
||||
if (!list) return;
|
||||
let pathList = [];
|
||||
list.forEach((item, index) => {
|
||||
let lngLat = new AMap.LngLat(item.lng, item.lat);
|
||||
pathList.push(lngLat);
|
||||
});
|
||||
const circle = new AMap.Polygon({
|
||||
map: this.map,
|
||||
path: pathList, // 圆心位置
|
||||
strokeWeight: 2,
|
||||
strokeStyle: "solid",
|
||||
fillColor: "#00aeff57",
|
||||
strokeColor: "#00AEFF", //描边颜色
|
||||
fillOpacity: 0.3, //填充透明度
|
||||
});
|
||||
this.map.add([circle])
|
||||
}
|
||||
draw() {
|
||||
return new Promise((resolve) => {
|
||||
this.drawResolve = resolve;
|
||||
|
@ -86,7 +86,7 @@
|
||||
<script setup lang="ts" name="incidentDispose">
|
||||
import location from "@/assets/img/location.png";
|
||||
import { MapCustom } from "@/utils/mapCustom";
|
||||
import { onMounted, ref, reactive, watch, onDeactivated, onUnmounted } from "vue";
|
||||
import { onMounted, ref, reactive, watch, onDeactivated, onUnmounted, nextTick } from "vue";
|
||||
import Upload from "@/components/upload-img.vue";
|
||||
import * as echarts from "echarts";
|
||||
import { warningDetail, warningConfirm } from "@/api/index";
|
||||
@ -235,6 +235,7 @@ let curData = ref<TWarningDetail.TRes>({
|
||||
lng: 0,
|
||||
maxValue: 0,
|
||||
minValue: 0,
|
||||
polygon: "",
|
||||
rcontent: "",
|
||||
rimg: [],
|
||||
rname: "",
|
||||
@ -273,7 +274,6 @@ const getData = async () => {
|
||||
ruleForm.username = res.rname;
|
||||
ruleForm.content = res.rcontent;
|
||||
ruleForm.images = JSON.parse(res.rimg);
|
||||
|
||||
if (res.healthData && res.healthData.length) {
|
||||
res.healthData.forEach((item) => {
|
||||
options.xAxis.data.push(item.time);
|
||||
@ -293,6 +293,10 @@ const getData = async () => {
|
||||
InfoWin = map.infoWindow();
|
||||
InfoWin.open(map.map, marker.getPosition());
|
||||
});
|
||||
if (res.polygon) {
|
||||
res.polygon = JSON.parse(res.polygon);
|
||||
map.polygon(res.polygon);
|
||||
}
|
||||
} catch (error) {}
|
||||
};
|
||||
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
@ -314,7 +318,7 @@ useResize(() => {
|
||||
onMounted(() => {
|
||||
getData();
|
||||
try {
|
||||
map = new MapCustom({ dom: "mapcontainer", center: [116.406315, 39.908775] });
|
||||
map = new MapCustom({ dom: "mapcontainer", center: [116.406315, 39.908775], zoom: 18 });
|
||||
} catch (error) {}
|
||||
if (chartRef.value) {
|
||||
myChart = echarts.init(chartRef.value);
|
||||
|
@ -60,13 +60,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<span class="lable">模式选择:</span>
|
||||
<el-select
|
||||
:teleported="false"
|
||||
v-model="item.mode"
|
||||
placeholder="请选择模式"
|
||||
style="width: 200px"
|
||||
@change="(e) => handleSelect(e, item.deviceId)"
|
||||
>
|
||||
<el-select :teleported="false" v-model="item.mode" placeholder="请选择模式" style="width: 200px" @change="(e) => handleSelect(e, item)">
|
||||
<el-option label="常规模式" :value="0" />
|
||||
<el-option label="审讯模式" :value="1" />
|
||||
<el-option label="户外押送模式" :value="2" />
|
||||
@ -132,9 +126,10 @@ const getdeviceList = async () => {
|
||||
}
|
||||
};
|
||||
// 切换模式
|
||||
const handleSelect = (mode: number, deviceId: number) => {
|
||||
setMode({ deviceId, mode }).then(() => {
|
||||
const handleSelect = (mode: number, item: TDevice.IListRes) => {
|
||||
setMode({ deviceId: item.deviceId, mode }).then(() => {
|
||||
ElMessage.success("操作成功");
|
||||
emit("click", item);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -67,7 +67,7 @@ const handleClickDevice = (val: TDevice.IListRes) => {
|
||||
clearInterval(Interval);
|
||||
Interval = setInterval(() => {
|
||||
getHealthLatestData();
|
||||
}, 60000);
|
||||
}, 30000);
|
||||
};
|
||||
|
||||
onUnmounted(() => {
|
||||
|
@ -22,7 +22,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<div class="item"><span>固件版本:</span>{{ query.deviceVersion }}</div>
|
||||
<div class="item"><span>紧急联系人:</span>{{ query.deviceVersion }}</div>
|
||||
<div class="item"><span>紧急联系人:</span>{{ query.contacts && query.contacts.length ? query.contacts[0].phone : "" }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@ -60,15 +60,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="basetable">
|
||||
import { ref, reactive } from "vue";
|
||||
import { ref, reactive, onUnmounted } from "vue";
|
||||
import { deviceUseRecord, warningRecord } from "@/api/index";
|
||||
import TableCustom from "@/components/table-custom.vue";
|
||||
import { TableItem } from "@/types/table";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useRouter } from "vue-router";
|
||||
import { TDevice } from "@/api/index.d";
|
||||
import DeviceHistory from "./deviceHistory.vue";
|
||||
|
||||
const { query } = useRoute();
|
||||
let query = JSON.parse(sessionStorage.getItem("query")) || {};
|
||||
const router = useRouter();
|
||||
|
||||
enum statusEnum {
|
||||
@ -163,6 +162,9 @@ const viewHistory = (row: TDevice.IUseRecordRes) => {
|
||||
recordInofo.value = row;
|
||||
deviceHistoryRef.value.visible = true;
|
||||
};
|
||||
onUnmounted(() => {
|
||||
sessionStorage.removeItem("query");
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
@ -102,7 +102,7 @@ const query = reactive({});
|
||||
const searchOpt = ref<FormOptionList[]>([
|
||||
{ type: "input", label: "IMEI:", prop: "deviceId" },
|
||||
{ type: "input", label: "用户名称:", prop: "name" },
|
||||
{ type: "input", label: "佩戴者:", prop: "useName" },
|
||||
{ type: "input", label: "佩戴者编号:", prop: "useName" },
|
||||
{
|
||||
type: "select",
|
||||
label: "当前模式:",
|
||||
@ -157,6 +157,7 @@ let columns = ref([
|
||||
{ prop: "deviceId", label: "IMEI", width: 120 },
|
||||
{ prop: "adminName", label: "绑定用户名称", width: 180 },
|
||||
{ prop: "adminUsername", label: "绑定警员号", width: 120 },
|
||||
{ prop: "userNumber", label: "佩戴者编号", width: 120 },
|
||||
{ prop: "orgName", label: "关联辖区", width: 120 },
|
||||
{ prop: "battery", label: "电量", width: 100 },
|
||||
{ prop: "deviceVersion", label: "版本号", width: 100 },
|
||||
@ -302,7 +303,7 @@ onMounted(() => {
|
||||
const toPage = (path: string, row: TDevice.IListRes) => {
|
||||
let p;
|
||||
if (path == "deviceInfo") {
|
||||
p = { ...row };
|
||||
sessionStorage.setItem("query", JSON.stringify(row));
|
||||
} else if (path == "mapLocation") {
|
||||
p = { deviceId: row.deviceId };
|
||||
} else if (path == "setting") {
|
||||
|
@ -136,9 +136,6 @@ const getDeviceConfig = () => {
|
||||
phone: item.phone,
|
||||
};
|
||||
});
|
||||
for (let i = 0; i <= 3 - arr.length; i++) {
|
||||
arr.push({ name: "", phone: "" });
|
||||
}
|
||||
ruleForm.value = {
|
||||
...res,
|
||||
contacts: arr.length
|
||||
|
Loading…
x
Reference in New Issue
Block a user