centaline-data-driven 1.2.52 → 1.2.55

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.
@@ -44,6 +44,7 @@ const paths = {
44
44
  "dynamicViewer": "./src/centaline/dynamicViewer/index.js",//图片选择列表
45
45
  "dynamicRepeat": "./src/centaline/dynamicRepeat/index.js",//重复控件
46
46
  "dynamicCompound": "./src/centaline/dynamicCompound/index.js",//复合控件
47
+ "dynamicContact": "./src/centaline/dynamicContact/index.js",//联系人电话
47
48
  },
48
49
  "plugs": {
49
50
  "api": "./src/centaline/api/index.js",//调用API插件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.2.52",
3
+ "version": "1.2.55",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -319,7 +319,7 @@ html {
319
319
  }
320
320
  .spanMessage {
321
321
  font-size: 12px;
322
- padding: 2px 2px;
322
+ padding: 0px 2px;
323
323
  }
324
324
  .el-input__icon {
325
325
  height:initial;
@@ -240,4 +240,6 @@
240
240
  .el-radio__input.is-checked + .el-radio__label {
241
241
  color: #409eff;
242
242
  }
243
-
243
+ .ct-table-content .ct-table .ct-tr .cell img{
244
+ display: inherit;
245
+ }
@@ -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
- :type="model.isHyperLink ? 'text' : 'primary'"
39
- v-bind="model.attrs" @click="$emit('click',model)"
40
- :style="{color:model.textColor,backgroundColor:model.bgColor,borderColor:model.borderColor}"
41
- :icon="model.icon"
42
- :disabled="model.disabled || model.locked">
43
- {{model.label}}
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.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,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>
@@ -3,7 +3,7 @@
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
5
  <ct-PropertySimpleDetailRET :api="api" :apiParam="apiParam" :selectIndex="selectIndex" :rowCount="rowCount" class="ct-PropertySimpleDetailRET"
6
- @clickNextHandler="clickNextHandler" @clickPrevHandler="clickPrevHandler"
6
+ @clickNextHandler="clickNextHandler" @clickPrevHandler="clickPrevHandler" @simpleRouterclickHandler="simpleRouterclickHandler"
7
7
  v-if="pageType=='PropertySimpleDetailRET'" @closeSideHandler="closeSideHandler"></ct-PropertySimpleDetailRET>
8
8
  </div>
9
9
  </template>
@@ -45,6 +45,9 @@
45
45
  clickPrevHandler() {
46
46
  this.$emit('clickPrevHandler');
47
47
  },
48
+ simpleRouterclickHandler(field,data) {
49
+ this.$emit('simpleRouterclickHandler',field,data);
50
+ },
48
51
  }
49
52
  }
50
53
  </script>
@@ -179,7 +179,8 @@
179
179
  </div>
180
180
  <div class="t-item"><span class="i" :class="'operation'+col.flagKey">{{col.desc}}</span></div>
181
181
  <div class="t-item" style="min-height: 50px;">
182
- <component class="el-button t-but el-button--info max-info" v-if="col.router && col.router.show" :is="col.router.is" :vmodel="col.router" :api="model.optionApi" @click="fieldClickHandler(col.router,$event)"></component>
182
+ <component v-for="(router, routerIndex) in col.routers" :key="routerIndex" :is="router.is" :vmodel="router" :api="model.optionApi"
183
+ @click="fieldClickHandler(router,$event)" class="el-button t-but el-button--info max-info"></component>
183
184
  </div>
184
185
  </div>
185
186
  </div>
@@ -594,10 +595,10 @@
594
595
  }
595
596
  </script>
596
597
  <style lang="scss" scoped>
