Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liangzhen
/
framework-tools-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 30a54469
authored
Apr 08, 2024
by
peiqiQQQ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加非空校验
1 parent
fc43e581
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
25 deletions
src/views/typical-example-manage/index.vue
src/views/typical-example-manage/index.vue
View file @
30a5446
...
@@ -188,11 +188,11 @@
...
@@ -188,11 +188,11 @@
:title=
"title"
:title=
"title"
:visible
.
sync=
"add_dialog"
:visible
.
sync=
"add_dialog"
:center=
"false"
:center=
"false"
width=
"6
0
%"
width=
"6
6
%"
>
>
<div
class=
"add_dialog_content"
>
<div
class=
"add_dialog_content"
>
<div
class=
"add_dialog_content"
>
<div
class=
"add_dialog_content"
>
<el-form
:model=
"formData"
ref=
"form"
>
<el-form
:model=
"formData"
ref=
"form"
:rules=
"rules"
>
<div
class=
"form_item_container"
>
<div
class=
"form_item_container"
>
<el-form-item
label=
"案例名称:"
prop=
"caseName"
>
<el-form-item
label=
"案例名称:"
prop=
"caseName"
>
<el-input
v-model=
"formData.caseName"
></el-input>
<el-input
v-model=
"formData.caseName"
></el-input>
...
@@ -322,6 +322,32 @@ export default {
...
@@ -322,6 +322,32 @@ export default {
archiDetail
:
''
,
archiDetail
:
''
,
},
},
tableHeight
:
null
,
tableHeight
:
null
,
rules
:
{
caseName
:
[
{
required
:
true
,
message
:
'请输入案例名称'
,
trigger
:
'blur'
},
],
caseType
:
[
{
required
:
true
,
message
:
'请选择案例类型'
,
trigger
:
'change'
},
],
projectType
:
[
{
required
:
true
,
message
:
'请选择项目类型'
,
trigger
:
'change'
},
],
buildContent
:
[
{
required
:
true
,
message
:
'请输入建设内容'
,
trigger
:
'blur'
},
],
problemType
:
[
{
required
:
true
,
message
:
'请选择问题类型'
,
trigger
:
'change'
},
],
problemLevel
:
[
{
required
:
true
,
message
:
'请选择问题等级'
,
trigger
:
'change'
},
],
archiDetail
:
[
{
required
:
true
,
message
:
'请输入架构详情'
,
trigger
:
'blur'
},
],
problemContent
:
[
{
required
:
true
,
message
:
'请输入问题描述'
,
trigger
:
'blur'
},
],
},
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -426,31 +452,37 @@ export default {
...
@@ -426,31 +452,37 @@ export default {
this
.
formData
.
projectType
=
String
(
this
.
formData
.
projectType
)
this
.
formData
.
projectType
=
String
(
this
.
formData
.
projectType
)
this
.
formData
.
problemLevel
=
String
(
this
.
formData
.
problemLevel
)
this
.
formData
.
problemLevel
=
String
(
this
.
formData
.
problemLevel
)
}
else
if
(
type
==
'create'
)
{
}
else
if
(
type
==
'create'
)
{
if
(
this
.
formData
.
caseId
)
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
// 编辑保存
if
(
valid
)
{
getTypicalExampleUpdate
(
this
.
formData
).
then
((
res
)
=>
{
if
(
this
.
formData
.
caseId
)
{
if
(
res
.
code
==
200
)
{
// 编辑保存
this
.
$message
.
success
(
'保存成功'
)
getTypicalExampleUpdate
(
this
.
formData
).
then
((
res
)
=>
{
this
.
add_dialog
=
false
if
(
res
.
code
==
200
)
{
this
.
getList
()
this
.
$message
.
success
(
'保存成功'
)
}
else
{
this
.
add_dialog
=
false
this
.
add_dialog
=
false
this
.
getList
()
this
.
$message
.
error
(
res
.
msg
)
}
else
{
}
this
.
add_dialog
=
false
})
this
.
$message
.
error
(
res
.
msg
)
}
else
{
}
// 新建保存
})
getTypicalExampleAdd
(
this
.
formData
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
add_dialog
=
false
this
.
getList
()
}
else
{
}
else
{
this
.
add_dialog
=
false
// 新建保存
this
.
$message
.
error
(
res
.
msg
)
getTypicalExampleAdd
(
this
.
formData
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
add_dialog
=
false
this
.
getList
()
}
else
{
this
.
add_dialog
=
false
this
.
$message
.
error
(
res
.
msg
)
}
})
}
}
})
}
else
{
}
return
false
}
})
}
else
if
(
type
==
'del'
)
{
}
else
if
(
type
==
'del'
)
{
// 删除
// 删除
this
.
$confirm
(
'确认删除吗'
,
'提示'
,
{
this
.
$confirm
(
'确认删除吗'
,
'提示'
,
{
...
...
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