centaline-data-driven 1.5.29 → 1.5.30
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 +24 -0
- package/src/centaline/common/index.js +4 -1
- package/src/centaline/css/max.css +404 -295
- package/src/centaline/dynamicBtn/src/dynamicBtn.vue +121 -22
- package/src/centaline/dynamicFile/src/dynamicFile.vue +2 -2
- package/src/centaline/dynamicForm/src/dynamicForm.vue +6 -2
- package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +1 -0
- package/src/centaline/dynamicPhotoSelect/src/dynamicPhotoSelect.vue +1 -1
- package/src/centaline/dynamicRepeat/src/dynamicRepeat.vue +24 -16
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +523 -6
- package/src/centaline/dynamicSos/src/dynamicSos.vue +3 -1
- package/src/centaline/dynamicTree/src/dynamicTree.vue +221 -60
- package/src/centaline/formData/index.js +4 -1
- package/src/centaline/loader/src/ctl/Button.js +42 -1
- package/src/centaline/loader/src/ctl/Repeat.js +43 -4
- package/src/centaline/loader/src/ctl/SearchScreen.js +126 -1
- package/src/centaline/loader/src/ctl/SearchTable.js +1 -0
- package/src/centaline/loader/src/ctl/Sos.js +1 -0
- package/src/centaline/loader/src/ctl/Tree.js +19 -1
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +2 -2
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-dropdown v-if="model.isDropdown"
|
|
3
|
-
trigger="click"
|
|
4
|
-
v-bind="model.attrs"
|
|
2
|
+
<el-dropdown v-if="model.isDropdown"
|
|
3
|
+
trigger="click"
|
|
4
|
+
v-bind="model.attrs"
|
|
5
5
|
placement="bottom"
|
|
6
|
-
@click.native="dropClick"
|
|
6
|
+
@click.native="dropClick"
|
|
7
7
|
@command="commandClick"
|
|
8
8
|
:disabled="model.disabled || model.locked">
|
|
9
9
|
<el-button type="primary">
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
:style="{color:model.textColor,backgroundColor:model.bgColor,borderColor:model.borderColor}"
|
|
32
32
|
:icon="model.icon"
|
|
33
33
|
:disabled="model.disabled || model.locked">
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
<div>{{model.label}}</div>
|
|
35
|
+
<div class="subText">{{model.subText}}</div>
|
|
36
36
|
</el-button>
|
|
37
37
|
<el-button v-else-if="model.isCallTel" class="max"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<el-popover
|
|
44
|
-
|
|
38
|
+
:type="model.isHyperLink ? 'text' : 'primary'"
|
|
39
|
+
v-bind="model.attrs" @click="clickHandle"
|
|
40
|
+
:style="{color:model.textColor,backgroundColor:model.imgUrl?'transparent':model.bgColor,borderColor:model.imgUrl?'transparent':model.borderColor,padding:model.imgUrl?'0px':null}"
|
|
41
|
+
:icon="model.icon"
|
|
42
|
+
:disabled="model.disabled || model.locked">
|
|
43
|
+
<el-popover class="Stats-popover" :popper-class="'el-popoverCallTel'" :placement="option.placement?option.placement:'left'"
|
|
44
|
+
v-model="visible" :trigger="option.trigger?option.trigger:''">
|
|
45
45
|
<div style="border-bottom:none">
|
|
46
46
|
<div style="color: #388cd3;text-align: center;">{{message}}</div>
|
|
47
47
|
<img v-show="qrCode" :src="qrCode" style="margin-top: 5px;" :style="{'width':width+'px','height':height+'px'}" />
|
|
@@ -53,18 +53,44 @@
|
|
|
53
53
|
<el-checkbox v-else-if="model.isCheckbox" v-model="model.code1" @change="clickHandle">
|
|
54
54
|
{{model.label}}
|
|
55
55
|
</el-checkbox>
|
|
56
|
-
<el-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
<el-dropdown trigger="click" ref="searchwhere" v-else-if="model.isSearchRouterKey&&fieldSearchWhere" :hide-on-click="false" split-button class="max max-search-btn-dropdown" @visible-change="clickHandleDropdown"
|
|
57
|
+
:type="model.isHyperLink ? 'text' : 'primary'"
|
|
58
|
+
v-bind="model.attrs" @click="clickHandle"
|
|
59
|
+
:style="{color:model.textColor,backgroundColor:model.imgUrl?'transparent':model.bgColor,borderColor:model.imgUrl?'transparent':model.borderColor,padding:model.imgUrl?'0px':null}"
|
|
60
|
+
:icon="model.icon"
|
|
61
|
+
:disabled="model.disabled || model.locked" placement="bottom-start">
|
|
62
62
|
<div v-if="flagAppMode" :title="model.label">
|
|
63
|
-
<img :src="model.imgUrl" :height="model.buttonHeight+'px'"/>
|
|
63
|
+
<img :src="model.imgUrl" :height="model.buttonHeight+'px'" />
|
|
64
64
|
<div style="margin-top:5px;" class="labelText">{{model.label}}</div>
|
|
65
65
|
</div>
|
|
66
66
|
<div v-else>
|
|
67
|
-
<img v-if="model.imgUrl" :title="model.label" :src="model.imgUrl" :height="model.buttonHeight+'px'"/>
|
|
67
|
+
<img v-if="model.imgUrl" :title="model.label" :src="model.imgUrl" :height="model.buttonHeight+'px'" />
|
|
68
|
+
<span v-else>{{model.label}}</span>
|
|
69
|
+
</div>
|
|
70
|
+
<el-dropdown-menu>
|
|
71
|
+
<el-dropdown-item>
|
|
72
|
+
<div style="width:100%;float: left;margin:10px 0;">
|
|
73
|
+
<el-button style="float: left" v-for="(field, index) in SearchWhereButtons" :key="index" :type="field.isHyperLink ? 'text' : 'primary'" :disabled="field.locked" @click="SaveSearchWhere(field)">{{field.label}}</el-button>
|
|
74
|
+
<span style="margin-left:10px;margin-top:3px;float:left" @click="SearchWhereManage" title="维维护已保存的查询条件,如:设置和取消默认、修改标签、删除等。"><i class="el-icon-s-tools" style=" font-size: 18px;"></i></span>
|
|
75
|
+
</div>
|
|
76
|
+
</el-dropdown-item>
|
|
77
|
+
<el-dropdown-item v-for="(col, index) in SearchWhereList" :key="index">
|
|
78
|
+
<span @click="clickDropdownItem(col)" style="width:100%;float: left;">{{col.labelName}}</span>
|
|
79
|
+
</el-dropdown-item>
|
|
80
|
+
</el-dropdown-menu>
|
|
81
|
+
</el-dropdown>
|
|
82
|
+
<el-button v-else class="max"
|
|
83
|
+
:type="model.isHyperLink ? 'text' : 'primary'"
|
|
84
|
+
v-bind="model.attrs" @click="clickHandle"
|
|
85
|
+
:style="{color:model.textColor,backgroundColor:model.imgUrl?'transparent':model.bgColor,borderColor:model.imgUrl?'transparent':model.borderColor,padding:model.imgUrl?'0px':null}"
|
|
86
|
+
:icon="model.icon"
|
|
87
|
+
:disabled="model.disabled || model.locked">
|
|
88
|
+
<div v-if="flagAppMode" :title="model.label">
|
|
89
|
+
<img :src="model.imgUrl" :height="model.buttonHeight+'px'" />
|
|
90
|
+
<div style="margin-top:5px;" class="labelText">{{model.label}}</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div v-else>
|
|
93
|
+
<img v-if="model.imgUrl" :title="model.label" :src="model.imgUrl" :height="model.buttonHeight+'px'" />
|
|
68
94
|
<span v-else>{{model.label}}</span>
|
|
69
95
|
</div>
|
|
70
96
|
</el-button>
|
|
@@ -79,11 +105,15 @@
|
|
|
79
105
|
optionApi:String,
|
|
80
106
|
rowData: Object,
|
|
81
107
|
rowindex:Number,
|
|
82
|
-
flagAppMode:Boolean,
|
|
108
|
+
flagAppMode: Boolean,
|
|
109
|
+
actionRouters: Array,
|
|
83
110
|
},
|
|
84
111
|
mixins: [dynamicElement],
|
|
85
112
|
data: function () {
|
|
86
113
|
return {
|
|
114
|
+
fieldSearchWhere: {},
|
|
115
|
+
SearchWhereList: [],
|
|
116
|
+
SearchWhereButtons:[],
|
|
87
117
|
visible:false,
|
|
88
118
|
message:'',
|
|
89
119
|
qrCode:'',
|
|
@@ -106,6 +136,11 @@
|
|
|
106
136
|
else {
|
|
107
137
|
this.model = this.vmodel;
|
|
108
138
|
}
|
|
139
|
+
if (this.actionRouters && this.model.routerKey) {
|
|
140
|
+
this.fieldSearchWhere = this.actionRouters.find((b) => {
|
|
141
|
+
return b.id === this.model.routerKey;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
109
144
|
},
|
|
110
145
|
computed: {
|
|
111
146
|
uploadData() {
|
|
@@ -165,6 +200,43 @@
|
|
|
165
200
|
this.$emit('click',this.model,this.rowData,this.rowindex);
|
|
166
201
|
}
|
|
167
202
|
},
|
|
203
|
+
clickHandleDropdown(v) {
|
|
204
|
+
if (v) {
|
|
205
|
+
this.getSearchWherList();
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
SaveSearchWhere(field) {
|
|
209
|
+
if (field.lock) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
this.$refs.searchwhere.hide();
|
|
213
|
+
this.$emit('SaveSearchWhere', field);
|
|
214
|
+
},
|
|
215
|
+
getSearchWherList() {
|
|
216
|
+
if (this.model.routerKey) {
|
|
217
|
+
let field = this.actionRouters.find((b) => {
|
|
218
|
+
return b.id === this.model.routerKey;
|
|
219
|
+
});
|
|
220
|
+
if (field) {
|
|
221
|
+
this.model.getApiData(this.loadSearchWher, field);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
SearchWhereManage() {
|
|
226
|
+
this.$refs.searchwhere.hide();
|
|
227
|
+
this.$emit('SearchWhereManage', this.model);
|
|
228
|
+
},
|
|
229
|
+
clickDropdownItem(col) {
|
|
230
|
+
this.$refs.searchwhere.hide();
|
|
231
|
+
this.$emit('clichSearchWhere', col);
|
|
232
|
+
},
|
|
233
|
+
loadSearchWher(data, Buttons) {
|
|
234
|
+
this.SearchWhereList = [];
|
|
235
|
+
data.rows.forEach((row) => {
|
|
236
|
+
this.SearchWhereList.push(row);
|
|
237
|
+
});
|
|
238
|
+
this.SearchWhereButtons = Buttons;
|
|
239
|
+
},
|
|
168
240
|
callTelClick(data){
|
|
169
241
|
var self=this;
|
|
170
242
|
this.message='';
|
|
@@ -219,4 +291,31 @@
|
|
|
219
291
|
.max-info:hover .subText{
|
|
220
292
|
color: #fff;
|
|
221
293
|
}
|
|
294
|
+
.max-search-btn-dropdown {
|
|
295
|
+
margin-right:10px;
|
|
296
|
+
}
|
|
297
|
+
.max-search-btn-dropdown .el-dropdown__caret-button::before {
|
|
298
|
+
top: 0 !important;
|
|
299
|
+
bottom: 0 !important;
|
|
300
|
+
}
|
|
301
|
+
.max-search-btn-dropdown .el-button:first-child {
|
|
302
|
+
border-radius: 5px 0 0 5px;
|
|
303
|
+
}
|
|
304
|
+
.max-search-btn-dropdown .el-dropdown__caret-button {
|
|
305
|
+
border-radius: 0 5px 5px 0;
|
|
306
|
+
}
|
|
307
|
+
.max-search-btn-dropdown .el-button:first-child:focus {
|
|
308
|
+
background-color: var(--chinaRed);
|
|
309
|
+
border-top-color: var(--chinaRed);
|
|
310
|
+
border-left-color: var(--chinaRed);
|
|
311
|
+
border-bottom-color: var(--chinaRed);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.max-search-btn-dropdown .el-dropdown__caret-button:focus {
|
|
315
|
+
background-color: var(--chinaRed);
|
|
316
|
+
border-top-color: var(--chinaRed);
|
|
317
|
+
border-right-color: var(--chinaRed);
|
|
318
|
+
border-bottom-color: var(--chinaRed);
|
|
319
|
+
}
|
|
320
|
+
|
|
222
321
|
</style>
|
|
@@ -660,7 +660,7 @@
|
|
|
660
660
|
position: inherit;
|
|
661
661
|
bottom: 160px;
|
|
662
662
|
left: 65px;
|
|
663
|
-
color:
|
|
663
|
+
color: var(--chinaRed);
|
|
664
664
|
text-align: center;
|
|
665
665
|
}
|
|
666
666
|
|
|
@@ -672,7 +672,7 @@
|
|
|
672
672
|
position: inherit;
|
|
673
673
|
bottom: 160px;
|
|
674
674
|
left: 130px;
|
|
675
|
-
color:
|
|
675
|
+
color: var(--chinaRed);
|
|
676
676
|
text-align: center;
|
|
677
677
|
}
|
|
678
678
|
|
|
@@ -231,7 +231,8 @@
|
|
|
231
231
|
if (isIndependent) {
|
|
232
232
|
this.independentItem.push(v);
|
|
233
233
|
}
|
|
234
|
-
else if (v.is === 'ct-group') {
|
|
234
|
+
else if (v.is === 'ct-group' || v.is === 'ct-repeat') {
|
|
235
|
+
|
|
235
236
|
self.collapse.push(v);
|
|
236
237
|
if (v.isExpand && self.activeName == '-1') {
|
|
237
238
|
self.activeName = (self.collapse.length - 1).toString();
|
|
@@ -249,6 +250,10 @@
|
|
|
249
250
|
v.collapseName = collapseItemArr.length - 1;
|
|
250
251
|
collapseItem.push(v);
|
|
251
252
|
}
|
|
253
|
+
if (v.is === 'ct-repeat') {
|
|
254
|
+
v.collapseName = collapseItemArr.length - 1;
|
|
255
|
+
collapseItem.push(v);
|
|
256
|
+
}
|
|
252
257
|
});
|
|
253
258
|
if (self.activeName === '-1') self.activeName = '0';
|
|
254
259
|
if (collapseItem.length > 0) {
|
|
@@ -261,7 +266,6 @@
|
|
|
261
266
|
|
|
262
267
|
self.collapseFieldsRow.push(myFilter);
|
|
263
268
|
}
|
|
264
|
-
|
|
265
269
|
//因有一些子组件需要计算宽度及高度,故要先全部展开在缩起来
|
|
266
270
|
//也可采用方案二:子组件中,找不到高度,产生一个定时器,找到为止
|
|
267
271
|
//方案三:在显示分组时,主动触发resize方法
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
onChangeHandler: function (val) {
|
|
93
93
|
this.changeHandler(this.model.value);
|
|
94
94
|
this.isShowClear();
|
|
95
|
+
this.model.value.dispatchEvent(new Event("val")); //更新v-model的值
|
|
95
96
|
},
|
|
96
97
|
onBlurHandler:function(event){
|
|
97
98
|
this.model.value = this.$common.numToFloat(this.model.value, this.model.decimals);//保留n位小数
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="ct-form-repeat"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
新增
|
|
2
|
+
<div class="ct-form-repeat">
|
|
3
|
+
<el-button v-if="model.create&&model.tableData.length<model.max" type="success" style="float: right; " class=" max-btn-add" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
|
|
4
|
+
{{model.createText}}
|
|
6
5
|
</el-button>
|
|
7
|
-
|
|
8
|
-
<div class="list-title">
|
|
9
|
-
<h5>{{model.title}}</h5>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="el-col el-col-24 ct-form-repeat-el-col" v-for="(v, i) in model.tableData" :key="v.guid" v-if="!v.deleted">
|
|
6
|
+
<div class="el-col el-col-24 ct-form-repeat-el-col" v-for="(v, i) in model.tableData" :key="v.guid" v-if="!v.deleted">
|
|
12
7
|
<el-row v-if="v.field.length > 0">
|
|
13
|
-
<el-col v-for="(col, index) in v.field" :key="col.guid" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
|
|
8
|
+
<el-col v-for="(col, index) in v.field" :key="col.guid" v-if="col.show !== false&&col.type!=13" :span="col.colspan" style="padding:5px">
|
|
14
9
|
<component ref="Fields" :is="col.is" :vmodel="col" :api="model.OptApi" v-bind="col.bindPara"
|
|
15
10
|
@click="fieldClickHandler(col,index,i)" @change="changeHandler(col,index,i)"
|
|
16
11
|
@input="inputHandler(col,index,i)"></component>
|
|
@@ -35,7 +30,7 @@
|
|
|
35
30
|
},
|
|
36
31
|
data: function () {
|
|
37
32
|
return {
|
|
38
|
-
|
|
33
|
+
|
|
39
34
|
}
|
|
40
35
|
},
|
|
41
36
|
methods: {
|
|
@@ -61,14 +56,14 @@
|
|
|
61
56
|
return {
|
|
62
57
|
model: null,
|
|
63
58
|
foucus: false,
|
|
64
|
-
itemKey: Math.random()
|
|
59
|
+
itemKey: Math.random(),
|
|
60
|
+
activeName: ['0'],
|
|
65
61
|
}
|
|
66
62
|
},
|
|
67
63
|
created() {
|
|
68
64
|
let self = this;
|
|
69
65
|
this.model = this.vmodel;
|
|
70
66
|
this.model.OptApi = this.api;
|
|
71
|
-
|
|
72
67
|
this.$nextTick(function () {
|
|
73
68
|
self.model.refField = this.$refs.Fields;
|
|
74
69
|
self.model.refFieldsLabel = this.$refs.FieldsLabel;
|
|
@@ -88,7 +83,12 @@
|
|
|
88
83
|
deleteRow(index) {
|
|
89
84
|
var self = this;
|
|
90
85
|
this.model.deleteRow(index + 1, () => {
|
|
91
|
-
self.model.tableData[index].
|
|
86
|
+
if (self.model.tableData[index].isNewFlag) {
|
|
87
|
+
self.model.tableData.splice(index, 1);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
self.model.tableData[index].deleted = true;
|
|
91
|
+
}
|
|
92
92
|
self.$forceUpdate();
|
|
93
93
|
self.model.change = self.model.formListChange;
|
|
94
94
|
self.$emit('change');
|
|
@@ -113,10 +113,18 @@
|
|
|
113
113
|
var rtnBool = true;
|
|
114
114
|
if (!self.fieldsValidExcute()) {
|
|
115
115
|
rtnBool = false;
|
|
116
|
-
}
|
|
116
|
+
}
|
|
117
|
+
else if (this.model.tableData.length < this.model.min) {
|
|
118
|
+
self.$message({
|
|
119
|
+
message: this.model.title + " 最少需要" + this.model.min+"条数据",
|
|
120
|
+
type: 'warning',
|
|
121
|
+
showClose: true,
|
|
122
|
+
});
|
|
123
|
+
rtnBool = false;
|
|
124
|
+
}
|
|
117
125
|
if (rtnBool && self.model.required && this.model.tableData.length === 0) {
|
|
118
126
|
self.$message({
|
|
119
|
-
message: this.model.
|
|
127
|
+
message: this.model.title + " 表格不能为空",
|
|
120
128
|
type: 'warning',
|
|
121
129
|
showClose:true,
|
|
122
130
|
});
|