597
- .operation0{
598
+ .operation0,.operation20,.operation-1000{
598
599
  color: #000000;
599
600
  }
600
- .operation1{
601
+ .operation1,.operation10{
601
602
  color: #388cd3;
602
603
  }
603
604
  .operation2{
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div ref="main" class="main" v-if="model!==null">
3
3
  <div style="height:36px;margin-top: 10px;display: flex;border-bottom: solid 2px #EE6B6B;">
4
- <img src="../../../assets/ewmA.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:22px;cursor: pointer">
4
+ <img :src="model.fields1Dic.ewmUrl.value" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:22px;cursor: pointer">
5
5
  <div :style="{'width':topWidth+'px'}" style="font-size: 14px;color: #333333;padding-left: 10px;line-height: 26px;">
6
6
  <span>{{model.fields1Dic.PropertyNo.label}}</span>
7
7
  <span>{{model.fields1Dic.PropertyNo.value}}</span>
@@ -14,12 +14,12 @@
14
14
  </div>
15
15
  <div style="padding-left: 20px;padding-right: 20px;">
16
16
  <div style="margin-top: 18px;">
17
- <div style="font-weight: Bold;font-size: 16px;color: #333333;">
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>
20
20
  <span>{{model.fields1Dic.RoomNo.value}}</span>
21
- <div style="float:right;border: 1px solid #E0E0E0;font-size: 12px;color: #333333;padding-top: 3px;
22
- width: 68px;height: 26px;border-radius: 6px;text-align: center;">
21
+ <div style="border: 1px solid #E0E0E0;font-size: 12px;color: #333333;padding-top: 3px;
22
+ width: 68px;height: 26px;border-radius: 6px;text-align: center;margin-left: auto;">
23
23
  {{model.fields1Dic.StatusName.value}}
24
24
  </div>
25
25
  </div>
@@ -34,10 +34,10 @@
34
34
  </div>
35
35
  </div>
36
36
  </div>
37
- <div style="display: flex;margin-top: 16px;height: 65px;border: 1px solid #ECEFF2;box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06);border-radius: 6px;text-align: center;">
37
+ <div style="margin-top: 16px;display: flex;height: 65px;border: 1px solid #ECEFF2;box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06);border-radius: 6px;text-align: center;">
38
38
  <div style="width: 33.33%;">
39
- <div style="margin-top: 13px;font-size: 12px;">{{model.fields1Dic.AreaNet.label}}</div>
40
- <div style="margin-top: 7px;font-size: 14px;font-weight: Bold;color: #EE6B6B;">{{model.fields1Dic.AreaNet.value}}{{model.fields1Dic.AreaNet.unitName}}</div>
39
+ <div style="margin-top: 13px;font-size: 12px;">{{model.fields1Dic.Area.label}}</div>
40
+ <div style="margin-top: 7px;font-size: 14px;font-weight: Bold;color: #EE6B6B;">{{model.fields1Dic.Area.value}}{{model.fields1Dic.Area.unitName}}</div>
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>
@@ -48,16 +48,39 @@
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" 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>
53
+ </div>
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
+ :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
+ </component>
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
+ <div class="tab-list" style="border-bottom:none">
64
+ <component v-for="(router, index) in model.actionRoutersSimple.slice(showIndex)" :key="index"
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
+ </component>
68
+ </div>
69
+ <span :slot="showIndex>0?'reference':''" class="icon-more" style="margin-left: 10px;"></span>
70
+ </el-popover>
71
+ </div>
51
72
  </div>
52
73
  </div>
53
74
  </template>
54
75
 
55
76
  <script>
56
77
  import dynamicElement from '../../mixins/dynamicElement';
78
+ import dynamicContact from '../../dynamicContact/src/dynamicContact.vue';
57
79
  export default {
58
80
  name: 'ct-PropertySimpleDetailRET',
59
81
  mixins: [dynamicElement],
60
82
  components: {
83
+ 'ct-contact': dynamicContact,
61
84
  },
62
85
  props: {
63
86
  vmodel: Object,
@@ -71,6 +94,14 @@
71
94
  data() {
72
95
  return {
73
96
  topWidth:300,
97
+ showIndex:0,
98
+ option: {
99
+ isHidden: true,//是否开启操作栏隐藏设置,默认开启
100
+ showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
101
+ appendId: '',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
102
+ trigger: 'hover',//触发方式,传值可查看Popper UI组件trigger属性
103
+ placement: 'right-start',//方向,传值可查看Popper UI组件placement属性
104
+ },
74
105
  }
75
106
  },
76
107
  mounted() {
@@ -110,10 +141,27 @@
110
141
  });
111
142
  },
112
143
  setDetailStyle() {
144
+ let self=this;
113
145
  this.$nextTick(() => {
114
146
  if(this.$refs.main){
115
147
  this.topWidth=this.$refs.main.clientWidth-140;
116
148
  }
149
+
150
+ let totalWidth=self.$refs.routers.offsetWidth;
151
+ let sumWidth=0;
152
+ let moreWidth = 20;
153
+ self.model.actionRoutersSimple.forEach((v,i) => {
154
+ if(!v.rightField || (self.model.fields1Dic[v.rightField] && self.model.fields1Dic[v.rightField].value == 1)){
155
+ if(self.$refs['routers'+i][0] && self.$refs['routers'+i][0].$el){
156
+ if(sumWidth+self.$refs['routers'+i][0].$el.offsetWidth+moreWidth+10>totalWidth && self.showIndex===0){
157
+ self.showIndex=i;
158
+ }
159
+ else{
160
+ sumWidth=sumWidth+self.$refs['routers'+i][0].$el.offsetWidth+(i>0?10:0);
161
+ }
162
+ }
163
+ }
164
+ });
117
165
  });
118
166
  },
119
167
  loadFields() {
@@ -162,9 +210,6 @@
162
210
  this.model._operationRouters=[];
163
211
  this.model.getOperationList();
164
212
  },
165
- lookOwner() {
166
- this.codeOwner = true
167
- },
168
213
  handleClick(tab, event) {
169
214
  let i=tab.index;
170
215
  if(this.model.tags2 && this.model.tags2[i]){
@@ -182,6 +227,10 @@
182
227
  }
183
228
  },
184
229
  fieldClickHandler(field) {
230
+ if(this.$refs['popover0']){
231
+ this.$refs['popover0'].doClose();
232
+ }
233
+
185
234
  var self = this;
186
235
  var callBack=null;
187
236
  let submitData={};
@@ -257,6 +306,7 @@
257
306
  callBack();
258
307
  }
259
308
  self.$common.closeDialog(dialogOption.dialog);
309
+ self.$emit('simpleRouterclickHandler',field,ev);
260
310
  }
261
311
  }
262
312
  }]
@@ -305,6 +355,7 @@
305
355
  if(callBack){
306
356
  callBack();
307
357
  }
358
+ self.$emit('simpleRouterclickHandler',field,data);
308
359
  })
309
360
  }
310
361
  }