centaline-data-driven 1.3.95 → 1.3.96
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/centaline/css/common.css +3 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +1 -1
- package/src/centaline/dynamicT/src/dynamicT.vue +46 -10
- package/src/centaline/loader/src/ctl/Base.js +3 -0
- package/src/centaline/loader/src/ctl/ContactList.js +14 -0
- package/src/centaline/loader/src/ctl/SearchTable.js +19 -1
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +18 -14
- package/src/centaline/validate/index.js +5 -0
- package/src/main.js +1 -1
- 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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</ct-tableStats>
|
|
7
7
|
|
|
8
8
|
<ct-tabletoolbar ref="toolbar" v-if="!isLoading && model && model.buttons"
|
|
9
|
-
:buttons="model.buttons"
|
|
9
|
+
:buttons="model.buttons" :key="model.toolbarKey"
|
|
10
10
|
@click="toolbarClickHandler($event)" @importComplete="importComplete"
|
|
11
11
|
:optionApi="model.optionApi" :searchModel="model.searchModel">
|
|
12
12
|
</ct-tabletoolbar>
|
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
<span>{{model.label}}</span>
|
|
9
9
|
</div>
|
|
10
10
|
<div ref="highlights" v-if="model.firbiddenWords" class="backdrop" :style="{width:firbiddenWordsWidth+'px',height:firbiddenWordsHeight+'px',left:firbiddenWordsLeft+'px',top:firbiddenWordsTop+'px'}">
|
|
11
|
-
<div
|
|
11
|
+
<div class="highlights" v-html="firbiddenWordsValue"></div>
|
|
12
12
|
</div>
|
|
13
13
|
<el-input ref="input" :title="model.lock?model.value:''" :type="model.inputType" v-model="model.value" v-bind="model.attrs" @input="inputHandler($event);isShowClear()" @change="changeHandler($event)"
|
|
14
|
-
class="ct-flex-div-input max-input" :class="[model.showLabel?'showLabel':'',!valid?'inputError':''
|
|
14
|
+
class="ct-flex-div-input max-input" :class="[model.showLabel?'showLabel':'',!valid?'inputError':'',model.firbiddenWords?'inputHighlights':'']"
|
|
15
|
+
:disabled="model.lock" :rows="model.rows"
|
|
15
16
|
:readonly="model.readonly" :show-password="model.isPassword" autocomplete="on" :maxlength="model.max" :show-word-limit="model.showWordLimit"
|
|
16
|
-
@keyup.enter.native="search()" style="z-index: 3;">
|
|
17
|
+
@keyup.enter.native="search()" style="z-index: 3;background-color: transparent;">
|
|
17
18
|
<span slot="suffix" v-if="model.unitName" class="ct-unitname" :class="showClear?'unitName-20':'unitName-0'">{{model.unitName}}</span>
|
|
18
19
|
|
|
19
20
|
<span slot="suffix" class="el-input__suffix el-input--mini is-show-Span" v-if="!model.isPassword&&showClear" :class="model.unitName?'ct-right-10':'ct-right-0'">
|
|
@@ -28,8 +29,8 @@
|
|
|
28
29
|
|
|
29
30
|
<div v-if="model.moreActionRouter && !model.lock">
|
|
30
31
|
<img v-if="model.moreActionRouter.imgUrl" class="ct-tablecurrencyImg ct-tablecurrencyItem"
|
|
31
|
-
:src="model.moreActionRouter.imgUrl" :title="model.moreActionRouter.label" @click="popupSearchListHandle"/>
|
|
32
|
-
<el-button v-else size="mini" type="primary" class="h26" @click="popupSearchListHandle">
|
|
32
|
+
:src="model.moreActionRouter.imgUrl" :title="model.moreActionRouter.label" @click="popupSearchListHandle($event)"/>
|
|
33
|
+
<el-button v-else size="mini" type="primary" class="h26" @click="popupSearchListHandle($event)">
|
|
33
34
|
{{model.moreActionRouter.label}}
|
|
34
35
|
</el-button>
|
|
35
36
|
</div>
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
showClear: false,
|
|
60
61
|
minText:'',
|
|
61
62
|
minTextLeft:0,
|
|
63
|
+
firbiddenWordsValue:'',
|
|
62
64
|
firbiddenWordsWidth:0,
|
|
63
65
|
firbiddenWordsHeight:0,
|
|
64
66
|
firbiddenWordsLeft:0,
|
|
@@ -89,6 +91,7 @@
|
|
|
89
91
|
this.firbiddenWordsHeight=this.$refs.input.$el.offsetHeight;
|
|
90
92
|
this.firbiddenWordsLeft=this.$refs.input.$el.offsetLeft;
|
|
91
93
|
this.firbiddenWordsTop=this.$refs.input.$el.offsetTop;
|
|
94
|
+
this.$refs.input.$el.addEventListener('scroll',this.scrollHandler,true);
|
|
92
95
|
}
|
|
93
96
|
},
|
|
94
97
|
methods: {
|
|
@@ -135,7 +138,7 @@
|
|
|
135
138
|
}
|
|
136
139
|
this.search();
|
|
137
140
|
},
|
|
138
|
-
popupSearchListHandle: function () {
|
|
141
|
+
popupSearchListHandle: function (e) {
|
|
139
142
|
var self = this;
|
|
140
143
|
self.showDrop=false;
|
|
141
144
|
self.$emit('popupSearchList', false, self.model, self.model.moreActionRouter, (optionArr) => {
|
|
@@ -146,12 +149,37 @@
|
|
|
146
149
|
else {
|
|
147
150
|
self.model.value=row[self.model.optionAttrs.label];
|
|
148
151
|
}
|
|
152
|
+
self.inputHandler(e);
|
|
149
153
|
});
|
|
150
154
|
});
|
|
151
155
|
},
|
|
152
156
|
inputHandler(e) {
|
|
157
|
+
this.applyHighlights();
|
|
153
158
|
this.$emit('inputHandler',e);
|
|
154
|
-
}
|
|
159
|
+
},
|
|
160
|
+
scrollHandler() {
|
|
161
|
+
var scrollTop = this.$refs.input.$el.children[0].scrollTop;
|
|
162
|
+
var scrollHeight = this.$refs.input.$el.children[0].scrollHeight;
|
|
163
|
+
var offsetHeight = this.$refs.input.$el.children[0].offsetHeight;
|
|
164
|
+
// console.log(scrollTop)
|
|
165
|
+
// console.log(scrollHeight)
|
|
166
|
+
// console.log(offsetHeight)
|
|
167
|
+
// if(scrollTop+offsetHeight>=scrollHeight){
|
|
168
|
+
// scrollTop=scrollTop-32;
|
|
169
|
+
// }
|
|
170
|
+
this.$refs.highlights.scrollTop=scrollTop;
|
|
171
|
+
},
|
|
172
|
+
applyHighlights() {
|
|
173
|
+
var self=this;
|
|
174
|
+
if(self.model.firbiddenWords){
|
|
175
|
+
self.firbiddenWordsValue=self.model.value;
|
|
176
|
+
let joinChar=self.model.joinChar || ',';
|
|
177
|
+
self.model.firbiddenWords.split(joinChar).forEach(w => {
|
|
178
|
+
let reg1=new RegExp(w,'g');
|
|
179
|
+
self.firbiddenWordsValue=self.firbiddenWordsValue.replace(reg1,'<span style="background-color: red;color: transparent;">'+w+'</span>');
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
},
|
|
155
183
|
},
|
|
156
184
|
}
|
|
157
185
|
</script>
|
|
@@ -173,8 +201,8 @@
|
|
|
173
201
|
z-index: 1;
|
|
174
202
|
border: 1px solid #DCDFE6;
|
|
175
203
|
background-color: #fff;
|
|
176
|
-
overflow: auto;
|
|
177
204
|
pointer-events: none;
|
|
205
|
+
overflow-y: auto;
|
|
178
206
|
border-radius: 4px;
|
|
179
207
|
-webkit-transition: -webkit-transform 1s;
|
|
180
208
|
transition: -webkit-transform 1s;
|
|
@@ -184,7 +212,15 @@
|
|
|
184
212
|
.highlights {
|
|
185
213
|
white-space: pre-wrap;
|
|
186
214
|
word-wrap: break-word;
|
|
187
|
-
|
|
188
|
-
padding: 5px 15px;
|
|
215
|
+
color: transparent;
|
|
216
|
+
padding: 5px 15px 5px 15px;
|
|
217
|
+
line-height: 1.5;
|
|
218
|
+
/* overflow-y: auto;
|
|
219
|
+
width: 100%;
|
|
220
|
+
height: 100%;
|
|
221
|
+
border-radius: 4px;
|
|
222
|
+
resize: vertical;
|
|
223
|
+
box-sizing: border-box;
|
|
224
|
+
transition: border-color .2s cubic-bezier(.645,.045,.355,1); */
|
|
189
225
|
}
|
|
190
226
|
</style>
|
|
@@ -367,6 +367,20 @@ const ContactList = function (source, para, callBack) {
|
|
|
367
367
|
self.doUpdate(response.content.rows, searchValue1);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
+
if(response.content.updateToolButtons){
|
|
371
|
+
if (response.content.toolButtons) {
|
|
372
|
+
self._buttons=[];
|
|
373
|
+
response.content.toolButtons.forEach((v) => {
|
|
374
|
+
var button = Router(v);
|
|
375
|
+
button.is = "ct-btn";
|
|
376
|
+
button.attrs = {
|
|
377
|
+
size: "mini",
|
|
378
|
+
class: 'max-btn-gray'
|
|
379
|
+
}
|
|
380
|
+
self._buttons.push(button);
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
}
|
|
370
384
|
}
|
|
371
385
|
})
|
|
372
386
|
.catch((error) => {
|
|
@@ -16,6 +16,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
16
16
|
pageIndex: 1,
|
|
17
17
|
selectIndex: 0,
|
|
18
18
|
selectAll: 0,
|
|
19
|
+
toolbarKey:0,
|
|
19
20
|
searchAction:action?action:data,
|
|
20
21
|
get title() {
|
|
21
22
|
return source.content.title;
|
|
@@ -324,7 +325,8 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
324
325
|
get buttons() {
|
|
325
326
|
if (rtn._buttons !== null) {
|
|
326
327
|
return rtn._buttons;
|
|
327
|
-
}
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
328
330
|
rtn._buttons = [];
|
|
329
331
|
if (source.content.toolButtons) {
|
|
330
332
|
|
|
@@ -531,6 +533,22 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
531
533
|
self.$vue.refreshTableColumns(response);
|
|
532
534
|
}
|
|
533
535
|
}
|
|
536
|
+
if(response.content.updateToolButtons){
|
|
537
|
+
if (response.content.toolButtons) {
|
|
538
|
+
self._buttons=[];
|
|
539
|
+
response.content.toolButtons.forEach((v) => {
|
|
540
|
+
var button = Router(v);
|
|
541
|
+
button.is = "ct-btn";
|
|
542
|
+
button.attrs = {
|
|
543
|
+
size: "mini",
|
|
544
|
+
class: 'max-btn-gray'
|
|
545
|
+
}
|
|
546
|
+
self._buttons.push(button);
|
|
547
|
+
});
|
|
548
|
+
self.toolbarKey=self.toolbarKey+1;
|
|
549
|
+
self.$vue.setTableHeight();
|
|
550
|
+
}
|
|
551
|
+
}
|
|
534
552
|
if (typeof callback !== 'undefined') {
|
|
535
553
|
if (response.content.rows.length > 0) {
|
|
536
554
|
callback(true,response);
|
|
@@ -293,15 +293,17 @@ const LibFunction = {
|
|
|
293
293
|
return v1.key === field.fieldName1;
|
|
294
294
|
});
|
|
295
295
|
var files = [];
|
|
296
|
-
source.medias.
|
|
297
|
-
|
|
298
|
-
if (v.GroupID
|
|
296
|
+
if(source.medias && source.medias.length>0){
|
|
297
|
+
source.medias.forEach((v, index) => {
|
|
298
|
+
if (v.GroupID) {
|
|
299
|
+
if (v.GroupID == field.fieldName1) {
|
|
300
|
+
files.push(v);
|
|
301
|
+
}
|
|
302
|
+
} else {
|
|
299
303
|
files.push(v);
|
|
300
304
|
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
})
|
|
305
|
+
})
|
|
306
|
+
}
|
|
305
307
|
item = File(field, files, router, source.parameterAction);
|
|
306
308
|
item.is = 'ct-file';
|
|
307
309
|
break;
|
|
@@ -310,15 +312,17 @@ const LibFunction = {
|
|
|
310
312
|
return v1.key === field.fieldName1;
|
|
311
313
|
});
|
|
312
314
|
var files = [];
|
|
313
|
-
source.medias.
|
|
314
|
-
|
|
315
|
-
if (v.GroupID
|
|
315
|
+
if(source.medias && source.medias.length>0){
|
|
316
|
+
source.medias.forEach((v, index) => {
|
|
317
|
+
if (v.GroupID) {
|
|
318
|
+
if (v.GroupID == field.fieldName1) {
|
|
319
|
+
files.push(v);
|
|
320
|
+
}
|
|
321
|
+
} else {
|
|
316
322
|
files.push(v);
|
|
317
323
|
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
})
|
|
324
|
+
})
|
|
325
|
+
}
|
|
322
326
|
item = PhotoSelect(field, files, router, source.parameterAction);
|
|
323
327
|
item.is = 'ct-photoselect';
|
|
324
328
|
break;
|
|
@@ -3,6 +3,11 @@ import Enum from '../loader/src/ctl/lib/Enum';
|
|
|
3
3
|
|
|
4
4
|
const actions = {
|
|
5
5
|
required(v, o) {
|
|
6
|
+
if(v.type===Enum.ControlType.TextBox || v.type===Enum.ControlType.MultiLineText){
|
|
7
|
+
if (v.value === undefined || v.value === null || v.value === '' || v.value.trim() === '') {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
6
11
|
if (v.value === undefined || v.value === null || v.value === '') {
|
|
7
12
|
return false;
|
|
8
13
|
}
|
package/src/main.js
CHANGED
|
@@ -43,7 +43,7 @@ Vue.use(centaline, {
|
|
|
43
43
|
getRequestHeaders: function () {
|
|
44
44
|
return {
|
|
45
45
|
oldToken: '823894f8-bbf3-4d54-b3fb-4c697801c5c4',
|
|
46
|
-
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.
|
|
46
|
+
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVbC9rL2pgMnNBwicpxFChXKRwIh7g6IpEvPFFNM894TxrmFEvwCbmilkQXc0EpjDIk3XONBfERichhMDBiJI52q2sVjBQXo_QalYfaWhfe-gD5Nv2CCs98wjzqc9fGPc9ep_8zmJGJDzthaViQVxbQjwtSpdqSOLjbB6w0AAP__.nf7jF3ewbimJ8eNFZ72RKXS7qN0SgN5OnkZ0ZEk82Rc',
|
|
47
47
|
|
|
48
48
|
originalRequestURL: 'http://10.88.22.67:8080',
|
|
49
49
|
EstateInfo: '{"estateId":"FAF029E8-EC28-4297-83CF-B8FFD826DB91","estateName":"AABBCC"}',
|