fix: 修改视频监控以及绿色施工中的一些样式BUG

This commit is contained in:
kun 2024-07-03 17:38:16 +08:00
parent dc26fae1b4
commit abc7f12db5
5 changed files with 28 additions and 16 deletions

View File

@ -2,9 +2,9 @@
NODE_ENV = 'development' NODE_ENV = 'development'
# 本地环境接口地址(/api/index.ts文件中使用) # 本地环境接口地址(/api/index.ts文件中使用)
# VITE_API_URL = 'http://192.168.34.155:6688' VITE_API_URL = 'http://192.168.34.155:6688'
# VITE_API_URL = "http://zjjsghj.weihai.cn" # VITE_API_URL = "http://zjjsghj.weihai.cn"
VITE_API_URL = 'http://jat.weihaihuancui.cn' # VITE_API_URL = 'http://jat.weihaihuancui.cn'
# VITE_API_URL = "http://60.212.191.85:9000" # VITE_API_URL = "http://60.212.191.85:9000"
VITE_WPAPI_URL = "http://182.90.224.147:8081" VITE_WPAPI_URL = "http://182.90.224.147:8081"
# VITE_API_URL = "http://182.90.224.147:6688" # VITE_API_URL = "http://182.90.224.147:6688"

View File

@ -12,7 +12,7 @@
<el-scrollbar :style="{ height: title ? `calc(100% - 95px)` : `calc(100% - 56px)` }"> <el-scrollbar :style="{ height: title ? `calc(100% - 95px)` : `calc(100% - 56px)` }">
<el-tree <el-tree
ref="treeRef" ref="treeRef"
default-expand-all :default-expand-all="defaultExpandAll"
:node-key="id" :node-key="id"
:data="multiple ? treeData : treeAllData" :data="multiple ? treeData : treeAllData"
:show-checkbox="multiple" :show-checkbox="multiple"
@ -44,7 +44,7 @@
</template> </template>
<script setup lang="ts" name="TreeFilter"> <script setup lang="ts" name="TreeFilter">
import { ref, watch, onBeforeMount } from "vue"; import { ref, watch, onBeforeMount, onMounted } from "vue";
import { ElTree } from "element-plus"; import { ElTree } from "element-plus";
// //
@ -56,11 +56,13 @@ interface TreeFilterProps {
label?: string; // label ==> label label?: string; // label ==> label
multiple?: boolean; // ==> false multiple?: boolean; // ==> false
defaultValue?: any; // ==> defaultValue?: any; // ==>
defaultExpandAll?: boolean; // ==> false
} }
const props = withDefaults(defineProps<TreeFilterProps>(), { const props = withDefaults(defineProps<TreeFilterProps>(), {
id: "id", id: "id",
label: "label", label: "label",
multiple: false multiple: false,
defaultExpandAll: false
}); });
const defaultProps = { const defaultProps = {
@ -91,14 +93,21 @@ onBeforeMount(async () => {
treeAllData.value = props.data; treeAllData.value = props.data;
return; return;
} }
// const res = await props.requestApi!();
// console.log(res);
// treeData.value = res?.result;
// // treeAllData.value = [{ id: "", [props.label]: "" }, ...result];
// treeAllData.value = res?.result ? [...res.result] : [];
});
watch(props.requestApi!, async val => {
const res = await props.requestApi!(); const res = await props.requestApi!();
console.log(res); console.log(res);
treeData.value = res?.result; treeData.value = res?.result;
// treeAllData.value = [{ id: "", [props.label]: "" }, ...result]; // treeAllData.value = [{ id: "", [props.label]: "" }, ...result];
treeAllData.value = [...res.result]; treeAllData.value = res?.result ? [...res.result] : [];
}); });
watch(filterText, val => { watch(filterText, val => {
treeRef.value!.filter(val); treeRef.value!.filter(val);
}); });

View File

@ -140,7 +140,7 @@
height: 70px; height: 70px;
font-family: "siyuan_Bold"; font-family: "siyuan_Bold";
span { span {
font-size: 24px; font-size: 22px;
color: #00378f; color: #00378f;
} }
p { p {

View File

@ -181,8 +181,10 @@ const onSearch = async (params: ResAiEngineerPage | ResAiProjectPage) => {
); );
monitorList.value = monitorList.value.map(item => (item === curr ? { ...curr, showGif: true } : { ...item, showGif: false })); monitorList.value = monitorList.value.map(item => (item === curr ? { ...curr, showGif: true } : { ...item, showGif: false }));
if (params.longitude && params.latitude) { if (params.longitude && params.latitude) {
console.log(111); console.log(params, 222333111);
map.value?.setCenter([+params.longitude, +params.latitude]); // map.value?.setCenter([+params.longitude, +params.latitude]);
map.value?.setCenter([+params.longitude, +params.latitude + 0.2]); // +0.2
map.value?.setZoom(10);
showInfoPage(curr); showInfoPage(curr);
} }
// params.longitude !== "" && params.longitude !== null // params.longitude !== "" && params.longitude !== null
@ -362,7 +364,8 @@ const addMarker = () => {
const mapData = async () => { const mapData = async () => {
const AMap = await initAMap(); const AMap = await initAMap();
AMapRef.value = AMap; AMapRef.value = AMap;
map.value = new AMap.Map("map-container", { zoom: 7, center: [116.481181, 39.90923], viewMode: "2D", resizeEnable: true }); map.value = new AMap.Map("map-container", { zoom: 7, viewMode: "2D", resizeEnable: true });
// map.value = new AMap.Map("map-container", { zoom: 7, center: [122.073543, 37.449337], viewMode: "2D", resizeEnable: true });
// map.value?.on("click", function (e) { // map.value?.on("click", function (e) {
// map.value?.clearInfoWindow(); // map.value?.clearInfoWindow();
// }); // });
@ -450,9 +453,9 @@ watch(
onMounted(async () => { onMounted(async () => {
await mapData(); await mapData();
getStatisticsList(); await getStatisticsList();
// getAIengPage(); // getAIengPage();
getproList(); await getproList();
await getAIproPage(); await getAIproPage();
onSearch(records.value[0]); onSearch(records.value[0]);

View File

@ -3,8 +3,8 @@
<layoutTop></layoutTop> <layoutTop></layoutTop>
<div class="plr-20" style="display: flex"> <div class="plr-20" style="display: flex">
<el-tabs class="demo-tabs" v-model="active"> <el-tabs class="demo-tabs" v-model="active">
<el-tab-pane label="项目名称" name="first"> <TreeFilter ref="engTree" label="title" :requestApi="engApi" @change="changeTreeFilter" class="treefilter"> </TreeFilter>
<!-- <div>11</div> --> <!-- <el-tab-pane label="项目名称" name="first">
<TreeFilter <TreeFilter
ref="proTree" ref="proTree"
:checkStrictly="true" :checkStrictly="true"
@ -18,7 +18,7 @@
<el-tab-pane label="工程名称" name="two"> <el-tab-pane label="工程名称" name="two">
<TreeFilter ref="engTree" label="title" :requestApi="engApi" @change="changeTreeFilter" class="treefilter"> <TreeFilter ref="engTree" label="title" :requestApi="engApi" @change="changeTreeFilter" class="treefilter">
</TreeFilter> </TreeFilter>
</el-tab-pane> </el-tab-pane> -->
</el-tabs> </el-tabs>
<div class="middle-video"> <div class="middle-video">