imatrix-ui 2.9.15-dw-tmp2 → 2.9.16-boe1
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.umd.min.js +5 -35
- package/package.json +2 -2
- package/src/api/sso-service.js +19 -1
- package/src/assets/nonemessage.png +0 -0
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +18 -6
- package/src/i18n/langs/en.js +20 -7
- package/src/permission.js +2 -2
- package/src/plugins.js +3 -3
- package/src/router/index.js +10 -0
- package/src/store/modules/tab-content.js +6 -0
- package/src/store/modules/user.js +32 -2
- package/src/styles/display-layout.scss +1 -1
- package/src/styles/index.scss +74 -4
- package/src/styles/theme/black/font-style.scss +70 -0
- package/src/styles/theme/black/index.scss +6 -30
- package/src/styles/theme/blue/font-style.scss +37 -0
- package/src/styles/theme/blue/index.scss +2 -18
- package/src/styles/theme/blue2/font-style.scss +70 -0
- package/src/styles/theme/blue2/index.scss +3 -13
- package/src/styles/theme/dark-blue/card.scss +4 -6
- package/src/styles/theme/dark-blue/form.scss +7 -4
- package/src/styles/theme/dark-blue/index.scss +30 -5
- package/src/styles/theme/dark-blue/message.scss +8 -0
- package/src/styles/theme/dark-blue/radio.scss +13 -0
- package/src/styles/theme/dark-blue/sidebar.scss +7 -37
- package/src/styles/theme/dark-blue/tab.scss +4 -1
- package/src/styles/theme/dark-blue/table.scss +1 -1
- package/src/styles/theme/dark-blue/tree.scss +35 -10
- package/src/styles/theme/gray/card-style.scss +13 -1
- package/src/styles/theme/gray/font-style.scss +38 -0
- package/src/styles/theme/gray/index.scss +13 -25
- package/src/styles/theme/gray/scrollbar-style.scss +32 -0
- package/src/styles/theme/gray/sidebar.scss +7 -14
- package/src/utils/auth-api.js +47 -1
- package/src/utils/common-util.js +22 -81
- package/src/utils/jump-page-utils.js +3 -6
- package/src/utils/range-selector.js +185 -0
- package/src/utils/request.js +6 -3
- package/src/utils/util.js +13 -11
- package/src/utils/workflow-util.js +3 -0
- package/src/views/dsc-component/Sidebar/Item.vue +7 -5
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -3
- package/src/views/dsc-component/Sidebar/index.vue +12 -20
- package/src/views/dsc-component/tabs/tab-content.vue +8 -9
- package/src/views/layout/EmptyLayout.vue +4 -1
- package/src/views/layout/NewLayout.vue +6 -65
- package/src/views/layout/components/AppMain.vue +2 -1
- package/src/views/layout/components/Menubar/Item.vue +23 -7
- package/src/views/layout/components/Menubar/Link.vue +11 -2
- package/src/views/layout/components/Menubar/SidebarItem.vue +50 -7
- package/src/views/layout/components/Menubar/index.vue +51 -16
- package/src/views/layout/components/tabs/tab-content.vue +162 -0
- package/src/views/layout/tab-content-iframe-index.vue +31 -0
- package/src/views/layout/tab-content-index.vue +85 -0
- package/src/views/login/index.vue +1 -1
- package/packages/breadcrumb/index.js +0 -6
- package/packages/breadcrumb/src/breadcrumb.vue +0 -71
- package/packages/department-tree/index.js +0 -6
- package/packages/department-tree/src/department-tree.vue +0 -108
- package/packages/department-tree-inline/index.js +0 -6
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -408
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -290
- package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
- package/packages/department-tree-inline/src/department-tree-service.js +0 -273
- package/packages/department-tree-inline/src/search-result.vue +0 -176
- package/packages/department-user-tree/index.js +0 -6
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
- package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
- package/packages/department-user-tree/src/department-user-tree.vue +0 -101
- package/packages/department-user-tree-inline/index.js +0 -6
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -636
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -271
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -248
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -142
- package/packages/department-user-tree-inline/src/search-result.vue +0 -197
- package/packages/directives/prevent-reclick.js +0 -19
- package/packages/dynamic-source-select/index.js +0 -6
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
- package/packages/dynamic-source-select/src/events.js +0 -55
- package/packages/fs-preview/index.js +0 -6
- package/packages/fs-preview/src/fs-preview.vue +0 -226
- package/packages/fs-upload/index.js +0 -6
- package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
- package/packages/fs-upload/src/fs-upload-single.vue +0 -312
- package/packages/fs-upload/src/fs-upload.vue +0 -189
- package/packages/fs-upload/src/see-big-picture.vue +0 -55
- package/packages/fs-upload-list/index.js +0 -6
- package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
- package/packages/hamburger/index.js +0 -6
- package/packages/hamburger/src/hamburger.vue +0 -38
- package/packages/index.js +0 -121
- package/packages/multipart-upload/index.js +0 -6
- package/packages/multipart-upload/src/index.vue +0 -73
- package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
- package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
- package/packages/organization-input/index.js +0 -6
- package/packages/organization-input/src/organization-input.vue +0 -542
- package/packages/plugins/export-data-new.js +0 -466
- package/packages/plugins/export-data.js +0 -361
- package/packages/plugins/index.js +0 -15
- package/packages/plugins/public-method.js +0 -43
- package/packages/remove-department/index.js +0 -6
- package/packages/remove-department/src/remove-department.vue +0 -172
- package/packages/remove-department/src/remove-dept-service.js +0 -20
- package/packages/remove-user/index.js +0 -6
- package/packages/remove-user/src/remove-user-service.js +0 -20
- package/packages/remove-user/src/remove-user.vue +0 -195
- package/packages/remove-workgroup/index.js +0 -6
- package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
- package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
- package/packages/rich-editor/index.js +0 -7
- package/packages/rich-editor/index.vue +0 -278
- package/packages/rich-editor/langs/zh-Hans.js +0 -1
- package/packages/rich-editor/viewer.vue +0 -103
- package/packages/scan-code-input/index.js +0 -6
- package/packages/scan-code-input/src/events.js +0 -33
- package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
- package/packages/scan-code-input/src/scan-code-input.vue +0 -116
- package/packages/secret-info/index.js +0 -7
- package/packages/secret-info/index.vue +0 -90
- package/packages/super-grid/index.js +0 -7
- package/packages/super-grid/src/apis.js +0 -820
- package/packages/super-grid/src/columns-config.vue +0 -335
- package/packages/super-grid/src/custom-formatter.js +0 -278
- package/packages/super-grid/src/dynamic-input.vue +0 -1279
- package/packages/super-grid/src/eventBus.js +0 -2
- package/packages/super-grid/src/events.js +0 -55
- package/packages/super-grid/src/formValidatorUtil.js +0 -226
- package/packages/super-grid/src/formatter.js +0 -181
- package/packages/super-grid/src/group-column.vue +0 -100
- package/packages/super-grid/src/header-context-menu.vue +0 -87
- package/packages/super-grid/src/index-column.vue +0 -51
- package/packages/super-grid/src/normal-column.vue +0 -771
- package/packages/super-grid/src/public-methods.js +0 -31
- package/packages/super-grid/src/row-operation.vue +0 -161
- package/packages/super-grid/src/search-button.vue +0 -66
- package/packages/super-grid/src/search-condition-input.vue +0 -61
- package/packages/super-grid/src/search-condition-list.vue +0 -59
- package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
- package/packages/super-grid/src/search-form-dialog.vue +0 -79
- package/packages/super-grid/src/search-form-item.vue +0 -404
- package/packages/super-grid/src/search-form-number.vue +0 -38
- package/packages/super-grid/src/search-form-open.vue +0 -170
- package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -196
- package/packages/super-grid/src/search-form.vue +0 -642
- package/packages/super-grid/src/search-methods.js +0 -448
- package/packages/super-grid/src/selection-column.vue +0 -43
- package/packages/super-grid/src/store.js +0 -3
- package/packages/super-grid/src/super-grid-service.js +0 -593
- package/packages/super-grid/src/super-grid.vue +0 -2882
- package/packages/super-grid/src/utils.js +0 -762
- package/packages/super-grid/src/view-image-dialog.vue +0 -130
- package/packages/super-nine-grid/index.js +0 -7
- package/packages/super-nine-grid/src/apis.js +0 -103
- package/packages/super-nine-grid/src/custom-formatter.js +0 -66
- package/packages/super-nine-grid/src/formatter.js +0 -132
- package/packages/super-nine-grid/src/search-form-number.vue +0 -38
- package/packages/super-nine-grid/src/search-form.vue +0 -430
- package/packages/super-nine-grid/src/search-methods.js +0 -134
- package/packages/super-nine-grid/src/store.js +0 -3
- package/packages/super-nine-grid/src/super-grid-service.js +0 -91
- package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
- package/packages/super-nine-grid/src/utils.js +0 -261
- package/packages/svg-icon/index.js +0 -6
- package/packages/svg-icon/src/svg-icon.vue +0 -43
- package/packages/utils/memory-cache-utils.js +0 -90
- package/packages/utils/utils.js +0 -152
- package/packages/utils/value-set.js +0 -86
- package/packages/valid-code/index.js +0 -7
- package/packages/valid-code/src/valid-code.vue +0 -95
- package/packages/workflow-button/index.js +0 -6
- package/packages/workflow-button/src/workflow-button.vue +0 -325
- package/packages/workflow-history-list/index.js +0 -6
- package/packages/workflow-history-list/src/api.js +0 -7
- package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
- package/packages/workgroup-tree/index.js +0 -6
- package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
- package/packages/workgroup-tree-inline/index.js +0 -6
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
- package/packages/workgroup-user-tree/index.js +0 -6
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
- package/packages/workgroup-user-tree-inline/index.js +0 -6
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
- package/packages/year-range-picker/index.js +0 -6
- package/packages/year-range-picker/src/year-range-picker.vue +0 -51
- package/src/index.js +0 -93
- package/src/styles/theme/gray/form-style.scss +0 -41
package/src/utils/common-util.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import sessionStorage from 'sessionstorage'
|
|
2
2
|
import Vue from 'vue'
|
|
3
|
-
import authApi from './auth-api'
|
|
4
|
-
import { getToken } from './auth'
|
|
5
3
|
/**
|
|
6
4
|
* 获得相对地址
|
|
7
5
|
*/
|
|
@@ -171,7 +169,7 @@ export function isPlateSys(systemCode) {
|
|
|
171
169
|
systemCode === 'mms' || systemCode === 'task' ||
|
|
172
170
|
systemCode === 'wf' || systemCode === 'dc' ||
|
|
173
171
|
systemCode === 'mc' || systemCode === 'mobile' ||
|
|
174
|
-
systemCode === 'acs' || systemCode === 'bs'
|
|
172
|
+
systemCode === 'acs' || systemCode === 'bs')) {
|
|
175
173
|
return true
|
|
176
174
|
} else {
|
|
177
175
|
return false
|
|
@@ -226,89 +224,32 @@ export function getTimeZone() {
|
|
|
226
224
|
return timeZone
|
|
227
225
|
}
|
|
228
226
|
|
|
229
|
-
export function
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export function getLocaleByLang(lang) {
|
|
241
|
-
let locale = 'cn'
|
|
242
|
-
if (lang && lang.indexOf('_') > 0) {
|
|
243
|
-
const language = lang.substring(0, lang.indexOf('_'))
|
|
244
|
-
locale = language
|
|
245
|
-
}
|
|
246
|
-
if (locale === 'zh') {
|
|
247
|
-
locale = 'cn'
|
|
227
|
+
export function setCustomSystemBackendUrl(customSystem) {
|
|
228
|
+
// 重新缓存系统后台路径
|
|
229
|
+
if (!Vue.prototype.projectModel || Vue.prototype.projectModel !== 'developing.model') {
|
|
230
|
+
// 表示是生产环境时,需要根据数据库配置获得对应的后端地址
|
|
231
|
+
const backendUrl = window.$authApi.getSystemCacheUrlByCode(customSystem)
|
|
232
|
+
console.log('setCustomSystemBackendUrl:' + backendUrl)
|
|
233
|
+
if (backendUrl) {
|
|
234
|
+
Vue.prototype.baseURL = getRelativeBaseUrl(backendUrl)
|
|
235
|
+
}
|
|
248
236
|
}
|
|
249
|
-
return locale
|
|
250
237
|
}
|
|
251
238
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
if(langs) {
|
|
257
|
-
langResult = JSON.stringify(langs)
|
|
239
|
+
export function pushCustomControlValidatorRef(pageCode, refName, ref) {
|
|
240
|
+
console.log('pushCustomControlValidatorRef----', pageCode, refName, ref)
|
|
241
|
+
if (!window.customValidatorRef) {
|
|
242
|
+
window.customValidatorRef = new Map()
|
|
258
243
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
return authApi.getCookieCache(langKey)
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
*
|
|
267
|
-
* @param {*} langShort 例如:cn或en
|
|
268
|
-
* @returns 例如:zh_CN或en_US
|
|
269
|
-
*/
|
|
270
|
-
export function getLangByShort(langShort) {
|
|
271
|
-
let lang
|
|
272
|
-
const langResultJson = getLangs()
|
|
273
|
-
if(langResultJson){
|
|
274
|
-
const langObj = JSON.parse(langResultJson)
|
|
275
|
-
lang = langObj[langShort]
|
|
244
|
+
let pageCustomControlRef = window.customValidatorRef.get(pageCode)
|
|
245
|
+
if (!pageCustomControlRef) {
|
|
246
|
+
pageCustomControlRef = new Map()
|
|
247
|
+
window.customValidatorRef.set(pageCode, pageCustomControlRef)
|
|
276
248
|
}
|
|
277
|
-
|
|
278
|
-
lang = 'zh_CN'
|
|
279
|
-
}
|
|
280
|
-
return lang
|
|
249
|
+
pageCustomControlRef.set(refName, ref)
|
|
281
250
|
}
|
|
282
251
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
const token = getToken()
|
|
287
|
-
if (token) {
|
|
288
|
-
http.get(Vue.prototype.baseAPI + '/component/all-languages').then((langList) => {
|
|
289
|
-
const langResult = {}
|
|
290
|
-
if (langList) {
|
|
291
|
-
langList.forEach(item => {
|
|
292
|
-
// 例如:zh_CN、en_US
|
|
293
|
-
const lang = item.value
|
|
294
|
-
let langShort
|
|
295
|
-
if (lang.indexOf('_') > 0) {
|
|
296
|
-
langShort = lang.substring(0, lang.indexOf('_'))
|
|
297
|
-
}
|
|
298
|
-
if (langShort && langShort === 'zh') {
|
|
299
|
-
// 中文处理,为了兼容历史逻辑
|
|
300
|
-
langShort = 'cn'
|
|
301
|
-
}
|
|
302
|
-
if (langShort) {
|
|
303
|
-
langResult[langShort] = lang
|
|
304
|
-
}
|
|
305
|
-
})
|
|
306
|
-
}
|
|
307
|
-
cacheLangs(langResult)
|
|
308
|
-
resolve()
|
|
309
|
-
})
|
|
310
|
-
} else {
|
|
311
|
-
resolve()
|
|
312
|
-
}
|
|
313
|
-
})
|
|
252
|
+
export function removeCustomControlValidatorRef(pageCode, refName) {
|
|
253
|
+
const pageCustomControlRef = window.customValidatorRef.get(pageCode)
|
|
254
|
+
pageCustomControlRef.delete(refName)
|
|
314
255
|
}
|
|
@@ -331,14 +331,12 @@ function packagePathParams(dataId, path, jumpPage, ids, buttonCode, isHasIdParam
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
if (ids && ids.length > 0) {
|
|
334
|
-
const idsStr = ids.join(',')
|
|
335
|
-
const idsPath = 'ids=' + idsStr + '&_idsStr=' + idsStr
|
|
336
334
|
if (path.indexOf('?') !== -1) {
|
|
337
335
|
path += '&'
|
|
338
|
-
path +=
|
|
336
|
+
path += 'ids=' + ids.join(',')
|
|
339
337
|
} else {
|
|
340
338
|
path += '?'
|
|
341
|
-
path +=
|
|
339
|
+
path += 'ids=' + ids.join(',')
|
|
342
340
|
}
|
|
343
341
|
}
|
|
344
342
|
if (buttonCode) {
|
|
@@ -382,7 +380,7 @@ function jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, bu
|
|
|
382
380
|
resolve(popPageSetting)
|
|
383
381
|
} else if (jumpMode === 'newTab') {
|
|
384
382
|
// 新页签打开
|
|
385
|
-
const path = packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam)
|
|
383
|
+
const path = packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam) + '&_t_=' + new Date().getTime()
|
|
386
384
|
window.open(path)
|
|
387
385
|
resolve()
|
|
388
386
|
} else {
|
|
@@ -429,7 +427,6 @@ function openDialogWhenPopup(jumpPageSetting, system, pageCode, dataId, jumpMode
|
|
|
429
427
|
popPageSetting.valueMappings = jumpPageSetting.valueMappings
|
|
430
428
|
popPageSetting.updateValueEvent = jumpPageSetting.updateValueEvent
|
|
431
429
|
popPageSetting.closeEvent = jumpPageSetting.closeEvent
|
|
432
|
-
popPageSetting.isRefreshWhenClosePopup = jumpPageSetting.isRefreshWhenClosePopup
|
|
433
430
|
}
|
|
434
431
|
// 是否是自定义系统
|
|
435
432
|
let isDsc = false
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
export function getFirstDayOfSeason(date) {
|
|
2
|
+
var month = new Date(date).getMonth()
|
|
3
|
+
if (month < 3) {
|
|
4
|
+
date.setMonth(0)
|
|
5
|
+
} else if (month > 2 && month < 6) {
|
|
6
|
+
date.setMonth(3)
|
|
7
|
+
} else if (month > 5 && month < 9) {
|
|
8
|
+
date.setMonth(6)
|
|
9
|
+
} else if (month > 8 && month < 11) {
|
|
10
|
+
date.setMonth(9)
|
|
11
|
+
}
|
|
12
|
+
date.setDate(1)
|
|
13
|
+
return formatDate(date)
|
|
14
|
+
}
|
|
15
|
+
export function getWeekOfSeason(date) {
|
|
16
|
+
const weekTime = date.getDay() - 1
|
|
17
|
+
if (weekTime === -1) {
|
|
18
|
+
return date.getTime() - 6 * 24 * 60 * 60 * 1000
|
|
19
|
+
} else {
|
|
20
|
+
return date.getTime() - weekTime * 24 * 60 * 60 * 1000
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function formatDate(time) {
|
|
25
|
+
const date = new Date(time) // 创建Date对象
|
|
26
|
+
const year = date.getFullYear() // 获取年份
|
|
27
|
+
const month = date.getMonth() + 1 // 获取月份,记得+1
|
|
28
|
+
const day = date.getDate() // 获取日期
|
|
29
|
+
return `${year}-${month}-${day}` // 返回格式化后的日期字符串
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function formatTimefn(format, dateTime) {
|
|
33
|
+
if (format === undefined || format === null || format === '') { return dateTime }
|
|
34
|
+
const nowTime = new Date(dateTime)
|
|
35
|
+
const year = nowTime.getFullYear()
|
|
36
|
+
const month = nowTime.getMonth() + 1
|
|
37
|
+
const date = nowTime.getDate()
|
|
38
|
+
const hour = nowTime.getHours()
|
|
39
|
+
const minute = nowTime.getMinutes()
|
|
40
|
+
const second = nowTime.getSeconds()
|
|
41
|
+
|
|
42
|
+
function getCharCount(char) {
|
|
43
|
+
var regex = new RegExp(char, 'g') // 使用g表示整个字符串都要匹配
|
|
44
|
+
var result = format.match(regex) // match方法可在字符串内检索指定的值,或找到一个或多个正则表达式的匹配。
|
|
45
|
+
var count = !result ? 0 : result.length
|
|
46
|
+
return count
|
|
47
|
+
}
|
|
48
|
+
function setDateItem(oneUnit, twoUnit, itemDate) {
|
|
49
|
+
if (getCharCount(oneUnit) === 1) {
|
|
50
|
+
format = format.replace(oneUnit, itemDate)
|
|
51
|
+
} else if (getCharCount(oneUnit) === 2 && itemDate < 10) {
|
|
52
|
+
format = format.replace(twoUnit, '0' + itemDate)
|
|
53
|
+
} else {
|
|
54
|
+
format = format.replace(twoUnit, itemDate)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// 获取第几周
|
|
58
|
+
function getYearWeek(a, b, c) { // a为年 b为月 c为日
|
|
59
|
+
var date1 = new Date(a, parseInt(b) - 1, c)
|
|
60
|
+
var date2 = new Date(a, 0, 1)
|
|
61
|
+
var d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000)
|
|
62
|
+
return Math.ceil((d + ((date2.getDay() + 1) - 1)) / 7)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (format.indexOf('y') !== -1) {
|
|
66
|
+
format = format.replace('yyyy', year)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (format.indexOf('M') !== -1) {
|
|
70
|
+
setDateItem('M', 'MM', month)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (format.indexOf('W') !== -1) {
|
|
74
|
+
const week = getYearWeek(year, month, date)
|
|
75
|
+
setDateItem('W', 'WW', week)
|
|
76
|
+
}
|
|
77
|
+
if (format.indexOf('d') !== -1) {
|
|
78
|
+
setDateItem('d', 'dd', date)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (format.indexOf('H') !== -1) {
|
|
82
|
+
setDateItem('H', 'HH', hour)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (format.indexOf('m') !== -1) {
|
|
86
|
+
setDateItem('m', 'mm', minute)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (format.indexOf('s') !== -1) {
|
|
90
|
+
setDateItem('s', 'ss', second)
|
|
91
|
+
}
|
|
92
|
+
return format
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function getDateRangeSelectorDefaultValue(stareScopeTimeType, format) {
|
|
96
|
+
let Staretime = ''
|
|
97
|
+
const endTime = new Date()
|
|
98
|
+
const computeTime = new Date()
|
|
99
|
+
if (stareScopeTimeType === 'oneYear') {
|
|
100
|
+
// 近一年
|
|
101
|
+
const yearTime = endTime.getFullYear()
|
|
102
|
+
computeTime.setFullYear(yearTime)
|
|
103
|
+
computeTime.setMonth(0)
|
|
104
|
+
Staretime = computeTime.setDate(1)
|
|
105
|
+
} else if (stareScopeTimeType === 'twoYear') {
|
|
106
|
+
// 近两年
|
|
107
|
+
const yearTime = endTime.getFullYear() - 1
|
|
108
|
+
computeTime.setFullYear(yearTime)
|
|
109
|
+
computeTime.setMonth(0)
|
|
110
|
+
Staretime = computeTime.setDate(1)
|
|
111
|
+
} else if (stareScopeTimeType === 'oneQuarter') {
|
|
112
|
+
// 近一个季度
|
|
113
|
+
Staretime = new Date(getFirstDayOfSeason(computeTime))
|
|
114
|
+
} else if (stareScopeTimeType === 'twoQuarter') {
|
|
115
|
+
// 近两个季度
|
|
116
|
+
const timeMonth = computeTime.getMonth()
|
|
117
|
+
if (endTime.getMonth < 3) {
|
|
118
|
+
const yeaNum = computeTime.getFullYear() - 1
|
|
119
|
+
computeTime.setFullYear(yeaNum)
|
|
120
|
+
computeTime.setMonth(10)
|
|
121
|
+
} else {
|
|
122
|
+
computeTime.setMonth(timeMonth - 3)
|
|
123
|
+
}
|
|
124
|
+
Staretime = new Date(getFirstDayOfSeason(computeTime))
|
|
125
|
+
} else if (stareScopeTimeType === 'threeQuarter') {
|
|
126
|
+
// 近三个季度
|
|
127
|
+
const timeMonth = computeTime.getMonth()
|
|
128
|
+
if (endTime.getMonth < 8 && endTime.getMonth > 2) {
|
|
129
|
+
const yeaNum = computeTime.getFullYear() - 1
|
|
130
|
+
computeTime.setFullYear(yeaNum)
|
|
131
|
+
computeTime.setMonth(8)
|
|
132
|
+
} else if (endTime.getMonth < 3) {
|
|
133
|
+
const yeaNum = computeTime.getFullYear() - 1
|
|
134
|
+
computeTime.setFullYear(yeaNum)
|
|
135
|
+
computeTime.setMonth(5)
|
|
136
|
+
} else {
|
|
137
|
+
computeTime.setMonth(timeMonth - 6)
|
|
138
|
+
}
|
|
139
|
+
Staretime = new Date(getFirstDayOfSeason(computeTime))
|
|
140
|
+
} else if (stareScopeTimeType === 'oneMonth') {
|
|
141
|
+
// 近一个月
|
|
142
|
+
Staretime = computeTime.setDate(1)
|
|
143
|
+
} else if (stareScopeTimeType === 'twoMonth') {
|
|
144
|
+
// 近两个月
|
|
145
|
+
const monthNum = endTime.getMonth() - 1
|
|
146
|
+
if (monthNum > -1) {
|
|
147
|
+
computeTime.setMonth(monthNum)
|
|
148
|
+
} else {
|
|
149
|
+
const yeartime = endTime.getFullYear() - 1
|
|
150
|
+
computeTime.setFullYear(yeartime)
|
|
151
|
+
computeTime.setMonth(11)
|
|
152
|
+
}
|
|
153
|
+
Staretime = computeTime.setDate(1)
|
|
154
|
+
} else if (stareScopeTimeType === 'threeMonth') {
|
|
155
|
+
// 近三个月
|
|
156
|
+
const monthTime = endTime.getMonth() - 2
|
|
157
|
+
if (monthTime > -1) {
|
|
158
|
+
computeTime.setMonth(monthTime)
|
|
159
|
+
} else {
|
|
160
|
+
const yeartime = endTime.getFullYear() - 1
|
|
161
|
+
computeTime.setFullYear(yeartime)
|
|
162
|
+
computeTime.setMonth(10)
|
|
163
|
+
}
|
|
164
|
+
Staretime = computeTime.setDate(1)
|
|
165
|
+
} else if (stareScopeTimeType === 'oneWeek') {
|
|
166
|
+
// 近一周
|
|
167
|
+
const MondayTime = getWeekOfSeason(computeTime)
|
|
168
|
+
Staretime = new Date(MondayTime)
|
|
169
|
+
} else if (stareScopeTimeType === 'twoWeek') {
|
|
170
|
+
// 近两周
|
|
171
|
+
const MondayTime = getWeekOfSeason(computeTime)
|
|
172
|
+
Staretime = new Date(MondayTime - 7 * 24 * 60 * 60 * 1000)
|
|
173
|
+
} else if (stareScopeTimeType === 'threeWeek') {
|
|
174
|
+
// 近三周
|
|
175
|
+
const MondayTime = getWeekOfSeason(computeTime)
|
|
176
|
+
Staretime = new Date(MondayTime - 14 * 24 * 60 * 60 * 1000)
|
|
177
|
+
}
|
|
178
|
+
if (Staretime) {
|
|
179
|
+
const startTimeTemp = new Date(Staretime).getTime()
|
|
180
|
+
const endTimeTemp = endTime.getTime()
|
|
181
|
+
const startDate = formatTimefn(format, startTimeTemp)
|
|
182
|
+
const endDate = formatTimefn(format, endTimeTemp)
|
|
183
|
+
return { startTimeTemp, endTimeTemp, startDate, endDate }
|
|
184
|
+
}
|
|
185
|
+
}
|
package/src/utils/request.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axios from 'axios'
|
|
2
2
|
import {
|
|
3
3
|
Message
|
|
4
|
-
} from '
|
|
4
|
+
} from 'element-ui'
|
|
5
5
|
import {
|
|
6
6
|
getToken,
|
|
7
7
|
removeToken
|
|
@@ -14,12 +14,13 @@ import {
|
|
|
14
14
|
} from './util'
|
|
15
15
|
import {
|
|
16
16
|
getRelativeBaseUrl,
|
|
17
|
-
getTimeZone
|
|
17
|
+
getTimeZone,
|
|
18
|
+
setCustomSystemBackendUrl
|
|
18
19
|
} from './common-util'
|
|
19
20
|
// 创建axios实例
|
|
20
21
|
const service = axios.create({
|
|
21
22
|
// baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
|
|
22
|
-
timeout:
|
|
23
|
+
timeout: 300000, // 请求超时时间
|
|
23
24
|
withCredentials: true
|
|
24
25
|
})
|
|
25
26
|
|
|
@@ -38,6 +39,8 @@ service.interceptors.request.use(
|
|
|
38
39
|
const customSystem = Vue.prototype.customSystem
|
|
39
40
|
if (customSystem) {
|
|
40
41
|
config.headers['customSystem'] = customSystem
|
|
42
|
+
// 重新缓存系统后台路径
|
|
43
|
+
setCustomSystemBackendUrl(customSystem)
|
|
41
44
|
}
|
|
42
45
|
if (Vue.prototype.baseURL) {
|
|
43
46
|
config.baseURL = getRelativeBaseUrl(Vue.prototype.baseURL)
|
package/src/utils/util.js
CHANGED
|
@@ -3,7 +3,6 @@ import Vue from 'vue'
|
|
|
3
3
|
import {
|
|
4
4
|
executeExpression
|
|
5
5
|
} from './calculator/calculator-util'
|
|
6
|
-
import { getLangByShort } from './common-util'
|
|
7
6
|
export function getI18n() {
|
|
8
7
|
if (!window.$locale) {
|
|
9
8
|
i18n.locale = 'cn'
|
|
@@ -14,11 +13,12 @@ export function getI18n() {
|
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
export function getLanguageWithLocale() {
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
16
|
+
const currentLocale = window.$locale
|
|
17
|
+
if (currentLocale && currentLocale === 'en') {
|
|
18
|
+
return 'en_US'
|
|
19
|
+
} else {
|
|
20
|
+
return 'zh_CN'
|
|
20
21
|
}
|
|
21
|
-
return getLangByShort(currentLocale)
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* 根据动态数据源获得下拉选的选项集合
|
|
@@ -267,19 +267,21 @@ function getValue(entityData, fieldName, isSql) {
|
|
|
267
267
|
return value
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
function getValueByField(entityData, fieldName) {
|
|
270
|
+
export function getValueByField(entityData, fieldName) {
|
|
271
271
|
if (entityData && entityData !== null) {
|
|
272
272
|
let value
|
|
273
273
|
if (fieldName.indexOf('.') > 0) {
|
|
274
274
|
// 表示是子表字段
|
|
275
275
|
value = getSubEntityValue(entityData, fieldName)
|
|
276
276
|
} else {
|
|
277
|
-
value = entityData[fieldName]
|
|
277
|
+
value = entityData[fieldName.toUpperCase()]
|
|
278
|
+
if (value === undefined) {
|
|
279
|
+
value = entityData[fieldName.toLowerCase()]
|
|
280
|
+
}
|
|
278
281
|
}
|
|
279
282
|
return value
|
|
280
283
|
}
|
|
281
284
|
}
|
|
282
|
-
|
|
283
285
|
function getSubEntityValue(entityData, fieldName) {
|
|
284
286
|
let value = null
|
|
285
287
|
let subEntityData = entityData
|
|
@@ -452,11 +454,11 @@ export function getEntityFieldValueWithOutCase(entity, prop) {
|
|
|
452
454
|
*/
|
|
453
455
|
export function getEntityFieldValue(entity, prop, isLowerCase) {
|
|
454
456
|
let value = getEntityFieldValueWithCase(entity, prop)
|
|
455
|
-
if (value === undefined) {
|
|
457
|
+
if (value === undefined || value === null) {
|
|
456
458
|
// 兼容mysql数据库
|
|
457
459
|
value = getEntityFieldValueWithCase(entity, prop.toLowerCase())
|
|
458
460
|
}
|
|
459
|
-
if (value === undefined && isLowerCase === undefined) {
|
|
461
|
+
if (value === undefined || value === null && isLowerCase === undefined) {
|
|
460
462
|
// 兼容oracle数据库
|
|
461
463
|
value = getEntityFieldValueWithCase(entity, prop.toUpperCase())
|
|
462
464
|
}
|
|
@@ -509,7 +511,7 @@ function getParentModelPropWithCase(prop, parentObj) {
|
|
|
509
511
|
if (!parentObj) {
|
|
510
512
|
parentObj = {}
|
|
511
513
|
}
|
|
512
|
-
if (!parentObj[prop]) {
|
|
514
|
+
if (!parentObj[prop] && !parentObj[prop.toUpperCase()]) {
|
|
513
515
|
parentObj[prop] = {}
|
|
514
516
|
}
|
|
515
517
|
return parentObj[prop]
|
|
@@ -25,6 +25,9 @@ export function i18nOperation(history, processNameI18n, processI18n, language) {
|
|
|
25
25
|
const buttonOperation = params['2']
|
|
26
26
|
// 国际化buttonOperation
|
|
27
27
|
params['2'] = getI18n().t('workflowButton.' + buttonOperation)
|
|
28
|
+
if (params['2'].indexOf('workflowButton.') === 0) {
|
|
29
|
+
params['2'] = buttonOperation
|
|
30
|
+
}
|
|
28
31
|
}
|
|
29
32
|
if (i18nKey === 'process_start' && processNameI18n && processNameI18n !== null) {
|
|
30
33
|
// 表示发起流程时,流程名称要国际化显示
|
|
@@ -27,15 +27,15 @@ export default {
|
|
|
27
27
|
|
|
28
28
|
if (icon) {
|
|
29
29
|
if (icon.indexOf('fa-') === 0) {
|
|
30
|
-
// 表示以“fa-”开头,使用font-awesome中的图标
|
|
30
|
+
// 表示以“fa-”开头,使用font-awesome中的图标
|
|
31
31
|
icon = 'fa ' + icon
|
|
32
|
-
vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon}
|
|
32
|
+
vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon}/></div>)
|
|
33
33
|
} else if (icon.indexOf('svg-') === 0) {
|
|
34
34
|
icon = icon.substring(icon.indexOf('svg-') + 4)
|
|
35
35
|
vnodes.push(<div style='display: inline-block;overflow:hidden;'><svg-icon icon-class={icon}/></div>)
|
|
36
36
|
} else {
|
|
37
37
|
icon += ' svg-icon'
|
|
38
|
-
vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon}
|
|
38
|
+
vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon}/></div>)
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -43,7 +43,9 @@ export default {
|
|
|
43
43
|
let width = '130px'
|
|
44
44
|
if (hasChildren) {
|
|
45
45
|
// 当是父菜单时,为了使后面的三角能显示出来,需要将宽度设小点
|
|
46
|
-
width = '100px'
|
|
46
|
+
// width = '100px'
|
|
47
|
+
// boe 反应左侧菜单栏无法展示全部文字,调整
|
|
48
|
+
width = '130px'
|
|
47
49
|
}
|
|
48
50
|
if (isRoot) {
|
|
49
51
|
// 是否是根目录,没有子菜单时
|
|
@@ -52,7 +54,7 @@ export default {
|
|
|
52
54
|
</div>)
|
|
53
55
|
} else {
|
|
54
56
|
// 有子菜单时
|
|
55
|
-
vnodes.push(<div
|
|
57
|
+
vnodes.push(<div slot='title' style='display: inline-block'>
|
|
56
58
|
<div title={title} style={'display: inline-block;width:' + width + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;'}>{(title)}</div>
|
|
57
59
|
</div>)
|
|
58
60
|
}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
</app-link>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
|
-
<el-submenu v-else :index="resolvePath(item.code,item.path,item.pageType)" :show-timeout="0" :hide-timeout="50"
|
|
12
|
-
<template
|
|
11
|
+
<el-submenu v-else :index="resolvePath(item.code,item.path,item.pageType)" :show-timeout="0" :hide-timeout="50" popper-class="sidebar-container-popper">
|
|
12
|
+
<template slot="title">
|
|
13
13
|
<item :icon="item.iconName" :title="getI18nName(item)" :has-children="item.children.length > 0?true:false" />
|
|
14
14
|
</template>
|
|
15
15
|
|
|
@@ -38,7 +38,6 @@ import AppLink from './Link'
|
|
|
38
38
|
import Vue from 'vue'
|
|
39
39
|
import tabJs from '../../../api/tab'
|
|
40
40
|
import { getI18nName } from '../../../utils/menu'
|
|
41
|
-
// import { SidebarItemChild } from './SidebarItemChild.vue'
|
|
42
41
|
export default {
|
|
43
42
|
name: 'SidebarItem',
|
|
44
43
|
components: { Item, AppLink },
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</el-menu>
|
|
14
|
-
</keep-alive>
|
|
4
|
+
<el-menu
|
|
5
|
+
:show-timeout="200"
|
|
6
|
+
:default-active="getDefaultActive()"
|
|
7
|
+
:collapse="isCollapse"
|
|
8
|
+
mode="vertical"
|
|
9
|
+
@select="selectMenu"
|
|
10
|
+
>
|
|
11
|
+
<sidebar-item v-for="menu in menus" :key="menu.code" :item="menu" />
|
|
12
|
+
</el-menu>
|
|
15
13
|
</el-scrollbar>
|
|
16
14
|
<hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
|
17
15
|
</div>
|
|
@@ -42,7 +40,7 @@ export default {
|
|
|
42
40
|
data() {
|
|
43
41
|
const menus = getMenus()
|
|
44
42
|
return {
|
|
45
|
-
menus
|
|
43
|
+
menus
|
|
46
44
|
}
|
|
47
45
|
},
|
|
48
46
|
computed: {
|
|
@@ -57,14 +55,13 @@ export default {
|
|
|
57
55
|
}
|
|
58
56
|
},
|
|
59
57
|
created() {
|
|
60
|
-
const a = new Date().getTime()
|
|
61
58
|
this.firstLeafMenu = this.getMyFirstMenu(this.menus)
|
|
62
59
|
if (this.firstLeafMenu && this.firstLeafMenu.fullPath) {
|
|
63
60
|
// 跳转到第一个页面
|
|
64
61
|
if (this.firstLeafMenu.pageType && this.firstLeafMenu.pageType === 'iframe') {
|
|
65
62
|
const iframeSrc = this.firstLeafMenu.fullPath
|
|
66
|
-
const
|
|
67
|
-
const query = { src: iframeSrc, customSystem: this.systemCode,
|
|
63
|
+
const pageCode = this.firstLeafMenu.path
|
|
64
|
+
const query = { src: iframeSrc, customSystem: this.systemCode, pageCode: pageCode, _menuCode: this.firstLeafMenu.code, _menuName: getI18nName(this.firstLeafMenu) }
|
|
68
65
|
this.addTabs(query, this.$store.state.tabContent.openTab, '/dsc/iframe-page', '/dsc/iframe-page')
|
|
69
66
|
this.$router.push({ path: '/dsc-index/iframe-page', query: query })
|
|
70
67
|
} else {
|
|
@@ -74,8 +71,6 @@ export default {
|
|
|
74
71
|
this.$router.push({ path: '/dsc-index/page', query: query })
|
|
75
72
|
// this.$router.push({ path: this.firstLeafMenu.fullPath })
|
|
76
73
|
}
|
|
77
|
-
const b = new Date().getTime()
|
|
78
|
-
console.log('菜单组件==>created==>b-a', (b - a))
|
|
79
74
|
}
|
|
80
75
|
},
|
|
81
76
|
methods: {
|
|
@@ -97,14 +92,11 @@ export default {
|
|
|
97
92
|
Cookies.set('selectMenu', index)
|
|
98
93
|
},
|
|
99
94
|
getMyFirstMenu(menus) {
|
|
100
|
-
const a = new Date().getTime()
|
|
101
95
|
if (menus && menus.length > 0) {
|
|
102
96
|
let shouldSelectMenu = this.getFirstMenu(menus)
|
|
103
97
|
if (!shouldSelectMenu) {
|
|
104
98
|
shouldSelectMenu = this.getFirstMenuWithCookie(menus)
|
|
105
99
|
}
|
|
106
|
-
const b = new Date().getTime()
|
|
107
|
-
console.log('菜单组件==>getMyFirstMenu==>b-a', (b - a))
|
|
108
100
|
// 默认不展示第一个有权限的菜单了,可以去掉下面的代码
|
|
109
101
|
// if (!shouldSelectMenu) {
|
|
110
102
|
// shouldSelectMenu = this.getSelectMenuWithFirstMenu(menus[0])
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<iframe ref="tabMainContent" :src="getFullPath(tag)" class="tab-main-content" name="tab-main-content" frameborder="0" />
|
|
6
6
|
</el-tab-pane>
|
|
7
7
|
</el-tabs>
|
|
8
|
-
<div class="default-page-tip">
|
|
8
|
+
<div v-else class="default-page-tip">
|
|
9
9
|
<div class="default-page-tip-msg">
|
|
10
10
|
<div class="default-page-tip-item">
|
|
11
11
|
{{ defaultPageTipCn }}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
{{ defaultPageTipEn }}
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
|
+
<copyright />
|
|
17
18
|
</div>
|
|
18
19
|
</div>
|
|
19
20
|
</template>
|
|
@@ -98,11 +99,7 @@ export default {
|
|
|
98
99
|
path = src
|
|
99
100
|
}
|
|
100
101
|
if (params) {
|
|
101
|
-
|
|
102
|
-
path += '&' + params
|
|
103
|
-
} else {
|
|
104
|
-
path += '?' + params
|
|
105
|
-
}
|
|
102
|
+
path += '?' + params
|
|
106
103
|
}
|
|
107
104
|
} else {
|
|
108
105
|
// 表示页面跳转
|
|
@@ -143,12 +140,14 @@ export default {
|
|
|
143
140
|
}
|
|
144
141
|
.default-page-tip {
|
|
145
142
|
width: 100%;
|
|
146
|
-
|
|
143
|
+
position: absolute;
|
|
144
|
+
height: 100vh;
|
|
147
145
|
background: #f7f7f8;
|
|
148
146
|
}
|
|
149
147
|
.default-page-tip-msg {
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
position: absolute;
|
|
149
|
+
width: 100%;
|
|
150
|
+
top: 40%;
|
|
152
151
|
font-size: 24px;
|
|
153
152
|
font-weight: 600;
|
|
154
153
|
text-align: center;
|