centaline-data-driven 1.3.30 → 1.3.33

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.
@@ -1,80 +1,33 @@
1
1
  <template>
2
- <div
3
- style="width: 100%"
4
- class="ct-searchtable"
5
- ref="searchTable"
6
- :style="{ 'margin-top': isLayout ? '0' : '', padding: isLayout ? '0' : '' }"
7
- >
8
- <ct-tableStats
9
- ref="tableStats"
10
- class="ct-search-table-list-header"
11
- v-if="!isLoading && searchStatsApi"
12
- :api="searchStatsApi"
13
- @searchStats="searchStats"
14
- @setTableHeight="setTableHeight"
15
- :searchModel="model.searchModel"
16
- ></ct-tableStats>
17
- <ct-tabletoolbar
18
- ref="toolbar"
19
- v-if="!isLoading"
2
+ <div style="width: 100%" class="ct-searchtable" ref="searchTable" :style="{ 'margin-top': isLayout ? '0' : '', padding: isLayout ? '0' : '' }">
3
+ <ct-tableStats ref="tableStats" class="ct-search-table-list-header"
4
+ v-if="!isLoading && searchStatsApi" :api="searchStatsApi"
5
+ @searchStats="searchStats" @setTableHeight="setTableHeight" :searchModel="model.searchModel">
6
+ </ct-tableStats>
7
+
8
+ <ct-tabletoolbar ref="toolbar" v-if="!isLoading"
20
9
  :buttons="model.buttons"
21
- @click="toolbarClickHandler($event)"
22
- @importComplete="importComplete"
23
- :optionApi="model.optionApi"
24
- :searchModel="model.searchModel"
25
- ></ct-tabletoolbar>
26
- <ct-tabletip
27
- ref="listHeader"
28
- class="ct-search-table-list-header"
29
- :tip="model.listHeader"
30
- v-if="!isLoading"
31
- ></ct-tabletip>
32
- <div
33
- v-loading="tableLoading"
34
- v-if="!isLoading"
35
- :style="{ height: '0px', top: model.tableHeight * 0.55 + 'px' }"
36
- ></div>
10
+ @click="toolbarClickHandler($event)" @importComplete="importComplete"
11
+ :optionApi="model.optionApi" :searchModel="model.searchModel">
12
+ </ct-tabletoolbar>
13
+
14
+ <ct-tabletip ref="listHeader" class="ct-search-table-list-header" :tip="model.listHeader" v-if="!isLoading"></ct-tabletip>
15
+
16
+ <div v-loading="tableLoading" v-if="!isLoading" :style="{ height: '0px', top: model.tableHeight * 0.55 + 'px' }"></div>
37
17
  <div v-loading="operationLoading"></div>
38
- <div
39
- class="ct-tableParent"
40
- ref="tableParent"
41
- v-bind="model.attrs"
42
- v-if="!isLoading"
43
- :style="{
44
- height: from == 'form' ? '100%' : model.tableHeight + 'px',
45
- 'border-bottom': isLayout ? 'none' : '',
46
- 'border-top': isLayout ? 'none' : '',
47
- }"
48
- @scroll="scrollHandle($event)"
49
- :v-focus="model.flagFocus"
50
- @keydown.up="rowKeyDownHandle($event, 0)"
51
- @keydown.down="rowKeyDownHandle($event, 1)"
52
- tabindex="-1"
53
- >
18
+
19
+ <div class="ct-tableParent" ref="tableParent" v-bind="model.attrs" v-if="!isLoading"
20
+ :style="{ height: from == 'form' ? '100%' : model.tableHeight + 'px','border-bottom': isLayout ? 'none' : '','border-top': isLayout ? 'none' : '',}"
21
+ @scroll="scrollHandle($event)" :v-focus="model.flagFocus"
22
+ @keydown.up="rowKeyDownHandle($event, 0)" @keydown.down="rowKeyDownHandle($event, 1)"
23
+ tabindex="-1">
54
24
  <div class="ct-table-content" v-if="!isLayout">
