centaline-data-driven 1.2.47 → 1.2.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.2.47",
3
+ "version": "1.2.48",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -2,17 +2,20 @@
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" class="ct-PropertySimpleDetailRET" v-if="pageType=='PropertySimpleDetailRET'"></ct-PropertySimpleDetailRET>
5
6
  </div>
6
7
  </template>
7
8
 
8
9
  <script>
9
10
  import dynamicPropertyDetailOFI from './dynamicPropertyDetailOFI'
10
11
  import dynamicPropertyDetailRET from './dynamicPropertyDetailRET'
12
+ import dynamicPropertySimpleDetailRET from './dynamicPropertySimpleDetailRET'
11
13
  export default {
12
14
  name: 'ct-Detail',
13
15
  components: {
14
16
  'ct-PropertyDetailOFI': dynamicPropertyDetailOFI,
15
17
  'ct-PropertyDetailRET': dynamicPropertyDetailRET,
18
+ 'ct-PropertySimpleDetailRET': dynamicPropertySimpleDetailRET,
16
19
  },
17
20
  props: {
18
21
  vmodel: Object,
@@ -0,0 +1,301 @@
1
+ <template>
2
+ <div ref="main" class="main" v-if="model!==null">
3
+ 1111111111111111111111
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ import dynamicElement from '../../mixins/dynamicElement';
9
+ import dynamicContactList from './dynamicContactList.vue';
10
+ export default {
11
+ name: 'ct-PropertySimpleDetailRET',
12
+ mixins: [dynamicElement],
13
+ components: {
14
+ 'ct-contactList': dynamicContactList,
15
+ },
16
+ props: {
17
+ vmodel: Object,
18
+ api: String,
19
+ apiParam: Object,
20
+ },
21
+ data() {
22
+ return {
23
+
24
+ }
25
+ },
26
+ mounted() {
27
+ var self = this;
28
+ this.$nextTick(function () {
29
+ if (self.vmodel) {
30
+ self.load(self.vmodel);
31
+ }
32
+ else if (typeof self.source !== 'undefined') {
33
+ self.loaderObj.Detail(self.source,null,self.load);
34
+ }
35
+ else if (typeof self.api !== 'undefined') {
36
+ self.loaderObj.Detail(self.api,self.apiParam, self.load);
37
+ }
38
+ });
39
+ },
40
+ activated() {
41
+ this.$nextTick(() => {
42
+ this.setDetailHeight();
43
+ })
44
+ },
45
+ methods: {
46
+ load(data) {
47
+ var self = this;
48
+ this.model = data;
49
+ this.model.$vue = self;
50
+ this.loadFields();
51
+ if(this.model.tags2 && this.model.tags2[0]){
52
+ this.model.getTags2List(0);
53
+ }
54
+ this.loadOperation();
55
+ this.loadCommission();
56
+ this.setDetailHeight();
57
+ this.$nextTick(() => {
58
+ window.addEventListener("resize", (ev) => {
59
+ self.setDetailHeight();
60
+ });
61
+ });
62
+ },
63
+ loadFields() {
64
+ var self = this;
65
+ self.collapse=[];
66
+ var collapseItemArr = [];
67
+ var col=0;
68
+ var colCount=4;
69
+ self.model.fields2Dic.forEach((v, index) => {
70
+ if(v.type===13){
71
+ collapseItemArr = [];
72
+ col=0;
73
+ }
74
+ else if(v.singleLine){
75
+ if(collapseItemArr.length>0){
76
+ self.collapse.push(collapseItemArr);
77
+ collapseItemArr = [];
78
+ }
79
+ collapseItemArr.push(v);
80
+ self.collapse.push(collapseItemArr);
81
+ collapseItemArr = [];
82
+ col=0;
83
+ }
84
+ else if(v.spanCols){
85
+ collapseItemArr.push(v);
86
+ col=col+v.spanCols;
87
+ if(col===colCount || index===self.model.fields2Dic.length-1){
88
+ self.collapse.push(collapseItemArr);
89
+ collapseItemArr = [];
90
+ col=0;
91
+ }
92
+ }
93
+ else{
94
+ collapseItemArr.push(v);
95
+ col=col+1;
96
+ if(col===colCount || index===self.model.fields2Dic.length-1){
97
+ self.collapse.push(collapseItemArr);
98
+ collapseItemArr = [];
99
+ col=0;
100
+ }
101
+ }
102
+ });
103
+ },
104
+ loadOperation() {
105
+ this.model._operationList=null;
106
+ this.model._operationRouters=[];
107
+ this.model.getOperationList();
108
+ },
109
+ loadCommission() {
110
+ this.model.getCommissionList();
111
+ },
112
+ lookOwner() {
113
+ this.codeOwner = true
114
+ },
115
+ handleClick(tab, event) {
116
+ let i=tab.index;
117
+ if(this.model.tags2 && this.model.tags2[i]){
118
+ this.model.getTags2List(i);
119
+ }
120
+ },
121
+ setDetailHeight() {
122
+ this.$nextTick(() => {
123
+ if (this.$refs.detail && this.$refs.main) {
124
+
125
+ }
126
+ });
127
+ },
128
+ handleSelect(key, keyPath) {
129
+ let i=key.index;
130
+ this.model.activeIndex1=i;
131
+ if(this.model.tags1 && this.model.tags1[i]){
132
+ this.model.searchlistKey=this.model.searchlistKey+1;
133
+ this.model.searchConditionApiTags1=this.model.tags1[i].searchConditionApiUrl||'';
134
+ this.model.searchDataApiTags1=this.model.tags1[i].searchDataApiUrl||'';
135
+ this.model.paramDataTags1=this.model.tags1[i].paramData||'';
136
+ }
137
+ },
138
+ fieldClickHandler(field) {
139
+ var self = this;
140
+ var callBack=null;
141
+ let submitData={};
142
+ var router = this.model.actionRouters.find((v) => {
143
+ return v.id === field.id;
144
+ });
145
+ if(router==undefined && this.model.actionRoutersMoreList){
146
+ router = this.model.actionRoutersMoreList.find((v) => {
147
+ return v.id === field.id;
148
+ });
149
+ }
150
+ if(router==undefined && this.model.otherTradeActionRouter){
151
+ if(field.id===this.model.otherTradeActionRouter.id){
152
+ router = this.model.otherTradeActionRouter
153
+ }
154
+ }
155
+ if(router==undefined && this.model.operationRouters){
156
+ router = this.model.operationRouters.find((v) => {
157
+ return v.id === field.id;
158
+ });
159
+ callBack="loadOperation";
160
+ }
161
+
162
+ if(router){
163
+ if(field.isSubmitDataFromSelf){
164
+ router.submitFormField.forEach((v) => {
165
+ submitData[v] = field.list[field.listIndex].code;
166
+ });
167
+ }
168
+ else{
169
+ router.submitFormField.forEach((v) => {
170
+ submitData[v] = self.model.fields1Dic[v].value;
171
+ });
172
+ }
173
+ }
174
+
175
+ if(callBack && callBack=='loadOperation'){
176
+ this.routerClickHandler(router,submitData,self.loadOperation);
177
+ }
178
+ else{
179
+ this.routerClickHandler(router,submitData);
180
+ }
181
+ },
182
+ routerClickHandler(field, submitData,callBack) {
183
+ var self = this;
184
+ // this.model.scripts.$fd = field.id;
185
+ // this.model.scripts.$result = [];
186
+
187
+ var clickAcion = function (field) {
188
+ //若不是客户端方法,则直接访问接口
189
+ if (!field.isClientFuntion) {
190
+ // if (typeof field.onClick !== 'undefined') {
191
+ // verified = self.$common.excute.call(self.model.scripts, field.onClick);
192
+ // }
193
+
194
+ if (field.isOpenForm) {
195
+ var dialogOption = {
196
+ title: field.pageTitle,
197
+ pane: self.$common.getParentPane(self),
198
+ content: [{
199
+ component: 'ct-form',
200
+ attrs: {
201
+ api: field.action,
202
+ apiParam: field.getActionPara(submitData).para,
203
+ showTitle: false,
204
+ width: field.dialogWidth + 'px',
205
+ height: field.dialogHeight + 'px'
206
+ },
207
+ on: {
208
+ submit(ev) {
209
+ self.model.doAction(ev,field);
210
+ if(callBack){
211
+ callBack();
212
+ }
213
+ self.$common.closeDialog(dialogOption.dialog);
214
+ }
215
+ }
216
+ }]
217
+ };
218
+ self.$common.openDialog(dialogOption);
219
+ }
220
+ else if (field.isOpenList) {
221
+ var dialogOption = {
222
+ title: field.pageTitle,
223
+ pane: self.$common.getParentPane(self),
224
+ content: [{
225
+ component: 'ct-searchlist',
226
+ attrs: {
227
+ searchConditionApi: field.actionForSearchLayout,
228
+ searchDataApi: field.actionForSearch,
229
+ apiParam: submitData,
230
+ width: field.dialogWidth + 'px',
231
+ height: field.dialogHeight + 'px'
232
+ },
233
+ on: {
234
+ submit(ev) {
235
+ self.model.updateFields(ev, () => {
236
+ self.$refs.Fields.forEach((fd) => {
237
+ fd.$forceUpdate();
238
+ });
239
+ });
240
+ self.$common.closeDialog(dialogOption.dialog);
241
+ }
242
+ }
243
+ }]
244
+ };
245
+ self.$common.openDialog(dialogOption);
246
+ }
247
+ else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
248
+ submitData = field.getActionPara(submitData).para;
249
+ self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
250
+ }
251
+ else if (field.isBrowserNewTab) {// 浏览器打开
252
+ submitData = field.getActionPara(submitData).para;
253
+ let query = self.$common.objectToQueryStr(submitData);
254
+ window.open(field.action + query, "_blank");
255
+ }
256
+ else{
257
+ field.doAction(submitData, (data) => {
258
+ self.model.doAction(data,field);
259
+ if(callBack){
260
+ callBack();
261
+ }
262
+ })
263
+ }
264
+ }
265
+ //执行客户端脚本
266
+ else {
267
+ submitData = field.getActionPara(submitData).para;
268
+ let title=field.pageTitle==undefined ?field.label:field.pageTitle;
269
+ submitData.actionType=field.actionType;
270
+ var fun =self.$common.getDataDrivenOpts().handler[field.action];
271
+ fun(submitData,title,self.model);
272
+ }
273
+ }
274
+
275
+ if (field.isSubmit && !self.validExcute()) {
276
+ return;
277
+ }
278
+
279
+ if (field.alert) {
280
+ self.$common.confirm(field.alertMsg, field.alertCaption, {
281
+ confirmButtonText: field.alertOKButtonText,
282
+ cancelButtonText: field.alertCancelButtonText,
283
+ //type: 'warning'
284
+ center: field.alertCenter
285
+ }).then(() => {
286
+ clickAcion(field,submitData);
287
+ }).catch(() => {
288
+ });
289
+ }
290
+ else {
291
+ clickAcion(field,submitData);
292
+ }
293
+ },
294
+ }
295
+ }
296
+ </script>
297
+ <style lang="scss" scoped>
298
+
299
+ </style>
300
+
301
+
@@ -17,9 +17,9 @@
17
17
  @showTitle="showTitleHandler"></ct-searchtable>
18
18
  </div>
19
19
  <div v-if="flagSideBar && flagSideBarOfData"
20
- :style="{'height': pageHeight? pageHeight:'100%','width':sideBarWidth+'px',right:this.sideBarRight+'px'}"
20
+ :style="{'height': pageHeight? pageHeight:'100%','width':sideBarWidth+'px',right:sideBarRight+'px'}"
21
21
  class="sidebar">
22
- <div>1111111111111111111111111111111111</div>
22
+ <ct-Detail :api="sideBarApi" :apiParam="sideBarApiParam" :pageType="sideBarPageType"></ct-Detail>
23
23
  <ct-SearchSideMenu :sideBarMenuRight="sideBarMenuRight" :sideBarStatus="sideBarStatus"
24
24
  @sideMenuClickHandler="sideMenuClickHandler"></ct-SearchSideMenu>
25
25
  </div>
@@ -32,6 +32,7 @@
32
32
  import dynamicSearchTable from './dynamicSearchTable.vue';
33
33
  import dynamicSearchSideMenu from './dynamicSearchSideMenu.vue';
34
34
  import progress from '../../progress/src/progress.vue';
35
+ import dynamicDetail from '../../dynamicDetail/src/dynamicDetail.vue';
35
36
  export default {
36
37
  name: 'ct-searchlist',
37
38
  mixins: [dynamicElement],
@@ -40,7 +41,8 @@
40
41
  'ct-searchtable': dynamicSearchTable,
41
42
  'ct-progress': progress,
42
43
  'ct-searchcategory': dynamicSearchCategory,
43
- 'ct-SearchSideMenu': dynamicSearchSideMenu
44
+ 'ct-SearchSideMenu': dynamicSearchSideMenu,
45
+ 'ct-Detail': dynamicDetail,
44
46
  },
45
47
  props: {
46
48
  vmodel: Object,
@@ -91,6 +93,10 @@
91
93
  sideBarRight:0,
92
94
  sideBarMenuRight:0,
93
95
  sideBarStatus:'',
96
+ sideBarStatus:'',
97
+ sideBarApi:'',
98
+ sideBarApiParam:null,
99
+ sideBarPageType:'',
94
100
  }
95
101
  },
