centaline-data-driven 1.6.8 → 1.6.10

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.8",
3
+ "version": "1.6.10",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,37 @@
1
+ # v1.6.10
2
+ 2024-06-25
3
+
4
+ 优化
5
+
6
+ 数字区间组件新增负值最小值判断
7
+
8
+ 数字区间组件清空时inputOld值设为空
9
+
10
+ 数字中间隐藏显示组件行高不同导致表单换行
11
+
12
+ 表单列表添加工具栏按钮
13
+
14
+ # v1.6.9
15
+ 2024-06-12
16
+
17
+ 优化
18
+
19
+ 图片选择控件,没锁定且没权限时,默认项显示
20
+
21
+ 表单列表弹层onAfterChanged支持调用actionRouters
22
+
23
+ 表单列表选择数据后,再次编辑行数据后,没有触发数据统计bug处理
24
+
25
+ 表单列表路由删除操作支持刷新整个表单
26
+
27
+ 表单列表弹层新增修改时,支持弹层的路由操作可以取到父表单的数据
28
+
29
+ 列表:查询条件加载完成后,数据还没有加载完成,查询条件可以选择的bug处理
30
+
31
+ 标题栏 按钮(居右排列)
32
+
33
+ 优化弹窗关闭符号和新增帮助符号
34
+
1
35
  # v1.6.8
2
36
  2024-05-08
3
37
 
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="'/salemanage/ContractByPoint/readDetail'" :apiParam="apiParam" :topHeight="topHeight" :documentHeight="'600px'"></ct-form>
4
+ <ct-form :api="'/invoicemanage/invoicingRelContract/readDetail'" :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
- "commissionMode":2,"contractId":"240403142141DC5F9DCDA2A244BCA381","propertyId":"231128145050EB00D506577A4DF09BB5","searchFields":{"fields":[{"fieldName1":"CompanyPath","groupName":"CompanyPath","operation":1,"searchDataType":1,"searchValue1":"009"},{"fieldName1":"EmpID","groupName":"EmpID","operation":1,"searchDataType":1,"searchValue1":"20201030134831BAA0AC5CDC9344B21E"},{"fieldName1":"DeptPath","groupName":"DeptPath","operation":1,"searchDataType":1,"searchValue1":"009.007"},{"fieldName1":"type","groupName":"type","operation":1,"searchDataType":1,"searchValue1":"left"},{"fieldName1":"EstateID","groupName":"EstateID","operation":2,"searchDataType":3,"searchValue1":"23112217144782E4C3D5F8164CB2AE3E"},{"fieldName1":"ContractDateStar","fieldName2":"ContractDateEnd","groupName":"ContractDateStar","operation":5,"searchDataType":4,"searchValue1":"2024-04-01","searchValue2":""}]},"pageAttribute":{"pageIndex":1},"columnName":"contractDate","actionType":3
15
+ "actionType":2,"jsonData":{"invoice_ID":"322"}
16
16
  },
17
17
  topHeight:10,
18
18
  }
@@ -29,9 +29,12 @@
29
29
 
30
30
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/api/distribution/standing-book/layout'" :searchDataApi="'/api/distribution/standing-book/list'"></ct-searchlist> -->
31
31
 
32
-
32
+ <!-- CCES -->
33
33
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/agentuserlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/agentuserlist/getList'"></ct-searchlist> -->
34
-
34
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/contractmanage/ContractList/getLayoutOfSearch'" :searchDataApi="'/contractmanage/ContractList/getList'"></ct-searchlist> -->
35
+ <ct-searchlist :apiParam="para" :searchConditionApi="'/sunexpensemanage/sunexpenserecordlist/getLayoutOfSearch'" :searchDataApi="'/sunexpensemanage/sunexpenserecordlist/getList'"></ct-searchlist>
36
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/customermanage/ProjectCustomerList/getLayoutOfSearch'" :searchDataApi="'/customermanage/ProjectCustomerList/getList'"></ct-searchlist> -->
37
+ <!-- CCES -->
35
38
 
