centaline-data-driven-v3 0.1.58 → 0.1.60
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/dist/centaline-data-driven-v3.umd.js +118 -118
- package/package.json +1 -1
- package/src/components/app/FormList.vue +194 -9
- package/src/components/web/File.vue +21 -2
- package/src/components/web/Form.vue +236 -8
- package/src/components/web/SearchList/SearchTable.vue +21 -5
- package/src/components/web/SearchList/TableToolbar.vue +9 -5
- package/src/components/web/SearchList.vue +1 -1
- package/src/components/web/ViewerFile/ViewerImage.vue +1 -1
- package/src/components/web/ViewerFile.vue +63 -21
- package/src/components/web/dialog.vue +18 -7
- package/src/loader/src/File.js +38 -22
- package/src/loader/src/Form.js +15 -5
- package/src/loader/src/SearchTable.js +58 -17
- package/src/main.js +2 -2
- package/src/utils/useDraggable.js +100 -0
- package/src/views/Form.vue +2 -2
- package/src/views/SearchList.vue +3 -9
|
@@ -398,7 +398,7 @@ function searchComplate(m, defaultSearch) {
|
|
|
398
398
|
searchEnd.value = Date.now();
|
|
399
399
|
isLoading.value = false;
|
|
400
400
|
tableLoading.value = false;
|
|
401
|
-
},null,props.appRootUrl);
|
|
401
|
+
}, null, props.appRootUrl);
|
|
402
402
|
}
|
|
403
403
|
if (typeof props.source !== "undefined") {
|
|
404
404
|
load(SearchTable.loadSearchTableModel(props.source));
|
|
@@ -412,9 +412,9 @@ function searchComplate(m, defaultSearch) {
|
|
|
412
412
|
//初始化数据
|
|
413
413
|
function load(data) {
|
|
414
414
|
model.value = data;
|
|
415
|
-
model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage, toolbarClickHandler,closeTabThen };
|
|
415
|
+
model.value.$vue = { searchStrat, searchEnd, downloadUrl, loadStats, setTableHeight, updateCurrentRow, doAction, itemKey, refreshTableColumns, calculatingRowHeight, emit, operationLoading, getPage, toolbarClickHandler, closeTabThen };
|
|
416
416
|
model.value.isIframe = props.isIframe
|
|
417
|
-
model.value.appendToBody=props.appendToBody
|
|
417
|
+
model.value.appendToBody = props.appendToBody
|
|
418
418
|
model.value.isPageInSideBar = false
|
|
419
419
|
model.value.columnName = null
|
|
420
420
|
model.value.columnGroupId = null
|
|
@@ -973,6 +973,7 @@ function thMouseDownHandle(ev, colIndex) {
|
|
|
973
973
|
}
|
|
974
974
|
//查询对应页的数据
|
|
975
975
|
function getPage(index, flagRefreshRowHandle) {
|
|
976
|
+
getRetain();
|
|
976
977
|
if (refTableParent.value) {
|
|
977
978
|
refTableParent.value.scrollTop = 0;
|
|
978
979
|
refTableParent.value.scrollLeft = 0;
|
|
@@ -997,8 +998,12 @@ function getPage(index, flagRefreshRowHandle) {
|
|
|
997
998
|
getScrollAttr();
|
|
998
999
|
}
|
|
999
1000
|
setfixedSize();
|
|
1001
|
+
model.value.selectIndex = 0;
|
|
1002
|
+
model.value._lastRowspan = null;
|
|
1000
1003
|
if (index === 1) {
|
|
1001
1004
|
SearchTable.setButtonsDisabledByRowClick(model.value);
|
|
1005
|
+
SearchTable.setButtonsDisabled(model.value);
|
|
1006
|
+
model.value.selectAll = false;
|
|
1002
1007
|
}
|
|
1003
1008
|
});
|
|
1004
1009
|
}
|
|
@@ -1303,7 +1308,7 @@ function refreshTableColumns(data) {
|
|
|
1303
1308
|
searchStats = refTableStats.value.getsearchStats();
|
|
1304
1309
|
}
|
|
1305
1310
|
if (data) {
|
|
1306
|
-
load(SearchTable.loadSearchTableModel(data, model.value.searchModel, false, props.api,null,props.appRootUrl));
|
|
1311
|
+
load(SearchTable.loadSearchTableModel(data, model.value.searchModel, false, props.api, null, props.appRootUrl));
|
|
1307
1312
|
}
|
|
1308
1313
|
else {
|
|
1309
1314
|
if (refTableStats.value) {
|
|
@@ -1311,7 +1316,7 @@ function refreshTableColumns(data) {
|
|
|
1311
1316
|
getPage(1, true);
|
|
1312
1317
|
}
|
|
1313
1318
|
else {
|
|
1314
|
-
SearchTable.loadSearchTableApi(props.api, load, searchModel, true,null,null,null,props.appRootUrl);
|
|
1319
|
+
SearchTable.loadSearchTableApi(props.api, load, searchModel, true, null, null, null, props.appRootUrl);
|
|
1315
1320
|
}
|
|
1316
1321
|
}
|
|
1317
1322
|
model.value.searchStats = searchStats;
|
|
@@ -1657,6 +1662,17 @@ function closeTabThen(ev) {
|
|
|
1657
1662
|
}
|
|
1658
1663
|
}
|
|
1659
1664
|
|
|
1665
|
+
function getRetain() {
|
|
1666
|
+
model.value.isRetain = false
|
|
1667
|
+
let field = model.value.buttons.find((b) => {
|
|
1668
|
+
return b.key.toLowerCase() === 'Retain'.toLowerCase();
|
|
1669
|
+
});
|
|
1670
|
+
if (field) {
|
|
1671
|
+
if (field.code1) {
|
|
1672
|
+
model.value.isRetain = true;
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1660
1676
|
|
|
1661
1677
|
defineExpose({
|
|
1662
1678
|
model,
|
|
@@ -3,16 +3,18 @@
|
|
|
3
3
|
<div v-if="buttonsLeft && buttonsLeft.length > 0" class="bool_btn_l">
|
|
4
4
|
<ul>
|
|
5
5
|
<li v-for="btn in buttonsLeft" class="ToolbarButton" :class="{ btn_r: btn.isRight }">
|
|
6
|
-
<component :is="btn.is" :vmodel="btn" @fieldClick="clickHandler(btn)"
|
|
7
|
-
v-if="btn.show" :parameterAction="parameterAction"
|
|
6
|
+
<component :is="btn.is" :vmodel="btn" @fieldClick="clickHandler(btn)"
|
|
7
|
+
@importComplete="importComplete" v-if="btn.show" :parameterAction="parameterAction"
|
|
8
|
+
:fileData="getFileData(btn)"></component>
|
|
8
9
|
</li>
|
|
9
10
|
</ul>
|
|
10
11
|
</div>
|
|
11
12
|
<div v-if="buttonsright && buttonsright.length > 0" class="bool_btn_r">
|
|
12
13
|
<ul>
|
|
13
14
|
<li v-for="btn in buttonsright" class="ToolbarButton" :class="{ btn_r: btn.isRight }">
|
|
14
|
-
<component :is="btn.is" :vmodel="btn" @fieldClick="clickHandler(btn,)"
|
|
15
|
-
v-if="btn.show" :parameterAction="parameterAction"
|
|
15
|
+
<component :is="btn.is" :vmodel="btn" @fieldClick="clickHandler(btn,)"
|
|
16
|
+
@importComplete="importComplete" v-if="btn.show" :parameterAction="parameterAction"
|
|
17
|
+
:fileData="getFileData(btn)"></component>
|
|
16
18
|
</li>
|
|
17
19
|
</ul>
|
|
18
20
|
</div>
|
|
@@ -37,7 +39,9 @@ props.buttons.forEach(v => {
|
|
|
37
39
|
}
|
|
38
40
|
});
|
|
39
41
|
function clickHandler(btn) {
|
|
40
|
-
|
|
42
|
+
if (btn.key.toLowerCase() != 'Retain'.toLocaleLowerCase()) {
|
|
43
|
+
emit("click", btn);
|
|
44
|
+
}
|
|
41
45
|
}
|
|
42
46
|
function importComplete(res, field) {
|
|
43
47
|
emit("importComplete", res, field);
|
|
@@ -161,6 +161,7 @@ function init() {
|
|
|
161
161
|
if (props.apiParam && props.apiParam.isIframe && props.apiParam.isIframe == 'true') {
|
|
162
162
|
isIframe.value = true;
|
|
163
163
|
}
|
|
164
|
+
window.addEventListener("resize", resizeSearchList);
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
function screenLoaded(defaultSearch) {
|
|
@@ -282,7 +283,6 @@ function tableLoaded() {
|
|
|
282
283
|
sideMenuClickHandler(status);
|
|
283
284
|
}
|
|
284
285
|
}
|
|
285
|
-
window.addEventListener("resize", resizeSearchList);
|
|
286
286
|
}
|
|
287
287
|
else {
|
|
288
288
|
flagSideBarOfData.value = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="Imagebox" @mousewheel="bagimg($event)" v-loading="loading">
|
|
2
|
+
<div class="Imagebox" @mousewheel.stop.prevent="bagimg($event)" v-loading="loading">
|
|
3
3
|
<img id="ViewerImage" class="scaleimg" border="0" @load="complete()" v-bind:style="{
|
|
4
4
|
top: params.top + 'px', left: params.left + 'px',
|
|
5
5
|
transform:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="height: 100%" id="viewer-file" ref="refviewerfile" @contextmenu="handleMouse" class="viewer-file ccai">
|
|
3
3
|
<el-container style="height: 100%; border: 1px solid #eee">
|
|
4
|
-
<el-aside style="background-color: rgb(238, 241, 246)" class="ccai-aside">
|
|
4
|
+
<el-aside style="background-color: rgb(238, 241, 246)" class="ccai-aside" v-if="flagLeft">
|
|
5
5
|
<div style="height: 100%" class="viewerMenu">
|
|
6
6
|
<el-menu :default-openeds="openeds" :default-active="activeitem" style="height: 100%">
|
|
7
7
|
<el-sub-menu :key="groupIndex" :index="groupIndex.toString()"
|
|
@@ -28,32 +28,44 @@
|
|
|
28
28
|
</div>
|
|
29
29
|
</el-aside>
|
|
30
30
|
<el-main ref="refdisplayArea" v-loading="downloadLoading" element-loading-spinner="el-icon-loading"
|
|
31
|
-
:element-loading-custom-class="'cloading'">
|
|
31
|
+
:element-loading-custom-class="'cloading'" style="background-color: white;overflow: hidden;position: relative;">
|
|
32
|
+
<div v-if="!flagLeft" style="position: absolute; top: 10px; left: 10px;cursor: pointer;color:red"
|
|
33
|
+
@click="closeViewerFile">
|
|
34
|
+
<el-icon size="20">
|
|
35
|
+
<CircleClose />
|
|
36
|
+
</el-icon>
|
|
37
|
+
|
|
38
|
+
</div>
|
|
32
39
|
<div class="cont" v-if="resultObject">
|
|
33
40
|
<div style="padding-right:10px;" v-if="mediaLabelShow">
|
|
34
41
|
<div class="enlarge-picture " v-if="itemFile.mediaLabelName">
|
|
35
|
-
<span class="" style="width:80px;">{{common.LocalizedString('附件类型','附件類型')}} : </span>
|
|
42
|
+
<span class="" style="width:80px;">{{ common.LocalizedString('附件类型', '附件類型') }} : </span>
|
|
36
43
|
<lable style="font-weight: bold;">{{ itemFile.mediaLabelName }}</lable>
|
|
37
44
|
</div>
|
|
38
45
|
<div class="enlarge-picture" v-if="itemFile.mediaDescCN">
|
|
39
|
-
<span style="width:80px;">{{common.LocalizedString('中文描述','中文描述')}} : </span>
|
|
46
|
+
<span style="width:80px;">{{ common.LocalizedString('中文描述', '中文描述') }} : </span>
|
|
40
47
|
<lable style="font-weight: bold;">{{ itemFile.mediaDescCN }}</lable>
|
|
41
48
|
</div>
|
|
42
49
|
<div class="enlarge-picture" v-if="itemFile.mediaDescEN">
|
|
43
|
-
<span style="width:80px;">{{common.LocalizedString('英文描述','英文描述')}} : </span>
|
|
50
|
+
<span style="width:80px;">{{ common.LocalizedString('英文描述', '英文描述') }} : </span>
|
|
44
51
|
<lable style="font-weight: bold;">{{ itemFile.mediaDescEN }}</lable>
|
|
45
52
|
</div>
|
|
46
53
|
<div class="enlarge-picture" v-if="itemFile.mediaUploadEmployeeDesc">
|
|
47
|
-
<span style="width:80px;">{{common.LocalizedString('来源描述','來源描述')}} : </span>
|
|
54
|
+
<span style="width:80px;">{{ common.LocalizedString('来源描述', '來源描述') }} : </span>
|
|
48
55
|
<lable style="font-weight: bold;">{{ itemFile.mediaUploadEmployeeDesc }}</lable>
|
|
49
56
|
</div>
|
|
50
57
|
</div>
|
|
51
|
-
<div class="toggler" @click="mediaLabelShow
|
|
58
|
+
<div class="toggler" @click="mediaLabelShow = !mediaLabelShow"
|
|
59
|
+
v-if="itemFile.mediaLabelName || itemFile.mediaDescCN || itemFile.mediaDescEN || itemFile.mediaUploadEmployeeDesc">
|
|
52
60
|
<span class="glyphicon glyphicon-chevron-right" v-if="mediaLabelShow">
|
|
53
|
-
<el-icon color="#000000"
|
|
61
|
+
<el-icon color="#000000">
|
|
62
|
+
<ArrowRightBold />
|
|
63
|
+
</el-icon>
|
|
54
64
|
</span>
|
|
55
65
|
<span class="glyphicon glyphicon-chevron-left" v-if="!mediaLabelShow">
|
|
56
|
-
<el-icon color="#000000"
|
|
66
|
+
<el-icon color="#000000">
|
|
67
|
+
<ArrowLeftBold />
|
|
68
|
+
</el-icon>
|
|
57
69
|
</span>
|
|
58
70
|
</div>
|
|
59
71
|
</div>
|
|
@@ -118,7 +130,7 @@
|
|
|
118
130
|
<template v-else>
|
|
119
131
|
<div class="viewerContent" style="max-height: 200px; text-align: center">
|
|
120
132
|
<a :href="resultObject" target="_blank">
|
|
121
|
-
<img :src="(itemFile.thumbnailUrl||itemFile.url)" /><br />{{
|
|
133
|
+
<img :src="(itemFile.thumbnailUrl || itemFile.url)" /><br />{{
|
|
122
134
|
itemFile.mediaLabelName || itemFile.fileName
|
|
123
135
|
}}
|
|
124
136
|
</a>
|
|
@@ -126,7 +138,8 @@
|
|
|
126
138
|
</template>
|
|
127
139
|
</template>
|
|
128
140
|
<!--p360-->
|
|
129
|
-
<template
|
|
141
|
+
<template
|
|
142
|
+
v-else-if="itemFile.mediaTypeID == '7' || (itemFile.mediaTypeID + '').toLowerCase() == 'p360'">
|
|
130
143
|
<viewerP360 ref="refviewerP360" :height="displayAreaHeight" :width="displayAreaWidth"
|
|
131
144
|
:imgUrl="resultObject" />
|
|
132
145
|
</template>
|
|
@@ -144,6 +157,8 @@
|
|
|
144
157
|
<div class="magnify-footer" :style="{
|
|
145
158
|
width: displayAreaWidth + 'px',
|
|
146
159
|
bottom: displayAreabtm + 10 + 'px',
|
|
160
|
+
position: !flagLeft ? 'absolute' : 'fixed',
|
|
161
|
+
|
|
147
162
|
}">
|
|
148
163
|
<div class="magnify-toolbar" :style="{ 'margin-left': displayArealeft + 'px' }">
|
|
149
164
|
|
|
@@ -201,14 +216,18 @@ import common from '../../utils/common';
|
|
|
201
216
|
import viewerImage from './ViewerFile/ViewerImage.vue';
|
|
202
217
|
import viewerPDF from './ViewerFile/ViewerPDFjs.vue';
|
|
203
218
|
import viewerP360 from './ViewerFile/viewerP360.vue';
|
|
219
|
+
const emit = defineEmits(['closeViewerFile', 'ViewerFilechangeIndex'])
|
|
204
220
|
|
|
205
221
|
const props = defineProps({
|
|
206
222
|
MediaAlbum: Array,
|
|
207
223
|
groupIndex: Number,
|
|
208
224
|
index: Number,
|
|
225
|
+
flagLeft: {
|
|
226
|
+
type: Boolean,
|
|
227
|
+
default: true
|
|
228
|
+
}
|
|
209
229
|
})
|
|
210
230
|
|
|
211
|
-
|
|
212
231
|
const refviewerfile = ref()
|
|
213
232
|
const refdisplayArea = ref()
|
|
214
233
|
const refviewerImage = ref()
|
|
@@ -227,8 +246,8 @@ const displayArealeft = ref(0)
|
|
|
227
246
|
const displayAreaHeight = ref(0)
|
|
228
247
|
const downloadUrl = ref("")
|
|
229
248
|
const downloadLoading = ref(false)
|
|
230
|
-
const mediaLabelShow=ref(false)
|
|
231
|
-
const qrtimer=ref(null)
|
|
249
|
+
const mediaLabelShow = ref(false)
|
|
250
|
+
const qrtimer = ref(null)
|
|
232
251
|
|
|
233
252
|
groupCountLen.value = 0;
|
|
234
253
|
props.MediaAlbum.forEach((item, n) => {
|
|
@@ -245,11 +264,18 @@ onMounted(() => {
|
|
|
245
264
|
displayArealeft.value = DomLeft();
|
|
246
265
|
displayAreabtm.value = DomTop(refdisplayArea.value.$el);
|
|
247
266
|
displayAreaHeight.value = refdisplayArea.value.$el.offsetHeight;
|
|
267
|
+
if (!props.flagLeft) {
|
|
268
|
+
displayAreaHeight.value = displayAreaHeight.value - 5;
|
|
269
|
+
}
|
|
248
270
|
window.onresize = () => {
|
|
249
271
|
displayAreaWidth.value = DomWidth();
|
|
250
272
|
displayArealeft.value = DomLeft();
|
|
251
273
|
displayAreabtm.value = DomTop(refdisplayArea.value.$el);
|
|
274
|
+
|
|
252
275
|
displayAreaHeight.value = refdisplayArea.value.$el.offsetHeight;
|
|
276
|
+
if (!props.flagLeft) {
|
|
277
|
+
displayAreaHeight.value = displayAreaHeight.value - 5;
|
|
278
|
+
}
|
|
253
279
|
};
|
|
254
280
|
|
|
255
281
|
if (
|
|
@@ -258,7 +284,7 @@ onMounted(() => {
|
|
|
258
284
|
props.groupIndex > -1 &&
|
|
259
285
|
props.index > -1
|
|
260
286
|
) {
|
|
261
|
-
var item = props.MediaAlbum[props.groupIndex]
|
|
287
|
+
var item = props.MediaAlbum[props.groupIndex]?.medias[props.index];
|
|
262
288
|
handleClick(item, props.groupIndex, props.index);
|
|
263
289
|
}
|
|
264
290
|
})
|
|
@@ -304,6 +330,9 @@ function handleMouse(e) {
|
|
|
304
330
|
e.preventDefault();
|
|
305
331
|
}
|
|
306
332
|
function DomWidth() {
|
|
333
|
+
if (!props.flagLeft) {
|
|
334
|
+
return refdisplayArea.value.$el.offsetWidth - 40;
|
|
335
|
+
}
|
|
307
336
|
let arrLength = window.innerWidth - refviewerfile.value.offsetWidth;
|
|
308
337
|
arrLength = arrLength > 0 ? arrLength : 0;
|
|
309
338
|
var Width =
|
|
@@ -315,6 +344,9 @@ function DomWidth() {
|
|
|
315
344
|
return Width;
|
|
316
345
|
}
|
|
317
346
|
function DomTop() {
|
|
347
|
+
if (!props.flagLeft) {
|
|
348
|
+
return -65;
|
|
349
|
+
}
|
|
318
350
|
const height = window.innerHeight; //可视区窗口高度
|
|
319
351
|
const curDomHeight = refviewerfile.value.offsetHeight;
|
|
320
352
|
// const curDomHeight = dom.getBoundingClientRect().height
|
|
@@ -324,6 +356,9 @@ function DomTop() {
|
|
|
324
356
|
return curDomBottom;
|
|
325
357
|
}
|
|
326
358
|
function DomLeft() {
|
|
359
|
+
if (!props.flagLeft) {
|
|
360
|
+
return 65;
|
|
361
|
+
}
|
|
327
362
|
let arrLength = window.innerWidth - refviewerfile.value.offsetWidth;
|
|
328
363
|
arrLength = arrLength > 0 ? arrLength : 0;
|
|
329
364
|
var Width =
|
|
@@ -341,7 +376,8 @@ function handleClick(item, groupIndex, index) {
|
|
|
341
376
|
activeGroup.value = groupIndex;
|
|
342
377
|
itemFile.value = item;
|
|
343
378
|
activeitem.value = groupIndex + "-" + index;
|
|
344
|
-
resultObject.value = itemFile.value
|
|
379
|
+
resultObject.value = itemFile.value?.mediaUrl;
|
|
380
|
+
emit('ViewerFilechangeIndex', { groupIndex: groupIndex, index: index })
|
|
345
381
|
}
|
|
346
382
|
function jump(n) {
|
|
347
383
|
var item = {};
|
|
@@ -421,12 +457,16 @@ function zoom(n) {
|
|
|
421
457
|
function enterFullscreen(n) {
|
|
422
458
|
refviewerP360.value.enterFullscreen(n);
|
|
423
459
|
}
|
|
460
|
+
|
|
461
|
+
function closeViewerFile() {
|
|
462
|
+
emit('closeViewerFile')
|
|
463
|
+
}
|
|
424
464
|
onUnmounted(() => {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
465
|
+
window.onresize = null;
|
|
466
|
+
if (qrtimer.value) {
|
|
467
|
+
clearTimeout(qrtimer.value);
|
|
468
|
+
qrtimer.value = null;
|
|
469
|
+
}
|
|
430
470
|
})
|
|
431
471
|
</script>
|
|
432
472
|
<style scoped>
|
|
@@ -503,6 +543,7 @@ html {
|
|
|
503
543
|
.enlarge-picture {
|
|
504
544
|
padding: 5px 10px;
|
|
505
545
|
}
|
|
546
|
+
|
|
506
547
|
.toggler {
|
|
507
548
|
-webkit-border-top-right-radius: 4px;
|
|
508
549
|
-webkit-border-bottom-right-radius: 4px;
|
|
@@ -522,6 +563,7 @@ html {
|
|
|
522
563
|
cursor: pointer;
|
|
523
564
|
position: absolute;
|
|
524
565
|
}
|
|
566
|
+
|
|
525
567
|
.glyphicon {
|
|
526
568
|
margin: 15px 0px;
|
|
527
569
|
position: relative;
|
|
@@ -6,11 +6,15 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
<script setup>
|
|
8
8
|
import { h, ref, onActivated, resolveComponent, onBeforeUnmount } from 'vue'
|
|
9
|
+
import { useDraggable } from '../../utils/useDraggable'
|
|
10
|
+
|
|
9
11
|
const emit = defineEmits(['close'])
|
|
10
12
|
const props = defineProps({
|
|
11
13
|
vmodel: Object,
|
|
12
14
|
zindex: Number
|
|
13
15
|
})
|
|
16
|
+
const { containerStyle, startDrag, hasDragged } = useDraggable('.ct-dialog_draggable')
|
|
17
|
+
|
|
14
18
|
const contentTop = ref(0)
|
|
15
19
|
const content = ref()
|
|
16
20
|
const captionBarButtons = ref([])
|
|
@@ -63,10 +67,12 @@ const render = () => {
|
|
|
63
67
|
}, [
|
|
64
68
|
|
|
65
69
|
h('div', {
|
|
70
|
+
class: 'ct-dialog_draggable', // 增加 class
|
|
66
71
|
style: {
|
|
67
|
-
'
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
'cursor': 'move',
|
|
73
|
+
|
|
74
|
+
...containerStyle.value
|
|
75
|
+
} // 使用响应式样式
|
|
70
76
|
},
|
|
71
77
|
[
|
|
72
78
|
h('table',
|
|
@@ -87,8 +93,10 @@ const render = () => {
|
|
|
87
93
|
class: ['ct-dialog_header'],
|
|
88
94
|
style: {
|
|
89
95
|
'position': 'relative',
|
|
90
|
-
'padding': '10px 20px 10px 20px'
|
|
96
|
+
'padding': '10px 20px 10px 20px',
|
|
97
|
+
'cursor': hasDragged.value ? 'move' : 'default'
|
|
91
98
|
},
|
|
99
|
+
onMousedown: startDrag,
|
|
92
100
|
}, [
|
|
93
101
|
h('span',
|
|
94
102
|
{
|
|
@@ -153,9 +161,8 @@ const render = () => {
|
|
|
153
161
|
}
|
|
154
162
|
}
|
|
155
163
|
//AI弹框宽度自适应
|
|
156
|
-
if (!item.attrs.
|
|
157
|
-
item.attrs.
|
|
158
|
-
|
|
164
|
+
if (!item.attrs.onToggleWdth) {
|
|
165
|
+
item.attrs.onToggleWdth = (newWidth) => {
|
|
159
166
|
item.width = parseFloat(item.width) + newWidth + 'px';
|
|
160
167
|
}
|
|
161
168
|
}
|
|
@@ -281,4 +288,8 @@ const render = () => {
|
|
|
281
288
|
border-top: initial;
|
|
282
289
|
border-bottom: initial;
|
|
283
290
|
}
|
|
291
|
+
|
|
292
|
+
.ct-dialog_draggable{
|
|
293
|
+
cursor: move;
|
|
294
|
+
}
|
|
284
295
|
</style>
|
package/src/loader/src/File.js
CHANGED
|
@@ -502,7 +502,7 @@ function deleteFile(file, forceDelete, model) {
|
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
}
|
|
505
|
-
|
|
505
|
+
break;
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
}
|
|
@@ -565,29 +565,44 @@ function S4() {
|
|
|
565
565
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
566
566
|
}
|
|
567
567
|
|
|
568
|
-
function
|
|
568
|
+
function buildMediaAlbum(model, targetFile) {
|
|
569
|
+
// 1. 生成专辑名称
|
|
570
|
+
const albumName = model.controlLabel || '媒体'
|
|
569
571
|
|
|
570
|
-
|
|
572
|
+
// 2. 过滤出未被删除的文件
|
|
573
|
+
const medias = model.fileList.filter(item => item.flagDeleted !== true)
|
|
571
574
|
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
);
|
|
575
|
+
|
|
576
|
+
// 3. 构建专辑对象
|
|
577
|
+
const album = { albumName, medias }
|
|
578
|
+
|
|
579
|
+
// 4. 查找目标文件的索引(如果没有传入则返回 -1)
|
|
580
|
+
const index = targetFile
|
|
581
|
+
? medias.findIndex(v => v === targetFile)
|
|
582
|
+
: -1
|
|
581
583
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
584
|
+
return { album, index }
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
function viewerfile(file, model, callback) {
|
|
588
|
+
|
|
589
|
+
const { album, index } = buildMediaAlbum(model, file)
|
|
590
|
+
// 如果之前其他地方需要 MediaAlbum 数组,只需 [album] 即可
|
|
591
|
+
const MediaAlbum = [album];
|
|
592
|
+
if (model.mediaViewPageType == 3) {
|
|
593
|
+
callback(MediaAlbum, 0, index);
|
|
594
|
+
return;
|
|
588
595
|
}
|
|
589
|
-
|
|
590
|
-
|
|
596
|
+
|
|
597
|
+
if (model.moreActionRouter) {
|
|
598
|
+
let submitData = {};
|
|
599
|
+
submitData = model.form.$vue.getFileData(model.moreActionRouter);
|
|
600
|
+
submitData.index = index;
|
|
601
|
+
submitData = model.moreActionRouter.getActionPara(submitData).para;
|
|
602
|
+
model.$vue.emit('tableButtonClick', model.moreActionRouter, submitData);
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
common.viewerfile((model.controlLabel || "预览媒体"), MediaAlbum, 0, index, model.mediaViewPageType);
|
|
591
606
|
}
|
|
592
607
|
}
|
|
593
608
|
function selfValidExcute(eventName, model) {
|
|
@@ -601,7 +616,7 @@ function selfValidExcute(eventName, model) {
|
|
|
601
616
|
}
|
|
602
617
|
if (model.required) {
|
|
603
618
|
if (File.getfileListLength(model) === 0) {
|
|
604
|
-
model.validMessage = common.LocalizedString("必须上传附件","必須上傳附件");
|
|
619
|
+
model.validMessage = common.LocalizedString("必须上传附件", "必須上傳附件");
|
|
605
620
|
model.valid = false;
|
|
606
621
|
model.displayValidMessage = model.validMessage;
|
|
607
622
|
return false;
|
|
@@ -733,6 +748,7 @@ const File = {
|
|
|
733
748
|
viewerfile,
|
|
734
749
|
selfValidExcute,
|
|
735
750
|
validFileClass,
|
|
736
|
-
setPublicClassify
|
|
751
|
+
setPublicClassify,
|
|
752
|
+
buildMediaAlbum
|
|
737
753
|
};
|
|
738
754
|
export default File;
|
package/src/loader/src/Form.js
CHANGED
|
@@ -675,7 +675,9 @@ function loadFromModel(source, isFormList, appRootUrl) {
|
|
|
675
675
|
source.buttons.forEach((v) => {
|
|
676
676
|
v.buttonType = common.getEnumValue(Enum.ButtonType, v.buttonType);
|
|
677
677
|
v.actionType = common.getEnumValue(Enum.ActionType, v.actionType);
|
|
678
|
-
v.action
|
|
678
|
+
if (v.action) {
|
|
679
|
+
v.action = (appRootUrl || '') + v.action;
|
|
680
|
+
}
|
|
679
681
|
var button = Router(v);
|
|
680
682
|
button.is = "ct-button";
|
|
681
683
|
rtn._buttons.push(button);
|
|
@@ -696,7 +698,9 @@ function loadFromModel(source, isFormList, appRootUrl) {
|
|
|
696
698
|
source.captionBarButtons.forEach((v) => {
|
|
697
699
|
v.buttonType = common.getEnumValue(Enum.ButtonType, v.buttonType);
|
|
698
700
|
v.actionType = common.getEnumValue(Enum.ActionType, v.actionType);
|
|
699
|
-
v.action
|
|
701
|
+
if (v.action) {
|
|
702
|
+
v.action = (appRootUrl || '') + v.action;
|
|
703
|
+
}
|
|
700
704
|
var button = Router(v);
|
|
701
705
|
button.is = "ct-button";
|
|
702
706
|
rtn._captionBarButtons.push(button);
|
|
@@ -717,7 +721,9 @@ function loadFromModel(source, isFormList, appRootUrl) {
|
|
|
717
721
|
source.links.forEach((v) => {
|
|
718
722
|
v.buttonType = common.getEnumValue(Enum.ButtonType, v.buttonType);
|
|
719
723
|
v.actionType = common.getEnumValue(Enum.ActionType, v.actionType);
|
|
720
|
-
v.action
|
|
724
|
+
if (v.action) {
|
|
725
|
+
v.action = (appRootUrl || '') + v.action;
|
|
726
|
+
}
|
|
721
727
|
var button = Router(v);
|
|
722
728
|
button.is = "ct-button";
|
|
723
729
|
rtn._links.push(button);
|
|
@@ -738,7 +744,9 @@ function loadFromModel(source, isFormList, appRootUrl) {
|
|
|
738
744
|
source.actionRouters.forEach((v) => {
|
|
739
745
|
v.buttonType = common.getEnumValue(Enum.ButtonType, v.buttonType);
|
|
740
746
|
v.actionType = common.getEnumValue(Enum.ActionType, v.actionType);
|
|
741
|
-
v.action
|
|
747
|
+
if (v.action) {
|
|
748
|
+
v.action = (appRootUrl || '') + v.action;
|
|
749
|
+
}
|
|
742
750
|
var button = Router(v);
|
|
743
751
|
button.is = "ct-button";
|
|
744
752
|
rtn._actionRouters.push(button);
|
|
@@ -935,7 +943,9 @@ function loadFromModel(source, isFormList, appRootUrl) {
|
|
|
935
943
|
}
|
|
936
944
|
},
|
|
937
945
|
getRtnRouter(v) {
|
|
938
|
-
v.action
|
|
946
|
+
if (v.action) {
|
|
947
|
+
v.action = (appRootUrl || '') + v.action;
|
|
948
|
+
}
|
|
939
949
|
var button = Router(v);
|
|
940
950
|
button.is = "ct-button";
|
|
941
951
|
return button;
|