centaline-data-driven 1.2.47 → 1.2.50

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.50",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
Binary file
@@ -800,4 +800,7 @@ html {
800
800
  }
801
801
  .el-input-group{
802
802
  line-height: 26px;
803
- }
803
+ }
804
+
805
+
806
+
@@ -108,6 +108,9 @@
108
108
  min-height: 26px;
109
109
  line-height: 25px;
110
110
  }
111
+ .ct-checkbox .lableNaN{
112
+ padding-left: 3px!important;
113
+ }
111
114
  .cover-list-item .el-checkbox{
112
115
  margin-right: 10px!important;
113
116
  }
@@ -5,7 +5,7 @@
5
5
  <div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
6
6
  {{model.label}}
7
7
  </div>
8
- <div class="ct-checkbox-mian cover-list-item" :class="[model.showLabel?'showLabel':'',model.value !== ''?'hasValue':'']">
8
+ <div class="ct-checkbox-mian cover-list-item" :class="[model.showLabel?'showLabel':'',model.value !== ''?'hasValue':'',model.label?'':'lableNaN']">
9
9
  <el-checkbox-group v-model="model.checkedItemArr" @change="changeHandler1">
10
10
  <el-checkbox :disabled="model.lock" v-for="item in model.options" :label="item[model.optionAttrs.value]" :key="item[model.optionAttrs.value]">{{item[model.optionAttrs.label]}}</el-checkbox>
11
11
  <span v-if="!model.lock" class="cover-list-item-span max-cover-list-item">