96
102
  methods: {
@@ -124,7 +130,7 @@
124
130
  },
125
131
  searchComplate() {
126
132
  this.pageDisabled=false;
127
- if(this.$refs.table.model.listData.length>0){
133
+ if(this.flagSideBar && this.$refs.table.model.listData.length>0){
128
134
  if(!this.flagSideBarOfData){
129
135
  this.flagSideBarOfData=true;
130
136
  this.sideMenuClickHandler(this.sideBarStatus =='close'?'open':'close');
@@ -165,13 +171,17 @@
165
171
  if(this.$refs.table.model.listData.length>0){
166
172
  this.flagSideBar=this.$refs.table.model.flagSideBar;
167
173
  this.flagDefaultDisplaySideBar=this.$refs.table.model.flagDefaultDisplaySideBar;
168
- this.sideBarWidth=this.$refs.table.model.sideBarWidth;
174
+ if(!this.$refs.table.model.rowSelectRouter)this.flagSideBar=false;
175
+
169
176
  if(this.flagSideBar){
170
- if(this.flagDefaultDisplaySideBar){
177
+ if(this.flagDefaultDisplaySideBar && !this.sideBarStatus){
171
178
  this.sideMenuClickHandler('close');
172
179
  }
173
- else{
174
- this.sideMenuClickHandler('open');
180
+ else{
181
+ let status='open';
182
+ if(this.sideBarStatus=='open')status='close';
183
+ else if(this.sideBarStatus=='close')status='open';
184
+ this.sideMenuClickHandler(status);
175
185
  }
176
186
  }
177
187
  }
@@ -180,12 +190,14 @@
180
190
  if(v=='open'){
181
191
  this.sideBarStatus ='close';
182
192
  this.sideBarRight=-this.sideBarWidth;
193
+ this.sideBarWidth=0;
183
194
  this.searchWidth=0;
184
195
  this.sideBarMenuRight=0;
185
196
  }
186
197
  else if(v=='close'){
187
198
  this.sideBarStatus ='open';
188
199
  this.sideBarRight=0;
200
+ this.sideBarWidth=this.$refs.table.model.sideBarWidth;
189
201
  this.searchWidth=this.$refs.main.clientWidth-this.sideBarWidth;
190
202
  this.sideBarMenuRight=this.sideBarWidth-2;
191
203
  }
@@ -93,7 +93,7 @@
93
93
  v-if="!router.rightField || row[router.rightField] == 1" :isOperationalColumn="true"
94
94
  :router="router" :colValue="router.label" :rowData="row" @click="rolRouterClickHandler">
95
95
  </ct-tablecurrency>
96
- <el-popover :ref="'popover'+rowindex" :append-to-table="option.appendId?option.appendId:''" class="Stats-popover" popper-class="el-popover1"
96
+ <el-popover v-if="getRowRouterDisplay(row).length>0" :ref="'popover'+rowindex" :append-to-table="option.appendId?option.appendId:''" class="Stats-popover" popper-class="el-popover1"
97
97
  :placement="option.placement?option.placement:'left'"
98
98
  :trigger="option.trigger?option.trigger:''">
99
99
  <div class="tab-list" style="border-bottom:none">
@@ -378,6 +378,18 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
378
378
  return rtn._rowRouter;
379
379
  }
380
380
  },
381
+ _rowSelectRouter: null,
382
+ get rowSelectRouter() {
383
+ if (rtn._rowSelectRouter !== null) {
384
+ return rtn._rowSelectRouter;
385
+ }
386
+ else {
387
+ if (source.content.rowSelectRouter && source.content.rowSelectRouter.key) {
388
+ rtn._rowSelectRouter=Router(source.content.rowSelectRouter);
389
+ }
390
+ return rtn._rowSelectRouter;
391
+ }
392
+ },
381
393
  sortData: [],
382
394
  toSort: function (col, action, callback) {
383
395
  this.columns.forEach((v1) => {