@smart100/spu-web-plugin 0.0.16 → 0.0.18
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/dist/spu-web-plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var version = "0.0.
|
|
1
|
+
var version = "0.0.18";
|
|
2
2
|
|
|
3
3
|
function _iterableToArrayLimit(r, l) {
|
|
4
4
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -14394,6 +14394,7 @@ var initApaasSpuTrack = function initApaasSpuTrack() {
|
|
|
14394
14394
|
}, 2500);
|
|
14395
14395
|
};
|
|
14396
14396
|
var apaasSpuTrackSendLog = function apaasSpuTrackSendLog(data) {
|
|
14397
|
+
var end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
14397
14398
|
if (window.apaasSpuTrack) {
|
|
14398
14399
|
var logtime = Date.now().toString();
|
|
14399
14400
|
var baselog = cloneDeep(_objectSpread2(_objectSpread2({}, window.apaasSpuTrack.baseLog), {}, {
|
|
@@ -14416,14 +14417,18 @@ var apaasSpuTrackSendLog = function apaasSpuTrackSendLog(data) {
|
|
|
14416
14417
|
}
|
|
14417
14418
|
}));
|
|
14418
14419
|
var mergedata = merge$2(baselog, data);
|
|
14419
|
-
console.log(mergedata)
|
|
14420
|
+
// console.log(mergedata)
|
|
14420
14421
|
// debugger
|
|
14421
14422
|
window.apaasSpuTrack.addLogToQueue(mergedata, true);
|
|
14422
14423
|
} else {
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14424
|
+
if (!end) {
|
|
14425
|
+
console.warn('window.apaasSpuTrack 不存在,导出日志延迟3秒后再次发送。');
|
|
14426
|
+
setTimeout(function () {
|
|
14427
|
+
apaasSpuTrackSendLog(data, true);
|
|
14428
|
+
}, 3000);
|
|
14429
|
+
} else {
|
|
14430
|
+
console.error('window.apaasSpuTrack 不存在,导出日志发送失败。');
|
|
14431
|
+
}
|
|
14427
14432
|
}
|
|
14428
14433
|
};
|
|
14429
14434
|
|
|
@@ -50007,7 +50012,7 @@ var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAA
|
|
|
50007
50012
|
|
|
50008
50013
|
// console.log(icon_csv)
|
|
50009
50014
|
var renderTemplate = (function (ele) {
|
|
50010
|
-
return "\n<style>\n:host {\n display: block;\n width: 100%;\n height: 100%;\n position: fixed;\n top: 0;\n left: 0px;\n right: 0px;\n bottom: 0px;\n z-index: 9000;\n}\n\n.hide {\n display: none!important;\n}\n\n.spu-expandexp {\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n overflow: auto;\n}\n\n\n.modal {\n width: 80%;\n max-width: 800px;\n min-width: 500px;\n margin: 50px auto 0;\n border-radius: 2px;\n overflow: hidden;\n}\n.modal-th {\n height: 40px;\n background-color: #409eff;\n}\n.modal-th .title {\n float: left;\n line-height: 40px;\n color: #fff;\n font-size: 16px;\n margin-left: 16px;\n}\n.modal-th .close {\n float: right;\n line-height: 40px;\n height: 40px;\n width: 40px;\n color: #fff;\n font-size: 16px;\n text-align: center;\n cursor: pointer;\n}\n.modal-tb {\n padding: 16px;\n background-color: #fff;\n}\n\n.export {}\n.export-wait {\n line-height: 32px;\n height: 32px;\n text-align: center;\n background-color: rgba(255, 73, 73, .1);\n color: #333;\n}\n.export-wait span {\n color: red;\n margin: 0 4px;\n}\n.export-tit {\n line-height: 32px;\n height: 32px;\n}\n\n.export-sel {\n margin-bottom: 12px;\n}\n.export-sel-title {\n margin-bottom: 12px;\n}\n.export-sel-con {\n display: flex;\n}\n.export-sel-con-item {\n display: flex;\n align-items: center;\n margin-right: 32px;\n cursor: pointer;\n}\n.export-sel-con-item label {\n font-size: 14px;\n font-weight: bold;\n cursor: pointer;\n}\n.export-sel-con-item input {\n cursor: pointer;\n margin: 4px;\n}\n\n.export-section-wrap {}\n.export-section {\n border: 1px solid #ddd;\n padding: 12px;\n}\n\n.export-file {\n height: 28px;\n line-height: 28px;\n display: flex;\n justify-content: space-between;\n // margin-bottom: 12px;\n}\n.export-file-l {\n flex: 1;\n display: flex;\n align-items: center;\n font-size: 14px;\n}\n.export-file-l-img {\n flex: none;\n display: block;\n height: 20px;\n width: 20px;\n margin-right: 4px;\n background-size: cover;\n background-position: center center;\n background-repeat: no-repeat;\n}\n.export-file-l-img.excel {\n background-image: url(".concat(img$3, ");\n}\n.export-file-l-img.csv {\n background-image: url(").concat(img$2, ");\n}\n.export-file-l-img.pdf {\n background-image: url(").concat(img$1, ");\n}\n.export-file-l-img.zip {\n background-image: url(").concat(img, ");\n}\n.export-file-l-filename {\n flex: 1;\n}\n.export-file-l-filesize {\n flex: none;\n}\n.export-file-r {\n display: flex;\n width:
|
|
50015
|
+
return "\n<style>\n:host {\n display: block;\n width: 100%;\n height: 100%;\n position: fixed;\n top: 0;\n left: 0px;\n right: 0px;\n bottom: 0px;\n z-index: 9000;\n}\n\n.hide {\n display: none!important;\n}\n\n.spu-expandexp {\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n overflow: auto;\n}\n\n\n.modal {\n width: 80%;\n max-width: 800px;\n min-width: 500px;\n margin: 50px auto 0;\n border-radius: 2px;\n overflow: hidden;\n}\n.modal-th {\n height: 40px;\n background-color: #409eff;\n}\n.modal-th .title {\n float: left;\n line-height: 40px;\n color: #fff;\n font-size: 16px;\n margin-left: 16px;\n}\n.modal-th .close {\n float: right;\n line-height: 40px;\n height: 40px;\n width: 40px;\n color: #fff;\n font-size: 16px;\n text-align: center;\n cursor: pointer;\n}\n.modal-tb {\n padding: 16px;\n background-color: #fff;\n}\n\n.export {}\n.export-wait {\n line-height: 32px;\n height: 32px;\n text-align: center;\n background-color: rgba(255, 73, 73, .1);\n color: #333;\n}\n.export-wait span {\n color: red;\n margin: 0 4px;\n}\n.export-tit {\n line-height: 32px;\n height: 32px;\n}\n\n.export-sel {\n margin-bottom: 12px;\n}\n.export-sel-title {\n margin-bottom: 12px;\n}\n.export-sel-con {\n display: flex;\n}\n.export-sel-con-item {\n display: flex;\n align-items: center;\n margin-right: 32px;\n cursor: pointer;\n}\n.export-sel-con-item label {\n font-size: 14px;\n font-weight: bold;\n cursor: pointer;\n}\n.export-sel-con-item input {\n cursor: pointer;\n margin: 4px;\n}\n\n.export-section-wrap {}\n.export-section {\n border: 1px solid #ddd;\n padding: 12px;\n}\n\n.export-file {\n height: 28px;\n line-height: 28px;\n display: flex;\n justify-content: space-between;\n // margin-bottom: 12px;\n}\n.export-file-l {\n flex: 1;\n display: flex;\n align-items: center;\n font-size: 14px;\n}\n.export-file-l-img {\n flex: none;\n display: block;\n height: 20px;\n width: 20px;\n margin-right: 4px;\n background-size: cover;\n background-position: center center;\n background-repeat: no-repeat;\n}\n.export-file-l-img.excel {\n background-image: url(".concat(img$3, ");\n}\n.export-file-l-img.csv {\n background-image: url(").concat(img$2, ");\n}\n.export-file-l-img.pdf {\n background-image: url(").concat(img$1, ");\n}\n.export-file-l-img.zip {\n background-image: url(").concat(img, ");\n}\n.export-file-l-filename {\n flex: 1;\n}\n.export-file-l-filesize {\n flex: none;\n}\n.export-file-r {\n display: flex;\n width: 90px;\n flex-direction: row-reverse;\n align-items: center;\n}\n.export-file-r-download {\n line-height: 26px;\n border-radius: 3px;\n background-color: #67c23a;\n border: 1px solid #67c23a;\n color: #fff;\n padding: 0 12px;\n font-size: 14px;\n cursor: pointer;\n}\n.export-file-r-download:hover {\n background: #85ce61;\n border-color: #85ce61;\n}\n.export-file-r-cancel {\n line-height: 20px;\n width: 20px;\n border-radius: 14px;\n color: #f56c6c;\n background: #fef0f0;\n border: 1px solid #fbc4c4;\n text-align: center;\n font-size: 14px;\n cursor: pointer;\n}\n.export-file-r-cancel:hover {\n background: #f56c6c;\n border-color: #f56c6c;\n color: #fff;\n}\n\n\n\n.export-progress {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 30px;\n}\n.export-progress-outer {\n flex: 1;\n height: 8px;\n background-color: #EBEEF5;\n overflow: hidden;\n position: relative;\n vertical-align: middle;\n}\n.export-progress-inner {\n animation-duration: 3s;\n height: 100%;\n width: 0;\n background-color: #417AE7;\n -webkit-transition: width .6s ease;\n transition: width .6s ease;\n}\n.export-progress-inner.error {\n background: red;\n}\n.export-progress-inner.success {\n background: #67C23A;\n}\n.export-progress-text {\n flex: none;\n width: 50px;\n font-size: 14px;\n line-height: 30px;\n text-align: right;\n}\n\n\n\n.export-result {\n height: 28px;\n line-height: 28px;\n text-align: right;\n font-size: 12px;\n padding: 0px 8px;\n}\n.export-result.error {\n background: #fdf1ef;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.export-result.success {\n background: #e5f7f3;\n}\n\n\n.export-tip {\n height: 28px;\n line-height: 28px;\n margin-top: 8px;\n font-size: 12px;\n text-align: right;\n color: #999;\n}\n\n.export-btnwrap {\n margin-top: 12px;\n display: flex;\n flex-direction: row-reverse;\n}\n.btn {\n line-height: 38px;\n line-height: 38px;\n border: 1px solid #409eff;\n background-color: #409eff;\n border-radius: 5px;\n color: #fff;\n padding: 0 20px;\n font-size: 16px;\n cursor: pointer;\n}\n.btn:hover {\n background: #66b1ff;\n border-color: #66b1ff;\n}\n</style>\n\n <div class=\"spu-expandexp\">\n <div class=\"modal\">\n <div class=\"modal-th\">\n <div class=\"title\">\n \u6570\u636E\u5BFC\u51FA\n </div>\n <div class=\"close\">\n x\n </div>\n </div>\n <div class=\"modal-tb\">\n <div class=\"export\">\n <div class=\"export-wait hide\">\n \u5BFC\u51FA\u7B49\u5F85\u961F\u5217\u4E2D\uFF1A\u8FD8\u6709<span></span>\u4F4D\uFF0C\u8BF7\u8010\u5FC3\u7A0D\u7B49...\n </div>\n\n <div class=\"export-sel hide\">\n <div class=\"export-sel-title\">\u8BF7\u9009\u62E9\u5BFC\u51FA\u5185\u5BB9</div>\n <div class=\"export-sel-con\"></div>\n </div>\n\n <div class=\"export-section-wrap hide\">\n <div class=\"export-tit\"></div>\n <div class=\"export-section\">\n <div class=\"export-file\">\n <div class=\"export-file-l\">\n <div class=\"export-file-l-img\"></div>\n <span class=\"export-file-l-filename\"></span>\n <span class=\"export-file-l-filesize\"></span>\n </div>\n <div class=\"export-file-r\">\n <div class=\"export-file-r-download hide\">\u4E0B\u8F7D</div>\n <div class=\"export-file-r-cancel hide\">x</div>\n </div>\n </div>\n\n <div class=\"export-progress\">\n <div class=\"export-progress-outer\">\n <div class=\"export-progress-inner\"></div>\n </div>\n <div class=\"export-progress-text\"></div>\n </div>\n\n <div class=\"export-result hide\"></div>\n\n <div class=\"export-tip hide\">\u60A8\u53EF\u4EE5\u968F\u65F6\u5173\u95ED\u8BE5\u5F39\u6846\uFF0C\u4E4B\u540E\u5728\u5BFC\u5165\u5BFC\u51FA\u5217\u8868\u4E2D\u67E5\u770B\u7ED3\u679C\u3002</div>\n </div>\n </div>\n\n <div class=\"export-btnwrap\">\n <div class=\"btn\">\u5BFC\u51FA</div>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n ");
|
|
50011
50016
|
});
|
|
50012
50017
|
|
|
50013
50018
|
var Step = /*#__PURE__*/function () {
|
|
@@ -50440,14 +50445,9 @@ var SpuExpandexp = /*#__PURE__*/function (_HTMLElement) {
|
|
|
50440
50445
|
}
|
|
50441
50446
|
}
|
|
50442
50447
|
});
|
|
50443
|
-
|
|
50448
|
+
this.sendLog({
|
|
50444
50449
|
types: 'exportopenmodal',
|
|
50445
|
-
event: 'exportopenmodal'
|
|
50446
|
-
properties: {
|
|
50447
|
-
formtype: 'spu',
|
|
50448
|
-
exporttype: this.data.expandStatus,
|
|
50449
|
-
pagecode: this.props.pagecode
|
|
50450
|
-
}
|
|
50450
|
+
event: 'exportopenmodal'
|
|
50451
50451
|
});
|
|
50452
50452
|
} else {
|
|
50453
50453
|
apaasAxios.post('/api/expandexp/global/searchExpGloConfig', {
|
|
@@ -50469,14 +50469,9 @@ var SpuExpandexp = /*#__PURE__*/function (_HTMLElement) {
|
|
|
50469
50469
|
_this5.data.expandStatus = '1';
|
|
50470
50470
|
})["finally"](function () {
|
|
50471
50471
|
// 发送日志
|
|
50472
|
-
|
|
50472
|
+
_this5.sendLog({
|
|
50473
50473
|
types: 'exportopenmodal',
|
|
50474
|
-
event: 'exportopenmodal'
|
|
50475
|
-
properties: {
|
|
50476
|
-
formtype: 'spu',
|
|
50477
|
-
exporttype: _this5.data.expandStatus,
|
|
50478
|
-
pagecode: _this5.props.pagecode
|
|
50479
|
-
}
|
|
50474
|
+
event: 'exportopenmodal'
|
|
50480
50475
|
});
|
|
50481
50476
|
if (_this5.data.expandStatus === '1') {
|
|
50482
50477
|
_this5.data.exportcontentArray = ['excel'];
|
|
@@ -50594,13 +50589,10 @@ var SpuExpandexp = /*#__PURE__*/function (_HTMLElement) {
|
|
|
50594
50589
|
_this6.data.resultMessage = '网络连接错误';
|
|
50595
50590
|
_this6.stopInterval();
|
|
50596
50591
|
});
|
|
50597
|
-
|
|
50592
|
+
this.sendLog({
|
|
50598
50593
|
types: 'exportclickbutton',
|
|
50599
50594
|
event: 'exportclickbutton',
|
|
50600
50595
|
properties: {
|
|
50601
|
-
formtype: 'spu',
|
|
50602
|
-
exporttype: this.data.expandStatus,
|
|
50603
|
-
pagecode: this.props.pagecode,
|
|
50604
50596
|
bizdata: {
|
|
50605
50597
|
exportapi: this.props.exportapi,
|
|
50606
50598
|
params: finallyPost
|
|
@@ -50641,13 +50633,11 @@ var SpuExpandexp = /*#__PURE__*/function (_HTMLElement) {
|
|
|
50641
50633
|
filename: exportFileName
|
|
50642
50634
|
};
|
|
50643
50635
|
downloadService.downloadFile(params);
|
|
50644
|
-
|
|
50636
|
+
// 发送日志
|
|
50637
|
+
this.sendLog({
|
|
50645
50638
|
types: 'exportdownloadfile',
|
|
50646
50639
|
event: 'exportdownloadfile',
|
|
50647
50640
|
properties: {
|
|
50648
|
-
formtype: 'spu',
|
|
50649
|
-
exporttype: this.data.expandStatus,
|
|
50650
|
-
pagecode: this.props.pagecode,
|
|
50651
50641
|
bizdata: {
|
|
50652
50642
|
params: params
|
|
50653
50643
|
}
|
|
@@ -50788,20 +50778,19 @@ var SpuExpandexp = /*#__PURE__*/function (_HTMLElement) {
|
|
|
50788
50778
|
// this.stopInterval()
|
|
50789
50779
|
} else if (currentData.exportstate === 'ext_readyrun') {
|
|
50790
50780
|
_this8.updateStep('ext_readyrun');
|
|
50791
|
-
|
|
50792
|
-
_this8.data.percentage = +currentData.finishRate * 0.5 + 50;
|
|
50793
|
-
}
|
|
50781
|
+
currentData && (_this8.data.percentage = +currentData.finishRate * 0.5 + 50);
|
|
50794
50782
|
} else if (currentData.exportstate === 'ext_running') {
|
|
50795
50783
|
_this8.updateStep('ext_running');
|
|
50796
|
-
|
|
50797
|
-
if (currentData) {
|
|
50798
|
-
_this8.data.percentage = +currentData.finishRate * 0.5 + 50;
|
|
50799
|
-
}
|
|
50784
|
+
currentData && (_this8.data.percentage = +currentData.finishRate * 0.5 + 50);
|
|
50800
50785
|
} else {
|
|
50801
50786
|
_this8.updateStep('running');
|
|
50802
50787
|
if (currentData) {
|
|
50803
|
-
|
|
50804
|
-
|
|
50788
|
+
// this.data.percentage = +currentData.finishRate
|
|
50789
|
+
if (_this8.data.expandStatus === '1') {
|
|
50790
|
+
_this8.data.percentage = +currentData.finishRate;
|
|
50791
|
+
} else {
|
|
50792
|
+
_this8.data.percentage = +currentData.finishRate * 0.5;
|
|
50793
|
+
}
|
|
50805
50794
|
}
|
|
50806
50795
|
}
|
|
50807
50796
|
})["catch"](function (err) {
|
|
@@ -50832,6 +50821,19 @@ var SpuExpandexp = /*#__PURE__*/function (_HTMLElement) {
|
|
|
50832
50821
|
this.statusTimer = null;
|
|
50833
50822
|
}
|
|
50834
50823
|
}
|
|
50824
|
+
}, {
|
|
50825
|
+
key: "sendLog",
|
|
50826
|
+
value: function sendLog(data) {
|
|
50827
|
+
apaasSpuTrackSendLog(merge$2({
|
|
50828
|
+
// types: 'exportdownloadfile',
|
|
50829
|
+
// event: 'exportdownloadfile',
|
|
50830
|
+
properties: {
|
|
50831
|
+
formtype: 'spu',
|
|
50832
|
+
exporttype: this.data.expandStatus,
|
|
50833
|
+
pagecode: this.props.pagecode
|
|
50834
|
+
}
|
|
50835
|
+
}, data));
|
|
50836
|
+
}
|
|
50835
50837
|
}, {
|
|
50836
50838
|
key: "removeSelf",
|
|
50837
50839
|
value: function removeSelf() {
|
package/package.json
CHANGED
package/src/apaasSpuTrack.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { globalOptions } from './install'
|
|
2
|
-
import { cloneDeep, merge
|
|
2
|
+
import { cloneDeep, merge } from 'lodash-es'
|
|
3
3
|
import ApaasSpuTrack from './package/apaas-track/apaas-spu/index.umd.js'
|
|
4
4
|
import login from './login'
|
|
5
5
|
|
|
@@ -149,7 +149,7 @@ const initApaasSpuTrack = () => {
|
|
|
149
149
|
}, 2500)
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
const apaasSpuTrackSendLog = (data: any, end = false) => {
|
|
152
|
+
const apaasSpuTrackSendLog = (data: any, end: boolean = false) => {
|
|
153
153
|
if (window.apaasSpuTrack) {
|
|
154
154
|
const logtime = Date.now().toString()
|
|
155
155
|
const baselog = cloneDeep({
|
|
@@ -173,14 +173,18 @@ const apaasSpuTrackSendLog = (data: any, end = false) => {
|
|
|
173
173
|
}
|
|
174
174
|
})
|
|
175
175
|
const mergedata = merge(baselog, data)
|
|
176
|
-
console.log(mergedata)
|
|
176
|
+
// console.log(mergedata)
|
|
177
177
|
// debugger
|
|
178
178
|
window.apaasSpuTrack.addLogToQueue(mergedata, true)
|
|
179
179
|
} else {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
if (!end) {
|
|
181
|
+
console.warn('window.apaasSpuTrack 不存在,导出日志延迟3秒后再次发送。')
|
|
182
|
+
setTimeout(() => {
|
|
183
|
+
apaasSpuTrackSendLog(data, true)
|
|
184
|
+
}, 3000)
|
|
185
|
+
} else {
|
|
186
|
+
console.error('window.apaasSpuTrack 不存在,导出日志发送失败。')
|
|
187
|
+
}
|
|
184
188
|
}
|
|
185
189
|
}
|
|
186
190
|
|
|
@@ -341,14 +341,9 @@ export default class SpuExpandexp extends HTMLElement {
|
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
})
|
|
344
|
-
|
|
344
|
+
this.sendLog({
|
|
345
345
|
types: 'exportopenmodal',
|
|
346
|
-
event: 'exportopenmodal'
|
|
347
|
-
properties: {
|
|
348
|
-
formtype: 'spu',
|
|
349
|
-
exporttype: this.data.expandStatus,
|
|
350
|
-
pagecode: this.props.pagecode
|
|
351
|
-
}
|
|
346
|
+
event: 'exportopenmodal'
|
|
352
347
|
})
|
|
353
348
|
} else {
|
|
354
349
|
apaasAxios
|
|
@@ -372,14 +367,9 @@ export default class SpuExpandexp extends HTMLElement {
|
|
|
372
367
|
this.data.expandStatus = '1'
|
|
373
368
|
}).finally(() => {
|
|
374
369
|
// 发送日志
|
|
375
|
-
|
|
370
|
+
this.sendLog({
|
|
376
371
|
types: 'exportopenmodal',
|
|
377
|
-
event: 'exportopenmodal'
|
|
378
|
-
properties: {
|
|
379
|
-
formtype: 'spu',
|
|
380
|
-
exporttype: this.data.expandStatus,
|
|
381
|
-
pagecode: this.props.pagecode
|
|
382
|
-
}
|
|
372
|
+
event: 'exportopenmodal'
|
|
383
373
|
})
|
|
384
374
|
|
|
385
375
|
if (this.data.expandStatus === '1') {
|
|
@@ -489,13 +479,10 @@ export default class SpuExpandexp extends HTMLElement {
|
|
|
489
479
|
this.stopInterval()
|
|
490
480
|
})
|
|
491
481
|
|
|
492
|
-
|
|
482
|
+
this.sendLog({
|
|
493
483
|
types: 'exportclickbutton',
|
|
494
484
|
event: 'exportclickbutton',
|
|
495
485
|
properties: {
|
|
496
|
-
formtype: 'spu',
|
|
497
|
-
exporttype: this.data.expandStatus,
|
|
498
|
-
pagecode: this.props.pagecode,
|
|
499
486
|
bizdata: {
|
|
500
487
|
exportapi: this.props.exportapi,
|
|
501
488
|
params: finallyPost
|
|
@@ -530,13 +517,11 @@ export default class SpuExpandexp extends HTMLElement {
|
|
|
530
517
|
|
|
531
518
|
downloadService.downloadFile(params as any)
|
|
532
519
|
|
|
533
|
-
|
|
520
|
+
// 发送日志
|
|
521
|
+
this.sendLog({
|
|
534
522
|
types: 'exportdownloadfile',
|
|
535
523
|
event: 'exportdownloadfile',
|
|
536
524
|
properties: {
|
|
537
|
-
formtype: 'spu',
|
|
538
|
-
exporttype: this.data.expandStatus,
|
|
539
|
-
pagecode: this.props.pagecode,
|
|
540
525
|
bizdata: {
|
|
541
526
|
params: params
|
|
542
527
|
}
|
|
@@ -663,20 +648,19 @@ export default class SpuExpandexp extends HTMLElement {
|
|
|
663
648
|
// this.stopInterval()
|
|
664
649
|
} else if (currentData.exportstate === 'ext_readyrun') {
|
|
665
650
|
this.updateStep('ext_readyrun')
|
|
666
|
-
|
|
667
|
-
this.data.percentage = +currentData.finishRate * 0.5 + 50
|
|
668
|
-
}
|
|
651
|
+
currentData && (this.data.percentage = +currentData.finishRate * 0.5 + 50)
|
|
669
652
|
} else if (currentData.exportstate === 'ext_running') {
|
|
670
653
|
this.updateStep('ext_running')
|
|
671
|
-
|
|
672
|
-
if (currentData) {
|
|
673
|
-
this.data.percentage = +currentData.finishRate * 0.5 + 50
|
|
674
|
-
}
|
|
654
|
+
currentData && (this.data.percentage = +currentData.finishRate * 0.5 + 50)
|
|
675
655
|
} else {
|
|
676
656
|
this.updateStep('running')
|
|
677
657
|
if (currentData) {
|
|
678
|
-
this.data.percentage = +currentData.finishRate
|
|
679
|
-
|
|
658
|
+
// this.data.percentage = +currentData.finishRate
|
|
659
|
+
if (this.data.expandStatus === '1') {
|
|
660
|
+
this.data.percentage = +currentData.finishRate
|
|
661
|
+
} else {
|
|
662
|
+
this.data.percentage = +currentData.finishRate * 0.5
|
|
663
|
+
}
|
|
680
664
|
}
|
|
681
665
|
}
|
|
682
666
|
})
|
|
@@ -698,6 +682,18 @@ export default class SpuExpandexp extends HTMLElement {
|
|
|
698
682
|
}
|
|
699
683
|
}
|
|
700
684
|
|
|
685
|
+
sendLog (data: any) {
|
|
686
|
+
apaasSpuTrackSendLog(merge({
|
|
687
|
+
// types: 'exportdownloadfile',
|
|
688
|
+
// event: 'exportdownloadfile',
|
|
689
|
+
properties: {
|
|
690
|
+
formtype: 'spu',
|
|
691
|
+
exporttype: this.data.expandStatus,
|
|
692
|
+
pagecode: this.props.pagecode
|
|
693
|
+
}
|
|
694
|
+
}, data))
|
|
695
|
+
}
|
|
696
|
+
|
|
701
697
|
removeSelf () {
|
|
702
698
|
this.parentNode!.removeChild(this)
|
|
703
699
|
}
|
|
@@ -159,8 +159,9 @@ export default (ele: SpuExpandexp) => {
|
|
|
159
159
|
}
|
|
160
160
|
.export-file-r {
|
|
161
161
|
display: flex;
|
|
162
|
-
width:
|
|
162
|
+
width: 90px;
|
|
163
163
|
flex-direction: row-reverse;
|
|
164
|
+
align-items: center;
|
|
164
165
|
}
|
|
165
166
|
.export-file-r-download {
|
|
166
167
|
line-height: 26px;
|
|
@@ -177,8 +178,8 @@ export default (ele: SpuExpandexp) => {
|
|
|
177
178
|
border-color: #85ce61;
|
|
178
179
|
}
|
|
179
180
|
.export-file-r-cancel {
|
|
180
|
-
line-height:
|
|
181
|
-
width:
|
|
181
|
+
line-height: 20px;
|
|
182
|
+
width: 20px;
|
|
182
183
|
border-radius: 14px;
|
|
183
184
|
color: #f56c6c;
|
|
184
185
|
background: #fef0f0;
|