Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
Apper-Admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 029155fc
authored
Nov 01, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
限制
1 parent
8003b4fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
src/views/log/list/components/Dailog.vue
src/views/log/list/components/Dailog.vue
View file @
029155f
...
@@ -10,10 +10,10 @@
...
@@ -10,10 +10,10 @@
:hide-required-asterisk=
"dialogProps.isView"
:hide-required-asterisk=
"dialogProps.isView"
>
>
<el-form-item
label=
"设备号"
prop=
"sn"
v-if=
"!dialogProps.row!.device_id"
>
<el-form-item
label=
"设备号"
prop=
"sn"
v-if=
"!dialogProps.row!.device_id"
>
<el-input
v-model=
"dialogProps.row!.sn"
placeholder=
"请选择输入设备号"
clearable
></el-input>
<el-input
v-model=
"dialogProps.row!.sn"
maxlength=
"50"
placeholder=
"请选择输入设备号"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"用户名"
prop=
"user"
>
<el-form-item
label=
"用户名"
prop=
"user"
>
<el-input
v-model=
"dialogProps.row!.user"
placeholder=
"请填写用户名"
clearable
></el-input>
<el-input
v-model=
"dialogProps.row!.user"
maxlength=
"20"
placeholder=
"请填写用户名"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"手机号"
prop=
"mobile"
>
<el-form-item
label=
"手机号"
prop=
"mobile"
>
<el-input
v-model=
"dialogProps.row!.mobile"
maxlength=
"11"
placeholder=
"请填写手机号"
clearable
></el-input>
<el-input
v-model=
"dialogProps.row!.mobile"
maxlength=
"11"
placeholder=
"请填写手机号"
clearable
></el-input>
...
@@ -30,10 +30,17 @@
...
@@ -30,10 +30,17 @@
import
{
ref
,
reactive
}
from
"vue"
;
import
{
ref
,
reactive
}
from
"vue"
;
import
{
ElMessage
,
FormInstance
}
from
"element-plus"
;
import
{
ElMessage
,
FormInstance
}
from
"element-plus"
;
import
{
Device
}
from
"@/api/interface"
;
import
{
Device
}
from
"@/api/interface"
;
const
checkPhone
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"请填写手机号"
));
}
if
(
!
/^1
\d{10}
$/
.
test
(
value
))
{
return
callback
(
new
Error
(
"请填写正确手机号"
));
}
};
const
rules
=
reactive
({
const
rules
=
reactive
({
user
:
[{
required
:
true
,
message
:
"请填写用户名"
}],
user
:
[{
required
:
true
,
message
:
"请填写用户名"
}],
mobile
:
[{
required
:
true
,
message
:
"请填写手机号
"
}],
mobile
:
[{
required
:
true
,
validator
:
checkPhone
,
trigger
:
"blur
"
}],
sn
:
[{
required
:
true
,
message
:
"请填写设备号"
}]
sn
:
[{
required
:
true
,
message
:
"请填写设备号"
}]
});
});
interface
DialogParams
{
interface
DialogParams
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment