centaline-data-driven-v3 0.0.90 → 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 +141 -141
- package/package.json +1 -1
- package/src/assets/commonApp.css +1 -0
- package/src/components/app/ComboBox.vue +3 -3
- package/src/components/app/Form.vue +2 -2
- package/src/components/app/FormList.vue +20 -0
- package/src/components/app/SearchList/SearchTable.vue +3 -1
- package/src/components/app/TextBox.vue +1 -1
- package/src/components/app/searchScreen.vue +52 -34
- package/src/components/common/iframe.vue +4 -1
- package/src/components/web/ComboBox.vue +14 -5
- package/src/components/web/File.vue +16 -4
- package/src/components/web/Form.vue +25 -5
- 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/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/Field.js +5 -0
- package/src/loader/src/SearchScreen.js +447 -1
- package/src/main.js +2 -2
- package/src/utils/common.js +4 -1
- package/src/utils/mixins.js +0 -18
- package/src/utils/request.js +10 -5
package/package.json
CHANGED
package/src/assets/commonApp.css
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
32
|
<van-search v-if="model.filterable" placeholder="请输入搜索内容" v-model="searchText"
|
|
33
|
-
@update:model-value="searchInputHandle" />
|
|
33
|
+
@update:model-value="searchInputHandle" autocomplete="off" />
|
|
34
34
|
<div style="height: 350px;overflow: scroll;">
|
|
35
35
|
<van-checkbox-group>
|
|
36
36
|
<template v-if="model.options.length > 0 && model.options[0].options">
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
|
|
63
63
|
<van-search v-if="model.filterable" placeholder="请输入搜索内容" v-model="searchText"
|
|
64
|
-
@update:model-value="searchInputHandle" />
|
|
64
|
+
@update:model-value="searchInputHandle" autocomplete="off" />
|
|
65
65
|
<div style="height: 400px;overflow: scroll;">
|
|
66
66
|
<van-checkbox-group shape="square" v-model="model.value">
|
|
67
67
|
<van-cell-group>
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
</template>
|
|
80
80
|
<template v-else>
|
|
81
81
|
<van-search v-if="model.filterable" placeholder="请输入搜索内容" v-model="searchText"
|
|
82
|
-
@update:model-value="searchInputHandle" />
|
|
82
|
+
@update:model-value="searchInputHandle" autocomplete="off" />
|
|
83
83
|
<div style="height: 350px;overflow: scroll;">
|
|
84
84
|
<van-checkbox-group>
|
|
85
85
|
<van-cell-group>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</template>
|
|
57
57
|
<template #title v-if="item.show !== false">
|
|
58
58
|
<div :class="[item.required ? 'requiredLabel' : '']">{{ item.controlLabel }}</div>
|
|
59
|
-
<div v-html="item.sufLabel1"></div>
|
|
59
|
+
<div v-if="item.sufLabel1" style="margin-top: 5px;" v-html="item.sufLabel1"></div>
|
|
60
60
|
</template>
|
|
61
61
|
</van-cell-group>
|
|
62
62
|
</template>
|
|
@@ -248,7 +248,7 @@ function setFormHeight() {
|
|
|
248
248
|
h2 = refForm.value.offsetTop
|
|
249
249
|
}
|
|
250
250
|
let formHeight = h1 - h2
|
|
251
|
-
if (common.flagMicroMessenger()||common.flagHK()) {
|
|
251
|
+
if ((common.flagMicroMessenger()||common.flagHK())&&model.value.buttons.findIndex((v) => { return v.show }) > -1) {
|
|
252
252
|
formHeight = formHeight - 64
|
|
253
253
|
}
|
|
254
254
|
model.value.formHeight = formHeight
|
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
import { ref } from 'vue'
|
|
132
132
|
import FormList from '../../loader/src/FormList'
|
|
133
133
|
import { initData } from '../../utils/mixins';
|
|
134
|
+
import Enum from '../../utils/Enum'
|
|
134
135
|
import common from '../../utils/common'
|
|
135
136
|
import util from '../../utils/pub-use'
|
|
136
137
|
import draggable from "vuedraggable";
|
|
@@ -222,8 +223,27 @@ function deleteRow(index, sourceIndex) {
|
|
|
222
223
|
//验证
|
|
223
224
|
function fieldsValidExcute() {
|
|
224
225
|
var rtnBool = true;
|
|
226
|
+
var i = 0;
|
|
227
|
+
var controlLabel = model.value.controlLabel;
|
|
228
|
+
//如果当前组件的controlLabel为空 取上一个分组组的controlLabel
|
|
229
|
+
if (!model.value.controlLabel) {
|
|
230
|
+
if (model.value.form && model.value.form.fields) {
|
|
231
|
+
const currentIndex = model.value.form.fields.findIndex(v => v.fieldName1 === model.value.fieldName1);
|
|
232
|
+
if (currentIndex - 1 >= 0) {
|
|
233
|
+
if (model.value.form.fields[currentIndex - 1].controlType == Enum.ControlType.Group){
|
|
234
|
+
controlLabel = model.value.form.fields[currentIndex - 1].controlLabel;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
225
239
|
if (model.value.required) {
|
|
226
240
|
if (model.value.tableData.length == 0) {
|
|
241
|
+
if (controlLabel) {
|
|
242
|
+
model.value.displayValidMessage = common.LocalizedString('请填写', '請填寫') + '[' + controlLabel + ']'
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
model.value.displayValidMessage = '表格不能为空'
|
|
246
|
+
}
|
|
227
247
|
return false;
|
|
228
248
|
}
|
|
229
249
|
}
|
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
<div ref="refTableParent" class="ct-tableParentAPP" :style="'height:' + model.tableHeight + 'px'"
|
|
11
11
|
@scroll="scrollHandle($event)">
|
|
12
|
-
<van-pull-refresh v-model="refreshing" @refresh="onRefresh"
|
|
12
|
+
<van-pull-refresh v-model="refreshing" @refresh="onRefresh"
|
|
13
|
+
:loosing-text="common.LocalizedString('释放即可刷新...', '釋放即可刷新...')">
|
|
13
14
|
<van-list v-if="!tableError" v-model:loading="tableLoading"
|
|
14
15
|
:error-text="common.LocalizedString('没有查到数据,点我刷新', '沒有查到數據,點我刷新')" :finished="finished"
|
|
16
|
+
:loading-text="common.LocalizedString('加载中...', '加載中...')"
|
|
15
17
|
@load="onLoad" :immediate-check="false" :style="'min-height:' + model.tableHeight + 'px'">
|
|
16
18
|
<template v-if="flagPopupSearchlist && singleSelectio">
|
|
17
19
|
<van-radio-group v-model="checkeds" ref="refCheckboxGroup">
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<van-field clearable :type="model.inputType" :rows="model.rows" v-bind="model.attrs" v-model="model.code1"
|
|
12
12
|
:readonly="model.readonly" :disabled="model.locked" :maxlength="model.maxValue1"
|
|
13
13
|
:show-word-limit="model.showWordLimit" :label-align="model.inputType == 'textarea' ? 'top' : 'left'"
|
|
14
|
-
@input="changeHandler(model, emit)" class="ct-text">
|
|
14
|
+
@input="changeHandler(model, emit)" class="ct-text" autocomplete="off">
|
|
15
15
|
<template #label v-if="model.showLabel && model.controlLabel">
|
|
16
16
|
<div :class="[model.required ? 'requiredLabel' : '']"
|
|
17
17
|
:style="model.isList ? 'white-space: nowrap' : ''">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ct-serach-screen" v-if="model">
|
|
3
3
|
<div class="screen-serach" style="display: flex;flex-direction: row;">
|
|
4
|
-
<div style="display: flex; flex: 1;">
|
|
4
|
+
<div style="display: flex; flex: 1;overflow-x: auto;">
|
|
5
5
|
<van-dropdown-menu v-if="showScreen && screendata.length > 0" active-color="#EE6B6B"
|
|
6
6
|
style=" width: 100%;">
|
|
7
7
|
<van-dropdown-item v-for="(field, index) in screendata" :key="index" ref="Refitem"
|
|
@@ -25,25 +25,31 @@
|
|
|
25
25
|
</van-dropdown-item>
|
|
26
26
|
<van-dropdown-item v-if="ismore" key="4" title="更多" ref="RefitemMore" title-class="title"
|
|
27
27
|
class="screen-more" @open="openMore" @close="closeMore">
|
|
28
|
-
<
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
<div style="position: relative; height: 100%;">
|
|
29
|
+
<template v-for="(field, index) in model.screen" :key="field.keyScreen">
|
|
30
|
+
<template v-if="field.show !== false">
|
|
31
|
+
<component :is="field.is" :vmodel="field" ref="Fields"
|
|
32
|
+
:parameterAction="model.parameterAction" @change="changeHandler(field)" />
|
|
33
|
+
</template>
|
|
34
|
+
</template>
|
|
35
|
+
<template v-for="(field, index) in model.highScreen" :key="field.keyScreen">
|
|
36
|
+
<template v-if="field.show !== false" :key="field.keyScreen">
|
|
37
|
+
<component :is="field.is" :vmodel="field" ref="Fields"
|
|
38
|
+
:parameterAction="model.parameterAction" @change="changeHandler(field)" />
|
|
39
|
+
</template>
|
|
40
|
+
</template>
|
|
41
|
+
<div style="position: sticky;bottom: 0;">
|
|
42
|
+
<div style="padding: 5px 16px; display: flex;background-color: #ffffff;">
|
|
43
|
+
<van-button color="#ECECEC" block @click="reset"
|
|
44
|
+
style="color:333333;margin-right: 10px;">
|
|
45
|
+
{{ getBtnLabel(Enum.ControlType.ButtonReset, '重置') }}
|
|
46
|
+
</van-button>
|
|
47
|
+
<van-button color="#FF5252" block @click="clickHandlerMore()">
|
|
48
|
+
{{ getBtnLabel(Enum.ControlType.ButtonSearch, '确定') }}
|
|
49
|
+
</van-button>
|
|
50
|
+
</div>
|
|
45
51
|
</div>
|
|
46
|
-
</
|
|
52
|
+
</div>
|
|
47
53
|
</van-dropdown-item>
|
|
48
54
|
</van-dropdown-menu>
|
|
49
55
|
</div>
|
|
@@ -57,7 +63,8 @@
|
|
|
57
63
|
</div>
|
|
58
64
|
<div class="screen-condition" v-if="searchdata.length > 0">
|
|
59
65
|
<van-dropdown-menu active-color="#323233">
|
|
60
|
-
<van-dropdown-item
|
|
66
|
+
<van-dropdown-item
|
|
67
|
+
:title="common.LocalizedString('当前搜索条件:已选中' + searchdata.length + '个条件', '當前搜尋條件:已選中' + searchdata.length + '個條件')">
|
|
61
68
|
<van-row gutter="20" v-for="(field, index) in searchdata" :key="index">
|
|
62
69
|
<van-col span="6" style="text-align: right;">{{ field.controlLabel }}</van-col>
|
|
63
70
|
<van-col span="18">
|
|
@@ -81,21 +88,19 @@
|
|
|
81
88
|
</van-dropdown-item>
|
|
82
89
|
</van-dropdown-menu>
|
|
83
90
|
</div>
|
|
84
|
-
<van-action-sheet v-model:show="issort" cancel-text="取消"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
</
|
|
91
|
-
</template>
|
|
91
|
+
<van-action-sheet v-model:show="issort" cancel-text="取消" :round="false">
|
|
92
|
+
<template #default>
|
|
93
|
+
<button type="button" class="van-action-sheet__item" v-for="(v, i) in actions" :key="i"
|
|
94
|
+
:style="{ 'background': v.code == sortCode ? '#f2f3f5' : '' }">
|
|
95
|
+
<span class="van-action-sheet__name" @click="selectsort(v)">{{ v.name }}</span>
|
|
96
|
+
</button>
|
|
97
|
+
</template>
|
|
92
98
|
</van-action-sheet>
|
|
93
99
|
</div>
|
|
94
100
|
</template>
|
|
95
101
|
<script setup lang="ts">
|
|
96
102
|
import { ref, nextTick } from 'vue'
|
|
97
103
|
import SearchScreen from '../../loader/src/SearchScreen'
|
|
98
|
-
import Form from '../../loader/src/Form'
|
|
99
104
|
import Enum from '../../utils/Enum'
|
|
100
105
|
import common from '../../utils/common'
|
|
101
106
|
const emit = defineEmits(['loaded', 'failLoad', 'showTitle', 'search', 'resetSearch', 'saveShortcut', 'sort'])
|
|
@@ -122,6 +127,7 @@ const screendata = ref([])
|
|
|
122
127
|
const ismore = ref(false)
|
|
123
128
|
const flagsort = ref(false)
|
|
124
129
|
const sortname = ref('')
|
|
130
|
+
const sortCode = ref('')
|
|
125
131
|
const searchdata = ref([])
|
|
126
132
|
const issort = ref(false)
|
|
127
133
|
const actions = ref([])
|
|
@@ -152,6 +158,18 @@ function searchComplate(flagLoad) {
|
|
|
152
158
|
//加载数据
|
|
153
159
|
function load(data) {
|
|
154
160
|
model.value = data;
|
|
161
|
+
if (model.value.scripts) {
|
|
162
|
+
model.value.scripts.formData = model.value.formData;
|
|
163
|
+
model.value.scripts.formData.form = model.value;
|
|
164
|
+
model.value.scripts.formData.excuteData = model.value.screen;
|
|
165
|
+
model.value.scripts.formData.fieldsDic = model.value.screenDic;
|
|
166
|
+
}
|
|
167
|
+
if (model.value.onload) {
|
|
168
|
+
let onloads = model.value.onload.split(';');
|
|
169
|
+
onloads.forEach((v) => {
|
|
170
|
+
common.excute.call(model.value.scripts, v);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
155
173
|
setScreenShow();
|
|
156
174
|
setscreendata();
|
|
157
175
|
emit('loaded', model.value.flagSearch);
|
|
@@ -186,7 +204,7 @@ function setscreendata() {
|
|
|
186
204
|
v.controlType !== Enum.ControlType.LineFeed
|
|
187
205
|
);
|
|
188
206
|
});
|
|
189
|
-
if (screens.length >
|
|
207
|
+
if (screens.length > 1) {
|
|
190
208
|
ismore.value = true;
|
|
191
209
|
screens = screens.splice(0, 3);
|
|
192
210
|
}
|
|
@@ -215,19 +233,18 @@ function search() {
|
|
|
215
233
|
}
|
|
216
234
|
//组件值发生变化时操作
|
|
217
235
|
function changeHandler(field) {
|
|
218
|
-
if (field.is == 'ct-combobox') {
|
|
236
|
+
if (field.is == 'ct-combobox' && field.isList) {
|
|
219
237
|
setsearchdata()
|
|
220
238
|
search()
|
|
221
239
|
}
|
|
222
|
-
SearchScreen.
|
|
223
|
-
Form.clearRelatedHandle(field, model.value.screen)
|
|
240
|
+
SearchScreen.changeHandler(field, model.value);
|
|
224
241
|
}
|
|
225
242
|
|
|
226
243
|
function open(field) {
|
|
227
244
|
field.showLabel = false;
|
|
228
245
|
field.isList = true;
|
|
229
246
|
if (field.is == 'ct-combobox') {
|
|
230
|
-
field.getOptions(model.value.parameterAction, '',null, function (data) {
|
|
247
|
+
field.getOptions(model.value.parameterAction, '', null, function (data) {
|
|
231
248
|
field.options = data
|
|
232
249
|
})
|
|
233
250
|
}
|
|
@@ -346,6 +363,7 @@ function getsortfield(field) {
|
|
|
346
363
|
function selectsort(ev) {
|
|
347
364
|
issort.value = false;
|
|
348
365
|
sortname.value = "";
|
|
366
|
+
sortCode.value = ev.code
|
|
349
367
|
if (ev.code) {
|
|
350
368
|
sortname.value = ev.name;
|
|
351
369
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
7
7
|
<script setup lang="ts">
|
|
8
|
-
import { ref, onMounted } from 'vue'
|
|
8
|
+
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
|
9
9
|
import common from '../../utils/common'
|
|
10
10
|
const emit = defineEmits(['new', 'update', 'delete', 'refreshParent', 'closeDialog'])
|
|
11
11
|
const props = defineProps({
|
|
@@ -13,6 +13,9 @@ const props = defineProps({
|
|
|
13
13
|
})
|
|
14
14
|
const refIframe = ref()
|
|
15
15
|
const pageStyle=ref('')
|
|
16
|
+
onBeforeUnmount(()=>{
|
|
17
|
+
window.removeEventListener('message', handleMessage);
|
|
18
|
+
})
|
|
16
19
|
Init()
|
|
17
20
|
function Init(){
|
|
18
21
|
if(common.flagApp()){
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</el-select-v2>
|
|
28
28
|
<template v-if="model.flagaFterText">
|
|
29
29
|
<el-input type="text" v-model="model.code2" v-bind="model.attrs" @change="changeHandler(model, emit)"
|
|
30
|
-
:disabled="model.locked" :rows="model.rows" :readonly="model.readonly"
|
|
30
|
+
:disabled="model.locked" :rows="model.rows" :readonly="model.readonly"
|
|
31
31
|
:maxlength="model.maxValue1" :show-word-limit="model.showWordLimit" clearable
|
|
32
32
|
class="fieldControl ml10">
|
|
33
33
|
</el-input>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
</template>
|
|
46
46
|
<script lang="ts" setup>
|
|
47
47
|
import Axios from 'axios';
|
|
48
|
-
import { ref, nextTick } from 'vue'
|
|
48
|
+
import { ref, nextTick, onBeforeUnmount } from 'vue'
|
|
49
49
|
import { Search } from '@element-plus/icons-vue'
|
|
50
50
|
import { initData, changeHandler } from '../../utils/mixins';
|
|
51
51
|
import common from '../../utils/common'
|
|
@@ -64,6 +64,16 @@ const nodatatext = ref(' ')
|
|
|
64
64
|
model.value.itemKey=Math.random();
|
|
65
65
|
let cancelTokenSource = null; // 用于存储取消令牌
|
|
66
66
|
|
|
67
|
+
const qrtimer=ref(null)
|
|
68
|
+
onBeforeUnmount(()=>{
|
|
69
|
+
model.value=null
|
|
70
|
+
refselect.value=null
|
|
71
|
+
if (qrtimer.value) {
|
|
72
|
+
clearTimeout(qrtimer.value);
|
|
73
|
+
qrtimer.value = null;
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
|
|
67
77
|
//下拉框出现/隐藏时触发
|
|
68
78
|
function visibleChange(visible) {
|
|
69
79
|
//是否有更多选择路由
|
|
@@ -142,12 +152,11 @@ function getOptions(key) {
|
|
|
142
152
|
}
|
|
143
153
|
// 防抖函数
|
|
144
154
|
function debounce(func, delay) {
|
|
145
|
-
let timer = null;
|
|
146
155
|
return function () {
|
|
147
156
|
const context = this;
|
|
148
157
|
const args = arguments;
|
|
149
|
-
clearTimeout(
|
|
150
|
-
|
|
158
|
+
if(qrtimer.value)clearTimeout(qrtimer.value);
|
|
159
|
+
qrtimer.value = setTimeout(() => {
|
|
151
160
|
func.apply(context, args);
|
|
152
161
|
}, delay);
|
|
153
162
|
};
|
|
@@ -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'
|
|
@@ -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;
|
|
@@ -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;
|