yuang-framework-ui-pc 1.1.50 → 1.1.51
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.
|
@@ -36,6 +36,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
const model = useModel(__props, "modelValue");
|
|
37
37
|
model.value = model.value ?? getShortUuid();
|
|
38
38
|
onMounted(() => {
|
|
39
|
+
init();
|
|
40
|
+
});
|
|
41
|
+
const init = () => {
|
|
42
|
+
images.value = [];
|
|
39
43
|
http.post(`${application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { code: model.value, pageSize: 100 }).then((res) => {
|
|
40
44
|
let attachemtList = res.data.data.records;
|
|
41
45
|
for (let i = 0; i < attachemtList.length; i++) {
|
|
@@ -48,7 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
52
|
});
|
|
49
53
|
}
|
|
50
54
|
});
|
|
51
|
-
}
|
|
55
|
+
};
|
|
52
56
|
const handleUpload = (uploadItem2, retry) => {
|
|
53
57
|
if (!checkFile(uploadItem2.file)) {
|
|
54
58
|
return;
|
|
@@ -77,11 +81,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
81
|
EleMessage.success(res.data.message);
|
|
78
82
|
item.progress = 100;
|
|
79
83
|
item.status = "done";
|
|
84
|
+
item.id = res.data.data.id;
|
|
80
85
|
item.url = res.data.data.fullUrl;
|
|
81
|
-
|
|
82
|
-
let attachemtList = res2.data.data.records;
|
|
83
|
-
emit("change", attachemtList);
|
|
84
|
-
});
|
|
86
|
+
emitChange();
|
|
85
87
|
}).catch((e) => {
|
|
86
88
|
item.status = "exception";
|
|
87
89
|
EleMessage.error(e.message);
|
|
@@ -116,11 +118,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
118
|
oldItem.status = void 0;
|
|
117
119
|
oldItem.progress = 0;
|
|
118
120
|
}
|
|
121
|
+
emitChange();
|
|
119
122
|
}).catch((e) => {
|
|
120
123
|
item.status = "exception";
|
|
121
124
|
EleMessage.error(e.message);
|
|
122
125
|
});
|
|
123
126
|
};
|
|
127
|
+
const emitChange = () => {
|
|
128
|
+
http.post(`${application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { code: model.value, pageSize: 100 }).then((res) => {
|
|
129
|
+
let attachemtList = res.data.data.records;
|
|
130
|
+
emit("change", attachemtList);
|
|
131
|
+
});
|
|
132
|
+
};
|
|
124
133
|
const handleRemove = (uploadItem2) => {
|
|
125
134
|
let id = uploadItem2.id;
|
|
126
135
|
ElMessageBox.confirm("确定要删除吗?", "系统提示", { type: "warning", draggable: true }).then(() => {
|
|
@@ -37,6 +37,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
37
37
|
const model = vue.useModel(__props, "modelValue");
|
|
38
38
|
model.value = model.value ?? uuidUtils.getShortUuid();
|
|
39
39
|
vue.onMounted(() => {
|
|
40
|
+
init();
|
|
41
|
+
});
|
|
42
|
+
const init = () => {
|
|
43
|
+
images.value = [];
|
|
40
44
|
httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { code: model.value, pageSize: 100 }).then((res) => {
|
|
41
45
|
let attachemtList = res.data.data.records;
|
|
42
46
|
for (let i = 0; i < attachemtList.length; i++) {
|
|
@@ -49,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
49
53
|
});
|
|
50
54
|
}
|
|
51
55
|
});
|
|
52
|
-
}
|
|
56
|
+
};
|
|
53
57
|
const handleUpload = (uploadItem2, retry) => {
|
|
54
58
|
if (!checkFile(uploadItem2.file)) {
|
|
55
59
|
return;
|
|
@@ -78,11 +82,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
78
82
|
message.EleMessage.success(res.data.message);
|
|
79
83
|
item.progress = 100;
|
|
80
84
|
item.status = "done";
|
|
85
|
+
item.id = res.data.data.id;
|
|
81
86
|
item.url = res.data.data.fullUrl;
|
|
82
|
-
|
|
83
|
-
let attachemtList = res2.data.data.records;
|
|
84
|
-
emit("change", attachemtList);
|
|
85
|
-
});
|
|
87
|
+
emitChange();
|
|
86
88
|
}).catch((e) => {
|
|
87
89
|
item.status = "exception";
|
|
88
90
|
message.EleMessage.error(e.message);
|
|
@@ -117,11 +119,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
117
119
|
oldItem.status = void 0;
|
|
118
120
|
oldItem.progress = 0;
|
|
119
121
|
}
|
|
122
|
+
emitChange();
|
|
120
123
|
}).catch((e) => {
|
|
121
124
|
item.status = "exception";
|
|
122
125
|
message.EleMessage.error(e.message);
|
|
123
126
|
});
|
|
124
127
|
};
|
|
128
|
+
const emitChange = () => {
|
|
129
|
+
httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { code: model.value, pageSize: 100 }).then((res) => {
|
|
130
|
+
let attachemtList = res.data.data.records;
|
|
131
|
+
emit("change", attachemtList);
|
|
132
|
+
});
|
|
133
|
+
};
|
|
125
134
|
const handleRemove = (uploadItem2) => {
|
|
126
135
|
let id = uploadItem2.id;
|
|
127
136
|
es.ElMessageBox.confirm("确定要删除吗?", "系统提示", { type: "warning", draggable: true }).then(() => {
|