@@ -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,316 @@
1
+ <template>
2
+ <div ref="main" class="main">
3
+ <div style="height:36px;margin-top: 10px;display: flex;">
4
+ <img src="../../../assets/ewmA.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:22px">
5
+ <span :style="{'width':computedTopWidth}"></span>
6
+ <img src="../../../assets/T.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-right:11px">
7
+ <img src="../../../assets/B.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-right:8px">
8
+ <div class="el-icon-close"></div>
9
+ </div>
10
+ <div v-if="model!==null">
11
+ 11111111111111111111111
12
+ </div>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import dynamicElement from '../../mixins/dynamicElement';
18
+ export default {
19
+ name: 'ct-PropertySimpleDetailRET',
20
+ mixins: [dynamicElement],
21
+ components: {
22
+ },
23
+ props: {
24
+ vmodel: Object,
25
+ api: String,
26
+ apiParam: Object,
27
+ },
28
+ computed: {
29
+ computedTopWidth(){
30
+ // debugger
31
+ // let w=this.$refs.main.clientWidth;
32
+ // let wt=w-140;
33
+ return 300+'px';
34
+ }
35
+ },
36
+ data() {
37
+ return {
38
+
39
+ }
40
+ },
41
+ mounted() {
42
+ var self = this;
43
+ this.$nextTick(function () {
44
+ if (self.vmodel) {
45
+ self.load(self.vmodel);
46
+ }
47
+ else if (typeof self.source !== 'undefined') {
48
+ self.loaderObj.Detail(self.source,null,self.load);
49
+ }
50
+ else if (typeof self.api !== 'undefined' && self.apiParam) {
51
+ self.loaderObj.Detail(self.api,self.apiParam, self.load);
52
+ }
53
+ });
54
+ },
55
+ activated() {
56
+ this.$nextTick(() => {
57
+ this.setDetailHeight();
58
+ })
59
+ },
60
+ methods: {
61
+ load(data) {
62
+ var self = this;
63
+ this.model = data;
64
+ this.model.$vue = self;
65
+ this.loadFields();
66
+ if(this.model.tags2 && this.model.tags2[0]){
67
+ this.model.getTags2List(0);
68
+ }
69
+ this.loadOperation();
70
+ this.loadCommission();
71
+ this.setDetailHeight();
72
+ this.$nextTick(() => {
73
+ window.addEventListener("resize", (ev) => {
74
+ self.setDetailHeight();
75
+ });
76
+ });
77
+ },
78
+ loadFields() {
79
+ var self = this;
80
+ self.collapse=[];
81
+ var collapseItemArr = [];
82
+ var col=0;
83
+ var colCount=4;
84
+ self.model.fields2Dic.forEach((v, index) => {
85
+ if(v.type===13){
86
+ collapseItemArr = [];
87
+ col=0;
88
+ }
89
+ else if(v.singleLine){
90
+ if(collapseItemArr.length>0){
91
+ self.collapse.push(collapseItemArr);
92
+ collapseItemArr = [];
93
+ }
94
+ collapseItemArr.push(v);
95
+ self.collapse.push(collapseItemArr);
96
+ collapseItemArr = [];
97
+ col=0;
98
+ }
99
+ else if(v.spanCols){
100
+ collapseItemArr.push(v);
101
+ col=col+v.spanCols;
102
+ if(col===colCount || index===self.model.fields2Dic.length-1){
103
+ self.collapse.push(collapseItemArr);
104
+ collapseItemArr = [];
105
+ col=0;
106
+ }
107
+ }
108
+ else{
109
+ collapseItemArr.push(v);
110
+ col=col+1;
111
+ if(col===colCount || index===self.model.fields2Dic.length-1){
112
+ self.collapse.push(collapseItemArr);
113
+ collapseItemArr = [];
114
+ col=0;
115
+ }
116
+ }
117
+ });
118
+ },
119
+ loadOperation() {
120
+ this.model._operationList=null;
121
+ this.model._operationRouters=[];
122
+ this.model.getOperationList();
123
+ },
124
+ loadCommission() {
125
+ this.model.getCommissionList();
126
+ },
127
+ lookOwner() {
128
+ this.codeOwner = true
129
+ },
130
+ handleClick(tab, event) {
131
+ let i=tab.index;
132
+ if(this.model.tags2 && this.model.tags2[i]){
133
+ this.model.getTags2List(i);
134
+ }
135
+ },
136
+ setDetailHeight() {
137
+ this.$nextTick(() => {
138
+ if (this.$refs.detail && this.$refs.main) {
139
+
140
+ }
141
+ });
142
+ },
143
+ handleSelect(key, keyPath) {
144
+ let i=key.index;
145
+ this.model.activeIndex1=i;
146
+ if(this.model.tags1 && this.model.tags1[i]){
147
+ this.model.searchlistKey=this.model.searchlistKey+1;
148
+ this.model.searchConditionApiTags1=this.model.tags1[i].searchConditionApiUrl||'';
149
+ this.model.searchDataApiTags1=this.model.tags1[i].searchDataApiUrl||'';
150
+ this.model.paramDataTags1=this.model.tags1[i].paramData||'';
151
+ }
152
+ },
153
+ fieldClickHandler(field) {
154
+ var self = this;
155
+ var callBack=null;
156
+ let submitData={};
157
+ var router = this.model.actionRouters.find((v) => {
158
+ return v.id === field.id;
159
+ });
160
+ if(router==undefined && this.model.actionRoutersMoreList){
161
+ router = this.model.actionRoutersMoreList.find((v) => {
162
+ return v.id === field.id;
163
+ });
164
+ }
165
+ if(router==undefined && this.model.otherTradeActionRouter){
166
+ if(field.id===this.model.otherTradeActionRouter.id){
167
+ router = this.model.otherTradeActionRouter
168
+ }
169
+ }
170
+ if(router==undefined && this.model.operationRouters){
171
+ router = this.model.operationRouters.find((v) => {
172
+ return v.id === field.id;
173
+ });
174
+ callBack="loadOperation";
175
+ }
176
+
177
+ if(router){
178
+ if(field.isSubmitDataFromSelf){
179
+ router.submitFormField.forEach((v) => {
180
+ submitData[v] = field.list[field.listIndex].code;
181
+ });
182
+ }
183
+ else{
184
+ router.submitFormField.forEach((v) => {
185
+ submitData[v] = self.model.fields1Dic[v].value;
186
+ });
187
+ }
188
+ }
189
+
190
+ if(callBack && callBack=='loadOperation'){
191
+ this.routerClickHandler(router,submitData,self.loadOperation);
192
+ }
193
+ else{
194
+ this.routerClickHandler(router,submitData);
195
+ }
196
+ },
197
+ routerClickHandler(field, submitData,callBack) {
198
+ var self = this;
199
+ // this.model.scripts.$fd = field.id;
200
+ // this.model.scripts.$result = [];
201
+
202
+ var clickAcion = function (field) {
203
+ //若不是客户端方法,则直接访问接口
204
+ if (!field.isClientFuntion) {
205
+ // if (typeof field.onClick !== 'undefined') {
206
+ // verified = self.$common.excute.call(self.model.scripts, field.onClick);
207
+ // }
208
+
209
+ if (field.isOpenForm) {
210
+ var dialogOption = {
211
+ title: field.pageTitle,
212
+ pane: self.$common.getParentPane(self),
213
+ content: [{
214
+ component: 'ct-form',
215
+ attrs: {
216
+ api: field.action,
217
+ apiParam: field.getActionPara(submitData).para,
218
+ showTitle: false,
219
+ width: field.dialogWidth + 'px',
220
+ height: field.dialogHeight + 'px'
221
+ },
222
+ on: {
223
+ submit(ev) {
224
+ self.model.doAction(ev,field);
225
+ if(callBack){
226
+ callBack();
227
+ }
228
+ self.$common.closeDialog(dialogOption.dialog);
229
+ }
230
+ }
231
+ }]
232
+ };
233
+ self.$common.openDialog(dialogOption);
234
+ }
235
+ else if (field.isOpenList) {
236
+ var dialogOption = {
237
+ title: field.pageTitle,
238
+ pane: self.$common.getParentPane(self),
239
+ content: [{
240
+ component: 'ct-searchlist',
241
+ attrs: {
242
+ searchConditionApi: field.actionForSearchLayout,
243
+ searchDataApi: field.actionForSearch,
244
+ apiParam: submitData,
245
+ width: field.dialogWidth + 'px',
246
+ height: field.dialogHeight + 'px'
247
+ },
248
+ on: {
249
+ submit(ev) {
250
+ self.model.updateFields(ev, () => {
251
+ self.$refs.Fields.forEach((fd) => {
252
+ fd.$forceUpdate();
253
+ });
254
+ });
255
+ self.$common.closeDialog(dialogOption.dialog);
256
+ }
257
+ }
258
+ }]
259
+ };
260
+ self.$common.openDialog(dialogOption);
261
+ }
262
+ else if (field.isFormPageInTab || field.isSearchPageInTab) {// 外部框架tab页打开
263
+ submitData = field.getActionPara(submitData).para;
264
+ self.$common.getDataDrivenOpts().handler.openTab(field.action, submitData, field.pageTitle);
265
+ }
266
+ else if (field.isBrowserNewTab) {// 浏览器打开
267
+ submitData = field.getActionPara(submitData).para;
268
+ let query = self.$common.objectToQueryStr(submitData);
269
+ window.open(field.action + query, "_blank");
270
+ }
271
+ else{
272
+ field.doAction(submitData, (data) => {
273
+ self.model.doAction(data,field);
274
+ if(callBack){
275
+ callBack();
276
+ }
277
+ })
278
+ }
279
+ }
280
+ //执行客户端脚本
281
+ else {
282
+ submitData = field.getActionPara(submitData).para;
283
+ let title=field.pageTitle==undefined ?field.label:field.pageTitle;
284
+ submitData.actionType=field.actionType;
285
+ var fun =self.$common.getDataDrivenOpts().handler[field.action];
286
+ fun(submitData,title,self.model);
287
+ }
288
+ }
289
+
290
+ if (field.isSubmit && !self.validExcute()) {
291
+ return;
292
+ }
293
+
294
+ if (field.alert) {
295
+ self.$common.confirm(field.alertMsg, field.alertCaption, {
296
+ confirmButtonText: field.alertOKButtonText,
297
+ cancelButtonText: field.alertCancelButtonText,
298
+ //type: 'warning'
299
+ center: field.alertCenter
300
+ }).then(() => {
301
+ clickAcion(field,submitData);
302
+ }).catch(() => {
303
+ });
304
+ }
305
+ else {
306
+ clickAcion(field,submitData);
307
+ }
308
+ },
309
+ }
310
+ }
311
+ </script>
312
+ <style lang="scss" scoped>
313
+
314
+ </style>
315
+
316
+
@@ -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>
@@ -40,7 +40,8 @@
40
40
  'ct-searchtable': dynamicSearchTable,
