centaline-data-driven 1.2.27 → 1.2.28

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.
@@ -7,6 +7,7 @@ const paths = {
7
7
  "dynamicMt": "./src/centaline/dynamicMt/index.js",//多行文本组件
8
8
  "dynamicSo": "./src/centaline/dynamicSo/index.js",//单选下拉菜单
9
9
  "dynamicSos": "./src/centaline/dynamicSos/index.js",//单选搜索下拉菜单
10
+ "dynamicSosTt": "./src/centaline/dynamicSosTt/index.js",//电话号码编辑框
10
11
  "dynamicT": "./src/centaline/dynamicT/index.js",//文本input组件
11
12
  "dynamicL": "./src/centaline/dynamicL/index.js",//文本label组件
12
13
  "dynamicTags": "./src/centaline/dynamicTags/index.js",//多选搜索下拉菜单组件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.2.27",
3
+ "version": "1.2.28",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -3,7 +3,7 @@
3
3
  <!-- <ct-searchlist :searchConditionApi="'/api/third-dept-tran/tran-list/layout'" :searchDataApi="'/api/third-dept-tran/tran-list'"></ct-searchlist> -->
4
4
 
5
5
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist> -->
6
- <ct-searchlist :searchConditionApi="'/exampleList/getLayoutOfSearch'" :searchDataApi="'/exampleList/getListOfSearchModel'"></ct-searchlist>
6
+ <ct-searchlist :searchConditionApi="'/PropertyPublishLogList/getLayoutOfSearch'" :searchDataApi="'/PropertyPublishLogList/getListOfSearchModel'"></ct-searchlist>
7
7
 
8
8
  <!-- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'"
9
9
  :searchDataApi="'/PropertyRETList/getListOfSearchModel'"
@@ -24,7 +24,7 @@
24
24
  data() {
25
25
  return {
26
26
  //para: { agentId: "1424932685198864386", estateId: "L201402181627000007233", estateName: "271医院宿舍区", pageOnly: "true", pageTitle: "销控房源列表" }
27
- para: {}
27
+ para: {publishID: "1503900718229229568"}
28
28
  // para: {paramKey: "PropertyStatusID", code: "002.001", name: "盘源状态", paramName: "盘源状态"}
29
29
  }
30
30
  },
@@ -63,8 +63,10 @@
63
63
  v-for="(column,colIndex) in model.dataFieldcolumns" :key="colIndex"
64
64
  v-if="tdShow(column, row)"
65
65
  :rowspan="tdRowspan(column, row)"
66
+ :colspan="tdColspan(column, row)"
66
67
  class="ct-td"
67
68
  :class="[colHasWidth[colIndex],model.tdClass,
69
+ row.flagRow?'ct-td3':null,
68
70
  colIndex === leftShadow?'shadowLeft':null,
69
71
  colIndex === rightShadow?'shadowRight':null,
70
72
  column.fixed === 'left'?'left-fixation':null,
@@ -72,8 +74,12 @@
72
74
  column.fixed === 'right'?'right-fixation':null]"
73
75
  v-bind="column.attrs">
74
76
  <!--操作列-->
75
- <div v-if="column.id==='operation'" class="div_allinline" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
76
- <ct-tablecurrency v-for="(router,rowRouterIndex) in model.rowRouter" :key="rowRouterIndex" v-if="!router.rightField || row[router.rightField] == 1" :isOperationalColumn="true"
77
+ <div v-if="row.flagRow" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
78
+ {{row.descNewRow}}
79
+ </div>
80
+ <div v-else-if="column.id==='operation' && row.rowHiddenColumns==undefined" class="div_allinline" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
81
+ <ct-tablecurrency v-for="(router,rowRouterIndex) in model.rowRouter" :key="rowRouterIndex"
82
+ v-if="!router.rightField || row[router.rightField] == 1" :isOperationalColumn="true"
77
83
  :router="router" :colValue="router.label" :rowData="row" @click="rolRouterClickHandler">
78
84
  </ct-tablecurrency>
