vue2-client 1.17.46 → 1.17.47

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.
Files changed (24) hide show
  1. package/.env +20 -20
  2. package/package.json +1 -1
  3. package/src/assets/svg/female.svg +1 -1
  4. package/src/assets/svg/male.svg +1 -1
  5. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +491 -491
  6. package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
  7. package/src/base-client/components/common/HIS/HTab/HTab.vue +443 -443
  8. package/src/base-client/components/common/XCollapse/XCollapse.vue +830 -830
  9. package/src/base-client/components/common/XForm/XFormItem.vue +1 -0
  10. package/src/base-client/components/common/XForm/XTreeSelect.vue +276 -276
  11. package/src/base-client/components/common/XTimeline/XTimeline.vue +477 -477
  12. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
  13. package/src/base-client/components/his/XList/XList.vue +938 -938
  14. package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +354 -354
  15. package/src/base-client/components/his/XTitle/XTitle.vue +314 -314
  16. package/src/base-client/components/his/XTreeRows/XTreeRows.vue +341 -341
  17. package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
  18. package/src/pages/WorkflowDetail/WorkFlowDemo4.vue +127 -0
  19. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowBaseInformation.vue +417 -417
  20. package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
  21. package/src/router/async/router.map.js +2 -2
  22. package/src/services/api/restTools.js +215 -215
  23. package/src-base-client/components/common/HIS/HForm/HForm.vue +0 -347
  24. package/src-base-client/components/common/XCollapse/XCollapse.vue +0 -0
