vue2-client 1.8.262 → 1.8.263

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.262",
3
+ "version": "1.8.263",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -5,6 +5,7 @@
5
5
  defaultExpandAll
6
6
  show-icon
7
7
  @select="handleTreeSelect"
8
+ :selectedKeys="selectedKeys"
8
9
  style="overflow: hidden"
9
10
  :draggable="true"
10
11
  @drop="treeDrop"
@@ -56,6 +57,10 @@ export default {
56
57
  config: {
57
58
  type: Object,
58
59
  required: true,
60
+ },
61
+ selectTreeNode: {
62
+ type: String,
63
+ default: undefined
59
64
  }
60
65
  },
61
66
  methods: {
@@ -303,6 +308,7 @@ export default {
303
308
  },
304
309
  // 处理架构树点击事件
305
310
  handleTreeSelect (value) {
311
+ this.selectedKeys = value
306
312
  this.$emit('treeOrganizationClick', value[0])
307
313
  // 如果选中的id只有两位证明是页面容器
308
314
  // let isPage = false
@@ -413,7 +419,17 @@ export default {
413
419
  showRenameModal: false,
414
420
  copyCache: undefined,
415
421
  pageNewName: undefined,
416
- renameId: undefined
422
+ renameId: undefined,
423
+ selectedKeys: []
424
+ }
425
+ },
426
+ watch: {
427
+ selectTreeNode: {
428
+ handler (newVal) {
429
+ if (newVal) {
430
+ this.selectedKeys = [newVal]
431
+ }
432
+ }
417
433
  }
418
434
  }
419
435
  }
@@ -57,17 +57,18 @@
57
57
  </div>
58
58
  </div>
59
59
  <!-- 页面渲染 / 编辑模式中,将弹框或抽屉中的内容渲染为页面 -->
60
- <div
61
- @click="clickComponentInEditor(item)"
62
- :class=" editMode ? 'componentInEditor' : '' "
63
- v-else-if="editMode || (page.type !== 'modal' && page.type !== 'draw')">
64
- <component
65
- :lifeCycleFunction="resolveLifeCycleEvent(item)"
66
- :is="resolveComponentType(item.type, item.id)"
67
- :propsData="{...item.props}"
68
- @componentDidMounted="componentDidMounted"
69
- @onEvent="handleEvent"
70
- :mixinComponentId="item.id"/>
60
+ <div :ref="item.id" v-else-if="editMode || (page.type !== 'modal' && page.type !== 'draw')">
61
+ <div
62
+ @click="clickComponentInEditor(item)"
63
+ :class=" editMode ? 'componentInEditor' : '' ">
64
+ <component
65
+ :lifeCycleFunction="resolveLifeCycleEvent(item)"
66
+ :is="resolveComponentType(item.type, item.id)"
67
+ :propsData="{...item.props}"
68
+ @componentDidMounted="componentDidMounted"
69
+ @onEvent="handleEvent"
70
+ :mixinComponentId="item.id"/>
71
+ </div>
71
72
  </div>
72
73
  </a-col>
73
74
  </template>
@@ -169,7 +170,8 @@ export default {
169
170
  // 抽屉显示集合
170
171
  drawVisible: {},
171
172
  // 控制递归渲染
172
- renderSub: true
173
+ renderSub: true,
174
+ colClassName: ''
173
175
  }
174
176
  },
175
177
  inject: [
@@ -478,6 +480,9 @@ export default {
478
480
  }
479
481
  }
480
482
  })
483
+ },
484
+ twink (id) {
485
+
481
486
  }
482
487
  },