55
- <table
56
- border="0"
57
- cellpadding="0"
58
- cellspacing="0"
59
- :class="[
60
- 'ct-table',
61
- model.attrs.size ? 'ct-table-' + model.attrs.size : '',
62
- ]"
63
- >
25
+ <table border="0" cellpadding="0" cellspacing="0"
26
+ :class="['ct-table',model.attrs.size ? 'ct-table-' + model.attrs.size : '',]">
64
27
  <!--表头-->
65
28
  <thead ref="tableHead" class="right-no-fixation-th">
66
- <tr
67
- class="ct-tr"
68
- ref="headTr"
69
- v-for="(columns, columnsIndex) in model.columnsArr"
70
- :key="columnsIndex"
71
- >
72
- <th
73
- v-if="model.isMulti && columnsIndex === 0"
74
- ref="headLeftThs"
75
- class="ct-td left-fixation-th checkbox-td"
76
- :class="[model.tdClass]"
77
- >
29
+ <tr class="ct-tr" ref="headTr" v-for="(columns, columnsIndex) in model.columnsArr" :key="columnsIndex">
30
+ <th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs" class="ct-td left-fixation-th checkbox-td" :class="[model.tdClass]">
78
31
  <label class="el-checkbox">
79
32
  <span class="el-checkbox__input" :class="model.selectAllType">
80
33
  <span class="el-checkbox__inner"></span>
@@ -88,20 +41,9 @@
88
41
  </span>
89
42
  </label>
90
43
  </th>
91
- <th
92
- :ref="
93
- column.fixed
94
- ? column.fixed === 'left'
95
- ? 'headLeftThs'
96
- : 'headRightThs'
97
- : 'headThs'
98
- "
99
- v-for="(column, colIndex) in columns"
100
- :key="colIndex"
101
- v-if="column.show"
102
- class="ct-td ct-searchtable-th"
103
- :rowspan="column.rowspan"
104
- :colspan="column.colspan"
44
+ <th :ref=" column.fixed ? column.fixed === 'left' ? 'headLeftThs' : 'headRightThs' : 'headThs'"
45
+ v-for="(column, colIndex) in columns" :key="colIndex" v-if="column.show"
46
+ class="ct-td ct-searchtable-th" :rowspan="column.rowspan" :colspan="column.colspan"
105
47
  :class="[
106
48
  colHasWidth[colIndex],
107
49
  column.sortAction,
@@ -111,31 +53,14 @@
111
53
  column.fixed === 'left' ? 'left-fixation-th' : null,
112
54
  column.fixed === 'right' ? 'right-fixation-th' : null,
113
55
  column.width === undefined ? 'ct-table-auto' : null,
114
- typeof column.fixed === 'undefined'
115
- ? 'right-no-fixation-th'
116
- : null,
56
+ typeof column.fixed === 'undefined' ? 'right-no-fixation-th': null,
117
57
  ]"
118
- @mousemove="thMouseMoveHandle($event)"
119
- @mousedown="thMouseDownHandle($event, colIndex)"
120
- v-bind="column.attrs"
121
- >
58
+ @mousemove="thMouseMoveHandle($event)" @mousedown="thMouseDownHandle($event, colIndex)"
59
+ v-bind="column.attrs">
122
60
  <span>{{ column.name }}</span>
