Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BCDH-APP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
首开风险隐患双控平台
BCDH-APP
Commits
c613db7e
Commit
c613db7e
authored
Nov 12, 2021
by
13841799530
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解润东
202111201 问题记录编辑
parent
374e3148
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
58 deletions
+32
-58
src/views/checked/problem/note/edit/index.vue
src/views/checked/problem/note/edit/index.vue
+20
-56
src/views/checked/problem/note/index.vue
src/views/checked/problem/note/index.vue
+12
-2
No files found.
src/views/checked/problem/note/edit/index.vue
View file @
c613db7e
...
@@ -12,32 +12,22 @@
...
@@ -12,32 +12,22 @@
<div>
<div>
<LHeader
v-bind:text=
"text"
></LHeader>
<LHeader
v-bind:text=
"text"
></LHeader>
<van-form
@
submit=
"onSubmit"
@
failed=
"onFailed"
>
<van-form
@
submit=
"onSubmit"
@
failed=
"onFailed"
>
<!--
<van-field
v-model=
"problemName"
name=
"问题名称"
label=
"问题名称"
placeholder=
"问题名称"
:rules=
"[
{ required: true, message: '请填写问题名称' }]"
/> -->
<van-field
<van-field
v-model=
"
problemDescribe
"
v-model=
"
editObj.context
"
name=
"问题描述"
name=
"问题描述"
label=
"问题描述"
label=
"问题描述"
placeholder=
"问题描述"
placeholder=
"问题描述"
:rules=
"[
{ required: true, message: '请填写问题描述' }]"
:rules=
"[
{ required: true, message: '请填写问题描述' }]"
:disabled="isFormwork"
/>
/>
<van-field
<van-field
v-if=
"islay"
v-model=
"editObj.checkBasis"
v-model=
"checkBasis"
name=
"法律依据"
name=
"法律依据"
label=
"法律依据"
label=
"法律依据"
placeholder=
"法律依据"
placeholder=
"法律依据"
:disabled=
"isFormwork"
:rules=
"[
{ required: true, message: '请填写法律依据' }]"
:rules=
"[
{ required: true, message: '请填写法律依据' }]"
/>
/>
<van-field
<van-field
v-model=
"
problemPosition
"
v-model=
"
editObj.address
"
name=
"问题位置"
name=
"问题位置"
label=
"问题位置"
label=
"问题位置"
placeholder=
"问题位置"
placeholder=
"问题位置"
...
@@ -47,11 +37,10 @@
...
@@ -47,11 +37,10 @@
readonly
readonly
clickable
clickable
name=
"picker"
name=
"picker"
:value=
"value"
:value=
"
editObj.
value"
label=
"责任单位"
label=
"责任单位"
:disabled=
"Isvalue"
placeholder=
"请选择部门"
placeholder=
"请选择部门"
@
click=
"
!Isvalue?showPicker = true:showPicker = fals
e"
@
click=
"
showPicker = tru
e"
:rules=
"[
{ required: true, message: '请填写问题位置' }]"
:rules=
"[
{ required: true, message: '请填写问题位置' }]"
/>
/>
<van-popup
v-model=
"showPicker"
position=
"bottom"
>
<van-popup
v-model=
"showPicker"
position=
"bottom"
>
...
@@ -66,12 +55,12 @@
...
@@ -66,12 +55,12 @@
</van-popup>
</van-popup>
<van-field
name=
"uploader"
label=
"图像上传"
:rules=
"[
{ required: true, message: '请上传图像' }]">
<van-field
name=
"uploader"
label=
"图像上传"
:rules=
"[
{ required: true, message: '请上传图像' }]">
<template
#input
>
<template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"
uploaderImg
"
/>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"
editObj.pictures
"
/>
</
template
>
</
template
>
</van-field>
</van-field>
<van-field
name=
"uploader2"
label=
"视频上传"
:rules=
"[{ required: true, message: '请上传视频' }]"
>
<van-field
name=
"uploader2"
label=
"视频上传"
:rules=
"[{ required: true, message: '请上传视频' }]"
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"
uploaderVideo
"
/>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"
editObj.videos
"
/>
</
template
>
</
template
>
</van-field>
</van-field>
<div
style=
"margin: 0.5rem"
>
<div
style=
"margin: 0.5rem"
>
...
@@ -95,43 +84,21 @@ export default {
...
@@ -95,43 +84,21 @@ export default {
data
()
{
data
()
{
return
{
return
{
/* form表单 */
/* form表单 */
// problemName:'',//问题名称
editObj
:{},
problemPosition
:
''
,
//问题位置
value
:
''
,
//责任单位
value
:
''
,
//责任单位
valueId
:
0
,
//责任单位id
problemDescribe
:
''
,
//问题描述
uploaderImg
:[],
//图像上传
uploaderVideo
:[],
//视频上传
checkBasis
:
''
,
//法律依据
showPicker
:
false
,
//默认是否展示弹出层
showPicker
:
false
,
//默认是否展示弹出层
columns
:
[],
//下拉数组
columns
:
[],
//下拉数组
text
:
'
问题编辑
'
,
//顶部文本
text
:
'
问题编辑
'
,
//顶部文本
jumpObj
:{},
//跳转对象
id
:
''
,
//检查执行id
ids
:[],
//下拉框选中值数组id
ids
:[],
//下拉框选中值数组id
planId
:
''
,
//不合格跳转进本页面所传列表id
planItemId
:
''
,
//不合格跳转进本页面所传列id
islay
:
false
,
//是否显示法律依据
isFormwork
:
false
,
//决定是否从不合格跳转到本页面是否禁用检查名称,内容,法律依据
Isvalue
:
false
,
//是否禁用责任单位
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
$route
.
query
.
id
){
if
(
this
.
$route
.
query
.
name
==
'
note
'
){
this
.
id
=
this
.
$route
.
query
.
id
this
.
editObj
=
JSON
.
parse
(
this
.
$route
.
query
.
obj
)
var
obj
=
JSON
.
parse
(
this
.
$route
.
query
.
obj
)
this
.
editObj
.
value
=
""
this
.
Isvalue
=
obj
.
projectFlag
this
.
editObj
.
pictures
=
[]
this
.
ids
=
obj
.
deptIdList
this
.
editObj
.
videos
=
[]
this
.
value
=
obj
.
deptNameList
.
join
(
'
/
'
)
console
.
log
(
this
.
editObj
)
}
if
(
this
.
$route
.
query
.
name
==
'
formwork
'
){
// this.problemName=this.$route.query.checkitem,//检查项目
this
.
problemDescribe
=
this
.
$route
.
query
.
checkContent
,
//检查内容
this
.
checkBasis
=
this
.
$route
.
query
.
checkBasis
//法规依据
this
.
isFormwork
=
true
this
.
planId
=
this
.
$route
.
query
.
planId
this
.
planItemId
=
this
.
$route
.
query
.
planItemId
,
this
.
islay
=
true
}
}
this
.
init
()
this
.
init
()
},
},
...
@@ -172,11 +139,9 @@ export default {
...
@@ -172,11 +139,9 @@ export default {
videos
.
push
(
item
.
content
)
videos
.
push
(
item
.
content
)
});
});
var
obj
=
{
var
obj
=
{
planId
:
this
.
planId
?
this
.
planId
:
this
.
id
,
id
:
this
.
editObj
.
id
,
//列表ID
planItemId
:
this
.
planItemId
?
this
.
planItemId
:
''
,
pictures
:
pictures
,
//图片
pictures
:
pictures
,
videos
:
videos
,
//视频
videos
:
videos
,
title
:
value
[
'
问题名称
'
],
//问题名称
address
:
value
[
'
问题位置
'
],
//问题位置
address
:
value
[
'
问题位置
'
],
//问题位置
deptIds
:
this
.
ids
,
//责任单位
deptIds
:
this
.
ids
,
//责任单位
context
:
value
[
'
问题描述
'
],
//问题描述
context
:
value
[
'
问题描述
'
],
//问题描述
...
@@ -193,14 +158,14 @@ export default {
...
@@ -193,14 +158,14 @@ export default {
loadingType
:
'
spinner
'
,
loadingType
:
'
spinner
'
,
duration
:
0
duration
:
0
})
})
postFun
(
'
check/carry/trouble
'
,
obj
).
then
((
Response
)
=>
{
postFun
(
'
check/carry/trouble
/update
'
,
obj
).
then
((
Response
)
=>
{
this
.
$toast
.
clear
()
this
.
$toast
.
clear
()
this
.
$toast
.
success
({
this
.
$toast
.
success
({
message
:
'
提交成功
'
,
message
:
'
提交成功
'
,
duration
:
2000
duration
:
2000
})
})
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'
problem
'
,
name
:
'
note
'
,
query
:{
query
:{
pageName
:
'
problemList
'
pageName
:
'
problemList
'
}
}
...
@@ -221,9 +186,8 @@ export default {
...
@@ -221,9 +186,8 @@ export default {
this
.
ids
=
[]
this
.
ids
=
[]
var
valueList
=
this
.
$refs
.
apicker
.
getValues
()
var
valueList
=
this
.
$refs
.
apicker
.
getValues
()
valueList
.
forEach
((
item
)
=>
{
valueList
.
forEach
((
item
)
=>
{
console
.
log
(
item
)
this
.
ids
.
push
(
item
.
id
)
this
.
ids
.
push
(
item
.
id
)
this
.
value
+=
item
.
text
+
'
/
'
this
.
editObj
.
value
+=
item
.
text
+
'
/
'
})
})
this
.
showPicker
=
false
;
this
.
showPicker
=
false
;
}
}
...
...
src/views/checked/problem/note/index.vue
View file @
c613db7e
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</van-overlay>
</van-overlay>
<van-checkbox
:name=
"item.id"
:disabled=
"finish=='true'?true:item.checkSubmitId?true:false"
>
问题
{{
index
+
1
}}
</van-checkbox>
<van-checkbox
:name=
"item.id"
:disabled=
"finish=='true'?true:item.checkSubmitId?true:false"
>
问题
{{
index
+
1
}}
</van-checkbox>
<div
@
click=
"cardClick(item)"
>
<div
@
click=
"cardClick(item)"
>
<
div>
问题名称:
{{
item
.
title
}}
</div
>
<
!--
<div>
问题名称:
{{
item
.
title
}}
</div>
--
>
<div>
问题位置:
{{
item
.
address
}}
</div>
<div>
问题位置:
{{
item
.
address
}}
</div>
<div>
问题内容:
{{
item
.
context
}}
</div>
<div>
问题内容:
{{
item
.
context
}}
</div>
<div>
发现时间:
{{
item
.
checkTime
}}
</div>
<div>
发现时间:
{{
item
.
checkTime
}}
</div>
...
@@ -170,8 +170,18 @@ export default {
...
@@ -170,8 +170,18 @@ export default {
//修改卡片值
//修改卡片值
update
(
index
,
item
){
update
(
index
,
item
){
item
.
show
=
false
item
.
show
=
false
//向编辑页面传值做数据回显
var
obj
=
{
id
:
item
.
id
,
//问题ID
address
:
item
.
address
,
//问题位置
deptId
:
item
.
deptId
,
//责任单位ID
context
:
item
.
context
,
//问题描述
checkBasis
:
item
.
checkBasis
,
//法律依据
pictures
:
item
.
pictures
,
//图片
videos
:
item
.
videos
//视频
}
this
.
$forceUpdate
()
//强制刷新
this
.
$forceUpdate
()
//强制刷新
this
.
$router
.
push
(
'
/edit
'
)
this
.
$router
.
push
(
{
name
:
'
edit
'
,
query
:{
name
:
'
note
'
,
obj
:
JSON
.
stringify
(
obj
)}}
)
},
},
//列表详情
//列表详情
detail
(
index
,
item
){
detail
(
index
,
item
){
...
...
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