fix: BUG修改
This commit is contained in:
parent
56c25d598e
commit
cf4a924c57
@ -310,3 +310,14 @@ export function filterEnum(
|
|||||||
if (type == "tag") return filterData?.tagType ? filterData.tagType : "";
|
if (type == "tag") return filterData?.tagType ? filterData.tagType : "";
|
||||||
return filterData ? filterData[label] : "--";
|
return filterData ? filterData[label] : "--";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 向外部iframe框架发送信息
|
||||||
|
export function sendIframeMessage(msg: any, type: any, iframeEle: any | undefined) {
|
||||||
|
if (type === 1) {
|
||||||
|
// 父 => 子
|
||||||
|
iframeEle.contentWindow.postMessage(msg, "*");
|
||||||
|
} else if (type === 2) {
|
||||||
|
// 子 => 父
|
||||||
|
window.parent.postMessage(msg, "*");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@ const AMapRef = ref();
|
|||||||
const areas = zhongkai();
|
const areas = zhongkai();
|
||||||
const map = shallowRef<AMap.Map>();
|
const map = shallowRef<AMap.Map>();
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
projectData: Object;
|
projectData: Array<any>;
|
||||||
}>();
|
}>();
|
||||||
const setProjectData = async () => {
|
const setProjectData = async () => {
|
||||||
console.log("setProjectData");
|
console.log("setProjectData");
|
||||||
@ -296,10 +296,11 @@ const createArea = () => {
|
|||||||
};
|
};
|
||||||
// 地图增加坐标点
|
// 地图增加坐标点
|
||||||
const addMarker = () => {
|
const addMarker = () => {
|
||||||
if (!props.projectData.longitude) {
|
if (!props.projectData.length > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const createMarkerImage = (state: string) => new URL(`../../../../../assets/images/hzImg/xm/${state}`, import.meta.url).href;
|
console.log(props.projectData, "77777777777-------");
|
||||||
|
const createMarkerImage = (state: string) => new URL(`../../../../../../assets/images/hzImg/xm/${state}`, import.meta.url).href;
|
||||||
// map.value?.clearMap();
|
// map.value?.clearMap();
|
||||||
// markerList.forEach((item: any) => {
|
// markerList.forEach((item: any) => {
|
||||||
// 创建一个 Icon
|
// 创建一个 Icon
|
||||||
@ -311,15 +312,17 @@ const addMarker = () => {
|
|||||||
// 图标所用图片大小
|
// 图标所用图片大小
|
||||||
imageSize: new AMapRef.value.Size(52, 52)
|
imageSize: new AMapRef.value.Size(52, 52)
|
||||||
});
|
});
|
||||||
|
props.projectData.map(item => {
|
||||||
// 将 icon 传入 marker
|
// 将 icon 传入 marker
|
||||||
let startMarker = new AMapRef.value.Marker({
|
let startMarker = new AMapRef.value.Marker({
|
||||||
position: new AMapRef.value.LngLat(Number(props.projectData.longitude), Number(props.projectData.latitude)),
|
position: new AMapRef.value.LngLat(Number(item.longitude), Number(item.latitude)),
|
||||||
// position: new AMapRef.value.LngLat(113, 21),
|
// position: new AMapRef.value.LngLat(113, 21),
|
||||||
icon: startIcon,
|
icon: startIcon,
|
||||||
offset: new AMapRef.value.Pixel(-13, -30)
|
offset: new AMapRef.value.Pixel(-13, -30)
|
||||||
});
|
});
|
||||||
map.value?.add([startMarker]);
|
map.value?.add([startMarker]);
|
||||||
|
});
|
||||||
|
|
||||||
// map.value?.setFitView();
|
// map.value?.setFitView();
|
||||||
// });
|
// });
|
||||||
};
|
};
|
||||||
|
|||||||
@ -9,7 +9,7 @@ const AMapRef = ref();
|
|||||||
const areas = zhongkai();
|
const areas = zhongkai();
|
||||||
const map = shallowRef<AMap.Map>();
|
const map = shallowRef<AMap.Map>();
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
projectData: Object;
|
projectData: Array<any>;
|
||||||
}>();
|
}>();
|
||||||
const setProjectData = async () => {
|
const setProjectData = async () => {
|
||||||
console.log("setProjectData");
|
console.log("setProjectData");
|
||||||
@ -350,10 +350,10 @@ const createArea = () => {
|
|||||||
};
|
};
|
||||||
// 地图增加坐标点
|
// 地图增加坐标点
|
||||||
const addMarker = () => {
|
const addMarker = () => {
|
||||||
if (!props.projectData.longitude) {
|
if (!props.projectData.length > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const createMarkerImage = (state: string) => new URL(`../../../../../assets/images/hzImg/xm/${state}`, import.meta.url).href;
|
const createMarkerImage = (state: string) => new URL(`../../../../../../assets/images/hzImg/xm/${state}`, import.meta.url).href;
|
||||||
// map.value?.clearMap();
|
// map.value?.clearMap();
|
||||||
// markerList.forEach((item: any) => {
|
// markerList.forEach((item: any) => {
|
||||||
// 创建一个 Icon
|
// 创建一个 Icon
|
||||||
@ -366,14 +366,16 @@ const addMarker = () => {
|
|||||||
imageSize: new AMapRef.value.Size(52, 52)
|
imageSize: new AMapRef.value.Size(52, 52)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
props.projectData.map(item => {
|
||||||
// 将 icon 传入 marker
|
// 将 icon 传入 marker
|
||||||
let startMarker = new AMapRef.value.Marker({
|
let startMarker = new AMapRef.value.Marker({
|
||||||
position: new AMapRef.value.LngLat(Number(props.projectData.longitude), Number(props.projectData.latitude)),
|
position: new AMapRef.value.LngLat(Number(item.longitude), Number(item.latitude)),
|
||||||
// position: new AMapRef.value.LngLat(113, 21),
|
// position: new AMapRef.value.LngLat(113, 21),
|
||||||
icon: startIcon,
|
icon: startIcon,
|
||||||
offset: new AMapRef.value.Pixel(-13, -30)
|
offset: new AMapRef.value.Pixel(-13, -30)
|
||||||
});
|
});
|
||||||
map.value?.add([startMarker]);
|
map.value?.add([startMarker]);
|
||||||
|
});
|
||||||
// map.value?.setFitView();
|
// map.value?.setFitView();
|
||||||
// });
|
// });
|
||||||
};
|
};
|
||||||
|
|||||||
@ -42,38 +42,34 @@ import maps from "./components/maps.vue";
|
|||||||
import maps3D from "./components/maps3D.vue";
|
import maps3D from "./components/maps3D.vue";
|
||||||
import largeScreenTwo from "../largeScreenTwo/index.vue";
|
import largeScreenTwo from "../largeScreenTwo/index.vue";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
|
import { sendIframeMessage } from "@/utils/util";
|
||||||
|
import { getproNamelist } from "@/api/modules/goverment";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
//获取项目信息
|
//获取项目信息
|
||||||
const projectData = ref({
|
const projectData = ref([]);
|
||||||
latitude: "",
|
|
||||||
longitude: "",
|
|
||||||
totalDay: ""
|
|
||||||
});
|
|
||||||
const screenValue = ref(0);
|
const screenValue = ref(0);
|
||||||
const mapValue = ref(0);
|
const mapValue = ref(0);
|
||||||
const changeMap = (val: any) => {
|
const changeMap = (val: any) => {
|
||||||
mapValue.value = val;
|
mapValue.value = val;
|
||||||
};
|
};
|
||||||
const changeScreen = async () => {
|
const changeScreen = () => {
|
||||||
console.log(route);
|
console.log(route);
|
||||||
console.log({ path: globalStore.path, moduleId: globalStore.moduleId });
|
router.push("/goverment/huizhou/largeScreen/largeScreenTwo/index");
|
||||||
await sendMessage({ path: globalStore.path, moduleId: globalStore.moduleId }, 2);
|
|
||||||
// router.push("/goverment/huizhou/largeScreen/largeScreenTwo/index");
|
|
||||||
// screenValue.value = screenValue.value == 0 ? 1 : 0;
|
// screenValue.value = screenValue.value == 0 ? 1 : 0;
|
||||||
};
|
};
|
||||||
const sendMessage = (msg: any, type: any, iframeEle: any | undefined) => {
|
const getProjectList = async () => {
|
||||||
console.log(666);
|
const res = await getproNamelist({});
|
||||||
if (type === 1) {
|
if (res && res.result && res.result.length > 0) {
|
||||||
// 父 => 子
|
projectData.value = res.result;
|
||||||
iframeEle.contentWindow.postMessage(msg, "*");
|
|
||||||
} else if (type === 2) {
|
|
||||||
// 子 => 父
|
|
||||||
window.parent.postMessage(msg, "*");
|
|
||||||
}
|
}
|
||||||
console.log(777);
|
console.log(res, "66-----");
|
||||||
};
|
};
|
||||||
|
onMounted(async () => {
|
||||||
|
await getProjectList();
|
||||||
|
await sendIframeMessage({ path: globalStore.path, moduleId: globalStore.moduleId }, 2, undefined);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -19,16 +19,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="largeScreenTwo">
|
<script setup lang="tsx" name="largeScreenTwo">
|
||||||
|
import { onMounted } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import LeftcentView from "./components/LeftcentView.vue";
|
import LeftcentView from "./components/LeftcentView.vue";
|
||||||
import RigthTopView from "./components/RigthTopView.vue";
|
import RigthTopView from "./components/RigthTopView.vue";
|
||||||
import RigthBottLeftView from "./components/RigthBottLeftView.vue";
|
import RigthBottLeftView from "./components/RigthBottLeftView.vue";
|
||||||
import RigthBottRigthView from "./components/RigthBottRigthView.vue";
|
import RigthBottRigthView from "./components/RigthBottRigthView.vue";
|
||||||
|
import { GlobalStore } from "@/stores";
|
||||||
|
import { sendIframeMessage } from "@/utils/util";
|
||||||
|
const globalStore = GlobalStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const changeScreen = () => {
|
const changeScreen = async () => {
|
||||||
router.push("/goverment/huizhou/largeScreen/largeScreenOne/index");
|
router.push("/goverment/huizhou/largeScreen/largeScreenOne/index");
|
||||||
// screenValue.value = screenValue.value == 0 ? 1 : 0;
|
// screenValue.value = screenValue.value == 0 ? 1 : 0;
|
||||||
};
|
};
|
||||||
|
onMounted(async () => {
|
||||||
|
await sendIframeMessage({ path: globalStore.path, moduleId: globalStore.moduleId }, 2, undefined);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.project {
|
.project {
|
||||||
|
|||||||
@ -98,6 +98,7 @@ import DialogForm from "@/components/DialogForm/index.vue";
|
|||||||
import { ColumnProps } from "@/components/ProTable/interface";
|
import { ColumnProps } from "@/components/ProTable/interface";
|
||||||
import { getRealTimePage } from "@/api/modules/project";
|
import { getRealTimePage } from "@/api/modules/project";
|
||||||
import { payGovermentEngList, payGovermentProList, payGovermentList, payGovermentContactAdd } from "@/api/modules/huizhou";
|
import { payGovermentEngList, payGovermentProList, payGovermentList, payGovermentContactAdd } from "@/api/modules/huizhou";
|
||||||
|
import { sendIframeMessage } from "@/utils/util";
|
||||||
const detailsDialog = ref(false);
|
const detailsDialog = ref(false);
|
||||||
const relativeId = ref("");
|
const relativeId = ref("");
|
||||||
|
|
||||||
@ -440,6 +441,7 @@ onMounted(async () => {
|
|||||||
onSearch(records.value[0]);
|
onSearch(records.value[0]);
|
||||||
searchSn.value = records.value[0].projectSn;
|
searchSn.value = records.value[0].projectSn;
|
||||||
searchName.value = records.value[0].projectName;
|
searchName.value = records.value[0].projectName;
|
||||||
|
await sendIframeMessage({ path: store.path, moduleId: store.moduleId }, 2, undefined);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -31,9 +31,11 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
overflow: hidden;
|
||||||
.middleSize {
|
.middleSize {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #c4c4c4;
|
color: #c4c4c4;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.video {
|
.video {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -99,6 +99,7 @@ import { ColumnProps } from "@/components/ProTable/interface";
|
|||||||
import { getRealTimePage } from "@/api/modules/project";
|
import { getRealTimePage } from "@/api/modules/project";
|
||||||
import { parentItemGovermentList, payGovermentAdd } from "@/api/modules/huizhou";
|
import { parentItemGovermentList, payGovermentAdd } from "@/api/modules/huizhou";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
import { sendIframeMessage } from "@/utils/util";
|
||||||
const pages = ref({
|
const pages = ref({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 7,
|
pageSize: 7,
|
||||||
@ -409,6 +410,7 @@ onMounted(async () => {
|
|||||||
onSearch(records.value[0]);
|
onSearch(records.value[0]);
|
||||||
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
||||||
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
||||||
|
await sendIframeMessage({ path: store.path, moduleId: store.moduleId }, 2, undefined);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -93,11 +93,14 @@ import { statisticsInfo, statisticsTable } from "@/api/modules/goverment";
|
|||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
||||||
import { getDustprojectPage, getDustengineeringPage, getAIQuestionPage } from "@/api/modules/goverment";
|
import { getDustprojectPage, getDustengineeringPage, getAIQuestionPage } from "@/api/modules/goverment";
|
||||||
|
import { sendIframeMessage } from "@/utils/util";
|
||||||
|
import { GlobalStore } from "@/stores";
|
||||||
const pages = ref({
|
const pages = ref({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 7,
|
pageSize: 7,
|
||||||
total: 0
|
total: 0
|
||||||
});
|
});
|
||||||
|
const store = GlobalStore();
|
||||||
const records = ref<ResAiProjectPage[] | ResAiEngineerPage[]>([]);
|
const records = ref<ResAiProjectPage[] | ResAiEngineerPage[]>([]);
|
||||||
const statisticsOption = ref([
|
const statisticsOption = ref([
|
||||||
{
|
{
|
||||||
@ -315,6 +318,7 @@ onMounted(async () => {
|
|||||||
onSearch(records.value[0]);
|
onSearch(records.value[0]);
|
||||||
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
||||||
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
||||||
|
await sendIframeMessage({ path: store.path, moduleId: store.moduleId }, 2, undefined);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -94,11 +94,14 @@ import { statisticsInfo, statisticsTable } from "@/api/modules/goverment";
|
|||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
||||||
import { getDustprojectPage, getDustengineeringPage, getAIQuestionPage } from "@/api/modules/goverment";
|
import { getDustprojectPage, getDustengineeringPage, getAIQuestionPage } from "@/api/modules/goverment";
|
||||||
|
import { sendIframeMessage } from "@/utils/util";
|
||||||
|
import { GlobalStore } from "@/stores";
|
||||||
const pages = ref({
|
const pages = ref({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 7,
|
pageSize: 7,
|
||||||
total: 0
|
total: 0
|
||||||
});
|
});
|
||||||
|
const store = GlobalStore();
|
||||||
const records = ref<ResAiProjectPage[] | ResAiEngineerPage[]>([]);
|
const records = ref<ResAiProjectPage[] | ResAiEngineerPage[]>([]);
|
||||||
// 表格配置项
|
// 表格配置项
|
||||||
const columns: ColumnProps[] = [
|
const columns: ColumnProps[] = [
|
||||||
@ -283,6 +286,7 @@ onMounted(async () => {
|
|||||||
onSearch(records.value[0]);
|
onSearch(records.value[0]);
|
||||||
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
||||||
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
||||||
|
await sendIframeMessage({ path: store.path, moduleId: store.moduleId }, 2, undefined);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -68,6 +68,7 @@ import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government
|
|||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
import { ColumnProps } from "@/components/ProTable/interface";
|
import { ColumnProps } from "@/components/ProTable/interface";
|
||||||
import { getRealTimePage } from "@/api/modules/project";
|
import { getRealTimePage } from "@/api/modules/project";
|
||||||
|
import { sendIframeMessage } from "@/utils/util";
|
||||||
const pages = ref({
|
const pages = ref({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 7,
|
pageSize: 7,
|
||||||
@ -280,6 +281,7 @@ onMounted(async () => {
|
|||||||
onSearch(records.value[0]);
|
onSearch(records.value[0]);
|
||||||
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
||||||
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
||||||
|
await sendIframeMessage({ path: store.path, moduleId: store.moduleId }, 2, undefined);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user