centaline-data-driven-v3 0.0.64 → 0.0.65
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 +78 -78
- package/package.json +1 -1
- package/src/components/app/PhotoSelectList.vue +3 -1
- package/src/components/app/ViewerFile.vue +8 -7
- package/src/components/web/Button.vue +8 -7
- package/src/components/web/Form.vue +147 -10
- package/src/components/web/FormList.vue +33 -2
- package/src/components/web/SearchList/SearchTable.vue +12 -3
- package/src/components/web/SearchScreen.vue +6 -1
- package/src/loader/src/Field.js +1 -1
- package/src/loader/src/Form.js +4 -1
- package/src/loader/src/FormList.js +7 -1
- package/src/main.js +5 -5
- package/src/utils/common.js +0 -1
- package/src/utils/mixins.js +11 -13
- package/src/views/SearchList.vue +3 -3
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div style="display: flex;" v-for="(item, index) in imageList" :key="index">
|
|
12
12
|
<van-checkbox style="margin: 0 5px;" @change="choose(item, true)" v-model="item.ischeck"
|
|
13
13
|
shape="square" icon-size="14px"></van-checkbox>
|
|
14
|
-
<ct-layout :vmodel="item" :cellLayout="layout" :rowindex="index" :flagMediaSelect="true"
|
|
14
|
+
<ct-layout :vmodel="item" :cellLayout="layout" :key="itemKey" :rowindex="index" :flagMediaSelect="true"
|
|
15
15
|
@rolRouterclick="rolRouterCellClickHandler">
|
|
16
16
|
</ct-layout>
|
|
17
17
|
</div>
|
|
@@ -85,6 +85,7 @@ const allcheck = ref(false)
|
|
|
85
85
|
const formHeight = ref(0)
|
|
86
86
|
const paramName = ref('')
|
|
87
87
|
const showPicker = ref(false)
|
|
88
|
+
const itemKey = ref(0)
|
|
88
89
|
const mediaLabelID = ref('')
|
|
89
90
|
const mediaLabelName = ref('全部')
|
|
90
91
|
const options = ref([])
|
|
@@ -145,6 +146,7 @@ function load(data) {
|
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
148
|
formHeight.value = window.innerHeight - 110
|
|
149
|
+
itemKey.value = Math.random()
|
|
148
150
|
closeToast()
|
|
149
151
|
} catch (e) {
|
|
150
152
|
ElMessage({
|
|
@@ -14,25 +14,27 @@
|
|
|
14
14
|
<div class="cont" v-if="file.mediaUrl">
|
|
15
15
|
<div style="padding-right:10px;">
|
|
16
16
|
<div class="enlarge-picture " v-if="file.mediaLabelName">
|
|
17
|
-
<span class="" style="width:80px;">{{common.LocalizedString('附件类型','附件類型')}} : </span>
|
|
17
|
+
<span class="" style="width:80px;">{{ common.LocalizedString('附件类型', '附件類型') }} : </span>
|
|
18
18
|
<span style="font-weight: bold;flex: 1;">{{ file.mediaLabelName }}</span>
|
|
19
19
|
</div>
|
|
20
20
|
<div class="enlarge-picture" v-if="file.mediaDescCN">
|
|
21
|
-
<span style="width:80px;">{{common.LocalizedString('中文描述','中文描述')}} : </span>
|
|
21
|
+
<span style="width:80px;">{{ common.LocalizedString('中文描述', '中文描述') }} : </span>
|
|
22
22
|
<span style="font-weight: bold;flex: 1;">{{ file.mediaDescCN }}</span>
|
|
23
23
|
</div>
|
|
24
24
|
<div class="enlarge-picture" v-if="file.mediaDescEN">
|
|
25
|
-
<span style="width:80px;">{{common.LocalizedString('英文描述','英文描述')}} : </span>
|
|
25
|
+
<span style="width:80px;">{{ common.LocalizedString('英文描述', '英文描述') }} : </span>
|
|
26
26
|
<span style="font-weight: bold;flex: 1;">{{ file.mediaDescEN }}</span>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="enlarge-picture" v-if="file.mediaUploadEmployeeDesc">
|
|
29
|
-
<span style="width:80px;">{{common.LocalizedString('来源描述','來源描述')}} : </span>
|
|
29
|
+
<span style="width:80px;">{{ common.LocalizedString('来源描述', '來源描述') }} : </span>
|
|
30
30
|
<span style="font-weight: bold;flex: 1;">{{ file.mediaUploadEmployeeDesc }}</span>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
34
|
<template v-if="file.mediaTypeID == '1'">
|
|
35
|
-
<iframe :src="file.mediaUrl" height="100%" width="100%" style="border-width: 0px;"
|
|
35
|
+
<iframe :src="file.mediaUrl" height="100%" width="100%" style="border-width: 0px;"
|
|
36
|
+
allow="autoplay; fullscreen" allowfullscreen playsinline
|
|
37
|
+
sandbox="allow-scripts allow-same-origin">
|
|
36
38
|
</iframe>
|
|
37
39
|
</template>
|
|
38
40
|
<!--Photo-->
|
|
@@ -172,8 +174,6 @@ function onswipenext() {
|
|
|
172
174
|
width: 100%;
|
|
173
175
|
touch-action: none;
|
|
174
176
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
177
|
</style>
|
|
178
178
|
<style scoped>
|
|
179
179
|
.viewerContent {
|
|
@@ -184,6 +184,7 @@ function onswipenext() {
|
|
|
184
184
|
justify-content: center;
|
|
185
185
|
|
|
186
186
|
}
|
|
187
|
+
|
|
187
188
|
.cont {
|
|
188
189
|
position: absolute;
|
|
189
190
|
z-index: 100000000000000;
|
|
@@ -80,13 +80,14 @@ const uploadData = computed(() => {
|
|
|
80
80
|
//因传输方式是FormData,故需要对Value是object的进行转化
|
|
81
81
|
let data = {};
|
|
82
82
|
for (var key in props.fileData) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
if (typeof props.fileData[key] === "object") {
|
|
84
|
+
data[key] = JSON.stringify(props.fileData[key]);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
data[key] = props.fileData[key];
|
|
88
|
+
}
|
|
89
89
|
}
|
|
90
|
+
data.flagHaveAlert=0;
|
|
90
91
|
return data;
|
|
91
92
|
})
|
|
92
93
|
const headers = computed(() => {
|
|
@@ -97,7 +98,7 @@ function clickHandle() {
|
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
function handleAvatarSuccess(res) {
|
|
100
|
-
|
|
101
|
+
emit('importComplete', res, model.value);
|
|
101
102
|
}
|
|
102
103
|
function handleAvatarError(info) {
|
|
103
104
|
ElMessage({
|
|
@@ -15,9 +15,10 @@
|
|
|
15
15
|
<div style="display: flex; flex: 0 0 100%;" v-if="col.show !== false && col.lineFeed"></div>
|
|
16
16
|
<el-col v-if="col.show !== false" :span="col.colspan" style="padding:5px">
|
|
17
17
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
18
|
-
:parameterAction="model.parameterAction" v-bind="col.bindPara"
|
|
18
|
+
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
19
|
+
@change="changeHandler" @importComplete="importComplete"
|
|
19
20
|
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler"
|
|
20
|
-
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
21
|
+
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
21
22
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
22
23
|
</component>
|
|
23
24
|
</el-col>
|
|
@@ -30,7 +31,8 @@
|
|
|
30
31
|
<div style="display: flex; flex: 0 0 100%;" v-if="col.show !== false && col.lineFeed"></div>
|
|
31
32
|
<el-col v-if="col.show !== false" :span="col.colspan" style="padding:5px">
|
|
32
33
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
33
|
-
:parameterAction="model.parameterAction" v-bind="col.bindPara"
|
|
34
|
+
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
35
|
+
@change="changeHandler" @importComplete="importComplete"
|
|
34
36
|
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler"
|
|
35
37
|
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
36
38
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
@@ -49,9 +51,9 @@
|
|
|
49
51
|
v-if="col.show !== false && col.lineFeed"></div>
|
|
50
52
|
<el-col :span="col.colspan" v-if="col.show !== false" style="padding:5px">
|
|
51
53
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
52
|
-
:parameterAction="model.parameterAction" v-bind="col.bindPara"
|
|
54
|
+
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
53
55
|
@change="changeHandler" @fieldClick="fieldClickHandler"
|
|
54
|
-
@popupSearchList="popupSearchListHandler"
|
|
56
|
+
@popupSearchList="popupSearchListHandler" @importComplete="importComplete"
|
|
55
57
|
@popupGroupList="popupGroupListHandler" @tableButtonClick="clickHandler"
|
|
56
58
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
57
59
|
</component>
|
|
@@ -80,9 +82,9 @@
|
|
|
80
82
|
v-if="col.show !== false && col.lineFeed"></div>
|
|
81
83
|
<el-col :span="col.colspan" v-if="col.show !== false" style="padding:5px">
|
|
82
84
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
83
|
-
:parameterAction="model.parameterAction" v-bind="col.bindPara"
|
|
85
|
+
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
84
86
|
@change="changeHandler" @fieldClick="fieldClickHandler"
|
|
85
|
-
@popupSearchList="popupSearchListHandler"
|
|
87
|
+
@popupSearchList="popupSearchListHandler" @importComplete="importComplete"
|
|
86
88
|
@popupGroupList="popupGroupListHandler" @tableButtonClick="clickHandler"
|
|
87
89
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
88
90
|
</component>
|
|
@@ -98,8 +100,8 @@
|
|
|
98
100
|
<div style="display: flex; flex: 0 0 100%;" v-if="col.show !== false && col.lineFeed"></div>
|
|
99
101
|
<el-col v-if="col.show !== false" :span="col.colspan" style="padding:5px">
|
|
100
102
|
<component ref="Fields" :is="col.is" :vmodel="col" :parameterAction="model.parameterAction"
|
|
101
|
-
v-bind="col.bindPara" @change="changeHandler" :key="itemKey"
|
|
102
|
-
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler"
|
|
103
|
+
v-bind="col.bindPara" @change="changeHandler" :key="itemKey" :fileData="getFileData(col)"
|
|
104
|
+
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler" @importComplete="importComplete"
|
|
103
105
|
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
104
106
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
105
107
|
</component>
|
|
@@ -136,7 +138,7 @@
|
|
|
136
138
|
</div>
|
|
137
139
|
</template>
|
|
138
140
|
<script lang="ts" setup>
|
|
139
|
-
import { ref, nextTick, onUpdated } from 'vue'
|
|
141
|
+
import { ref, nextTick, onUpdated,onDeactivated } from 'vue'
|
|
140
142
|
import { RouterClickHandler } from '../../utils/mixins';
|
|
141
143
|
import common from '../../utils/common'
|
|
142
144
|
import Form from '../../loader/src/Form'
|
|
@@ -208,6 +210,9 @@ onUpdated(() => {
|
|
|
208
210
|
qrtimer.value = setTimeout(getisScroll, 100);
|
|
209
211
|
});
|
|
210
212
|
})
|
|
213
|
+
onDeactivated(() => {
|
|
214
|
+
downloadUrl.value=''
|
|
215
|
+
})
|
|
211
216
|
init()
|
|
212
217
|
//初始化数据
|
|
213
218
|
function init() {
|
|
@@ -383,7 +388,139 @@ function changeCallBackHandler(field, callBackFunName, callBackPara) {
|
|
|
383
388
|
common.excuteFunStr.call(model.value.scripts, callBackFunName, callBackPara);
|
|
384
389
|
}
|
|
385
390
|
}
|
|
391
|
+
//导入
|
|
392
|
+
function importComplete(res, field) {
|
|
393
|
+
if (res && res.rtnCode && res.rtnCode === 201) {
|
|
394
|
+
if (res.rtnMsg) {
|
|
395
|
+
ElMessage({
|
|
396
|
+
message: res.rtnMsg,
|
|
397
|
+
type: 'warning',
|
|
398
|
+
showClose: true,
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
else if (res && res.rtnCode && res.rtnCode === 202 && res.rtnMsg) {
|
|
404
|
+
common.confirm(res.rtnMsg, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
386
405
|
|
|
406
|
+
})
|
|
407
|
+
.catch(() => {
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
if (field.flagAsync) {
|
|
411
|
+
if (res.rtnCode && res.rtnCode === 202 && res.rtnMsg) {
|
|
412
|
+
common.confirm(res.rtnMsg, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
413
|
+
if (res.content && res.content.action) {
|
|
414
|
+
var dialogOption = {
|
|
415
|
+
title: field.pageTitle || field.label,
|
|
416
|
+
content: [{
|
|
417
|
+
component: 'ct-progress',
|
|
418
|
+
width: '350px',
|
|
419
|
+
height: '165px',
|
|
420
|
+
attrs: {
|
|
421
|
+
progressAction: res.content.action,
|
|
422
|
+
progressKey: res.content.key,
|
|
423
|
+
progressType: 'import',
|
|
424
|
+
onFinished(data) {
|
|
425
|
+
common.closeDialog(dialogOption);
|
|
426
|
+
if (field.isExport) {
|
|
427
|
+
if (data.content.indexOf(".zip") > -1) {
|
|
428
|
+
window.location.href = encodeURI(data.content);
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
if (data.content.indexOf("?") > -1) {
|
|
432
|
+
downloadUrl.value = data.content + "&" + Math.random();
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
downloadUrl.value = data.content + "?" + Math.random();
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
if (data.rtnMsg) {
|
|
440
|
+
ElMessage({
|
|
441
|
+
message: data.rtnMsg,
|
|
442
|
+
type: 'success',
|
|
443
|
+
showClose: true,
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
getPage(1, false);
|
|
447
|
+
},
|
|
448
|
+
onError(data) {
|
|
449
|
+
common.closeDialog(dialogOption);
|
|
450
|
+
ElMessage({
|
|
451
|
+
message: data.rtnMsg,
|
|
452
|
+
type: 'warning',
|
|
453
|
+
showClose: true,
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
}]
|
|
458
|
+
};
|
|
459
|
+
common.openDialog(dialogOption);
|
|
460
|
+
}
|
|
461
|
+
})
|
|
462
|
+
.catch(() => { });
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
if (res.content && res.content.action) {
|
|
466
|
+
var dialogOption = {
|
|
467
|
+
title: field.pageTitle || field.label,
|
|
468
|
+
content: [{
|
|
469
|
+
component: 'ct-progress',
|
|
470
|
+
width: '350px',
|
|
471
|
+
height: '165px',
|
|
472
|
+
attrs: {
|
|
473
|
+
progressAction: res.content.action,
|
|
474
|
+
progressKey: res.content.key,
|
|
475
|
+
progressType: 'import',
|
|
476
|
+
onFinished(data) {
|
|
477
|
+
common.closeDialog(dialogOption);
|
|
478
|
+
if (field.isExport) {
|
|
479
|
+
if (data.content.indexOf(".zip") > -1) {
|
|
480
|
+
window.location.href = encodeURI(data.content);
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
if (data.content.indexOf("?") > -1) {
|
|
484
|
+
downloadUrl.value = data.content + "&" + Math.random();
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
downloadUrl.value = data.content + "?" + Math.random();
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
if (data.rtnMsg) {
|
|
492
|
+
ElMessage({
|
|
493
|
+
message: data.rtnMsg,
|
|
494
|
+
type: 'success',
|
|
495
|
+
showClose: true,
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
getPage(1, false);
|
|
499
|
+
},
|
|
500
|
+
onError(data) {
|
|
501
|
+
common.closeDialog(dialogOption);
|
|
502
|
+
ElMessage({
|
|
503
|
+
message: data.rtnMsg,
|
|
504
|
+
type: 'warning',
|
|
505
|
+
showClose: true,
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
}]
|
|
510
|
+
};
|
|
511
|
+
common.openDialog(dialogOption);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
else {
|
|
516
|
+
if (field && field.callBackFunName) {
|
|
517
|
+
changeCallBackHandler(field, field.callBackFunName, res.content);
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
model.doAction(res)
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
387
524
|
//弹出选择列表
|
|
388
525
|
function popupSearchListHandler(singleSelectio, field, router, callBack) {
|
|
389
526
|
Form.popupSearchListHandler(singleSelectio, field, router, model.value, Fields.value, props, callBack)
|
|
@@ -78,6 +78,35 @@
|
|
|
78
78
|
</div>
|
|
79
79
|
<el-table :data="model.tableData" border :show-summary="model.showSummary"
|
|
80
80
|
:summary-method="getSummaries" style="width: 100%" highlight-current-row>
|
|
81
|
+
<template v-if="model.rowActionRoutersAlign === 1">
|
|
82
|
+
<el-table-column label="操作"
|
|
83
|
+
v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :width="'100%'">
|
|
84
|
+
<template #header="{ column, $index }">
|
|
85
|
+
{{ setcolumnminWidth(column) }}
|
|
86
|
+
<span style="width:auto; white-space: nowrap;">{{ column.label }}</span>
|
|
87
|
+
</template>
|
|
88
|
+
<template #default="scope">
|
|
89
|
+
<el-tag :disable-transitions="true" v-if="scope.row.edit || scope.row.isSet" type="success"
|
|
90
|
+
@click="saveRow(scope.row, scope.$index, true)" style="cursor: pointer;">{{
|
|
91
|
+
scope.row.isSet
|
|
92
|
+
?
|
|
93
|
+
'保存' :
|
|
94
|
+
"修改" }}</el-tag>
|
|
95
|
+
<el-tag :disable-transitions="true" v-if="scope.row.delete && !scope.row.isSet"
|
|
96
|
+
style="cursor: pointer;" type="danger"
|
|
97
|
+
@click="deleteRow(scope.$index, scope.row.$sourceIndex)">删除</el-tag>
|
|
98
|
+
<el-tag :disable-transitions="true" v-else-if="scope.row.isSet"
|
|
99
|
+
@click="saveRow(scope.row, scope.$index, false)" style="cursor: pointer;">取消</el-tag>
|
|
100
|
+
<template v-for="(v, i) in model.buttons">
|
|
101
|
+
<el-tag
|
|
102
|
+
v-if="!scope.row.isSet && v.show && (!v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1)"
|
|
103
|
+
style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label }} 1</el-tag>
|
|
104
|
+
|
|
105
|
+
</template>
|
|
106
|
+
|
|
107
|
+
</template>
|
|
108
|
+
</el-table-column>
|
|
109
|
+
</template>
|
|
81
110
|
<template v-for="(v, i) in model.rows[0].field" :key="i">
|
|
82
111
|
<el-table-column :prop="v.fieldName1" :label="v.controlLabel" :width="v.width"
|
|
83
112
|
:fixed="model.frozenColumns.includes(v.fieldName1)"
|
|
@@ -107,7 +136,8 @@
|
|
|
107
136
|
</template>
|
|
108
137
|
</el-table-column>
|
|
109
138
|
</template>
|
|
110
|
-
<
|
|
139
|
+
<template v-if="model.rowActionRoutersAlign !== 1">
|
|
140
|
+
<el-table-column label="操作"
|
|
111
141
|
v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :width="'100%'">
|
|
112
142
|
<template #header="{ column, $index }">
|
|
113
143
|
{{ setcolumnminWidth(column) }}
|
|
@@ -133,7 +163,8 @@
|
|
|
133
163
|
</template>
|
|
134
164
|
|
|
135
165
|
</template>
|
|
136
|
-
|
|
166
|
+
</el-table-column>
|
|
167
|
+
</template>
|
|
137
168
|
<template #empty>
|
|
138
169
|
{{ common.LocalizedString('暂无数据', '暫無數據') }}
|
|
139
170
|
</template>
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
</div>
|
|
230
230
|
</template>
|
|
231
231
|
<script setup lang="ts">
|
|
232
|
-
import { ref, nextTick, onActivated } from 'vue'
|
|
232
|
+
import { ref, nextTick, onActivated, onDeactivated } from 'vue'
|
|
233
233
|
import common from '../../../utils/common'
|
|
234
234
|
import request from '../../../utils/request'
|
|
235
235
|
import SearchStats from './SearchStats.vue';
|
|
@@ -349,6 +349,9 @@ onActivated(() => {
|
|
|
349
349
|
setTableHeight();
|
|
350
350
|
})
|
|
351
351
|
})
|
|
352
|
+
onDeactivated(() => {
|
|
353
|
+
downloadUrl.value=''
|
|
354
|
+
})
|
|
352
355
|
|
|
353
356
|
//查询数据
|
|
354
357
|
function searchComplate(m, defaultSearch) {
|
|
@@ -585,13 +588,19 @@ function importComplete(res, field) {
|
|
|
585
588
|
}
|
|
586
589
|
else {
|
|
587
590
|
if (field && field.callBackFunName) {
|
|
588
|
-
|
|
591
|
+
changeCallBackHandler(field, field.callBackFunName, res.content);
|
|
589
592
|
}
|
|
590
593
|
else {
|
|
591
|
-
|
|
594
|
+
doAction(res)
|
|
592
595
|
}
|
|
593
596
|
}
|
|
594
597
|
}
|
|
598
|
+
function changeCallBackHandler(field, callBackFunName, callBackPara) {
|
|
599
|
+
if (callBackFunName) {
|
|
600
|
+
model.value.scripts.$fd = field.id;
|
|
601
|
+
common.excuteFunStr.call(model.value.scripts, callBackFunName, callBackPara);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
595
604
|
//计算数据合并行
|
|
596
605
|
function tdRowspan(column, row) {
|
|
597
606
|
if (!column.show) {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</div>
|
|
54
54
|
</template>
|
|
55
55
|
<script setup lang="ts">
|
|
56
|
-
import { ref, nextTick } from 'vue'
|
|
56
|
+
import { ref, nextTick,onDeactivated } from 'vue'
|
|
57
57
|
import SearchScreen from '../../loader/src/SearchScreen'
|
|
58
58
|
import Form from '../../loader/src/Form'
|
|
59
59
|
import Enum from '../../utils/Enum'
|
|
@@ -86,6 +86,11 @@ const highScreen = ref(false)
|
|
|
86
86
|
const model = ref({ searchData: {} })
|
|
87
87
|
const Fields = ref()
|
|
88
88
|
const downloadUrl = ref('')
|
|
89
|
+
|
|
90
|
+
onDeactivated(() => {
|
|
91
|
+
downloadUrl.value=''
|
|
92
|
+
})
|
|
93
|
+
|
|
89
94
|
searchComplate()
|
|
90
95
|
//初始化数据
|
|
91
96
|
function searchComplate(flagLoad) {
|
package/src/loader/src/Field.js
CHANGED
|
@@ -964,7 +964,7 @@ const Base = function (source, moreActionRouter) {
|
|
|
964
964
|
getFormParentFieldPara() {
|
|
965
965
|
if (rtn.form && typeof rtn.parentFields !== 'undefined' && rtn.parentFields.length > 0) {
|
|
966
966
|
if (typeof rtn.form.getRefFieldPara === 'function') {
|
|
967
|
-
return rtn.form.getParentFieldPara(rtn.parentFields);
|
|
967
|
+
return rtn.form.getParentFieldPara(rtn.parentFields,rtn.form);
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
970
|
return null;
|
package/src/loader/src/Form.js
CHANGED
|
@@ -706,6 +706,9 @@ function loadFromModel(source, isFormList) {
|
|
|
706
706
|
get tip() {
|
|
707
707
|
return source.tip;
|
|
708
708
|
},
|
|
709
|
+
get flagAlertCloseWindowAfterSave() {
|
|
710
|
+
return source.flagAlertCloseWindowAfterSave === true;
|
|
711
|
+
},
|
|
709
712
|
//获取表单数据
|
|
710
713
|
getFormObj() {
|
|
711
714
|
var rtnFormObj = {};
|
|
@@ -754,7 +757,7 @@ function loadFromModel(source, isFormList) {
|
|
|
754
757
|
return submitData;
|
|
755
758
|
},
|
|
756
759
|
//获取父级关联数据
|
|
757
|
-
getParentFieldPara(parentFieldNameArr) {
|
|
760
|
+
getParentFieldPara(parentFieldNameArr,model) {
|
|
758
761
|
let submitData = {};
|
|
759
762
|
var tempFormData = rtn.getFormObj();
|
|
760
763
|
parentFieldNameArr.forEach((v) => {
|
|
@@ -324,7 +324,13 @@ function FormListModel(source, master,actionRouters) {
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
return relfields;
|
|
327
|
-
}
|
|
327
|
+
},
|
|
328
|
+
get rowActionRoutersAlign(){
|
|
329
|
+
if(source.rowActionRoutersAlign != undefined && source.rowActionRoutersAlign != null && source.rowActionRoutersAlign != ""){
|
|
330
|
+
return source.rowActionRoutersAlign;
|
|
331
|
+
}
|
|
332
|
+
return 2;
|
|
333
|
+
},
|
|
328
334
|
};
|
|
329
335
|
return rtn;
|
|
330
336
|
}
|
package/src/main.js
CHANGED
|
@@ -21,12 +21,12 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
app.use(centaline, {
|
|
24
|
-
|
|
25
|
-
baseUrl: "http://10.88.22.66:6060/xian/",
|
|
24
|
+
baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
|
|
25
|
+
//baseUrl: "http://10.88.22.66:6060/xian/",
|
|
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,8 +63,8 @@ app.use(centaline, {
|
|
|
63
63
|
return {
|
|
64
64
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
65
65
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
66
|
-
authObject: '{token:"1-
|
|
67
|
-
|
|
66
|
+
//authObject: '{token:"1-a7289bb2-9f1e-4a04-9016-1e555bf39188"}',
|
|
67
|
+
authObject: '{EmpID:"Token_77affd14-db50-46dd-be3f-4354dfe6ff07",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_77affd14-db50-46dd-be3f-4354dfe6ff07",Platform:"IOS"}',
|
|
68
68
|
};
|
|
69
69
|
},
|
|
70
70
|
// 请求完成事件,可判断是否登录过期执行响应操作
|
package/src/utils/common.js
CHANGED
package/src/utils/mixins.js
CHANGED
|
@@ -140,8 +140,6 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
140
140
|
verified = model.$vue.validExcute();
|
|
141
141
|
}
|
|
142
142
|
if (verified) {
|
|
143
|
-
|
|
144
|
-
|
|
145
143
|
if (verified) {
|
|
146
144
|
//action有值,提交到后台
|
|
147
145
|
if (field.action) {
|
|
@@ -189,7 +187,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
189
187
|
common.message(data.rtnMsg, 'success')
|
|
190
188
|
}
|
|
191
189
|
if (data.notification === Enum.ActionType.Router) {
|
|
192
|
-
if (common.dialogList && common.dialogList.List.length > 0
|
|
190
|
+
if (common.dialogList && common.dialogList.List.value.length > 0
|
|
193
191
|
&& (data.content.pageStyle === Enum.PageStyle.FormPageInLayer || data.content.pageStyle === Enum.PageStyle.SearchPageInLayer)) {
|
|
194
192
|
}
|
|
195
193
|
else {
|
|
@@ -256,7 +254,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
256
254
|
common.message(data.rtnMsg, 'success')
|
|
257
255
|
}
|
|
258
256
|
if (data.notification === Enum.ActionType.Router) {
|
|
259
|
-
if (common.dialogList && common.dialogList.List.length > 0
|
|
257
|
+
if (common.dialogList && common.dialogList.List.value.length > 0
|
|
260
258
|
&& (data.content.pageStyle === Enum.PageStyle.FormPageInLayer || data.content.pageStyle === Enum.PageStyle.SearchPageInLayer)) {
|
|
261
259
|
}
|
|
262
260
|
else {
|
|
@@ -300,21 +298,21 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
300
298
|
model.pageDisabled = false;
|
|
301
299
|
if (data.rtnCode === Enum.ReturnCode.Successful) {
|
|
302
300
|
if (data.notification === Enum.ActionType.Router) {
|
|
303
|
-
if (common.dialogList && common.dialogList.List.length > 0
|
|
301
|
+
if (common.dialogList && common.dialogList.List.value.length > 0
|
|
304
302
|
&& (data.content.pageStyle === Enum.PageStyle.FormPageInLayer || data.content.pageStyle === Enum.PageStyle.SearchPageInLayer)) {
|
|
305
303
|
}
|
|
306
304
|
else {
|
|
307
305
|
model.$vue.clickHandler(model.getRtnRouter(data.content), null)
|
|
308
306
|
}
|
|
309
307
|
}
|
|
310
|
-
if (model.
|
|
308
|
+
if (model.flagAlertCloseWindowAfterSave) {
|
|
311
309
|
common.confirm('操作成功,是否关闭本页面?', '提示', {
|
|
312
310
|
confirmButtonText: '确定',
|
|
313
311
|
cancelButtonText: '取消',
|
|
314
312
|
type: 'warning'
|
|
315
313
|
}).then(() => {
|
|
316
314
|
//如果没有弹框 则关闭tab页
|
|
317
|
-
if (common.dialogList && common.dialogList.List.length === 0) {
|
|
315
|
+
if (common.dialogList && common.dialogList.List.value.length === 0) {
|
|
318
316
|
if (typeof common.getDataDrivenOpts().handler.closeTab === 'function') {
|
|
319
317
|
common.getDataDrivenOpts().handler.closeTab(data);
|
|
320
318
|
}
|
|
@@ -347,7 +345,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
347
345
|
field.doAction(model.$vue.getFormObj({ flagHaveAlert: '1' }), (res) => {
|
|
348
346
|
if (res.rtnCode === Enum.ReturnCode.Successful) {
|
|
349
347
|
if (res.notification === Enum.ActionType.Router) {
|
|
350
|
-
if (common.dialogList && common.dialogList.List.length > 0
|
|
348
|
+
if (common.dialogList && common.dialogList.List.value.length > 0
|
|
351
349
|
&& (res.content.pageStyle === Enum.PageStyle.FormPageInLayer || res.content.pageStyle === Enum.PageStyle.SearchPageInLayer)) {
|
|
352
350
|
}
|
|
353
351
|
else {
|
|
@@ -1008,7 +1006,7 @@ export function RouterMouseenterHandler(field, submitData, action, model, source
|
|
|
1008
1006
|
common.message(data.rtnMsg, 'success')
|
|
1009
1007
|
}
|
|
1010
1008
|
if (data.notification === Enum.ActionType.Router) {
|
|
1011
|
-
if (common.dialogList && common.dialogList.List.length > 0
|
|
1009
|
+
if (common.dialogList && common.dialogList.List.value.length > 0
|
|
1012
1010
|
&& (data.content.pageStyle === Enum.PageStyle.FormPageInLayer || data.content.pageStyle === Enum.PageStyle.SearchPageInLayer)) {
|
|
1013
1011
|
}
|
|
1014
1012
|
else {
|
|
@@ -1069,7 +1067,7 @@ export function RouterMouseenterHandler(field, submitData, action, model, source
|
|
|
1069
1067
|
common.message(data.rtnMsg, 'success')
|
|
1070
1068
|
}
|
|
1071
1069
|
if (data.notification === Enum.ActionType.Router) {
|
|
1072
|
-
if (common.dialogList && common.dialogList.List.length > 0
|
|
1070
|
+
if (common.dialogList && common.dialogList.List.value.length > 0
|
|
1073
1071
|
&& (data.content.pageStyle === Enum.PageStyle.FormPageInLayer || data.content.pageStyle === Enum.PageStyle.SearchPageInLayer)) {
|
|
1074
1072
|
}
|
|
1075
1073
|
else {
|
|
@@ -1111,14 +1109,14 @@ export function RouterMouseenterHandler(field, submitData, action, model, source
|
|
|
1111
1109
|
model.$vue.clickHandler(model.getRtnRouter(data.content), null)
|
|
1112
1110
|
}
|
|
1113
1111
|
}
|
|
1114
|
-
if (model.
|
|
1112
|
+
if (model.flagAlertCloseWindowAfterSave) {
|
|
1115
1113
|
common.confirm('操作成功,是否关闭本页面?', '提示', {
|
|
1116
1114
|
confirmButtonText: '确定',
|
|
1117
1115
|
cancelButtonText: '取消',
|
|
1118
1116
|
type: 'warning'
|
|
1119
1117
|
}).then(() => {
|
|
1120
1118
|
//如果没有弹框 则关闭tab页
|
|
1121
|
-
if (common.dialogList && common.dialogList.List.length === 0) {
|
|
1119
|
+
if (common.dialogList && common.dialogList.List.value.length === 0) {
|
|
1122
1120
|
if (typeof common.getDataDrivenOpts().handler.closeTab === 'function') {
|
|
1123
1121
|
common.getDataDrivenOpts().handler.closeTab(data);
|
|
1124
1122
|
}
|
|
@@ -1151,7 +1149,7 @@ export function RouterMouseenterHandler(field, submitData, action, model, source
|
|
|
1151
1149
|
field.doAction(model.$vue.getFormObj({ flagHaveAlert: '1' }), (res) => {
|
|
1152
1150
|
if (res.rtnCode === Enum.ReturnCode.Successful) {
|
|
1153
1151
|
if (res.notification === Enum.ActionType.Router) {
|
|
1154
|
-
if (common.dialogList && common.dialogList.List.length > 0
|
|
1152
|
+
if (common.dialogList && common.dialogList.List.value.length > 0
|
|
1155
1153
|
&& (res.content.pageStyle === Enum.PageStyle.FormPageInLayer || res.content.pageStyle === Enum.PageStyle.SearchPageInLayer)) {
|
|
1156
1154
|
}
|
|
1157
1155
|
else {
|