483
488
  watch: {
@@ -498,6 +503,9 @@ export default {
498
503
  .componentInEditor:hover{
499
504
  border: 2px rgb( 24,144,255) solid;
500
505
  }
506
+ .colWithBorder{
507
+ border: 2px rgb( 24,144,255) solid;
508
+ }
501
509
  .container{
502
510
  display: flex;
503
511
  flex-direction: column;
@@ -85,6 +85,11 @@ export default {
85
85
  outerContainerIndex: {
86
86
  type: [String, Number],
87
87
  default: undefined
88
+ },
89
+ // 图片上传后添加前缀
90
+ imgPrefix: {
91
+ type: String,
92
+ default: undefined
88
93
  }
89
94
  },
90
95
  computed: {
@@ -154,7 +159,12 @@ export default {
154
159
  }
155
160
  fileInfo.response = dataObj
156
161
  fileInfo.id = dataObj.id
157
- fileInfo.url = dataObj.f_downloadpath
162
+ // 如果新上传的图片是V4,需要携带serviceName前缀,但是同时也要回显老系统图片
163
+ if (this.imgPrefix) {
164
+ fileInfo.url = this.imgPrefix + dataObj.f_downloadpath
165
+ } else {
166
+ fileInfo.url = dataObj.f_downloadpath
167
+ }
158
168
  if (this.outerContainerIndex !== undefined) {
159
169
  this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done'), this.outerContainerIndex)
160
170
  } else {
@@ -9,6 +9,7 @@
9
9
  <XReportDesign
10
10
  @updateImg="updateImg"
11
11
  v-if="scanFinish"
12
+ :img-prefix="imgPrefix"
12
13
  :use-oss-for-img="useOssForImg"
13
14
  :display-only="displayOnly"
14
15
  :config="type === 'display' ? originalConfig : activeConfig"
@@ -43,6 +44,7 @@
43
44
  <XReportDesign
44
45
  v-if="scanFinish"
45
46
  @updateImg="updateImg"
47
+ :img-prefix="imgPrefix"
46
48
  :use-oss-for-img="useOssForImg"
47
49
  :display-only="displayOnly"
48
50
  :config="type === 'display' ? originalConfig : activeConfig"
@@ -161,6 +163,11 @@ export default {
161
163
  useOssForImg: {
162
164
  type: Boolean,
163
165
  default: true
166
+ },
167
+ // 图片上传后添加前缀
168
+ imgPrefix: {
169
+ type: String,
170
+ default: undefined
164
171
  }
165
172
  },
166
173
  components: {
@@ -2,6 +2,7 @@
2
2
  <div>
3
3
  <template v-if="this.activatedConfig.designMode === 'json'">
4
4
  <XReportJsonRender
5
+ :img-prefix="imgPrefix"
5
6
  :server-name="serverName"
6
7
  :display-only="displayOnly"
7
8
  :show-title="showTitle"
@@ -53,6 +54,7 @@
53
54
  <template v-if="!forDisplay">
54
55
  <x-report-tr-group
55
56
  @updateImg="updateImg"
57
+ :img-prefix="imgPrefix"
56
58
  :server-name="serverName"
57
59
  :use-oss-for-img="useOssForImg"
58
60
  :key="rowIndex"
@@ -65,6 +67,7 @@
65
67
  <template v-else>
66
68
  <x-report-tr-group
67
69
  @updateImg="updateImg"
70
+ :img-prefix="imgPrefix"
68
71
  :server-name="serverName"
69
72
  :use-oss-for-img="useOssForImg"
70
73
  :config="activatedConfig"
@@ -82,6 +85,7 @@
82
85
  <template v-if="!forDisplay">
83
86
  <x-report-tr-group
84
87
  @updateImg="updateImg"
88
+ :img-prefix="imgPrefix"
85
89
  :server-name="serverName"
86
90
  :use-oss-for-img="useOssForImg"
87
91
  :config="activatedConfig"
@@ -95,6 +99,7 @@
95
99
  <template v-else>
96
100
  <x-report-tr-group
97
101
  @updateImg="updateImg"
102
+ :img-prefix="imgPrefix"
98
103
  :server-name="serverName"
99
104
  :use-oss-for-img="useOssForImg"
100
105
  :config="activatedConfig"
@@ -113,6 +118,7 @@
113
118
  <template v-if="forDisplay">
114
119
  <x-report-tr-group
115
120
  @updateImg="updateImg"
121
+ :img-prefix="imgPrefix"
116
122
  :server-name="serverName"
117
123
  :use-oss-for-img="useOssForImg"
118
124
  :config="activatedConfig"
@@ -128,6 +134,7 @@
128
134
  <template v-if="!forDisplay">
129
135
  <x-report-tr-group
130
136
  @updateImg="updateImg"
137
+ :img-prefix="imgPrefix"
131
138
  :server-name="serverName"
132
139
  :use-oss-for-img="useOssForImg"
133
140
  :config="activatedConfig"
@@ -141,6 +148,7 @@
141
148
  <!-- 动态行交互按钮 -->
142
149
  <x-report-tr-group
143
150
  @updateImg="updateImg"
151
+ :img-prefix="imgPrefix"
144
152
  :server-name="serverName"
145
153
  :use-oss-for-img="useOssForImg"
146
154
  :config="activatedConfig"
@@ -233,6 +241,11 @@ export default {
233
241
  useOssForImg: {
234
242
  type: Boolean,
235
243
  default: true
244
+ },
245
+ // 图片上传后添加前缀
246
+ imgPrefix: {
247
+ type: String,
248
+ default: undefined
236
249
  }
237
250
  },
238
251
  components: {
@@ -144,6 +144,11 @@ export default {
144
144
  displayOnly: {
145
145
  type: Boolean,
146
146
  default: true
147
+ },
148
+ // 图片上传后添加前缀
149
+ imgPrefix: {
150
+ type: String,
151
+ default: undefined
147
152
  }
148
153
  },
149
154
  data () {
@@ -242,6 +242,7 @@
242
242
  <template v-if="configData.images[cell.dataIndex]?.length > 0">
243
243
  <upload
244
244
  :model="uploadParams"
245
+ :img-prefix="imgPrefix"
245
246
  :service-name="serverName"
246
247
  :images="checkImg(cell.dataIndex, 'configData')"
247
248
  :outer-container-index="cell.dataIndex"
@@ -252,6 +253,7 @@
252
253
  <template v-else>
253
254
  <upload
254
255
  :model="uploadParams"
256
+ :img-prefix="imgPrefix"
255
257
  :service-name="serverName"
256
258
  :images="checkImg(cell.dataIndex, 'config')"
257
259
  :outer-container-index="cell.dataIndex"
@@ -401,6 +403,11 @@ export default {
401
403
  useOssForImg: {
402
404
  type: Boolean,
403
405
  default: true
406
+ },
407
+ // 图片上传后添加前缀
408
+ imgPrefix: {
409
+ type: String,
410
+ default: undefined
404
411
  }
405
412
  },
406
413
  data () {
@@ -47,6 +47,7 @@
47
47
  <LowCodePageOrganization
48
48
  :config="config"
49
49
  v-if="showPageOrganization"
50
+ :select-tree-node="selectTreeNode"
50
51
  @rename="rename"
51
52
  @split="handleSplit"
52
53
  @pasteItem="handlePasteItem"
@@ -611,7 +612,8 @@ export default {
611
612
  addComponentTemp: { type: 'page' },
612
613
  // 控制添加页面容器弹框显隐
613
614
  showPageContainerAddModal: false,
614
- showLifeCycleFunctionEditor: false
615
+ showLifeCycleFunctionEditor: false,
616
+ selectTreeNode: undefined
615
617
  }
616
618
  },
617
619
  provide () {
@@ -622,17 +624,17 @@ export default {
622
624
  },
623
625
  methods: {
624
626
  handleSplit (id, isVertical) {
625
- if (isVertical) {
626
- const target = lowcodeUtils.getComponentConfig(id, this.config)
627
- const row = lowcodeUtils.getRowConfigByComponentId(id, this.config)
628
- let index
629
- for (let i = 0; i < row.length; i++) {
630
- if (row[i].id === id) {
631
- index = i
632
- break
633
- }
627
+ const target = lowcodeUtils.getComponentConfig(id, this.config)
628
+ const row = lowcodeUtils.getRowConfigByComponentId(id, this.config)
629
+ let index
630
+ for (let i = 0; i < row.length; i++) {
631
+ if (row[i].id === id) {
632
+ index = i
633
+ break
634
634
  }
635
- const cache = JSON.parse(JSON.stringify(target))
635
+ }
636
+ const cache = JSON.parse(JSON.stringify(target))
637
+ if (isVertical) {
636
638
  const temp = {
637
639
  type: 'container_page',
638
640
  span: cache.span,
@@ -649,14 +651,23 @@ export default {
649
651
  }
650
652
  cache.span = 24
651
653
  temp.page[0].body[0].push(cache)
652
- temp.page[0].body[0].push({
654
+ temp.page[0].body[1] = []
655
+ temp.page[0].body[1].push({
653
656
  type: 'container',
654
657
  span: 24,
655
658
  id: 'container_' + lowcodeUtils.nanoidWithoutSymbol(6)
656
659
  })
657
660
  row.splice(index, 1, temp)
658
661
  } else {
659
- // TODO
662
+ const outerSpan = cache.span
663
+ const firstSpan = Math.round(outerSpan / 2)
664
+ const secondSpan = outerSpan - firstSpan
665
+ cache.span = firstSpan
666
+ row.splice(index, 1, cache, {
667
+ type: 'container',
668
+ span: secondSpan,
669
+ id: 'container_' + lowcodeUtils.nanoidWithoutSymbol(6)
670
+ })
660
671
  }
661
672
  this.refreshOrganization()
662
673
  },
@@ -1302,6 +1313,8 @@ export default {
1302
1313
  },
1303
1314
  // 选中某个组件
1304
1315
  clickComponentInEditor (configItem) {
1316
+ // 同步选中架构
1317
+ this.selectTreeNode = configItem.id
1305
1318
  this.editorPropertiesConfig = {}
1306
1319
  // 如果选中的是容器
1307
1320
  if (configItem.type === 'container') {