vue2-client 1.19.19 → 1.19.21

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.19.19",
3
+ "version": "1.19.21",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -260,6 +260,8 @@ export default {
260
260
  rules: {},
261
261
  // 调用logic获取数据源的追加参数
262
262
  getDataParams: {},
263
+ // 外部数据(通过 XFormGroup 或直接传入)
264
+ externalData: {},
263
265
  // 动态简易表单集合
264
266
  simpleFormJsonData: {},
265
267
  // 待修改的数据集
@@ -454,7 +456,9 @@ export default {
454
456
  setRequired: this.setRequired,
455
457
  getSelf: () => this,
456
458
  // 传递 formGroupContext 给子组件
457
- formGroupContext: this.formGroupContext
459
+ formGroupContext: this.formGroupContext,
460
+ // 传递外部数据给子组件
461
+ _getExternalData: this.getExternalData
458
462
  }
459
463
  },
460
464
  watch: {
@@ -543,6 +547,7 @@ export default {
543
547
  title,
544
548
  fixedAddForm = {},
545
549
  getDataParams = {},
550
+ externalData = {},
546
551
  simpleFormJsonData = {},
547
552
  env = 'prod',
548
553
  layout,
@@ -583,6 +588,7 @@ export default {
583
588
  this.businessType = businessType
584
589
  this.title = title
585
590
  this.getDataParams = getDataParams
591
+ this.externalData = externalData
586
592
  this.simpleFormJsonData = simpleFormJsonData
587
593
  this.env = env
588
594
  this.btnName = btnName
@@ -638,6 +644,9 @@ export default {
638
644
  }
639
645
  this.loaded = true
640
646
  },
647
+ getExternalData() {
648
+ return this.externalData
649
+ },
641
650
  scrollToGroup(index) {
642
651
  const groupElement = this.$refs[`group-title-${index}`][0]
643
652
  if (groupElement) {
@@ -983,9 +983,20 @@ export default {
983
983
  // 表单组上下文(通过注入传递)
984
984
  formGroupContext: {
985
985
  default: null
986
+ },
987
+ // 外部数据(通过 XAddNativeForm 的 provide 传递)
988
+ _getExternalData: {
989
+ default: () => ({})
986
990
  }
987
991
  },
988
992
  methods: {
993
+ /**
994
+ * 获取外部数据
995
+ * @returns {Object} 外部扩展数据对象 比如收费表单中俄的 用户信息要参与表单判断
996
+ */
997
+ getExternalData() {
998
+ return this._getExternalData() || {}
999
+ },
989
1000
  // 处理 queryParams 结果并更新 rowChooseFixedQueryValue
990
1001
  handleQueryParamsResult(obj) {
991
1002
  let configName = ''
@@ -77,7 +77,8 @@ export default {
77
77
  env: 'dev',
78
78
  spinning: true,
79
79
  loadingErr: false,
80
- activeTab: 0
80
+ activeTab: 0,
81
+ externalData: {}
81
82
  }
82
83
  },
83
84
  mounted() {},
@@ -117,10 +118,12 @@ export default {
117
118
  env = 'prod',
118
119
  showLeftTab = false,
119
120
  businessType = '新增',
120
- formShow = {}
121
+ formShow = {},
122
+ externalData = {}
121
123
  }) {
122
124
  Object.assign(this, { groups, modifyModelData, serviceName, env, showLeftTab, businessType })
123
125
  this.formShow = { ...formShow }
126
+ this.externalData = externalData
124
127
  this.initView()
125
128
  this.$nextTick(() => {
126
129
  const formGroupContext = this.$refs.formGroupContext?.$el
@@ -206,6 +209,7 @@ export default {
206
209
  businessType: this.businessType,
207
210
  env: this.env,
208
211
  groupName: res.groupName,
212
+ externalData: this.externalData,
209
213
  ...res
210
214
  }
211
215
  params.showSubmitBtn = false
@@ -316,7 +320,6 @@ export default {
316
320
  }
317
321
  // 更新 allFormData
318
322
  this.$set(this.allFormData, groupName, formData)
319
- console.warn('handleFormDataChange allFormData', this.allFormData)
320
323
  // 触发其他表单的刷新
321
324
  this.$nextTick(() => {
322
325
  this.groups.forEach((item, index) => {
@@ -14,7 +14,11 @@ export default {
14
14
  getConfigByNameAsync('changeMeterFormGroup', 'af-revenue').then(res => {
15
15
  this.$refs.xFormGroupDemo.init({
16
16
  ...res,
17
- serviceName: 'af-revenue'
17
+ serviceName: 'af-revenue',
18
+ externalData: {
19
+ a:1,
20
+ v:2
21
+ }
18
22
  })
19
23
  })
20
24
  },
@@ -15,7 +15,7 @@
15
15
  @rowDblClick="rowDblClick"
16
16
  :defaultPageSize="5"
17
17
  :defaultQueryForm="{
18
- s_f_user_name: '张三'
18
+ s_id: '21985716'
19
19
  }"
20
20
  serviceName="af-revenue"
21
21
  ref="xFormTable"
@@ -34,7 +34,7 @@ export default {
34
34
  data() {
35
35
  return {
36
36
  // 查询配置文件名
37
- queryParamsName: 'ChargeCenterQueryUserCRUD',
37
+ queryParamsName: 'ceshiCRUD',
38
38
  // 查询配置左侧tree
39
39
  xTreeConfigName: 'addressType',
40
40
  // 新增表单固定值
@@ -276,9 +276,9 @@
276
276
  :getPopupContainer="getPopupContainer"
277
277
  :overlayStyle="{
278
278
  whiteSpace: 'nowrap',
279
- maxWidth: '250px',
280
- overflow: 'hidden',
281
- textOverflow: 'ellipsis'
279
+ maxHeight: '300px',
280
+ overflowY: 'auto',
281
+ zIndex: 99999
282
282
  }"
283
283
  >
284
284
  <a class="ant-dropdown-link" @click="e => e.preventDefault()">
@@ -532,19 +532,7 @@ export default {
532
532
  inject: ['tableContext'],
533
533
  methods: {
534
534
  getPopupContainer (triggerNode) {
535
- // 限制最多向上查找5层
536
- let parent = triggerNode.parentNode
537
- let depth = 0
538
- const maxDepth = 10
539
-
540
- while (parent && parent !== document.body && depth < maxDepth) {
541
- if (parent.tagName === 'TBODY') {
542
- return parent
543
- }
544
- parent = parent.parentNode
545
- depth++
546
- }
547
- // 如果5层内没找到,回退到body
535
+ // 始终将弹窗渲染到body中,确保层级不受容器限制
548
536
  return document.body
549
537
  },
550
538
  handleRowClick (record) {
@@ -740,6 +728,7 @@ export default {
740
728
  border: 1px solid #e8e8e8;
741
729
  border-radius: 4px;
742
730
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
731
+ z-index: 9999;
743
732
  }
744
733
 
745
734
  /* vue-draggable-resizable 拖动手柄样式 */