centaline-data-driven 1.2.50 → 1.2.53
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 +2 -0
- package/package.json +1 -1
- package/src/Detail.vue +1 -1
- package/src/centaline/css/common.css +4 -2
- package/src/centaline/css/max.css +3 -0
- package/src/centaline/dynamicBtn/src/dynamicBtn.vue +66 -8
- package/src/centaline/dynamicCompound/index.js +14 -0
- package/src/centaline/dynamicCompound/src/dynamicCompound.vue +89 -0
- package/src/centaline/dynamicContact/index.js +11 -0
- package/src/centaline/dynamicContact/src/dynamicContact.vue +293 -0
- package/src/centaline/dynamicDetail/src/dynamicDetail.vue +17 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +136 -35
- package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +42 -5
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +27 -5
- package/src/centaline/loader/src/ctl/Compound.js +59 -0
- package/src/centaline/loader/src/ctl/Contact.js +354 -0
- package/src/centaline/loader/src/ctl/Detail.js +18 -0
- package/src/centaline/loader/src/ctl/Router.js +3 -0
- package/src/centaline/loader/src/ctl/lib/Enum.js +9 -0
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +5 -0
- package/src/centaline/loader/src/ctl.js +2 -0
- package/src/centaline/selectOption/src/selectOptionVertical.vue +1 -1
- package/src/centaline/templateControls/src/dynamicTableCurrency.vue +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
- package/src/assets/ewmA.png +0 -0
|
@@ -43,6 +43,8 @@ const paths = {
|
|
|
43
43
|
"dynamicPhotoSelectList": "./src/centaline/dynamicPhotoSelectList/index.js",//图片选择列表
|
|
44
44
|
"dynamicViewer": "./src/centaline/dynamicViewer/index.js",//图片选择列表
|
|
45
45
|
"dynamicRepeat": "./src/centaline/dynamicRepeat/index.js",//重复控件
|
|
46
|
+
"dynamicCompound": "./src/centaline/dynamicCompound/index.js",//复合控件
|
|
47
|
+
"dynamicContact": "./src/centaline/dynamicContact/index.js",//联系人电话
|
|
46
48
|
},
|
|
47
49
|
"plugs": {
|
|
48
50
|
"api": "./src/centaline/api/index.js",//调用API插件
|
package/package.json
CHANGED
package/src/Detail.vue
CHANGED
|
@@ -313,12 +313,13 @@ html {
|
|
|
313
313
|
height: 26px;
|
|
314
314
|
font-size: 12px;
|
|
315
315
|
color: #ff5b5b !important;
|
|
316
|
-
padding:
|
|
316
|
+
padding: 0 5px;
|
|
317
|
+
line-height: 26px;
|
|
317
318
|
white-space: nowrap;
|
|
318
319
|
}
|
|
319
320
|
.spanMessage {
|
|
320
321
|
font-size: 12px;
|
|
321
|
-
padding:
|
|
322
|
+
padding: 0px 2px;
|
|
322
323
|
}
|
|
323
324
|
.el-input__icon {
|
|
324
325
|
height:initial;
|
|
@@ -712,6 +713,7 @@ html {
|
|
|
712
713
|
|
|
713
714
|
.el-date-editor .el-range-input, .el-date-editor .el-range-separator {
|
|
714
715
|
font-size: 12px;
|
|
716
|
+
height: 22px;
|
|
715
717
|
}
|
|
716
718
|
.ct-text{
|
|
717
719
|
position: relative
|
|
@@ -34,13 +34,30 @@
|
|
|
34
34
|
<div>{{model.label}}</div>
|
|
35
35
|
<div style="color:red;font-weight:700;">{{model.subText}}</div>
|
|
36
36
|
</el-button>
|
|
37
|
-
<el-button v-else
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
<el-button v-else-if="model.isCallTel"
|
|
38
|
+
:type="model.isHyperLink ? 'text' : 'primary'"
|
|
39
|
+
v-bind="model.attrs" @click="clickHandle"
|
|
40
|
+
:style="{color:model.textColor,backgroundColor:model.bgColor,borderColor:model.borderColor}"
|
|
41
|
+
:icon="model.icon"
|
|
42
|
+
:disabled="model.disabled || model.locked">
|
|
43
|
+
<el-popover :ref="'popover'+model.id" :append-to-table="option.appendId?option.appendId:''"
|
|
44
|
+
class="Stats-popover" popper-class="el-popover1" :placement="option.placement?option.placement:'left'"
|
|
45
|
+
v-model="visible"
|
|
46
|
+
:trigger="option.trigger?option.trigger:''">
|
|
47
|
+
<div style="border-bottom:none">
|
|
48
|
+
<div style="color: #388cd3;text-align: center;">{{message}}</div>
|
|
49
|
+
<img v-show="qrCode" :src="qrCode" style="margin-top: 5px;" :style="{'width':width+'px','height':height+'px'}" />
|
|
50
|
+
</div>
|
|
51
|
+
<span slot="reference">{{model.label}}</span>
|
|
52
|
+
</el-popover>
|
|
53
|
+
</el-button>
|
|
54
|
+
<el-button v-else
|
|
55
|
+
:type="model.isHyperLink ? 'text' : 'primary'"
|
|
56
|
+
v-bind="model.attrs" @click="$emit('click',model)"
|
|
57
|
+
:style="{color:model.textColor,backgroundColor:model.bgColor,borderColor:model.borderColor}"
|
|
58
|
+
:icon="model.icon"
|
|
59
|
+
:disabled="model.disabled || model.locked">
|
|
60
|
+
{{model.label}}
|
|
44
61
|
</el-button>
|
|
45
62
|
</template>
|
|
46
63
|
<script>
|
|
@@ -54,7 +71,20 @@
|
|
|
54
71
|
},
|
|
55
72
|
mixins: [dynamicElement],
|
|
56
73
|
data: function () {
|
|
57
|
-
return {
|
|
74
|
+
return {
|
|
75
|
+
visible:false,
|
|
76
|
+
message:'',
|
|
77
|
+
qrCode:'',
|
|
78
|
+
width:300,
|
|
79
|
+
height:300,
|
|
80
|
+
option: {
|
|
81
|
+
isHidden: true,//是否开启操作栏隐藏设置,默认开启
|
|
82
|
+
showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
|
|
83
|
+
appendId: '',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
|
|
84
|
+
trigger: 'manual',//触发方式,传值可查看Popper UI组件trigger属性
|
|
85
|
+
placement: 'bottom-start',//方向,传值可查看Popper UI组件placement属性
|
|
86
|
+
},
|
|
87
|
+
};
|
|
58
88
|
},
|
|
59
89
|
created() {
|
|
60
90
|
if (typeof this.vmodel === 'undefined') {
|
|
@@ -104,6 +134,34 @@
|
|
|
104
134
|
this.model.selectOptionCode=code;
|
|
105
135
|
this.$emit('click', this.model);
|
|
106
136
|
},
|
|
137
|
+
clickHandle(){
|
|
138
|
+
if(this.model.isCallTel){
|
|
139
|
+
if(this.visible){
|
|
140
|
+
this.visible=false;
|
|
141
|
+
}
|
|
142
|
+
else{
|
|
143
|
+
this.$emit('click',this.model);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
else{
|
|
147
|
+
this.$emit('click',this.model);
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
callTelClick(data){
|
|
151
|
+
this.message='';
|
|
152
|
+
this.qrCode='';
|
|
153
|
+
if(data.content.actionType=='显示消息'){
|
|
154
|
+
this.visible=true;
|
|
155
|
+
this.message=data.content.message;
|
|
156
|
+
}
|
|
157
|
+
else if(data.content.actionType=='扫码拨号'){
|
|
158
|
+
this.visible=true;
|
|
159
|
+
this.message=data.content.message;
|
|
160
|
+
this.qrCode='data:image/png;base64,' + data.content.qrCode;
|
|
161
|
+
if(data.content.width)this.width=data.content.width;
|
|
162
|
+
if(data.content.height)this.height=data.content.height;
|
|
163
|
+
}
|
|
164
|
+
},
|
|
107
165
|
}
|
|
108
166
|
}
|
|
109
167
|
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import dynamicCompound from './src/dynamicCompound'
|
|
2
|
+
import api from '../api/index'
|
|
3
|
+
|
|
4
|
+
dynamicCompound.install = function (Vue) {
|
|
5
|
+
Vue.component(dynamicCompound.name, dynamicCompound);
|
|
6
|
+
|
|
7
|
+
Vue.use(api);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
11
|
+
window.Vue.use(dynamicCompound);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default dynamicCompound;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-row v-if="model.fields.length > 0">
|
|
3
|
+
<el-col v-for="(col, index) in model.fields" :key="index" v-if="col.show !== false" :span="col.colspan" :class="index>0&&col.label==''?'complex-left-10':''">
|
|
4
|
+
<component ref="Fields" :is="col.is" :vmodel="col" :api="model.OptApi" v-bind="col.bindPara"
|
|
5
|
+
@click="fieldClickHandler(col,index)" @change="changeHandler(col,index)"
|
|
6
|
+
@input="inputHandler(col,index)"></component>
|
|
7
|
+
</el-col>
|
|
8
|
+
</el-row>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
var ctSpan = {
|
|
13
|
+
props: {
|
|
14
|
+
vmodel: Object,
|
|
15
|
+
},
|
|
16
|
+
data: function () {
|
|
17
|
+
return {
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: 'ct-compound',
|
|
28
|
+
components: {
|
|
29
|
+
'ct-span': ctSpan
|
|
30
|
+
},
|
|
31
|
+
props: {
|
|
32
|
+
vmodel: Object,
|
|
33
|
+
api: String
|
|
34
|
+
},
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
model: null,
|
|
38
|
+
foucus: false,
|
|
39
|
+
itemKey: Math.random()
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
created() {
|
|
43
|
+
let self = this;
|
|
44
|
+
this.model = this.vmodel;
|
|
45
|
+
this.model.OptApi = this.api;
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
fieldsValidExcute() {
|
|
49
|
+
var self = this;
|
|
50
|
+
var rtnBool = true;
|
|
51
|
+
if (typeof self.$refs.Fields !== 'undefined') {
|
|
52
|
+
self.$refs.Fields.forEach((f) => {
|
|
53
|
+
if (typeof f.validExcute !== 'undefined') {
|
|
54
|
+
if (!f.validExcute()) {
|
|
55
|
+
rtnBool = false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return rtnBool;
|
|
61
|
+
},
|
|
62
|
+
validExcute() {
|
|
63
|
+
var self = this;
|
|
64
|
+
var rtnBool = true;
|
|
65
|
+
if (!self.fieldsValidExcute()) {
|
|
66
|
+
rtnBool = false;
|
|
67
|
+
}
|
|
68
|
+
return rtnBool;
|
|
69
|
+
},
|
|
70
|
+
changeHandler(field,index) {
|
|
71
|
+
var self = this;
|
|
72
|
+
this.model.change = field.change;
|
|
73
|
+
self.$emit('change');
|
|
74
|
+
},
|
|
75
|
+
inputHandler(field, index) {
|
|
76
|
+
var self = this;
|
|
77
|
+
this.model.input = field.input;//当前小组件事件作为大组件事件
|
|
78
|
+
self.$emit('input');
|
|
79
|
+
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
84
|
+
<style>
|
|
85
|
+
.complex-left-10 {
|
|
86
|
+
padding-left: 10px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import dynamicContact from './src/dynamicContact'
|
|
2
|
+
|
|
3
|
+
dynamicContact.install = function (Vue) {
|
|
4
|
+
Vue.component(dynamicContact.name, dynamicContact);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
8
|
+
window.Vue.use(dynamicContact);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default dynamicContact;
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="apiRouter!=={} && model && model.listData.length>0" style="border: 1px solid #ECEFF2;box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06);border-radius: 6px;
|
|
3
|
+
padding-bottom: 10px;padding-top: 10px;padding-left: 10px;display: flex;font-size: 12px;">
|
|
4
|
+
<div class="ct-so" style="width:180px;">
|
|
5
|
+
<el-popover ref="pop" placement="bottom-start" v-model="showDrop" trigger="click">
|
|
6
|
+
<div>
|
|
7
|
+
<ctSelectOptionVertical :model="model" @click="selectOption($event)"></ctSelectOptionVertical>
|
|
8
|
+
</div>
|
|
9
|
+
<input slot="reference" readonly="readonly" ref="ct-input" style="font-weight: Bold;color:#333333 !important;"
|
|
10
|
+
:style="{height:inputHeight + 'px','line-height':inputLineHeight + 'px'}"
|
|
11
|
+
@focus="focusHandle" @blur="blurHandle" @click="clickHandle" @input="inputHandler($event)" v-model="model.text"
|
|
12
|
+
@change="changeHandler($event)" :disabled="model.lock" :class="model.lock ? 'ct-is-disabled' : 'ct-input_inner'" />
|
|
13
|
+
</el-popover>
|
|
14
|
+
<span class="el-input__suffix" @click="clickHandle" :class="[model.attrs.size?'el-input--'+model.attrs.size:'']">
|
|
15
|
+
<span class="el-input__suffix-inner">
|
|
16
|
+
<i class="el-select__caret el-input__icon el-icon-arrow-up" :class="{'is-reverse':showDrop}"></i>
|
|
17
|
+
</span>
|
|
18
|
+
</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div style="margin-left: 5px;display: flex;">
|
|
21
|
+
<component v-for="(router, index) in model.rowRouter" :key="index" :ref="'router'+router.id"
|
|
22
|
+
v-if="!router.rightField || model.listData[model.value][router.rightField] == 1"
|
|
23
|
+
:is="router.is" :vmodel="router" :api="model.optionApi" @click="fieldClickHandler(router)">
|
|
24
|
+
</component>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
import dynamicElement from '../../mixins/dynamicElement';
|
|
31
|
+
import selectOption from '../../selectOption/src/selectOption.vue';
|
|
32
|
+
import ctSelectOptionVertical from '../../selectOption/src/selectOptionVertical';
|
|
33
|
+
export default {
|
|
34
|
+
name: 'ct-contact',
|
|
35
|
+
mixins: [dynamicElement],
|
|
36
|
+
components: {
|
|
37
|
+
'ct-select-option': selectOption,
|
|
38
|
+
'ctSelectOptionVertical': ctSelectOptionVertical,
|
|
39
|
+
},
|
|
40
|
+
props: {
|
|
41
|
+
vmodel: Object,
|
|
42
|
+
api: String,
|
|
43
|
+
apiParam: Object,
|
|
44
|
+
apiRouter: {
|
|
45
|
+
Object,
|
|
46
|
+
default:{}
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
focus: false,
|
|
52
|
+
showDrop: false,
|
|
53
|
+
inputHeight: 26,
|
|
54
|
+
inputLineHeight: 26,
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
created() {
|
|
58
|
+
var self = this;
|
|
59
|
+
this.$nextTick(function () {
|
|
60
|
+
if (self.vmodel) {
|
|
61
|
+
self.load(self.vmodel);
|
|
62
|
+
}
|
|
63
|
+
else if (typeof self.source !== 'undefined') {
|
|
64
|
+
self.loaderObj.Contact(self.source,null,self.load);
|
|
65
|
+
}
|
|
66
|
+
else if (typeof self.api !== 'undefined' && self.apiParam) {
|
|
67
|
+
self.loaderObj.Contact(self.api,self.apiParam, self.load);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
activated() {
|
|
72
|
+
},
|
|
73
|
+
methods: {
|
|
74
|
+
load(data) {
|
|
75
|
+
this.model = data;
|
|
76
|
+
this.model.$vue = self;
|
|
77
|
+
if(this.model.listData.length>0){
|
|
78
|
+
this.model.text=data.listData[0][data.columns[0].id];
|
|
79
|
+
this.model.value=0;
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
focusHandle: function () {
|
|
83
|
+
this.$refs['ct-input'].focus();
|
|
84
|
+
this.$set(this, 'focus', true);
|
|
85
|
+
},
|
|
86
|
+
blurHandle: function () {
|
|
87
|
+
this.$set(this, 'focus', false);
|
|
88
|
+
},
|
|
89
|
+
clickHandle: function () {
|
|
90
|
+
if (this.model.lock) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
this.$set(this, 'showDrop', !this.showDrop);
|
|
94
|
+
if (this.showDrop) {
|
|
95
|
+
this.getOptions();
|
|
96
|
+
}
|
|
97
|
+
this.focusHandle();
|
|
98
|
+
},
|
|
99
|
+
selectOption(value) {
|
|
100
|
+
if (this.model.value === value) {
|
|
101
|
+
this.$set(this, 'showDrop', false);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
this.model.value = value;
|
|
106
|
+
}
|
|
107
|
+
this.soChange();
|
|
108
|
+
this.$set(this, 'showDrop', false);
|
|
109
|
+
},
|
|
110
|
+
getOptions: function () {
|
|
111
|
+
this.model.getOptions();
|
|
112
|
+
},
|
|
113
|
+
soChange: function () {
|
|
114
|
+
var self = this;
|
|
115
|
+
if (typeof this.model.child !== 'undefined') {
|
|
116
|
+
this.model.child.value = this.model.child.defaultValue || '';
|
|
117
|
+
this.model.child.text = this.model.child.defaultText || '';
|
|
118
|
+
}
|
|
119
|
+
var currentOption = this.model.options.find((value) => {
|
|
120
|
+
return self.model.value === value[self.model.optionAttrs.value];
|
|
121
|
+
});
|
|
122
|
+
if (currentOption) {
|
|
123
|
+
this.model.text = currentOption[self.model.optionAttrs.label];
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
this.model.text = '';
|
|
127
|
+
}
|
|
128
|
+
this.inputHandler(self.model.value);
|
|
129
|
+
this.changeHandler(self.model.value);
|
|
130
|
+
if(this.model.autoSearch) this.$emit('click');
|
|
131
|
+
},
|
|
132
|
+
fieldClickHandler(field) {
|
|
133
|
+
var self = this;
|
|
134
|
+
let submitData={};
|
|
135
|
+
var router = this.model.buttons.find((v) => {
|
|
136
|
+
return v.id === field.id;
|
|
137
|
+
});
|
|
138
|
+
if(router==undefined && this.model.actionRouter){
|
|
139
|
+
router = this.model.actionRouter.find((v) => {
|
|
140
|
+
return v.id === field.id;
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
if(router==undefined && this.model.otherTradeActionRouter){
|
|
144
|
+
if(field.id===this.model.otherTradeActionRouter.id){
|
|
145
|
+
router = this.model.otherTradeActionRouter
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if(router==undefined && this.model.operationRouters){
|
|
149
|
+
router = this.model.operationRouters.find((v) => {
|
|
150
|
+
return v.id === field.id;
|
|
151
|
+
});
|
|
152
|
+
callBack="loadOperation";
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if(router){
|
|
156
|
+
if(field.isSubmitDataFromSelf){
|
|
157
|
+
router.submitFormField.forEach((v) => {
|
|
158
|
+
submitData[v] = field.list[field.listIndex].code;
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
else{
|
|
162
|
+
router.submitFormField.forEach((v) => {
|
|
163
|
+
submitData[v] = self.model.listData[self.model.value][v];
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
this.routerClickHandler(router,submitData);
|
|
169
|
+
},
|
|
170
|
+
routerClickHandler(field, submitData,callBack) {
|
|
171
|
+
var self = this;
|
|
172
|
+
// this.model.scripts.$fd = field.id;
|
|
173
|
+
// this.model.scripts.$result = [];
|
|
174
|
+
|
|
175
|
+
var clickAcion = function (field) {
|
|
176
|
+
//若不是客户端方法,则直接访问接口
|
|
177
|
+
if (!field.isClientFuntion) {
|
|
178
|
+
// if (typeof field.onClick !== 'undefined') {
|
|
179
|
+
// verified = self.$common.excute.call(self.model.scripts, field.onClick);
|
|
180
|
+
// }
|
|
181
|
+
|
|
182
|
+
if (field.isOpenForm) {
|
|
183
|
+
var dialogOption = {
|
|
184
|
+
title: field.pageTitle,
|
|
185
|
+
pane: self.$common.getParentPane(self),
|
|
186
|
+
content: [{
|
|
187
|
+
component: 'ct-form',
|
|
188
|
+
attrs: {
|
|
189
|
+
api: field.action,
|
|
190
|
+
apiParam: field.getActionPara(submitData).para,
|
|
191
|
+
showTitle: false,
|
|
192
|
+
width: field.dialogWidth + 'px',
|
|
193
|
+
height: field.dialogHeight + 'px'
|
|
194
|
+
},
|
|
195
|
+
on: {
|
|
196
|
+
submit(ev) {
|
|
197
|
+
self.model.doAction(ev,field);
|
|
198
|
+
if(callBack){
|
|
199
|
+
callBack();
|
|
200
|
+
}
|
|
201
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}]
|
|
205
|
+
};
|
|
206
|
+
self.$common.openDialog(dialogOption);
|
|
207
|
+
}
|
|
208
|
+
else if (field.isOpenList) {
|
|
209
|
+
var dialogOption = {
|
|
210
|
+
title: field.pageTitle,
|
|
211
|
+
pane: self.$common.getParentPane(self),
|
|
212
|
+
content: [{
|
|
213
|
+
component: 'ct-searchlist',
|
|
214
|
+
attrs: {
|
|
215
|
+
searchConditionApi: field.actionForSearchLayout,
|
|
216
|
+
searchDataApi: field.actionForSearch,
|
|
217
|
+
apiParam: submitData,
|
|
218
|
+
width: field.dialogWidth + 'px',
|
|
219
|
+
height: field.dialogHeight + 'px'
|
|
220
|
+
},
|
|
221
|
+
on: {
|
|
222
|
+
submit(ev) {
|
|
223
|
+
self.model.updateFields(ev, () => {
|
|
224
|
+
self.$refs.Fields.forEach((fd) => {
|
|
225
|
+
fd.$forceUpdate();
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}]
|
|
232
|
+
};
|
|
233
|
+
self.$common.openDialog(dialogOption);
|
|
234
|
+
}
|
|
235
|
+
else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
|
|
236
|
+
submitData = field.getActionPara(submitData).para;
|
|
237
|
+
self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
|
|
238
|
+
}
|
|
239
|
+
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
240
|
+
submitData = field.getActionPara(submitData).para;
|
|
241
|
+
let query = self.$common.objectToQueryStr(submitData);
|
|
242
|
+
window.open(field.action + query, "_blank");
|
|
243
|
+
}
|
|
244
|
+
else{
|
|
245
|
+
field.doAction(submitData, (data) => {
|
|
246
|
+
self.model.doAction(data,field);
|
|
247
|
+
if(callBack){
|
|
248
|
+
callBack();
|
|
249
|
+
}
|
|
250
|
+
if(field.actionType===10){
|
|
251
|
+
self.loaderObj.Contact(data,null,self.load);
|
|
252
|
+
}
|
|
253
|
+
else if(field.actionType===19){
|
|
254
|
+
self.$refs['router'+field.id][0].callTelClick(data);
|
|
255
|
+
}
|
|
256
|
+
})
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
//执行客户端脚本
|
|
260
|
+
else {
|
|
261
|
+
submitData = field.getActionPara(submitData).para;
|
|
262
|
+
let title=field.pageTitle==undefined ?field.label:field.pageTitle;
|
|
263
|
+
submitData.actionType=field.actionType;
|
|
264
|
+
var fun =self.$common.getDataDrivenOpts().handler[field.action];
|
|
265
|
+
fun(submitData,title,self.model);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (field.isSubmit && !self.validExcute()) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (field.alert) {
|
|
274
|
+
self.$common.confirm(field.alertMsg, field.alertCaption, {
|
|
275
|
+
confirmButtonText: field.alertOKButtonText,
|
|
276
|
+
cancelButtonText: field.alertCancelButtonText,
|
|
277
|
+
//type: 'warning'
|
|
278
|
+
center: field.alertCenter
|
|
279
|
+
}).then(() => {
|
|
280
|
+
clickAcion(field,submitData);
|
|
281
|
+
}).catch(() => {
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
clickAcion(field,submitData);
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
</script>
|
|
291
|
+
<style lang="scss" scoped>
|
|
292
|
+
|
|
293
|
+
</style>
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<ct-PropertyDetailOFI :api="api" :apiParam="apiParam" class="ct-PropertyDetailOFI" v-if="pageType=='PropertyDetailOFI'"></ct-PropertyDetailOFI>
|
|
4
4
|
<ct-PropertyDetailRET :api="api" :apiParam="apiParam" class="ct-PropertyDetailRET" v-if="pageType=='PropertyDetailRET'"></ct-PropertyDetailRET>
|
|
5
|
-
<ct-PropertySimpleDetailRET :api="api" :apiParam="apiParam"
|
|
5
|
+
<ct-PropertySimpleDetailRET :api="api" :apiParam="apiParam" :selectIndex="selectIndex" :rowCount="rowCount" class="ct-PropertySimpleDetailRET"
|
|
6
|
+
@clickNextHandler="clickNextHandler" @clickPrevHandler="clickPrevHandler" @simpleRouterclickHandler="simpleRouterclickHandler"
|
|
7
|
+
v-if="pageType=='PropertySimpleDetailRET'" @closeSideHandler="closeSideHandler"></ct-PropertySimpleDetailRET>
|
|
6
8
|
</div>
|
|
7
9
|
</template>
|
|
8
10
|
|
|
@@ -22,6 +24,8 @@
|
|
|
22
24
|
api: String,
|
|
23
25
|
apiParam: Object,
|
|
24
26
|
pageType: String,
|
|
27
|
+
selectIndex:Number,
|
|
28
|
+
rowCount:Number,
|
|
25
29
|
},
|
|
26
30
|
data() {
|
|
27
31
|
return {
|
|
@@ -32,6 +36,18 @@
|
|
|
32
36
|
this.model = this.vmodel;
|
|
33
37
|
},
|
|
34
38
|
methods: {
|
|
39
|
+
closeSideHandler() {
|
|
40
|
+
this.$emit('closeSideHandler');
|
|
41
|
+
},
|
|
42
|
+
clickNextHandler() {
|
|
43
|
+
this.$emit('clickNextHandler');
|
|
44
|
+
},
|
|
45
|
+
clickPrevHandler() {
|
|
46
|
+
this.$emit('clickPrevHandler');
|
|
47
|
+
},
|
|
48
|
+
simpleRouterclickHandler(field,data) {
|
|
49
|
+
this.$emit('simpleRouterclickHandler',field,data);
|
|
50
|
+
},
|
|
35
51
|
}
|
|
36
52
|
}
|
|
37
53
|
</script>
|