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
package/package.json
CHANGED
package/src/assets/commonApp.css
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
<span v-if="rowMenuDisplayCountForAPP == 1 && RouterlistMore.length > 0" style="font-size: 24px;font-weight:bold"
|
|
5
5
|
@click="clickmore">...</span>
|
|
6
6
|
<template v-else>
|
|
7
|
-
<van-button v-for="(field, index) in Routerlist" :key="index"
|
|
7
|
+
<van-button v-for="(field, index) in Routerlist" :key="index" plain size="small"
|
|
8
|
+
:style="{ color: field.textColor ? field.textColor : '#999999', backgroundColor: field.bgColor ? field.bgColor : '#ffffff', borderColor: field.borderColor ? field.borderColor : '#cccccc' }"
|
|
8
9
|
@click="clickHandler(field)">{{ field.controlLabel }}</van-button>
|
|
9
10
|
<van-button v-if="RouterlistMore.length>0" color="#999999" plain size="small"
|
|
10
11
|
@click="clickmore">...</van-button>
|
|
@@ -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>
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
:border="false">
|
|
22
22
|
<component v-if="field.show !== false" ref="Fields" :is="field.is" :vmodel="field"
|
|
23
23
|
:parameterAction="model.parameterAction" v-bind="field.bindPara" @fieldClick="fieldClickHandler"
|
|
24
|
-
@tableButtonClick="clickHandler"
|
|
25
|
-
@change="changeHandler" />
|
|
24
|
+
@tableButtonClick="clickHandler" @change="changeHandler" />
|
|
26
25
|
</van-cell-group>
|
|
27
26
|
<template v-if="model.collapse.length > 0">
|
|
28
27
|
<!--tabs-->
|
|
@@ -37,8 +36,7 @@
|
|
|
37
36
|
<component v-if="field.show !== false" ref="Fields" :is="field.is" :vmodel="field"
|
|
38
37
|
:parameterAction="model.parameterAction" v-bind="field.bindPara"
|
|
39
38
|
@fieldClick="fieldClickHandler" @change="changeHandler"
|
|
40
|
-
@tableButtonClick="clickHandler"
|
|
41
|
-
@popupSearchList="popupSearchListHandler" />
|
|
39
|
+
@tableButtonClick="clickHandler" @popupSearchList="popupSearchListHandler" />
|
|
42
40
|
</van-cell-group>
|
|
43
41
|
</van-tab>
|
|
44
42
|
</template>
|
|
@@ -49,17 +47,16 @@
|
|
|
49
47
|
<!--分组-->
|
|
50
48
|
<template v-else>
|
|
51
49
|
<van-cell-group v-for="(item, index) in model.collapse" :key="index">
|
|
52
|
-
<template v-if="item.show !== false"
|
|
53
|
-
:key="collapseIndex">
|
|
50
|
+
<template v-if="item.show !== false"
|
|
51
|
+
v-for="(field, collapseIndex) in model.collapseFields[index + 1]" :key="collapseIndex">
|
|
54
52
|
<component ref="Fields" :is="field.is" v-if="field.show !== false" :vmodel="field"
|
|
55
53
|
:parameterAction="model.parameterAction" v-bind="field.bindPara"
|
|
56
|
-
@fieldClick="fieldClickHandler" @change="changeHandler"
|
|
57
|
-
@tableButtonClick="clickHandler"
|
|
54
|
+
@fieldClick="fieldClickHandler" @change="changeHandler" @tableButtonClick="clickHandler"
|
|
58
55
|
@popupSearchList="popupSearchListHandler" />
|
|
59
56
|
</template>
|
|
60
57
|
<template #title v-if="item.show !== false">
|
|
61
|
-
<
|
|
62
|
-
<
|
|
58
|
+
<div :class="[item.required ? 'requiredLabel' : '']">{{ item.controlLabel }}</div>
|
|
59
|
+
<div v-if="item.sufLabel1" style="margin-top: 5px;" v-html="item.sufLabel1"></div>
|
|
63
60
|
</template>
|
|
64
61
|
</van-cell-group>
|
|
65
62
|
</template>
|
|
@@ -71,8 +68,8 @@
|
|
|
71
68
|
:border="false">
|
|
72
69
|
<component v-if="field.show !== false" ref="Fields" :is="field.is" :vmodel="field"
|
|
73
70
|
:parameterAction="model.parameterAction" v-bind="field.bindPara" @fieldClick="fieldClickHandler"
|
|
74
|
-
@tableButtonClick="clickHandler"
|
|
75
|
-
@
|
|
71
|
+
@tableButtonClick="clickHandler" @change="changeHandler"
|
|
72
|
+
@popupSearchList="popupSearchListHandler" />
|
|
76
73
|
</van-cell-group>
|
|
77
74
|
</template>
|
|
78
75
|
<div v-if="model.links.findIndex((v) => { return v.show }) > -1" style="padding: 0 10px;">
|
|
@@ -85,7 +82,7 @@
|
|
|
85
82
|
<div class="safe-area-inset-bottom-height"></div>
|
|
86
83
|
</div>
|
|
87
84
|
<div class="button-absoluteAPP"
|
|
88
|
-
v-if="common.flagMicroMessenger() && model.buttons.findIndex((v) => { return v.show }) > -1">
|
|
85
|
+
v-if="(common.flagMicroMessenger() || common.flagHK()) && model.buttons.findIndex((v) => { return v.show }) > -1">
|
|
89
86
|
<template v-for="(field, index) in model.buttons" :key="index">
|
|
90
87
|
<component v-if="field.show !== false" ref="Fields" :is="field.is" :vmodel="field"
|
|
91
88
|
:parameterAction="model.parameterAction" v-bind="field.bindPara" @fieldClick="clickHandler" />
|
|
@@ -178,7 +175,7 @@ function init() {
|
|
|
178
175
|
function load(data) {
|
|
179
176
|
model.value = data
|
|
180
177
|
model.value.parentModelForm = props.parentModelForm
|
|
181
|
-
model.value.$vue = { fieldClickHandler, clickHandler, emit, getFormObj, getFileData, Form, validExcute, changeCallBackHandler, load, init, updateFields,loaded };
|
|
178
|
+
model.value.$vue = { fieldClickHandler, clickHandler, emit, getFormObj, getFileData, Form, validExcute, changeCallBackHandler, load, init, updateFields, loaded };
|
|
182
179
|
if (model.value.scripts) {
|
|
183
180
|
model.value.scripts.formData = model.value.formData;
|
|
184
181
|
model.value.scripts.formData.form = model.value;
|
|
@@ -251,7 +248,7 @@ function setFormHeight() {
|
|
|
251
248
|
h2 = refForm.value.offsetTop
|
|
252
249
|
}
|
|
253
250
|
let formHeight = h1 - h2
|
|
254
|
-
if (common.flagMicroMessenger()) {
|
|
251
|
+
if ((common.flagMicroMessenger()||common.flagHK())&&model.value.buttons.findIndex((v) => { return v.show }) > -1) {
|
|
255
252
|
formHeight = formHeight - 64
|
|
256
253
|
}
|
|
257
254
|
model.value.formHeight = formHeight
|
|
@@ -284,11 +281,11 @@ function validExcute() {
|
|
|
284
281
|
}
|
|
285
282
|
setTimeout(function () {
|
|
286
283
|
if (f.$el.offsetParent) {
|
|
287
|
-
var h1=0;
|
|
288
|
-
if(!props.flagNavbar){
|
|
289
|
-
h1=46
|
|
284
|
+
var h1 = 0;
|
|
285
|
+
if (!props.flagNavbar) {
|
|
286
|
+
h1 = 46
|
|
290
287
|
}
|
|
291
|
-
refForm.value.scrollTop = f.$el.offsetTop + f.$el.offsetParent.offsetTop-h1
|
|
288
|
+
refForm.value.scrollTop = f.$el.offsetTop + f.$el.offsetParent.offsetTop - h1
|
|
292
289
|
}
|
|
293
290
|
|
|
294
291
|
}, timeOut);
|
|
@@ -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
|
}
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<template v-if="imageList.length > 0">
|
|
10
10
|
<template v-if="layout">
|
|
11
|
-
<div style="display: flex;" v-for="(item, index) in imageList" :key="index">
|
|
12
|
-
<van-radio v-if="selectedMode == 1" @click="
|
|
11
|
+
<div style="display: flex;" v-for="(item, index) in imageList" :key="index" @click="changeChoose(item,false)" >
|
|
12
|
+
<van-radio v-if="selectedMode == 1" @click.stop="changeChoose(item,true)" style="margin: 0 5px;"
|
|
13
13
|
:checked="item.ischeck" icon-size="14px"></van-radio>
|
|
14
|
-
<van-checkbox v-else style="margin: 0 5px;"
|
|
15
|
-
shape="square" icon-size="14px"></van-checkbox>
|
|
14
|
+
<van-checkbox v-else style="margin: 0 5px;" v-model="item.ischeck"
|
|
15
|
+
shape="square" @click.stop="changeChoose(item,true)" icon-size="14px"></van-checkbox>
|
|
16
16
|
<ct-layout :vmodel="item" :cellLayout="layout" :key="itemKey" :rowindex="index"
|
|
17
17
|
:flagMediaSelect="true" @rolRouterclick="rolRouterCellClickHandler">
|
|
18
18
|
</ct-layout>
|
|
@@ -163,6 +163,16 @@ function load(data) {
|
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
+
function changeChoose(item,flagCheckboxOrRadio){
|
|
167
|
+
if(!flagCheckboxOrRadio){
|
|
168
|
+
item.ischeck=!item.ischeck;
|
|
169
|
+
}
|
|
170
|
+
if(selectedMode.value==1){
|
|
171
|
+
chooseRadio(item)
|
|
172
|
+
}else{
|
|
173
|
+
choose(item,true);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
166
176
|
// 点击选中图片
|
|
167
177
|
function choose(item, flagCheckbox) {
|
|
168
178
|
let chooseItem = common.deepClone(item);
|
|
@@ -227,11 +237,12 @@ function handleClick() {
|
|
|
227
237
|
function rolRouterCellClickHandler(routerKey, rowindex, sourceIndex) {
|
|
228
238
|
if (routerKey == 'photoPreview') {
|
|
229
239
|
viewerfile(imageList.value, rowindex)
|
|
240
|
+
event.stopPropagation();
|
|
230
241
|
}
|
|
231
242
|
}
|
|
232
243
|
function viewerfile(list, index) {
|
|
233
244
|
|
|
234
|
-
var MediaAlbum = [{ albumName: model.value.label ||
|
|
245
|
+
var MediaAlbum = [{ albumName: model.value.label || common.LocalizedString('媒体', '媒體'), medias: [] as any }];
|
|
235
246
|
|
|
236
247
|
let fileList = list.filter((item) => {
|
|
237
248
|
return item.flagDeleted !== true;
|
|
@@ -239,7 +250,7 @@ function viewerfile(list, index) {
|
|
|
239
250
|
fileList.forEach((v) => {
|
|
240
251
|
MediaAlbum[0].medias.push(v);
|
|
241
252
|
});
|
|
242
|
-
common.viewerfile((model.value.label ||
|
|
253
|
+
common.viewerfile((model.value.label || common.LocalizedString('预览媒体', '預覽媒體')), MediaAlbum, 0, index, props.mediaViewPageType);
|
|
243
254
|
}
|
|
244
255
|
function change(item) {
|
|
245
256
|
showPicker.value = false;
|
|
@@ -9,15 +9,17 @@
|
|
|
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">
|
|
18
|
-
<div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex">
|
|
19
|
-
<van-radio @click="selectRow(row)" icon-size="16px" checked-color="#EE6B6B"
|
|
20
|
-
:name="rowindex" :disabled="!flagSelect(row)"> </van-radio>
|
|
20
|
+
<div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex" @click="selectRow(row,rowindex,false)">
|
|
21
|
+
<van-radio @click.stop="selectRow(row,rowindex,true)" icon-size="16px" checked-color="#EE6B6B"
|
|
22
|
+
:name="rowindex" :checked="row.$select" :disabled="!flagSelect(row)"> </van-radio>
|
|
21
23
|
<ct-layout :vmodel="row" :cellLayout="model.cellLayout" :rowindex="rowindex"
|
|
22
24
|
:key="itemKey" @rolRouterclick="rolRouterCellClickHandler"
|
|
23
25
|
:actionRouter="model.actionRouter"
|
|
@@ -28,11 +30,11 @@
|
|
|
28
30
|
</template>
|
|
29
31
|
<template v-else>
|
|
30
32
|
<van-checkbox-group v-model="checkeds" ref="refCheckboxGroup">
|
|
31
|
-
<div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex">
|
|
33
|
+
<div class="ct-list" v-for="(row, rowindex) in model.listData" :key="rowindex" @click="selectRow(row,rowindex,false)">
|
|
32
34
|
<template v-if="isoperate || flagPopupSearchlist">
|
|
33
35
|
<van-checkbox v-if="flagSelect(row)" shape="square" checked-color="#EE6B6B"
|
|
34
|
-
icon-size="14px" :name="rowindex"
|
|
35
|
-
<div class="van-checkbox" v-else
|
|
36
|
+
icon-size="14px" :name="rowindex" @click.stop="selectRow(row,rowindex,true)"></van-checkbox>
|
|
37
|
+
<div class="van-checkbox" v-else>{{row.$select}}</div>
|
|
36
38
|
</template>
|
|
37
39
|
<ct-layout :vmodel="row" :cellLayout="model.cellLayout" :rowindex="rowindex"
|
|
38
40
|
:key="itemKey" @rolRouterclick="rolRouterCellClickHandler"
|
|
@@ -339,6 +341,7 @@ function rolRouterCellClickHandler(routerKey, rowindex, forname, forrowindex, fl
|
|
|
339
341
|
}
|
|
340
342
|
model.value.selectIndex = rowindex
|
|
341
343
|
RouterClickHandler(field, submitData, action, model.value, 'table')
|
|
344
|
+
event.stopPropagation();
|
|
342
345
|
}
|
|
343
346
|
//toolButtons操作
|
|
344
347
|
function toolbarClickHandler(field) {
|
|
@@ -388,21 +391,34 @@ function modeClickHandler() {
|
|
|
388
391
|
selectCount.value = getSelectRowLength();
|
|
389
392
|
}
|
|
390
393
|
//选择行
|
|
391
|
-
function selectRow(row) {
|
|
392
|
-
if
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
394
|
+
function selectRow(row,rowIndex,flagCheckboxOrRadio) {
|
|
395
|
+
if(flagSelect(row)&&(isoperate.value || props.flagPopupSearchlist)){
|
|
396
|
+
if (props.singleSelectio) {
|
|
397
|
+
model.value.listData.forEach((ro) => {
|
|
398
|
+
if (
|
|
399
|
+
!model.value.rightCheckBoxColumn ||
|
|
400
|
+
common.getDataOfUpperLower(ro, model.value.rightCheckBoxColumn) == 1
|
|
401
|
+
) {
|
|
402
|
+
ro.$select = false
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
row.$select = !row.$select
|
|
407
|
+
if(!flagCheckboxOrRadio){
|
|
408
|
+
if(row.$select){
|
|
409
|
+
if(checkeds.value.indexOf(rowIndex) == -1){
|
|
410
|
+
checkeds.value.push(rowIndex);
|
|
411
|
+
}
|
|
412
|
+
}else{
|
|
413
|
+
if(checkeds.value.indexOf(rowIndex) > -1){
|
|
414
|
+
checkeds.value.splice(checkeds.value.indexOf(rowIndex),1);
|
|
415
|
+
}
|
|
399
416
|
}
|
|
400
|
-
}
|
|
417
|
+
}
|
|
418
|
+
SearchTable.setSelectAll(model.value);
|
|
419
|
+
SearchTable.getSelectAll(model.value);
|
|
420
|
+
selectCount.value = getSelectRowLength();
|
|
401
421
|
}
|
|
402
|
-
row.$select = !row.$select
|
|
403
|
-
SearchTable.setSelectAll(model.value);
|
|
404
|
-
SearchTable.getSelectAll(model.value);
|
|
405
|
-
selectCount.value = getSelectRowLength();
|
|
406
422
|
}
|
|
407
423
|
function exit() {
|
|
408
424
|
model.value.selectAll = false
|
|
@@ -94,10 +94,10 @@ function getLableShow() {
|
|
|
94
94
|
labelShow = props.vmodel.getCheckedName();;
|
|
95
95
|
break;
|
|
96
96
|
case Enum.ControlType.Switch:
|
|
97
|
-
labelShow = props.vmodel.
|
|
97
|
+
labelShow = props.vmodel.value ? '开启' : '关闭';
|
|
98
98
|
break;
|
|
99
99
|
case Enum.ControlType.CheckBox:
|
|
100
|
-
labelShow = props.vmodel.
|
|
100
|
+
labelShow = props.vmodel.value ? '是' : '否';
|
|
101
101
|
break;
|
|
102
102
|
default:
|
|
103
103
|
break;
|
|
@@ -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
|
<van-popup :show="true" :z-index="zindex" position="right" :style="{ width: '100%', height: '100%' }">
|
|
3
3
|
<van-nav-bar :title="vmodel.title" :left-arrow="true" @click-left="close" @click-right="onClickRight">
|
|
4
|
-
<template #right v-if="!common.flagMicroMessenger()">
|
|
4
|
+
<template #right v-if="!common.flagMicroMessenger()&&!common.flagHK()">
|
|
5
5
|
<template v-if="buttons.length == 1">
|
|
6
6
|
{{ buttons[0].controlLabel }}
|
|
7
7
|
</template>
|
|
@@ -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,14 +88,19 @@
|
|
|
81
88
|
</van-dropdown-item>
|
|
82
89
|
</van-dropdown-menu>
|
|
83
90
|
</div>
|
|
84
|
-
<van-action-sheet v-model:show="issort"
|
|
85
|
-
|
|
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>
|
|
98
|
+
</van-action-sheet>
|
|
86
99
|
</div>
|
|
87
100
|
</template>
|
|
88
101
|
<script setup lang="ts">
|
|
89
102
|
import { ref, nextTick } from 'vue'
|
|
90
103
|
import SearchScreen from '../../loader/src/SearchScreen'
|
|
91
|
-
import Form from '../../loader/src/Form'
|
|
92
104
|
import Enum from '../../utils/Enum'
|
|
93
105
|
import common from '../../utils/common'
|
|
94
106
|
const emit = defineEmits(['loaded', 'failLoad', 'showTitle', 'search', 'resetSearch', 'saveShortcut', 'sort'])
|
|
@@ -115,6 +127,7 @@ const screendata = ref([])
|
|
|
115
127
|
const ismore = ref(false)
|
|
116
128
|
const flagsort = ref(false)
|
|
117
129
|
const sortname = ref('')
|
|
130
|
+
const sortCode = ref('')
|
|
118
131
|
const searchdata = ref([])
|
|
119
132
|
const issort = ref(false)
|
|
120
133
|
const actions = ref([])
|
|
@@ -145,6 +158,18 @@ function searchComplate(flagLoad) {
|
|
|
145
158
|
//加载数据
|
|
146
159
|
function load(data) {
|
|
147
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
|
+
}
|
|
148
173
|
setScreenShow();
|
|
149
174
|
setscreendata();
|
|
150
175
|
emit('loaded', model.value.flagSearch);
|
|
@@ -179,7 +204,7 @@ function setscreendata() {
|
|
|
179
204
|
v.controlType !== Enum.ControlType.LineFeed
|
|
180
205
|
);
|
|
181
206
|
});
|
|
182
|
-
if (screens.length >
|
|
207
|
+
if (screens.length > 1) {
|
|
183
208
|
ismore.value = true;
|
|
184
209
|
screens = screens.splice(0, 3);
|
|
185
210
|
}
|
|
@@ -208,19 +233,18 @@ function search() {
|
|
|
208
233
|
}
|
|
209
234
|
//组件值发生变化时操作
|
|
210
235
|
function changeHandler(field) {
|
|
211
|
-
if (field.is == 'ct-combobox') {
|
|
236
|
+
if (field.is == 'ct-combobox' && field.isList) {
|
|
212
237
|
setsearchdata()
|
|
213
238
|
search()
|
|
214
239
|
}
|
|
215
|
-
SearchScreen.
|
|
216
|
-
Form.clearRelatedHandle(field, model.value.screen)
|
|
240
|
+
SearchScreen.changeHandler(field, model.value);
|
|
217
241
|
}
|
|
218
242
|
|
|
219
243
|
function open(field) {
|
|
220
244
|
field.showLabel = false;
|
|
221
245
|
field.isList = true;
|
|
222
246
|
if (field.is == 'ct-combobox') {
|
|
223
|
-
field.getOptions(model.value.parameterAction, '',null, function (data) {
|
|
247
|
+
field.getOptions(model.value.parameterAction, '', null, function (data) {
|
|
224
248
|
field.options = data
|
|
225
249
|
})
|
|
226
250
|
}
|
|
@@ -339,6 +363,7 @@ function getsortfield(field) {
|
|
|
339
363
|
function selectsort(ev) {
|
|
340
364
|
issort.value = false;
|
|
341
365
|
sortname.value = "";
|
|
366
|
+
sortCode.value = ev.code
|
|
342
367
|
if (ev.code) {
|
|
343
368
|
sortname.value = ev.name;
|
|
344
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()){
|
|
@@ -292,7 +292,7 @@ const getDistanceToBottom = () => {
|
|
|
292
292
|
function getRefFieldJson() {
|
|
293
293
|
let rtn = {};
|
|
294
294
|
let router = props.router;
|
|
295
|
-
if (router.
|
|
295
|
+
if (router?.refFieldName && props.form?.getFormObj) {
|
|
296
296
|
let refFieldName = router.refFieldName.split(',');
|
|
297
297
|
let submitData = props.form.getFormObj();
|
|
298
298
|
if (refFieldName.length > 0 && submitData) {
|
|
@@ -524,7 +524,7 @@ const getTemplateType = (fullText) => {
|
|
|
524
524
|
rtn = "error";
|
|
525
525
|
outtext.value = (eventData.rtnMsg || fullText);
|
|
526
526
|
if (eventData.rtnCode == Enum.ReturnCode.Unauthorized) {
|
|
527
|
-
if (common.getDataDrivenOpts().handler?.login) {
|
|
527
|
+
if (common.getDataDrivenOpts().handler?.login) {
|
|
528
528
|
common.getDataDrivenOpts().handler.login();
|
|
529
529
|
};
|
|
530
530
|
}
|
|
@@ -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
|
//是否有更多选择路由
|
|
@@ -74,7 +84,7 @@ function visibleChange(visible) {
|
|
|
74
84
|
//出现获取数据
|
|
75
85
|
if (visible) {
|
|
76
86
|
open.value = true;
|
|
77
|
-
nodatatext.value = '加载中';
|
|
87
|
+
nodatatext.value = common.LocalizedString('加载中', '加載中');
|
|
78
88
|
if (!model.value.filterable) {
|
|
79
89
|
getOptions('')
|
|
80
90
|
}
|
|
@@ -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
|
};
|