centaline-data-driven 1.6.17 → 1.6.19

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.6.17",
3
+ "version": "1.6.19",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,32 @@
1
+
2
+ # v1.6.19
3
+ 2024-09-05
4
+
5
+ 优化
6
+
7
+ 表格没有返回rows添加判断
8
+
9
+ 文件预览组件,下载增加参数 download=1
10
+
11
+ 表单列表数据非新增数据默认传flagNew=false
12
+
13
+ 表单列表行操作位置改为api控制,默认最后一列
14
+
15
+ 表单页面提示信息,显示在页面顶部并且悬停,支持html
16
+
17
+ js给表单列表赋值超过页面高度,保存按钮没有浮动处理
18
+
19
+ 预览文件组件,图片拖动位置
20
+
21
+ # v1.6.18
22
+ 2024-08-16
23
+
24
+ 优化
25
+
26
+ 经纬度获取控件优化验证
27
+
28
+ 表单列表锁定样式调整为不显示按钮
29
+
1
30
  # v1.6.17
2
31
  2024-08-14
3
32
  新增
package/src/Form.vue CHANGED
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
3
  <!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
4
- <ct-form :api="'/estatemanage/estate/getEstateInfo'" :apiParam="apiParam" :topHeight="topHeight" :documentHeight="'600px'"></ct-form>
4
+ <ct-form :api="'/callcustomer/callcustpoolimport/getLayoutOfNew'" :apiParam="apiParam" :topHeight="topHeight" :documentHeight="'600px'"></ct-form>
5
5
  <ct-dialog-list></ct-dialog-list>
6
6
  </div>
7
7
  </template>
@@ -12,7 +12,7 @@
12
12
  data() {
13
13
  return {
14
14
  apiParam:{
15
- "actionType":2
15
+ "type":"top"
16
16
  },
17
17
  topHeight:10,
18
18
  }
@@ -31,10 +31,13 @@
31
31
 
32
32
  <!-- CCES -->
33
33
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/agentuserlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/agentuserlist/getList'"></ct-searchlist> -->
34
- <ct-searchlist :apiParam="para" :searchConditionApi="'/contractmanage/ContractList/getLayoutOfSearch'" :searchDataApi="'/contractmanage/ContractList/getList'"></ct-searchlist>
34
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/contractmanage/ContractList/getLayoutOfSearch'" :searchDataApi="'/contractmanage/ContractList/getList'"></ct-searchlist> -->
35
35
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/sunexpensemanage/sunexpenserecordlist/getLayoutOfSearch'" :searchDataApi="'/sunexpensemanage/sunexpenserecordlist/getList'"></ct-searchlist> -->
36
36
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/customermanage/ProjectCustomerList/getLayoutOfSearch'" :searchDataApi="'/customermanage/ProjectCustomerList/getList'"></ct-searchlist> -->
37
37
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/workwxmanage/WorkWXApplicationList/getLayoutOfSearch'" :searchDataApi="'/workwxmanage/WorkWXApplicationList/getList'"></ct-searchlist> -->
38
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/UrgentResponsiblePersonList/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/UrgentResponsiblePersonList/getList'"></ct-searchlist> -->
39
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/customerquery/publiccustcalltaskreferrallist/getLayoutOfSearch'" :searchDataApi="'/customerquery/publiccustcalltaskreferrallist/getList'"></ct-searchlist> -->
40
+ <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/agentuserlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/agentuserlist/getList'"></ct-searchlist>
38
41
  <!-- CCES -->
39
42
 
40
43
  <!-- <ct-searchlist :apiParam="para"
@@ -103,6 +106,10 @@
103
106
  <!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/PropertyVRRealLookBalanceList/getLayoutOfSearchForOFI'" :searchDataApi="'/PropertyVRRealLookBalanceList/getListOfSearchModel'"></ct-searchlist> -->
104
107
 
105
108
 
109
+ <!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyPublishList/getLayoutOfSearch'"
110
+ :searchDataApi="'/propertyPublishList/getListOfSearchModel'"
111
+ :searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist> -->
112
+
106
113
 
107
114
  <!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/cache/getLayoutOfSearchForCache'" :searchDataApi="'/cache/getListOfSearchModelForCache'"></ct-searchlist> -->
108
115
 
@@ -1,6 +1,10 @@
1
1
  <template>
2
2
  <div v-loading="loading" :style="{width:pageWidth?pageWidth+'px':'100%',margin:'auto','min-height': minHeight}">
3
3
  <div v-if="model !== null && !loading" class="ct-form" :class="{'domDisabled':model.pageDisabled}" :key="formKey">
4
+ <div v-if="model.tip" class="tip-absolute" :style="{width:(tipWidth-20)+'px'}">
5
+ <span v-html="model.tip"></span>
6
+ </div>
7
+
4
8
  <!--可根据场景判断显示el-card还是el-main-->
5
9
  <component :is="model.showTitle?'el-main':'el-card'">
6
10
  <div slot="header" class="clearfix" v-if="typeof model.title !== 'undefined' && model.flagShowTitle">
@@ -213,6 +217,7 @@
213
217
  independentItem: [],//最后一个独立分组的行列布局
214
218
  minHeight: 'auto',
215
219
  downloadUrl:"",
220
+ tipWidth:0,
216
221
  };
