vue2-client 1.8.237 → 1.8.239

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.237",
3
+ "version": "1.8.239",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -26,42 +26,46 @@
26
26
  </a-button>
27
27
  </a-input-group>
28
28
  </div>
29
- <a-modal :visible="visible" title="地址选择" @ok="selected" @cancel="visible=false" :zIndex="m_index">
30
- <div id="addressSearchCombobox_map">
31
- <div class="certain-category-search-wrapper">
32
- <a-auto-complete
33
- style="right: 0px;width: 90%;z-index:2;margin-top:2%;"
34
- :disabled="!mapAutocomplete"
35
- class="certain-category-search"
36
- dropdown-class-name="certain-category-search-dropdown"
37
- option-label-prop="value"
38
- placeholder="输入地址关键字搜索"
39
- @search="fetchFunction"
40
- @select="onSelect"
41
- >
42
- <a-spin v-if="searching" slot="notFoundContent" size="small"/>
43
- <template slot="dataSource">
44
- <a-select-opt-group v-for="group in option" :key="group.title">
45
- <span
46
- slot="label">
47
- <a-icon type="bank"/> {{ group.title }}
48
- </span>
49
- <a-select-option v-for="address in group.children" :key="address.label + ' <' + address.value + '>'">
50
- <p class="addressName">
51
- <a-icon type="environment"/>
52
- <span v-html="highLight(address.label, address.word)"></span></p>
53
- <p v-if="address.address !== '[]'" class="addressRemark">
54
- {{ address.address }}
55
- </p>
56
- </a-select-option>
57
- </a-select-opt-group>
58
- </template>
59
- <a-input>
60
- <a-icon slot="suffix" class="certain-category-icon" type="search"/>
61
- </a-input>
62
- </a-auto-complete>
63
- </div>
29
+ <a-modal
30
+ v-model="visible"
31
+ title="地址选择"
32
+ @ok="selected"
33
+ :zIndex="m_index"
34
+ :destroyOnClose="true">
35
+ <div class="certain-category-search-wrapper">
36
+ <a-auto-complete
37
+ style="right: 0px;width: 90%;z-index:2;margin-top:2%;"
38
+ :disabled="!mapAutocomplete"
39
+ class="certain-category-search"
40
+ dropdown-class-name="certain-category-search-dropdown"
41
+ option-label-prop="value"
42
+ placeholder="输入地址关键字搜索"
43
+ @search="fetchFunction"
44
+ @select="onSelect"
45
+ >
46
+ <a-spin v-if="searching" slot="notFoundContent" size="small"/>
47
+ <template slot="dataSource">
48
+ <a-select-opt-group v-for="group in option" :key="group.title">
49
+ <span
50
+ slot="label">
51
+ <a-icon type="bank"/> {{ group.title }}
52
+ </span>
53
+ <a-select-option v-for="address in group.children" :key="address.label + ' <' + address.value + '>'">
54
+ <p class="addressName">
55
+ <a-icon type="environment"/>
56
+ <span v-html="highLight(address.label, address.word)"></span></p>
57
+ <p v-if="address.address !== '[]'" class="addressRemark">
58
+ {{ address.address }}
59
+ </p>
60
+ </a-select-option>
61
+ </a-select-opt-group>
62
+ </template>
63
+ <a-input>
64
+ <a-icon slot="suffix" class="certain-category-icon" type="search"/>
65
+ </a-input>
66
+ </a-auto-complete>
64
67
  </div>
68
+ <div id="addressSearchCombobox_map"/>
65
69
  <a-descriptions
66
70
  bordered
67
71
  class="asc_descriptions"
@@ -278,7 +282,6 @@ export default {
278
282
  },
