@fengzhongwen/kukan-ui 1.0.20 → 1.0.22
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/kukan-ui.common.js
CHANGED
|
@@ -94,21 +94,17 @@ module.exports =
|
|
|
94
94
|
|
|
95
95
|
/***/ }),
|
|
96
96
|
|
|
97
|
-
/***/ "
|
|
97
|
+
/***/ "45aa":
|
|
98
98
|
/***/ (function(module, exports, __webpack_require__) {
|
|
99
99
|
|
|
100
100
|
// extracted by mini-css-extract-plugin
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/ "
|
|
105
|
-
/***/ (function(module,
|
|
106
|
-
|
|
107
|
-
"use strict";
|
|
108
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_419a04c7_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9136");
|
|
109
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_419a04c7_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_419a04c7_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
110
|
-
/* unused harmony reexport * */
|
|
104
|
+
/***/ "5554":
|
|
105
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
111
106
|
|
|
107
|
+
// extracted by mini-css-extract-plugin
|
|
112
108
|
|
|
113
109
|
/***/ }),
|
|
114
110
|
|
|
@@ -878,26 +874,30 @@ module.exports =
|
|
|
878
874
|
|
|
879
875
|
/***/ }),
|
|
880
876
|
|
|
881
|
-
/***/ "
|
|
882
|
-
/***/ (function(module,
|
|
877
|
+
/***/ "90f1":
|
|
878
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
879
|
+
|
|
880
|
+
"use strict";
|
|
881
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_641d735d_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("45aa");
|
|
882
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_641d735d_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_641d735d_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
|
|
883
|
+
/* unused harmony reexport * */
|
|
883
884
|
|
|
884
|
-
// extracted by mini-css-extract-plugin
|
|
885
885
|
|
|
886
886
|
/***/ }),
|
|
887
887
|
|
|
888
|
-
/***/ "
|
|
888
|
+
/***/ "9b6a":
|
|
889
889
|
/***/ (function(module, exports, __webpack_require__) {
|
|
890
890
|
|
|
891
891
|
// extracted by mini-css-extract-plugin
|
|
892
892
|
|
|
893
893
|
/***/ }),
|
|
894
894
|
|
|
895
|
-
/***/ "
|
|
895
|
+
/***/ "a888":
|
|
896
896
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
897
897
|
|
|
898
898
|
"use strict";
|
|
899
|
-
/* harmony import */ var
|
|
900
|
-
/* harmony import */ var
|
|
899
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_3f692c5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9b6a");
|
|
900
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_3f692c5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_3f692c5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
901
901
|
/* unused harmony reexport * */
|
|
902
902
|
|
|
903
903
|
|
|
@@ -1086,12 +1086,12 @@ function addNewFileOfSubTitle(data, url) {
|
|
|
1086
1086
|
});
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
1089
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"d6c5603c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FileUpload/index.vue?vue&type=template&id=641d735d&scoped=true
|
|
1090
1090
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"upload-multiple"},[_c('input',{ref:"multiplePloadInput",staticStyle:{"display":"none"},attrs:{"type":"file","multiple":_vm.multiple,"accept":_vm.limitFileType},on:{"change":_vm.handleSelectedMultipleFiles}}),_c('div',{staticClass:"upload-multiple-box"},[_c('div',{ref:"upLoded_box",staticClass:"multiple_upload_area",class:_vm.multipleUploadAreaClass(),on:{"click":_vm.reviewUploadMultipleFiles,"dragover":function($event){$event.preventDefault();return _vm.onDragOver($event)},"dragleave":function($event){$event.preventDefault();return _vm.onDragLeave($event)},"drop":function($event){$event.preventDefault();return _vm.onDrop($event)}}},[(_vm.isUploading)?_c('div',{staticClass:"upload-loading-mask",style:(_vm.setUploadingLoadingMaskStyle())}):_vm._e(),(_vm.showIconTip)?_c('div',[_c('i',{staticClass:"el-icon-upload"})]):_vm._e(),_c('div',[_vm._v(_vm._s(_vm.startButtonText))]),_vm._t("tips")],2),(_vm.pictureConfig.show && _vm.showSuccessPicture)?_c('div',{staticClass:"upload-multiple-box-right"},[_c('div',{staticClass:"upload-multiple-box-close",on:{"click":function($event){$event.stopPropagation();return _vm.clearPicture($event)}}},[_c('i',{staticClass:"el-icon-close"})]),_c('img',{attrs:{"src":_vm.pictureConfig.url,"alt":_vm.pictureConfig.altText}})]):_vm._e()]),(_vm.isShowAllUploadButton)?_c('el-button',{staticClass:"upload_button",attrs:{"type":"primary","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":_vm.startUploadMultipleFiles}},[_vm._v(" 全部文件开始上传 ")]):_vm._e(),(_vm.model === 'table')?_c('div',{staticClass:"upload-multiple-table"},[_c('Upload_table',{attrs:{"needUploadFilesArr":_vm.needUploadFilesArr,"fileConfig":_vm.fileConfig,"fileType":_vm.addDataBaseLinkConfig.addFileType,"isUploading":_vm.isUploading},on:{"delteSelectedFile":_vm.delteSelectedFile,"cancelFileUpload":_vm.cancelFileUpload,"resetFileUpload":_vm.resetFileUpload,"handleSelectionChange":_vm.tableSelectionChange}})],1):_vm._e(),(_vm.model === 'info')?_c('div',{staticClass:"multiple_upload_list"},[_c('span',{staticClass:"tip_title"},[_c('span',{staticClass:"title"},[_c('div',[_vm._v("文件列表")]),_c('transition',{attrs:{"name":"totalProgress","mode":"out-in"}},[(_vm.needUploadFilesArr.length > 0)?_c('div',{staticClass:"total_progress"},[_c('div',{staticClass:"logo"}),_c('span',[_vm._v("总进度:")]),(_vm.fileConfig.uploadController)?_c('div',[_c('el-tag',{attrs:{"size":"mini","type":_vm.isDanger}},[_vm._v("上传错误:"+_vm._s(_vm.fileConfig.skipError_num))]),_c('el-tag',{attrs:{"size":"mini","type":""}},[_vm._v("上传成功:"+_vm._s(_vm.fileConfig.completed_num))]),_c('el-tag',{attrs:{"size":"mini","type":""}},[_vm._v("文件总数:"+_vm._s(_vm.fileConfig.filetotal_num))])],1):_vm._e()]):_vm._e()])],1),_c('span',[_c('el-button',{attrs:{"size":"mini","type":"","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":_vm.handleSelectAllFile}},[_vm._v("全选所有文件")]),_c('el-button',{attrs:{"size":"mini","type":"danger","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":_vm.delteSelectedFile}},[_vm._v("移除所选文件")])],1)]),_c('div',{staticClass:"selected_list_area"},[(_vm.needUploadFilesArr.length > 0)?_c('div',{staticClass:"selected_list"},_vm._l((_vm.needUploadFilesArr),function(item,index){return _c('Card_2',{key:index,attrs:{"index":index,"file-config":item},on:{"cancelFileUpload":_vm.cancelFileUpload,"resetFileUpload":_vm.resetFileUpload,"handleClickOnlyFile":_vm.handleClickOnlyFile}})}),1):_c('div',{staticClass:"no_file"},[_c('i',{staticClass:"el-icon-document"}),_c('div',[_vm._v("暂无文件,请点击或拖拽文件到上传区域")])])])]):_vm._e()],1)}
|
|
1091
1091
|
var staticRenderFns = []
|
|
1092
1092
|
|
|
1093
1093
|
|
|
1094
|
-
// CONCATENATED MODULE: ./src/components/FileUpload/index.vue?vue&type=template&id=
|
|
1094
|
+
// CONCATENATED MODULE: ./src/components/FileUpload/index.vue?vue&type=template&id=641d735d&scoped=true
|
|
1095
1095
|
|
|
1096
1096
|
// CONCATENATED MODULE: ./src/components/FileUpload/util.js
|
|
1097
1097
|
// 辅助函数:获取MIME类型
|
|
@@ -1166,7 +1166,7 @@ const fileTypeValidators = {
|
|
|
1166
1166
|
// return /^(presentation))|text\/(plain|html|csv|xml|css|javascript|markdown))$/i.test(mime);
|
|
1167
1167
|
},
|
|
1168
1168
|
};
|
|
1169
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
1169
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"d6c5603c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FileUpload/components/UploadCard_Ver_Second/index.vue?vue&type=template&id=cdec1cec&scoped=true
|
|
1170
1170
|
var UploadCard_Ver_Secondvue_type_template_id_cdec1cec_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{key:_vm.fileConfig.name + '_' + _vm.index,staticClass:"only_file_area",class:{
|
|
1171
1171
|
only_file_area_isActive: _vm.fileConfig.isSelected,
|
|
1172
1172
|
'fade-in-element': true,
|
|
@@ -1446,7 +1446,7 @@ var component = normalizeComponent(
|
|
|
1446
1446
|
)
|
|
1447
1447
|
|
|
1448
1448
|
/* harmony default export */ var UploadCard_Ver_Second = (component.exports);
|
|
1449
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
1449
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"d6c5603c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FileUpload/components/Upload_table/index.vue?vue&type=template&id=61052c10&scoped=true
|
|
1450
1450
|
var Upload_tablevue_type_template_id_61052c10_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"upload_table"},[_c('div',{staticClass:"header"},[_c('div',{staticClass:"total"},[_c('span',[_vm._v("已选择"+_vm._s(_vm.needUploadFilesArr.length)+"个文件")]),(_vm.needUploadFilesArr.length)?_c('el-tag',{attrs:{"type":"","size":"mini"}},[_vm._v("上传中"+_vm._s(_vm.totalNumber))]):_vm._e()],1),_c('div',{staticClass:"options"},[_c('el-button',{attrs:{"type":"danger","size":"mini","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":function($event){return _vm.handleClickOnlyFile()}}},[_vm._v("清除已选")])],1)]),_c('el-table',{staticStyle:{"width":"100%"},attrs:{"data":_vm.needUploadFilesArr,"default-sort":{ prop: 'fileName', order: 'descending' },"border":"","height":"400px"},on:{"sort-change":_vm.handleSortChange,"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"selection","width":"40"}}),_c('el-table-column',{attrs:{"type":"index","width":"40"}}),_c('el-table-column',{attrs:{"label":"文件名","width":"300"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('div',{staticClass:"file_name"},[_c('div',{staticClass:"file_type"},[_vm._v(" "+_vm._s(_vm.getFileType(scope.row.name))+" ")]),_c('span',{staticClass:"file_name_text"},[_vm._v(_vm._s(scope.row.name))])])]}}])}),_c('el-table-column',{attrs:{"label":"大小","width":"100"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('div',{staticClass:"file_size"},[_c('span',{staticClass:"file_size_text"},[_vm._v(_vm._s(_vm.fileFormatValid(scope.row.file.size))+" mb")])])]}}])}),_c('el-table-column',{attrs:{"label":"状态","width":"100"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('div',{staticClass:"status_text"},[_c('span',{class:_vm.uploadingTextStyle(scope.row.tip)},[_vm._v(_vm._s(scope.row.tip))])])]}}])}),_c('el-table-column',{attrs:{"label":"进度","width":"auto"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('div',{staticClass:"progress_area"},[_c('el-progress',{staticClass:"custom-progress",attrs:{"color":_vm.colors,"show-text":true,"percentage":scope.row.uploadProgress}})],1)]}}])}),_c('el-table-column',{attrs:{"label":"操作","width":"auto"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.tip === '上传中')?_c('div',{staticClass:"option_text",on:{"click":function($event){$event.stopPropagation();return _vm.cancelFileUpload(scope.row)}}},[_c('span',{staticStyle:{"color":"#f74444","cursor":"pointer"}},[_vm._v("取消上传")])]):_vm._e(),(
|
|
1451
1451
|
scope.row.tip === '已取消' ||
|
|
1452
1452
|
scope.row.tip === '上传出错' ||
|
|
@@ -3367,7 +3367,7 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3367
3367
|
|
|
3368
3368
|
if (this.needUploadFilesArr.length === _neerUploadFilesArr.length) {
|
|
3369
3369
|
this.$message("没有需要移除的文件");
|
|
3370
|
-
return
|
|
3370
|
+
return;
|
|
3371
3371
|
}
|
|
3372
3372
|
|
|
3373
3373
|
// 需要添加移除文件的钩子函数
|
|
@@ -3377,22 +3377,24 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3377
3377
|
},
|
|
3378
3378
|
// 开始上传按钮的点击事件:上传已经准备好的文件
|
|
3379
3379
|
async startUploadMultipleFiles() {
|
|
3380
|
-
//
|
|
3381
|
-
|
|
3380
|
+
// 避免重复上传
|
|
3381
|
+
const handleUploadFileArr = this.needUploadFilesArr.filter(
|
|
3382
3382
|
item => item.tip !== "已完成",
|
|
3383
3383
|
);
|
|
3384
3384
|
|
|
3385
|
-
if (
|
|
3385
|
+
if (handleUploadFileArr.length === 0) {
|
|
3386
3386
|
this.$message.error("没有需要上传的文件");
|
|
3387
3387
|
return;
|
|
3388
3388
|
}
|
|
3389
3389
|
|
|
3390
3390
|
try {
|
|
3391
|
+
this.uploadStart();
|
|
3392
|
+
|
|
3391
3393
|
this.$message.success("开始上传");
|
|
3392
3394
|
|
|
3393
|
-
this.fileConfig.filetotal_num =
|
|
3395
|
+
this.fileConfig.filetotal_num = handleUploadFileArr.length;
|
|
3394
3396
|
|
|
3395
|
-
|
|
3397
|
+
handleUploadFileArr.forEach(item => {
|
|
3396
3398
|
item.notShowTip = false;
|
|
3397
3399
|
item.tip = "上传中";
|
|
3398
3400
|
item.uploadProgress = 0;
|
|
@@ -3422,7 +3424,9 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3422
3424
|
skipError,
|
|
3423
3425
|
}) => {
|
|
3424
3426
|
console.log(
|
|
3425
|
-
"%c 文件总进度:",
|
|
3427
|
+
"%c 文件总进度:",
|
|
3428
|
+
"color: #2196F3; font-weight: bold;",
|
|
3429
|
+
`已完成 ${completed}/${total},正在上传 ${active},排队中 ${queued}, 出错数量 ${skipError} 个`,
|
|
3426
3430
|
);
|
|
3427
3431
|
this.fileConfig.overallProgress = percentage;
|
|
3428
3432
|
this.fileConfig.notShowTip = notShowTip;
|
|
@@ -3445,7 +3449,7 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3445
3449
|
};
|
|
3446
3450
|
|
|
3447
3451
|
const result = await uploadFilesConfig_AndStart(
|
|
3448
|
-
|
|
3452
|
+
handleUploadFileArr,
|
|
3449
3453
|
this.multipleChunkConfig.maxConcurrent,
|
|
3450
3454
|
this.fileConfig.maxFileConcurrent,
|
|
3451
3455
|
this.addDataBaseLinkConfig,
|
|
@@ -3456,6 +3460,7 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3456
3460
|
this.apiObj,
|
|
3457
3461
|
);
|
|
3458
3462
|
if (result) {
|
|
3463
|
+
// 这三个事件考虑合并
|
|
3459
3464
|
this.informUploadedOfRefresh();
|
|
3460
3465
|
this.uploadedResult(result);
|
|
3461
3466
|
|
|
@@ -3476,6 +3481,7 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3476
3481
|
}
|
|
3477
3482
|
}
|
|
3478
3483
|
} else {
|
|
3484
|
+
this.uploadedResult([]);
|
|
3479
3485
|
this.$message.error("上传出错!");
|
|
3480
3486
|
}
|
|
3481
3487
|
} catch (err) {
|
|
@@ -3512,9 +3518,6 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3512
3518
|
|
|
3513
3519
|
const _arr = e.target.files || e.dataTransfer.files;
|
|
3514
3520
|
|
|
3515
|
-
// 防止出错
|
|
3516
|
-
// e.target.value = ""
|
|
3517
|
-
|
|
3518
3521
|
// 校验文件格式
|
|
3519
3522
|
Array.from(_arr).forEach((item, index) => {
|
|
3520
3523
|
if (this.addDataBaseLinkConfig.addFileType === "video") {
|
|
@@ -3650,20 +3653,21 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3650
3653
|
}
|
|
3651
3654
|
|
|
3652
3655
|
// 移除已完成的(选完文件移除)
|
|
3653
|
-
const _needUploadFilesArr2 = this.needUploadFilesArr.filter(
|
|
3654
|
-
|
|
3655
|
-
);
|
|
3656
|
+
// const _needUploadFilesArr2 = this.needUploadFilesArr.filter(
|
|
3657
|
+
// item => item.tip !== "已完成",
|
|
3658
|
+
// );
|
|
3656
3659
|
|
|
3657
3660
|
this.needUploadFilesArr = [
|
|
3658
|
-
...
|
|
3661
|
+
...this.needUploadFilesArr,
|
|
3659
3662
|
..._needUploadFilesArr,
|
|
3660
3663
|
];
|
|
3661
|
-
this.uploadStart();
|
|
3662
|
-
|
|
3663
3664
|
// 此处需要额外的处理逻辑,而这个额外的逻辑需要父组件提供
|
|
3664
3665
|
// 等待父组件通过回调处理筛选逻辑(若父组件未提供回调则立即继续)
|
|
3665
3666
|
await this.uploadingOtherFilterFun(this.needUploadFilesArr);
|
|
3666
3667
|
|
|
3668
|
+
// 防止不能重复上传
|
|
3669
|
+
e.target.value = ""
|
|
3670
|
+
|
|
3667
3671
|
// 上传分为:1.列表模式点击按钮开始上传。2.选择完文件自动上传。3.通过xxx方法可以选择改变已选文件,然后调用xxx方法实现上传,这几种方法暂时是互斥的
|
|
3668
3672
|
if (this.needUploadFilesArr.length > 0 && this.autoUpload) {
|
|
3669
3673
|
this.startUploadMultipleFiles();
|
|
@@ -3674,8 +3678,8 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3674
3678
|
|
|
3675
3679
|
// CONCATENATED MODULE: ./src/components/FileUpload/index.vue?vue&type=script&lang=js
|
|
3676
3680
|
/* harmony default export */ var components_FileUploadvue_type_script_lang_js = (FileUploadvue_type_script_lang_js);
|
|
3677
|
-
// EXTERNAL MODULE: ./src/components/FileUpload/index.vue?vue&type=style&index=0&id=
|
|
3678
|
-
var
|
|
3681
|
+
// EXTERNAL MODULE: ./src/components/FileUpload/index.vue?vue&type=style&index=0&id=641d735d&prod&scoped=true&lang=scss
|
|
3682
|
+
var FileUploadvue_type_style_index_0_id_641d735d_prod_scoped_true_lang_scss = __webpack_require__("90f1");
|
|
3679
3683
|
|
|
3680
3684
|
// CONCATENATED MODULE: ./src/components/FileUpload/index.vue
|
|
3681
3685
|
|
|
@@ -3692,7 +3696,7 @@ var FileUpload_component = normalizeComponent(
|
|
|
3692
3696
|
staticRenderFns,
|
|
3693
3697
|
false,
|
|
3694
3698
|
null,
|
|
3695
|
-
"
|
|
3699
|
+
"641d735d",
|
|
3696
3700
|
null
|
|
3697
3701
|
|
|
3698
3702
|
)
|
|
@@ -3707,12 +3711,12 @@ FileUpload.install = function(Vue) {
|
|
|
3707
3711
|
};
|
|
3708
3712
|
|
|
3709
3713
|
/* harmony default export */ var components_FileUpload = (FileUpload);
|
|
3710
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
3711
|
-
var
|
|
3712
|
-
var
|
|
3714
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"d6c5603c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VideoPreviewDialog/index.vue?vue&type=template&id=3f692c5e&scoped=true
|
|
3715
|
+
var VideoPreviewDialogvue_type_template_id_3f692c5e_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-dialog',{attrs:{"visible":_vm.dialogVisible,"show-close":false,"modal":true,"width":_vm.width,"top":_vm.topMargin,"custom-class":"modern-video-review-dialog","append-to-body":"","before-close":_vm.closePreview},on:{"update:visible":function($event){_vm.dialogVisible=$event},"opened":_vm.onOpened}},[_c('div',{staticClass:"video-review-container",style:({ height: _vm.height }),on:{"mousemove":_vm.onDrag,"mouseup":_vm.stopDrag,"mouseleave":_vm.stopDrag}},[_c('div',{staticClass:"video-review-header"},[_c('div',{staticClass:"file-info"},[_c('span',{staticClass:"file-name",attrs:{"title":_vm.fileName}},[_vm._v(_vm._s(_vm.fileName || "视频预览"))]),(!_vm.combinedLoading && !_vm.loadError && _vm.videoWidth)?_c('span',{staticClass:"file-size"},[_vm._v(" "+_vm._s(_vm.videoWidth)+" × "+_vm._s(_vm.videoHeight)+" px | "+_vm._s(_vm.duration)+" ")]):_vm._e()]),_c('div',{staticClass:"video-review-controls"},[_c('button',{staticClass:"control-icon-btn",attrs:{"disabled":_vm.combinedLoading || _vm.loadError || _vm.scale <= _vm.minScale},on:{"click":_vm.zoomOut}},[_c('i',{staticClass:"el-icon-zoom-out"})]),_c('span',{staticClass:"zoom-display"},[_vm._v(_vm._s(Math.round(_vm.scale * 100))+"%")]),_c('button',{staticClass:"control-icon-btn",attrs:{"disabled":_vm.combinedLoading || _vm.loadError || _vm.scale >= _vm.maxScale},on:{"click":_vm.zoomIn}},[_c('i',{staticClass:"el-icon-zoom-in"})]),_c('div',{staticClass:"control-divider"}),_c('button',{staticClass:"control-icon-btn",attrs:{"disabled":_vm.combinedLoading,"title":"原始尺寸/重置位置"},on:{"click":_vm.resetZoom}},[_c('i',{staticClass:"el-icon-refresh-right"})]),_c('button',{staticClass:"control-icon-btn close-btn",on:{"click":_vm.closePreview}},[_c('i',{staticClass:"el-icon-close"})])])]),_c('div',{staticClass:"video-review-content",on:{"wheel":function($event){$event.preventDefault();return _vm.handleWheel($event)},"mousedown":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.startDrag($event)},"!click":function($event){return _vm.handleCaptureClick($event)}}},[_c('transition',{attrs:{"name":"fade"}},[(_vm.combinedLoading && !_vm.loadError)?_c('div',{staticClass:"status-overlay"},[_c('i',{staticClass:"el-icon-loading"}),_c('p',[_vm._v("视频加载中...")])]):_vm._e()]),(_vm.loadError)?_c('div',{staticClass:"status-overlay error"},[_c('i',{staticClass:"el-icon-video-camera"}),_c('p',[_vm._v("视频加载失败")])]):_vm._e(),_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.combinedLoading && !_vm.loadError),expression:"!combinedLoading && !loadError"}],staticClass:"video-transform-wrapper",style:(_vm.videoStyle),on:{"mousedown":_vm.startDrag}},[(_vm.visible && _vm.videoUrl)?_c('video',{key:_vm.videoKey,ref:"videoPlayer",staticClass:"main-preview-video",attrs:{"src":_vm.videoUrl,"autoplay":"","loop":"","playsinline":"","controls":""},on:{"loadedmetadata":_vm.onMetadataLoad,"error":_vm.onVideoError,"canplay":_vm.onCanPlay,"waiting":function($event){_vm.innerLoading = true}}}):_vm._e()])],1),_c('div',{staticClass:"video-review-hint"},[_c('span',[_vm._v("鼠标拖拽背景移动,滚轮缩放查看细节")])])])])}
|
|
3716
|
+
var VideoPreviewDialogvue_type_template_id_3f692c5e_scoped_true_staticRenderFns = []
|
|
3713
3717
|
|
|
3714
3718
|
|
|
3715
|
-
// CONCATENATED MODULE: ./src/components/VideoPreviewDialog/index.vue?vue&type=template&id=
|
|
3719
|
+
// CONCATENATED MODULE: ./src/components/VideoPreviewDialog/index.vue?vue&type=template&id=3f692c5e&scoped=true
|
|
3716
3720
|
|
|
3717
3721
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VideoPreviewDialog/index.vue?vue&type=script&lang=js
|
|
3718
3722
|
//
|
|
@@ -3820,9 +3824,10 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3820
3824
|
//
|
|
3821
3825
|
//
|
|
3822
3826
|
//
|
|
3827
|
+
//
|
|
3823
3828
|
|
|
3824
3829
|
/* harmony default export */ var VideoPreviewDialogvue_type_script_lang_js = ({
|
|
3825
|
-
name: "
|
|
3830
|
+
name: "VideoReview",
|
|
3826
3831
|
props: {
|
|
3827
3832
|
visible: { type: Boolean, default: false },
|
|
3828
3833
|
videoUrl: { type: String, required: true },
|
|
@@ -3831,14 +3836,16 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3831
3836
|
height: { type: String, default: "80vh" },
|
|
3832
3837
|
topMargin: { type: String, default: "7vh" },
|
|
3833
3838
|
initialScale: { type: Number, default: 1 },
|
|
3839
|
+
// 新增逻辑:允许手动控制加载状态
|
|
3840
|
+
loading: { type: Boolean, default: false }
|
|
3834
3841
|
},
|
|
3835
3842
|
data() {
|
|
3836
3843
|
return {
|
|
3837
3844
|
scale: 1,
|
|
3838
3845
|
minScale: 0.5,
|
|
3839
3846
|
maxScale: 3,
|
|
3840
|
-
|
|
3841
|
-
loadError: false,
|
|
3847
|
+
innerLoading: true, // 组件内部加载状态
|
|
3848
|
+
loadError: false,
|
|
3842
3849
|
videoWidth: 0,
|
|
3843
3850
|
videoHeight: 0,
|
|
3844
3851
|
duration: "00:00",
|
|
@@ -3846,6 +3853,7 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3846
3853
|
translateY: 0,
|
|
3847
3854
|
isDragging: false,
|
|
3848
3855
|
hasMoved: false,
|
|
3856
|
+
videoKey: Date.now(), // 核心修复:用于强制刷新 video 标签
|
|
3849
3857
|
startMousePos: { x: 0, y: 0 },
|
|
3850
3858
|
mouseStartPos: { x: 0, y: 0 },
|
|
3851
3859
|
};
|
|
@@ -3855,6 +3863,10 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3855
3863
|
get() { return this.visible; },
|
|
3856
3864
|
set(val) { this.$emit("update:visible", val); },
|
|
3857
3865
|
},
|
|
3866
|
+
// 逻辑合并:外部 prop 或内部加载状态只要有一个在转,就显示 loading
|
|
3867
|
+
combinedLoading() {
|
|
3868
|
+
return this.loading || this.innerLoading;
|
|
3869
|
+
},
|
|
3858
3870
|
videoStyle() {
|
|
3859
3871
|
return {
|
|
3860
3872
|
transform: `translate(${this.translateX}px, ${this.translateY}px) scale(${this.scale})`,
|
|
@@ -3865,29 +3877,36 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3865
3877
|
watch: {
|
|
3866
3878
|
visible(val) {
|
|
3867
3879
|
if (val) {
|
|
3868
|
-
this.
|
|
3880
|
+
this.videoKey = Date.now(); // 每次开启弹窗,赋予新 key 强制重载
|
|
3881
|
+
this.initStates();
|
|
3869
3882
|
window.addEventListener("keydown", this.handleKeyDown);
|
|
3870
3883
|
} else {
|
|
3871
3884
|
this.pauseVideo();
|
|
3872
3885
|
window.removeEventListener("keydown", this.handleKeyDown);
|
|
3873
3886
|
}
|
|
3874
3887
|
},
|
|
3875
|
-
// 监听 URL 变化:如果弹窗没关闭但切换了视频源,也要重置状态
|
|
3876
3888
|
videoUrl() {
|
|
3877
3889
|
if (this.visible) {
|
|
3890
|
+
this.videoKey = Date.now();
|
|
3878
3891
|
this.initStates();
|
|
3879
3892
|
}
|
|
3880
3893
|
}
|
|
3881
3894
|
},
|
|
3882
3895
|
methods: {
|
|
3883
|
-
// 初始化/重置状态的方法
|
|
3884
3896
|
initStates() {
|
|
3885
|
-
this.
|
|
3886
|
-
this.loadError = false;
|
|
3897
|
+
this.innerLoading = true;
|
|
3898
|
+
this.loadError = false;
|
|
3887
3899
|
this.videoWidth = 0;
|
|
3888
3900
|
this.videoHeight = 0;
|
|
3889
3901
|
this.duration = "00:00";
|
|
3890
3902
|
this.resetZoom();
|
|
3903
|
+
|
|
3904
|
+
// 显式调用 load() 确保浏览器触发资源请求
|
|
3905
|
+
this.$nextTick(() => {
|
|
3906
|
+
if (this.$refs.videoPlayer) {
|
|
3907
|
+
this.$refs.videoPlayer.load();
|
|
3908
|
+
}
|
|
3909
|
+
});
|
|
3891
3910
|
},
|
|
3892
3911
|
onOpened() {
|
|
3893
3912
|
this.resetZoom();
|
|
@@ -3899,13 +3918,12 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3899
3918
|
this.duration = this.formatDuration(video.duration);
|
|
3900
3919
|
},
|
|
3901
3920
|
onCanPlay() {
|
|
3902
|
-
this.
|
|
3903
|
-
this.loadError = false;
|
|
3921
|
+
this.innerLoading = false;
|
|
3922
|
+
this.loadError = false;
|
|
3904
3923
|
},
|
|
3905
3924
|
onVideoError() {
|
|
3906
|
-
|
|
3907
|
-
this.
|
|
3908
|
-
this.loadError = true; // 触发错误展示
|
|
3925
|
+
this.innerLoading = false;
|
|
3926
|
+
this.loadError = true;
|
|
3909
3927
|
},
|
|
3910
3928
|
formatDuration(seconds) {
|
|
3911
3929
|
if (!seconds) return "00:00";
|
|
@@ -3913,12 +3931,13 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3913
3931
|
const sec = Math.floor(seconds % 60);
|
|
3914
3932
|
return `${min.toString().padStart(2, "0")}:${sec.toString().padStart(2, "0")}`;
|
|
3915
3933
|
},
|
|
3916
|
-
// ... 其他方法 (zoomIn, zoomOut, handleWheel, startDrag 等保持不变) ...
|
|
3917
3934
|
zoomIn() {
|
|
3935
|
+
if (this.combinedLoading) return; // 加载中禁止缩放
|
|
3918
3936
|
if (this.scale < this.maxScale)
|
|
3919
3937
|
this.scale = parseFloat((this.scale + 0.2).toFixed(1));
|
|
3920
3938
|
},
|
|
3921
3939
|
zoomOut() {
|
|
3940
|
+
if (this.combinedLoading) return; // 加载中禁止缩放
|
|
3922
3941
|
if (this.scale > this.minScale)
|
|
3923
3942
|
this.scale = parseFloat((this.scale - 0.2).toFixed(1));
|
|
3924
3943
|
},
|
|
@@ -3928,6 +3947,7 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3928
3947
|
this.translateY = 0;
|
|
3929
3948
|
},
|
|
3930
3949
|
handleWheel(e) {
|
|
3950
|
+
if (this.combinedLoading) return;
|
|
3931
3951
|
const delta = e.deltaY > 0 ? -0.1 : 0.1;
|
|
3932
3952
|
const newScale = parseFloat((this.scale + delta).toFixed(1));
|
|
3933
3953
|
if (newScale >= this.minScale && newScale <= this.maxScale) {
|
|
@@ -3935,8 +3955,9 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3935
3955
|
}
|
|
3936
3956
|
},
|
|
3937
3957
|
startDrag(e) {
|
|
3958
|
+
if (this.combinedLoading) return; // 加载中禁止拖拽
|
|
3938
3959
|
if (e.target.tagName === "VIDEO" && e.offsetY > e.target.offsetHeight - 50) return;
|
|
3939
|
-
if (e.button !== 0
|
|
3960
|
+
if (e.button !== 0) return;
|
|
3940
3961
|
this.isDragging = true;
|
|
3941
3962
|
this.hasMoved = false;
|
|
3942
3963
|
this.startMousePos = { x: e.clientX, y: e.clientY };
|
|
@@ -3970,7 +3991,7 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3970
3991
|
},
|
|
3971
3992
|
handleKeyDown(e) {
|
|
3972
3993
|
if (e.key === "Escape") this.closePreview();
|
|
3973
|
-
if (e.key === " ") {
|
|
3994
|
+
if (e.key === " " && !this.combinedLoading) {
|
|
3974
3995
|
e.preventDefault();
|
|
3975
3996
|
const v = this.$refs.videoPlayer;
|
|
3976
3997
|
if (v) v.paused ? v.play() : v.pause();
|
|
@@ -3986,8 +4007,8 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3986
4007
|
|
|
3987
4008
|
// CONCATENATED MODULE: ./src/components/VideoPreviewDialog/index.vue?vue&type=script&lang=js
|
|
3988
4009
|
/* harmony default export */ var components_VideoPreviewDialogvue_type_script_lang_js = (VideoPreviewDialogvue_type_script_lang_js);
|
|
3989
|
-
// EXTERNAL MODULE: ./src/components/VideoPreviewDialog/index.vue?vue&type=style&index=0&id=
|
|
3990
|
-
var
|
|
4010
|
+
// EXTERNAL MODULE: ./src/components/VideoPreviewDialog/index.vue?vue&type=style&index=0&id=3f692c5e&prod&lang=scss&scoped=true
|
|
4011
|
+
var VideoPreviewDialogvue_type_style_index_0_id_3f692c5e_prod_lang_scss_scoped_true = __webpack_require__("a888");
|
|
3991
4012
|
|
|
3992
4013
|
// CONCATENATED MODULE: ./src/components/VideoPreviewDialog/index.vue
|
|
3993
4014
|
|
|
@@ -4000,11 +4021,11 @@ var VideoPreviewDialogvue_type_style_index_0_id_419a04c7_prod_lang_scss_scoped_t
|
|
|
4000
4021
|
|
|
4001
4022
|
var VideoPreviewDialog_component = normalizeComponent(
|
|
4002
4023
|
components_VideoPreviewDialogvue_type_script_lang_js,
|
|
4003
|
-
|
|
4004
|
-
|
|
4024
|
+
VideoPreviewDialogvue_type_template_id_3f692c5e_scoped_true_render,
|
|
4025
|
+
VideoPreviewDialogvue_type_template_id_3f692c5e_scoped_true_staticRenderFns,
|
|
4005
4026
|
false,
|
|
4006
4027
|
null,
|
|
4007
|
-
"
|
|
4028
|
+
"3f692c5e",
|
|
4008
4029
|
null
|
|
4009
4030
|
|
|
4010
4031
|
)
|