@@ -1,45 +1,45 @@
1
- <script>
2
- export default {
3
- name: 'ExceptionQuery',
4
- components: {
5
- XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue')
6
- },
7
- props: {
8
- currUserInfo: {
9
- type: Object,
10
- default: () => undefined
11
- }
12
- },
13
- mounted () {
14
- this.$refs.xFormTable.refresh(true)
15
- },
16
- data () {
17
- return {
18
- // 查询配置名称
19
- queryParamsName: 'ExceptionRecordQueryCRUD',
20
- fixedQueryForm: { ex_f_userfiles_id: this.currUserInfo.f_userfiles_id },
21
- // 新增表单固定值
22
- fixedAddForm: {},
23
- // 是否显示详情抽屉
24
- detailVisible: false,
25
- // 当前记录
26
- record: {}
27
- }
28
- }
29
- }
30
- </script>
31
-
32
- <template>
33
- <a-card :bordered="false">
34
- <x-form-table
35
- title="异常查询"
36
- :queryParamsName="queryParamsName"
37
- :fixedQueryForm="fixedQueryForm"
38
- ref="xFormTable">
39
- </x-form-table>
40
- </a-card>
41
- </template>
42
-
43
- <style scoped>
44
-
45
- </style>
1
+ <script>
2
+ export default {
3
+ name: 'ExceptionQuery',
4
+ components: {
5
+ XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue')
6
+ },
7
+ props: {
8
+ currUserInfo: {
9
+ type: Object,
10
+ default: () => undefined
11
+ }
12
+ },
13
+ mounted () {
14
+ this.$refs.xFormTable.refresh(true)
15
+ },
16
+ data () {
17
+ return {
18
+ // 查询配置名称
19
+ queryParamsName: 'ExceptionRecordQueryCRUD',
20
+ fixedQueryForm: { ex_f_userfiles_id: this.currUserInfo.f_userfiles_id },
21
+ // 新增表单固定值
22
+ fixedAddForm: {},
23
+ // 是否显示详情抽屉
24
+ detailVisible: false,
25
+ // 当前记录
26
+ record: {}
27
+ }
28
+ }
29
+ }
30
+ </script>
31
+
32
+ <template>
33
+ <a-card :bordered="false">
34
+ <x-form-table
35
+ title="异常查询"
36
+ :queryParamsName="queryParamsName"
37
+ :fixedQueryForm="fixedQueryForm"
38
+ ref="xFormTable">
39
+ </x-form-table>
40
+ </a-card>
41
+ </template>
42
+
43
+ <style scoped>
44
+
45
+ </style>
@@ -53,9 +53,9 @@ routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynami
53
53
  routerResource.example = {
54
54
  path: 'example',
55
55
  name: '示例主页面',
56
- component: () => import('@vue2-client/base-client/components/his/HChart/demo.vue'),
56
+ // component: () => import('@vue2-client/base-client/components/his/HChart/demo.vue'),
57
57
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
58
- // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
58
+ component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
59
59
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
60
60
  // component: () => import('@vue2-client/pages/addressSelect/addressDemo.vue'),
61
61
  // component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
@@ -1,215 +1,215 @@
1
- import { getSystemVersion, METHOD, request } from '@vue2-client/utils/request'
2
- import { ACCESS_TOKEN, V4_ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
3
-
4
- /**
5
- * GET请求
6
- * @param url 请求地址
7
- * @param parameter 路径参数
8
- * @returns {Promise<AxiosResponse<T>>}
9
- */
10
- function get (url, parameter) {
11
- return request(url, METHOD.GET, parameter)
12
- }
13
-
14
- /**
15
- * POST请求
16
- * @param url 请求地址
17
- * @param parameter 请求参数
18
- * @param config
19
- * @returns {Promise<AxiosResponse<T>>}
20
- */
21
- function post (url, parameter, config = {}) {
22
- return request(url, METHOD.POST, parameter, config)
23
- }
24
-
25
- /**
26
- * POST请求
27
- * @param url 请求地址
28
- * @param parameter 请求参数
29
- * @param serviceName
30
- * @param isDev
31
- * @param config
32
- * @returns {Promise<AxiosResponse<T>>}
33
- */
34
- function postByServiceName (url, parameter, serviceName = process.env.VUE_APP_SYSTEM_NAME, isDev, config = {}) {
35
- if (url.startsWith('api/') || url.startsWith('/api/')) {
36
- return request(url, METHOD.POST, parameter, config)
37
- }
38
- let apiPre = '/api/'
39
- if (isDev) {
40
- apiPre = '/devApi/'
41
- }
42
- if (!url.startsWith('/')) {
43
- url = '/' + url
44
- }
45
- url = apiPre + serviceName + url
46
- return request(url, METHOD.POST, parameter, config)
47
- }
48
-
49
- /**
50
- * DELETE请求
51
- * @param url 请求地址
52
- * @param parameter 请求参数
53
- * @param config
54
- * @returns {Promise<AxiosResponse<T>>}
55
- */
56
- function del (url, parameter, config = {}) {
57
- return request(url, METHOD.DELETE, parameter, config)
58
- }
59
-
60
- /**
61
- * PUT请求
62
- * @param url 请求地址
63
- * @param parameter 请求参数
64
- * @param config
65
- * @returns {Promise<AxiosResponse<T>>}
66
- */
67
- function put (url, parameter, config = {}) {
68
- return request(url, METHOD.PUT, parameter, config)
69
- }
70
-
71
- /**
72
- * 封装 EventSource 请求函数
73
- * @param {string} url - 请求地址
74
- * @param {Object} options - 请求选项(包括 method, headers, body 等)
75
- * @param {Function} onDataUpdate - 数据更新回调,每次接收到新的数据都会调用
76
- * @param {Function} onError - 错误处理回调
77
- * @returns {Function} - 用于取消请求的函数
78
- */
79
- function startEventStreamPOST (url, params, headers = {}, onDataUpdate, onError, serviceName = process.env.VUE_APP_SYSTEM_NAME, method = 'GET') {
80
- return startEventStream(url, params, headers, onDataUpdate, onError, serviceName, 'POST')
81
- }
82
- function startEventStream (url, params, headers = {}, onDataUpdate, onError, serviceName = process.env.VUE_APP_SYSTEM_NAME, method = 'GET') {
83
- // let isStopped = false
84
- let isStopped = false
85
- let requestCount = 0
86
-
87
- if (!(url.startsWith('api/') || url.startsWith('/api/') || url.startsWith('http'))) {
88
- if (!url.startsWith('/')) {
89
- url = '/' + url
90
- }
91
- url = '/api/' + serviceName + url
92
- }
93
-
94
- console.log(`[EventStream] 开始新的请求: ${url}`, {
95
- params,
96
- headers,
97
- method
98
- })
99
-
100
- const controller = new AbortController()
101
- const { signal } = controller
102
- const token = localStorage.getItem(ACCESS_TOKEN)
103
- // 增加 V4 登录请求头
104
- if (token) {
105
- const compatible = getSystemVersion()
106
- if (compatible === 'V4') {
107
- // V4 环境则添加 V4请求头
108
- headers[V4_ACCESS_TOKEN] = token
109
- } else {
110
- headers[ACCESS_TOKEN] = token
111
- }
112
- }
113
- fetch(url, {
114
- method: method,
115
- headers: {
116
- ...headers,
117
- Accept: 'text/event-stream',
118
- 'Cache-Control': 'no-cache',
119
- Connection: 'keep-alive'
120
- },
121
- body: JSON.stringify(params),
122
- signal
123
- }).then(response => {
124
- if (!response.ok) {
125
- throw new Error(`HTTP error! status: ${response.status}`)
126
- }
127
-
128
- requestCount++
129
- console.log(`[EventStream] 请求已打开 (第${requestCount}次): ${url}`, {
130
- status: response.status,
131
- statusText: response.statusText
132
- })
133
-
134
- const reader = response.body.getReader()
135
- const decoder = new TextDecoder()
136
- let buffer = ''
137
-
138
- function processStream () {
139
- if (isStopped) {
140
- console.log(`[EventStream] 请求已停止,停止读取流: ${url}`)
141
- return
142
- }
143
-
144
- reader.read().then(({ done, value }) => {
145
- if (done) {
146
- console.log(`[EventStream] 流读取完成: ${url}`)
147
- return
148
- }
149
-
150
- const chunk = decoder.decode(value, { stream: true })
151
- buffer += chunk
152
-
153
- // 处理接收到的数据
154
- const lines = buffer.split('\n')
155
- buffer = lines.pop() // 保留最后一个不完整的行
156
-
157
- let currentEvent = null
158
- let currentData = null
159
-
160
- for (const line of lines) {
161
- if (line.startsWith('event: ')) {
162
- currentEvent = line.slice(7)
163
- } else if (line.startsWith('data: ')) {
164
- currentData = line.slice(6)
165
- try {
166
- const parsedData = JSON.parse(currentData)
167
- if (currentEvent === 'additionalInfo') {
168
- // 触发 additionalInfo 回调
169
- onDataUpdate?.(parsedData, 'additionalInfo')
170
- } else {
171
- // 普通消息数据
172
- onDataUpdate?.(parsedData, 'sourceInfo')
173
- }
174
- } catch (e) {
175
- if (currentEvent === 'sourceInfo') {
176
- // 触发 sourceInfo 回调
177
- onDataUpdate?.(currentData, 'sourceInfo')
178
- } else {
179
- onDataUpdate?.(currentData, 'data')
180
- }
181
- }
182
- // 重置当前事件和数据
183
- currentEvent = null
184
- currentData = null
185
- }
186
- }
187
-
188
- processStream()
189
- }).catch(error => {
190
- console.error(`[EventStream] 流读取错误: ${url}`, error)
191
- if (!isStopped) {
192
- isStopped = true
193
- onError?.(error)
194
- }
195
- })
196
- }
197
-
198
- processStream()
199
- }).catch(error => {
200
- console.error(`[EventStream] 请求错误: ${url}`, error)
201
- if (!isStopped) {
202
- isStopped = true
203
- onError?.(error)
204
- }
205
- })
206
-
207
- // 返回停止函数
208
- return () => {
209
- isStopped = true
210
- controller.abort()
211
- console.log('连接已关闭')
212
- }
213
- }
214
-
215
- export { get, post, del, put, postByServiceName, startEventStream, startEventStreamPOST }
1
+ import { getSystemVersion, METHOD, request } from '@vue2-client/utils/request'
2
+ import { ACCESS_TOKEN, V4_ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
3
+
4
+ /**
5
+ * GET请求
6
+ * @param url 请求地址
7
+ * @param parameter 路径参数
8
+ * @returns {Promise<AxiosResponse<T>>}
9
+ */
10
+ function get (url, parameter) {
11
+ return request(url, METHOD.GET, parameter)
12
+ }
13
+
14
+ /**
15
+ * POST请求
16
+ * @param url 请求地址
17
+ * @param parameter 请求参数
18
+ * @param config
19
+ * @returns {Promise<AxiosResponse<T>>}
20
+ */
21
+ function post (url, parameter, config = {}) {
22
+ return request(url, METHOD.POST, parameter, config)
23
+ }
24
+
25
+ /**
26
+ * POST请求
27
+ * @param url 请求地址
28
+ * @param parameter 请求参数
29
+ * @param serviceName
30
+ * @param isDev
31
+ * @param config
32
+ * @returns {Promise<AxiosResponse<T>>}
33
+ */
34
+ function postByServiceName (url, parameter, serviceName = process.env.VUE_APP_SYSTEM_NAME, isDev, config = {}) {
35
+ if (url.startsWith('api/') || url.startsWith('/api/')) {
36
+ return request(url, METHOD.POST, parameter, config)
37
+ }
38
+ let apiPre = '/api/'
39
+ if (isDev) {
40
+ apiPre = '/devApi/'
41
+ }
42
+ if (!url.startsWith('/')) {
43
+ url = '/' + url
44
+ }
45
+ url = apiPre + serviceName + url
46
+ return request(url, METHOD.POST, parameter, config)
47
+ }
48
+
49
+ /**
50
+ * DELETE请求
51
+ * @param url 请求地址
52
+ * @param parameter 请求参数
53
+ * @param config
54
+ * @returns {Promise<AxiosResponse<T>>}
55
+ */
56
+ function del (url, parameter, config = {}) {
57
+ return request(url, METHOD.DELETE, parameter, config)
58
+ }
59
+
60
+ /**
61
+ * PUT请求
62
+ * @param url 请求地址
63
+ * @param parameter 请求参数
64
+ * @param config
65
+ * @returns {Promise<AxiosResponse<T>>}
66
+ */
67
+ function put (url, parameter, config = {}) {
68
+ return request(url, METHOD.PUT, parameter, config)
69
+ }
70
+
71
+ /**
72
+ * 封装 EventSource 请求函数
73
+ * @param {string} url - 请求地址
74
+ * @param {Object} options - 请求选项(包括 method, headers, body 等)
75
+ * @param {Function} onDataUpdate - 数据更新回调,每次接收到新的数据都会调用
76
+ * @param {Function} onError - 错误处理回调
77
+ * @returns {Function} - 用于取消请求的函数
78
+ */
79
+ function startEventStreamPOST (url, params, headers = {}, onDataUpdate, onError, serviceName = process.env.VUE_APP_SYSTEM_NAME, method = 'GET') {
80
+ return startEventStream(url, params, headers, onDataUpdate, onError, serviceName, 'POST')
81
+ }
82
+ function startEventStream (url, params, headers = {}, onDataUpdate, onError, serviceName = process.env.VUE_APP_SYSTEM_NAME, method = 'GET') {
83
+ // let isStopped = false
84
+ let isStopped = false
85
+ let requestCount = 0
86
+
87
+ if (!(url.startsWith('api/') || url.startsWith('/api/') || url.startsWith('http'))) {
88
+ if (!url.startsWith('/')) {
89
+ url = '/' + url
90
+ }
91
+ url = '/api/' + serviceName + url
92
+ }
93
+
94
+ console.log(`[EventStream] 开始新的请求: ${url}`, {
95
+ params,
96
+ headers,
97
+ method
98
+ })
99
+
100
+ const controller = new AbortController()
101
+ const { signal } = controller
102
+ const token = localStorage.getItem(ACCESS_TOKEN)
103
+ // 增加 V4 登录请求头
104
+ if (token) {
105
+ const compatible = getSystemVersion()
106
+ if (compatible === 'V4') {
107
+ // V4 环境则添加 V4请求头
108
+ headers[V4_ACCESS_TOKEN] = token
109
+ } else {
110
+ headers[ACCESS_TOKEN] = token
111
+ }
112
+ }
113
+ fetch(url, {
114
+ method: method,
115
+ headers: {
116
+ ...headers,
117
+ Accept: 'text/event-stream',
118
+ 'Cache-Control': 'no-cache',
119
+ Connection: 'keep-alive'
120
+ },
121
+ body: JSON.stringify(params),
122
+ signal
123
+ }).then(response => {
124
+ if (!response.ok) {
125
+ throw new Error(`HTTP error! status: ${response.status}`)
126
+ }
127
+
128
+ requestCount++
129
+ console.log(`[EventStream] 请求已打开 (第${requestCount}次): ${url}`, {
130
+ status: response.status,
131
+ statusText: response.statusText
132
+ })
133
+
134
+ const reader = response.body.getReader()
135
+ const decoder = new TextDecoder()
136
+ let buffer = ''
137
+
138
+ function processStream () {
139
+ if (isStopped) {
140
+ console.log(`[EventStream] 请求已停止,停止读取流: ${url}`)
141
+ return
142
+ }
143
+
144
+ reader.read().then(({ done, value }) => {
145
+ if (done) {
146
+ console.log(`[EventStream] 流读取完成: ${url}`)
147
+ return
148
+ }
149
+
150
+ const chunk = decoder.decode(value, { stream: true })
151
+ buffer += chunk
152
+
153
+ // 处理接收到的数据
154
+ const lines = buffer.split('\n')
155
+ buffer = lines.pop() // 保留最后一个不完整的行
156
+
157
+ let currentEvent = null
158
+ let currentData = null
159
+
160
+ for (const line of lines) {
161
+ if (line.startsWith('event: ')) {
162
+ currentEvent = line.slice(7)
163
+ } else if (line.startsWith('data: ')) {
164
+ currentData = line.slice(6)
165
+ try {
166
+ const parsedData = JSON.parse(currentData)
167
+ if (currentEvent === 'additionalInfo') {
168
+ // 触发 additionalInfo 回调
169
+ onDataUpdate?.(parsedData, 'additionalInfo')
170
+ } else {
171
+ // 普通消息数据
172
+ onDataUpdate?.(parsedData, 'sourceInfo')
173
+ }
174
+ } catch (e) {
175
+ if (currentEvent === 'sourceInfo') {
176
+ // 触发 sourceInfo 回调
177
+ onDataUpdate?.(currentData, 'sourceInfo')
178
+ } else {
179
+ onDataUpdate?.(currentData, 'data')
180
+ }
181
+ }
182
+ // 重置当前事件和数据
183
+ currentEvent = null
184
+ currentData = null
185
+ }
186
+ }
187
+
188
+ processStream()
189
+ }).catch(error => {
190
+ console.error(`[EventStream] 流读取错误: ${url}`, error)
191
+ if (!isStopped) {
192
+ isStopped = true
193
+ onError?.(error)
194
+ }
195
+ })
196
+ }
197
+
198
+ processStream()
199
+ }).catch(error => {
200
+ console.error(`[EventStream] 请求错误: ${url}`, error)
201
+ if (!isStopped) {
202
+ isStopped = true
203
+ onError?.(error)
204
+ }
205
+ })
206
+
207
+ // 返回停止函数
208
+ return () => {
209
+ isStopped = true
210
+ controller.abort()
211
+ console.log('连接已关闭')
212
+ }
213
+ }
214
+
215
+ export { get, post, del, put, postByServiceName, startEventStream, startEventStreamPOST }