centaline-data-driven 1.2.70 → 1.2.73
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 +2 -2
- 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/dynamicDetail.vue +9 -2
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +30 -27
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +18 -4
- package/src/centaline/dynamicForm/src/dynamicForm.vue +50 -11
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +8 -3
- package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +2 -6
- package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +12 -5
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +5 -5
- package/src/centaline/dynamicSearchList/src/dynamicTableStats.vue +4 -0
- package/src/centaline/dynamicT/src/dynamicT.vue +2 -0
- package/src/centaline/loader/src/ctl/Button.js +3 -0
- package/src/centaline/loader/src/ctl/Detail.js +3 -0
- package/src/centaline/loader/src/ctl/Form.js +26 -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
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: {
|
|
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
|
},
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<ct-PropertyDetailOFI :api="api" :apiParam="apiParam" :parentModel="parentModel" class="ct-PropertyDetailOFI" v-if="pageType=='PropertyDetailOFI'"
|
|
4
|
-
|
|
3
|
+
<ct-PropertyDetailOFI :api="api" :apiParam="apiParam" :parentModel="parentModel" class="ct-PropertyDetailOFI" v-if="pageType=='PropertyDetailOFI'"
|
|
4
|
+
@loaded="loaded"></ct-PropertyDetailOFI>
|
|
5
|
+
<ct-PropertyDetailRET :api="api" :apiParam="apiParam" :parentModel="parentModel" class="ct-PropertyDetailRET" v-if="pageType=='PropertyDetailRET'"
|
|
6
|
+
@loaded="loaded"></ct-PropertyDetailRET>
|
|
5
7
|
<ct-PropertySimpleDetailRET :api="api" :apiParam="apiParam" :selectIndex="selectIndex" :rowCount="rowCount" class="ct-PropertySimpleDetailRET"
|
|
8
|
+
@loaded="loaded"
|
|
6
9
|
@clickNextHandler="clickNextHandler" @clickPrevHandler="clickPrevHandler" @simpleRouterclickHandler="simpleRouterclickHandler"
|
|
7
10
|
v-if="pageType=='PropertySimpleDetailRET'" @closeSideHandler="closeSideHandler"></ct-PropertySimpleDetailRET>
|
|
8
11
|
</div>
|
|
@@ -49,6 +52,10 @@
|
|
|
49
52
|
simpleRouterclickHandler(field,data) {
|
|
50
53
|
this.$emit('simpleRouterclickHandler',field,data);
|
|
51
54
|
},
|
|
55
|
+
loaded(model) {
|
|
56
|
+
//通知父组件加载完成
|
|
57
|
+
this.$emit('loaded',model);
|
|
58
|
+
},
|
|
52
59
|
}
|
|
53
60
|
}
|
|
54
61
|
</script>
|
|
@@ -27,28 +27,32 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
<div class="head-but">
|
|
29
29
|
<div>
|
|
30
|
-
<component v-if="model.otherTradeActionRouter!==null" v-bind="model.otherTradeActionRouter" class="max-default"
|
|
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
|
-
|
|
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">
|
|
34
38
|
</div>
|
|
35
39
|
<div class="mt5">
|
|
36
40
|
<component class="max-report w93" v-if="model.actionRouters!==null && model.actionRouters[0]!==null"
|
|
37
41
|
:is="model.actionRouters[0].is" :vmodel="model.actionRouters[0]" :api="model.optionApi" @click="fieldClickHandler(model.actionRouters[0],$event)"></component>
|
|
38
|
-
<component class="max-report" v-if="model.actionRouters!==null && model.actionRouters[1]!==null"
|
|
42
|
+
<component class="max-report w93" v-if="model.actionRouters!==null && model.actionRouters[1]!==null"
|
|
39
43
|
:is="model.actionRouters[1].is" :vmodel="model.actionRouters[1]" :api="model.optionApi" @click="fieldClickHandler(model.actionRouters[1],$event)"></component>
|
|
40
44
|
</div>
|
|
41
45
|
<div class="mt5">
|
|
42
|
-
<button type="button" class="el-button el-button--info el-button--mini max-report rel
|
|
46
|
+
<button type="button" class="el-button el-button--info el-button--mini max-report rel w93"
|
|
43
47
|
v-if="model.actionRoutersMoreList !== null && model.actionRoutersMoreList.length>0">
|
|
44
48
|
<img src="../../../assets/dian.png" alt="" class="report">
|
|
45
49
|
<ul class="report-cont">
|
|
46
50
|
<li v-for="(col, index) in model.actionRoutersMoreList" :key="index" v-if="col.show !== false">
|
|
47
|
-
<component class="max-report" :is="col.is" :vmodel="col" :api="model.optionApi" @click="fieldClickHandler(col,$event)"></component>
|
|
51
|
+
<component class="max-report w93" :is="col.is" :vmodel="col" :api="model.optionApi" @click="fieldClickHandler(col,$event)"></component>
|
|
48
52
|
</li>
|
|
49
53
|
</ul>
|
|
50
54
|
</button>
|
|
51
|
-
<component v-else-if="model.actionRouters!==null && model.actionRouters.length===3" class="max-report"
|
|
55
|
+
<component v-else-if="model.actionRouters!==null && model.actionRouters.length===3" class="max-report w93"
|
|
52
56
|
:is="model.actionRouters[2].is" :vmodel="model.actionRouters[2]" :api="model.optionApi" @click="fieldClickHandler(model.actionRouters[2],$event)">
|
|
53
57
|
</component>
|
|
54
58
|
</div>
|
|
@@ -106,10 +110,10 @@
|
|
|
106
110
|
<div class="hous-b">
|
|
107
111
|
<img :src="model.fields1Dic.ewmUrl.value" alt="" class="code-ewm">
|
|
108
112
|
<div class="info-row mb20 mt5">
|
|
109
|
-
<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>
|
|
110
114
|
<img src="../../../assets/jsq.png" class="img-jsq" alt="">
|
|
111
115
|
</div>
|
|
112
|
-
<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" v-html="model.fields1Dic.PriceUnit.value"></span><span class="base-clolr">{{model.fields1Dic.PriceUnit.unitName}}</span></div>
|
|
113
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>
|
|
114
118
|
<div class="info-row">
|
|
115
119
|
<div v-if="model.fields1Dic.PriceLine" class="row-i">
|
|
@@ -358,6 +362,8 @@
|
|
|
358
362
|
self.setDetailHeight();
|
|
359
363
|
});
|
|
360
364
|
});
|
|
365
|
+
//通知父组件加载完成
|
|
366
|
+
this.$emit('loaded', this.model);
|
|
361
367
|
},
|
|
362
368
|
loadFields() {
|
|
363
369
|
var self = this;
|
|
@@ -552,7 +558,7 @@
|
|
|
552
558
|
}
|
|
553
559
|
else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
|
|
554
560
|
submitData = field.getActionPara(submitData).para;
|
|
555
|
-
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
|
|
561
|
+
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle, self.model,field.dialogWidth);
|
|
556
562
|
}
|
|
557
563
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
558
564
|
submitData = field.getActionPara(submitData).para;
|
|
@@ -598,31 +604,28 @@
|
|
|
598
604
|
}
|
|
599
605
|
},
|
|
600
606
|
clickNextHandler() {
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
let oldValue=this.parentModel.listData[this.parentModel.selectIndex][
|
|
604
|
-
this.parentModel.$
|
|
605
|
-
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];
|
|
606
612
|
if(oldValue!==newValue){
|
|
607
613
|
let parm=this.apiParam;
|
|
608
|
-
parm[
|
|
609
|
-
|
|
610
|
-
var fun =self.$common.getDataDrivenOpts().handler['refreshPropertyDetailRET'];
|
|
611
|
-
fun(parm,parm.pageTitle,self.parentModel);
|
|
614
|
+
parm[key]=newValue;
|
|
615
|
+
this.loaderObj.Detail(this.api,parm, this.load);
|
|
612
616
|
}
|
|
613
617
|
}
|
|
614
618
|
},
|
|
615
619
|
clickPrevHandler() {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
this.parentModel.$
|
|
619
|
-
|
|
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];
|
|
620
625
|
if(oldValue!==newValue){
|
|
621
626
|
let parm=this.apiParam;
|
|
622
|
-
parm[
|
|
623
|
-
|
|
624
|
-
var fun =self.$common.getDataDrivenOpts().handler['refreshPropertyDetailRET'];
|
|
625
|
-
fun(parm,parm.pageTitle,self.parentModel);
|
|
627
|
+
parm[key]=newValue;
|
|
628
|
+
this.loaderObj.Detail(this.api,parm, this.load);
|
|
626
629
|
}
|
|
627
630
|
}
|
|
628
631
|
},
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
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>
|
|
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
55
|
<component v-for="(router, index) in model.actionRoutersSimple.slice(0,showIndex>0?showIndex:model.actionRoutersSimple.length-1)" :key="index"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
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
72
|
</div>
|
|
@@ -93,6 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
data() {
|
|
95
95
|
return {
|
|
96
|
+
refreshKey:0,
|
|
96
97
|
topWidth:300,
|
|
97
98
|
showIndex:0,
|
|
98
99
|
option: {
|
|
@@ -166,7 +167,12 @@
|
|
|
166
167
|
}
|
|
167
168
|
});
|
|
168
169
|
});
|
|
169
|
-
},
|
|
170
|
+
},
|
|
171
|
+
refreshPage(){
|
|
172
|
+
this.refreshKey=this.refreshKey+1;
|
|
173
|
+
this.showIndex=0;
|
|
174
|
+
this.setDetailStyle();
|
|
175
|
+
},
|
|
170
176
|
loadFields() {
|
|
171
177
|
var self = this;
|
|
172
178
|
self.collapse=[];
|
|
@@ -345,7 +351,7 @@
|
|
|
345
351
|
}
|
|
346
352
|
else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
|
|
347
353
|
submitData = field.getActionPara(submitData).para;
|
|
348
|
-
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
|
|
354
|
+
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle, self.model,field.dialogWidth);
|
|
349
355
|
}
|
|
350
356
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
351
357
|
submitData = field.getActionPara(submitData).para;
|
|
@@ -417,6 +423,14 @@
|
|
|
417
423
|
margin-right: 10px;
|
|
418
424
|
font-size: 12px;
|
|
419
425
|
}
|
|
426
|
+
.more{
|
|
427
|
+
background: url('../../../assets/more.png')no-repeat;
|
|
428
|
+
background-size: 100% 100%;
|
|
429
|
+
width: 26px;
|
|
430
|
+
height: 26px;
|
|
431
|
+
display: table-caption;
|
|
432
|
+
cursor: pointer;
|
|
433
|
+
}
|
|
420
434
|
</style>
|
|
421
435
|
|
|
422
436
|
|
|
@@ -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>
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
<el-col :span="24">
|
|
15
15
|
<el-table size="mini" class="max-table--border" :data="model.tableData" :key="itemKey" border style="width: 100%" highlight-current-row :show-summary="model.showSummary" :summary-method="getSummaries">
|
|
16
16
|
<!--数据列-->
|
|
17
|
-
<el-table-column v-for="(v,i) in model.rows[0].field" :key="i" :prop="v.id" :label="v.label" v-if="v.show !== false"
|
|
17
|
+
<el-table-column v-for="(v,i) in model.rows[0].field" :key="i" :prop="v.id" :label="v.label" v-if="v.show !== false">
|
|
18
18
|
<template slot="header" slot-scope="scope">
|
|
19
|
-
<div
|
|
19
|
+
<div :class="[{'ct-table-required':v.required&&model.rows[0].edit&& model.rows[0].delete&&!model.tableDisabled},getHeadClass(v)]">
|
|
20
20
|
{{v.label}}
|
|
21
21
|
</div>
|
|
22
22
|
</template>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</el-table-column>
|
|
35
35
|
|
|
36
36
|
<!--操作列-->
|
|
37
|
-
<el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0"
|
|
37
|
+
<el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0">
|
|
38
38
|
<template slot-scope="scope">
|
|
39
39
|
<span v-if="scope.row.edit || scope.row.isSet" class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,true)">
|
|
40
40
|
{{scope.row.isSet?'保存':"修改"}}
|
|
@@ -105,6 +105,11 @@
|
|
|
105
105
|
});
|
|
106
106
|
},
|
|
107
107
|
methods: {
|
|
108
|
+
getHeadClass(v) {
|
|
109
|
+
if (v.is === "ct-inputNumber") {
|
|
110
|
+
return 'ct-table-inputnumber';
|
|
111
|
+
}
|
|
112
|
+
},
|
|
108
113
|
//添加账号
|
|
109
114
|
addRow() {
|
|
110
115
|
var app = this;
|
|
@@ -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>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<ct-searchtable ref="table" :api="searchDataApi" :searchStatsApi="searchStatsApi" :from="from" @loaded="tableLoaded"
|
|
16
16
|
@toolbarClick="toolbarClickHandler" @refreshParent="refreshParentHandler" :key="reloadKeyTable" @searchComplate="searchComplate"
|
|
17
|
-
@rowClickHandle="rowClickHandle"
|
|
17
|
+
@rowClickHandle="rowClickHandle"
|
|
18
18
|
@showTitle="showTitleHandler"></ct-searchtable>
|
|
19
19
|
</div>
|
|
20
20
|
<div v-if="flagSideBar && flagSideBarOfData"
|
|
@@ -203,13 +203,15 @@
|
|
|
203
203
|
},
|
|
204
204
|
rowClickHandle() {
|
|
205
205
|
var self = this;
|
|
206
|
-
if(self.selectIndex!==self.$refs.table.model.selectIndex){
|
|
206
|
+
if(self.selectIndex!==self.$refs.table.model.selectIndex && self.$refs.table.model.rowSelectRouter){
|
|
207
207
|
self.selectIndex=self.$refs.table.model.selectIndex;
|
|
208
208
|
self.rowCount=self.$refs.table.model.listData.length;
|
|
209
209
|
self.sideBarApiParam = {};
|
|
210
|
-
self.$refs.table.model.rowSelectRouter.submitListField
|
|
211
|
-
self
|
|
212
|
-
|
|
210
|
+
if(self.$refs.table.model.rowSelectRouter.submitListField){
|
|
211
|
+
self.$refs.table.model.rowSelectRouter.submitListField.forEach((k) => {
|
|
212
|
+
self.sideBarApiParam[k] = self.$refs.table.model.listData[self.selectIndex][k];
|
|
213
|
+
});
|
|
214
|
+
}
|
|
213
215
|
self.sideBarApiParam.actionType = self.$refs.table.model.rowSelectRouter.actionType;
|
|
214
216
|
self.detailKey = self.detailKey+1;
|
|
215
217
|
}
|
|
@@ -236,6 +238,11 @@
|
|
|
236
238
|
for(var i=0;i<popoverCallTels.length;i++){
|
|
237
239
|
popoverCallTels[i].style.display='block';
|
|
238
240
|
}
|
|
241
|
+
if(this.$refs.detail){
|
|
242
|
+
if(this.$refs.detail.$children && this.$refs.detail.$children.length>0){
|
|
243
|
+
this.$refs.detail.$children[0].refreshPage();
|
|
244
|
+
}
|
|
245
|
+
}
|
|
239
246
|
}
|
|
240
247
|
},
|
|
241
248
|
closeSideHandler() {
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
window.addEventListener("resize", (ev) => {
|
|
254
254
|
self.setTableHeight();
|
|
255
255
|
});
|
|
256
|
-
|
|
256
|
+
self.rowColorChange();
|
|
257
257
|
self.fiexdHead();
|
|
258
258
|
|
|
259
259
|
//当表格没有占满表格框时,主动请求下一页
|
|
@@ -535,7 +535,7 @@
|
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
537
|
});
|
|
538
|
-
},
|
|
538
|
+
},
|
|
539
539
|
scrollHandle(ev) {
|
|
540
540
|
var self = this;
|
|
541
541
|
if ((this.$refs.tableParent.scrollTop + this.$refs.tableParent.clientHeight) >= (this.$refs.tableParent.scrollHeight - 5)) {
|
|
@@ -817,12 +817,12 @@
|
|
|
817
817
|
else {
|
|
818
818
|
// let parm={submitData:submitData,field:field}
|
|
819
819
|
// self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
|
|
820
|
+
// var fun = self.model.scripts.formData[action];
|
|
821
|
+
// fun(submitData,field);
|
|
820
822
|
let title = field.pageTitle == undefined ? field.label : field.pageTitle;
|
|
821
823
|
submitData.actionType = field.actionType;
|
|
822
824
|
var fun = self.$common.getDataDrivenOpts().handler[action];
|
|
823
|
-
fun(submitData, title, self
|
|
824
|
-
// var fun = self.model.scripts.formData[action];
|
|
825
|
-
// fun(submitData,field);
|
|
825
|
+
fun(submitData, title, self.$parent);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
|
|
@@ -356,6 +356,32 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
356
356
|
button.is = "ct-btn";
|
|
357
357
|
return button;
|
|
358
358
|
},
|
|
359
|
+
export(btn, submitData) {
|
|
360
|
+
Vue.prototype.$api.postHandler(common.globalUri(),{
|
|
361
|
+
action: btn.action,
|
|
362
|
+
para: submitData
|
|
363
|
+
});
|
|
364
|
+
},
|
|
365
|
+
doAction(response) {
|
|
366
|
+
if (response.responseData) {
|
|
367
|
+
response = response.responseData;
|
|
368
|
+
}
|
|
369
|
+
switch (response.notification) {
|
|
370
|
+
case Enum.ActionType.Export://导出
|
|
371
|
+
var fileName = response.content.fieldName1;
|
|
372
|
+
var fileContent = window.atob(response.content.code1);
|
|
373
|
+
common.saveFile(fileName, fileContent);
|
|
374
|
+
break;
|
|
375
|
+
case Enum.ActionType.Refersh://刷新
|
|
376
|
+
break;
|
|
377
|
+
case Enum.ActionType.RefreshParent://刷新父页面
|
|
378
|
+
rtn.self.$emit('refreshParent');
|
|
379
|
+
break;
|
|
380
|
+
default:
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
rtn.self.$forceUpdate();
|
|
384
|
+
},
|
|
359
385
|
};
|
|
360
386
|
valid.InitForm(rtn);
|
|
361
387
|
return rtn;
|