agilebuilder-ui 1.0.49 → 1.0.51
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/lib/super-ui.css +1 -1
- package/lib/super-ui.js +193 -130
- package/lib/super-ui.umd.cjs +6 -6
- package/package.json +1 -1
- package/packages/fs-upload-list/src/fs-upload-list.vue +8 -2
- package/packages/fs-upload-new/src/fs-button-upload.vue +5 -0
- package/packages/fs-upload-new/src/fs-drag-upload.vue +5 -0
- package/packages/fs-upload-new/src/fs-upload-new.vue +7 -0
- package/packages/organization-input/src/organization-input.vue +18 -11
- package/packages/rich-editor/index.vue +1 -1
- package/packages/super-grid/src/apis.js +36 -6
- package/packages/super-grid/src/normal-column.vue +21 -17
- package/packages/super-grid/src/search-form-number.vue +11 -0
- package/packages/super-grid/src/search-form.vue +3 -1
- package/packages/super-grid/src/super-grid.vue +6 -5
- package/src/api/sso-service.js +7 -1
- package/src/i18n/langs/cn.js +3 -1
- package/src/i18n/langs/en.js +3 -1
- package/src/styles/theme/ocean-blue/button.scss +34 -13
- package/src/styles/theme/ocean-blue/card.scss +8 -2
- package/src/styles/theme/ocean-blue/checkbox.scss +3 -0
- package/src/styles/theme/ocean-blue/index.scss +1 -0
- package/src/styles/theme/ocean-blue/ocean-blue.scss +3 -0
- package/src/styles/theme/ocean-blue/select.scss +6 -0
- package/src/utils/request.js +75 -12
package/src/utils/request.js
CHANGED
|
@@ -93,12 +93,52 @@ service.interceptors.response.use(
|
|
|
93
93
|
} else if (error.response.status === 403) {
|
|
94
94
|
// ForbiddenException(403) 403没权限
|
|
95
95
|
const message = getI18n().t('imatrixUIMessage.forbiddenException')
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
message
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
let vnode
|
|
97
|
+
if (Vue.prototype.forbiddenUser || Vue.prototype.forbiddenLinkUrl) {
|
|
98
|
+
vnode = '<p><span>' + message + '</span>'
|
|
99
|
+
// 请点击进行权限申请
|
|
100
|
+
const forbiddenExceptionLinkUrlMsg = getI18n().t('imatrixUIMessage.forbiddenExceptionLinkUrl')
|
|
101
|
+
if (Vue.prototype.forbiddenLinkUrl) {
|
|
102
|
+
vnode += ',<a href="#" style="color: #1800ff;font-weight: bold;text-decoration:underline" onclick="window.open(\'' + Vue.prototype.forbiddenLinkUrl + '\')">' + forbiddenExceptionLinkUrlMsg + '</a>'
|
|
103
|
+
}
|
|
104
|
+
if (Vue.prototype.forbiddenUser) {
|
|
105
|
+
// 如有疑问请联系
|
|
106
|
+
const forbiddenExceptionLinkUserMsg = getI18n().t('imatrixUIMessage.forbiddenExceptionLinkUser')
|
|
107
|
+
vnode += '<span>'
|
|
108
|
+
const forbiddenUserHtml = ',' + forbiddenExceptionLinkUserMsg + '<span style="color: #1800ff;"> ' + Vue.prototype.forbiddenUser + '</span>'
|
|
109
|
+
let contactUrlHtml
|
|
110
|
+
if (!window._clickForbiddenUser) {
|
|
111
|
+
contactUrlHtml = forbiddenUserHtml
|
|
112
|
+
} else {
|
|
113
|
+
// index.html中添加如下代码,绑定用户点击事件
|
|
114
|
+
// <script>
|
|
115
|
+
// window._clickForbiddenUser=function(linkUser) {
|
|
116
|
+
// alert(linkUser)
|
|
117
|
+
// }
|
|
118
|
+
// </script>
|
|
119
|
+
contactUrlHtml = '<a href="#" onclick="window._clickForbiddenUser(\'' + Vue.prototype.forbiddenUser + '\');return false">' + forbiddenUserHtml + '</a>'
|
|
120
|
+
}
|
|
121
|
+
vnode += '</span>'
|
|
122
|
+
vnode += contactUrlHtml
|
|
123
|
+
}
|
|
124
|
+
vnode += '</p>'
|
|
125
|
+
}
|
|
126
|
+
if (vnode) {
|
|
127
|
+
Message({
|
|
128
|
+
showClose: true,
|
|
129
|
+
dangerouslyUseHTMLString: true,
|
|
130
|
+
message: vnode,
|
|
131
|
+
type: 'error',
|
|
132
|
+
duration: 10 * 1000
|
|
133
|
+
})
|
|
134
|
+
} else {
|
|
135
|
+
Message({
|
|
136
|
+
showClose: true,
|
|
137
|
+
message: message,
|
|
138
|
+
type: 'error',
|
|
139
|
+
duration: 5 * 1000
|
|
140
|
+
})
|
|
141
|
+
}
|
|
102
142
|
return Promise.reject(error)
|
|
103
143
|
} else if (
|
|
104
144
|
error.response.status === 400 ||
|
|
@@ -114,12 +154,35 @@ service.interceptors.response.use(
|
|
|
114
154
|
if (error.response.data && error.response.data.message) {
|
|
115
155
|
message = error.response.data.message
|
|
116
156
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
157
|
+
let isHtml = 'false'
|
|
158
|
+
let htmlMsg
|
|
159
|
+
try {
|
|
160
|
+
const msgObj = JSON.parse(message)
|
|
161
|
+
isHtml = msgObj['htmlFlag']
|
|
162
|
+
htmlMsg = msgObj['message']
|
|
163
|
+
} catch (error) {
|
|
164
|
+
console.log('message is not JSON')
|
|
165
|
+
}
|
|
166
|
+
if (isHtml !== undefined && isHtml === 'true') {
|
|
167
|
+
// 表示显示html片段
|
|
168
|
+
Message({
|
|
169
|
+
dangerouslyUseHTMLString: true,
|
|
170
|
+
showClose: true,
|
|
171
|
+
message: htmlMsg,
|
|
172
|
+
type: 'error',
|
|
173
|
+
duration: 5 * 1000
|
|
174
|
+
})
|
|
175
|
+
} else {
|
|
176
|
+
if (htmlMsg) {
|
|
177
|
+
message = htmlMsg
|
|
178
|
+
}
|
|
179
|
+
Message({
|
|
180
|
+
showClose: true,
|
|
181
|
+
message: message,
|
|
182
|
+
type: 'error',
|
|
183
|
+
duration: 5 * 1000
|
|
184
|
+
})
|
|
185
|
+
}
|
|
123
186
|
return Promise.reject(error)
|
|
124
187
|
} else {
|
|
125
188
|
let message = error.message
|