diff --git a/src/views/modules/communityParty/article/drafts.vue b/src/views/modules/communityParty/article/drafts.vue
index 8a882997..1451da54 100644
--- a/src/views/modules/communityParty/article/drafts.vue
+++ b/src/views/modules/communityParty/article/drafts.vue
@@ -56,7 +56,7 @@ export default {
field: "创建时间",
keyName: "createdTime",
type: "date-range",
- supKeys: ["startTime", "endTime"],
+ supKeys: ["startDate", "endDate"],
supValues: ["", ""],
},
],
@@ -102,9 +102,11 @@ export default {
keyName: "imgArr",
type: "upload",
limit: 1,
+ listType: 'picture-card',
editDisabled: true,
rules: [],
value: () => [],
+ uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/article/upload",
supKeys: ["imgUrlArr", "imgUrl"],
supValues: [() => [], ""],
beforeImgUpload(file, item, that) {
diff --git a/src/views/modules/communityParty/article/index.vue b/src/views/modules/communityParty/article/index.vue
index 18c6f8db..333d13e9 100644
--- a/src/views/modules/communityParty/article/index.vue
+++ b/src/views/modules/communityParty/article/index.vue
@@ -151,6 +151,8 @@ export default {
"agencyId",
"subAgencyList"
)[vals.length - 1]["level"];
+ item["supValues"][1] =
+ item["supValues"][1] == "grid" ? "grid" : "agency";
} else {
item["supValues"][0] = "";
item["supValues"][1] = "";
@@ -161,7 +163,7 @@ export default {
field: "发布时间",
keyName: "publishTime",
type: "date-range",
- supKeys: ["startTime", "endTime"],
+ supKeys: ["startDate", "endDate"],
supValues: ["", ""],
},
],
@@ -221,9 +223,11 @@ export default {
keyName: "imgArr",
type: "upload",
limit: 1,
+ listType: "picture-card",
editDisabled: true,
rules: [],
value: () => [],
+ uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/article/upload",
supKeys: ["imgUrlArr", "imgUrl"],
supValues: [() => [], ""],
beforeImgUpload(file, item, that) {
diff --git a/src/views/modules/cpts/base/cpts/edit.vue b/src/views/modules/cpts/base/cpts/edit.vue
index 9a2226ef..73cd539c 100644
--- a/src/views/modules/cpts/base/cpts/edit.vue
+++ b/src/views/modules/cpts/base/cpts/edit.vue
@@ -198,24 +198,24 @@
"
ref="upload"
class="avatar-uploader"
- :action="uploadUrl"
+ :class="{ 'z-full': fmData[item.keyName].length >= item.limit }"
+ :action="item.uploadUrl || uploadUrl"
:data="{ customerId: customerId }"
:show-file-list="true"
:list-type="item.listType || 'picture'"
:limit="item.limit || 100"
:file-list="fmData[item.keyName]"
:on-success="(res, file) => handleImgSuccess(res, file, item)"
+ :on-error="(res, file) => handleImgError(res, file, item)"
:on-remove="(res) => handleImgRemove(res, item)"
:on-exceed="(res) => handleImgExceed(res, item)"
:before-upload="(file) => beforeImgUpload(file, item)"
>
- 点击上传
+ 点击上传
{
- item.value = "";
+ if (typeof item.value == "string") {
+ item.value = "";
+ } else if (Array.isArray(item.value)) {
+ item.value = [];
+ }
+ if (item.supValues) {
+ item.supValues = item.supValues.map((value, index) => {
+ if (typeof value == "string") {
+ return "";
+ } else if (Array.isArray(value)) {
+ return [];
+ }
+ return value;
+ });
+ }
});
},
},