41
41
  'ct-progress': progress,
42
42
  'ct-searchcategory': dynamicSearchCategory,
43
- 'ct-SearchSideMenu': dynamicSearchSideMenu
43
+ 'ct-SearchSideMenu': dynamicSearchSideMenu,
44
+ 'ct-Detail': ()=>import('../../dynamicDetail/src/dynamicDetail.vue'),
44
45
  },
45
46
  props: {
46
47
  vmodel: Object,
@@ -91,6 +92,10 @@
91
92
  sideBarRight:0,
92
93
  sideBarMenuRight:0,
93
94
  sideBarStatus:'',
95
+ sideBarStatus:'',
96
+ sideBarApi:'',
97
+ sideBarApiParam:null,
98
+ sideBarPageType:'',
94
99
  }
95
100
  },
96
101
  methods: {
@@ -124,7 +129,7 @@
124
129
  },
125
130
  searchComplate() {
126
131
  this.pageDisabled=false;
127
- if(this.$refs.table.model.listData.length>0){
132
+ if(this.flagSideBar && this.$refs.table.model.listData.length>0){
128
133
  if(!this.flagSideBarOfData){
129
134
  this.flagSideBarOfData=true;
130
135
  this.sideMenuClickHandler(this.sideBarStatus =='close'?'open':'close');
@@ -165,13 +170,24 @@
165
170
  if(this.$refs.table.model.listData.length>0){
166
171
  this.flagSideBar=this.$refs.table.model.flagSideBar;
167
172
  this.flagDefaultDisplaySideBar=this.$refs.table.model.flagDefaultDisplaySideBar;
168
- this.sideBarWidth=this.$refs.table.model.sideBarWidth;
173
+
174
+ if(this.$refs.table.model.rowSelectRouter){
175
+ this.sideBarApi=this.$refs.table.model.rowSelectRouter.action;
176
+ this.sideBarPageType=this.$refs.table.model.rowSelectRouter.actionSource;
177
+ }
178
+ else{
179
+ this.flagSideBar=false;
180
+ }
181
+
169
182
  if(this.flagSideBar){
170
- if(this.flagDefaultDisplaySideBar){
183
+ if(this.flagDefaultDisplaySideBar && !this.sideBarStatus){
171
184
  this.sideMenuClickHandler('close');
172
185
  }
173
- else{
174
- this.sideMenuClickHandler('open');
186
+ else{
187
+ let status='open';
188
+ if(this.sideBarStatus=='open')status='close';
189
+ else if(this.sideBarStatus=='close')status='open';
190
+ this.sideMenuClickHandler(status);
175
191
  }
176
192
  }
177
193
  }
@@ -180,12 +196,14 @@
180
196
  if(v=='open'){
181
197
  this.sideBarStatus ='close';
182
198
  this.sideBarRight=-this.sideBarWidth;
199
+ this.sideBarWidth=0;
183
200
  this.searchWidth=0;
184
201
  this.sideBarMenuRight=0;
185
202
  }
186
203
  else if(v=='close'){
187
204
  this.sideBarStatus ='open';
188
205
  this.sideBarRight=0;
206
+ this.sideBarWidth=this.$refs.table.model.sideBarWidth;
189
207
  this.searchWidth=this.$refs.main.clientWidth-this.sideBarWidth;
190
208
  this.sideBarMenuRight=this.sideBarWidth-2;
191
209
  }
@@ -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">
@@ -25,7 +25,14 @@ const Base = function (source) {
25
25
  source.fieldName2 = v;
26
26
  },
27
27
  get label() {
28
- return source.controlLabel + this.labelDelimiter || '';
28
+ let l='';
29
+ if(source.controlLabel){
30
+ l=source.controlLabel;
31
+ }
32
+ if(source.labelDelimiter){
33
+ l=l+source.labelDelimiter;
34
+ }
35
+ return l;
29
36
  },
30
37
  set label(v) {
31
38
  source.controlLabel = v;
@@ -23,6 +23,9 @@ const Router = function (source) {
23
23
  get actionForSearch() {
24
24
  return source.actionForSearch;
25
25
  },
26
+ get actionSource() {
27
+ return source.actionSource;
28
+ },
26
29
  get onClick() {
27
30
  return source.onChanged;
28
31
  },
@@ -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) => {