centaline-data-driven 1.4.8 → 1.4.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/centaline-data-driven-1.4.8.tgz +0 -0
- package/centaline-data-driven-1.4.9.tgz +0 -0
- package/package.json +1 -1
- package/src/Detail.vue +1 -1
- package/src/Form.vue +16 -2
- package/src/centaline/dynamicCheckbox/src/dynamicCheckbox.vue +10 -0
- package/src/centaline/dynamicFile/src/dynamicFile.vue +12 -26
- package/src/centaline/dynamicForm/src/dynamicForm.vue +206 -188
- package/src/centaline/dynamicPhotoSelect/src/dynamicPhotoSelect.vue +1 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +71 -58
- package/src/centaline/dynamicSeg/src/dynamicSeg.vue +12 -0
- package/src/centaline/dynamicViewerFile/src/dynamicViewerFile.vue +35 -5
- package/src/centaline/loader/src/ctl/File.js +31 -8
- package/src/centaline/loader/src/ctl/SliceUpload.js +1 -1
- package/src/centaline/progress/src/progress.vue +9 -2
- package/src/main.js +4 -4
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="width: 100%" class="ct-searchtable" ref="searchTable"
|
|
3
|
-
|
|
3
|
+
:style="{ 'margin-top': isLayout ? '0' : '', padding: isLayout ? '0' : '' }">
|
|
4
4
|
<ct-tableStats ref="tableStats" class="ct-search-table-list-header" v-if="!isLoading && model && searchStatsApi"
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
:api="searchStatsApi" @searchStats="searchStats" @setTableHeight="setTableHeight"
|
|
6
|
+
:searchModel="model.searchModel">
|
|
7
7
|
</ct-tableStats>
|
|
8
8
|
|
|
9
9
|
<ct-tabletoolbar ref="toolbar" v-if="!isLoading && model && model.buttons" :buttons="model.buttons"
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
:key="model.toolbarKey" @click="toolbarClickHandler($event)" @importComplete="importComplete"
|
|
11
|
+
:optionApi="model.optionApi" :searchModel="model.searchModel">
|
|
12
12
|
</ct-tabletoolbar>
|
|
13
13
|
|
|
14
14
|
<ct-tabletip ref="listHeader" class="ct-search-table-list-header ct-search-table-tag" :tip="model.listHeader"
|
|
15
|
-
|
|
15
|
+
v-if="!isLoading && model"></ct-tabletip>
|
|
16
16
|
|
|
17
17
|
<div v-loading="tableLoading" v-if="!isLoading && model"
|
|
18
|
-
|
|
18
|
+
:style="{ height: '0px', top: model.tableHeight * 0.55 + 'px' }"></div>
|
|
19
19
|
<div v-loading="operationLoading"></div>
|
|
20
20
|
|
|
21
21
|
<div class="ct-tableParent" ref="tableParent" v-bind="model.attrs" v-if="!isLoading && model"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
:style="{ height: from == 'form' ? '100%' : model.tableHeight + 'px', 'border-bottom': isLayout ? 'none' : '', 'border-top': isLayout ? 'none' : '', }"
|
|
23
|
+
@scroll="scrollHandle($event)" :v-focus="model.flagFocus" @keydown.up="rowKeyDownHandle($event, 0)"
|
|
24
|
+
@keydown.down="rowKeyDownHandle($event, 1)" tabindex="-1">
|
|
25
25
|
<div class="ct-table-content" v-if="!isLayout">
|
|
26
26
|
<table border="0" cellpadding="0" cellspacing="0"
|
|
27
|
-
|
|
27
|
+
:class="['ct-table', model.attrs.size ? 'ct-table-' + model.attrs.size : '',]">
|
|
28
28
|
<!--表头-->
|
|
29
29
|
<thead ref="tableHead" class="right-no-fixation-th">
|
|
30
30
|
<tr class="ct-tr" ref="headTr" v-for="(columns, columnsIndex) in model.columnsArr" :key="columnsIndex">
|
|
31
31
|
<th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs"
|
|
32
|
-
|
|
32
|
+
class="ct-td left-fixation-th checkbox-td" :class="[model.tdClass]">
|
|
33
33
|
<label class="el-checkbox">
|
|
34
34
|
<span class="el-checkbox__input" :class="model.selectAllType">
|
|
35
35
|
<span class="el-checkbox__inner"></span>
|
|
36
36
|
<input type="checkbox" @click="selectAll($event)" v-model="model.selectAll"
|
|
37
|
-
|
|
37
|
+
class="el-checkbox__original checkbox-td-1" aria-hidden="false" />
|
|
38
38
|
</span>
|
|
39
39
|
</label>
|
|
40
40
|
</th>
|
|
41
41
|
<th :ref="column.fixed ? column.fixed === 'left' ? 'headLeftThs' : 'headRightThs' : 'headThs'"
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
v-for="(column, colIndex) in columns" :key="colIndex" v-if="column.show" class="ct-td ct-searchtable-th"
|
|
43
|
+
:rowspan="column.rowspan" :colspan="column.colspan" :class="[colHasWidth[colIndex], column.sortAction, model.tdClass,
|
|
44
44
|
colIndex === leftShadow ? 'shadowLeft' : null,
|
|
45
45
|
colIndex === rightShadow ? 'shadowRight' : null,
|
|
46
46
|
column.fixed === 'left' ? 'left-fixation-th' : null,
|
|
@@ -48,42 +48,42 @@
|
|
|
48
48
|
column.width === undefined ? 'ct-table-auto' : null,
|
|
49
49
|
typeof column.fixed === 'undefined' ? 'right-no-fixation-th' : null,
|
|
50
50
|
]" @mousemove="thMouseMoveHandle($event)" @mousedown="thMouseDownHandle($event, colIndex)"
|
|
51
|
-
|
|
51
|
+
v-bind="column.attrs">
|
|
52
52
|
<span>{{ column.name }}</span>
|
|
53
53
|
<span class="caret-wrapper" v-if="column.sort" @click="toSort($event, column)"
|
|
54
|
-
|
|
54
|
+
@contextmenu.prevent="clearSort($event, column)">
|
|
55
55
|
<i class="sort-caret ascending" @click.left="toSort($event, column, 'asc')"
|
|
56
|
-
|
|
56
|
+
@contextmenu.prevent="clearSort($event, column)"></i>
|
|
57
57
|
<i class="sort-caret descending" @click.left="toSort($event, column, 'desc')"
|
|
58
|
-
|
|
58
|
+
@contextmenu.prevent="clearSort($event, column)"></i>
|
|
59
59
|
</span>
|
|
60
60
|
</th>
|
|
61
61
|
|
|
62
62
|
<!--<th v-if="model.rowRouter.length > 0" class="ct-td tdFiexd" :class="[-1 === rightShadow?'shadowRight':null]" :style="{'min-width':'20px','transform':'translate('+scrollRight+'px, '+scrollTop+'px)'}">
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
操作
|
|
64
|
+
</th>-->
|
|
65
65
|
</tr>
|
|
66
66
|
</thead>
|
|
67
67
|
<!--表体-->
|
|
68
68
|
<tbody>
|
|
69
69
|
<!--可视区域的行数据-->
|
|
70
70
|
<tr v-for="(row, rowindex) in model.listData" :key="rowindex"
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
v-if="pageRowMin <= rowindex && rowindex <= pageRowMax" :ref="'rows.' + rowindex"
|
|
72
|
+
@click="rowClickHandle($event, rowindex)" class="ct-tr" :style="row.$style">
|
|
73
73
|
<td v-if="model.isMulti" class="ct-td tdFiexd left-fixation checkbox-td" :class="[model.tdClass]"
|
|
74
|
-
|
|
74
|
+
align="center">
|
|
75
75
|
<label v-if="!model.rightMulti || $common.getDataOfUpperLower(row, model.rightMulti) == 1"
|
|
76
|
-
|
|
76
|
+
class="el-checkbox is-checked">
|
|
77
77
|
<span class="el-checkbox__input" :class="rowCheckClass(row)">
|
|
78
78
|
<span class="el-checkbox__inner"></span>
|
|
79
79
|
<input type="checkbox" v-model="row.$select" @change="selectOne($event)"
|
|
80
|
-
|
|
80
|
+
class="el-checkbox__original checkbox-td-1" />
|
|
81
81
|
</span>
|
|
82
82
|
</label>
|
|
83
83
|
</td>
|
|
84
84
|
<td :ref="column.fixed ? column.fixed === 'left' ? 'headLeftTds' : 'headRightTds' : null"
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
v-for="(column, colIndex) in model.dataFieldcolumns" :key="colIndex" v-if="tdShow(column, row)"
|
|
86
|
+
:rowspan="tdRowspan(column, row)" class="ct-td" :class="[
|
|
87
87
|
colHasWidth[colIndex],
|
|
88
88
|
model.tdClass,
|
|
89
89
|
colIndex === leftShadow ? 'shadowLeft' : null,
|
|
@@ -94,21 +94,21 @@
|
|
|
94
94
|
]" v-bind="column.attrs">
|
|
95
95
|
<!--操作列-->
|
|
96
96
|
<div v-if="column.id === 'operation'" class="div_allinline"
|
|
97
|
-
|
|
97
|
+
:class="column.autoRowHeight ? 'lineFeedCell' : 'cell'">
|
|
98
98
|
<ct-tablecurrency v-for="(router, rowRouterIndex) in getRowRouterShow(row)" :key="rowRouterIndex"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
:ref="'router' + router.id + rowindex" v-if="!router.rightField || row[router.rightField] == 1"
|
|
100
|
+
:isOperationalColumn="true" :rowindex="rowindex" :router="router" :colValue="router.label"
|
|
101
|
+
:rowData="row" @click="rolRouterClickHandler">
|
|
102
102
|
</ct-tablecurrency>
|
|
103
103
|
<el-popover v-if="getRowRouterDisplay(row).length > 0" :ref="'popover' + rowindex"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
:append-to-table="option.appendId ? option.appendId : ''" class="Stats-popover"
|
|
105
|
+
popper-class="el-popover1" :placement="option.placement ? option.placement : 'left'"
|
|
106
|
+
:trigger="option.trigger ? option.trigger : ''">
|
|
107
107
|
<div class="tab-list" style="border-bottom: none">
|
|
108
108
|
<ct-tablecurrency v-for="(router, rowRouterIndex) in getRowRouterDisplay(row)"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
:key="rowRouterIndex" v-if="!router.rightField || row[router.rightField] == 1"
|
|
110
|
+
:isOperationalColumn="true" :isShowImg="false" :rowindex="rowindex" :router="router"
|
|
111
|
+
:colValue="router.label" :rowData="row" @click="rolRouterClickHandler">
|
|
112
112
|
</ct-tablecurrency>
|
|
113
113
|
</div>
|
|
114
114
|
<span :slot="getRowRouterDisplay(row).length > 0 ? 'reference' : ''" class="icon-more"></span>
|
|
@@ -116,32 +116,32 @@
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
118
|
<ct-tablecurrency v-else-if="column.id === 'voice'" :isShowVoice="true" :router="column.router"
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
:colValue="column.router.label" :rowindex="rowindex" :rowData="row" @click="rolRouterClickHandler"
|
|
120
|
+
:class="column.autoRowHeight ? 'lineFeedCell' : 'cell'">
|
|
121
121
|
</ct-tablecurrency>
|
|
122
122
|
|
|
123
123
|
<!--可点击的列-->
|
|
124
124
|
<ct-tablecurrency v-else-if="column.router" :ref="'router' + column.router.id + rowindex"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
:rowindex="rowindex" :align="column.attrs.align"
|
|
126
|
+
:class="column.autoRowHeight ? 'lineFeedCell' : 'cell'" :router="column.router"
|
|
127
|
+
:colValue="row[column.id]" :rowData="row" @click="rolRouterClickHandler">
|
|
128
128
|
</ct-tablecurrency>
|
|
129
129
|
|
|
130
130
|
<!--正常的列-->
|
|
131
131
|
<div v-else-if="column.flagHtml" v-html="row[column.id]"
|
|
132
|
-
|
|
132
|
+
:class="column.autoRowHeight ? 'lineFeedCell' : 'cell'" :style="column.style ? column.style : ''">
|
|
133
133
|
</div>
|
|
134
134
|
<div v-else-if="typeof column.template === 'undefined'"
|
|
135
|
-
|
|
135
|
+
:class="column.autoRowHeight ? 'lineFeedCell' : 'cell'" :style="column.style ? column.style : ''">
|
|
136
136
|
{{ $common.getDataOfUpperLower(row, column.id) }}
|
|
137
137
|
</div>
|
|
138
138
|
|
|
139
139
|
<!--模版列(启用)-->
|
|
140
140
|
<!--<component v-else :is="column.template(row).component" :class="column.autoRowHeight ? 'lineFeedCell':'cell'" :vmodel="column.template(row)" :style="{'width': column.width + 'px'}">
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
<template slot="value">
|
|
142
|
+
{{row[column.id]}}
|
|
143
|
+
</template>
|
|
144
|
+
</component>-->
|
|
145
145
|
</td>
|
|
146
146
|
</tr>
|
|
147
147
|
<!--适配滚动条-->
|
|
@@ -152,22 +152,25 @@
|
|
|
152
152
|
<div v-else>
|
|
153
153
|
<div v-for="(row, rowindex) in model.listData" :key="rowindex">
|
|
154
154
|
<ct-layout :ref="'layout' + rowindex" :vmodel="row" :cellLayout="model.cellLayout" :key="tableComplate"
|
|
155
|
-
|
|
155
|
+
:rowindex="rowindex" :actionRouter="model.actionRouter" @click="rolRouterCellClickHandler">
|
|
156
156
|
</ct-layout>
|
|
157
157
|
</div>
|
|
158
158
|
</div>
|
|
159
159
|
</div>
|
|
160
160
|
|
|
161
161
|
<ct-tabletip ref="listFooter" class="ct-search-table-list-footer" :tip="model.listFooter"
|
|
162
|
-
|
|
162
|
+
v-if="!isLoading && !isLayout && model"></ct-tabletip>
|
|
163
163
|
<ct-tabletip ref="footer" class="ct-search-table-footer" :tip="model.footer"
|
|
164
|
-
|
|
164
|
+
v-if="!isLoading && !isLayout && model"></ct-tabletip>
|
|
165
165
|
<div ref="popupButton" v-if="flagPopupSearchlist"
|
|
166
|
-
|
|
167
|
-
<el-button size="mini" @click="popupClickHandler()" class="max-search-btn" style="float:right;" type="primary"
|
|
166
|
+
style="margin-top: 10px;width: 100%;display: inline-block;height: 30px;margin-bottom: 10px;">
|
|
167
|
+
<el-button size="mini" @click="popupClickHandler()" class="max-search-btn" style="float:right;" type="primary">
|
|
168
|
+
确认
|
|
168
169
|
</el-button>
|
|
169
170
|
</div>
|
|
170
171
|
<div v-if="isLoading && searchLoading" v-loading="isLoading" style="top: 30px"></div>
|
|
172
|
+
<iframe :src="downloadUrl" style="height:0px;width:0px">
|
|
173
|
+
</iframe>
|
|
171
174
|
</div>
|
|
172
175
|
</template>
|
|
173
176
|
<script>
|
|
@@ -246,6 +249,8 @@ export default {
|
|
|
246
249
|
trigger: "hover", //触发方式,传值可查看Popper UI组件trigger属性
|
|
247
250
|
placement: "right-start", //方向,传值可查看Popper UI组件placement属性
|
|
248
251
|
},
|
|
252
|
+
downloadUrl:""
|
|
253
|
+
|
|
249
254
|
};
|
|
250
255
|
},
|
|
251
256
|
activated() {
|
|
@@ -973,8 +978,12 @@ export default {
|
|
|
973
978
|
}
|
|
974
979
|
else {
|
|
975
980
|
if (field.action.indexOf("http://") === 0 || field.action.indexOf("https://") === 0) {
|
|
976
|
-
|
|
977
|
-
|
|
981
|
+
if (field.action.indexOf("?") > -1) {
|
|
982
|
+
self.downloadUrl = field.action + "&" + Math.random();
|
|
983
|
+
}
|
|
984
|
+
else {
|
|
985
|
+
self.downloadUrl = field.action + "?" + Math.random();
|
|
986
|
+
}
|
|
978
987
|
// document.body.addEventListener('click', function() {
|
|
979
988
|
// window.open(field.action, "_blank");
|
|
980
989
|
// });
|
|
@@ -983,8 +992,12 @@ export default {
|
|
|
983
992
|
field.doAction(submitData, (data) => {
|
|
984
993
|
if (data.content) {
|
|
985
994
|
if (data.content.indexOf("http://") === 0 || data.content.indexOf("https://") === 0) {
|
|
986
|
-
|
|
987
|
-
|
|
995
|
+
if (data.content.indexOf("?") > -1) {
|
|
996
|
+
self.downloadUrl = data.content + "&" + Math.random();
|
|
997
|
+
}
|
|
998
|
+
else {
|
|
999
|
+
self.downloadUrl = data.content + "?" + Math.random();
|
|
1000
|
+
}
|
|
988
1001
|
// document.body.addEventListener('click', function() {
|
|
989
1002
|
// window.open(data.content, "_blank");
|
|
990
1003
|
// });
|
|
@@ -67,6 +67,18 @@
|
|
|
67
67
|
},
|
|
68
68
|
methods: {
|
|
69
69
|
load(data) {
|
|
70
|
+
if(data.segmentValue && data.value){
|
|
71
|
+
let flagExists=false;
|
|
72
|
+
data.segmentValue.forEach((n) => {
|
|
73
|
+
if(n.code===data.value){
|
|
74
|
+
flagExists=true;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
if(!flagExists){
|
|
79
|
+
data.value='';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
70
82
|
this.model = data;
|
|
71
83
|
this.model.self = this;
|
|
72
84
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</el-menu>
|
|
33
33
|
</div>
|
|
34
34
|
</el-aside>
|
|
35
|
-
<el-main ref="displayArea">
|
|
35
|
+
<el-main ref="displayArea" v-loading="downloadLoading" element-loading-spinner="el-icon-loading" :element-loading-custom-class="'cloading'">
|
|
36
36
|
<div style="position: relative; width: 100%"
|
|
37
37
|
:style="{ height: displayAreaHeight - 78 + 'px' }"
|
|
38
38
|
v-if="resultObject">
|
|
@@ -141,17 +141,27 @@
|
|
|
141
141
|
@click="zoom(-0.2)">
|
|
142
142
|
</a>
|
|
143
143
|
</template>
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
<!--<a v-if="itemFile.rightDownload"
|
|
145
|
+
:href="getDownloadUrl(resultObject)" target="_blank"
|
|
146
|
+
class="magnify-btn el-icon-download"
|
|
147
|
+
title="下载"
|
|
148
|
+
:download="(itemFile.mediaLabelName || itemFile.fileName)"
|
|
149
|
+
@click="handDownload(resultObject)"
|
|
150
|
+
></a>-->
|
|
151
|
+
<a href="javascript:void(0)"
|
|
146
152
|
class="magnify-btn el-icon-download"
|
|
147
153
|
title="下载"
|
|
148
|
-
|
|
154
|
+
@click="handDownload(resultObject)"></a>
|
|
155
|
+
|
|
156
|
+
|
|
149
157
|
</div>
|
|
150
158
|
</div>
|
|
151
159
|
</template>
|
|
152
160
|
</div>
|
|
153
161
|
</el-main>
|
|
154
162
|
</el-container>
|
|
163
|
+
<iframe :src="downloadUrl" style="height:0px;width:0px">
|
|
164
|
+
</iframe>
|
|
155
165
|
</div>
|
|
156
166
|
</template>
|
|
157
167
|
|
|
@@ -188,6 +198,8 @@
|
|
|
188
198
|
displayAreabtm: 0,
|
|
189
199
|
displayArealeft: 0,
|
|
190
200
|
displayAreaHeight: 0,
|
|
201
|
+
downloadUrl: "",
|
|
202
|
+
downloadLoading: false
|
|
191
203
|
};
|
|
192
204
|
},
|
|
193
205
|
created() {
|
|
@@ -225,7 +237,7 @@
|
|
|
225
237
|
}
|
|
226
238
|
},
|
|
227
239
|
methods: {
|
|
228
|
-
|
|
240
|
+
getDownloadUrl(url) {
|
|
229
241
|
if (/\/viewer\//.test(url)) {
|
|
230
242
|
return url.replace(/\/viewer\//, '/download/');
|
|
231
243
|
}
|
|
@@ -236,6 +248,20 @@
|
|
|
236
248
|
return url;
|
|
237
249
|
}
|
|
238
250
|
},
|
|
251
|
+
handDownload(url) {
|
|
252
|
+
let self = this;
|
|
253
|
+
self.downloadLoading = true;
|
|
254
|
+
if (url.indexOf("?") > -1) {
|
|
255
|
+
self.downloadUrl = self.getDownloadUrl(url) + "&" + Math.random();
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
self.downloadUrl = self.getDownloadUrl(url) + "?" + Math.random();
|
|
259
|
+
}
|
|
260
|
+
setTimeout(function () {
|
|
261
|
+
self.downloadLoading = false;
|
|
262
|
+
}, 1000);
|
|
263
|
+
|
|
264
|
+
},
|
|
239
265
|
handleMouse(e) {
|
|
240
266
|
e.preventDefault();
|
|
241
267
|
},
|
|
@@ -448,4 +474,8 @@
|
|
|
448
474
|
.viewerMenu .el-submenu__title .el-submenu__icon-arrow {
|
|
449
475
|
display: inline-block;
|
|
450
476
|
}
|
|
477
|
+
.cloading {
|
|
478
|
+
font-size: 50px;
|
|
479
|
+
}
|
|
480
|
+
|
|
451
481
|
</style>
|
|
@@ -43,7 +43,7 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
43
43
|
if (!fileSourceList) {
|
|
44
44
|
return 0;
|
|
45
45
|
}
|
|
46
|
-
let fileList = fileSourceList.filter(item=>{
|
|
46
|
+
let fileList = fileSourceList.filter(item => {
|
|
47
47
|
return item.flagDeleted != true
|
|
48
48
|
})
|
|
49
49
|
return fileList.length;
|
|
@@ -62,7 +62,7 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
62
62
|
},
|
|
63
63
|
optionModel: {
|
|
64
64
|
options: [],
|
|
65
|
-
isInit:false,
|
|
65
|
+
isInit: false,
|
|
66
66
|
optionAttrs: {
|
|
67
67
|
value: 'code',
|
|
68
68
|
label: 'name'
|
|
@@ -71,7 +71,7 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
71
71
|
//简单分类
|
|
72
72
|
getOptions(callBack) {
|
|
73
73
|
var self = this;
|
|
74
|
-
if(!source.paramName1){
|
|
74
|
+
if (!source.paramName1) {
|
|
75
75
|
return false;
|
|
76
76
|
}
|
|
77
77
|
if (self.optionModel.isInit) {
|
|
@@ -114,7 +114,7 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
114
114
|
component: 'ct-form',
|
|
115
115
|
attrs: {
|
|
116
116
|
api: source.paramAction1,//source.xx
|
|
117
|
-
showTitle:false,
|
|
117
|
+
showTitle: false,
|
|
118
118
|
apiParam: file.mediaFormData,
|
|
119
119
|
width: router.pageWidth + 'px',
|
|
120
120
|
height: router.pageHeight + 'px',
|
|
@@ -181,7 +181,7 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
181
181
|
},
|
|
182
182
|
get flagDefault() {
|
|
183
183
|
return fileSource.flagDefault;
|
|
184
|
-
},
|
|
184
|
+
},
|
|
185
185
|
get rightDel() {
|
|
186
186
|
return fileSource.rightDel;
|
|
187
187
|
},
|
|
@@ -243,7 +243,7 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
243
243
|
Vue.set(file, "mediaUrl", data.mediaUrl);
|
|
244
244
|
Vue.set(file, "fileName", data.fileName);
|
|
245
245
|
Vue.set(file, "flagDefault", data.flagDefault);
|
|
246
|
-
Vue.set(file, "mediaTypeID", data.mediaTypeID);
|
|
246
|
+
Vue.set(file, "mediaTypeID", data.mediaTypeID);
|
|
247
247
|
Vue.set(file, "flagDeleted", data.flagDeleted);
|
|
248
248
|
Vue.set(file, "actionType", data.actionType);
|
|
249
249
|
Vue.set(file, "rightDel", data.rightDel);
|
|
@@ -260,17 +260,40 @@ const box = function (source, fileSourceList, router, optionApi) {
|
|
|
260
260
|
}
|
|
261
261
|
else {
|
|
262
262
|
for (let i = 0; i < fileList.length; i++) {
|
|
263
|
-
if (fileList[i].uid === file.uid) {
|
|
263
|
+
if (fileList[i].uid === file.uid) {
|
|
264
264
|
fileList.splice(i, 1);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
Vue.prototype.$message.error(res.rtnMsg);
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
|
+
addfileItem(file) {
|
|
271
|
+
let awaitfile = {
|
|
272
|
+
"url": "",
|
|
273
|
+
"source": {},
|
|
274
|
+
"mediaUrl": "",
|
|
275
|
+
"fileName": "",
|
|
276
|
+
"flagDefault": "",
|
|
277
|
+
"mediaTypeID": "",
|
|
278
|
+
"flagDeleted": "",
|
|
279
|
+
"actionType": "",
|
|
280
|
+
"rightDel": "",
|
|
281
|
+
"rightEdit": "",
|
|
282
|
+
"rightDownload": "",
|
|
283
|
+
"mediaLabelID": "",
|
|
284
|
+
"mediaLabelName": "",
|
|
285
|
+
"fileExtension": "",
|
|
286
|
+
"progressFlag": true,
|
|
287
|
+
"loadProgress": 0,
|
|
288
|
+
"uid": file.uid,
|
|
289
|
+
}
|
|
290
|
+
rtn.fileList.push(awaitfile);
|
|
291
|
+
},
|
|
292
|
+
|
|
270
293
|
setByPieces(res, Progress, file) {
|
|
271
294
|
if (res.rtnCode === Enum.ReturnCode.Successful) {
|
|
272
295
|
//下面的方式绑定,会有一些问题 todo 不强与页面关联
|
|
273
|
-
|
|
296
|
+
var data = {};
|
|
274
297
|
if (res.content.finished == 1) {
|
|
275
298
|
//下面的方式绑定,会有一些问题 todo 不强与页面关联
|
|
276
299
|
fileSourceList.push(res.content.media);
|
|
@@ -24,7 +24,7 @@ async function postFile(api, data, callback) {
|
|
|
24
24
|
|
|
25
25
|
//分片上传
|
|
26
26
|
const uploadByPieces = async (url, { file }, callback, uploadOptions) => {
|
|
27
|
-
var uploadData = { blockSize:
|
|
27
|
+
var uploadData = { blockSize: 1 * 218 * 1024, nextOffSet: 0 };
|
|
28
28
|
// 获取当前chunk数据
|
|
29
29
|
const getChunkInfo = (file, data) => {
|
|
30
30
|
let start = data.nextOffSet;
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
<el-progress type="circle" :percentage="percentage"></el-progress>
|
|
5
5
|
<span class="progressMsg">{{ message }}</span>
|
|
6
6
|
</div>
|
|
7
|
+
<iframe :src="downloadUrl" style="height:0px;width:0px">
|
|
8
|
+
</iframe>
|
|
7
9
|
</div>
|
|
8
10
|
</template>
|
|
9
11
|
<script>
|
|
@@ -23,6 +25,7 @@
|
|
|
23
25
|
message: '',
|
|
24
26
|
percentage: 0,
|
|
25
27
|
isDestroy: false,
|
|
28
|
+
downloadUrl:"",
|
|
26
29
|
};
|
|
27
30
|
},
|
|
28
31
|
methods: {
|
|
@@ -59,8 +62,12 @@
|
|
|
59
62
|
this.percentage = data.percentage;
|
|
60
63
|
if (data.flagFinished) {
|
|
61
64
|
if(this.progressType=='export' && data.content){
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
if (data.content.indexOf("?") > -1) {
|
|
66
|
+
self.downloadUrl = data.content + "&" + Math.random();
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
self.downloadUrl = data.content + "?" + Math.random();
|
|
70
|
+
}
|
|
64
71
|
// document.body.addEventListener('click', function() {
|
|
65
72
|
// window.open(data.content, "_blank");
|
|
66
73
|
// });
|
package/src/main.js
CHANGED
|
@@ -12,8 +12,8 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
12
12
|
// 关闭生产模式下给出的提示
|
|
13
13
|
Vue.config.productionTip = false;
|
|
14
14
|
Vue.use(centaline, {
|
|
15
|
-
|
|
16
|
-
baseUrl: "http://10.25.10.63:9999/v1/form/router",
|
|
15
|
+
baseUrl: "http://10.88.22.46:7070/v1/form/router",
|
|
16
|
+
// baseUrl: "http://10.25.10.63:9999/v1/form/router",
|
|
17
17
|
// baseUrl: "http://10.88.22.42:9999/v1/form/router",
|
|
18
18
|
// baseUrl: "http://10.88.22.39:8080/api/",
|
|
19
19
|
// baseUrl: "http://tjcptest.centaline.com.cn/",
|
|
@@ -42,8 +42,8 @@ Vue.use(centaline, {
|
|
|
42
42
|
// 获取请求头
|
|
43
43
|
getRequestHeaders: function () {
|
|
44
44
|
return {
|
|
45
|
-
oldToken: '
|
|
46
|
-
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.
|
|
45
|
+
oldToken: '20ad6f77-b0fc-4a65-9334-eda7a89c5bcf',
|
|
46
|
+
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjrEOgjAURf_lzbykr33ta9mk4OJHkFY64GQEEo3x39UIG7tnOMNZ7n3CtGSoQVZwRxt9WMEdbfREHIRch4cgEdmxQU_RY2QX-dh2JjYtVFDuV6jJOa-1khAqGNP8C2TYfMMyldupPP5x7jKPn1nDyXOygsPgM_JZGcyWFVrJJFmTI0nwegMAAP__.LBBnoVAIPdLFhGmg3hkcqPmaqN4LrF3HE6pvgDdFJRI',
|
|
47
47
|
|
|
48
48
|
originalRequestURL: 'http://10.88.22.67:8080',
|
|
49
49
|
EstateInfo: '{"estateId":"FAF029E8-EC28-4297-83CF-B8FFD826DB91","estateName":"AABBCC"}',
|