From 65ba85dcdb7f99b36ecfacbdc34c9b5767386208 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Tue, 23 Jul 2024 03:42:33 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/cms/mp/components/mpEdit.vue | 150 +++++++++++--------------
1 file changed, 63 insertions(+), 87 deletions(-)
diff --git a/src/views/cms/mp/components/mpEdit.vue b/src/views/cms/mp/components/mpEdit.vue
index 826296b..80b0900 100644
--- a/src/views/cms/mp/components/mpEdit.vue
+++ b/src/views/cms/mp/components/mpEdit.vue
@@ -19,18 +19,22 @@
styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' }
"
>
-
-
+
-
-
+
@@ -40,34 +44,6 @@
v-model:value="form.mpName"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -103,21 +86,7 @@
v-model:value="form.ghId"
/>
-
-
-
-
-
-
-
+
-
-
-
-
-
- 显示
- 隐藏
+
+
+ 已认证
+ 未认证
-
-
+
+
+ 正常
+ 已过期
+
@@ -196,6 +157,7 @@
// 表格选中数据
const formRef = ref(null);
const images = ref([]);
+ const mpQrcode = ref([]);
// 用户信息
const form = reactive({
@@ -217,15 +179,7 @@
sortNumber: undefined,
comments: undefined,
userId: undefined,
- status: undefined,
- deleted: undefined,
- tenantId: undefined,
- createTime: undefined,
- mpId: undefined,
- mpName: '',
- status: 0,
- comments: '',
- sortNumber: 100
+ status: undefined
});
/* 更新visible */
@@ -251,12 +205,26 @@
url: data.path,
status: 'done'
});
- form.image = data.path;
+ form.avatar = data.downloadUrl;
};
const onDeleteItem = (index: number) => {
images.value.splice(index, 1);
- form.image = '';
+ form.avatar = '';
+ };
+
+ const chooseMpQrcode = (data: FileRecord) => {
+ mpQrcode.value.push({
+ uid: data.id,
+ url: data.path,
+ status: 'done'
+ });
+ form.mpQrcode = data.downloadUrl;
+ };
+
+ const onDeleteMpQrcode = (index: number) => {
+ mpQrcode.value.splice(index, 1);
+ form.mpQrcode = '';
};
const { resetFields } = useForm(form, rules);
@@ -294,14 +262,22 @@
(visible) => {
if (visible) {
images.value = [];
+ mpQrcode.value = [];
if (props.data) {
assignObject(form, props.data);
- if(props.data.image){
+ if (props.data.avatar) {
images.value.push({
uid: uuid(),
- url: props.data.image,
+ url: props.data.avatar,
status: 'done'
- })
+ });
+ }
+ if (props.data.mpQrcode) {
+ mpQrcode.value.push({
+ uid: uuid(),
+ url: props.data.mpQrcode,
+ status: 'done'
+ });
}
isUpdate.value = true;
} else {