imatrix-ui 0.0.15 → 0.1.1-up
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/.vscode/extensions.json +3 -0
- package/README.md +7 -0
- package/components/dynamic-source-select/dynamic-source-select-service.js +106 -0
- package/components/dynamic-source-select/dynamic-source-select.vue +673 -0
- package/components/dynamic-source-select/events.js +77 -0
- package/components/fs-preview/fs-preview.vue +287 -0
- package/components/index.js +26 -0
- package/components/plugins/export-data-new.js +623 -0
- package/components/plugins/export-data.js +431 -0
- package/components/plugins/index.js +15 -0
- package/components/plugins/public-method.js +47 -0
- package/components/rich-editor/index-bak.vue +306 -0
- package/components/rich-editor/index.vue +236 -0
- package/components/rich-editor/langs/zh-Hans.js +438 -0
- package/components/rich-editor/viewer.vue +105 -0
- package/components/super-grid/apis.js +1065 -0
- package/components/super-grid/columns-config.vue +430 -0
- package/components/super-grid/custom-formatter.js +330 -0
- package/components/super-grid/dynamic-input.vue +1706 -0
- package/components/super-grid/eventBus.js +2 -0
- package/components/super-grid/events.js +56 -0
- package/components/super-grid/formValidatorUtil.js +300 -0
- package/components/super-grid/formatter.js +190 -0
- package/components/super-grid/group-column.vue +100 -0
- package/components/super-grid/header-context-menu.vue +82 -0
- package/components/super-grid/index-column.vue +69 -0
- package/components/super-grid/normal-column.vue +1148 -0
- package/components/super-grid/public-methods.js +30 -0
- package/components/super-grid/row-operation.vue +193 -0
- package/components/super-grid/search-button.vue +74 -0
- package/components/super-grid/search-condition-input.vue +73 -0
- package/components/super-grid/search-condition-list.vue +68 -0
- package/components/super-grid/search-form-advancedQuery.vue +820 -0
- package/components/super-grid/search-form-dialog.vue +77 -0
- package/components/super-grid/search-form-item.vue +470 -0
- package/components/super-grid/search-form-number.vue +111 -0
- package/components/super-grid/search-form-open.vue +178 -0
- package/components/super-grid/search-form-ordinarySearch.vue +218 -0
- package/components/super-grid/search-form.vue +756 -0
- package/components/super-grid/search-methods.js +484 -0
- package/components/super-grid/selection-column.vue +46 -0
- package/components/super-grid/store.js +3 -0
- package/components/super-grid/super-grid-service.js +682 -0
- package/components/super-grid/super-grid.vue +2893 -0
- package/components/super-grid/utils.js +851 -0
- package/components/super-grid/view-image-dialog.vue +173 -0
- package/components/utils/gogocodeTransfer.js +59 -0
- package/components/utils/utils.js +180 -0
- package/components/utils/value-set.js +98 -0
- package/components/z-test-utton/index.vue +82 -0
- package/package.json +29 -40
- package/public/index.html +13 -0
- package/public/vite.svg +1 -0
- package/src/api/sso-service.js +172 -19
- package/src/api/tab.js +36 -0
- package/src/api/user-service.js +11 -11
- package/src/assets/401/401.gif +0 -0
- package/src/assets/404/404-cloud.png +0 -0
- package/src/assets/404/404.png +0 -0
- package/src/assets/cloud.png +0 -0
- package/src/directives/permission/index.js +13 -13
- package/src/directives/permission/permission.js +20 -15
- package/src/i18n/i18n.js +16 -0
- package/src/i18n/langs/cn.js +254 -0
- package/src/i18n/langs/en.js +264 -0
- package/src/permission.js +157 -71
- package/src/plugins.js +18 -18
- package/src/router/index.js +96 -69
- package/src/store/getters.js +15 -10
- package/src/store/index.js +19 -19
- package/src/store/modules/app.js +54 -42
- package/src/store/modules/permission.js +137 -73
- package/src/store/modules/tab-content.js +36 -0
- package/src/store/modules/user.js +293 -80
- package/src/styles/display-layout.scss +34 -0
- package/src/styles/element-ui.scss +29 -29
- package/src/styles/index.scss +157 -78
- package/src/styles/mixin.scss +27 -27
- package/src/styles/theme/black/font-style.scss +70 -0
- package/src/styles/theme/black/index.scss +306 -0
- package/src/styles/theme/black/sidebar.scss +189 -0
- package/src/styles/theme/blue/font-style.scss +46 -0
- package/src/styles/theme/blue/index.scss +172 -0
- package/src/styles/{sidebar.scss → theme/blue/sidebar.scss} +171 -141
- package/src/styles/theme/blue2/font-style.scss +70 -0
- package/src/styles/theme/blue2/index.scss +188 -0
- package/src/styles/theme/blue2/sidebar.scss +201 -0
- package/src/styles/theme/dark-blue/button.scss +9 -0
- package/src/styles/theme/dark-blue/card.scss +62 -0
- package/src/styles/theme/dark-blue/checkbox.scss +10 -0
- package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
- package/src/styles/theme/dark-blue/dialog.scss +21 -0
- package/src/styles/theme/dark-blue/element-variables.scss +7 -0
- package/src/styles/theme/dark-blue/font.scss +71 -0
- package/src/styles/theme/dark-blue/form.scss +51 -0
- package/src/styles/theme/dark-blue/index.scss +269 -0
- package/src/styles/theme/dark-blue/input.scss +15 -0
- package/src/styles/theme/dark-blue/message.scss +8 -0
- package/src/styles/theme/dark-blue/pagination.scss +14 -0
- package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
- package/src/styles/theme/dark-blue/sidebar.scss +266 -0
- package/src/styles/theme/dark-blue/tab.scss +83 -0
- package/src/styles/theme/dark-blue/table.scss +60 -0
- package/src/styles/theme/dark-blue/tree.scss +31 -0
- package/src/styles/theme/dark-blue/var.scss +1028 -0
- package/src/styles/theme/gray/card-style.scss +54 -0
- package/src/styles/theme/gray/font-style.scss +70 -0
- package/src/styles/theme/gray/index.scss +172 -0
- package/src/styles/theme/gray/input-style.scss +19 -0
- package/src/styles/theme/gray/scrollbar-style.scss +32 -0
- package/src/styles/theme/gray/sidebar.scss +231 -0
- package/src/styles/theme/gray/tab-style.scss +81 -0
- package/src/styles/transition.scss +47 -46
- package/src/utils/auth-api.js +159 -0
- package/src/utils/auth.js +61 -15
- package/src/utils/calculator/calculator-factory-wf.js +558 -0
- package/src/utils/calculator/calculator-factory.js +145 -0
- package/src/utils/calculator/calculator-util.js +166 -0
- package/src/utils/common-util.js +305 -0
- package/src/utils/eventBus.js +2 -0
- package/src/utils/iconUtils.js +28 -0
- package/src/utils/index.js +102 -86
- package/src/utils/jump-page-utils.js +814 -0
- package/src/utils/local-storage.js +33 -31
- package/src/utils/menu.js +19 -0
- package/src/utils/permission.js +31 -26
- package/src/utils/permissionAuth.js +90 -0
- package/src/utils/range-selector.js +188 -0
- package/src/utils/request.js +270 -116
- package/src/utils/restful-interface-utils.js +57 -0
- package/src/utils/util.js +698 -0
- package/src/utils/validate.js +34 -33
- package/src/utils/watermark.js +108 -0
- package/src/utils/workflow-util.js +93 -0
- package/src/views/404.vue +248 -228
- package/src/views/dsc-component/Sidebar/Item.vue +84 -0
- package/src/views/dsc-component/Sidebar/Link.vue +38 -0
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +196 -0
- package/src/views/dsc-component/Sidebar/index.vue +220 -0
- package/src/views/dsc-component/tabs/tab-content.vue +199 -0
- package/src/views/error-page/401.vue +106 -91
- package/src/views/error-page/404.vue +248 -228
- package/src/views/layout/EmptyLayout.vue +3 -0
- package/src/views/layout/Layout.vue +81 -68
- package/src/views/layout/NewLayout.vue +18 -0
- package/src/views/layout/components/AppMain.vue +39 -29
- package/src/views/layout/components/Breadcrumb/index.vue +156 -0
- package/src/views/layout/components/Menubar/Item.vue +57 -0
- package/src/views/layout/components/Menubar/Link.vue +38 -0
- package/src/views/layout/components/Menubar/SidebarItem.vue +164 -0
- package/src/views/layout/components/Menubar/index.vue +210 -0
- package/src/views/layout/components/Sidebar/Item.vue +53 -29
- package/src/views/layout/components/Sidebar/Link.vue +38 -39
- package/src/views/layout/components/Sidebar/SidebarItem.vue +135 -100
- package/src/views/layout/components/Sidebar/index.vue +141 -48
- package/src/views/layout/components/iframe-page.vue +38 -0
- package/src/views/layout/components/index.js +4 -3
- package/src/views/layout/components/tabs/tab-content.vue +207 -0
- package/src/views/layout/mixin/ResizeHandler.js +41 -41
- package/src/views/layout/tab-content-iframe-index.vue +38 -0
- package/src/views/layout/tab-content-index.vue +93 -0
- package/src/views/login/authredirect.vue +10 -10
- package/src/views/login/index.vue +296 -203
- package/src/views/login/update-password.vue +243 -0
- package/src/views/redirect/index.vue +14 -12
- package/src/views/wf-history/tache-subprocess-history.vue +45 -0
- package/vite.config.js +31 -0
- package/lib/super-ui.css +0 -1
- package/lib/super-ui.umd.min.js +0 -2
- package/src/styles/variables.scss +0 -4
- package/src/views/layout/components/Navbar.vue +0 -92
package/src/utils/validate.js
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by jiachenpan on 16/11/18.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export function validUsername(str) {
|
|
6
|
-
// const valid_map = ['admin', 'editor']
|
|
7
|
-
// return valid_map.indexOf(str.trim()) >= 0
|
|
8
|
-
return true
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* 合法uri*/
|
|
12
|
-
export function validateURL(textval) {
|
|
13
|
-
const urlregex =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Created by jiachenpan on 16/11/18.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export function validUsername(str) {
|
|
6
|
+
// const valid_map = ['admin', 'editor']
|
|
7
|
+
// return valid_map.indexOf(str.trim()) >= 0
|
|
8
|
+
return true
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* 合法uri*/
|
|
12
|
+
export function validateURL(textval) {
|
|
13
|
+
const urlregex =
|
|
14
|
+
/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
|
|
15
|
+
return urlregex.test(textval)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* 小写字母*/
|
|
19
|
+
export function validateLowerCase(str) {
|
|
20
|
+
const reg = /^[a-z]+$/
|
|
21
|
+
return reg.test(str)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* 大写字母*/
|
|
25
|
+
export function validateUpperCase(str) {
|
|
26
|
+
const reg = /^[A-Z]+$/
|
|
27
|
+
return reg.test(str)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* 大小写字母*/
|
|
31
|
+
export function validateAlphabets(str) {
|
|
32
|
+
const reg = /^[A-Za-z]+$/
|
|
33
|
+
return reg.test(str)
|
|
34
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
// import ssoService from '../api/sso-service'
|
|
3
|
+
const watermark = {}
|
|
4
|
+
|
|
5
|
+
const setWatermark = (str, parma, paramId) => {
|
|
6
|
+
let id = '1.23452384164.123412415'
|
|
7
|
+
if (paramId) {
|
|
8
|
+
id = paramId
|
|
9
|
+
}
|
|
10
|
+
if (document.getElementById(id) !== null) {
|
|
11
|
+
if (document.getElementById('pdfDom')) {
|
|
12
|
+
var cell1 = document.getElementById('pdfDom')
|
|
13
|
+
cell1.removeChild(document.getElementById(id))
|
|
14
|
+
} else {
|
|
15
|
+
document.body.removeChild(document.getElementById(id))
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const can = document.createElement('canvas')
|
|
19
|
+
can.width = parma && parma.width && parma.width !== '' ? parma.width : '400' // 单个水印的宽高
|
|
20
|
+
can.height =
|
|
21
|
+
parma && parma.height && parma.height !== '' ? parma.height : '200'
|
|
22
|
+
|
|
23
|
+
const cans = can.getContext('2d')
|
|
24
|
+
cans.rotate((20 * Math.PI) / 160) // 水印偏转角度
|
|
25
|
+
cans.font =
|
|
26
|
+
parma && parma.font && parma.font !== '' ? parma.font : '17px Vedana' // 设置样式
|
|
27
|
+
cans.fillStyle =
|
|
28
|
+
parma && parma.color && parma.color !== ''
|
|
29
|
+
? parma.color
|
|
30
|
+
: 'rgba(200, 200, 200, 0.40)' // 水印字体颜色
|
|
31
|
+
cans.textAlign = 'left'
|
|
32
|
+
cans.textBaseline = 'Middle'
|
|
33
|
+
cans.fillText(str, 60, 40)
|
|
34
|
+
|
|
35
|
+
const div = document.createElement('div')
|
|
36
|
+
div.id = id
|
|
37
|
+
div.style.pointerEvents = 'none'
|
|
38
|
+
div.style.top = '80px'
|
|
39
|
+
div.style.left = '200px'
|
|
40
|
+
div.style.position = 'fixed'
|
|
41
|
+
div.style.zIndex = '10000'
|
|
42
|
+
div.style.width = '70%'
|
|
43
|
+
div.style.height = '80%'
|
|
44
|
+
div.style.background =
|
|
45
|
+
'url(' + can.toDataURL('image/png') + ') left top repeat'
|
|
46
|
+
|
|
47
|
+
if (document.getElementById('pdfDom')) {
|
|
48
|
+
var cell = document.getElementById('pdfDom')
|
|
49
|
+
cell.appendChild(div)
|
|
50
|
+
} else {
|
|
51
|
+
document.body.appendChild(div)
|
|
52
|
+
}
|
|
53
|
+
return id
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 该方法只允许调用一次
|
|
57
|
+
export function showWatermark(label, parma, user, paramId) {
|
|
58
|
+
var date = new Date()
|
|
59
|
+
date = formatDate(date, 'yyyy-MM-dd')
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
var str =
|
|
62
|
+
label && label !== '' ? label : user ? user.name + ' ' + date : date
|
|
63
|
+
let id = setWatermark(str, parma, paramId)
|
|
64
|
+
setInterval(() => {
|
|
65
|
+
if (document.getElementById(id) === null) {
|
|
66
|
+
id = setWatermark(str, parma, paramId)
|
|
67
|
+
}
|
|
68
|
+
}, 500)
|
|
69
|
+
window.onresize = () => {
|
|
70
|
+
setWatermark(str, parma, paramId)
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
// watermark.set = (label, parma) => {
|
|
75
|
+
|
|
76
|
+
// }
|
|
77
|
+
|
|
78
|
+
const formatDate = (date, fmt) => {
|
|
79
|
+
if (/(y+)/.test(fmt)) {
|
|
80
|
+
fmt = fmt.replace(
|
|
81
|
+
RegExp.$1,
|
|
82
|
+
(date.getFullYear() + '').substr(4 - RegExp.$1.length)
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
const o = {
|
|
86
|
+
'M+': date.getMonth() + 1,
|
|
87
|
+
'd+': date.getDate(),
|
|
88
|
+
'h+': date.getHours(),
|
|
89
|
+
'm+': date.getMinutes(),
|
|
90
|
+
's+': date.getSeconds(),
|
|
91
|
+
}
|
|
92
|
+
for (const k in o) {
|
|
93
|
+
if (new RegExp(`(${k})`).test(fmt)) {
|
|
94
|
+
const str = o[k] + ''
|
|
95
|
+
fmt = fmt.replace(
|
|
96
|
+
RegExp.$1,
|
|
97
|
+
RegExp.$1.length === 1 ? str : padLeftZero(str)
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return fmt
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function padLeftZero(str) {
|
|
105
|
+
return ('00' + str).substr(str.length)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export default watermark
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { getI18n } from './util'
|
|
2
|
+
/**
|
|
3
|
+
* 国际化显示流转历史
|
|
4
|
+
* @param {*} history
|
|
5
|
+
* @param {*} processNameI18n 流程名称国际化后的值
|
|
6
|
+
*/
|
|
7
|
+
export function i18nOperation(history, processNameI18n, processI18n, language) {
|
|
8
|
+
let operation = history.transactionResult
|
|
9
|
+
const historyType = history.historyType
|
|
10
|
+
if (!history.current && historyType) {
|
|
11
|
+
// 不是当前待办任务才需要国际化显示“流转操作”信息
|
|
12
|
+
if (history.transactionParams) {
|
|
13
|
+
const params = JSON.parse(history.transactionParams)
|
|
14
|
+
let i18nKey = historyType.toLowerCase()
|
|
15
|
+
const isButtonOperation = isCommonButtonOperation(historyType)
|
|
16
|
+
if (isButtonOperation) {
|
|
17
|
+
i18nKey = 'commonButtonOperation'
|
|
18
|
+
} else if (i18nKey === 'process_end') {
|
|
19
|
+
i18nKey = 'processEnd'
|
|
20
|
+
}
|
|
21
|
+
if (isButtonOperation || historyType === 'HISTORY_COMPLETE_TRANSFER') {
|
|
22
|
+
// 是普通任务办理按钮 或 完成移交任务时,才会传“操作”(例如:submit、save、approve等等)
|
|
23
|
+
// 需要把这些操作进行国际化显示。
|
|
24
|
+
// 在params中2对应的是操作
|
|
25
|
+
const buttonOperation = params['2']
|
|
26
|
+
// 国际化buttonOperation
|
|
27
|
+
params['2'] = getI18n().t('workflowButton.' + buttonOperation)
|
|
28
|
+
}
|
|
29
|
+
if (
|
|
30
|
+
i18nKey === 'process_start' &&
|
|
31
|
+
processNameI18n &&
|
|
32
|
+
processNameI18n !== null
|
|
33
|
+
) {
|
|
34
|
+
// 表示发起流程时,流程名称要国际化显示
|
|
35
|
+
params[1] = processNameI18n
|
|
36
|
+
operation = getI18n().t('workflowHistoryList.' + i18nKey, params)
|
|
37
|
+
} else {
|
|
38
|
+
const newParams = params
|
|
39
|
+
if (processI18n && language) {
|
|
40
|
+
for (const key in params) {
|
|
41
|
+
newParams[key] = params[key]
|
|
42
|
+
// param格式为:${taskNodeId:name.newHumanTask1##环节1}
|
|
43
|
+
const param = params[key]
|
|
44
|
+
if (param.indexOf('${taskNodeId:') >= 0) {
|
|
45
|
+
// 获得name.newHumanTask1
|
|
46
|
+
const taskI18nKey = param.substring(
|
|
47
|
+
param.indexOf(':') + 1,
|
|
48
|
+
param.indexOf('##')
|
|
49
|
+
)
|
|
50
|
+
// 获得 环节1
|
|
51
|
+
const taskName = param.substring(
|
|
52
|
+
param.indexOf('##') + 2,
|
|
53
|
+
param.lastIndexOf('}')
|
|
54
|
+
)
|
|
55
|
+
// 获得{zh_CN:xx, en_US:xx}
|
|
56
|
+
const taskNameI18n = processI18n[taskI18nKey]
|
|
57
|
+
if (
|
|
58
|
+
taskNameI18n &&
|
|
59
|
+
taskNameI18n[language] &&
|
|
60
|
+
taskNameI18n[language] !== ''
|
|
61
|
+
) {
|
|
62
|
+
newParams[key] = taskNameI18n[language]
|
|
63
|
+
} else {
|
|
64
|
+
newParams[key] = taskName
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
operation = getI18n().t('workflowHistoryList.' + i18nKey, newParams)
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
operation = getI18n().t(
|
|
73
|
+
'workflowHistoryList.' + historyType.toLowerCase()
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return operation
|
|
78
|
+
}
|
|
79
|
+
// 是否是正常按钮提交,例如:保存、提交、同意、不同意等
|
|
80
|
+
function isCommonButtonOperation(historyType) {
|
|
81
|
+
return (
|
|
82
|
+
historyType === 'HISTORY_SUBMIT' ||
|
|
83
|
+
historyType === 'HISTORY_AGREE' ||
|
|
84
|
+
historyType === 'HISTORY_DISAGREE' ||
|
|
85
|
+
historyType === 'HISTORY_AGREEMENT' ||
|
|
86
|
+
historyType === 'HISTORY_OPPOSE' ||
|
|
87
|
+
historyType === 'HISTORY_KIKEN' ||
|
|
88
|
+
historyType === 'HISTORY_SIGNOFF' ||
|
|
89
|
+
historyType === 'HISTORY_SEND' ||
|
|
90
|
+
historyType === 'HISTORY_DISTRIBUTE' ||
|
|
91
|
+
historyType === 'HISTORY_READED'
|
|
92
|
+
)
|
|
93
|
+
}
|