centaline-data-driven-v3 0.0.45 → 0.0.46
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 +71 -70
- package/package.json +1 -1
- package/src/components/app/PhotoSelect.vue +1 -1
- package/src/components/app/ViewerFile.vue +13 -9
- package/src/components/web/File.vue +30 -48
- package/src/components/web/PhotoSelect.vue +14 -9
- package/src/components/web/PhotoSelectList.vue +14 -9
- package/src/components/web/ViewerFile.vue +5 -4
- package/src/components/web/photo.vue +32 -56
- package/src/loader/src/SearchTable.js +7 -2
- package/src/main.js +2 -2
- package/src/router/index.js +0 -6
- package/src/utils/common.js +9 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="van-uploader" style="margin:10px 10px 0 10px; ">
|
|
3
3
|
<div class="van-uploader__wrapper">
|
|
4
|
-
<draggable :list="photoList" v-bind="dragOptions" @change="onEnd" class="card" @dragover.prevent @drop.prevent>
|
|
4
|
+
<draggable :list="photoList" v-bind="dragOptions" :distance="1" @change="onEnd" class="card" @dragover.prevent @drop.prevent>
|
|
5
5
|
<template #item="{ element, index }">
|
|
6
6
|
<div class="van-uploader__preview" style="display:inline-block;" @click="viewerfile(photoList, index)">
|
|
7
7
|
<div class="van-image van-uploader__preview-image">
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
34
|
<template v-if="file.mediaTypeID == '1'">
|
|
35
|
-
<iframe :src="file.mediaUrl"
|
|
36
|
-
:width="displayAreaWidth + 'px'" style="border-width: 0px;">
|
|
35
|
+
<iframe :src="file.mediaUrl" height="100%" width="100%" style="border-width: 0px;">
|
|
37
36
|
</iframe>
|
|
38
37
|
</template>
|
|
39
38
|
<!--Photo-->
|
|
@@ -48,11 +47,16 @@
|
|
|
48
47
|
<template v-else-if="file.mediaTypeID == '4'">
|
|
49
48
|
<div class="viewerContent">
|
|
50
49
|
<template v-if="file.thumbnailUrl">
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
<template v-if="common.isVideoFile(file.mediaUrl)">
|
|
51
|
+
<video preload="none" :poster="file.thumbnailUrl" :src="file.mediaUrl"
|
|
52
|
+
controls="controls" controlslist="nodownload" style="width: 100%;">
|
|
53
|
+
您的浏览器不支持 video 标签。
|
|
54
|
+
</video>
|
|
55
|
+
</template>
|
|
56
|
+
<template v-else>
|
|
57
|
+
<iframe :src="file.mediaUrl" height="100%" width="100%" style="border-width: 0px;">
|
|
58
|
+
</iframe>
|
|
59
|
+
</template>
|
|
56
60
|
</template>
|
|
57
61
|
<template v-else>
|
|
58
62
|
<video preload="none" :src="file.mediaUrl" controls="controls" class="viewerContent"
|
|
@@ -109,7 +113,7 @@
|
|
|
109
113
|
</template>
|
|
110
114
|
<script setup lang="ts">
|
|
111
115
|
import { ref, onMounted } from 'vue'
|
|
112
|
-
|
|
116
|
+
import common from '../../utils/common'
|
|
113
117
|
import viewerImage from './ViewerFile/ViewerImage.vue';
|
|
114
118
|
import viewerPDF from './ViewerFile/ViewerPDF.vue';
|
|
115
119
|
import viewerP360 from './ViewerFile/viewerP360.vue';
|
|
@@ -191,7 +195,7 @@ function onswipenext() {
|
|
|
191
195
|
}
|
|
192
196
|
|
|
193
197
|
.enlarge-picture {
|
|
194
|
-
display:flex;
|
|
198
|
+
display: flex;
|
|
195
199
|
padding: 2px 0;
|
|
196
200
|
}
|
|
197
201
|
</style>
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
v-model:file-list="model.fileList" :multiple="true" :auto-upload="true" :action="action()"
|
|
8
8
|
:data="model.uploadData" :headers="headers" :before-upload="beforeUploadProcess"
|
|
9
9
|
:on-success="handleAvatarSuccess" :on-error="handleAvatarError" :on-progress="uploadProcess"
|
|
10
|
-
:limit="parseInt(model.maxValue1 || 999)" :on-exceed="handleExceed"
|
|
10
|
+
:limit="parseInt(model.maxValue1 || 999)" :on-exceed="handleExceed"
|
|
11
|
+
:uploadStatus="!model.disableUpload&&!model.locked?'upload':'lock'"
|
|
12
|
+
>
|
|
11
13
|
<el-icon>
|
|
12
14
|
<Plus />
|
|
13
|
-
</el-icon>
|
|
14
|
-
<input style="position: absolute;width: 0px;height: 0px;top: 13px;left: 5px;" type="text" placeholder="粘贴上传"
|
|
15
|
-
source="upload" @paste="handlePaste" ref="refPasteUpload" />
|
|
15
|
+
</el-icon>
|
|
16
16
|
<template #tip>
|
|
17
17
|
<div class="el-upload__tip errorMessage" style="white-space:pre-wrap;" v-show="!model.valid"
|
|
18
18
|
v-html="model.validMessage">
|
|
@@ -20,14 +20,9 @@
|
|
|
20
20
|
<div v-show="model.description" v-html="model.description">
|
|
21
21
|
</div>
|
|
22
22
|
</template>
|
|
23
|
-
<div class="qrcode-target">
|
|
24
|
-
<img @click.stop="qrcodeFn" ref="QRCodeRef"
|
|
23
|
+
<div class="qrcode-target" v-if="model.QRCodeAction">
|
|
24
|
+
<img @click.stop="qrcodeFn" ref="QRCodeRef" :src="util.getAssetsImage('serw1.png')"
|
|
25
25
|
style="width: 35px;height: 35px; float: right; " alt="扫码上传" title="扫码上传" />
|
|
26
|
-
<div style="cursor: pointer; height: 16px;line-height: 16px; float: right;" @click.stop="getFocus">
|
|
27
|
-
<el-icon style="font-size: 14px;" title="粘贴上传">
|
|
28
|
-
<DocumentCopy />
|
|
29
|
-
</el-icon>
|
|
30
|
-
</div>
|
|
31
26
|
</div>
|
|
32
27
|
<div class="ScanUploadPhoto" v-if="model.qrcodeVisible" @click.stop="qrcodeVisible = true"
|
|
33
28
|
:style="{ top: model.QRCodeRefTop + 'px', left: model.QRCodeRefLeft + 'px' }">
|
|
@@ -192,14 +187,12 @@ const props = defineProps({
|
|
|
192
187
|
})
|
|
193
188
|
const refct_upload = ref()
|
|
194
189
|
const refupload = ref()
|
|
195
|
-
const QRCodeRef = ref()
|
|
196
|
-
const refPasteUpload = ref()
|
|
190
|
+
const QRCodeRef = ref()
|
|
197
191
|
const UploadhttpRequest = ref({})
|
|
198
192
|
const startfile = ref();
|
|
199
193
|
const endfile = ref();
|
|
200
194
|
const model = ref(null);
|
|
201
|
-
|
|
202
|
-
const flagPasteUpload = ref(false);
|
|
195
|
+
|
|
203
196
|
|
|
204
197
|
const headers = computed(() => {
|
|
205
198
|
return common.getDataDrivenOpts().handler.getRequestHeaders();
|
|
@@ -633,40 +626,32 @@ function viewerfile(file) {
|
|
|
633
626
|
File.viewerfile(file, model.value)
|
|
634
627
|
}
|
|
635
628
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
function handlePaste(event) {
|
|
641
|
-
flagPasteUpload.value = true;
|
|
642
|
-
PasteUpload(event);
|
|
643
|
-
}
|
|
644
|
-
|
|
629
|
+
|
|
630
|
+
|
|
645
631
|
function PasteUpload(event) {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
632
|
+
if (!model.value.locked && !model.value.disableUpload) {
|
|
633
|
+
// 获取粘贴板中的图片
|
|
634
|
+
const clipboardDatas = (event.clipboardData || event.originalEvent.clipboardData);
|
|
635
|
+
const items = clipboardDatas.items;
|
|
636
|
+
for (let index in items) {
|
|
637
|
+
const item = items[index];
|
|
638
|
+
if (item.kind === 'file') {
|
|
639
|
+
|
|
640
|
+
const file = item.getAsFile();
|
|
641
|
+
let uid = File.uploadguid();
|
|
642
|
+
|
|
643
|
+
file.uid = file.uid || uid;
|
|
644
|
+
refupload.value.handleStart(file);
|
|
645
|
+
// 提交上传队列
|
|
646
|
+
refupload.value.submit();
|
|
647
|
+
}
|
|
661
648
|
}
|
|
662
649
|
}
|
|
663
|
-
|
|
664
650
|
}
|
|
665
651
|
|
|
666
|
-
function ListenerPaste(event) {
|
|
667
|
-
if (!flagPasteUpload.value) {
|
|
652
|
+
function ListenerPaste(event) {
|
|
668
653
|
var target = event.target;
|
|
669
|
-
const uploads =
|
|
654
|
+
const uploads = document.querySelectorAll('[uploadStatus="upload"]');
|
|
670
655
|
|
|
671
656
|
if (!window.uploads) {
|
|
672
657
|
window.uploads = { count: 0, length: uploads.length };
|
|
@@ -689,10 +674,7 @@ function ListenerPaste(event) {
|
|
|
689
674
|
window.uploads = null;
|
|
690
675
|
PasteUpload(event);
|
|
691
676
|
}
|
|
692
|
-
|
|
693
|
-
else {
|
|
694
|
-
flagPasteUpload.value = false;
|
|
695
|
-
}
|
|
677
|
+
|
|
696
678
|
|
|
697
679
|
}
|
|
698
680
|
|
|
@@ -840,7 +822,7 @@ defineExpose({
|
|
|
840
822
|
position: absolute;
|
|
841
823
|
top: 3px;
|
|
842
824
|
right: 3px;
|
|
843
|
-
width:
|
|
825
|
+
width: 35px;
|
|
844
826
|
height: 35px;
|
|
845
827
|
color: red;
|
|
846
828
|
text-align: right;
|
|
@@ -197,19 +197,24 @@ function selfValidExcute(eventName) {
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
function viewerfile(list, index) {
|
|
200
|
+
var file = list[index];
|
|
201
|
+
if (file && file.mediaTypeID == 4 && !common.isVideoFile(file.mediaUrl)) {
|
|
202
|
+
window.open(file.mediaUrl)
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
var MediaAlbum = [{ albumName: model.value.controlLabel || "媒体", medias: [] as any }];
|
|
200
206
|
|
|
201
|
-
|
|
207
|
+
let fileList = list.filter((item) => {
|
|
208
|
+
return item.flagDeleted !== true;
|
|
209
|
+
});
|
|
210
|
+
fileList.forEach((v) => {
|
|
211
|
+
MediaAlbum[0].medias.push(v);
|
|
212
|
+
});
|
|
213
|
+
common.viewerfile((model.value.controlLabel || "预览媒体"), MediaAlbum, 0, index, model.value.mediaViewPageType);
|
|
214
|
+
}
|
|
202
215
|
|
|
203
|
-
let fileList = list.filter((item) => {
|
|
204
|
-
return item.flagDeleted !== true;
|
|
205
|
-
});
|
|
206
|
-
fileList.forEach((v) => {
|
|
207
|
-
MediaAlbum[0].medias.push(v);
|
|
208
|
-
});
|
|
209
|
-
common.viewerfile((model.value.controlLabel || "预览媒体"), MediaAlbum, 0, index, model.value.mediaViewPageType);
|
|
210
216
|
}
|
|
211
217
|
|
|
212
|
-
|
|
213
218
|
defineExpose({
|
|
214
219
|
model
|
|
215
220
|
})
|
|
@@ -225,16 +225,21 @@ function rolRouterCellClickHandler(routerKey, rowindex, sourceIndex) {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
function viewerfile(list, index) {
|
|
228
|
+
var file = list[index];
|
|
229
|
+
if (file && file.mediaTypeID == 4 && !common.isVideoFile(file.mediaUrl)) {
|
|
230
|
+
window.open(file.mediaUrl)
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
var MediaAlbum = [{ albumName: model.value.label || "媒体", medias: [] as any }];
|
|
228
234
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
MediaAlbum
|
|
236
|
-
}
|
|
237
|
-
common.viewerfile((model.value.label || "预览媒体"), MediaAlbum, 0, index, props.mediaViewPageType);
|
|
235
|
+
let fileList = list.filter((item) => {
|
|
236
|
+
return item.flagDeleted !== true;
|
|
237
|
+
});
|
|
238
|
+
fileList.forEach((v) => {
|
|
239
|
+
MediaAlbum[0].medias.push(v);
|
|
240
|
+
});
|
|
241
|
+
common.viewerfile((model.value.label || "预览媒体"), MediaAlbum, 0, index, props.mediaViewPageType);
|
|
242
|
+
}
|
|
238
243
|
}
|
|
239
244
|
function change() {
|
|
240
245
|
loading.value = true;
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
<div class="toggler" @click="mediaLabelShow=!mediaLabelShow" v-if="itemFile.mediaLabelName||itemFile.mediaDescCN||itemFile.mediaDescEN||itemFile.mediaUploadEmployeeDesc">
|
|
52
52
|
<span class="glyphicon glyphicon-chevron-right" v-if="mediaLabelShow">
|
|
53
|
-
<el-icon><ArrowRightBold /></el-icon>
|
|
53
|
+
<el-icon color="#000000"><ArrowRightBold /></el-icon>
|
|
54
54
|
</span>
|
|
55
55
|
<span class="glyphicon glyphicon-chevron-left" v-if="!mediaLabelShow">
|
|
56
|
-
<el-icon><ArrowLeftBold /></el-icon>
|
|
56
|
+
<el-icon color="#000000"><ArrowLeftBold /></el-icon>
|
|
57
57
|
</span>
|
|
58
58
|
</div>
|
|
59
59
|
</div>
|
|
@@ -486,16 +486,17 @@ html {
|
|
|
486
486
|
.cont {
|
|
487
487
|
position: absolute;
|
|
488
488
|
z-index: 100000000000000;
|
|
489
|
-
color:
|
|
489
|
+
color: #ffffff;
|
|
490
490
|
width: auto;
|
|
491
491
|
display: inline-block !important;
|
|
492
492
|
display: inline;
|
|
493
493
|
background-color: #ffffff00;
|
|
494
494
|
font-size: 12px;
|
|
495
|
+
background: rgba(0, 0, 0, .45);
|
|
495
496
|
}
|
|
496
497
|
|
|
497
498
|
.enlarge-picture {
|
|
498
|
-
padding: 5px
|
|
499
|
+
padding: 5px 10px;
|
|
499
500
|
}
|
|
500
501
|
.toggler {
|
|
501
502
|
-webkit-border-top-right-radius: 4px;
|
|
@@ -13,11 +13,8 @@
|
|
|
13
13
|
<div style="width: 100%;position: relative" ref="refct_Photo" class="block ct-file"
|
|
14
14
|
:style="{ 'width': (model.maxValue1 || 100) + 'px', 'height': (model.minValue1 || 100) + 'px' }"
|
|
15
15
|
:class="[model.attrs.size ? 'ct-checkbox-' + model.attrs.size : '']">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
placeholder="粘贴上传" @paste="handlePaste" ref="refPasteUpload" />
|
|
19
|
-
|
|
20
|
-
<el-upload :class="model.disableUpload ? 'ct-upload-display-none' : ''" v-bind="UploadhttpRequest"
|
|
16
|
+
|
|
17
|
+
<el-upload :class="model.disableUpload ? 'ct-upload-display-none' : ''" v-bind="UploadhttpRequest" :uploadStatus="!model.disableUpload&&!model.locked?'upload':'lock'"
|
|
21
18
|
ref="refupload" :disabled="model.locked" :accept="model.fileAccept1" :on-change="handleChange"
|
|
22
19
|
:multiple="false" :auto-upload="true" :action="action()" :headers="headers"
|
|
23
20
|
:before-upload="beforeUploadProcess" :on-success="handleAvatarSuccess" :on-error="handleAvatarError"
|
|
@@ -31,7 +28,7 @@
|
|
|
31
28
|
<div :style="{ 'width': (model.maxValue1 || 100) + 'px', 'height': (model.minValue1 || 100) + 'px' }"
|
|
32
29
|
:title="file.fileName" v-for="(file, index) in model.fileList">
|
|
33
30
|
<div class="cover-list-item">
|
|
34
|
-
<span class="tool-top" :style="{ right: (model.QRCodeAction ? '
|
|
31
|
+
<span class="tool-top" :style="{ right: (model.QRCodeAction ? '39px' : '2px') }">
|
|
35
32
|
|
|
36
33
|
<span v-if="!model.locked && file.rightCrop && file.mediaTypeID == 2" style="cursor: pointer;">
|
|
37
34
|
<el-icon @click.stop="handleEdit(file)">
|
|
@@ -95,16 +92,10 @@
|
|
|
95
92
|
<div v-show="model.description" v-html="model.description">
|
|
96
93
|
</div>
|
|
97
94
|
</template>
|
|
98
|
-
<div class="qrcode-target">
|
|
99
|
-
<img @click.stop="qrcodeFn" ref="QRCodeRef"
|
|
95
|
+
<div class="qrcode-target" v-if="model.QRCodeAction">
|
|
96
|
+
<img @click.stop="qrcodeFn" ref="QRCodeRef"
|
|
100
97
|
:src="util.getAssetsImage('serw1.png')" style="width: 35px;height: 35px; float: right; " alt="扫码上传"
|
|
101
|
-
title="扫码上传" />
|
|
102
|
-
<div style="cursor: pointer;height: 16px;line-height: 16px; float: right;" @click.stop="getFocus">
|
|
103
|
-
<el-icon title="粘贴上传">
|
|
104
|
-
<DocumentCopy />
|
|
105
|
-
</el-icon>
|
|
106
|
-
</div>
|
|
107
|
-
|
|
98
|
+
title="扫码上传" />
|
|
108
99
|
</div>
|
|
109
100
|
<div class="ScanUploadPhoto" v-if="model.qrcodeVisible" @click.stop="qrcodeVisible = true"
|
|
110
101
|
:style="{ top: model.QRCodeRefTop + 'px', left: model.QRCodeRefLeft + 'px' }">
|
|
@@ -152,11 +143,9 @@ const props = defineProps({
|
|
|
152
143
|
})
|
|
153
144
|
const refct_Photo = ref()
|
|
154
145
|
const refupload = ref()
|
|
155
|
-
const QRCodeRef = ref()
|
|
156
|
-
const refPasteUpload = ref()
|
|
146
|
+
const QRCodeRef = ref()
|
|
157
147
|
const UploadhttpRequest = ref({})
|
|
158
|
-
const model = ref(null)
|
|
159
|
-
const flagPasteUpload = ref(false);
|
|
148
|
+
const model = ref(null)
|
|
160
149
|
|
|
161
150
|
const headers = computed(() => {
|
|
162
151
|
return common.getDataDrivenOpts().handler.getRequestHeaders();
|
|
@@ -487,41 +476,32 @@ function QRCodeLocate() {
|
|
|
487
476
|
function viewerfile(file) {
|
|
488
477
|
Photo.viewerfile(file, model.value)
|
|
489
478
|
}
|
|
490
|
-
|
|
491
|
-
function getFocus() {
|
|
492
|
-
refPasteUpload.value.focus();
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
function handlePaste(event) {
|
|
496
|
-
flagPasteUpload.value = true;
|
|
497
|
-
PasteUpload(event);
|
|
498
|
-
}
|
|
499
|
-
|
|
479
|
+
|
|
500
480
|
function PasteUpload(event) {
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
481
|
+
if (!model.value.locked) {
|
|
482
|
+
// 获取粘贴板中的图片
|
|
483
|
+
const clipboardDatas = (event.clipboardData || event.originalEvent.clipboardData);
|
|
484
|
+
const items = clipboardDatas.items;
|
|
485
|
+
for (let index in items) {
|
|
486
|
+
const item = items[index];
|
|
487
|
+
if (item.kind === 'file') {
|
|
488
|
+
|
|
489
|
+
const file = item.getAsFile();
|
|
490
|
+
let uid = Photo.uploadguid();
|
|
491
|
+
|
|
492
|
+
file.uid = file.uid || uid;
|
|
493
|
+
refupload.value.handleStart(file);
|
|
494
|
+
// 提交上传队列
|
|
495
|
+
refupload.value.submit();
|
|
496
|
+
}
|
|
516
497
|
}
|
|
517
498
|
}
|
|
518
|
-
|
|
519
499
|
}
|
|
520
500
|
|
|
521
|
-
function ListenerPaste(event) {
|
|
522
|
-
|
|
501
|
+
function ListenerPaste(event) {
|
|
502
|
+
|
|
523
503
|
var target = event.target;
|
|
524
|
-
const uploads =
|
|
504
|
+
const uploads = document.querySelectorAll('[uploadStatus="upload"]');
|
|
525
505
|
|
|
526
506
|
if (!window.uploads) {
|
|
527
507
|
window.uploads = { count: 0, length: uploads.length };
|
|
@@ -533,7 +513,7 @@ function ListenerPaste(event) {
|
|
|
533
513
|
if (window.uploads.count == window.uploads.length) {
|
|
534
514
|
window.uploads = null;
|
|
535
515
|
ElMessage({
|
|
536
|
-
message: "
|
|
516
|
+
message: "存在多个上传组件,请点击上传!",
|
|
537
517
|
type: 'info',
|
|
538
518
|
showClose: true,
|
|
539
519
|
});
|
|
@@ -544,11 +524,7 @@ function ListenerPaste(event) {
|
|
|
544
524
|
window.uploads = null;
|
|
545
525
|
PasteUpload(event);
|
|
546
526
|
}
|
|
547
|
-
|
|
548
|
-
else {
|
|
549
|
-
flagPasteUpload.value = false;
|
|
550
|
-
}
|
|
551
|
-
|
|
527
|
+
|
|
552
528
|
}
|
|
553
529
|
|
|
554
530
|
// 添加粘贴事件监听器
|
|
@@ -692,8 +668,8 @@ defineExpose({
|
|
|
692
668
|
|
|
693
669
|
:deep(.qrcode-target) {
|
|
694
670
|
position: absolute;
|
|
695
|
-
right: 3px;
|
|
696
|
-
width:
|
|
671
|
+
right: 3px;
|
|
672
|
+
width: 35px;
|
|
697
673
|
height: 35px;
|
|
698
674
|
color: red;
|
|
699
675
|
text-align: right;
|
|
@@ -169,13 +169,13 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
169
169
|
},
|
|
170
170
|
//查询数据
|
|
171
171
|
sortData: [],
|
|
172
|
-
sortString:'',
|
|
172
|
+
sortString: '',
|
|
173
173
|
pageData: {
|
|
174
174
|
get orderBy() {
|
|
175
175
|
if (rtn.sortData.length > 0) {
|
|
176
176
|
return rtn.sortData[0].sortName + ' ' + rtn.sortData[0].sortAction;
|
|
177
177
|
}
|
|
178
|
-
else if(rtn.sortString){
|
|
178
|
+
else if (rtn.sortString) {
|
|
179
179
|
return rtn.sortString;
|
|
180
180
|
}
|
|
181
181
|
},
|
|
@@ -740,9 +740,14 @@ function apiData(model, callback) {
|
|
|
740
740
|
else {
|
|
741
741
|
if (!common.flagApp()) {
|
|
742
742
|
model.$vue.refreshTableColumns(response);
|
|
743
|
+
} else {
|
|
744
|
+
model.$vue.loadStats();
|
|
743
745
|
}
|
|
744
746
|
}
|
|
745
747
|
}
|
|
748
|
+
else {
|
|
749
|
+
model.$vue.loadStats();
|
|
750
|
+
}
|
|
746
751
|
if (response.content.updateToolButtons) {
|
|
747
752
|
if (response.content.toolButtons) {
|
|
748
753
|
model._buttons = [];
|
package/src/main.js
CHANGED
|
@@ -26,7 +26,7 @@ app.use(centaline, {
|
|
|
26
26
|
//baseUrl: "http://10.1.245.50:38735/max-uplink-api/",
|
|
27
27
|
//baseUrl: "http://10.1.245.111:38028/",
|
|
28
28
|
flagRouterSelf: true,
|
|
29
|
-
flagApp:
|
|
29
|
+
flagApp: true,//是否app端
|
|
30
30
|
zindex: 999,
|
|
31
31
|
showRequestSuccessMessage: true,
|
|
32
32
|
showRequestErrorMessage: true,
|
|
@@ -63,7 +63,7 @@ app.use(centaline, {
|
|
|
63
63
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
64
64
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
65
65
|
//authObject: '{token:"1647-1802885825978044416",platform:"WEB"}',
|
|
66
|
-
authObject: '{EmpID:"
|
|
66
|
+
authObject: '{EmpID:"Token_de95f4d5-ff59-4e26-bcbc-0581d420ca06",MachineCode:"7a216b39-84af-43bb-842b-07604ac37a10",SSO_Token:"SSOToken_de95f4d5-ff59-4e26-bcbc-0581d420ca06",Platform:"IOS"}',
|
|
67
67
|
};
|
|
68
68
|
},
|
|
69
69
|
// 请求完成事件,可判断是否登录过期执行响应操作
|
package/src/router/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import form from "@/views/Form.vue"
|
|
|
3
3
|
import Search from '@/views/SearchList.vue'
|
|
4
4
|
import Tree from '@/views/Tree.vue'
|
|
5
5
|
import container from '@/views/container.vue'
|
|
6
|
-
import appContainer from '@/views/appContainer.vue'
|
|
7
6
|
|
|
8
7
|
const routes = [
|
|
9
8
|
{
|
|
@@ -27,11 +26,6 @@ const routes = [
|
|
|
27
26
|
path: "/container",
|
|
28
27
|
name: "container",
|
|
29
28
|
component: container
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
path: "/appContainer",
|
|
33
|
-
name: "appContainer",
|
|
34
|
-
component: appContainer
|
|
35
29
|
}
|
|
36
30
|
]
|
|
37
31
|
|
package/src/utils/common.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { showConfirmDialog, showToast,showDialog } from 'vant';
|
|
1
|
+
import { showConfirmDialog, showToast, showDialog } from 'vant';
|
|
2
2
|
import { ElMessage } from 'element-plus'
|
|
3
3
|
let dataDrivenOpts = {}
|
|
4
4
|
const common = {
|
|
@@ -280,7 +280,10 @@ const common = {
|
|
|
280
280
|
message(message, type, center, duration, showClose, dangerouslyUseHTMLString) {
|
|
281
281
|
if (dataDrivenOpts.flagApp) {
|
|
282
282
|
if (this.hasHtml(message)) {
|
|
283
|
-
showDialog({ message: message,allowHtml:true });
|
|
283
|
+
showDialog({ message: message, allowHtml: true });
|
|
284
|
+
}
|
|
285
|
+
else if(type=='error'){
|
|
286
|
+
showDialog({ title: '提示', message:message, closeOnClickOverlay: true, confirmButtonText: '确定', className: 'showDialogMessage' });
|
|
284
287
|
}
|
|
285
288
|
else {
|
|
286
289
|
showToast(message);
|
|
@@ -860,5 +863,9 @@ const common = {
|
|
|
860
863
|
return document.body;
|
|
861
864
|
}
|
|
862
865
|
},
|
|
866
|
+
isVideoFile(url) {
|
|
867
|
+
const videoExtensions = /\.(mp4|mov|webm|avi|wmv|flv)$/i;
|
|
868
|
+
return videoExtensions.test(url);
|
|
869
|
+
},
|
|
863
870
|
};
|
|
864
871
|
export default common;
|