36
39
  <!-- <ct-searchlist :apiParam="para"
37
40
  :searchConditionApi="'/api/transaction/adjustRecord/getLayoutOfSearch'"
@@ -68,11 +71,11 @@
68
71
 
69
72
  <!-- <ct-searchlist :searchCategoryApi="'/PropertyPublishList/getLayoutOfSearchCategory'" :searchConditionApi="'/PropertyPublishList/getLayoutOfSearchForRET'" :searchStatsApi="'/PropertyPublishList/getListStatsForRET'" :searchDataApi="'/PropertyPublishList/getListOfSearchModelForRET'"></ct-searchlist> -->
70
73
 
71
- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
74
+ <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
72
75
  :searchDataApi="'/PropertyRETList/getListOfSearchModel'"
73
76
  :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"
74
77
  :searchStatsApi="'/PropertyRETList/getListStats'">
75
- </ct-searchlist>
78
+ </ct-searchlist> -->
76
79
 
77
80
  <!-- <ct-searchlist :searchConditionApi="'/PropertyOFIList/getLayoutOfSearch'" :appRootUrl="appRootUrl"
78
81
  :searchDataApi="'/PropertyOFIList/getListOfSearchModel'"
@@ -138,7 +141,7 @@
138
141
  // appRootUrl:'http://10.88.22.13:6060/onecard-api/',
139
142
  appRootUrl:'',
140
143
  para:{
141
- "type":"batchConfirmtion"
144
+ "type":"left"
142
145
  },
143
146
  }
144
147
  },
Binary file
Binary file
@@ -10,7 +10,9 @@
10
10
  dialogTableVisible: true,
11
11
  contentLeft: 0,
12
12
  contentTop: 0,
13
- pane:null
13
+ pane:null,
14
+ captionBarButtons:[],
15
+ modelSelf:null,
14
16
  };
15
17
  },
16
18
  activated(){
@@ -123,17 +125,52 @@
123
125
  },
124
126
  this.vmodel.title),
125
127
  h('i', {
126
- class: ['el-icon', 'el-icon-close'],
128
+ class: ['el-icon', 'close-mark','cursor'],
127
129
  style: {
128
130
  'position': 'absolute',
129
131
  'right': '8px',
130
- 'top':'7px',
131
- 'font-size':'22px'
132
+ 'top':'10px',
133
+ 'font-size':'24px',
132
134
  },
133
135
  on: {
134
136
  click: (event) => { this.close(event); }
135
137
  }
136
- })
138
+ }),
139
+ // h('i', {
140
+ // class: ['el-icon', 'question-mark'],
141
+ // style: {
142
+ // 'position': 'absolute',
143
+ // 'right': '35px',
144
+ // 'top':'10px',
145
+ // 'font-size':'24px',
146
+ // },
147
+ // on: {
148
+ // click: (event) => { this.close(event); }
149
+ // }
150
+ // })
151
+ h('div',{
152
+ style: {
153
+ 'display':'inline-block',
154
+ 'position': 'absolute',
155
+ 'right': '44px',
156
+ 'top':'10px',
157
+ }
158
+ },this.captionBarButtons.map((item,index) => {
159
+ let mySelf = this;
160
+ if(item.show){
161
+ return h('ct-btn', {
162
+ props: {
163
+ key:index,
164
+ vmodel:item
165
+ },
166
+ on: {
167
+ click(ev) {
168
+ mySelf.modelSelf.self.fieldClickHandler(item)
169
+ }
170
+ }
171
+ }, [])
172
+ }
173
+ }))
137
174
  ])
138
175
  ]),
