centaline-data-driven 1.5.69 → 1.5.71
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/release-log.md +26 -0
- package/src/EmployeeClassList.vue +0 -1
- package/src/Form.vue +4 -2
- package/src/SearchList.vue +5 -1
- package/src/centaline/css/common.css +4 -0
- package/src/centaline/dynamicCalendar/src/dynamicCalendar.vue +369 -573
- package/src/centaline/dynamicCalendar/src/index.css +48 -43
- package/src/centaline/dynamicD/src/dynamicD.vue +7 -0
- package/src/centaline/dynamicForm/src/dynamicForm.vue +0 -1
- package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +3 -3
- package/src/centaline/dynamicLH/index.js +11 -0
- package/src/centaline/dynamicLH/src/dynamicLH.vue +62 -0
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +46 -3
- package/src/centaline/dynamicT/src/dynamicT.vue +8 -6
- package/src/centaline/dynamicTree/src/dynamicTreeList.vue +2 -1
- package/src/centaline/loader/src/ctl/Canlendar.js +89 -37
- package/src/centaline/loader/src/ctl/Form.js +4 -0
- package/src/centaline/loader/src/ctl/LH.js +23 -0
- package/src/centaline/loader/src/ctl/Router.js +9 -0
- package/src/centaline/loader/src/ctl/SearchTable.js +2 -2
- package/src/centaline/loader/src/ctl/lib/Enum.js +5 -0
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +5 -2
- package/src/centaline/loader/src/ctl.js +1 -0
- package/src/main.js +2 -1
- package/wwwroot/static/centaline/centaline-data-driven.js +1580 -1518
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -64,70 +64,43 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.canlendar {
|
|
67
|
-
--color-primary-text: #
|
|
67
|
+
--color-primary-text: #333333;
|
|
68
68
|
--color-primary-light: #5cb4ff;
|
|
69
69
|
--color-canlender-bg: #f2f8fe;
|
|
70
|
-
--color-light-
|
|
71
|
-
border: 1px solid var(--color-light-
|
|
70
|
+
--color-light-gray: #E0E0E0;
|
|
71
|
+
border: 1px solid var(--color-light-gray);
|
|
72
72
|
background-color: #fff;
|
|
73
73
|
border-radius: 6px;
|
|
74
74
|
}
|
|
75
|
-
|
|
76
75
|
.canlendar.dark {
|
|
77
76
|
--color-primary-text: #8fa9d0;
|
|
78
77
|
--color-primary-light: #a6559d;
|
|
79
78
|
--color-canlender-bg: #f2f8fe;
|
|
80
|
-
--color-light-
|
|
81
|
-
border: 1px solid var(--color-light-
|
|
79
|
+
--color-light-gray: #F2F8FE;
|
|
80
|
+
border: 1px solid var(--color-light-gray);
|
|
82
81
|
border-radius: 6px;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
.canlendar .canlendar_button {
|
|
86
|
-
padding: 5px;
|
|
87
|
-
border: 1px solid var(--color-light-white);
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
user-select: none;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.canlendar .canlendar_button:hover {
|
|
93
|
-
background: var(--color-canlender-bg);
|
|
94
|
-
}
|
|
95
|
-
.canlendar.dark .canlendar_button:hover {
|
|
96
|
-
color: white;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.canlendar .canlendar_title {
|
|
100
|
-
padding: 15px;
|
|
101
|
-
width: 100%;
|
|
102
|
-
position: relative;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.canlendar .canlendar_title .year {
|
|
106
|
-
margin: 0 30px;
|
|
107
|
-
font-size: 20px;
|
|
108
|
-
font-family: Arial;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.canlendar .canlendar_title img {
|
|
112
|
-
cursor: pointer;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
84
|
.canlendar .canlendar_content {
|
|
116
85
|
position: relative;
|
|
117
86
|
width: 100%;
|
|
87
|
+
padding:10px;
|
|
118
88
|
}
|
|
119
89
|
|
|
120
90
|
.canlendar_content .item {
|
|
121
91
|
box-sizing: border-box;
|
|
122
|
-
border: 1px solid var(--color-light-
|
|
92
|
+
border: 1px solid var(--color-light-gray);
|
|
123
93
|
width: 14.28%;
|
|
124
|
-
height:
|
|
94
|
+
height: 60px;
|
|
125
95
|
cursor: pointer;
|
|
126
96
|
transition: all 0.3s;
|
|
97
|
+
position: relative;
|
|
98
|
+
color: var(--color-primary-text);;
|
|
99
|
+
font-size: 12px;
|
|
127
100
|
}
|
|
128
101
|
|
|
129
102
|
.canlendar_content .item-disabled {
|
|
130
|
-
/* background: var(--color-light-
|
|
103
|
+
/* background: var(--color-light-gray); */
|
|
131
104
|
background: #fff;
|
|
132
105
|
color: #fff;
|
|
133
106
|
}
|
|
@@ -138,9 +111,12 @@
|
|
|
138
111
|
|
|
139
112
|
.canlendar_content .header-item {
|
|
140
113
|
box-sizing: border-box;
|
|
141
|
-
border: 1px solid var(--color-light-
|
|
114
|
+
border: 1px solid var(--color-light-gray);
|
|
142
115
|
width: 14.28%;
|
|
143
116
|
height: 50px;
|
|
117
|
+
font-size: 12px;
|
|
118
|
+
font-weight: 600;
|
|
119
|
+
color: var(--color-primary-text);;
|
|
144
120
|
}
|
|
145
121
|
|
|
146
122
|
.canlendar_content .item:hover,
|
|
@@ -159,14 +135,14 @@
|
|
|
159
135
|
}
|
|
160
136
|
|
|
161
137
|
.canlendar .canlendar_today {
|
|
162
|
-
background: var(--color-primary-light);
|
|
163
|
-
color:
|
|
138
|
+
/* background: var(--color-primary-light); */
|
|
139
|
+
/* color: var(--chinaRed); */
|
|
164
140
|
border-radius: 12%;
|
|
165
141
|
text-align: center;
|
|
166
142
|
}
|
|
167
143
|
|
|
168
144
|
.canlendar .canlendar_today:hover {
|
|
169
|
-
background: var(--color-primary-light);
|
|
145
|
+
/* background: var(--color-primary-light); */
|
|
170
146
|
}
|
|
171
147
|
|
|
172
148
|
.canlendar_content .item .rounded {
|
|
@@ -179,3 +155,32 @@
|
|
|
179
155
|
text-align: center;
|
|
180
156
|
color: white;
|
|
181
157
|
}
|
|
158
|
+
|
|
159
|
+
.memuItem {
|
|
160
|
+
text-decoration: none; /* 默认情况下,移除下划线 */
|
|
161
|
+
line-height: 26px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.memuItem:hover {
|
|
165
|
+
cursor:pointer;
|
|
166
|
+
text-decoration: underline; /* 鼠标悬停时,添加红色下划线 */
|
|
167
|
+
color: var(--btnHoverRed); /* 同时更改文本颜色为红色 */
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.date-text{
|
|
171
|
+
position: absolute;
|
|
172
|
+
top: 0;
|
|
173
|
+
right: 4px;
|
|
174
|
+
font-weight: 600;
|
|
175
|
+
}
|
|
176
|
+
.box-menu {
|
|
177
|
+
width: 150px;
|
|
178
|
+
position: absolute;
|
|
179
|
+
z-index: 1000;
|
|
180
|
+
background-color: #fff;
|
|
181
|
+
box-shadow: 0px 0px 10px #ccc, 0px 0px 20px #ccc, 0px 0px 30px #ccc;
|
|
182
|
+
padding: 10px;
|
|
183
|
+
}
|
|
184
|
+
.canlendar .canlendar_today .date-text{
|
|
185
|
+
color: var(--chinaRed);
|
|
186
|
+
}
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
methods: {
|
|
38
|
+
isAutoSearch(){
|
|
39
|
+
if(this.model.autoSearch) this.$emit('click');
|
|
40
|
+
},
|
|
41
|
+
changeHandler(){
|
|
42
|
+
this.isAutoSearch()
|
|
43
|
+
},
|
|
38
44
|
getPickerOptions() {
|
|
39
45
|
let self = this
|
|
40
46
|
return {
|
|
@@ -82,6 +88,7 @@
|
|
|
82
88
|
this.$emit('input', this.model.value);
|
|
83
89
|
}
|
|
84
90
|
}
|
|
91
|
+
this.isAutoSearch()
|
|
85
92
|
}
|
|
86
93
|
},
|
|
87
94
|
created() {
|
|
@@ -90,7 +90,6 @@
|
|
|
90
90
|
import dynamicElement from '../../mixins/dynamicElement'
|
|
91
91
|
import dynamicFormListTalbe from './dynamicFormListTable'
|
|
92
92
|
import { setTimeout } from 'timers';
|
|
93
|
-
//import dynamicFormList from './dynamicFormList'
|
|
94
93
|
export default {
|
|
95
94
|
name: 'ct-form',
|
|
96
95
|
mixins: [dynamicElement],
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
<div v-if="model.showLabel && model.label" class="el-input-group__prepend field-label-div inputNumbe-line-feed" :class="[model.labelClass]">
|
|
8
8
|
{{model.label}}
|
|
9
9
|
</div>
|
|
10
|
+
<div v-if="model.preLabel">
|
|
11
|
+
<span v-html="model.preLabel"></span>
|
|
12
|
+
</div>
|
|
10
13
|
<div style="flex:1" v-bind="model.attrs" class="el-date-editor ct-input__inner">
|
|
11
14
|
<input style="text-align:left;width:100%" class="el-range-input" :placeholder="model.attrs.placeholder1"
|
|
12
15
|
v-model="model.value" @change="onChangeHandler($event)" @input="onInputHandler($event);isShowClear()"
|
|
13
16
|
@blur="onBlurHandler($event)"
|
|
14
17
|
:class="model.lock ? 'ct-is-disabled' : ''" :disabled="model.lock" />{{model.rowKey}}
|
|
15
|
-
<!--<span v-if="!model.lock" class="cover-list-item-span">
|
|
16
|
-
<i class="el-input__icon el-icon-circle-close" @click="clearClickHandle"></i>
|
|
17
|
-
</span>-->
|
|
18
18
|
<span class="el-input__suffix el-input--mini" v-if="showClear">
|
|
19
19
|
<span class="el-input__suffix-inner ct-close">
|
|
20
20
|
<i class="el-select__caret el-input__icon el-icon-circle-close is-show-close" @click="clearClickHandle($event)"></i>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="field-top">
|
|
3
|
+
<div class="ct-text" style="width:100%;display:flex" v-if="model !== null">
|
|
4
|
+
<div class="el-input el-input--mini el-input-group el-input-group--prepend el-input--suffix showLabel lableinput text-justify">
|
|
5
|
+
<div v-if="model.showLabel && model.label" class="el-input-group__prepend">
|
|
6
|
+
<div slot="prepend" class="label-ellipsis" :class="[model.labelClass]" :title="model.label">
|
|
7
|
+
{{model.label}}
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div style="display:inline-flex;color: var(--centalineBlue);padding-left:5px;">
|
|
11
|
+
<div v-html="model.labelValue"></div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<script>
|
|
18
|
+
import dynamicElement from '../../mixins/dynamicElement';
|
|
19
|
+
export default {
|
|
20
|
+
name: 'ct-labelHtml',
|
|
21
|
+
mixins: [dynamicElement],
|
|
22
|
+
props: {
|
|
23
|
+
vmodel: Object
|
|
24
|
+
},
|
|
25
|
+
data() {
|
|
26
|
+
return {
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
created() {
|
|
30
|
+
if (typeof this.vmodel === 'undefined') {
|
|
31
|
+
this.model = this.loaderObj.LH(this.source);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this.model = this.vmodel;
|
|
35
|
+
}
|
|
36
|
+
this.model.self=this;
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
42
|
+
<style scoped>
|
|
43
|
+
.isWidth {
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
}
|
|
46
|
+
.isEllipsis {
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
text-overflow: ellipsis;
|
|
49
|
+
display: -webkit-box;
|
|
50
|
+
-webkit-box-orient: vertical;
|
|
51
|
+
-webkit-line-clamp: 1;
|
|
52
|
+
word-break:break-all;
|
|
53
|
+
}
|
|
54
|
+
.text-justify{
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
}
|
|
58
|
+
.label-ellipsis{
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="width: 100%" class="ct-searchtable" ref="searchTable"
|
|
3
|
-
:style="{ 'margin-top':
|
|
3
|
+
:style="{ 'margin-top': isMarginTop ? '0' : '10px', padding: isLayout ? '0' : '' }">
|
|
4
4
|
<ct-tableStats ref="tableStats" class="ct-search-table-list-header" v-if="!isLoading && model && searchStatsApi"
|
|
5
5
|
:api="searchStatsApi" @searchStats="searchStats" @setTableHeight="setTableHeight" :flagDisabled="disabledStats"
|
|
6
6
|
:searchModel="model.searchModel">
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
column.fixed === 'left' ? 'left-fixation' : null,
|
|
101
101
|
column.width === undefined ? 'ct-table-auto' : null,
|
|
102
102
|
column.fixed === 'right' ? 'right-fixation' : null,
|
|
103
|
-
]" v-bind="column.attrs">
|
|
103
|
+
]" v-bind="column.attrs" :style="getrowselectColor(rowindex === model.selectIndex)" >
|
|
104
104
|
<!--操作列-->
|
|
105
105
|
<div v-if="column.id === 'operation'" class="div_allinline" :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'" style="float: left;">
|
|
106
106
|
<template v-for="(router, rowRouterIndex) in getRowRouterShow(row)" >
|
|
@@ -263,6 +263,7 @@ export default {
|
|
|
263
263
|
currentTh: null,
|
|
264
264
|
isLoading: true,
|
|
265
265
|
isLayout: false,
|
|
266
|
+
isMarginTop:false,
|
|
266
267
|
searchLoading: true,
|
|
267
268
|
tableLoading: false, //表格等待
|
|
268
269
|
operationLoading: false, //操作等待
|
|
@@ -299,6 +300,7 @@ export default {
|
|
|
299
300
|
theadTitleLeft:0,
|
|
300
301
|
theadTitleWidth:0,
|
|
301
302
|
updateTableColumnsKey:0,
|
|
303
|
+
backgroundColor: "#ecf5ff",
|
|
302
304
|
};
|
|
303
305
|
},
|
|
304
306
|
deactivated(){
|
|
@@ -310,6 +312,17 @@ export default {
|
|
|
310
312
|
});
|
|
311
313
|
},
|
|
312
314
|
methods: {
|
|
315
|
+
getrowselectColor(flagSelect){
|
|
316
|
+
if(flagSelect)
|
|
317
|
+
{
|
|
318
|
+
return {
|
|
319
|
+
backgroundColor: this.backgroundColor
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
else{
|
|
323
|
+
return {};
|
|
324
|
+
}
|
|
325
|
+
},
|
|
313
326
|
theadTitleHover(ev){
|
|
314
327
|
if ( !this.model.columnWidthSaveAction) {
|
|
315
328
|
return
|
|
@@ -365,6 +378,36 @@ export default {
|
|
|
365
378
|
});
|
|
366
379
|
if (self.model.cellLayout) {
|
|
367
380
|
self.isLayout = true;
|
|
381
|
+
}
|
|
382
|
+
if (this.model.selectedRowBackColor) {
|
|
383
|
+
self.backgroundColor=this.model.selectedRowBackColor ;
|
|
384
|
+
}
|
|
385
|
+
if (
|
|
386
|
+
(self.model.searchModel.screen &&
|
|
387
|
+
self.model.searchModel.screen.length > 0) ||
|
|
388
|
+
(self.model.searchModel.btnScreen &&
|
|
389
|
+
self.model.searchModel.btnScreen.length > 0)
|
|
390
|
+
) {
|
|
391
|
+
let showField = self.model.searchModel.screen.find((v) => {
|
|
392
|
+
return v.show !== false;
|
|
393
|
+
});
|
|
394
|
+
if (!showField) {
|
|
395
|
+
showField = self.model.searchModel.btnScreen.find((v) => {
|
|
396
|
+
return v.show !== false;
|
|
397
|
+
});
|
|
398
|
+
if (!showField) {
|
|
399
|
+
self.isMarginTop = true;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
} else if (self.model.shortcutForm) {
|
|
403
|
+
self.isMarginTop = false;
|
|
404
|
+
} else if (
|
|
405
|
+
self.model.searchModel.highScreen &&
|
|
406
|
+
self.model.searchModel.highScreen.length <= 0
|
|
407
|
+
) {
|
|
408
|
+
self.isMarginTop = true;
|
|
409
|
+
} else {
|
|
410
|
+
self.isMarginTop = false;
|
|
368
411
|
}
|
|
369
412
|
self.isLoading = false;
|
|
370
413
|
self.$forceUpdate();
|
|
@@ -2225,7 +2268,7 @@ export default {
|
|
|
2225
2268
|
}
|
|
2226
2269
|
|
|
2227
2270
|
.ct-table .ct-td.select {
|
|
2228
|
-
background-color:
|
|
2271
|
+
background-color: var(backgroundColor) !important;
|
|
2229
2272
|
}
|
|
2230
2273
|
.ct-table .ct-tr:hover .ct-td.select {
|
|
2231
2274
|
background-color: #ecf5ff !important;
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
<div v-if="model.showLabel && model.label" class="el-input-group__prepend field-label-div max-input-group" :class="[model.labelClass]">
|
|
8
8
|
<span>{{model.label}}</span>
|
|
9
9
|
</div>
|
|
10
|
-
|
|
10
|
+
<div v-if="model.preLabel">
|
|
11
|
+
<span v-html="model.preLabel"></span>
|
|
12
|
+
</div>
|
|
11
13
|
|
|
12
14
|
<el-popover v-if="model.autoFill && model.paramName" placement="bottom-start" v-model="showDrop" :trigger="'manual'" class="autoFill">
|
|
13
15
|
<div>
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
</span>
|
|
47
49
|
</span>
|
|
48
50
|
</el-input>
|
|
49
|
-
<span v-if="this.minText" class="textarea-tip"
|
|
51
|
+
<span v-if="model.inputType === 'textarea' && this.minText" class="textarea-tip" v-html="minText"></span>
|
|
50
52
|
<span v-if="model.showWordLimit" class="textarea-count">{{model.value.length}}/{{ model.max }}</span>
|
|
51
53
|
<span v-if="!model.forbiddenWords" class="textarea-icon"></span>
|
|
52
54
|
</div>
|
|
@@ -90,7 +92,7 @@
|
|
|
90
92
|
data() {
|
|
91
93
|
return {
|
|
92
94
|
showClear: false,
|
|
93
|
-
minText:'',
|
|
95
|
+
minText:' ',
|
|
94
96
|
minTextLeft:0,
|
|
95
97
|
forbiddenWordsValue:'',
|
|
96
98
|
forbiddenWordsWidth:0,
|
|
@@ -116,9 +118,9 @@
|
|
|
116
118
|
if(this.model.max && this.model.max>0 && this.model.min && this.model.min > 0){
|
|
117
119
|
this.minText='需要'+this.model.min+'-'+this.model.max+'个字';
|
|
118
120
|
}
|
|
119
|
-
else if(this.model.max && this.model.max>0){
|
|
120
|
-
|
|
121
|
-
}
|
|
121
|
+
// else if(this.model.max && this.model.max>0){
|
|
122
|
+
// this.minText='至多'+this.model.max+'个字';
|
|
123
|
+
// }
|
|
122
124
|
else if(this.model.min && this.model.min > 0){
|
|
123
125
|
this.minText='至少需要'+this.model.min+'个字';
|
|
124
126
|
}
|
|
@@ -29,48 +29,100 @@ const Canlendar = function (source, param,flagSearch,callBack) {
|
|
|
29
29
|
}
|
|
30
30
|
return source.columns;
|
|
31
31
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return canlendarData;
|
|
46
|
-
},
|
|
47
|
-
rowRouterKey(key) {
|
|
48
|
-
var obj = { action: "" };
|
|
49
|
-
if (rtn.rowRouter) {
|
|
50
|
-
var rowRouter = rtn.rowRouter;
|
|
51
|
-
for (var i = 0; i < rowRouter.length; i++) {
|
|
52
|
-
if (rowRouter[i].id == key) {
|
|
53
|
-
obj = rowRouter[i];
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
32
|
+
_buttons: null,
|
|
33
|
+
get buttons() {
|
|
34
|
+
if (rtn._buttons !== null) {
|
|
35
|
+
return rtn._buttons;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
rtn._buttons = [];
|
|
39
|
+
if (source.buttons) {
|
|
40
|
+
source.buttons.forEach((v) => {
|
|
41
|
+
var button = Router(v);
|
|
42
|
+
button.is = "ct-btn";
|
|
43
|
+
rtn._buttons.push(button);
|
|
44
|
+
});
|
|
56
45
|
}
|
|
57
|
-
return
|
|
46
|
+
return rtn._buttons;
|
|
58
47
|
}
|
|
59
48
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
49
|
+
// get actionRouters() {
|
|
50
|
+
// if (!source.actionRouters) {
|
|
51
|
+
// source.actionRouters = [];
|
|
52
|
+
// }
|
|
53
|
+
// return source.actionRouters;
|
|
54
|
+
// },
|
|
55
|
+
doAction(response,newData,currentNode,currentData) {
|
|
56
|
+
switch (response.actionType) {
|
|
57
|
+
case Enum.ActionType.Delete://删除
|
|
58
|
+
case Enum.ActionType.CloseTabThenDelete://删除
|
|
59
|
+
rtn.$vue.remove(newData);//删除树节点
|
|
60
|
+
break;
|
|
61
|
+
case Enum.ActionType.New://新增
|
|
62
|
+
case Enum.ActionType.CloseTabThenNew://新增
|
|
63
|
+
rtn.$vue.add(newData)//新增树节点
|
|
64
|
+
break;
|
|
65
|
+
case Enum.ActionType.Update://修改
|
|
66
|
+
case Enum.ActionType.CloseTabThenUpdate://修改
|
|
67
|
+
rtn.$vue.update(newData)//修改树节点
|
|
68
|
+
break;
|
|
69
|
+
default:
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
_actionRouter: null,
|
|
74
|
+
get actionRouter() {
|
|
75
|
+
if (rtn._actionRouter !== null) {
|
|
76
|
+
return rtn._actionRouter;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
rtn._actionRouter = [];
|
|
80
|
+
if (source.actionRouters) {
|
|
81
|
+
source.actionRouters.forEach((v) => {
|
|
82
|
+
var router = Router(v);
|
|
83
|
+
//router.is = "ct-btn";
|
|
84
|
+
//router.attrs = { size: "mini" }
|
|
85
|
+
rtn._actionRouter.push(router);
|
|
86
|
+
});
|
|
64
87
|
}
|
|
65
|
-
|
|
66
|
-
this._tabs = [];
|
|
67
|
-
source.Tabs.forEach(v => {
|
|
68
|
-
var tab = Router(v);
|
|
69
|
-
this._tabs.push(tab);
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
return this._tabs;
|
|
88
|
+
return rtn._actionRouter;
|
|
73
89
|
}
|
|
90
|
+
},
|
|
91
|
+
// get rowRouter() {
|
|
92
|
+
// if (rtn._rowRouter !== null) {
|
|
93
|
+
// return rtn._rowRouter;
|
|
94
|
+
// }
|
|
95
|
+
// else {
|
|
96
|
+
// rtn._rowRouter = [];
|
|
97
|
+
// if (rtn.actionRouter) {
|
|
98
|
+
// rtn.actionRouter.forEach((v) => {
|
|
99
|
+
// if (v.show) {
|
|
100
|
+
// rtn._rowRouter.push(v);
|
|
101
|
+
// }
|
|
102
|
+
// });
|
|
103
|
+
// }
|
|
104
|
+
// return rtn._rowRouter;
|
|
105
|
+
// }
|
|
106
|
+
// },
|
|
107
|
+
// get optionApi() {
|
|
108
|
+
// return source.parameterAction;
|
|
109
|
+
// },
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
// rowRouterKey(key) {
|
|
113
|
+
// var obj = { action: "" };
|
|
114
|
+
// if (rtn.rowRouter) {
|
|
115
|
+
// var rowRouter = rtn.rowRouter;
|
|
116
|
+
// for (var i = 0; i < rowRouter.length; i++) {
|
|
117
|
+
// if (rowRouter[i].id == key) {
|
|
118
|
+
// obj = rowRouter[i];
|
|
119
|
+
// break;
|
|
120
|
+
// }
|
|
121
|
+
// }
|
|
122
|
+
// return obj;
|
|
123
|
+
// }
|
|
124
|
+
// },
|
|
125
|
+
|
|
74
126
|
};
|
|
75
127
|
|
|
76
128
|
//valid.InitForm(rtn);
|
|
@@ -513,6 +513,10 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
513
513
|
}
|
|
514
514
|
);
|
|
515
515
|
},
|
|
516
|
+
execRouter(routerKey) {
|
|
517
|
+
let field={id:routerKey};
|
|
518
|
+
this.form.self.fieldClickHandler(field);
|
|
519
|
+
},
|
|
516
520
|
//消息提示 type主题:success/warning/info/error。 center是否居中true/flase。 duration 显示时间, 毫秒。设为 0 则不会自动关闭。
|
|
517
521
|
//showClose 是否显示关闭按钮。dangerouslyUseHtmlString 属性设置为 true ,message 就会被当做 HTML 片段处理。
|
|
518
522
|
message(message, type, center, duration, showClose, dangerouslyUseHTMLString) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import base from '../../index';
|
|
2
|
+
import Base from './Base';
|
|
3
|
+
const T = function (source) {
|
|
4
|
+
var rtn = {
|
|
5
|
+
get labelValue() {
|
|
6
|
+
return source.code1;
|
|
7
|
+
},
|
|
8
|
+
get show() {
|
|
9
|
+
let flagShow = true;
|
|
10
|
+
if (typeof source.show !== "undefined") {
|
|
11
|
+
flagShow = source.show;
|
|
12
|
+
}
|
|
13
|
+
if(!rtn.labelValue && !rtn.label){
|
|
14
|
+
flagShow = false;
|
|
15
|
+
}
|
|
16
|
+
return flagShow;
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
rtn = base.copy(Base(source), rtn);
|
|
20
|
+
return rtn;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default T;
|
|
@@ -5,6 +5,12 @@ const Router = function (source) {
|
|
|
5
5
|
var rtn = {
|
|
6
6
|
disabled: source.selectedMode && source.selectedMode === Enum.ListSelectMode.Multiple ? true : false,
|
|
7
7
|
code1:'',
|
|
8
|
+
get source() {
|
|
9
|
+
return source;
|
|
10
|
+
},
|
|
11
|
+
set source(v) {
|
|
12
|
+
source = v;
|
|
13
|
+
},
|
|
8
14
|
get id() {
|
|
9
15
|
return source.key;
|
|
10
16
|
},
|
|
@@ -386,6 +392,9 @@ const Router = function (source) {
|
|
|
386
392
|
get locked() {
|
|
387
393
|
return source.locked;
|
|
388
394
|
},
|
|
395
|
+
set locked(v) {
|
|
396
|
+
source.locked = v;
|
|
397
|
+
},
|
|
389
398
|
get flagVerifyData() {
|
|
390
399
|
//提交表单时是否校验数据
|
|
391
400
|
if (source.flagVerifyData != undefined) {
|
|
@@ -553,7 +553,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
553
553
|
if (typeof response.page.flagMoreData !== 'undefined') {
|
|
554
554
|
self.flagMoreData = response.page.flagMoreData;
|
|
555
555
|
}
|
|
556
|
-
if (response.content.updateTableColumns) {
|
|
556
|
+
if (response.content.updateTableColumns&&response.page.pageIndex<=1) {
|
|
557
557
|
self.columns = response.content.columns;
|
|
558
558
|
if (self.template) {
|
|
559
559
|
var tempLoader = template.loader(self.template).default;
|
|
@@ -687,7 +687,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
687
687
|
if (typeof response.content.bottomText !== 'undefined') {
|
|
688
688
|
self.listFooter = response.content.bottomText;
|
|
689
689
|
}
|
|
690
|
-
if (response.content.updateTableColumns) {
|
|
690
|
+
if (response.content.updateTableColumns&&response.page.pageIndex<=1) {
|
|
691
691
|
self.columns = response.content.columns;
|
|
692
692
|
if (self.template) {
|
|
693
693
|
var tempLoader = template.loader(self.template).default;
|
|
@@ -37,8 +37,7 @@ import RichText from '../RichText';
|
|
|
37
37
|
import DragSort from '../DragSort';
|
|
38
38
|
import Container from '../Container';
|
|
39
39
|
import Contact from '../Contact';
|
|
40
|
-
import
|
|
41
|
-
|
|
40
|
+
import LH from '../LH';
|
|
42
41
|
|
|
43
42
|
const LibFunction = {
|
|
44
43
|
install(Vue) {},
|
|
@@ -254,6 +253,10 @@ const LibFunction = {
|
|
|
254
253
|
item = L(field);
|
|
255
254
|
item.is = 'ct-labelText';
|
|
256
255
|
break;
|
|
256
|
+
case Enum.ControlType.HtmlLabel://html 标签(支持自动换行)
|
|
257
|
+
item = LH(field);
|
|
258
|
+
item.is = 'ct-labelHtml';
|
|
259
|
+
break;
|
|
257
260
|
case Enum.ControlType.CheckBox: //复选框
|
|
258
261
|
item = Cb(field);
|
|
259
262
|
item.is = 'ct-cb';
|