centaline-data-driven 1.2.49 → 1.2.52
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/build/centaline/centaline.path.js +1 -0
- package/package.json +1 -1
- package/src/Detail.vue +1 -1
- package/src/centaline/css/common.css +3 -1
- package/src/centaline/css/max.css +1 -0
- package/src/centaline/dynamicCompound/index.js +14 -0
- package/src/centaline/dynamicCompound/src/dynamicCompound.vue +89 -0
- package/src/centaline/dynamicDetail/src/dynamicDetail.vue +14 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +84 -32
- package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +33 -4
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +7 -4
- package/src/centaline/loader/src/ctl/Compound.js +59 -0
- package/src/centaline/loader/src/ctl/lib/Enum.js +4 -0
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +5 -0
- package/src/centaline/loader/src/ctl.js +1 -0
- package/src/centaline/templateControls/src/dynamicTableCurrency.vue +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -43,6 +43,7 @@ const paths = {
|
|
|
43
43
|
"dynamicPhotoSelectList": "./src/centaline/dynamicPhotoSelectList/index.js",//图片选择列表
|
|
44
44
|
"dynamicViewer": "./src/centaline/dynamicViewer/index.js",//图片选择列表
|
|
45
45
|
"dynamicRepeat": "./src/centaline/dynamicRepeat/index.js",//重复控件
|
|
46
|
+
"dynamicCompound": "./src/centaline/dynamicCompound/index.js",//复合控件
|
|
46
47
|
},
|
|
47
48
|
"plugs": {
|
|
48
49
|
"api": "./src/centaline/api/index.js",//调用API插件
|
package/package.json
CHANGED
package/src/Detail.vue
CHANGED
|
@@ -313,7 +313,8 @@ html {
|
|
|
313
313
|
height: 26px;
|
|
314
314
|
font-size: 12px;
|
|
315
315
|
color: #ff5b5b !important;
|
|
316
|
-
padding:
|
|
316
|
+
padding: 0 5px;
|
|
317
|
+
line-height: 26px;
|
|
317
318
|
white-space: nowrap;
|
|
318
319
|
}
|
|
319
320
|
.spanMessage {
|
|
@@ -712,6 +713,7 @@ html {
|
|
|
712
713
|
|
|
713
714
|
.el-date-editor .el-range-input, .el-date-editor .el-range-separator {
|
|
714
715
|
font-size: 12px;
|
|
716
|
+
height: 22px;
|
|
715
717
|
}
|
|
716
718
|
.ct-text{
|
|
717
719
|
position: relative
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import dynamicCompound from './src/dynamicCompound'
|
|
2
|
+
import api from '../api/index'
|
|
3
|
+
|
|
4
|
+
dynamicCompound.install = function (Vue) {
|
|
5
|
+
Vue.component(dynamicCompound.name, dynamicCompound);
|
|
6
|
+
|
|
7
|
+
Vue.use(api);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
11
|
+
window.Vue.use(dynamicCompound);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default dynamicCompound;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-row v-if="model.fields.length > 0">
|
|
3
|
+
<el-col v-for="(col, index) in model.fields" :key="index" v-if="col.show !== false" :span="col.colspan" :class="index>0&&col.label==''?'complex-left-10':''">
|
|
4
|
+
<component ref="Fields" :is="col.is" :vmodel="col" :api="model.OptApi" v-bind="col.bindPara"
|
|
5
|
+
@click="fieldClickHandler(col,index)" @change="changeHandler(col,index)"
|
|
6
|
+
@input="inputHandler(col,index)"></component>
|
|
7
|
+
</el-col>
|
|
8
|
+
</el-row>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
var ctSpan = {
|
|
13
|
+
props: {
|
|
14
|
+
vmodel: Object,
|
|
15
|
+
},
|
|
16
|
+
data: function () {
|
|
17
|
+
return {
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: 'ct-compound',
|
|
28
|
+
components: {
|
|
29
|
+
'ct-span': ctSpan
|
|
30
|
+
},
|
|
31
|
+
props: {
|
|
32
|
+
vmodel: Object,
|
|
33
|
+
api: String
|
|
34
|
+
},
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
model: null,
|
|
38
|
+
foucus: false,
|
|
39
|
+
itemKey: Math.random()
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
created() {
|
|
43
|
+
let self = this;
|
|
44
|
+
this.model = this.vmodel;
|
|
45
|
+
this.model.OptApi = this.api;
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
fieldsValidExcute() {
|
|
49
|
+
var self = this;
|
|
50
|
+
var rtnBool = true;
|
|
51
|
+
if (typeof self.$refs.Fields !== 'undefined') {
|
|
52
|
+
self.$refs.Fields.forEach((f) => {
|
|
53
|
+
if (typeof f.validExcute !== 'undefined') {
|
|
54
|
+
if (!f.validExcute()) {
|
|
55
|
+
rtnBool = false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return rtnBool;
|
|
61
|
+
},
|
|
62
|
+
validExcute() {
|
|
63
|
+
var self = this;
|
|
64
|
+
var rtnBool = true;
|
|
65
|
+
if (!self.fieldsValidExcute()) {
|
|
66
|
+
rtnBool = false;
|
|
67
|
+
}
|
|
68
|
+
return rtnBool;
|
|
69
|
+
},
|
|
70
|
+
changeHandler(field,index) {
|
|
71
|
+
var self = this;
|
|
72
|
+
this.model.change = field.change;
|
|
73
|
+
self.$emit('change');
|
|
74
|
+
},
|
|
75
|
+
inputHandler(field, index) {
|
|
76
|
+
var self = this;
|
|
77
|
+
this.model.input = field.input;//当前小组件事件作为大组件事件
|
|
78
|
+
self.$emit('input');
|
|
79
|
+
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
84
|
+
<style>
|
|
85
|
+
.complex-left-10 {
|
|
86
|
+
padding-left: 10px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
</style>
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<ct-PropertyDetailOFI :api="api" :apiParam="apiParam" class="ct-PropertyDetailOFI" v-if="pageType=='PropertyDetailOFI'"></ct-PropertyDetailOFI>
|
|
4
4
|
<ct-PropertyDetailRET :api="api" :apiParam="apiParam" class="ct-PropertyDetailRET" v-if="pageType=='PropertyDetailRET'"></ct-PropertyDetailRET>
|
|
5
|
-
<ct-PropertySimpleDetailRET :api="api" :apiParam="apiParam"
|
|
5
|
+
<ct-PropertySimpleDetailRET :api="api" :apiParam="apiParam" :selectIndex="selectIndex" :rowCount="rowCount" class="ct-PropertySimpleDetailRET"
|
|
6
|
+
@clickNextHandler="clickNextHandler" @clickPrevHandler="clickPrevHandler"
|
|
7
|
+
v-if="pageType=='PropertySimpleDetailRET'" @closeSideHandler="closeSideHandler"></ct-PropertySimpleDetailRET>
|
|
6
8
|
</div>
|
|
7
9
|
</template>
|
|
8
10
|
|
|
@@ -22,6 +24,8 @@
|
|
|
22
24
|
api: String,
|
|
23
25
|
apiParam: Object,
|
|
24
26
|
pageType: String,
|
|
27
|
+
selectIndex:Number,
|
|
28
|
+
rowCount:Number,
|
|
25
29
|
},
|
|
26
30
|
data() {
|
|
27
31
|
return {
|
|
@@ -32,6 +36,15 @@
|
|
|
32
36
|
this.model = this.vmodel;
|
|
33
37
|
},
|
|
34
38
|
methods: {
|
|
39
|
+
closeSideHandler() {
|
|
40
|
+
this.$emit('closeSideHandler');
|
|
41
|
+
},
|
|
42
|
+
clickNextHandler() {
|
|
43
|
+
this.$emit('clickNextHandler');
|
|
44
|
+
},
|
|
45
|
+
clickPrevHandler() {
|
|
46
|
+
this.$emit('clickPrevHandler');
|
|
47
|
+
},
|
|
35
48
|
}
|
|
36
49
|
}
|
|
37
50
|
</script>
|
|
@@ -1,14 +1,53 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div ref="main" class="main">
|
|
3
|
-
<div style="height:36px;margin-top: 10px;display: flex;">
|
|
4
|
-
<img src="../../../assets/ewmA.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:22px">
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
<div ref="main" class="main" v-if="model!==null">
|
|
3
|
+
<div style="height:36px;margin-top: 10px;display: flex;border-bottom: solid 2px #EE6B6B;">
|
|
4
|
+
<img src="../../../assets/ewmA.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:22px;cursor: pointer">
|
|
5
|
+
<div :style="{'width':topWidth+'px'}" style="font-size: 14px;color: #333333;padding-left: 10px;line-height: 26px;">
|
|
6
|
+
<span>{{model.fields1Dic.PropertyNo.label}}</span>
|
|
7
|
+
<span>{{model.fields1Dic.PropertyNo.value}}</span>
|
|
8
|
+
</div>
|
|
9
|
+
<img :class="{'domDisabled':selectIndex<=0}" @click="clickPrevHandler" src="../../../assets/T.png" alt=""
|
|
10
|
+
style="width: 26px;height: 26px;vertical-align: bottom;margin-right:11px;cursor: pointer">
|
|
11
|
+
<img :class="{'domDisabled':selectIndex===rowCount-1}" @click="clickNextHandler" src="../../../assets/B.png" alt=""
|
|
12
|
+
style="width: 26px;height: 26px;vertical-align: bottom;margin-right:8px;cursor: pointer">
|
|
13
|
+
<div class="el-icon-close cursor" style="padding-top: 5px;" @click="closeSideHandler"></div>
|
|
9
14
|
</div>
|
|
10
|
-
<div
|
|
11
|
-
|
|
15
|
+
<div style="padding-left: 20px;padding-right: 20px;">
|
|
16
|
+
<div style="margin-top: 18px;">
|
|
17
|
+
<div style="font-weight: Bold;font-size: 16px;color: #333333;">
|
|
18
|
+
<span>{{model.fields1Dic.EstateName.value}}</span>
|
|
19
|
+
<span>{{model.fields1Dic.BuildingName.value}}</span>
|
|
20
|
+
<span>{{model.fields1Dic.RoomNo.value}}</span>
|
|
21
|
+
<div style="float:right;border: 1px solid #E0E0E0;font-size: 12px;color: #333333;padding-top: 3px;
|
|
22
|
+
width: 68px;height: 26px;border-radius: 6px;text-align: center;">
|
|
23
|
+
{{model.fields1Dic.StatusName.value}}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div style="font-size: 12px;color: #999999;margin-top: 7px;">
|
|
27
|
+
<span>{{model.fields1Dic.DistrictName.value}}</span>
|
|
28
|
+
<span>{{model.fields1Dic.AreaName.value}}</span>
|
|
29
|
+
</div>
|
|
30
|
+
<div style="margin-top: 7px;display: flex;">
|
|
31
|
+
<div v-for="(tag, index) in model.actionRouterLabel" :key="index" class="t-tag"
|
|
32
|
+
:style="{color:tag.textColor,backgroundColor:tag.bgColor,borderColor:tag.borderColor}">
|
|
33
|
+
{{tag.label}}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div style="display: flex;margin-top: 16px;height: 65px;border: 1px solid #ECEFF2;box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06);border-radius: 6px;text-align: center;">
|
|
38
|
+
<div style="width: 33.33%;">
|
|
39
|
+
<div style="margin-top: 13px;font-size: 12px;">{{model.fields1Dic.AreaNet.label}}</div>
|
|
40
|
+
<div style="margin-top: 7px;font-size: 14px;font-weight: Bold;color: #EE6B6B;">{{model.fields1Dic.AreaNet.value}}{{model.fields1Dic.AreaNet.unitName}}</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div style="width: 33.33%;">
|
|
43
|
+
<div style="margin-top: 13px;font-size: 12px;">{{model.fields1Dic.Price.label}}</div>
|
|
44
|
+
<div style="margin-top: 7px;font-size: 14px;font-weight: Bold;color: #EE6B6B;">{{model.fields1Dic.Price.value}}{{model.fields1Dic.Price.unitName}}</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div style="width: 33.33%;">
|
|
47
|
+
<div style="margin-top: 13px;font-size: 12px;">{{model.fields1Dic.FloorName.label}}</div>
|
|
48
|
+
<div style="margin-top: 7px;font-size: 14px;font-weight: Bold;color: #EE6B6B;">{{model.fields1Dic.FloorName.value}}</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
12
51
|
</div>
|
|
13
52
|
</div>
|
|
14
53
|
</template>
|
|
@@ -24,18 +63,14 @@
|
|
|
24
63
|
vmodel: Object,
|
|
25
64
|
api: String,
|
|
26
65
|
apiParam: Object,
|
|
66
|
+
selectIndex:Number,
|
|
67
|
+
rowCount:Number,
|
|
27
68
|
},
|
|
28
|
-
computed: {
|
|
29
|
-
computedTopWidth(){
|
|
30
|
-
// debugger
|
|
31
|
-
// let w=this.$refs.main.clientWidth;
|
|
32
|
-
// let wt=w-140;
|
|
33
|
-
return 300+'px';
|
|
34
|
-
}
|
|
69
|
+
computed: {
|
|
35
70
|
},
|
|
36
71
|
data() {
|
|
37
72
|
return {
|
|
38
|
-
|
|
73
|
+
topWidth:300,
|
|
39
74
|
}
|
|
40
75
|
},
|
|
41
76
|
mounted() {
|
|
@@ -54,7 +89,7 @@
|
|
|
54
89
|
},
|
|
55
90
|
activated() {
|
|
56
91
|
this.$nextTick(() => {
|
|
57
|
-
this.
|
|
92
|
+
this.setDetailStyle();
|
|
58
93
|
})
|
|
59
94
|
},
|
|
60
95
|
methods: {
|
|
@@ -67,14 +102,20 @@
|
|
|
67
102
|
this.model.getTags2List(0);
|
|
68
103
|
}
|
|
69
104
|
this.loadOperation();
|
|
70
|
-
this.
|
|
71
|
-
this.setDetailHeight();
|
|
105
|
+
this.setDetailStyle();
|
|
72
106
|
this.$nextTick(() => {
|
|
73
107
|
window.addEventListener("resize", (ev) => {
|
|
74
|
-
self.
|
|
108
|
+
self.setDetailStyle();
|
|
75
109
|
});
|
|
76
110
|
});
|
|
77
111
|
},
|
|
112
|
+
setDetailStyle() {
|
|
113
|
+
this.$nextTick(() => {
|
|
114
|
+
if(this.$refs.main){
|
|
115
|
+
this.topWidth=this.$refs.main.clientWidth-140;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
},
|
|
78
119
|
loadFields() {
|
|
79
120
|
var self = this;
|
|
80
121
|
self.collapse=[];
|
|
@@ -121,9 +162,6 @@
|
|
|
121
162
|
this.model._operationRouters=[];
|
|
122
163
|
this.model.getOperationList();
|
|
123
164
|
},
|
|
124
|
-
loadCommission() {
|
|
125
|
-
this.model.getCommissionList();
|
|
126
|
-
},
|
|
127
165
|
lookOwner() {
|
|
128
166
|
this.codeOwner = true
|
|
129
167
|
},
|
|
@@ -133,13 +171,6 @@
|
|
|
133
171
|
this.model.getTags2List(i);
|
|
134
172
|
}
|
|
135
173
|
},
|
|
136
|
-
setDetailHeight() {
|
|
137
|
-
this.$nextTick(() => {
|
|
138
|
-
if (this.$refs.detail && this.$refs.main) {
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
},
|
|
143
174
|
handleSelect(key, keyPath) {
|
|
144
175
|
let i=key.index;
|
|
145
176
|
this.model.activeIndex1=i;
|
|
@@ -306,11 +337,32 @@
|
|
|
306
337
|
clickAcion(field,submitData);
|
|
307
338
|
}
|
|
308
339
|
},
|
|
340
|
+
closeSideHandler() {
|
|
341
|
+
this.$emit('closeSideHandler');
|
|
342
|
+
},
|
|
343
|
+
setBtnHandler(index,count) {
|
|
344
|
+
this.selectIndex=index;
|
|
345
|
+
this.count=count;
|
|
346
|
+
},
|
|
347
|
+
clickNextHandler() {
|
|
348
|
+
this.$emit('clickNextHandler');
|
|
349
|
+
},
|
|
350
|
+
clickPrevHandler() {
|
|
351
|
+
this.$emit('clickPrevHandler');
|
|
352
|
+
},
|
|
309
353
|
}
|
|
310
354
|
}
|
|
311
355
|
</script>
|
|
312
356
|
<style lang="scss" scoped>
|
|
313
|
-
|
|
357
|
+
.t-tag {
|
|
358
|
+
color: #999;
|
|
359
|
+
background: #f3f3f3;
|
|
360
|
+
border: 1px solid #d8d8d8;
|
|
361
|
+
padding: 2px 9px;
|
|
362
|
+
border-radius: 3px;
|
|
363
|
+
margin-right: 10px;
|
|
364
|
+
font-size: 12px;
|
|
365
|
+
}
|
|
314
366
|
</style>
|
|
315
367
|
|
|
316
368
|
|
|
@@ -14,13 +14,17 @@
|
|
|
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"
|
|
17
18
|
@showTitle="showTitleHandler"></ct-searchtable>
|
|
18
19
|
</div>
|
|
19
20
|
<div v-if="flagSideBar && flagSideBarOfData"
|
|
20
21
|
:style="{'height': pageHeight? pageHeight:'100%','width':sideBarWidth+'px',right:sideBarRight+'px'}"
|
|
21
22
|
class="sidebar">
|
|
22
|
-
<ct-Detail :api="sideBarApi" :apiParam="sideBarApiParam" :pageType="sideBarPageType"
|
|
23
|
-
|
|
23
|
+
<ct-Detail ref="detail" :api="sideBarApi" :apiParam="sideBarApiParam" :pageType="sideBarPageType"
|
|
24
|
+
:selectIndex="selectIndex" :rowCount="rowCount" :key="detailKey"
|
|
25
|
+
@clickNextHandler="clickNextHandler" @clickPrevHandler="clickPrevHandler"
|
|
26
|
+
@closeSideHandler="closeSideHandler"></ct-Detail>
|
|
27
|
+
<ct-SearchSideMenu ref="sideMenu" :sideBarMenuRight="sideBarMenuRight" :sideBarStatus="sideBarStatus"
|
|
24
28
|
@sideMenuClickHandler="sideMenuClickHandler"></ct-SearchSideMenu>
|
|
25
29
|
</div>
|
|
26
30
|
</div>
|
|
@@ -32,7 +36,6 @@
|
|
|
32
36
|
import dynamicSearchTable from './dynamicSearchTable.vue';
|
|
33
37
|
import dynamicSearchSideMenu from './dynamicSearchSideMenu.vue';
|
|
34
38
|
import progress from '../../progress/src/progress.vue';
|
|
35
|
-
import dynamicDetail from '../../dynamicDetail/src/dynamicDetail.vue';
|
|
36
39
|
export default {
|
|
37
40
|
name: 'ct-searchlist',
|
|
38
41
|
mixins: [dynamicElement],
|
|
@@ -42,7 +45,7 @@
|
|
|
42
45
|
'ct-progress': progress,
|
|
43
46
|
'ct-searchcategory': dynamicSearchCategory,
|
|
44
47
|
'ct-SearchSideMenu': dynamicSearchSideMenu,
|
|
45
|
-
'ct-Detail': dynamicDetail,
|
|
48
|
+
'ct-Detail': ()=>import('../../dynamicDetail/src/dynamicDetail.vue'),
|
|
46
49
|
},
|
|
47
50
|
props: {
|
|
48
51
|
vmodel: Object,
|
|
@@ -97,6 +100,9 @@
|
|
|
97
100
|
sideBarApi:'',
|
|
98
101
|
sideBarApiParam:null,
|
|
99
102
|
sideBarPageType:'',
|
|
103
|
+
selectIndex:-1,
|
|
104
|
+
rowCount:0,
|
|
105
|
+
detailKey:0,
|
|
100
106
|
}
|
|
101
107
|
},
|
|
102
108
|
methods: {
|
|
@@ -193,6 +199,19 @@
|
|
|
193
199
|
}
|
|
194
200
|
}
|
|
195
201
|
},
|
|
202
|
+
rowClickHandle() {
|
|
203
|
+
var self = this;
|
|
204
|
+
if(self.selectIndex!==self.$refs.table.model.selectIndex){
|
|
205
|
+
self.selectIndex=self.$refs.table.model.selectIndex;
|
|
206
|
+
self.rowCount=self.$refs.table.model.listData.length;
|
|
207
|
+
self.sideBarApiParam = {};
|
|
208
|
+
self.$refs.table.model.rowSelectRouter.submitListField.forEach((k) => {
|
|
209
|
+
self.sideBarApiParam[k] = self.$refs.table.model.listData[self.selectIndex][k];
|
|
210
|
+
});
|
|
211
|
+
self.sideBarApiParam.actionType = self.$refs.table.model.rowSelectRouter.actionType;
|
|
212
|
+
self.detailKey = self.detailKey+1;
|
|
213
|
+
}
|
|
214
|
+
},
|
|
196
215
|
sideMenuClickHandler(v) {
|
|
197
216
|
if(v=='open'){
|
|
198
217
|
this.sideBarStatus ='close';
|
|
@@ -207,8 +226,18 @@
|
|
|
207
226
|
this.sideBarWidth=this.$refs.table.model.sideBarWidth;
|
|
208
227
|
this.searchWidth=this.$refs.main.clientWidth-this.sideBarWidth;
|
|
209
228
|
this.sideBarMenuRight=this.sideBarWidth-2;
|
|
229
|
+
this.rowClickHandle();
|
|
210
230
|
}
|
|
211
231
|
},
|
|
232
|
+
closeSideHandler() {
|
|
233
|
+
this.$refs.sideMenu.clickHandler();
|
|
234
|
+
},
|
|
235
|
+
clickNextHandler() {
|
|
236
|
+
this.$refs.table.rowKeyDownHandle(null,1);
|
|
237
|
+
},
|
|
238
|
+
clickPrevHandler() {
|
|
239
|
+
this.$refs.table.rowKeyDownHandle(null,-1);
|
|
240
|
+
},
|
|
212
241
|
}
|
|
213
242
|
}
|
|
214
243
|
</script>
|
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
:rowspan="tdRowspan(column, row)"
|
|
81
81
|
class="ct-td"
|
|
82
82
|
:class="[colHasWidth[colIndex],model.tdClass,
|
|
83
|
-
column.router?'cursor':null,
|
|
84
83
|
colIndex === leftShadow?'shadowLeft':null,
|
|
85
84
|
colIndex === rightShadow?'shadowRight':null,
|
|
86
85
|
column.fixed === 'left'?'left-fixation':null,
|
|
@@ -558,6 +557,7 @@
|
|
|
558
557
|
rowClickHandle(ev, index) {
|
|
559
558
|
this.model.selectIndex = index;
|
|
560
559
|
this.rowColorChange();
|
|
560
|
+
this.$emit('rowClickHandle');
|
|
561
561
|
ev.cancelBubble = true;
|
|
562
562
|
ev.stopPropagation();
|
|
563
563
|
},
|
|
@@ -597,6 +597,7 @@
|
|
|
597
597
|
}
|
|
598
598
|
this.rowColorChange();
|
|
599
599
|
this.resetScroll();
|
|
600
|
+
this.$emit('rowClickHandle');
|
|
600
601
|
if (!this.isBusy) {
|
|
601
602
|
if (this.model.selectIndex === this.model.listData.length - 1) {
|
|
602
603
|
self.isBusy = true;
|
|
@@ -614,9 +615,11 @@
|
|
|
614
615
|
});
|
|
615
616
|
}
|
|
616
617
|
}
|
|
617
|
-
ev
|
|
618
|
-
|
|
619
|
-
|
|
618
|
+
if(ev){
|
|
619
|
+
ev.cancelBubble = true;
|
|
620
|
+
ev.stopPropagation();
|
|
621
|
+
ev.preventDefault();
|
|
622
|
+
}
|
|
620
623
|
},
|
|
621
624
|
searchComplate(m, defaultSearch) {
|
|
622
625
|
var self = this;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import base from '../../index';
|
|
2
|
+
import Base from './Base';
|
|
3
|
+
import LibFunction from './lib/LibFunction';
|
|
4
|
+
import common from '../../../common/index';
|
|
5
|
+
import Router from './Router';
|
|
6
|
+
import Enum from './lib/Enum';
|
|
7
|
+
import Vue from 'vue';
|
|
8
|
+
|
|
9
|
+
const Compound = function (source, dateType) {
|
|
10
|
+
var rtn = {
|
|
11
|
+
get label() {
|
|
12
|
+
let l = '';
|
|
13
|
+
if (source.controlLabel) {
|
|
14
|
+
l = source.controlLabel;
|
|
15
|
+
}
|
|
16
|
+
if (source.labelDelimiter) {
|
|
17
|
+
l = l + source.labelDelimiter;
|
|
18
|
+
}
|
|
19
|
+
return l;
|
|
20
|
+
},
|
|
21
|
+
set label(v) {
|
|
22
|
+
source.controlLabel = v;
|
|
23
|
+
},
|
|
24
|
+
getFormObj() {
|
|
25
|
+
var rtnFormObj = {};
|
|
26
|
+
rtn.fields.forEach((f) => {
|
|
27
|
+
if (typeof f.id !== 'undefined') {
|
|
28
|
+
Object.assign(rtnFormObj, f.getFormObj());
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return rtnFormObj;
|
|
32
|
+
},
|
|
33
|
+
_fields: null,//数组,方便遍历
|
|
34
|
+
get fields() {
|
|
35
|
+
if (rtn._fields !== null) {
|
|
36
|
+
return rtn._fields;
|
|
37
|
+
}
|
|
38
|
+
let Index = 0;
|
|
39
|
+
rtn._fields = [];
|
|
40
|
+
for (var key in source.compoundFields) {
|
|
41
|
+
let value = source.compoundFields[key];
|
|
42
|
+
Index++;
|
|
43
|
+
let showLabel = true;
|
|
44
|
+
let item = LibFunction.GetControl(value, source, showLabel, false);
|
|
45
|
+
if (item instanceof Object) {
|
|
46
|
+
item.form = rtn;
|
|
47
|
+
if (Index == 1 && item.label == "") {
|
|
48
|
+
item.label = rtn.label;
|
|
49
|
+
}
|
|
50
|
+
rtn._fields.push(item);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return rtn._fields;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
rtn = base.copy(Base(source), rtn);
|
|
57
|
+
return rtn;
|
|
58
|
+
};
|
|
59
|
+
export default Compound;
|
|
@@ -33,6 +33,7 @@ import SensitiveEye from '../SensitiveEye';
|
|
|
33
33
|
import Cb from '../Cb';
|
|
34
34
|
import PhotoSelect from '../PhotoSelect';
|
|
35
35
|
import Repeat from '../Repeat';
|
|
36
|
+
import Compound from '../Compound';
|
|
36
37
|
|
|
37
38
|
const LibFunction = {
|
|
38
39
|
install(Vue) {
|
|
@@ -218,6 +219,10 @@ const LibFunction = {
|
|
|
218
219
|
item = Repeat(listobj, field);
|
|
219
220
|
item.is = 'ct-repeat';
|
|
220
221
|
break;
|
|
222
|
+
case Enum.ControlType.Compound://复合
|
|
223
|
+
item = Compound(field);
|
|
224
|
+
item.is = 'ct-compound';
|
|
225
|
+
break;
|
|
221
226
|
case Enum.ControlType.Hidden://隐藏控件
|
|
222
227
|
item = Hd(field);
|
|
223
228
|
break;
|
|
@@ -39,6 +39,7 @@ const loader = {
|
|
|
39
39
|
QuickInputSos: require("./ctl/QuickInputSos.js").default,
|
|
40
40
|
ContactList: require("./ctl/ContactList.js").default,
|
|
41
41
|
Repeat: require("./ctl/Repeat.js").default,
|
|
42
|
+
Compound: require("./ctl/Compound.js").default,
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
export default loader;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="isOperationalColumn?'subdiv_allinline':''" v-if="isShowLabel" @click="clickHandler($event)">
|
|
3
|
-
<img v-if="router.imgUrl && isShowImg" class="ct-tablecurrencyImg ct-tablecurrencyItem" :src="router.imgUrl" :title="router.label"
|
|
4
|
-
<a v-else href="javascript:void(0);" class="ct-tablecurrencyItem"
|
|
2
|
+
<div :class="isOperationalColumn?'subdiv_allinline':''" v-if="isShowLabel" @click="isOperationalColumn?clickHandler($event):null">
|
|
3
|
+
<img v-if="router.imgUrl && isShowImg" class="ct-tablecurrencyImg ct-tablecurrencyItem" :src="router.imgUrl" :title="router.label" @click="!isOperationalColumn?clickHandler($event):null"/>
|
|
4
|
+
<a v-else href="javascript:void(0);" class="ct-tablecurrencyItem" @click="!isOperationalColumn?clickHandler($event):null">
|
|
5
5
|
{{label}}
|
|
6
6
|
</a>
|
|
7
7
|
</div>
|