centaline-data-driven 1.2.56 → 1.2.57

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.56",
3
+ "version": "1.2.57",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
Binary file
Binary file
@@ -804,9 +804,4 @@ html {
804
804
  line-height: 26px;
805
805
  }
806
806
 
807
- .el-popoverabsolute{
808
- position: absolute !important;
809
- top: 20px !important;
810
- }
811
-
812
807
 
@@ -34,14 +34,14 @@
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" :id="model.id"
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" :append-to-body="false"
44
- class="Stats-popover" :popper-class="flagAbsolute?'el-popoverabsolute':'el-popover1'" :placement="option.placement?option.placement:'left'"
43
+ <el-popover :ref="'popover'+model.id"
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>
@@ -69,7 +69,6 @@
69
69
  vmodel: Object,
70
70
  fileData: Object,
71
71
  optionApi:String,
72
- flagAbsolute:Boolean,
73
72
  },
74
73
  mixins: [dynamicElement],
75
74
  data: function () {
@@ -1,6 +1,7 @@
1
1
  <template>
2
- <div v-if="apiRouter!=={} && model && model.listData.length>0" style="border: 1px solid #ECEFF2;box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06);border-radius: 6px;
3
- padding-bottom: 10px;padding-top: 10px;padding-left: 10px;display: flex;font-size: 12px;">
2
+ <div v-if="apiRouter!=={} && model && model.listData.length>0"
3
+ style="border: 1px solid #ECEFF2;box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06);border-radius: 6px;
4
+ padding-bottom: 10px;padding-top: 10px;padding-left: 10px;display: flex;font-size: 12px;width:100%">
4
5
  <div class="ct-so" style="width:auto;margin-right: 10px;">
5
6
  <el-popover ref="pop" placement="bottom-start" v-model="showDrop" trigger="click">
6
7
  <div>
@@ -18,8 +19,8 @@
18
19
  </span>
19
20
  </div>
20
21
  <div style="margin-left: 5px;display: flex;">
21
- <component v-for="(router, index) in model.rowRouter" :key="index" :ref="'router'+router.id" :flagAbsolute="true"
22
- v-if="!router.rightField || model.listData[model.value][router.rightField] == 1" :style="{position: router.isCallTel ?'relative':null}"
22
+ <component v-for="(router, index) in model.rowRouter" :key="index" :ref="'router'+router.id"
23
+ v-if="!router.rightField || model.listData[model.value][router.rightField] == 1"
23
24
  :is="router.is" :vmodel="router" :api="model.optionApi" @click="fieldClickHandler(router)">
24
25
  </component>
25
26
  </div>
@@ -60,8 +60,8 @@
60
60
  <el-popover v-if="showIndex>0" ref="popover0" :append-to-table="option.appendId?option.appendId:''"
61
61
  class="Stats-popover" popper-class="el-popover1" :placement="option.placement?option.placement:'left'"
62
62
  :trigger="option.trigger?option.trigger:''">
63
- <div class="tab-list" style="border-bottom:none">
64
- <component v-for="(router, index) in model.actionRoutersSimple.slice(showIndex)" :key="index"
63
+ <div class="tab-list" style="border-bottom:none;display: flex;flex-direction: column;">
64
+ <component v-for="(router, index) in model.actionRoutersSimple.slice(showIndex)" :key="index" style="margin-bottom: 10px;margin-left: 0px;"
65
65
  v-if="!router.rightField || (model.fields1Dic[router.rightField] && model.fields1Dic[router.rightField].value == 1)"
66
66
  :is="router.is" :vmodel="router" :api="model.optionApi" @click="fieldClickHandler(router)">
67
67
  </component>
@@ -100,7 +100,7 @@
100
100
  showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
101
101
  appendId: '',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
102
102
  trigger: 'hover',//触发方式,传值可查看Popper UI组件trigger属性
103
- placement: 'right-start',//方向,传值可查看Popper UI组件placement属性
103
+ placement: 'left-start',//方向,传值可查看Popper UI组件placement属性
104
104
  },
105
105
  }
106
106
  },
@@ -147,9 +147,12 @@
147
147
  this.topWidth=this.$refs.main.clientWidth-140;
148
148
  }
149
149
 
150
- let totalWidth=self.$refs.routers.offsetWidth;
150
+ let totalWidth=0;
151
151
  let sumWidth=0;
152
152
  let moreWidth = 20;
