centaline-data-driven 1.2.73 → 1.2.76

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.76",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/src/Form.vue CHANGED
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div id="app-form" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
- <ct-form :api="'/salematter/squareupload/readDetail'" :apiParam="apiParam"></ct-form>
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
- <!-- <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form> -->
6
+ <ct-form :api="'/api/third-dept-tran/transaction/detail'" :apiParam="apiParam"></ct-form>
7
7
  <!--<ct-form :api="'api/Form/formdata'"></ct-form>-->
8
8
  <ct-dialog-list></ct-dialog-list>
9
9
  </div>
@@ -18,7 +18,11 @@
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":2,"jsonData":{}}
21
+ apiParam:{actionType: "3",
22
+ originalTraId: "1522961155108978690",
23
+ pageOnly: "true",
24
+ pageStyle: "2",
25
+ pageTitle: "成交报告"}
22
26
  }
23
27
  },
24
28
  methods: {
@@ -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) {
@@ -150,7 +150,6 @@
150
150
  if (!isCancel) {
151
151
  if (app.model.currentRow.isNew) app.model.tableData.splice(index, 1);
152
152
  return row.isSet = !row.isSet;
153
- app.model.currentRow.isSet = false;
154
153
  }
155
154
  //提交数据
156
155
  if (row.isSet) {//保存
@@ -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,300 @@
1
+ <template>
2
+ <div v-loading="loading" class="ct-Layout" v-if="Layout !== null && !loading">
3
+ <ct-layoutchildren :rowindex="rowindex" :vmodel="Layout" @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
+ rowindex: Number,
21
+ actionRouter: Array,
22
+ listData: Array,
23
+ apiParam: Object
24
+ },
25
+ data() {
26
+ return {
27
+ Layout:[]
28
+ };
29
+ },
30
+ created() {
31
+ this.init();
32
+ },
33
+ methods: {
34
+ init() {
35
+ var self = this;
36
+ //初始化
37
+ this.loading = true;
38
+ this.$nextTick(function () {
39
+ if (typeof self.api !== 'undefined') {
40
+ self.loaderObj.CellLayout(self.api, self.load, this.apiParam, self.failLoad);
41
+ }
42
+ else if (typeof self.vmodel !== 'undefined') {
43
+ self.load(self.vmodel, self.cellLayout);
44
+ }
45
+ });
46
+ },
47
+ failLoad() {
48
+ this.$emit('failLoad', this.model);
49
+ },
50
+ load(data, cellLayout) {
51
+ var str = '';
52
+ if (typeof data !== 'undefined') {
53
+ str = cellLayout.replace(/\{\{(.+?)\}\}/g, (...args) => {
54
+ return this.getValue(data, args[1])
55
+ });
56
+ }
57
+ var xmlDOM = this.loadXML(str);
58
+ this.Layout = this.xmlToJson(xmlDOM.childNodes[0]);
59
+ this.loading = false;
60
+ },
61
+ getValue(data,val) {
62
+ return val.split('.').reduce((data, currentVal) => {
63
+ return data[currentVal]
64
+ }, data)
65
+ },
66
+ loadXML(xmlString) {
67
+ if (document.all) {
68
+ var xmlDom = new ActiveXObject("Microsoft.XMLDOM");
69
+ xmlDom.loadXML(xmlString)
70
+ return xmlDom
71
+ }
72
+ else {
73
+ return new DOMParser().parseFromString(xmlString, "text/xml");
74
+ }
75
+ },
76
+
77
+ xmlToJson(xml) {
78
+ // Create the return object
79
+ var obj = {};
80
+ if (xml.nodeType == 1) { // element
81
+ // do attributes
82
+ if (xml.attributes.length > 0) {
83
+ for (var j = 0; j < xml.attributes.length; j++) {
84
+ var attribute = xml.attributes.item(j);
85
+ obj[attribute.nodeName] = attribute.nodeValue;
86
+ }
87
+ }
88
+ }
89
+ if (xml.nodeName.toLowerCase() == "Layout".toLowerCase() || xml.nodeName.toLowerCase() == "StackLayout".toLowerCase()) {
90
+ obj["is"] = "ct-layoutchildren";
91
+ }
92
+ else if (xml.nodeName.toLowerCase() == "Label".toLowerCase()) {
93
+ obj["is"] = "ct-layoutlabel";
94
+ }
95
+ else if (xml.nodeName.toLowerCase() == "Line".toLowerCase()) {
96
+ obj["is"] = "ct-layoutline";
97
+ }
98
+ else if (xml.nodeName.toLowerCase() == "Image".toLowerCase()) {
99
+ obj["is"] = "ct-layoutimage";
100
+ }
101
+ obj["type"] = xml.nodeName;
102
+ // do children
103
+ if (xml.hasChildNodes()) {
104
+ for (var i = 0; i < xml.childNodes.length; i++) {
105
+ var item = xml.childNodes.item(i);
106
+ var nodeName = item.nodeName;
107
+ if (typeof (obj["fields"]) == "undefined") {
108
+ obj["fields"] = [];
109
+ obj["fields"].push(this.xmlToJson(item));
110
+ } else {
111
+ if (typeof (obj["fields"].push) == "undefined") {
112
+ var old = obj["fields"];
113
+ obj["fields"] = [];
114
+ obj["fields"].push(old);
115
+ }
116
+ obj["fields"].push(this.xmlToJson(item));
117
+ }
118
+ }
119
+ }
120
+ return obj;
121
+ },
122
+ rolRouterClickHandler(routerKey, rowindex) {
123
+ var self = this;
124
+ var submitData = {};
125
+ var rowData = self.vmodel;
126
+ var actionRouter = self.actionRouter;
127
+ debugger
128
+ let field = actionRouter.find(b => {
129
+ return b.id === routerKey;
130
+ });
131
+ field.submitListField.forEach((k) => {
132
+ submitData[k] = rowData[k];
133
+ });
134
+
135
+ let action = field.action;
136
+ if (field.actionField) {
137
+ action = rowData[field.actionField];
138
+ }
139
+ this.routerClickHandler(field, submitData, action);
140
+ },
141
+ routerClickHandler(field, submitData, action) {
142
+ let self = this;
143
+ action = action || field.action;
144
+
145
+ var clickAcion = function () {
146
+ //若不是客户端方法,则直接访问接口
147
+ if (!field.isClientFuntion) {
148
+ // 外部框架tab页打开
149
+ if (field.isFormPageInTab || field.isSearchPageInTab) {
150
+ submitData = field.getActionPara(submitData).para;
151
+ if (field.pageStyle) {
152
+ submitData.pageStyle = field.pageStyle;
153
+ }
154
+ self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model, field.dialogWidth);
155
+ }
156
+ else if (field.isBrowserNewTab) {// 浏览器打开
157
+ submitData = field.getActionPara(submitData).para;
158
+ let query = self.$common.objectToQueryStr(submitData);
159
+ window.open(action + query, "_blank");
160
+ }
161
+ else {
162
+ //self.operationLoading = true;
163
+
164
+ //Form
165
+ if (field.isOpenForm) {
166
+ var dialogOption = {
167
+ title: field.pageTitle,
168
+ pane: self.$common.getParentPane(self),
169
+ content: [{
170
+ component: field.navToNewPageName,
171
+ attrs: {
172
+ //source: data.content,
173
+ api: action,
174
+ apiParam: field.getActionPara(submitData).para,
175
+ showTitle: false,
176
+ width: field.dialogWidth + 'px',
177
+ height: field.dialogHeight + 'px'
178
+ },
179
+ on: {
180
+ submit(ev) {
181
+ if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
182
+ self.model.doAction(ev);
183
+ }
184
+ self.$forceUpdate();
185
+ self.$refs.footer.$forceUpdate();
186
+ self.$common.closeDialog(dialogOption.dialog);
187
+ self.updateCurrentRow(field, ev);
188
+ },
189
+ refreshParent() {
190
+ self.getPage(1);
191
+ self.$common.closeDialog(dialogOption.dialog);
192
+ },
193
+ closeDialog() {
194
+ self.updateCurrentRow(field);
195
+ }
196
+ }
197
+ }]
198
+ };
199
+ self.$common.openDialog(dialogOption);
200
+ }
201
+ //SearchList
202
+ else if (field.isOpenList) {
203
+ var dialogOption = {
204
+ title: field.pageTitle,
205
+ pane: self.$common.getParentPane(self),
206
+ content: [{
207
+ component: field.navToNewPageName,
208
+ attrs: {
209
+ searchConditionApi: field.actionForSearchLayout,
210
+ searchDataApi: field.actionForSearch,
211
+ apiParam: submitData,
212
+ width: field.dialogWidth + 'px',
213
+ height: field.dialogHeight + 'px'
214
+ },
215
+ on: {
216
+ refreshParent() {
217
+ self.getPage(1);
218
+ self.$common.closeDialog(dialogOption.dialog);
219
+ },
220
+ closeDialog() {
221
+ self.updateCurrentRow(field);
222
+ }
223
+ }
224
+ }]
225
+ };
226
+ self.$common.openDialog(dialogOption);
227
+ }
228
+ //Tabs
229
+ else if (field.isOpenTabs) {
230
+ var dialogOption = {
231
+ title: field.pageTitle,
232
+ pane: self.$common.getParentPane(self),
233
+ content: [{
234
+ component: field.navToNewPageName,
235
+ attrs: {
236
+ searchConditionApi: field.actionForSearchLayout,
237
+ searchDataApi: field.actionForSearch,
238
+ apiParam: submitData,
239
+ width: field.dialogWidth + 'px',
240
+ height: field.dialogHeight + 'px'
241
+ },
242
+ on: {
243
+ }
244
+ }]
245
+ };
246
+ self.$common.openDialog(dialogOption);
247
+ }
248
+ else {
249
+ self.operationLoading = true;
250
+ field.doAction(submitData, (data) => {
251
+ self.operationLoading = false;
252
+ if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
253
+ self.model.doAction({ responseData: data });
254
+ }
255
+ self.$forceUpdate();
256
+ self.$refs.footer.$forceUpdate();
257
+ self.updateCurrentRow(field, data);
258
+ })
259
+ }
260
+ }
261
+ }
262
+ //执行客户端脚本
263
+ else {
264
+ // let parm={submitData:submitData,field:field}
265
+ // self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
266
+ let title = field.pageTitle == undefined ? field.label : field.pageTitle;
267
+ submitData.actionType = field.actionType;
268
+ var fun = self.$common.getDataDrivenOpts().handler[action];
269
+ fun(submitData, title, self.model);
270
+ // var fun = self.model.scripts.formData[action];
271
+ // fun(submitData,field);
272
+ }
273
+ }
274
+
275
+ if (field.alert) {
276
+ self.$common.confirm(field.alertMsg, field.alertCaption, {
277
+ confirmButtonText: field.alertOKButtonText,
278
+ cancelButtonText: field.alertCancelButtonText,
279
+ //type: 'warning'
280
+ center: field.alertCenter
281
+ }).then(() => {
282
+ clickAcion();
283
+ }).catch(() => {
284
+ });
285
+ }
286
+ else {
287
+ clickAcion();
288
+ }
289
+ },
290
+ },
291
+ mounted() {
292
+
293
+ }
294
+ }
295
+ </script>
296
+ <style>
297
+ .ct-Layout {
298
+ font-size: 12px;
299
+ }
300
+ </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>