123
- <span
124
- class="caret-wrapper"
125
- v-if="column.sort"
126
- @click="toSort($event, column)"
127
- @contextmenu.prevent="clearSort($event, column)"
128
- >
129
- <i
130
- class="sort-caret ascending"
131
- @click.left="toSort($event, column, 'asc')"
132
- @contextmenu.prevent="clearSort($event, column)"
133
- ></i>
134
- <i
135
- class="sort-caret descending"
136
- @click.left="toSort($event, column, 'desc')"
137
- @contextmenu.prevent="clearSort($event, column)"
138
- ></i>
61
+ <span class="caret-wrapper" v-if="column.sort" @click="toSort($event, column)" @contextmenu.prevent="clearSort($event, column)">
62
+ <i class="sort-caret ascending" @click.left="toSort($event, column, 'asc')" @contextmenu.prevent="clearSort($event, column)"></i>
63
+ <i class="sort-caret descending" @click.left="toSort($event, column, 'desc')" @contextmenu.prevent="clearSort($event, column)"></i>
139
64
  </span>
140
65
  </th>
141
66
 
@@ -147,49 +72,20 @@
147
72
  <!--表体-->
148
73
  <tbody>
149
74
  <!--可视区域的行数据-->
150
- <tr
151
- v-for="(row, rowindex) in model.listData"
152
- :key="rowindex"
153
- v-if="pageRowMin <= rowindex && rowindex <= pageRowMax"
154
- :ref="'rows.' + rowindex"
155
- @click="rowClickHandle($event, rowindex)"
156
- class="ct-tr"
157
- :style="row.$style"
158
- >
159
- <td
160
- v-if="model.isMulti"
161
- class="ct-td tdFiexd left-fixation checkbox-td"
162
- :class="[model.tdClass]"
163
- align="center"
164
- >
165
- <label
166
- v-if="!model.rightMulti || row[model.rightMulti] == 1"
167
- class="el-checkbox is-checked"
168
- >
75
+ <tr v-for="(row, rowindex) in model.listData" :key="rowindex" v-if="pageRowMin <= rowindex && rowindex <= pageRowMax"
76
+ :ref="'rows.' + rowindex" @click="rowClickHandle($event, rowindex)"
77
+ class="ct-tr" :style="row.$style">
78
+ <td v-if="model.isMulti" class="ct-td tdFiexd left-fixation checkbox-td" :class="[model.tdClass]" align="center">
79
+ <label v-if="!model.rightMulti || row[model.rightMulti] == 1" class="el-checkbox is-checked">
169
80
  <span class="el-checkbox__input" :class="rowCheckClass(row)">
170
81
  <span class="el-checkbox__inner"></span>
171
- <input
172
- type="checkbox"
173
- v-model="row.$select"
174
- @change="selectOne($event)"
175
- class="el-checkbox__original checkbox-td-1"
176
- />
82
+ <input type="checkbox" v-model="row.$select" @change="selectOne($event)" class="el-checkbox__original checkbox-td-1"/>
177
83
  </span>
178
84
  </label>
179
85
  </td>
180
- <td
181
- :ref="
182
- column.fixed
183
- ? column.fixed === 'left'
184
- ? 'headLeftTds'
185
- : 'headRightTds'
186
- : null
187
- "
188
- v-for="(column, colIndex) in model.dataFieldcolumns"
189
- :key="colIndex"
190
- v-if="tdShow(column, row)"
191
- :rowspan="tdRowspan(column, row)"
192
- class="ct-td"
86
+ <td :ref="column.fixed? column.fixed === 'left' ? 'headLeftTds': 'headRightTds' : null"
87
+ v-for="(column, colIndex) in model.dataFieldcolumns" :key="colIndex" v-if="tdShow(column, row)"
88
+ :rowspan="tdRowspan(column, row)" class="ct-td"
193
89
  :class="[
194
90
  colHasWidth[colIndex],
195
91
  model.tdClass,
@@ -199,95 +95,45 @@
199
95
  column.width === undefined ? 'ct-table-auto' : null,
200
96
  column.fixed === 'right' ? 'right-fixation' : null,
201
97
  ]"
202
- v-bind="column.attrs"
203
- >
98
+ v-bind="column.attrs">
204
99
  <!--操作列-->