153
+ if(self.$refs.routers){
154
+ totalWidth=self.$refs.routers.offsetWidth;
155
+ }
153
156
  self.model.actionRoutersSimple.forEach((v,i) => {
154
157
  if(!v.rightField || (self.model.fields1Dic[v.rightField] && self.model.fields1Dic[v.rightField].value == 1)){
155
158
  if(self.$refs['routers'+i][0] && self.$refs['routers'+i][0].$el){
@@ -255,8 +255,11 @@
255
255
  if (!field.isClientFuntion) {
256
256
  if (field.isSubmit) {
257
257
  let verified = true;
258
- if (self.validExcute()) {
259
- if (typeof field.onClick !== 'undefined') {
258
+ if(field.flagVerifyData){
259
+ verified=self.validExcute();
260
+ }
261
+ if (verified) {
262
+ if (field.flagVerifyData && typeof field.onClick !== 'undefined') {
260
263
  verified = self.$common.excute.call(self.model.scripts, field.onClick);
261
264
  }
262
265
 
@@ -294,7 +297,7 @@
294
297
  self.parentModel.$vue.closeTabThen(data);
295
298
  }
296
299
  }
297
- field.disabled = false;
300
+ field.disabled = false;
298
301
  self.model.pageDisabled= false;
299
302
  });
300
303
  }
@@ -411,7 +414,7 @@
411
414
  }
412
415
  }
413
416
 
414
- if (field.isSubmit && !self.validExcute()) {
417
+ if (field.isSubmit && field.flagVerifyData && !self.validExcute()) {
415
418
  return;
416
419
  }
417
420
 
@@ -20,21 +20,36 @@
20
20
  @click="viewerOpen(photoList, index)"
21
21
  >
22
22
  </el-image>
23
- <span class="cover-list-item-span-delete">
23
+ <span
24
+ class="cover-list-item-span-delete"
25
+ v-if="!modelPhotoselect.lock"
26
+ >
24
27
  <i class="el-icon-delete" @click="handleRemove(index)"></i>
25
28
  </span>
26
- <span class="cover-list-item-span" v-if="item.mediaLabelName">
27
- <span class="el-dropdown-link">
28
- &nbsp;{{ item.mediaLabelName }}
29
+ <span class="cover-list-item-span">
30
+ <span class="el-dropdown-link" v-if="item.mediaLabelName">
31
+ <span style="width: 80px; height: 26px; display: inline-flex;">
32
+ &nbsp;{{ item.mediaLabelName }} </span>
33
+ </span>
34
+ <span v-if="item.rightDefault==true||item.rightDefault=='true'"
35
+ :class="[
36
+ item.flagDefault &&
37
+ (item.flagDefault == true || item.flagDefault == 'true')
38
+ ? 'checked'
39
+ : 'Unchecked',
40
+ 'isradio',
41
+ ]"
42
+ @click="radiochecked(photoList, item)"
43
+ >
29
44
  </span>
30
45
  </span>
31
46
  </div>
32
47
  </li>
33
48
  </draggable>
34
49
  </ul>
35
- <div
50
+ <div
36
51
  class="el-upload el-upload--picture-card"
37
- v-if="!modelPhotoselect.lock&&photoList.length<max"
52
+ v-if="!modelPhotoselect.lock && photoList.length < max"
38
53
  @click="handleOpen()"
39
54
  >
40
55
  <i class="el-icon-plus"></i>
@@ -65,7 +80,8 @@ export default {
65
80
  },
66
81
  data() {
67
82
  return {
68
- max:99999,
83
+ radio: "1",
84
+ max: 99999,
69
85
  validMessage: "",
70
86
  photoList: [],
71
87
  modelPhotoselect: {},
@@ -103,7 +119,7 @@ export default {
103
119
  methods: {
104
120
  load(data) {
105
121
  this.model = data;
106
- this.max=data.max?data.max:99999;
122
+ this.max = data.max ? data.max : 99999;
107
123
  this.modelPhotoselect = data;
108
124
  this.photoList = data.fileList;
109
125
  },
@@ -156,7 +172,7 @@ export default {
156
172
  }, 3000);
157
173
  photoList = photoList.slice(0, this.modelPhotoselect.max);
158
174
  }
159
- }
175
+ }
160
176
  self.modelPhotoselect.setFileList(photoList);
161
177
  self.photoList = photoList;
162
178
 
@@ -183,7 +199,15 @@ export default {
183
199
  self.$nextTick(function () {
184
200
  self.modelPhotoselect.setFileList(self.photoList);
185
201
  });
186
- },
202
+ },
203
+ radiochecked(list, item) {
204
+ var self = this;
205
+ list.forEach((v) => {
206
+ v.flagDefault = false;
207
+ });
208
+ item.flagDefault = true;
209
+ self.modelPhotoselect.setFileList(list);
210
+ },
187
211
  //不能共用的数据校验
188
212
  selfValidExcute: function (eventName) {
189
213
  if (this.modelPhotoselect.required) {
@@ -275,10 +299,14 @@ export default {
275
299
  margin-right: 4px;
276
300
  }
277
301
 
278
- .ct-photoSelect .el-dropdown-link {
279
- cursor: pointer;
280
- color: #fff;
281
- }
302
+ .ct-photoSelect .el-dropdown-link{
303
+ cursor: pointer;
304
+ color: #fff;
305
+ position: relative;
306
+ width: 80px;
307
+ height: 26px;
308
+ display: inline-block;
309
+ }
282
310
 
283
311
  .ct-photoSelect .el-icon-arrow-down {
284
312
  font-size: 12px;
@@ -306,4 +334,21 @@ export default {
306
334
  .card {
307
335
  display: inline-block;
308
336
  }
337
+
338
+ .ct-photoSelect .checked {
339
+ background: url(../../../assets/checked.png);
340
+ }
341
+ .ct-photoSelect .Unchecked {
342
+ background: url(../../../assets/Unchecked.png);
343
+ }
344
+
345
+ .ct-photoSelect .isradio {
346
+ background-size: 100% 100%;
347
+ height: 18px;
348
+ width: 18px;
349
+ display: block;
350
+ cursor: pointer;
351
+ margin-top: 5px;
352
+ float: right;
353
+ }
309
354
  </style>
@@ -215,12 +215,16 @@
215
215
  }
216
216
  },
217
217
  sideMenuClickHandler(v) {
218
+ let popoverCallTels=document.getElementsByClassName('el-popoverCallTel');
218
219
  if(v=='open'){
219
220
  this.sideBarStatus ='close';
220
221
  this.sideBarRight=-this.sideBarWidth;
221
222
  this.sideBarWidth=0;
222
223
  this.searchWidth=0;
223
224
  this.sideBarMenuRight=0;
225
+ for(var i=0;i<popoverCallTels.length;i++){
226
+ popoverCallTels[i].style.display='none';
227
+ }
224
228
  }
225
229
  else if(v=='close'){
226
230
  this.sideBarStatus ='open';
@@ -228,7 +232,10 @@
228
232
  this.sideBarWidth=this.$refs.table.model.sideBarWidth;
229
233
  this.searchWidth=this.$refs.main.clientWidth-this.sideBarWidth;
230
234
  this.sideBarMenuRight=this.sideBarWidth-2;
231
- this.rowClickHandle();
235
+ this.rowClickHandle();
236
+ for(var i=0;i<popoverCallTels.length;i++){
237
+ popoverCallTels[i].style.display='block';
238
+ }
232
239
  }
233
240
  },
234
241
  closeSideHandler() {
@@ -45,7 +45,6 @@ const formData = {
45
45
  var rtn1 = this.fieldsDic[id];
46
46
  if (rtn1) {
47
47
  rtn1.source[attrKey] = attrValue;
48
- console.log(this.form)
49
48
  this.form.hatchHandle(id, attrKey, attrValue, rtn1);
50
49
  //this.form.hiddenHandle(rtn1);//隐藏关联的
51
50
 
@@ -231,7 +230,7 @@ const formData = {
231
230
  //获取后台数据,并返回脚本。
232
231
  execServerScript(action, object, successCallback) {
233
232
  let formData = this;//作用域保存
234
- debugger;
233
+
235
234
  //是否是行内触发的
236
235
  let data = this.getListField(this.form.scripts.$fd, null, null);
237
236
  object.editMode = data ? 1 : 0;
@@ -144,7 +144,9 @@ const Base = function (source) {
144
144
  },
145
145
  get lock() {
146
146
  return source.locked;
147
- //return true;
147
+ },
148
+ set locked(v) {
149
+ source.locked = v;
148
150
  },
149
151
  get listBind() {
150
152
  let bind = {};
@@ -313,6 +313,15 @@ const Router = function (source) {
313
313
  get locked() {
314
314
  return source.locked;
315
315
  },
316
+ get flagVerifyData() {
317
+ //提交表单时是否校验数据
318
+ if(source.flagVerifyData!=undefined){
319
+ return source.flagVerifyData;
320
+ }
321
+ else{
322
+ return true;
323
+ }
324
+ },
316
325
  };
317
326
  return rtn;
318
327
  }