139
176
  h('tr', {}, [
@@ -147,6 +184,10 @@
147
184
  if (typeof item.on.loaded === "undefined") {
148
185
  item.on.loaded = (model) => {
149
186
  mySelf.vmodel.title = (model && model.title) ? model.title : mySelf.vmodel.title
187
+ if(model.captionBarButtons){
188
+ mySelf.captionBarButtons = model.captionBarButtons
189
+ }
190
+ mySelf.modelSelf = model
150
191
  }
151
192
  }
152
193
 
@@ -263,5 +304,28 @@
263
304
  border-top:initial;
264
305
  border-bottom: initial;
265
306
  }
266
-
307
+ .question-mark {
308
+ background: url(../../../assets/question.png) no-repeat;
309
+ background-size: 100% 100%;
310
+ height: 22px;
311
+ width: 22px;
312
+ display: inline-block;
313
+ font-weight: bold;
314
+ }
315
+ .question-mark:hover {
316
+ background-color: #e4624c;
317
+ color: fff;
318
+ }
319
+ .close-mark{
320
+ background: url(../../../assets/close.png) no-repeat;
321
+ background-size: 100% 100%;
322
+ height: 26px;
323
+ width: 26px;
324
+ display: inline-block;
325
+ font-weight: bold;
326
+ }
327
+ .close-mark:hover {
328
+ background-color: #e4624c;
329
+ color: fff;
330
+ }
267
331
  </style>
@@ -22,6 +22,7 @@
22
22
  :headers="headers"
23
23
  :multiple="false"
24
24
  :show-file-list="false"
25
+ :before-upload="handleAvatarBeforeUpload"
25
26
  :on-success="handleAvatarSuccess"
26
27
  :on-error="handleAvatarError">
27
28
  <el-button size="mini" type="primary">{{model.label}}</el-button>
@@ -108,6 +109,7 @@
108
109
  rowindex:Number,
109
110
  flagAppMode: Boolean,
110
111
  actionRouters: Array,
112
+ parentModel: Object,
111
113
  },
112
114
  mixins: [dynamicElement],
113
115
  data: function () {
@@ -163,6 +165,19 @@
163
165
  }
164
166
  },