205
- <div
206
- v-if="column.id === 'operation'"
207
- class="div_allinline"
208
- :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
209
- >
210
- <ct-tablecurrency
211
- v-for="(router, rowRouterIndex) in getRowRouterShow(row)"
212
- :key="rowRouterIndex"
213
- v-if="!router.rightField || row[router.rightField] == 1"
214
- :isOperationalColumn="true"
215
- :router="router"
216
- :colValue="router.label"
217
- :rowData="row"
218
- @click="rolRouterClickHandler"
219
- >
100
+ <div v-if="column.id === 'operation'" class="div_allinline" :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'">
101
+ <ct-tablecurrency v-for="(router, rowRouterIndex) in getRowRouterShow(row)" :key="rowRouterIndex"
102
+ v-if="!router.rightField || row[router.rightField] == 1" :isOperationalColumn="true"
103
+ :router="router" :colValue="router.label" :rowData="row" @click="rolRouterClickHandler">
220
104
  </ct-tablecurrency>
221
- <el-popover
222
- v-if="getRowRouterDisplay(row).length > 0"
223
- :ref="'popover' + rowindex"
105
+ <el-popover v-if="getRowRouterDisplay(row).length > 0" :ref="'popover' + rowindex"
224
106
  :append-to-table="option.appendId ? option.appendId : ''"
225
- class="Stats-popover"
226
- popper-class="el-popover1"
227
- :placement="option.placement ? option.placement : 'left'"
228
- :trigger="option.trigger ? option.trigger : ''"
229
- >
107
+ class="Stats-popover" popper-class="el-popover1"
108
+ :placement="option.placement ? option.placement : 'left'" :trigger="option.trigger ? option.trigger : ''">
230
109
  <div class="tab-list" style="border-bottom: none">
231
- <ct-tablecurrency
232
- v-for="(router, rowRouterIndex) in getRowRouterDisplay(
233
- row
234
- )"
235
- :key="rowRouterIndex"
236
- v-if="!router.rightField || row[router.rightField] == 1"
237
- :isOperationalColumn="true"
238
- :isShowImg="false"
239
- :rowindex="rowindex"
240
- :router="router"
241
- :colValue="router.label"
242
- :rowData="row"
243
- @click="rolRouterClickHandler"
244
- >
110
+ <ct-tablecurrency v-for="(router, rowRouterIndex) in getRowRouterDisplay(row)"
111
+ :key="rowRouterIndex" v-if="!router.rightField || row[router.rightField] == 1"
112
+ :isOperationalColumn="true" :isShowImg="false" :rowindex="rowindex"
113
+ :router="router" :colValue="router.label" :rowData="row" @click="rolRouterClickHandler">
245
114
  </ct-tablecurrency>
246
115
  </div>
247
- <span
248
- :slot="
249
- getRowRouterDisplay(row).length > 0 ? 'reference' : ''
250
- "
251
- class="icon-more"
252
- ></span>
116
+ <span :slot="getRowRouterDisplay(row).length > 0 ? 'reference' : ''" class="icon-more"></span>
253
117
  </el-popover>
254
118
  </div>
255
119
 
256
- <ct-tablecurrency
257
- v-else-if="column.id === 'voice'"
258
- :isShowVoice="true"
259
- :router="column.router"
260
- :colValue="column.router.label"
261
- :rowData="row"
262
- @click="rolRouterClickHandler"
263
- :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
264
- >
120
+ <ct-tablecurrency v-else-if="column.id === 'voice'" :isShowVoice="true"
121
+ :router="column.router" :colValue="column.router.label"
122
+ :rowData="row" @click="rolRouterClickHandler" :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'">
265
123
  </ct-tablecurrency>
266
124
 
267
125
  <!--可点击的列-->
