centaline-data-driven 1.3.36 → 1.3.39
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/package.json +1 -1
- package/src/Form.vue +10 -5
- package/src/centaline/common/index.js +0 -3
- package/src/centaline/dialogList/src/dialog.vue +5 -2
- package/src/centaline/dynamicDetail/src/dynamicContactList.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +20 -2
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +1 -1
- package/src/centaline/dynamicForm/src/dynamicForm.vue +10 -2
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +3 -3
- package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +2 -2
- package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +4 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +3 -4
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +21 -38
- package/src/centaline/loader/src/ctl/ContactList.js +1 -0
- package/src/centaline/loader/src/ctl/Form.js +4 -3
- package/src/centaline/loader/src/ctl/FormList.js +17 -5
- package/src/centaline/loader/src/ctl/Tags.js +8 -0
- package/src/main.js +5 -5
- package/wwwroot/static/centaline/centaline-data-driven.js +2 -2
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
package/src/Form.vue
CHANGED
|
@@ -2,20 +2,25 @@
|
|
|
2
2
|
<div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
3
|
<!-- <ct-form :api="'/PropertyRET/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
|
|
4
4
|
<!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
|
|
5
|
-
<ct-form :api="'/
|
|
6
|
-
|
|
5
|
+
<ct-form :api="'/api/third-dept-tran/tran-comm-adjust/create'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
|
|
6
|
+
<!-- <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form> -->
|
|
7
7
|
<ct-dialog-list></ct-dialog-list>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script>
|
|
12
12
|
export default {
|
|
13
|
-
name: '
|
|
13
|
+
name: 'DataDrivenForm',
|
|
14
14
|
data() {
|
|
15
15
|
return {
|
|
16
16
|
apiParam:{
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
actionType: 2,
|
|
18
|
+
commAdjustCategory: "CC01020020",
|
|
19
|
+
originalTraId: "1552533586416844802",
|
|
20
|
+
pageOnly: true,
|
|
21
|
+
pageStyle: 2,
|
|
22
|
+
},
|
|
23
|
+
topHeight:10,
|
|
19
24
|
}
|
|
20
25
|
},
|
|
21
26
|
activated(){
|
|
@@ -146,13 +146,14 @@
|
|
|
146
146
|
mySelf.close();
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
|
|
149
|
+
//此行代码是为了防止弹出的窗口高度 大于父级页面的高度
|
|
150
|
+
//暂时注释 高度由接口控制
|
|
150
151
|
var ph=0;
|
|
151
152
|
if(item.attrs.height){
|
|
152
153
|
ph=parseInt(item.attrs.height.replace('px',''));
|
|
153
154
|
}
|
|
154
155
|
if(self.vmodel.pane && self.vmodel.pane.$el && self.vmodel.pane.$el.clientHeight<ph){
|
|
155
|
-
item.attrs.height=(self.vmodel.pane.$el.clientHeight-
|
|
156
|
+
item.attrs.height=(self.vmodel.pane.$el.clientHeight-60)+'px';
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
return h('div', {
|
|
@@ -170,6 +171,8 @@
|
|
|
170
171
|
]);
|
|
171
172
|
}
|
|
172
173
|
else {
|
|
174
|
+
//此行代码是为了防止弹出的窗口高度 大于父级页面的高度
|
|
175
|
+
//暂时注释 高度由接口控制
|
|
173
176
|
var ph=0;
|
|
174
177
|
if(item.attrs.height){
|
|
175
178
|
ph=parseInt(item.attrs.height.replace('px',''));
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<div class="contacts-tips" v-else>
|
|
10
10
|
<component class="el-button el-button--primary el-button--mini max-btn-add"
|
|
11
11
|
v-if="model && model.buttons!==null && model.buttons.length>0"
|
|
12
|
-
v-for="(col, index) in model.buttons" :key="
|
|
12
|
+
v-for="(col, index) in model.buttons" :key="col.key"
|
|
13
13
|
:is="col.is" :vmodel="col"
|
|
14
14
|
@click="fieldClickHandler(col,$event)"></component>
|
|
15
15
|
</div>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<span>{{ model.fields1Dic.EstateName.value }}</span>
|
|
11
11
|
<span> {{ model.fields1Dic.BuildingName.value }}</span>
|
|
12
12
|
<span>{{ model.fields1Dic.RoomNo.value }}</span>
|
|
13
|
-
<img :src="model.
|
|
13
|
+
<img :src="model.actionRouterFavorite.imgUrl" alt="" @click="fieldClickHandler(model.actionRouterFavorite, $event)" class="collection" />
|
|
14
14
|
</div>
|
|
15
15
|
<div class="title-other">
|
|
16
16
|
<span>{{ model.fields1Dic.PropertyNo.label }}{{ model.fields1Dic.PropertyNo.value }}</span>
|
|
@@ -646,6 +646,9 @@ export default {
|
|
|
646
646
|
loadBaseInfo() {
|
|
647
647
|
this.model.loadBaseInfo();
|
|
648
648
|
},
|
|
649
|
+
loadFavorite() {
|
|
650
|
+
this.model.loadFavorite();
|
|
651
|
+
},
|
|
649
652
|
handleClick(tab, event) {
|
|
650
653
|
let i = tab.index;
|
|
651
654
|
if (this.model.tags2 && this.model.tags2[i]) {
|
|
@@ -697,7 +700,11 @@ export default {
|
|
|
697
700
|
});
|
|
698
701
|
callBack = "loadOperation";
|
|
699
702
|
}
|
|
700
|
-
|
|
703
|
+
if (router == undefined && this.model.actionRouterFavorite) {
|
|
704
|
+
if (field.id === this.model.actionRouterFavorite.id) {
|
|
705
|
+
router = this.model.actionRouterFavorite;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
701
708
|
if (router) {
|
|
702
709
|
if (field.isSubmitDataFromSelf) {
|
|
703
710
|
router.submitFormField.forEach((v) => {
|
|
@@ -712,6 +719,9 @@ export default {
|
|
|
712
719
|
if(router.id=="PropertyEdit"){
|
|
713
720
|
callBack="loadBaseInfo"
|
|
714
721
|
}
|
|
722
|
+
else if (router.id == "Favorite") {
|
|
723
|
+
callBack = "loadFavorite"
|
|
724
|
+
}
|
|
715
725
|
}
|
|
716
726
|
|
|
717
727
|
if (callBack) {
|
|
@@ -721,6 +731,9 @@ export default {
|
|
|
721
731
|
else if(callBack=='loadBaseInfo'){
|
|
722
732
|
this.routerClickHandler(router, submitData, self.loadBaseInfo);
|
|
723
733
|
}
|
|
734
|
+
else if (callBack == 'loadFavorite') {
|
|
735
|
+
this.routerClickHandler(router, submitData, self.loadFavorite);
|
|
736
|
+
}
|
|
724
737
|
}
|
|
725
738
|
else {
|
|
726
739
|
this.routerClickHandler(router, submitData);
|
|
@@ -794,6 +807,11 @@ export default {
|
|
|
794
807
|
});
|
|
795
808
|
self.$common.closeDialog(dialogOption.dialog);
|
|
796
809
|
},
|
|
810
|
+
closeDialog(ev) {
|
|
811
|
+
if (field.id == "Favorite" && callBack) {
|
|
812
|
+
callBack();
|
|
813
|
+
}
|
|
814
|
+
}
|
|
797
815
|
},
|
|
798
816
|
},
|
|
799
817
|
],
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<span>{{ model.fields1Dic.EstateName.value }}</span>
|
|
11
11
|
<span> {{ model.fields1Dic.BuildingName.value }}</span>
|
|
12
12
|
<span>{{ model.fields1Dic.RoomNo.value }}</span>
|
|
13
|
-
<img :src="model.
|
|
13
|
+
<img :src="model.actionRouterFavorite.imgUrl" alt="" @click="fieldClickHandler(model.actionRouterFavorite, $event)" class="collection" />
|
|
14
14
|
</div>
|
|
15
15
|
<div class="title-other">
|
|
16
16
|
<span>{{ model.fields1Dic.PropertyNo.label }}{{ model.fields1Dic.PropertyNo.value }}</span>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-loading="loading" :style="{width:pageWidth?pageWidth+'px':'100%',margin:'auto'}">
|
|
2
|
+
<div v-loading="loading" :style="{width:pageWidth?pageWidth+'px':'100%',margin:'auto','min-height': minHeight}">
|
|
3
3
|
<div v-if="model !== null && !loading" class="ct-form" :class="{'domDisabled':model.pageDisabled}" :key="formKey">
|
|
4
4
|
<!--可根据场景判断显示el-card还是el-main-->
|
|
5
5
|
<component :is="model.showTitle?'el-main':'el-card'">
|
|
@@ -98,6 +98,10 @@
|
|
|
98
98
|
apiParam: Object,
|
|
99
99
|
parentModel: Object,
|
|
100
100
|
pageWidth: Number,
|
|
101
|
+
topHeight: {
|
|
102
|
+
type: Number,
|
|
103
|
+
default: -1
|
|
104
|
+
},
|
|
101
105
|
showTitle: {
|
|
102
106
|
type: Boolean,
|
|
103
107
|
default: false
|
|
@@ -112,11 +116,15 @@
|
|
|
112
116
|
collapse: [],//分组数组
|
|
113
117
|
collapseActiveNames: [],//默认展开的分组name
|
|
114
118
|
collapseFieldsRow: [],//分组数组对应的行列布局
|
|
115
|
-
independentItem: []
|
|
119
|
+
independentItem: [],//最后一个独立分组的行列布局
|
|
120
|
+
minHeight:'auto'
|
|
116
121
|
};
|
|
117
122
|
},
|
|
118
123
|
mounted() {
|
|
119
124
|
this.init();
|
|
125
|
+
if(this.topHeight>-1){
|
|
126
|
+
this.minHeight=(document.documentElement.clientHeight-this.topHeight-20)+'px';
|
|
127
|
+
}
|
|
120
128
|
},
|
|
121
129
|
updated(){
|
|
122
130
|
if(this.$el.parentElement.scrollHeight>this.$el.parentElement.clientHeight
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<template slot-scope="scope">
|
|
26
26
|
<span v-if="scope.row.isSet">
|
|
27
27
|
<component ref="Fields" :is="model.currentRow.data[v.id].locked || model.currentRow.data[v.id].is!==v.is?model.currentRow.data[v.id].is:v.is"
|
|
28
|
-
:vmodel="model.currentRow.data[v.id]" :api="model.OptApi"
|
|
28
|
+
:vmodel="model.currentRow.data[v.id]" :api="model.OptApi" :key="model.currentRow.data[v.id].rowKey"
|
|
29
29
|
@change="changeHandler(model.currentRow.data[v.id], model.currentRow.data.$sourceIndex)"
|
|
30
30
|
@input="inputHandler(model.currentRow.data[v.id], model.currentRow.data.$sourceIndex)"></component>
|
|
31
31
|
</span>
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<ct-tablecurrency :router="v.router" :colValue="scope.row[v.id].code1" :rowData="scope.row" @click="rolRouterClickHandler">
|
|
39
39
|
</ct-tablecurrency>
|
|
40
40
|
</span>
|
|
41
|
-
<ct-span v-else :vmodel="scope.row[v.id]" :rowNum="scope.row.$sourceIndex" ref="FieldsLabel"></ct-span>
|
|
41
|
+
<ct-span v-else :vmodel="scope.row[v.id]" :rowNum="scope.row.$sourceIndex" :key="scope.row[v.id].rowKey" ref="FieldsLabel"></ct-span>
|
|
42
42
|
</template>
|
|
43
43
|
</el-table-column>
|
|
44
44
|
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
return {
|
|
104
104
|
model: null,
|
|
105
105
|
foucus: false,
|
|
106
|
-
itemKey: Math.random()
|
|
106
|
+
itemKey: Math.random(),
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
created() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="field-top">
|
|
3
3
|
<div style="width:100%;display:flex;">
|
|
4
|
-
<div style="flex:1;" v-if="model !== null" class="ct-inputNumber" :class="[model.attrs.size?'ct-font-size-'+model.attrs.size:'',model.lock ? 'ct-inputNumber-lock' : ''
|
|
5
|
-
|
|
4
|
+
<div style="flex:1;" v-if="model !== null" class="ct-inputNumber" :class="[model.attrs.size?'ct-font-size-'+model.attrs.size:'',model.lock ? 'ct-inputNumber-lock' : '']"
|
|
5
|
+
@mouseover="mouseOverHandle" @mouseout="mouseOutHandle">
|
|
6
6
|
<div class="ct-flex-div" :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']">
|
|
7
7
|
<div v-if="model.showLabel && model.label" class="el-input-group__prepend field-label-div" :class="[model.labelClass]">
|
|
8
8
|
{{model.label}}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<ct-searchtable ref="table" :api="searchDataApi" :searchStatsApi="searchStatsApi" :from="from" @loaded="tableLoaded"
|
|
16
16
|
@toolbarClick="toolbarClickHandler" @refreshParent="refreshParentHandler" :key="reloadKeyTable" @searchComplate="searchComplate"
|
|
17
|
-
@rowClickHandle="rowClickHandle" @scrollHandle="scrollHandle" @refreshRowHandle="refreshRowHandle"
|
|
17
|
+
@rowClickHandle="rowClickHandle" @scrollHandle="scrollHandle" @refreshRowHandle="refreshRowHandle" @doClosePopoverHandle="doClosePopoverHandle"
|
|
18
18
|
@showTitle="showTitleHandler"></ct-searchtable>
|
|
19
19
|
</div>
|
|
20
20
|
<div ref="sidebar" v-if="flagSideBar && flagSideBarOfData"
|
|
@@ -284,6 +284,9 @@
|
|
|
284
284
|
scrollHandle(scrollTop,scrollLeft){
|
|
285
285
|
this.$emit('scrollHandle',scrollTop,scrollLeft)
|
|
286
286
|
},
|
|
287
|
+
doClosePopoverHandle(){
|
|
288
|
+
|
|
289
|
+
},
|
|
287
290
|
}
|
|
288
291
|
}
|
|
289
292
|
</script>
|
|
@@ -73,11 +73,10 @@
|
|
|
73
73
|
case 'showHigh':
|
|
74
74
|
this.$set(this, 'highScreen', !this.highScreen);
|
|
75
75
|
//高级搜索需要切换icon样式
|
|
76
|
-
if(model.icon==='max-open')
|
|
77
|
-
{
|
|
76
|
+
if(model.icon==='max-open'){
|
|
78
77
|
model.icon='max-fold'
|
|
79
|
-
}
|
|
80
|
-
{
|
|
78
|
+
}
|
|
79
|
+
else{
|
|
81
80
|
model.icon='max-open'
|
|
82
81
|
}
|
|
83
82
|
break;
|
|
@@ -294,20 +294,19 @@ export default {
|
|
|
294
294
|
self.$forceUpdate();
|
|
295
295
|
self.$nextTick(() => {
|
|
296
296
|
if (!self.isLayout) {
|
|
297
|
-
if (
|
|
298
|
-
self.$refs.tableParent.scrollHeight <=
|
|
299
|
-
self.$refs.tableParent.offsetHeight
|
|
300
|
-
) {
|
|
297
|
+
if ( self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
|
|
301
298
|
self.tableLoading = true;
|
|
302
299
|
self.model.nextPage(next);
|
|
303
|
-
}
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
304
302
|
self.tableLoading = false;
|
|
305
303
|
self.rowColorChange();
|
|
306
304
|
self.calculatingRowHeight();
|
|
307
305
|
}
|
|
308
306
|
}
|
|
309
307
|
});
|
|
310
|
-
}
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
311
310
|
self.tableLoading = false;
|
|
312
311
|
}
|
|
313
312
|
};
|
|
@@ -403,13 +402,11 @@ export default {
|
|
|
403
402
|
if (rtn) {
|
|
404
403
|
self.$forceUpdate();
|
|
405
404
|
self.$nextTick(() => {
|
|
406
|
-
if (
|
|
407
|
-
self.$refs.tableParent.scrollHeight <=
|
|
408
|
-
self.$refs.tableParent.offsetHeight
|
|
409
|
-
) {
|
|
405
|
+
if ( self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
|
|
410
406
|
self.tableLoading = true;
|
|
411
407
|
self.model.nextPage(next);
|
|
412
|
-
}
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
413
410
|
self.tableLoading = false;
|
|
414
411
|
self.rowColorChange();
|
|
415
412
|
self.resetScroll();
|
|
@@ -418,7 +415,8 @@ export default {
|
|
|
418
415
|
}
|
|
419
416
|
self.setfixedSize();
|
|
420
417
|
});
|
|
421
|
-
}
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
422
420
|
self.tableLoading = false;
|
|
423
421
|
self.rowColorChange();
|
|
424
422
|
}
|
|
@@ -584,34 +582,24 @@ export default {
|
|
|
584
582
|
setTableHeight() {
|
|
585
583
|
var self = this;
|
|
586
584
|
this.$nextTick(() => {
|
|
587
|
-
if (
|
|
588
|
-
this.$refs.searchTable &&
|
|
589
|
-
this.$refs.toolbar &&
|
|
590
|
-
this.$refs.searchTable.parentElement &&
|
|
591
|
-
!self.isLayout
|
|
592
|
-
) {
|
|
585
|
+
if ( this.$refs.searchTable && this.$refs.toolbar &&
|
|
586
|
+
this.$refs.searchTable.parentElement && !self.isLayout) {
|
|
593
587
|
var h1 = this.$refs.searchTable.parentElement.offsetHeight | 0;
|
|
594
588
|
var h2 = this.$refs.searchTable.offsetTop | 0;
|
|
595
589
|
var h3 = this.$refs.toolbar.$el.offsetHeight | 0;
|
|
596
590
|
var h4 = this.$refs.footer.$el.offsetHeight | 0;
|
|
597
591
|
var h5 = this.$refs.listHeader.$el.offsetHeight | 0;
|
|
598
592
|
var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
|
|
599
|
-
var h7 = this.$refs.tableStats
|
|
600
|
-
? (this.$refs.tableStats.$el.offsetHeight + 7) | 0
|
|
601
|
-
: 0;
|
|
593
|
+
var h7 = this.$refs.tableStats ? (this.$refs.tableStats.$el.offsetHeight + 7) | 0 : 0;
|
|
602
594
|
let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - 22;
|
|
603
595
|
this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
|
|
604
596
|
this.$nextTick(() => {
|
|
605
597
|
self.getScrollAttr();
|
|
606
598
|
});
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
) {
|
|
612
|
-
var h1 =
|
|
613
|
-
this.$parent.$parent.$parent.$parent.$refs.sidebar.offsetHeight |
|
|
614
|
-
0;
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
if (this.$parent.$parent.$vnode.componentOptions.tag === "ct-PropertySimpleDetailRET") {
|
|
602
|
+
var h1 = this.$parent.$parent.$parent.$parent.$refs.sidebar.offsetHeight | 0;
|
|
615
603
|
var h2 = 0;
|
|
616
604
|
if (this.$parent.$parent.$refs.contact) {
|
|
617
605
|
h2 = this.$parent.$parent.$refs.contact.offsetHeight | 0;
|
|
@@ -993,13 +981,11 @@ export default {
|
|
|
993
981
|
}
|
|
994
982
|
self.$forceUpdate();
|
|
995
983
|
self.$nextTick(() => {
|
|
996
|
-
if (
|
|
997
|
-
self.$refs.tableParent.scrollHeight <=
|
|
998
|
-
self.$refs.tableParent.offsetHeight
|
|
999
|
-
) {
|
|
984
|
+
if ( self.$refs.tableParent.scrollHeight <= self.$refs.tableParent.offsetHeight) {
|
|
1000
985
|
self.tableLoading = true;
|
|
1001
986
|
self.model.nextPage(next);
|
|
1002
|
-
}
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
1003
989
|
self.tableLoading = false;
|
|
1004
990
|
self.rowColorChange();
|
|
1005
991
|
self.resetScroll();
|
|
@@ -1372,10 +1358,7 @@ export default {
|
|
|
1372
1358
|
closeCallTel(VueCom) {
|
|
1373
1359
|
var self = this;
|
|
1374
1360
|
if (self.model.currentCallTelrouter) {
|
|
1375
|
-
if (
|
|
1376
|
-
typeof VueCom.$refs[self.model.currentCallTelrouter] !== "undefined"
|
|
1377
|
-
) {
|
|
1378
|
-
console.log(VueCom);
|
|
1361
|
+
if ( typeof VueCom.$refs[self.model.currentCallTelrouter] !== "undefined") {
|
|
1379
1362
|
VueCom.closeCallTel();
|
|
1380
1363
|
return true;
|
|
1381
1364
|
}
|
|
@@ -43,6 +43,7 @@ const ContactList = function (source,para ,callBack) {
|
|
|
43
43
|
rtn._buttons = [];
|
|
44
44
|
data.content.toolButtons.forEach((v) => {
|
|
45
45
|
var button = Router(v);
|
|
46
|
+
button.key = Math.random().toString();
|
|
46
47
|
button.is = "ct-btn";
|
|
47
48
|
button.attrs = { size: "mini", class: 'max-btn-gray' }
|
|
48
49
|
rtn._buttons.push(button);
|
|
@@ -349,7 +349,7 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
349
349
|
rowNum = rowNum !== null ? rowNum : data.listData.currentRowIndex;
|
|
350
350
|
|
|
351
351
|
//若该行正在编辑,则取编辑状态的。
|
|
352
|
-
if (data && data.listData && data.listData.currentRow.data && data.listData.currentRow.data[fiedlId]
|
|
352
|
+
if (data && data.listData && data.listData.currentRow.data && data.listData.currentRow.data[fiedlId] && rowNum>-1
|
|
353
353
|
&& data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex && data.listData.currentRow.isSet) {
|
|
354
354
|
if(fiedlId=='deleted' || fiedlId=='flagDeleted'){
|
|
355
355
|
return data.listData.currentRow.data.deleted || false;
|
|
@@ -392,14 +392,15 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
392
392
|
if (data) {
|
|
393
393
|
if (data.field) {
|
|
394
394
|
data.field.source[attrName] = value;
|
|
395
|
-
data.listData.updateListField(data.listData.$self.$refs.FieldsLabel, rowNum, fiedlId);
|
|
395
|
+
data.listData.updateListField(data.listData.$self.$refs.FieldsLabel, data.listData.source.rows[rowNum].$sourceIndex, fiedlId);
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
//正在编辑的行
|
|
399
|
-
if (data.listData.currentRow.data && data.listData.currentRow.data[fiedlId]
|
|
399
|
+
if (data.listData.currentRow.data && data.listData.currentRow.data[fiedlId] && rowNum>-1
|
|
400
400
|
&& data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex) {
|
|
401
401
|
let currentField = data.listData.currentRow.data[fiedlId];
|
|
402
402
|
currentField.source[attrName] = value;
|
|
403
|
+
data.listData.currentRow.data[fiedlId].rowKey=Math.random();
|
|
403
404
|
//校验自己
|
|
404
405
|
if (currentField.self && currentField.self.validExcute) {
|
|
405
406
|
currentField.self.validExcute();
|
|
@@ -168,6 +168,7 @@ const FormList = function (source, master) {
|
|
|
168
168
|
}
|
|
169
169
|
if (item instanceof Object) {
|
|
170
170
|
item.form = rtn.form;
|
|
171
|
+
item.rowKey=Math.random(),
|
|
171
172
|
row.field.push(item);
|
|
172
173
|
}
|
|
173
174
|
});
|
|
@@ -227,6 +228,7 @@ const FormList = function (source, master) {
|
|
|
227
228
|
let rowData = rtn.initRow(JSON.parse(JSON.stringify(sourceRow)));
|
|
228
229
|
for (let j = 0; j < rowData.field.length; j++) {//遍历每一列
|
|
229
230
|
row[rowData.field[j].id] = rowData.field[j];
|
|
231
|
+
row[rowData.field[j].id].rowKey=Math.random();
|
|
230
232
|
}
|
|
231
233
|
row.$sourceIndex = sourceRow.$sourceIndex+"";
|
|
232
234
|
return row;
|
|
@@ -257,6 +259,7 @@ const FormList = function (source, master) {
|
|
|
257
259
|
}
|
|
258
260
|
});
|
|
259
261
|
if (ref) {
|
|
262
|
+
ref.vmodel.rowKey=Math.random(),
|
|
260
263
|
ref.$forceUpdate();
|
|
261
264
|
}
|
|
262
265
|
}
|
|
@@ -328,7 +331,7 @@ const FormList = function (source, master) {
|
|
|
328
331
|
self.currentRowIndex=index;
|
|
329
332
|
var dialogOption = {
|
|
330
333
|
title: '修改',
|
|
331
|
-
pane: common.getParentPane(self),
|
|
334
|
+
pane: common.getParentPane(self.$self),
|
|
332
335
|
content: [{
|
|
333
336
|
component: 'ct-form',
|
|
334
337
|
attrs: {
|
|
@@ -336,7 +339,7 @@ const FormList = function (source, master) {
|
|
|
336
339
|
scripts: source.scripts,
|
|
337
340
|
parameterAction: self.OptApi,
|
|
338
341
|
fields: JSON.parse(JSON.stringify(source.rows[index].columns)),
|
|
339
|
-
colSpan:
|
|
342
|
+
colSpan: rtn.pageColumns,
|
|
340
343
|
buttons: [
|
|
341
344
|
{
|
|
342
345
|
"key": "test1",
|
|
@@ -345,8 +348,8 @@ const FormList = function (source, master) {
|
|
|
345
348
|
}
|
|
346
349
|
]
|
|
347
350
|
},
|
|
348
|
-
width:'
|
|
349
|
-
height: '
|
|
351
|
+
width: rtn.pageWidth+'px',
|
|
352
|
+
height: rtn.pageHeight+'px'
|
|
350
353
|
},
|
|
351
354
|
on: {
|
|
352
355
|
submit: function (ev) {
|
|
@@ -618,7 +621,16 @@ const FormList = function (source, master) {
|
|
|
618
621
|
return button;
|
|
619
622
|
}
|
|
620
623
|
return null;
|
|
621
|
-
}
|
|
624
|
+
},
|
|
625
|
+
get pageWidth() {
|
|
626
|
+
return source.pageWidth || 500;
|
|
627
|
+
},
|
|
628
|
+
get pageHeight() {
|
|
629
|
+
return source.pageHeight || 400;
|
|
630
|
+
},
|
|
631
|
+
get pageColumns() {
|
|
632
|
+
return source.pageColumns || 1;
|
|
633
|
+
},
|
|
622
634
|
};
|
|
623
635
|
return rtn;
|
|
624
636
|
};
|
|
@@ -38,6 +38,13 @@ const Tags = function (source, moreActionRouter) {
|
|
|
38
38
|
return source.code1;
|
|
39
39
|
},
|
|
40
40
|
set text(v) {
|
|
41
|
+
|
|
42
|
+
//由于tags存的数据都是json对象 所以如果传进来的数据是string类型则 需要转成对象
|
|
43
|
+
if(typeof v=="string")
|
|
44
|
+
{
|
|
45
|
+
v=JSON.parse(v);
|
|
46
|
+
}
|
|
47
|
+
|
|
41
48
|
if (source.code1 !== '') {
|
|
42
49
|
var tempV1 = JSON.parse(source.code1);
|
|
43
50
|
tempV1.forEach((v1) => {
|
|
@@ -68,6 +75,7 @@ const Tags = function (source, moreActionRouter) {
|
|
|
68
75
|
return '';
|
|
69
76
|
},
|
|
70
77
|
get labelValue() {
|
|
78
|
+
|
|
71
79
|
if (source.code1) {
|
|
72
80
|
var rtnLabelValue = '';
|
|
73
81
|
JSON.parse(source.code1).forEach((op) => {
|
package/src/main.js
CHANGED
|
@@ -13,10 +13,10 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
13
13
|
Vue.config.productionTip = false;
|
|
14
14
|
Vue.use(centaline, {
|
|
15
15
|
// baseUrl: "http://10.88.22.46:7070/v1/form/router",
|
|
16
|
-
baseUrl: "http://10.88.23.22:9999/v1/form/router",
|
|
17
|
-
|
|
18
|
-
// baseUrl: "http://10.88.22.
|
|
19
|
-
|
|
16
|
+
// baseUrl: "http://10.88.23.22:9999/v1/form/router",
|
|
17
|
+
baseUrl: "http://tjcptest.centaline.com.cn/",
|
|
18
|
+
// baseUrl: "http://10.88.22.40:8080/",
|
|
19
|
+
flagRouterSelf: true,
|
|
20
20
|
zindex: 999,
|
|
21
21
|
showRequestSuccessMessage: true,
|
|
22
22
|
showRequestErrorMessage: true,
|
|
@@ -41,7 +41,7 @@ Vue.use(centaline, {
|
|
|
41
41
|
// 获取请求头
|
|
42
42
|
getRequestHeaders: function () {
|
|
43
43
|
return {
|
|
44
|
-
oldToken: '
|
|
44
|
+
oldToken: '75bb9cb0-be2e-4f13-b833-932abc089020',
|
|
45
45
|
originalRequestURL: 'http://10.88.22.67:8080',
|
|
46
46
|
EstateInfo: '{"estateId":"201703020943128D8A8FCF463E4016D6","estateName":"%E4%B8%87%E7%A7%91%E4%BA%91%E5%9F%8E"}',
|
|
47
47
|
Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE2OGI1YThjLThiZTUtNDQyZi04NTA4LWMyODY4N2NkYmEzMSJ9.Rk26QdZSUzDVdjdRxGxDApOt5W6KYjmyjmsXpWeZb5E5NwZjpXnHYwhYkKjNxIeyg--OV2UrzFa2SxGzZ-Wneg',
|