79
85
  </div>
@@ -83,7 +89,7 @@
83
89
  </ct-tablecurrency>
84
90
  <!--正常的列-->
85
91
  <div v-else-if="typeof column.template === 'undefined'" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
86
- {{row[column.id]}}
92
+ {{row.rowHiddenColumns && row.rowHiddenColumns.includes(column.id)?"":row[column.id]}}
87
93
  </div>
88
94
  </td>
89
95
  </tr>
@@ -149,13 +155,30 @@
149
155
  });
150
156
  this.model.scripts.formData = this.model.formData;
151
157
  this.model.scripts.formData.formTable = this.model;
158
+ this.model.setHiddenRow();
152
159
  console.log(this.model);
153
160
  },
154
161
  lookOwner(router) {
155
162
  var self = this;
156
- var submitData=router.getActionPara({}).para;
157
- router.doAction(submitData, (res) => {
163
+ var submitData={
164
+ action: router.action,
165
+ para: {
166
+ searchFields: null,
167
+ pageAttribute: { pageIndex: 1 },
168
+ flagSearch: true
169
+ }
170
+ };
171
+ submitData.para.searchFields=router.getSearchPara();
172
+ submitData.para.searchFields.fields.push({
173
+ fieldName1: 'flagLookFromButton',
174
+ groupName: 'flagLookFromButton',
175
+ operation: 1,
176
+ searchDataType: 3,
177
+ searchValue1: '1',
178
+ });
179
+ router.doSearch(submitData, (res) => {
158
180
  if (res.rtnCode === 200) {
181
+ res.apiRouter=self.apiRouter;
159
182
  self.loaderObj.ContactList(res,null,self.load);
160
183
  self.flagLook = true;
161
184
  }
@@ -205,6 +228,12 @@
205
228
 
206
229
  return '';
207
230
  },
231
+ tdColspan(column, row) {
232
+ if (row.colspan !== 0) {
233
+ return row.colspan;
234
+ }
235
+ return '';
236
+ },
208
237
  tdShow(column, row) {
209
238
  if (!column.show) {
210
239
  return false;
@@ -215,6 +244,10 @@
215
244
  return false;
216
245
  }
217
246
 
247
+ if(row.flagRow && row.columnShow!==column.id){
248
+ return false;
249
+ }
250
+
218
251
  return true;
219
252
  },
220
253
  rolRouterClickHandler(field, rowData) {
@@ -222,13 +255,7 @@
222
255
  field.submitListField.forEach((k) => {
223
256
  submitData[k] = rowData[k];
224
257
  });
225
-
226
- let action = field.action;
227
- if (field.actionField) {
228
- action = rowData[field.actionField];
229
- }
230
-
231
- this.routerClickHandler(field, submitData, action);
258
+ this.routerClickHandler(field, submitData, null);
232
259
  },
233
260
  fieldClickHandler(field) {
234
261
  var self = this;
@@ -113,7 +113,7 @@
113
113
  </ct-tablecurrency>
114
114
 
115
115
  <!--正常的列-->
116
- <div v-else-if="typeof column.template === 'undefined'" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
116
+ <div v-else-if="typeof column.template === 'undefined'" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" :style="column.style ? column.style:''">
117
117
  {{row[column.id]}}
118
118
  </div>
119
119
 
@@ -0,0 +1,14 @@
1
+ import dynamicSosTt from './src/dynamicSosTt';
2
+ import api from '../api/index'
3
+
4
+ dynamicSosTt.install = function (Vue) {
5
+ Vue.component(dynamicSosTt.name, dynamicSosTt);
6
+
7
+ Vue.use(api);
8
+ }
9
+
10
+ if (typeof window !== 'undefined' && window.Vue) {
11
+ window.Vue.use(dynamicSosTt);
12
+ }
13
+
14
+ export default dynamicSosTt;
@@ -0,0 +1,283 @@
1
+ <template>
2
+ <div class="field-top">
3
+ <div style="width:100%;display:flex">
4
+ <div style="flex:1;" class="ct-so" :class="[(focus || showDrop)?'isfocus':'',model.attrs.size?'ct-so-'+model.attrs.size:''
5
+ ]" @mouseover="mouseOverHandle" @mouseout="mouseOutHandle">
6
+ <div :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']">
7
+ <div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
8
+ {{model.label}}
9
+ </div>
10
+ <el-popover ref="pop" placement="bottom-start" v-model="showDrop" :class="[model.showLabel?'showLabel':'']" :trigger="(!model.paramName || model.lock)? 'manual' : 'click'">
11
+ <div>
12
+ <div>
13
+ <el-input ref="searchInput" :size="model.attrs.size" suffix-icon="el-icon-search" v-model="searchText" @input="searchInputHandle"></el-input>
14
+ </div>
15
+ <ctSelectOptionVertical :model="model" @click="selectOption($event)"></ctSelectOptionVertical>
16
+ </div>
17
+ <input slot="reference" v-bind="model.attrs" readonly="readonly" v-model="model.text" :placeholder="soPlaceholder"
18
+ ref="ct-input" :style="{height:inputHeight + 'px','line-height':inputLineHeight + 'px'}"
19
+ @focus="focusHandle" @blur="blurHandle" @click="clickHandle" @input="inputHandler($event)" @change="changeHandler($event)"
20
+ :disabled="model.lock" :class="model.lock ? 'ct-is-disabled' : 'ct-input_inner'" />
21
+ </el-popover>
22
+ <span v-if="!model.lock" class="el-input__suffix" @click="clickHandle" :class="[model.attrs.size?'el-input--'+model.attrs.size:'']">
23
+ <span v-if="showClear === false" class="el-input__suffix-inner">
24
+ <i class="el-select__caret el-input__icon el-icon-arrow-up" :class="{'is-reverse':showDrop}"></i>
25
+ </span>
26
+ <span v-if="showClear === true" class="el-input__suffix-inner ct-close">
27
+ <i class="el-select__caret el-input__icon el-icon-circle-close is-show-close" @click="clearClickHandle($event)"></i>
28
+ </span>
29
+ </span>
30
+ </div>
31
+ </div>
32
+ <div style="width:40%; margin-left:10px;">
33
+ <el-input :title="model.lock?model.value1:''" :type="model.inputType" v-model="model.value1" v-bind="model.attrs" @input="inputHandler($event);isShowClear()" @change="changeHandler($event)"
34
+ class="ct-flex-div-input max-input" :class="[model.showLabel?'showLabel':'',!valid?'inputError':'']" :disabled="model.lock" :rows="model.rows"
35
+ :readonly="model.readonly" :show-password="model.isPassword" autocomplete="on" :maxlength="model.max" :show-word-limit="model.showWordLimit"
36
+ @keyup.enter.native="search()">
37
+ </el-input>
38
+ </div>
39
+ <span v-if="model.sufLabel" class="spanMessage ct-flex-div-span">{{model.sufLabel}}</span>
40
+ <transition name="el-fade-in">
41
+ <span v-show="!valid" class="errorMessage">
42
+ {{validMessage}}
43
+ </span>
44
+ </transition>
45
+ <div v-if="!model.lock && model.popupSearchListType === 1">
46
+ <el-button v-if="!model.moreActionBtnName" size="mini" class="h26" type="primary" icon="el-icon-search" @click="popupSearchListHandle"></el-button>
47
+ <el-button v-else size="mini" type="primary" class="h26" @click="popupSearchListHandle">{{model.moreActionBtnName}}</el-button>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </template>
52
+
53
+ <script>
54
+ import dynamicElement from '../../mixins/dynamicElement'
55
+ import selectOption from '../../selectOption/src/selectOption'
56
+ import ctSelectOptionVertical from '../../selectOption/src/selectOptionVertical'
57
+ export default {
58
+ name: 'ct-sosTt',
59
+ mixins: [dynamicElement],
60
+ components: {
61
+ 'ctSelectOption': selectOption,
62
+ 'ctSelectOptionVertical': ctSelectOptionVertical
63
+ },
64
+ props: {
65
+ api: String,
66
+ vmodel: Object,
67
+ popShow: {
68
+ type: Boolean,
69
+ default: true
70
+ }
71
+ },
72
+ data() {
73
+ return {
74
+ focus: false,
75
+ showDrop: false,
76
+ inputHeight: 26,
77
+ showClear: false,
78
+ searchText: ""
79
+ }
80
+ },
81
+ created() {
82
+ if (typeof this.vmodel === 'undefined') {
83
+ this.model = this.loaderObj.SosTt(this.source);
84
+ }
85
+ else {
86
+ this.model = this.vmodel;
87
+ }
88
+ this.$watch('model.value', (n, o) => {
89
+ if (typeof this.model.child !== 'undefined') {
90
+ this.model.child.value = this.model.child.defaultValue || '';
91
+ this.model.child.text = this.model.child.defaultText || '';
92
+ }
93
+ });
94
+ this.inputHeight = this.inputLineHeight;
95
+ },
96
+ computed: {
97
+ soPlaceholder: {
98
+ get: function () {
99
+ if (this.model.value !== '') {
100
+ return '';
101
+ }
102
+ else {
103
+ return this.model.attrs.placeholder;
104
+ }
105
+ },
106
+ set: function (v) {
107
+
108
+ }
109
+ },
110
+ inputLineHeight: {
111
+ get: function () {
112
+ switch (this.model.attrs.size) {
113
+ case 'mini':
114
+ return 26;
115
+ case 'small':
116
+ return 32;
117
+ case 'medium':
118
+ return 36;
119
+ default:
120
+ return 40;
121
+ }
122
+ }
123
+ },
124
+ optionColSpan: function () {
125
+ return parseInt(24 / this.model.optionColCount);
126
+ },
127
+ optionRowCount: function () {
128
+ return parseInt(this.model.options.length % this.model.optionColCount > 0 ? (this.model.options.length / this.model.optionColCount) + 1 : this.model.options.length / this.model.optionColCount);
129
+ }
130
+ },
131
+ mounted() {
132
+ var self = this;
133
+ this.$nextTick(function () {
134
+ var dropdown = self.$refs["pop"];
135
+ self.$watch('model.options', function (newVal, oldVal) {
136
+ self.$nextTick(() => {
137
+ if (typeof dropdown.popperJS !== 'undefined' && dropdown.popperJS) {
138
+ dropdown.popperJS.destroy();
139
+ dropdown.popperJS = null;
140
+ dropdown.updatePopper();
141
+ }
142
+ self.$refs["searchInput"].$el.querySelector("input").focus();
143
+ });
144
+ }, { deep: true, immediate: true });
145
+ });
146
+ },
147
+ methods: {
148
+ getOptions: function () {
149
+ var self = this;
150
+ this.model.getOptions(this.api, self.searchText);
151
+ },
152
+ soChange: function () {
153
+ var self = this;
154
+ if (typeof this.model.child !== 'undefined') {
155
+ this.model.child.value = this.model.child.defaultValue || '';
156
+ this.model.child.text = this.model.child.defaultText || '';
157
+ }
158
+ var currentOption = this.model.options.find((value) => {
159
+ return self.model.value === value[self.model.optionAttrs.value];
160
+ });
161
+ if (currentOption) {
162
+ this.model.text =currentOption[self.model.optionAttrs.label];
163
+ }
164
+ else {
165
+ this.model.text = '';
166
+ }
167
+ this.inputHandler(self.model.value);
168
+ this.changeHandler(self.model.value);
169
+ if(this.model.autoSearch) this.$emit('click');
170
+ },
171
+ focusHandle: function () {
172
+ this.$set(this, 'focus', true);
173
+ },
174
+ blurHandle: function () {
175
+ this.$set(this, 'focus', false);
176
+ },
177
+ clickHandle: function () {
178
+ if (this.model.lock) {
179
+ return false;
180
+ }
181
+ if (this.model.paramName) {
182
+ this.$set(this, 'showDrop', !this.showDrop);
183
+ if (this.showDrop) {
184
+ this.getOptions();
185
+ }
186
+ this.focusHandle();
187
+ }
188
+ else if (this.model.popupSearchListType === 1) {
189
+ this.popupSearchListHandle();
190
+ }
191
+ else if ((this.model.popupSearchListType === 0)) {
192
+ this.$message.warning("请配置参数paramName1");
193
+ }
194
+ },
195
+ popupSearchListHandle: function () {
196
+ var self = this;
197
+
198
+ self.$emit('popupSearchList', true, self.model, self.model.moreActionRouter, (option) => {
199
+ if (option) {
200
+ self.model.value = option[self.model.optionAttrs.value];
201
+ self.model.text = option[self.model.optionAttrs.label];
202
+ self.model.options.push(option);
203
+
204
+ self.soChange();
205
+ }
206
+ });
207
+ },
208
+ getOptionText: function (value) {
209
+ var self = this;
210
+ var option = this.model.options.find((v) => { return v[self.model.optionAttrs.value] === value });
211
+ if (option) {
212
+ return option[self.model.optionAttrs.label];
213
+ } else {
214
+ return value;
215
+ }
216
+ },
217
+ getOptionSelect(value) {
218
+ if (this.model.value === value) {
219
+ return "danger";
220
+ }
221
+ else {
222
+ return "success";
223
+ }
224
+ },
225
+ selectOption(value) {
226
+ if (this.model.value === value) {
227
+ this.$set(this, 'showDrop', false);
228
+ return;
229
+ }
230
+ else {
231
+ this.model.value = value;
232
+ }
233
+ this.soChange();
234
+ this.$set(this, 'showDrop', false);
235
+ },
236
+ mouseOverHandle: function () {
237
+ if (this.model.value !== '' && this.model.clearable) {
238
+ this.$set(this, 'showClear', true);
239
+ }
240
+ },
241
+ mouseOutHandle: function () {
242
+ this.$set(this, 'showClear', false);
243
+ },
244
+ //不能共用的数据校验
245
+ selfValidExcute: function (eventName) {
246
+ if (this.required == true && this.model.value1 == "") {
247
+ this.valid = false;
248
+ return false;
249
+ }
250
+ return true;
251
+ },
252
+ clearClickHandle: function (event) {
253
+ this.model.value = '';
254
+ this.soChange();
255
+ event.stopPropagation();
256
+ },
257
+ isShowClear() {
258
+ if (this.model.value1 !== '' && this.model.clearable) {
259
+ this.$set(this, 'showClear', true);
260
+ } else {
261
+ this.$set(this, 'showClear', false);
262
+ }
263
+ },
264
+ searchInputHandle: function () {
265
+ var currentSeatch = this.searchText;
266
+ this.searchTickControl(currentSeatch);
267
+ },
268
+ searchTickControl: function (search) {
269
+ var self = this;
270
+ setTimeout(function () {
271
+ if (search === self.searchText) {
272
+ self.getOptions(self.searchText);
273
+ }
274
+ }, self.model.searchTick);
275
+ }
276
+ }
277
+ }
278
+ </script>
279
+ <style>
280
+ .h26{
281
+ height: 26px;
282
+ }
283
+ </style>
@@ -15,13 +15,22 @@ const ContactList = function (source,para ,callBack) {
15
15
  _columns: [],
16
16
  _columnsArr: [],
17
17
  _dataFieldcolumns: [],
18
+ _listData: [],
18
19
  _scripts: null,
19
20
  isMergeTitle: false,//是否合并标题
20
21
  selectIndex: 0,
21
22
  formData: formData,
23
+ rowHiddenKey:'contactID',
24
+ rowHiddenColumns:['contactName','propertyIdentityTypeID'],
22
25
  attrs: {
23
26
  size: 'mini'
24
27
  },
28
+ get primaryKey() {
29
+ return common.initialsToUpperCase(source.content.primaryFieldName);
30
+ },
31
+ get primaryFieldMappingDBName() {
32
+ return source.content.primaryFieldMappingDBName;
33
+ },
25
34
  get buttons() {
26
35
  if (rtn._buttons !== null) {
27
36
  return rtn._buttons;
@@ -73,14 +82,24 @@ const ContactList = function (source,para ,callBack) {
73
82
  }
74
83
  },
75
84
  get listData() {
76
- if (!data.content.rows) {
77
- data.content.rows = [];
85
+ if (rtn._listData.length<=0) {
86
+ if(data.content.rows && data.content.rows.length>0){
87
+ data.content.rows.forEach((v,i) => {
88
+ rtn._listData.push(v);
89
+ if(v.descNewRow){
90
+ var newRow = {};
91
+ newRow[rtn.rowHiddenKey]=v[rtn.rowHiddenKey];
92
+ newRow.descNewRow = v.descNewRow;
93
+ newRow.colspan = rtn.dataFieldcolumns.length;
94
+ newRow.columnShow=rtn.dataFieldcolumns[0].id;
95
+ newRow.flagRow=true;
96
+ rtn._listData.push(newRow);
97
+ }
98
+ });
99
+ }
78
100
  }
79
- return data.content.rows;
101
+ return rtn._listData;
80
102
  },
81
- set listData(v) {
82
- data.content.rows = v;
83
- },
84
103
  get columns() {
85
104
  var self = this;
86
105
  if (self._columns.length > 0) {
@@ -266,12 +285,66 @@ const ContactList = function (source,para ,callBack) {
266
285
  get rowMergedColumns() {
267
286
  return source.content.rowMergedColumns || [];
268
287
  },
288
+ get apiRouter() {
289
+ return source.apiRouter;
290
+ },
291
+ getCurrentRowApiData(rtnData,router) {
292
+ var self = this;
293
+ var searchFields = self.apiRouter.getSearchPara();
294
+ if (self.primaryKey) {
295
+ searchFields.fields.push({
296
+ fieldName1: self.primaryFieldMappingDBName ? self.primaryFieldMappingDBName : self.primaryKey,
297
+ groupName: self.primaryKey,
298
+ operation: Enum.SearchOperation.等于,
299
+ searchDataType: Enum.SearchDataType.Text,
300
+ searchValue1: router.flagAddRowAfterAction? rtnData.content: rtn.listData[rtn.selectIndex][self.primaryKey],
301
+ });
302
+ }
303
+ Vue.prototype.$api.postHandler(common.globalUri(), {
304
+ action: rtn.apiRouter.action,
305
+ para: {
306
+ searchFields: searchFields,
307
+ pageAttribute: { pageIndex: 1 },
308
+ flagSearch: true
309
+ }
310
+ })
311
+ .then(function (response) {
312
+ if (response.rtnCode === Enum.ReturnCode.Successful) {
313
+ if (response.content.rows.length > 0) {
314
+ if(router.flagAddRowAfterAction){
315
+ response.content.rows.forEach((v) => {
316
+ if(v.descNewRow){
317
+ var newRow = {};
318
+ newRow[rtn.rowHiddenKey]=v[rtn.rowHiddenKey];
319
+ newRow.descNewRow = v.descNewRow;
320
+ newRow.colspan = rtn.dataFieldcolumns.length;
321
+ newRow.columnShow=rtn.dataFieldcolumns[0].id;
322
+ newRow.flagRow=true;
323
+ rtn._listData.unshift(newRow);
324
+ }
325
+ rtn._listData.unshift(v);
326
+ });
327
+ rtn.setHiddenRow();
328
+ }
329
+ else{
330
+ // response.content.rows.forEach((row) => {
331
+ // for (var vkey in row) {
332
+ // rtn.dataDictionary[row[rtn.primaryKey]][vkey] = row[vkey];
333
+ // }
334
+ // });
335
+ }
336
+ }
337
+ }
338
+ })
339
+ .catch((error) => {
340
+ });
341
+ },
269
342
  doAction(response,field) {
270
343
  if (response.responseData) {
271
344
  response = response.responseData;
272
345
  }
273
346
  if(field.flagFreshCurrentRow || field.flagAddRowAfterAction){
274
-
347
+ rtn.getCurrentRowApiData(response,field);
275
348
  }
276
349
  else{
277
350
  switch (response.notification) {
@@ -280,22 +353,33 @@ const ContactList = function (source,para ,callBack) {
280
353
  var deleteRow = response.content.split(',');
281
354
  if (deleteRow) {
282
355
  deleteRow.forEach((r) => {
283
- const dataIndex = rtn.listData.indexOf(rtn.dataDictionary[r])
284
- if (dataIndex !== -1) {
285
- rtn.listData.splice(dataIndex, 1);
286
- delete rtn.dataDictionary[r];
287
- }
356
+ let strat=0;
357
+ let count=0;
358
+ rtn._listData.forEach((v,i) => {
359
+ if(v[rtn.rowHiddenKey]===r){
360
+ if(strat===0)strat=i;
361
+ count=count+1;
362
+ }
363
+ });
364
+ rtn._listData.splice(strat, count);
288
365
  });
289
366
  }
290
367
  break;
291
368
  case Enum.ActionType.New://新增
292
369
  case Enum.ActionType.CloseTabThenNew://新增
293
- rtn.setStyleRow(response.content);
294
- response.content.forEach((nr) => {
295
- rtn.listData.unshift(nr);
370
+ response.content.forEach((v) => {
371
+ if(v.descNewRow){
372
+ var newRow = {};
373
+ newRow[rtn.rowHiddenKey]=v[rtn.rowHiddenKey];
374
+ newRow.descNewRow = v.descNewRow;
375
+ newRow.colspan = rtn.dataFieldcolumns.length;
376
+ newRow.columnShow=rtn.dataFieldcolumns[0].id;
377
+ newRow.flagRow=true;
378
+ rtn._listData.unshift(newRow);
379
+ }
380
+ rtn._listData.unshift(v);
296
381
  });
297
- rtn.dataDictionary = response.content;
298
- rtn.$vue.calculatingRowHeight()
382
+ rtn.setHiddenRow();
299
383
  break;
300
384
  case Enum.ActionType.Update://修改
301
385
  case Enum.ActionType.CloseTabThenUpdate://修改
@@ -305,17 +389,6 @@ const ContactList = function (source,para ,callBack) {
305
389
  }
306
390
  });
307
391
  break;
308
- case Enum.ActionType.Export://导出
309
- var fileName = response.content.fieldName1;
310
- var fileContent = window.atob(response.content.code1);
311
- common.saveFile(fileName, fileContent);
312
- break;
313
- case Enum.ActionType.Refersh://刷新
314
- rtn.$vue.getPage(1);
315
- break;
316
- case Enum.ActionType.RefreshParent://刷新父页面
317
- rtn.$vue.$emit('refreshParent');
318
- break;
319
392
  default:
320
393
  break;
321
394
  }
@@ -352,6 +425,27 @@ const ContactList = function (source,para ,callBack) {
352
425
  }
353
426
  return c;
354
427
  },
428
+ setHiddenRow() {
429
+ if (rtn.rowHiddenColumns.length===0) {
430
+ return;
431
+ }
432
+ let lastKey='';
433
+ for (let i = 0; i < rtn.listData.length; i++) {
434
+ if(lastKey){
435
+ if(rtn.listData[i][rtn.rowHiddenKey]){
436
+ if(rtn.listData[i][rtn.rowHiddenKey]===lastKey){
437
+ rtn.listData[i].rowHiddenColumns=rtn.rowHiddenColumns;
438
+ }
439
+ else{
440
+ lastKey=rtn.listData[i][rtn.rowHiddenKey];
441
+ }
442
+ }
443
+ }
444
+ else{
445
+ lastKey=rtn.listData[i][rtn.rowHiddenKey];
446
+ }
447
+ }
448
+ },
355
449
  };
356
450
  return rtn;
357
451
  }