Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
256af943
Commit
256af943
authored
Nov 19, 2021
by
叶富雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改检查规则
parent
95e5647d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
29 deletions
+71
-29
src/views/zjcl/jcgz/insertJcgz.vue
+70
-28
src/views/zjcl/jcgz/queryJcgz.vue
+1
-1
No files found.
src/views/zjcl/jcgz/insertJcgz.vue
View file @
256af943
...
...
@@ -12,8 +12,8 @@
<
script
>
import
formCompontent
from
"@c/form.vue"
;
import
{
insertJcgz
,
updateJcgzById
,
selectJcgz
}
from
"@/api/zjcl/jcgz.js"
;
import
{
zjcljcgz
}
from
"@/utils/params
.js"
;
import
{
getJcgzById
,
addJcgz
,
updateJcgz
}
from
"@/api/zjcl/jcgz.js"
;
import
{
getZjclLb
}
from
"@/api/zjcl/zjcl
.js"
;
export
default
{
name
:
"insertJcgz"
,
components
:
{
...
...
@@ -29,10 +29,34 @@ export default {
id
:
1
,
objStr
:
""
,
index
:
0
,
data
:
zjcljcgz
,
data
:
[
{
name
:
"案事件类型:"
,
id
:
"ajlbdm"
,
type
:
"codeTree"
,
codeTree
:
"CODE_AJLB"
,
codeOptions
:
[],
value
:
""
,
placeholder
:
"请输入"
,
col
:
"2"
,
prop
:
'checkEmpty'
},
{
name
:
"证件分类"
,
id
:
"zjcldm"
,
type
:
"checkboxList"
,
value
:
"01"
,
placeholder
:
""
,
col
:
"22"
,
checkboxData
:
[],
},
],
},
],
formLabelAlign
:
{},
formLabelAlign
:
{
zjcldm
:
[],
},
zjclmc
:[],
breadcrumbList
:
[
{
name
:
"检查规则管理"
,
...
...
@@ -45,7 +69,7 @@ export default {
isActive
:
false
,
},
{
name
:
this
.
$route
.
query
.
xxzjbh
name
:
this
.
$route
.
query
.
ruleid
?
"修改检查规则信息"
:
"新增检查规则信息"
,
to
:
"/insertJcgz"
,
...
...
@@ -56,20 +80,30 @@ export default {
},
methods
:
{
submit
(
params
)
{
this
.
zjclmc
=
[]
for
(
let
i
of
this
.
formLabelAlign
.
zjcldm
){
for
(
let
j
of
this
.
propFormField
[
0
][
'data'
][
1
][
'checkboxData'
]){
if
(
i
==
j
.
val
){
this
.
zjclmc
.
push
(
j
.
label
)
}
}
}
let
loading
=
this
.
$loading
({
lock
:
true
,
text
:
"正在保存..."
,
spinner
:
"el-icon-loading"
,
background
:
"rgba(255, 255, 255, 0.7)"
,
});
if
(
!
this
.
xxzjbh
)
{
params
.
append
(
'zjclmc'
,
this
.
zjclmc
)
if
(
!
this
.
ruleid
)
{
this
.
addSubmit
(
params
,
loading
);
}
else
{
this
.
editSubmit
(
params
,
loading
);
}
},
addSubmit
(
params
,
loading
)
{
insert
Jcgz
(
params
).
then
((
res
)
=>
{
add
Jcgz
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
&&
res
.
code
==
200
)
{
this
.
$alert
(
"保存成功!"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
...
...
@@ -81,13 +115,13 @@ export default {
});
}
else
{
loading
.
close
();
this
.
$message
.
error
(
"添加失败,请检查数据格式是否正确"
);
this
.
$message
.
error
(
res
.
message
);
}
});
},
editSubmit
(
params
,
loading
)
{
params
.
append
(
"
xxzjbh"
,
this
.
xxzjbh
);
updateJcgz
ById
(
params
).
then
((
res
)
=>
{
params
.
append
(
"
ruleid"
,
this
.
ruleid
);
updateJcgz
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
&&
res
.
code
==
200
)
{
this
.
$alert
(
"保存成功!"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
...
...
@@ -99,7 +133,7 @@ export default {
});
}
else
{
loading
.
close
();
this
.
$message
.
error
(
"添加失败,请检查数据格式是否正确"
);
this
.
$message
.
error
(
res
.
message
);
}
});
},
...
...
@@ -111,30 +145,39 @@ export default {
background
:
"rgba(255, 255, 255, 0.7)"
,
});
var
self
=
this
;
selectJcgz
({
xxzjbh
:
this
.
xxzjbh
,
getJcgzById
({
ruleid
:
this
.
ruleid
,
}).
then
((
res
)
=>
{
var
result
=
res
.
data
.
jcgz
;
self
.
propFormField
.
forEach
((
fieldItem
)
=>
{
if
(
fieldItem
.
data
&&
fieldItem
.
data
.
length
>
0
)
{
fieldItem
.
data
.
forEach
((
i
)
=>
{
this
.
$set
(
this
.
formLabelAlign
,
i
.
id
,
result
[
i
.
id
]);
});
}
this
.
$forceUpdate
();
});
self
.
$set
(
self
.
formLabelAlign
,
"editing"
,
true
);
let
zjcldm
=
res
.
data
.
jcgz
.
zjcldm
;
self
.
formLabelAlign
.
zjcldm
=
zjcldm
.
split
(
','
)
let
ajlbdm
=
res
.
data
.
jcgz
.
ajlbdm
;
self
.
formLabelAlign
.
ajlbdm
=
ajlbdm
self
.
$forceUpdate
();
loading
.
close
();
});
},
},
created
()
{
getZjclLb
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
let
list
=
res
.
data
.
list
let
objs
=
[]
for
(
let
i
of
list
)
{
objs
.
push
({
label
:
i
.
name
,
val
:
i
.
code
})
}
this
.
propFormField
[
0
][
'data'
][
1
][
'checkboxData'
]
=
objs
}
else
{
this
.
$message
({
type
:
"warning"
,
message
:
res
.
msg
,});
}
})
this
.
$store
.
commit
(
"user/SET_Breadcrumb"
,
this
.
breadcrumbList
);
if
(
this
.
$route
.
query
.
xxzjbh
)
{
// this.$set(this.propFormField[0], "title", "修改检查规则信息");
if
(
this
.
$route
.
query
.
ruleid
)
{
this
.
title
=
"修改检查规则信息"
this
.
xxzjbh
=
this
.
$route
.
query
.
xxzjbh
;
this
.
ruleid
=
this
.
$route
.
query
.
ruleid
;
this
.
getshuju
();
}
},
...
...
@@ -142,4 +185,4 @@ export default {
</
script
>
<
style
scoped
lang=
"scss"
>
</
style
>
\ No newline at end of file
</
style
>
src/views/zjcl/jcgz/queryJcgz.vue
View file @
256af943
...
...
@@ -163,7 +163,7 @@ export default {
this
.
$router
.
push
({
path
:
"/insertJcgz"
,
query
:
{
xxzjbh
:
obj
.
row
.
xxzjbh
,
ruleid
:
obj
.
row
.
ruleid
,
},
});
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment