centaline-data-driven 1.2.78 → 1.2.81
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 +0 -2
- package/package.json +1 -1
- package/src/Form.vue +5 -4
- package/src/SearchList.vue +9 -3
- package/src/centaline/css/max.css +4 -1
- package/src/centaline/dynamicContact/src/dynamicContact.vue +5 -1
- package/src/centaline/dynamicDetail/src/dynamicContactList.vue +6 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +5 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +5 -1
- package/src/centaline/dynamicForm/index.js +0 -4
- package/src/centaline/dynamicForm/src/dynamicForm.vue +12 -3
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +7 -0
- package/src/centaline/dynamicLayout/src/dynamicLayout.vue +16 -270
- package/src/centaline/dynamicLayout/src/dynamicLayoutChildren.vue +6 -12
- package/src/centaline/dynamicLayout/src/dynamicLayoutImage.vue +55 -6
- package/src/centaline/dynamicLayout/src/dynamicLayoutLabel.vue +11 -7
- package/src/centaline/dynamicLayout/src/dynamicLayoutLine.vue +3 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +206 -6
- package/src/centaline/loader/src/ctl/CellLayout.js +234 -115
- package/src/centaline/loader/src/ctl/Form.js +11 -4
- package/src/centaline/loader/src/ctl/FormList.js +81 -13
- package/src/centaline/loader/src/ctl/RichText.js +3 -0
- package/src/centaline/loader/src/ctl/SearchScreen.js +22 -22
- package/src/centaline/loader/src/ctl/SearchTable.js +215 -8
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +6 -3
- package/src/main.js +6 -3
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
- package/src/centaline/dynamicLabel/index.js +0 -11
- package/src/centaline/dynamicLabel/src/dynamicLabel.vue +0 -73
- package/src/centaline/dynamicLs/index.js +0 -22
- package/src/centaline/dynamicLs/src/dynamicLs.vue +0 -233
|
@@ -3,7 +3,6 @@ const paths = {
|
|
|
3
3
|
"dynamicD": "./src/centaline/dynamicD/index.js",//日期组件
|
|
4
4
|
"dynamicGp": "./src/centaline/dynamicGp/index.js",//分组标签组件
|
|
5
5
|
"dynamicIti": "./src/centaline/dynamicIti/index.js",//数字区域组件
|
|
6
|
-
"dynamicLs": "./src/centaline/dynamicLs/index.js",//表单列表组件
|
|
7
6
|
"dynamicMt": "./src/centaline/dynamicMt/index.js",//多行文本组件
|
|
8
7
|
"dynamicSo": "./src/centaline/dynamicSo/index.js",//单选下拉菜单
|
|
9
8
|
"dynamicSos": "./src/centaline/dynamicSos/index.js",//单选搜索下拉菜单
|
|
@@ -11,7 +10,6 @@ const paths = {
|
|
|
11
10
|
"dynamicT": "./src/centaline/dynamicT/index.js",//文本input组件
|
|
12
11
|
"dynamicL": "./src/centaline/dynamicL/index.js",//文本label组件
|
|
13
12
|
"dynamicTags": "./src/centaline/dynamicTags/index.js",//多选搜索下拉菜单组件
|
|
14
|
-
"dynamicLabel": "./src/centaline/dynamicLabel/index.js",//标签组件
|
|
15
13
|
"dynamicForm": "./src/centaline/dynamicForm/index.js",//表单组件
|
|
16
14
|
"dynamicDrop": "./src/centaline/dynamicDrop/index.js",//快捷下拉输入组件
|
|
17
15
|
"dynamicSearchList": "./src/centaline/dynamicSearchList/index.js",//查询表单组件
|
package/package.json
CHANGED
package/src/Form.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div id="app-form" 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/third-dept-tran/
|
|
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>
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
// apiParam: {headerParam: {}, urlParam: {contractID: "06cad32e-4d0d-4b6f-bd24-16a28629a550", actionType: "0"}}
|
|
18
18
|
// apiParam: {originalTraId: "1475658732246241281", actionType: 2, chanceID: "1"} ,
|
|
19
19
|
// apiParam: {originalTraId: "1516290587463507969", actionType: "3", pageStyle: "2", pageTitle: "成交报告",pageOnly: "true"}
|
|
20
|
-
apiParam:{
|
|
21
|
-
|
|
20
|
+
apiParam:{
|
|
21
|
+
actionType: 3,
|
|
22
|
+
originalTraId: "1526048947277938690",
|
|
22
23
|
pageOnly: true,
|
|
23
24
|
pageStyle: 2,
|
|
24
|
-
|
|
25
|
+
pageTitle: "成交报告"
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
},
|
package/src/SearchList.vue
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
<!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist> -->
|
|
6
6
|
|
|
7
|
-
<ct-searchlist :searchConditionApi="'/
|
|
8
|
-
:searchDataApi="'/
|
|
7
|
+
<ct-searchlist :searchConditionApi="'/api/distribution/agentRelationProperty/getLayoutOfSearch'"
|
|
8
|
+
:searchDataApi="'/api/distribution/agentRelationProperty/list'" :apiParam="para"></ct-searchlist>
|
|
9
9
|
|
|
10
10
|
<!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
|
|
11
11
|
:searchDataApi="'/PropertyRETList/getListOfSearchModel'"
|
|
@@ -25,7 +25,13 @@
|
|
|
25
25
|
name: 'DataDrivenSearch',
|
|
26
26
|
data() {
|
|
27
27
|
return {
|
|
28
|
-
para:{
|
|
28
|
+
para:{
|
|
29
|
+
agentId: "1491335181504401409",
|
|
30
|
+
delegateType: "1",
|
|
31
|
+
estateId: "18721",
|
|
32
|
+
estateName: "凯旋路1798号"
|
|
33
|
+
|
|
34
|
+
},
|
|
29
35
|
// para: {searchFields: {fields: []}, pageAttribute: {pageIndex: 1}, flagSearch: true}
|
|
30
36
|
// para: {publishID: "1503900718229229568"}
|
|
31
37
|
// para: {paramKey: "PropertyStatusID", code: "002.001", name: "盘源状态", paramName: "盘源状态"}
|
|
@@ -245,10 +245,14 @@
|
|
|
245
245
|
};
|
|
246
246
|
self.$common.openDialog(dialogOption);
|
|
247
247
|
}
|
|
248
|
-
else if (field.isFormPageInTab
|
|
248
|
+
else if (field.isFormPageInTab) {// 外部框架tab页打开
|
|
249
249
|
submitData = field.getActionPara(submitData).para;
|
|
250
250
|
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
|
|
251
251
|
}
|
|
252
|
+
else if (field.isSearchPageInTab) {// 外部框架tab页打开
|
|
253
|
+
submitData = field.getActionPara(submitData).para;
|
|
254
|
+
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
255
|
+
}
|
|
252
256
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
253
257
|
submitData = field.getActionPara(submitData).para;
|
|
254
258
|
let query = self.$common.objectToQueryStr(submitData);
|
|
@@ -359,6 +359,7 @@
|
|
|
359
359
|
self.$common.openDialog(dialogOption);
|
|
360
360
|
}
|
|
361
361
|
else if (field.isOpenList) {
|
|
362
|
+
submitData = field.getActionPara(submitData).para;
|
|
362
363
|
var dialogOption = {
|
|
363
364
|
title: field.pageTitle,
|
|
364
365
|
pane: self.$common.getParentPane(self),
|
|
@@ -385,10 +386,14 @@
|
|
|
385
386
|
};
|
|
386
387
|
self.$common.openDialog(dialogOption);
|
|
387
388
|
}
|
|
388
|
-
else if (field.isFormPageInTab
|
|
389
|
+
else if (field.isFormPageInTab) {// 外部框架tab页打开
|
|
389
390
|
submitData = field.getActionPara(submitData).para;
|
|
390
391
|
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
|
|
391
392
|
}
|
|
393
|
+
else if (field.isSearchPageInTab) {// 外部框架tab页打开
|
|
394
|
+
submitData = field.getActionPara(submitData).para;
|
|
395
|
+
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
396
|
+
}
|
|
392
397
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
393
398
|
submitData = field.getActionPara(submitData).para;
|
|
394
399
|
let query = self.$common.objectToQueryStr(submitData);
|
|
@@ -556,10 +556,14 @@
|
|
|
556
556
|
};
|
|
557
557
|
self.$common.openDialog(dialogOption);
|
|
558
558
|
}
|
|
559
|
-
else if (field.isFormPageInTab
|
|
559
|
+
else if (field.isFormPageInTab) {// 外部框架tab页打开
|
|
560
560
|
submitData = field.getActionPara(submitData).para;
|
|
561
561
|
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle, self.model,field.dialogWidth);
|
|
562
562
|
}
|
|
563
|
+
else if (field.isSearchPageInTab) {// 外部框架tab页打开
|
|
564
|
+
submitData = field.getActionPara(submitData).para;
|
|
565
|
+
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
566
|
+
}
|
|
563
567
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
564
568
|
submitData = field.getActionPara(submitData).para;
|
|
565
569
|
let query = self.$common.objectToQueryStr(submitData);
|
|
@@ -365,10 +365,14 @@
|
|
|
365
365
|
};
|
|
366
366
|
self.$common.openDialog(dialogOption);
|
|
367
367
|
}
|
|
368
|
-
else if (field.isFormPageInTab
|
|
368
|
+
else if (field.isFormPageInTab) {// 外部框架tab页打开
|
|
369
369
|
submitData = field.getActionPara(submitData).para;
|
|
370
370
|
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle, self.model,field.dialogWidth);
|
|
371
371
|
}
|
|
372
|
+
else if (field.isSearchPageInTab) {// 外部框架tab页打开
|
|
373
|
+
submitData = field.getActionPara(submitData).para;
|
|
374
|
+
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
375
|
+
}
|
|
372
376
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
373
377
|
submitData = field.getActionPara(submitData).para;
|
|
374
378
|
let query = self.$common.objectToQueryStr(submitData);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import dynamicForm from './src/dynamicForm'
|
|
2
2
|
import dynamicInput from '../dynamicInput/index'
|
|
3
|
-
import dynamicLabel from '../dynamicLabel/index'
|
|
4
|
-
import dynamicLs from '../dynamicLs/index'
|
|
5
3
|
import api from '../api/index'
|
|
6
4
|
import common from '../common/index'
|
|
7
5
|
import validate from '../validate/index'
|
|
@@ -9,8 +7,6 @@ import validate from '../validate/index'
|
|
|
9
7
|
dynamicForm.install = function (Vue) {
|
|
10
8
|
Vue.component(dynamicForm.name, dynamicForm);
|
|
11
9
|
Vue.component(dynamicInput.name, dynamicInput);
|
|
12
|
-
Vue.component(dynamicLabel.name, dynamicLabel);
|
|
13
|
-
Vue.component(dynamicLs.name, dynamicLs);
|
|
14
10
|
|
|
15
11
|
Vue.use(api);
|
|
16
12
|
Vue.use(common);
|
|
@@ -386,10 +386,14 @@
|
|
|
386
386
|
};
|
|
387
387
|
self.$common.openDialog(dialogOption);
|
|
388
388
|
}
|
|
389
|
-
else if (field.isFormPageInTab
|
|
389
|
+
else if (field.isFormPageInTab) {// 外部框架tab页打开
|
|
390
390
|
submitData = field.getActionPara(submitData).para;
|
|
391
391
|
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle,self.model,field.dialogWidth);
|
|
392
392
|
}
|
|
393
|
+
else if (field.isSearchPageInTab) {// 外部框架tab页打开
|
|
394
|
+
submitData = field.getActionPara(submitData).para;
|
|
395
|
+
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
396
|
+
}
|
|
393
397
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
394
398
|
submitData = field.getActionPara(submitData).para;
|
|
395
399
|
let query = self.$common.objectToQueryStr(submitData);
|
|
@@ -401,8 +405,13 @@
|
|
|
401
405
|
}
|
|
402
406
|
else {
|
|
403
407
|
submitData = field.getActionPara(submitData).para;
|
|
404
|
-
field.doAction(submitData, (data) => {
|
|
405
|
-
|
|
408
|
+
field.doAction(submitData, (data) => {
|
|
409
|
+
if(field && field.changeCallBackFunName){
|
|
410
|
+
self.changeCallBackHandler(field, field.changeCallBackFunName, data.content);
|
|
411
|
+
}
|
|
412
|
+
else{
|
|
413
|
+
self.model.doAction(data);
|
|
414
|
+
}
|
|
406
415
|
})
|
|
407
416
|
}
|
|
408
417
|
}
|
|
@@ -30,6 +30,13 @@
|
|
|
30
30
|
<span v-else-if="v.is=='ct-sensitiveeye'">
|
|
31
31
|
<component v-if ref="Fields" :is="v.is" :vmodel="scope.row[v.id]" :vrowmodel="scope.row" :api="model.OptApi"></component>
|
|
32
32
|
</span>
|
|
33
|
+
<!--可点击的列-->
|
|
34
|
+
<!-- <span v-else-if="v.routers" :class="'cell'" style="display: flex;">
|
|
35
|
+
<component v-for="(router, routerIndex) in v.routers" :key="routerIndex" :ref="'router'+router.id+scope.$index" :rowData="scope.row" :rowindex="scope.$index"
|
|
36
|
+
v-if="!router.rightField || !scope.row[router.rightField] || scope.row[router.rightField] == 1"
|
|
37
|
+
:is="router.is" :vmodel="router" :api="model.optionApi" @click="rolRouterClickHandler">
|
|
38
|
+
</component>
|
|
39
|
+
</span> -->
|
|
33
40
|
<ct-span v-else :vmodel="scope.row[v.id]" :rowNum="scope.row.$sourceIndex" ref="FieldsLabel"></ct-span>
|
|
34
41
|
</template>
|
|
35
42
|
</el-table-column>
|
|
@@ -1,292 +1,41 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<el-container :direction="model.orientation" :style="model.styleObject" ref="layoutchildren">
|
|
3
|
+
<component v-for="(item, index) in model.fields" :key="index" :is="item.is" :vmodel="item" :rowindex="rowindex" :forname="forname" :forrowindex="forrowindex" @click="clickHandler"></component>
|
|
4
|
+
</el-container>
|
|
5
5
|
</template>
|
|
6
6
|
<script>
|
|
7
7
|
import dynamicElement from '../../mixins/dynamicElement'
|
|
8
|
+
import dynamicLayoutLabel from './dynamicLayoutLabel.vue';
|
|
9
|
+
import dynamicLayoutLine from './dynamicLayoutLine.vue';
|
|
10
|
+
import dynamicLayoutImage from './dynamicLayoutImage.vue';
|
|
8
11
|
import dynamicLayoutChildren from './dynamicLayoutChildren.vue';
|
|
9
|
-
import common from '../../common';
|
|
10
12
|
export default {
|
|
11
13
|
name: 'ct-layout',
|
|
12
14
|
mixins: [dynamicElement],
|
|
13
15
|
components: {
|
|
16
|
+
'ct-layoutlabel': dynamicLayoutLabel,
|
|
17
|
+
'ct-layoutline': dynamicLayoutLine,
|
|
18
|
+
'ct-layoutimage': dynamicLayoutImage,
|
|
14
19
|
'ct-layoutchildren': dynamicLayoutChildren
|
|
15
20
|
},
|
|
16
21
|
props: {
|
|
17
|
-
api: String,
|
|
18
|
-
cellLayout: String,
|
|
19
22
|
vmodel: Object,
|
|
20
23
|
rowindex: Number,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
apiParam: Object
|
|
24
|
+
forname: String,
|
|
25
|
+
forrowindex: String
|
|
24
26
|
},
|
|
25
27
|
data() {
|
|
26
28
|
return {
|
|
27
|
-
|
|
29
|
+
forindex: 0
|
|
28
30
|
};
|
|
29
31
|
},
|
|
30
32
|
created() {
|
|
31
|
-
this.
|
|
33
|
+
this.model = this.loaderObj.CellLayout(this.vmodel);
|
|
32
34
|
},
|
|
33
35
|
methods: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.loading = true;
|
|
38
|
-
this.$nextTick(function () {
|
|
39
|
-
if (typeof self.api !== 'undefined') {
|
|
40
|
-
self.loaderObj.CellLayout(self.api, self.load, this.apiParam, self.failLoad);
|
|
41
|
-
}
|
|
42
|
-
else if (typeof self.vmodel !== 'undefined') {
|
|
43
|
-
self.load(self.vmodel, self.cellLayout);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
failLoad() {
|
|
48
|
-
this.$emit('failLoad', this.model);
|
|
49
|
-
},
|
|
50
|
-
load(data, cellLayout) {
|
|
51
|
-
var str = '';
|
|
52
|
-
if (typeof data !== 'undefined') {
|
|
53
|
-
str = cellLayout.replace(/\{\{(.+?)\}\}/g, (...args) => {
|
|
54
|
-
return this.getValue(data, args[1])
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
var xmlDOM = this.loadXML(str);
|
|
58
|
-
this.Layout = this.xmlToJson(xmlDOM.childNodes[0]);
|
|
59
|
-
this.loading = false;
|
|
60
|
-
},
|
|
61
|
-
getValue(data,val) {
|
|
62
|
-
return val.split('.').reduce((data, currentVal) => {
|
|
63
|
-
return data[currentVal]
|
|
64
|
-
}, data)
|
|
65
|
-
},
|
|
66
|
-
loadXML(xmlString) {
|
|
67
|
-
if (document.all) {
|
|
68
|
-
var xmlDom = new ActiveXObject("Microsoft.XMLDOM");
|
|
69
|
-
xmlDom.loadXML(xmlString)
|
|
70
|
-
return xmlDom
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
return new DOMParser().parseFromString(xmlString, "text/xml");
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
xmlToJson(xml) {
|
|
78
|
-
// Create the return object
|
|
79
|
-
var obj = {};
|
|
80
|
-
if (xml.nodeType == 1) { // element
|
|
81
|
-
// do attributes
|
|
82
|
-
if (xml.attributes.length > 0) {
|
|
83
|
-
for (var j = 0; j < xml.attributes.length; j++) {
|
|
84
|
-
var attribute = xml.attributes.item(j);
|
|
85
|
-
obj[attribute.nodeName] = attribute.nodeValue;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (xml.nodeName.toLowerCase() == "Layout".toLowerCase() || xml.nodeName.toLowerCase() == "StackLayout".toLowerCase()) {
|
|
90
|
-
obj["is"] = "ct-layoutchildren";
|
|
91
|
-
}
|
|
92
|
-
else if (xml.nodeName.toLowerCase() == "Label".toLowerCase()) {
|
|
93
|
-
obj["is"] = "ct-layoutlabel";
|
|
94
|
-
}
|
|
95
|
-
else if (xml.nodeName.toLowerCase() == "Line".toLowerCase()) {
|
|
96
|
-
obj["is"] = "ct-layoutline";
|
|
97
|
-
}
|
|
98
|
-
else if (xml.nodeName.toLowerCase() == "Image".toLowerCase()) {
|
|
99
|
-
obj["is"] = "ct-layoutimage";
|
|
100
|
-
}
|
|
101
|
-
obj["type"] = xml.nodeName;
|
|
102
|
-
// do children
|
|
103
|
-
if (xml.hasChildNodes()) {
|
|
104
|
-
for (var i = 0; i < xml.childNodes.length; i++) {
|
|
105
|
-
var item = xml.childNodes.item(i);
|
|
106
|
-
var nodeName = item.nodeName;
|
|
107
|
-
if (typeof (obj["fields"]) == "undefined") {
|
|
108
|
-
obj["fields"] = [];
|
|
109
|
-
obj["fields"].push(this.xmlToJson(item));
|
|
110
|
-
} else {
|
|
111
|
-
if (typeof (obj["fields"].push) == "undefined") {
|
|
112
|
-
var old = obj["fields"];
|
|
113
|
-
obj["fields"] = [];
|
|
114
|
-
obj["fields"].push(old);
|
|
115
|
-
}
|
|
116
|
-
obj["fields"].push(this.xmlToJson(item));
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
return obj;
|
|
121
|
-
},
|
|
122
|
-
rolRouterClickHandler(routerKey, rowindex) {
|
|
123
|
-
var self = this;
|
|
124
|
-
var submitData = {};
|
|
125
|
-
var rowData = self.vmodel;
|
|
126
|
-
var actionRouter = self.actionRouter;
|
|
127
|
-
debugger
|
|
128
|
-
let field = actionRouter.find(b => {
|
|
129
|
-
return b.id === routerKey;
|
|
130
|
-
});
|
|
131
|
-
field.submitListField.forEach((k) => {
|
|
132
|
-
submitData[k] = rowData[k];
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
let action = field.action;
|
|
136
|
-
if (field.actionField) {
|
|
137
|
-
action = rowData[field.actionField];
|
|
138
|
-
}
|
|
139
|
-
this.routerClickHandler(field, submitData, action);
|
|
140
|
-
},
|
|
141
|
-
routerClickHandler(field, submitData, action) {
|
|
142
|
-
let self = this;
|
|
143
|
-
action = action || field.action;
|
|
144
|
-
|
|
145
|
-
var clickAcion = function () {
|
|
146
|
-
//若不是客户端方法,则直接访问接口
|
|
147
|
-
if (!field.isClientFuntion) {
|
|
148
|
-
// 外部框架tab页打开
|
|
149
|
-
if (field.isFormPageInTab || field.isSearchPageInTab) {
|
|
150
|
-
submitData = field.getActionPara(submitData).para;
|
|
151
|
-
if (field.pageStyle) {
|
|
152
|
-
submitData.pageStyle = field.pageStyle;
|
|
153
|
-
}
|
|
154
|
-
self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model, field.dialogWidth);
|
|
155
|
-
}
|
|
156
|
-
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
157
|
-
submitData = field.getActionPara(submitData).para;
|
|
158
|
-
let query = self.$common.objectToQueryStr(submitData);
|
|
159
|
-
window.open(action + query, "_blank");
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
//self.operationLoading = true;
|
|
163
|
-
|
|
164
|
-
//Form
|
|
165
|
-
if (field.isOpenForm) {
|
|
166
|
-
var dialogOption = {
|
|
167
|
-
title: field.pageTitle,
|
|
168
|
-
pane: self.$common.getParentPane(self),
|
|
169
|
-
content: [{
|
|
170
|
-
component: field.navToNewPageName,
|
|
171
|
-
attrs: {
|
|
172
|
-
//source: data.content,
|
|
173
|
-
api: action,
|
|
174
|
-
apiParam: field.getActionPara(submitData).para,
|
|
175
|
-
showTitle: false,
|
|
176
|
-
width: field.dialogWidth + 'px',
|
|
177
|
-
height: field.dialogHeight + 'px'
|
|
178
|
-
},
|
|
179
|
-
on: {
|
|
180
|
-
submit(ev) {
|
|
181
|
-
if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
|
|
182
|
-
self.model.doAction(ev);
|
|
183
|
-
}
|
|
184
|
-
self.$forceUpdate();
|
|
185
|
-
self.$refs.footer.$forceUpdate();
|
|
186
|
-
self.$common.closeDialog(dialogOption.dialog);
|
|
187
|
-
self.updateCurrentRow(field, ev);
|
|
188
|
-
},
|
|
189
|
-
refreshParent() {
|
|
190
|
-
self.getPage(1);
|
|
191
|
-
self.$common.closeDialog(dialogOption.dialog);
|
|
192
|
-
},
|
|
193
|
-
closeDialog() {
|
|
194
|
-
self.updateCurrentRow(field);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}]
|
|
198
|
-
};
|
|
199
|
-
self.$common.openDialog(dialogOption);
|
|
200
|
-
}
|
|
201
|
-
//SearchList
|
|
202
|
-
else if (field.isOpenList) {
|
|
203
|
-
var dialogOption = {
|
|
204
|
-
title: field.pageTitle,
|
|
205
|
-
pane: self.$common.getParentPane(self),
|
|
206
|
-
content: [{
|
|
207
|
-
component: field.navToNewPageName,
|
|
208
|
-
attrs: {
|
|
209
|
-
searchConditionApi: field.actionForSearchLayout,
|
|
210
|
-
searchDataApi: field.actionForSearch,
|
|
211
|
-
apiParam: submitData,
|
|
212
|
-
width: field.dialogWidth + 'px',
|
|
213
|
-
height: field.dialogHeight + 'px'
|
|
214
|
-
},
|
|
215
|
-
on: {
|
|
216
|
-
refreshParent() {
|
|
217
|
-
self.getPage(1);
|
|
218
|
-
self.$common.closeDialog(dialogOption.dialog);
|
|
219
|
-
},
|
|
220
|
-
closeDialog() {
|
|
221
|
-
self.updateCurrentRow(field);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}]
|
|
225
|
-
};
|
|
226
|
-
self.$common.openDialog(dialogOption);
|
|
227
|
-
}
|
|
228
|
-
//Tabs
|
|
229
|
-
else if (field.isOpenTabs) {
|
|
230
|
-
var dialogOption = {
|
|
231
|
-
title: field.pageTitle,
|
|
232
|
-
pane: self.$common.getParentPane(self),
|
|
233
|
-
content: [{
|
|
234
|
-
component: field.navToNewPageName,
|
|
235
|
-
attrs: {
|
|
236
|
-
searchConditionApi: field.actionForSearchLayout,
|
|
237
|
-
searchDataApi: field.actionForSearch,
|
|
238
|
-
apiParam: submitData,
|
|
239
|
-
width: field.dialogWidth + 'px',
|
|
240
|
-
height: field.dialogHeight + 'px'
|
|
241
|
-
},
|
|
242
|
-
on: {
|
|
243
|
-
}
|
|
244
|
-
}]
|
|
245
|
-
};
|
|
246
|
-
self.$common.openDialog(dialogOption);
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
self.operationLoading = true;
|
|
250
|
-
field.doAction(submitData, (data) => {
|
|
251
|
-
self.operationLoading = false;
|
|
252
|
-
if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
|
|
253
|
-
self.model.doAction({ responseData: data });
|
|
254
|
-
}
|
|
255
|
-
self.$forceUpdate();
|
|
256
|
-
self.$refs.footer.$forceUpdate();
|
|
257
|
-
self.updateCurrentRow(field, data);
|
|
258
|
-
})
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
//执行客户端脚本
|
|
263
|
-
else {
|
|
264
|
-
// let parm={submitData:submitData,field:field}
|
|
265
|
-
// self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
|
|
266
|
-
let title = field.pageTitle == undefined ? field.label : field.pageTitle;
|
|
267
|
-
submitData.actionType = field.actionType;
|
|
268
|
-
var fun = self.$common.getDataDrivenOpts().handler[action];
|
|
269
|
-
fun(submitData, title, self.model);
|
|
270
|
-
// var fun = self.model.scripts.formData[action];
|
|
271
|
-
// fun(submitData,field);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
if (field.alert) {
|
|
276
|
-
self.$common.confirm(field.alertMsg, field.alertCaption, {
|
|
277
|
-
confirmButtonText: field.alertOKButtonText,
|
|
278
|
-
cancelButtonText: field.alertCancelButtonText,
|
|
279
|
-
//type: 'warning'
|
|
280
|
-
center: field.alertCenter
|
|
281
|
-
}).then(() => {
|
|
282
|
-
clickAcion();
|
|
283
|
-
}).catch(() => {
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
clickAcion();
|
|
288
|
-
}
|
|
289
|
-
},
|
|
36
|
+
clickHandler(routerKey, rowindex, forname, forrowindex) {
|
|
37
|
+
this.$emit('click', routerKey, rowindex, forname, forrowindex);
|
|
38
|
+
}
|
|
290
39
|
},
|
|
291
40
|
mounted() {
|
|
292
41
|
|
|
@@ -294,7 +43,4 @@
|
|
|
294
43
|
}
|
|
295
44
|
</script>
|
|
296
45
|
<style>
|
|
297
|
-
.ct-Layout {
|
|
298
|
-
font-size: 12px;
|
|
299
|
-
}
|
|
300
46
|
</style>
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-container :direction="model.orientation" :style="model.styleObject">
|
|
3
|
-
<
|
|
3
|
+
<ct-layout v-for="(item, index) in model.fields" :key="index" :rowindex="rowindex" :forrowindex="model.forrowindex" :vmodel="item" :forname="model.forname" @click="clickHandler"></ct-layout>
|
|
4
4
|
</el-container>
|
|
5
5
|
</template>
|
|
6
6
|
<script>
|
|
7
7
|
import dynamicElement from '../../mixins/dynamicElement'
|
|
8
|
-
import dynamicLayoutLabel from './dynamicLayoutLabel.vue';
|
|
9
|
-
import dynamicLayoutLine from './dynamicLayoutLine.vue';
|
|
10
|
-
import dynamicLayoutImage from './dynamicLayoutImage.vue';
|
|
11
8
|
export default {
|
|
12
9
|
name: 'ct-layoutchildren',
|
|
13
10
|
mixins: [dynamicElement],
|
|
14
11
|
components: {
|
|
15
|
-
'ct-
|
|
16
|
-
'ct-layoutline': dynamicLayoutLine,
|
|
17
|
-
'ct-layoutimage': dynamicLayoutImage
|
|
12
|
+
'ct-layout': () => import('./dynamicLayout.vue'),
|
|
18
13
|
},
|
|
19
14
|
props: {
|
|
20
15
|
vmodel: Object,
|
|
@@ -22,16 +17,16 @@
|
|
|
22
17
|
},
|
|
23
18
|
data() {
|
|
24
19
|
return {
|
|
25
|
-
|
|
20
|
+
forname: '',
|
|
21
|
+
forwindex: 0
|
|
26
22
|
};
|
|
27
23
|
},
|
|
28
24
|
created() {
|
|
29
25
|
this.model = this.loaderObj.CellLayout(this.vmodel);
|
|
30
|
-
|
|
31
26
|
},
|
|
32
27
|
methods: {
|
|
33
|
-
clickHandler(routerKey, rowindex) {
|
|
34
|
-
this.$emit('click', routerKey, rowindex);
|
|
28
|
+
clickHandler(routerKey, rowindex, forname, forrowindex) {
|
|
29
|
+
this.$emit('click', routerKey, rowindex, forname, forrowindex);
|
|
35
30
|
}
|
|
36
31
|
},
|
|
37
32
|
mounted() {
|
|
@@ -40,5 +35,4 @@
|
|
|
40
35
|
}
|
|
41
36
|
</script>
|
|
42
37
|
<style>
|
|
43
|
-
|
|
44
38
|
</style>
|