vue2-client 1.8.396 → 1.8.397

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.396",
3
+ "version": "1.8.397",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -8,13 +8,14 @@
8
8
  height="60%"
9
9
  okText="提交"
10
10
  @cancel="close"
11
- @ok="$refs.main.onSubmit()">
11
+ @ok="onSubmit">
12
12
  <div style="max-height: 70vh; overflow-y: auto;" v-if="showReport">
13
13
  <x-report
14
14
  @updateImg="updateImg"
15
+ @selectRow="selectRow"
15
16
  ref="main"
16
17
  :use-oss-for-img="false"
17
- config-name="medicalRecordCover"
18
+ :config-name="configName"
18
19
  server-name="af-his"
19
20
  :show-img-in-cell="true"
20
21
  :display-only="displayOnly"
@@ -82,12 +83,18 @@ export default {
82
83
  this.selectedId = selectedId
83
84
  }
84
85
  },
86
+ selectRow (selectedRowKeys, selectedRows) {
87
+ this.table_selectedRowKeys = selectedRowKeys
88
+ this.table_selectedRows = selectedRows
89
+ console.log('XAddReport')
90
+ this.$emit('selectRow', selectedRowKeys, selectedRows)
91
+ },
85
92
  close () {
86
93
  this.loading = false
87
94
  this.visible = false
88
95
  this.$emit('close')
89
96
  },
90
- onSubmit (params) {
97
+ onSubmit () {
91
98
  this.loading = true
92
99
  this.close()
93
100
  },
@@ -662,10 +662,10 @@ export default {
662
662
  }
663
663
  // 人员联动框增加监听
664
664
  if (this?.attr?.keyName?.toString()?.startsWith('search@根据表单项[') && this?.attr?.keyName?.toString().endsWith(']联动人员')) {
665
- this.debouncedUserLinkFunc = debounce(this.updateResOptions('人员'), 200)
665
+ this.debouncedUserLinkFunc = debounce(() => this.updateResOptions('人员'), 200)
666
666
  }
667
667
  if (this?.attr?.keyName?.toString()?.startsWith('search@根据表单项[') && this?.attr?.keyName?.toString().endsWith(']联动部门')) {
668
- this.debouncedDepLinkFunc = debounce(this.updateResOptions('部门'), 200)
668
+ this.debouncedDepLinkFunc = debounce(() => this.updateResOptions('部门'), 200)
669
669
  }
670
670
  if (this.attr.type === 'richText') {
671
671
  this.richText = await this.getRichText()
@@ -801,22 +801,20 @@ export default {
801
801
  const endIndex = this.attr.keyName.indexOf(']', startIndex)
802
802
  const fromModel = this.attr.keyName.substring(startIndex, endIndex).replace('.', '_')
803
803
  const formModelData = this.form[fromModel]
804
- await searchToListOption(searchData, res => {
805
- this.getDataCallback(
806
- res.filter(h => {
807
- if (fromModel && fromModel.length) {
804
+ if (fromModel?.length && formModelData?.length) {
805
+ await searchToListOption(searchData, res => {
806
+ this.getDataCallback(
807
+ res.filter(h => {
808
808
  if (fromModel.indexOf('org') > -1) {
809
- return formModelData?.includes(h.orgid || h.f_organization_id)
809
+ return formModelData?.includes(h.orgid || h.f_organization_id || h.parentid)
810
810
  } else {
811
811
  return formModelData?.includes(h?.parentid)
812
812
  }
813
- } else {
814
- return false
815
813
  }
816
- }
814
+ )
817
815
  )
818
- )
819
- })
816
+ })
817
+ }
820
818
  }
821
819
  },
822
820
  // js 函数作为数据源
@@ -8,6 +8,7 @@
8
8
  <!-- 主体表格 -->
9
9
  <XReportDesign
10
10
  @updateImg="updateImg"
11
+ @selectRow="selectRow"
11
12
  v-if="scanFinish"
12
13
  :show-img-in-cell="showImgInCell"
13
14
  :img-prefix="imgPrefix"
@@ -50,6 +51,7 @@
50
51
  <XReportDesign
51
52
  v-if="scanFinish"
52
53
  @updateImg="updateImg"
54
+ @selectRow="selectRow"
53
55
  :show-img-in-cell="showImgInCell"
54
56
  :img-prefix="imgPrefix"
55
57
  :use-oss-for-img="useOssForImg"
@@ -307,6 +309,13 @@ export default {
307
309
  }
308
310
  }
309
311
  },
312
+ selectRow (selectedRowKeys, selectedRows) {
313
+ this.table_selectedRowKeys = selectedRowKeys
314
+ this.table_selectedRows = selectedRows
315
+ console.log('')
316
+ this.$emit('selectRow', selectedRowKeys, selectedRows)
317
+ },
318
+
310
319
  // 正常的保存方法,当前修改内容会直接全部导出到外部
311
320
  saveConfig () {
312
321
  if (this.activeConfig === undefined || this.activeConfig === null) {
@@ -802,6 +811,10 @@ export default {
802
811
  })
803
812
  }
804
813
  },
