centaline-data-driven 1.3.95 → 1.3.97
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/Form.vue +16 -11
- package/src/centaline/css/common.css +3 -1
- package/src/centaline/dynamicForm/src/dynamicForm.vue +9 -9
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +1 -1
- package/src/centaline/dynamicT/src/dynamicT.vue +45 -13
- 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/FormList.js +0 -1
- 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 +5 -5
- 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/src/Form.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
3
|
<!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
|
|
4
|
-
<ct-form :api="'/
|
|
4
|
+
<ct-form :api="'/api/third-dept-tran/transaction/edit'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
|
|
5
5
|
<ct-dialog-list></ct-dialog-list>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
@@ -11,16 +11,21 @@
|
|
|
11
11
|
name: 'DataDrivenForm',
|
|
12
12
|
data() {
|
|
13
13
|
return {
|
|
14
|
-
apiParam:{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
apiParam:{actionType
|
|
15
|
+
:
|
|
16
|
+
"3",
|
|
17
|
+
originalTraId
|
|
18
|
+
:
|
|
19
|
+
"1572420664851103746",
|
|
20
|
+
pageOnly
|
|
21
|
+
:
|
|
22
|
+
"true",
|
|
23
|
+
pageStyle
|
|
24
|
+
:
|
|
25
|
+
"2",
|
|
26
|
+
pageTitle
|
|
27
|
+
:
|
|
28
|
+
"修改成交单",
|
|
24
29
|
},
|
|
25
30
|
topHeight:10,
|
|
26
31
|
}
|
|
@@ -599,6 +599,15 @@
|
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
},
|
|
602
|
+
inputHandler(field) {
|
|
603
|
+
if (typeof field.input !== 'undefined') {
|
|
604
|
+
if (typeof this.model.scripts !== 'undefined') {
|
|
605
|
+
this.model.scripts.formData.setExcuteListData(this.model.fields);
|
|
606
|
+
}
|
|
607
|
+
this.model.scripts.$fd = field.id;
|
|
608
|
+
this.$common.excute.call(this.model.scripts, field.input);
|
|
609
|
+
}
|
|
610
|
+
},
|
|
602
611
|
changeHandler(field) {
|
|
603
612
|
var self = this;
|
|
604
613
|
if (typeof field.change !== 'undefined') {
|
|
@@ -665,15 +674,6 @@
|
|
|
665
674
|
}
|
|
666
675
|
self.$forceUpdate();
|
|
667
676
|
},
|
|
668
|
-
inputHandler(field) {
|
|
669
|
-
if (typeof field.input !== 'undefined') {
|
|
670
|
-
if (typeof this.model.scripts !== 'undefined') {
|
|
671
|
-
this.model.scripts.formData.setExcuteListData(this.model.fields);
|
|
672
|
-
}
|
|
673
|
-
this.model.scripts.$fd = field.id;
|
|
674
|
-
this.$common.excute.call(this.model.scripts, field.input);
|
|
675
|
-
}
|
|
676
|
-
},
|
|
677
677
|
popupSearchListHandler(singleSelectio, field, router, callBack) {
|
|
678
678
|
var self = this;
|
|
679
679
|
var submitData = {};
|
|
@@ -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
|
-
<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':''
|
|
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();applyHighlights()" @change="changeHandler($event)"
|
|
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,33 @@
|
|
|
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
|
-
|
|
153
|
-
this.$
|
|
154
|
-
|
|
156
|
+
scrollHandler() {
|
|
157
|
+
var scrollTop = this.$refs.input.$el.children[0].scrollTop;
|
|
158
|
+
var scrollHeight = this.$refs.input.$el.children[0].scrollHeight;
|
|
159
|
+
var offsetHeight = this.$refs.input.$el.children[0].offsetHeight;
|
|
160
|
+
// console.log(scrollTop)
|
|
161
|
+
// console.log(scrollHeight)
|
|
162
|
+
// console.log(offsetHeight)
|
|
163
|
+
// if(scrollTop+offsetHeight>=scrollHeight){
|
|
164
|
+
// scrollTop=scrollTop-32;
|
|
165
|
+
// }
|
|
166
|
+
this.$refs.highlights.scrollTop=scrollTop;
|
|
167
|
+
},
|
|
168
|
+
applyHighlights() {
|
|
169
|
+
var self=this;
|
|
170
|
+
if(self.model.firbiddenWords){
|
|
171
|
+
self.firbiddenWordsValue=self.model.value;
|
|
172
|
+
let joinChar=self.model.joinChar || ',';
|
|
173
|
+
self.model.firbiddenWords.split(joinChar).forEach(w => {
|
|
174
|
+
let reg1=new RegExp(w,'g');
|
|
175
|
+
self.firbiddenWordsValue=self.firbiddenWordsValue.replace(reg1,'<span style="background-color: red;color: transparent;">'+w+'</span>');
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
},
|
|
155
179
|
},
|
|
156
180
|
}
|
|
157
181
|
</script>
|
|
@@ -173,8 +197,8 @@
|
|
|
173
197
|
z-index: 1;
|
|
174
198
|
border: 1px solid #DCDFE6;
|
|
175
199
|
background-color: #fff;
|
|
176
|
-
overflow: auto;
|
|
177
200
|
pointer-events: none;
|
|
201
|
+
overflow-y: auto;
|
|
178
202
|
border-radius: 4px;
|
|
179
203
|
-webkit-transition: -webkit-transform 1s;
|
|
180
204
|
transition: -webkit-transform 1s;
|
|
@@ -184,7 +208,15 @@
|
|
|
184
208
|
.highlights {
|
|
185
209
|
white-space: pre-wrap;
|
|
186
210
|
word-wrap: break-word;
|
|
187
|
-
|
|
188
|
-
padding: 5px 15px;
|
|
211
|
+
color: transparent;
|
|
212
|
+
padding: 5px 15px 5px 15px;
|
|
213
|
+
line-height: 1.5;
|
|
214
|
+
/* overflow-y: auto;
|
|
215
|
+
width: 100%;
|
|
216
|
+
height: 100%;
|
|
217
|
+
border-radius: 4px;
|
|
218
|
+
resize: vertical;
|
|
219
|
+
box-sizing: border-box;
|
|
220
|
+
transition: border-color .2s cubic-bezier(.645,.045,.355,1); */
|
|
189
221
|
}
|
|
190
222
|
</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
|
@@ -12,12 +12,12 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
12
12
|
// 关闭生产模式下给出的提示
|
|
13
13
|
Vue.config.productionTip = false;
|
|
14
14
|
Vue.use(centaline, {
|
|
15
|
-
baseUrl: "http://10.88.22.46:7070/v1/form/router",
|
|
15
|
+
// baseUrl: "http://10.88.22.46:7070/v1/form/router",
|
|
16
16
|
// baseUrl: "http://10.25.10.67:9999/v1/form/router",
|
|
17
17
|
// baseUrl: "http://10.88.22.42:9999/v1/form/router",
|
|
18
18
|
// baseUrl: "http://10.88.22.39:8080/api/",
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
baseUrl: "http://tjcptest.centaline.com.cn/",
|
|
20
|
+
flagRouterSelf: true,
|
|
21
21
|
zindex: 999,
|
|
22
22
|
showRequestSuccessMessage: true,
|
|
23
23
|
showRequestErrorMessage: true,
|
|
@@ -42,8 +42,8 @@ Vue.use(centaline, {
|
|
|
42
42
|
// 获取请求头
|
|
43
43
|
getRequestHeaders: function () {
|
|
44
44
|
return {
|
|
45
|
-
oldToken: '
|
|
46
|
-
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.
|
|
45
|
+
oldToken: '854e91e2-3a5e-42af-a522-c51a0f5c09bc',
|
|
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"}',
|