bl-common-vue3 3.8.76 → 3.8.78
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/package.json
CHANGED
package/src/common/utils/util.js
CHANGED
|
@@ -611,6 +611,36 @@ const utils = {
|
|
|
611
611
|
}
|
|
612
612
|
return true;
|
|
613
613
|
},
|
|
614
|
+
|
|
615
|
+
modalSuccess: ({
|
|
616
|
+
title = null,
|
|
617
|
+
content = null,
|
|
618
|
+
}) => {
|
|
619
|
+
Modal.success({
|
|
620
|
+
title: () => title,
|
|
621
|
+
content: () => content,
|
|
622
|
+
});
|
|
623
|
+
},
|
|
624
|
+
|
|
625
|
+
modalError: ({
|
|
626
|
+
title = null,
|
|
627
|
+
content = null,
|
|
628
|
+
}) => {
|
|
629
|
+
Modal.error({
|
|
630
|
+
title: () => title,
|
|
631
|
+
content: () => content,
|
|
632
|
+
});
|
|
633
|
+
},
|
|
634
|
+
|
|
635
|
+
modalWarning: ({
|
|
636
|
+
title = null,
|
|
637
|
+
content = null,
|
|
638
|
+
}) => {
|
|
639
|
+
Modal.warning({
|
|
640
|
+
title: () => title,
|
|
641
|
+
content: () => content,
|
|
642
|
+
});
|
|
643
|
+
}
|
|
614
644
|
};
|
|
615
645
|
|
|
616
646
|
export default utils;
|
|
@@ -397,6 +397,12 @@ export default defineComponent({
|
|
|
397
397
|
isVisit:{
|
|
398
398
|
type: Boolean,
|
|
399
399
|
default: false
|
|
400
|
+
},
|
|
401
|
+
roomParams: {
|
|
402
|
+
type: Object,
|
|
403
|
+
default: () => {
|
|
404
|
+
return {};
|
|
405
|
+
},
|
|
400
406
|
}
|
|
401
407
|
},
|
|
402
408
|
setup(props, { emit }) {
|
|
@@ -1611,6 +1617,7 @@ export default defineComponent({
|
|
|
1611
1617
|
let paramsObj = {
|
|
1612
1618
|
village_id: layOrBuild.extra.village_id,
|
|
1613
1619
|
layer_id: layOrBuild.id,
|
|
1620
|
+
...props.roomParams,
|
|
1614
1621
|
};
|
|
1615
1622
|
if (noLayer.value) {
|
|
1616
1623
|
delete paramsObj.layer_id;
|
|
@@ -1737,6 +1744,7 @@ export default defineComponent({
|
|
|
1737
1744
|
layer_id: room?.extra?.layer_id,
|
|
1738
1745
|
parent_room_id: room.id,
|
|
1739
1746
|
build_id: room?.extra?.build_id,
|
|
1747
|
+
...props.roomParams,
|
|
1740
1748
|
};
|
|
1741
1749
|
if (props.roomType?.length) {
|
|
1742
1750
|
paramsObj.room_type = props.roomType.join(',');
|
|
@@ -143,6 +143,7 @@ export default defineComponent({
|
|
|
143
143
|
formData.append(key, props.extraParams[key]);
|
|
144
144
|
})
|
|
145
145
|
}
|
|
146
|
+
formData.needMsg = true;
|
|
146
147
|
context.emit("request", {
|
|
147
148
|
params: {
|
|
148
149
|
method: props.requestInfo.serviceType,
|
|
@@ -154,22 +155,22 @@ export default defineComponent({
|
|
|
154
155
|
const defaultNext = () => {
|
|
155
156
|
loading.value = false;
|
|
156
157
|
fileList.value = [];
|
|
157
|
-
context.emit("refresh", res);
|
|
158
|
+
context.emit("refresh", res.data);
|
|
158
159
|
}
|
|
159
160
|
|
|
160
|
-
if (res.fileUrl) {
|
|
161
|
+
if (res.data.fileUrl) {
|
|
161
162
|
loading.value = false;
|
|
162
163
|
utils.modalConfirm({
|
|
163
164
|
title: t('CustomImport.index.951685-4'),
|
|
164
165
|
content: h("div", { style: "color:#666;" }, [
|
|
165
|
-
h( "div", {}, t('CustomImport.index.951685-5', [res.errorRow])),
|
|
166
|
+
h( "div", {}, t('CustomImport.index.951685-5', [res.data.errorRow])),
|
|
166
167
|
h( "div", {}, t('CustomImport.index.951685-6') ),
|
|
167
168
|
]),
|
|
168
169
|
okText: t('CustomImport.index.951685-7'),
|
|
169
170
|
cancelText: t('CustomImport.index.951685-8'),
|
|
170
171
|
onOk() {
|
|
171
172
|
const iframe = document.createElement("iframe");
|
|
172
|
-
iframe.src = res.fileUrl;
|
|
173
|
+
iframe.src = res.data.fileUrl;
|
|
173
174
|
iframe.style.display = "none";
|
|
174
175
|
document.body.appendChild(iframe);
|
|
175
176
|
setTimeout(() => {
|
|
@@ -179,11 +180,13 @@ export default defineComponent({
|
|
|
179
180
|
});
|
|
180
181
|
return;
|
|
181
182
|
}
|
|
182
|
-
if (res.errorFileKey) {
|
|
183
|
+
if (res.data.errorFileKey) {
|
|
183
184
|
defaultNext();
|
|
184
185
|
return;
|
|
185
186
|
}
|
|
186
|
-
|
|
187
|
+
utils.modalSuccess({
|
|
188
|
+
title: res.msg || t('CustomImport.index.951685-9'),
|
|
189
|
+
});
|
|
187
190
|
loading.value = false;
|
|
188
191
|
fileList.value = [];
|
|
189
192
|
context.emit("success");
|
|
@@ -174,18 +174,23 @@ export default defineComponent({
|
|
|
174
174
|
}
|
|
175
175
|
const { importInfo } = props;
|
|
176
176
|
if (importInfo.url) {
|
|
177
|
+
importInfo.extra['needMsg'] = true
|
|
177
178
|
context.emit("request", {
|
|
178
179
|
params: {
|
|
179
180
|
...importInfo,
|
|
180
181
|
},
|
|
181
|
-
success: () => {
|
|
182
|
-
|
|
182
|
+
success: (res) => {
|
|
183
|
+
utils.modalSuccess({
|
|
184
|
+
title: res.msg || t('ImportFile.index.452353-6'),
|
|
185
|
+
});
|
|
183
186
|
context.emit("success", {
|
|
184
187
|
file: state.fileList[0],
|
|
185
188
|
});
|
|
186
189
|
},
|
|
187
|
-
fail: () => {
|
|
188
|
-
|
|
190
|
+
fail: (res) => {
|
|
191
|
+
utils.modalError({
|
|
192
|
+
title: res.msg || t('ImportFile.index.452353-7'),
|
|
193
|
+
});
|
|
189
194
|
context.emit("fail", {
|
|
190
195
|
file: state.fileList[0],
|
|
191
196
|
});
|