217
222
  },
218
223
  deactivated(){
@@ -220,18 +225,24 @@
220
225
  },
221
226
  mounted() {
222
227
  this.init();
223
- this.setCss();
228
+ this.setCss();
229
+ this.$nextTick(() => {
230
+ this.tipWidth=this.$el.clientWidth;
231
+ })
224
232
  },
225
233
  updated() {
226
- this.$nextTick(() => {
227
- let parentDom=this.$el.parentElement;
228
- if (parentDom.scrollHeight > parentDom.clientHeight
229
- && this.model && (!this.model.isHorizontalLayout || this.flagScroll)) {
230
- this.isScroll = true;
231
- }
232
- });
234
+ this.computeScroll();
233
235
  },
234
236
  methods: {
237
+ computeScroll(){
238
+ this.$nextTick(() => {
239
+ let parentDom=this.$el.parentElement;
240
+ if (parentDom.scrollHeight > parentDom.clientHeight
241
+ && this.model && (!this.model.isHorizontalLayout || this.flagScroll)) {
242
+ this.isScroll = true;
243
+ }
244
+ });
245
+ },
235
246
  init() {
236
247
  var self = this;
237
248
  //初始化
@@ -1497,7 +1508,6 @@
1497
1508
  /* bottom: 6px; */
1498
1509
  bottom: 0;
1499
1510
  left: 0;
1500
- right: 0;
1501
1511
  border-radius: 0 0 4px 4px;
1502
1512
  position: absolute;
1503
1513
  line-height: 34px;
@@ -1506,4 +1516,17 @@
1506
1516
  margin: auto;
1507
1517
  box-shadow: 0 2px 20px 0 rgb(0 0 0 / 10%);
1508
1518
  }
1519
+
1520
+ .tip-absolute {
1521
+ z-index: 100;
1522
+ top: 10;
1523
+ left: 10;
1524
+ position: absolute;
1525
+ line-height: 24px;
1526
+ background-color:#ffe7cc;
1527
+ color:#EC3D3D;
1528
+ border-radius: 5px;
1529
+ padding: 8px;
1530
+ font-size: 12px;
1531
+ }
1509
1532
  </style>
@@ -1,30 +1,57 @@
1
1
  <template>
2
- <div class="ct-form-list" v-focus="foucus" :class="{'tableDisabled':model.tableDisabled}">
2
+ <div class="ct-form-list" v-focus="foucus">
3
+ <!-- :class="{'tableDisabled':model.tableDisabled}" -->
3
4
  <div v-if="model.title" class="list-title">
4
5
  <h5>{{model.title}}</h5>
5
6
  </div>
6
7
  <div v-else-if="model.create || (model.selectRouter && model.selectRouter.id) || model.toolButtonsShow.length>0" class="list-title"></div>
7
8
  <div class="list-button">
8
- <ul>
9
- <li v-for="(v,i) in model.toolButtonsShow" >
10
- <component :is="v.is" :vmodel="v" :parentModel="model" @click="toolButtonsClick" @importComplete="importComplete" @change="toolButtonsChangeHandler(v,$event)"></component>
11
- </li>
12
- <li v-if="model.selectRouter!==null">
13
- <component :is="model.selectRouter.is" :vmodel="model.selectRouter" @click="popupSearchListHandle" ></component>
14
- </li>
15
- <li v-if="model.create" >
16
- <el-button :disabled="model.disabled" type="success" class="max-btn-add" style="width: auto;" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
17
- {{model.createText}}
18
- </el-button>
19
- </li>
20
- </ul>
9
+ <template v-if="!model.tableDisabled">
10
+ <ul>
11
+ <li v-for="(v,i) in model.toolButtonsShow" >
12
+ <component :is="v.is" :vmodel="v" :parentModel="model" @click="toolButtonsClick" @importComplete="importComplete" @change="toolButtonsChangeHandler(v,$event)"></component>
13
+ </li>
14
+ <li v-if="model.selectRouter!==null">
15
+ <component :is="model.selectRouter.is" :vmodel="model.selectRouter" @click="popupSearchListHandle" ></component>
16
+ </li>
17
+ <li v-if="model.create" >
18
+ <el-button :disabled="model.disabled" type="success" class="max-btn-add" style="width: auto;" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
19
+ {{model.createText}}
20
+ </el-button>
21
+ </li>
22
+ </ul>
23
+ </template>
21
24
  </div>
22
25
 
23
26
  <div id="listTable">
24
27
  <el-row>
25
28
  <el-col :span="24">
26
29
  <el-table size="mini" class="max-table--border" :data="model.tableData" border
27
- style="width: 100%" highlight-current-row :show-summary="model.showSummary" :summary-method="getSummaries">
30
+ style="width: 100%" highlight-current-row :show-summary="model.showSummary" :summary-method="getSummaries">
31
+ <!--操作列-->
32
+ <template v-if="model.rowActionRoutersAlign === 1">
33
+ <el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || (model.buttons.length > 0 && model.buttonsShow.length > 0)" :fixed="fixedButtons" :width="'100%'" :render-header="renderHeader" :min-width="tableColumnWith">
34
+ <template slot-scope="scope">
35
+ <template v-if="!model.tableDisabled">
36
+ <span v-if="scope.row.edit || scope.row.isSet" class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,true)">
37
+ {{scope.row.isSet?'保存':"修改"}}
38
+ </span>
39
+ <span v-if="scope.row.delete && !scope.row.isSet" class="el-tag el-tag--danger el-tag--mini" style="cursor: pointer;" @click="deleteRow(scope.$index, scope.row.$sourceIndex)">
40
+ 删除
41
+ </span>
42
+ <span v-else-if="scope.row.isSet" class="el-tag el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,false)">
43
+ 取消
44
+ </span>
45
+ <span v-for="(v,i) in model.buttons"
46
+ v-if="!scope.row.isSet && v.show && ( !v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1 )"
47
+ class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="buttonClick(scope.row, v)">
48
+ {{v.label}}
49
+ </span>
50
+ </template>
51
+ </template>
52
+ </el-table-column>
53
+ </template>
54
+
28
55
  <!--数据列-->