279
283
  watch: {
280
284
  'visible' (val) {
281
- console.log('val', val)
282
285
  if (val) {
283
286
  GetGDMap(this.gaode_secret_key, this.gaode_key).then(aMap => {
284
287
  this.initMap(aMap)
@@ -304,6 +307,14 @@ export default {
304
307
  this.divisions.township = addressComponent.township
305
308
  this.divisions.towncode = addressComponent.towncode
306
309
  this.divisions.street = addressComponent.street
310
+ // 试着获取小区
311
+ if (positionResult?.regeocode?.aois && positionResult?.regeocode?.aois.length) {
312
+ // 取第一个当做小区
313
+ this.divisions.area = positionResult?.regeocode?.aois[0]?.name
314
+ } else if (positionResult?.regeocode?.pois && positionResult?.regeocode?.pois.length) {
315
+ // 取第一个当做小区
316
+ this.divisions.area = positionResult?.regeocode?.pois[0]?.name
317
+ }
307
318
  this.divisions.str =
308
319
  `${addressComponent.province}${addressComponent.city}${addressComponent.district}${addressComponent.township}`
309
320
  }
@@ -323,12 +334,8 @@ export default {
323
334
  }
324
335
  }
325
336
  </script>
326
- <style>
327
- .asc_descriptions .ant-descriptions-item-content {
328
- width: 80%;
329
- }
330
- </style>
331
- <style lang="less">
337
+
338
+ <style lang="less" scoped>
332
339
  #addressSearchCombobox_map {
333
340
  margin: 1% 0;
334
341
  width: 100%;
@@ -336,6 +343,15 @@ export default {
336
343
  text-align: center
337
344
  }
338
345
 
346
+ .asc_descriptions .ant-descriptions-item-content {
347
+ width: 80%;
348
+ }
349
+
350
+ .certain-category-search-wrapper {
351
+ margin-bottom: -4rem;
352
+ text-align: center;
353
+ }
354
+
339
355
  #addressSearchCombobox {
340
356
 
341
357
  .certain-category-search-dropdown .ant-select-dropdown-menu-item-group-title {
@@ -1,35 +1,36 @@
1
- <script>
2
-
3
- import AddressSearchCombobox from '@vue2-client/base-client/components/common/AddressSearchCombobox/index'
4
-
5
- export default {
6
- name: 'Demo',
7
- components: { AddressSearchCombobox },
8
- data () {
9
- return {
10
- visible: false,
11
- searchResult: {}
12
- }
13
- },
14
- methods: {
15
- addressSearchComboboxSelect (res) {
16
- console.log('===', res)
17
- }
18
- }
19
- }
20
- </script>
21
-
22
- <template>
23
- <div>
24
- <address-search-combobox
25
- v-model="searchResult"
26
- :resultKeys="{ address: 'f_address', coords: `f_address_lng_lat` }"
27
- searchResultType="Object"
28
- @onSelect="addressSearchComboboxSelect"
29
- ></address-search-combobox>
30
- </div>
31
- </template>
32
-
33
- <style scoped lang="less">
34
-
35
- </style>
1
+ <script>
2
+
3
+ import AddressSearchCombobox from '@vue2-client/base-client/components/common/AddressSearchCombobox/index'
4
+
5
+ export default {
6
+ name: 'Demo',
7
+ components: { AddressSearchCombobox },
8
+ data () {
9
+ return {
10
+ visible: false,
11
+ searchResult: {}
12
+ }
13
+ },
14
+ methods: {
15
+ addressSearchComboboxSelect (res) {
16
+ console.log('===', res)
17
+ }
18
+ }
19
+ }
20
+ </script>
21
+
22
+ <template>
23
+ <div>
24
+ <address-search-combobox
25
+ v-model="searchResult"
26
+ :resultKeys="{ address: 'f_address', coords: `f_address_lng_lat` }"
27
+ searchResultType="Object"
28
+ @onSelect="addressSearchComboboxSelect"
29
+ @onDivisionsChange="addressSearchComboboxSelect"
30
+ ></address-search-combobox>
31
+ </div>
32
+ </template>
33
+
34
+ <style scoped lang="less">
35
+
36
+ </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <a-button @click="addComponent">添加组件</a-button>
3
+ <a-button @click="addComponent">添加页面</a-button>
4
4
  <a-tree
5
5
  v-if="showTree"
6
6
  defaultExpandAll
@@ -18,6 +18,7 @@
18
18
  <a-menu @click="({ key: menuKey }) => onContextMenuClick(treeKey, menuKey)">
19
19
  <a-menu-item key="copy">复制</a-menu-item>
20
20
  <a-menu-item key="paste" :disabled="copyCache === undefined">粘贴</a-menu-item>
21
+ <a-menu-item key="rename" :disabled="treeKey.length > 2">重命名</a-menu-item>
21
22
  <a-menu-item key="delete">删除</a-menu-item>
22
23
  </a-menu>
23
24
  </template>
@@ -64,6 +65,22 @@
64
65
  </template>
65
66
  </a-form>
66
67
  </a-modal>
68
+ <!-- 页面容器重命名弹框 -->
69
+ <a-modal
70
+ title="页面容器重命名"
71
+ width="60%"
72
+ :z-index="1001"
73
+ :destroyOnClose="true"
74
+ @ok="handleRenameModalOk"
75
+ @cancel="() => { showRenameModal = false }"
76
+ :visible="showRenameModal">
77
+ <a-form :label-col="{ span: 7 }" :wrapper-col="{ span: 12 }">
78
+ <!-- 新名称 -->
79
+ <a-form-item label="新名称">
80
+ <a-input v-model="pageNewName"/>
81
+ </a-form-item>
82
+ </a-form>
83
+ </a-modal>
67
84
  </div>
68
85
  </template>
69
86
 
@@ -78,6 +95,12 @@ export default {
78
95
  }
79
96
  },
80
97
  methods: {
98
+ // 重命名弹框确认
99
+ handleRenameModalOk () {
100
+ this.$emit('renamePage', this.renamePageId, this.pageNewName)
101
+ this.renamePageId = undefined
102
+ this.showRenameModal = false
103
+ },
81
104
  // 根据id返回类型
82
105
  determineLevel (id) {
83
106
  if (id.length === 2) {
@@ -236,6 +259,11 @@ export default {
236
259
 
237
260
  // 其余操作均不合法
238
261
  this.$message.error('该操作不合法!')
262
+ } else if (menuKey === 'rename') {
263
+ const page = lowcodeUtils.getConfig(treeKey, this.config)
264
+ this.renamePageId = page.id
265
+ this.pageNewName = page.title
266
+ this.showRenameModal = true
239
267
  }
240
268
  },
241
269
  // 处理架构树点击事件
@@ -343,7 +371,10 @@ export default {
343
371
  treeData: [],
344
372
  showTree: false,
345
373
  showModal: false,
374
+ showRenameModal: false,
346
375
  copyCache: undefined,
376
+ pageNewName: undefined,
377
+ renamePageId: undefined,
347
378
  addComponentTemp: { type: 'page' }
348
379
  }
349
380
  }
@@ -81,6 +81,7 @@ export default {
81
81
  type: String,
82
82
  default: undefined
83
83
  },
84
+ // outerContainerIndex,是为了XReport,返回外侧行的Index,每一行都有可能有图片,所以要知道是哪一个Index发出的事件
84
85
  outerContainerIndex: {
85
86
  type: [String, Number],
86
87
  default: undefined
@@ -96,10 +97,13 @@ export default {
96
97
  } else {
97
98
  this.uploadedFileList = list
98
99
  }
100
+ // 第三个参数‘created’,是因为XReport,有些图片上传需要外界自己控制上传下载的逻辑
101
+ // 如果在组件加载完成就emit的话,外侧组件会以为图片已经更新,会调用后端,造成性能浪费
102
+ // 所以外侧需要一个标识来判断,该emit事件是不是初始化的时候发出的
99
103
  if (this.outerContainerIndex !== undefined) {
100
- this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done'), this.outerContainerIndex)
104
+ this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done'), this.outerContainerIndex, 'created')
101
105
  } else {
102
- this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done').map(item => item.id))
106
+ this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done').map(item => item.id), undefined, 'created')
103
107
  }
104
108
  },
105
109
  methods: {
@@ -1,21 +1,23 @@
1
- export const XDescriptionsConfig = {
2
- type: 'XDescriptions',
3
- properties: {
4
- title: {
5
- type: 'string'
6
- },
7
- content: {
8
- type: 'object'
9
- },
10
- configName: {
11
- type: 'string'
12
- },
13
- serviceName: {
14
- type: 'string'
15
- },
16
- getRealData: {
17
- type: 'boolean'
18
- }
19
- },
20
- selfEvent: []
21
- }
1
+ export const XDescriptionsConfig = {
2
+ type: 'XDescriptions',
3
+ properties: {
4
+ title: {
5
+ type: 'string',
6
+ title: '',
7
+ desc: ''
8
+ },
9
+ content: {
10
+ type: 'object'
11
+ },
12
+ configName: {
13
+ type: 'string'
14
+ },
15
+ serviceName: {
16
+ type: 'string'
17
+ },
18
+ getRealData: {
19
+ type: 'boolean'
20
+ }
21
+ },
22
+ selfEvent: []
23
+ }
@@ -1,40 +1,40 @@
1
- <script>
2
- import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'
3
- import { getConfigByNameAsync } from '@vue2-client/services/api/common'
4
-
5
- export default {
6
- name: 'Demo',
7
- components: { XFormGroup },
8
- created () {
9
- getConfigByNameAsync('addUserGeneralInfoFrom', 'af-revenue').then(res => {
10
- this.$refs.xFormGroupDemo.init({
11
- ...res,
12
- serviceName: 'af-revenue',
13
- showLeftTab: true,
14
- })
15
- })
16
- },
17
- methods: {
18
- submitForm () {
19
- this.$refs.xFormGroupDemo.onSubmit().then(res => {
20
- console.log('所有表单的结果', res)
21
- })
22
- }
23
- }
24
- }
25
- </script>
26
-
27
- <template>
28
- <a-modal
29
- :visible="true"
30
- :bodyStyle="{height:'70vh'}"
31
- title="测试表单组"
32
- @ok="submitForm"
33
- width="85vw">
34
- <x-form-group ref="xFormGroupDemo"></x-form-group>
35
- </a-modal>
36
- </template>
37
-
38
- <style scoped lang="less">
39
-
40
- </style>
1
+ <script>
2
+ import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'
3
+ import { getConfigByNameAsync } from '@vue2-client/services/api/common'
4
+
5
+ export default {
6
+ name: 'Demo',
7
+ components: { XFormGroup },
8
+ created () {
9
+ getConfigByNameAsync('addUserGeneralInfoFrom', 'af-revenue').then(res => {
10
+ this.$refs.xFormGroupDemo.init({
11
+ ...res,
12
+ serviceName: 'af-revenue',
13
+ showLeftTab: true,
14
+ })
15
+ })
16
+ },
17
+ methods: {
18
+ submitForm () {
19
+ this.$refs.xFormGroupDemo.onSubmit().then(res => {
20
+ console.log('所有表单的结果', res)
21
+ })
22
+ }
23
+ }
24
+ }
25
+ </script>
26
+
27
+ <template>
28
+ <a-modal
29
+ :visible="true"
30
+ :bodyStyle="{height:'70vh'}"
31
+ title="测试表单组"
32
+ @ok="submitForm"
33
+ width="85vw">
34
+ <x-form-group ref="xFormGroupDemo"></x-form-group>
35
+ </a-modal>
36
+ </template>
37
+
38
+ <style scoped lang="less">
39
+
40
+ </style>