165
167
  methods: {
168
+ handleAvatarBeforeUpload(file) {
169
+ if(this.parentModel && this.parentModel.is && this.parentModel.is=="ct-form-list-table" && this.parentModel.$self){
170
+ let submitData = this.parentModel.$self.getFileData(this.vmodel);
171
+ for (var key in submitData) {
172
+ if (typeof submitData[key] === "object") {
173
+ this.uploadData[key] = JSON.stringify(submitData[key]);
174
+ }
175
+ else {
176
+ this.uploadData[key] = submitData[key];
177
+ }
178
+ }
179
+ }
180
+ },
166
181
  handleAvatarSuccess(res) {
167
182
  let self = this;
168
183
  this.$api.postThenHandler({ data: res}).then(function () {
@@ -134,7 +134,7 @@
134
134
  </el-row>
135
135
  <el-row v-if="model.buttons.findIndex((v)=>{return v.show}) > -1" :class="isScroll?'ccai button-absolute':'button-initial'"
136
136
  :style="{'max-width':pageWidth?(pageWidth-20)+'px':'100%'}">
137
- <el-col :span="24" style="text-align:center;padding-bottom: 1px;padding-left: 5px;padding-right: 5px;" class="btnPadBom">
137
+ <el-col :span="24" style="display: flex;align-items: center;justify-content: center;height: 40px ;padding-bottom: 1px;padding-left: 5px;padding-right: 5px;" class="btnPadBom">
138
138
  <component v-for="(btn, index) in model.buttons" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"
139
139
  :style="{'float':btn.isCheckbox ? btn.alignCss:''}"></component>
140
140
  </el-col>
@@ -682,13 +682,15 @@
682
682
  },
683
683
  on: {
684
684
  submit(ev) {
685
+ // if(ev.responseData
686
+ // && ev.responseData.clientActionType
687
+ // && ev.responseData.clientActionType === 2
688
+ // && ev.responseData.content){
689
+ // self.$common.excuteFunStr.call(self.model.scripts, ev.responseData.content);
690
+ // }
691
+ // else
685
692
  if (ev.responseData && ev.responseData.notification === 10) {
686
- self.collapse.splice(0, self.collapse.length);
687
- self.collapseActiveNames.splice(0, self.collapseActiveNames.length);
688
- self.collapseFieldsRow.splice(0, self.collapseFieldsRow.length);
689
- self.independentItem.splice(0, self.independentItem.length);
690
- self.load(self.loaderObj.Form(ev.responseData.content));
691
- self.formKey = self.formKey + 1;
693
+ self.init();
692
694
  }
693
695
  else {
694
696
  self.model.updateFields(ev, () => {
@@ -963,13 +965,8 @@
963
965
  if (field && field.changeCallBackFunName) {
964
966
  self.changeCallBackHandler(field, field.changeCallBackFunName, data.content);
965
967
  }
966
- else if (field.isRefersh) {
967
- self.collapse.splice(0, self.collapse.length);
968
- self.collapseActiveNames.splice(0, self.collapseActiveNames.length);
969
- self.collapseFieldsRow.splice(0, self.collapseFieldsRow.length);
970
- self.independentItem.splice(0, self.independentItem.length);
971
- self.load(self.loaderObj.Form(data.content));
972
- self.formKey = self.formKey + 1;
968
+ else if (field.isRefersh || data.notification === 10) {
969
+ self.init();
973
970
  }
974
971
  else {
975
972
  self.model.doAction(data);
@@ -1403,6 +1400,11 @@
1403
1400
  if (field.submitFormField) {
1404
1401
  field.submitFormField.forEach((v) => {
1405
1402
  submitData[v] = self.$common.getDataOfUpperLower(tempFormData, v);
1403
+ if(submitData[v]==undefined || submitData[v]==null || submitData[v]==''){
1404
+ if(self.parentModelForm){
1405
+ submitData[v] = self.parentModelForm.getFormObj()[v];
1406
+ }
1407
+ }
1406
1408
  });
1407
1409
  }
1408
1410
  }
@@ -3,12 +3,21 @@
3
3
  <div v-if="model.title" class="list-title">
4
4
  <h5>{{model.title}}</h5>
5
5
  </div>
6
- <div v-else-if="model.create || (model.selectRouter && model.selectRouter.id)" class="list-title"></div>
6
+ <div v-else-if="model.create || (model.selectRouter && model.selectRouter.id) || model.toolButtonsShow.length>0" class="list-title"></div>
7
7
  <div class="list-button">
8
- <component v-if="model.selectRouter!==null" :is="model.selectRouter.is" :vmodel="model.selectRouter" @click="popupSearchListHandle" ></component>
9
- <el-button v-if="model.create" :disabled="model.disabled" type="success" class="max-btn-add" style="width: auto;" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
10
- {{model.createText}}
11
- </el-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>
12
21
  </div>
13
22
 
14
23
  <div id="listTable">
@@ -313,6 +322,8 @@
313
322
  fd.$forceUpdate();
314
323
  }
315
324
  });
325
+ //如果有汇总列,触发重新计算汇总
326
+ self.recalculationSummary();
316
327
  });
317
328
  },
318
329
  fieldsValidExcute() {
@@ -375,6 +386,20 @@
375
386
 
376
387
  this.$emit('tableButtonClick', button, submitData);
377
388
  },
389
+ toolButtonsClick(field) {
390
+ this.$emit('tableButtonClick', field, null);
391
+ },
392
+ toolButtonsChangeHandler(field) {
393
+ this.$emit('change', field);
394
+ },
395
+ importComplete(res, button) {
396
+ this.$emit('importComplete', res, button);
397
+ },
398
+ getFileData(field) {
399
+ var submitData = {};
400
+ submitData = this.parentModel.self.getFileData(field);
401
+ return submitData;
402
+ },
378
403
  popupSearchListHandle(field) {
379
404
  if(field.isSearchPageWithList){
380
405
  var self = this;
@@ -529,4 +554,16 @@
529
554
  .el-table .cell {
530
555
  text-overflow: clip;
531
556
  }
557
+
558
+ .list-button ul {
559
+ list-style: none;
560
+ margin: 0;
561
+ padding: 0;
562
+ width: auto;
563
+ }
564
+ .list-button ul li {
565
+ margin-right: 5px;
566
+ float: left;
567
+ }
568
+
532
569
  </style>
@@ -94,7 +94,12 @@
94
94
  if (this.model.max1 !== "" && parseFloat(this.model.value1) > parseFloat(this.model.max1)) {
95
95
  this.model.value1 = this.inputOld1;
96
96
  }
97
-
97
+ if (this.model.min !== "" && parseFloat(this.model.value) < parseFloat(this.model.min)) {
98
+ this.model.value = this.inputOld;
99
+ }
100
+ if (this.model.min1 !== "" && parseFloat(this.model.value1) < parseFloat(this.model.min1)) {
101
+ this.model.value1 = this.inputOld1;
102
+ }
98
103
  this.inputHandler(this.model.value);
99
104
  this.changeHandler(this.model.value);//todo input事件里要不要加这个事件
100
105
  },
@@ -128,6 +133,8 @@
128
133
  },
129
134
  clearClickHandle: function (event,id) {
130
135
  this.model.reset();
136
+ this.inputOld='';
137
+ this.inputOld1='';
131
138
  this.isShowClear(id);
132
139
  },
133
140
  mouseOverHandle: function (id) {
@@ -27,7 +27,7 @@
27
27
  </span>
28
28
  <span
29
29
  class="cover-list-item-span-delete"
30
- v-if="!model.lock"
30
+ v-if="!model.lock&& item.rightDel"
31
31
  >
32
32
  <i class="el-icon-delete" @click="handleRemove(item,index)"></i>
33
33
  </span>
@@ -36,15 +36,16 @@
36
36
  <span style="width: 80px; height: 26px; display: inline-flex;">
37
37
  &nbsp;{{ item.mediaLabelName }} </span>
38
38
  </span>
39
- <template v-if="model.lock">
40
- <span v-if="item.flagDefault &&(item.flagDefault == true || item.flagDefault == 'true')"
41
- class="checked isradio">
42
- </span>
43
- </template>
44
- <span v-else-if="item.rightDefault==true||item.rightDefault=='true'"
39
+
40
+ <span v-if="item.rightDefault==true||item.rightDefault=='true'"
45
41
  :class="[item.flagDefault &&(item.flagDefault == true || item.flagDefault == 'true')? 'checked': 'Unchecked','isradio',]"
46
42
  @click="radiochecked(photoList, item)">
47
43
  </span>
44
+ <template v-else>
45
+ <span v-if="item.flagDefault &&(item.flagDefault == true || item.flagDefault == 'true')"
46
+ class="checked isradio">
47
+ </span>
48
+ </template>
48
49
  </span>
49
50
  </div>
50
51
  </li>
@@ -29,7 +29,7 @@
29
29
  </span>
30
30
  </span>
31
31
  <div class="p-2 text-center">
32
- <i class="max-view" @click="viewerOpen(imageList,index)"></i>
32
+ <i class="max-view" @click="viewerfile(imageList,index)"></i>
33
33
  <i class="max-success" @click="choose(item)" :class="{'ischeck': item.ischeck }"></i>
34
34
 
35
35
  <!-- <el-tag type="danger" effect="dark" size="mini" >1</el-tag> -->
@@ -174,6 +174,7 @@
174
174
  if(this.from && this.from=='detail'){
175
175
  this.screenTop=this.$refs.screen.$el.offsetTop;
176
176
  }
177
+ this.pageDisabled=true;
177
178
  this.$refs.table.searchComplate(this.$refs.screen.model, defaultSearch);
178
179
 
179
180
  this.$emit('loaded', this.$refs.screen.model);
@@ -314,6 +315,7 @@
314
315
  this.$refs.screen.LoadLayout();
315
316
  }
316
317
 
318
+ this.pageDisabled=false;
317
319
  this.flagSideBar=this.$refs.table.model.flagSideBar;
318
320
  this.flagDefaultDisplaySideBar=this.$refs.table.model.flagDefaultDisplaySideBar;
319
321
  if(this.$refs.table.model.rowSelectRouter){
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <div class="field-top">
3
- <div v-if="model !== null" class="ct-text ct-flex-div" :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'',model.attrs.size?'ct-font-size-'+model.attrs.size:'']">
2
+ <div class="field-top el-text-eye">
3
+ <div v-if="model !== null" class="ct-text ct-flex-div el-text-lineHeight" :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'',model.attrs.size?'ct-font-size-'+model.attrs.size:'']">
4
4
  <div v-if="model.showLabel && model.label" class="el-input-group__prepend field-label-div" :class="[model.labelClass]">
5
5
  <span>{{model.label}}</span>
6
6
  </div>
@@ -63,6 +63,15 @@
63
63
  .eyelabel {
64
64
  min-width:80px;
65
65
  }
66
+ .el-text-lineHeight{
67
+ line-height: 26px;
68
+ display: inline-flex;
69
+ }
70
+ .el-text-eye{
71
+ display: inline-flex;
72
+ flex-direction: column;
73
+ align-items: center;
74
+ }
66
75
  .el-icon-eye:before {
67
76
  background: url("../../../assets/icon-eye.png") no-repeat;
68
77
  content: '';
@@ -71,5 +80,6 @@
71
80
  height: 16px;
72
81
  font-size: 16px;
73
82
  background-size: 16px;
83
+ margin-bottom: -3px;
74
84
  }
75
85
  </style>
@@ -150,6 +150,23 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
150
150
  return rtn._actionRouters;
151
151
  }
152
152
  },