29
56
  <el-table-column v-for="(v,i) in model.rows[0].field" :key="i" :prop="v.id" :label="v.label" :width="v.width" :fixed="model.frozenColumns.includes(v.id)" v-if="v.show !== false && v.type!==13" :render-header="renderHeader" :min-width="tableColumnWith">
30
57
  <template slot="header" slot-scope="scope">
@@ -52,24 +79,28 @@
52
79
  </el-table-column>
53
80
 
54
81
  <!--操作列-->
55
- <el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || (model.buttons.length > 0 && model.buttonsShow.length > 0)" :fixed="fixedButtons" :width="'100%'" :render-header="renderHeader" :min-width="tableColumnWith">
56
- <template slot-scope="scope">
57
- <span v-if="scope.row.edit || scope.row.isSet" class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,true)">
58
- {{scope.row.isSet?'保存':"修改"}}
59
- </span>
60
- <span v-if="scope.row.delete && !scope.row.isSet" class="el-tag el-tag--danger el-tag--mini" style="cursor: pointer;" @click="deleteRow(scope.$index, scope.row.$sourceIndex)">
61
- 删除
62
- </span>
63
- <span v-else-if="scope.row.isSet" class="el-tag el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,false)">
64
- 取消
65
- </span>
66
- <span v-for="(v,i) in model.buttons"
67
- v-if="!scope.row.isSet && v.show && ( !v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1 )"
68
- class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="buttonClick(scope.row, v)">
69
- {{v.label}}
70
- </span>
71
- </template>
72
- </el-table-column>
82
+ <template v-if="model.rowActionRoutersAlign !== 1">
83
+ <el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || (model.buttons.length > 0 && model.buttonsShow.length > 0)" :fixed="fixedButtons" :width="'100%'" :render-header="renderHeader" :min-width="tableColumnWith">
84
+ <template slot-scope="scope">
85
+ <template v-if="!model.tableDisabled">
86
+ <span v-if="scope.row.edit || scope.row.isSet" class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,true)">
87
+ {{scope.row.isSet?'保存':"修改"}}
88
+ </span>
89
+ <span v-if="scope.row.delete && !scope.row.isSet" class="el-tag el-tag--danger el-tag--mini" style="cursor: pointer;" @click="deleteRow(scope.$index, scope.row.$sourceIndex)">
90
+ 删除
91
+ </span>
92
+ <span v-else-if="scope.row.isSet" class="el-tag el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,false)">
93
+ 取消
94
+ </span>
95
+ <span v-for="(v,i) in model.buttons"
96
+ v-if="!scope.row.isSet && v.show && ( !v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1 )"
97
+ class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="buttonClick(scope.row, v)">
98
+ {{v.label}}
99
+ </span>
100
+ </template>
101
+ </template>
102
+ </el-table-column>
103
+ </template>
73
104
  </el-table>
