agilebuilder-ui 1.1.45 → 1.1.46-sit2
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/{401-1bde8dc9.js → 401-75472dcd.js} +1 -1
- package/lib/{404-48d76996.js → 404-e5ce8455.js} +1 -1
- package/lib/{iframe-page-77e184a0.js → iframe-page-9d5ce6b0.js} +1 -1
- package/lib/index-789fbe10.js +92825 -0
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +33 -32
- package/lib/super-ui.umd.cjs +172 -133
- package/lib/{tab-content-iframe-index-39745d49.js → tab-content-iframe-index-47fae8cf.js} +1 -1
- package/lib/{tab-content-index-65696e56.js → tab-content-index-6e5f5717.js} +1 -1
- package/lib/{tache-subprocess-history-ef943f95.js → tache-subprocess-history-1ed95cee.js} +1 -1
- package/package.json +7 -2
- package/packages/chat-embed/index.ts +6 -0
- package/packages/chat-embed/src/chat-embed-message.ts +79 -0
- package/packages/chat-embed/src/chat-embed.css +117 -0
- package/packages/chat-embed/src/chat-sender.vue +240 -0
- package/packages/chat-embed/src/header.vue +50 -0
- package/packages/chat-embed/src/index.vue +425 -0
- package/packages/chat-embed/src/recommendation-message.vue +37 -0
- package/packages/chat-embed/src/util.ts +33 -0
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +42 -34
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +53 -42
- package/packages/department-tree-inline/src/search-result.vue +187 -219
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +52 -43
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +52 -42
- package/packages/department-user-tree-inline/src/search-result.vue +207 -220
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +7 -2
- package/packages/empty-state/index.vue +28 -0
- package/packages/fs-preview/src/fs-preview.vue +12 -3
- package/packages/fs-upload/src/fs-upload-multi.vue +6 -4
- package/packages/fs-upload/src/fs-upload-single.vue +7 -6
- package/packages/fs-upload/src/fs-upload.vue +3 -1
- package/packages/fs-upload/src/see-big-picture.vue +3 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +8 -2
- package/packages/fs-upload-new/src/fs-button-upload.vue +11 -4
- package/packages/fs-upload-new/src/fs-drag-upload.vue +11 -4
- package/packages/fs-upload-new/src/fs-preview-new.vue +8 -5
- package/packages/fs-upload-new/src/fs-upload-new.vue +17 -0
- package/packages/index.js +16 -13
- package/packages/json-view/index.ts +3 -0
- package/packages/json-view/json-view-dialog.vue +53 -0
- package/packages/json-view/json-view.vue +126 -0
- package/packages/plugins/export-data-new.js +2 -0
- package/packages/super-grid/src/apis.js +11 -0
- package/packages/super-grid/src/components/grid-icon.vue +6 -3
- package/packages/super-grid/src/custom-formatter.js +15 -2
- package/packages/super-grid/src/dynamic-input.vue +46 -4
- package/packages/super-grid/src/formatter.js +5 -1
- package/packages/super-grid/src/normal-column-content.vue +31 -38
- package/packages/super-grid/src/normal-column.vue +8 -1
- package/packages/super-grid/src/row-operation.vue +13 -9
- package/packages/super-grid/src/super-grid.vue +21 -8
- package/packages/utils/utils.js +26 -9
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +50 -41
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +45 -36
- package/src/assets/chat-embed/avatar.png +0 -0
- package/src/i18n/langs/cn.js +20 -6
- package/src/i18n/langs/en.js +19 -5
- package/src/store/modules/chat-ai-store.ts +78 -0
- package/src/store/modules/tab-content.js +9 -3
- package/src/styles/element-ui.scss +8 -7
- package/src/styles/index.scss +45 -0
- package/src/utils/chat-ai-util.ts +31 -0
- package/src/utils/common-util.js +78 -8
- package/src/utils/insert_css.js +14 -1
- package/src/utils/jump-page-utils.js +8 -4
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +6 -0
- package/src/views/dsc-component/tabs/tab-content.vue +6 -0
- package/lib/index-465b0d69.js +0 -73558
|
@@ -1,80 +1,71 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
circle
|
|
70
|
-
size="default"
|
|
71
|
-
type="danger"
|
|
72
|
-
@click="removeUser(scope.$index, scope.row)"
|
|
73
|
-
/>
|
|
74
|
-
</div>
|
|
75
|
-
</template>
|
|
76
|
-
</el-table-column>
|
|
77
|
-
<!-- <el-table-column
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<el-table
|
|
4
|
+
ref="superGrid"
|
|
5
|
+
:data="gridData"
|
|
6
|
+
:max-height="myHeight"
|
|
7
|
+
:row-class-name="tableRowClassName"
|
|
8
|
+
border
|
|
9
|
+
fit
|
|
10
|
+
row-key="id"
|
|
11
|
+
stripe
|
|
12
|
+
@row-click="rowClick"
|
|
13
|
+
@row-dblclick="rowDblclick"
|
|
14
|
+
>
|
|
15
|
+
<template v-slot:empty>
|
|
16
|
+
<div class="empty_center_area" style="height: 395px">
|
|
17
|
+
<div class="empty_notAvailable" style="width: 120px; height: 120px">
|
|
18
|
+
<span class="empty_notAvailable_text">{{ $t('imatrixUIPromptMessage.NoContent') }}</span>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
<el-table-column v-if="multiple === false" fixed width="60">
|
|
23
|
+
<template v-slot="scope">
|
|
24
|
+
<el-radio v-model="singleUserIndex" :label="scope.$index" @change="selectUser">
|
|
25
|
+
{{ scope.$index + 1 }}
|
|
26
|
+
</el-radio>
|
|
27
|
+
</template>
|
|
28
|
+
</el-table-column>
|
|
29
|
+
<el-table-column
|
|
30
|
+
v-if="multiple && isSearchResult"
|
|
31
|
+
:label="$t('imatrixUIPublicModel.edit')"
|
|
32
|
+
align="center"
|
|
33
|
+
fixed
|
|
34
|
+
width="60px"
|
|
35
|
+
>
|
|
36
|
+
<template v-slot="scope">
|
|
37
|
+
<div>
|
|
38
|
+
<el-button
|
|
39
|
+
:disabled="isDisable(scope.row)"
|
|
40
|
+
:icon="ElIconPlus"
|
|
41
|
+
circle
|
|
42
|
+
size="default"
|
|
43
|
+
type="primary"
|
|
44
|
+
@click="addUser(scope.$index, scope.row)"
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
</el-table-column>
|
|
49
|
+
<el-table-column
|
|
50
|
+
v-if="multiple && !isSearchResult"
|
|
51
|
+
:label="$t('imatrixUIPublicModel.edit')"
|
|
52
|
+
align="center"
|
|
53
|
+
fixed="right"
|
|
54
|
+
width="60px"
|
|
55
|
+
>
|
|
56
|
+
<template v-slot="scope">
|
|
57
|
+
<div>
|
|
58
|
+
<el-button
|
|
59
|
+
:icon="ElIconDelete"
|
|
60
|
+
circle
|
|
61
|
+
size="default"
|
|
62
|
+
type="danger"
|
|
63
|
+
@click="removeUser(scope.$index, scope.row)"
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
</el-table-column>
|
|
68
|
+
<!-- <el-table-column
|
|
78
69
|
v-if="multiple"
|
|
79
70
|
:label="$t('superGrid.index')"
|
|
80
71
|
align="center"
|
|
@@ -84,30 +75,27 @@
|
|
|
84
75
|
{{ scope.$index + 1 }}
|
|
85
76
|
</template>
|
|
86
77
|
</el-table-column> -->
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
</template>
|
|
109
|
-
</el-table-column>
|
|
110
|
-
<!-- <el-table-column
|
|
78
|
+
<el-table-column :label="$t('departmentUserTreeInline.name')" prop="name">
|
|
79
|
+
<template v-slot="scope">
|
|
80
|
+
<div v-if="scope.row.enName && scope.row.enName.trim() !== ''">
|
|
81
|
+
<div :title="scope.row.name + '(' + scope.row.enName + ')' + '[' + scope.row.loginName + ']'">
|
|
82
|
+
<span>{{ scope.row.name + '(' + scope.row.enName + ')' }}[{{ scope.row.loginName }}]</span>
|
|
83
|
+
</div>
|
|
84
|
+
<div style="color: #ccc" :title="getDeptName(scope.row)">
|
|
85
|
+
{{ getDeptName(scope.row) }}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<div v-else>
|
|
89
|
+
<div :title="scope.row.name + '[' + scope.row.loginName + ']'">
|
|
90
|
+
<span>{{ scope.row.name }}[{{ scope.row.loginName }}]</span>
|
|
91
|
+
</div>
|
|
92
|
+
<div style="color: #ccc" :title="getDeptName(scope.row)">
|
|
93
|
+
{{ getDeptName(scope.row) }}
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</template>
|
|
97
|
+
</el-table-column>
|
|
98
|
+
<!-- <el-table-column
|
|
111
99
|
:label="$t('departmentUserTreeInline.loginName')"
|
|
112
100
|
:width="110"
|
|
113
101
|
prop="loginName"
|
|
@@ -139,8 +127,8 @@
|
|
|
139
127
|
>
|
|
140
128
|
</template>
|
|
141
129
|
</el-table-column> -->
|
|
142
|
-
|
|
143
|
-
|
|
130
|
+
<!--由于保密要求,邮箱不能显示,需要脱敏处理,暂时注释掉,不显示-->
|
|
131
|
+
<!-- <el-table-column
|
|
144
132
|
:label="$t('departmentUserTreeInline.email')"
|
|
145
133
|
:width="130"
|
|
146
134
|
prop="email"
|
|
@@ -149,139 +137,138 @@
|
|
|
149
137
|
<span class="ellipsis cell--span" :title="scope.row.email">{{ scope.row.email }}</span>
|
|
150
138
|
</template>
|
|
151
139
|
</el-table-column> -->
|
|
152
|
-
|
|
153
|
-
|
|
140
|
+
</el-table>
|
|
141
|
+
</div>
|
|
154
142
|
</template>
|
|
155
143
|
|
|
156
144
|
<script>
|
|
157
|
-
import {Delete as ElIconDelete, Plus as ElIconPlus} from '@element-plus/icons-vue'
|
|
145
|
+
import { Delete as ElIconDelete, Plus as ElIconPlus } from '@element-plus/icons-vue'
|
|
158
146
|
|
|
159
147
|
export default {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
emits: ['removeUser', 'addUser', 'selectResult', 'resultRowDblclick'],
|
|
148
|
+
data() {
|
|
149
|
+
let tableHeight = this.height
|
|
150
|
+
tableHeight = tableHeight.substring(0, tableHeight.indexOf('px'))
|
|
151
|
+
const myHeight = parseInt(tableHeight) + 30 + 'px'
|
|
152
|
+
return {
|
|
153
|
+
// 选中的用户序号
|
|
154
|
+
singleUserIndex: null,
|
|
155
|
+
selectedUser: null,
|
|
156
|
+
myHeight,
|
|
157
|
+
language: !window.$locale ? 'cn' : window.$locale,
|
|
158
|
+
ElIconPlus,
|
|
159
|
+
ElIconDelete
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
name: 'UserResult',
|
|
163
|
+
props: {
|
|
164
|
+
gridData: {
|
|
165
|
+
type: Array,
|
|
166
|
+
default: null
|
|
167
|
+
},
|
|
168
|
+
containBranch: {
|
|
169
|
+
type: Boolean,
|
|
170
|
+
default: false
|
|
171
|
+
},
|
|
172
|
+
multiple: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: false
|
|
175
|
+
},
|
|
176
|
+
// 多选树时是否是查询结果列表,用于控制“操作”列按钮的显示
|
|
177
|
+
isSearchResult: {
|
|
178
|
+
type: Boolean,
|
|
179
|
+
default: true
|
|
180
|
+
},
|
|
181
|
+
height: {
|
|
182
|
+
type: String,
|
|
183
|
+
default: '300px'
|
|
184
|
+
},
|
|
185
|
+
selectResult: {
|
|
186
|
+
type: Array,
|
|
187
|
+
default: function () {
|
|
188
|
+
return []
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
created() {},
|
|
193
|
+
methods: {
|
|
194
|
+
// 单选树时,点击行事件
|
|
195
|
+
// rowClick(row, column, event) {
|
|
196
|
+
// this.selectedUser = row
|
|
197
|
+
// // this.$emit('rowClick', row, column, event)
|
|
198
|
+
// },
|
|
199
|
+
// 移除用户
|
|
200
|
+
removeUser(index, row) {
|
|
201
|
+
this.$emit('removeUser', index, row)
|
|
202
|
+
},
|
|
203
|
+
// 添加用户
|
|
204
|
+
addUser(index, row) {
|
|
205
|
+
this.$emit('addUser', index, row)
|
|
206
|
+
},
|
|
207
|
+
selectUser(selectVal) {
|
|
208
|
+
// console.log('selectUser', selectVal)
|
|
209
|
+
this.$emit('selectResult', this.gridData[selectVal])
|
|
210
|
+
},
|
|
211
|
+
rowClick(row, column, event) {
|
|
212
|
+
if (!this.multiple) {
|
|
213
|
+
this.singleUserIndex = row.row_index
|
|
214
|
+
this.$emit('selectResult', row)
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
tableRowClassName({ row, rowIndex }) {
|
|
218
|
+
if (!this.multiple) {
|
|
219
|
+
row.row_index = rowIndex
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
rowDblclick(row, column, event) {
|
|
223
|
+
if (this.multiple) {
|
|
224
|
+
this.$emit('addUser', null, row)
|
|
225
|
+
} else {
|
|
226
|
+
this.$emit('resultRowDblclick', row)
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
isDisable(row) {
|
|
230
|
+
if (this.selectResult) {
|
|
231
|
+
const containUsers = this.selectResult.filter(this.filterDept(row))
|
|
232
|
+
if (containUsers && containUsers.length > 0) {
|
|
233
|
+
return true
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return false
|
|
237
|
+
},
|
|
238
|
+
// 判断用户是否存在的过滤器
|
|
239
|
+
filterDept(queryDept) {
|
|
240
|
+
return (dept) => {
|
|
241
|
+
return dept.id === queryDept.id
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
getDeptName(row) {
|
|
245
|
+
let deptName = row.superiorDeptNameFullPath
|
|
246
|
+
if (deptName) {
|
|
247
|
+
return deptName
|
|
248
|
+
}
|
|
249
|
+
if (this.language && this.language !== 'cn') {
|
|
250
|
+
deptName = row.mainDepartmentEnName
|
|
251
|
+
}
|
|
252
|
+
if (deptName) {
|
|
253
|
+
return deptName
|
|
254
|
+
}
|
|
255
|
+
return row.mainDepartmentName
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
emits: ['removeUser', 'addUser', 'selectResult', 'resultRowDblclick']
|
|
272
259
|
}
|
|
273
260
|
</script>
|
|
274
261
|
|
|
275
262
|
<style>
|
|
276
263
|
.searchResult {
|
|
277
|
-
|
|
264
|
+
color: red;
|
|
278
265
|
}
|
|
279
266
|
|
|
280
267
|
.inline-select-custom {
|
|
281
|
-
|
|
268
|
+
width: 100px;
|
|
282
269
|
}
|
|
283
270
|
|
|
284
271
|
.inline-input-custom {
|
|
285
|
-
|
|
272
|
+
width: 98%;
|
|
286
273
|
}
|
|
287
274
|
</style>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getRelativeBaseUrl } from "../../../src/utils/common-util"
|
|
2
|
+
|
|
1
3
|
const dynamicSourceSelectService = {
|
|
2
4
|
findDynamicDataSourceByCode(dynamicSourceCode, entity, searchParam, additionalParameterStr, backendUrl) {
|
|
3
5
|
let searchText
|
|
@@ -62,7 +64,8 @@ const dynamicSourceSelectService = {
|
|
|
62
64
|
if (!backendUrl) {
|
|
63
65
|
backendUrl = window.$vueApp.config.globalProperties.baseURL
|
|
64
66
|
}
|
|
65
|
-
|
|
67
|
+
// 替换域名,内网、外网访问需要
|
|
68
|
+
backendUrl = getRelativeBaseUrl(backendUrl)
|
|
66
69
|
return new Promise((resolve, reject) => {
|
|
67
70
|
// this.$http
|
|
68
71
|
// .post(
|
|
@@ -105,8 +108,10 @@ const dynamicSourceSelectService = {
|
|
|
105
108
|
.then((result) => {
|
|
106
109
|
if (result.backendUrl) {
|
|
107
110
|
// result.backendUrl表示需要使用动态数据源所属的系统路径重新获得一次数据
|
|
111
|
+
// 替换域名,内网、外网访问需要
|
|
112
|
+
const resultBackendUrl = getRelativeBaseUrl(result.backendUrl)
|
|
108
113
|
this.$http
|
|
109
|
-
.post(
|
|
114
|
+
.post(resultBackendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params, {
|
|
110
115
|
headers: { customSystem: result.systemCode }
|
|
111
116
|
})
|
|
112
117
|
.then((finallyResult) => {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="empty_center_area">
|
|
3
|
+
<div class="empty_notAvailable" :style="{ width: props.imageWidth, height: props.imageHeight }">
|
|
4
|
+
<span class="empty_notAvailable_text">
|
|
5
|
+
{{ props.emptyText ? props.emptyText : t('imatrixUIPromptMessage.NoContent') }}
|
|
6
|
+
</span>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { defineProps } from 'vue'
|
|
12
|
+
import { useI18n } from 'vue-i18n'
|
|
13
|
+
const { t } = useI18n()
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
imageHeight: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: '120px'
|
|
18
|
+
},
|
|
19
|
+
imageWidth: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: '120px'
|
|
22
|
+
},
|
|
23
|
+
emptyText: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ''
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
</script>
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
</span>
|
|
12
12
|
</template>
|
|
13
13
|
<div v-if="firstFileName" ref="toolRef" class="fs-preview-tool">
|
|
14
|
+
<slot name="tool-prefix" :item="getFirstFile()"></slot>
|
|
14
15
|
<el-tooltip v-if="enableDelete && !disabled" :content="$t('fsUpload.delete')">
|
|
15
16
|
<super-icon @click="deleteFirst()" iconValue="amb-color-icon-shanchu" />
|
|
16
17
|
</el-tooltip>
|
|
@@ -20,11 +21,12 @@
|
|
|
20
21
|
<el-tooltip v-if="!disabled || !fileSetObj.disabledNoDownload" :content="$t('fsUpload.download')">
|
|
21
22
|
<super-icon @click="downloadFirst()" iconValue="amb-color-icon-xiazai" />
|
|
22
23
|
</el-tooltip>
|
|
24
|
+
<slot name="tool-suffix" :item="getFirstFile()"></slot>
|
|
23
25
|
<el-divider v-if="showMultipleFile" direction="vertical" />
|
|
24
26
|
<el-popover :width="450" trigger="click">
|
|
25
27
|
<template #reference>
|
|
26
28
|
<el-button v-if="showMultipleFile" type="primary" round size="small" @click="showMultiView">
|
|
27
|
-
|
|
29
|
+
{{ $t('fsUpload.more') }}
|
|
28
30
|
<el-icon><ArrowDownBold /></el-icon>
|
|
29
31
|
</el-button>
|
|
30
32
|
</template>
|
|
@@ -53,6 +55,7 @@
|
|
|
53
55
|
<el-link type="primary" v-if="!disabled || !fileSetObj.disabledNoDownload" underline>
|
|
54
56
|
{{ $t('fsUpload.download') }}
|
|
55
57
|
</el-link> -->
|
|
58
|
+
<slot name="tool-more-prefix" :item="item"></slot>
|
|
56
59
|
<el-tooltip v-if="enableDelete" :content="$t('fsUpload.delete')">
|
|
57
60
|
<super-icon @click="deleteFile(item)" iconValue="amb-color-icon-shanchu" />
|
|
58
61
|
</el-tooltip>
|
|
@@ -81,7 +84,7 @@
|
|
|
81
84
|
// import { Image } from 'antd';
|
|
82
85
|
import { Paperclip as ElIconPaperclip, View as ElIconView, Download as ElIconDownload } from '@element-plus/icons-vue'
|
|
83
86
|
import * as Vue from 'vue'
|
|
84
|
-
import { isPlateSys, getSystemFrontendUrl } from '../../../src/utils/common-util'
|
|
87
|
+
import { isPlateSys, getSystemFrontendUrl, getRelativeBaseUrl } from '../../../src/utils/common-util'
|
|
85
88
|
import { isImage, getEntityFieldValue } from '../../../src/utils/util'
|
|
86
89
|
import { packageFile } from '../../super-grid/src/utils'
|
|
87
90
|
import { getToken } from '../../../src/utils/auth'
|
|
@@ -238,6 +241,7 @@ export default {
|
|
|
238
241
|
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
239
242
|
tempAction = baseAPI + '/api/search-file-names'
|
|
240
243
|
}
|
|
244
|
+
tempAction = getRelativeBaseUrl(tempAction)
|
|
241
245
|
this.$http.post(tempAction, uuids).then((result) => {
|
|
242
246
|
this.fileList = []
|
|
243
247
|
uuids.forEach((uuid) => {
|
|
@@ -298,6 +302,7 @@ export default {
|
|
|
298
302
|
previewUrl = baseUrl + '/common/fs-upload/preview?jwt=' + token
|
|
299
303
|
previewUrl = previewUrl + '&showName=' + encodeURI(showName) + '&serverPath=' + fileInfo.serverPath
|
|
300
304
|
}
|
|
305
|
+
previewUrl = getRelativeBaseUrl(previewUrl)
|
|
301
306
|
window.open(previewUrl, showName)
|
|
302
307
|
}
|
|
303
308
|
},
|
|
@@ -306,7 +311,8 @@ export default {
|
|
|
306
311
|
if (!this.fileList[index].src) {
|
|
307
312
|
this.download(showName, this.fileList[index].serverPath)
|
|
308
313
|
} else {
|
|
309
|
-
|
|
314
|
+
const src = getRelativeBaseUrl(this.fileList[index].src)
|
|
315
|
+
window.open(src)
|
|
310
316
|
}
|
|
311
317
|
},
|
|
312
318
|
download(showName, serverPath) {
|
|
@@ -315,6 +321,7 @@ export default {
|
|
|
315
321
|
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
316
322
|
url = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/downloads?jwt=' + token
|
|
317
323
|
}
|
|
324
|
+
url = getRelativeBaseUrl(url)
|
|
318
325
|
const src = url + '&showName=' + encodeURI(showName) + '&serverPath=' + serverPath
|
|
319
326
|
window.open(src)
|
|
320
327
|
},
|
|
@@ -367,6 +374,7 @@ export default {
|
|
|
367
374
|
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
368
375
|
tempAction = baseAPI + '/api/search-file-names'
|
|
369
376
|
}
|
|
377
|
+
tempAction = getRelativeBaseUrl(tempAction)
|
|
370
378
|
this.$http.post(tempAction, uuids).then((result) => {
|
|
371
379
|
this.fileList = []
|
|
372
380
|
uuids.forEach((uuid) => {
|
|
@@ -375,6 +383,7 @@ export default {
|
|
|
375
383
|
})
|
|
376
384
|
}
|
|
377
385
|
}
|
|
386
|
+
return this.fileList
|
|
378
387
|
},
|
|
379
388
|
deleteFirst() {
|
|
380
389
|
const fileInfo = this.getFirstFile()
|
|
@@ -172,6 +172,7 @@ import {getToken} from '../../../src/utils/auth'
|
|
|
172
172
|
import {
|
|
173
173
|
isPlateSys,
|
|
174
174
|
getSystemFrontendUrl,
|
|
175
|
+
getRelativeBaseUrl,
|
|
175
176
|
} from '../../../src//utils//common-util.js'
|
|
176
177
|
|
|
177
178
|
export default {
|
|
@@ -276,7 +277,7 @@ export default {
|
|
|
276
277
|
},
|
|
277
278
|
},
|
|
278
279
|
created() {
|
|
279
|
-
this.baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
280
|
+
this.baseURL = getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL)
|
|
280
281
|
if (this.data) {
|
|
281
282
|
this.unifiedEnclosures = this.data
|
|
282
283
|
}
|
|
@@ -332,7 +333,7 @@ export default {
|
|
|
332
333
|
const http = this.$http
|
|
333
334
|
http
|
|
334
335
|
.post(
|
|
335
|
-
|
|
336
|
+
this.baseURL +
|
|
336
337
|
'/common/fs-upload/des-encrypt',
|
|
337
338
|
map
|
|
338
339
|
)
|
|
@@ -366,7 +367,7 @@ export default {
|
|
|
366
367
|
} else {
|
|
367
368
|
const myShowName = row.fileName
|
|
368
369
|
const uuid = row.uuid
|
|
369
|
-
let baseUrl =
|
|
370
|
+
let baseUrl = this.baseURL
|
|
370
371
|
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
371
372
|
baseUrl = window.$vueApp.config.globalProperties.baseAPI
|
|
372
373
|
}
|
|
@@ -392,6 +393,7 @@ export default {
|
|
|
392
393
|
'&serverPath=' +
|
|
393
394
|
uuid
|
|
394
395
|
}
|
|
396
|
+
previewUrl = getRelativeBaseUrl(previewUrl)
|
|
395
397
|
window.open(previewUrl, showName)
|
|
396
398
|
}
|
|
397
399
|
}
|
|
@@ -419,7 +421,7 @@ export default {
|
|
|
419
421
|
http.headers = "'Content-Type': 'multipart/form-data'"
|
|
420
422
|
http
|
|
421
423
|
.post(
|
|
422
|
-
|
|
424
|
+
this.baseURL +
|
|
423
425
|
'/common/fs-upload/upload-template/' +
|
|
424
426
|
this.systemCode,
|
|
425
427
|
param,
|