imatrix-ui 2.8.21-dw → 2.8.21
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 +4 -2
- package/packages/breadcrumb/index.js +6 -0
- package/packages/breadcrumb/src/breadcrumb.vue +71 -0
- package/packages/department-tree/index.js +6 -0
- package/packages/department-tree/src/department-tree.vue +108 -0
- package/packages/department-tree-inline/index.js +6 -0
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +402 -0
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +284 -0
- package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
- package/packages/department-tree-inline/src/department-tree-service.js +245 -0
- package/packages/department-tree-inline/src/search-result.vue +176 -0
- package/packages/department-user-tree/index.js +6 -0
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +116 -0
- package/packages/department-user-tree/src/department-user-single-tree.vue +76 -0
- package/packages/department-user-tree/src/department-user-tree.vue +101 -0
- package/packages/department-user-tree-inline/index.js +6 -0
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +626 -0
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +269 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +79 -0
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +230 -0
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +122 -0
- package/packages/department-user-tree-inline/src/search-result.vue +197 -0
- package/packages/directives/prevent-reclick.js +19 -0
- package/packages/dynamic-source-select/index.js +6 -0
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +70 -0
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +440 -0
- package/packages/dynamic-source-select/src/events.js +55 -0
- package/packages/fs-preview/index.js +6 -0
- package/packages/fs-preview/src/fs-preview.vue +226 -0
- package/packages/fs-upload/index.js +6 -0
- package/packages/fs-upload/src/fs-upload-multi.vue +420 -0
- package/packages/fs-upload/src/fs-upload-single.vue +312 -0
- package/packages/fs-upload/src/fs-upload.vue +189 -0
- package/packages/fs-upload/src/see-big-picture.vue +55 -0
- package/packages/fs-upload-list/index.js +6 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +287 -0
- package/packages/hamburger/index.js +6 -0
- package/packages/hamburger/src/hamburger.vue +38 -0
- package/packages/index.js +121 -0
- package/packages/multipart-upload/index.js +6 -0
- package/packages/multipart-upload/src/index.vue +73 -0
- package/packages/multipart-upload/src/multipart-upload-form.vue +297 -0
- package/packages/multipart-upload/src/multipart-upload-list.vue +378 -0
- package/packages/organization-input/index.js +6 -0
- package/packages/organization-input/src/organization-input.vue +542 -0
- package/packages/plugins/export-data-new.js +453 -0
- package/packages/plugins/export-data.js +361 -0
- package/packages/plugins/index.js +15 -0
- package/packages/plugins/public-method.js +43 -0
- package/packages/remove-department/index.js +6 -0
- package/packages/remove-department/src/remove-department.vue +172 -0
- package/packages/remove-department/src/remove-dept-service.js +20 -0
- package/packages/remove-user/index.js +6 -0
- package/packages/remove-user/src/remove-user-service.js +20 -0
- package/packages/remove-user/src/remove-user.vue +195 -0
- package/packages/remove-workgroup/index.js +6 -0
- package/packages/remove-workgroup/src/remove-workgroup-service.js +20 -0
- package/packages/remove-workgroup/src/remove-workgroup.vue +159 -0
- package/packages/rich-editor/index.js +7 -0
- package/packages/rich-editor/index.vue +278 -0
- package/packages/rich-editor/langs/zh-Hans.js +1 -0
- package/packages/rich-editor/viewer.vue +103 -0
- package/packages/scan-code-input/index.js +6 -0
- package/packages/scan-code-input/src/events.js +33 -0
- package/packages/scan-code-input/src/scan-code-input-colse.vue +131 -0
- package/packages/scan-code-input/src/scan-code-input.vue +116 -0
- package/packages/secret-info/index.js +7 -0
- package/packages/secret-info/index.vue +90 -0
- package/packages/super-grid/index.js +7 -0
- package/packages/super-grid/src/apis.js +763 -0
- package/packages/super-grid/src/columns-config.vue +335 -0
- package/packages/super-grid/src/custom-formatter.js +250 -0
- package/packages/super-grid/src/dynamic-input.vue +1279 -0
- package/packages/super-grid/src/eventBus.js +2 -0
- package/packages/super-grid/src/events.js +55 -0
- package/packages/super-grid/src/formValidatorUtil.js +226 -0
- package/packages/super-grid/src/formatter.js +181 -0
- package/packages/super-grid/src/group-column.vue +100 -0
- package/packages/super-grid/src/header-context-menu.vue +87 -0
- package/packages/super-grid/src/index-column.vue +51 -0
- package/packages/super-grid/src/normal-column.vue +769 -0
- package/packages/super-grid/src/public-methods.js +31 -0
- package/packages/super-grid/src/row-operation.vue +161 -0
- package/packages/super-grid/src/search-button.vue +66 -0
- package/packages/super-grid/src/search-condition-input.vue +61 -0
- package/packages/super-grid/src/search-condition-list.vue +59 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +653 -0
- package/packages/super-grid/src/search-form-dialog.vue +79 -0
- package/packages/super-grid/src/search-form-item.vue +386 -0
- package/packages/super-grid/src/search-form-number.vue +38 -0
- package/packages/super-grid/src/search-form-open.vue +162 -0
- package/packages/super-grid/src/search-form-ordinarySearch.vue +188 -0
- package/packages/super-grid/src/search-form.vue +634 -0
- package/packages/super-grid/src/search-methods.js +387 -0
- package/packages/super-grid/src/selection-column.vue +43 -0
- package/packages/super-grid/src/store.js +3 -0
- package/packages/super-grid/src/super-grid-service.js +561 -0
- package/packages/super-grid/src/super-grid.vue +2793 -0
- package/packages/super-grid/src/utils.js +763 -0
- package/packages/super-grid/src/view-image-dialog.vue +130 -0
- package/packages/super-nine-grid/index.js +7 -0
- package/packages/super-nine-grid/src/apis.js +103 -0
- package/packages/super-nine-grid/src/custom-formatter.js +66 -0
- package/packages/super-nine-grid/src/formatter.js +132 -0
- package/packages/super-nine-grid/src/search-form-number.vue +38 -0
- package/packages/super-nine-grid/src/search-form.vue +430 -0
- package/packages/super-nine-grid/src/search-methods.js +134 -0
- package/packages/super-nine-grid/src/store.js +3 -0
- package/packages/super-nine-grid/src/super-grid-service.js +91 -0
- package/packages/super-nine-grid/src/super-nine-grid.vue +872 -0
- package/packages/super-nine-grid/src/utils.js +261 -0
- package/packages/svg-icon/index.js +6 -0
- package/packages/svg-icon/src/svg-icon.vue +43 -0
- package/packages/utils/utils.js +152 -0
- package/packages/utils/value-set.js +86 -0
- package/packages/valid-code/index.js +7 -0
- package/packages/valid-code/src/valid-code.vue +95 -0
- package/packages/workflow-button/index.js +6 -0
- package/packages/workflow-button/src/workflow-button.vue +325 -0
- package/packages/workflow-history-list/index.js +6 -0
- package/packages/workflow-history-list/src/api.js +7 -0
- package/packages/workflow-history-list/src/workflow-history-list.vue +185 -0
- package/packages/workgroup-tree/index.js +6 -0
- package/packages/workgroup-tree/src/workgroup-tree.vue +76 -0
- package/packages/workgroup-tree-inline/index.js +6 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +317 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +43 -0
- package/packages/workgroup-user-tree/index.js +6 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
- package/packages/workgroup-user-tree-inline/index.js +6 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +163 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +436 -0
- package/packages/year-range-picker/index.js +6 -0
- package/packages/year-range-picker/src/year-range-picker.vue +51 -0
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +4 -2
- package/src/i18n/langs/en.js +4 -2
- package/src/index.js +93 -0
- package/src/permission.js +7 -3
- package/src/plugins.js +3 -3
- package/src/router/index.js +24 -0
- package/src/store/getters.js +2 -1
- package/src/store/modules/app.js +10 -1
- package/src/styles/display-layout.scss +34 -0
- package/src/styles/index.scss +32 -4
- package/src/styles/theme/dark-blue/button.scss +9 -0
- package/src/styles/theme/dark-blue/card.scss +64 -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 +247 -0
- package/src/styles/theme/dark-blue/input.scss +15 -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 +296 -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/form-style.scss +2 -2
- package/src/styles/theme/gray/input-style.scss +8 -0
- package/src/utils/auth-api.js +115 -0
- package/src/utils/auth.js +34 -42
- package/src/utils/calculator/calculator-factory.js +2 -2
- package/src/utils/common-util.js +34 -0
- package/src/utils/jump-page-utils.js +29 -5
- package/src/utils/menu.js +19 -0
- package/src/utils/permission.js +4 -0
- package/src/utils/request.js +18 -2
- package/src/utils/util.js +7 -3
- package/src/views/dsc-component/Sidebar/Item.vue +4 -4
- package/src/views/dsc-component/Sidebar/Link.vue +11 -2
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +36 -20
- package/src/views/dsc-component/Sidebar/index.vue +24 -12
- package/src/views/dsc-component/tabs/tab-content.vue +16 -1
- package/src/views/login/index.vue +1 -1
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
<!-- 文件上传 -->
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<template v-if="!disabled">
|
|
5
|
+
<el-input
|
|
6
|
+
ref="item"
|
|
7
|
+
:readonly="true"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
:value="value"
|
|
10
|
+
:placeholder="$t('imatrixUIMessage.fileUpload')"
|
|
11
|
+
>
|
|
12
|
+
<el-button v-if="!disabled" slot="append" size="mini" icon="el-icon-upload2" @click="openAnnexUpload" />
|
|
13
|
+
<el-button slot="append" size="mini" icon="el-icon-zoom-in" @click="preview" />
|
|
14
|
+
</el-input>
|
|
15
|
+
|
|
16
|
+
<el-dialog
|
|
17
|
+
:title="$t('imatrixUIMessage.tips')"
|
|
18
|
+
:visible.sync="annexUploadFlag"
|
|
19
|
+
:append-to-body="true"
|
|
20
|
+
:show-close="true"
|
|
21
|
+
width="30%"
|
|
22
|
+
>
|
|
23
|
+
<el-upload
|
|
24
|
+
v-if="annexUploadFlag"
|
|
25
|
+
:action="defaultAction"
|
|
26
|
+
:accept="fileSetObj.accept?fileSetObj.accept:null"
|
|
27
|
+
:on-success="uploadOnSuccess"
|
|
28
|
+
:headers="headers"
|
|
29
|
+
:before-upload="handleBeforeUpload"
|
|
30
|
+
:with-credentials="true"
|
|
31
|
+
name="file"
|
|
32
|
+
>
|
|
33
|
+
<el-button>{{ $t('imatrixUIMessage.upload') }}</el-button>
|
|
34
|
+
</el-upload>
|
|
35
|
+
</el-dialog>
|
|
36
|
+
<el-dialog
|
|
37
|
+
:append-to-body="true"
|
|
38
|
+
:show-close="true"
|
|
39
|
+
:title="$t('imatrixUIPublicModel.previewImage')"
|
|
40
|
+
:visible.sync="showPreviewSingleImage"
|
|
41
|
+
@close="$emit('close')"
|
|
42
|
+
>
|
|
43
|
+
<span slot="title">{{ $t('imatrixUIPublicModel.previewImage') }}
|
|
44
|
+
<!-- <i v-if="downloadable" class="el-icon-download" style="padding-left:5px;cursor:pointer;color:#409EFF" @click="downloadFile()" /> -->
|
|
45
|
+
<!-- <i v-if="deleteable" class="el-icon-delete" style="padding-left:5px;cursor:pointer;color:#F56C6C" @click="deleteFile()" /> -->
|
|
46
|
+
</span>
|
|
47
|
+
<el-image v-if="previewImageInfo&&previewImageInfo.isImg" :preview-src-list="[previewImageInfo.src]" :src="previewImageInfo.src" />
|
|
48
|
+
</el-dialog>
|
|
49
|
+
<el-dialog
|
|
50
|
+
:append-to-body="true"
|
|
51
|
+
:show-close="true"
|
|
52
|
+
:title="$t('imatrixUIPublicModel.preview')"
|
|
53
|
+
:visible.sync="showPreviewMulti"
|
|
54
|
+
width="30%"
|
|
55
|
+
@close="$emit('close')"
|
|
56
|
+
>
|
|
57
|
+
<span slot="title">{{ $t('imatrixUIPublicModel.preview') }}
|
|
58
|
+
<!-- <i v-if="downloadable" class="el-icon-download" style="padding-left:5px;cursor:pointer;color:#409EFF" @click="downloadFile()" /> -->
|
|
59
|
+
<!-- <i v-if="deleteable" class="el-icon-delete" style="padding-left:5px;cursor:pointer;color:#F56C6C" @click="deleteFile()" /> -->
|
|
60
|
+
</span>
|
|
61
|
+
<el-table
|
|
62
|
+
:show-header="false"
|
|
63
|
+
:data="showFileList"
|
|
64
|
+
>
|
|
65
|
+
<el-table-column
|
|
66
|
+
width="300"
|
|
67
|
+
prop="showName"
|
|
68
|
+
/>
|
|
69
|
+
<el-table-column align="right">
|
|
70
|
+
<template slot-scope="scope">
|
|
71
|
+
<el-tooltip :content="$t('imatrixUIPublicModel.preview')" class="item" effect="dark" placement="top">
|
|
72
|
+
<i class="el-icon-view" style="cursor:pointer;" @click="previewSingle(scope.row)" />
|
|
73
|
+
</el-tooltip>
|
|
74
|
+
</template>
|
|
75
|
+
</el-table-column>
|
|
76
|
+
<el-table-column v-if="!disabled">
|
|
77
|
+
<template slot-scope="scope">
|
|
78
|
+
<el-tooltip :content="$t('imatrixUIPublicModel.delete')" class="item" effect="dark" placement="top">
|
|
79
|
+
<i class="el-icon-delete" style="cursor:pointer;" @click="deleteRow(scope.$index)" />
|
|
80
|
+
</el-tooltip>
|
|
81
|
+
</template>
|
|
82
|
+
</el-table-column>
|
|
83
|
+
</el-table>
|
|
84
|
+
</el-dialog>
|
|
85
|
+
</template>
|
|
86
|
+
<template v-else>
|
|
87
|
+
<fs-preview :label="value" :entity="row" :is-sql="isSql" :file-set-obj="fileSetObj" />
|
|
88
|
+
</template>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
|
|
92
|
+
<script>
|
|
93
|
+
|
|
94
|
+
import { getToken } from '../../../src/utils/auth'
|
|
95
|
+
import { isImage } from '../../../src/utils/util'
|
|
96
|
+
import { isPlateSys, getSystemFrontendUrl } from '../../../src/utils/common-util'
|
|
97
|
+
import Vue from 'vue'
|
|
98
|
+
import FsPreview from '../../fs-preview/src/fs-preview.vue'
|
|
99
|
+
import { packageFile } from '../../super-grid/src/utils'
|
|
100
|
+
export default {
|
|
101
|
+
name: 'FsUploadList',
|
|
102
|
+
components: {
|
|
103
|
+
FsPreview
|
|
104
|
+
|
|
105
|
+
},
|
|
106
|
+
props: {
|
|
107
|
+
value: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: null
|
|
110
|
+
},
|
|
111
|
+
// name ','分隔的名称 和serverPath
|
|
112
|
+
fileInfo: {
|
|
113
|
+
type: Object,
|
|
114
|
+
default: () => {
|
|
115
|
+
return {
|
|
116
|
+
name: null,
|
|
117
|
+
serverPath: null
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
fileSetObj: {
|
|
122
|
+
type: Object,
|
|
123
|
+
default: () => {
|
|
124
|
+
return { limitFileSize: 30, multiple: false, accept: null }
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
customViewUrl: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: false
|
|
130
|
+
},
|
|
131
|
+
disabled: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: false
|
|
134
|
+
},
|
|
135
|
+
uploadAble: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
default: true
|
|
138
|
+
},
|
|
139
|
+
deletaAble: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
default: true
|
|
142
|
+
},
|
|
143
|
+
// 文件详细消息
|
|
144
|
+
fileList: {
|
|
145
|
+
type: Array,
|
|
146
|
+
default: () => {
|
|
147
|
+
return []
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
row: {
|
|
151
|
+
type: Object,
|
|
152
|
+
default: () => {
|
|
153
|
+
return { }
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
isSql: {
|
|
157
|
+
type: Boolean,
|
|
158
|
+
default: false
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
data() {
|
|
162
|
+
const headers = { Authorization: getToken() }
|
|
163
|
+
let defaultAction = Vue.prototype.baseURL + '/common/fs-upload'
|
|
164
|
+
if (isPlateSys(Vue.prototype.systemCode)) {
|
|
165
|
+
defaultAction = Vue.prototype.baseAPI + '/component/super-form/uploads'
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
deleteUuids: [],
|
|
169
|
+
headers,
|
|
170
|
+
defaultAction,
|
|
171
|
+
annexUploadFlag: false,
|
|
172
|
+
showPreviewSingleImage: false,
|
|
173
|
+
showPreviewMulti: false,
|
|
174
|
+
lastFileName: null,
|
|
175
|
+
previewImageInfo: {},
|
|
176
|
+
showFileList: this.fileList
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
created() {
|
|
180
|
+
},
|
|
181
|
+
mounted() {
|
|
182
|
+
},
|
|
183
|
+
methods: {
|
|
184
|
+
openAnnexUpload() {
|
|
185
|
+
this.annexUploadFlag = true
|
|
186
|
+
},
|
|
187
|
+
handleBeforeUpload(file) {
|
|
188
|
+
let limitFileSize = this.fileSetObj.limitFileSize
|
|
189
|
+
if (limitFileSize === undefined) {
|
|
190
|
+
// 默认是30M
|
|
191
|
+
limitFileSize = 30
|
|
192
|
+
}
|
|
193
|
+
if (file.size > limitFileSize * 1024 * 1024) {
|
|
194
|
+
// 超过最大限制
|
|
195
|
+
this.$message({
|
|
196
|
+
type: 'warning',
|
|
197
|
+
message: this.$t('imatrixUIMessage.exceedFileSize', { fileSize: limitFileSize }),
|
|
198
|
+
showClose: true
|
|
199
|
+
})
|
|
200
|
+
// 返回false停止上传
|
|
201
|
+
return false
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
// 上传成功
|
|
205
|
+
uploadOnSuccess(response, file) {
|
|
206
|
+
if (response) {
|
|
207
|
+
this.$emit('upload-success', { showName: response.name, serverPath: response.serverPath })
|
|
208
|
+
if (this.fileSetObj.multiple) {
|
|
209
|
+
if (this.fileInfo.showName) {
|
|
210
|
+
this.fileInfo.showName = this.fileInfo.showName + ',' + response.name
|
|
211
|
+
this.fileInfo.serverPath = this.fileInfo.serverPath + ',' + response.serverPath
|
|
212
|
+
} else {
|
|
213
|
+
this.fileInfo.showName = response.name
|
|
214
|
+
this.fileInfo.serverPath = response.serverPath
|
|
215
|
+
}
|
|
216
|
+
} else {
|
|
217
|
+
this.fileInfo.showName = response.name
|
|
218
|
+
this.fileInfo.serverPath = response.serverPath
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
this.annexUploadFlag = false
|
|
222
|
+
},
|
|
223
|
+
preview() {
|
|
224
|
+
this.fileList.length = 0
|
|
225
|
+
const uuids = this.fileInfo.serverPath.split(',')
|
|
226
|
+
this.$http.post(Vue.prototype.baseURL + '/common/fs-upload/search-file-names', uuids).then(result => {
|
|
227
|
+
uuids.forEach(uuid => {
|
|
228
|
+
this.fileList.push({ showName: result[uuid], serverPath: uuid })
|
|
229
|
+
})
|
|
230
|
+
this.showFileList = this.fileList
|
|
231
|
+
this.showPreviewMulti = true
|
|
232
|
+
})
|
|
233
|
+
},
|
|
234
|
+
previewSingle(fileInfo) {
|
|
235
|
+
fileInfo = packageFile(fileInfo.showName, fileInfo.serverPath)
|
|
236
|
+
if (isImage(fileInfo.showName)) {
|
|
237
|
+
this.previewImageInfo = fileInfo
|
|
238
|
+
this.showPreviewSingleImage = true
|
|
239
|
+
} else {
|
|
240
|
+
this.previewDoc(fileInfo)
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
previewDoc(file) {
|
|
244
|
+
const showName = file.showName.replace('#', '~~').replace('?', '~$').replace('&', '$')
|
|
245
|
+
const token = getToken()
|
|
246
|
+
let previewUrl = Vue.prototype.baseURL + '/common/fs-upload/preview?jwt=' + token
|
|
247
|
+
if (isPlateSys(Vue.prototype.systemCode)) {
|
|
248
|
+
previewUrl = Vue.prototype.baseAPI + '/component/fs-upload/preview?jwt=' + token
|
|
249
|
+
}
|
|
250
|
+
if (Vue.prototype.customPreviewUrl) {
|
|
251
|
+
window.open(getSystemFrontendUrl(Vue.prototype.portalUrl) + '/#/file-service/preview?serverPath=' + file.serverPath +
|
|
252
|
+
'&showName=' + encodeURI(showName),
|
|
253
|
+
file.showName
|
|
254
|
+
)
|
|
255
|
+
} else {
|
|
256
|
+
window.open(previewUrl + '&showName=' + encodeURI(showName) + '&serverPath=' + file.serverPath)
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
deleteRow(index) {
|
|
260
|
+
const deleteFile = this.showFileList[index]
|
|
261
|
+
// this.fileList.splice(index, 1)
|
|
262
|
+
const nameArr = []
|
|
263
|
+
const pathArr = []
|
|
264
|
+
for (let i = 0; i < this.showFileList.length; i++) {
|
|
265
|
+
if (i !== index) {
|
|
266
|
+
nameArr.push(this.showFileList[i].showName)
|
|
267
|
+
pathArr.push(this.showFileList[i].serverPath)
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (nameArr.length === 0) {
|
|
271
|
+
this.fileInfo.showName = null
|
|
272
|
+
this.fileInfo.serverPath = null
|
|
273
|
+
this.showFileList = []
|
|
274
|
+
this.$emit('delete-success', { deleteFile: deleteFile, all: [] })
|
|
275
|
+
this.$emit('delete', [], index)
|
|
276
|
+
} else {
|
|
277
|
+
this.fileInfo.showName = nameArr.join(',')
|
|
278
|
+
this.fileInfo.serverPath = pathArr.join(',')
|
|
279
|
+
this.$emit('delete-success', { deleteFile: deleteFile, all: this.showFileList })
|
|
280
|
+
this.$emit('delete', this.showFileList, index)
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
</script>
|
|
286
|
+
|
|
287
|
+
<style scoped></style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="00-Color/9-gray">
|
|
3
|
+
<i v-if="isActive" class="el-icon-s-fold" @click="toggleClick" />
|
|
4
|
+
<i v-else class="el-icon-s-unfold" @click="toggleClick" />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
name: 'Hamburger',
|
|
11
|
+
props: {
|
|
12
|
+
isActive: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
methods: {
|
|
18
|
+
toggleClick() {
|
|
19
|
+
this.$emit('toggleClick')
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style scoped>
|
|
26
|
+
.hamburger {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
width: 14px;
|
|
30
|
+
height: 14px;
|
|
31
|
+
transform: rotate(90deg);
|
|
32
|
+
transition: .38s;
|
|
33
|
+
transform-origin: 50% 50%;
|
|
34
|
+
}
|
|
35
|
+
.hamburger.is-active {
|
|
36
|
+
transform: rotate(0deg);
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// 依次导入组件库的各个组件
|
|
2
|
+
import Breadcrumb from './breadcrumb'
|
|
3
|
+
import DepartmentTree from './department-tree'
|
|
4
|
+
import Hamburger from './hamburger'
|
|
5
|
+
import SvgIcon from './svg-icon'
|
|
6
|
+
import SuperGrid from './super-grid'
|
|
7
|
+
import DepartmentUserTree from './department-user-tree'
|
|
8
|
+
import WorkgroupTree from './workgroup-tree'
|
|
9
|
+
import WorkgroupUserTree from './workgroup-user-tree'
|
|
10
|
+
import InlineDepartmentTree from './department-tree-inline'
|
|
11
|
+
import InlineDepartmentUserTree from './department-user-tree-inline'
|
|
12
|
+
import InlineWorkgroupTree from './workgroup-tree-inline'
|
|
13
|
+
import InlineWorkgroupUserTree from './workgroup-user-tree-inline'
|
|
14
|
+
import WorkflowButton from './workflow-button'
|
|
15
|
+
import WorkflowHistoryList from './workflow-history-list'
|
|
16
|
+
import PreventReclick from './directives/prevent-reclick'
|
|
17
|
+
// import exportPlugin from './export-data/index'
|
|
18
|
+
import ValidCode from './valid-code'
|
|
19
|
+
import customPlugin from './plugins/index'
|
|
20
|
+
import RemoveUser from './remove-user'
|
|
21
|
+
import RemoveDepartment from './remove-department'
|
|
22
|
+
import RemoveWorkgroup from './remove-workgroup'
|
|
23
|
+
import OrganizationInput from './organization-input'
|
|
24
|
+
import SuperNineGrid from './super-nine-grid'
|
|
25
|
+
import DynamicSourceSelect from './dynamic-source-select'
|
|
26
|
+
import FsUpload from './fs-upload'
|
|
27
|
+
import ScanCodeInput from './scan-code-input'
|
|
28
|
+
import FsPreview from './fs-preview'
|
|
29
|
+
import FsUploadList from './fs-upload-list'
|
|
30
|
+
import { openPage } from '../src/utils/jump-page-utils'
|
|
31
|
+
import YearRangePicker from './year-range-picker'
|
|
32
|
+
import MultipartUpload from './multipart-upload'
|
|
33
|
+
import RichEditor from './rich-editor'
|
|
34
|
+
import SecretInfo from './secret-info'
|
|
35
|
+
// 将所有组件都存储起来,方便后续统一注册
|
|
36
|
+
const components = [
|
|
37
|
+
Breadcrumb,
|
|
38
|
+
DepartmentTree,
|
|
39
|
+
Hamburger,
|
|
40
|
+
SvgIcon,
|
|
41
|
+
SuperGrid,
|
|
42
|
+
DepartmentUserTree,
|
|
43
|
+
WorkgroupTree,
|
|
44
|
+
WorkgroupUserTree,
|
|
45
|
+
InlineDepartmentTree,
|
|
46
|
+
InlineDepartmentUserTree,
|
|
47
|
+
InlineWorkgroupTree,
|
|
48
|
+
InlineWorkgroupUserTree,
|
|
49
|
+
WorkflowButton,
|
|
50
|
+
WorkflowHistoryList,
|
|
51
|
+
ValidCode,
|
|
52
|
+
RemoveUser,
|
|
53
|
+
RemoveDepartment,
|
|
54
|
+
RemoveWorkgroup,
|
|
55
|
+
OrganizationInput,
|
|
56
|
+
SuperNineGrid,
|
|
57
|
+
DynamicSourceSelect,
|
|
58
|
+
FsUpload,
|
|
59
|
+
ScanCodeInput,
|
|
60
|
+
FsPreview,
|
|
61
|
+
FsUploadList,
|
|
62
|
+
YearRangePicker,
|
|
63
|
+
MultipartUpload,
|
|
64
|
+
RichEditor,
|
|
65
|
+
SecretInfo
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
69
|
+
const install = function(Vue) {
|
|
70
|
+
Vue.directive('prevent-reclick', PreventReclick)
|
|
71
|
+
Vue.use(customPlugin)
|
|
72
|
+
if (install.installed) return
|
|
73
|
+
// components.map(component => Vue.component(component.name, component))
|
|
74
|
+
components.forEach(component => {
|
|
75
|
+
Vue.component(component.name, component)
|
|
76
|
+
})
|
|
77
|
+
// 将弹出页面方法注册到window对象上
|
|
78
|
+
window['$plateform_openPage'] = openPage
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// 判断是否是直接引入vue的js文件,即全局引用可自动安装所有组件
|
|
82
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
83
|
+
install(window.Vue)
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
Breadcrumb,
|
|
87
|
+
DepartmentTree,
|
|
88
|
+
Hamburger,
|
|
89
|
+
SvgIcon,
|
|
90
|
+
SuperGrid,
|
|
91
|
+
DepartmentUserTree,
|
|
92
|
+
WorkgroupTree,
|
|
93
|
+
WorkgroupUserTree,
|
|
94
|
+
InlineDepartmentTree,
|
|
95
|
+
InlineDepartmentUserTree,
|
|
96
|
+
InlineWorkgroupTree,
|
|
97
|
+
InlineWorkgroupUserTree,
|
|
98
|
+
WorkflowButton,
|
|
99
|
+
WorkflowHistoryList,
|
|
100
|
+
ValidCode,
|
|
101
|
+
RemoveUser,
|
|
102
|
+
RemoveDepartment,
|
|
103
|
+
RemoveWorkgroup,
|
|
104
|
+
OrganizationInput,
|
|
105
|
+
SuperNineGrid,
|
|
106
|
+
DynamicSourceSelect,
|
|
107
|
+
FsUpload,
|
|
108
|
+
ScanCodeInput,
|
|
109
|
+
FsPreview,
|
|
110
|
+
FsUploadList,
|
|
111
|
+
YearRangePicker,
|
|
112
|
+
MultipartUpload,
|
|
113
|
+
RichEditor,
|
|
114
|
+
SecretInfo
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export default {
|
|
118
|
+
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
119
|
+
install,
|
|
120
|
+
...components
|
|
121
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<!-- 文件上传 -->
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<MultipartUploadForm v-if="type==='form'" />
|
|
5
|
+
<MultipartUploadList
|
|
6
|
+
v-else
|
|
7
|
+
:disabled="disabled"
|
|
8
|
+
:entity="entity"
|
|
9
|
+
:value="value"
|
|
10
|
+
:file-set-obj="fileSetObj"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import MultipartUploadList from './multipart-upload-list.vue'
|
|
17
|
+
import MultipartUploadForm from './multipart-upload-form.vue'
|
|
18
|
+
export default {
|
|
19
|
+
name: 'MultipartUpload',
|
|
20
|
+
components: {
|
|
21
|
+
MultipartUploadList,
|
|
22
|
+
MultipartUploadForm
|
|
23
|
+
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
type: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: 'form'
|
|
29
|
+
},
|
|
30
|
+
value: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: null
|
|
33
|
+
},
|
|
34
|
+
entity: {
|
|
35
|
+
type: Object,
|
|
36
|
+
default: null
|
|
37
|
+
},
|
|
38
|
+
fileSetObj: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: () => {
|
|
41
|
+
return { limitFileSize: 30, multiple: false, accept: null }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
disabled: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
uploadAble: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true
|
|
51
|
+
},
|
|
52
|
+
deletaAble: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
data() {
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
created() {
|
|
63
|
+
console.log(this.fileSetObj, 'fileSetObj')
|
|
64
|
+
console.log(this.entity, 'entity')
|
|
65
|
+
},
|
|
66
|
+
mounted() {
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style scoped></style>
|