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 {