74
105
  </el-col>
75
106
  </el-row>
@@ -9,9 +9,9 @@
9
9
  </div>
10
10
  <div style="display:inline-flex;padding-left:0px;" v-bind="model.attrs" :class="model.locked ? 'ct-is-disabled' : ''">
11
11
  <input style="text-align:left;width:100%" class="el-location-input hoverColor" :placeholder="model.attrs.placeholder1"
12
- v-model="model.value" @change="changeHandler($event)"/>
12
+ v-model="model.value" @change="changeModel($event)"/>
13
13
  <input style="text-align:left;width:100%;margin-left:5px;" class="el-location-input hoverColor" :placeholder="model.attrs.placeholder2"
14
- v-model="model.value1" @change="changeHandler($event);"/>
14
+ v-model="model.value1" @change="changeModel($event);"/>
15
15
  </div>
16
16
  <div v-if="model.moreActionRouter" style="display: inline-block;margin-left: 5px;">
17
17
  <img v-if="model.moreActionRouter.imgUrl" class="ct-tablecurrencyImg ct-tablecurrencyItem"
@@ -61,6 +61,9 @@
61
61
  }
62
62
  });
63
63
  },
64
+ changeModel(event) {
65
+ this.changeHandler(event);
66
+ }
64
67
  }
65
68
  }
66
69
  </script>
@@ -349,15 +349,18 @@ export default {
349
349
  thHeight = document.getElementById("thHeight").offsetHeight;
350
350
  if (document.getElementById("theadTitle")) {
351
351
  this.theadTitleWidth = document.getElementById("theadTitle").offsetWidth;
352
- } else {
352
+ }
353
+ else {
353
354
  this.theadTitleWidth = 0
354
355
  }
355
- } else {
356
+ }
357
+ else {
356
358
  tagsViewHeight = 0;
357
359
  thHeight = -10;
358
360
  if (document.getElementById("theadTitle")) {
359
361
  this.theadTitleWidth = document.getElementById("theadTitle").offsetWidth * 0.5;
360
- } else {
362
+ }
363
+ else {
361
364
  this.theadTitleWidth = 0
362
365
  }
363
366
  }
