hbte-saas-ui 1.8.10 → 1.8.12
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/lib/hbte-ui.common.js +352 -85
- package/lib/hbte-ui.css +1 -1
- package/lib/hbte-ui.umd.js +352 -85
- package/lib/hbte-ui.umd.min.js +6 -6
- package/package.json +1 -1
package/lib/hbte-ui.common.js
CHANGED
|
@@ -1247,17 +1247,6 @@ _src_main_vue__WEBPACK_IMPORTED_MODULE_0__["default"].config = function (params)
|
|
|
1247
1247
|
};
|
|
1248
1248
|
/* harmony default export */ __webpack_exports__["default"] = (_src_main_vue__WEBPACK_IMPORTED_MODULE_0__["default"]);
|
|
1249
1249
|
|
|
1250
|
-
/***/ }),
|
|
1251
|
-
|
|
1252
|
-
/***/ "2070":
|
|
1253
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1254
|
-
|
|
1255
|
-
"use strict";
|
|
1256
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_2c521d9c_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("695d");
|
|
1257
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_2c521d9c_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_2c521d9c_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
|
|
1258
|
-
/* unused harmony reexport * */
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
1250
|
/***/ }),
|
|
1262
1251
|
|
|
1263
1252
|
/***/ "2266":
|
|
@@ -19477,6 +19466,17 @@ module.exports = getPrototype;
|
|
|
19477
19466
|
|
|
19478
19467
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"), __webpack_require__("62e4")(module)))
|
|
19479
19468
|
|
|
19469
|
+
/***/ }),
|
|
19470
|
+
|
|
19471
|
+
/***/ "2f12":
|
|
19472
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
19473
|
+
|
|
19474
|
+
"use strict";
|
|
19475
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_1b14089e_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6207");
|
|
19476
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_1b14089e_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_1b14089e_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
|
|
19477
|
+
/* unused harmony reexport * */
|
|
19478
|
+
|
|
19479
|
+
|
|
19480
19480
|
/***/ }),
|
|
19481
19481
|
|
|
19482
19482
|
/***/ "2f62":
|
|
@@ -24652,6 +24652,13 @@ var nativeCreate = getNative(Object, 'create');
|
|
|
24652
24652
|
module.exports = nativeCreate;
|
|
24653
24653
|
|
|
24654
24654
|
|
|
24655
|
+
/***/ }),
|
|
24656
|
+
|
|
24657
|
+
/***/ "6207":
|
|
24658
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
24659
|
+
|
|
24660
|
+
// extracted by mini-css-extract-plugin
|
|
24661
|
+
|
|
24655
24662
|
/***/ }),
|
|
24656
24663
|
|
|
24657
24664
|
/***/ "62e4":
|
|
@@ -24963,13 +24970,6 @@ module.exports = function isSubsetOf(other) {
|
|
|
24963
24970
|
};
|
|
24964
24971
|
|
|
24965
24972
|
|
|
24966
|
-
/***/ }),
|
|
24967
|
-
|
|
24968
|
-
/***/ "695d":
|
|
24969
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
24970
|
-
|
|
24971
|
-
// extracted by mini-css-extract-plugin
|
|
24972
|
-
|
|
24973
24973
|
/***/ }),
|
|
24974
24974
|
|
|
24975
24975
|
/***/ "6964":
|
|
@@ -43661,12 +43661,12 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
|
43661
43661
|
// ESM COMPAT FLAG
|
|
43662
43662
|
__webpack_require__.r(__webpack_exports__);
|
|
43663
43663
|
|
|
43664
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3c7c6be7-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=
|
|
43665
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{key:_vm.key,staticClass:"hb-upload"},[_c('div',{directives:[{name:"layout-flex",rawName:"v-layout-flex",value:({ gutter: 20, maxWidth: 280 }),expression:"{ gutter: 20, maxWidth: 280 }"}],staticClass:"hb-upload-wrapper"},[_vm._l((_vm.list),function(item,index){return _c('div',{key:index,staticClass:"unit-item-wrapper"},[_c('div',{staticClass:"file unit-item",on:{"click":function($event){return _vm.viewFile(item)}}},[_c('HbSvg',{attrs:{"iconClass":_vm._f("fileIcon")(true,_vm.getSuffix(item.fileName)),"fontSize":"44px"}}),_c('div',{staticClass:"right"},[_c('div',{staticClass:"title"},[_vm._v(" "+_vm._s(item.fileName)+" ")]),_c('div',{staticClass:"info"},[_c('div',{staticClass:"time"},[_vm._v(_vm._s(item.createTime))]),_c('div',{staticClass:"icon"},[(_vm.showCover)?_c('i',{staticClass:"icon-main-huanyuan mr10",on:{"click":function($event){$event.stopPropagation();return _vm.openCover(index)}}}):_vm._e(),(_vm.showDownLoad(item))?_c('i',{staticClass:"icon-main-xiazai mr10",on:{"click":function($event){$event.stopPropagation();return _vm.downloadFile(item)}}}):_vm._e(),(_vm.showRemove)?_c('i',{staticClass:"icon-main-shanchu",on:{"click":function($event){$event.stopPropagation();return _vm.remove(index, item.fileName)}}}):_vm._e()])])])],1),_vm._t("default",null,{"fileData":item})],2)}),(_vm.editAble)?_c('div',{staticClass:"upload unit-item"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.netDisc),expression:"netDisc"}],staticClass:"netdisc",on:{"click":_vm.openNetDisc}},[_vm._v("选择网盘地址")]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.link),expression:"link"}],staticClass:"link",on:{"click":_vm.openLink}},[_vm._v("自定义链接")]),_c('div',{staticClass:"local-file",on:{"click":_vm.openFile}},[_c('i',{staticClass:"el-icon-plus"}),_vm._v(" 上传附件 "),_c('input',{ref:"input",staticClass:"hidden",attrs:{"type":"file","multiple":""},on:{"change":_vm.chooseFile}})]),(_vm.maxUpload)?_c('div',{staticClass:"maxUploadShow"},[_vm._v(_vm._s(_vm.list.length)+" / "+_vm._s(_vm.maxUpload))]):_vm._e()]):_vm._e(),_c('input',{ref:"coverInput",staticClass:"hidden",attrs:{"type":"file"},on:{"change":function (ev) { return _vm.coverFile(ev); }}})],2),_c('NetDisc',{ref:"netDisc",on:{"submit":_vm.addNet}}),_c('CustomLink',{ref:"customLink",on:{"submit":_vm.addLink}})],1)}
|
|
43664
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3c7c6be7-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=1b14089e
|
|
43665
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{key:_vm.key,staticClass:"hb-upload"},[_c('div',{directives:[{name:"layout-flex",rawName:"v-layout-flex",value:({ gutter: 20, maxWidth: 280 }),expression:"{ gutter: 20, maxWidth: 280 }"}],staticClass:"hb-upload-wrapper"},[_vm._l((_vm.list),function(item,index){return _c('div',{key:String(item.fileUrl || item.id) + index,staticClass:"unit-item-wrapper"},[_c('div',{staticClass:"file unit-item",on:{"click":function($event){return _vm.viewFile(item)}}},[_c('HbSvg',{attrs:{"iconClass":_vm._f("fileIcon")(true,_vm.getSuffix(item.fileName)),"fontSize":"44px"}}),_c('div',{staticClass:"right"},[_c('div',{staticClass:"title"},[_vm._v(" "+_vm._s(item.fileName)+" ")]),_c('div',{staticClass:"info"},[_c('div',{staticClass:"time"},[_vm._v(_vm._s(item.createTime))]),_c('div',{staticClass:"icon"},[(_vm.showCover)?_c('i',{staticClass:"icon-main-huanyuan mr10",on:{"click":function($event){$event.stopPropagation();return _vm.openCover(index)}}}):_vm._e(),(_vm.showDownLoad(item))?_c('i',{staticClass:"icon-main-xiazai mr10",on:{"click":function($event){$event.stopPropagation();return _vm.downloadFile(item)}}}):_vm._e(),(_vm.showRemove)?_c('i',{staticClass:"icon-main-shanchu",on:{"click":function($event){$event.stopPropagation();return _vm.remove(index, item.fileName)}}}):_vm._e()])])])],1),_vm._t("default",null,{"fileData":item})],2)}),_vm._l((_vm.uploadingList),function(item,index){return _c('div',{key:'uploading-' + index,staticClass:"unit-item-wrapper"},[_c('div',{staticClass:"file unit-item"},[_c('HbSvg',{attrs:{"iconClass":_vm._f("fileIcon")(true,_vm.getSuffix(item.fileName)),"fontSize":"44px"}}),_c('div',{staticClass:"right",staticStyle:{"flex-direction":"row","align-items":"center"}},[_c('div',{staticStyle:{"flex":"1","overflow":"hidden","margin-right":"10px"}},[_c('div',{staticClass:"title"},[_vm._v(_vm._s(item.fileName))]),_c('div',{staticClass:"info"},[_vm._v(" "+_vm._s(item.status === "transmitSuccess" ? "处理中..." : "上传中...")+" ")])]),_c('div',{staticClass:"progress-wrapper"},[_c('el-progress',{attrs:{"type":"circle","percentage":Math.floor(item.progress * 100),"width":50,"stroke-width":4}}),(item.status === 'padding' || item.status === 'inline')?_c('i',{staticClass:"el-icon-close cancel-btn",on:{"click":function($event){$event.stopPropagation();return _vm.cancelUpload(item)}}}):_vm._e()],1)])],1)])}),(_vm.editAble)?_c('div',{staticClass:"upload unit-item"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.netDisc),expression:"netDisc"}],staticClass:"netdisc",on:{"click":_vm.openNetDisc}},[_vm._v(" 选择网盘地址 ")]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.link),expression:"link"}],staticClass:"link",on:{"click":_vm.openLink}},[_vm._v("自定义链接")]),_c('div',{staticClass:"local-file",on:{"click":_vm.openFile}},[_c('i',{staticClass:"el-icon-plus"}),_vm._v(" 上传附件 "),_c('input',{ref:"input",staticClass:"hidden",attrs:{"type":"file","multiple":""},on:{"change":_vm.chooseFile}})]),(_vm.maxUpload)?_c('div',{staticClass:"maxUploadShow"},[_vm._v(" "+_vm._s(_vm.list.length)+" / "+_vm._s(_vm.maxUpload)+" ")]):_vm._e()]):_vm._e(),_c('input',{ref:"coverInput",staticClass:"hidden",attrs:{"type":"file"},on:{"change":function (ev) { return _vm.coverFile(ev); }}})],2),_c('NetDisc',{ref:"netDisc",on:{"submit":_vm.addNet}}),_c('CustomLink',{ref:"customLink",on:{"submit":_vm.addLink}})],1)}
|
|
43666
43666
|
var staticRenderFns = []
|
|
43667
43667
|
|
|
43668
43668
|
|
|
43669
|
-
// CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=
|
|
43669
|
+
// CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=1b14089e
|
|
43670
43670
|
|
|
43671
43671
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
43672
43672
|
var es_array_push = __webpack_require__("14d9");
|
|
@@ -43674,6 +43674,9 @@ var es_array_push = __webpack_require__("14d9");
|
|
|
43674
43674
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
43675
43675
|
var es_iterator_constructor = __webpack_require__("e9f5");
|
|
43676
43676
|
|
|
43677
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.find.js
|
|
43678
|
+
var es_iterator_find = __webpack_require__("f665");
|
|
43679
|
+
|
|
43677
43680
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
|
|
43678
43681
|
var es_iterator_for_each = __webpack_require__("7d54");
|
|
43679
43682
|
|
|
@@ -43912,12 +43915,12 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
43912
43915
|
)
|
|
43913
43916
|
|
|
43914
43917
|
/* harmony default export */ var NetDisc = (component.exports);
|
|
43915
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3c7c6be7-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/component/CustomLink.vue?vue&type=template&id=
|
|
43916
|
-
var
|
|
43917
|
-
var
|
|
43918
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3c7c6be7-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/component/CustomLink.vue?vue&type=template&id=16ec7968
|
|
43919
|
+
var CustomLinkvue_type_template_id_16ec7968_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('hb-dialog',{ref:"dialog",attrs:{"width":"480px","title":"添加自定义链接","formData":_vm.formData,"rules":_vm.rules,"append-to-body":true,"destroy-on-close":true},on:{"submit":_vm.submit,"closed":_vm.clear},scopedSlots:_vm._u([{key:"form",fn:function(){return [_c('el-form-item',{attrs:{"label":"文件名","prop":"fileName"}},[_c('el-input',{attrs:{"maxlength":"50"},model:{value:(_vm.formData.fileName),callback:function ($$v) {_vm.$set(_vm.formData, "fileName", $$v)},expression:"formData.fileName"}})],1),_c('el-form-item',{attrs:{"label":"链接","prop":"fileUrl"}},[_c('el-input',{attrs:{"maxlength":"200"},model:{value:(_vm.formData.fileUrl),callback:function ($$v) {_vm.$set(_vm.formData, "fileUrl", $$v)},expression:"formData.fileUrl"}})],1)]},proxy:true}])})}
|
|
43920
|
+
var CustomLinkvue_type_template_id_16ec7968_staticRenderFns = []
|
|
43918
43921
|
|
|
43919
43922
|
|
|
43920
|
-
// CONCATENATED MODULE: ./packages/upload/src/component/CustomLink.vue?vue&type=template&id=
|
|
43923
|
+
// CONCATENATED MODULE: ./packages/upload/src/component/CustomLink.vue?vue&type=template&id=16ec7968
|
|
43921
43924
|
|
|
43922
43925
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/component/CustomLink.vue?vue&type=script&lang=js
|
|
43923
43926
|
//
|
|
@@ -43971,9 +43974,9 @@ var CustomLinkvue_type_template_id_01816d01_staticRenderFns = []
|
|
|
43971
43974
|
this.$refs.dialog.clearValidate();
|
|
43972
43975
|
},
|
|
43973
43976
|
submit() {
|
|
43974
|
-
this.formData.fileUrl;
|
|
43975
43977
|
this.$emit("submit", {
|
|
43976
|
-
...this.formData
|
|
43978
|
+
...this.formData,
|
|
43979
|
+
onlineUrl: this.formData.fileUrl
|
|
43977
43980
|
});
|
|
43978
43981
|
this.$refs.dialog.close();
|
|
43979
43982
|
},
|
|
@@ -43998,8 +44001,8 @@ var CustomLinkvue_type_template_id_01816d01_staticRenderFns = []
|
|
|
43998
44001
|
|
|
43999
44002
|
var CustomLink_component = Object(componentNormalizer["a" /* default */])(
|
|
44000
44003
|
component_CustomLinkvue_type_script_lang_js,
|
|
44001
|
-
|
|
44002
|
-
|
|
44004
|
+
CustomLinkvue_type_template_id_16ec7968_render,
|
|
44005
|
+
CustomLinkvue_type_template_id_16ec7968_staticRenderFns,
|
|
44003
44006
|
false,
|
|
44004
44007
|
null,
|
|
44005
44008
|
null,
|
|
@@ -44016,6 +44019,56 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
|
|
|
44016
44019
|
|
|
44017
44020
|
|
|
44018
44021
|
|
|
44022
|
+
|
|
44023
|
+
//
|
|
44024
|
+
//
|
|
44025
|
+
//
|
|
44026
|
+
//
|
|
44027
|
+
//
|
|
44028
|
+
//
|
|
44029
|
+
//
|
|
44030
|
+
//
|
|
44031
|
+
//
|
|
44032
|
+
//
|
|
44033
|
+
//
|
|
44034
|
+
//
|
|
44035
|
+
//
|
|
44036
|
+
//
|
|
44037
|
+
//
|
|
44038
|
+
//
|
|
44039
|
+
//
|
|
44040
|
+
//
|
|
44041
|
+
//
|
|
44042
|
+
//
|
|
44043
|
+
//
|
|
44044
|
+
//
|
|
44045
|
+
//
|
|
44046
|
+
//
|
|
44047
|
+
//
|
|
44048
|
+
//
|
|
44049
|
+
//
|
|
44050
|
+
//
|
|
44051
|
+
//
|
|
44052
|
+
//
|
|
44053
|
+
//
|
|
44054
|
+
//
|
|
44055
|
+
//
|
|
44056
|
+
//
|
|
44057
|
+
//
|
|
44058
|
+
//
|
|
44059
|
+
//
|
|
44060
|
+
//
|
|
44061
|
+
//
|
|
44062
|
+
//
|
|
44063
|
+
//
|
|
44064
|
+
//
|
|
44065
|
+
//
|
|
44066
|
+
//
|
|
44067
|
+
//
|
|
44068
|
+
//
|
|
44069
|
+
//
|
|
44070
|
+
//
|
|
44071
|
+
//
|
|
44019
44072
|
//
|
|
44020
44073
|
//
|
|
44021
44074
|
//
|
|
@@ -44066,16 +44119,47 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
|
|
|
44066
44119
|
//
|
|
44067
44120
|
//
|
|
44068
44121
|
//
|
|
44122
|
+
//
|
|
44123
|
+
//
|
|
44124
|
+
//
|
|
44125
|
+
//
|
|
44126
|
+
//
|
|
44127
|
+
//
|
|
44128
|
+
//
|
|
44129
|
+
//
|
|
44130
|
+
//
|
|
44131
|
+
//
|
|
44132
|
+
//
|
|
44133
|
+
|
|
44069
44134
|
|
|
44070
44135
|
|
|
44071
44136
|
|
|
44137
|
+
// 提取文件图标映射配置,避免在过滤器中重复创建,提升性能
|
|
44138
|
+
const FILE_ICON_MAP = [{
|
|
44139
|
+
suffix: [".jpg", ".jpeg", ".png", ".gif"],
|
|
44140
|
+
icon: "icon-color-JPG"
|
|
44141
|
+
}, {
|
|
44142
|
+
suffix: [".doc", ".docx"],
|
|
44143
|
+
icon: "icon-color-wendang"
|
|
44144
|
+
}, {
|
|
44145
|
+
suffix: [".xls", ".xlsx"],
|
|
44146
|
+
icon: "icon-color-excel"
|
|
44147
|
+
}, {
|
|
44148
|
+
suffix: ".pdf",
|
|
44149
|
+
icon: "icon-color-pdf"
|
|
44150
|
+
}, {
|
|
44151
|
+
suffix: ".txt",
|
|
44152
|
+
icon: "icon-color-txt"
|
|
44153
|
+
}];
|
|
44072
44154
|
/* harmony default export */ var mainvue_type_script_lang_js = ({
|
|
44073
44155
|
name: "HbUpload",
|
|
44074
44156
|
componentName: "HbUpload",
|
|
44075
44157
|
data() {
|
|
44076
44158
|
return {
|
|
44077
44159
|
key: Math.random(),
|
|
44078
|
-
coverIndex: 0
|
|
44160
|
+
coverIndex: 0,
|
|
44161
|
+
// 要覆盖的文件索引
|
|
44162
|
+
uploadingList: [] // 正在上传的文件列表
|
|
44079
44163
|
};
|
|
44080
44164
|
},
|
|
44081
44165
|
props: {
|
|
@@ -44095,21 +44179,55 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
|
|
|
44095
44179
|
type: Boolean,
|
|
44096
44180
|
default: true
|
|
44097
44181
|
},
|
|
44182
|
+
// 操作按钮权限
|
|
44098
44183
|
oprationAuth: {
|
|
44099
44184
|
type: Object,
|
|
44100
44185
|
default: () => {}
|
|
44101
44186
|
},
|
|
44187
|
+
// 最大上传数量
|
|
44102
44188
|
maxUpload: {
|
|
44103
44189
|
type: Number,
|
|
44104
44190
|
default: 0
|
|
44191
|
+
},
|
|
44192
|
+
// 简单上传与分片上传的阈值
|
|
44193
|
+
_simpleUploadThreshold: {
|
|
44194
|
+
type: Number,
|
|
44195
|
+
default: 50 * 1024 * 1024 // 50MB
|
|
44105
44196
|
}
|
|
44106
44197
|
},
|
|
44198
|
+
created() {
|
|
44199
|
+
// 监听阿里OSS的上传进度和状态变化
|
|
44200
|
+
// 注意:这里使用的是 window 全局事件,可能会影响页面上其他相同组件实例
|
|
44201
|
+
// 建议:如果可能有多个实例,应确保事件携带唯一标识符
|
|
44202
|
+
window.addEventListener("netdiscItemProgress", this.onUploadProgress);
|
|
44203
|
+
window.addEventListener("netdiscItemStatusChange", this.onUploadStatusChange);
|
|
44204
|
+
},
|
|
44205
|
+
beforeDestroy() {
|
|
44206
|
+
// 取消上传 : 传输中或排队中的文件
|
|
44207
|
+
this.uploadingList.forEach(item => {
|
|
44208
|
+
if (item.status === "padding" || item.status === "inline") {
|
|
44209
|
+
window.dispatchEvent(new CustomEvent("netdiscCancelUpload", {
|
|
44210
|
+
bubbles: false,
|
|
44211
|
+
detail: {
|
|
44212
|
+
file: item.file
|
|
44213
|
+
}
|
|
44214
|
+
}));
|
|
44215
|
+
}
|
|
44216
|
+
});
|
|
44217
|
+
window.removeEventListener("netdiscItemProgress", this.onUploadProgress);
|
|
44218
|
+
window.removeEventListener("netdiscItemStatusChange", this.onUploadStatusChange);
|
|
44219
|
+
},
|
|
44107
44220
|
methods: {
|
|
44108
44221
|
viewFile(item) {
|
|
44109
44222
|
if (!item.onlineUrl) {
|
|
44110
44223
|
this.$message.error("没有此网盘文件的预览权限!");
|
|
44111
44224
|
return;
|
|
44112
44225
|
}
|
|
44226
|
+
const urlReg = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/;
|
|
44227
|
+
if (!urlReg.test(item.onlineUrl)) {
|
|
44228
|
+
this.$message.error("无效的预览链接");
|
|
44229
|
+
return;
|
|
44230
|
+
}
|
|
44113
44231
|
window.open(item.onlineUrl);
|
|
44114
44232
|
},
|
|
44115
44233
|
downloadFile(item) {
|
|
@@ -44130,27 +44248,62 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
|
|
|
44130
44248
|
this.$refs.coverInput.click();
|
|
44131
44249
|
},
|
|
44132
44250
|
coverFile(ev) {
|
|
44133
|
-
|
|
44134
|
-
|
|
44135
|
-
|
|
44136
|
-
|
|
44137
|
-
|
|
44138
|
-
|
|
44139
|
-
|
|
44140
|
-
|
|
44141
|
-
|
|
44142
|
-
|
|
44143
|
-
|
|
44144
|
-
|
|
44145
|
-
|
|
44146
|
-
|
|
44147
|
-
|
|
44148
|
-
|
|
44149
|
-
|
|
44150
|
-
index: this.coverIndex,
|
|
44151
|
-
fileList: this.list,
|
|
44152
|
-
coverOriginData
|
|
44251
|
+
const file = ev.target.files[0];
|
|
44252
|
+
if (!file) return;
|
|
44253
|
+
|
|
44254
|
+
// Check if there's already an active cover upload for this index
|
|
44255
|
+
const existingCover = this.uploadingList.find(item => item.isCover && item.coverIndex === this.coverIndex && (item.status === "padding" || item.status === "inline"));
|
|
44256
|
+
if (existingCover) {
|
|
44257
|
+
this.$confirm("当前正在覆盖该文件,是否取消之前的上传并开始新的覆盖?", "提示", {
|
|
44258
|
+
confirmButtonText: "确定",
|
|
44259
|
+
cancelButtonText: "取消",
|
|
44260
|
+
type: "warning"
|
|
44261
|
+
}).then(() => {
|
|
44262
|
+
// Cancel the previous upload
|
|
44263
|
+
this.cancelUpload(existingCover, false); // Pass false to skip confirm dialog inside cancelUpload
|
|
44264
|
+
this.startCoverUpload(file);
|
|
44265
|
+
}).catch(() => {
|
|
44266
|
+
// Do nothing, keep the old upload
|
|
44267
|
+
ev.target.value = "";
|
|
44153
44268
|
});
|
|
44269
|
+
} else {
|
|
44270
|
+
this.startCoverUpload(file);
|
|
44271
|
+
}
|
|
44272
|
+
ev.target.value = "";
|
|
44273
|
+
},
|
|
44274
|
+
// 点击覆盖按钮 执行阿里OSS上传操作
|
|
44275
|
+
startCoverUpload(file) {
|
|
44276
|
+
const uploadItem = {
|
|
44277
|
+
fileName: file.name,
|
|
44278
|
+
fileSize: file.size,
|
|
44279
|
+
progress: 0,
|
|
44280
|
+
status: "padding",
|
|
44281
|
+
file: file,
|
|
44282
|
+
// Keep reference
|
|
44283
|
+
isCover: true,
|
|
44284
|
+
// Mark as cover operation
|
|
44285
|
+
coverIndex: this.coverIndex // Store the index
|
|
44286
|
+
};
|
|
44287
|
+
this.uploadingList.push(uploadItem);
|
|
44288
|
+
// 通过后端接口获取到上传阿里所需token
|
|
44289
|
+
this.getSTSToken().then(res => {
|
|
44290
|
+
window.dispatchEvent(new CustomEvent("netdiscUpload", {
|
|
44291
|
+
bubbles: false,
|
|
44292
|
+
detail: {
|
|
44293
|
+
type: "file",
|
|
44294
|
+
fileList: [file],
|
|
44295
|
+
path: [],
|
|
44296
|
+
token: res,
|
|
44297
|
+
_unUploadByNetdisc: true,
|
|
44298
|
+
// 不是在网盘上传的文件
|
|
44299
|
+
_doNotOpenUploader: true,
|
|
44300
|
+
// 不需要打开上传进度
|
|
44301
|
+
_simpleUploadThreshold: this._simpleUploadThreshold // 简单上传与分片上传的阈值
|
|
44302
|
+
}
|
|
44303
|
+
}));
|
|
44304
|
+
}).catch(() => {
|
|
44305
|
+
this.$message.error("ali-oss token获取失败");
|
|
44306
|
+
this.removeFromUploading(uploadItem);
|
|
44154
44307
|
});
|
|
44155
44308
|
},
|
|
44156
44309
|
openNetDisc() {
|
|
@@ -44174,16 +44327,102 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
|
|
|
44174
44327
|
}
|
|
44175
44328
|
this.$refs.input.click();
|
|
44176
44329
|
},
|
|
44330
|
+
// 选择文件 执行上传阿里OSS操作
|
|
44177
44331
|
chooseFile(ev) {
|
|
44178
44332
|
let fileList = Array.from(ev.target.files);
|
|
44179
|
-
|
|
44180
|
-
|
|
44181
|
-
|
|
44182
|
-
|
|
44333
|
+
fileList.forEach(file => {
|
|
44334
|
+
this.uploadingList.push({
|
|
44335
|
+
fileName: file.name,
|
|
44336
|
+
fileSize: file.size,
|
|
44337
|
+
progress: 0,
|
|
44338
|
+
status: "padding",
|
|
44339
|
+
file: file // Keep reference
|
|
44340
|
+
});
|
|
44341
|
+
});
|
|
44342
|
+
// 通过后端接口获取到上传阿里所需token
|
|
44343
|
+
this.getSTSToken().then(res => {
|
|
44344
|
+
window.dispatchEvent(new CustomEvent("netdiscUpload", {
|
|
44345
|
+
bubbles: false,
|
|
44346
|
+
detail: {
|
|
44347
|
+
type: "file",
|
|
44348
|
+
fileList: fileList,
|
|
44349
|
+
path: [],
|
|
44350
|
+
token: res,
|
|
44351
|
+
_unUploadByNetdisc: true,
|
|
44352
|
+
// 不是在网盘上传的文件
|
|
44353
|
+
_doNotOpenUploader: true,
|
|
44354
|
+
// 不需要打开上传进度
|
|
44355
|
+
_simpleUploadThreshold: this._simpleUploadThreshold // 简单上传与分片上传的阈值
|
|
44356
|
+
}
|
|
44357
|
+
}));
|
|
44358
|
+
}).catch(() => {
|
|
44359
|
+
this.$message.error("ali-oss token获取失败");
|
|
44360
|
+
// Remove from uploading list if token fails
|
|
44361
|
+
fileList.forEach(file => {
|
|
44362
|
+
const index = this.uploadingList.findIndex(i => i.file === file);
|
|
44363
|
+
if (index > -1) this.uploadingList.splice(index, 1);
|
|
44364
|
+
});
|
|
44365
|
+
});
|
|
44366
|
+
ev.target.value = "";
|
|
44367
|
+
},
|
|
44368
|
+
getSTSToken() {
|
|
44369
|
+
return this.$http.get("/ndRecord/getStsToken", {
|
|
44370
|
+
baseURL: "/platform"
|
|
44371
|
+
}).then(res => {
|
|
44372
|
+
let token = {
|
|
44373
|
+
region: "oss-cn-hangzhou",
|
|
44374
|
+
accessKeyId: res.credentials.accessKeyId,
|
|
44375
|
+
accessKeySecret: res.credentials.accessKeySecret,
|
|
44376
|
+
stsToken: res.credentials.securityToken,
|
|
44377
|
+
bucket: res.bucket
|
|
44378
|
+
};
|
|
44379
|
+
return Promise.resolve(token);
|
|
44380
|
+
}).catch(error => {
|
|
44381
|
+
return Promise.reject(error);
|
|
44183
44382
|
});
|
|
44184
|
-
|
|
44185
|
-
|
|
44186
|
-
|
|
44383
|
+
},
|
|
44384
|
+
// 监听阿里上传进度
|
|
44385
|
+
onUploadProgress(e) {
|
|
44386
|
+
const {
|
|
44387
|
+
file,
|
|
44388
|
+
progress
|
|
44389
|
+
} = e.detail;
|
|
44390
|
+
const item = this.uploadingList.find(i => i.file === file);
|
|
44391
|
+
if (item) {
|
|
44392
|
+
item.progress = progress;
|
|
44393
|
+
}
|
|
44394
|
+
},
|
|
44395
|
+
// 监听阿里上传状态变化
|
|
44396
|
+
onUploadStatusChange(e) {
|
|
44397
|
+
const {
|
|
44398
|
+
file,
|
|
44399
|
+
status
|
|
44400
|
+
} = e.detail;
|
|
44401
|
+
const item = this.uploadingList.find(i => i.file === file);
|
|
44402
|
+
if (item) {
|
|
44403
|
+
item.status = status;
|
|
44404
|
+
if (status === "transmitSuccess") {
|
|
44405
|
+
this.handleUploadSuccess(item); // 上传阿里成功
|
|
44406
|
+
} else if (status === "failed") {
|
|
44407
|
+
this.$message.error(`${item.fileName} 上传失败`);
|
|
44408
|
+
this.removeFromUploading(item); // 上传阿里失败
|
|
44409
|
+
} else if (status === "cancel") {
|
|
44410
|
+
this.removeFromUploading(item); // 上传阿里取消
|
|
44411
|
+
}
|
|
44412
|
+
}
|
|
44413
|
+
},
|
|
44414
|
+
// 上传阿里成功 执行保存文件信息操作
|
|
44415
|
+
handleUploadSuccess(item) {
|
|
44416
|
+
const payload = [{
|
|
44417
|
+
fileName: item.fileName,
|
|
44418
|
+
fileSize: item.fileSize,
|
|
44419
|
+
fileSuffix: this.getSuffix(item.fileName),
|
|
44420
|
+
fileType: "1",
|
|
44421
|
+
fileUrl: item.file.path
|
|
44422
|
+
}];
|
|
44423
|
+
// 经过后端拿到上传到阿里的文件的信息
|
|
44424
|
+
this.$http.post("/sysFiles/getSysFilesVo", payload).then(res => {
|
|
44425
|
+
// 处理返回的数据
|
|
44187
44426
|
let addList = res.map(item => ({
|
|
44188
44427
|
fileName: item.fileName,
|
|
44189
44428
|
fileType: "1",
|
|
@@ -44192,15 +44431,36 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
|
|
|
44192
44431
|
onlineUrl: item.onlineUrl,
|
|
44193
44432
|
fileSize: item.fileSize
|
|
44194
44433
|
}));
|
|
44195
|
-
|
|
44196
|
-
this.list.
|
|
44197
|
-
|
|
44198
|
-
|
|
44199
|
-
|
|
44200
|
-
|
|
44201
|
-
|
|
44434
|
+
if (item.isCover) {
|
|
44435
|
+
const coverOriginData = this.$lodash.cloneDeep(this.list[item.coverIndex]);
|
|
44436
|
+
this.list.splice(item.coverIndex, 1, addList[0]);
|
|
44437
|
+
this.$emit("coverSuccess", {
|
|
44438
|
+
index: item.coverIndex,
|
|
44439
|
+
fileList: this.list,
|
|
44440
|
+
coverOriginData
|
|
44441
|
+
});
|
|
44442
|
+
} else {
|
|
44443
|
+
addList.forEach(item => {
|
|
44444
|
+
this.list.push(item);
|
|
44445
|
+
});
|
|
44446
|
+
this.$emit("uploadSuccess", {
|
|
44447
|
+
fileList: this.list,
|
|
44448
|
+
addData: this.$lodash.cloneDeep(addList)
|
|
44449
|
+
});
|
|
44450
|
+
}
|
|
44451
|
+
this.removeFromUploading(item);
|
|
44452
|
+
}).catch(() => {
|
|
44453
|
+
this.$message.error("保存文件信息失败");
|
|
44454
|
+
this.removeFromUploading(item);
|
|
44202
44455
|
});
|
|
44203
44456
|
},
|
|
44457
|
+
// 移除正在进行阿里上传的文件项
|
|
44458
|
+
removeFromUploading(item) {
|
|
44459
|
+
const index = this.uploadingList.indexOf(item);
|
|
44460
|
+
if (index > -1) {
|
|
44461
|
+
this.uploadingList.splice(index, 1);
|
|
44462
|
+
}
|
|
44463
|
+
},
|
|
44204
44464
|
addLink(data) {
|
|
44205
44465
|
if (this.maxUpload && this.list.length + 1 > this.maxUpload) {
|
|
44206
44466
|
this.$message.error("最多上传" + this.maxUpload + "个文件");
|
|
@@ -44233,6 +44493,29 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
|
|
|
44233
44493
|
});
|
|
44234
44494
|
}).catch(() => {});
|
|
44235
44495
|
},
|
|
44496
|
+
// 取消上传阿里
|
|
44497
|
+
cancelUpload(item, confirm = true) {
|
|
44498
|
+
const doCancel = () => {
|
|
44499
|
+
window.dispatchEvent(new CustomEvent("netdiscCancelUpload", {
|
|
44500
|
+
bubbles: false,
|
|
44501
|
+
detail: {
|
|
44502
|
+
file: item.file
|
|
44503
|
+
}
|
|
44504
|
+
}));
|
|
44505
|
+
this.removeFromUploading(item);
|
|
44506
|
+
};
|
|
44507
|
+
if (confirm) {
|
|
44508
|
+
this.$confirm(`确定要取消上传 ${item.fileName} 吗?`, "提示", {
|
|
44509
|
+
confirmButtonText: "确定",
|
|
44510
|
+
cancelButtonText: "取消",
|
|
44511
|
+
type: "warning"
|
|
44512
|
+
}).then(() => {
|
|
44513
|
+
doCancel();
|
|
44514
|
+
}).catch(() => {});
|
|
44515
|
+
} else {
|
|
44516
|
+
doCancel();
|
|
44517
|
+
}
|
|
44518
|
+
},
|
|
44236
44519
|
rerendering() {
|
|
44237
44520
|
this.key = Math.random();
|
|
44238
44521
|
}
|
|
@@ -44266,30 +44549,14 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
|
|
|
44266
44549
|
},
|
|
44267
44550
|
filters: {
|
|
44268
44551
|
fileIcon(isFile, fileType) {
|
|
44269
|
-
var
|
|
44552
|
+
var _FILE_ICON_MAP$find;
|
|
44270
44553
|
if (!isFile) {
|
|
44271
44554
|
return "icon-color-wenjianjia";
|
|
44272
44555
|
}
|
|
44273
44556
|
const lowerFileType = fileType.toLowerCase();
|
|
44274
|
-
const
|
|
44275
|
-
suffix: [".jpg", ".jpeg", ".png", ".gif"],
|
|
44276
|
-
icon: "icon-color-JPG"
|
|
44277
|
-
}, {
|
|
44278
|
-
suffix: [".doc", ".docx"],
|
|
44279
|
-
icon: "icon-color-wendang"
|
|
44280
|
-
}, {
|
|
44281
|
-
suffix: [".xls", ".xlsx"],
|
|
44282
|
-
icon: "icon-color-excel"
|
|
44283
|
-
}, {
|
|
44284
|
-
suffix: ".pdf",
|
|
44285
|
-
icon: "icon-color-pdf"
|
|
44286
|
-
}, {
|
|
44287
|
-
suffix: ".txt",
|
|
44288
|
-
icon: "icon-color-txt"
|
|
44289
|
-
}];
|
|
44290
|
-
const iconClass = (_fileMap$find = fileMap.find(item => {
|
|
44557
|
+
const iconClass = (_FILE_ICON_MAP$find = FILE_ICON_MAP.find(item => {
|
|
44291
44558
|
return typeof item.suffix === "string" ? item.suffix === lowerFileType : item.suffix.includes(lowerFileType);
|
|
44292
|
-
})) === null ||
|
|
44559
|
+
})) === null || _FILE_ICON_MAP$find === void 0 ? void 0 : _FILE_ICON_MAP$find.icon;
|
|
44293
44560
|
return iconClass || "icon-color-qita1";
|
|
44294
44561
|
}
|
|
44295
44562
|
},
|
|
@@ -44300,8 +44567,8 @@ var CustomLink_component = Object(componentNormalizer["a" /* default */])(
|
|
|
44300
44567
|
});
|
|
44301
44568
|
// CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=script&lang=js
|
|
44302
44569
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
44303
|
-
// EXTERNAL MODULE: ./packages/upload/src/main.vue?vue&type=style&index=0&id=
|
|
44304
|
-
var
|
|
44570
|
+
// EXTERNAL MODULE: ./packages/upload/src/main.vue?vue&type=style&index=0&id=1b14089e&prod&lang=scss
|
|
44571
|
+
var mainvue_type_style_index_0_id_1b14089e_prod_lang_scss = __webpack_require__("2f12");
|
|
44305
44572
|
|
|
44306
44573
|
// CONCATENATED MODULE: ./packages/upload/src/main.vue
|
|
44307
44574
|
|