agilebuilder-ui 1.0.76 → 1.0.78
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.js +80259 -78822
- package/lib/super-ui.umd.cjs +103 -103
- package/package.json +1 -1
- package/packages/department-tree/src/department-tree.vue +0 -1
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +15 -15
- package/packages/department-user-tree/src/department-user-tree.vue +1 -0
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +17 -19
- package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +0 -11
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +5 -5
- package/packages/fs-upload-list/src/fs-upload-list.vue +179 -119
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +2 -6
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +2 -6
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +2 -2
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +1 -6
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +0 -6
- package/packages/fs-upload-new/src/fs-upload-new.vue +15 -13
- package/packages/index.js +8 -2
- package/packages/organization-input/src/organization-input.vue +3 -0
- package/packages/plugins/export-data-new.js +34 -1
- package/packages/scan-code-input/src/scan-code-input.vue +136 -104
- package/packages/scan-code-input-browser/index.js +6 -0
- package/packages/{scan-code-input/src/scan-code-input-colse.vue → scan-code-input-browser/src/scan-code-input.vue} +1 -28
- package/packages/super-grid/src/apis.js +12 -0
- package/packages/super-grid/src/dynamic-input.vue +236 -14
- package/packages/super-grid/src/normal-column.vue +37 -2
- package/packages/super-grid/src/scan-util.ts +243 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +3 -1
- package/packages/super-grid/src/search-form-item.vue +4 -2
- package/packages/super-grid/src/super-grid-service.js +2 -1
- package/packages/super-grid/src/super-grid.vue +19 -0
- package/packages/super-grid/src/utils.js +9 -0
- package/packages/workgroup-tree/src/workgroup-tree.vue +31 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +28 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +26 -0
- package/packages/workgroup-tree-mobile/index.js +6 -0
- package/packages/workgroup-tree-mobile/src/dept-result.vue +51 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +120 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +375 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-service.ts +62 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +15 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +27 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +11 -0
- package/packages/workgroup-user-tree-mobile/index.js +6 -0
- package/packages/workgroup-user-tree-mobile/src/dept-path.vue +36 -0
- package/packages/workgroup-user-tree-mobile/src/dept-result.vue +58 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue +119 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue +394 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-service.ts +41 -0
- package/src/i18n/langs/cn.js +3 -1
- package/src/i18n/langs/en.js +3 -1
- package/src/utils/common-util.js +18 -2
- package/src/utils/permissionAuth.js +1 -1
- package/src/views/layout/EmptyLayout.vue +1 -44
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</el-col>
|
|
19
19
|
</el-row>
|
|
20
20
|
</el-card>
|
|
21
|
-
<el-card v-if="tenantName" class="card-content"
|
|
21
|
+
<el-card v-if="tenantName" class="card-content" >
|
|
22
22
|
<el-row class="item-row item-row-all">
|
|
23
23
|
<el-col class="item-label dept-path"><deptPath :tenantName="tenantName" :clickDepts="clickDepts" @clickBreadcrumb="clickBreadcrumb"/></el-col>
|
|
24
24
|
</el-row>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</template>
|
|
45
45
|
</el-tree>
|
|
46
46
|
</el-card>
|
|
47
|
-
<el-card class="card-footer"
|
|
47
|
+
<el-card class="card-footer">
|
|
48
48
|
<div style="display: flex;">
|
|
49
49
|
<div class="select-result" @click="showResult">
|
|
50
50
|
<!-- 已选择:6人,其中有一个部门(含子部门) -->
|
|
@@ -166,17 +166,19 @@ function resizeScrollTargetHeight () {
|
|
|
166
166
|
}
|
|
167
167
|
// 点击复选框时处理
|
|
168
168
|
function handleCheckNode(data, check, isChildrenCheck) {
|
|
169
|
-
if(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
169
|
+
if(props.multiple) {
|
|
170
|
+
if(check) {
|
|
171
|
+
// 表示选择节点时
|
|
172
|
+
addToSelectDept(data)
|
|
173
|
+
} else {
|
|
174
|
+
// 表示取消选择
|
|
175
|
+
removeSelectDept(data)
|
|
176
|
+
}
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
function handleClickNode(data, node, treenode, events) {
|
|
179
|
-
if(data.nodeType && data.nodeType === 'DEPARTMENT') {
|
|
181
|
+
if(!props.multiple && data.nodeType && data.nodeType === 'DEPARTMENT') {
|
|
180
182
|
selectDepts.value = [data]
|
|
181
183
|
}
|
|
182
184
|
}
|
|
@@ -184,7 +186,7 @@ function handleClickNode(data, node, treenode, events) {
|
|
|
184
186
|
|
|
185
187
|
function addToSelectDept(dept) {
|
|
186
188
|
if(dept.nodeType && dept.nodeType === 'DEPARTMENT') {
|
|
187
|
-
const filterValue = selectDepts.value.filter(item=> item.nodeId === dept.nodeId)
|
|
189
|
+
const filterValue = selectDepts.value.filter(item=> (item.nodeId === dept.nodeId))
|
|
188
190
|
if(!filterValue || filterValue.length === 0) {
|
|
189
191
|
// 表示集合中没有该记录,需要记录到结果集合中
|
|
190
192
|
selectDepts.value.push(JSON.parse(JSON.stringify(dept)))
|
|
@@ -193,7 +195,7 @@ function addToSelectDept(dept) {
|
|
|
193
195
|
}
|
|
194
196
|
|
|
195
197
|
function removeSelectDept(dept) {
|
|
196
|
-
const index = selectDepts.value.findIndex(selectItem=> selectItem.nodeId === dept.nodeId)
|
|
198
|
+
const index = selectDepts.value.findIndex(selectItem=> (selectItem.nodeId === dept.nodeId))
|
|
197
199
|
// 删除指定元素
|
|
198
200
|
selectDepts.value.splice(index, 1)
|
|
199
201
|
checkAll.value =false
|
|
@@ -251,7 +253,7 @@ function showResult() {
|
|
|
251
253
|
}
|
|
252
254
|
|
|
253
255
|
function removeResultDept(dept) {
|
|
254
|
-
const removeDeptInDepts =
|
|
256
|
+
const removeDeptInDepts = selectDepts.value.filter(item=>item.nodeId === dept.nodeId)
|
|
255
257
|
if(removeDeptInDepts && removeDeptInDepts.length > 0) {
|
|
256
258
|
// departments结果存在当前移除的节点时,check-change事件会走removeSelectDept的逻辑
|
|
257
259
|
const selectNodeIds = []
|
|
@@ -261,10 +263,8 @@ function removeResultDept(dept) {
|
|
|
261
263
|
}
|
|
262
264
|
})
|
|
263
265
|
orgTreeRef.value.setCheckedKeys(selectNodeIds, true)
|
|
264
|
-
} else {
|
|
265
|
-
// departments结果不存在当前移除的节点时
|
|
266
|
-
removeSelectDept(dept)
|
|
267
266
|
}
|
|
267
|
+
removeSelectDept(dept)
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
function saveDept() {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</el-col>
|
|
19
19
|
</el-row>
|
|
20
20
|
</el-card>
|
|
21
|
-
<el-card v-if="tenantName" class="card-content"
|
|
21
|
+
<el-card v-if="tenantName" class="card-content">
|
|
22
22
|
<el-row class="item-row item-row-all">
|
|
23
23
|
<el-col class="item-label dept-path"><deptPath :tenantName="tenantName" :clickDepts="clickDepts" @clickBreadcrumb="clickBreadcrumb"/></el-col>
|
|
24
24
|
</el-row>
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
</template>
|
|
48
48
|
</el-tree>
|
|
49
49
|
</el-card>
|
|
50
|
-
<el-card class="card-footer"
|
|
50
|
+
<el-card class="card-footer">
|
|
51
51
|
<div style="display: flex;">
|
|
52
52
|
<div class="select-result" >
|
|
53
53
|
<!-- 已选择:{useNum}个用户,{deptNum}个部门(含子部门) -->
|
|
@@ -177,30 +177,31 @@ function resizeScrollTargetHeight () {
|
|
|
177
177
|
}
|
|
178
178
|
// 点击复选框时处理
|
|
179
179
|
function handleCheckNode(data, check, isChildrenCheck) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
180
|
+
if(props.multiple) {
|
|
181
|
+
if(check) {
|
|
182
|
+
// 表示选择节点时
|
|
183
|
+
if(props.multiple) {
|
|
184
|
+
// 表示是复选组织树
|
|
185
|
+
addToSelectDept(data)
|
|
186
|
+
}
|
|
187
|
+
} else {
|
|
188
|
+
// 表示取消选择
|
|
189
|
+
if(props.multiple || (data.nodeType && data.nodeType === 'USER')) {
|
|
190
|
+
removeSelectDept(data)
|
|
191
|
+
}
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
function handleClickNode(data, node, treenode, events) {
|
|
196
|
-
if(data.nodeType && data.nodeType === 'USER') {
|
|
197
|
+
if(!props.multiple && data.nodeType && data.nodeType === 'USER') {
|
|
197
198
|
selectUsers.value = [data]
|
|
198
199
|
}
|
|
199
200
|
}
|
|
200
201
|
function addToSelectDept(dept) {
|
|
201
202
|
if(dept.nodeType && dept.nodeType === 'USER') {
|
|
202
203
|
// 表示是用户
|
|
203
|
-
const filterValue = selectUsers.value.filter(item=> item.nodeId === dept.nodeId)
|
|
204
|
+
const filterValue = selectUsers.value.filter(item=> item.nodeId === dept.nodeId )
|
|
204
205
|
if(!filterValue || filterValue.length === 0) {
|
|
205
206
|
// 表示集合中没有该记录,需要记录到结果集合中
|
|
206
207
|
selectUsers.value.push(JSON.parse(JSON.stringify(dept)))
|
|
@@ -216,7 +217,6 @@ function addToSelectDept(dept) {
|
|
|
216
217
|
}
|
|
217
218
|
|
|
218
219
|
function removeSelectDept(dept) {
|
|
219
|
-
debugger
|
|
220
220
|
if(dept.nodeType && dept.nodeType === 'USER') {
|
|
221
221
|
const index = selectUsers.value.findIndex(selectItem=> selectItem.nodeId === dept.nodeId)
|
|
222
222
|
// 删除指定元素
|
|
@@ -296,10 +296,8 @@ function removeResultDept(dept) {
|
|
|
296
296
|
}
|
|
297
297
|
})
|
|
298
298
|
orgTreeRef.value.setCheckedKeys(selectNodeIds, true)
|
|
299
|
-
} else {
|
|
300
|
-
// departments结果不存在当前移除的节点时
|
|
301
|
-
removeSelectDept(dept)
|
|
302
299
|
}
|
|
300
|
+
removeSelectDept(dept)
|
|
303
301
|
}
|
|
304
302
|
|
|
305
303
|
function saveDept () {
|
|
@@ -49,17 +49,6 @@ export function loadPointDepartments (departmentInfo) {
|
|
|
49
49
|
defaultCheckedKeys.push(dept.nodeId)
|
|
50
50
|
})
|
|
51
51
|
}
|
|
52
|
-
// 获得所有指定父部门的子部门信息
|
|
53
|
-
export function getChildDepts (parentDept) {
|
|
54
|
-
return new Promise((resolve, reject) => {
|
|
55
|
-
const parentIds = [parentDept.id]
|
|
56
|
-
window['$vueApp'].config.globalProperties.$http.post(window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/department-children', parentIds).then(departments => {
|
|
57
|
-
resolve(departments)
|
|
58
|
-
}).catch(error => {
|
|
59
|
-
reject(error)
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
}
|
|
63
52
|
// ,
|
|
64
53
|
// isDeptOrUser (item, dept) {
|
|
65
54
|
// return item.id === dept.id && item.nodeType && dept.nodeType && item.nodeType === dept.nodeType
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
:key="item.value"
|
|
32
32
|
:label="item._label_"
|
|
33
33
|
:title="item._description_?item._label_ + item._description_:item._label_"
|
|
34
|
-
:value="item[valueAttribute]"
|
|
34
|
+
:value="baseProps.multiple && item.value==='saveAll'?item.value:item[valueAttribute]"
|
|
35
35
|
>
|
|
36
36
|
<div style="display: flex">
|
|
37
37
|
<span>{{ item._label_ }}</span>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
:key="item.value"
|
|
49
49
|
:label="item._label_"
|
|
50
50
|
:title="item._description_?item._label_ + item._description_:item._label_"
|
|
51
|
-
:value="item[valueAttribute]"
|
|
51
|
+
:value="baseProps.multiple && item.value==='saveAll'?item.value:item[valueAttribute]"
|
|
52
52
|
>
|
|
53
53
|
<span style="float: left">{{ item._label_ }}</span>
|
|
54
54
|
<span
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
v-for="item in optionItemList"
|
|
72
72
|
:key="item.value"
|
|
73
73
|
:label="item._label_"
|
|
74
|
-
:value="item[valueAttribute]"
|
|
74
|
+
:value="baseProps.multiple && item.value==='saveAll'?item.value:item[valueAttribute]"
|
|
75
75
|
/>
|
|
76
76
|
</div>
|
|
77
77
|
<el-option
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
v-for="item in optionItemList"
|
|
80
80
|
:key="item.value"
|
|
81
81
|
:label="item._label_"
|
|
82
|
-
:value="item[valueAttribute]"
|
|
82
|
+
:value="baseProps.multiple && item.value==='saveAll'?item.value:item[valueAttribute]"
|
|
83
83
|
/>
|
|
84
84
|
</template>
|
|
85
85
|
</el-select>
|
|
@@ -444,7 +444,7 @@ export default {
|
|
|
444
444
|
this.optionItems = dynamicDataSourceDto.options
|
|
445
445
|
let optionsResult = dynamicDataSourceDto.options
|
|
446
446
|
if(this.baseProps.multiple !== undefined && this.baseProps.multiple === true && optionsResult && optionsResult.length > 0){
|
|
447
|
-
const saveAll = {value: 'saveAll',
|
|
447
|
+
const saveAll = {value: 'saveAll', _label_: this.$t('superGrid.selectAll')}
|
|
448
448
|
optionsResult = [saveAll,...optionsResult]
|
|
449
449
|
}
|
|
450
450
|
this.optionItemList = optionsResult
|
|
@@ -1,97 +1,121 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<template v-if="!disabled">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
<template v-if="!isMobile">
|
|
5
|
+
<el-input
|
|
6
|
+
ref="item"
|
|
7
|
+
:disabled="disabled"
|
|
8
|
+
:model-value="value"
|
|
9
|
+
:placeholder="$t('imatrixUIMessage.fileUpload')"
|
|
10
|
+
:readonly="true"
|
|
11
|
+
>
|
|
12
|
+
<template v-slot:append>
|
|
13
|
+
<el-button v-if="!disabled" :icon="ElIconUpload2" size="default" @click="openAnnexUpload" />
|
|
14
|
+
<el-button :icon="ElIconZoomIn" size="default" @click="preview" />
|
|
15
|
+
</template>
|
|
16
|
+
</el-input>
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
<el-dialog
|
|
19
|
+
v-model="annexUploadFlag"
|
|
20
|
+
:append-to-body="true"
|
|
21
|
+
:show-close="true"
|
|
22
|
+
:title="$t('imatrixUIMessage.upload')"
|
|
23
|
+
width="30%"
|
|
24
|
+
>
|
|
25
|
+
<el-upload
|
|
26
|
+
v-if="annexUploadFlag"
|
|
27
|
+
:accept="fileSetObj.accept ? fileSetObj.accept : null"
|
|
28
|
+
:action="defaultAction"
|
|
29
|
+
:multiple="fileSetObj.multiple"
|
|
30
|
+
:before-upload="handleBeforeUpload"
|
|
31
|
+
:headers="headers"
|
|
32
|
+
:on-success="uploadOnSuccess"
|
|
33
|
+
:with-credentials="true"
|
|
34
|
+
name="file"
|
|
35
|
+
>
|
|
36
|
+
<el-button>{{ $t('imatrixUIMessage.upload') }}</el-button>
|
|
37
|
+
</el-upload>
|
|
38
|
+
</el-dialog>
|
|
39
|
+
<el-dialog
|
|
40
|
+
v-model="showPreviewSingleImage"
|
|
41
|
+
:append-to-body="true"
|
|
42
|
+
:show-close="true"
|
|
43
|
+
:title="$t('imatrixUIPublicModel.previewImage')"
|
|
44
|
+
@close="$emit('close')"
|
|
45
|
+
>
|
|
46
|
+
<template v-slot:title>
|
|
47
|
+
<span
|
|
48
|
+
>{{ $t('imatrixUIPublicModel.previewImage') }}
|
|
49
|
+
<!-- <i v-if="downloadable" class="el-icon-download" style="padding-left:5px;cursor:pointer;color:#409EFF" @click="downloadFile()" /> -->
|
|
50
|
+
<!-- <i v-if="deleteable" class="el-icon-delete" style="padding-left:5px;cursor:pointer;color:#F56C6C" @click="deleteFile()" /> -->
|
|
51
|
+
</span>
|
|
52
|
+
</template>
|
|
53
|
+
<el-image
|
|
54
|
+
v-if="previewImageInfo && previewImageInfo.isImg"
|
|
55
|
+
:preview-src-list="[previewImageInfo.src]"
|
|
56
|
+
:src="previewImageInfo.src"
|
|
57
|
+
/>
|
|
58
|
+
</el-dialog>
|
|
59
|
+
<el-dialog
|
|
60
|
+
v-model="showPreviewMulti"
|
|
61
|
+
:append-to-body="true"
|
|
62
|
+
:show-close="true"
|
|
63
|
+
:title="$t('imatrixUIPublicModel.preview')"
|
|
64
|
+
width="30%"
|
|
65
|
+
@close="$emit('close')"
|
|
34
66
|
>
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<el-icon style="cursor: pointer" @click="deleteRow(scope.$index)">
|
|
88
|
-
<el-icon-delete />
|
|
89
|
-
</el-icon>
|
|
90
|
-
</el-tooltip>
|
|
91
|
-
</template>
|
|
92
|
-
</el-table-column>
|
|
93
|
-
</el-table>
|
|
94
|
-
</el-dialog>
|
|
67
|
+
<template v-slot:title>
|
|
68
|
+
<span
|
|
69
|
+
>{{ $t('imatrixUIPublicModel.preview') }}
|
|
70
|
+
<!-- <i v-if="downloadable" class="el-icon-download" style="padding-left:5px;cursor:pointer;color:#409EFF" @click="downloadFile()" /> -->
|
|
71
|
+
<!-- <i v-if="deleteable" class="el-icon-delete" style="padding-left:5px;cursor:pointer;color:#F56C6C" @click="deleteFile()" /> -->
|
|
72
|
+
</span>
|
|
73
|
+
</template>
|
|
74
|
+
<el-table :data="showFileList" :show-header="false">
|
|
75
|
+
<el-table-column prop="showName" width="300" />
|
|
76
|
+
<el-table-column align="right">
|
|
77
|
+
<template v-slot="scope">
|
|
78
|
+
<el-tooltip :content="$t('imatrixUIPublicModel.preview')" class="item" effect="dark" placement="top">
|
|
79
|
+
<el-icon style="cursor: pointer" @click="previewSingle(scope.row)">
|
|
80
|
+
<el-icon-view />
|
|
81
|
+
</el-icon>
|
|
82
|
+
</el-tooltip>
|
|
83
|
+
</template>
|
|
84
|
+
</el-table-column>
|
|
85
|
+
<el-table-column v-if="!disabled">
|
|
86
|
+
<template v-slot="scope">
|
|
87
|
+
<el-tooltip :content="$t('imatrixUIPublicModel.delete')" class="item" effect="dark" placement="top">
|
|
88
|
+
<el-icon style="cursor: pointer" @click="deleteRow(scope.$index)">
|
|
89
|
+
<el-icon-delete />
|
|
90
|
+
</el-icon>
|
|
91
|
+
</el-tooltip>
|
|
92
|
+
</template>
|
|
93
|
+
</el-table-column>
|
|
94
|
+
</el-table>
|
|
95
|
+
</el-dialog>
|
|
96
|
+
</template>
|
|
97
|
+
<FileUploadInputMobile
|
|
98
|
+
v-else
|
|
99
|
+
ref="fileUploadRef"
|
|
100
|
+
:disabled="disabled"
|
|
101
|
+
:fileInfo="fileInfo"
|
|
102
|
+
:systemCode="systemCode"
|
|
103
|
+
:accept="fileSetObj.accept ? fileSetObj.accept : null"
|
|
104
|
+
:multiple="fileSetObj.multiple"
|
|
105
|
+
:limitFileSize="fileSetObj.limitFileSize"
|
|
106
|
+
:placeholder="$t('imatrixUIMessage.fileUpload')"
|
|
107
|
+
:file-list="fileList"
|
|
108
|
+
:beforeUpload="fileSetObj.beforeUpload"
|
|
109
|
+
:onSuccess="uploadOnSuccessMobile"
|
|
110
|
+
:beforeRemove="fileSetObj.beforeRemove"
|
|
111
|
+
:onRemove="onRemoveMobile"
|
|
112
|
+
:beforeDownload="fileSetObj.beforeDownload"
|
|
113
|
+
:pageContext="pageContext"
|
|
114
|
+
:openFsUpload="openFsUpload"
|
|
115
|
+
:componentId="componentId"
|
|
116
|
+
:listCode="listCode"
|
|
117
|
+
:openCameraOrChoosePhoto="fileSetObj.openCameraOrChoosePhoto"
|
|
118
|
+
/>
|
|
95
119
|
</template>
|
|
96
120
|
<template v-else>
|
|
97
121
|
<fs-preview :entity="row" :file-set-obj="fileSetObj" :is-sql="isSql" :label="value" />
|
|
@@ -110,36 +134,13 @@ import { $emit } from '../../utils/gogocodeTransfer'
|
|
|
110
134
|
|
|
111
135
|
import { getToken } from '../../../src/utils/auth'
|
|
112
136
|
import { isImage } from '../../../src/utils/util'
|
|
113
|
-
import { getSystemFrontendUrl, isPlateSys } from '../../../src/utils/common-util'
|
|
137
|
+
import { getSystemFrontendUrl, isPlateSys, isMobileBrowser } from '../../../src/utils/common-util'
|
|
114
138
|
import FsPreview from '../../fs-preview/src/fs-preview.vue'
|
|
115
139
|
import { packageFile } from '../../super-grid/src/utils'
|
|
140
|
+
import FileUploadInputMobile from '../../fs-upload-new/src/file-upload-mobile/file-upload-input.vue'
|
|
141
|
+
|
|
116
142
|
|
|
117
143
|
export default {
|
|
118
|
-
data() {
|
|
119
|
-
const headers = { Authorization: getToken() }
|
|
120
|
-
let defaultAction = window.$vueApp.config.globalProperties.baseURL + '/common/fs-upload'
|
|
121
|
-
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
122
|
-
defaultAction = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/uploads'
|
|
123
|
-
}
|
|
124
|
-
return {
|
|
125
|
-
deleteUuids: [],
|
|
126
|
-
headers,
|
|
127
|
-
defaultAction,
|
|
128
|
-
annexUploadFlag: false,
|
|
129
|
-
showPreviewSingleImage: false,
|
|
130
|
-
showPreviewMulti: false,
|
|
131
|
-
lastFileName: null,
|
|
132
|
-
previewImageInfo: {},
|
|
133
|
-
showFileList: this.fileList,
|
|
134
|
-
ElIconUpload2,
|
|
135
|
-
ElIconZoomIn
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
components: {
|
|
139
|
-
FsPreview,
|
|
140
|
-
ElIconView,
|
|
141
|
-
ElIconDelete
|
|
142
|
-
},
|
|
143
144
|
name: 'FsUploadList',
|
|
144
145
|
props: {
|
|
145
146
|
value: {
|
|
@@ -195,10 +196,52 @@ export default {
|
|
|
195
196
|
type: Boolean,
|
|
196
197
|
default: false
|
|
197
198
|
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
openFsUpload:{
|
|
200
|
+
type: Boolean,
|
|
201
|
+
default: true
|
|
202
|
+
},
|
|
203
|
+
pageContext: {
|
|
204
|
+
type: Object,
|
|
205
|
+
default: () => ({})
|
|
206
|
+
},
|
|
207
|
+
listCode: {
|
|
208
|
+
type: String,
|
|
209
|
+
default: null
|
|
210
|
+
},
|
|
211
|
+
componentId: {
|
|
212
|
+
type: String,
|
|
213
|
+
default: null
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
data() {
|
|
217
|
+
const headers = { Authorization: getToken() }
|
|
218
|
+
let defaultAction = window.$vueApp.config.globalProperties.baseURL + '/common/fs-upload'
|
|
219
|
+
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
220
|
+
defaultAction = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/uploads'
|
|
221
|
+
}
|
|
222
|
+
const isMobile = isMobileBrowser()
|
|
223
|
+
const systemCode = this.pageContext && this.pageContext.systemCode? this.pageContext.systemCode: null
|
|
224
|
+
return {
|
|
225
|
+
deleteUuids: [],
|
|
226
|
+
headers,
|
|
227
|
+
defaultAction,
|
|
228
|
+
annexUploadFlag: false,
|
|
229
|
+
showPreviewSingleImage: false,
|
|
230
|
+
showPreviewMulti: false,
|
|
231
|
+
lastFileName: null,
|
|
232
|
+
previewImageInfo: {},
|
|
233
|
+
showFileList: this.fileList,
|
|
234
|
+
ElIconUpload2,
|
|
235
|
+
ElIconZoomIn,
|
|
236
|
+
isMobile,
|
|
237
|
+
systemCode
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
components: {
|
|
241
|
+
FsPreview,
|
|
242
|
+
ElIconView,
|
|
243
|
+
ElIconDelete,
|
|
244
|
+
FileUploadInputMobile
|
|
202
245
|
},
|
|
203
246
|
created() {},
|
|
204
247
|
mounted() {},
|
|
@@ -351,6 +394,23 @@ export default {
|
|
|
351
394
|
})
|
|
352
395
|
$emit(this, 'delete', this.showFileList, index)
|
|
353
396
|
}
|
|
397
|
+
},
|
|
398
|
+
// 移动端上传成功
|
|
399
|
+
uploadOnSuccessMobile() {
|
|
400
|
+
console.log('uploadOnSuccessMobile-------this.fileList=', this.fileList)
|
|
401
|
+
$emit(this, 'upload-success', this.fileList)
|
|
402
|
+
},
|
|
403
|
+
// 移动端删除附件
|
|
404
|
+
onRemoveMobile(){
|
|
405
|
+
console.log('onRemoveMobile-------this.fileList=', this.fileList)
|
|
406
|
+
$emit(this, 'delete', this.fileList)
|
|
407
|
+
},
|
|
408
|
+
pickFileDone(data){
|
|
409
|
+
console.log('fs-upload-list------pickFileDone-------data=', data)
|
|
410
|
+
this.$refs.fileUploadRef.pickFileDone(data)
|
|
411
|
+
},
|
|
412
|
+
uploadFileDone(data){
|
|
413
|
+
this.$refs.fileUploadRef.uploadFileDone(data)
|
|
354
414
|
}
|
|
355
415
|
},
|
|
356
416
|
emits: ['close', 'upload-success', 'delete-success', 'delete', 'update:value', 'close', 'update:value']
|
|
@@ -124,10 +124,6 @@ const props = defineProps({
|
|
|
124
124
|
return 'file-upload'
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
-
options: {
|
|
128
|
-
type: Object,
|
|
129
|
-
default: null
|
|
130
|
-
},
|
|
131
127
|
// 列表编码
|
|
132
128
|
listCode: {
|
|
133
129
|
type: String,
|
|
@@ -146,8 +142,8 @@ const props = defineProps({
|
|
|
146
142
|
|
|
147
143
|
const fileListResult = ref(props.fileList)
|
|
148
144
|
let baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
149
|
-
if (props.
|
|
150
|
-
baseURL = props.
|
|
145
|
+
if (props.pageContext && props.pageContext.backendUrl) {
|
|
146
|
+
baseURL = props.pageContext.backendUrl
|
|
151
147
|
}
|
|
152
148
|
if (!baseURL) {
|
|
153
149
|
baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
@@ -188,10 +188,6 @@ const props = defineProps({
|
|
|
188
188
|
return 'file-upload'
|
|
189
189
|
}
|
|
190
190
|
},
|
|
191
|
-
options: {
|
|
192
|
-
type: Object,
|
|
193
|
-
default: null
|
|
194
|
-
},
|
|
195
191
|
// 列表编码
|
|
196
192
|
listCode: {
|
|
197
193
|
type: String,
|
|
@@ -211,8 +207,8 @@ const props = defineProps({
|
|
|
211
207
|
const fileListResult = ref(props.fileList)
|
|
212
208
|
|
|
213
209
|
let baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
214
|
-
if (props.
|
|
215
|
-
baseURL = props.
|
|
210
|
+
if (props.pageContext && props.pageContext.backendUrl) {
|
|
211
|
+
baseURL = props.pageContext.backendUrl
|
|
216
212
|
}
|
|
217
213
|
if (!baseURL) {
|
|
218
214
|
baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-upload action="#" list-type="picture-card" :file-list="fileListResult" :auto-upload="false" :disabled="true">
|
|
3
|
-
<template #tip>
|
|
3
|
+
<template v-if="!disabled" #tip>
|
|
4
4
|
<el-text size="small" style="padding: 10px;font-weight: 600"> {{ accept }} {{limitFileSize?$t('imatrixUIMessage.uploadFileTip',{fileSize: limitFileSize}): ''}}</el-text>
|
|
5
5
|
</template>
|
|
6
|
-
<template #trigger>
|
|
6
|
+
<template v-if="!disabled" #trigger>
|
|
7
7
|
<el-icon @click="chooseFile"><Plus /></el-icon>
|
|
8
8
|
</template>
|
|
9
9
|
|