268
- <ct-tablecurrency
269
- v-else-if="column.router"
270
- :align="column.attrs.align"
271
- :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
272
- :router="column.router"
273
- :colValue="row[column.id]"
274
- :rowData="row"
275
- @click="rolRouterClickHandler"
276
- >
126
+ <ct-tablecurrency v-else-if="column.router"
127
+ :align="column.attrs.align" :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
128
+ :router="column.router" :colValue="row[column.id]" :rowData="row" @click="rolRouterClickHandler">
277
129
  </ct-tablecurrency>
278
130
 
279
131
  <!--正常的列-->
280
- <div
281
- v-else-if="column.flagHtml"
282
- v-html="row[column.id]"
283
- :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
284
- :style="column.style ? column.style : ''"
285
- ></div>
286
- <div
287
- v-else-if="typeof column.template === 'undefined'"
288
- :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'"
289
- :style="column.style ? column.style : ''"
290
- >
132
+ <div v-else-if="column.flagHtml" v-html="row[column.id]"
133
+ :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'" :style="column.style ? column.style : ''">
134
+ </div>
135
+ <div v-else-if="typeof column.template === 'undefined'"
136
+ :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'" :style="column.style ? column.style : ''">
291
137
  {{ row[column.id] }}
292
138
  </div>
293
139
 
@@ -306,35 +152,16 @@
306
152
  </div>
307
153
  <div v-else>
308
154
  <div v-for="(row, rowindex) in model.listData" :key="rowindex">
309
- <ct-layout
310
- :ref="'layout' + rowindex"
311
- :vmodel="row"
312
- :cellLayout="model.cellLayout"
313
- :key="tableComplate"
314
- :rowindex="rowindex"
315
- :actionRouter="model.actionRouter"
316
- @click="rolRouterCellClickHandler"
317
- ></ct-layout>
155
+ <ct-layout :ref="'layout' + rowindex" :vmodel="row" :cellLayout="model.cellLayout" :key="tableComplate"
156
+ :rowindex="rowindex" :actionRouter="model.actionRouter" @click="rolRouterCellClickHandler">
157
+ </ct-layout>
318
158
  </div>
319
159
  </div>
320
160
  </div>
321
- <ct-tabletip
322
- ref="listFooter"
323
- class="ct-search-table-list-footer"
324
- :tip="model.listFooter"
325
- v-if="!isLoading && !isLayout"
326
- ></ct-tabletip>
327
- <ct-tabletip
328
- ref="footer"
329
- class="ct-search-table-footer"
330
- :tip="model.footer"
331
- v-if="!isLoading && !isLayout"
332
- ></ct-tabletip>
333
- <div
334
- v-if="isLoading && searchLoading"
335
- v-loading="isLoading"
336
- style="top: 30px"
337
- ></div>
161
+
162
+ <ct-tabletip ref="listFooter" class="ct-search-table-list-footer" :tip="model.listFooter" v-if="!isLoading && !isLayout"></ct-tabletip>
163
+ <ct-tabletip ref="footer" class="ct-search-table-footer" :tip="model.footer" v-if="!isLoading && !isLayout"></ct-tabletip>
164
+ <div v-if="isLoading && searchLoading" v-loading="isLoading" style="top: 30px"></div>
338
165
  </div>
339
166
  </template>
340
167
  <script>
@@ -966,12 +793,6 @@ export default {
966
793
  submitData["searchFields"] = self.model.searchModel.searchData;
967
794
  }
968
795
 
969
- //如果是导出按钮,则直接交给父组件处理
970
- if (field.isExport) {
971
- self.$emit("toolbarClick", field, submitData);
972
- return;
973
- }
974
-
975
796
  this.routerClickHandler(field, submitData, action);
976
797
  },
