centaline-data-driven 1.2.29 → 1.2.32
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 +1 -1
- package/src/centaline/css/common.css +3 -0
- package/src/centaline/css/max.css +0 -1
- package/src/centaline/dynamicDetail/src/dynamicContactList.vue +49 -24
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +4 -4
- package/src/centaline/dynamicSosTt/src/dynamicSosTt.vue +56 -27
- package/src/centaline/loader/src/ctl/ContactList.js +106 -41
- package/src/centaline/loader/src/ctl/SosTt.js +16 -0
- package/wwwroot/static/centaline/centaline-data-driven.js +2 -2
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
:rowspan="column.rowspan"
|
|
34
34
|
:colspan="column.colspan"
|
|
35
35
|
:class="[colHasWidth[colIndex],column.sortAction,model.tdClass,
|
|
36
|
+
rowBorderLeftColumns.includes(column.id)?'ct-td4':null,
|
|
37
|
+
rowBorderRightColumns.includes(column.id)?'ct-td5':null,
|
|
36
38
|
colIndex === leftShadow?'shadowLeft':null,
|
|
37
39
|
colIndex === rightShadow?'shadowRight':null,
|
|
38
40
|
column.fixed === 'left'?'left-fixation-th':null,
|
|
@@ -66,7 +68,11 @@
|
|
|
66
68
|
:colspan="tdColspan(column, row)"
|
|
67
69
|
class="ct-td"
|
|
68
70
|
:class="[colHasWidth[colIndex],model.tdClass,
|
|
69
|
-
row.flagRow?'ct-td3':null,
|
|
71
|
+
//row.flagRow && row.columnShow===column.id?'ct-td3':null,
|
|
72
|
+
rowBorderLeftColumns.includes(column.id)?'ct-td4':null,
|
|
73
|
+
rowBorderRightColumns.includes(column.id)?'ct-td5':null,
|
|
74
|
+
model.rowHiddenKeyData.indexOf(row[model.rowHiddenKey])%2?'ct-tdDouble':'ct-tdSingle',
|
|
75
|
+
selectKey===row[model.rowHiddenKey]?'select':null,
|
|
70
76
|
colIndex === leftShadow?'shadowLeft':null,
|
|
71
77
|
colIndex === rightShadow?'shadowRight':null,
|
|
72
78
|
column.fixed === 'left'?'left-fixation':null,
|
|
@@ -74,8 +80,8 @@
|
|
|
74
80
|
column.fixed === 'right'?'right-fixation':null]"
|
|
75
81
|
v-bind="column.attrs">
|
|
76
82
|
<!--操作列-->
|
|
77
|
-
<div v-if="row.flagRow" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
|
|
78
|
-
{{row.descNewRow}}
|
|
83
|
+
<div v-if="row.flagRow" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" style="color: #999;">
|
|
84
|
+
{{row.rowHiddenColumns && row.rowHiddenColumns.includes(column.id)?"":row.descNewRow}}
|
|
79
85
|
</div>
|
|
80
86
|
<div v-else-if="column.id==='operation' && row.rowHiddenColumns==undefined" class="div_allinline" :class="column.autoRowHeight ? 'lineFeedCell':'cell'">
|
|
81
87
|
<ct-tablecurrency v-for="(router,rowRouterIndex) in model.rowRouter" :key="rowRouterIndex"
|
|
@@ -125,6 +131,10 @@
|
|
|
125
131
|
colHasWidth: {},//有无列宽集合
|
|
126
132
|
pageRowMin: 0,//页面实际的第一行号
|
|
127
133
|
pageRowMax: 100,//页面实际的第后行号
|
|
134
|
+
rowMergedColumns:['contactNameDesc','propertyIdentityTypeID','operation'],
|
|
135
|
+
rowBorderLeftColumns:['contactNameDesc','operation'],
|
|
136
|
+
rowBorderRightColumns:['propertyIdentityTypeID','operation'],
|
|
137
|
+
selectKey:'',
|
|
128
138
|
}
|
|
129
139
|
},
|
|
130
140
|
mounted() {
|
|
@@ -178,7 +188,8 @@
|
|
|
178
188
|
});
|
|
179
189
|
router.doSearch(submitData, (res) => {
|
|
180
190
|
if (res.rtnCode === 200) {
|
|
181
|
-
res.apiRouter=self.apiRouter;
|
|
191
|
+
res.apiRouter=self.apiRouter;
|
|
192
|
+
res.rowMergedColumns=self.rowMergedColumns;
|
|
182
193
|
self.loaderObj.ContactList(res,null,self.load);
|
|
183
194
|
self.flagLook = true;
|
|
184
195
|
}
|
|
@@ -202,19 +213,21 @@
|
|
|
202
213
|
},
|
|
203
214
|
rowColorChange() {
|
|
204
215
|
var index = this.model.selectIndex;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
216
|
+
this.selectKey=this.model.listData[index][this.model.rowHiddenKey];
|
|
217
|
+
this.currentRow = this.$refs['rows.' + index][0] || null;
|
|
218
|
+
// if (typeof this.$refs['rows.' + index] !== "undefined" && this.currentRow !== this.$refs['rows.' + index][0]) {
|
|
219
|
+
// if (this.currentRow !== null) {
|
|
220
|
+
// for (var i = 0; i < this.currentRow.children.length; i++) {
|
|
221
|
+
// this.currentRow.children[i].classList.remove('select');
|
|
222
|
+
// }
|
|
223
|
+
// }
|
|
224
|
+
// if (this.$refs['rows.' + index][0]) {
|
|
225
|
+
// for (var j = 0; j < this.$refs['rows.' + index][0].children.length; j++) {
|
|
226
|
+
// this.$refs['rows.' + index][0].children[j].classList.add('select');
|
|
227
|
+
// }
|
|
228
|
+
// }
|
|
229
|
+
// this.currentRow = this.$refs['rows.' + index][0] || null;
|
|
230
|
+
// }
|
|
218
231
|
},
|
|
219
232
|
tdRowspan(column, row) {
|
|
220
233
|
if (!column.show) {
|
|
@@ -222,17 +235,16 @@
|
|
|
222
235
|
}
|
|
223
236
|
|
|
224
237
|
//合并行
|
|
225
|
-
if (row.$rowspan !== 0 && this.
|
|
238
|
+
if (row.$rowspan !== 0 && this.rowMergedColumns.includes(column.id)) {
|
|
226
239
|
return row.$rowspan;
|
|
227
240
|
}
|
|
228
241
|
|
|
229
242
|
return '';
|
|
230
243
|
},
|
|
231
244
|
tdColspan(column, row) {
|
|
232
|
-
if (row.colspan !== 0) {
|
|
245
|
+
if (row.colspan !== 0 && row.columnShow===column.id) {
|
|
233
246
|
return row.colspan;
|
|
234
247
|
}
|
|
235
|
-
return '';
|
|
236
248
|
},
|
|
237
249
|
tdShow(column, row) {
|
|
238
250
|
if (!column.show) {
|
|
@@ -240,11 +252,11 @@
|
|
|
240
252
|
}
|
|
241
253
|
|
|
242
254
|
//合并行
|
|
243
|
-
if (row.$rowspan === 0 && this.
|
|
255
|
+
if (row.$rowspan === 0 && this.rowMergedColumns.indexOf(column.id) > -1) {
|
|
244
256
|
return false;
|
|
245
257
|
}
|
|
246
258
|
|
|
247
|
-
if(row.flagRow && row.columnShow!==column.id){
|
|
259
|
+
if(row.flagRow && row.columnShow!==column.id && !row.rowHiddenColumns.includes(column.id)){
|
|
248
260
|
return false;
|
|
249
261
|
}
|
|
250
262
|
|
|
@@ -489,11 +501,12 @@
|
|
|
489
501
|
|
|
490
502
|
.ct-tableParent {
|
|
491
503
|
overflow: auto;
|
|
492
|
-
border-bottom:
|
|
504
|
+
border-bottom: 0px;
|
|
493
505
|
width: 100%;
|
|
494
506
|
outline: 0;
|
|
507
|
+
padding: 0px;
|
|
495
508
|
}
|
|
496
|
-
|
|
509
|
+
.ct-searchtable .ct-table {
|
|
497
510
|
min-width: 100%;
|
|
498
511
|
border-collapse: separate;
|
|
499
512
|
}
|
|
@@ -519,6 +532,18 @@
|
|
|
519
532
|
.ct-searchtable .ct-tr > .ct-td3 {
|
|
520
533
|
border: 1px solid #e7e8eb;
|
|
521
534
|
}
|
|
535
|
+
.ct-searchtable .ct-tr > .ct-td4 {
|
|
536
|
+
border-left: 1px solid #e7e8eb;
|
|
537
|
+
}
|
|
538
|
+
.ct-searchtable .ct-tr > .ct-td5 {
|
|
539
|
+
border-right: 1px solid #e7e8eb;
|
|
540
|
+
}
|
|
541
|
+
.ct-searchtable .ct-tr > .ct-tdSingle {
|
|
542
|
+
background-color: rgb(255 243 244);
|
|
543
|
+
}
|
|
544
|
+
.ct-searchtable .ct-tr > .ct-tdDouble {
|
|
545
|
+
background-color: rgb(239 255 239);
|
|
546
|
+
}
|
|
522
547
|
.shadowLeft {
|
|
523
548
|
border-right: 1px solid #e7e8eb;
|
|
524
549
|
box-shadow: 2px 0 3px -1px rgba(0,0,0,0.1);
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
:class="['ct-table',model.attrs.size?'ct-table-'+model.attrs.size:'']">
|
|
27
27
|
<!--表头-->
|
|
28
28
|
<thead ref="tableHead">
|
|
29
|
-
<tr class="ct-tr" ref="headTr" v-for="(columns,columnsIndex) in model.columnsArr">
|
|
29
|
+
<tr class="ct-tr" ref="headTr" v-for="(columns,columnsIndex) in model.columnsArr" :key="columnsIndex">
|
|
30
30
|
<th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs" class="ct-td left-fixation-th checkbox-td" :class="[model.tdClass]">
|
|
31
31
|
<label class="el-checkbox"><span class="el-checkbox__input" :class="model.selectAllType">
|
|
32
32
|
<span class="el-checkbox__inner"></span>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
</th>
|
|
40
|
-
<th :ref="column.fixed?(column.fixed==='left'?'headLeftThs':'headRightThs'):'headThs'" v-for="(column,colIndex) in columns"
|
|
40
|
+
<th :ref="column.fixed?(column.fixed==='left'?'headLeftThs':'headRightThs'):'headThs'" v-for="(column,colIndex) in columns" :key="colIndex"
|
|
41
41
|
v-if="column.show" class="ct-td ct-searchtable-th"
|
|
42
42
|
:rowspan="column.rowspan"
|
|
43
43
|
:colspan="column.colspan"
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
</td>
|
|
76
76
|
</tr>-->
|
|
77
77
|
<!--可视区域的行数据-->
|
|
78
|
-
<tr v-for="(row,rowindex) in model.listData"
|
|
78
|
+
<tr v-for="(row,rowindex) in model.listData" :key="rowindex"
|
|
79
79
|
v-if="pageRowMin <= rowindex && rowindex <= pageRowMax"
|
|
80
80
|
:ref="'rows.'+rowindex" @click="rowClickHandle($event,rowindex)"
|
|
81
81
|
class="ct-tr"
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
</label>
|
|
90
90
|
</td>
|
|
91
91
|
<td :ref="column.fixed?(column.fixed==='left'?'headLeftTds':'headRightTds'):null"
|
|
92
|
-
v-for="(column,colIndex) in model.dataFieldcolumns"
|
|
92
|
+
v-for="(column,colIndex) in model.dataFieldcolumns" :key="colIndex"
|
|
93
93
|
v-if="tdShow(column, row)"
|
|
94
94
|
:rowspan="tdRowspan(column, row)"
|
|
95
95
|
class="ct-td"
|
|
@@ -7,35 +7,40 @@
|
|
|
7
7
|
<div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
|
|
8
8
|
{{model.label}}
|
|
9
9
|
</div>
|
|
10
|
-
<
|
|
11
|
-
<div>
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
<div class="ct-sostt">
|
|
11
|
+
<div :class="[model.w1=='0'?'ct-input-editor':'ct-input-editorw']" :style="{'width':(model.w1!='0'?model.w1+'px':'auto')}">
|
|
12
|
+
<el-popover ref="pop" placement="bottom-start" v-model="showDrop" :class="[model.showLabel?'showLabel':'']" :trigger="(!model.paramName || model.lock)? 'manual' : 'click'">
|
|
13
|
+
<div>
|
|
14
|
+
<div>
|
|
15
|
+
<el-input ref="searchInput" :size="model.attrs.size" suffix-icon="el-icon-search" v-model="searchText" @input="searchInputHandle"></el-input>
|
|
16
|
+
</div>
|
|
17
|
+
<ctSelectOptionVertical :model="model" @click="selectOption($event)"></ctSelectOptionVertical>
|
|
18
|
+
</div>
|
|
19
|
+
<input slot="reference" v-bind="model.attrs" readonly="readonly" v-model="model.text" :placeholder="soPlaceholder"
|
|
20
|
+
ref="ct-input" :style="{height:inputHeight + 'px','line-height':inputLineHeight + 'px'}"
|
|
21
|
+
@focus="focusHandle" @blur="blurHandle" @click="clickHandle" @input="inputHandler($event)" @change="changeHandler($event)"
|
|
22
|
+
:disabled="model.lock" :class="model.lock ? 'ct-is-disabled' : 'ct-input_inner'" />
|
|
23
|
+
</el-popover>
|
|
24
|
+
<span v-if="!model.lock" class="el-input__suffix" @click="clickHandle" :class="[model.attrs.size?'el-input--'+model.attrs.size:'']">
|
|
25
|
+
<span v-if="showClear === false" class="el-input__suffix-inner">
|
|
26
|
+
<i class="el-select__caret el-input__icon el-icon-arrow-up" :class="{'is-reverse':showDrop}"></i>
|
|
27
|
+
</span>
|
|
28
|
+
<span v-if="showClear === true" class="el-input__suffix-inner ct-close">
|
|
29
|
+
<i class="el-select__caret el-input__icon el-icon-circle-close is-show-close" @click="clearClickHandle($event)"></i>
|
|
30
|
+
</span>
|
|
31
|
+
</span>
|
|
16
32
|
</div>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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>
|
|
33
|
+
<div class="ml10" :class="[model.w2=='0'?'ct-input-editor':'ct-input-editorw']" :style="{'width':(model.w2!='0'?model.w2+'px':'auto')}">
|
|
34
|
+
<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)"
|
|
35
|
+
class="ct-flex-div-input max-input" :class="[model.showLabel?'showLabel':'',!valid?'inputError':'']" :disabled="model.lock" :rows="model.rows"
|
|
36
|
+
:readonly="model.readonly" :show-password="model.isPassword" autocomplete="on" :maxlength="model.max" :show-word-limit="model.showWordLimit"
|
|
37
|
+
@keyup.enter.native="search()">
|
|
38
|
+
</el-input>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
30
41
|
</div>
|
|
31
42
|
</div>
|
|
32
|
-
|
|
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>
|
|
43
|
+
|
|
39
44
|
<span v-if="model.sufLabel" class="spanMessage ct-flex-div-span">{{model.sufLabel}}</span>
|
|
40
45
|
<transition name="el-fade-in">
|
|
41
46
|
<span v-show="!valid" class="errorMessage">
|
|
@@ -243,7 +248,8 @@
|
|
|
243
248
|
},
|
|
244
249
|
//不能共用的数据校验
|
|
245
250
|
selfValidExcute: function (eventName) {
|
|
246
|
-
if (this.required
|
|
251
|
+
if (this.model.required && this.model.value1 == "") {
|
|
252
|
+
this.validMessage = "必填";
|
|
247
253
|
this.valid = false;
|
|
248
254
|
return false;
|
|
249
255
|
}
|
|
@@ -280,4 +286,27 @@
|
|
|
280
286
|
.h26{
|
|
281
287
|
height: 26px;
|
|
282
288
|
}
|
|
289
|
+
.ct-so .ct-sostt {
|
|
290
|
+
width: 100%;
|
|
291
|
+
display: flex;
|
|
292
|
+
flex-wrap: wrap;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.ct-so .ct-sostt .ct-input-editor {
|
|
296
|
+
flex: 1 0 0;
|
|
297
|
+
position: relative;
|
|
298
|
+
}
|
|
299
|
+
.ct-so .ct-sostt .ct-input-editorw {
|
|
300
|
+
position: relative;
|
|
301
|
+
display:inline-block;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.ct-so .ct-sostt .ml10 {
|
|
305
|
+
margin-left:10px;
|
|
306
|
+
}
|
|
307
|
+
.ct-sostt .showLabel input {
|
|
308
|
+
border-top-left-radius: 4px !important;
|
|
309
|
+
border-bottom-left-radius: 4px !important;
|
|
310
|
+
text-align: left !important;
|
|
311
|
+
}
|
|
283
312
|
</style>
|
|
@@ -15,13 +15,16 @@ const ContactList = function (source,para ,callBack) {
|
|
|
15
15
|
_columns: [],
|
|
16
16
|
_columnsArr: [],
|
|
17
17
|
_dataFieldcolumns: [],
|
|
18
|
+
_dataFieldcolumnsShow: [],
|
|
18
19
|
_listData: [],
|
|
19
20
|
_scripts: null,
|
|
20
21
|
isMergeTitle: false,//是否合并标题
|
|
21
22
|
selectIndex: 0,
|
|
22
23
|
formData: formData,
|
|
23
24
|
rowHiddenKey:'contactID',
|
|
24
|
-
rowHiddenColumns:['
|
|
25
|
+
rowHiddenColumns:['contactNameDesc','propertyIdentityTypeID'],
|
|
26
|
+
columnShow:'contactNoTypeDesc',
|
|
27
|
+
rowHiddenKeyData:[],
|
|
25
28
|
attrs: {
|
|
26
29
|
size: 'mini'
|
|
27
30
|
},
|
|
@@ -90,8 +93,8 @@ const ContactList = function (source,para ,callBack) {
|
|
|
90
93
|
var newRow = {};
|
|
91
94
|
newRow[rtn.rowHiddenKey]=v[rtn.rowHiddenKey];
|
|
92
95
|
newRow.descNewRow = v.descNewRow;
|
|
93
|
-
newRow.colspan = rtn.
|
|
94
|
-
newRow.columnShow=rtn.
|
|
96
|
+
newRow.colspan = rtn.dataFieldcolumnsShow.length-rtn.rowMergedColumns.length;
|
|
97
|
+
newRow.columnShow=rtn.columnShow;
|
|
95
98
|
newRow.flagRow=true;
|
|
96
99
|
rtn._listData.push(newRow);
|
|
97
100
|
}
|
|
@@ -100,6 +103,11 @@ const ContactList = function (source,para ,callBack) {
|
|
|
100
103
|
}
|
|
101
104
|
return rtn._listData;
|
|
102
105
|
},
|
|
106
|
+
set listData(v) {
|
|
107
|
+
if (v) {
|
|
108
|
+
rtn._listData=v;
|
|
109
|
+
}
|
|
110
|
+
},
|
|
103
111
|
get columns() {
|
|
104
112
|
var self = this;
|
|
105
113
|
if (self._columns.length > 0) {
|
|
@@ -281,9 +289,23 @@ const ContactList = function (source,para ,callBack) {
|
|
|
281
289
|
self._dataFieldcolumns = arr;
|
|
282
290
|
return self._dataFieldcolumns;
|
|
283
291
|
}
|
|
292
|
+
},
|
|
293
|
+
get dataFieldcolumnsShow() {
|
|
294
|
+
var self = this;
|
|
295
|
+
if (self._dataFieldcolumnsShow.length > 0) {
|
|
296
|
+
return self._dataFieldcolumnsShow;
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
var arr = self.columns.filter(v => {
|
|
300
|
+
return v.isDataField !== false && v.show
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
self._dataFieldcolumnsShow = arr;
|
|
304
|
+
return self._dataFieldcolumnsShow;
|
|
305
|
+
}
|
|
284
306
|
},
|
|
285
307
|
get rowMergedColumns() {
|
|
286
|
-
return source.
|
|
308
|
+
return source.rowMergedColumns || [];
|
|
287
309
|
},
|
|
288
310
|
get apiRouter() {
|
|
289
311
|
return source.apiRouter;
|
|
@@ -291,13 +313,14 @@ const ContactList = function (source,para ,callBack) {
|
|
|
291
313
|
getCurrentRowApiData(rtnData,router) {
|
|
292
314
|
var self = this;
|
|
293
315
|
var searchFields = self.apiRouter.getSearchPara();
|
|
316
|
+
var searchValue1=router.flagAddRowAfterAction? rtnData.content: rtn.listData[rtn.selectIndex][self.primaryKey];
|
|
294
317
|
if (self.primaryKey) {
|
|
295
318
|
searchFields.fields.push({
|
|
296
319
|
fieldName1: self.primaryFieldMappingDBName ? self.primaryFieldMappingDBName : self.primaryKey,
|
|
297
320
|
groupName: self.primaryKey,
|
|
298
321
|
operation: Enum.SearchOperation.等于,
|
|
299
322
|
searchDataType: Enum.SearchDataType.Text,
|
|
300
|
-
searchValue1:
|
|
323
|
+
searchValue1: searchValue1,
|
|
301
324
|
});
|
|
302
325
|
}
|
|
303
326
|
Vue.prototype.$api.postHandler(common.globalUri(), {
|
|
@@ -312,26 +335,10 @@ const ContactList = function (source,para ,callBack) {
|
|
|
312
335
|
if (response.rtnCode === Enum.ReturnCode.Successful) {
|
|
313
336
|
if (response.content.rows.length > 0) {
|
|
314
337
|
if(router.flagAddRowAfterAction){
|
|
315
|
-
response.content.rows
|
|
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();
|
|
338
|
+
rtn.doNew(response.content.rows);
|
|
328
339
|
}
|
|
329
340
|
else{
|
|
330
|
-
|
|
331
|
-
// for (var vkey in row) {
|
|
332
|
-
// rtn.dataDictionary[row[rtn.primaryKey]][vkey] = row[vkey];
|
|
333
|
-
// }
|
|
334
|
-
// });
|
|
341
|
+
rtn.doUpdate(response.content.rows,searchValue1);
|
|
335
342
|
}
|
|
336
343
|
}
|
|
337
344
|
}
|
|
@@ -367,27 +374,12 @@ const ContactList = function (source,para ,callBack) {
|
|
|
367
374
|
break;
|
|
368
375
|
case Enum.ActionType.New://新增
|
|
369
376
|
case Enum.ActionType.CloseTabThenNew://新增
|
|
370
|
-
response.content
|
|
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);
|
|
381
|
-
});
|
|
382
|
-
rtn.setHiddenRow();
|
|
377
|
+
rtn.doNew(response.content);
|
|
383
378
|
break;
|
|
384
379
|
case Enum.ActionType.Update://修改
|
|
385
380
|
case Enum.ActionType.CloseTabThenUpdate://修改
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
rtn.dataDictionary[row[rtn.primaryKey]][vkey] = row[vkey];
|
|
389
|
-
}
|
|
390
|
-
});
|
|
381
|
+
var searchValue1=rtn.listData[rtn.selectIndex][self.primaryKey];
|
|
382
|
+
rtn.doUpdate(response.content,searchValue1);
|
|
391
383
|
break;
|
|
392
384
|
default:
|
|
393
385
|
break;
|
|
@@ -395,6 +387,63 @@ const ContactList = function (source,para ,callBack) {
|
|
|
395
387
|
}
|
|
396
388
|
rtn.$vue.$forceUpdate();
|
|
397
389
|
},
|
|
390
|
+
doNew(data){
|
|
391
|
+
data.forEach((v) => {
|
|
392
|
+
if(v.descNewRow){
|
|
393
|
+
var newRow = {};
|
|
394
|
+
newRow[rtn.rowHiddenKey]=v[rtn.rowHiddenKey];
|
|
395
|
+
newRow.descNewRow = v.descNewRow;
|
|
396
|
+
newRow.colspan = rtn.dataFieldcolumnsShow.length-rtn.rowMergedColumns.length;
|
|
397
|
+
newRow.columnShow=rtn.columnShow;
|
|
398
|
+
newRow.flagRow=true;
|
|
399
|
+
rtn._listData.unshift(newRow);
|
|
400
|
+
}
|
|
401
|
+
rtn._listData.unshift(v);
|
|
402
|
+
});
|
|
403
|
+
rtn.setHiddenRow();
|
|
404
|
+
},
|
|
405
|
+
doUpdate(data,searchValue1){
|
|
406
|
+
let updateData=[];
|
|
407
|
+
data.forEach((v) => {
|
|
408
|
+
updateData.push(v);
|
|
409
|
+
if(v.descNewRow){
|
|
410
|
+
var newRow = {};
|
|
411
|
+
newRow[rtn.rowHiddenKey]=v[rtn.rowHiddenKey];
|
|
412
|
+
newRow.descNewRow = v.descNewRow;
|
|
413
|
+
newRow.colspan = rtn.dataFieldcolumnsShow.length-rtn.rowMergedColumns.length;
|
|
414
|
+
newRow.columnShow=rtn.columnShow;
|
|
415
|
+
newRow.flagRow=true;
|
|
416
|
+
updateData.push(newRow);
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
let strat=-1;
|
|
420
|
+
let count=0;
|
|
421
|
+
rtn._listData.forEach((v,i) => {
|
|
422
|
+
if(v[rtn.rowHiddenKey]===searchValue1){
|
|
423
|
+
if(strat===-1)strat=i;
|
|
424
|
+
count=count+1;
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
if(updateData.length===1){
|
|
428
|
+
rtn._listData.splice(strat, count,updateData[0]);
|
|
429
|
+
}
|
|
430
|
+
else if(updateData.length===2){
|
|
431
|
+
rtn._listData.splice(strat, count,updateData[0],updateData[1]);
|
|
432
|
+
}
|
|
433
|
+
else if(updateData.length===3){
|
|
434
|
+
rtn._listData.splice(strat, count,updateData[0],updateData[1],updateData[2]);
|
|
435
|
+
}
|
|
436
|
+
else if(updateData.length===4){
|
|
437
|
+
rtn._listData.splice(strat, count,updateData[0],updateData[1],updateData[2],updateData[3]);
|
|
438
|
+
}
|
|
439
|
+
else if(updateData.length===5){
|
|
440
|
+
rtn._listData.splice(strat, count,updateData[0],updateData[1],updateData[2],updateData[3],updateData[4]);
|
|
441
|
+
}
|
|
442
|
+
else if(updateData.length===6){
|
|
443
|
+
rtn._listData.splice(strat, count,updateData[0],updateData[1],updateData[2],updateData[3],updateData[4],updateData[5]);
|
|
444
|
+
}
|
|
445
|
+
rtn.setHiddenRow();
|
|
446
|
+
},
|
|
398
447
|
get scripts() {
|
|
399
448
|
if (rtn._scripts !== null) {
|
|
400
449
|
return rtn._scripts;
|
|
@@ -430,19 +479,35 @@ const ContactList = function (source,para ,callBack) {
|
|
|
430
479
|
return;
|
|
431
480
|
}
|
|
432
481
|
let lastKey='';
|
|
482
|
+
let count=1;
|
|
483
|
+
let firstIndex=0;
|
|
484
|
+
rtn.rowHiddenKeyData=[];
|
|
433
485
|
for (let i = 0; i < rtn.listData.length; i++) {
|
|
486
|
+
if(!rtn.rowHiddenKeyData.includes(rtn.listData[i][rtn.rowHiddenKey])){
|
|
487
|
+
rtn.rowHiddenKeyData.push(rtn.listData[i][rtn.rowHiddenKey])
|
|
488
|
+
}
|
|
489
|
+
rtn.listData[i].$rowspan=0;
|
|
434
490
|
if(lastKey){
|
|
435
491
|
if(rtn.listData[i][rtn.rowHiddenKey]){
|
|
436
492
|
if(rtn.listData[i][rtn.rowHiddenKey]===lastKey){
|
|
437
493
|
rtn.listData[i].rowHiddenColumns=rtn.rowHiddenColumns;
|
|
494
|
+
count++;
|
|
495
|
+
if(i===rtn.listData.length-1){
|
|
496
|
+
rtn.listData[firstIndex].$rowspan=count;
|
|
497
|
+
}
|
|
438
498
|
}
|
|
439
499
|
else{
|
|
500
|
+
rtn.listData[firstIndex].$rowspan=count;
|
|
440
501
|
lastKey=rtn.listData[i][rtn.rowHiddenKey];
|
|
502
|
+
count=1;
|
|
503
|
+
firstIndex=i;
|
|
441
504
|
}
|
|
442
505
|
}
|
|
443
506
|
}
|
|
444
507
|
else{
|
|
445
508
|
lastKey=rtn.listData[i][rtn.rowHiddenKey];
|
|
509
|
+
count=1;
|
|
510
|
+
firstIndex=i;
|
|
446
511
|
}
|
|
447
512
|
}
|
|
448
513
|
},
|
|
@@ -22,6 +22,22 @@ const SosTt = function (source, moreActionRouter) {
|
|
|
22
22
|
source.name1 = v;
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
+
get w1() {
|
|
26
|
+
if (typeof source.width1 !== 'undefined' && source.width1 != "0") {
|
|
27
|
+
return source.width1;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return '0';
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
get w2() {
|
|
34
|
+
if (typeof source.width2 !== 'undefined' && source.width2 != "0") {
|
|
35
|
+
return source.width2;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return '0';
|
|
39
|
+
}
|
|
40
|
+
},
|
|
25
41
|
get optionColCount() {
|
|
26
42
|
return parseInt(source.optCount) || 5;
|
|
27
43
|
},
|