main
徐景良 2026-03-13 09:23:08 +08:00
parent 31a427df9c
commit a9cf3bb372
13 changed files with 575 additions and 131 deletions

View File

@ -24,7 +24,7 @@ VITE_GLOB_COFFEE_API_URL = http://221.2.83.243:6050/coffee
VITE_GLOB_GEOSERVER_BASE_URL = http://192.168.10.163:8080 VITE_GLOB_GEOSERVER_BASE_URL = http://192.168.10.163:8080
# 导航 # 导航
VITE_GLOBAL_NAVIGATION_BASE_URL = http://221.2.83.243:8091 VITE_GLOB_NAVIGATION_BASE_URL = http://221.2.83.243:8091
# ANYRTC CALL # ANYRTC CALL
VITE_GLOB_ANYRTC_BASE_URL = https://ktdrw.wisestcity.com:6070 VITE_GLOB_ANYRTC_BASE_URL = https://ktdrw.wisestcity.com:6070

View File

@ -26,7 +26,7 @@ VITE_GLOB_INFO_IMAGE_URL= http://221.2.83.243:6050/core
VITE_GLOB_GEOSERVER_BASE_URL = http://221.2.83.243:6050/ VITE_GLOB_GEOSERVER_BASE_URL = http://221.2.83.243:6050/
# 导航 # 导航
VITE_GLOBAL_NAVIGATION_BASE_URL = http://221.2.83.243:8091 VITE_GLOB_NAVIGATION_BASE_URL = http://221.2.83.243:8091
# 视频通话 # 视频通话
VITE_GLOB_ANYRTC_BASE_URL = https://ktdrw.wisestcity.com:6070 VITE_GLOB_ANYRTC_BASE_URL = https://ktdrw.wisestcity.com:6070

View File

@ -78,6 +78,7 @@ enum Api {
DeleteInterphoneInfo = '/api/FmInterPhone/DeleteInterphoneInfo', DeleteInterphoneInfo = '/api/FmInterPhone/DeleteInterphoneInfo',
AddOrUpdateInterphoneInfo = '/api/FmInterPhone/AddOrUpdateInterphoneInfo', AddOrUpdateInterphoneInfo = '/api/FmInterPhone/AddOrUpdateInterphoneInfo',
} }
export const getPositionsTree = (params?: AccountParams) => export const getPositionsTree = (params?: AccountParams) =>
defHttp.get<AccountListGetResultModel>({ url: Api.PositionsTree, params }); defHttp.get<AccountListGetResultModel>({ url: Api.PositionsTree, params });

View File