977
798
  rolRouterClickHandler(field, rowData, rowindex) {
@@ -1004,43 +825,42 @@ export default {
1004
825
  if (field.pageStyle) {
1005
826
  submitData.pageStyle = field.pageStyle;
1006
827
  }
1007
- self.$common
1008
- .getDataDrivenOpts()
1009
- .handler.openTab(
1010
- action,
1011
- submitData,
1012
- field.pageTitle,
1013
- self.model,
1014
- field.dialogWidth
1015
- );
1016
- } else if (field.isSearchPageInTab) {
1017
- // 外部框架tab页打开
828
+ self.$common.getDataDrivenOpts().handler.openTab(action,submitData,field.pageTitle,self.model,field.dialogWidth);
829
+ }
830
+ else if (field.isSearchPageInTab) {// 外部框架tab页打开
1018
831
  submitData = field.getActionPara(submitData).para;
1019
- self.$common
1020
- .getDataDrivenOpts()
1021
- .handler.openTabSearch(field, submitData);
1022
- } else if (field.isBrowserNewTab) {
1023
- // 浏览器打开
832
+ self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
833
+ }
834
+ else if (field.isBrowserNewTab) {// 浏览器打开
1024
835
  submitData = field.getActionPara(submitData).para;
1025
836
  let query = self.$common.objectToQueryStr(submitData);
1026
837
  window.open(action + query, "_blank");
1027
- } else if (field.isOpenUrlInBrowse) {
1028
- // 浏览器打开
838
+ }
839
+ else if (field.isOpenUrlInBrowse) {// 浏览器打开
1029
840
  window.open(submitData[field.submitFormField], "_blank");
1030
- } else if (field.isSeeVoice) {
1031
- //看视频
841
+ }
842
+ else if (field.isSeeVoice) {//看视频
1032
843
  self.$common.browseVideo(field, submitData);
1033
- } else if (field.isBrowseAttachment) {
1034
- //浏览附件
844
+ }
845
+ else if (field.isBrowseAttachment) {//浏览附件
1035
846
  var MediaAlbum = [
1036
847
  { albumName: self.model.title || "媒体", medias: [] },
1037
848
  ];
1038
- submitData.mediaData.forEach((v) => {
1039
- MediaAlbum[0].medias.push(v);
1040
- });
1041
- self.$common.viewerfile(field, MediaAlbum, 0, 0);
1042
- } else if (field.isUrlInLayer) {
1043
- //URL页面(弹层)
849
+ if (field.action) {
850
+ var callback = function (data) {
851
+ MediaAlbum[0].medias = data;
852
+ self.$common.viewerfile(field, MediaAlbum, 0, 0);
853
+ }
854
+ self.model.getAction(field.action, submitData, callback);
855
+ }
856
+ else {
857
+ submitData.mediaData.forEach((v) => {
858
+ MediaAlbum[0].medias.push(v);
859
+ });
860
+ self.$common.viewerfile(field, MediaAlbum, 0, 0);
861
+ }
862
+ }
863
+ else if (field.isUrlInLayer) {//URL页面(弹层)
1044
864
  var dialogOption = {
1045
865
  title: field.pageTitle,
1046
866
  pane: self.$common.getParentPane(self),
@@ -1071,10 +891,7 @@ export default {
1071
891
  delete() {
1072
892
  var res = {};
1073
893
  res.notification = 4;
1074
- res.content =
1075
- self.model.listData[self.model.selectIndex][
1076
- self.model.primaryKey
1077
- ];
894
+ res.content = self.model.listData[self.model.selectIndex][self.model.primaryKey];
1078
895
  self.model.doAction(res);
1079
896
  self.$common.closeDialog(dialogOption.dialog);
1080
897
  },
@@ -1090,7 +907,29 @@ export default {
1090
907
  ],
1091
908
  };
1092
909
  self.$common.openDialog(dialogOption);
1093
- } else {
910
+ }
911
+ else if (field.isExport) {
912
+ if(field.flagAsync){
913
+ self.model.export(field, submitData);
914
+ }
915
+ else{
916
+ if(field.action.indexOf("http://")===0 || field.action.indexOf("https://")===0){
917
+ window.open(field.action, "_blank");
918
+ }
919
+ else{
920
+ field.doAction(submitData, (data) => {
921
+ if(data.content){
922
+ if(data.content.indexOf("http://")===0 || data.content.indexOf("https://")===0){
923
+ window.open(data.content, "_blank");
924
+ }
925
+ else{
926
+ }
927
+ }
928
+ });
929
+ }
930
+ }
931
+ }
932
+ else {
1094
933
  //self.operationLoading = true;
1095
934
 
1096
935
  //Form
@@ -1219,7 +1058,8 @@ export default {
1219
1058
  ],
1220
1059
  };
1221
1060
  self.$common.openDialog(dialogOption);
1222
- } else {
1061
+ }
1062
+ else {
1223
1063
  self.operationLoading = true;
1224
1064
  field.doAction(submitData, (data) => {
1225
1065
  self.operationLoading = false;
@@ -1243,8 +1083,7 @@ export default {
1243
1083
  // self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
1244
1084
  // var fun = self.model.scripts.formData[action];
1245
1085
  // fun(submitData,field);
1246
- let title =
1247
- field.pageTitle == undefined ? field.label : field.pageTitle;
1086
+ let title = field.pageTitle == undefined ? field.label : field.pageTitle;
1248
1087
  submitData.actionType = field.actionType;
1249
1088
  var fun = self.$common.getDataDrivenOpts().handler[action];
1250
1089
  fun(submitData, title, self.$parent);
@@ -1252,8 +1091,7 @@ export default {
1252
1091
  };
1253
1092
 
1254
1093
  if (field.alert) {
1255
- self.$common
1256
- .confirm(field.alertMsg, field.alertCaption, {
1094
+ self.$common.confirm(field.alertMsg, field.alertCaption, {
1257
1095
  confirmButtonText: field.alertOKButtonText,
1258
1096
  cancelButtonText: field.alertCancelButtonText,
1259
1097
  //type: 'warning'
@@ -1263,7 +1101,8 @@ export default {
1263
1101
  clickAcion();
1264
1102
  })
1265
1103
  .catch(() => {});
1266
- } else {
1104
+ }
1105
+ else {
1267
1106
  clickAcion();
1268
1107
  }
1269
1108
  },
@@ -1570,8 +1409,40 @@ export default {
1570
1409
  );
1571
1410
  }
1572
1411
  },
1573
- importComplete(res) {
1574
- this.model.doAction(res);
1412
+ importComplete(res,field) {
1413
+ var self=this;
1414
+ if(field.flagAsync){
1415
+ if(res.content && res.content.action){
1416
+ var dialogOption = {
1417
+ title: "导入",
1418
+ content: [{
1419
+ component: 'ct-progress',
1420
+ attrs: {
1421
+ progressAction: res.content.action,
1422
+ progressKey: res.content.key,
1423
+ progressType:'import',
1424
+ width: '300px',
1425
+ height: '60px'
1426
+ },
1427
+ on: {
1428
+ finished() {
1429
+ self.$common.closeDialog(dialogOption.dialog);
1430
+ self.getPage(1);
1431
+ }
1432
+ }
1433
+ }]
1434
+ };
1435
+ self.$common.openDialog(dialogOption);
1436
+ }
1437
+ }
1438
+ else{
1439
+ if(field && field.changeCallBackFunName){
1440
+ this.changeCallBackHandler(field, field.changeCallBackFunName, res.content);
1441
+ }
1442
+ else{
1443
+ this.model.doAction(res);
1444
+ }
1445
+ }
1575
1446
  },
1576
1447
  tdRowspan(column, row) {
1577
1448
  if (!column.show) {
@@ -62,8 +62,8 @@ export default {
62
62
  }
63
63
  return this.searchModel ? this.searchModel.searchData : {};
64
64
  },
65
- importComplete(res) {
66
- this.$emit("importComplete", res);
65
+ importComplete(res,field) {
66
+ this.$emit("importComplete", res,field);
67
67
  }
68
68
  }
69
69
  };