centaline-data-driven 1.6.18 → 1.6.20

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.18",
3
+ "version": "1.6.20",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,35 @@
1
+ # v1.6.20
2
+ 2024-09-13
3
+
4
+ BUG
5
+
6
+ 分片上传,API强制报错,删除当前文件
7
+
8
+ 保存按钮浮动样式修复
9
+
10
+ 优化
11
+
12
+ 同步下载模式按钮增加加载状态圆圈
13
+
14
+ # v1.6.19
15
+ 2024-09-05
16
+
17
+ 优化
18
+
19
+ 表格没有返回rows添加判断
20
+
21
+ 文件预览组件,下载增加参数 download=1
22
+
23
+ 表单列表数据非新增数据默认传flagNew=false
24
+
25
+ 表单列表行操作位置改为api控制,默认最后一列
26
+
27
+ 表单页面提示信息,显示在页面顶部并且悬停,支持html
28
+
29
+ js给表单列表赋值超过页面高度,保存按钮没有浮动处理
30
+
31
+ 预览文件组件,图片拖动位置
32
+
1
33
  # v1.6.18
2
34
  2024-08-16
3
35
 
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="'/salematter/UrgentResponsiblePerson/getUrgentLayoutOfBrowse'" :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
- nurpId: "1fa72659-fa66-4dd0-8f4d-b15c011a4676", alloctNoticeType: "转组别", actionType: 1
15
+ "type":"top"
16
16
  },
17
17
  topHeight:10,
18
18
  }
@@ -35,7 +35,10 @@
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>
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> -->
41
+ <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/EntranceNoticeInfoList/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/EntranceNoticeInfoList/getList'"></ct-searchlist>
39
42
  <!-- CCES -->
40
43
 
41
44
  <!-- <ct-searchlist :apiParam="para"
@@ -104,6 +107,10 @@
104
107
  <!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/PropertyVRRealLookBalanceList/getLayoutOfSearchForOFI'" :searchDataApi="'/PropertyVRRealLookBalanceList/getListOfSearchModel'"></ct-searchlist> -->
105
108
 
106
109
 
110
+ <!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyPublishList/getLayoutOfSearch'"
111
+ :searchDataApi="'/propertyPublishList/getListOfSearchModel'"
112
+ :searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist> -->
113
+
107
114
 
108
115
  <!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/cache/getLayoutOfSearchForCache'" :searchDataApi="'/cache/getListOfSearchModelForCache'"></ct-searchlist> -->
109
116
 
@@ -952,3 +952,9 @@ color: var(--centalinePlaceholder);
952
952
  border-top-left-radius: 6px;
953
953
  border-bottom-left-radius: 6px;
954
954
  }
955
+
956
+ .max .el-icon-loading{
957
+ color: red;
958
+ font-weight: 800;
959
+ }
960
+
@@ -81,7 +81,7 @@
81
81
  </el-dropdown-item>
82
82
  </el-dropdown-menu>
83
83
  </el-dropdown>
84
- <el-button v-else class="max"
84
+ <el-button v-else class="max" :loading="model.loading"
85
85
  :type="model.isHyperLink ? 'text' : 'primary'"
86
86
  v-bind="model.attrs" @click="clickHandle"
87
87
  :style="{color:model.textColor,backgroundColor:model.imgUrl?'transparent':model.bgColor,borderColor:model.imgUrl?'transparent':model.borderColor,padding:model.imgUrl?'0px':null}"
@@ -91,7 +91,7 @@
91
91
  <img :src="model.imgUrl" :height="model.buttonHeight+'px'" />
92
92
  <div style="margin-top:5px;" class="labelText" v-html="model.label"></div>
93
93
  </div>
94
- <div v-else>
94
+ <div v-else :style="{display:model.loading?'inline-block':''}">
95
95
  <img v-if="model.imgUrl" :title="model.label" :src="model.imgUrl" :height="model.buttonHeight+'px'" />
96
96
  <span v-else v-html="model.label"></span>
97
97
  </div>
@@ -708,6 +708,9 @@ export default {
708
708
  type: 'error',
709
709
  showClose: true,
710
710
  });
711
+ file.source = { "actionType": 2 };
712
+ this.model.deleteFile(file, false);
713
+ this.selfValidExcute("remove");
711
714
  return false;
712
715
  }
713
716
  const Progress = Math.min(100, Math.floor(1E4 * parseInt(res.content.nextOffSet) / parseInt(file.size)) / 100);
@@ -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
  //初始化
@@ -1506,4 +1517,17 @@
1506
1517
  margin: auto;
1507
1518
  box-shadow: 0 2px 20px 0 rgb(0 0 0 / 10%);
1508
1519
  }
1520
+
1521
+ .tip-absolute {
1522
+ z-index: 100;
1523
+ top: 10;
1524
+ left: 10;
1525
+ position: absolute;
1526
+ line-height: 24px;
1527
+ background-color:#ffe7cc;
1528
+ color:#EC3D3D;
1529
+ border-radius: 5px;
1530
+ padding: 8px;
1531
+ font-size: 12px;
1532
+ }
1509
1533
  </style>
@@ -27,7 +27,31 @@
27
27
  <el-row>
28
28
  <el-col :span="24">
29
29
  <el-table size="mini" class="max-table--border" :data="model.tableData" border
30
- 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
+
31
55
  <!--数据列-->
32
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">
33
57
  <template slot="header" slot-scope="scope">
@@ -55,26 +79,28 @@
55
79
  </el-table-column>
56
80
 
57
81
  <!--操作列-->
