style:材料信息
Showing
4 changed files
with
17 additions
and
12 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-11 10:01:32 | 4 | * @LastEditTime: 2023-09-14 16:21:51 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <el-image-viewer :on-close="closeViewer" :url-list="urlList"> | 7 | <el-image-viewer :on-close="closeViewer" :url-list="urlList" :initial-index="initialIndex"> |
8 | </el-image-viewer> | 8 | </el-image-viewer> |
9 | </template> | 9 | </template> |
10 | <script> | 10 | <script> |
... | @@ -19,6 +19,10 @@ | ... | @@ -19,6 +19,10 @@ |
19 | default: function () { | 19 | default: function () { |
20 | return [] | 20 | return [] |
21 | } | 21 | } |
22 | }, | ||
23 | initialIndex: { | ||
24 | type: Number, | ||
25 | default: 0 | ||
22 | } | 26 | } |
23 | }, | 27 | }, |
24 | data () { | 28 | data () { | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-13 15:36:42 | 4 | * @LastEditTime: 2023-09-14 16:16:57 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="rlPopup"> | 7 | <div class="rlPopup"> |
... | @@ -148,6 +148,7 @@ | ... | @@ -148,6 +148,7 @@ |
148 | } else { | 148 | } else { |
149 | this.previewImg.index = this.previewImg.index + 1 | 149 | this.previewImg.index = this.previewImg.index + 1 |
150 | } | 150 | } |
151 | this.initialIndex = this.previewImg.index | ||
151 | this.$emit('updateList', { children: res.result, bsmSj: this.previewImg.bsmSj }) | 152 | this.$emit('updateList', { children: res.result, bsmSj: this.previewImg.bsmSj }) |
152 | this.$message({ | 153 | this.$message({ |
153 | message: '移动成功!', | 154 | message: '移动成功!', |
... | @@ -234,6 +235,7 @@ | ... | @@ -234,6 +235,7 @@ |
234 | */ | 235 | */ |
235 | showCurrent (index) { | 236 | showCurrent (index) { |
236 | this.previewImg.index = index | 237 | this.previewImg.index = index |
238 | this.initialIndex = index | ||
237 | }, | 239 | }, |
238 | /** | 240 | /** |
239 | * @description: closeViewer | 241 | * @description: closeViewer | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-13 16:16:08 | 4 | * @LastEditTime: 2023-09-14 16:06:51 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div> | 7 | <div style="width:90%;height:100%;"> |
8 | <canvas id="mxcad" style="width:100%;height:100%"> | 8 | <canvas id="mxcad" style="width:90%;height:80%; position: relative;top:0"> |
9 | </canvas> | 9 | </canvas> |
10 | </div> | 10 | </div> |
11 | </template> | 11 | </template> |
... | @@ -20,20 +20,17 @@ | ... | @@ -20,20 +20,17 @@ |
20 | Mx.MxFun.createMxObject({ | 20 | Mx.MxFun.createMxObject({ |
21 | canvasId: "mxcad", // canvas元素的id | 21 | canvasId: "mxcad", // canvas元素的id |
22 | cadFile: "buf/hhhh.dwg", // http方式(预览): 加载public/demo文件夹下转换后的图纸 | 22 | cadFile: "buf/hhhh.dwg", // http方式(预览): 加载public/demo文件夹下转换后的图纸 |
23 | // cadFile: "test2.dwg", // socket通信方式请直接提供图纸名称 如:text.dwg | ||
24 | callback: (mxDraw, { | 23 | callback: (mxDraw, { |
25 | canvas, | 24 | canvas, |
26 | canvasParent | 25 | canvasParent |
27 | }) => { | 26 | }) => { |
28 | // 可以拿到canvas元素和它的父级元素 | 27 | // 可以拿到canvas元素和它的父级元素 |
29 | console.log(canvas, canvasParent) | ||
30 | console.log(mxDraw) | ||
31 | // 拿到图层数据 | 28 | // 拿到图层数据 |
32 | mxDraw.addEvent('uiSetLayerData', (listLayer) => { | 29 | mxDraw.addEvent('uiSetLayerData', (listLayer) => { |
33 | console.log(listLayer) | 30 | console.log(listLayer) |
34 | }) | 31 | }) |
35 | }, | 32 | }, |
36 | isNewFile: false // 是否新建文件 | 33 | isNewFile: true // 是否新建文件 |
37 | }) | 34 | }) |
38 | }) | 35 | }) |
39 | } | 36 | } | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-12 13:46:29 | 4 | * @LastEditTime: 2023-09-14 16:24:07 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="rlPopup"> | 7 | <div class="rlPopup"> |
... | @@ -86,7 +86,7 @@ | ... | @@ -86,7 +86,7 @@ |
86 | // 缩略图 | 86 | // 缩略图 |
87 | thumbnailImages: [], | 87 | thumbnailImages: [], |
88 | showViewer: false, | 88 | showViewer: false, |
89 | initialIndex: undefined, | 89 | initialIndex: 0, |
90 | allLi: [], | 90 | allLi: [], |
91 | } | 91 | } |
92 | }, | 92 | }, |
... | @@ -152,6 +152,7 @@ | ... | @@ -152,6 +152,7 @@ |
152 | } else { | 152 | } else { |
153 | this.previewImg.index = this.previewImg.index + 1 | 153 | this.previewImg.index = this.previewImg.index + 1 |
154 | } | 154 | } |
155 | this.initialIndex = this.previewImg.index | ||
155 | this.$emit('updateList', { children: res.result, bsmMaterial: this.previewImg.bsmMaterial }) | 156 | this.$emit('updateList', { children: res.result, bsmMaterial: this.previewImg.bsmMaterial }) |
156 | this.$message({ | 157 | this.$message({ |
157 | message: '移动成功!', | 158 | message: '移动成功!', |
... | @@ -238,6 +239,7 @@ | ... | @@ -238,6 +239,7 @@ |
238 | */ | 239 | */ |
239 | showCurrent (index) { | 240 | showCurrent (index) { |
240 | this.previewImg.index = index | 241 | this.previewImg.index = index |
242 | this.initialIndex = index | ||
241 | }, | 243 | }, |
242 | /** | 244 | /** |
243 | * @description: closeViewer | 245 | * @description: closeViewer | ... | ... |
-
Please register or sign in to post a comment