centaline-data-driven 1.2.73 → 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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.2.73",
3
+ "version": "1.2.74",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -4,14 +4,14 @@
4
4
 
5
5
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist> -->
6
6
 
7
- <!-- <ct-searchlist :searchConditionApi="'/cache/getLayoutOfSearchForCache'"
8
- :searchDataApi="'/cache/getListOfSearchModelForCache'"></ct-searchlist> -->
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> -->
@@ -787,8 +787,15 @@
787
787
  }
788
788
  .expand-f {
789
789
  line-height: 15px;
790
- font-size: 18px;
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;
@@ -113,7 +113,7 @@
113
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" v-html="model.fields1Dic.PriceUnit.value"></span><span class="base-clolr">{{model.fields1Dic.PriceUnit.unitName}}</span></div>
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>
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">
@@ -580,7 +580,7 @@
580
580
  let title=field.pageTitle==undefined ?field.label:field.pageTitle;
581
581
  submitData.actionType=field.actionType;
582
582
  var fun =self.$common.getDataDrivenOpts().handler[field.action];
583
- fun(submitData,title,self.model);
583
+ fun(submitData,title,null);
584
584
  }
585
585
  }
586
586
 
@@ -812,8 +812,15 @@
812
812
  }
813
813
  .expand-f {
814
814
  line-height: 15px;
815
- font-size: 18px;
815
+ font-size: 16px;
816
816
  font-weight: bold;
817
+ img{
818
+ width: 15px!important;
819
+ margin-left: 0!important;
820
+ }
821
+ span{
822
+ float:right;
823
+ }
817
824
  }
