yuang-framework-ui-pc 1.1.48 → 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,18 +36,23 @@ 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++) {
|
|
42
46
|
images.value.push({
|
|
43
47
|
key: attachemtList[i].id,
|
|
44
48
|
id: attachemtList[i].id,
|
|
49
|
+
name: attachemtList[i].name,
|
|
45
50
|
url: attachemtList[i].fullUrl,
|
|
46
51
|
status: "done"
|
|
47
52
|
});
|
|
48
53
|
}
|
|
49
54
|
});
|
|
50
|
-
}
|
|
55
|
+
};
|
|
51
56
|
const handleUpload = (uploadItem2, retry) => {
|
|
52
57
|
if (!checkFile(uploadItem2.file)) {
|
|
53
58
|
return;
|
|
@@ -76,8 +81,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76
81
|
EleMessage.success(res.data.message);
|
|
77
82
|
item.progress = 100;
|
|
78
83
|
item.status = "done";
|
|
84
|
+
item.id = res.data.data.id;
|
|
79
85
|
item.url = res.data.data.fullUrl;
|
|
80
|
-
|
|
86
|
+
emitChange();
|
|
81
87
|
}).catch((e) => {
|
|
82
88
|
item.status = "exception";
|
|
83
89
|
EleMessage.error(e.message);
|
|
@@ -112,11 +118,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
112
118
|
oldItem.status = void 0;
|
|
113
119
|
oldItem.progress = 0;
|
|
114
120
|
}
|
|
121
|
+
emitChange();
|
|
115
122
|
}).catch((e) => {
|
|
116
123
|
item.status = "exception";
|
|
117
124
|
EleMessage.error(e.message);
|
|
118
125
|
});
|
|
119
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
|
+
};
|
|
120
133
|
const handleRemove = (uploadItem2) => {
|
|
121
134
|
let id = uploadItem2.id;
|
|
122
135
|
ElMessageBox.confirm("确定要删除吗?", "系统提示", { type: "warning", draggable: true }).then(() => {
|
|
@@ -37,18 +37,23 @@ 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++) {
|
|
43
47
|
images.value.push({
|
|
44
48
|
key: attachemtList[i].id,
|
|
45
49
|
id: attachemtList[i].id,
|
|
50
|
+
name: attachemtList[i].name,
|
|
46
51
|
url: attachemtList[i].fullUrl,
|
|
47
52
|
status: "done"
|
|
48
53
|
});
|
|
49
54
|
}
|
|
50
55
|
});
|
|
51
|
-
}
|
|
56
|
+
};
|
|
52
57
|
const handleUpload = (uploadItem2, retry) => {
|
|
53
58
|
if (!checkFile(uploadItem2.file)) {
|
|
54
59
|
return;
|
|
@@ -77,8 +82,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
77
82
|
message.EleMessage.success(res.data.message);
|
|
78
83
|
item.progress = 100;
|
|
79
84
|
item.status = "done";
|
|
85
|
+
item.id = res.data.data.id;
|
|
80
86
|
item.url = res.data.data.fullUrl;
|
|
81
|
-
|
|
87
|
+
emitChange();
|
|
82
88
|
}).catch((e) => {
|
|
83
89
|
item.status = "exception";
|
|
84
90
|
message.EleMessage.error(e.message);
|
|
@@ -113,11 +119,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
113
119
|
oldItem.status = void 0;
|
|
114
120
|
oldItem.progress = 0;
|
|
115
121
|
}
|
|
122
|
+
emitChange();
|
|
116
123
|
}).catch((e) => {
|
|
117
124
|
item.status = "exception";
|
|
118
125
|
message.EleMessage.error(e.message);
|
|
119
126
|
});
|
|
120
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
|
+
};
|
|
121
134
|
const handleRemove = (uploadItem2) => {
|
|
122
135
|
let id = uploadItem2.id;
|
|
123
136
|
es.ElMessageBox.confirm("确定要删除吗?", "系统提示", { type: "warning", draggable: true }).then(() => {
|