vue2-client 1.14.45 → 1.14.46

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.14.45",
3
+ "version": "1.14.46",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -4,7 +4,7 @@
4
4
  <XReport
5
5
  ref="main"
6
6
  :use-oss-for-img="false"
7
- config-name="openPrescriptionCover"
7
+ config-name="收费组件Config"
8
8
  server-name="af-his"
9
9
  :show-img-in-cell="true"
10
10
  :display-only="true"
@@ -56,14 +56,14 @@
56
56
  </template>
57
57
 
58
58
  <script>
59
- import { getConfigByName, runLogic } from '@/services/api/common'
59
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
60
60
 
61
61
  export default {
62
62
  name: 'XCharge',
63
63
  props: {
64
- configName: {
64
+ queryParamsName: {
65
65
  type: String,
66
- default: '收费组件Config'
66
+ default: ''
67
67
  },
68
68
  parameter: {
69
69
  type: Object,
@@ -83,7 +83,7 @@ export default {
83
83
  }
84
84
  },
85
85
  created () {
86
- this.getConfig(this.configName, {})
86
+ this.getConfig(this.queryParamsName, {})
87
87
  },
88
88
  methods: {
89
89
  getConfig (configName, param) {
@@ -97,7 +97,7 @@ export default {
97
97
  })
98
98
  },
99
99
  refreshList (param) {
100
- this.getConfig(this.configName, param)
100
+ this.getConfig(this.queryParamsName, param)
101
101
  },
102
102
  handleAction (key) {
103
103
  console.warn('选择的的方法 ====》' + key)
@@ -22,7 +22,7 @@ XTitle 是一个多功能的标题组件,可以显示标题文本或按钮,
22
22
 
23
23
  ### 配置参数格式
24
24
 
25
- XTitle 组件通过一个字符串参数进行配置
25
+ XTitle 组件通过一个字符串参数进行配置
26
26
 
27
27
  各部分说明:
28
28
 
@@ -37,6 +37,9 @@ XTitle 组件通过一个字符串参数进行配置
37
37
 
38
38
  ### 1. 基本标题
39
39
 
40
+ ```vue
41
+ <x-title query-params-name="患者信息"></x-title>
42
+ ```
40
43
  ```vue
41
44
  <x-title query-params-name="患者信息-title"></x-title>
42
45
  ```
@@ -44,7 +47,7 @@ XTitle 组件通过一个字符串参数进行配置
44
47
  ### 2. 带下划线的标题
45
48
 
46
49
  ```vue
47
- <x-title query-params-name="患者信息-title--line"></x-title>
50
+ <x-title query-params-name="患者信息-title-line"></x-title>
48
51
  ```
49
52
 
50
53
  ### 3. 自定义下划线颜色和宽度
@@ -53,12 +56,6 @@ XTitle 组件通过一个字符串参数进行配置
53
56
  <x-title query-params-name="患者信息-title--line-red-800"></x-title>
54
57
  ```
55
58
 
56
- ### 4. 带点击事件的标题
57
-
58
- ```vue
59
- <x-title query-params-name="患者信息-title-showPatient-line" @showPatient="handleShowPatient"></x-title>
60
- ```
61
-
62
59
  ### 5. 按钮模式
63
60
 
64
61
  ```vue
@@ -4,13 +4,14 @@
4
4
  @updateImg="updateImg"
5
5
  ref="main"
6
6
  :use-oss-for-img="false"
7
- config-name="outpatientWait"
7
+ config-name="outpatientMedicationDispensingMainCover"
8
8
  server-name="af-his"
9
9
  :show-img-in-cell="true"
10
10
  :display-only="displayOnly"
11
11
  :edit-mode="false"
12
12
  :show-save-button="false"
13
13
  :dont-format="true"/>
14
+ <button @click="clickButton()"></button>
14
15
  </div>
15
16
  </template>
16
17
 
@@ -67,6 +68,9 @@ export default {
67
68
  result.push(item.exportData())
68
69
  })
69
70
  console.warn('save', result)
71
+ },
72
+ clickButton () {
73
+ this.findComponentByName(this, 'aaa', 10, 'parent')
70
74
  }
71
75
  }
72
76
  }
@@ -55,16 +55,18 @@ routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynami
55
55
  routerResource.example = {
56
56
  path: 'example',
57
57
  name: '示例主页面',
58
- // component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
58
+ // component: () => import('@vue2-client/base-client/components/common/XCalendar/demo.vue'),
59
+ // component: () => import('@vue2-client/base-client/components/his/XTitle/XTitle.vue'),
60
+ // component: () => import('@vue2-client/base-client/components/his/XCharge/XCharge.vue'),
59
61
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
60
62
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
61
- // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
62
- // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
63
+ component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
64
+ // component: () => import('@vue2-client/base-client/components/common/XFormTable/d emo.vue'),
63
65
  // component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
64
66
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
65
67
  // component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
66
68
  // component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
67
- component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
69
+ // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
68
70
  // component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
69
71
  // component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),
70
72
  // component: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue'),
@@ -8,3 +8,35 @@ export async function blobValidate (data) {
8
8
  return true
9
9
  }
10
10
  }
11
+ export function findComponentByName (instance, componentName, maxDepth = 50) {
12
+ // 基础判断:如果实例不存在或者已经超过最大深度,返回null
13
+ if (!instance || maxDepth <= 0) {
14
+ return null
15
+ }
16
+
17
+ // 检查当前实例是否有目标组件
18
+ try {
19
+ if (instance.getComponentByName && instance.getComponentByName(componentName)) {
20
+ return instance.getComponentByName(componentName)
21
+ }
22
+ } catch (e) {
23
+ console.warn('查找组件时发生错误:', e)
24
+ }
25
+
26
+ // 递归查找子组件
27
+ if (instance.$children && instance.$children.length) {
28
+ for (const child of instance.$children) {
29
+ const result = findComponentByName(child, componentName, maxDepth - 1)
30
+ if (result) {
31
+ return result
32
+ }
33
+ }
34
+ }
35
+
36
+ // 向上查找父组件
37
+ if (instance.$parent) {
38
+ return findComponentByName(instance.$parent, componentName, maxDepth - 1)
39
+ }
40
+
41
+ return null
42
+ }
package/vue.config.js CHANGED
@@ -83,7 +83,7 @@ module.exports = {
83
83
  // v3用
84
84
  // pathRewrite: { '^/api/af-system/': '/rs/', '^/api/af-iot/': '/rs/' },
85
85
  // pathRewrite: { '^/api/': '/' },
86
- target: revenue,
86
+ target: v3Server,
87
87
  changeOrigin: true
88
88
  },
89
89
  '/devApi': {