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
83ed2de7
Commit
83ed2de7
authored
May 12, 2022
by
13841799530
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解润东
20220512 审批列表,审批确认接口联调
parent
d66971a4
Pipeline
#8317
passed with stage
in 5 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
34 deletions
+90
-34
src/service/table.js
src/service/table.js
+8
-0
src/views/danger/dangerPatrol/approvalPatrol/index.vue
src/views/danger/dangerPatrol/approvalPatrol/index.vue
+82
-34
No files found.
src/service/table.js
View file @
83ed2de7
...
...
@@ -39,4 +39,12 @@ export function putFunTwo(url,data) {
method
:
'
put
'
,
data
})
}
/* put请求 */
export
function
putFun
(
url
,
data
)
{
return
request
({
url
:
'
/hse/app-api/
'
+
url
,
method
:
'
put
'
,
data
})
}
\ No newline at end of file
src/views/danger/dangerPatrol/approvalPatrol/index.vue
View file @
83ed2de7
...
...
@@ -12,28 +12,29 @@
:sticky=
"true"
offset-top=
"1.5rem"
>
<van-tab
v-for=
"(item,
key) in tabs"
:key=
"key
"
:title=
"item.title"
>
<van-tab
v-for=
"(item,
index) in tabs"
:key=
"index"
:index=
"index"
:name=
"item.id
"
:title=
"item.title"
>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<!-- v-for="(item, index) in messageList" :key="index" -->
<van-cell-group
inset
>
<van-cell-group
inset
v-for=
"(item,index) in approvalList"
:key=
"index"
>
<van-row
gutter
>
<van-col
span=
"24"
>
<span
class=
"con_title"
>
申请人:
陆佰万
</span>
<span
class=
"con_title"
>
申请人:
{{
item
.
userName
}}
</span>
</van-col>
</van-row>
<van-row
gutter
>
<van-col
span=
"24"
>
<span
class=
"con_time"
>
申请时间:
2022-02-25 08:25
</span>
<span
class=
"con_time"
>
申请时间:
{{
item
.
applyTime
}}
</span>
</van-col>
</van-row>
<van-row
gutter
>
<van-col
span=
"24"
>
申请原因:
应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。
</van-col>
<van-col
span=
"24"
>
申请原因:
{{
item
.
content
}}
</van-col>
</van-row>
<van-row
gutter
class=
"cont-operation"
>
<van-col
span=
"24"
class=
"con_right"
>
<van-button
color=
"#aaaaaa"
size=
"mini"
@
click=
"overRule"
>
退回
</van-button>
<van-button
type=
"info"
size=
"mini"
@
click=
"agree"
>
同意
</van-button>
<van-button
color=
"#aaaaaa"
size=
"mini"
@
click=
"overRule
(item)
"
>
退回
</van-button>
<van-button
type=
"info"
size=
"mini"
@
click=
"agree
(item)
"
>
同意
</van-button>
</van-col>
</van-row>
</van-cell-group>
...
...
@@ -75,7 +76,7 @@
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
getFun
,
postFun
,
putFun
}
from
"
@/service/table.js
"
;
export
default
{
name
:
"
approval-patrol
"
,
components
:
{
...
...
@@ -83,65 +84,112 @@ export default {
},
data
()
{
return
{
id
:
''
,
result
:
''
,
approveContent
:
''
,
text
:
"
巡查审批
"
,
messageList
:
[],
active
:
0
,
active
:
'
2
'
,
radio
:
"
1
"
,
approvalList
:[],
show
:
false
,
content
:
""
,
// 退回原因
tabs
:
[
{
title
:
"
待审批
"
,
api
:
"
/rectification/list1
"
id
:
"
2
"
},
{
title
:
"
已审批
"
,
api
:
"
/rectification/list2
"
id
:
"
1
"
},
{
title
:
"
已退回
"
,
api
:
"
/rectification/finishList
"
id
:
"
0
"
}
]
};
},
created
()
{
// this.postList();
},
mounted
(){
this
.
loading
();
},
methods
:
{
loading
(){
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
this
.
approvalList
=
[]
var
obj
=
{
result
:
this
.
active
}
getFun
(
'
patrol/cancel/list
'
,
obj
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
approvalList
=
res
.
data
})
.
catch
(
err
=>
{
console
.
log
(
err
);
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
postList
(
val
)
{
console
.
log
(
this
.
active
);
// this.$toast.loading({
// message: "加载中...",
// forbidClick: true,
// loadingType: "spinner",
// duration: 0
// });
// let formdata = new FormData();
// postFun(this.tabs[this.active]["api"], formdata)
// .then(res => {
// console.log(res);
// this.$toast.clear();
// this.messageList = res.rows || res.data;
// })
// .catch(err => {
// console.log(err);
// this.$toast.clear();
// this.$toast.fail("加载失败,请稍后再试");
// });
this
.
loading
()
},
// 拒绝
overRule
()
{
overRule
(
item
)
{
this
.
content
=
""
;
this
.
show
=
true
;
this
.
id
=
item
.
id
this
.
result
=
'
0
'
},
// 同意
agree
()
{},
agree
(
item
)
{
this
.
id
=
item
.
id
this
.
result
=
'
1
'
this
.
loadingApprove
()
},
loadingApprove
(){
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
var
obj
=
{}
if
(
this
.
result
==
'
1
'
){
obj
=
{
id
:
this
.
id
,
result
:
this
.
result
}
}
else
if
(
this
.
result
==
'
0
'
){
obj
=
{
id
:
this
.
id
,
result
:
this
.
result
,
approveContent
:
this
.
approveContent
}
}
console
.
log
(
obj
)
putFun
(
'
/patrol/cancel/approve
'
,
obj
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
if
(
res
.
code
==
0
){
this
.
$toast
.
fail
(
"
提交成功
"
);
}
else
{
this
.
$toast
.
fail
(
"
提交失败,请稍后再试
"
);
}
this
.
loading
();
})
.
catch
(
err
=>
{
console
.
log
(
err
);
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
beforeClose
(
action
,
done
)
{
if
(
action
===
"
confirm
"
)
{
// 如果未填退回原因 禁止关闭
if
(
this
.
content
){
// 请求接口然后关闭弹窗 执行done方法
this
.
approveContent
=
this
.
content
this
.
loadingApprove
()
done
()
}
else
{
this
.
$toast
(
'
退回原因不能为空
'
);
...
...
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