@ -79,13 +79,11 @@
datasSize, datasSize,
} = toRefs(props.chartConfig.option); } = toRefs(props.chartConfig.option);
console.log("navsArr",navsArr.value)
const navsClick = function (item, index) { const navsClick = function (item, index) {
navsIndex.value = index; navsIndex.value = index;
props.chartConfig.request.requestSQLContent.sql = item.sql; props.chartConfig.request.requestSQLContent.sql = item.sql;
console.log("SQL_123",item.sql);
useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any) => { useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any) => {
props.chartConfig.option.sectionDatas = resData; props.chartConfig.option.sectionDatas = resData;
handlerLoadFirePoint(sectionDatas.value); handlerLoadFirePoint(sectionDatas.value);
@ -215,7 +213,6 @@ const getFileImage = (type) => {
} }
// //
const handlerLoadFirePoint = (points: []) => { const handlerLoadFirePoint = (points: []) => {
console.log("points123",points);
points?.forEach((item, index) => { points?.forEach((item, index) => {
let graphicOptions = { let graphicOptions = {

View File

@ -1,19 +1,22 @@
<template> <template>
<div class="go-title-xuncha"> <div class="go-title-xuncha">
<div class="selbox">
<el-tree-select
v-model="areaValue"
:data="areaOptions"
check-strictly
label-field="name"
node-key="name"
:render-after-expand="false"
placeholder="请选择行政区划"
clearable
popper-class="go-title-xuncha-select-popper"
/>
</div>
<div class="searchbox flex ai-c"> <div class="searchbox flex ai-c">
<div class="selbox">
<el-tree-select
v-model="areaValue"
:data="areaOptions"
check-strictly
label-field="name"
node-key="name"
:render-after-expand="false"
placeholder="请选择行政区划"
clearable
popper-class="go-title-xuncha-select-popper"
/>
</div>
<div class="inpbox"> <div class="inpbox">
<n-input <n-input
size="small" size="small"
@ -37,7 +40,7 @@
</div> </div>
</div> </div>
<div class="contentbox"> <div class="contentbox">
<div class="contentli flex" v-for="(item,index) in dataset" @click="lisClick(item)"> <div class="contentli flex" v-for="(item,index) in clockList" @click="lisClick(item)">
<div class="icons01"></div> <div class="icons01"></div>
<div class="flex column jc-c seclisbox"> <div class="flex column jc-c seclisbox">
<div class="header flex ai-c"> <div class="header flex ai-c">
@ -58,6 +61,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="more-button">
<span @click="loadMore">
查看更多 <DoubleRightOutlined />
</span>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -65,6 +75,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { PropType, toRefs, ref, onMounted } from 'vue' import { PropType, toRefs, ref, onMounted } from 'vue'
import { CreateComponentType } from '@/packages/index.d' import { CreateComponentType } from '@/packages/index.d'
import { DoubleRightOutlined } from "@ant-design/icons-vue";
import { EventBus } from '@/utils/eventBus' import { EventBus } from '@/utils/eventBus'
import axios from 'axios' import axios from 'axios'
import * as mars3d from "mars3d"; import * as mars3d from "mars3d";
@ -97,24 +108,29 @@ const dataset = ref([])
const optionsData = ref([]) const optionsData = ref([])
const entityArr = ref([]) const entityArr = ref([])
const clockList = ref([]);
const listQuery = ref({
page:1,
limit:10,
pointName:searchValue.value
})
const getListData=()=>{ const getListData=()=>{
console.log('areaValue',areaValue)
axios({ axios({
method: "get", method: "get",
url: VITE_GLOB_API_URL + '/api/FireGrid/GetCheckPointList', url: VITE_GLOB_API_URL + '/api/FireGrid/GetCheckPointList',
params: { params: listQuery.value,
page: 1,
limit: 9999,
pointName: searchValue.value
},
headers: { headers: {
'X-Token': localStorage.getItem("X-Token") 'X-Token': localStorage.getItem("X-Token")
} }
}).then(res => { }).then(res => {
let rel = res.data.result.items let rel = res.data.result.items
dataset.value = rel // dataset.value = rel
clockList.value = clockList.value.concat(rel);
}) })
} }
const getAreaListData=(id)=>{ const getAreaListData=(id)=>{
axios({ axios({
method: "get", method: "get",
@ -144,6 +160,7 @@ const getAreaListData=(id)=>{
props.chartConfig.option.areaOptions = optionsData.value props.chartConfig.option.areaOptions = optionsData.value
}) })
} }
const lisClick=(e)=>{ const lisClick=(e)=>{
eventHandlerHook( eventHandlerHook(
chartEditStore.getComponentList, chartEditStore.getComponentList,
@ -180,6 +197,13 @@ const handlerAddEntity = (data) => {
window.graphicLayer.addGraphic(graphic); window.graphicLayer.addGraphic(graphic);
window.globalMap.flyToGraphic(graphic,{radius:300}); window.globalMap.flyToGraphic(graphic,{radius:300});
} }
const loadMore = () => {
listQuery.value.page++;
getListData();
}
onMounted(() => { onMounted(() => {
getListData() getListData()
getAreaListData(371300) getAreaListData(371300)
@ -205,16 +229,20 @@ onMounted(() => {
.jc-c{ .jc-c{
justify-content: center; justify-content: center;
} }
.selbox{
width: 150px;
height: 35px;
background: #05231A;
border-radius: 3px;
border: 1px solid #00611A;
}
.searchbox{ .searchbox{
height: 35px; height: 35px;
margin-top: 5px; margin-top: 5px;
gap:10px;
.selbox{
width: 150px;
height: 35px;
background: #05231A;
border-radius: 3px;
border: 1px solid #00611A;
background: url("@/assets/images/chart/xunchaguiji/gjinputbg.png");
background-size: 100% 100%;
}
.inpbox{ .inpbox{
width: 150px; width: 150px;
height: 100%; height: 100%;
@ -304,6 +332,16 @@ onMounted(() => {
} }
} }
} }
.more-button{
text-align: center;
color:#fff;
line-height:40px;
cursor:pointer;
&:hover{
color:#0EB687;
}
}
} }
:deep(.n-input){ :deep(.n-input){
background: none; background: none;

View File

@ -93,6 +93,7 @@ onMounted(() => {
} }
.unitbox{ .unitbox{
margin-top: 5px; margin-top: 5px;
margin-left:12px;
color: v-bind('unitColor'); color: v-bind('unitColor');
font-size: v-bind('unitSize+"px"'); font-size: v-bind('unitSize+"px"');
} }

View File

@ -97,6 +97,7 @@ onMounted(() => {
} }
.unitbox{ .unitbox{
margin-top: 5px; margin-top: 5px;
margin-left:8px;
color: v-bind('unitColor'); color: v-bind('unitColor');
font-size: v-bind('unitSize+"px"'); font-size: v-bind('unitSize+"px"');
} }

View File

@ -1,12 +1,51 @@
<template> <template>
<div class="go-title-03"> <div class="go-title-03">
<div class="searchbox flex ai-c">
<div class="selbox">
<el-tree-select
v-model="areaValue"
:data="optionsData"
check-strictly
label-field="name"
node-key="name"
:render-after-expand="false"
placeholder="请选择行政区划"
clearable
popper-class="go-title-xuncha-select-popper"
/>
</div>
<div class="inpbox">
<n-select class="transparent-select" size="small" placeholder="在线状态" v-model:value="listQuery.isOnline" value-field="label" :options="stateOptions" />
</div>
<div class="flex">
<div class="searchbtn cursor flex ai-c jc-c" @click="getListDataBySearchButton">
<img class="img" src="@/assets/images/chart/xunchaguiji/btnicons01.png" />
<span class="span">搜索</span>
</div>
<!-- <div class="tongjibtn cursor flex ai-c jc-c">
<img class="img" src="@/assets/images/chart/xunchaguiji/btnicons02.png" />
<span class="span">统计</span>
</div>
<div class="xunjianbtn cursor flex ai-c jc-c">
<img class="img" src="@/assets/images/chart/xunchaguiji/btnicons03.png" />
<span class="span">巡检</span>
</div> -->
</div>
</div>
<div class="headerbox"> <div class="headerbox">
<div class="headerli" v-for="item in headerData">{{item}}</div> <div class="headerli" v-for="item in headerData">{{item}}</div>
<div class="scopedbox headerli">操作</div> <div class="scopedbox headerli">操作</div>
</div> </div>
<div class="sectionbox"> <div class="sectionbox">
<div class="nodatabox" v-if="dataset.length<1"></div> <div class="nodatabox" v-if="userList.length<1"></div>
<div class="secli" v-for="item in dataset"> <div class="secli" v-for="item in userList">
<div class="li"> <div class="li">
<div class="la">{{ item.townName }}</div> <div class="la">{{ item.townName }}</div>
</div> </div>
@ -30,11 +69,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="more-button">
<span @click="loadMore">
查看更多 <DoubleRightOutlined />
</span>
</div>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { PropType, toRefs, ref, onMounted } from 'vue' import { PropType, toRefs, ref, onMounted } from 'vue'
import { DoubleRightOutlined } from "@ant-design/icons-vue";
import { CreateComponentType } from '@/packages/index.d' import { CreateComponentType } from '@/packages/index.d'
import * as mars3d from "mars3d"; import * as mars3d from "mars3d";
import axios from 'axios' import axios from 'axios'
@ -50,6 +96,55 @@ const props = defineProps({
} }
}) })
// 线
const stateOptions = ref([
{
label: '在线',
value: '在线'
},
{
label: '离线',
value: '离线'
},
{
label: '全部',
value: '全部'
},
])
const areaValue = ref()
const optionsData = ref([])
const getAreaListData=(id)=>{
axios({
method: "get",
url: VITE_GLOB_API_URL + '/api/Orgs/LoadChildren',
params: {
parentId: id
},
headers: {
'X-Token': localStorage.getItem("X-Token")
}
}).then(res => {
let rel = res.data.result
rel.forEach(item =>{
if(item.level == 1){
item.children = []
optionsData.value.push(item)
getAreaListData(item.id)
}
if(item.level == 2){
optionsData.value.forEach(val =>{
if(val.id == item.parentId){
val.children.push(item)
}
})
}
})
})
}
const { w, h } = toRefs(props.chartConfig.attr) const { w, h } = toRefs(props.chartConfig.attr)
const entityArr = ref([]) const entityArr = ref([])
const polyLineArr = ref([]) const polyLineArr = ref([])
@ -136,25 +231,44 @@ const rotateLine = (data)=>{
} }
}) })
} }
const userList = ref([]);
const listQuery = ref({
page:1,
limit:10,
isOnline:"全部"
})
const getListData=()=>{ const getListData=()=>{
axios({ axios({
method: "post", method: "post",
url: VITE_GLOB_API_URL + '/api/FireManagement/GetPointUserOnLine', url: VITE_GLOB_API_URL + '/api/FireManagement/GetPointUserOnLine',
data: { data: listQuery.value,
page: 1,
limit: 9999,
isonline:"全部"
},
headers: { headers: {
'X-Token': localStorage.getItem("X-Token") 'X-Token': localStorage.getItem("X-Token")
} }
}).then(res => { }).then(res => {
let rel = res.data.result.items.userinfo let rel = res.data.result.items.userinfo
props.chartConfig.option.dataset = rel // props.chartConfig.option.dataset = rel
userList.value = userList.value.concat(rel);
}) })
} }
const getListDataBySearchButton = ()=>{
userList.value = [];
listQuery.value.page = 1;
getListData();
}
const loadMore = () => {
listQuery.value.page++;
getListData();
}
onMounted(() => { onMounted(() => {
getListData() getListData()
getAreaListData(371300)
}) })
</script> </script>
@ -189,6 +303,59 @@ onMounted(() => {
color: v-bind('textColors[0]'); color: v-bind('textColors[0]');
} }
} }
.searchbox{
height: 35px;
margin-top: 5px;
margin-bottom:5px;
gap:10px;
.selbox{
width: 150px;
height: 35px;
background: #05231A;
border-radius: 3px;
border: 1px solid #00611A;
background: url("@/assets/images/chart/xunchaguiji/gjinputbg.png");
background-size: 100% 100%;
}
.inpbox{
width: 150px;
height: 100%;
background: url("@/assets/images/chart/xunchaguiji/gjinputbg.png");
background-size: 100% 100%;
margin-right: 4px;
}
.img{
width: 20px;
height: 20px;
}
.span{
color: #FFFFFF;
font-size: 14px;
margin-left: 5px;
}
.searchbtn{
width: 72px;
height: 30px;
background: linear-gradient( 95deg, #00C16B 0%, #008E39 100%), #000000;
border-radius: 3px;
margin-right: 4px;
}
.tongjibtn{
width: 72px;
height: 30px;
background: linear-gradient( 277deg, #C14000 0%, #FF8849 100%), #000000;
border-radius: 3px;
margin-right: 4px;
}
.xunjianbtn{
width: 72px;
height: 30px;
background: linear-gradient( 277deg, #125FE3 0%, #1C9DCA 100%), #000000;
border-radius: 3px;
}
}
.scopedbox{ .scopedbox{
height: 100%; height: 100%;
min-width: 120px; min-width: 120px;
@ -269,8 +436,20 @@ onMounted(() => {
.secli:nth-child(2n){ .secli:nth-child(2n){
background: v-bind('backgroundColors[2]'); background: v-bind('backgroundColors[2]');
} }
.more-button{
text-align: center;
color:#fff;
line-height:40px;
cursor:pointer;
&:hover{
color:#0EB687;
}
}
} }
} }
/* 整个滚动条的样式 */ /* 整个滚动条的样式 */
::-webkit-scrollbar { ::-webkit-scrollbar {
@ -288,4 +467,97 @@ onMounted(() => {
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background: #34FFE0; /* 鼠标悬停时的滑块颜色 */ background: #34FFE0; /* 鼠标悬停时的滑块颜色 */
} }
:deep(.n-input){
background: none;
margin-left: 5px;
}
:deep(.n-input__state-border){
border-color: none;
}
:deep(.n-input .n-input__input-el, .n-input .n-input__textarea-el){
color: #fff;
}
:deep(.n-input .n-input__border, .n-input .n-input__state-border){
border: none;
}
:deep(.n-input:not(.n-input--disabled).n-input--focus .n-input__state-border){
border: none !important;
box-shadow: none !important;
}
:deep(.n-base-selection .n-base-selection-label .n-base-selection-input){
background: none;
color: #fff;
}
:deep(.n-base-selection .n-base-selection-label){
background: none;
}
:deep(.n-base-select-menu){
background: none;
}
:deep(.n-base-selection .n-base-selection__border, .n-base-selection .n-base-selection__state-border){
border: none;
}
:deep(.el-select__wrapper){
background: none;
box-shadow: none;
}
:deep(.el-select__placeholder){
color: #fff;
}
/* 1. 输入框容器透明 */
.transparent-select :deep(.n-base-selection) {
background-color: transparent !important;
border: none !important;
box-shadow: none !important;
}
/* 输入框悬浮状态 */
.transparent-select :deep(.n-base-selection:hover) {
background-color: transparent !important;
border: none !important;
}
/* 输入框聚焦状态 */
.transparent-select :deep(.n-base-selection--focus) {
background-color: transparent !important;
border: none !important;
box-shadow: none !important;
}
/* 2. 下拉菜单透明 */
.transparent-select :deep(.n-base-select-menu) {
background-color: transparent !important;
border: none !important;
box-shadow: none !important;
}
/* 3. 下拉选项透明 */
.transparent-select :deep(.n-base-select-option) {
background-color: transparent !important;
}
/* 下拉选项悬浮状态(建议保留微弱的背景,提升可用性) */
.transparent-select :deep(.n-base-select-option:hover) {
background-color: rgba(0, 0, 0, 0.05) !important;
}
/* 4. 隐藏分割线(如果有) */
.transparent-select :deep(.n-base-select-menu__action) {
border-top: none !important;
}
/* 5. 箭头图标半透明(可选) */
.transparent-select :deep(.n-base-selection__arrow) {
opacity: 0.5;
}
/* 清除图标半透明(可选) */
.transparent-select :deep(.n-base-selection__clear) {
opacity: 0.5;
}
</style> </style>

View File

@ -1,13 +1,15 @@
import axios from "axios"; import axios from "axios";
import { gcj02towgs84, wgs84togcj02 } from 'coordtransform' import { gcj02towgs84, wgs84togcj02 } from 'coordtransform'
import * as turf from '@turf/turf' import * as turf from '@turf/turf'
import { Url } from "./urlFormat"; import { Url } from "./urlFormat";
// import { getMethodCommon } from "../../../api/common"; // import { getMethodCommon } from "../../../api/common";
import { parse } from "./handleGeojson"; import { parse } from "./handleGeojson";
import { deepClone } from "./utils"; import { deepClone } from "./utils";
const urls = new Url() const urls = new Url()
import { getAppEnvConfig } from '@/utils/env'; import { getAppEnvConfig } from '@/utils/env';
const { VITE_GLOB_API_URL,VITE_GLOBAL_NAVIGATION_BASE_URL } = getAppEnvConfig(); const { VITE_GLOB_API_URL,VITE_GLOB_NAVIGATION_BASE_URL } = getAppEnvConfig();
const GD_URL = "https://restapi.amap.com/v5/direction/driving" const GD_URL = "https://restapi.amap.com/v5/direction/driving"
const GD_KEY = "6af6a87038f44c8c793aa70331f2b7ca" const GD_KEY = "6af6a87038f44c8c793aa70331f2b7ca"
import * as mars3d from 'mars3d'; import * as mars3d from 'mars3d';
@ -25,7 +27,7 @@ let pathRoadGraphicLayers2 = null
export const getMethodCommon = (url,params) => { export const getMethodCommon = (url,params) => {
return axios(`${VITE_GLOBAL_NAVIGATION_BASE_URL}${url}?point=${params.startCoord}&point=${params.endCoord}&profile=car&points_encoded=false`,{ return axios(`${VITE_GLOB_NAVIGATION_BASE_URL}${url}?point=${params.startCoord}&point=${params.endCoord}&profile=car&points_encoded=false`,{
method:"GET" method:"GET"
}) })
} }

View File

@ -49,7 +49,7 @@ export function getAppEnvConfig() {
VITE_GLOB_GEOSERVER_BASE_URL, VITE_GLOB_GEOSERVER_BASE_URL,
VITE_GLOB_COFFEE_API_URL, VITE_GLOB_COFFEE_API_URL,
VITE_GLOB_ANYRTC_BASE_URL, VITE_GLOB_ANYRTC_BASE_URL,
VITE_GLOBAL_NAVIGATION_BASE_URL, VITE_GLOB_NAVIGATION_BASE_URL,
} = ENV; } = ENV;
let { VITE_GLOB_API_URL } = ENV; let { VITE_GLOB_API_URL } = ENV;
if (localStorage.getItem(API_ADDRESS)) { if (localStorage.getItem(API_ADDRESS)) {
@ -76,7 +76,7 @@ export function getAppEnvConfig() {
VITE_GLOB_APP_FLV_URL, VITE_GLOB_APP_FLV_URL,
VITE_GLOB_SRS_API_URL, VITE_GLOB_SRS_API_URL,
VITE_GLOB_ANYRTC_BASE_URL, VITE_GLOB_ANYRTC_BASE_URL,
VITE_GLOBAL_NAVIGATION_BASE_URL, VITE_GLOB_NAVIGATION_BASE_URL,
}; };
} }

View File

@ -1,72 +1,80 @@
<template> <template>
<div class="user-task m-4"> <div class="user-task m-4 p-4">
<a-form <a-row>
ref="formRef" <a-col :span="12">
:model="addForm" <a-form
labelAlign="left" ref="formRef"
:rules="data.rules" :model="addForm"
:label-col="labelCol" labelAlign="left"
:wrapper-col="wrapperCol" :rules="data.rules"
> :label-col="labelCol"
<a-form-item label="防火站点名称" name="siteName"> :wrapper-col="wrapperCol"
<a-input v-model:value="addForm.siteName" placeholder="请输入" /> size="middle"
</a-form-item> >
<a-form-item label="防火站点地址" name="siteAddress"> <a-form-item label="摄像头名称" name="name">
<a-space> <a-input v-model:value="addForm.name" placeholder="请输入" />
<a-input v-model:value="addForm.siteAddress" placeholder="请输入" /> </a-form-item>
<a-button type="primary" @click="mapVisible = true">选择</a-button>
</a-space> <a-form-item label="功能分类" name="model">
</a-form-item> <a-select
<a-form-item label="站点负责人姓名" name="director"> v-model:value="addForm.model"
<a-input v-model:value="addForm.director" placeholder="请输入" /> placeholder="请输入"
</a-form-item> :options="modelOptions"
<a-form-item label="负责人电话" name="phone"> >
<a-input v-model:value="addForm.phone" placeholder="请输入" /> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="是否有人值守" name="isonduty">
<a-radio-group name="radioGroup" v-model:value="addForm.isonduty"> <a-form-item label="摄像头类型" name="cameraType">
<a-radio :value="true"></a-radio> <a-select
<a-radio :value="false"></a-radio> v-model:value="addForm.cameraType"
</a-radio-group> placeholder="请输入"
</a-form-item> :options="cameraTypeOptions"
<a-form-item label="是否接收进山消息" name="isreceive"> >
<a-radio-group name="radioGroup" v-model:value="addForm.isreceive"> </a-select>
<a-radio :value="true"></a-radio> </a-form-item>
<a-radio :value="false"></a-radio>
</a-radio-group>
</a-form-item> <a-form-item label="设备厂商" name="manufacturer">
<a-space> <a-select
<span>消息接收人员扫码信息消息接收人员</span> v-model:value="addForm.manufacturer"
<a-button danger @click="addPerson"></a-button> placeholder="请输入"
</a-space> :options="manufacturerTypeOptions"
<a-table :columns="data.columns" :data-source="accountList" bordered :pagination="false"> >
<template #bodyCell="{ column, text, record }"> </a-select>
<template v-if="['name'].includes(column.dataIndex)"> </a-form-item>
<div>
{{ text }} <a-form-item label="设备序列号" name="serialNumber">
</div> <a-input v-model:value="addForm.serialNumber" placeholder="请输入" />
</template> </a-form-item>
<template v-else-if="['account'].includes(column.dataIndex)">
<div> <a-form-item label="设备通道" name="channel">
{{ text }} <a-input v-model:value="addForm.channel" placeholder="请输入" />
</div> </a-form-item>
</template>
<template v-else-if="column.dataIndex === 'operation'"> <a-form-item label="平台IP" name="ip">
<a-button danger @click="onDelete(record.id)" size="small" class="ml-2">删除</a-button> <a-input v-model:value="addForm.ip" placeholder="请输入" />
</template> </a-form-item>
</template>
</a-table> <a-form-item label="平台端口" name="port">
</a-form> <a-input v-model:value="addForm.port" placeholder="请输入" />
<a-modal </a-form-item>
width="60%"
v-model:open="accountVisible" <a-form-item label="APPKey" name="appKey">
title="选择人员" <a-input v-model:value="addForm.appKey" placeholder="请输入" />
@ok="handleFormulaOk" </a-form-item>
:destroyOnClose="true"
> <a-form-item label="APPSecret" name="appSecret">
<SelectAccount ref="SelectAccountRef" /> <a-input v-model:value="addForm.appSecret" placeholder="请输入" />
</a-modal> </a-form-item>
<a-modal
</a-form>
</a-col>
<a-col :span="12">
<Map style="height:580px;border-radius:5px;" :position="[addForm.lng,addForm.lat]" :addForm="addForm"></Map>
</a-col>
</a-row>
<!-- <a-modal
width="60%" width="60%"
v-model:open="mapVisible" v-model:open="mapVisible"
title="选择位置" title="选择位置"
@ -74,7 +82,7 @@
:destroyOnClose="true" :destroyOnClose="true"
> >
<Map ref="PostionRef" /> <Map ref="PostionRef" />
</a-modal> </a-modal> -->
</div> </div>
</template> </template>
@ -82,9 +90,38 @@
import { SelectAccount } from './page'; import { SelectAccount } from './page';
import { reactive, ref, onMounted, watch, defineProps } from 'vue'; import { reactive, ref, onMounted, watch, defineProps } from 'vue';
import { Map } from './page'; import { Map } from './page';
import axios from 'axios';
import { getAppEnvConfig } from '@/utils/env';
let { VITE_GLOB_API_URL } = getAppEnvConfig();
const labelCol = { span: 3 }; const cameraTypeOptions = ref([
const wrapperCol = { span: 6 }; {
label:"枪机",
value:0
},{
label:"半球",
value:1
},{
label:"快球",
value:2
},{
label:"带云台枪机",
value:3
}
])
const manufacturerTypeOptions = ref([
{
value: "海康",
label: '海康',
},
{
value: "大华",
label: '大华',
}
])
const labelCol = { span: 4 };
const wrapperCol = { span: 18 };
const SelectAccountRef = ref<any>(); const SelectAccountRef = ref<any>();
const accountVisible = ref(false); const accountVisible = ref(false);
const mapVisible = ref(false); const mapVisible = ref(false);
@ -106,7 +143,7 @@
tableData: [], tableData: [],
}); });
const PostionRef = ref(); const PostionRef = ref();
onMounted(() => {});
const addPerson = () => { const addPerson = () => {
accountVisible.value = true; accountVisible.value = true;
}; };
@ -128,7 +165,7 @@
const createSite = () => { const createSite = () => {
const params = { const params = {
...addForm.value, ...addForm.value,
accountList: accountList.value, // accountList: accountList.value,
}; };
return params; return params;
}; };
@ -147,14 +184,53 @@
createSite, createSite,
validateForm, validateForm,
}); });
const modelOptions = ref([]);
const cameraTypes = ref({});
const getCameraType = () => {
let url = "/api/SysDataItemDetail/Load";
let querys = {
code:"FMCamera"
}
axios({
method: "get",
url: VITE_GLOB_API_URL + url,
params: querys,
headers: {
'X-Token': localStorage.getItem("X-Token")
}
}).then(res=>{
res.data.result?.forEach((item,index)=>{
modelOptions.value.push({
label:item.itemName,
value:item.itemValue,
})
cameraTypes.value[item.itemValue] = item.itemName
})
})
}
getCameraType();
onMounted(() => {
});
</script> </script>
<style scoped> <style scoped>
::v-deep .ant-alert-info { ::v-deep .ant-alert-info {
margin-bottom: 20px; margin-bottom: 0px;
} }
::v-deep .ant-table-wrapper { ::v-deep .ant-table-wrapper {
margin-top: 20px; margin-top: 0px;
} }
</style> </style>

View File

@ -3,9 +3,10 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted, defineProps } from 'vue';
import * as mars3d from 'mars3d'; import * as mars3d from 'mars3d';
const props = defineProps(["addForm"])
let map: mars3d.Map; // let map: mars3d.Map; //
const vChartRef = ref<HTMLElement>(); const vChartRef = ref<HTMLElement>();
onMounted(() => { onMounted(() => {
@ -245,17 +246,21 @@
}); });
map.addLayer(pointLayer); map.addLayer(pointLayer);
map.on(mars3d.EventType.click, function (event) { map.on(mars3d.EventType.click, function (event) {
console.log('click', event);
var point = mars3d.LngLatPoint.fromCartesian(event.cartesian); // var point = mars3d.LngLatPoint.fromCartesian(event.cartesian); //
point.format(); // point.format(); //
pointData.value = point; pointData.value = point;
console.log('鼠标单击坐标', point);
console.log('经度:' + point.lng + '\n' + '纬度:' + point.lat + '\n' + '高度:' + point._alt); console.log('经度:' + point.lng + '\n' + '纬度:' + point.lat + '\n' + '高度:' + point._alt);
if (idNum.value > 0) { if (idNum.value > 0) {
pointLayer.removeGraphic(pointGraphic.value); pointLayer.removeGraphic(pointGraphic.value);
} }
// //
const coordinates = [point.lng, point.lat]; const coordinates = [point.lng, point.lat];
props.addForm.lng = point.lng.toString();
props.addForm.lat = point.lat.toString();
// //
// Mars3D () // Mars3D ()
pointGraphic.value = new mars3d.graphic.BillboardEntity({ pointGraphic.value = new mars3d.graphic.BillboardEntity({
@ -263,7 +268,7 @@
attr: point, attr: point,
style: { style: {
pixelSize: 100, pixelSize: 100,
scale: 0.5, scale: 1,
image: '/positioning.png', image: '/positioning.png',
}, },
}); });

View File

@ -27,15 +27,18 @@
</template> </template>
</BasicTable> </BasicTable>
<!-- 添加 编辑--> <!-- 添加 & 编辑-->
<a-modal <a-modal
v-model:visible="addModelVisible" v-model:visible="addModelVisible"
title="摄像头信息" title="摄像头信息"
wrap-class-name="full-modal" width="70%"
width="80%"
@ok="handleOk" @ok="handleOk"
:get-container="getContainer"
wrap-class-name="modal"
:mask="true"
:keyboard="false"
> >
<AddModal ref="AddModalRef" /> <AddModal ref="AddModalRef" />
</a-modal> </a-modal>
<!-- 详情 --> <!-- 详情 -->
@ -169,6 +172,9 @@
case 'btnEdit': case 'btnEdit':
handleEdit(); handleEdit();
break; break;
case 'btnDelete':
handleDelete();
break;
case 'btnExport': case 'btnExport':
break; break;
default: default:
@ -183,9 +189,54 @@
const handleOk = () => { const handleOk = () => {
AddModalRef.value.validateForm(); AddModalRef.value.validateForm();
const params = AddModalRef.value.createSite(); const params = AddModalRef.value.createSite();
console.log('params', params); addApi(params);
}; };
async function handleDelete() {
let rows = getSelectRows();
if (rows.length == 0) {
return createMessage.warn('请勾选一条数据进行删除');
}
const query = [rows[0].id];
createConfirm({
iconType: 'info',
title: '删除',
content: '确定要删除当前数据吗',
onOk: async () => {
// const data = await DeleteInterphoneInfo(query);
axios.delete(`${VITE_GLOB_API_URL}/api/Camera/Delete/${rows[0].id}`).then(res => {
if (res) {
handleSuccess();
createMessage.success('删除成功');
} else {
createMessage.error('删除失败');
}
})
},
});
}
const addApi = (params) => {
let url = "/api/Camera/Add";
axios({
method: "post",
url: VITE_GLOB_API_URL + url,
data: params,
headers: {
'X-Token': localStorage.getItem("X-Token")
}
}).then(res=>{
if(res){
addModelVisible.value = false;
}
})
}
const detailInfo = ref(null); const detailInfo = ref(null);
const viewDetail = (record: any) => { const viewDetail = (record: any) => {