fix: bugs
This commit is contained in:
@@ -142,11 +142,14 @@
|
||||
<span>{{ row.dept?.name }}</span>
|
||||
</template>
|
||||
<template #postIds="{ row }">
|
||||
<el-tag v-for="(post, index) in row.postIds" :key="index" index="">
|
||||
<template v-for="postObj in postOptions">
|
||||
{{ post === postObj.id ? postObj.name : '' }}
|
||||
</template>
|
||||
</el-tag>
|
||||
<template v-if="row.postIds !== ''">
|
||||
<el-tag v-for="(post, index) in row.postIds" :key="index" index="">
|
||||
<template v-for="postObj in postOptions">
|
||||
{{ post === postObj.id ? postObj.name : '' }}
|
||||
</template>
|
||||
</el-tag>
|
||||
</template>
|
||||
<template v-else> </template>
|
||||
</template>
|
||||
</Descriptions>
|
||||
<!-- 操作按钮 -->
|
||||
@@ -379,7 +382,7 @@ const handleCreate = async () => {
|
||||
|
||||
// 修改操作
|
||||
const handleUpdate = async (rowId: number) => {
|
||||
setDialogTile('update') // TODO @星语:有警告
|
||||
setDialogTile('update')
|
||||
await nextTick()
|
||||
unref(formRef)?.delSchema('username')
|
||||
unref(formRef)?.delSchema('password')
|
||||
|
@@ -13,8 +13,8 @@ export const rules = reactive({
|
||||
status: [required],
|
||||
mobile: [
|
||||
{
|
||||
pattern:
|
||||
/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/, // TODO @星语:前端只校验长度,格式交给后端;因为号码格式不断在变的
|
||||
min: 11,
|
||||
max: 11,
|
||||
trigger: 'blur',
|
||||
message: '请输入正确的手机号码'
|
||||
}
|
||||
@@ -57,12 +57,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
|
||||
},
|
||||
{
|
||||
title: '部门',
|
||||
field: 'deptId', // TODO 星语:详情的部门没展示
|
||||
field: 'deptId',
|
||||
isTable: false
|
||||
},
|
||||
{
|
||||
title: '岗位',
|
||||
field: 'postIds', // TODO 星语:岗位为空的时候,要不要不展示
|
||||
field: 'postIds',
|
||||
isTable: false
|
||||
},
|
||||
{
|
||||
@@ -75,7 +75,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
|
||||
{
|
||||
title: '最后登录时间',
|
||||
field: 'loginDate',
|
||||
formatter: 'formatDate', // TODO 星语:未登录的时候,不要展示 Invalid Date
|
||||
formatter: 'formatDate',
|
||||
isForm: false
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user