@@ -492,11 +495,13 @@ export default {
492
495
  ev.currentTarget.canResize = true;
493
496
  if (this.model.columnWidthSaveAction) {
494
497
  this.theadTitleShow = true
495
- } else {
498
+ }
499
+ else {
496
500
  this.theadTitleShow = false
497
501
  }
498
502
 
499
- } else {
503
+ }
504
+ else {
500
505
  ev.currentTarget.style.cursor = "default";
501
506
  ev.currentTarget.canResize = false;
502
507
  }
@@ -523,7 +528,8 @@ export default {
523
528
  if (oldWidth != col.width && self.model.columnWidthSaveAction && self.model.columnWidthSaveAction.length > 0) {
524
529
  var submitData = { 'columnName': col.id, columnWidth: col.width }
525
530
  self.model.getAction(self.model.columnWidthSaveAction, submitData);
526
- } else if (!self.model.columnWidthSaveAction) {
531
+ }
532
+ else if (!self.model.columnWidthSaveAction) {
527
533
  window.localStorage.setItem(self.model.title + "_" + col.id, col.width);
528
534
  }
529
535
 
@@ -2730,7 +2736,7 @@ export default {
2730
2736
  }
2731
2737
 
2732
2738
  .ct-searchtable .ct-search-table-tag {
2733
- background-color: #fdf6ec;
2739
+ background-color: #ffe7cc;
2734
2740
  border-color: #faecd8;
2735
2741
  width: 100%;
2736
2742
  box-shadow: 0 2px 10px 0 rgb(0 0 0 / 10%);
@@ -289,10 +289,10 @@
289
289
  handDownloadUrl(url){
290
290
  let self = this;
291
291
  if (url.indexOf("?") > -1) {
292
- self.downloadUrl = self.getDownloadUrl(url) + "&" + Math.random();
292
+ self.downloadUrl = self.getDownloadUrl(url) + "&download=1&" + Math.random();
293
293
  }
294
294
  else {
295
- self.downloadUrl = self.getDownloadUrl(url) + "?" + Math.random();
295
+ self.downloadUrl = self.getDownloadUrl(url) + "?download=1&" + Math.random();
296
296
  }
297
297
  setTimeout(function () {
298
298
  self.downloadLoading = false;
@@ -39,10 +39,47 @@ export default {
39
39
  },
40
40
  mounted() {
41
41
  this.loading = true;
42
- this.startDrag(
43
- document.getElementById("ViewerImage"),
44
- document.getElementById("ViewerImage")
45
- );
42
+ var self = this;
43
+ this.$nextTick(function () {
44
+ // 获取容器和图片元素
45
+ var dragImg = document.getElementById('ViewerImage');
46
+
47
+
48
+ // 鼠标按下事件
49
+ dragImg.onmousedown = function (event) {
50
+ // 计算鼠标相对图片的位置
51
+ self.params.currentX = event.clientX;
52
+ self.params.currentY = event.clientY;
53
+ // 监听鼠标移动和松开事件
54
+ document.onmousemove = function (event) {
55
+ // 计算图片新的位置
56
+
57
+ let nowX = event.clientX,
58
+ nowY = event.clientY;
59
+ let disX = nowX - self.params.currentX,
60
+ disY = nowY - self.params.currentY;
61
+ dragImg.style.left = parseInt( self.params.left) + disX + "px";
62
+ dragImg.style.top = parseInt( self.params.top) + disY + "px";
63
+ };
64
+
65
+ document.onmouseup = function () {
66
+ // 鼠标松开,移除鼠标移动和松开事件的监听
67
+ document.onmousemove = null;
68
+ document.onmouseup = null;
69
+ if (self.getImgCss(dragImg, "left") !== "auto") {
70
+ self.params.left = self.getImgCss(dragImg, "left");
71
+ }
72
+ if (self.getImgCss(dragImg, "top") !== "auto") {
73
+ self.params.top = self.getImgCss(dragImg, "top");
74
+ }
75
+ };
76
+ };
77
+
78
+ // 防止默认事件(如图片拖动默认行为)
79
+ dragImg.ondragstart = function () {
80
+ return false;
81
+ };
82
+ })
46
83
  },
47
84
  watch: {
48
85
  imgUrl(newValue, oldValue) {
@@ -81,57 +118,7 @@ export default {
81
118
  ? e.currentStyle[key]
82
119
  : document.defaultView.getComputedStyle(e, false)[key];
83
120
  },
84
- startDrag(bar, target, callback) {
85
- let that = this;
86
- if (that.getImgCss(target, "left") !== "auto") {
87
- that.params.left = that.getImgCss(target, "left");
88
- }
89
- if (that.getImgCss(target, "top") !== "auto") {
90
- that.params.top = that.getImgCss(target, "top");
91
- }
92
- bar.onmousedown = function (event) {
93
- that.params.flag = true;
94
- if (!event) {
95
- event = window.event;
96
- bar.onselectstart = function () {
97
- return false;
98
- };
99
- }
100
- let e = event;
101
- that.params.currentX = e.clientX;
102
- that.params.currentY = e.clientY;
103
- };
104
- document.onmouseup = function () {
105
- that.params.flag = false;
106
- if (that.getImgCss(target, "left") !== "auto") {
107
- that.params.left = that.getImgCss(target, "left");
108
- }
109
- if (that.getImgCss(target, "top") !== "auto") {
110
- that.params.top = that.getImgCss(target, "top");
111
- }
112
- };
113
- document.onmousemove = function (event) {
114
- let e = event ? event : window.event;
115
- if (that.params.flag) {
116
- let nowX = e.clientX,
117
- nowY = e.clientY;
118
- let disX = nowX - that.params.currentX,
119
- disY = nowY - that.params.currentY;
120
- target.style.left = parseInt(that.params.left) + disX + "px";
121
- target.style.top = parseInt(that.params.top) + disY + "px";
122
- if (typeof callback == "function") {
123
- callback(
124
- (parseInt(that.params.left) || 0) + disX,
125
- (parseInt(that.params.top) || 0) + disY
126
- );
127
- }
128
- if (event.preventDefault) {
129
- event.preventDefault();
130
- }
131
- return false;
132
- }
133
- };
134
- },
121
+
135
122
  },
136
123
  };
137
124
  </script>
@@ -206,7 +206,9 @@ const Base = function (source) {
206
206
  || this.type===Enum.ControlType.MultiLineLabel){
207
207
  }
208
208
  else if(this.isScreen){
209
- if(this.type===Enum.ControlType.DateRange || this.type===Enum.ControlType.DateTimeRange){
209
+ if(this.type===Enum.ControlType.DateRange
210
+ || this.type===Enum.ControlType.DateTimeRange
211
+ || this.type===Enum.ControlType.Location){
210
212
  this.value = this.defaultFormat[0];
211
213
  this.value1 = this.defaultFormat[1];
212
214
  }
@@ -240,7 +242,9 @@ const Base = function (source) {
240
242
  }
241
243
  }
242
244
  else{
243
- if(this.type===Enum.ControlType.DateRange || this.type===Enum.ControlType.DateTimeRange){
245
+ if(this.type===Enum.ControlType.DateRange
246
+ || this.type===Enum.ControlType.DateTimeRange
247
+ || this.type===Enum.ControlType.Location){
244
248
  this.value = '';
245
249
  this.value1 = '';
246
250
  }
@@ -25,6 +25,9 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
25
25
  set title(v) {
26
26
  source.title = v;
27
27
  },
28
+ get tip() {
29
+ return source.tip;
30
+ },
28
31
  get flagShowTitle() {
29
32
  let v=false;
30
33
  if(source.flagShowTitle)v=source.flagShowTitle;
@@ -490,6 +493,9 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
490
493
  });
491
494
  if(listData){
492
495
  listData.insertRow(rows);
496
+ if(this.form && this.form.self){
497
+ this.form.self.computeScroll();
498
+ }
493
499
  }
494
500
  },
495
501
  //新增或替换表格数据
@@ -13,6 +13,12 @@ const FormList = function (source, master) {
13
13
  get id(){
14
14
  return source.name;
15
15
  },
16
+ get rowActionRoutersAlign(){
17
+ if(source.rowActionRoutersAlign != undefined && source.rowActionRoutersAlign != null && source.rowActionRoutersAlign != ""){
18
+ return source.rowActionRoutersAlign;
19
+ }
20
+ return 2;
21
+ },
16
22
  get type() {
17
23
  return master.controlType;
18
24
  },
@@ -100,7 +106,7 @@ const FormList = function (source, master) {
100
106
  Object.assign(rtnFormObj, s.getFormObj());
101
107
  });
102
108
  rtnFormObj.flagDeleted = rtn.rows[i].deleted;
103
- rtnFormObj.flagNew = rtn.rows[i].isNewFlag;
109
+ rtnFormObj.flagNew = rtn.rows[i].isNewFlag || false;
104
110
  rtnFormArr.push(rtnFormObj);
105
111
  }
106
112
 
@@ -1,10 +1,30 @@
1
1
  import base from '../../index';
2
2
  import Base from './Base';
3
+ import valid from '../../../validate/index';
3
4
  const Location = function (source,moreActionRouter) {
4
5
  var rtn = {
5
6
  moreActionRouter: moreActionRouter,
7
+ getFormObj() {
8
+ var rtnFormObj = {};
9
+ Object.defineProperty(rtnFormObj, source.fieldName1, {
10
+ get: function () {
11
+ return source.code1;
12
+ },
13
+ enumerable: true,
14
+ configurable: true
15
+ });
16
+ Object.defineProperty(rtnFormObj, source.fieldName2, {
17
+ get: function () {
18
+ return source.code2;
19
+ },
20
+ enumerable: true,
21
+ configurable: true
22
+ });
23
+ return rtnFormObj;
24
+ },
6
25
  };
7
26
  rtn = base.copy(Base(source), rtn);
27
+ rtn = base.copy(rtn, valid.Init(rtn));
8
28
  return rtn;
9
29
  };
10
30
 
@@ -155,6 +155,7 @@ const SearchScreen = function (source, callBack, screenPara, prevParam) {
155
155
  continue;
156
156
  }
157
157
  if((source.content.fields[key].controlType===Enum.ControlType.DateRange
158
+ || source.content.fields[key].controlType===Enum.ControlType.Location
158
159
  || source.content.fields[key].controlType===Enum.ControlType.DateTimeRange)
159
160
  && source.content.fields[key].code2==undefined){
160
161
  source.content.fields[key].code2='';
@@ -532,8 +532,8 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
532
532
  self.$vue.searchEnd=Date.now();
533
533
  }
534
534
  self.isLoading = false;
535
- if (response.rtnCode === Enum.ReturnCode.Successful) {
536
- if (response.content.rows.length > 0) {
535
+ if (response.rtnCode === Enum.ReturnCode.Successful) {
536
+ if (response.content.rows && response.content.rows.length > 0) {
537
537
  // rtn.setRow(response.content.rows);
538
538
  response.content.rows.forEach((nr) => {
539
539
  rtn.listData.push(nr);
@@ -584,7 +584,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
584
584
  }
585
585
 
586
586
  if (typeof callback !== 'undefined') {
587
- if (response.content.rows.length > 0) {
587
+ if (response.content.rows && response.content.rows.length > 0) {
588
588
  callback(true,response);
589
589
  }
590
590
  else {
@@ -654,7 +654,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
654
654
  })
655
655
  .then(function (response) {
656
656
  if (response.rtnCode === Enum.ReturnCode.Successful) {
657
- if (response.content.rows.length > 0) {
657
+ if (response.content.rows && response.content.rows.length > 0) {
658
658
  if (router.flagAddRowAfterAction) {
659
659
  // rtn.setStyleRow(response.content.rows);
660
660
  response.content.rows.forEach((nr) => {
@@ -148,9 +148,9 @@ export default {
148
148
  validExcute() {
149
149
  var self = this;
150
150
  self.validMessage="";
151
-
151
+
152
152
  //通用校验
153
- if (typeof this.model.validating === "function") {
153
+ if (typeof this.model.validating === "function") {
154
154
  let validtemp = this.model.validating();
155
155
  self.valid = validtemp.valid;
156
156
  if (!self.valid) {