centaline-data-driven 1.2.57 → 1.2.60

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.57",
3
+ "version": "1.2.60",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/src/Detail.vue CHANGED
@@ -10,7 +10,7 @@
10
10
  name: 'DataDrivendetail',
11
11
  data() {
12
12
  return {
13
- apiParam: {actionType: 1,chanceID: "1"} ,
13
+ apiParam: {actionType: 1,chanceID: "3"} ,
14
14
  }
15
15
  },
16
16
  mounted() {
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="'/api/third-dept-tran/profit-return/applyUI'" :apiParam="apiParam"></ct-form> -->
3
+ <ct-form :api="'/salematter/agentcontract/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>
@@ -17,7 +17,8 @@
17
17
  // apiParam: {profitReturnId: "1504359257134055426", actionType: 1, pageStyle: 2, pageTitle: "查看返利", pageOnly: true} ,
18
18
  // apiParam: {headerParam: {}, urlParam: {contractID: "06cad32e-4d0d-4b6f-bd24-16a28629a550", actionType: "0"}}
19
19
  // apiParam: {originalTraId: "1475658732246241281", actionType: 2, chanceID: "1"} ,
20
- apiParam: {originalTraId: "1516290587463507969", actionType: "3", pageStyle: "2", pageTitle: "成交报告",pageOnly: "true"}
20
+ // apiParam: {originalTraId: "1516290587463507969", actionType: "3", pageStyle: "2", pageTitle: "成交报告",pageOnly: "true"}
21
+ apiParam:{acId:"220422141624917EB85D143D438CB8E5",actionType:3}
21
22
  }
22
23
  },
