centaline-data-driven 1.2.72 → 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 -7
- package/src/centaline/dynamicBtn/src/dynamicBtn.vue +1 -1
- package/src/centaline/dynamicContact/src/dynamicContact.vue +3 -3
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +7 -7
- package/src/centaline/dynamicForm/src/dynamicForm.vue +49 -10
- package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +2 -6
- 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/Form.js +26 -0
- package/src/main.js +4 -4
- 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="'/
|
|
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,12 +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:{actionType:
|
|
22
|
-
,commAdjustCategory: "6"
|
|
23
|
-
,originalTraId: "1478187254032572417"
|
|
24
|
-
,pageOnly: true
|
|
25
|
-
,pageStyle: 2
|
|
26
|
-
,pageTitle: "新增业绩调整"}
|
|
21
|
+
apiParam:{"actionType":2,"jsonData":{}}
|
|
27
22
|
}
|
|
28
23
|
},
|
|
29
24
|
methods: {
|
|
@@ -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)">
|
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
<div class="hous-b">
|
|
111
111
|
<img :src="model.fields1Dic.ewmUrl.value" alt="" class="code-ewm">
|
|
112
112
|
<div class="info-row mb20 mt5">
|
|
113
|
-
<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>
|
|
114
114
|
<img src="../../../assets/jsq.png" class="img-jsq" alt="">
|
|
115
115
|
</div>
|
|
116
|
-
<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>
|
|
117
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>
|
|
118
118
|
<div class="info-row">
|
|
119
119
|
<div v-if="model.fields1Dic.PriceLine" class="row-i">
|
|
@@ -604,11 +604,11 @@
|
|
|
604
604
|
}
|
|
605
605
|
},
|
|
606
606
|
clickNextHandler() {
|
|
607
|
-
let key='chanceID';
|
|
607
|
+
let key='chanceID';
|
|
608
608
|
if(this.parentModel && this.parentModel.$refs.table){
|
|
609
|
-
let oldValue=this.parentModel.$refs.table.model.listData[this.parentModel.selectIndex][key];
|
|
609
|
+
let oldValue=this.parentModel.$refs.table.model.listData[this.parentModel.$refs.table.model.selectIndex][key];
|
|
610
610
|
this.parentModel.$refs.table.rowKeyDownHandle(null,1);
|
|
611
|
-
let newValue=this.parentModel.$refs.table.model.listData[this.parentModel.selectIndex][key];
|
|
611
|
+
let newValue=this.parentModel.$refs.table.model.listData[this.parentModel.$refs.table.model.selectIndex][key];
|
|
612
612
|
if(oldValue!==newValue){
|
|
613
613
|
let parm=this.apiParam;
|
|
614
614
|
parm[key]=newValue;
|
|
@@ -619,9 +619,9 @@
|
|
|
619
619
|
clickPrevHandler() {
|
|
620
620
|
let key='chanceID';
|
|
621
621
|
if(this.parentModel && this.parentModel.$refs.table){
|
|
622
|
-
let oldValue=this.parentModel.$refs.table.model.listData[this.parentModel.selectIndex][key];
|
|
622
|
+
let oldValue=this.parentModel.$refs.table.model.listData[this.parentModel.$refs.table.model.selectIndex][key];
|
|
623
623
|
this.parentModel.$refs.table.rowKeyDownHandle(null,-1);
|
|
624
|
-
let newValue=this.parentModel.$refs.table.model.listData[this.parentModel.selectIndex][key];
|
|
624
|
+
let newValue=this.parentModel.$refs.table.model.listData[this.parentModel.$refs.table.model.selectIndex][key];
|
|
625
625
|
if(oldValue!==newValue){
|
|
626
626
|
let parm=this.apiParam;
|
|
627
627
|
parm[key]=newValue;
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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;
|
package/src/main.js
CHANGED
|
@@ -12,8 +12,8 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
12
12
|
// 关闭生产模式下给出的提示
|
|
13
13
|
Vue.config.productionTip = false;
|
|
14
14
|
Vue.use(centaline, {
|
|
15
|
-
baseUrl: "http://10.88.22.13:7070/v1/form/router",
|
|
16
|
-
|
|
15
|
+
// baseUrl: "http://10.88.22.13:7070/v1/form/router",
|
|
16
|
+
baseUrl: "http://10.88.23.22:9999/v1/form/router",
|
|
17
17
|
// baseUrl: "http://10.1.245.111:38028/api",
|
|
18
18
|
// flagRouterSelf: true,
|
|
19
19
|
zindex: 999,
|
|
@@ -38,8 +38,8 @@ Vue.use(centaline, {
|
|
|
38
38
|
return {
|
|
39
39
|
oldToken: '6613f67c-ba83-4065-9570-175c2f74e6d5',
|
|
40
40
|
originalRequestURL: 'http://10.88.22.67:8080',
|
|
41
|
-
EstateInfo: '{"estateId":"
|
|
42
|
-
Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.
|
|
41
|
+
EstateInfo: ' {"estateId":"201703020943128D8A8FCF463E4016D6","estateName":"undefined"}',
|
|
42
|
+
Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjI4ODM0MDAwLWNlZjktNGFmOS05MzRiLTk5NWIyZDJiMDEzMiJ9.wFh2luYleY--3_GmdkU34YsE4-sFNRhG9E8npQ14m2KFIromh674-kV7oXmxAgF3KbqqjsrcC0iGAwIUfI1vWQ',
|
|
43
43
|
};
|
|
44
44
|
},
|
|
45
45
|
// 请求完成事件,可判断是否登录过期执行响应操作
|