diff --git a/src/router/index.ts b/src/router/index.ts index 3e6195b..5eb2888 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -106,7 +106,7 @@ export const constantRoutes: RouteRecordRaw[] = [ }, { path: '/progress/progressPaper', - component: () => import('@/views/progress/progressPaper/test.vue'), + component: () => import('@/views/progress/progressPaper/index.vue'), hidden: true }, { diff --git a/src/views/materials/materialsEquipment/partyA/index.vue b/src/views/materials/materialsEquipment/partyA/index.vue new file mode 100644 index 0000000..8505953 --- /dev/null +++ b/src/views/materials/materialsEquipment/partyA/index.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/src/views/materials/materialsEquipment/partyB/index.vue b/src/views/materials/materialsEquipment/partyB/index.vue new file mode 100644 index 0000000..f5bbf3d --- /dev/null +++ b/src/views/materials/materialsEquipment/partyB/index.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/src/views/progress/progressPaper/index.vue b/src/views/progress/progressPaper/index.vue index d4c4024..7ea1a5d 100644 --- a/src/views/progress/progressPaper/index.vue +++ b/src/views/progress/progressPaper/index.vue @@ -407,98 +407,6 @@ const getList = async () => { } }; -const imageExtent = ref(null); -const imageLayer = ref(null); -import { get as getProjection } from 'ol/proj'; - -const initGeoTiff = async () => { - // const tiff = await fromUrl('/image/clean_rgba_cleaned.tif'); - // const image = await tiff.getImage(); - // const width = image.getWidth(); - // const height = image.getHeight(); - // const bbox = image.getBoundingBox(); // [minX, minY, maxX, maxY] - // console.log('bbox', bbox); - // const rasters = await image.readRasters({ interleave: true }); - // // 创建 Canvas - // const canvas = document.createElement('canvas'); - // canvas.width = width; - // canvas.height = height; - // const ctx = canvas.getContext('2d')!; - // const imageData: any = ctx.createImageData(width, height); - // // 设置 RGBA 数据 - // imageData.data.set(rasters); // ✅ 完整设置,不用手动循环 - // ctx.putImageData(imageData, 0, 0); - // // 将 canvas 转成 Data URL 用作图层 source - // const imageUrl = canvas.toDataURL(); - // // 转换为 WGS84 经纬度 - // const minLonLat = transform([bbox[0], bbox[1]], 'EPSG:32648', 'EPSG:4326'); - // const maxLonLat = transform([bbox[2], bbox[3]], 'EPSG:32648', 'EPSG:4326'); - // // 转为 GCJ02(高德地图坐标系) - // const gcjMin = gcoord.transform(minLonLat as [number, number, number], gcoord.WGS84, gcoord.GCJ02); - // const gcjMax = gcoord.transform(maxLonLat as [number, number, number], gcoord.WGS84, gcoord.GCJ02); - // // 再转 EPSG:3857 供 OpenLayers 使用 - // const minXY = fromLonLat(gcjMin); - // const maxXY = fromLonLat(gcjMax); - - // imageExtent.value = [...minXY, ...maxXY]; - - // imageLayer.value = new ImageLayer({ - // source: new Static({ - // url: imageUrl, - // imageExtent: imageExtent.value, - // projection: 'EPSG:3857' - // }) - // }); - // console.log('imageExtent', imageExtent.value); - - // 1. 你的原始瓦片的边界(来自 .tfw 或你知道的数据) - - // 1. 你的 bbox 是 WGS84 经纬度 - const bbox = [107.13149481208748, 23.80411597354268, 107.13487254421389, 23.80801427852998]; - - // 2. 转成 GCJ02(高德坐标系) - const gcjMin = gcoord.transform([bbox[0], bbox[1]], gcoord.WGS84, gcoord.GCJ02); - const gcjMax = gcoord.transform([bbox[2], bbox[3]], gcoord.WGS84, gcoord.GCJ02); - - // 3. 再转换成 EPSG:3857,用于 OpenLayers - const minXY = fromLonLat(gcjMin); - const maxXY = fromLonLat(gcjMax); - - // 4. 组成瓦片范围 extent - const tileExtent = [...minXY, ...maxXY]; - console.log('tileExtent', tileExtent); - - // 5. 创建 tileGrid - const tileGrid = createXYZ({ - extent: tileExtent, - tileSize: 256, - minZoom: 10, - maxZoom: 18 - }); - - // 6. 使用 Web Mercator 投影 EPSG:3857 - const projection = getProjection('EPSG:3857'); - - // 7. 创建瓦片图层 - imageLayer.value = new TileLayer({ - source: new XYZ({ - projection, - tileGrid, - tileUrlFunction: (tileCoord) => { - if (!tileCoord) return ''; - let [z, x, y] = tileCoord; - console.log(z, x, y); - y = Math.pow(2, z) - y - 1; - return `http://192.168.110.2:8000/api/projects/3/tasks/c2e3227f-343f-48b1-88c0-1432d6eab33f/orthophoto/tiles/${z}/${x}/${y}`; - } - }) - }); - const source = imageLayer.value.getSource(); - const projections = source.getProjection(); - - console.log('图层使用的坐标系:', projections?.getCode()); -}; - let map: any = null; const centerPosition = ref(fromLonLat([107.12932403398425, 23.805564054229908])); const initOLMap = () => { @@ -522,8 +430,6 @@ const initOLMap = () => { url: 'http://192.168.110.2:8000/api/projects/3/tasks/c2e3227f-343f-48b1-88c0-1432d6eab33f/orthophoto/tiles/{z}/{x}/{y}' }) }) - // imageLayer.value - // imageLayer.value ], // 设置地图的视图参数 // View表示地图的视图,它定义了地图的中心点、缩放级别、旋转角度等参数。 diff --git a/src/views/safety/knowledgeDocument/component/recyclingStation.vue b/src/views/safety/knowledgeDocument/component/recyclingStation.vue index 0b518da..af3213a 100644 --- a/src/views/safety/knowledgeDocument/component/recyclingStation.vue +++ b/src/views/safety/knowledgeDocument/component/recyclingStation.vue @@ -43,12 +43,8 @@ diff --git a/src/views/template/components/engineeringChangeApplicationForm.vue b/src/views/template/components/engineeringChangeApplicationForm.vue new file mode 100644 index 0000000..6b6da72 --- /dev/null +++ b/src/views/template/components/engineeringChangeApplicationForm.vue @@ -0,0 +1,219 @@ + + + + + diff --git a/src/views/template/index.vue b/src/views/template/index.vue new file mode 100644 index 0000000..0f594bb --- /dev/null +++ b/src/views/template/index.vue @@ -0,0 +1,333 @@ + + +