23
24
  methods: {
@@ -351,7 +351,7 @@ const common = {
351
351
  initFunction(f) {
352
352
  return function () {
353
353
  if (arguments.length === 0) {
354
- return f($fd);
354
+ return f(typeof $fd!='undefined'?$fd:'');
355
355
  }
356
356
  else {
357
357
  var exStr = 'f(';
@@ -243,3 +243,9 @@
243
243
  .ct-table-content .ct-table .ct-tr .cell img{
244
244
  display: inherit;
245
245
  }
246
+
247
+
248
+ .max.el-button.el-button--mini{
249
+ height: 26px;
250
+ }
251
+
@@ -34,31 +34,31 @@
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-if="model.isCallTel" :id="model.id"
37
+ <el-button v-else-if="model.isCallTel" class="max"
38
38
  :type="model.isHyperLink ? 'text' : 'primary'"
39
39
  v-bind="model.attrs" @click="clickHandle"
40
40
  :style="{color:model.textColor,backgroundColor:model.imgUrl?'transparent':model.bgColor,borderColor:model.imgUrl?'transparent':model.borderColor,padding:model.imgUrl?'0px':null}"
41
41
  :icon="model.icon"
42
42
  :disabled="model.disabled || model.locked">
43
- <el-popover :ref="'popover'+model.id"
43
+ <el-popover
44
44
  class="Stats-popover" :popper-class="'el-popoverCallTel'" :placement="option.placement?option.placement:'left'"
45
45
  v-model="visible" :trigger="option.trigger?option.trigger:''">
46
46
  <div style="border-bottom:none">
47
47
  <div style="color: #388cd3;text-align: center;">{{message}}</div>
48
48
  <img v-show="qrCode" :src="qrCode" style="margin-top: 5px;" :style="{'width':width+'px','height':height+'px'}" />
49
49
  </div>
50
- <img v-if="model.imgUrl" slot="reference" :title="model.label" :src="tellImgUrl?tellImgUrl:model.imgUrl" height="24px" />
50
+ <img v-if="model.imgUrl" slot="reference" :title="model.label" :src="tellImgUrl?tellImgUrl:model.imgUrl" :height="model.buttonHeight+'px'" />
51
51
  <span v-else slot="reference">{{model.label}}</span>
52
52
  </el-popover>
53
53
  </el-button>
54
- <el-button v-else
54
+ <el-button v-else class="max"
55
55
  :type="model.isHyperLink ? 'text' : 'primary'"
56
56
  v-bind="model.attrs" @click="$emit('click',model)"
57
57
  :style="{color:model.textColor,backgroundColor:model.imgUrl?'transparent':model.bgColor,borderColor:model.imgUrl?'transparent':model.borderColor,padding:model.imgUrl?'0px':null}"
58
58
  :icon="model.icon"
59
59
  :disabled="model.disabled || model.locked">
60
- <img v-if="model.imgUrl" :title="model.label" :src="model.imgUrl" height="24px"/>
61
- <span v-else>{{model.label}}</span>
60
+ <img v-if="model.imgUrl" :title="model.label" :src="model.imgUrl" :height="model.buttonHeight+'px'"/>
61
+ <span v-else>{{model.label}}</span>
62
62
  </el-button>
63
63
  </template>
64
64
  <script>
@@ -69,6 +69,8 @@
69
69
  vmodel: Object,
70
70
  fileData: Object,
71
71
  optionApi:String,
72
+ rowData: Object,
73
+ rowindex:Number,
72
74
  },
73
75
  mixins: [dynamicElement],
74
76
  data: function () {
@@ -82,7 +84,7 @@
82
84
  option: {
83
85
  isHidden: true,//是否开启操作栏隐藏设置,默认开启
84
86
  showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
85
- appendId: '.el-button',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
87
+ appendId: '',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
86
88
  trigger: 'manual',//触发方式,传值可查看Popper UI组件trigger属性
87
89
  placement: 'bottom-start',//方向,传值可查看Popper UI组件placement属性
88
90
  },
@@ -143,7 +145,7 @@
143
145
  this.tellImgUrl='';
144
146
  }
145
147
  else{
146
- this.$emit('click',this.model);
148
+ this.$emit('click',this.model,this.rowData,this.rowindex);
147
149
  }
148
150
  }
149
151
  else{
@@ -91,9 +91,12 @@
91
91
  </ct-tablecurrency>
92
92
  </div>
93
93
  <!--可点击的列-->
94
- <ct-tablecurrency v-else-if="column.router" :align="column.attrs.align" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" :router="column.router" :colValue="row[column.id]" :rowData="row"
95
- @click="rolRouterClickHandler">
96
- </ct-tablecurrency>
94
+ <div v-else-if="column.routers" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" style="display: flex;">
95
+ <component v-for="(router, i) in column.routers" :key="i" :ref="'router'+router.id+rowindex" :rowData="row" :rowindex="rowindex"
96
+ v-if="!router.rightField || !row[router.rightField] || row[router.rightField] == 1"
97
+ :is="router.is" :vmodel="router" :api="model.optionApi" @click="rolRouterClickHandler">
98
+ </component>
99
+ </div>
97
100
  <!--正常的列-->
98
101
  <div v-else-if="typeof column.template === 'undefined'" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
99
102
  {{row.rowHiddenColumns && row.rowHiddenColumns.includes(column.id)?"":row[column.id]}}
@@ -168,7 +171,6 @@
168
171
  this.model.scripts.formData = this.model.formData;
169
172
  this.model.scripts.formData.formTable = this.model;
170
173
  this.model.setHiddenRow();
171
- console.log(this.model);
172
174
  },
173
175
  lookOwner(router) {
174
176
  var self = this;
@@ -264,7 +266,8 @@
264
266
 
265
267
  return true;
266
268
  },
267
- rolRouterClickHandler(field, rowData) {
269
+ rolRouterClickHandler(field, rowData,rowindex) {
270
+ field.rowindex=rowindex;
268
271
  var submitData = {};
269
272
  field.submitListField.forEach((k) => {
270
273
  submitData[k] = rowData[k];
@@ -395,6 +398,15 @@
395
398
  if(callBack){
396
399
  callBack();
397
400
  }
401
+ if(field.actionType===10){
402
+ data.apiRouter=self.model.apiRouter;
403
+ data.rowMergedColumns=self.model.rowMergedColumns;
404
+ self.loaderObj.ContactList(data,null,self.load);
405
+ self.$forceUpdate();
406
+ }
407
+ else if(field.actionType===19){
408
+ self.$refs['router'+field.id+field.rowindex][0].callTelClick(data);
409
+ }
398
410
  })
399
411
  }
400
412
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
- <ct-PropertyDetailOFI :api="api" :apiParam="apiParam" class="ct-PropertyDetailOFI" v-if="pageType=='PropertyDetailOFI'"></ct-PropertyDetailOFI>
4
- <ct-PropertyDetailRET :api="api" :apiParam="apiParam" class="ct-PropertyDetailRET" v-if="pageType=='PropertyDetailRET'"></ct-PropertyDetailRET>
3
+ <ct-PropertyDetailOFI :api="api" :apiParam="apiParam" :parentModel="parentModel" class="ct-PropertyDetailOFI" v-if="pageType=='PropertyDetailOFI'"></ct-PropertyDetailOFI>
4
+ <ct-PropertyDetailRET :api="api" :apiParam="apiParam" :parentModel="parentModel" 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
6
  @clickNextHandler="clickNextHandler" @clickPrevHandler="clickPrevHandler" @simpleRouterclickHandler="simpleRouterclickHandler"
7
7
  v-if="pageType=='PropertySimpleDetailRET'" @closeSideHandler="closeSideHandler"></ct-PropertySimpleDetailRET>
@@ -23,6 +23,7 @@
23
23
  vmodel: Object,
24
24
  api: String,
25
25
  apiParam: Object,
26
+ parentModel: Object,
26
27
  pageType: String,
27
28
  selectIndex:Number,
28
29
  rowCount:Number,
@@ -29,8 +29,8 @@
29
29
  <div>
30
30
  <component v-if="model.otherTradeActionRouter!==null" v-bind="model.otherTradeActionRouter" class="max-default"
31
31
  :is="model.otherTradeActionRouter.is" :vmodel="model.otherTradeActionRouter" :api="model.optionApi" @click="fieldClickHandler(model.otherTradeActionRouter,$event)"></component>
32
- <img src="../../../assets/T.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:11px">
33
- <img src="../../../assets/B.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:8px">
32
+ <img :class="{'domDisabled':parentModel && parentModel.selectIndex<=0}" @click="clickPrevHandler" src="../../../assets/T.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:11px;cursor: pointer">
33
+ <img :class="{'domDisabled':parentModel && parentModel.listData && parentModel.selectIndex===parentModel.listData.rowCount-1}" @click="clickNextHandler" src="../../../assets/B.png" alt="" style="width: 26px;height: 26px;vertical-align: bottom;margin-left:8px;cursor: pointer">
34
34
  </div>
35
35
  <div class="mt5">
36
36
  <component class="max-report w93" v-if="model.actionRouters!==null && model.actionRouters[0]!==null"
@@ -301,6 +301,7 @@
301
301
  vmodel: Object,
302
302
  api: String,
303
303
  apiParam: Object,
304
+ parentModel: Object,
304
305
  },
305
306
  data() {
306
307
  return {
@@ -591,6 +592,30 @@
591
592
  clickAcion(field,submitData);
592
593
  }
593
594
  },
595
+ clickNextHandler() {
596
+ if(this.parentModel){
597
+ let oldValue=this.parentModel.listData[this.parentModel.selectIndex][this.parentModel.primaryKey];
598
+ this.parentModel.$vue.rowKeyDownHandle(null,1);
599
+ let newValue=this.parentModel.listData[this.parentModel.selectIndex][this.parentModel.primaryKey];
600
+ if(oldValue!==newValue){
601
+ let parm=this.apiParam;
602
+ parm[this.parentModel.primaryKey]=newValue;
603
+ this.loaderObj.Detail(this.api,parm, this.load);
604
+ }
605
+ }
606
+ },
607
+ clickPrevHandler() {
608
+ if(this.parentModel){
609
+ let oldValue=this.parentModel.listData[this.parentModel.selectIndex][this.parentModel.primaryKey];
610
+ this.parentModel.$vue.rowKeyDownHandle(null,-1);
611
+ let newValue=this.parentModel.listData[this.parentModel.selectIndex][this.parentModel.primaryKey];
612
+ if(oldValue!==newValue){
613
+ let parm=this.apiParam;
614
+ parm[this.parentModel.primaryKey]=newValue;
615
+ this.loaderObj.Detail(this.api,parm, this.load);
616
+ }
617
+ }
618
+ },
594
619
  }
595
620
  }
596
621
  </script>
@@ -13,6 +13,7 @@
13
13
  :headers="headers"
14
14
  :before-upload="beforeUploadProcess"
15
15
  :on-success="handleAvatarSuccess"
16
+ :on-error="handleAvatarError"
16
17
  :on-progress="uploadProcess"
17
18
  :limit="parseInt(model.max||999)"
18
19
  :on-exceed="handleExceed">
@@ -196,6 +197,14 @@
196
197
  handleAvatarSuccess(res, file, fileList) {
197
198
  this.model.handleAvatarSuccess(res, file, fileList);
198
199
  },
200
+ handleAvatarError(res, file, fileList) {
201
+ if(res.status===404){
202
+ let m=JSON.parse(res.message);
203
+ if(m.error){
204
+ this.$message.warning('path('+m.path+') '+m.error);
205
+ }
206
+ }
207
+ },
199
208
  //不能共用的数据校验
200
209
  selfValidExcute: function (eventName) {
201
210
 
@@ -141,6 +141,7 @@
141
141
  this.$emit('failLoad', this.model);
142
142
  },
143
143
  load(data) {
144
+ var self=this;
144
145
  this.$set(this, 'model', data);
145
146
  this.model.self = this;
146
147
  if (typeof this.model.scripts !== 'undefined') {
@@ -150,6 +151,14 @@
150
151
  this.model.scripts.formData.fieldsDic = this.model.fieldsDic;
151
152
  }
152
153
  this.loadFields();
154
+
155
+ if(this.model.onload){
156
+ let onloads=this.model.onload.split(';');
157
+ onloads.forEach((v, index) => {
158
+ self.$common.excute.call(self.model.scripts, v);
159
+ });
160
+ }
161
+
153
162
  this.loading = false;
154
163
  //通知父组件加载完成
155
164
  this.$emit('loaded', this.model);
@@ -110,6 +110,7 @@
110
110
  @click="rolRouterClickHandler">
111
111
  </ct-tablecurrency>
112
112
 
113
+
113
114
  <!--正常的列-->
114
115
  <div v-else-if="column.flagHtml" v-html="row[column.id]" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" :style="column.style ? column.style:''">
115
116
  </div>
@@ -43,6 +43,9 @@ const Base = function (source) {
43
43
  get code1() {
44
44
  return source.code1;
45
45
  },
46
+ set code1(v) {
47
+ source.code1 = v;
48
+ },
46
49
  get value() {
47
50
  return source.code1;
48
51
  },
@@ -60,8 +60,8 @@ const ContactList = function (source,para ,callBack) {
60
60
  if (data.content.actionRouters) {
61
61
  data.content.actionRouters.forEach((v) => {
62
62
  var router = Router(v);
63
- //router.is = "ct-btn";
64
- //router.attrs = { size: "mini" }
63
+ router.is = "ct-btn";
64
+ router.attrs = { size: "mini" }
65
65
  rtn._actionRouter.push(router);
66
66
  });
67
67
  }
@@ -180,8 +180,7 @@ const ContactList = function (source,para ,callBack) {
180
180
  if (col._router !== null) {
181
181
  return col._router;
182
182
  }
183
- //todo
184
- if (typeof v.routerKey !== "undefined") {
183
+ if (typeof v.routerKey !== "undefined" && v.routerKey && v.routerKey.indexOf(',')===-1) {
185
184
  let router = rtn.actionRouter.find(b => {
186
185
  return b.id === v.routerKey;
187
186
  });
@@ -189,6 +188,23 @@ const ContactList = function (source,para ,callBack) {
189
188
  }
190
189
  return null;
191
190
  },
191
+ _routers: null,
192
+ get routers() {
193
+ if (col._routers !== null) {
194
+ return col._routers;
195
+ }
196
+ if (typeof v.routerKey !== "undefined" && v.routerKey) {
197
+ col._routers=[];
198
+ v.routerKey.split(',').forEach((v) => {
199
+ let router = rtn.actionRouter.find(b => {
200
+ return b.id === v;
201
+ });
202
+ col._routers.push(router);
203
+ });
204
+ return col._routers;
205
+ }
206
+ return null;
207
+ },
192
208
  //是否高度自适应
193
209
  get autoRowHeight() {
194
210
  return v.autoRowHeight;
@@ -160,6 +160,9 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
160
160
  }
161
161
  }
162
162
  },
163
+ get onload() {
164
+ return source.onload;
165
+ },
163
166
  get formData() {
164
167
  return formData;
165
168
  },
@@ -322,6 +322,9 @@ const Router = function (source) {
322
322
  return true;
323
323
  }
324
324
  },
325
+ get buttonHeight() {
326
+ return source.buttonHeight||24;
327
+ },
325
328
  };
326
329
  return rtn;
327
330
  }
@@ -106,7 +106,6 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
106
106
  if (col._router !== null) {
107
107
  return col._router;
108
108
  }
109
- //todo
110
109
  if (typeof v.routerKey !== "undefined") {
111
110
  let router = rtn.actionRouter.find(b => {
112
111
  return b.id === v.routerKey;
package/src/main.js CHANGED
@@ -13,6 +13,7 @@ Vue.use(ElementUI, { size: 'mini'});
13
13
  Vue.config.productionTip = false;
14
14
  Vue.use(centaline, {
15
15
  baseUrl: "http://10.88.22.46:7070/v1/form/router",
16
+ // baseUrl: "http://10.88.23.22:9999/v1/form/router",
16
17
  // baseUrl: "http://tjcptest.centaline.com.cn/",
17
18
  // flagRouterSelf: true,
18
19
  zindex: 999,
@@ -36,9 +37,9 @@ Vue.use(centaline, {
36
37
  getRequestHeaders: function () {
37
38
  return {
38
39
  oldToken: '1c37d6b7-9259-4835-88f6-a389900244f7',
39
- estateId: '20210729104021C49F04B55C50F6AF58',
40
40
  originalRequestURL: 'http://10.88.22.67:8080',
41
- Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE0NmU5ZjEzLTVjMmYtNGVlMy1hM2U5LWIxM2QyZThjZTBhZSJ9.Gl8K5lbG7t5DyCqouu7Ux7Oh9xuAxqdOXr4JnoHCN-YwC3b2zPO-C2sHbYJUZHYQPa7kTNRmg1xJiwugpVo5Xw',
41
+ EstateInfo: '{"estateId":"201509230915485D942241BBA30FF49F","estateName":"%E7%88%B1%E7%90%B4%E6%B5%B7B%E7%BB%84"}',
42
+ Authorization:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjgyZjdlZWUzLTY1ODctNDk4NS1hMTE3LTE3ODQxNDUxYzY5MCJ9.d8lc203lFjHqjJ6mboxSD7Eo2nJBYyynY9MtH5L0N3L9fYVedUhhvscnaxw08fITffWLxH4Mc7kP7qvHbJ3I8A',
42
43
  };
43
44
  },
44
45
  // 请求完成事件,可判断是否登录过期执行响应操作