818
825
  .img-jsq{
819
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
- :style="{color:tag.textColor,backgroundColor:tag.bgColor,borderColor:tag.borderColor}">
33
- {{tag.label}}
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;">{{model.fields1Dic.Price.value}}{{model.fields1Dic.Price.unitName}}</div>
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" >
51
+ <div ref="contact" id="contact" style="margin-top: 16px;" v-if="model.contactApiRouter!==null">
52
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
- :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)">
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
- class="Stats-popover" popper-class="el-popover1" :placement="option.placement?option.placement:'left'"
62
- :trigger="option.trigger?option.trigger:''">
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
- 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)">
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
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>
@@ -95,7 +109,8 @@
95
109
  return {
96
110
  refreshKey:0,
97
111
  topWidth:300,
98
- showIndex:0,
112
+ showIndex: 0,
113
+ listKey: 0,
99
114
  option: {
100
115
  isHidden: true,//是否开启操作栏隐藏设置,默认开启
101
116
  showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
@@ -127,6 +142,7 @@
127
142
  methods: {
128
143
  load(data) {
129
144
  var self = this;
145
+ this.refershKey = this.refershKey + 1;
130
146
  this.model = data;
131
147
  this.model.$vue = self;
132
148
  this.loadFields();
@@ -229,10 +245,10 @@
229
245
  let i=key.index;
230
246
  this.model.activeIndex1=i;
231
247
  if(this.model.tags1 && this.model.tags1[i]){
232
- // this.model.searchlistKey=this.model.searchlistKey+1;
233
- // this.model.searchConditionApiTags1=this.model.tags1[i].searchConditionApiUrl||'';
234
- // this.model.searchDataApiTags1=this.model.tags1[i].searchDataApiUrl||'';
235
- // this.model.paramDataTags1=this.model.tags1[i].paramData||'';
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 || '';
236
252
  }
237
253
  },
238
254
  fieldClickHandler(field) {
@@ -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;
@@ -0,0 +1,311 @@
1
+ <template>
2
+ <div v-loading="loading" class="ct-Layout" v-if="Layout !== null && !loading">
3
+ <ct-layoutchildren v-for="(item, index) in Layout.fields" :key="index":vmodel="item" :rowindex="index" @click="rolRouterClickHandler"></ct-layoutchildren>
4
+ </div>
5
+ </template>
6
+ <script>
7
+ import dynamicElement from '../../mixins/dynamicElement'
8
+ import dynamicLayoutChildren from './dynamicLayoutChildren.vue';
9
+ import common from '../../common';
10
+ export default {
11
+ name: 'ct-layout',
12
+ mixins: [dynamicElement],
13
+ components: {
14
+ 'ct-layoutchildren': dynamicLayoutChildren
15
+ },
16
+ props: {
17
+ api: String,
18
+ cellLayout: String,
19
+ vmodel: Object,
20
+ listData: Array,
21
+ apiParam: Object
22
+ },
23
+ data() {
24
+ return {
25
+ Layout:[]
26
+ };
27
+ },
28
+ created() {
29
+ this.init();
30
+ },
31
+ methods: {
32
+ init() {
33
+ var self = this;
34
+ //初始化
35
+ this.loading = true;
36
+ this.$nextTick(function () {
37
+ if (typeof self.api !== 'undefined') {
38
+ self.loaderObj.CellLayout(self.api, self.load, this.apiParam, self.failLoad);
39
+ }
40
+ else if (typeof self.vmodel !== 'undefined') {
41
+ self.load(self.vmodel);
42
+ }
43
+
44
+ });
45
+
46
+ },
47
+ failLoad() {
48
+ this.$emit('failLoad', this.model);
49
+ },
50
+ load(data) {
51
+ this.model = data;
52
+ if (data.rows.length > 0) {
53
+ var str = '<Layout orientation="vertical">';
54
+ for (var i = 0; i < data.rows.length; i++) {
55
+ str += data.cellLayout.replace(/\{\{(.+?)\}\}/g, (...args) => {
56
+ return this.getValue(data.rows[i], args[1])
57
+ });
58
+ }
59
+ str += '</Layout>';
60
+ }
61
+ var xmlDOM = this.loadXML(str);
62
+ this.Layout = this.xmlToJson(xmlDOM.childNodes[0]);
63
+ this.loading = false;
64
+ this.$emit('loaded', this.model);
65
+ },
66
+ getValue(data,val) {
67
+ return val.split('.').reduce((data, currentVal) => {
68
+ return data[currentVal]
69
+ }, data)
70
+ },
71
+ loadXML(xmlString) {
72
+ if (document.all) {
73
+ var xmlDom = new ActiveXObject("Microsoft.XMLDOM");
74
+ xmlDom.loadXML(xmlString)
75
+ return xmlDom
76
+ }
77
+ else {
78
+ return new DOMParser().parseFromString(xmlString, "text/xml");
79
+ }
80
+ },
81
+
82
+ xmlToJson(xml) {
83
+ // Create the return object
84
+ var obj = {};
85
+ var buffer = [];
86
+ if (xml.nodeType == 1) { // element
87
+ // do attributes
88
+ if (xml.attributes.length > 0) {
89
+ for (var j = 0; j < xml.attributes.length; j++) {
90
+ var attribute = xml.attributes.item(j);
91
+ obj[attribute.nodeName] = attribute.nodeValue;
92
+ }
93
+ }
94
+ }
95
+ if (xml.nodeName.toLowerCase() == "Layout".toLowerCase() || xml.nodeName.toLowerCase() == "StackLayout".toLowerCase()) {
96
+ obj["is"] = "ct-layoutchildren";
97
+ }
98
+ else if (xml.nodeName.toLowerCase() == "Label".toLowerCase()) {
99
+ obj["is"] = "ct-layoutlabel";
100
+ }
101
+ else if (xml.nodeName.toLowerCase() == "Line".toLowerCase()) {
102
+ obj["is"] = "ct-layoutline";
103
+ }
104
+ else if (xml.nodeName.toLowerCase() == "Image".toLowerCase()) {
105
+ obj["is"] = "ct-layoutimage";
106
+ }
107
+ obj["type"] = xml.nodeName;
108
+ // do children
109
+ if (xml.hasChildNodes()) {
110
+ for (var i = 0; i < xml.childNodes.length; i++) {
111
+ var item = xml.childNodes.item(i);
112
+ var nodeName = item.nodeName;
113
+ if (typeof (obj["fields"]) == "undefined") {
114
+ obj["fields"] = [];
115
+ obj["fields"].push(this.xmlToJson(item));
116
+ } else {
117
+ if (typeof (obj["fields"].push) == "undefined") {
118
+ var old = obj["fields"];
119
+ obj["fields"] = [];
120
+ obj["fields"].push(old);
121
+ }
122
+ obj["fields"].push(this.xmlToJson(item));
123
+ }
124
+ }
125
+ }
126
+ return obj;
127
+ },
128
+ rolRouterClickHandler(routerKey, rowindex) {
129
+ var self = this;
130
+ var submitData = {};
131
+ var rowData = self.model.rows[rowindex];
132
+ var actionRouter = [];
133
+ if (self.model.actionRouters) {
134
+ self.model.actionRouters.forEach((v) => {
135
+ var field = self.loaderObj.Router(v);
136
+ actionRouter.push(field);
137
+ });
138
+ }
139
+ let field = actionRouter.find(b => {
140
+ return b.id === routerKey;
141
+ });
142
+ field.submitListField.forEach((k) => {
143
+ submitData[k] = rowData[k];
144
+ });
145
+
146
+ let action = field.action;
147
+ if (field.actionField) {
148
+ action = rowData[field.actionField];
149
+ }
150
+ this.routerClickHandler(field, submitData, action);
151
+ },
152
+ routerClickHandler(field, submitData, action) {
153
+ let self = this;
154
+ action = action || field.action;
155
+
156
+ var clickAcion = function () {
157
+ //若不是客户端方法,则直接访问接口
158
+ if (!field.isClientFuntion) {
159
+ // 外部框架tab页打开
160
+ if (field.isFormPageInTab || field.isSearchPageInTab) {
161
+ submitData = field.getActionPara(submitData).para;
162
+ if (field.pageStyle) {
163
+ submitData.pageStyle = field.pageStyle;
164
+ }
165
+ self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model, field.dialogWidth);
166
+ }
167
+ else if (field.isBrowserNewTab) {// 浏览器打开
168
+ submitData = field.getActionPara(submitData).para;
169
+ let query = self.$common.objectToQueryStr(submitData);
170
+ window.open(action + query, "_blank");
171
+ }
172
+ else {
173
+ //self.operationLoading = true;
174
+
175
+ //Form
176
+ if (field.isOpenForm) {
177
+ var dialogOption = {
178
+ title: field.pageTitle,
179
+ pane: self.$common.getParentPane(self),
180
+ content: [{
181
+ component: field.navToNewPageName,
182
+ attrs: {
183
+ //source: data.content,
184
+ api: action,
185
+ apiParam: field.getActionPara(submitData).para,
186
+ showTitle: false,
187
+ width: field.dialogWidth + 'px',
188
+ height: field.dialogHeight + 'px'
189
+ },
190
+ on: {
191
+ submit(ev) {
192
+ if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
193
+ self.model.doAction(ev);
194
+ }
195
+ self.$forceUpdate();
196
+ self.$refs.footer.$forceUpdate();
197
+ self.$common.closeDialog(dialogOption.dialog);
198
+ self.updateCurrentRow(field, ev);
199
+ },
200
+ refreshParent() {
201
+ self.getPage(1);
202
+ self.$common.closeDialog(dialogOption.dialog);
203
+ },
204
+ closeDialog() {
205
+ self.updateCurrentRow(field);
206
+ }
207
+ }
208
+ }]
209
+ };
210
+ self.$common.openDialog(dialogOption);
211
+ }
212
+ //SearchList
213
+ else if (field.isOpenList) {
214
+ var dialogOption = {
215
+ title: field.pageTitle,
216
+ pane: self.$common.getParentPane(self),
217
+ content: [{
218
+ component: field.navToNewPageName,
219
+ attrs: {
220
+ searchConditionApi: field.actionForSearchLayout,
221
+ searchDataApi: field.actionForSearch,
222
+ apiParam: submitData,
223
+ width: field.dialogWidth + 'px',
224
+ height: field.dialogHeight + 'px'
225
+ },
226
+ on: {
227
+ refreshParent() {
228
+ self.getPage(1);
229
+ self.$common.closeDialog(dialogOption.dialog);
230
+ },
231
+ closeDialog() {
232
+ self.updateCurrentRow(field);
233
+ }
234
+ }
235
+ }]
236
+ };
237
+ self.$common.openDialog(dialogOption);
238
+ }
239
+ //Tabs
240
+ else if (field.isOpenTabs) {
241
+ var dialogOption = {
242
+ title: field.pageTitle,
243
+ pane: self.$common.getParentPane(self),
244
+ content: [{
245
+ component: field.navToNewPageName,
246
+ attrs: {
247
+ searchConditionApi: field.actionForSearchLayout,
248
+ searchDataApi: field.actionForSearch,
249
+ apiParam: submitData,
250
+ width: field.dialogWidth + 'px',
251
+ height: field.dialogHeight + 'px'
252
+ },
253
+ on: {
254
+ }
255
+ }]
256
+ };
257
+ self.$common.openDialog(dialogOption);
258
+ }
259
+ else {
260
+ self.operationLoading = true;
261
+ field.doAction(submitData, (data) => {
262
+ self.operationLoading = false;
263
+ if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
264
+ self.model.doAction({ responseData: data });
265
+ }
266
+ self.$forceUpdate();
267
+ self.$refs.footer.$forceUpdate();
268
+ self.updateCurrentRow(field, data);
269
+ })
270
+ }
271
+ }
272
+ }
273
+ //执行客户端脚本
274
+ else {
275
+ // let parm={submitData:submitData,field:field}
276
+ // self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
277
+ let title = field.pageTitle == undefined ? field.label : field.pageTitle;
278
+ submitData.actionType = field.actionType;
279
+ var fun = self.$common.getDataDrivenOpts().handler[action];
280
+ fun(submitData, title, self.model);
281
+ // var fun = self.model.scripts.formData[action];
282
+ // fun(submitData,field);
283
+ }
284
+ }
285
+
286
+ if (field.alert) {
287
+ self.$common.confirm(field.alertMsg, field.alertCaption, {
288
+ confirmButtonText: field.alertOKButtonText,
289
+ cancelButtonText: field.alertCancelButtonText,
290
+ //type: 'warning'
291
+ center: field.alertCenter
292
+ }).then(() => {
293
+ clickAcion();
294
+ }).catch(() => {
295
+ });
296
+ }
297
+ else {
298
+ clickAcion();
299
+ }
300
+ },
301
+ },
302
+ mounted() {
303
+
304
+ }
305
+ }
306
+ </script>
307
+ <style>
308
+ .ct-Layout {
309
+ font-size: 12px;
310
+ }
311
+ </style>
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <el-container :direction="model.orientation" :style="model.styleObject">
3
+ <component v-for="(item, index) in model.fields" :key="index" :is="item.is" :vmodel="item" :rowindex="rowindex" @click="clickHandler"></component>
4
+ </el-container>
5
+ </template>
6
+ <script>
7
+ import dynamicElement from '../../mixins/dynamicElement'
8
+ import dynamicLayoutLabel from './dynamicLayoutLabel.vue';
9
+ import dynamicLayoutLine from './dynamicLayoutLine.vue';
10
+ import dynamicLayoutImage from './dynamicLayoutImage.vue';
11
+ export default {
12
+ name: 'ct-layoutchildren',
13
+ mixins: [dynamicElement],
14
+ components: {
15
+ 'ct-layoutlabel': dynamicLayoutLabel,
16
+ 'ct-layoutline': dynamicLayoutLine,
17
+ 'ct-layoutimage': dynamicLayoutImage
18
+ },
19
+ props: {
20
+ vmodel: Object,
21
+ rowindex: Number
22
+ },
23
+ data() {
24
+ return {
25
+
26
+ };
27
+ },
28
+ created() {
29
+ this.model = this.loaderObj.CellLayout(this.vmodel);
30
+
31
+ },
32
+ methods: {
33
+ clickHandler(routerKey, rowindex) {
34
+ this.$emit('click', routerKey, rowindex);
35
+ }
36
+ },
37
+ mounted() {
38
+
39
+ }
40
+ }
41
+ </script>
42
+ <style>
43
+
44
+ </style>
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <div v-if="model.routerKey" :style="model.styleObject">
3
+ <img class="ct-tablecurrencyImg ct-tablecurrencyItem" :src="model.value" @click="clickHandler($event)" />
4
+ </div>
5
+ <div v-else :style="model.styleObject">
6
+ <el-image :src="model.value"
7
+ fit="fit"></el-image>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ import dynamicElement from '../../mixins/dynamicElement'
13
+ export default {
14
+ name: 'ct-layoutimage',
15
+ mixins: [dynamicElement],
16
+ props: {
17
+ vmodel: Object,
18
+ rowindex: Number
19
+ },
20
+ data() {
21
+ return {
22
+ }
23
+ },
24
+ created() {
25
+ if (typeof this.vmodel !== 'undefined') {
26
+ this.model = this.loaderObj.CellLayout(this.vmodel);
27
+ }
28
+ },
29
+
30
+ methods: {
31
+ clickHandler(ev) {
32
+ this.$emit('click', this.model.routerKey, this.rowindex);
33
+ }
34
+ },
35
+ computed: {
36
+
37
+ }
38
+ }
39
+ </script>
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <div v-if="model.routerKey" :style="model.styleObject">
3
+ <a href="javascript:void(0);" @click="clickHandler($event)" class="ct-tablecurrencyItem">
4
+ {{model.value}}
5
+ </a>
6
+ </div>
7
+ <div v-else :style="model.styleObject" v-html="model.value">
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ import dynamicElement from '../../mixins/dynamicElement'
13
+ export default {
14
+ name: 'ct-layoutlabel',
15
+ mixins: [dynamicElement],
16
+ props: {
17
+ vmodel: Object,
18
+ rowindex: Number
19
+ },
20
+ data() {
21
+ return {
22
+ }
23
+ },
24
+ created() {
25
+ this.model = this.loaderObj.CellLayout(this.vmodel);
26
+ },
27
+
28
+ methods: {
29
+ clickHandler(ev) {
30
+ this.$emit('click', this.model.routerKey, this.rowindex);
31
+ }
32
+ },
33
+ computed: {
34
+
35
+ }
36
+ }
37
+ </script>
38
+ <style>
39
+ .ct-tablecurrencyItem {
40
+ text-decoration: none;
41
+ padding-left: 0px;
42
+ padding-right: 4px;
43
+ cursor: pointer;
44
+ color: #388cd3;
45
+ }
46
+
47
+ .ct-tablecurrencyItem:hover {
48
+ color: #23527c;
49
+ }
50
+
51
+ .ct-tablecurrencyImg {
52
+ width: 24px;
53
+ margin-top: 2px;
54
+ }
55
+ </style>