10/21
1. 设备详情拆分 2. 修改bug 3. logo ico
This commit is contained in:
@@ -6,6 +6,7 @@ import {hiddenPhone} from "@/utils/phone";
|
||||
import modal from "@/plugins/modal";
|
||||
import {uploadOss} from "@/api/system/oss";
|
||||
import {FormInstance, FormRules} from "element-plus";
|
||||
import Administrative from "@/data/Administrative.json";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
@@ -88,10 +89,8 @@ init()
|
||||
|
||||
|
||||
async function handleSave() {
|
||||
console.log(formRef.value);
|
||||
if (!formRef.value) return
|
||||
formRef.value.validate(async (valid) => {
|
||||
console.log('校验结果:', valid)
|
||||
if (!valid) {
|
||||
modal.msgWarning('请检查表单必填项');
|
||||
return
|
||||
@@ -114,6 +113,15 @@ function resetForm() {
|
||||
editForm.value = JSON.parse(JSON.stringify(form.value))
|
||||
formRef.value?.clearValidate()
|
||||
}
|
||||
|
||||
|
||||
const ipaddr = ref([])
|
||||
|
||||
function handelChangeQuery(code: string[]) {
|
||||
editForm.value.province = code[0] || undefined
|
||||
editForm.value.city = code[1] || undefined
|
||||
editForm.value.district = code[2] || undefined
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -131,9 +139,13 @@ function resetForm() {
|
||||
<div class="flex flex-col justify-between">
|
||||
<div>
|
||||
<span class="userName">{{ form.nickName }}</span>
|
||||
<el-tag effect="light" round style="margin: 0 12px " type="success">
|
||||
<el-tag v-if="form.status === '0'" effect="light" round style="margin: 0 12px " type="success">
|
||||
<div class="flex flex-items-center"><i class="circle"></i>
|
||||
<span>正常</span></div>
|
||||
<span>{{ form.statusName }}</span></div>
|
||||
</el-tag>
|
||||
<el-tag v-else effect="light" round style="margin: 0 12px " type="danger">
|
||||
<div class="flex flex-items-center"><i class="circle danger"></i>
|
||||
<span>{{ form.statusName }}</span></div>
|
||||
</el-tag>
|
||||
<el-tag effect="light" round type="info">{{ hiddenPhone(form.phonenumber) }}</el-tag>
|
||||
</div>
|
||||
@@ -234,7 +246,6 @@ function resetForm() {
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<FormItemTip
|
||||
:inputAttrs="{ placeholder: '请输入用户昵称', disabled: true }"
|
||||
:required="true"
|
||||
v-model="editForm.avatarUrl"
|
||||
label="头像"
|
||||
@@ -246,6 +257,31 @@ function resetForm() {
|
||||
</FormItemTip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<FormItemTip
|
||||
type="default"
|
||||
>
|
||||
<template #label>
|
||||
<span>地区</span>
|
||||
<span class="subTitle">(选填)</span>
|
||||
</template>
|
||||
<template #default>
|
||||
<el-cascader
|
||||
v-model="ipaddr"
|
||||
:clearable="true"
|
||||
:options="Administrative"
|
||||
:props="{
|
||||
label:'name',
|
||||
value:'name'
|
||||
}"
|
||||
size="large"
|
||||
@change="handelChangeQuery"
|
||||
/>
|
||||
</template>
|
||||
</FormItemTip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<FormItemTip
|
||||
@@ -300,6 +336,10 @@ function resetForm() {
|
||||
border-radius: 3px;
|
||||
margin-right: 6px;
|
||||
background-color: rgba(22, 163, 74, 1);
|
||||
|
||||
&.danger {
|
||||
background-color: rgba(255, 99, 132, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -238,10 +238,12 @@ function handelChangeQuery(code: string[]) {
|
||||
/** 查询登录日志列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await initData(queryParams.value);
|
||||
onlineList.value = res.data?.rows;
|
||||
total.value = res.data?.total;
|
||||
loading.value = false;
|
||||
initData(queryParams.value).then(res => {
|
||||
onlineList.value = res.data?.rows;
|
||||
total.value = res.data?.total;
|
||||
}).finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
|
||||
@@ -175,8 +175,8 @@ init();
|
||||
</li>
|
||||
<li>
|
||||
<span class="label">性别</span>
|
||||
<span v-if="form.gender === '0'" class="value">男</span>
|
||||
<span v-else-if="form.gender === '1'" class="value">女</span>
|
||||
<span v-if="form.gender === '1'" class="value">男</span>
|
||||
<span v-else-if="form.gender === '2'" class="value">女</span>
|
||||
<span v-else class="value">未知</span>
|
||||
</li>
|
||||
<li>
|
||||
@@ -185,7 +185,9 @@ init();
|
||||
</li>
|
||||
<li>
|
||||
<span class="label"> 所在地区</span>
|
||||
<span class="value">上海市・浦东新区</span>
|
||||
<span class="value">
|
||||
{{ form.province || '---' }} · {{ form.city || '---' }} · {{ form.district || '---' }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user