centaline-data-driven 1.5.24 → 1.5.25
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/release-log.md +25 -0
- package/src/SearchList.vue +5 -5
- package/src/centaline/css/ccai.css +9 -4
- package/src/centaline/css/common.css +4 -0
- package/src/centaline/dynamicBtn/src/dynamicBtn.vue +4 -1
- package/src/centaline/dynamicContact/src/dynamicContact.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicContactList.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicDetail.vue +3 -3
- package/src/centaline/dynamicDetail/src/dynamicEstateBuildingDetail.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicEstateSimpleDetail.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +1 -1
- package/src/centaline/dynamicForm/src/dynamicForm.vue +28 -13
- package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +3 -2
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +15 -10
- package/src/centaline/dynamicSearchList/src/dynamicTableStats.vue +47 -14
- package/src/centaline/dynamicSearchListTab/src/dynamicSearchListOne.vue +3 -2
- package/src/centaline/dynamicTimeSelect/src/dynamicTimeSelect.vue +19 -8
- package/src/centaline/dynamicTree/src/dynamicSearchTree.vue +2 -2
- package/src/centaline/loader/src/ctl/Form.js +12 -4
- package/src/centaline/loader/src/ctl/Mo.js +2 -2
- package/src/centaline/loader/src/ctl/Router.js +25 -0
- package/src/centaline/loader/src/ctl/SearchTable.js +7 -1
- package/src/centaline/loader/src/ctl/TimeSelect.js +17 -2
- package/src/centaline/loader/src/ctl/lib/Enum.js +6 -1
- package/src/main.js +3 -3
- 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/release-log.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## v1.5.25
|
|
2
|
+
2023-06-19
|
|
3
|
+
|
|
4
|
+
优化
|
|
5
|
+
|
|
6
|
+
优化树状组件列表页表格高度计算问题
|
|
7
|
+
|
|
8
|
+
时间区间组件新增单独每个时间必填校验以及placeholder显示
|
|
9
|
+
|
|
10
|
+
toolButtons打开列表时,支持queryString传参
|
|
11
|
+
|
|
12
|
+
Checkbox按钮
|
|
13
|
+
|
|
14
|
+
详情页展开优化
|
|
15
|
+
|
|
16
|
+
列表统计栏,点击更多里面的选项,体验优化
|
|
17
|
+
|
|
18
|
+
bug修复
|
|
19
|
+
|
|
20
|
+
解决侧边栏表格tab宽度计算问题
|
|
21
|
+
|
|
22
|
+
解决ccai在列表和弹层中固定按钮位置不同问题
|
|
23
|
+
|
|
24
|
+
mo默认值bug处理
|
|
25
|
+
|
|
1
26
|
## v1.5.24
|
|
2
27
|
2023-06-13
|
|
3
28
|
|
package/src/SearchList.vue
CHANGED
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
:searchDataApi="'/api/transaction/adjustRecord/getTableList'">
|
|
15
15
|
</ct-searchlist> -->
|
|
16
16
|
|
|
17
|
-
<ct-searchlist :apiParam="para"
|
|
17
|
+
<!-- <ct-searchlist :apiParam="para"
|
|
18
18
|
:searchConditionApi="'/api/transfer_subscribe_master/layout'"
|
|
19
19
|
:searchDataApi="'/api/transfer_subscribe_master/transferSubscribeMasterList'">
|
|
20
|
-
</ct-searchlist>
|
|
20
|
+
</ct-searchlist> -->
|
|
21
21
|
|
|
22
22
|
<!-- <ct-searchlist :apiParam="para"
|
|
23
23
|
:searchConditionApi="'/wf/todo/wx/layout'"
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
:searchDataApi="'/RightValueList/getListOfSearchModel'">
|
|
43
43
|
</ct-searchlist> -->
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
<ct-searchlist
|
|
46
46
|
:searchCategoryApi="'/PropertyPublishList/getLayoutOfSearchCategory'"
|
|
47
|
-
:searchConditionApi="'/PropertyPublishList/getLayoutOfSearchForRET'"
|
|
47
|
+
:searchConditionApi="'/PropertyPublishList/getLayoutOfSearchForRET'" :searchStatsApi="'/PropertyPublishList/getListStatsForRET'"
|
|
48
48
|
:searchDataApi="'/PropertyPublishList/getListOfSearchModelForRET'">
|
|
49
|
-
</ct-searchlist>
|
|
49
|
+
</ct-searchlist>
|
|
50
50
|
|
|
51
51
|
<!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
|
|
52
52
|
:searchDataApi="'/PropertyRETList/getListOfSearchModel'"
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
padding-top: 0px;
|
|
3
3
|
padding-bottom: 0;
|
|
4
4
|
}
|
|
5
|
-
.ccai.button-absolute{
|
|
6
|
-
bottom: 26px;
|
|
7
|
-
width: calc(100% -
|
|
5
|
+
#form-app .ccai.button-absolute{
|
|
6
|
+
/* bottom: 26px; */
|
|
7
|
+
width: calc(100% - 52px);
|
|
8
|
+
margin-bottom: 20px;
|
|
8
9
|
}
|
|
10
|
+
.btnPadBom {
|
|
11
|
+
padding-bottom: 4px !important;
|
|
12
|
+
}
|
|
9
13
|
.ccai.ct-tags .ct-tags-mini{
|
|
10
14
|
font-size: 12px !important;
|
|
11
15
|
}
|
|
@@ -17,4 +21,5 @@ font-size: 12px !important;
|
|
|
17
21
|
}
|
|
18
22
|
.ccai .ccai-aside.el-aside{
|
|
19
23
|
padding: 0 !important;
|
|
20
|
-
}
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -706,6 +706,10 @@ html {
|
|
|
706
706
|
.el-tabs__nav .el-tabs__item.is-active{
|
|
707
707
|
color: var(--chinaRed);
|
|
708
708
|
border-bottom: 3px solid var(--chinaRed);
|
|
709
|
+
}
|
|
710
|
+
.el-tabs__item:focus.is-active.is-focus:not(:active) {
|
|
711
|
+
box-shadow: none !important;
|
|
712
|
+
border-radius: 3px;
|
|
709
713
|
}
|
|
710
714
|
.el-tabs__active-bar{
|
|
711
715
|
background-color: var(--chinaRed);
|
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
<span v-else slot="reference">{{model.label}}</span>
|
|
51
51
|
</el-popover>
|
|
52
52
|
</el-button>
|
|
53
|
+
<el-checkbox v-else-if="model.isCheckbox" v-model="model.code1" @change="clickHandle">
|
|
54
|
+
{{model.label}}
|
|
55
|
+
</el-checkbox>
|
|
53
56
|
<el-button v-else class="max"
|
|
54
57
|
:type="model.isHyperLink ? 'text' : 'primary'"
|
|
55
58
|
v-bind="model.attrs" @click="clickHandle"
|
|
@@ -57,7 +60,7 @@
|
|
|
57
60
|
:icon="model.icon"
|
|
58
61
|
:disabled="model.disabled || model.locked">
|
|
59
62
|
<div v-if="flagAppMode" :title="model.label">
|
|
60
|
-
<img
|
|
63
|
+
<img :src="model.imgUrl" :height="model.buttonHeight+'px'"/>
|
|
61
64
|
<div style="margin-top:5px;" class="labelText">{{model.label}}</div>
|
|
62
65
|
</div>
|
|
63
66
|
<div v-else>
|
|
@@ -237,7 +237,7 @@ export default {
|
|
|
237
237
|
attrs: {
|
|
238
238
|
searchConditionApi: field.actionForSearchLayout,
|
|
239
239
|
searchDataApi: field.actionForSearch,
|
|
240
|
-
apiParam: submitData,
|
|
240
|
+
apiParam: field.getActionPara(submitData).para,
|
|
241
241
|
width: field.dialogWidth + 'px',
|
|
242
242
|
height: field.dialogHeight + 'px'
|
|
243
243
|
},
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
attrs: {
|
|
372
372
|
searchConditionApi: field.actionForSearchLayout,
|
|
373
373
|
searchDataApi: field.actionForSearch,
|
|
374
|
-
apiParam: submitData,
|
|
374
|
+
apiParam: field.getActionPara(submitData).para,
|
|
375
375
|
width: field.dialogWidth + 'px',
|
|
376
376
|
height: field.dialogHeight + 'px'
|
|
377
377
|
},
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
:apiParam="apiParam" :pageHeight="listHeight+'px'" @tableLoaded="loaded">
|
|
23
23
|
</ct-SearchList>
|
|
24
24
|
|
|
25
|
-
<div v-if="pageType=='Form'" style="overflow: auto;" :style="{height:listHeight+'px'}">
|
|
26
|
-
<ct-form :api="api" :apiParam="apiParam" @loaded="loaded">
|
|
25
|
+
<div ref="detailForm" v-if="pageType=='Form'" style="overflow: auto;" :style="{height:(listHeight-5)+'px'}">
|
|
26
|
+
<ct-form :api="api" :apiParam="apiParam" @loaded="loaded" :flagScroll="'true'" :drowerClose="drowerClose">
|
|
27
27
|
</ct-form>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
simpleRouterclickHandler(field,data) {
|
|
86
86
|
this.$emit('simpleRouterclickHandler',field,data);
|
|
87
87
|
},
|
|
88
|
-
loaded(model) {
|
|
88
|
+
loaded(model) {
|
|
89
89
|
//通知父组件加载完成
|
|
90
90
|
this.$emit('loaded',model);
|
|
91
91
|
},
|
|
@@ -729,7 +729,7 @@ export default {
|
|
|
729
729
|
attrs: {
|
|
730
730
|
searchConditionApi: field.actionForSearchLayout,
|
|
731
731
|
searchDataApi: field.actionForSearch,
|
|
732
|
-
apiParam: submitData,
|
|
732
|
+
apiParam: field.getActionPara(submitData).para,
|
|
733
733
|
width: field.dialogWidth + "px",
|
|
734
734
|
height: field.dialogHeight + "px",
|
|
735
735
|
},
|
|
@@ -519,7 +519,7 @@ export default {
|
|
|
519
519
|
attrs: {
|
|
520
520
|
searchConditionApi: field.actionForSearchLayout,
|
|
521
521
|
searchDataApi: field.actionForSearch,
|
|
522
|
-
apiParam: submitData,
|
|
522
|
+
apiParam: field.getActionPara(submitData).para,
|
|
523
523
|
width: field.dialogWidth + 'px',
|
|
524
524
|
height: field.dialogHeight + 'px'
|
|
525
525
|
},
|
|
@@ -932,7 +932,7 @@ export default {
|
|
|
932
932
|
attrs: {
|
|
933
933
|
searchConditionApi: field.actionForSearchLayout,
|
|
934
934
|
searchDataApi: field.actionForSearch,
|
|
935
|
-
apiParam: submitData,
|
|
935
|
+
apiParam: field.getActionPara(submitData).para,
|
|
936
936
|
width: field.dialogWidth + "px",
|
|
937
937
|
height: field.dialogHeight + "px",
|
|
938
938
|
},
|
|
@@ -942,7 +942,7 @@ export default {
|
|
|
942
942
|
attrs: {
|
|
943
943
|
searchConditionApi: field.actionForSearchLayout,
|
|
944
944
|
searchDataApi: field.actionForSearch,
|
|
945
|
-
apiParam: submitData,
|
|
945
|
+
apiParam: field.getActionPara(submitData).para,
|
|
946
946
|
width: field.dialogWidth + "px",
|
|
947
947
|
height: field.dialogHeight + "px",
|
|
948
948
|
},
|
|
@@ -519,7 +519,7 @@ export default {
|
|
|
519
519
|
attrs: {
|
|
520
520
|
searchConditionApi: field.actionForSearchLayout,
|
|
521
521
|
searchDataApi: field.actionForSearch,
|
|
522
|
-
apiParam: submitData,
|
|
522
|
+
apiParam: field.getActionPara(submitData).para,
|
|
523
523
|
width: field.dialogWidth + 'px',
|
|
524
524
|
height: field.dialogHeight + 'px'
|
|
525
525
|
},
|
|
@@ -74,8 +74,9 @@
|
|
|
74
74
|
</el-row>
|
|
75
75
|
<el-row v-if="model.buttons.findIndex((v)=>{return v.show}) > -1" :class="isScroll?'ccai button-absolute':'button-initial'"
|
|
76
76
|
:style="{'max-width':pageWidth?(pageWidth-20)+'px':'100%'}">
|
|
77
|
-
<el-col :span="24" style="text-align:center;padding-bottom: 1px;">
|
|
78
|
-
<component v-for="(btn, index) in model.buttons" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"
|
|
77
|
+
<el-col :span="24" style="text-align:center;padding-bottom: 1px;padding-left: 5px;padding-right: 5px;" class="btnPadBom">
|
|
78
|
+
<component v-for="(btn, index) in model.buttons" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"
|
|
79
|
+
:style="{'float':btn.isCheckbox ? btn.alignCss:''}"></component>
|
|
79
80
|
</el-col>
|
|
80
81
|
</el-row>
|
|
81
82
|
<div v-if="isScroll" style="height: 34px;"></div>
|
|
@@ -124,6 +125,10 @@
|
|
|
124
125
|
Boolean,
|
|
125
126
|
default: false,
|
|
126
127
|
},
|
|
128
|
+
drowerClose:{
|
|
129
|
+
String,
|
|
130
|
+
default: 'close',
|
|
131
|
+
},
|
|
127
132
|
},
|
|
128
133
|
data() {
|
|
129
134
|
return {
|
|
@@ -147,10 +152,13 @@
|
|
|
147
152
|
this.setCss();
|
|
148
153
|
},
|
|
149
154
|
updated() {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
155
|
+
this.$nextTick(() => {
|
|
156
|
+
let parentDom=this.$el.parentElement;
|
|
157
|
+
if (parentDom.scrollHeight > parentDom.clientHeight
|
|
158
|
+
&& this.model && (!this.model.isHorizontalLayout || this.flagScroll)) {
|
|
159
|
+
this.isScroll = true;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
154
162
|
},
|
|
155
163
|
methods: {
|
|
156
164
|
init() {
|
|
@@ -163,6 +171,9 @@
|
|
|
163
171
|
this.independentItem.splice(0, this.independentItem.length);
|
|
164
172
|
|
|
165
173
|
this.$nextTick(function () {
|
|
174
|
+
if(this.drowerClose && this.drowerClose=='open'){
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
166
177
|
if (typeof self.api !== 'undefined') {
|
|
167
178
|
self.loaderObj.Form(self.api, self.load, this.apiParam, self.failLoad);
|
|
168
179
|
}
|
|
@@ -1096,13 +1107,17 @@
|
|
|
1096
1107
|
},
|
|
1097
1108
|
tabClickHandler(){
|
|
1098
1109
|
this.$nextTick(() => {
|
|
1099
|
-
if (this.$el.parentElement.scrollHeight > this.$el.parentElement.clientHeight
|
|
1100
|
-
&& this.model && (!this.model.isHorizontalLayout || this.flagScroll)) {
|
|
1101
|
-
|
|
1102
|
-
}
|
|
1103
|
-
else{
|
|
1104
|
-
|
|
1105
|
-
}
|
|
1110
|
+
// if (this.$el.parentElement.scrollHeight > this.$el.parentElement.clientHeight
|
|
1111
|
+
// && this.model && (!this.model.isHorizontalLayout || this.flagScroll)) {
|
|
1112
|
+
// this.isScroll = true;
|
|
1113
|
+
// }
|
|
1114
|
+
// else{
|
|
1115
|
+
// this.isScroll = false;
|
|
1116
|
+
// }
|
|
1117
|
+
});
|
|
1118
|
+
},
|
|
1119
|
+
refreshPage() {
|
|
1120
|
+
this.$nextTick(() => {
|
|
1106
1121
|
});
|
|
1107
1122
|
},
|
|
1108
1123
|
}
|
|
@@ -247,6 +247,7 @@
|
|
|
247
247
|
},
|
|
248
248
|
tableLoaded() {
|
|
249
249
|
var self = this;
|
|
250
|
+
this.title=this.$refs.table.model.title;
|
|
250
251
|
if (typeof this.$refs.table.model.cellLayout !== "undefined") {
|
|
251
252
|
this.$refs.screen.LoadLayout();
|
|
252
253
|
}
|
|
@@ -274,7 +275,7 @@
|
|
|
274
275
|
this.selectIndex=-1;
|
|
275
276
|
|
|
276
277
|
if (typeof window.localStorage !== "undefined" && !this.sideBarStatus) {
|
|
277
|
-
var tagkey = window.localStorage.getItem(this.sideBarPageType+"key");
|
|
278
|
+
var tagkey = window.localStorage.getItem(this.sideBarPageType+"key"+this.title);
|
|
278
279
|
this.sideBarStatus=tagkey;
|
|
279
280
|
}
|
|
280
281
|
|
|
@@ -349,7 +350,7 @@
|
|
|
349
350
|
}
|
|
350
351
|
}
|
|
351
352
|
}
|
|
352
|
-
window.localStorage.setItem(this.sideBarPageType+"key", this.sideBarStatus);
|
|
353
|
+
window.localStorage.setItem(this.sideBarPageType+"key"+this.title, this.sideBarStatus);
|
|
353
354
|
this.$refs.table.setTableHeight();
|
|
354
355
|
},
|
|
355
356
|
refreshPage(pageHeight) {
|
|
@@ -721,7 +721,7 @@ export default {
|
|
|
721
721
|
var h1 = this.$refs.searchTable.parentElement.offsetHeight | 0;
|
|
722
722
|
var h2 = this.$refs.searchTable.offsetTop | 0;
|
|
723
723
|
if(this.from && this.from=='detail'){
|
|
724
|
-
h2=h2-this.screenTop-
|
|
724
|
+
h2=h2-this.screenTop - 13;
|
|
725
725
|
}
|
|
726
726
|
var h3 = this.$refs.toolbar.$el.offsetHeight | 0;
|
|
727
727
|
var h4 = this.$refs.footer.$el.offsetHeight | 0;
|
|
@@ -729,7 +729,12 @@ export default {
|
|
|
729
729
|
var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
|
|
730
730
|
var h7 = this.$refs.tableStats ? (this.$refs.tableStats.$el.offsetHeight + 7) | 0 : 0;
|
|
731
731
|
var h8 = this.$refs.popupButton ? this.$refs.popupButton.offsetHeight + 21 : 0;
|
|
732
|
-
|
|
732
|
+
var h9 = 0
|
|
733
|
+
if (this.$parent.$parent.$parent.$children[0].$el.classList.contains('el-aside')) {
|
|
734
|
+
h9 = 4
|
|
735
|
+
}
|
|
736
|
+
let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - h8 + h9 - 8 ;
|
|
737
|
+
|
|
733
738
|
this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
|
|
734
739
|
this.$nextTick(() => {
|
|
735
740
|
self.getScrollAttr();
|
|
@@ -766,6 +771,8 @@ export default {
|
|
|
766
771
|
h7 = this.$refs.listHeader.$el.offsetHeight | 0;
|
|
767
772
|
}
|
|
768
773
|
var h8 = this.$refs.tableStats ? (this.$refs.tableStats.$el.offsetHeight + 7) | 0 : 0;
|
|
774
|
+
|
|
775
|
+
|
|
769
776
|
let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - h8 - 290 -7;
|
|
770
777
|
if(this.flagAppMode){
|
|
771
778
|
tableHeight = tableHeight + 40;
|
|
@@ -1151,11 +1158,9 @@ export default {
|
|
|
1151
1158
|
showClose:true,
|
|
1152
1159
|
});
|
|
1153
1160
|
}
|
|
1154
|
-
if(!field.isExport)
|
|
1155
|
-
{
|
|
1161
|
+
if(!field.isExport){
|
|
1156
1162
|
self.getPage(1);
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1163
|
+
}
|
|
1159
1164
|
},
|
|
1160
1165
|
error(data) {
|
|
1161
1166
|
self.$common.closeDialog(dialogOption.dialog);
|
|
@@ -1278,7 +1283,7 @@ export default {
|
|
|
1278
1283
|
attrs: {
|
|
1279
1284
|
searchConditionApi: field.actionForSearchLayout,
|
|
1280
1285
|
searchDataApi: field.actionForSearch,
|
|
1281
|
-
apiParam: submitData,
|
|
1286
|
+
apiParam: field.getActionPara(submitData).para,
|
|
1282
1287
|
width: field.dialogWidth + "px",
|
|
1283
1288
|
height: field.dialogHeight + "px",
|
|
1284
1289
|
documentHeight: self.documentHeight,
|
|
@@ -1309,7 +1314,7 @@ export default {
|
|
|
1309
1314
|
attrs: {
|
|
1310
1315
|
searchConditionApi: field.actionForSearchLayout,
|
|
1311
1316
|
searchDataApi: field.actionForSearch,
|
|
1312
|
-
apiParam: submitData,
|
|
1317
|
+
apiParam: field.getActionPara(submitData).para,
|
|
1313
1318
|
width: field.dialogWidth + "px",
|
|
1314
1319
|
height: field.dialogHeight + "px",
|
|
1315
1320
|
},
|
|
@@ -1562,7 +1567,7 @@ export default {
|
|
|
1562
1567
|
attrs: {
|
|
1563
1568
|
searchConditionApi: field.actionForSearchLayout,
|
|
1564
1569
|
searchDataApi: field.actionForSearch,
|
|
1565
|
-
apiParam: submitData,
|
|
1570
|
+
apiParam: field.getActionPara(submitData).para,
|
|
1566
1571
|
width: field.dialogWidth + "px",
|
|
1567
1572
|
height: field.dialogHeight + "px",
|
|
1568
1573
|
},
|
|
@@ -1591,7 +1596,7 @@ export default {
|
|
|
1591
1596
|
attrs: {
|
|
1592
1597
|
searchConditionApi: field.actionForSearchLayout,
|
|
1593
1598
|
searchDataApi: field.actionForSearch,
|
|
1594
|
-
apiParam: submitData,
|
|
1599
|
+
apiParam: field.getActionPara(submitData).para,
|
|
1595
1600
|
width: field.dialogWidth + "px",
|
|
1596
1601
|
height: field.dialogHeight + "px",
|
|
1597
1602
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
v-for="(item, index) in showData[0]"
|
|
47
47
|
@click="handleClick($event, item,true)"
|
|
48
48
|
>
|
|
49
|
-
<ul class="btnTab">
|
|
49
|
+
<ul class="btnTab" :style="{'width':(index == showData[0].length-1 ? lastWidth + 'px' : '' ),'white-space':(index == showData[0].length-1 ? 'nowrap' : '' )}">
|
|
50
50
|
<li
|
|
51
51
|
:class="[
|
|
52
52
|
selectStats ==item.fieldName1 + '*' + item.code1
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<div
|
|
83
83
|
class="popovertablf"
|
|
84
84
|
v-for="(item, index) in showData[1]"
|
|
85
|
-
@click="handleClick($event, item,true)"
|
|
85
|
+
@click="handleClick($event, item,true,1,index)"
|
|
86
86
|
>
|
|
87
87
|
<ul class="popoverbtnTab" style="padding: 0px">
|
|
88
88
|
<li
|
|
@@ -140,6 +140,8 @@ export default {
|
|
|
140
140
|
selectStats: [],
|
|
141
141
|
data: [],
|
|
142
142
|
showData: [],
|
|
143
|
+
lastWidth:0,
|
|
144
|
+
sortData: null,
|
|
143
145
|
option: {
|
|
144
146
|
isHidden: true, //是否开启操作栏隐藏设置,默认开启
|
|
145
147
|
showNum: 3, //如果isHidden为true时,个数大于3就会隐藏,默认是3
|
|
@@ -154,10 +156,10 @@ export default {
|
|
|
154
156
|
var self = this;
|
|
155
157
|
self.showWidth =
|
|
156
158
|
self.$refs.tableStatistics.offsetWidth || document.body.clientWidth;
|
|
157
|
-
|
|
159
|
+
window.addEventListener('resize', function () {
|
|
158
160
|
self.showWidth =
|
|
159
161
|
self.$refs.tableStatistics.offsetWidth || document.body.clientWidth;
|
|
160
|
-
};
|
|
162
|
+
});
|
|
161
163
|
},
|
|
162
164
|
methods: {
|
|
163
165
|
load(data) {
|
|
@@ -166,12 +168,29 @@ export default {
|
|
|
166
168
|
self.FlagStatistics = false;
|
|
167
169
|
self.data = data.source.content;
|
|
168
170
|
self.selectVa = "";
|
|
169
|
-
|
|
170
|
-
|
|
171
|
+
if (self.data.length > 0) {
|
|
172
|
+
if (self.sortData == null) {
|
|
173
|
+
self.sortData = {};
|
|
174
|
+
self.data.forEach((item, index) => {
|
|
175
|
+
self.sortData[item.fieldName1 + "*" + item.code1] = index;
|
|
176
|
+
item.sort = index;
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
self.data.forEach((item, index) => {
|
|
181
|
+
item.sort = self.sortData[item.fieldName1 + "*" + item.code1];
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
self.data.sort(function (a, b) {
|
|
185
|
+
if (a.sort > b.sort) {
|
|
186
|
+
return 1; // 交换顺序
|
|
187
|
+
} else {
|
|
188
|
+
return -1; // 顺序不变
|
|
189
|
+
}
|
|
190
|
+
});
|
|
171
191
|
let i = self.data.findIndex(
|
|
172
192
|
(v) => self.selectStats === v.fieldName1 + "*" + v.code1
|
|
173
193
|
);
|
|
174
|
-
|
|
175
194
|
if (i == -1 || self.selectStats == []) {
|
|
176
195
|
self.handleClick(null, self.data[0], false);
|
|
177
196
|
}
|
|
@@ -187,13 +206,16 @@ export default {
|
|
|
187
206
|
var sumWidth = 0;
|
|
188
207
|
for (var i = 0; i < self.data.length; i++) {
|
|
189
208
|
var moreWidth = 20;
|
|
190
|
-
sumWidth =
|
|
191
|
-
|
|
209
|
+
// sumWidth =
|
|
210
|
+
// sumWidth + self.$refs["StatisticsItem" + i][0].offsetWidth;
|
|
211
|
+
sumWidth += self.$refs["StatisticsItem" + i][0].getBoundingClientRect().width;
|
|
212
|
+
sumWidth = Math.ceil(sumWidth * 100) / 100;
|
|
192
213
|
var nextWidth = 0;
|
|
193
214
|
if (i + 1 < self.data.length) {
|
|
194
215
|
try {
|
|
195
|
-
nextWidth =
|
|
196
|
-
|
|
216
|
+
// nextWidth = self.$refs["StatisticsItem" + (i + 1)][0].offsetWidth;
|
|
217
|
+
nextWidth = self.$refs["StatisticsItem" + (i + 1)][0].getBoundingClientRect().width;
|
|
218
|
+
nextWidth = Math.ceil(nextWidth * 100) / 100;
|
|
197
219
|
} catch (e) {}
|
|
198
220
|
} else {
|
|
199
221
|
moreWidth = 0;
|
|
@@ -207,6 +229,9 @@ export default {
|
|
|
207
229
|
}
|
|
208
230
|
}
|
|
209
231
|
if (showIndex > 0) {
|
|
232
|
+
const ExceptShowIndexWidth = self.$refs["StatisticsItem"+(showIndex)][0].offsetLeft;
|
|
233
|
+
const preShowIndexWidth =self.$refs["StatisticsItem" + (showIndex-1)][0].getBoundingClientRect().width;
|
|
234
|
+
self.lastWidth=self.showWidth-ExceptShowIndexWidth + preShowIndexWidth -20;
|
|
210
235
|
self.showData = [
|
|
211
236
|
self.data.slice(0, showIndex),
|
|
212
237
|
self.data.slice(showIndex),
|
|
@@ -219,9 +244,9 @@ export default {
|
|
|
219
244
|
self.$emit("setTableHeight");
|
|
220
245
|
});
|
|
221
246
|
},
|
|
222
|
-
handleClick(ev, obj, flagRefreshTable) {
|
|
247
|
+
handleClick(ev, obj, flagRefreshTable,type,index) {
|
|
223
248
|
var self = this;
|
|
224
|
-
self.selectStats = obj.fieldName1 + "*" + obj.code1
|
|
249
|
+
self.selectStats = obj.fieldName1 + "*" + obj.code1 ;
|
|
225
250
|
var fields = self.model.searchData(
|
|
226
251
|
obj.fieldName1,
|
|
227
252
|
obj.code1,
|
|
@@ -232,6 +257,14 @@ export default {
|
|
|
232
257
|
searchData: fields,
|
|
233
258
|
};
|
|
234
259
|
self.$emit("searchStats", model, flagRefreshTable);
|
|
260
|
+
if (type===1) {
|
|
261
|
+
let lastItemIndex = self.showData[0].length - 1;
|
|
262
|
+
let lastItem = self.showData[0][lastItemIndex];
|
|
263
|
+
self.showData[0][lastItemIndex]=obj;
|
|
264
|
+
self.showData[1][index]=lastItem;
|
|
265
|
+
self.sortData[lastItem.fieldName1 + "*" + lastItem.code1]=obj.sort;
|
|
266
|
+
self.sortData[obj.fieldName1 + "*" + obj.code1]=lastItem.sort;
|
|
267
|
+
}
|
|
235
268
|
},
|
|
236
269
|
searchStatsComplate(selectItem) {
|
|
237
270
|
var self = this;
|
|
@@ -272,7 +305,7 @@ export default {
|
|
|
272
305
|
.tab-list .btnTab {
|
|
273
306
|
font-size: 14px !important;
|
|
274
307
|
font-weight: bold;
|
|
275
|
-
padding: 0px
|
|
308
|
+
padding: 0px 18px;
|
|
276
309
|
cursor: pointer;
|
|
277
310
|
float: left;
|
|
278
311
|
list-style-type: none;
|
|
@@ -218,6 +218,7 @@
|
|
|
218
218
|
},
|
|
219
219
|
tableLoaded() {
|
|
220
220
|
var self = this;
|
|
221
|
+
this.title=this.$refs.table.model.title;
|
|
221
222
|
if (typeof this.$refs.table.model.cellLayout !== "undefined") {
|
|
222
223
|
this.$refs.screen.LoadLayout();
|
|
223
224
|
}
|
|
@@ -242,7 +243,7 @@
|
|
|
242
243
|
this.selectIndex=-1;
|
|
243
244
|
|
|
244
245
|
if (typeof window.localStorage !== "undefined" && !this.sideBarStatus) {
|
|
245
|
-
var tagkey = window.localStorage.getItem(this.sideBarPageType+this.categorySource+"key");
|
|
246
|
+
var tagkey = window.localStorage.getItem(this.sideBarPageType+this.categorySource+"key"+this.title);
|
|
246
247
|
this.sideBarStatus=tagkey;
|
|
247
248
|
}
|
|
248
249
|
|
|
@@ -316,7 +317,7 @@
|
|
|
316
317
|
}
|
|
317
318
|
}
|
|
318
319
|
}
|
|
319
|
-
window.localStorage.setItem(this.sideBarPageType+this.categorySource+"key", this.sideBarStatus);
|
|
320
|
+
window.localStorage.setItem(this.sideBarPageType+this.categorySource+"key"+this.title, this.sideBarStatus);
|
|
320
321
|
this.$refs.table.setTableHeight();
|
|
321
322
|
},
|
|
322
323
|
closeSideHandler() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="field-top">
|
|
3
|
-
<div style="width:100
|
|
3
|
+
<div style="width:100%;display: flex;" v-if="model !== null" class="ct-Dtd" :class="[model.attrs.size?'ct-Dtd-'+model.attrs.size:'']" >
|
|
4
4
|
<div :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']" style="flex:1">
|
|
5
|
-
<div v-if="model.showLabel && model.label" class="el-input-group__prepend">
|
|
5
|
+
<div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
|
|
6
6
|
{{model.label}}
|
|
7
7
|
</div>
|
|
8
8
|
<div class="ct-datepicker" style="width:100%" v-if="model !== null&&model.valueFormat=='HH:mm'" :class="[model.showLabel?'showLabel':'']">
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
v-bind="model.attrs"
|
|
11
11
|
@change="changeModel($event)"
|
|
12
12
|
@clear="changeModel($event)"
|
|
13
|
-
:placeholder="model.
|
|
13
|
+
:placeholder="model.attrs.placeholder1"
|
|
14
14
|
:disabled="model.lock"
|
|
15
15
|
:picker-options="{
|
|
16
16
|
start: model.min,
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
v-bind="model.attrs"
|
|
24
24
|
@change="changeModel($event)"
|
|
25
25
|
@clear="changeModel($event)"
|
|
26
|
-
:placeholder="model.
|
|
26
|
+
:placeholder="model.attrs.placeholder2"
|
|
27
27
|
:disabled="model.lock"
|
|
28
28
|
:picker-options="{
|
|
29
29
|
start: model.min,
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
<div class="ct-datepicker" style="width:100%" v-else-if="model !== null" :class="[model.showLabel?'showLabel':'']">
|
|
37
37
|
<el-time-picker class="ct-date-picker-editor" v-model="model.value"
|
|
38
38
|
v-bind="model.attrs" value-format="HH:mm:ss"
|
|
39
|
-
:placeholder="model.
|
|
39
|
+
:placeholder="model.attrs.placeholder1" :disabled="model.lock"
|
|
40
40
|
@change="changeModel($event)" @clear="changeModel($event)"
|
|
41
41
|
>
|
|
42
42
|
</el-time-picker>
|
|
43
43
|
<span v-if="model.isRange" class="ct-date-picker-span">-</span>
|
|
44
44
|
<el-time-picker v-if="model.isRange" class="ct-date-picker-editor" v-model="model.value1"
|
|
45
45
|
v-bind="model.attrs" value-format="HH:mm:ss"
|
|
46
|
-
:placeholder="model.
|
|
46
|
+
:placeholder="model.attrs.placeholder2" :disabled="model.lock"
|
|
47
47
|
@change="changeModel($event)" @clear="changeModel($event)"
|
|
48
48
|
>
|
|
49
49
|
</el-time-picker>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
<transition name="el-fade-in">
|
|
53
|
-
<span v-show="!valid"
|
|
53
|
+
<span v-show="!valid" class="errorMessage">
|
|
54
54
|
{{validMessage}}
|
|
55
55
|
</span>
|
|
56
56
|
</transition>
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
data() {
|
|
71
71
|
return {
|
|
72
|
-
|
|
72
|
+
validMessage:""
|
|
73
73
|
};
|
|
74
74
|
},
|
|
75
75
|
mounted() {
|
|
@@ -107,6 +107,17 @@
|
|
|
107
107
|
this.inputHandler(event);
|
|
108
108
|
this.changeHandler(event);
|
|
109
109
|
},
|
|
110
|
+
//不能共用的数据校验 单独每一个时间框的非空校验
|
|
111
|
+
selfValidExcute: function (eventName) {
|
|
112
|
+
if (eventName === "input"||eventName === "valid") {
|
|
113
|
+
if (this.model.value1 == "" || this.model.value== ""|| this.model.value== null || this.model.value1== null) {
|
|
114
|
+
this.valid = false;
|
|
115
|
+
this.validMessage = "必填"
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return true;
|
|
120
|
+
},
|
|
110
121
|
}
|
|
111
122
|
}
|
|
112
123
|
</script>
|
|
@@ -301,7 +301,7 @@ export default {
|
|
|
301
301
|
attrs: {
|
|
302
302
|
searchConditionApi: field.actionForSearchLayout,
|
|
303
303
|
searchDataApi: field.actionForSearch,
|
|
304
|
-
apiParam: submitData,
|
|
304
|
+
apiParam: field.getActionPara(submitData).para,
|
|
305
305
|
width: field.dialogWidth + "px",
|
|
306
306
|
height: field.dialogHeight + "px",
|
|
307
307
|
},
|
|
@@ -330,7 +330,7 @@ export default {
|
|
|
330
330
|
attrs: {
|
|
331
331
|
searchConditionApi: field.actionForSearchLayout,
|
|
332
332
|
searchDataApi: field.actionForSearch,
|
|
333
|
-
apiParam: submitData,
|
|
333
|
+
apiParam: field.getActionPara(submitData).para,
|
|
334
334
|
width: field.dialogWidth + "px",
|
|
335
335
|
height: field.dialogHeight + "px",
|
|
336
336
|
},
|