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
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
:append-to-body="true"
|
|
4
|
+
:show-close="true"
|
|
5
|
+
:title="$t('imatrixUIPublicModel.preview')"
|
|
6
|
+
:model-value="true"
|
|
7
|
+
@close="$emit('close')"
|
|
8
|
+
>
|
|
9
|
+
<template v-slot:title>
|
|
10
|
+
<span
|
|
11
|
+
>{{ $t('imatrixUIPublicModel.preview') }}
|
|
12
|
+
<!-- <i v-if="downloadable" class="el-icon-download" style="padding-left:5px;cursor:pointer;color:#409EFF" @click="downloadFile()" /> -->
|
|
13
|
+
<el-icon style="padding-left: 5px; cursor: pointer; color: #f56c6c"
|
|
14
|
+
><el-icon-delete
|
|
15
|
+
/></el-icon>
|
|
16
|
+
</span>
|
|
17
|
+
</template>
|
|
18
|
+
<el-carousel :interval="5000" arrow="always" @change="changeFile">
|
|
19
|
+
<el-carousel-item
|
|
20
|
+
v-for="item in fileList"
|
|
21
|
+
:key="item.serverName"
|
|
22
|
+
style="background-color: #eee"
|
|
23
|
+
>
|
|
24
|
+
<el-image
|
|
25
|
+
v-if="item.isImg"
|
|
26
|
+
:src="item.src"
|
|
27
|
+
:preview-src-list="[item.src]"
|
|
28
|
+
/>
|
|
29
|
+
<div v-else style="text-align: center; margin-top: 50px">
|
|
30
|
+
<div style="font-size: 18px">
|
|
31
|
+
{{ item.showName }}
|
|
32
|
+
</div>
|
|
33
|
+
<div style="padding-top: 10px">
|
|
34
|
+
{{ $t('superGrid.previewTitleWhenNotImg') }}
|
|
35
|
+
</div>
|
|
36
|
+
<div style="padding-top: 10px">
|
|
37
|
+
<el-button type="primary" size="small" @click="preview()">
|
|
38
|
+
{{ $t('fsUpload.preview') }}
|
|
39
|
+
</el-button>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</el-carousel-item>
|
|
43
|
+
</el-carousel>
|
|
44
|
+
</el-dialog>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
import { Delete as ElIconDelete } from '@element-plus/icons'
|
|
49
|
+
import { $on, $off, $once, $emit } from '../utils/gogocodeTransfer'
|
|
50
|
+
import * as Vue from 'vue'
|
|
51
|
+
import { isPlateSys, getSystemFrontendUrl } from '../../src/utils/common-util'
|
|
52
|
+
import { getToken } from '../../src/utils/auth'
|
|
53
|
+
export default {
|
|
54
|
+
components: {
|
|
55
|
+
ElIconDelete,
|
|
56
|
+
},
|
|
57
|
+
name: 'ViewImageDialog',
|
|
58
|
+
props: {
|
|
59
|
+
fileList: {
|
|
60
|
+
type: Array,
|
|
61
|
+
default: function () {
|
|
62
|
+
return []
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
downloadable: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: function () {
|
|
68
|
+
return true
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
deleteable: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: function () {
|
|
74
|
+
return false
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
data() {
|
|
79
|
+
const token = getToken()
|
|
80
|
+
let previewUrl =
|
|
81
|
+
window.$vueApp.config.globalProperties.baseURL +
|
|
82
|
+
'/common/fs-upload/preview?jwt=' +
|
|
83
|
+
token
|
|
84
|
+
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
85
|
+
previewUrl =
|
|
86
|
+
window.$vueApp.config.globalProperties.baseAPI +
|
|
87
|
+
'/component/fs-upload/preview?jwt=' +
|
|
88
|
+
token
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
showName: null,
|
|
92
|
+
serverName: null,
|
|
93
|
+
file: null,
|
|
94
|
+
previewUrl,
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
methods: {
|
|
98
|
+
changeFile(currentIndex, origIndex) {
|
|
99
|
+
const file = this.fileList[currentIndex]
|
|
100
|
+
this.file = file
|
|
101
|
+
this.showName = file.showName
|
|
102
|
+
this.serverName = file.serverName
|
|
103
|
+
},
|
|
104
|
+
downloadFile() {
|
|
105
|
+
if (!this.showName) {
|
|
106
|
+
const file = this.fileList[0]
|
|
107
|
+
this.showName = file.showName
|
|
108
|
+
this.serverName = file.serverName
|
|
109
|
+
}
|
|
110
|
+
const token = getToken()
|
|
111
|
+
let url =
|
|
112
|
+
window.$vueApp.config.globalProperties.baseURL +
|
|
113
|
+
'/common/super-form/downloads?jwt=' +
|
|
114
|
+
token
|
|
115
|
+
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
116
|
+
url =
|
|
117
|
+
window.$vueApp.config.globalProperties.baseAPI +
|
|
118
|
+
'/component/super-form/downloads?jwt=' +
|
|
119
|
+
token
|
|
120
|
+
}
|
|
121
|
+
window.location.href =
|
|
122
|
+
url +
|
|
123
|
+
'&showName=' +
|
|
124
|
+
encodeURI(this.showName) +
|
|
125
|
+
'&serverPath=' +
|
|
126
|
+
this.serverName
|
|
127
|
+
},
|
|
128
|
+
preview() {
|
|
129
|
+
if (!this.showName) {
|
|
130
|
+
const file = this.fileList[0]
|
|
131
|
+
this.showName = file.showName
|
|
132
|
+
this.serverName = file.serverName
|
|
133
|
+
}
|
|
134
|
+
if (window.$vueApp.config.globalProperties.customPreviewUrl) {
|
|
135
|
+
window.open(
|
|
136
|
+
getSystemFrontendUrl(
|
|
137
|
+
window.$vueApp.config.globalProperties.portalUrl
|
|
138
|
+
) +
|
|
139
|
+
'/#/file-service/preview?serverPath=' +
|
|
140
|
+
this.serverName +
|
|
141
|
+
'&showName=' +
|
|
142
|
+
encodeURI(this.showName),
|
|
143
|
+
this.showName
|
|
144
|
+
)
|
|
145
|
+
} else {
|
|
146
|
+
window.open(
|
|
147
|
+
this.previewUrl +
|
|
148
|
+
'&showName=' +
|
|
149
|
+
encodeURI(this.showName) +
|
|
150
|
+
'&serverPath=' +
|
|
151
|
+
this.serverName
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
deleteFile() {
|
|
156
|
+
let index
|
|
157
|
+
if (this.fileList && this.fileList.length > 0) {
|
|
158
|
+
if (!this.showName) {
|
|
159
|
+
const file = this.fileList[0]
|
|
160
|
+
this.showName = file.showName
|
|
161
|
+
this.serverName = file.serverName
|
|
162
|
+
}
|
|
163
|
+
const serverName = this.serverName
|
|
164
|
+
index = this.fileList.findIndex(function (item) {
|
|
165
|
+
return item.serverName === serverName
|
|
166
|
+
})
|
|
167
|
+
}
|
|
168
|
+
$emit(this, 'delete', this.fileList, index)
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
emits: ['close', 'delete'],
|
|
172
|
+
}
|
|
173
|
+
</script>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const eventRegistryMap = new WeakMap()
|
|
2
|
+
function getRegistry(instance) {
|
|
3
|
+
let events = eventRegistryMap.get(instance)
|
|
4
|
+
if (!events) {
|
|
5
|
+
eventRegistryMap.set(instance, (events = Object.create(null)))
|
|
6
|
+
}
|
|
7
|
+
return events
|
|
8
|
+
}
|
|
9
|
+
export function $on(instance, event, fn) {
|
|
10
|
+
if (Array.isArray(event)) {
|
|
11
|
+
event.forEach((e) => $on(instance, e, fn))
|
|
12
|
+
} else {
|
|
13
|
+
const events = getRegistry(instance)
|
|
14
|
+
;(events[event] || (events[event] = [])).push(fn)
|
|
15
|
+
}
|
|
16
|
+
return instance
|
|
17
|
+
}
|
|
18
|
+
export function $once(instance, event, fn) {
|
|
19
|
+
const wrapped = (...args) => {
|
|
20
|
+
$off(instance, event, wrapped)
|
|
21
|
+
fn.call(instance, ...args)
|
|
22
|
+
}
|
|
23
|
+
wrapped.fn = fn
|
|
24
|
+
$on(instance, event, wrapped)
|
|
25
|
+
return instance
|
|
26
|
+
}
|
|
27
|
+
export function $off(instance, event, fn) {
|
|
28
|
+
const vm = instance
|
|
29
|
+
// all
|
|
30
|
+
if (!event) {
|
|
31
|
+
eventRegistryMap.set(instance, Object.create(null))
|
|
32
|
+
return vm
|
|
33
|
+
}
|
|
34
|
+
// array of events
|
|
35
|
+
if (Array.isArray(event)) {
|
|
36
|
+
event.forEach((e) => $off(instance, e, fn))
|
|
37
|
+
return vm
|
|
38
|
+
}
|
|
39
|
+
// specific event
|
|
40
|
+
const events = getRegistry(instance)
|
|
41
|
+
const cbs = events[event]
|
|
42
|
+
if (!cbs) {
|
|
43
|
+
return vm
|
|
44
|
+
}
|
|
45
|
+
if (!fn) {
|
|
46
|
+
events[event] = undefined
|
|
47
|
+
return vm
|
|
48
|
+
}
|
|
49
|
+
events[event] = cbs.filter((cb) => !(cb === fn || cb.fn === fn))
|
|
50
|
+
return vm
|
|
51
|
+
}
|
|
52
|
+
export function $emit(instance, event, ...args) {
|
|
53
|
+
instance && instance.$emit && instance.$emit(event, ...args)
|
|
54
|
+
const cbs = getRegistry(instance)[event]
|
|
55
|
+
if (cbs) {
|
|
56
|
+
cbs.map((cb) => cb.apply(instance, args))
|
|
57
|
+
}
|
|
58
|
+
return instance
|
|
59
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { getI18n } from '../../src/utils/util'
|
|
2
|
+
import * as Vue from 'vue'
|
|
3
|
+
const utils = {
|
|
4
|
+
getSearchUserFields() {
|
|
5
|
+
const i18n = getI18n()
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
value: 'name',
|
|
9
|
+
label: i18n.t('departmentUserTree.searchFieldUserName'),
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
value: 'loginName',
|
|
13
|
+
label: i18n.t('departmentUserTree.searchFieldLoginName'),
|
|
14
|
+
},
|
|
15
|
+
{ value: 'email', label: i18n.t('departmentUserTree.searchFieldEmail') },
|
|
16
|
+
{
|
|
17
|
+
value: 'telephone',
|
|
18
|
+
label: i18n.t('departmentUserTree.searchFieldTelephone'),
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
value: 'jobNumber',
|
|
22
|
+
label: i18n.t('departmentUserTree.searchFieldJobNumber'),
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
value: 'honorificName',
|
|
26
|
+
label: i18n.t('departmentUserTree.searchFieldHonorificName'),
|
|
27
|
+
},
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
removeRow(arr, row) {
|
|
31
|
+
var length = arr.length
|
|
32
|
+
for (var i = 0; i < length; i++) {
|
|
33
|
+
if (arr[i].id === row.id) {
|
|
34
|
+
if (i === 0) {
|
|
35
|
+
arr.shift() // 删除并返回数组的第一个元素
|
|
36
|
+
return arr
|
|
37
|
+
} else if (i === length - 1) {
|
|
38
|
+
arr.pop() // 删除并返回数组的最后一个元素
|
|
39
|
+
return arr
|
|
40
|
+
} else {
|
|
41
|
+
arr.splice(i, 1) // 删除下标为i的元素
|
|
42
|
+
return arr
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return arr
|
|
47
|
+
},
|
|
48
|
+
storeSeachValue(localStorage, searchStoreKey, searchValue) {
|
|
49
|
+
// localStorage.removeItem(searchStoreKey)
|
|
50
|
+
if (searchValue && searchValue !== '') {
|
|
51
|
+
// 查询条件不为空
|
|
52
|
+
var searchValues = localStorage.getObject(searchStoreKey)
|
|
53
|
+
if (searchValues && searchValues.length > 0) {
|
|
54
|
+
// 表示缓存中已有部门查询条件,则追加该查询条件
|
|
55
|
+
var containsResult = searchValues.filter(this.createFilter(searchValue))
|
|
56
|
+
if (containsResult.length === 0) {
|
|
57
|
+
// 如果不包含相同的查询条件,则添加,如果包含则不需要再添加
|
|
58
|
+
const searchValueObj = { value: searchValue }
|
|
59
|
+
searchValues.push(searchValueObj)
|
|
60
|
+
localStorage.setObject(searchStoreKey, searchValues)
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
var searchValuesArr = []
|
|
64
|
+
const searchValueObj = { value: searchValue }
|
|
65
|
+
searchValuesArr.push(searchValueObj)
|
|
66
|
+
localStorage.setObject(searchStoreKey, searchValuesArr)
|
|
67
|
+
}
|
|
68
|
+
this.restaurants = localStorage.getObject(searchStoreKey)
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
createFilter(queryString) {
|
|
72
|
+
return (restaurant) => {
|
|
73
|
+
return (
|
|
74
|
+
restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
handleSelectUtil(item, localStorage) {
|
|
79
|
+
this.storeSeachValue(localStorage, this.searchStoreKey, this.filterText)
|
|
80
|
+
this.search(item.value)
|
|
81
|
+
},
|
|
82
|
+
analysisLabelTag(labelTag, row, contextParam, additionalParam) {
|
|
83
|
+
let returnStr = ''
|
|
84
|
+
if (labelTag) {
|
|
85
|
+
let tags
|
|
86
|
+
if (labelTag !== '' && typeof labelTag === 'string') {
|
|
87
|
+
tags = labelTag.split('-#-#')
|
|
88
|
+
} else if (typeof labelTag === 'object') {
|
|
89
|
+
tags = labelTag
|
|
90
|
+
}
|
|
91
|
+
if (tags && tags.length > 0) {
|
|
92
|
+
for (var i = 0; i < tags.length; i++) {
|
|
93
|
+
let tag = tags[i]
|
|
94
|
+
if (tag.indexOf('obj.') !== -1) {
|
|
95
|
+
tag = tag.replace('${obj.', '').replace('}', '')
|
|
96
|
+
if (row) {
|
|
97
|
+
let originalValue = row[tag]
|
|
98
|
+
if (this.childIsObjectProp(tag)) {
|
|
99
|
+
originalValue = this.childObjectPropOriginalValue(row, tag)
|
|
100
|
+
}
|
|
101
|
+
returnStr += originalValue
|
|
102
|
+
}
|
|
103
|
+
} else if (tag.indexOf('request.') !== -1) {
|
|
104
|
+
tag = tag.replace('${request.', '').replace('}', '')
|
|
105
|
+
if (additionalParam) {
|
|
106
|
+
const originalValue = additionalParam[tag]
|
|
107
|
+
if (originalValue) {
|
|
108
|
+
returnStr += originalValue
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
} else if (tag.indexOf('input.') !== -1) {
|
|
112
|
+
tag = tag.replace('${input.', '').replace('}', '')
|
|
113
|
+
returnStr += tag
|
|
114
|
+
} else if (tag.indexOf('context.') !== -1) {
|
|
115
|
+
tag = tag.replace('${context.', '').replace('}', '')
|
|
116
|
+
if (contextParam) {
|
|
117
|
+
const originalValue = contextParam[tag]
|
|
118
|
+
if (originalValue) {
|
|
119
|
+
returnStr += originalValue
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return returnStr
|
|
127
|
+
},
|
|
128
|
+
childIsObjectProp(prop) {
|
|
129
|
+
if (prop.indexOf('.') > 0) {
|
|
130
|
+
return true
|
|
131
|
+
} else {
|
|
132
|
+
return false
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
childObjectPropOriginalValue(row, prop) {
|
|
136
|
+
try {
|
|
137
|
+
let objValue = row
|
|
138
|
+
const props = prop.split('.')
|
|
139
|
+
props.forEach((subProp) => {
|
|
140
|
+
if (objValue) {
|
|
141
|
+
objValue = objValue[subProp]
|
|
142
|
+
} else {
|
|
143
|
+
objValue = ''
|
|
144
|
+
throw objValue
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
return objValue
|
|
148
|
+
} catch (e) {
|
|
149
|
+
return ''
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
// 根据指定用户信息获得用户集合
|
|
153
|
+
getSelectUsers(searchField, selectUserInfo, separator) {
|
|
154
|
+
return new Promise((resolve, reject) => {
|
|
155
|
+
if (!searchField) {
|
|
156
|
+
resolve([])
|
|
157
|
+
} else if (!selectUserInfo) {
|
|
158
|
+
resolve([])
|
|
159
|
+
} else {
|
|
160
|
+
this.$http
|
|
161
|
+
.get(
|
|
162
|
+
window.$vueApp.config.globalProperties.baseAPI +
|
|
163
|
+
'/component/organization-trees/select-users?searchField=' +
|
|
164
|
+
searchField +
|
|
165
|
+
'&selectUserInfo=' +
|
|
166
|
+
selectUserInfo +
|
|
167
|
+
'&separator=' +
|
|
168
|
+
separator
|
|
169
|
+
)
|
|
170
|
+
.then((users) => {
|
|
171
|
+
resolve(users)
|
|
172
|
+
})
|
|
173
|
+
.catch((error) => {
|
|
174
|
+
reject(error)
|
|
175
|
+
})
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
},
|
|
179
|
+
}
|
|
180
|
+
export default utils
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
import * as Vue from 'vue'
|
|
3
|
+
/**
|
|
4
|
+
* 封装值设置为枚举 或 bean方式时的值为'key-value'键值对信息
|
|
5
|
+
*/
|
|
6
|
+
export function packageEnumAndBeanColumnValueSets(columns, listCode) {
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
const valueSetColumnsInfo = {
|
|
9
|
+
listCode: listCode,
|
|
10
|
+
valueSetMetas: [],
|
|
11
|
+
}
|
|
12
|
+
const valueSetColumnIndexs = []
|
|
13
|
+
for (let i = 0; i < columns.length; i++) {
|
|
14
|
+
const column = columns[i]
|
|
15
|
+
const prop = column.prop ? column.prop : column.label
|
|
16
|
+
const columnValueSet = packageEnumAndBeanColumnValueSet(column)
|
|
17
|
+
let titleValueSet = null
|
|
18
|
+
const titleValueSetJson = column.titleValueSet
|
|
19
|
+
if (titleValueSetJson) {
|
|
20
|
+
titleValueSet = packageEnumAndBeanColumnValueSet(
|
|
21
|
+
JSON.parse(titleValueSetJson)
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
if (columnValueSet || titleValueSet) {
|
|
25
|
+
const valueSetMeta = {
|
|
26
|
+
prop: prop,
|
|
27
|
+
}
|
|
28
|
+
if (columnValueSet) {
|
|
29
|
+
// 字段的值设置
|
|
30
|
+
valueSetMeta.valueSet = columnValueSet
|
|
31
|
+
}
|
|
32
|
+
if (titleValueSet) {
|
|
33
|
+
valueSetMeta.titleValueSet = titleValueSet
|
|
34
|
+
}
|
|
35
|
+
valueSetColumnsInfo.valueSetMetas.push(valueSetMeta)
|
|
36
|
+
valueSetColumnIndexs.push(i)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (valueSetColumnsInfo.valueSetMetas.length > 0) {
|
|
40
|
+
window.$vueApp.config.globalProperties.$http
|
|
41
|
+
.post(
|
|
42
|
+
window.$vueApp.config.globalProperties.baseURL +
|
|
43
|
+
'/common/super-grids/value-sets',
|
|
44
|
+
valueSetColumnsInfo
|
|
45
|
+
)
|
|
46
|
+
.then((columnValueSets) => {
|
|
47
|
+
valueSetColumnIndexs.forEach((columnIndex) => {
|
|
48
|
+
let valueSetMap
|
|
49
|
+
const prop = columns[columnIndex].prop
|
|
50
|
+
? columns[columnIndex].prop
|
|
51
|
+
: columns[columnIndex].label
|
|
52
|
+
for (const prop1 in columnValueSets) {
|
|
53
|
+
if (prop === prop1) {
|
|
54
|
+
valueSetMap = columnValueSets[prop]
|
|
55
|
+
break
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (valueSetMap) {
|
|
59
|
+
if (valueSetMap.valueSet) {
|
|
60
|
+
columns[columnIndex].valueSet = valueSetMap.valueSet
|
|
61
|
+
}
|
|
62
|
+
if (valueSetMap.titleValueSet) {
|
|
63
|
+
columns[columnIndex].titleValueSetValue =
|
|
64
|
+
valueSetMap.titleValueSet
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
resolve(columns)
|
|
69
|
+
})
|
|
70
|
+
.catch((error) => {
|
|
71
|
+
reject(error)
|
|
72
|
+
})
|
|
73
|
+
} else {
|
|
74
|
+
resolve(columns)
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function packageEnumAndBeanColumnValueSet(valueSetInfo) {
|
|
80
|
+
/**
|
|
81
|
+
* 枚举类型值设置前缀
|
|
82
|
+
*/
|
|
83
|
+
const ENUM_NAME_PREFIX = 'enumname:'
|
|
84
|
+
/**
|
|
85
|
+
* bean形式值设置前缀
|
|
86
|
+
*/
|
|
87
|
+
const BEAN_NAME_PREFIX = 'beanname:'
|
|
88
|
+
const enumName = valueSetInfo.enumName
|
|
89
|
+
const beanName = valueSetInfo.beanName
|
|
90
|
+
if (enumName && enumName !== '') {
|
|
91
|
+
if (valueSetInfo.remoteEnum === true) {
|
|
92
|
+
// 需要远程获得枚举值
|
|
93
|
+
return ENUM_NAME_PREFIX + enumName
|
|
94
|
+
}
|
|
95
|
+
} else if (beanName && beanName !== '') {
|
|
96
|
+
return BEAN_NAME_PREFIX + beanName
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button class="muk-btn" :class="[size, type]">
|
|
3
|
+
<!-- 定义插槽用于让用户自定义按钮你们的内容 -->
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</button>
|
|
6
|
+
<el-button type="primary"></el-button>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: 'MukButton',
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script setup>
|
|
16
|
+
/**
|
|
17
|
+
* 接收传过来的值
|
|
18
|
+
*
|
|
19
|
+
* @param size 定义按钮的大小 可选值为 'large' | 'middle' | 'small' | 'mini'
|
|
20
|
+
* @param type 定义按钮的类型 默认不填
|
|
21
|
+
*/
|
|
22
|
+
defineProps({
|
|
23
|
+
size: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'middle',
|
|
26
|
+
},
|
|
27
|
+
type: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: 'default',
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style lang="scss" scoped>
|
|
35
|
+
.muk-btn {
|
|
36
|
+
appearance: none;
|
|
37
|
+
border: none;
|
|
38
|
+
outline: none;
|
|
39
|
+
background: #fff;
|
|
40
|
+
text-align: center;
|
|
41
|
+
border: 1px solid transparent;
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
.large {
|
|
46
|
+
width: 240px;
|
|
47
|
+
height: 50px;
|
|
48
|
+
font-size: 16px;
|
|
49
|
+
}
|
|
50
|
+
.moddle {
|
|
51
|
+
width: 180px;
|
|
52
|
+
height: 50px;
|
|
53
|
+
font-size: 16px;
|
|
54
|
+
}
|
|
55
|
+
.small {
|
|
56
|
+
width: 100px;
|
|
57
|
+
height: 32px;
|
|
58
|
+
}
|
|
59
|
+
.mini {
|
|
60
|
+
width: 60px;
|
|
61
|
+
height: 32px;
|
|
62
|
+
}
|
|
63
|
+
.default {
|
|
64
|
+
border-color: #e4e4e4;
|
|
65
|
+
color: #666;
|
|
66
|
+
}
|
|
67
|
+
.primary {
|
|
68
|
+
border-color: skyblue;
|
|
69
|
+
background: skyblue;
|
|
70
|
+
color: #fff;
|
|
71
|
+
}
|
|
72
|
+
.plain {
|
|
73
|
+
border-color: skyblue;
|
|
74
|
+
color: skyblue;
|
|
75
|
+
background: lighten(skyblue, 50%);
|
|
76
|
+
}
|
|
77
|
+
.gray {
|
|
78
|
+
border-color: #ccc;
|
|
79
|
+
background: #ccc;
|
|
80
|
+
color: #fff;
|
|
81
|
+
}
|
|
82
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,40 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "imatrix-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"vue
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"babel-cli": "^6.26.0",
|
|
31
|
-
"babel-eslint": "^10.0.1",
|
|
32
|
-
"chai": "^4.1.2",
|
|
33
|
-
"eslint": "^5.8.0",
|
|
34
|
-
"eslint-plugin-vue": "^5.0.0",
|
|
35
|
-
"node-sass": "^4.9.0",
|
|
36
|
-
"sass-loader": "^7.1.0",
|
|
37
|
-
"vue-cli-plugin-element": "^1.0.1",
|
|
38
|
-
"vue-template-compiler": "^2.5.21"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "imatrix-ui",
|
|
3
|
+
"version": "0.1.1-up",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"lib": "vite build",
|
|
7
|
+
"preview": "vite preview"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@tinymce/tinymce-vue": "5",
|
|
11
|
+
"async-validator": "^4.2.5",
|
|
12
|
+
"element-plus": "^2.4.1",
|
|
13
|
+
"js-cookie": "^3.0.5",
|
|
14
|
+
"sortablejs": "^1.15.0",
|
|
15
|
+
"tinymce": "^6.7.1"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@element-plus/icons": "^0.0.11",
|
|
19
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
20
|
+
"element-plus": "^2.4.1",
|
|
21
|
+
"nprogress": "^0.2.0",
|
|
22
|
+
"sass": "^1.69.4",
|
|
23
|
+
"vite": "^4.4.5",
|
|
24
|
+
"vue": "^3.3.4",
|
|
25
|
+
"vue-i18n": "^9.5.0",
|
|
26
|
+
"vue-router": "^4.2.5",
|
|
27
|
+
"vuex": "^4.1.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Vite + Vue</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script type="module" src="/src/main.js"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/public/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|