centaline-data-driven-v3 0.0.44 → 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 +77 -76
- package/package.json +1 -1
- package/src/components/app/FormList.vue +1 -2
- package/src/components/app/PhotoSelect.vue +1 -1
- package/src/components/app/ViewerFile.vue +13 -9
- package/src/components/app/searchScreen.vue +8 -5
- package/src/components/web/File.vue +76 -16
- package/src/components/web/PhotoSelect.vue +14 -9
- package/src/components/web/PhotoSelectList.vue +14 -9
- package/src/components/web/SearchList/SearchStats.vue +18 -4
- package/src/components/web/SearchList/SearchTable.vue +5 -1
- package/src/components/web/SearchList.vue +10 -9
- package/src/components/web/ViewerFile.vue +5 -4
- package/src/components/web/photo.vue +79 -19
- package/src/loader/src/Form.js +0 -1
- 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/src/utils/mixins.js +22 -0
- package/src/views/SearchList.vue +3 -2
|
@@ -10,28 +10,25 @@
|
|
|
10
10
|
<span v-html="model.preLabel1"></span>
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
|
-
|
|
14
|
-
|
|
15
13
|
<div style="width: 100%;position: relative" ref="refct_Photo" class="block ct-file"
|
|
16
14
|
:style="{ 'width': (model.maxValue1 || 100) + 'px', 'height': (model.minValue1 || 100) + 'px' }"
|
|
17
15
|
:class="[model.attrs.size ? 'ct-checkbox-' + model.attrs.size : '']">
|
|
18
|
-
|
|
16
|
+
|
|
17
|
+
<el-upload :class="model.disableUpload ? 'ct-upload-display-none' : ''" v-bind="UploadhttpRequest" :uploadStatus="!model.disableUpload&&!model.locked?'upload':'lock'"
|
|
19
18
|
ref="refupload" :disabled="model.locked" :accept="model.fileAccept1" :on-change="handleChange"
|
|
20
19
|
:multiple="false" :auto-upload="true" :action="action()" :headers="headers"
|
|
21
20
|
:before-upload="beforeUploadProcess" :on-success="handleAvatarSuccess" :on-error="handleAvatarError"
|
|
22
|
-
:on-progress="uploadProcess" :on-exceed="handleExceed" :show-file-list="false"
|
|
21
|
+
:on-progress="uploadProcess" :on-exceed="handleExceed" :show-file-list="false">
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
<el-icon class="avatar-uploader-icon"
|
|
26
25
|
:style="{ 'width': (model.maxValue1 || 100) + 'px', 'height': (model.minValue1 || 100) + 'px', background: 'var(--el-fill-color-lighter)' }">
|
|
27
|
-
|
|
26
|
+
|
|
28
27
|
<template v-if="model.fileList && model.fileList.length > 0">
|
|
29
28
|
<div :style="{ 'width': (model.maxValue1 || 100) + 'px', 'height': (model.minValue1 || 100) + 'px' }"
|
|
30
29
|
:title="file.fileName" v-for="(file, index) in model.fileList">
|
|
31
30
|
<div class="cover-list-item">
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<span class="tool-top" :style="{ right: model.QRCodeAction ? '39px' : '0' }">
|
|
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)">
|
|
@@ -49,6 +46,7 @@
|
|
|
49
46
|
<Delete />
|
|
50
47
|
</el-icon>
|
|
51
48
|
</span>
|
|
49
|
+
|
|
52
50
|
</span>
|
|
53
51
|
<el-image fit="fill"
|
|
54
52
|
:src="file.url ? file.url : file.mediaUrl ? file.mediaUrl + '/' + (model.maxValue1 || 100) + '/' + (model.minValue1 || 100) : util.getAssetsImage('blank.png')"
|
|
@@ -77,9 +75,12 @@
|
|
|
77
75
|
</div>
|
|
78
76
|
</template>
|
|
79
77
|
<template v-else-if="model.name1">
|
|
80
|
-
<img :src="model.name1 ? model.name1 : util.getAssetsImage('blank.png')" class="avatar"
|
|
78
|
+
<img :src="model.name1 ? model.name1 : util.getAssetsImage('blank.png')" class="avatar" />
|
|
79
|
+
</template>
|
|
81
80
|
<template v-else>
|
|
81
|
+
|
|
82
82
|
<Plus :style="{ 'font-size': '30px', 'color': 'var(--el-text-color-secondary)' }" />
|
|
83
|
+
|
|
83
84
|
</template>
|
|
84
85
|
</el-icon>
|
|
85
86
|
|
|
@@ -91,8 +92,11 @@
|
|
|
91
92
|
<div v-show="model.description" v-html="model.description">
|
|
92
93
|
</div>
|
|
93
94
|
</template>
|
|
94
|
-
<
|
|
95
|
-
|
|
95
|
+
<div class="qrcode-target" v-if="model.QRCodeAction">
|
|
96
|
+
<img @click.stop="qrcodeFn" ref="QRCodeRef"
|
|
97
|
+
:src="util.getAssetsImage('serw1.png')" style="width: 35px;height: 35px; float: right; " alt="扫码上传"
|
|
98
|
+
title="扫码上传" />
|
|
99
|
+
</div>
|
|
96
100
|
<div class="ScanUploadPhoto" v-if="model.qrcodeVisible" @click.stop="qrcodeVisible = true"
|
|
97
101
|
:style="{ top: model.QRCodeRefTop + 'px', left: model.QRCodeRefLeft + 'px' }">
|
|
98
102
|
<div style="border-bottom:none">
|
|
@@ -139,11 +143,10 @@ const props = defineProps({
|
|
|
139
143
|
})
|
|
140
144
|
const refct_Photo = ref()
|
|
141
145
|
const refupload = ref()
|
|
142
|
-
const QRCodeRef = ref()
|
|
143
|
-
|
|
146
|
+
const QRCodeRef = ref()
|
|
144
147
|
const UploadhttpRequest = ref({})
|
|
148
|
+
const model = ref(null)
|
|
145
149
|
|
|
146
|
-
const model = ref(null)
|
|
147
150
|
const headers = computed(() => {
|
|
148
151
|
return common.getDataDrivenOpts().handler.getRequestHeaders();
|
|
149
152
|
})
|
|
@@ -175,6 +178,8 @@ function action() {
|
|
|
175
178
|
return "";
|
|
176
179
|
}
|
|
177
180
|
|
|
181
|
+
|
|
182
|
+
|
|
178
183
|
function load(data) {
|
|
179
184
|
model.value = data;
|
|
180
185
|
model.value.validExcute = () => {
|
|
@@ -315,7 +320,7 @@ async function SliceUpload(options) {
|
|
|
315
320
|
}
|
|
316
321
|
// data是上传时附带的额外参数,file是文件
|
|
317
322
|
|
|
318
|
-
let uid =
|
|
323
|
+
let uid = Photo.uploadguid();
|
|
319
324
|
try {
|
|
320
325
|
file.uid = file.uid || uid;
|
|
321
326
|
|
|
@@ -357,7 +362,7 @@ function uploadpro(uploadOptions, res, xhr, flagError) {
|
|
|
357
362
|
|
|
358
363
|
if (res.content.finished == 1) {
|
|
359
364
|
handleChange();
|
|
360
|
-
QRCodeLocate();
|
|
365
|
+
QRCodeLocate();
|
|
361
366
|
}
|
|
362
367
|
return true;
|
|
363
368
|
}
|
|
@@ -471,13 +476,66 @@ function QRCodeLocate() {
|
|
|
471
476
|
function viewerfile(file) {
|
|
472
477
|
Photo.viewerfile(file, model.value)
|
|
473
478
|
}
|
|
479
|
+
|
|
480
|
+
function PasteUpload(event) {
|
|
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
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
474
500
|
|
|
501
|
+
function ListenerPaste(event) {
|
|
502
|
+
|
|
503
|
+
var target = event.target;
|
|
504
|
+
const uploads = document.querySelectorAll('[uploadStatus="upload"]');
|
|
505
|
+
|
|
506
|
+
if (!window.uploads) {
|
|
507
|
+
window.uploads = { count: 0, length: uploads.length };
|
|
508
|
+
}
|
|
509
|
+
if (uploads.length > 1) {
|
|
510
|
+
window.uploads.count = window.uploads.count + 1;
|
|
511
|
+
window.uploads.length = uploads.length;
|
|
512
|
+
|
|
513
|
+
if (window.uploads.count == window.uploads.length) {
|
|
514
|
+
window.uploads = null;
|
|
515
|
+
ElMessage({
|
|
516
|
+
message: "存在多个上传组件,请点击上传!",
|
|
517
|
+
type: 'info',
|
|
518
|
+
showClose: true,
|
|
519
|
+
});
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
else if (uploads.length == 1) {
|
|
524
|
+
window.uploads = null;
|
|
525
|
+
PasteUpload(event);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
// 添加粘贴事件监听器
|
|
531
|
+
document.addEventListener('paste', ListenerPaste);
|
|
475
532
|
onBeforeUnmount(() => {
|
|
476
533
|
//销毁定时上传
|
|
477
534
|
clearTimeout(model.value.qrtimer);
|
|
478
535
|
window.removeEventListener('scroll', model.value.QRCodeLocate, true)
|
|
536
|
+
//销毁贴事件监听器
|
|
537
|
+
document.removeEventListener('paste', ListenerPaste)
|
|
479
538
|
})
|
|
480
|
-
|
|
481
539
|
defineExpose({
|
|
482
540
|
model
|
|
483
541
|
})
|
|
@@ -610,10 +668,12 @@ defineExpose({
|
|
|
610
668
|
|
|
611
669
|
:deep(.qrcode-target) {
|
|
612
670
|
position: absolute;
|
|
613
|
-
|
|
614
|
-
right: 3px;
|
|
671
|
+
right: 3px;
|
|
615
672
|
width: 35px;
|
|
616
673
|
height: 35px;
|
|
674
|
+
color: red;
|
|
675
|
+
text-align: right;
|
|
676
|
+
top: 0px;
|
|
617
677
|
}
|
|
618
678
|
|
|
619
679
|
:deep(.ScanUploadPhoto) {
|
package/src/loader/src/Form.js
CHANGED
|
@@ -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;
|
package/src/utils/mixins.js
CHANGED
|
@@ -2,6 +2,7 @@ import { ref } from 'vue'
|
|
|
2
2
|
import Field from '@/loader/src/Field';
|
|
3
3
|
import common from './common';
|
|
4
4
|
import Enum from './Enum';
|
|
5
|
+
import { showLoadingToast,closeToast} from "vant";
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
//初始化数据
|
|
@@ -144,6 +145,9 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
144
145
|
if (verified) {
|
|
145
146
|
//action有值,提交到后台
|
|
146
147
|
if (field.action) {
|
|
148
|
+
if(common.flagApp()){
|
|
149
|
+
showLoadingToast({ message: '正在处理',forbidClick: true, duration: 100000 });
|
|
150
|
+
}
|
|
147
151
|
field.disabled = true;//提交按钮禁用
|
|
148
152
|
model.pageDisabled = true;
|
|
149
153
|
|
|
@@ -162,6 +166,9 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
162
166
|
progressKey: res.content.key,
|
|
163
167
|
progressType: field.isExport ? 'export' : 'import',
|
|
164
168
|
onFinished(data) {
|
|
169
|
+
if(common.flagApp()){
|
|
170
|
+
closeToast()
|
|
171
|
+
}
|
|
165
172
|
field.disabled = false;
|
|
166
173
|
model.pageDisabled = false;
|
|
167
174
|
common.closeDialog(dialogOption);
|
|
@@ -192,6 +199,9 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
192
199
|
model.$vue.emit('submit', { formData: model, responseData: data });
|
|
193
200
|
},
|
|
194
201
|
onError(data) {
|
|
202
|
+
if(common.flagApp()){
|
|
203
|
+
closeToast()
|
|
204
|
+
}
|
|
195
205
|
field.disabled = false;
|
|
196
206
|
model.pageDisabled = false;
|
|
197
207
|
common.closeDialog(dialogOption);
|
|
@@ -223,6 +233,9 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
223
233
|
progressKey: res202.content.key,
|
|
224
234
|
progressType: field.isExport ? 'export' : 'import',
|
|
225
235
|
onFinished(data) {
|
|
236
|
+
if(common.flagApp()){
|
|
237
|
+
closeToast()
|
|
238
|
+
}
|
|
226
239
|
field.disabled = false;
|
|
227
240
|
model.pageDisabled = false;
|
|
228
241
|
common.closeDialog(dialogOption);
|
|
@@ -253,6 +266,9 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
253
266
|
model.$vue.emit('submit', { formData: model, responseData: data });
|
|
254
267
|
},
|
|
255
268
|
onError(data) {
|
|
269
|
+
if(common.flagApp()){
|
|
270
|
+
closeToast()
|
|
271
|
+
}
|
|
256
272
|
field.disabled = false;
|
|
257
273
|
model.pageDisabled = false;
|
|
258
274
|
common.closeDialog(dialogOption);
|
|
@@ -266,6 +282,9 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
266
282
|
}
|
|
267
283
|
});
|
|
268
284
|
}).catch(() => {
|
|
285
|
+
if(common.flagApp()){
|
|
286
|
+
closeToast()
|
|
287
|
+
}
|
|
269
288
|
field.disabled = false;
|
|
270
289
|
model.pageDisabled = false;
|
|
271
290
|
});
|
|
@@ -274,6 +293,9 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
274
293
|
}
|
|
275
294
|
else {
|
|
276
295
|
field.doAction(model.$vue.getFormObj(), (data) => {
|
|
296
|
+
if(common.flagApp()){
|
|
297
|
+
closeToast()
|
|
298
|
+
}
|
|
277
299
|
field.disabled = false;
|
|
278
300
|
model.pageDisabled = false;
|
|
279
301
|
if (data.rtnCode === Enum.ReturnCode.Successful) {
|
package/src/views/SearchList.vue
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/
|
|
4
|
-
:searchDataApi="'/
|
|
3
|
+
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyPublishList/getLayoutOfSearch'"
|
|
4
|
+
:searchDataApi="'/propertyPublishList/getListOfSearchModel'"
|
|
5
|
+
:searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist>
|
|
5
6
|
<ct-dialoglist ref="dialogList"></ct-dialoglist>
|
|
6
7
|
|
|
7
8
|
</div>
|