feat: form组件替换
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Modal title-align="start" wrapClassName="modal" body-class="body" v-bind="$attrs" centered>
|
<Modal title-align="start" wrapClassName="modal" cancelText="取消" okText="确定" body-class="body" v-bind="$attrs" centered>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
width="400px"
|
width="400px"
|
||||||
wrapClassName="exit-account-modal"
|
wrapClassName="exit-account-modal"
|
||||||
show-close="false"
|
show-close="false"
|
||||||
:footer="false"
|
:footer="null"
|
||||||
@cancel="onClose"
|
@cancel="onClose"
|
||||||
centered
|
centered
|
||||||
>
|
>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button, Checkbox } from 'ant-design-vue';
|
||||||
import { Input, Table, TableColumn, Checkbox, Pagination, Tooltip, Notification } from '@arco-design/web-vue';
|
import { Input, Table, TableColumn, Pagination, Tooltip, Notification } from '@arco-design/web-vue';
|
||||||
import { IconSearch, IconClose, IconQuestionCircle } from '@arco-design/web-vue/es/icon';
|
import { IconSearch, IconClose, IconQuestionCircle } from '@arco-design/web-vue/es/icon';
|
||||||
import NoData from '@/components/no-data';
|
import NoData from '@/components/no-data';
|
||||||
import { getTask, postRedoTask, postBatchDownload, batchQueryTaskStatus } from '@/api/all/common';
|
import { getTask, postRedoTask, postBatchDownload, batchQueryTaskStatus } from '@/api/all/common';
|
||||||
@ -247,10 +247,10 @@ export default {
|
|||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<Checkbox
|
<Checkbox
|
||||||
modelValue={checkedAll.value}
|
checked={checkedAll.value}
|
||||||
indeterminate={indeterminate.value}
|
indeterminate={indeterminate.value}
|
||||||
class="mr-8px"
|
class="mr-8px"
|
||||||
onChange={handleSelectAll}
|
onChange={(e) => handleSelectAll(e.target.checked)}
|
||||||
/>
|
/>
|
||||||
<span class="label mr-24px">
|
<span class="label mr-24px">
|
||||||
已选
|
已选
|
||||||
@ -344,7 +344,13 @@ export default {
|
|||||||
onClick={() => handleDelete(record)}
|
onClick={() => handleDelete(record)}
|
||||||
/>
|
/>
|
||||||
{record.status !== enumTaskStatus.Exporting && (
|
{record.status !== enumTaskStatus.Exporting && (
|
||||||
<Button type="primary" ghost size="small" class="search-btn" onClick={() => handleDownload(record)}>
|
<Button
|
||||||
|
type="primary"
|
||||||
|
ghost
|
||||||
|
size="small"
|
||||||
|
class="search-btn"
|
||||||
|
onClick={() => handleDownload(record)}
|
||||||
|
>
|
||||||
{record.status === enumTaskStatus.Failed ? '重新导出' : '下载'}
|
{record.status === enumTaskStatus.Failed ? '重新导出' : '下载'}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button } from 'ant-design-vue';
|
||||||
import { Input, Table, TableColumn, Checkbox, Pagination, Tooltip, Notification } from '@arco-design/web-vue';
|
import { Input, Table, TableColumn, Pagination, Tooltip, Notification } from '@arco-design/web-vue';
|
||||||
import { IconSearch, IconClose, IconQuestionCircle } from '@arco-design/web-vue/es/icon';
|
import { IconSearch, IconClose, IconQuestionCircle } from '@arco-design/web-vue/es/icon';
|
||||||
import NoData from '@/components/no-data';
|
import NoData from '@/components/no-data';
|
||||||
import { getTask } from '@/api/all/common';
|
import { getTask } from '@/api/all/common';
|
||||||
@ -119,72 +119,6 @@ export default {
|
|||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<div class="import-task-wrap">
|
<div class="import-task-wrap">
|
||||||
{/* 筛选行 */}
|
|
||||||
{/* <div class="filter-row flex mb-16px">
|
|
||||||
<div class="filter-row-item flex items-center">
|
|
||||||
<span class="label">操作人员</span>
|
|
||||||
<Input
|
|
||||||
v-model={query.value.operator_name}
|
|
||||||
class="w-240px"
|
|
||||||
placeholder="请输入操作人员"
|
|
||||||
size="medium"
|
|
||||||
allow-clear
|
|
||||||
onChange={handleSearch}
|
|
||||||
v-slots={{
|
|
||||||
prefix: () => <IconSearch />,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="filter-row-item flex items-center">
|
|
||||||
<span class="label">所属模块</span>
|
|
||||||
<Input
|
|
||||||
v-model={query.value.module}
|
|
||||||
class="w-240px"
|
|
||||||
placeholder="请输入所属模块"
|
|
||||||
size="medium"
|
|
||||||
allow-clear
|
|
||||||
onChange={handleSearch}
|
|
||||||
v-slots={{
|
|
||||||
prefix: () => <IconSearch />,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div> */}
|
|
||||||
|
|
||||||
{/* 已选提示行 */}
|
|
||||||
{/* {dataSource.value.length > 0 && selectedRows.value.length > 0 && (
|
|
||||||
<div
|
|
||||||
class={[
|
|
||||||
'tip-row flex justify-between px-16px py-10px w-100% mb-16px h-42px',
|
|
||||||
selectedRows.value.length > 0 ? ' selected' : '',
|
|
||||||
].join('')}
|
|
||||||
>
|
|
||||||
<div class="flex items-center">
|
|
||||||
<div class="flex items-center">
|
|
||||||
<Checkbox
|
|
||||||
modelValue={checkedAll.value}
|
|
||||||
indeterminate={indeterminate.value}
|
|
||||||
class="mr-8px"
|
|
||||||
onChange={handleSelectAll}
|
|
||||||
/>
|
|
||||||
<span class="label mr-24px">
|
|
||||||
已选
|
|
||||||
<span class="color-#6D4CFE">{selectedRows.value.length}</span>
|
|
||||||
个文件
|
|
||||||
</span>
|
|
||||||
<span class="operation-btn" onClick={handleBatchDownload}>
|
|
||||||
批量下载
|
|
||||||
</span>
|
|
||||||
<span class="operation-btn red" onClick={handleBatchDelete}>
|
|
||||||
批量删除
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<IconClose size={16} class="cursor-pointer color-#737478" onClick={handleCloseTip} />
|
|
||||||
</div>
|
|
||||||
)} */}
|
|
||||||
|
|
||||||
{/* 表格 */}
|
|
||||||
<Table
|
<Table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data={dataSource.value}
|
data={dataSource.value}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
wrapClassName="task-center-modal"
|
wrapClassName="task-center-modal"
|
||||||
width="860px"
|
width="860px"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:footer="false"
|
:footer="null"
|
||||||
@cancel="onClose"
|
@cancel="onClose"
|
||||||
centered
|
centered
|
||||||
>
|
>
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
&.ant-btn-lg {
|
&.ant-btn-lg {
|
||||||
height: 36px;
|
height: 36px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
|
|||||||
@ -29,6 +29,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ant-form-item-control {
|
.ant-form-item-control {
|
||||||
|
.ant-form-item-explain-error {
|
||||||
|
color: #f64b31;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
40
src/styles/components/ant-input.scss
Normal file
40
src/styles/components/ant-input.scss
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
.ant-input {
|
||||||
|
border-radius: 4px !important;
|
||||||
|
border-color: #d7d7d9 !important;
|
||||||
|
background-color: #fff !important;
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 12px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: var(--Text-4, #211F24);
|
||||||
|
font-family: $font-family-regular;
|
||||||
|
font-size: 14px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
&::placeholder {
|
||||||
|
color: var(--Text-4, #939499);
|
||||||
|
}
|
||||||
|
&.ant-input-lg {
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
|
&.ant-input-sm {
|
||||||
|
height: 28px;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
background-color: #fff !important;
|
||||||
|
}
|
||||||
|
&:focus-within,
|
||||||
|
&.arco-input-focus,
|
||||||
|
&.arco-textarea-focus {
|
||||||
|
background-color: var(--color-bg-2) !important;
|
||||||
|
border-color: rgb(var(--primary-6)) !important;
|
||||||
|
box-shadow: 0 0 0 0 var(--color-primary-light-2) !important;
|
||||||
|
}
|
||||||
|
&.ant-input-disabled {
|
||||||
|
background-color: var(--BG-200, #f2f3f5) !important;
|
||||||
|
}
|
||||||
|
.ant-input-prefix {
|
||||||
|
padding-right: 0 !important;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -18,4 +18,6 @@
|
|||||||
@import "./ant-button.scss";
|
@import "./ant-button.scss";
|
||||||
@import "./ant-table.scss";
|
@import "./ant-table.scss";
|
||||||
@import "./ant-checkbox.scss";
|
@import "./ant-checkbox.scss";
|
||||||
|
@import "./ant-input.scss";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -107,7 +107,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Modal style="width: 500px" v-model:open="editHistoryVisible">
|
<Modal style="width: 500px" v-model:open="editHistoryVisible" centered>
|
||||||
<template #title> Title</template>
|
<template #title> Title</template>
|
||||||
<div></div>
|
<div></div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@ -17,8 +17,8 @@
|
|||||||
>
|
>
|
||||||
<img src="@/assets/img/icon-logo.png" alt="" width="96" height="24" class="mb-8px" />
|
<img src="@/assets/img/icon-logo.png" alt="" width="96" height="24" class="mb-8px" />
|
||||||
<span class="text-4 color-#737478">AI营销工具</span>
|
<span class="text-4 color-#737478">AI营销工具</span>
|
||||||
<a-form ref="formRef" :model="loginForm" :rules="formRules" auto-label-width class="w-320 mt-48px form-wrap">
|
<Form ref="formRef" :model="loginForm" :rules="formRules" auto-label-width class="w-320 mt-48px form-wrap">
|
||||||
<a-form-item field="mobile" hide-label>
|
<FormItem name="mobile">
|
||||||
<a-input
|
<a-input
|
||||||
v-model="loginForm.mobile"
|
v-model="loginForm.mobile"
|
||||||
placeholder="输入手机号"
|
placeholder="输入手机号"
|
||||||
@ -28,8 +28,8 @@
|
|||||||
@blur="validateField('mobile')"
|
@blur="validateField('mobile')"
|
||||||
@input="clearError('mobile')"
|
@input="clearError('mobile')"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item field="captcha" hide-label>
|
<FormItem name="captcha">
|
||||||
<div
|
<div
|
||||||
class="form-input border border-solid border-#d7d7d9 w-100% h-48px text-14 rounded-4px color-#333 bg-#fff flex justify-between items-center"
|
class="form-input border border-solid border-#d7d7d9 w-100% h-48px text-14 rounded-4px color-#333 bg-#fff flex justify-between items-center"
|
||||||
>
|
>
|
||||||
@ -52,19 +52,19 @@
|
|||||||
>{{ countdown > 0 ? `${countdown}s` : hasGetCode ? '重新发送' : '发送验证码' }}</span
|
>{{ countdown > 0 ? `${countdown}s` : hasGetCode ? '重新发送' : '发送验证码' }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item hide-label class="mt-68px mb-16px">
|
<FormItem class="mt-68px mb-16px">
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
class="w-480 h-48 !text-16px !rounded-8px"
|
class="w-full h-48 !text-16px !rounded-8px"
|
||||||
:class="disabledSubmitBtn ? 'cursor-no-drop' : 'cursor-pointer'"
|
:class="disabledSubmitBtn ? 'cursor-no-drop' : 'cursor-pointer'"
|
||||||
:disabled="disabledSubmitBtn"
|
:disabled="disabledSubmitBtn"
|
||||||
@click="handleSubmit"
|
@click="handleSubmit"
|
||||||
>
|
>
|
||||||
{{ isLogin ? '登录' : '注册并开通企业账号' }}
|
{{ isLogin ? '登录' : '注册并开通企业账号' }}
|
||||||
</Button>
|
</Button>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</a-form>
|
</Form>
|
||||||
<a-space class="text-12px color-#737478 justify-start items-center">
|
<a-space class="text-12px color-#737478 justify-start items-center">
|
||||||
<Checkbox v-model:checked="hasCheck" class="!text-12px mr-8px"></Checkbox>
|
<Checkbox v-model:checked="hasCheck" class="!text-12px mr-8px"></Checkbox>
|
||||||
<span class="text-12px color-#737478">{{ isLogin ? '登录' : '注册' }}即代表同意</span>
|
<span class="text-12px color-#737478">{{ isLogin ? '登录' : '注册' }}即代表同意</span>
|
||||||
@ -128,7 +128,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Checkbox, Modal, Button } from 'ant-design-vue';
|
import { Checkbox, Modal, Button, Form, FormItem } from 'ant-design-vue';
|
||||||
import PuzzleVerification from './components/PuzzleVerification.vue';
|
import PuzzleVerification from './components/PuzzleVerification.vue';
|
||||||
import { fetchLoginCaptCha, fetchAuthorizationsCaptcha, fetchProfileInfo } from '@/api/all/login';
|
import { fetchLoginCaptCha, fetchAuthorizationsCaptcha, fetchProfileInfo } from '@/api/all/login';
|
||||||
import { joinEnterpriseByInviteCode } from '@/api/all';
|
import { joinEnterpriseByInviteCode } from '@/api/all';
|
||||||
@ -165,15 +165,14 @@ const formRules = {
|
|||||||
mobile: [
|
mobile: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请填写手机号',
|
validator: (_rule: any, value: string) => {
|
||||||
trigger: ['blur', 'change'],
|
if (!value) {
|
||||||
},
|
return Promise.reject('请填写手机号');
|
||||||
{
|
}
|
||||||
validator: (value: string, callback: (error?: string) => void) => {
|
|
||||||
if (!/^1[3-9]\d{9}$/.test(value)) {
|
if (!/^1[3-9]\d{9}$/.test(value)) {
|
||||||
callback('手机号格式不正确');
|
return Promise.reject('手机号格式不正确');
|
||||||
} else {
|
} else {
|
||||||
callback();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trigger: ['blur', 'change'],
|
trigger: ['blur', 'change'],
|
||||||
@ -182,15 +181,14 @@ const formRules = {
|
|||||||
captcha: [
|
captcha: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请填写验证码',
|
validator: (_rule: any, value: string) => {
|
||||||
trigger: ['blur', 'change'],
|
if (!value) {
|
||||||
},
|
return Promise.reject('请填写验证码');
|
||||||
{
|
}
|
||||||
validator: (value: string, callback: (error?: string) => void) => {
|
|
||||||
if (!/^\d{6}$/.test(value)) {
|
if (!/^\d{6}$/.test(value)) {
|
||||||
callback('验证码必须是6位数字');
|
return Promise.reject('验证码必须是6位数字');
|
||||||
} else {
|
} else {
|
||||||
callback();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trigger: ['blur', 'change'],
|
trigger: ['blur', 'change'],
|
||||||
@ -222,7 +220,7 @@ const selectAccount = (account: any, index: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const validateField = (field: string) => {
|
const validateField = (field: string) => {
|
||||||
formRef.value.validateField(field);
|
formRef.value.validateFields(field);
|
||||||
};
|
};
|
||||||
|
|
||||||
const clearError = (field: string) => {
|
const clearError = (field: string) => {
|
||||||
@ -245,11 +243,9 @@ const getCode = async () => {
|
|||||||
// 先重置验证状态
|
// 先重置验证状态
|
||||||
formRef.value.clearValidate('mobile');
|
formRef.value.clearValidate('mobile');
|
||||||
|
|
||||||
const result = await formRef.value.validateField('mobile');
|
formRef.value.validateFields('mobile').then(() => {
|
||||||
// 只有当验证通过时才会显示滑块验证
|
|
||||||
if (result === true || result === undefined) {
|
|
||||||
isVerificationVisible.value = true;
|
isVerificationVisible.value = true;
|
||||||
}
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 验证码验证通过后
|
// 验证码验证通过后
|
||||||
@ -258,8 +254,10 @@ const handleVerificationSubmit = async () => {
|
|||||||
startCountdown();
|
startCountdown();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await fetchLoginCaptCha({ mobile: loginForm.mobile });
|
const { code, message } = await fetchLoginCaptCha({ mobile: loginForm.mobile });
|
||||||
AMessage.success('验证码发送成功');
|
if (code === 200) {
|
||||||
|
AMessage.success(message);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 重置倒计时
|
// 重置倒计时
|
||||||
countdown.value = 0;
|
countdown.value = 0;
|
||||||
|
|||||||
@ -14,29 +14,37 @@
|
|||||||
<Button class="edit-button" size="small" type="primary" ghost @click="handleUpdate">修改</Button>
|
<Button class="edit-button" size="small" type="primary" ghost @click="handleUpdate">修改</Button>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<Modal v-model:open="infoVisible" width="480px" centered title="修改企业名称" :okText="okText" @ok="handleOk">
|
<Modal
|
||||||
|
v-model:open="infoVisible"
|
||||||
|
width="480px"
|
||||||
|
centered
|
||||||
|
title="修改企业名称"
|
||||||
|
:okText="okText"
|
||||||
|
@ok="handleOk"
|
||||||
|
cancelText="取消"
|
||||||
|
>
|
||||||
<p class="tips">
|
<p class="tips">
|
||||||
企业名称只能修改2次,请谨慎操作。<span
|
企业名称只能修改2次,请谨慎操作。<span
|
||||||
>(剩余{{ enterpriseInfo!.update_name_quota - enterpriseInfo!.used_update_name_count }}次)
|
>(剩余{{ enterpriseInfo!.update_name_quota - enterpriseInfo!.used_update_name_count }}次)
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<a-form
|
<Form
|
||||||
:model="form"
|
:model="form"
|
||||||
class="form"
|
class="form"
|
||||||
:label-col-props="{ span: 6, offset: 0 }"
|
:label-col-props="{ span: 6, offset: 0 }"
|
||||||
:wrapper-col-props="{ span: 18, offset: 0 }"
|
:wrapper-col-props="{ span: 18, offset: 0 }"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
>
|
>
|
||||||
<a-form-item required field="name" label="新企业名称">
|
<FormItem required name="name" label="新企业名称">
|
||||||
<a-input v-model.trim="form.name" size="small" :disabled="!canUpdate" placeholder="请输入新企业名称" />
|
<a-input v-model.trim="form.name" size="small" :disabled="!canUpdate" placeholder="请输入新企业名称" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</a-form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
<CustomerServiceModal v-model:open="customerServiceVisible" centered />
|
<CustomerServiceModal v-model:open="customerServiceVisible" centered />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button, Form, FormItem } from 'ant-design-vue';
|
||||||
import Container from '@/components/container.vue';
|
import Container from '@/components/container.vue';
|
||||||
import Modal from '@/components/modal.vue';
|
import Modal from '@/components/modal.vue';
|
||||||
import { ref, reactive, computed } from 'vue';
|
import { ref, reactive, computed } from 'vue';
|
||||||
|
|||||||
@ -20,13 +20,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<Modal v-model:open="infoVisible" centered title="修改用户信息" @ok="handleSubmitUserInfo">
|
<Modal v-model:open="infoVisible" centered title="修改用户信息" @ok="handleSubmitUserInfo">
|
||||||
<a-form
|
<Form
|
||||||
class="form"
|
class="form"
|
||||||
:model="userInfoForm"
|
:model="userInfoForm"
|
||||||
:label-col-props="{ span: 3, offset: 0 }"
|
:label-col-props="{ span: 3, offset: 0 }"
|
||||||
:wrapper-col-props="{ span: 21, offset: 0 }"
|
:wrapper-col-props="{ span: 21, offset: 0 }"
|
||||||
>
|
>
|
||||||
<a-form-item field="head_image" label="头像">
|
<FormItem name="head_image" label="头像">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<a-avatar :image-url="userInfoForm.file_url" :size="48" />
|
<a-avatar :image-url="userInfoForm.file_url" :size="48" />
|
||||||
<span class="upload-button" @click="triggerFileInput">
|
<span class="upload-button" @click="triggerFileInput">
|
||||||
@ -40,17 +40,17 @@
|
|||||||
<Button><icon-upload />上传新头像</Button>
|
<Button><icon-upload />上传新头像</Button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item field="name" label="昵称">
|
<FormItem name="name" label="昵称">
|
||||||
<a-input v-model.trim="userInfoForm.name" placeholder="请输入昵称" />
|
<a-input v-model.trim="userInfoForm.name" placeholder="请输入昵称" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</a-form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
<Modal v-model:open="imageVisible" centered title="头像裁剪">
|
<Modal v-model:open="imageVisible" centered title="头像裁剪">
|
||||||
<VueCropper></VueCropper>
|
<VueCropper></VueCropper>
|
||||||
</Modal>
|
</Modal>
|
||||||
<Modal v-model:open="mobileVisible" centered title="修改手机号" @ok="handleUpdateMobile">
|
<Modal v-model:open="mobileVisible" centered title="修改手机号" @ok="handleUpdateMobile">
|
||||||
<a-form
|
<Form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="form"
|
:model="form"
|
||||||
class="form"
|
class="form"
|
||||||
@ -59,18 +59,18 @@
|
|||||||
:wrapper-col-props="{ span: 19, offset: 0 }"
|
:wrapper-col-props="{ span: 19, offset: 0 }"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
>
|
>
|
||||||
<a-form-item required field="mobile" label="新手机号">
|
<FormItem required name="mobile" label="新手机号">
|
||||||
<a-input v-model.trim="form.mobile" size="small" placeholder="请输入新的手机号" />
|
<a-input v-model.trim="form.mobile" size="small" placeholder="请输入新的手机号" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item required field="captcha" label="获取验证码">
|
<FormItem required name="captcha" label="获取验证码">
|
||||||
<a-input v-model.trim="form.captcha" size="small" placeholder="请输入验证码">
|
<a-input v-model.trim="form.captcha" size="small" placeholder="请输入验证码">
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<span v-if="countdown <= 0" @click="sendCaptcha">发送验证码</span>
|
<span v-if="countdown <= 0" @click="sendCaptcha">发送验证码</span>
|
||||||
<span v-else>{{ countdown }}s</span>
|
<span v-else>{{ countdown }}s</span>
|
||||||
</template>
|
</template>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</a-form>
|
</Form>
|
||||||
<PuzzleVerification
|
<PuzzleVerification
|
||||||
:show="verificationVisible"
|
:show="verificationVisible"
|
||||||
@submit="handleVerificationSubmit"
|
@submit="handleVerificationSubmit"
|
||||||
@ -80,7 +80,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button, Form, FormItem } from 'ant-design-vue';
|
||||||
import Container from '@/components/container.vue';
|
import Container from '@/components/container.vue';
|
||||||
import Modal from '@/components/modal.vue';
|
import Modal from '@/components/modal.vue';
|
||||||
import PuzzleVerification from '@/views/components/login/components/PuzzleVerification.vue';
|
import PuzzleVerification from '@/views/components/login/components/PuzzleVerification.vue';
|
||||||
|
|||||||
@ -1,20 +1,9 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button, Form, FormItem } from 'ant-design-vue';
|
||||||
import { IconLoading } from '@arco-design/web-vue/es/icon';
|
import { IconLoading } from '@arco-design/web-vue/es/icon';
|
||||||
import {
|
import { Image, Input, Textarea, Tabs, Upload, TabPane, Spin, Message as AMessage } from '@arco-design/web-vue';
|
||||||
Image,
|
|
||||||
Form,
|
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
Textarea,
|
|
||||||
Tabs,
|
|
||||||
Upload,
|
|
||||||
TabPane,
|
|
||||||
Spin,
|
|
||||||
Message as AMessage,
|
|
||||||
} from '@arco-design/web-vue';
|
|
||||||
import TextOverTips from '@/components/text-over-tips';
|
import TextOverTips from '@/components/text-over-tips';
|
||||||
import HighlightTextarea from './highlight-textarea';
|
import HighlightTextarea from './highlight-textarea';
|
||||||
|
|
||||||
@ -99,15 +88,7 @@ export default {
|
|||||||
activeTab.value = key;
|
activeTab.value = key;
|
||||||
};
|
};
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
return new Promise((resolve, reject) => {
|
return formRef.value?.validate();
|
||||||
formRef.value?.validate((errors) => {
|
|
||||||
if (errors) {
|
|
||||||
reject();
|
|
||||||
} else {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
formRef.value?.resetFields?.();
|
formRef.value?.resetFields?.();
|
||||||
@ -223,7 +204,7 @@ export default {
|
|||||||
const renderTextForm = () => {
|
const renderTextForm = () => {
|
||||||
return (
|
return (
|
||||||
<Form ref={formRef} model={props.modelValue} rules={FORM_RULES} layout="vertical" auto-label-width>
|
<Form ref={formRef} model={props.modelValue} rules={FORM_RULES} layout="vertical" auto-label-width>
|
||||||
<FormItem label="标题" field="title" required>
|
<FormItem label="标题" name="title" required>
|
||||||
<Input
|
<Input
|
||||||
v-model={props.modelValue.title}
|
v-model={props.modelValue.title}
|
||||||
placeholder="请输入标题"
|
placeholder="请输入标题"
|
||||||
@ -233,7 +214,7 @@ export default {
|
|||||||
disabled={isDisabled.value}
|
disabled={isDisabled.value}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="作品描述" field="content" class="flex-1 content-form-item">
|
<FormItem label="作品描述" name="content" class="flex-1 content-form-item">
|
||||||
<HighlightTextarea
|
<HighlightTextarea
|
||||||
v-model={props.modelValue.content}
|
v-model={props.modelValue.content}
|
||||||
disabled={isDisabled.value}
|
disabled={isDisabled.value}
|
||||||
|
|||||||
@ -38,32 +38,36 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:deep(.arco-form) {
|
:deep(.ant-form) {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.arco-form-item {
|
.ant-form-item {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
.arco-form-item-label-col {
|
.ant-form-item-label-col {
|
||||||
.arco-form-item-label {
|
.ant-form-item-label {
|
||||||
color: #939499;
|
color: #939499;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content-form-item {
|
.content-form-item {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.ant-row {
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.arco-form-item-wrapper-col {
|
.ant-form-item-control-input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
.arco-form-item-content-wrapper,
|
.ant-form-item-control-input-content,
|
||||||
.arco-form-item-content,
|
.ant-form-item-control-input-content,
|
||||||
.arco-textarea-wrapper {
|
.ant-textarea-wrapper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.upload-box {
|
.upload-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-form-item field="files">
|
<FormItem name="files">
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span class="cts !color-#211F24 mr-4px">图片</span>
|
<span class="cts !color-#211F24 mr-4px">图片</span>
|
||||||
@ -44,11 +44,12 @@
|
|||||||
</a-upload>
|
</a-upload>
|
||||||
</VueDraggable>
|
</VueDraggable>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { VueDraggable } from 'vue-draggable-plus';
|
import { VueDraggable } from 'vue-draggable-plus';
|
||||||
|
import { FormItem} from 'ant-design-vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
files: {
|
files: {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button, Form, FormItem } from 'ant-design-vue';
|
||||||
import { Form, FormItem, Input, Textarea, Upload, Message as AMessage } from '@arco-design/web-vue';
|
import { Input, Textarea, Upload, Message as AMessage } from '@arco-design/web-vue';
|
||||||
// import CommonSelect from '@/components/common-select';
|
// import CommonSelect from '@/components/common-select';
|
||||||
// import { VueDraggable } from 'vue-draggable-plus';
|
// import { VueDraggable } from 'vue-draggable-plus';
|
||||||
import TextOverTips from '@/components/text-over-tips';
|
import TextOverTips from '@/components/text-over-tips';
|
||||||
@ -190,15 +190,7 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
return new Promise((resolve, reject) => {
|
return formRef.value?.validate();
|
||||||
formRef.value?.validate((errors) => {
|
|
||||||
if (errors) {
|
|
||||||
reject(formData.value);
|
|
||||||
} else {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
@ -239,7 +231,7 @@ export default {
|
|||||||
const isEnd = formData.value.videoInfo.uploadStatus === ENUM_UPLOAD_STATUS.END;
|
const isEnd = formData.value.videoInfo.uploadStatus === ENUM_UPLOAD_STATUS.END;
|
||||||
return (
|
return (
|
||||||
<FormItem
|
<FormItem
|
||||||
field="files"
|
name="files"
|
||||||
v-slots={{
|
v-slots={{
|
||||||
label: () => (
|
label: () => (
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
@ -316,10 +308,11 @@ export default {
|
|||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<Form ref={formRef} model={formData.value} rules={props.rules} layout="vertical" auto-label-width>
|
<Form ref={formRef} model={formData.value} rules={props.rules} layout="vertical" auto-label-width>
|
||||||
<FormItem label="标题" field="title" required>
|
<FormItem label="标题" name="title" required>
|
||||||
<Input
|
<Input
|
||||||
v-model={formData.value.title}
|
v-model={formData.value.title}
|
||||||
onInput={() => {
|
onInput={() => {
|
||||||
|
console.log('onInput')
|
||||||
onChange();
|
onChange();
|
||||||
emit('reValidate');
|
emit('reValidate');
|
||||||
}}
|
}}
|
||||||
@ -331,7 +324,7 @@ export default {
|
|||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="作品描述" field="content">
|
<FormItem label="作品描述" name="content">
|
||||||
<Textarea
|
<Textarea
|
||||||
v-model={formData.value.content}
|
v-model={formData.value.content}
|
||||||
onInput={onChange}
|
onInput={onChange}
|
||||||
@ -353,7 +346,7 @@ export default {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* <FormItem label="所属项目" field="project_ids">
|
{/* <FormItem label="所属项目" name="project_ids">
|
||||||
<CommonSelect
|
<CommonSelect
|
||||||
v-model={formData.value.project_ids}
|
v-model={formData.value.project_ids}
|
||||||
onChange={() => emit('change')}
|
onChange={() => emit('change')}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button, Modal } from 'ant-design-vue';
|
||||||
import { Table, TableColumn, Pagination, Tooltip, Modal } from '@arco-design/web-vue';
|
import { Table, TableColumn, Pagination, Tooltip, } from '@arco-design/web-vue';
|
||||||
import CommonSelect from '@/components/common-select';
|
import CommonSelect from '@/components/common-select';
|
||||||
import TextOverTips from '@/components/text-over-tips';
|
import TextOverTips from '@/components/text-over-tips';
|
||||||
import ShareModal from '@/views/material-center/components/finished-products/manuscript/components/share-manuscript-modal/share-modal';
|
import ShareModal from '@/views/material-center/components/finished-products/manuscript/components/share-manuscript-modal/share-modal';
|
||||||
@ -132,7 +132,7 @@ export default {
|
|||||||
onCancel={onClose}
|
onCancel={onClose}
|
||||||
centered
|
centered
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
modalClass="share-manuscript-modal"
|
wrapClassName="share-manuscript-modal"
|
||||||
v-slots={{
|
v-slots={{
|
||||||
footer: () => (
|
footer: () => (
|
||||||
<div class="flex justify-between w-full items-center">
|
<div class="flex justify-between w-full items-center">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import { Button, Modal } from 'ant-design-vue';
|
import { Button, Modal, Form, FormItem } from 'ant-design-vue';
|
||||||
import { Form, FormItem, Input, Message as AMessage } from '@arco-design/web-vue';
|
import { Input, Message as AMessage } from '@arco-design/web-vue';
|
||||||
import CommonSelect from '@/components/common-select';
|
import CommonSelect from '@/components/common-select';
|
||||||
|
|
||||||
import { useClipboard } from '@vueuse/core';
|
import { useClipboard } from '@vueuse/core';
|
||||||
@ -66,8 +66,7 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onGenerateLink = () => {
|
const onGenerateLink = () => {
|
||||||
formRef.value.validate().then(async (errors) => {
|
formRef.value.validate().then(async () => {
|
||||||
if (!errors) {
|
|
||||||
try {
|
try {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { code, data } = await postShareLinksGenerate(formData.value);
|
const { code, data } = await postShareLinksGenerate(formData.value);
|
||||||
@ -84,7 +83,6 @@ export default {
|
|||||||
} finally {
|
} finally {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const open = (workIds) => {
|
const open = (workIds) => {
|
||||||
@ -115,8 +113,15 @@ export default {
|
|||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Form ref={formRef} rules={rules} model={formData.value} auto-label-width>
|
<Form
|
||||||
<FormItem label="有效期" prop="days" row-class="!items-center">
|
ref={formRef}
|
||||||
|
rules={rules}
|
||||||
|
model={formData.value}
|
||||||
|
labelAlign="right"
|
||||||
|
labelCol={{ span: 4 }}
|
||||||
|
wrapperCol={{ span: 20 }}
|
||||||
|
>
|
||||||
|
<FormItem label="有效期" name="days" row-class="!items-center">
|
||||||
<CommonSelect
|
<CommonSelect
|
||||||
v-model={formData.value.days}
|
v-model={formData.value.days}
|
||||||
options={OPTIONS}
|
options={OPTIONS}
|
||||||
@ -129,7 +134,7 @@ export default {
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
label="分享对象"
|
label="分享对象"
|
||||||
prop="receiver"
|
name="receiver"
|
||||||
row-class="!items-center"
|
row-class="!items-center"
|
||||||
v-slots={{
|
v-slots={{
|
||||||
label: () => (
|
label: () => (
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.arco-modal-body {
|
.ant-modal-body {
|
||||||
height: 464px;
|
height: 464px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import { Modal, Button } from 'ant-design-vue';
|
import { Modal, Button, Form, FormItem } from 'ant-design-vue';
|
||||||
import { Form, FormItem, Input, RadioGroup, Radio, Upload, Message as AMessage, Textarea } from '@arco-design/web-vue';
|
import { Input, RadioGroup, Radio, Upload, Message as AMessage, Textarea } from '@arco-design/web-vue';
|
||||||
import { useClipboard } from '@vueuse/core';
|
import { useClipboard } from '@vueuse/core';
|
||||||
import { getWriterLinksGenerate, getTemplateUrl, postWorksByLink, postWorksByFile } from '@/api/all/generationWorkshop';
|
import { getWriterLinksGenerate, getTemplateUrl, postWorksByLink, postWorksByFile } from '@/api/all/generationWorkshop';
|
||||||
import { generateFullUrl } from '@/utils/tools';
|
import { generateFullUrl } from '@/utils/tools';
|
||||||
@ -109,8 +109,7 @@ export default {
|
|||||||
handleHandwriteSubmit();
|
handleHandwriteSubmit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
formRef.value?.validate(async (errors) => {
|
formRef.value?.validate().then(async () => {
|
||||||
if (!errors) {
|
|
||||||
taskStatus.value = TASK_STATUS.LOADING;
|
taskStatus.value = TASK_STATUS.LOADING;
|
||||||
const { link } = form.value;
|
const { link } = form.value;
|
||||||
const { code, data } = await postWorksByLink({ link });
|
const { code, data } = await postWorksByLink({ link });
|
||||||
@ -118,7 +117,6 @@ export default {
|
|||||||
taskStatus.value = TASK_STATUS.SUCCESS;
|
taskStatus.value = TASK_STATUS.SUCCESS;
|
||||||
works.value = data ? [data] : [];
|
works.value = data ? [data] : [];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}, 300);
|
}, 300);
|
||||||
|
|
||||||
@ -212,7 +210,7 @@ export default {
|
|||||||
|
|
||||||
// 渲染链接上传表单
|
// 渲染链接上传表单
|
||||||
const renderLinkForm = () => (
|
const renderLinkForm = () => (
|
||||||
<FormItem label="链接地址" field="link" required>
|
<FormItem label="链接地址" name="link" required>
|
||||||
<Textarea
|
<Textarea
|
||||||
v-model={form.value.link}
|
v-model={form.value.link}
|
||||||
size="large"
|
size="large"
|
||||||
@ -224,7 +222,7 @@ export default {
|
|||||||
|
|
||||||
// 渲染手写上传表单
|
// 渲染手写上传表单
|
||||||
const renderHandwriteForm = () => (
|
const renderHandwriteForm = () => (
|
||||||
<FormItem label="上传链接" field="writerLink">
|
<FormItem label="上传链接" name="writerLink">
|
||||||
<Input v-model={form.value.writerLink} placeholder="请输入上传链接" disabled size="large" />
|
<Input v-model={form.value.writerLink} placeholder="请输入上传链接" disabled size="large" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
);
|
);
|
||||||
@ -368,10 +366,7 @@ export default {
|
|||||||
destroyOnClose
|
destroyOnClose
|
||||||
centered
|
centered
|
||||||
onCancel={onClose}
|
onCancel={onClose}
|
||||||
footer={!(isDefault.value && isLocal.value)}
|
footer={(isDefault.value && isLocal.value) ? null : renderFooterButtons()}
|
||||||
v-slots={{
|
|
||||||
footer: () => renderFooterButtons(),
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Form
|
<Form
|
||||||
ref={formRef}
|
ref={formRef}
|
||||||
|
|||||||
@ -46,27 +46,27 @@
|
|||||||
<template #title>
|
<template #title>
|
||||||
<span class="modal-title">{{ form.id > 0 ? '编辑品牌' : '添加品牌' }}</span>
|
<span class="modal-title">{{ form.id > 0 ? '编辑品牌' : '添加品牌' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<a-form :model="form" :rules="formRule" ref="formRef" layout="horizontal" auto-label-width>
|
<Form :model="form" :rules="formRule" ref="formRef" layout="horizontal" auto-label-width labelAlign="right" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
|
||||||
<a-form-item field="name" label="品牌名称">
|
<FormItem name="name" label="品牌名称">
|
||||||
<a-input v-model="form.name" class="h-36px" placeholder="请输入..." />
|
<a-input v-model="form.name" class="h-36px" placeholder="请输入..." />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item field="logo" class="form-item-logo" label="标准版Logo">
|
<FormItem name="logo" class="form-item-logo" label="标准版Logo">
|
||||||
<a-space>
|
<div class="inline-flex">
|
||||||
<ImageUpload v-model="form.logo" :limit="1"></ImageUpload>
|
<ImageUpload v-model="form.logo" :limit="1"></ImageUpload>
|
||||||
</a-space>
|
</div>
|
||||||
<a-space>
|
<div class="inline-flex">
|
||||||
<span class="form-tip">(品牌常规展示使用,支持PNG,JPG格式)</span>
|
<span class="form-tip">(品牌常规展示使用,支持PNG,JPG格式)</span>
|
||||||
</a-space>
|
</div>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item field="otherLogos" class="form-item-logo" label="其他Logo">
|
<FormItem name="otherLogos" class="form-item-logo" label="其他Logo">
|
||||||
<ImageUpload v-model="form.other_logos" :limit="3"></ImageUpload>
|
<ImageUpload v-model="form.other_logos" :limit="3"></ImageUpload>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item field="slogan" label="Slogan">
|
<FormItem name="slogan" label="Slogan">
|
||||||
<a-textarea v-model="form.slogan" placeholder="请输入..." :max-length="50" show-word-limit />
|
<a-textarea v-model="form.slogan" placeholder="请输入..." :max-length="50" show-word-limit />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</a-form>
|
</Form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<Button @click="handleModalCancel" class="mr-8px">取消</Button>
|
<Button @click="handleModalCancel">取消</Button>
|
||||||
<Button type="primary" @click="handleModalOk">{{ btn_str }}</Button>
|
<Button type="primary" @click="handleModalOk">{{ btn_str }}</Button>
|
||||||
</template>
|
</template>
|
||||||
</Modal>
|
</Modal>
|
||||||
@ -128,7 +128,7 @@
|
|||||||
import { ref, computed, reactive, onMounted } from 'vue';
|
import { ref, computed, reactive, onMounted } from 'vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { IconDelete } from '@arco-design/web-vue/es/icon';
|
import { IconDelete } from '@arco-design/web-vue/es/icon';
|
||||||
import { Button, Modal } from 'ant-design-vue';
|
import { Button, Modal, Form, FormItem } from 'ant-design-vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addMaterials,
|
addMaterials,
|
||||||
@ -233,7 +233,6 @@ function handleModalOk() {
|
|||||||
formRef.value
|
formRef.value
|
||||||
.validate()
|
.validate()
|
||||||
.then((valid) => {
|
.then((valid) => {
|
||||||
if (!valid) {
|
|
||||||
if (form.id) {
|
if (form.id) {
|
||||||
updateMaterials(form.id, form).then(() => {
|
updateMaterials(form.id, form).then(() => {
|
||||||
Message.success('修改成功');
|
Message.success('修改成功');
|
||||||
@ -246,7 +245,6 @@ function handleModalOk() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
modalVisible.value = false;
|
modalVisible.value = false;
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('验证失败:', error);
|
console.error('验证失败:', error);
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
centered
|
centered
|
||||||
wrapClassName="authorized-account-modal"
|
wrapClassName="authorized-account-modal"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
:footer="modalState !== MODAL_STATE.LOADING"
|
:footer="modalState === MODAL_STATE.LOADING ? null : footer"
|
||||||
@cancel="close"
|
@cancel="close"
|
||||||
>
|
>
|
||||||
<div class="flex flex-col items-center">
|
<div class="flex flex-col items-center">
|
||||||
|
|||||||
@ -14,8 +14,8 @@
|
|||||||
<div class="mb-16px t1">
|
<div class="mb-16px t1">
|
||||||
{{ `已选${accountTagList.length}个账号` }}
|
{{ `已选${accountTagList.length}个账号` }}
|
||||||
</div>
|
</div>
|
||||||
<a-form ref="formRef" :model="form" layout="horizontal" auto-label-width>
|
<Form ref="formRef" :model="form" layout="horizontal" auto-label-width>
|
||||||
<a-form-item label="编辑方式" required>
|
<FormItem label="编辑方式" required>
|
||||||
<a-radio-group v-model="editType">
|
<a-radio-group v-model="editType">
|
||||||
<a-radio value="all">
|
<a-radio value="all">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
@ -27,8 +27,8 @@
|
|||||||
</a-radio>
|
</a-radio>
|
||||||
<a-radio value="each">分别编辑</a-radio>
|
<a-radio value="each">分别编辑</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="选择标签" required>
|
<FormItem label="选择标签" required>
|
||||||
<template v-if="editType === 'all'">
|
<template v-if="editType === 'all'">
|
||||||
<div class="flex items-center w-100%">
|
<div class="flex items-center w-100%">
|
||||||
<a-select
|
<a-select
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<span class="ml-12px">{{ `${form.tags.length}/5` }}</span>
|
<span class="ml-12px">{{ `${form.tags.length}/5` }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
|
|
||||||
<!-- 分别编辑 -->
|
<!-- 分别编辑 -->
|
||||||
<template v-if="editType === 'each'">
|
<template v-if="editType === 'each'">
|
||||||
@ -75,7 +75,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</template>
|
</template>
|
||||||
</a-form>
|
</Form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<Button size="large" @click="onClose">取消</Button>
|
<Button size="large" @click="onClose">取消</Button>
|
||||||
<Button type="primary" size="large" @click="onSubmit">确定</Button>
|
<Button type="primary" size="large" @click="onSubmit">确定</Button>
|
||||||
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive } from 'vue';
|
||||||
import { Button, Modal } from 'ant-design-vue';
|
import { Button, Modal, Form, FormItem } from 'ant-design-vue';
|
||||||
import { fetchAccountTags, batchPutTag } from '@/api/all/propertyMarketing';
|
import { fetchAccountTags, batchPutTag } from '@/api/all/propertyMarketing';
|
||||||
|
|
||||||
import icon1 from '@/assets/img/icon-question.png';
|
import icon1 from '@/assets/img/icon-question.png';
|
||||||
|
|||||||
@ -11,11 +11,11 @@
|
|||||||
centered
|
centered
|
||||||
@cancel="onClose"
|
@cancel="onClose"
|
||||||
>
|
>
|
||||||
<a-form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
|
<Form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
|
||||||
<a-form-item :label="isEdit ? '分组名称' : '新分组名称'" field="name" required>
|
<FormItem :label="isEdit ? '分组名称' : '新分组名称'" name="name" required>
|
||||||
<a-input v-model="form.name" placeholder="请输入…" />
|
<a-input v-model="form.name" placeholder="请输入…" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</a-form>
|
</Form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<Button @click="onClose">取消</Button>
|
<Button @click="onClose">取消</Button>
|
||||||
<Button type="primary" class="ml-16px" @click="onSubmit">确认</Button>
|
<Button type="primary" class="ml-16px" @click="onSubmit">确认</Button>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, nextTick } from 'vue';
|
import { ref, watch, nextTick } from 'vue';
|
||||||
import { Button, Modal } from 'ant-design-vue';
|
import { Button, Modal, Form, FormItem } from 'ant-design-vue';
|
||||||
import { postAccountGroups, putGroup } from '@/api/all/propertyMarketing';
|
import { postAccountGroups, putGroup } from '@/api/all/propertyMarketing';
|
||||||
|
|
||||||
const emits = defineEmits(['success', 'close']);
|
const emits = defineEmits(['success', 'close']);
|
||||||
@ -63,8 +63,7 @@ const open = (record = {}) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
formRef.value.validate(async (errors) => {
|
formRef.value.validate().then(async () => {
|
||||||
if (!errors) {
|
|
||||||
const _fn = isEdit.value ? putGroup : postAccountGroups;
|
const _fn = isEdit.value ? putGroup : postAccountGroups;
|
||||||
const _params = isEdit.value ? { id: groupId.value, ...form.value } : form.value;
|
const _params = isEdit.value ? { id: groupId.value, ...form.value } : form.value;
|
||||||
const { code } = await _fn(_params);
|
const { code } = await _fn(_params);
|
||||||
@ -73,7 +72,6 @@ async function onSubmit() {
|
|||||||
emits('success');
|
emits('success');
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
v-model:open="visible"
|
v-model:open="visible"
|
||||||
width="900px"
|
width="900px"
|
||||||
wrapClassName="account-manage-modal"
|
wrapClassName="account-manage-modal"
|
||||||
:footer="false"
|
:footer="null"
|
||||||
centered
|
centered
|
||||||
title="分组管理"
|
title="分组管理"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
title="重新授权"
|
title="重新授权"
|
||||||
wrapClassName="reauthorize-account-modal"
|
wrapClassName="reauthorize-account-modal"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
:footer="modalState !== MODAL_STATE.LOADING"
|
:footer="modalState === MODAL_STATE.LOADING ? null : footer"
|
||||||
@cancel="close"
|
@cancel="close"
|
||||||
>
|
>
|
||||||
<div class="flex flex-col items-center">
|
<div class="flex flex-col items-center">
|
||||||
|
|||||||
@ -7,11 +7,11 @@
|
|||||||
centered
|
centered
|
||||||
@cancel="onClose"
|
@cancel="onClose"
|
||||||
>
|
>
|
||||||
<a-form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
|
<Form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
|
||||||
<a-form-item :label="isEdit ? '标签名称' : '新标签名称'" field="name" required>
|
<FormItem :label="isEdit ? '标签名称' : '新标签名称'" name="name" required>
|
||||||
<a-input v-model="form.name" placeholder="请输入…" />
|
<a-input v-model="form.name" placeholder="请输入…" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</a-form>
|
</Form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<Button @click="onClose">取消</Button>
|
<Button @click="onClose">取消</Button>
|
||||||
<Button type="primary" class="ml-16px" @click="onSubmit">确认</Button>
|
<Button type="primary" class="ml-16px" @click="onSubmit">确认</Button>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, nextTick } from 'vue';
|
import { ref, nextTick } from 'vue';
|
||||||
import { Button, Modal } from 'ant-design-vue';
|
import { Button, Modal, Form, FormItem } from 'ant-design-vue';
|
||||||
import { postAccountTags, putTag } from '@/api/all/propertyMarketing';
|
import { postAccountTags, putTag } from '@/api/all/propertyMarketing';
|
||||||
|
|
||||||
const emits = defineEmits(['success', 'close']);
|
const emits = defineEmits(['success', 'close']);
|
||||||
@ -59,8 +59,8 @@ const open = (record = {}) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
formRef.value.validate(async (errors) => {
|
formRef.value.validate()
|
||||||
if (!errors) {
|
.then(async () => {
|
||||||
const _fn = isEdit.value ? putTag : postAccountTags;
|
const _fn = isEdit.value ? putTag : postAccountTags;
|
||||||
const _params = isEdit.value ? { id: tagId.value, ...form.value } : form.value;
|
const _params = isEdit.value ? { id: tagId.value, ...form.value } : form.value;
|
||||||
const { code } = await _fn(_params);
|
const { code } = await _fn(_params);
|
||||||
@ -69,8 +69,7 @@ async function onSubmit() {
|
|||||||
emits('success');
|
emits('success');
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open });
|
defineExpose({ open });
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
v-model:open="visible"
|
v-model:open="visible"
|
||||||
width="800px"
|
width="800px"
|
||||||
wrapClassName="tags-manage-modal"
|
wrapClassName="tags-manage-modal"
|
||||||
:footer="false"
|
:footer="null"
|
||||||
centered
|
centered
|
||||||
title="标签管理"
|
title="标签管理"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
|
|||||||
@ -3,14 +3,14 @@
|
|||||||
.tags-manage-modal {
|
.tags-manage-modal {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
||||||
.arco-modal-body {
|
.ant-modal-body {
|
||||||
// padding: 24px 24px 44px !important;
|
// padding: 24px 24px 44px !important;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.arco-btn {
|
.arcanto-btn {
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
.arco-btn-icon {
|
.ant-btn-icon {
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -144,12 +144,10 @@ const handleEdit = () => {
|
|||||||
|
|
||||||
const setCurrent = async (current) => {
|
const setCurrent = async (current) => {
|
||||||
if (isFirstStep.value) {
|
if (isFirstStep.value) {
|
||||||
const valid = await compRef.value.validate();
|
compRef.value.validate().then(() => {
|
||||||
if (!valid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
currentStep.value = current;
|
currentStep.value = current;
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const onPrev = () => {
|
const onPrev = () => {
|
||||||
currentStep.value--;
|
currentStep.value--;
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-form ref="formRef" :model="formQuery" :rules="rules" layout="horizontal" auto-label-width class="h-448px">
|
<Form ref="formRef" :model="formQuery" :rules="rules" layout="horizontal" auto-label-width class="h-448px">
|
||||||
<a-form-item label="项目名称" required field="name">
|
<FormItem label="项目名称" required name="name">
|
||||||
<a-input v-model="formQuery.name" placeholder="请输入项目名称" size="large" class="!w-400px" />
|
<a-input v-model="formQuery.name" placeholder="请输入项目名称" size="large" class="!w-400px" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="项目预算" field="budget">
|
<FormItem label="项目预算" name="budget">
|
||||||
<a-input v-model="formQuery.budget" placeholder="请输入项目预算" size="large" class="!w-400px" />
|
<a-input v-model="formQuery.budget" placeholder="请输入项目预算" size="large" class="!w-400px" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="项目目标" field="target">
|
<FormItem label="项目目标" name="target">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model="formQuery.target"
|
v-model="formQuery.target"
|
||||||
placeholder="请输入项目目标"
|
placeholder="请输入项目目标"
|
||||||
@ -14,8 +14,8 @@
|
|||||||
show-word-limit
|
show-word-limit
|
||||||
class="h-154px"
|
class="h-154px"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="项目背景" field="background">
|
<FormItem label="项目背景" name="background">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model="formQuery.background"
|
v-model="formQuery.background"
|
||||||
placeholder="请输入项目背景"
|
placeholder="请输入项目背景"
|
||||||
@ -23,11 +23,13 @@
|
|||||||
show-word-limit
|
show-word-limit
|
||||||
class="h-154px"
|
class="h-154px"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</a-form>
|
</Form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { Form, FormItem } from 'ant-design-vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formQuery: {
|
formQuery: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -42,8 +44,7 @@ const rules = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const validate = async () => {
|
const validate = async () => {
|
||||||
const errors = await formRef.value.validate();
|
return formRef.value.validate()
|
||||||
return !errors
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
|
|||||||
@ -11,11 +11,11 @@
|
|||||||
centered
|
centered
|
||||||
@cancel="onClose"
|
@cancel="onClose"
|
||||||
>
|
>
|
||||||
<a-form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
|
<Form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
|
||||||
<a-form-item :label="isEdit ? '分组名称' : '新分组名称'" field="name" required>
|
<FormItem :label="isEdit ? '分组名称' : '新分组名称'" name="name" required>
|
||||||
<a-input v-model="form.name" placeholder="请输入…" />
|
<a-input v-model="form.name" placeholder="请输入…" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</a-form>
|
</Form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<Button @click="onClose">取消</Button>
|
<Button @click="onClose">取消</Button>
|
||||||
<Button type="primary" class="ml-16px" @click="onSubmit">确认</Button>
|
<Button type="primary" class="ml-16px" @click="onSubmit">确认</Button>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, nextTick } from 'vue';
|
import { ref, watch, nextTick } from 'vue';
|
||||||
import { Button, Modal } from 'ant-design-vue';
|
import { Button, Modal, Form, FormItem } from 'ant-design-vue';
|
||||||
import { postPlacementAccountProjectGroups, putPlacementAccountProjectGroups } from '@/api/all/propertyMarketing';
|
import { postPlacementAccountProjectGroups, putPlacementAccountProjectGroups } from '@/api/all/propertyMarketing';
|
||||||
|
|
||||||
const emits = defineEmits(['success', 'close']);
|
const emits = defineEmits(['success', 'close']);
|
||||||
@ -63,8 +63,7 @@ const open = (record = {}) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
formRef.value.validate(async (errors) => {
|
formRef.value.validate().then(async () => {
|
||||||
if (!errors) {
|
|
||||||
const _fn = isEdit.value ? putPlacementAccountProjectGroups : postPlacementAccountProjectGroups;
|
const _fn = isEdit.value ? putPlacementAccountProjectGroups : postPlacementAccountProjectGroups;
|
||||||
const _params = isEdit.value ? { id: groupId.value, ...form.value } : form.value;
|
const _params = isEdit.value ? { id: groupId.value, ...form.value } : form.value;
|
||||||
const { code } = await _fn(_params);
|
const { code } = await _fn(_params);
|
||||||
@ -73,7 +72,6 @@ async function onSubmit() {
|
|||||||
emits('success');
|
emits('success');
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
v-model:open="visible"
|
v-model:open="visible"
|
||||||
width="900px"
|
width="900px"
|
||||||
wrapClassName="put-account-group-manage-modal"
|
wrapClassName="put-account-group-manage-modal"
|
||||||
:footer="false"
|
:footer="null"
|
||||||
title="分组管理"
|
title="分组管理"
|
||||||
centered
|
centered
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
|
|||||||
@ -13,17 +13,25 @@
|
|||||||
centered
|
centered
|
||||||
@cancel="onClose"
|
@cancel="onClose"
|
||||||
>
|
>
|
||||||
<a-form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
|
<Form
|
||||||
<a-form-item v-if="!isEdit" label="上传方式" required>
|
ref="formRef"
|
||||||
|
:model="form"
|
||||||
|
:rules="formRules"
|
||||||
|
layout="horizontal"
|
||||||
|
labelAlign="right"
|
||||||
|
:labelCol="{ span: 5 }"
|
||||||
|
:wrapperCol="{ span: 19 }"
|
||||||
|
>
|
||||||
|
<FormItem v-if="!isEdit" label="上传方式" required>
|
||||||
<a-radio-group v-model="uploadType">
|
<a-radio-group v-model="uploadType">
|
||||||
<a-radio value="manual">手动添加账户</a-radio>
|
<a-radio value="manual">手动添加账户</a-radio>
|
||||||
<a-radio value="batch">批量导入账户</a-radio>
|
<a-radio value="batch">批量导入账户</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
|
|
||||||
<!-- 批量导入账户模式下的内容 -->
|
<!-- 批量导入账户模式下的内容 -->
|
||||||
<template v-if="isBatchImport">
|
<template v-if="isBatchImport">
|
||||||
<a-form-item label="账户文件" required>
|
<FormItem label="账户文件" required>
|
||||||
<!-- 默认状态 -->
|
<!-- 默认状态 -->
|
||||||
<div class="upload-block">
|
<div class="upload-block">
|
||||||
<template v-if="uploadStatus === UploadStatus.DEFAULT">
|
<template v-if="uploadStatus === UploadStatus.DEFAULT">
|
||||||
@ -72,33 +80,33 @@
|
|||||||
<span class="dt">下载账户导入模板.xlsx</span>
|
<span class="dt">下载账户导入模板.xlsx</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 手动添加账户 -->
|
<!-- 手动添加账户 -->
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="isEdit">
|
<template v-if="isEdit">
|
||||||
<a-form-item label="账户名称" field="name">
|
<FormItem label="账户名称" name="name">
|
||||||
<a-input v-model="form.name" placeholder="请输入..." size="large" disabled />
|
<Input v-model:value="form.name" placeholder="请输入..." disabled />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="账户ID" field="account_id">
|
<FormItem label="账户ID" name="account_id">
|
||||||
<a-input v-model="form.account_id" placeholder="请输入..." size="large" disabled />
|
<Input v-model:value="form.account_id" placeholder="请输入..." size="large" disabled />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="状态" field="status">
|
<FormItem label="状态" name="status">
|
||||||
<StatusBox :status="form.status" />
|
<StatusBox :status="form.status" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<a-form-item label="手机号" field="mobile" required>
|
<FormItem label="手机号" name="mobile">
|
||||||
<a-input v-model="form.mobile" placeholder="请输入..." size="large" />
|
<Input v-model:value="form.mobile" placeholder="请输入..." size="large" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="运营人员" field="operator_name" required>
|
<FormItem label="运营人员" name="operator_name">
|
||||||
<a-input v-model="form.operator_name" placeholder="请输入..." class="w-240px" size="large" />
|
<Input v-model:value="form.operator_name" placeholder="请输入..." class="w-240px" size="large" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="号码持有人" field="holder_name" required>
|
<FormItem label="号码持有人" name="holder_name">
|
||||||
<a-input v-model="form.holder_name" placeholder="请输入..." class="w-240px" size="large" />
|
<Input v-model:value="form.holder_name" placeholder="请输入..." class="w-240px" size="large" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="运营平台" :required="!isEdit">
|
<FormItem label="运营平台" :required="!isEdit">
|
||||||
<div v-if="isEdit" class="flex items-center">
|
<div v-if="isEdit" class="flex items-center">
|
||||||
<img :src="PLATFORM_LIST[form.platform].icon" width="14" height="14" class="mr-4px" />
|
<img :src="PLATFORM_LIST[form.platform].icon" width="14" height="14" class="mr-4px" />
|
||||||
<span>{{ PLATFORM_LIST[form.platform].label }}</span>
|
<span>{{ PLATFORM_LIST[form.platform].label }}</span>
|
||||||
@ -111,19 +119,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-radio>
|
</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="所属项目" field="project_ids">
|
<FormItem label="所属项目" name="project_ids">
|
||||||
<CommonSelect v-model="form.project_ids" :options="projects" placeholder="请选择…" size="large" />
|
<CommonSelect v-model="form.project_ids" :options="projects" placeholder="请选择…" size="large" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<template v-if="isEdit">
|
<template v-if="isEdit">
|
||||||
<a-form-item label="账户总消耗" field="total_use_amount">
|
<FormItem label="账户总消耗" name="total_use_amount">
|
||||||
<a-input v-model="form.total_use_amount" placeholder="请输入..." size="large" disabled />
|
<Input v-model:value="form.total_use_amount" placeholder="请输入..." size="large" disabled />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="账户余额" field="balance_amount">
|
<FormItem label="账户余额" name="balance_amount">
|
||||||
<a-input v-model="form.balance_amount" placeholder="请输入..." size="large" disabled />
|
<Input v-model:value="form.balance_amount" placeholder="请输入..." size="large" disabled />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</template>
|
</template>
|
||||||
<a-form-item label="同步项目数据" field="is_sync_project">
|
<FormItem label="同步项目数据" name="is_sync_project">
|
||||||
<template #label>
|
<template #label>
|
||||||
<span class="label">同步项目数据</span>
|
<span class="label">同步项目数据</span>
|
||||||
<a-tooltip content="同步项目数据后,账户数据将同步到项目中">
|
<a-tooltip content="同步项目数据后,账户数据将同步到项目中">
|
||||||
@ -131,9 +139,9 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<a-switch v-model="form.is_sync_project" size="medium" :checked-value="1" :unchecked-value="0" />
|
<a-switch v-model="form.is_sync_project" size="medium" :checked-value="1" :unchecked-value="0" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</template>
|
</template>
|
||||||
</a-form>
|
</Form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<Button size="large" @click="onClose">取消</Button>
|
<Button size="large" @click="onClose">取消</Button>
|
||||||
<Button type="primary" size="large" @click="onSubmit" :loading="importLoading">
|
<Button type="primary" size="large" @click="onSubmit" :loading="importLoading">
|
||||||
@ -147,10 +155,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
// 添加Modal导入
|
import { Modal, Form, FormItem, Button, Input } from 'ant-design-vue';
|
||||||
import { Modal } from 'ant-design-vue';
|
|
||||||
import { ref, defineEmits } from 'vue';
|
import { ref, defineEmits } from 'vue';
|
||||||
import { Button } from 'ant-design-vue';
|
|
||||||
|
|
||||||
import AuthorizedAccountModal from '../authorized-account-modal';
|
import AuthorizedAccountModal from '../authorized-account-modal';
|
||||||
// import ImportPromptModal from '../import-prompt-modal';
|
// import ImportPromptModal from '../import-prompt-modal';
|
||||||
@ -205,26 +211,26 @@ const form = ref(cloneDeep(INITIAL_FORM));
|
|||||||
const projects = ref([]);
|
const projects = ref([]);
|
||||||
const importLoading = ref(false);
|
const importLoading = ref(false);
|
||||||
|
|
||||||
const rules = {
|
const formRules = {
|
||||||
mobile: [
|
mobile: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请填写手机号',
|
|
||||||
trigger: ['blur', 'change'],
|
trigger: ['blur', 'change'],
|
||||||
},
|
validator: (_rule, value) => {
|
||||||
{
|
if (!value) {
|
||||||
validator: (value, callback) => {
|
return Promise.reject('请填写手机号');
|
||||||
|
}
|
||||||
|
console.log({ value });
|
||||||
if (!/^1[3-9]\d{9}$/.test(value)) {
|
if (!/^1[3-9]\d{9}$/.test(value)) {
|
||||||
callback('手机号格式不正确');
|
return Promise.reject('手机号格式不正确');
|
||||||
} else {
|
} else {
|
||||||
callback();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trigger: ['blur', 'change'],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
operator_name: [{ required: true, message: '请输入运营人员' }],
|
operator_name: [{ required: true, message: '请输入运营人员', trigger: ['blur', 'change'] }],
|
||||||
holder_name: [{ required: true, message: '请输入号码持有人' }],
|
holder_name: [{ required: true, message: '请输入号码持有人', trigger: ['blur', 'change'] }],
|
||||||
};
|
};
|
||||||
|
|
||||||
const isBatchImport = computed(() => uploadType.value === 'batch');
|
const isBatchImport = computed(() => uploadType.value === 'batch');
|
||||||
@ -353,10 +359,8 @@ async function onSubmit() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
formRef.value.validate(async (errors) => {
|
formRef.value.validate().then(() => {
|
||||||
if (!errors) {
|
|
||||||
isEdit.value ? handleEdit() : handleAdd();
|
isEdit.value ? handleEdit() : handleAdd();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
.w-240px {
|
.w-240px {
|
||||||
width: 240px !important;
|
width: 240px !important;
|
||||||
}
|
}
|
||||||
.arco-modal-body {
|
.ant-modal-body {
|
||||||
.upload-block {
|
.upload-block {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.dt {
|
.dt {
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
title="获取凭证"
|
title="获取凭证"
|
||||||
wrapClassName="authorized-account-modal"
|
wrapClassName="authorized-account-modal"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
:footer="!isLoading"
|
:footer="isLoading ? null : footer"
|
||||||
centered
|
centered
|
||||||
@cancel="close"
|
@cancel="close"
|
||||||
>
|
>
|
||||||
@ -45,14 +45,14 @@
|
|||||||
<p class="s2">{{ `数据初始化${isSuccess ? '成功' : '失败'}。` }}</p>
|
<p class="s2">{{ `数据初始化${isSuccess ? '成功' : '失败'}。` }}</p>
|
||||||
<p v-if="!isSuccess" class="red-text">失败原因:{{ failReason || '-' }}</p>
|
<p v-if="!isSuccess" class="red-text">失败原因:{{ failReason || '-' }}</p>
|
||||||
</template>
|
</template>
|
||||||
<a-form v-else ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
|
<Form v-else ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
|
||||||
<a-form-item label="账户" field="account">
|
<FormItem label="账户" name="account">
|
||||||
<a-input v-model="form.account" placeholder="请输入..." size="large" />
|
<a-input v-model="form.account" placeholder="请输入..." size="large" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
<a-form-item label="密码" field="password">
|
<FormItem label="密码" name="password">
|
||||||
<a-input-password v-model="form.password" placeholder="请输入..." size="large" />
|
<a-input-password v-model="form.password" placeholder="请输入..." size="large" />
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</a-form>
|
</Form>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -66,7 +66,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
// 添加Modal导入
|
// 添加Modal导入
|
||||||
import { Modal } from 'ant-design-vue';
|
import { Modal, Form, FormItem } from 'ant-design-vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button } from 'ant-design-vue';
|
||||||
import { defineExpose, ref, computed, defineEmits } from 'vue';
|
import { defineExpose, ref, computed, defineEmits } from 'vue';
|
||||||
@ -283,8 +283,7 @@ const handleOk = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 未完成,校验表单
|
// 未完成,校验表单
|
||||||
formRef.value.validate(async (errors) => {
|
formRef.value.validate().then(() => {
|
||||||
if (errors) return;
|
|
||||||
if (shouldSelectSubAccount.value) {
|
if (shouldSelectSubAccount.value) {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
selectSubAccountModalRef.value.open({
|
selectSubAccountModalRef.value.open({
|
||||||
|
|||||||
@ -1,20 +1,9 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button, Form, FormItem } from 'ant-design-vue';
|
||||||
import { IconLoading } from '@arco-design/web-vue/es/icon';
|
import { IconLoading } from '@arco-design/web-vue/es/icon';
|
||||||
import {
|
import { Image, Input, Textarea, Tabs, Upload, TabPane, Spin, Message as AMessage } from '@arco-design/web-vue';
|
||||||
Image,
|
|
||||||
Form,
|
|
||||||
FormItem,
|
|
||||||
Input,
|
|
||||||
Textarea,
|
|
||||||
Tabs,
|
|
||||||
Upload,
|
|
||||||
TabPane,
|
|
||||||
Spin,
|
|
||||||
Message as AMessage,
|
|
||||||
} from '@arco-design/web-vue';
|
|
||||||
import TextOverTips from '@/components/text-over-tips';
|
import TextOverTips from '@/components/text-over-tips';
|
||||||
|
|
||||||
import 'swiper/css';
|
import 'swiper/css';
|
||||||
@ -98,15 +87,7 @@ export default {
|
|||||||
activeTab.value = key;
|
activeTab.value = key;
|
||||||
};
|
};
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
return new Promise((resolve, reject) => {
|
return formRef.value?.validate();
|
||||||
formRef.value?.validate((errors) => {
|
|
||||||
if (errors) {
|
|
||||||
reject();
|
|
||||||
} else {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
formRef.value?.resetFields?.();
|
formRef.value?.resetFields?.();
|
||||||
@ -222,7 +203,7 @@ export default {
|
|||||||
const renderTextForm = () => {
|
const renderTextForm = () => {
|
||||||
return (
|
return (
|
||||||
<Form ref={formRef} model={props.modelValue} rules={FORM_RULES} layout="vertical" auto-label-width>
|
<Form ref={formRef} model={props.modelValue} rules={FORM_RULES} layout="vertical" auto-label-width>
|
||||||
<FormItem label="标题" field="title" required>
|
<FormItem label="标题" name="title" required>
|
||||||
<Input
|
<Input
|
||||||
v-model={props.modelValue.title}
|
v-model={props.modelValue.title}
|
||||||
placeholder="请输入标题"
|
placeholder="请输入标题"
|
||||||
@ -232,7 +213,7 @@ export default {
|
|||||||
disabled={isDisabled.value}
|
disabled={isDisabled.value}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="作品描述" field="content" class="flex-1 content-form-item">
|
<FormItem label="作品描述" name="content" class="flex-1 content-form-item">
|
||||||
<Textarea
|
<Textarea
|
||||||
v-model={props.modelValue.content}
|
v-model={props.modelValue.content}
|
||||||
placeholder="请输入作品描述"
|
placeholder="请输入作品描述"
|
||||||
|
|||||||
@ -37,32 +37,36 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:deep(.arco-form) {
|
:deep(.ant-form) {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.arco-form-item {
|
.ant-form-item {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
.arco-form-item-label-col {
|
.ant-form-item-label-col {
|
||||||
.arco-form-item-label {
|
.ant-form-item-label {
|
||||||
color: #939499;
|
color: #939499;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content-form-item {
|
.content-form-item {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.ant-row {
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.arco-form-item-wrapper-col {
|
.ant-form-item-control-input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
.arco-form-item-content-wrapper,
|
.ant-form-item-control-input-content,
|
||||||
.arco-form-item-content,
|
.ant-form-item-control-input-content,
|
||||||
.arco-textarea-wrapper {
|
.ant-textarea-wrapper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.upload-box {
|
.upload-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-form-item field="files">
|
<FormItem name="files">
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span class="cts !color-#211F24 mr-4px">图片</span>
|
<span class="cts !color-#211F24 mr-4px">图片</span>
|
||||||
@ -44,11 +44,12 @@
|
|||||||
</a-upload>
|
</a-upload>
|
||||||
</VueDraggable>
|
</VueDraggable>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</FormItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { VueDraggable } from 'vue-draggable-plus';
|
import { VueDraggable } from 'vue-draggable-plus';
|
||||||
|
import { FormItem} from 'ant-design-vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
files: {
|
files: {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button, Form, FormItem } from 'ant-design-vue';
|
||||||
import { Form, FormItem, Input, Textarea, Upload, Message as AMessage } from '@arco-design/web-vue';
|
import { Input, Textarea, Upload, Message as AMessage } from '@arco-design/web-vue';
|
||||||
import CommonSelect from '@/components/common-select';
|
import CommonSelect from '@/components/common-select';
|
||||||
import { VueDraggable } from 'vue-draggable-plus';
|
import { VueDraggable } from 'vue-draggable-plus';
|
||||||
import TextOverTips from '@/components/text-over-tips';
|
import TextOverTips from '@/components/text-over-tips';
|
||||||
@ -192,15 +192,7 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
return new Promise((resolve, reject) => {
|
return formRef.value?.validate();
|
||||||
formRef.value?.validate((errors) => {
|
|
||||||
if (errors) {
|
|
||||||
reject(formData.value);
|
|
||||||
} else {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
@ -241,7 +233,7 @@ export default {
|
|||||||
const isEnd = formData.value.videoInfo.uploadStatus === ENUM_UPLOAD_STATUS.END;
|
const isEnd = formData.value.videoInfo.uploadStatus === ENUM_UPLOAD_STATUS.END;
|
||||||
return (
|
return (
|
||||||
<FormItem
|
<FormItem
|
||||||
field="files"
|
name="files"
|
||||||
v-slots={{
|
v-slots={{
|
||||||
label: () => (
|
label: () => (
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
@ -318,7 +310,7 @@ export default {
|
|||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<Form ref={formRef} model={formData.value} rules={props.rules} layout="vertical" auto-label-width>
|
<Form ref={formRef} model={formData.value} rules={props.rules} layout="vertical" auto-label-width>
|
||||||
<FormItem label="标题" field="title" required>
|
<FormItem label="标题" name="title" required>
|
||||||
<Input
|
<Input
|
||||||
v-model={formData.value.title}
|
v-model={formData.value.title}
|
||||||
onInput={() => {
|
onInput={() => {
|
||||||
@ -333,7 +325,7 @@ export default {
|
|||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="作品描述" field="content">
|
<FormItem label="作品描述" name="content">
|
||||||
<Textarea
|
<Textarea
|
||||||
v-model={formData.value.content}
|
v-model={formData.value.content}
|
||||||
onInput={onChange}
|
onInput={onChange}
|
||||||
@ -356,7 +348,7 @@ export default {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* <FormItem label="所属项目" field="project_ids">
|
{/* <FormItem label="所属项目" name="project_ids">
|
||||||
<CommonSelect
|
<CommonSelect
|
||||||
v-model={formData.value.project_ids}
|
v-model={formData.value.project_ids}
|
||||||
onChange={() => emit('change')}
|
onChange={() => emit('change')}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import { Button, Modal } from 'ant-design-vue';
|
import { Modal, Button, Form, FormItem } from 'ant-design-vue';
|
||||||
import { Form, FormItem, Upload, Message as AMessage, Textarea } from '@arco-design/web-vue';
|
import { Upload, Message as AMessage, Textarea } from '@arco-design/web-vue';
|
||||||
import {
|
import {
|
||||||
getTemplateUrlWriter,
|
getTemplateUrlWriter,
|
||||||
postWorksByLinkWriter,
|
postWorksByLinkWriter,
|
||||||
@ -95,8 +95,7 @@ export default {
|
|||||||
|
|
||||||
// 防抖提交
|
// 防抖提交
|
||||||
const debouncedSubmit = debounce(async () => {
|
const debouncedSubmit = debounce(async () => {
|
||||||
formRef.value?.validate(async (errors) => {
|
formRef.value?.validate().then(async () => {
|
||||||
if (!errors) {
|
|
||||||
taskStatus.value = TASK_STATUS.LOADING;
|
taskStatus.value = TASK_STATUS.LOADING;
|
||||||
const { link } = form.value;
|
const { link } = form.value;
|
||||||
const { code, data } = await postWorksByLinkWriter(writerCode.value, { link });
|
const { code, data } = await postWorksByLinkWriter(writerCode.value, { link });
|
||||||
@ -104,7 +103,6 @@ export default {
|
|||||||
taskStatus.value = TASK_STATUS.SUCCESS;
|
taskStatus.value = TASK_STATUS.SUCCESS;
|
||||||
works.value = data ? [data] : [];
|
works.value = data ? [data] : [];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}, 300);
|
}, 300);
|
||||||
|
|
||||||
@ -189,7 +187,7 @@ export default {
|
|||||||
|
|
||||||
// 渲染链接上传表单
|
// 渲染链接上传表单
|
||||||
const renderLinkForm = () => (
|
const renderLinkForm = () => (
|
||||||
<FormItem label="链接地址" field="link" required>
|
<FormItem label="链接地址" name="link" required>
|
||||||
<Textarea
|
<Textarea
|
||||||
v-model={form.value.link}
|
v-model={form.value.link}
|
||||||
size="large"
|
size="large"
|
||||||
@ -335,10 +333,7 @@ export default {
|
|||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
unmount-on-close
|
unmount-on-close
|
||||||
onCancel={onClose}
|
onCancel={onClose}
|
||||||
footer={!(isDefault.value && isLocal.value)}
|
footer={isDefault.value && isLocal.value ? null : renderFooterButtons()}
|
||||||
v-slots={{
|
|
||||||
footer: () => renderFooterButtons(),
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Form ref={formRef} model={form.value} layout="horizontal" auto-label-width>
|
<Form ref={formRef} model={form.value} layout="horizontal" auto-label-width>
|
||||||
{/* {isDefault.value && (
|
{/* {isDefault.value && (
|
||||||
|
|||||||
Reference in New Issue
Block a user