centaline-data-driven 1.3.28 → 1.3.29
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 +4 -4
- package/src/SearchList.vue +2 -3
- package/src/centaline/dynamicForm/src/dynamicForm.vue +2 -2
- package/src/centaline/dynamicSearchList/src/dynamicTableToolbar.vue +76 -41
- package/src/centaline/loader/src/ctl/Form.js +20 -13
- package/src/centaline/loader/src/ctl/Router.js +4 -2
- package/src/main.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js +1 -1
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
package/src/Form.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
3
|
<!-- <ct-form :api="'/PropertyRET/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
|
|
4
4
|
<!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
|
|
5
|
-
<ct-form :api="'/api/
|
|
5
|
+
<ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form>
|
|
6
6
|
<!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
|
|
7
7
|
<ct-dialog-list></ct-dialog-list>
|
|
8
8
|
</div>
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
data() {
|
|
15
15
|
return {
|
|
16
16
|
apiParam:{
|
|
17
|
-
actionType:
|
|
18
|
-
|
|
17
|
+
actionType: 3,
|
|
18
|
+
originalTraId: "1547488795469586434",
|
|
19
19
|
pageOnly: true,
|
|
20
20
|
pageStyle: 2,
|
|
21
|
-
|
|
21
|
+
pageTitle: "成交报告"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
},
|
package/src/SearchList.vue
CHANGED
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
:searchCategoryApi="'/ProfileWorklistList/getLayoutOfSearchCategory'"
|
|
9
9
|
:searchDataApi="'/ProfileWorklistList/getListOfSearchModel'" :apiParam="para"></ct-searchlist> -->
|
|
10
10
|
|
|
11
|
-
<ct-searchlist :searchConditionApi="'/
|
|
12
|
-
:
|
|
13
|
-
:searchDataApi="'/ProfileWorklistList/getListOfSearchModel'">
|
|
11
|
+
<ct-searchlist :searchConditionApi="'/PropertyContactImportList/getLayoutOfSearch'"
|
|
12
|
+
:searchDataApi="'/PropertyContactImportList/getListOfSearchModel'">
|
|
14
13
|
</ct-searchlist>
|
|
15
14
|
|
|
16
15
|
<!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
|
|
@@ -594,7 +594,7 @@
|
|
|
594
594
|
var rtnBool = true;
|
|
595
595
|
var jump = false;
|
|
596
596
|
var i=0;
|
|
597
|
-
|
|
597
|
+
|
|
598
598
|
self.$refs.Fields.forEach((f) => {
|
|
599
599
|
if (f.model && typeof f.validExcute !== 'undefined') {
|
|
600
600
|
if (!f.validExcute()) {
|
|
@@ -620,7 +620,7 @@
|
|
|
620
620
|
|
|
621
621
|
if (!jump) {
|
|
622
622
|
if (this.model.isHorizontalLayout) {//水平布局
|
|
623
|
-
this.activeName = f.model.collapseName.toString();
|
|
623
|
+
this.activeName = f.model.collapseName.toString()==='-1'?self.activeName:f.model.collapseName.toString();
|
|
624
624
|
jump = true;
|
|
625
625
|
}
|
|
626
626
|
else {//垂直布局
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ct-tableToolbar" style="width:100%;" v-if="buttons && buttons.length > 0">
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
|
|
4
|
+
<div v-if="buttonsLeft&&buttonsLeft.length>0" class="bool_btn_l">
|
|
5
|
+
<ul>
|
|
6
|
+
<li v-for="btn in buttonsLeft" class="ct-ToolbarButton max-ToolbarButton" :class="{btn_r:btn.isRight}">
|
|
5
7
|
<component :is="btn.is" :vmodel="btn"
|
|
6
8
|
@click="clickHandler(btn,$event)"
|
|
7
9
|
@importComplete="importComplete"
|
|
@@ -9,53 +11,86 @@
|
|
|
9
11
|
:optionApi="optionApi"
|
|
10
12
|
:fileData="getFileData(btn)"></component>
|
|
11
13
|
</li>
|
|
12
|
-
|
|
14
|
+
</ul>
|
|
15
|
+
</div>
|
|
16
|
+
<div v-if="buttonsright&&buttonsright.length>0" class="bool_btn_r">
|
|
17
|
+
<ul>
|
|
18
|
+
<li v-for="btn in buttonsright" class="ct-ToolbarButton max-ToolbarButton" :class="{btn_r:btn.isRight}">
|
|
19
|
+
<component :is="btn.is" :vmodel="btn"
|
|
20
|
+
@click="clickHandler(btn,$event)"
|
|
21
|
+
@importComplete="importComplete"
|
|
22
|
+
v-if="btn.show"
|
|
23
|
+
:optionApi="optionApi"
|
|
24
|
+
:fileData="getFileData(btn)"></component>
|
|
25
|
+
</li>
|
|
26
|
+
</ul>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
|
|
13
30
|
</div>
|
|
14
31
|
</template>
|
|
15
32
|
<script>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
export default {
|
|
34
|
+
name: "ctTableToolbar",
|
|
35
|
+
props: {
|
|
36
|
+
buttons: Array,
|
|
37
|
+
searchModel: Object,
|
|
38
|
+
optionApi: String
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
buttonsLeft: [],
|
|
43
|
+
buttonsright: []
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
created() {
|
|
47
|
+
this.buttons.forEach(v => {
|
|
48
|
+
if (v.isRight) {
|
|
49
|
+
this.buttonsright.push(v);
|
|
50
|
+
} else {
|
|
51
|
+
this.buttonsLeft.push(v);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
clickHandler(btn, ev) {
|
|
57
|
+
this.$emit("click", btn);
|
|
25
58
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.$emit('click', btn);
|
|
29
|
-
},
|
|
30
|
-
getFileData(btn) {
|
|
31
|
-
if (btn.flagAttachSearchCondition) {
|
|
32
|
-
return this.searchModel ? this.searchModel.searchData : {};
|
|
33
|
-
}
|
|
59
|
+
getFileData(btn) {
|
|
60
|
+
if (btn.flagAttachSearchCondition) {
|
|
34
61
|
return this.searchModel ? this.searchModel.searchData : {};
|
|
35
|
-
},
|
|
36
|
-
importComplete(res) {
|
|
37
|
-
this.$emit('importComplete', res);
|
|
38
62
|
}
|
|
63
|
+
return this.searchModel ? this.searchModel.searchData : {};
|
|
64
|
+
},
|
|
65
|
+
importComplete(res) {
|
|
66
|
+
this.$emit("importComplete", res);
|
|
39
67
|
}
|
|
40
68
|
}
|
|
69
|
+
};
|
|
41
70
|
</script>
|
|
42
71
|
<style>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
72
|
+
.ct-tableToolbar {
|
|
73
|
+
width: 100%;
|
|
74
|
+
position: relative;
|
|
75
|
+
float: left;
|
|
76
|
+
padding: 0 5px 10px 0px;
|
|
77
|
+
background-color: #fff;
|
|
78
|
+
border-radius: 6px;
|
|
79
|
+
}
|
|
80
|
+
.ct-tableToolbar ul {
|
|
81
|
+
list-style: none; /* 去掉ul前面的符号 */
|
|
82
|
+
margin: 0px; /* 与外界元素的距离为0 */
|
|
83
|
+
padding: 0px; /* 与内部元素的距离为0 */
|
|
84
|
+
width: auto; /* 宽度根据元素内容调整 */
|
|
85
|
+
}
|
|
86
|
+
.ct-tableToolbar ul li {
|
|
87
|
+
margin-right: 5px;
|
|
88
|
+
float: left; /* 向左漂移,将竖排变为横排 */
|
|
89
|
+
}
|
|
90
|
+
.bool_btn_l {
|
|
91
|
+
float: left !important;
|
|
92
|
+
}
|
|
93
|
+
.bool_btn_r {
|
|
94
|
+
float: right !important;
|
|
95
|
+
}
|
|
61
96
|
</style>
|
|
@@ -295,8 +295,8 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
295
295
|
}
|
|
296
296
|
//正在编辑的行
|
|
297
297
|
else if (rowNum === null && listData.currentRowIndex === 0) {
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
let fields = listData.currentRow.data;
|
|
299
|
+
field = fields[fiedlId];
|
|
300
300
|
}
|
|
301
301
|
//源数据
|
|
302
302
|
else {
|
|
@@ -306,17 +306,18 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
306
306
|
|
|
307
307
|
if (rowNum === 0 || (rowNum && fiedlId)) {
|
|
308
308
|
try {
|
|
309
|
-
|
|
309
|
+
let fields = listData.rows[rowNum].field;
|
|
310
310
|
field = fields.find((v) => {
|
|
311
311
|
return v.id === fiedlId;
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
catch (e) {
|
|
315
|
+
if (listData.rows.length <= rowNum) {
|
|
315
316
|
var checkMsg = "获取列表行索引超出界限";
|
|
316
317
|
this.message(checkMsg);
|
|
317
|
-
|
|
318
|
-
}
|
|
318
|
+
}
|
|
319
319
|
}
|
|
320
|
+
}
|
|
320
321
|
}
|
|
321
322
|
|
|
322
323
|
return { listData: listData, field: field };
|
|
@@ -350,13 +351,19 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
350
351
|
//若该行正在编辑,则取编辑状态的。
|
|
351
352
|
if (data && data.listData && data.listData.currentRow.data && data.listData.currentRow.data[fiedlId]
|
|
352
353
|
&& data.listData.currentRow.data.$sourceIndex === rowNum && data.listData.currentRow.isSet) {
|
|
353
|
-
|
|
354
|
+
if(fiedlId=='deleted' || fiedlId=='flagDeleted'){
|
|
355
|
+
return data.listData.currentRow.data.deleted || false;
|
|
356
|
+
}
|
|
357
|
+
return data.listData.currentRow.data[fiedlId].source[attrName];
|
|
354
358
|
}
|
|
355
359
|
else if (data && data.field) {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
+
if (typeof defaultValue !== 'undefined' && data.listData.rows[rowNum].deleted) {//若该行被删除时,则直接返回默认值
|
|
361
|
+
return defaultValue;
|
|
362
|
+
}
|
|
363
|
+
return data.field.source[attrName];
|
|
364
|
+
}
|
|
365
|
+
else if (data && (fiedlId=='deleted' || fiedlId=='flagDeleted')) {
|
|
366
|
+
return data.listData.rows[rowNum].deleted || false;
|
|
360
367
|
}
|
|
361
368
|
},
|
|
362
369
|
getListFieldValueFromParent(tableName, rowNum, fiedlId, attrName, defaultValue) {
|
|
@@ -267,8 +267,7 @@ const Router = function (source) {
|
|
|
267
267
|
}).catch((ex) => {
|
|
268
268
|
callback(ex); //里面需要有data.rtnCode === 200的处理
|
|
269
269
|
});
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
270
|
+
} else {
|
|
272
271
|
callback({
|
|
273
272
|
rtnCode: Enum.ReturnCode.Successful
|
|
274
273
|
});
|
|
@@ -351,6 +350,9 @@ const Router = function (source) {
|
|
|
351
350
|
get align() {
|
|
352
351
|
return source.align;
|
|
353
352
|
},
|
|
353
|
+
get isRight() {
|
|
354
|
+
return Enum.HalignType.Right == source.align;
|
|
355
|
+
},
|
|
354
356
|
};
|
|
355
357
|
return rtn;
|
|
356
358
|
}
|
package/src/main.js
CHANGED
|
@@ -14,9 +14,9 @@ Vue.config.productionTip = false;
|
|
|
14
14
|
Vue.use(centaline, {
|
|
15
15
|
baseUrl: "http://10.88.22.46:7070/v1/form/router",
|
|
16
16
|
// baseUrl: "http://10.88.23.22:9999/v1/form/router",
|
|
17
|
-
baseUrl: "http://10.88.22.69:8080/",
|
|
18
17
|
// baseUrl: "http://tjcptest.centaline.com.cn/",
|
|
19
|
-
|
|
18
|
+
// baseUrl: "http://10.88.22.69:8080/",
|
|
19
|
+
// flagRouterSelf: true,
|
|
20
20
|
zindex: 999,
|
|
21
21
|
showRequestSuccessMessage: true,
|
|
22
22
|
showRequestErrorMessage: true,
|
|
@@ -41,7 +41,7 @@ Vue.use(centaline, {
|
|
|
41
41
|
// 获取请求头
|
|
42
42
|
getRequestHeaders: function () {
|
|
43
43
|
return {
|
|
44
|
-
oldToken: '
|
|
44
|
+
oldToken: '0e5e2554-abe0-4538-8520-e024f82389b3',
|
|
45
45
|
originalRequestURL: 'http://10.88.22.67:8080',
|
|
46
46
|
EstateInfo: ' {"estateId":"201703020943128D8A8FCF463E4016D6","estateName":"%E4%B8%87%E7%A7%91%E4%BA%91%E5%9F%8E"}',
|
|
47
47
|
Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjYzMzZiMDJiLTZjOGEtNDIzNC05MGQ5LTliYWI2MTIyNTQzNyJ9.hOxMvGLm03QMPu9C4lgRzkEHC7ECqxJ_L6mfqQRqv39xJ42I8gzSRO-E68vWp-A99ewnxnqvTZ6H_6fOQ9DljQ',
|