centaline-data-driven 1.2.71 → 1.2.74
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 +1 -0
- package/package.json +1 -1
- package/src/Form.vue +2 -2
- package/src/SearchList.vue +4 -4
- package/src/assets/more.png +0 -0
- package/src/centaline/dynamicBtn/src/dynamicBtn.vue +1 -1
- package/src/centaline/dynamicContact/src/dynamicContact.vue +4 -4
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +8 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +29 -19
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +52 -22
- package/src/centaline/dynamicForm/src/dynamicForm.vue +50 -11
- package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +2 -6
- package/src/centaline/dynamicLayout/index.js +11 -0
- package/src/centaline/dynamicLayout/src/dynamicLayout.vue +311 -0
- package/src/centaline/dynamicLayout/src/dynamicLayoutChildren.vue +44 -0
- package/src/centaline/dynamicLayout/src/dynamicLayoutImage.vue +39 -0
- package/src/centaline/dynamicLayout/src/dynamicLayoutLabel.vue +55 -0
- package/src/centaline/dynamicLayout/src/dynamicLayoutLine.vue +29 -0
- package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +21 -5
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +60 -37
- package/src/centaline/dynamicSearchList/src/dynamicTableStats.vue +4 -0
- package/src/centaline/dynamicT/src/dynamicT.vue +2 -0
- package/src/centaline/formData/index.js +46 -28
- package/src/centaline/loader/src/ctl/Button.js +3 -0
- package/src/centaline/loader/src/ctl/CellLayout.js +135 -0
- package/src/centaline/loader/src/ctl/Form.js +318 -3
- package/src/centaline/loader/src/ctl/FormList.js +69 -11
- package/src/centaline/loader/src/ctl/SearchTable.js +132 -127
- package/src/centaline/loader/src/ctl.js +1 -0
- package/src/centaline/selectOption/src/selectOptionVertical.vue +8 -0
- package/src/main.js +6 -6
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -45,6 +45,7 @@ const paths = {
|
|
|
45
45
|
"dynamicRepeat": "./src/centaline/dynamicRepeat/index.js",//重复控件
|
|
46
46
|
"dynamicCompound": "./src/centaline/dynamicCompound/index.js",//复合控件
|
|
47
47
|
"dynamicContact": "./src/centaline/dynamicContact/index.js",//联系人电话
|
|
48
|
+
"dynamicLayout": "./src/centaline/dynamicLayout/index.js",//Layout组件
|
|
48
49
|
},
|
|
49
50
|
"plugs": {
|
|
50
51
|
"api": "./src/centaline/api/index.js",//调用API插件
|
package/package.json
CHANGED
package/src/Form.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-form" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
|
-
<ct-form :api="'/salematter/
|
|
3
|
+
<ct-form :api="'/salematter/squareupload/readDetail'" :apiParam="apiParam"></ct-form>
|
|
4
4
|
<!-- <ct-form :api="'/PropertyRET/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
|
|
5
5
|
<!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
|
|
6
6
|
<!-- <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form> -->
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// apiParam: {headerParam: {}, urlParam: {contractID: "06cad32e-4d0d-4b6f-bd24-16a28629a550", actionType: "0"}}
|
|
19
19
|
// apiParam: {originalTraId: "1475658732246241281", actionType: 2, chanceID: "1"} ,
|
|
20
20
|
// apiParam: {originalTraId: "1516290587463507969", actionType: "3", pageStyle: "2", pageTitle: "成交报告",pageOnly: "true"}
|
|
21
|
-
apiParam:{
|
|
21
|
+
apiParam:{"actionType":2,"jsonData":{}}
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
methods: {
|
package/src/SearchList.vue
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
<!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist> -->
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
:searchDataApi="'/
|
|
7
|
+
<ct-searchlist :searchConditionApi="'/salemattersmanage/squareuploadlist/getLayoutOfSearch'"
|
|
8
|
+
:searchDataApi="'/salemattersmanage/squareuploadlist/getList'"></ct-searchlist>
|
|
9
9
|
|
|
10
|
-
<ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
|
|
10
|
+
<!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
|
|
11
11
|
:searchDataApi="'/PropertyRETList/getListOfSearchModel'"
|
|
12
12
|
:searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"
|
|
13
13
|
:searchStatsApi="'/exampleList/getListStats'"
|
|
14
|
-
></ct-searchlist>
|
|
14
|
+
></ct-searchlist> -->
|
|
15
15
|
|
|
16
16
|
<!--<ct-searchlist :searchConditionApi="'/api/invoice-info/search-condition'" :searchDataApi="'/api/invoice-info/list'" :searchDataStatisticsApi="'api/ContractList/GetLayoutOfStatisticsTool'" :apiParam="para"></ct-searchlist>-->
|
|
17
17
|
<!-- <ct-searchlist :searchConditionApi="'/PropertyStatusList/getLayoutOfSearch'" :searchDataApi="'/PropertyStatusList/getListOfSearchModel'" :apiParam="para"></ct-searchlist> -->
|
|
Binary file
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
<div ref="contact" v-if="apiRouter!=={} && model && model.listData.length>0"
|
|
3
3
|
style="border: 1px solid #ECEFF2;box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06);border-radius: 6px;
|
|
4
4
|
padding-bottom: 10px;padding-top: 10px;padding-left: 10px;display: flex;font-size: 12px;width:100%">
|
|
5
|
-
<div class="ct-so" style="width:auto;margin-right: 10px;">
|
|
5
|
+
<div class="ct-so" style="width:auto;margin-right: 10px;flex:1">
|
|
6
6
|
<el-popover ref="pop" placement="bottom-start" v-model="showDrop" trigger="click">
|
|
7
7
|
<div>
|
|
8
8
|
<ctSelectOptionVertical :model="model" @click="selectOption($event)"></ctSelectOptionVertical>
|
|
9
9
|
</div>
|
|
10
10
|
<div slot="reference" readonly="readonly" ref="ct-input"
|
|
11
11
|
style="font-weight: Bold;color:#333333 !important;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: flex;"
|
|
12
|
-
:style="{height:inputHeight + 'px','line-height':inputLineHeight + 'px',width:
|
|
12
|
+
:style="{height:inputHeight + 'px','line-height':inputLineHeight + 'px',width:'auto'}"
|
|
13
13
|
@focus="focusHandle" @blur="blurHandle" @click="clickHandle" @input="inputHandler($event)" v-html="model.text"
|
|
14
14
|
@change="changeHandler($event)" :disabled="model.lock" :class="model.lock ? 'ct-is-disabled' : 'ct-input_inner'"></div>
|
|
15
15
|
</el-popover>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</span>
|
|
20
20
|
</span>
|
|
21
21
|
</div>
|
|
22
|
-
<div ref="routers" style="margin-
|
|
22
|
+
<div ref="routers" style="margin-right: 5px;display: flex;">
|
|
23
23
|
<component v-for="(router, index) in model.rowRouter" :key="index" :ref="'router'+router.id"
|
|
24
24
|
v-if="!router.rightField || model.listData[model.value][router.rightField] == 1"
|
|
25
25
|
:is="router.is" :vmodel="router" :api="model.optionApi" @click="fieldClickHandler(router)">
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
if (this.$refs.contact) {
|
|
304
304
|
var w1 = this.$refs.contact.clientWidth | 0;
|
|
305
305
|
var w2 = this.$refs.routers.clientWidth | 0;
|
|
306
|
-
this.inputLinewidth=w1-w2-
|
|
306
|
+
this.inputLinewidth=w1-w2-80;
|
|
307
307
|
}
|
|
308
308
|
});
|
|
309
309
|
},
|
|
@@ -787,8 +787,15 @@
|
|
|
787
787
|
}
|
|
788
788
|
.expand-f {
|
|
789
789
|
line-height: 15px;
|
|
790
|
-
font-size:
|
|
790
|
+
font-size: 16px;
|
|
791
791
|
font-weight: bold;
|
|
792
|
+
img{
|
|
793
|
+
width: 15px!important;
|
|
794
|
+
margin-left: 0!important;
|
|
795
|
+
}
|
|
796
|
+
span{
|
|
797
|
+
float:right;
|
|
798
|
+
}
|
|
792
799
|
}
|
|
793
800
|
.info-conten {
|
|
794
801
|
display: flex;
|
|
@@ -29,9 +29,12 @@
|
|
|
29
29
|
<div>
|
|
30
30
|
<component v-if="model.otherTradeActionRouter!==null" v-bind="model.otherTradeActionRouter" class="max-default w93"
|
|
31
31
|
:is="model.otherTradeActionRouter.is" :vmodel="model.otherTradeActionRouter" :api="model.optionApi" @click="fieldClickHandler(model.otherTradeActionRouter,$event)"></component>
|
|
32
|
-
<img
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
<img v-if="parentModel && parentModel.$refs && parentModel.$refs.table"
|
|
33
|
+
:class="{'domDisabled':parentModel && parentModel.$refs.table && parentModel.$refs.table.model.selectIndex<=0}"
|
|
34
|
+
@click="clickPrevHandler" src="../../../assets/T.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left: 20px;cursor: pointer">
|
|
35
|
+
<img v-if="parentModel && parentModel.$refs && parentModel.$refs.table"
|
|
36
|
+
:class="{'domDisabled':parentModel && parentModel.$refs.table && parentModel.$refs.table.model.listData && parentModel.$refs.table.model.selectIndex===parentModel.$refs.table.model.listData.length-1}"
|
|
37
|
+
@click="clickNextHandler" src="../../../assets/B.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left: 15px;margin-right: 13px;cursor: pointer">
|
|
35
38
|
</div>
|
|
36
39
|
<div class="mt5">
|
|
37
40
|
<component class="max-report w93" v-if="model.actionRouters!==null && model.actionRouters[0]!==null"
|
|
@@ -107,10 +110,10 @@
|
|
|
107
110
|
<div class="hous-b">
|
|
108
111
|
<img :src="model.fields1Dic.ewmUrl.value" alt="" class="code-ewm">
|
|
109
112
|
<div class="info-row mb20 mt5">
|
|
110
|
-
<div class="row-i"><span>{{model.fields1Dic.Price.label}}</span><span class="base-clolr expand-f"
|
|
113
|
+
<div class="row-i"><span>{{model.fields1Dic.Price.label}}</span><span class="base-clolr expand-f" v-html="model.fields1Dic.Price.value"></span><span class="base-clolr">{{model.fields1Dic.Price.unitName}}</span>
|
|
111
114
|
<img src="../../../assets/jsq.png" class="img-jsq" alt="">
|
|
112
115
|
</div>
|
|
113
|
-
<div class="row-i"><span>{{model.fields1Dic.PriceUnit.label}}</span><span class="base-clolr"
|
|
116
|
+
<div class="row-i"><span>{{model.fields1Dic.PriceUnit.label}}</span><span class="base-clolr expand-f" v-html="model.fields1Dic.PriceUnit.value"></span><span class="base-clolr">{{model.fields1Dic.PriceUnit.unitName}}</span></div>
|
|
114
117
|
<div v-if="model.fields1Dic.PriceLine" class="row-i"><span>{{model.fields1Dic.PriceLine.label}}</span><div>{{model.fields1Dic.PriceLine.value}}{{model.fields1Dic.PriceLine.unitName}}</div></div></div>
|
|
115
118
|
<div class="info-row">
|
|
116
119
|
<div v-if="model.fields1Dic.PriceLine" class="row-i">
|
|
@@ -577,7 +580,7 @@
|
|
|
577
580
|
let title=field.pageTitle==undefined ?field.label:field.pageTitle;
|
|
578
581
|
submitData.actionType=field.actionType;
|
|
579
582
|
var fun =self.$common.getDataDrivenOpts().handler[field.action];
|
|
580
|
-
fun(submitData,title,
|
|
583
|
+
fun(submitData,title,null);
|
|
581
584
|
}
|
|
582
585
|
}
|
|
583
586
|
|
|
@@ -601,27 +604,27 @@
|
|
|
601
604
|
}
|
|
602
605
|
},
|
|
603
606
|
clickNextHandler() {
|
|
604
|
-
|
|
605
|
-
if(this.parentModel && this.parentModel.
|
|
606
|
-
let oldValue=this.parentModel.listData[this.parentModel.selectIndex][
|
|
607
|
-
this.parentModel.$
|
|
608
|
-
let newValue=this.parentModel.listData[this.parentModel.selectIndex][
|
|
607
|
+
let key='chanceID';
|
|
608
|
+
if(this.parentModel && this.parentModel.$refs.table){
|
|
609
|
+
let oldValue=this.parentModel.$refs.table.model.listData[this.parentModel.$refs.table.model.selectIndex][key];
|
|
610
|
+
this.parentModel.$refs.table.rowKeyDownHandle(null,1);
|
|
611
|
+
let newValue=this.parentModel.$refs.table.model.listData[this.parentModel.$refs.table.model.selectIndex][key];
|
|
609
612
|
if(oldValue!==newValue){
|
|
610
613
|
let parm=this.apiParam;
|
|
611
|
-
parm[
|
|
614
|
+
parm[key]=newValue;
|
|
612
615
|
this.loaderObj.Detail(this.api,parm, this.load);
|
|
613
616
|
}
|
|
614
617
|
}
|
|
615
618
|
},
|
|
616
619
|
clickPrevHandler() {
|
|
617
|
-
|
|
618
|
-
if(this.parentModel && this.parentModel.
|
|
619
|
-
let oldValue=this.parentModel.listData[this.parentModel.selectIndex][
|
|
620
|
-
this.parentModel.$
|
|
621
|
-
let newValue=this.parentModel.listData[this.parentModel.selectIndex][
|
|
620
|
+
let key='chanceID';
|
|
621
|
+
if(this.parentModel && this.parentModel.$refs.table){
|
|
622
|
+
let oldValue=this.parentModel.$refs.table.model.listData[this.parentModel.$refs.table.model.selectIndex][key];
|
|
623
|
+
this.parentModel.$refs.table.rowKeyDownHandle(null,-1);
|
|
624
|
+
let newValue=this.parentModel.$refs.table.model.listData[this.parentModel.$refs.table.model.selectIndex][key];
|
|
622
625
|
if(oldValue!==newValue){
|
|
623
626
|
let parm=this.apiParam;
|
|
624
|
-
parm[
|
|
627
|
+
parm[key]=newValue;
|
|
625
628
|
this.loaderObj.Detail(this.api,parm, this.load);
|
|
626
629
|
}
|
|
627
630
|
}
|
|
@@ -809,8 +812,15 @@
|
|
|
809
812
|
}
|
|
810
813
|
.expand-f {
|
|
811
814
|
line-height: 15px;
|
|
812
|
-
font-size:
|
|
815
|
+
font-size: 16px;
|
|
813
816
|
font-weight: bold;
|
|
817
|
+
img{
|
|
818
|
+
width: 15px!important;
|
|
819
|
+
margin-left: 0!important;
|
|
820
|
+
}
|
|
821
|
+
span{
|
|
822
|
+
float:right;
|
|
823
|
+
}
|
|
814
824
|
}
|
|
815
825
|
.img-jsq{
|
|
816
826
|
width: 14px;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div class="el-icon-close cursor" style="padding-top: 5px;" @click="closeSideHandler"></div>
|
|
14
14
|
</div>
|
|
15
15
|
<div style="padding-left: 20px;padding-right: 20px;">
|
|
16
|
-
<div style="margin-top: 18px;">
|
|
16
|
+
<div ref="title" style="margin-top: 18px;">
|
|
17
17
|
<div style="font-weight: Bold;font-size: 16px;color: #333333;display: flex;">
|
|
18
18
|
<span>{{model.fields1Dic.EstateName.value}}</span>
|
|
19
19
|
<span>{{model.fields1Dic.BuildingName.value}}</span>
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
</div>
|
|
30
30
|
<div style="display: flex;flex-wrap: wrap;">
|
|
31
31
|
<div v-for="(tag, index) in model.actionRouterLabel" :key="index" class="t-tag" style="margin-top: 7px;"
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
:style="{color:tag.textColor,backgroundColor:tag.bgColor,borderColor:tag.borderColor}">
|
|
33
|
+
{{tag.label}}
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
@@ -41,34 +41,48 @@
|
|
|
41
41
|
</div>
|
|
42
42
|
<div style="width: 33.33%;">
|
|
43
43
|
<div style="margin-top: 13px;font-size: 12px;">{{model.fields1Dic.Price.label}}</div>
|
|
44
|
-
<div style="margin-top: 7px;font-size: 14px;font-weight: Bold;color: #EE6B6B;"
|
|
44
|
+
<div style="margin-top: 7px;font-size: 14px;font-weight: Bold;color: #EE6B6B;"><span v-html="model.fields1Dic.Price.value"></span><span>{{model.fields1Dic.Price.unitName}}</span></div>
|
|
45
45
|
</div>
|
|
46
46
|
<div style="width: 33.33%;">
|
|
47
47
|
<div style="margin-top: 13px;font-size: 12px;">{{model.fields1Dic.FloorName.label}}</div>
|
|
48
48
|
<div style="margin-top: 7px;font-size: 14px;font-weight: Bold;color: #EE6B6B;">{{model.fields1Dic.FloorName.value}}</div>
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
|
-
<div ref="contact" id="contact" style="margin-top: 16px;" v-if="model.contactApiRouter!==null"
|
|
52
|
-
<ct-contact :apiRouter="model.contactApiRouter" :api="model.contactApiRouter.action" :apiParam="model.contactApiRouter.getSearchPara()"></ct-contact>
|
|
51
|
+
<div ref="contact" id="contact" style="margin-top: 16px;" v-if="model.contactApiRouter!==null">
|
|
52
|
+
<ct-contact :key="refreshKey" :apiRouter="model.contactApiRouter" :api="model.contactApiRouter.action" :apiParam="model.contactApiRouter.getSearchPara()"></ct-contact>
|
|
53
53
|
</div>
|
|
54
54
|
<div ref="routers" style="margin-top: 16px;display: flex;">
|
|
55
|
-
<component v-for="(router, index) in model.actionRoutersSimple.slice(0,showIndex>0?showIndex:model.actionRoutersSimple.length-1)" :key="index"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
<component v-for="(router, index) in model.actionRoutersSimple.slice(0,showIndex>0?showIndex:model.actionRoutersSimple.length-1)" :key="index"
|
|
56
|
+
:ref="'routers'+index"
|
|
57
|
+
v-if="!router.rightField || (model.fields1Dic[router.rightField] && model.fields1Dic[router.rightField].value == 1)"
|
|
58
|
+
:is="router.is" :vmodel="router" :api="model.optionApi" @click="fieldClickHandler(router)">
|
|
59
59
|
</component>
|
|
60
|
-
<el-popover v-if="showIndex>0" ref="popover0" :append-to-table="option.appendId?option.appendId:''"
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
<el-popover v-if="showIndex>0" ref="popover0" :append-to-table="option.appendId?option.appendId:''"
|
|
61
|
+
class="Stats-popover" popper-class="el-popover1" :placement="option.placement?option.placement:'left'"
|
|
62
|
+
:trigger="option.trigger?option.trigger:''">
|
|
63
63
|
<div class="tab-list" style="border-bottom:none;display: flex;flex-direction: column;">
|
|
64
64
|
<component v-for="(router, index) in model.actionRoutersSimple.slice(showIndex)" :key="index" style="margin-bottom: 10px;margin-left: 0px;"
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
v-if="!router.rightField || (model.fields1Dic[router.rightField] && model.fields1Dic[router.rightField].value == 1)"
|
|
66
|
+
:is="router.is" :vmodel="router" :api="model.optionApi" @click="fieldClickHandler(router)">
|
|
67
67
|
</component>
|
|
68
68
|
</div>
|
|
69
|
-
<span :slot="showIndex>0?'reference':''" class="
|
|
69
|
+
<span :slot="showIndex>0?'reference':''" class="more" style="margin-left: 10px;"></span>
|
|
70
70
|
</el-popover>
|
|
71
71
|
</div>
|
|
72
|
+
<div class="tablist-info base-box">
|
|
73
|
+
<div class="details-tabs-box">
|
|
74
|
+
<el-tabs :value="model.activeIndex1" @tab-click="handleSelect">
|
|
75
|
+
<el-tab-pane v-for="(col, index) in model.tags1" :key="col.appID"
|
|
76
|
+
:index="index.toString()" :name="index.toString()">
|
|
77
|
+
<div slot="label" v-html="col.appName"></div>
|
|
78
|
+
</el-tab-pane>
|
|
79
|
+
</el-tabs>
|
|
80
|
+
<ct-searchlist v-if="model.searchConditionApiTags1" :key="'list'+listKey.toString()+refershKey"
|
|
81
|
+
:apiParam="model.paramDataTags1" :flagFocus="false"
|
|
82
|
+
:searchConditionApi="model.searchConditionApiTags1"
|
|
83
|
+
:searchDataApi="model.searchDataApiTags1"></ct-searchlist>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
72
86
|
</div>
|
|
73
87
|
</div>
|
|
74
88
|
</template>
|
|
@@ -93,8 +107,10 @@
|
|
|
93
107
|
},
|
|
94
108
|
data() {
|
|
95
109
|
return {
|
|
110
|
+
refreshKey:0,
|
|
96
111
|
topWidth:300,
|
|
97
|
-
showIndex:0,
|
|
112
|
+
showIndex: 0,
|
|
113
|
+
listKey: 0,
|
|
98
114
|
option: {
|
|
99
115
|
isHidden: true,//是否开启操作栏隐藏设置,默认开启
|
|
100
116
|
showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
|
|
@@ -126,6 +142,7 @@
|
|
|
126
142
|
methods: {
|
|
127
143
|
load(data) {
|
|
128
144
|
var self = this;
|
|
145
|
+
this.refershKey = this.refershKey + 1;
|
|
129
146
|
this.model = data;
|
|
130
147
|
this.model.$vue = self;
|
|
131
148
|
this.loadFields();
|
|
@@ -166,7 +183,12 @@
|
|
|
166
183
|
}
|
|
167
184
|
});
|
|
168
185
|
});
|
|
169
|
-
},
|
|
186
|
+
},
|
|
187
|
+
refreshPage(){
|
|
188
|
+
this.refreshKey=this.refreshKey+1;
|
|
189
|
+
this.showIndex=0;
|
|
190
|
+
this.setDetailStyle();
|
|
191
|
+
},
|
|
170
192
|
loadFields() {
|
|
171
193
|
var self = this;
|
|
172
194
|
self.collapse=[];
|
|
@@ -223,10 +245,10 @@
|
|
|
223
245
|
let i=key.index;
|
|
224
246
|
this.model.activeIndex1=i;
|
|
225
247
|
if(this.model.tags1 && this.model.tags1[i]){
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
248
|
+
this.listKey = this.listKey + 1;
|
|
249
|
+
this.model.searchConditionApiTags1 = this.model.tags1[i].searchConditionApiUrl || '';
|
|
250
|
+
this.model.searchDataApiTags1 = this.model.tags1[i].searchDataApiUrl || '';
|
|
251
|
+
this.model.paramDataTags1 = this.model.tags1[i].paramData || '';
|
|
230
252
|
}
|
|
231
253
|
},
|
|
232
254
|
fieldClickHandler(field) {
|
|
@@ -417,6 +439,14 @@
|
|
|
417
439
|
margin-right: 10px;
|
|
418
440
|
font-size: 12px;
|
|
419
441
|
}
|
|
442
|
+
.more{
|
|
443
|
+
background: url('../../../assets/more.png')no-repeat;
|
|
444
|
+
background-size: 100% 100%;
|
|
445
|
+
width: 26px;
|
|
446
|
+
height: 26px;
|
|
447
|
+
display: table-caption;
|
|
448
|
+
cursor: pointer;
|
|
449
|
+
}
|
|
420
450
|
</style>
|
|
421
451
|
|
|
422
452
|
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
v-for="(item, index) in collapse" v-if="item.show !== false" :key="index">
|
|
25
25
|
<el-row>
|
|
26
26
|
<el-col v-for="(col, index) in collapseFieldsRow[index + 1]" :key="index" :span="col.colspan" v-if="col.show !== false" style="padding:5px">
|
|
27
|
-
<component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" v-bind="col.bindPara"
|
|
27
|
+
<component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" v-bind="col.bindPara" :fileData="getFileData(col)"
|
|
28
28
|
@click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)"
|
|
29
|
-
@input="inputHandler(col,$event)"
|
|
29
|
+
@input="inputHandler(col,$event)" @importComplete="importComplete"
|
|
30
30
|
@popupSearchList="popupSearchListHandler"
|
|
31
31
|
@tableButtonClick="clickHandler"></component>
|
|
32
32
|
</el-col>
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
<el-row>
|
|
45
45
|
<el-col v-for="(col, index) in collapseFieldsRow[index + 1]" :key="index" :span="col.colspan" v-if="col.show !== false" style="padding:5px">
|
|
46
|
-
<component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" v-bind="col.bindPara" :from="'form'"
|
|
46
|
+
<component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" v-bind="col.bindPara" :fileData="getFileData(col)" :from="'form'"
|
|
47
47
|
@click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)"
|
|
48
|
-
@input="inputHandler(col,$event)"
|
|
48
|
+
@input="inputHandler(col,$event)" @importComplete="importComplete"
|
|
49
49
|
@popupSearchList="popupSearchListHandler"
|
|
50
50
|
@tableButtonClick="clickHandler"></component>
|
|
51
51
|
</el-col>
|
|
@@ -262,8 +262,8 @@
|
|
|
262
262
|
var clickAcion = function (field) {
|
|
263
263
|
//若不是客户端方法,则直接访问接口
|
|
264
264
|
if (!field.isClientFuntion) {
|
|
265
|
+
let verified = true;
|
|
265
266
|
if (field.isSubmit) {
|
|
266
|
-
let verified = true;
|
|
267
267
|
if(field.flagVerifyData){
|
|
268
268
|
verified=self.validExcute();
|
|
269
269
|
}
|
|
@@ -404,6 +404,16 @@
|
|
|
404
404
|
let query = self.$common.objectToQueryStr(submitData);
|
|
405
405
|
window.open(field.action + query, "_blank");
|
|
406
406
|
}
|
|
407
|
+
else if (field.isExport) {
|
|
408
|
+
submitData = field.getActionPara(submitData).para;
|
|
409
|
+
self.model.export(field, submitData);
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
submitData = field.getActionPara(submitData).para;
|
|
413
|
+
field.doAction(submitData, (data) => {
|
|
414
|
+
self.model.doAction(data);
|
|
415
|
+
})
|
|
416
|
+
}
|
|
407
417
|
}
|
|
408
418
|
}
|
|
409
419
|
//执行客户端脚本
|
|
@@ -442,6 +452,14 @@
|
|
|
442
452
|
clickAcion(field,submitData);
|
|
443
453
|
}
|
|
444
454
|
},
|
|
455
|
+
importComplete(res,field) {
|
|
456
|
+
if(field && field.changeCallBackFunName){
|
|
457
|
+
this.changeCallBackHandler(field, field.changeCallBackFunName, res.content);
|
|
458
|
+
}
|
|
459
|
+
else{
|
|
460
|
+
this.model.doAction(res);
|
|
461
|
+
}
|
|
462
|
+
},
|
|
445
463
|
changeHandler(field) {
|
|
446
464
|
var self = this;
|
|
447
465
|
if (typeof field.change !== 'undefined') {
|
|
@@ -530,9 +548,15 @@
|
|
|
530
548
|
var self = this;
|
|
531
549
|
var rtnBool = true;
|
|
532
550
|
var jump = false;
|
|
551
|
+
var i=0;
|
|
533
552
|
self.$refs.Fields.forEach((f) => {
|
|
534
553
|
if (f.model && typeof f.validExcute !== 'undefined') {
|
|
535
554
|
if (!f.validExcute()) {
|
|
555
|
+
if(i===0){
|
|
556
|
+
self.$message.error('【'+f.model.label+'】不能为空!');
|
|
557
|
+
}
|
|
558
|
+
i++;
|
|
559
|
+
|
|
536
560
|
if (!jump) {
|
|
537
561
|
if (this.model.isHorizontalLayout) {//水平布局
|
|
538
562
|
this.activeName = f.model.collapseName.toString();
|
|
@@ -549,13 +573,16 @@
|
|
|
549
573
|
setTimeout(function () {
|
|
550
574
|
if (f.$el.offsetParent && f.$el.offsetParent.offsetParent) {
|
|
551
575
|
let total = f.$el.offsetParent.offsetParent.offsetTop;
|
|
552
|
-
//this.$common.setScrollTop(total);
|
|
553
576
|
if (f.$el.offsetParent.offsetParent.offsetParent === null
|
|
554
577
|
|| f.$el.offsetParent.offsetParent.offsetParent.classList[0] === 'app-main'
|
|
555
578
|
|| f.$el.offsetParent.offsetParent.classList[0] === 'app-main') {
|
|
556
579
|
total = f.$el.offsetParent.offsetTop;
|
|
557
580
|
this.$common.setScrollTop(total);
|
|
558
581
|
}
|
|
582
|
+
else if (f.$el.offsetParent.offsetParent.offsetParent.classList[0] === 'ct-dialog_wrapper') {
|
|
583
|
+
total = f.$el.offsetParent.offsetTop-45;
|
|
584
|
+
document.querySelector(".ct-dialog_body").children[0].scrollTop = total;
|
|
585
|
+
}
|
|
559
586
|
else if (f.$el.offsetParent.offsetParent.offsetParent.localName === "body") {
|
|
560
587
|
this.$common.setScrollTop(total);
|
|
561
588
|
}
|
|
@@ -563,11 +590,8 @@
|
|
|
563
590
|
f.$el.offsetParent.offsetParent.offsetParent.scrollTop = total;
|
|
564
591
|
}
|
|
565
592
|
}
|
|
566
|
-
//let input = f.$el.querySelector('input');
|
|
567
|
-
//if (input) {
|
|
568
|
-
// input.focus();
|
|
569
|
-
//}
|
|
570
593
|
}, timeOut);
|
|
594
|
+
|
|
571
595
|
jump = true;
|
|
572
596
|
}
|
|
573
597
|
}
|
|
@@ -593,7 +617,22 @@
|
|
|
593
617
|
return Object.assign(formData,{'pageStyle':this.$route.query.pageStyle});
|
|
594
618
|
}
|
|
595
619
|
return formData;
|
|
596
|
-
},
|
|
620
|
+
},
|
|
621
|
+
getFileData(field) {
|
|
622
|
+
var submitData = {};
|
|
623
|
+
var tempFormData = this.model.getFormObj();
|
|
624
|
+
if(field.flagAttachSearchCondition){
|
|
625
|
+
submitData.jsonData=tempFormData;
|
|
626
|
+
}
|
|
627
|
+
else{
|
|
628
|
+
if(field.submitFormField){
|
|
629
|
+
field.submitFormField.forEach((v) => {
|
|
630
|
+
submitData[v] = tempFormData[v];
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
return submitData;
|
|
635
|
+
},
|
|
597
636
|
}
|
|
598
637
|
}
|
|
599
638
|
</script>
|
|
@@ -70,6 +70,8 @@
|
|
|
70
70
|
this.model.value = '';
|
|
71
71
|
this.inputHandler(this.model.value);
|
|
72
72
|
this.changeHandler(this.model.value);
|
|
73
|
+
this.isShowClear();
|
|
74
|
+
event.stopPropagation();
|
|
73
75
|
},
|
|
74
76
|
onInputHandler: function (val) {
|
|
75
77
|
this.model.value = this.$common.numFloat(this.model.value, this.model.decimals, this.inputOld);//保留n位小数
|
|
@@ -121,12 +123,6 @@
|
|
|
121
123
|
this.$set(this, 'showClear', false);
|
|
122
124
|
}
|
|
123
125
|
},
|
|
124
|
-
|
|
125
|
-
clearClickHandle: function (event) {
|
|
126
|
-
this.model.value = '';
|
|
127
|
-
this.isShowClear();
|
|
128
|
-
event.stopPropagation();
|
|
129
|
-
},
|
|
130
126
|
}
|
|
131
127
|
}
|
|
132
128
|
</script>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import dynamicLayout from './src/dynamicLayout'
|
|
2
|
+
|
|
3
|
+
dynamicLayout.install = function (Vue) {
|
|
4
|
+
Vue.component(dynamicLayout.name, dynamicLayout);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
8
|
+
window.Vue.use(dynamicLayout);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default dynamicLayout;
|