centaline-data-driven-v3 0.0.72 → 0.0.74
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 +81 -81
- package/package.json +1 -1
- package/src/assets/commonWeb.css +17 -0
- package/src/components/app/PhotoSelectList.vue +24 -7
- package/src/components/web/Button.vue +26 -14
- package/src/components/web/Form.vue +33 -9
- package/src/components/web/FormList.vue +35 -22
- package/src/components/web/Location.vue +15 -16
- package/src/components/web/SearchList/SearchTable.vue +5 -36
- package/src/components/web/SearchList/Tablecurrency.vue +5 -2
- package/src/loader/src/Form.js +42 -0
- package/src/loader/src/FormList.js +58 -1
- package/src/loader/src/LibFunction.js +4 -3
- package/src/loader/src/Location.js +2 -2
- package/src/main.js +5 -5
- package/src/utils/mixins.js +27 -736
- package/src/utils/request.js +5 -5
- package/src/views/Form.vue +2 -2
- package/src/views/SearchList.vue +3 -2
package/package.json
CHANGED
package/src/assets/commonWeb.css
CHANGED
|
@@ -1044,4 +1044,21 @@ body {
|
|
|
1044
1044
|
background-color: #ed745f;
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
1047
|
+
.ct-location .el-location-input{
|
|
1048
|
+
border: 1px solid var(--bagGray);
|
|
1049
|
+
line-height: 24px;
|
|
1050
|
+
padding-left: 5px;
|
|
1051
|
+
color: var(--centalineBlue);
|
|
1052
|
+
border-radius: 6px !important;
|
|
1053
|
+
font-size: inherit;
|
|
1054
|
+
}
|
|
1055
|
+
.ct-location .el-location-input:hover{
|
|
1056
|
+
border-color: var(--centalineBlue);
|
|
1057
|
+
}
|
|
1058
|
+
.ct-location .el-location-input:focus{
|
|
1059
|
+
outline:0;
|
|
1060
|
+
}
|
|
1061
|
+
.h26{
|
|
1062
|
+
height: 26px;
|
|
1063
|
+
}
|
|
1047
1064
|
/*elementPlus样式重置结束*/
|
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
<template v-if="imageList.length > 0">
|
|
10
10
|
<template v-if="layout">
|
|
11
11
|
<div style="display: flex;" v-for="(item, index) in imageList" :key="index">
|
|
12
|
-
<van-
|
|
12
|
+
<van-radio v-if="selectedMode == 1" @click="chooseRadio(item)" style="margin: 0 5px;"
|
|
13
|
+
:checked="item.ischeck" icon-size="14px"></van-radio>
|
|
14
|
+
<van-checkbox v-else style="margin: 0 5px;" @change="choose(item, true)" v-model="item.ischeck"
|
|
13
15
|
shape="square" icon-size="14px"></van-checkbox>
|
|
14
|
-
<ct-layout :vmodel="item" :cellLayout="layout" :key="itemKey"
|
|
15
|
-
@rolRouterclick="rolRouterCellClickHandler">
|
|
16
|
+
<ct-layout :vmodel="item" :cellLayout="layout" :key="itemKey" :rowindex="index"
|
|
17
|
+
:flagMediaSelect="true" @rolRouterclick="rolRouterCellClickHandler">
|
|
16
18
|
</ct-layout>
|
|
17
19
|
</div>
|
|
18
20
|
</template>
|
|
@@ -39,13 +41,14 @@
|
|
|
39
41
|
</template>
|
|
40
42
|
</template>
|
|
41
43
|
<template v-else>
|
|
42
|
-
<van-empty :description="common.LocalizedString('没有数据','沒有數據')" />
|
|
44
|
+
<van-empty :description="common.LocalizedString('没有数据', '沒有數據')" />
|
|
43
45
|
</template>
|
|
44
46
|
</div>
|
|
45
47
|
<div class="PhotoSelectList-bottom">
|
|
46
|
-
<van-checkbox @change="allchoose" v-model="allcheck" shape="square"
|
|
48
|
+
<van-checkbox v-if="selectedMode != 1" @change="allchoose" v-model="allcheck" shape="square"
|
|
49
|
+
icon-size="14px">{{ common.LocalizedString('全选', '全選') }}</van-checkbox>
|
|
47
50
|
<van-button type="primary" class="van-button-app" size="small" style="display: flex;margin-left: 30%;"
|
|
48
|
-
@click="handleClick()">{{common.LocalizedString('确定','確認')}}</van-button>
|
|
51
|
+
@click="handleClick()">{{ common.LocalizedString('确定', '確認') }}</van-button>
|
|
49
52
|
</div>
|
|
50
53
|
</div>
|
|
51
54
|
<van-popup v-model:show="showPicker" position="bottom" :safe-area-inset-bottom="true">
|
|
@@ -68,7 +71,7 @@ import { ElMessage } from 'element-plus'
|
|
|
68
71
|
import common from '../../utils/common'
|
|
69
72
|
import util from '../../utils/pub-use'
|
|
70
73
|
import PhotoSelectList from '../../loader/src/PhotoSelectList';
|
|
71
|
-
const emit = defineEmits(['handlePhoto','loaded', 'failLoad'])
|
|
74
|
+
const emit = defineEmits(['handlePhoto', 'loaded', 'failLoad'])
|
|
72
75
|
const props = defineProps({
|
|
73
76
|
Selected: Array,
|
|
74
77
|
api: String,
|
|
@@ -89,6 +92,7 @@ const itemKey = ref(0)
|
|
|
89
92
|
const mediaLabelID = ref('')
|
|
90
93
|
const mediaLabelName = ref('全部')
|
|
91
94
|
const options = ref([])
|
|
95
|
+
const selectedMode = ref(2)
|
|
92
96
|
onMounted(() => {
|
|
93
97
|
nextTick(function () {
|
|
94
98
|
showLoadingToast({ message: '', duration: 10000 });
|
|
@@ -115,6 +119,9 @@ function load(data) {
|
|
|
115
119
|
layout.value = data.source.content.layout;
|
|
116
120
|
paramName.value = data.source.content.paramName;
|
|
117
121
|
sourceRows = common.deepClone(data.source.content.mediaList);
|
|
122
|
+
if (data.source.content.selectedMode) {
|
|
123
|
+
selectedMode.value = data.source.content.selectedMode
|
|
124
|
+
}
|
|
118
125
|
}
|
|
119
126
|
else {
|
|
120
127
|
sourceRows = common.deepClone(data.source.content);
|
|
@@ -188,6 +195,16 @@ function choose(item, flagCheckbox) {
|
|
|
188
195
|
item.ischeck = false;
|
|
189
196
|
}
|
|
190
197
|
|
|
198
|
+
}
|
|
199
|
+
function chooseRadio(item) {
|
|
200
|
+
let chooseItem = common.deepClone(item);
|
|
201
|
+
chooseList.value = [];
|
|
202
|
+
imageList.value.forEach((v) => {
|
|
203
|
+
v.ischeck = false;
|
|
204
|
+
});
|
|
205
|
+
item.ischeck = true;
|
|
206
|
+
chooseList.value.push(chooseItem);
|
|
207
|
+
|
|
191
208
|
}
|
|
192
209
|
function allchoose() {
|
|
193
210
|
chooseList.value = [];
|
|
@@ -69,6 +69,7 @@ const props = defineProps({
|
|
|
69
69
|
vmodel: Object,
|
|
70
70
|
source: Object,
|
|
71
71
|
flagAppMode: Boolean,
|
|
72
|
+
parentModel: Object,
|
|
72
73
|
})
|
|
73
74
|
const model = initData(props, Button)
|
|
74
75
|
if (model.value.controlType == Enum.ControlType.ButtonAdvancedSearch) {
|
|
@@ -95,24 +96,35 @@ const headers = computed(() => {
|
|
|
95
96
|
return common.getDataDrivenOpts().handler.getRequestHeaders();
|
|
96
97
|
})
|
|
97
98
|
function clickHandle() {
|
|
98
|
-
|
|
99
|
+
emit('fieldClick', model.value);
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
function handleAvatarBeforeUpload(file) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
if (model.value.form && model.value.form.$vue) {
|
|
104
|
+
let submitData = model.value.form.$vue.getFileData(model.value);
|
|
105
|
+
for (var key in submitData) {
|
|
106
|
+
if (typeof submitData[key] === "object") {
|
|
107
|
+
uploadData.value[key] = JSON.stringify(submitData[key]);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
uploadData.value[key] = submitData[key];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if(props.parentModel && props.parentModel.is && props.parentModel.is=="ct-formlist" && props.parentModel.form && props.parentModel.form.$vue){
|
|
115
|
+
let submitData = props.parentModel.form.$vue.getFileData(model.value);
|
|
116
|
+
for (var key in submitData) {
|
|
117
|
+
if (typeof submitData[key] === "object") {
|
|
118
|
+
uploadData.value[key] = JSON.stringify(submitData[key]);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
uploadData.value[key] = submitData[key];
|
|
122
|
+
}
|
|
112
123
|
}
|
|
124
|
+
}
|
|
113
125
|
}
|
|
114
126
|
function handleAvatarSuccess(res) {
|
|
115
|
-
|
|
127
|
+
emit('importComplete', res, model.value);
|
|
116
128
|
}
|
|
117
129
|
function handleAvatarError(info) {
|
|
118
130
|
ElMessage({
|
|
@@ -129,8 +141,8 @@ function dropClick() {
|
|
|
129
141
|
}
|
|
130
142
|
}
|
|
131
143
|
function commandClick(code) {
|
|
132
|
-
|
|
133
|
-
|
|
144
|
+
model.value.selectOptionCode = code;
|
|
145
|
+
emit('fieldClick', model.value);
|
|
134
146
|
}
|
|
135
147
|
</script>
|
|
136
148
|
<style scoped>
|
|
@@ -16,7 +16,7 @@
|
|
|
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
18
|
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
19
|
-
@change="changeHandler" @importComplete="importComplete"
|
|
19
|
+
@change="changeHandler" @importComplete="importComplete" @popupLocation="popupLocationHandler"
|
|
20
20
|
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler"
|
|
21
21
|
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
22
22
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<el-col v-if="col.show !== false" :span="col.colspan" style="padding:5px">
|
|
33
33
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
34
34
|
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
35
|
-
@change="changeHandler" @importComplete="importComplete"
|
|
35
|
+
@change="changeHandler" @importComplete="importComplete" @popupLocation="popupLocationHandler"
|
|
36
36
|
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler"
|
|
37
37
|
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
38
38
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<el-col :span="col.colspan" v-if="col.show !== false" style="padding:5px">
|
|
53
53
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
54
54
|
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
55
|
-
@change="changeHandler" @fieldClick="fieldClickHandler"
|
|
55
|
+
@change="changeHandler" @fieldClick="fieldClickHandler" @popupLocation="popupLocationHandler"
|
|
56
56
|
@popupSearchList="popupSearchListHandler" @importComplete="importComplete"
|
|
57
57
|
@popupGroupList="popupGroupListHandler" @tableButtonClick="clickHandler"
|
|
58
58
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
<el-col :span="col.colspan" v-if="col.show !== false" style="padding:5px">
|
|
84
84
|
<component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
|
|
85
85
|
:parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
86
|
-
@change="changeHandler" @fieldClick="fieldClickHandler"
|
|
86
|
+
@change="changeHandler" @fieldClick="fieldClickHandler" @popupLocation="popupLocationHandler"
|
|
87
87
|
@popupSearchList="popupSearchListHandler" @importComplete="importComplete"
|
|
88
88
|
@popupGroupList="popupGroupListHandler" @tableButtonClick="clickHandler"
|
|
89
89
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
<component ref="Fields" :is="col.is" :vmodel="col" :parameterAction="model.parameterAction"
|
|
103
103
|
v-bind="col.bindPara" @change="changeHandler" :key="itemKey" :fileData="getFileData(col)"
|
|
104
104
|
@fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler" @importComplete="importComplete"
|
|
105
|
-
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
|
|
105
|
+
@tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler" @popupLocation="popupLocationHandler"
|
|
106
106
|
@flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
|
|
107
107
|
</component>
|
|
108
108
|
</el-col>
|
|
@@ -353,6 +353,9 @@ function validExcute() {
|
|
|
353
353
|
}
|
|
354
354
|
else if (f.$el.offsetParent.offsetParent.offsetParent.classList[0] === 'ct-dialog_wrapper') {
|
|
355
355
|
total = f.$el.offsetTop;
|
|
356
|
+
if(f.$el.offsetParent){
|
|
357
|
+
total+=f.$el.offsetParent.offsetTop
|
|
358
|
+
}
|
|
356
359
|
document.querySelector(".ct-dialog_body").children[0].scrollTop = total;
|
|
357
360
|
}
|
|
358
361
|
else if (f.$el.offsetParent.offsetParent.offsetParent.localName === "body") {
|
|
@@ -413,6 +416,14 @@ function importComplete(res, field) {
|
|
|
413
416
|
.catch(() => {
|
|
414
417
|
});
|
|
415
418
|
}
|
|
419
|
+
else if(res && res.rtnCode && res.rtnCode === 200 && res.rtnMsg){
|
|
420
|
+
ElMessage({
|
|
421
|
+
message: res.rtnMsg,
|
|
422
|
+
type: 'success',
|
|
423
|
+
showClose: true,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
|
|
416
427
|
if (field.flagAsync) {
|
|
417
428
|
if (res.rtnCode && res.rtnCode === 202 && res.rtnMsg) {
|
|
418
429
|
common.confirm(res.rtnMsg, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
@@ -448,8 +459,13 @@ function importComplete(res, field) {
|
|
|
448
459
|
type: 'success',
|
|
449
460
|
showClose: true,
|
|
450
461
|
});
|
|
462
|
+
}
|
|
463
|
+
if (field && field.callBackFunName) {
|
|
464
|
+
changeCallBackHandler(field, field.callBackFunName, data.content);
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
Form.doAction(data);
|
|
451
468
|
}
|
|
452
|
-
getPage(1, false);
|
|
453
469
|
},
|
|
454
470
|
onError(data) {
|
|
455
471
|
common.closeDialog(dialogOption);
|
|
@@ -501,7 +517,12 @@ function importComplete(res, field) {
|
|
|
501
517
|
showClose: true,
|
|
502
518
|
});
|
|
503
519
|
}
|
|
504
|
-
|
|
520
|
+
if (field && field.callBackFunName) {
|
|
521
|
+
changeCallBackHandler(field, field.callBackFunName, data.content);
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
Form.doAction(data);
|
|
525
|
+
}
|
|
505
526
|
},
|
|
506
527
|
onError(data) {
|
|
507
528
|
common.closeDialog(dialogOption);
|
|
@@ -523,13 +544,16 @@ function importComplete(res, field) {
|
|
|
523
544
|
changeCallBackHandler(field, field.callBackFunName, res.content);
|
|
524
545
|
}
|
|
525
546
|
else {
|
|
526
|
-
|
|
547
|
+
Form.doAction(res)
|
|
527
548
|
}
|
|
528
549
|
}
|
|
529
550
|
}
|
|
530
551
|
//弹出选择列表
|
|
531
552
|
function popupSearchListHandler(singleSelectio, field, router, callBack) {
|
|
532
|
-
|
|
553
|
+
Form.popupSearchListHandler(singleSelectio, field, router, model.value, Fields.value, props, callBack)
|
|
554
|
+
}
|
|
555
|
+
function popupLocationHandler(field, router, callBack) {
|
|
556
|
+
Form.popupLocationHandler(field, router, callBack,model.value,props);
|
|
533
557
|
}
|
|
534
558
|
//弹出分组列表
|
|
535
559
|
function popupGroupListHandler(field, router, callBack) {
|
|
@@ -72,18 +72,27 @@
|
|
|
72
72
|
<h5>{{ model.controlLabel }}</h5>
|
|
73
73
|
</div>
|
|
74
74
|
<div class="list-button">
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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" @importComplete="importComplete" @change="toolButtonsChangeHandler(v,$event)"></component>
|
|
79
|
+
</li>
|
|
80
|
+
<li v-if="model.selectRouter!==null">
|
|
81
|
+
<component :is="model.selectRouter.is" :vmodel="model.selectRouter" @click="popupSearchListHandle(model.selectRouter)"></component>
|
|
82
|
+
</li>
|
|
83
|
+
<li v-if="model.create">
|
|
84
|
+
<el-button :disabled="model.disabled" class="btn-add" type="success" style="width: auto;" size="small" :icon="CirclePlus" @click="addRow">
|
|
85
|
+
{{ model.createText }}
|
|
86
|
+
</el-button>
|
|
87
|
+
</li>
|
|
88
|
+
</ul>
|
|
89
|
+
</template>
|
|
81
90
|
</div>
|
|
82
91
|
<el-table :data="model.tableData" border :show-summary="model.showSummary"
|
|
83
92
|
:summary-method="getSummaries" style="width: 100%" highlight-current-row>
|
|
84
93
|
<template v-if="model.rowActionRoutersAlign === 1">
|
|
85
94
|
<el-table-column label="操作"
|
|
86
|
-
v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0"
|
|
95
|
+
v-if="model.rows[0].edit || model.rows[0].delete || (model.buttons.length > 0 && model.buttonsShow.length > 0)"
|
|
87
96
|
:width="'100%'">
|
|
88
97
|
<template #header="{ column, $index }">
|
|
89
98
|
{{ setcolumnminWidth(column) }}
|
|
@@ -104,13 +113,9 @@
|
|
|
104
113
|
@click="saveRow(scope.row, scope.$index, false)"
|
|
105
114
|
style="cursor: pointer;">取消</el-tag>
|
|
106
115
|
<template v-for="(v, i) in model.buttons">
|
|
107
|
-
<el-tag
|
|
108
|
-
|
|
109
|
-
style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label }}
|
|
110
|
-
1</el-tag>
|
|
111
|
-
|
|
116
|
+
<el-tag v-if="!scope.row.isSet && v.show && (!v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1)"
|
|
117
|
+
style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label }}</el-tag>
|
|
112
118
|
</template>
|
|
113
|
-
|
|
114
119
|
</template>
|
|
115
120
|
</el-table-column>
|
|
116
121
|
</template>
|
|
@@ -146,7 +151,7 @@
|
|
|
146
151
|
</template>
|
|
147
152
|
<template v-if="model.rowActionRoutersAlign !== 1">
|
|
148
153
|
<el-table-column label="操作"
|
|
149
|
-
v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0"
|
|
154
|
+
v-if="model.rows[0].edit || model.rows[0].delete || (model.buttons.length > 0 && model.buttonsShow.length > 0)"
|
|
150
155
|
:width="'100%'">
|
|
151
156
|
<template #header="{ column, $index }">
|
|
152
157
|
{{ setcolumnminWidth(column) }}
|
|
@@ -167,13 +172,9 @@
|
|
|
167
172
|
@click="saveRow(scope.row, scope.$index, false)"
|
|
168
173
|
style="cursor: pointer;">取消</el-tag>
|
|
169
174
|
<template v-for="(v, i) in model.buttons">
|
|
170
|
-
<el-tag
|
|
171
|
-
|
|
172
|
-
style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label }}
|
|
173
|
-
1</el-tag>
|
|
174
|
-
|
|
175
|
+
<el-tag v-if="!scope.row.isSet && v.show && (!v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1)"
|
|
176
|
+
style="cursor: pointer;" @click="buttonClick(scope.row, v)">{{ v.label }}</el-tag>
|
|
175
177
|
</template>
|
|
176
|
-
|
|
177
178
|
</template>
|
|
178
179
|
</el-table-column>
|
|
179
180
|
</template>
|
|
@@ -494,7 +495,7 @@ function setcolumnminWidth(column) {
|
|
|
494
495
|
function buttonClick(row, button) {
|
|
495
496
|
var submitData = {};
|
|
496
497
|
button.submitFormField.forEach((v) => {
|
|
497
|
-
submitData[v] = row
|
|
498
|
+
submitData[v] = common.getDataOfUpperLower(row,v).code1;
|
|
498
499
|
});
|
|
499
500
|
model.value.currentRowIndex = model.value.source.rows.findIndex(v => v.$sourceIndex === row.$sourceIndex);
|
|
500
501
|
|
|
@@ -503,6 +504,15 @@ function buttonClick(row, button) {
|
|
|
503
504
|
function rolRouterClickHandler(field, rowData,rowindex) {
|
|
504
505
|
buttonClick(rowData, field);
|
|
505
506
|
}
|
|
507
|
+
function toolButtonsClick(field) {
|
|
508
|
+
emit('tableButtonClick', field, null);
|
|
509
|
+
}
|
|
510
|
+
function toolButtonsChangeHandler(field) {
|
|
511
|
+
emit('change', field);
|
|
512
|
+
}
|
|
513
|
+
function importComplete(res, button) {
|
|
514
|
+
emit('importComplete', res, button);
|
|
515
|
+
}
|
|
506
516
|
function insertOrUpdateRow(row) {
|
|
507
517
|
FormList.insertOrUpdateRow(row, true, model.value);
|
|
508
518
|
}
|
|
@@ -613,7 +623,10 @@ defineExpose({
|
|
|
613
623
|
padding: 10px;
|
|
614
624
|
width: 100%;
|
|
615
625
|
}
|
|
616
|
-
|
|
626
|
+
.list-button ul li {
|
|
627
|
+
margin-right: 5px;
|
|
628
|
+
float: left;
|
|
629
|
+
}
|
|
617
630
|
|
|
618
631
|
.ct-form-repeat .list-title {
|
|
619
632
|
padding-bottom: 5px;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ct-field :vmodel="model">
|
|
3
3
|
<template #Control>
|
|
4
|
-
<div v-if="model !== null" class="ct-location" style="
|
|
5
|
-
<div
|
|
6
|
-
class="el-input el-input--mini el-input-group el-input-group--prepend el-input--suffix showLabel lableinput text-justify">
|
|
4
|
+
<div v-if="model !== null" class="ct-location" style="display:flex">
|
|
5
|
+
<div class="el-input el-input--mini el-input-group el-input-group--prepend el-input--suffix showLabel lableinput text-justify">
|
|
7
6
|
<div v-if="model.showLabel && model.label" class="el-input-group__prepend">
|
|
8
7
|
<div slot="prepend" class="label-ellipsis" :class="[model.labelClass]" :title="model.label">
|
|
9
8
|
{{ model.label }}
|
|
10
9
|
</div>
|
|
11
10
|
</div>
|
|
12
|
-
<div style="display:inline-flex;padding-left:0px;" v-bind="model.attrs"
|
|
13
|
-
:class="model.locked ? 'ct-is-disabled' : ''">
|
|
11
|
+
<div style="display:inline-flex;padding-left:0px;" v-bind="model.attrs" :class="model.locked ? 'ct-is-disabled' : ''">
|
|
14
12
|
<input style="text-align:left;width:100%" class="el-location-input hoverColor"
|
|
15
|
-
:placeholder="model.attrs.placeholder1" v-model="model.
|
|
13
|
+
:placeholder="model.attrs.placeholder1" v-model="model.code1" @change="changeModel($event)" />
|
|
16
14
|
<input style="text-align:left;width:100%;margin-left:5px;" class="el-location-input hoverColor"
|
|
17
|
-
:placeholder="model.attrs.placeholder2" v-model="model.
|
|
15
|
+
:placeholder="model.attrs.placeholder2" v-model="model.code2" @change="changeModel($event);" />
|
|
18
16
|
</div>
|
|
19
17
|
</div>
|
|
20
18
|
</div>
|
|
@@ -22,10 +20,10 @@
|
|
|
22
20
|
<template #Sufbutton v-if="model !== null&&model.moreActionRouter">
|
|
23
21
|
<div v-if="model.moreActionRouter" style="display: inline-block;margin-left: 5px;">
|
|
24
22
|
<img v-if="model.moreActionRouter.imgUrl" class="ct-tablecurrencyImg ct-tablecurrencyItem"
|
|
25
|
-
:src="model.moreActionRouter.imgUrl" :title="model.moreActionRouter.
|
|
23
|
+
:src="model.moreActionRouter.imgUrl" :title="model.moreActionRouter.controlLabel"
|
|
26
24
|
@click="popupLocationHandler($event)" />
|
|
27
25
|
<el-button v-else size="mini" type="primary" class="h26" @click="popupLocationHandler($event)">
|
|
28
|
-
{{ model.moreActionRouter.
|
|
26
|
+
{{ model.moreActionRouter.controlLabel }}
|
|
29
27
|
</el-button>
|
|
30
28
|
</div>
|
|
31
29
|
</template>
|
|
@@ -39,16 +37,17 @@ const props = defineProps({
|
|
|
39
37
|
vmodel: Object
|
|
40
38
|
})
|
|
41
39
|
const model = initData(props, Location)
|
|
40
|
+
console.log(model.value);
|
|
42
41
|
function popupLocationHandler() {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
emit('popupLocation', model.value, model.value.moreActionRouter, (data) => {
|
|
43
|
+
if(data){
|
|
44
|
+
model.value.value=data.lng;
|
|
45
|
+
model.value.value1=data.lat;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
49
48
|
}
|
|
50
49
|
function changeModel() {
|
|
51
|
-
|
|
50
|
+
changeHandler(model.value, emit);
|
|
52
51
|
}
|
|
53
52
|
defineExpose({
|
|
54
53
|
model
|
|
@@ -238,7 +238,7 @@ import TableToolbar from './TableToolbar.vue';
|
|
|
238
238
|
import Tabletip from './Tabletip.vue';
|
|
239
239
|
import Tablecurrency from './Tablecurrency.vue';
|
|
240
240
|
import SearchTable from '../../../loader/src/SearchTable'
|
|
241
|
-
import { RouterClickHandler
|
|
241
|
+
import { RouterClickHandler } from '../../../utils/mixins';
|
|
242
242
|
import { ElMessage } from 'element-plus'
|
|
243
243
|
const emit = defineEmits(['rowClickHandle', 'searchComplate', 'refreshRowHandle', 'simpleRouterRefreshHandler', 'loaded', 'scrollHandle', 'closeSideBar', 'refreshParent', 'popupClickHandler', 'drag'])
|
|
244
244
|
const props = defineProps({
|
|
@@ -685,7 +685,7 @@ function rowLayoutClickHandle(index) {
|
|
|
685
685
|
}
|
|
686
686
|
|
|
687
687
|
//表单列表操作
|
|
688
|
-
function rolRouterClickHandler(field, rowData, rowindex, visible, columnName) {
|
|
688
|
+
function rolRouterClickHandler(field, rowData, rowindex, visible, columnName,callBack,flagMouseenter) {
|
|
689
689
|
field.rowindex = rowindex;
|
|
690
690
|
if (refRowsPopover.value[rowindex]) {
|
|
691
691
|
refRowsPopover.value[rowindex].hide();
|
|
@@ -717,42 +717,11 @@ function rolRouterClickHandler(field, rowData, rowindex, visible, columnName) {
|
|
|
717
717
|
action = rowData[field.actionField];
|
|
718
718
|
}
|
|
719
719
|
|
|
720
|
-
RouterClickHandler(field, submitData, action, model.value, 'table')
|
|
720
|
+
RouterClickHandler(field, submitData, action, model.value, 'table',callBack,flagMouseenter)
|
|
721
721
|
}
|
|
722
722
|
//表单列表操作
|
|
723
|
-
function rolRouterMouseenterHandler(field, rowData, rowindex, visible, columnName, callBack) {
|
|
724
|
-
field
|
|
725
|
-
if (refRowsPopover.value[rowindex]) {
|
|
726
|
-
refRowsPopover.value[rowindex].hide();
|
|
727
|
-
}
|
|
728
|
-
if (field.isListenVoice) {
|
|
729
|
-
if (model.value.currentListenVoice) {
|
|
730
|
-
refRowsRouter.value[model.value.currentListenVoice].closeListenVoice()
|
|
731
|
-
}
|
|
732
|
-
model.value.currentListenVoice = visible ? 'router' + field.id + rowindex : '';
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
var submitData = {};
|
|
736
|
-
field.submitListField.forEach((k) => {
|
|
737
|
-
submitData[k] = rowData[k];
|
|
738
|
-
});
|
|
739
|
-
|
|
740
|
-
if (field.flagAttachSearchCondition) {
|
|
741
|
-
submitData["searchFields"] = model.value.getSearchData();
|
|
742
|
-
}
|
|
743
|
-
if (field.isCallTel) {
|
|
744
|
-
submitData.flagHaveAlert = visible || false;
|
|
745
|
-
}
|
|
746
|
-
if (columnName) {
|
|
747
|
-
submitData.columnName = columnName;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
let action = field.action;
|
|
751
|
-
if (field.actionField) {
|
|
752
|
-
action = rowData[field.actionField];
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
RouterMouseenterHandler(field, submitData, action, model.value, 'table', callBack)
|
|
723
|
+
function rolRouterMouseenterHandler(field, rowData, rowindex, visible, columnName, callBack,flagMouseenter) {
|
|
724
|
+
rolRouterClickHandler(field,rowData,rowindex,visible,columnName,callBack,true)
|
|
756
725
|
}
|
|
757
726
|
function popupClickHandler() {
|
|
758
727
|
var tempListData = model.value.getSelectRowData({ isMulti: model.value.isMulti });
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<el-popover @before-enter="onShow" :width="tooltipModel.width"
|
|
6
6
|
:fallback-placements="['bottom', 'top', 'right', 'left']">
|
|
7
7
|
<template #default>
|
|
8
|
-
<div :style="'height: '+
|
|
8
|
+
<div :style="'height: ' + tooltipModel.height + ''">
|
|
9
9
|
<component v-bind="tooltipModel.attrs" :is="tooltipModel.component"></component>
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
@@ -107,7 +107,7 @@ const option = ref({
|
|
|
107
107
|
const tooltipModel = ref({});
|
|
108
108
|
const labelColor = ref('')
|
|
109
109
|
const video = ref()
|
|
110
|
-
const label = computed(() => {
|
|
110
|
+
const label = computed(() => {
|
|
111
111
|
return (typeof props.colValue === "undefined" || props.colValue === '') ? props.router.controlLabel : props.colValue
|
|
112
112
|
})
|
|
113
113
|
const isShowLabel = computed(() => {
|
|
@@ -173,6 +173,9 @@ function voiceEndedHandler() {
|
|
|
173
173
|
}
|
|
174
174
|
function onShow() {
|
|
175
175
|
emit('mouseenter', props.router, props.rowData, props.rowindex, null, props.columnName, function (data) {
|
|
176
|
+
if (data.height) {
|
|
177
|
+
data.height = (parseInt(data.height.replace('px', ''))+50)+'px';
|
|
178
|
+
}
|
|
176
179
|
tooltipModel.value = data
|
|
177
180
|
});
|
|
178
181
|
}
|
package/src/loader/src/Form.js
CHANGED
|
@@ -62,6 +62,14 @@ function loadFromModel(source, isFormList) {
|
|
|
62
62
|
router[attrKey] = attrValue;
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
+
setbuttonRouter(id, attrKey, attrValue) {
|
|
66
|
+
var router = this.form.buttons.find((v1) => {
|
|
67
|
+
return v1.key === id;
|
|
68
|
+
});
|
|
69
|
+
if (router) {
|
|
70
|
+
router[attrKey] = attrValue;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
65
73
|
//获取Field的属性attrKey的值
|
|
66
74
|
getValueByFieldName(id, attrKey) {
|
|
67
75
|
attrKey = common.initialsToLowerCase(attrKey);
|
|
@@ -1043,6 +1051,39 @@ function popupSearchListHandler(singleSelectio, field, router, model, Fields, pr
|
|
|
1043
1051
|
}
|
|
1044
1052
|
common.openDialog(dialogOption);
|
|
1045
1053
|
}
|
|
1054
|
+
function popupLocationHandler(field, router, callBack,model,props) {
|
|
1055
|
+
var submitData = Form.getFileData(router,model);
|
|
1056
|
+
submitData.lng=field.code1;
|
|
1057
|
+
submitData.lat=field.code2;
|
|
1058
|
+
submitData = router.getActionPara(submitData).para;
|
|
1059
|
+
|
|
1060
|
+
var dialogOption = {
|
|
1061
|
+
title: router.pageTitle || router.controlLabel,
|
|
1062
|
+
pane: common.getParentPane(),
|
|
1063
|
+
content: [{
|
|
1064
|
+
component: "ct-mapBaidu",
|
|
1065
|
+
width: router.pageWidth + "px",
|
|
1066
|
+
height: router.pageHeight + "px",
|
|
1067
|
+
documentHeight: props.documentHeight,
|
|
1068
|
+
documentWidth: props.documentWidth,
|
|
1069
|
+
attrs: {
|
|
1070
|
+
field: router,
|
|
1071
|
+
apiParam: submitData,
|
|
1072
|
+
openType : 'Location',
|
|
1073
|
+
onSubmit(ev) {
|
|
1074
|
+
if (callBack) {
|
|
1075
|
+
callBack(ev);
|
|
1076
|
+
}
|
|
1077
|
+
common.closeDialog(dialogOption.dialog);
|
|
1078
|
+
},
|
|
1079
|
+
onCloseDialog(ev) {
|
|
1080
|
+
common.closeDialog(dialogOption.dialog);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
}]
|
|
1084
|
+
};
|
|
1085
|
+
common.openDialog(dialogOption);
|
|
1086
|
+
}
|
|
1046
1087
|
//弹出分组搜索列表
|
|
1047
1088
|
function popupGroupListHandler(field, router, model, Fields, props, callBack) {
|
|
1048
1089
|
let submitData = {};
|
|
@@ -1225,5 +1266,6 @@ const Form = {
|
|
|
1225
1266
|
changeHandler,
|
|
1226
1267
|
getRouterAndSubmitData,
|
|
1227
1268
|
updateFields,
|
|
1269
|
+
popupLocationHandler,
|
|
1228
1270
|
};
|
|
1229
1271
|
export default Form;
|