centaline-data-driven-v3 0.0.89 → 0.0.91
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 +135 -135
- package/package.json +1 -1
- package/src/assets/commonApp.css +1 -0
- package/src/components/Layout/LayoutMore.vue +2 -1
- package/src/components/app/ComboBox.vue +3 -3
- package/src/components/app/Form.vue +16 -19
- package/src/components/app/FormList.vue +20 -0
- package/src/components/app/PhotoSelectList.vue +17 -6
- package/src/components/app/SearchList/SearchTable.vue +36 -20
- package/src/components/app/Span.vue +2 -2
- package/src/components/app/TextBox.vue +1 -1
- package/src/components/app/dialog.vue +1 -1
- package/src/components/app/searchScreen.vue +53 -28
- package/src/components/common/iframe.vue +4 -1
- package/src/components/web/AIChat.vue +2 -2
- package/src/components/web/ComboBox.vue +15 -6
- package/src/components/web/File.vue +16 -4
- package/src/components/web/Form.vue +27 -7
- package/src/components/web/FormList.vue +55 -28
- package/src/components/web/MapBaidu.vue +10 -2
- package/src/components/web/PhotoSelect.vue +10 -2
- package/src/components/web/Progress.vue +17 -3
- package/src/components/web/SearchList/SearchTable.vue +15 -5
- package/src/components/web/SearchList.vue +5 -4
- package/src/components/web/SearchScreen.vue +16 -6
- package/src/components/web/Span.vue +2 -2
- package/src/components/web/Tree/Tree.vue +11 -4
- package/src/components/web/Tree.vue +11 -2
- package/src/components/web/ViewerFile.vue +7 -2
- package/src/components/web/appContainer.vue +4 -1
- package/src/components/web/dialog.vue +5 -2
- package/src/components/web/other/PopupSearchListTable.vue +6 -1
- package/src/components/web/photo.vue +16 -3
- package/src/loader/src/CheckBoxList.js +18 -7
- package/src/loader/src/Field.js +5 -0
- package/src/loader/src/Form.js +24 -14
- package/src/loader/src/SearchScreen.js +447 -1
- package/src/main.js +3 -3
- package/src/utils/common.js +4 -1
- package/src/utils/mixins.js +13 -21
- package/src/utils/request.js +10 -5
- package/src/views/SearchList.vue +6 -6
|
@@ -188,7 +188,8 @@ const UploadhttpRequest = ref({})
|
|
|
188
188
|
const startfile = ref();
|
|
189
189
|
const endfile = ref();
|
|
190
190
|
const model = ref(null);
|
|
191
|
-
|
|
191
|
+
const qrtimer1=ref(null)
|
|
192
|
+
const qrtimer2=ref(null)
|
|
192
193
|
|
|
193
194
|
const headers = computed(() => {
|
|
194
195
|
return common.getDataDrivenOpts().handler.getRequestHeaders();
|
|
@@ -268,7 +269,7 @@ function handleRemove(file) {
|
|
|
268
269
|
}).then(() => {
|
|
269
270
|
File.deleteFile(file, false, model.value);
|
|
270
271
|
selfValidExcute("remove");
|
|
271
|
-
setTimeout(() => {
|
|
272
|
+
qrtimer1.value = setTimeout(() => {
|
|
272
273
|
QRCodeLocate();
|
|
273
274
|
}, 1080);
|
|
274
275
|
|
|
@@ -329,7 +330,7 @@ function uploadProcess(event, file, fileList) {
|
|
|
329
330
|
file.loadProgress = parseInt(event.percent); // 动态获取文件上传进度
|
|
330
331
|
if (file.loadProgress >= 100) {
|
|
331
332
|
file.loadProgress = 100;
|
|
332
|
-
setTimeout(() => {
|
|
333
|
+
qrtimer2.value = setTimeout(() => {
|
|
333
334
|
file.progressFlag = false;
|
|
334
335
|
}, 1000); // 一秒后关闭进度条
|
|
335
336
|
}
|
|
@@ -667,10 +668,21 @@ function ListenerPaste(event) {
|
|
|
667
668
|
document.addEventListener('paste', ListenerPaste);
|
|
668
669
|
onBeforeUnmount(() => {
|
|
669
670
|
//销毁定时上传
|
|
670
|
-
|
|
671
|
+
if (model.value.qrtimer) {
|
|
672
|
+
clearTimeout(model.value.qrtimer);
|
|
673
|
+
model.value.qrtimer = null;
|
|
674
|
+
}
|
|
671
675
|
window.removeEventListener('scroll', model.value.QRCodeLocate, true)
|
|
672
676
|
//销毁贴事件监听器
|
|
673
677
|
document.removeEventListener('paste', ListenerPaste)
|
|
678
|
+
if (qrtimer1.value) {
|
|
679
|
+
clearTimeout(qrtimer1.value);
|
|
680
|
+
qrtimer1.value = null;
|
|
681
|
+
}
|
|
682
|
+
if (qrtimer2.value) {
|
|
683
|
+
clearTimeout(qrtimer2.value);
|
|
684
|
+
qrtimer2.value = null;
|
|
685
|
+
}
|
|
674
686
|
})
|
|
675
687
|
|
|
676
688
|
defineExpose({
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
</div>
|
|
185
185
|
</template>
|
|
186
186
|
<script lang="ts" setup>
|
|
187
|
-
import { ref, nextTick, onUpdated, onDeactivated, onMounted } from 'vue'
|
|
187
|
+
import { ref, nextTick, onUpdated, onDeactivated, onMounted, onBeforeUnmount } from 'vue'
|
|
188
188
|
import { RouterClickHandler } from '../../utils/mixins';
|
|
189
189
|
import common from '../../utils/common'
|
|
190
190
|
import Form from '../../loader/src/Form'
|
|
@@ -240,8 +240,8 @@ const props = defineProps({
|
|
|
240
240
|
return [];
|
|
241
241
|
},
|
|
242
242
|
},
|
|
243
|
-
dialogHeight:
|
|
244
|
-
dialoWidth:
|
|
243
|
+
dialogHeight: Number,
|
|
244
|
+
dialoWidth: Number,
|
|
245
245
|
})
|
|
246
246
|
|
|
247
247
|
const itemKey = ref(1)
|
|
@@ -253,15 +253,35 @@ const isScroll = ref(false)
|
|
|
253
253
|
const isWebScroll = ref(false)
|
|
254
254
|
const Fields = ref()
|
|
255
255
|
const refForm = ref()
|
|
256
|
-
const qrtimer = ref(null)
|
|
257
256
|
const downloadUrl = ref('')
|
|
258
257
|
const minHeight = ref('auto')
|
|
259
258
|
const showAI = ref(false);
|
|
260
259
|
const dialogHeight = ref(props.dialogHeight || (window.innerHeight - 60));
|
|
261
260
|
|
|
261
|
+
const qrtimer1 = ref(null)
|
|
262
|
+
const qrtimer2=ref(null)
|
|
263
|
+
onBeforeUnmount(()=>{
|
|
264
|
+
if (model.value && typeof model.value.scripts !== 'undefined') {
|
|
265
|
+
model.value.scripts.formData.form = null;
|
|
266
|
+
model.value.scripts.formData.excuteData = null;
|
|
267
|
+
model.value.scripts.formData.fieldsDic = null;
|
|
268
|
+
model.value.scripts.formData = null;
|
|
269
|
+
}
|
|
270
|
+
refForm.value = null;
|
|
271
|
+
model.value = null;
|
|
272
|
+
if (qrtimer1.value) {
|
|
273
|
+
clearTimeout(qrtimer1.value);
|
|
274
|
+
qrtimer1.value = null;
|
|
275
|
+
}
|
|
276
|
+
if (qrtimer2.value) {
|
|
277
|
+
clearTimeout(qrtimer2.value);
|
|
278
|
+
qrtimer2.value = null;
|
|
279
|
+
}
|
|
280
|
+
})
|
|
281
|
+
|
|
262
282
|
onUpdated(() => {
|
|
263
283
|
nextTick(() => {
|
|
264
|
-
|
|
284
|
+
qrtimer1.value = setTimeout(getisScroll, 100);
|
|
265
285
|
});
|
|
266
286
|
})
|
|
267
287
|
onDeactivated(() => {
|
|
@@ -330,7 +350,7 @@ function doAction(data) {
|
|
|
330
350
|
//判断是否有滚动条
|
|
331
351
|
function getisScroll() {
|
|
332
352
|
if (Fields.value) {
|
|
333
|
-
|
|
353
|
+
if(qrtimer1.value)clearTimeout(qrtimer1.value);
|
|
334
354
|
if (refForm.value) {
|
|
335
355
|
let parentDom = refForm.value.parentElement;
|
|
336
356
|
if (parentDom.id == "app-form" && parentDom.scrollHeight > window.innerHeight) {
|
|
@@ -385,7 +405,7 @@ function validExcute() {
|
|
|
385
405
|
model.value.collapseActiveNames.push(f.model.collapseName);
|
|
386
406
|
timeOut = 300;//展开折叠有个时间并影响滚动条位置,故需要延迟
|
|
387
407
|
}
|
|
388
|
-
setTimeout(function () {
|
|
408
|
+
qrtimer2.value = setTimeout(function () {
|
|
389
409
|
if (f.model.controlType == Enum.ControlType.List) {
|
|
390
410
|
if (f.$el.offsetParent) {
|
|
391
411
|
let total = f.$el.offsetParent.offsetTop;
|
|
@@ -72,21 +72,25 @@
|
|
|
72
72
|
<h5>{{ model.controlLabel }}</h5>
|
|
73
73
|
</div>
|
|
74
74
|
<div class="list-button">
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
75
|
+
<template v-if="!model.tableDisabled">
|
|
76
|
+
<ul>
|
|
77
|
+
<li v-for="(v, i) in model.toolButtonsShow">
|
|
78
|
+
<component :is="v.is" :vmodel="v" :parentModel="model" @fieldClick="toolButtonsClick"
|
|
79
|
+
@importComplete="importComplete" @change="toolButtonsChangeHandler(v, $event)">
|
|
80
|
+
</component>
|
|
81
|
+
</li>
|
|
82
|
+
<li v-if="model.selectRouter !== null">
|
|
83
|
+
<component :is="model.selectRouter.is" :vmodel="model.selectRouter"
|
|
84
|
+
@click="popupSearchListHandle(model.selectRouter)"></component>
|
|
85
|
+
</li>
|
|
86
|
+
<li v-if="model.create">
|
|
87
|
+
<el-button :disabled="model.disabled" class="btn-add" type="success"
|
|
88
|
+
style="width: auto;" size="small" :icon="CirclePlus" @click="addRow">
|
|
89
|
+
{{ model.createText }}
|
|
90
|
+
</el-button>
|
|
91
|
+
</li>
|
|
92
|
+
</ul>
|
|
93
|
+
</template>
|
|
90
94
|
</div>
|
|
91
95
|
<el-table :data="model.tableData" border :show-summary="model.showSummary"
|
|
92
96
|
:summary-method="getSummaries" style="width: 100%" highlight-current-row>
|
|
@@ -113,8 +117,10 @@
|
|
|
113
117
|
@click="saveRow(scope.row, scope.$index, false)"
|
|
114
118
|
style="cursor: pointer;">取消</el-tag>
|
|
115
119
|
<template v-for="(v, i) in model.buttons">
|
|
116
|
-
<el-tag
|
|
117
|
-
|
|
120
|
+
<el-tag
|
|
121
|
+
v-if="!scope.row.isSet && v.show && (!v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1)"
|
|
122
|
+
style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label
|
|
123
|
+
}}</el-tag>
|
|
118
124
|
</template>
|
|
119
125
|
</template>
|
|
120
126
|
</el-table-column>
|
|
@@ -141,8 +147,9 @@
|
|
|
141
147
|
</span>
|
|
142
148
|
<!--可点击的列-->
|
|
143
149
|
<span v-else-if="v.router" :class="'cell'" style="display: flex;">
|
|
144
|
-
|
|
145
|
-
|
|
150
|
+
<Tablecurrency :router="v.router" :colValue="scope.row[v.fieldName1].code1"
|
|
151
|
+
:rowData="scope.row" @click="rolRouterClickHandler">
|
|
152
|
+
</Tablecurrency>
|
|
146
153
|
</span>
|
|
147
154
|
<ct-span v-else-if="scope.row[v.fieldName1]" :vmodel="scope.row[v.fieldName1]"
|
|
148
155
|
:rowNum="scope.row.$sourceIndex" :rowData="scope.row"></ct-span>
|
|
@@ -172,8 +179,10 @@
|
|
|
172
179
|
@click="saveRow(scope.row, scope.$index, false)"
|
|
173
180
|
style="cursor: pointer;">取消</el-tag>
|
|
174
181
|
<template v-for="(v, i) in model.buttons">
|
|
175
|
-
<el-tag
|
|
176
|
-
|
|
182
|
+
<el-tag
|
|
183
|
+
v-if="!scope.row.isSet && v.show && (!v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1)"
|
|
184
|
+
style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label
|
|
185
|
+
}}</el-tag>
|
|
177
186
|
</template>
|
|
178
187
|
</template>
|
|
179
188
|
</el-table-column>
|
|
@@ -424,9 +433,26 @@ function getSummaries(param) {
|
|
|
424
433
|
function fieldsValidExcute() {
|
|
425
434
|
var rtnBool = true;
|
|
426
435
|
var i = 0;
|
|
436
|
+
var controlLabel = model.value.controlLabel;
|
|
437
|
+
//如果当前组件的controlLabel为空 取上一个分组组的controlLabel
|
|
438
|
+
if (!model.value.controlLabel) {
|
|
439
|
+
if (model.value.form && model.value.form.fields) {
|
|
440
|
+
const currentIndex = model.value.form.fields.findIndex(v => v.fieldName1 === model.value.fieldName1);
|
|
441
|
+
if (currentIndex - 1 >= 0) {
|
|
442
|
+
if (model.value.form.fields[currentIndex - 1].controlType == Enum.ControlType.Group){
|
|
443
|
+
controlLabel = model.value.form.fields[currentIndex - 1].controlLabel;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
427
448
|
if (model.value.required) {
|
|
428
449
|
if (model.value.tableData.length == 0) {
|
|
429
|
-
|
|
450
|
+
if (controlLabel) {
|
|
451
|
+
model.value.displayValidMessage = common.LocalizedString('请填写', '請填寫') + '[' + controlLabel + ']'
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
model.value.displayValidMessage = '表格不能为空'
|
|
455
|
+
}
|
|
430
456
|
return false;
|
|
431
457
|
}
|
|
432
458
|
}
|
|
@@ -495,23 +521,23 @@ function setcolumnminWidth(column) {
|
|
|
495
521
|
function buttonClick(row, button) {
|
|
496
522
|
var submitData = {};
|
|
497
523
|
button.submitFormField.forEach((v) => {
|
|
498
|
-
submitData[v] = common.getDataOfUpperLower(row,v).code1;
|
|
524
|
+
submitData[v] = common.getDataOfUpperLower(row, v).code1;
|
|
499
525
|
});
|
|
500
526
|
model.value.currentRowIndex = model.value.source.rows.findIndex(v => v.$sourceIndex === row.$sourceIndex);
|
|
501
527
|
|
|
502
528
|
emit('tableButtonClick', button, submitData);
|
|
503
529
|
}
|
|
504
|
-
function rolRouterClickHandler(field, rowData,rowindex) {
|
|
505
|
-
|
|
530
|
+
function rolRouterClickHandler(field, rowData, rowindex) {
|
|
531
|
+
buttonClick(rowData, field);
|
|
506
532
|
}
|
|
507
533
|
function toolButtonsClick(field) {
|
|
508
|
-
|
|
534
|
+
emit('tableButtonClick', field, null);
|
|
509
535
|
}
|
|
510
536
|
function toolButtonsChangeHandler(field) {
|
|
511
|
-
|
|
537
|
+
emit('change', field);
|
|
512
538
|
}
|
|
513
539
|
function importComplete(res, button) {
|
|
514
|
-
|
|
540
|
+
emit('importComplete', res, button);
|
|
515
541
|
}
|
|
516
542
|
function insertOrUpdateRow(row) {
|
|
517
543
|
FormList.insertOrUpdateRow(row, true, model.value);
|
|
@@ -623,6 +649,7 @@ defineExpose({
|
|
|
623
649
|
padding: 10px;
|
|
624
650
|
width: 100%;
|
|
625
651
|
}
|
|
652
|
+
|
|
626
653
|
.list-button ul li {
|
|
627
654
|
margin-right: 5px;
|
|
628
655
|
float: left;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
<script lang="ts" setup>
|
|
23
23
|
import {BaiduMap,BmMarker,BmLabel,BmNavigation} from 'vue-baidu-map-3x'
|
|
24
|
-
import { ref, nextTick, onUpdated,onDeactivated , onMounted
|
|
24
|
+
import { ref, nextTick, onUpdated,onDeactivated , onMounted, onBeforeUnmount } from 'vue'
|
|
25
25
|
import { initData, changeHandler } from '../../utils/mixins';
|
|
26
26
|
|
|
27
27
|
const emit = defineEmits(['popupLocation'])
|
|
@@ -62,6 +62,14 @@ const data = ref({
|
|
|
62
62
|
rtnPoint:null,
|
|
63
63
|
})
|
|
64
64
|
|
|
65
|
+
const qrtimer=ref(null)
|
|
66
|
+
onBeforeUnmount(()=>{
|
|
67
|
+
if (qrtimer.value) {
|
|
68
|
+
clearTimeout(qrtimer.value);
|
|
69
|
+
qrtimer.value = null;
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
|
|
65
73
|
function handler({BMap, map}) {
|
|
66
74
|
// 经度
|
|
67
75
|
data.value.center.lng = 116.404
|
|
@@ -96,7 +104,7 @@ function handler({BMap, map}) {
|
|
|
96
104
|
}
|
|
97
105
|
|
|
98
106
|
if(props.apiParam.lng && props.apiParam.lat){
|
|
99
|
-
setTimeout(() => {
|
|
107
|
+
qrtimer.value = setTimeout(() => {
|
|
100
108
|
//偏移处理
|
|
101
109
|
data.value.center.lng = props.apiParam.lng;
|
|
102
110
|
data.value.center.lat = props.apiParam.lat;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
<script setup lang="ts">
|
|
65
|
-
import { ref, nextTick, watch } from 'vue'
|
|
65
|
+
import { ref, nextTick, watch, onBeforeUnmount } from 'vue'
|
|
66
66
|
import { ElMessage } from 'element-plus'
|
|
67
67
|
import common from '../../utils/common'
|
|
68
68
|
import PhotoSelect from '../../loader/src/PhotoSelect';
|
|
@@ -85,6 +85,14 @@ const dragOptions = {
|
|
|
85
85
|
forceFallback: true,
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
const qrtimer=ref(null)
|
|
89
|
+
onBeforeUnmount(()=>{
|
|
90
|
+
if (qrtimer.value) {
|
|
91
|
+
clearTimeout(qrtimer.value);
|
|
92
|
+
qrtimer.value = null;
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
|
|
88
96
|
const model = ref()
|
|
89
97
|
init();
|
|
90
98
|
function init() {
|
|
@@ -157,7 +165,7 @@ function handleOpen() {
|
|
|
157
165
|
showClose: true,
|
|
158
166
|
});
|
|
159
167
|
model.value.valid = false;
|
|
160
|
-
setTimeout(() => {
|
|
168
|
+
qrtimer.value = setTimeout(() => {
|
|
161
169
|
model.value.valid = true;
|
|
162
170
|
}, 3000);
|
|
163
171
|
List = List.slice(0, model.value.maxValue1);
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
</template>
|
|
19
19
|
<script setup lang="ts">
|
|
20
|
-
import { ref, onDeactivated, onMounted } from 'vue'
|
|
20
|
+
import { ref, onDeactivated, onMounted, onBeforeUnmount } from 'vue'
|
|
21
21
|
import request from '../../utils/request'
|
|
22
22
|
import common from '../../utils/common'
|
|
23
23
|
const emit = defineEmits(['finished', 'error'])
|
|
@@ -38,6 +38,20 @@ const progressFlag = ref(false)
|
|
|
38
38
|
const percentage = ref(0)
|
|
39
39
|
const message = ref('')
|
|
40
40
|
const downloadUrl = ref('')
|
|
41
|
+
|
|
42
|
+
const qrtimer1=ref(null)
|
|
43
|
+
const qrtimer2=ref(null)
|
|
44
|
+
onBeforeUnmount(()=>{
|
|
45
|
+
if (qrtimer1.value) {
|
|
46
|
+
clearTimeout(qrtimer1.value);
|
|
47
|
+
qrtimer1.value = null;
|
|
48
|
+
}
|
|
49
|
+
if (qrtimer2.value) {
|
|
50
|
+
clearTimeout(qrtimer2.value);
|
|
51
|
+
qrtimer2.value = null;
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
|
|
41
55
|
function getApiData() {
|
|
42
56
|
let params = {
|
|
43
57
|
action: props.progressAction,
|
|
@@ -80,7 +94,7 @@ function getApiData() {
|
|
|
80
94
|
downloadUrl.value = data.content + "?" + Math.random();
|
|
81
95
|
}
|
|
82
96
|
}
|
|
83
|
-
setTimeout(() => {
|
|
97
|
+
qrtimer1.value = setTimeout(() => {
|
|
84
98
|
emit('finished', data);
|
|
85
99
|
}, 800);
|
|
86
100
|
}
|
|
@@ -89,7 +103,7 @@ function getApiData() {
|
|
|
89
103
|
}
|
|
90
104
|
}
|
|
91
105
|
else {
|
|
92
|
-
|
|
106
|
+
qrtimer2.value = setTimeout(() => {
|
|
93
107
|
getApiData();
|
|
94
108
|
}, 1000);
|
|
95
109
|
}
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
</div>
|
|
231
231
|
</template>
|
|
232
232
|
<script setup lang="ts">
|
|
233
|
-
import { ref, nextTick, onActivated, onDeactivated } from 'vue'
|
|
233
|
+
import { ref, nextTick, onActivated, onDeactivated, onBeforeUnmount } from 'vue'
|
|
234
234
|
import common from '../../../utils/common'
|
|
235
235
|
import request from '../../../utils/request'
|
|
236
236
|
import SearchStats from './SearchStats.vue';
|
|
@@ -345,7 +345,19 @@ const getRowsRouterRef = (el, index) => {
|
|
|
345
345
|
}
|
|
346
346
|
const refHeadTr = ref()
|
|
347
347
|
const refTableHead = ref()
|
|
348
|
-
|
|
348
|
+
onBeforeUnmount(()=>{
|
|
349
|
+
if (model.value && typeof model.value.scripts !== 'undefined') {
|
|
350
|
+
model.value.scripts.formData.formTable = null;
|
|
351
|
+
model.value.scripts.formData = null;
|
|
352
|
+
}
|
|
353
|
+
window.removeEventListener("resize", setTableHeight)
|
|
354
|
+
if(refTableParent.value){
|
|
355
|
+
refTableParent.value.removeEventListener("scroll", getScrollAttr);
|
|
356
|
+
refTableParent.value=null
|
|
357
|
+
}
|
|
358
|
+
refSearchTable.value = null;
|
|
359
|
+
model.value = null;
|
|
360
|
+
})
|
|
349
361
|
onActivated(() => {
|
|
350
362
|
nextTick(() => {
|
|
351
363
|
setTableHeight();
|
|
@@ -395,9 +407,7 @@ function load(data) {
|
|
|
395
407
|
emit("loaded");
|
|
396
408
|
setTableHeight()
|
|
397
409
|
nextTick(() => {
|
|
398
|
-
window.addEventListener("resize",
|
|
399
|
-
setTableHeight();
|
|
400
|
-
});
|
|
410
|
+
window.addEventListener("resize", setTableHeight);
|
|
401
411
|
currentRow.value = null;
|
|
402
412
|
rowColorChange(model.value.selectIndex, true)
|
|
403
413
|
fiexdHead()
|
|
@@ -44,7 +44,7 @@ import searchTable from './SearchList/searchTable.vue';
|
|
|
44
44
|
import SearchCategory from './SearchList/SearchCategory.vue';
|
|
45
45
|
import SearchSideMenu from './SearchList/SearchSideMenu.vue';
|
|
46
46
|
import SearchSideRight from './SearchList/SearchSideRight.vue';
|
|
47
|
-
import { ref, nextTick, onMounted, watch, onActivated } from 'vue'
|
|
47
|
+
import { ref, nextTick, onMounted, watch, onActivated, onBeforeUnmount } from 'vue'
|
|
48
48
|
const emit = defineEmits(['loaded', 'failLoad', 'tableLoaded', 'scrollHandle', 'rowClickHandle', 'refreshParent', 'submit', 'flagNotificationParentAfterContentChanged','drag'])
|
|
49
49
|
const props = defineProps({
|
|
50
50
|
vmodel: Object,
|
|
@@ -122,6 +122,9 @@ const RefSideRight = ref()
|
|
|
122
122
|
const refSideMenu = ref()
|
|
123
123
|
const flagShow = ref(true)
|
|
124
124
|
const isLayout = ref(true)
|
|
125
|
+
onBeforeUnmount(()=>{
|
|
126
|
+
window.removeEventListener('resize',resizeSearchList)
|
|
127
|
+
})
|
|
125
128
|
onMounted(() => {
|
|
126
129
|
nextTick(() => {
|
|
127
130
|
if (refMain.value) {
|
|
@@ -275,9 +278,7 @@ function tableLoaded() {
|
|
|
275
278
|
sideMenuClickHandler(status);
|
|
276
279
|
}
|
|
277
280
|
}
|
|
278
|
-
window.addEventListener("resize",
|
|
279
|
-
resizeSearchList();
|
|
280
|
-
});
|
|
281
|
+
window.addEventListener("resize", resizeSearchList);
|
|
281
282
|
}
|
|
282
283
|
else {
|
|
283
284
|
flagSideBarOfData.value = false;
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
@SaveSearchWhere="SaveSearchWhere" @SearchWhereManage="SearchWhereManage"
|
|
23
23
|
@clickSearchWhere="clickSearchWhere"></component>
|
|
24
24
|
<br v-else-if="col.controlType === Enum.ControlType.LineFeed" />
|
|
25
|
-
<component v-else :from="from" class="list-field" v-bind="col.listBind"
|
|
26
|
-
:
|
|
27
|
-
@
|
|
25
|
+
<component v-else :from="from" class="list-field" v-bind="col.listBind" :is="col.is"
|
|
26
|
+
:vmodel="col" :parameterAction="model.parameterAction" @search="searchHandler(col)"
|
|
27
|
+
@change="changeHandler(col)">
|
|
28
28
|
</component>
|
|
29
29
|
</template>
|
|
30
30
|
</template>
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
<script setup lang="ts">
|
|
56
56
|
import { ref, nextTick, onDeactivated } from 'vue'
|
|
57
57
|
import SearchScreen from '../../loader/src/SearchScreen'
|
|
58
|
-
import Form from '../../loader/src/Form'
|
|
59
58
|
import Enum from '../../utils/Enum'
|
|
60
59
|
import common from '../../utils/common';
|
|
61
60
|
const emit = defineEmits(['loaded', 'failLoad', 'showTitle', 'search', 'resetSearch', 'saveShortcut'])
|
|
@@ -114,6 +113,18 @@ function searchComplate(flagLoad) {
|
|
|
114
113
|
//加载数据
|
|
115
114
|
function load(data) {
|
|
116
115
|
model.value = data;
|
|
116
|
+
if (model.value.scripts) {
|
|
117
|
+
model.value.scripts.formData = model.value.formData;
|
|
118
|
+
model.value.scripts.formData.form = model.value;
|
|
119
|
+
model.value.scripts.formData.excuteData = model.value.screen;
|
|
120
|
+
model.value.scripts.formData.fieldsDic = model.value.screenDic;
|
|
121
|
+
}
|
|
122
|
+
if (model.value.onload) {
|
|
123
|
+
let onloads = model.value.onload.split(';');
|
|
124
|
+
onloads.forEach((v) => {
|
|
125
|
+
common.excute.call(model.value.scripts, v);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
117
128
|
setScreenShow();
|
|
118
129
|
loading.value = false;
|
|
119
130
|
emit('loaded', model.value.flagSearch);
|
|
@@ -139,8 +150,7 @@ function setScreenShow() {
|
|
|
139
150
|
}
|
|
140
151
|
//组件值发生变化时操作
|
|
141
152
|
function changeHandler(field) {
|
|
142
|
-
SearchScreen.
|
|
143
|
-
Form.clearRelatedHandle(field, model.value.screen)
|
|
153
|
+
SearchScreen.changeHandler(field, model.value);
|
|
144
154
|
}
|
|
145
155
|
//按钮执行
|
|
146
156
|
function searchHandler(field) {
|
|
@@ -95,10 +95,10 @@ function getLableShow() {
|
|
|
95
95
|
labelShow = props.vmodel.getCheckedName();;
|
|
96
96
|
break;
|
|
97
97
|
case Enum.ControlType.Switch:
|
|
98
|
-
labelShow = props.vmodel.
|
|
98
|
+
labelShow = props.vmodel.value? '开启' : '关闭';
|
|
99
99
|
break;
|
|
100
100
|
case Enum.ControlType.CheckBox:
|
|
101
|
-
labelShow = props.vmodel.
|
|
101
|
+
labelShow = props.vmodel.value? '是' : '否';
|
|
102
102
|
break;
|
|
103
103
|
default:
|
|
104
104
|
break;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
</template>
|
|
34
34
|
<script setup lang="ts">
|
|
35
|
-
import { ref, nextTick, ComponentPublicInstance } from 'vue'
|
|
35
|
+
import { ref, nextTick, ComponentPublicInstance, onBeforeUnmount } from 'vue'
|
|
36
36
|
import common from '../../../utils/common'
|
|
37
37
|
import { RouterClickHandler } from '../../../utils/mixins';
|
|
38
38
|
import Enum from '../../../utils/Enum'
|
|
@@ -80,17 +80,24 @@ const handleSetInputMap = (el: refItem, item) => {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
const qrtimer=ref(null)
|
|
84
|
+
onBeforeUnmount(()=>{
|
|
85
|
+
if (qrtimer.value) {
|
|
86
|
+
clearTimeout(qrtimer.value);
|
|
87
|
+
qrtimer.value = null;
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
|
|
83
91
|
//搜索(查询条件调用)
|
|
84
92
|
function search(m) {
|
|
85
|
-
let timer;
|
|
86
93
|
if (searchStatus.value.length == 0) {
|
|
87
|
-
clearTimeout(
|
|
94
|
+
if(qrtimer.value)clearTimeout(qrtimer.value);
|
|
88
95
|
searchStatus.value.push('a');
|
|
89
96
|
rootNode.value.childNodes = []
|
|
90
97
|
loadNode(rootNode.value, rootResolve.value,m)
|
|
91
98
|
}
|
|
92
99
|
else {
|
|
93
|
-
|
|
100
|
+
qrtimer.value = setTimeout(() => {
|
|
94
101
|
search(m);
|
|
95
102
|
}, 200);
|
|
96
103
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</div>
|
|
12
12
|
</template>
|
|
13
13
|
<script lang="ts" setup>
|
|
14
|
-
import { ref, nextTick, watch, onMounted } from 'vue'
|
|
14
|
+
import { ref, nextTick, watch, onMounted, onBeforeUnmount } from 'vue'
|
|
15
15
|
import Tree from './Tree/Tree.vue';
|
|
16
16
|
const emit = defineEmits(['loaded'])
|
|
17
17
|
const loadTree=ref(false)
|
|
@@ -33,10 +33,19 @@ const refscreenDiv = ref()
|
|
|
33
33
|
const reftreescreen = ref()
|
|
34
34
|
const reftree = ref()
|
|
35
35
|
const treeHeight = ref(0)
|
|
36
|
+
|
|
37
|
+
const qrtimer=ref(null)
|
|
38
|
+
onBeforeUnmount(()=>{
|
|
39
|
+
if (qrtimer.value) {
|
|
40
|
+
clearTimeout(qrtimer.value);
|
|
41
|
+
qrtimer.value = null;
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
|
|
36
45
|
function setTreeHeight() {
|
|
37
46
|
nextTick(() => {
|
|
38
47
|
if (refscreenDiv.value) {
|
|
39
|
-
|
|
48
|
+
qrtimer.value = setTimeout(() => {
|
|
40
49
|
let searchHeight = refscreenDiv.value.offsetHeight;
|
|
41
50
|
treeHeight.value = props.searchtreeHeight - searchHeight;
|
|
42
51
|
}, 200);
|
|
@@ -228,6 +228,7 @@ const displayAreaHeight = ref(0)
|
|
|
228
228
|
const downloadUrl = ref("")
|
|
229
229
|
const downloadLoading = ref(false)
|
|
230
230
|
const mediaLabelShow=ref(false)
|
|
231
|
+
const qrtimer=ref(null)
|
|
231
232
|
|
|
232
233
|
groupCountLen.value = 0;
|
|
233
234
|
props.MediaAlbum.forEach((item, n) => {
|
|
@@ -294,7 +295,7 @@ function handDownloadUrl(url) {
|
|
|
294
295
|
else {
|
|
295
296
|
downloadUrl.value = getDownloadUrl(url) + "?download=1&" + Math.random();
|
|
296
297
|
}
|
|
297
|
-
setTimeout(function () {
|
|
298
|
+
qrtimer.value = setTimeout(function () {
|
|
298
299
|
downloadLoading.value = false;
|
|
299
300
|
}, 1000);
|
|
300
301
|
}
|
|
@@ -421,7 +422,11 @@ function enterFullscreen(n) {
|
|
|
421
422
|
refviewerP360.value.enterFullscreen(n);
|
|
422
423
|
}
|
|
423
424
|
onUnmounted(() => {
|
|
424
|
-
|
|
425
|
+
window.onresize = null;
|
|
426
|
+
if (qrtimer.value) {
|
|
427
|
+
clearTimeout(qrtimer.value);
|
|
428
|
+
qrtimer.value = null;
|
|
429
|
+
}
|
|
425
430
|
})
|
|
426
431
|
</script>
|
|
427
432
|
<style scoped>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
<script setup>
|
|
13
|
-
import { ref, nextTick, watch, onMounted } from 'vue'
|
|
13
|
+
import { ref, nextTick, watch, onMounted, onBeforeUnmount } from 'vue'
|
|
14
14
|
import AppContainer from '../../loader/src/AppContainer';
|
|
15
15
|
import appContainerLayout from './appContainer/appContainerLayout.vue'
|
|
16
16
|
|
|
@@ -29,6 +29,9 @@ const appContainerLeft = ref(0)
|
|
|
29
29
|
const appContainerHeight = ref(0)
|
|
30
30
|
const appContainerWidth = ref(0)
|
|
31
31
|
const refappContainer = ref()
|
|
32
|
+
onBeforeUnmount(()=>{
|
|
33
|
+
window.removeEventListener('resize',setresize)
|
|
34
|
+
})
|
|
32
35
|
function init() {
|
|
33
36
|
|
|
34
37
|
//初始化
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<render />
|
|
3
3
|
</template>
|
|
4
4
|
<script setup>
|
|
5
|
-
import { h, ref, onActivated, resolveComponent } from 'vue'
|
|
5
|
+
import { h, ref, onActivated, resolveComponent, onBeforeUnmount } from 'vue'
|
|
6
6
|
const emit = defineEmits(['close'])
|
|
7
7
|
const props = defineProps({
|
|
8
8
|
vmodel: Object,
|
|
@@ -12,6 +12,9 @@ const contentTop = ref(0)
|
|
|
12
12
|
const content = ref()
|
|
13
13
|
const captionBarButtons = ref([])
|
|
14
14
|
const modelSelf = ref(null)
|
|
15
|
+
onBeforeUnmount(()=>{
|
|
16
|
+
modelSelf.value=null
|
|
17
|
+
})
|
|
15
18
|
onActivated(() => {
|
|
16
19
|
if (contentTop.value && content) {
|
|
17
20
|
content.value.scrollTop = contentTop.value;
|
|
@@ -29,7 +32,7 @@ function scrollHandle(ev) {
|
|
|
29
32
|
ev.stopPropagation();
|
|
30
33
|
}
|
|
31
34
|
|
|
32
|
-
const render = () => {
|
|
35
|
+
const render = () => {
|
|
33
36
|
return h('div', {}, [
|
|
34
37
|
h('div', {
|
|
35
38
|
style: {
|