153
+ _captionBarButtons: null,
154
+ get captionBarButtons() {
155
+ if (rtn._captionBarButtons !== null) {
156
+ return rtn._captionBarButtons;
157
+ }
158
+ else {
159
+ rtn._captionBarButtons = [];
160
+ if (source.captionBarButtons) {
161
+ source.captionBarButtons.forEach((v) => {
162
+ var button = Router(v);
163
+ button.is = "ct-btn";
164
+ rtn._captionBarButtons.push(button);
165
+ });
166
+ }
167
+ return rtn._captionBarButtons;
168
+ }
169
+ },
153
170
  get optionApi() {
154
171
  return source.parameterAction;
155
172
  },
@@ -462,35 +479,45 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
462
479
  let listData = this.excuteListData.find((v) => {
463
480
  return v.id === tableId;
464
481
  });
465
- listData[attrName] = attrValue
482
+ if(listData){
483
+ listData[attrName] = attrValue
484
+ }
466
485
  },
467
486
  //新增表格数据
468
- insertRow(tableId,rows) {
487
+ insertRow(tableId,rows) {
469
488
  let listData = this.excuteListData.find((v) => {
470
489
  return v.id === tableId;
471
490
  });
472
- listData.insertRow(rows);
491
+ if(listData){
492
+ listData.insertRow(rows);
493
+ }
473
494
  },
474
495
  //新增或替换表格数据
475
- insertOrUpdateRow(tableId,row) {
496
+ insertOrUpdateRow(tableId,row) {
476
497
  let listData = this.excuteListData.find((v) => {
477
498
  return v.id === tableId;
478
499
  });
479
- listData.insertOrUpdateRow(row);
500
+ if(listData){
501
+ listData.insertOrUpdateRow(row);
502
+ }
480
503
  },
481
504
  //删除表格数据
482
- deleteRow(tableId,row) {
505
+ deleteRow(tableId,row) {
483
506
  let listData = this.excuteListData.find((v) => {
484
507
  return v.id === tableId;
485
508
  });
486
- listData.delRow(row);
509
+ if(listData){
510
+ listData.delRow(row);
511
+ }
487
512
  },
488
513
  //清空表格数据
489
514
  clear(tableId) {
490
515
  let listData = this.excuteListData.find((v) => {
491
516
  return v.id === tableId;
492
517
  });
493
- listData.deleteAll();
518
+ if(listData){
519
+ listData.deleteAll();
520
+ }
494
521
  },
495
522
 
496
523
  //获取后台数据,并返回脚本。