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,77 @@
|
|
|
1
|
+
const events = {
|
|
2
|
+
/**
|
|
3
|
+
* 选中值发生变化时触发
|
|
4
|
+
* @param {*} newValue
|
|
5
|
+
*/
|
|
6
|
+
change: function (newValue) {
|
|
7
|
+
const item = this.getSelectedOptionItem(newValue)
|
|
8
|
+
this.$emit('change', newValue, item)
|
|
9
|
+
},
|
|
10
|
+
/**
|
|
11
|
+
* 下拉框出现/隐藏时触发
|
|
12
|
+
* @param {*} visible 出现则为 true,隐藏则为 false
|
|
13
|
+
*/
|
|
14
|
+
visibleChange: function (visible) {
|
|
15
|
+
this.$emit('visible-change', visible)
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* 多选模式下移除tag时触发
|
|
19
|
+
* @param {*} remote 是否启用了远程搜索
|
|
20
|
+
* @param {*} tag 移除的tag值
|
|
21
|
+
*/
|
|
22
|
+
removeTag: function (remote, tag) {
|
|
23
|
+
this.$emit('remove-tag', tag)
|
|
24
|
+
if (Array.isArray(this.value)) {
|
|
25
|
+
if (this.value.length === 1 && remote) {
|
|
26
|
+
this.clearMarkValue()
|
|
27
|
+
this.remoteQuery('', null)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* 可清空的单选模式下用户点击清空按钮时触发
|
|
33
|
+
*/
|
|
34
|
+
clear: function () {
|
|
35
|
+
this.clearMarkValue()
|
|
36
|
+
this.$emit('clear')
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* 当 input 失去焦点时触发
|
|
40
|
+
* @param {*} event
|
|
41
|
+
*/
|
|
42
|
+
blur: function (event) {
|
|
43
|
+
this.$emit('blur', event)
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* 当 input 获得焦点时触发
|
|
47
|
+
* @param {*} event
|
|
48
|
+
*/
|
|
49
|
+
focus: function (event) {
|
|
50
|
+
this.$emit('focus', event)
|
|
51
|
+
},
|
|
52
|
+
input(newValue) {
|
|
53
|
+
this.$emit('input', newValue)
|
|
54
|
+
},
|
|
55
|
+
getSelectedOptionItem(selectValue) {
|
|
56
|
+
if (
|
|
57
|
+
this.baseProps.multiple !== undefined &&
|
|
58
|
+
this.baseProps.multiple === true &&
|
|
59
|
+
Array.isArray(selectValue)
|
|
60
|
+
) {
|
|
61
|
+
const selected = []
|
|
62
|
+
for (var i = 0; i < selectValue.length; i++) {
|
|
63
|
+
selected.push(
|
|
64
|
+
this.optionItems.find((item) => {
|
|
65
|
+
return item[this.valueAttribute] === selectValue[i]
|
|
66
|
+
})
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
return selected
|
|
70
|
+
} else {
|
|
71
|
+
return this.optionItems.find((item) => {
|
|
72
|
+
return item[this.valueAttribute] === selectValue
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
export default events
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="label">
|
|
3
|
+
<div class="list-file" @click="previewMuti()" @dblclick="dblclickEvent">
|
|
4
|
+
<el-icon><el-icon-paperclip /></el-icon>
|
|
5
|
+
{{ label }}
|
|
6
|
+
<el-icon class="annex-cell"><el-icon-view /></el-icon>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<el-dialog
|
|
10
|
+
:append-to-body="true"
|
|
11
|
+
:show-close="true"
|
|
12
|
+
:title="$t('imatrixUIPublicModel.previewImage')"
|
|
13
|
+
v-model="showPreviewSingleImage"
|
|
14
|
+
@close="$emit('close')"
|
|
15
|
+
>
|
|
16
|
+
<template v-slot:title>
|
|
17
|
+
<span
|
|
18
|
+
>{{ $t('imatrixUIPublicModel.previewImage') }}
|
|
19
|
+
<!-- <i v-if="downloadable" class="el-icon-download" style="padding-left:5px;cursor:pointer;color:#409EFF" @click="downloadFile()" /> -->
|
|
20
|
+
<!-- <i v-if="deleteable" class="el-icon-delete" style="padding-left:5px;cursor:pointer;color:#F56C6C" @click="deleteFile()" /> -->
|
|
21
|
+
</span>
|
|
22
|
+
</template>
|
|
23
|
+
<el-image
|
|
24
|
+
v-if="previewImageInfo && previewImageInfo.isImg"
|
|
25
|
+
:preview-src-list="[previewImageInfo.src]"
|
|
26
|
+
:src="previewImageInfo.src"
|
|
27
|
+
/>
|
|
28
|
+
</el-dialog>
|
|
29
|
+
<el-dialog
|
|
30
|
+
:append-to-body="true"
|
|
31
|
+
:show-close="true"
|
|
32
|
+
:title="$t('imatrixUIPublicModel.preview')"
|
|
33
|
+
v-model="showPreviewMulti"
|
|
34
|
+
width="30%"
|
|
35
|
+
@close="$emit('close')"
|
|
36
|
+
>
|
|
37
|
+
<template v-slot:title>
|
|
38
|
+
<span
|
|
39
|
+
>{{ $t('imatrixUIPublicModel.preview') }}
|
|
40
|
+
<!-- <i v-if="downloadable" class="el-icon-download" style="padding-left:5px;cursor:pointer;color:#409EFF" @click="downloadFile()" /> -->
|
|
41
|
+
<!-- <i v-if="deleteable" class="el-icon-delete" style="padding-left:5px;cursor:pointer;color:#F56C6C" @click="deleteFile()" /> -->
|
|
42
|
+
</span>
|
|
43
|
+
</template>
|
|
44
|
+
<el-table :show-header="false" :data="fileList">
|
|
45
|
+
<el-table-column prop="showName" width="200" />
|
|
46
|
+
<el-table-column align="right">
|
|
47
|
+
<template v-slot="scope">
|
|
48
|
+
<el-tooltip
|
|
49
|
+
:content="$t('imatrixUIPublicModel.preview')"
|
|
50
|
+
class="item"
|
|
51
|
+
effect="dark"
|
|
52
|
+
placement="top"
|
|
53
|
+
>
|
|
54
|
+
<el-icon style="cursor: pointer"><el-icon-view /></el-icon>
|
|
55
|
+
</el-tooltip>
|
|
56
|
+
</template>
|
|
57
|
+
</el-table-column>
|
|
58
|
+
<el-table-column>
|
|
59
|
+
<template v-slot="scope">
|
|
60
|
+
<el-tooltip
|
|
61
|
+
:content="$t('imatrixUIPublicModel.download')"
|
|
62
|
+
class="item"
|
|
63
|
+
effect="dark"
|
|
64
|
+
placement="top"
|
|
65
|
+
>
|
|
66
|
+
<el-icon style="cursor: pointer"><el-icon-download /></el-icon>
|
|
67
|
+
</el-tooltip>
|
|
68
|
+
</template>
|
|
69
|
+
</el-table-column>
|
|
70
|
+
</el-table>
|
|
71
|
+
</el-dialog>
|
|
72
|
+
</div>
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
<script>
|
|
76
|
+
import {
|
|
77
|
+
Paperclip as ElIconPaperclip,
|
|
78
|
+
View as ElIconView,
|
|
79
|
+
Download as ElIconDownload,
|
|
80
|
+
} from '@element-plus/icons'
|
|
81
|
+
import * as Vue from 'vue'
|
|
82
|
+
import { isPlateSys, getSystemFrontendUrl } from '../../src/utils/common-util'
|
|
83
|
+
import {
|
|
84
|
+
isImage,
|
|
85
|
+
getEntityFieldValue
|
|
86
|
+
} from '../../src/utils/util'
|
|
87
|
+
import { packageFile } from '../super-grid/utils'
|
|
88
|
+
import { getToken } from '../../src/utils/auth'
|
|
89
|
+
export default {
|
|
90
|
+
components: {
|
|
91
|
+
ElIconPaperclip,
|
|
92
|
+
ElIconView,
|
|
93
|
+
ElIconDownload,
|
|
94
|
+
},
|
|
95
|
+
name: 'FsPreview',
|
|
96
|
+
props: {
|
|
97
|
+
label: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: null,
|
|
100
|
+
},
|
|
101
|
+
fileSetObj: {
|
|
102
|
+
type: Object,
|
|
103
|
+
default: null,
|
|
104
|
+
},
|
|
105
|
+
isSql: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: false,
|
|
108
|
+
},
|
|
109
|
+
entity: {
|
|
110
|
+
type: Object,
|
|
111
|
+
default: () => {
|
|
112
|
+
return {}
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
data() {
|
|
117
|
+
return {
|
|
118
|
+
showPreviewSingleImage: false,
|
|
119
|
+
showPreviewMulti: false,
|
|
120
|
+
previewImageInfo: {},
|
|
121
|
+
fileList: [],
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
created() {
|
|
125
|
+
// let fileList = []
|
|
126
|
+
// if (this.column.fileSet && this.column.fileSet !== '' && (this.column.componentType === 'annex' || this.column.componentType === 'multipartUpload')) {
|
|
127
|
+
// const fileSetObj = JSON.parse(this.column.fileSet)
|
|
128
|
+
// const keyValueParam = this.analysisFileSetObj(fileSetObj, this.isSql)
|
|
129
|
+
// if (fileSetObj && fileSetObj.multiple) {
|
|
130
|
+
// if (fileSetObj.childAnnexDataTableCode) {
|
|
131
|
+
// // const lowerStr = fileSetObj.childAnnexDataTableCode.toLowerCase()
|
|
132
|
+
// const fileArr = this.entity[this.column.prop]
|
|
133
|
+
// // 子表
|
|
134
|
+
// fileList = otherFilesToStandard(fileSetObj, keyValueParam, fileArr, null)
|
|
135
|
+
// } else {
|
|
136
|
+
// const filesStringData = {
|
|
137
|
+
// 'showName': getEntityFieldValue(this.entity, keyValueParam.showName),
|
|
138
|
+
// 'serverPath': getEntityFieldValue(this.entity, keyValueParam.serverPath)
|
|
139
|
+
// }
|
|
140
|
+
// fileList = otherFilesToStandard(fileSetObj, keyValueParam, null, filesStringData)
|
|
141
|
+
// }
|
|
142
|
+
// } else {
|
|
143
|
+
// const showName = getEntityFieldValue(this.entity, keyValueParam.showName)
|
|
144
|
+
// const serverPath = getEntityFieldValue(this.entity, keyValueParam.serverPath)
|
|
145
|
+
// fileList.push(packageFile(showName, serverPath))
|
|
146
|
+
// }
|
|
147
|
+
// }
|
|
148
|
+
},
|
|
149
|
+
methods: {
|
|
150
|
+
dblclickEvent() {
|
|
151
|
+
clearTimeout(this.time)
|
|
152
|
+
},
|
|
153
|
+
previewSingle(fileInfo) {
|
|
154
|
+
fileInfo = packageFile(fileInfo.showName, fileInfo.serverPath)
|
|
155
|
+
if (isImage(fileInfo.showName)) {
|
|
156
|
+
this.previewImageInfo = fileInfo
|
|
157
|
+
this.showPreviewSingleImage = true
|
|
158
|
+
} else {
|
|
159
|
+
this.previewDoc(fileInfo)
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
previewMuti() {
|
|
163
|
+
const keyValueParam = this.analysisFileSetObj(this.fileSetObj, this.isSql)
|
|
164
|
+
const serverPath = getEntityFieldValue(
|
|
165
|
+
this.entity,
|
|
166
|
+
keyValueParam.serverPath
|
|
167
|
+
)
|
|
168
|
+
if (serverPath) {
|
|
169
|
+
const uuids = serverPath.split(',')
|
|
170
|
+
this.$http
|
|
171
|
+
.post(
|
|
172
|
+
window.$vueApp.config.globalProperties.baseURL +
|
|
173
|
+
'/common/fs-upload/search-file-names',
|
|
174
|
+
uuids
|
|
175
|
+
)
|
|
176
|
+
.then((result) => {
|
|
177
|
+
this.fileList = []
|
|
178
|
+
uuids.forEach((uuid) => {
|
|
179
|
+
this.fileList.push({ showName: result[uuid], serverPath: uuid })
|
|
180
|
+
})
|
|
181
|
+
this.showPreviewMulti = true
|
|
182
|
+
})
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// var that = this
|
|
186
|
+
// clearTimeout(that.time)
|
|
187
|
+
// that.time = setTimeout(() => {
|
|
188
|
+
// }, 200)
|
|
189
|
+
},
|
|
190
|
+
previewDoc(fileInfo) {
|
|
191
|
+
const token = getToken()
|
|
192
|
+
let previewUrl =
|
|
193
|
+
window.$vueApp.config.globalProperties.baseURL +
|
|
194
|
+
'/common/fs-upload/preview?jwt=' +
|
|
195
|
+
token
|
|
196
|
+
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
197
|
+
previewUrl =
|
|
198
|
+
window.$vueApp.config.globalProperties.baseAPI +
|
|
199
|
+
'/component/fs-upload/preview?jwt=' +
|
|
200
|
+
token
|
|
201
|
+
}
|
|
202
|
+
const showName = fileInfo.showName
|
|
203
|
+
if (window.$vueApp.config.globalProperties.customPreviewUrl) {
|
|
204
|
+
window.open(
|
|
205
|
+
getSystemFrontendUrl(
|
|
206
|
+
window.$vueApp.config.globalProperties.portalUrl
|
|
207
|
+
) +
|
|
208
|
+
'/#/file-service/preview?serverPath=' +
|
|
209
|
+
fileInfo.serverPath +
|
|
210
|
+
'&showName=' +
|
|
211
|
+
encodeURI(showName),
|
|
212
|
+
fileInfo.showName
|
|
213
|
+
)
|
|
214
|
+
} else {
|
|
215
|
+
window.open(
|
|
216
|
+
previewUrl +
|
|
217
|
+
'&showName=' +
|
|
218
|
+
encodeURI(showName) +
|
|
219
|
+
'&serverPath=' +
|
|
220
|
+
fileInfo.serverPath
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
donwloadFile(index, fileList) {
|
|
225
|
+
const token = getToken()
|
|
226
|
+
const showName = this.formatFileName(this.fileList[index].showName)
|
|
227
|
+
if (!this.fileList[index].src) {
|
|
228
|
+
let url =
|
|
229
|
+
window.$vueApp.config.globalProperties.baseURL +
|
|
230
|
+
'/common/super-form/downloads?jwt=' +
|
|
231
|
+
token
|
|
232
|
+
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
233
|
+
url =
|
|
234
|
+
window.$vueApp.config.globalProperties.baseAPI +
|
|
235
|
+
'/component/super-form/downloads?jwt=' +
|
|
236
|
+
token
|
|
237
|
+
}
|
|
238
|
+
const src =
|
|
239
|
+
url +
|
|
240
|
+
'&showName=' +
|
|
241
|
+
encodeURI(showName) +
|
|
242
|
+
'&serverPath=' +
|
|
243
|
+
this.fileList[index].serverPath
|
|
244
|
+
window.open(src)
|
|
245
|
+
} else {
|
|
246
|
+
window.open(this.fileList[index].src)
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
analysisFileSetObj(fileSetObj, isSql) {
|
|
250
|
+
let showName = ''
|
|
251
|
+
let serverPath = ''
|
|
252
|
+
if (fileSetObj) {
|
|
253
|
+
if (fileSetObj.showNameData) {
|
|
254
|
+
if (isSql) {
|
|
255
|
+
if (fileSetObj.showNameData.dbName) {
|
|
256
|
+
showName = fileSetObj.showNameData.dbName
|
|
257
|
+
}
|
|
258
|
+
} else {
|
|
259
|
+
if (fileSetObj.showNameData.name) {
|
|
260
|
+
showName = fileSetObj.showNameData.name
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
if (fileSetObj.serverNameData) {
|
|
265
|
+
if (isSql) {
|
|
266
|
+
if (fileSetObj.serverNameData.dbName) {
|
|
267
|
+
serverPath = fileSetObj.serverNameData.dbName
|
|
268
|
+
}
|
|
269
|
+
} else {
|
|
270
|
+
if (fileSetObj.serverNameData.name) {
|
|
271
|
+
serverPath = fileSetObj.serverNameData.name
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return {
|
|
277
|
+
showName: showName,
|
|
278
|
+
serverPath: serverPath,
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
formatFileName(fileName) {
|
|
282
|
+
return fileName.replace('#', '~~').replace('?', '~$').replace('&', '$')
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
emits: ['close'],
|
|
286
|
+
}
|
|
287
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Button from './z-test-utton/index.vue'
|
|
2
|
+
import SuperGrid from './super-grid/super-grid.vue'
|
|
3
|
+
import FsPreview from './fs-preview/fs-preview.vue'
|
|
4
|
+
import RichEditor from './rich-editor/index.vue'
|
|
5
|
+
import DynamicSourceSelect from './dynamic-source-select/dynamic-source-select.vue'
|
|
6
|
+
|
|
7
|
+
// 按需引入
|
|
8
|
+
export { Button, SuperGrid, FsPreview, RichEditor, DynamicSourceSelect }
|
|
9
|
+
|
|
10
|
+
const component = [
|
|
11
|
+
Button,
|
|
12
|
+
SuperGrid,
|
|
13
|
+
FsPreview,
|
|
14
|
+
RichEditor,
|
|
15
|
+
DynamicSourceSelect,
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
const MukUI = {
|
|
19
|
+
install(App) {
|
|
20
|
+
component.forEach((item) => {
|
|
21
|
+
App.component(item.name, item)
|
|
22
|
+
})
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default MukUI
|