9/30
1. 设备管理界面完成 2. 用户管理界面完成 3. 会话列表完成
This commit is contained in:
242
src/views/system/customer/edit.vue
Normal file
242
src/views/system/customer/edit.vue
Normal file
@@ -0,0 +1,242 @@
|
||||
<script lang="ts" setup>
|
||||
import FormItemTip from "@/components/FormItemTip/index.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const form = ref({
|
||||
phone: "",
|
||||
username: "",
|
||||
sex: 1,
|
||||
creatDay: '',
|
||||
status: 1,
|
||||
img: ''
|
||||
})
|
||||
|
||||
|
||||
function handleBack() {
|
||||
router.replace({
|
||||
path: "/customer/customerList"
|
||||
})
|
||||
}
|
||||
|
||||
function handleChangeFile(file: File) {
|
||||
console.log(file)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="edit">
|
||||
<div class="flex justify-between">
|
||||
<pagecrumb></pagecrumb>
|
||||
<el-button plain type="info" @click="handleBack"> 返回用户列表</el-button>
|
||||
</div>
|
||||
<!-- 用户信息-->
|
||||
<section class="customerInfoBox commonCard flex justify-between flex-items-center">
|
||||
<div class="flex infoBox">
|
||||
<el-image
|
||||
class="customer-Img"
|
||||
src="https://ts3.tc.mm.bing.net/th?id=ORMS.48a27ca8353fa47bf0dc8df38854d0e1&pid=Wdp&w=312&h=172&qlt=90&c=1&rs=1&dpr=1&p=0"></el-image>
|
||||
<div class="flex flex-col justify-between">
|
||||
<div>
|
||||
<span class="userName">林小满</span>
|
||||
<el-tag effect="light" round style="margin: 0 12px " type="success">
|
||||
<div class="flex flex-items-center"><i class="circle"></i>
|
||||
<span>正常</span></div>
|
||||
</el-tag>
|
||||
<el-tag effect="light" round type="info">150****0831</el-tag>
|
||||
</div>
|
||||
<div class="subInfoBox">
|
||||
<span>用户ID: U20260918001 </span>
|
||||
<span class="dat">·</span>
|
||||
<span>注册时间: 2026-01-10 14:20</span>
|
||||
<span class="dat">·</span>
|
||||
<span>最后登录: 2026-09-17 09:35</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- form -->
|
||||
<section class="commonCard">
|
||||
<card-nav subTitle="手机号为账号唯一标识不可修改;个人资料与账号状态可维护" title="用户资料"></card-nav>
|
||||
<div class="formbox">
|
||||
<el-form label-position="top">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<FormItemTip
|
||||
v-model="form.phone"
|
||||
:inputAttrs="{ placeholder: '请输入手机号', disabled: true , showWordLimit:false ,maxlength:11}"
|
||||
label="手机号"
|
||||
prop="phone"
|
||||
tip="账号唯一标识,如需更换手机号请联系用户重新注册"
|
||||
>
|
||||
<template #suffix>不可修改</template>
|
||||
</FormItemTip>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<FormItemTip
|
||||
v-model="form.username"
|
||||
:inputAttrs="{ placeholder: '请输入用户昵称', disabled: false , showWordLimit:true ,maxlength:20}"
|
||||
:required="true"
|
||||
prop="username"
|
||||
tip="必填,最多 20 个字符,将同步展示在 APP 端"
|
||||
>
|
||||
<template #label>
|
||||
<span>用户昵称</span>
|
||||
</template>
|
||||
</FormItemTip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<FormItemTip
|
||||
v-model="form.sex"
|
||||
:radioOptions="[
|
||||
{label:'男',value:1},
|
||||
{label:'女',value:0},
|
||||
{label:'未填写',value:2},
|
||||
]"
|
||||
prop="sex"
|
||||
tip="选填,选择「未填写」时 APP 端不展示性别"
|
||||
type="radio"
|
||||
>
|
||||
<template #label>
|
||||
<span>性别</span>
|
||||
<span class="subTitle">(选填)</span>
|
||||
</template>
|
||||
</FormItemTip>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<FormItemTip
|
||||
v-model="form.creatDay"
|
||||
:inputAttrs="{ placeholder: '请选择生日'}"
|
||||
label="生日"
|
||||
prop="creatDay"
|
||||
tip="选填,修改后将同步至用户个人资料"
|
||||
type="date"
|
||||
>
|
||||
<template #label>
|
||||
<span>生日</span>
|
||||
<span class="subTitle">(选填)</span>
|
||||
</template>
|
||||
</FormItemTip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<FormItemTip
|
||||
v-model="form.status"
|
||||
:inputAttrs="{ placeholder: '', disabled: false }"
|
||||
:radioOptions="[
|
||||
{label:'正常',value:1},
|
||||
{label:'禁用',value:0},
|
||||
]"
|
||||
label="账号状态"
|
||||
prop="status"
|
||||
tip="切换为「禁用」后该账号将无法登录 APP,且已登录设备将下线"
|
||||
type="radio"
|
||||
>
|
||||
</FormItemTip>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<FormItemTip
|
||||
v-model="form.username"
|
||||
:inputAttrs="{ placeholder: '请输入用户昵称', disabled: true }"
|
||||
:required="true"
|
||||
label="头像"
|
||||
prop="username"
|
||||
tip="必填,最多 20 个字符,将同步展示在 APP 端"
|
||||
type="uploadUserAvatar"
|
||||
@file-change="handleChangeFile"
|
||||
>
|
||||
</FormItemTip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<FormItemTip
|
||||
v-model="form.phone"
|
||||
:inputAttrs="{ placeholder: '请输入后台内部备注,如工单号、对接人、异常说明等信息', disabled: false , showWordLimit:true ,maxlength:20}"
|
||||
:required="false"
|
||||
label="备注"
|
||||
prop="phone"
|
||||
type="textarea"
|
||||
>
|
||||
<template #label>
|
||||
<span>备注 </span>
|
||||
<span>(选填 · 仅后台管理员可见)</span>
|
||||
</template>
|
||||
</FormItemTip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</section>
|
||||
<div class="footer">
|
||||
<el-button>取消</el-button>
|
||||
<el-button type="primary">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.edit {
|
||||
.customerInfoBox {
|
||||
.infoBox {
|
||||
|
||||
.customer-Img {
|
||||
width: 73px;
|
||||
height: 72px;
|
||||
border-radius: 50%;
|
||||
margin-right: 24px;
|
||||
}
|
||||
|
||||
.userName {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
font-weight: bold;
|
||||
color: rgba(17, 24, 39, 1);
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.circle {
|
||||
display: block;
|
||||
width: 7px;
|
||||
height: 6px;
|
||||
border-radius: 3px;
|
||||
margin-right: 6px;
|
||||
background-color: rgba(22, 163, 74, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.subInfoBox {
|
||||
line-height: 20px;
|
||||
color: rgba(107, 114, 128, 1);
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
|
||||
.dat {
|
||||
margin: 0 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.subTitle {
|
||||
line-height: 14px;
|
||||
color: rgba(156, 163, 175, 1);
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.formbox {
|
||||
margin-top: 46px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 27px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user