@baosight/erm 1.0.54 → 1.0.55
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/ermAttach/ermAttach.vue.d.ts +32 -16
- package/lib/index.common.js +75 -30
- package/lib/index.common.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.esm.css +69 -69
- package/lib/index.esm.js +1 -1
- package/lib/index.umd.js +75 -30
- package/lib/index.umd.js.map +1 -1
- package/lib/index.umd.min.js +1 -1
- package/lib/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/lib/index.umd.js
CHANGED
|
@@ -56324,11 +56324,12 @@ ImagePreview.install = (app) => {
|
|
|
56324
56324
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/ermAttach/ermAttach.vue?vue&type=script&lang=ts&setup=true
|
|
56325
56325
|
|
|
56326
56326
|
|
|
56327
|
-
const ermAttachvue_type_script_lang_ts_setup_true_withScopeId = n => (_pushScopeId("data-v-
|
|
56327
|
+
const ermAttachvue_type_script_lang_ts_setup_true_withScopeId = n => (_pushScopeId("data-v-0a9b23b3"), n = n(), _popScopeId(), n);
|
|
56328
56328
|
const ermAttachvue_type_script_lang_ts_setup_true_hoisted_1 = {
|
|
56329
56329
|
class: "container"
|
|
56330
56330
|
};
|
|
56331
56331
|
const ermAttachvue_type_script_lang_ts_setup_true_hoisted_2 = {
|
|
56332
|
+
key: 0,
|
|
56332
56333
|
class: "button-area"
|
|
56333
56334
|
};
|
|
56334
56335
|
const ermAttachvue_type_script_lang_ts_setup_true_hoisted_3 = {
|
|
@@ -56343,8 +56344,6 @@ const ermAttachvue_type_script_lang_ts_setup_true_hoisted_4 = ["src"];
|
|
|
56343
56344
|
|
|
56344
56345
|
|
|
56345
56346
|
|
|
56346
|
-
// const servePath = 'http://10.25.145.55:10004/api/'; // 定义服务地址
|
|
56347
|
-
// const rootDirectory = '/BSMesWare/BM2A01/Attach/'; // 定义根目录
|
|
56348
56347
|
const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
56349
56348
|
/* harmony default export */ const ermAttachvue_type_script_lang_ts_setup_true = (/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
56350
56349
|
__name: 'ermAttach',
|
|
@@ -56355,29 +56354,39 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56355
56354
|
*/
|
|
56356
56355
|
recId: {
|
|
56357
56356
|
type: String,
|
|
56358
|
-
require: true
|
|
56359
|
-
default: 'TEST'
|
|
56357
|
+
require: true
|
|
56360
56358
|
},
|
|
56361
56359
|
/**
|
|
56362
|
-
*
|
|
56360
|
+
* code-框架代码
|
|
56363
56361
|
* @type {String}
|
|
56364
56362
|
*/
|
|
56365
|
-
|
|
56363
|
+
code: {
|
|
56366
56364
|
type: String,
|
|
56367
|
-
require: true
|
|
56368
|
-
default: 'http://10.25.145.55:10004/api/'
|
|
56365
|
+
require: true
|
|
56369
56366
|
},
|
|
56370
56367
|
/**
|
|
56371
|
-
*
|
|
56368
|
+
* isSort-是否排序
|
|
56372
56369
|
* @type {String}
|
|
56373
56370
|
*/
|
|
56374
|
-
|
|
56375
|
-
type:
|
|
56376
|
-
require:
|
|
56371
|
+
isSort: {
|
|
56372
|
+
type: Boolean,
|
|
56373
|
+
require: false,
|
|
56374
|
+
default: false
|
|
56375
|
+
},
|
|
56376
|
+
/**
|
|
56377
|
+
* isOnlyPreview-是否只预览
|
|
56378
|
+
* @type {String}
|
|
56379
|
+
*/
|
|
56380
|
+
isOnlyPreview: {
|
|
56381
|
+
type: Boolean,
|
|
56382
|
+
require: false,
|
|
56383
|
+
default: false
|
|
56377
56384
|
}
|
|
56378
56385
|
},
|
|
56379
56386
|
setup(__props) {
|
|
56380
56387
|
// #region import及变量定义
|
|
56388
|
+
let servePath = ''; // 定义服务地址
|
|
56389
|
+
let rootDirectory = ''; // 定义根目录
|
|
56381
56390
|
const previewURl = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(); // 文件预览地址
|
|
56382
56391
|
const fileInfo = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)([]); // 文件信息
|
|
56383
56392
|
let imageUrl = ''; // 图标路径
|
|
@@ -56395,18 +56404,21 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56395
56404
|
// #endregion
|
|
56396
56405
|
// #region 初始化服务信息
|
|
56397
56406
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
56398
|
-
|
|
56399
|
-
|
|
56407
|
+
setTimeout(() => {
|
|
56408
|
+
initServeInfo(); // 初始化服务信息
|
|
56409
|
+
}, 1000);
|
|
56400
56410
|
});
|
|
56401
|
-
|
|
56402
56411
|
const initServeInfo = () => {
|
|
56403
|
-
|
|
56404
|
-
de.getServerInfo(code).then(res => {
|
|
56412
|
+
de.getServerInfo(prop.code).then(res => {
|
|
56405
56413
|
console.log('服务器信息:', res);
|
|
56414
|
+
console.log('isOnlyPreview', prop.isOnlyPreview);
|
|
56406
56415
|
Toast({
|
|
56407
56416
|
message: '服务信息初始化成功',
|
|
56408
56417
|
duration: 2000
|
|
56409
56418
|
});
|
|
56419
|
+
servePath = res.serverUrl;
|
|
56420
|
+
rootDirectory = res.rootPath;
|
|
56421
|
+
getFile(); // 获取文件信息
|
|
56410
56422
|
}).catch(error => {
|
|
56411
56423
|
console.error('error', error);
|
|
56412
56424
|
Toast({
|
|
@@ -56418,11 +56430,16 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56418
56430
|
// #endregion
|
|
56419
56431
|
// #region 获取文件信息
|
|
56420
56432
|
const getFile = () => {
|
|
56421
|
-
de.getFilesInfo(prop.recId,
|
|
56433
|
+
de.getFilesInfo(prop.recId, servePath, rootDirectory).then(res => {
|
|
56422
56434
|
console.log('获取文件:', res);
|
|
56423
56435
|
if (res.success === true) {
|
|
56424
56436
|
fileInfo.value = res.result;
|
|
56425
56437
|
console.log('fileInfo', fileInfo.value);
|
|
56438
|
+
if (prop.isSort) {
|
|
56439
|
+
console.log('排序前', fileInfo.value);
|
|
56440
|
+
fileInfo.value.reverse();
|
|
56441
|
+
console.log('排序后', fileInfo.value);
|
|
56442
|
+
}
|
|
56426
56443
|
// 获取文件信息后,更新imgsUrl数组
|
|
56427
56444
|
imgsUrl = [];
|
|
56428
56445
|
fileInfo.value.forEach(item => {
|
|
@@ -56458,7 +56475,7 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56458
56475
|
ImagePreview(imgsUrl, indexOfImg);
|
|
56459
56476
|
} else {
|
|
56460
56477
|
previewURl.value = '';
|
|
56461
|
-
de.filePreview(e.key,
|
|
56478
|
+
de.filePreview(e.key, servePath, rootDirectory).then(res => {
|
|
56462
56479
|
console.log('预览后台返回:', res);
|
|
56463
56480
|
show.value = true;
|
|
56464
56481
|
previewURl.value = res;
|
|
@@ -56486,7 +56503,7 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56486
56503
|
console.log('blobData', blobData);
|
|
56487
56504
|
const fileName = file0.file.name; // 文件全称
|
|
56488
56505
|
const fileSize = file0.file.size; // 文件大小
|
|
56489
|
-
de.fileUpload(blobData, prop.recId, fileName, fileSize,
|
|
56506
|
+
de.fileUpload(blobData, prop.recId, fileName, fileSize, servePath, rootDirectory).then(res => {
|
|
56490
56507
|
console.log('文件上传:', res);
|
|
56491
56508
|
if (res.success === true) {
|
|
56492
56509
|
Toast.success({
|
|
@@ -56509,7 +56526,7 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56509
56526
|
console.log('blobData', blobData);
|
|
56510
56527
|
const fileName = file.file.name; // 文件全称
|
|
56511
56528
|
const fileSize = file.file.size; // 文件大小
|
|
56512
|
-
de.fileUpload(blobData, prop.recId, fileName, fileSize,
|
|
56529
|
+
de.fileUpload(blobData, prop.recId, fileName, fileSize, servePath, rootDirectory).then(res => {
|
|
56513
56530
|
console.log('文件上传:', res);
|
|
56514
56531
|
if (res.success === true) {
|
|
56515
56532
|
Toast.success({
|
|
@@ -56538,7 +56555,7 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56538
56555
|
const deleteFile = e => {
|
|
56539
56556
|
console.log('e', e);
|
|
56540
56557
|
const fileName = e.name; // 文件全称
|
|
56541
|
-
de.fileDelete(fileName, prop.recId,
|
|
56558
|
+
de.fileDelete(fileName, prop.recId, servePath, rootDirectory).then(res => {
|
|
56542
56559
|
console.log('删除文件:', res);
|
|
56543
56560
|
if (res.success === true) {
|
|
56544
56561
|
Toast({
|
|
@@ -56702,15 +56719,18 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56702
56719
|
const _component_van_swipe_cell = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("van-swipe-cell");
|
|
56703
56720
|
const _component_van_checkbox_group = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("van-checkbox-group");
|
|
56704
56721
|
const _component_van_list = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("van-list");
|
|
56722
|
+
const _component_van_image = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("van-image");
|
|
56723
|
+
const _component_van_grid_item = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("van-grid-item");
|
|
56724
|
+
const _component_van_grid = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("van-grid");
|
|
56705
56725
|
const _component_van_popup = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("van-popup");
|
|
56706
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", ermAttachvue_type_script_lang_ts_setup_true_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.
|
|
56726
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", ermAttachvue_type_script_lang_ts_setup_true_hoisted_1, [!prop.isOnlyPreview ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", ermAttachvue_type_script_lang_ts_setup_true_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_van_uploader, {
|
|
56707
56727
|
disabled: isVisible.value,
|
|
56708
56728
|
"preview-image": false,
|
|
56709
56729
|
"after-read": afterRead,
|
|
56710
56730
|
multiple: true,
|
|
56711
56731
|
"max-size": maxSize,
|
|
56712
56732
|
onOversize: onOversize,
|
|
56713
|
-
accept: ".doc,.docx,.pdf,.ppt,.pptx,.xlsx,.xls"
|
|
56733
|
+
accept: ".jpg,.png,.jpeg,.doc,.docx,.pdf,.ppt,.pptx,.xlsx,.xls"
|
|
56714
56734
|
}, {
|
|
56715
56735
|
default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_van_button, {
|
|
56716
56736
|
icon: "plus",
|
|
@@ -56751,7 +56771,9 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56751
56771
|
}, {
|
|
56752
56772
|
default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("批量管理")]),
|
|
56753
56773
|
_: 1
|
|
56754
|
-
})]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.
|
|
56774
|
+
})])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), !prop.isOnlyPreview ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_van_list, {
|
|
56775
|
+
key: 1
|
|
56776
|
+
}, {
|
|
56755
56777
|
default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_van_checkbox_group, {
|
|
56756
56778
|
modelValue: checked.value,
|
|
56757
56779
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => checked.value = $event),
|
|
@@ -56813,7 +56835,30 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56813
56835
|
_: 1
|
|
56814
56836
|
}, 8, ["modelValue"])]),
|
|
56815
56837
|
_: 1
|
|
56816
|
-
})
|
|
56838
|
+
})) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), prop.isOnlyPreview ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_van_list, {
|
|
56839
|
+
key: 2
|
|
56840
|
+
}, {
|
|
56841
|
+
default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_van_grid, {
|
|
56842
|
+
gutter: 10,
|
|
56843
|
+
border: false,
|
|
56844
|
+
"column-num": 2
|
|
56845
|
+
}, {
|
|
56846
|
+
default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_.Fragment, null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderList)(fileInfo.value, (item, index) => {
|
|
56847
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_van_grid_item, {
|
|
56848
|
+
key: index
|
|
56849
|
+
}, {
|
|
56850
|
+
default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_van_image, {
|
|
56851
|
+
fit: "fill",
|
|
56852
|
+
src: getImageUrlBySuffix(item),
|
|
56853
|
+
onClick: $event => previewFile(item, index)
|
|
56854
|
+
}, null, 8, ["src", "onClick"])]),
|
|
56855
|
+
_: 2
|
|
56856
|
+
}, 1024);
|
|
56857
|
+
}), 128))]),
|
|
56858
|
+
_: 1
|
|
56859
|
+
})]),
|
|
56860
|
+
_: 1
|
|
56861
|
+
})) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", ermAttachvue_type_script_lang_ts_setup_true_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_van_popup, {
|
|
56817
56862
|
"v-model:show": show.value,
|
|
56818
56863
|
position: "bottom",
|
|
56819
56864
|
style: {
|
|
@@ -56834,10 +56879,10 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56834
56879
|
}));
|
|
56835
56880
|
;// CONCATENATED MODULE: ./packages/ermAttach/ermAttach.vue?vue&type=script&lang=ts&setup=true
|
|
56836
56881
|
|
|
56837
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/ermAttach/ermAttach.vue?vue&type=style&index=0&id=
|
|
56882
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/ermAttach/ermAttach.vue?vue&type=style&index=0&id=0a9b23b3&lang=scss&scoped=true
|
|
56838
56883
|
// extracted by mini-css-extract-plugin
|
|
56839
56884
|
|
|
56840
|
-
;// CONCATENATED MODULE: ./packages/ermAttach/ermAttach.vue?vue&type=style&index=0&id=
|
|
56885
|
+
;// CONCATENATED MODULE: ./packages/ermAttach/ermAttach.vue?vue&type=style&index=0&id=0a9b23b3&lang=scss&scoped=true
|
|
56841
56886
|
|
|
56842
56887
|
;// CONCATENATED MODULE: ./packages/ermAttach/ermAttach.vue
|
|
56843
56888
|
|
|
@@ -56846,7 +56891,7 @@ const maxSize = 5 * 1024 * 1024; // 记录上传文件最大容量
|
|
|
56846
56891
|
;
|
|
56847
56892
|
|
|
56848
56893
|
|
|
56849
|
-
const ermAttach_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(ermAttachvue_type_script_lang_ts_setup_true, [['__scopeId',"data-v-
|
|
56894
|
+
const ermAttach_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(ermAttachvue_type_script_lang_ts_setup_true, [['__scopeId',"data-v-0a9b23b3"]])
|
|
56850
56895
|
|
|
56851
56896
|
/* harmony default export */ const ermAttach = (ermAttach_exports_);
|
|
56852
56897
|
;// CONCATENATED MODULE: ./packages/ermAttach/index.ts
|