814
+ onSubmit () {
815
+ console.log('this.table_selectedRowKeys', this.table_selectedRowKeys)
816
+ console.log('this.table_selectedRows', this.table_selectedRows)
817
+ },
805
818
  },
806
819
  beforeMount () {
807
820
  // 如果只是展示
@@ -3,6 +3,7 @@
3
3
  <template v-if="this.activatedConfig.designMode === 'json'">
4
4
  <XReportJsonRender
5
5
  @updateImg="updateImg"
6
+ @selectRow="selectRow"
6
7
  :img-prefix="imgPrefix"
7
8
  :server-name="serverName"
8
9
  :display-only="displayOnly"
@@ -50,6 +51,7 @@
50
51
  <template v-if="row[0].type === 'slot'">
51
52
  <x-report-tr-group
52
53
  @updateImg="updateImg"
54
+ @selectRow="selectRow"
53
55
  :show-img-in-cell="showImgInCell"
54
56
  :img-prefix="imgPrefix"
55
57
  :server-name="serverName"
@@ -68,6 +70,7 @@
68
70
  <template v-if="!forDisplay">
69
71
  <x-report-tr-group
70
72
  @updateImg="updateImg"
73
+ @selectRow="selectRow"
71
74
  :show-img-in-cell="showImgInCell"
72
75
  :img-prefix="imgPrefix"
73
76
  :server-name="serverName"
@@ -83,6 +86,7 @@
83
86
  <template v-else>
84
87
  <x-report-tr-group
85
88
  @updateImg="updateImg"
89
+ @selectRow="selectRow"
86
90
  :show-img-in-cell="showImgInCell"
87
91
  :img-prefix="imgPrefix"
88
92
  :server-name="serverName"
@@ -103,6 +107,7 @@
103
107
  <template v-if="forDisplay">
104
108
  <x-report-tr-group
105
109
  @updateImg="updateImg"
110
+ @selectRow="selectRow"
106
111
  :show-img-in-cell="showImgInCell"
107
112
  :img-prefix="imgPrefix"
108
113
  :server-name="serverName"
@@ -120,6 +125,7 @@
120
125
  <template v-if="!forDisplay">
121
126
  <x-report-tr-group
122
127
  @updateImg="updateImg"
128
+ @selectRow="selectRow"
123
129
  :show-img-in-cell="showImgInCell"
124
130
  :img-prefix="imgPrefix"
125
131
  :server-name="serverName"
@@ -135,6 +141,7 @@
135
141
  <!-- 动态行交互按钮 -->
136
142
  <x-report-tr-group
137
143
  @updateImg="updateImg"
144
+ @selectRow="selectRow"
138
145
  :show-img-in-cell="showImgInCell"
139
146
  :img-prefix="imgPrefix"
140
147
  :server-name="serverName"
@@ -154,6 +161,7 @@
154
161
  <template v-if="!forDisplay">
155
162
  <x-report-tr-group
156
163
  @updateImg="updateImg"
164
+ @selectRow="selectRow"
157
165
  :show-img-in-cell="showImgInCell"
158
166
  :img-prefix="imgPrefix"
159
167
  :server-name="serverName"
@@ -168,6 +176,7 @@
168
176
  <template v-else>
169
177
  <x-report-tr-group
170
178
  @updateImg="updateImg"
179
+ @selectRow="selectRow"
171
180
  :show-img-in-cell="showImgInCell"
172
181
  :img-prefix="imgPrefix"
173
182
  :server-name="serverName"
@@ -292,6 +301,12 @@ export default {
292
301
  updateImg (data) {
293
302
  this.$emit('updateImg', data)
294
303
  },
304
+ selectRow (selectedRowKeys, selectedRows) {
305
+ this.table_selectedRowKeys = selectedRowKeys
306
+ this.table_selectedRows = selectedRows
307
+ console.log('XReportDesign')
308
+ this.$emit('selectRow', selectedRowKeys, selectedRows)
309
+ },
295
310
  // 根据format计算需要多少个输入框
296
311
  calcFormatInputNum (formatStr) {
297
312
  let count = 0
@@ -17,6 +17,7 @@
17
17
  :is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
18
18
  :key="cellIndex"
19
19
  :serviceName="cell.serviceName"
20
+ @selectRow="selectRow"
20
21
  @[cell.eventType]="(...args)=>executeCustomFunction( cell,...args)"
21
22
  :queryParamsName="cell.slotConfig"/>
22
23
  </template>
@@ -768,6 +769,12 @@ export default {
768
769
 
769
770
  return result
770
771
  },
772
+ selectRow (selectedRowKeys, selectedRows) {
773
+ this.table_selectedRowKeys = selectedRowKeys
774
+ this.table_selectedRows = selectedRows
775
+ console.log('1123123123')
776
+ this.$emit('selectRow', selectedRowKeys, selectedRows)
777
+ },
771
778
  },
772
779
  beforeMount () {
773
780
  if (this.useOssForImg) {