58
- <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">
59
- <template slot-scope="scope">
60
- <template v-if="!model.tableDisabled">
61
- <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)">
62
- {{scope.row.isSet?'保存':"修改"}}
63
- </span>
64
- <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)">
65
- 删除
66
- </span>
67
- <span v-else-if="scope.row.isSet" class="el-tag el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,false)">
68
- 取消
69
- </span>
70
- <span v-for="(v,i) in model.buttons"
71
- v-if="!scope.row.isSet && v.show && ( !v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1 )"
72
- class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="buttonClick(scope.row, v)">
73
- {{v.label}}
74
- </span>
75
- </template>
76
- </template>
77
- </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>
78
104
  </el-table>
79
105
  </el-col>
80
106
  </el-row>
@@ -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
 
@@ -1456,7 +1462,16 @@ export default {
1456
1462
  }
1457
1463
  }
1458
1464
  else {
1465
+ field.loading=true;
1466
+ if(!field.alert && field.alertMsg){
1467
+ self.$message({
1468
+ message: field.alertMsg,
1469
+ type: 'info',
1470
+ showClose: true,
1471
+ });
1472
+ }
1459
1473
  field.doBlobAction(submitData, (data, headers) => {
1474
+ field.loading=false;
1460
1475
  if (data.type == "application/json") {
1461
1476
  const reader = new FileReader();
1462
1477
  reader.readAsText(data, 'utf-8');
@@ -1479,6 +1494,13 @@ export default {
1479
1494
  else {
1480
1495
  }
1481
1496
  }
1497
+ if(data.rtnMsg){
1498
+ self.$message({
1499
+ message: data.rtnMsg,
1500
+ type: 'info',
1501
+ showClose: true,
1502
+ });
1503
+ }
1482
1504
  };
1483
1505
  }
1484
1506
  else {
@@ -1691,7 +1713,7 @@ export default {
1691
1713
  fun(submitData, title, self.$parent);
1692
1714
  }
1693
1715
  };
1694
-
1716
+
1695
1717
  if (field.alert) {
1696
1718
  self.$common.confirm(field.alertMsg, field.alertCaption, {
1697
1719
  confirmButtonText: field.alertOKButtonText,
@@ -2730,7 +2752,7 @@ export default {
2730
2752
  }
2731
2753
 
2732
2754
  .ct-searchtable .ct-search-table-tag {
2733
- background-color: #fdf6ec;
2755
+ background-color: #ffe7cc;
2734
2756
  border-color: #faecd8;
2735
2757
  width: 100%;
2736
2758
  box-shadow: 0 2px 10px 0 rgb(0 0 0 / 10%);
@@ -1,32 +1,29 @@
1
1
  <template>
2
- <div class="ct-tableToolbar" style="width:100%;" v-if="buttons && buttons.length > 0">
3
-
4
- <div v-if="buttonsLeft&&buttonsLeft.length>0" class="bool_btn_l">
5
- <ul>
6
- <li v-for="btn in buttonsLeft" class="ct-ToolbarButton max-ToolbarButton" :class="{btn_r:btn.isRight}">
7
- <component :is="btn.is" :vmodel="btn"
8
- @click="clickHandler(btn,$event)"
9
- @importComplete="importComplete"
10
- v-if="btn.show"
11
- :optionApi="optionApi"
12
- :fileData="getFileData(btn)"></component>
13
- </li>
14
- </ul>
15
- </div>
2
+ <div class="ct-tableToolbar" style="width:100%;" v-if="buttons && buttons.length > 0">
3
+ <div v-if="buttonsLeft&&buttonsLeft.length>0" class="bool_btn_l">
4
+ <ul>
5
+ <li v-for="btn in buttonsLeft" class="ct-ToolbarButton max-ToolbarButton" :class="{btn_r:btn.isRight}">
6
+ <component :is="btn.is" :vmodel="btn"
7
+ @click="clickHandler(btn,$event)"
8
+ @importComplete="importComplete"
9
+ v-if="btn.show"
10
+ :optionApi="optionApi"
11
+ :fileData="getFileData(btn)"></component>
12
+ </li>
13
+ </ul>
14
+ </div>
16
15
  <div v-if="buttonsright&&buttonsright.length>0" class="bool_btn_r">
17
- <ul>
18
- <li v-for="btn in buttonsright" class="ct-ToolbarButton max-ToolbarButton" :class="{btn_r:btn.isRight}">
19
- <component :is="btn.is" :vmodel="btn"
20
- @click="clickHandler(btn,$event)"
21
- @importComplete="importComplete"
22
- v-if="btn.show"
23
- :optionApi="optionApi"
24
- :fileData="getFileData(btn)"></component>
25
- </li>
26
- </ul>
27
- </div>
28
-
29
-
16
+ <ul>
17
+ <li v-for="btn in buttonsright" class="ct-ToolbarButton max-ToolbarButton" :class="{btn_r:btn.isRight}">
18
+ <component :is="btn.is" :vmodel="btn"
19
+ @click="clickHandler(btn,$event)"
20
+ @importComplete="importComplete"
21
+ v-if="btn.show"
22
+ :optionApi="optionApi"
23
+ :fileData="getFileData(btn)"></component>
24
+ </li>
25
+ </ul>
26
+ </div>
30
27
  </div>
31
28
  </template>
32
29
  <script>
@@ -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>
@@ -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
 
@@ -4,7 +4,8 @@ import Enum from './lib/Enum';
4
4
  const Router = function (source) {
5
5
  var rtn = {
6
6
  disabled: source.selectedMode && source.selectedMode === Enum.ListSelectMode.Multiple ? true : false,
7
- code1:'',
7
+ code1:'',
8
+ loading: false,
8
9
  get source() {
9
10
  return source;
10
11
  },
@@ -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) => {