vue2-client 1.17.38 → 1.17.39
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/.env +20 -20
- package/package.json +1 -1
- package/src/assets/svg/female.svg +1 -1
- package/src/assets/svg/male.svg +1 -1
- package/src/base-client/components/common/HIS/HButtons/HButtons.vue +491 -491
- package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
- package/src/base-client/components/common/HIS/HTab/HTab.vue +443 -443
- package/src/base-client/components/common/XCollapse/XCollapse.vue +830 -833
- package/src/base-client/components/common/XForm/XTreeSelect.vue +276 -276
- package/src/base-client/components/common/XFormTable/XFormTable.vue +112 -0
- package/src/base-client/components/common/XFormTable/demo.vue +89 -89
- package/src/base-client/components/common/XTable/XTableWrapper.vue +0 -5
- package/src/base-client/components/common/XTimeline/XTimeline.vue +477 -477
- package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +41 -2
- package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
- package/src/base-client/components/his/XList/XList.vue +938 -938
- package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +354 -354
- package/src/base-client/components/his/XTitle/XTitle.vue +314 -314
- package/src/base-client/components/his/XTreeRows/XTreeRows.vue +341 -341
- package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
- package/src/components/STable/index.js +94 -55
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowBaseInformation.vue +417 -417
- package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
- package/src/router/async/router.map.js +133 -133
- package/src/services/api/restTools.js +215 -215
- package/src/theme/global.less +144 -112
- package/src-base-client/components/common/HIS/HForm/HForm.vue +347 -0
- package/src-base-client/components/common/XCollapse/XCollapse.vue +0 -0
- package/src/pages/WorkflowDetail/WorkFlowDemo4.vue +0 -127
|
@@ -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 }
|
package/src/theme/global.less
CHANGED
|
@@ -43,118 +43,6 @@ ol {
|
|
|
43
43
|
margin-bottom: 16px;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
// 表格行样式类型
|
|
47
|
-
.ant-table-tbody {
|
|
48
|
-
// 成功样式 - 绿色 (#52c41a)
|
|
49
|
-
.ant-table-row-success {
|
|
50
|
-
background-color: rgba(82, 196, 26, 0.2);
|
|
51
|
-
|
|
52
|
-
&:hover {
|
|
53
|
-
background-color: rgba(82, 196, 26, 0.3);
|
|
54
|
-
|
|
55
|
-
td {
|
|
56
|
-
background-color: transparent;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// 选中状态
|
|
61
|
-
&.ant-table-row-selected {
|
|
62
|
-
background-color: rgba(82, 196, 26, 0.4);
|
|
63
|
-
|
|
64
|
-
td {
|
|
65
|
-
background-color: transparent;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
td {
|
|
70
|
-
background-color: transparent;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// 警告样式 - 黄色 (#faad14)
|
|
75
|
-
.ant-table-row-warning {
|
|
76
|
-
background-color: rgba(250, 173, 20, 0.1) ;
|
|
77
|
-
|
|
78
|
-
&:hover {
|
|
79
|
-
background-color: rgba(250, 173, 20, 0.15) ;
|
|
80
|
-
|
|
81
|
-
td {
|
|
82
|
-
background-color: transparent ;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// 选中状态
|
|
87
|
-
&.ant-table-row-selected {
|
|
88
|
-
background-color: rgba(250, 173, 20, 0.2);
|
|
89
|
-
|
|
90
|
-
td {
|
|
91
|
-
background-color: transparent;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
td {
|
|
96
|
-
background-color: transparent ;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// 错误样式 - 红色 (#f5222f)
|
|
101
|
-
.ant-table-row-error {
|
|
102
|
-
background-color: rgba(245, 34, 47, 0.1) ;
|
|
103
|
-
|
|
104
|
-
&:hover {
|
|
105
|
-
background-color: rgba(245, 34, 47, 0.15) ;
|
|
106
|
-
|
|
107
|
-
td {
|
|
108
|
-
background-color: transparent ;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// 选中状态
|
|
113
|
-
&.ant-table-row-selected {
|
|
114
|
-
background-color: rgba(245, 34, 47, 0.2) ;
|
|
115
|
-
|
|
116
|
-
td {
|
|
117
|
-
background-color: transparent ;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
td {
|
|
122
|
-
background-color: transparent ;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// 魔法样式 - 紫色
|
|
127
|
-
.ant-table-row-magic {
|
|
128
|
-
background-color: rgba(114, 46, 209, 0.1) ;
|
|
129
|
-
|
|
130
|
-
&:hover {
|
|
131
|
-
background-color: rgba(114, 46, 209, 0.15) ;
|
|
132
|
-
|
|
133
|
-
td {
|
|
134
|
-
background-color: transparent ;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// 选中状态
|
|
139
|
-
&.ant-table-row-selected {
|
|
140
|
-
background-color: rgba(114, 46, 209, 0.2) ;
|
|
141
|
-
|
|
142
|
-
td {
|
|
143
|
-
background-color: transparent ;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
td {
|
|
148
|
-
background-color: transparent ;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// 默认选中状态(没有特殊行样式时)
|
|
153
|
-
.ant-table-row-selected:not(.ant-table-row-success):not(.ant-table-row-warning):not(.ant-table-row-error):not(.ant-table-row-magic) {
|
|
154
|
-
background-color: rgba(24, 144, 255, 0.1) ;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
46
|
// 数据列表 操作
|
|
159
47
|
.table-operator {
|
|
160
48
|
margin-bottom: 18px;
|
|
@@ -259,6 +147,150 @@ ol {
|
|
|
259
147
|
display: none;
|
|
260
148
|
}
|
|
261
149
|
|
|
150
|
+
// STable 表格行样式
|
|
151
|
+
.ant-table-tbody {
|
|
152
|
+
// 统一为所有行添加平滑过渡效果
|
|
153
|
+
tr {
|
|
154
|
+
transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
155
|
+
|
|
156
|
+
td {
|
|
157
|
+
transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// 成功样式 - 绿色
|
|
162
|
+
.row-style-success {
|
|
163
|
+
background-color: rgba(82, 196, 26, 0.1) !important;
|
|
164
|
+
|
|
165
|
+
// 使用 CSS :hover 处理鼠标悬浮(即使快速移动也能正确显示)
|
|
166
|
+
&:hover,
|
|
167
|
+
&.row-clicked {
|
|
168
|
+
background-color: rgba(82, 196, 26, 0.2) !important;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
td {
|
|
172
|
+
background-color: transparent !important;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// 超链接样式 - 使用更深的绿色
|
|
176
|
+
a {
|
|
177
|
+
color: #389e0d !important; // 深绿色
|
|
178
|
+
transition: color 0.2s ease;
|
|
179
|
+
|
|
180
|
+
&:hover {
|
|
181
|
+
color: #237804 !important; // 更深的绿色
|
|
182
|
+
text-decoration: underline;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&:active {
|
|
186
|
+
color: #135200 !important; // 最深的绿色
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// 警告样式 - 黄色
|
|
192
|
+
.row-style-warning,
|
|
193
|
+
.row-style-warn {
|
|
194
|
+
background-color: rgba(250, 173, 20, 0.1) !important;
|
|
195
|
+
|
|
196
|
+
&:hover,
|
|
197
|
+
&.row-clicked {
|
|
198
|
+
background-color: rgba(250, 173, 20, 0.2) !important;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
td {
|
|
202
|
+
background-color: transparent !important;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// 超链接样式 - 使用更深的橙黄色
|
|
206
|
+
a {
|
|
207
|
+
color: #d48806 !important; // 深橙黄色
|
|
208
|
+
transition: color 0.2s ease;
|
|
209
|
+
|
|
210
|
+
&:hover {
|
|
211
|
+
color: #ad6800 !important; // 更深的橙黄色
|
|
212
|
+
text-decoration: underline;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&:active {
|
|
216
|
+
color: #874d00 !important; // 最深的橙黄色
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// 错误/危险样式 - 红色
|
|
222
|
+
.row-style-error,
|
|
223
|
+
.row-style-danger {
|
|
224
|
+
background-color: rgba(245, 34, 47, 0.1) !important;
|
|
225
|
+
|
|
226
|
+
&:hover,
|
|
227
|
+
&.row-clicked {
|
|
228
|
+
background-color: rgba(245, 34, 47, 0.2) !important;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
td {
|
|
232
|
+
background-color: transparent !important;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// 超链接样式 - 使用更深的红色
|
|
236
|
+
a {
|
|
237
|
+
color: #cf1322 !important; // 深红色
|
|
238
|
+
transition: color 0.2s ease;
|
|
239
|
+
|
|
240
|
+
&:hover {
|
|
241
|
+
color: #a8071a !important; // 更深的红色
|
|
242
|
+
text-decoration: underline;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&:active {
|
|
246
|
+
color: #820014 !important; // 最深的红色
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// 魔法样式 - 紫色
|
|
252
|
+
.row-style-magic {
|
|
253
|
+
background-color: rgba(114, 46, 209, 0.1) !important;
|
|
254
|
+
|
|
255
|
+
&:hover,
|
|
256
|
+
&.row-clicked {
|
|
257
|
+
background-color: rgba(114, 46, 209, 0.2) !important;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
td {
|
|
261
|
+
background-color: transparent !important;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// 超链接样式 - 使用更深的紫色
|
|
265
|
+
a {
|
|
266
|
+
color: #531dab !important; // 深紫色
|
|
267
|
+
transition: color 0.2s ease;
|
|
268
|
+
|
|
269
|
+
&:hover {
|
|
270
|
+
color: #391085 !important; // 更深的紫色
|
|
271
|
+
text-decoration: underline;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&:active {
|
|
275
|
+
color: #22075e !important; // 最深的紫色
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// 默认信息样式
|
|
281
|
+
.row-style-info {
|
|
282
|
+
&:hover,
|
|
283
|
+
&.row-clicked {
|
|
284
|
+
// 使用主题色的 20% 透明度
|
|
285
|
+
background-color: fade(@primary-color, 10%) !important;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
td {
|
|
289
|
+
background-color: transparent !important;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
262
294
|
@media (max-width: @screen-xs) {
|
|
263
295
|
.ant-table {
|
|
264
296
|
width: 100%;
|