Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
袁晋鹏
2 years ago
Commit
4bba858461589b01c22031b2ac54986e306f093c
1 parent
eb7b0ae6
fix:数据库恢复和应急管理新增下载优化
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
19 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/emergency.js
hg-monitor-web-base/src/main/resources/static/src/controller/emergencyAdd.js
hg-monitor-web-base/src/main/resources/static/src/controller/recoveryverify.js
hg-monitor-web-base/src/main/resources/static/src/views/emergency/index.html
hg-monitor-web-base/src/main/resources/static/src/views/recoveryverify/index.html
hg-monitor-web-base/src/main/resources/static/src/controller/emergency.js
View file @
4bba858
...
...
@@ -132,7 +132,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
limit
:
common
.
limit
,
limits
:
common
.
limits
,
even
:
true
,
cols
:
[[{
cols
:
[[{
type
:
'checkbox'
},{
type
:
'numbers'
,
title
:
'序号'
},
{
field
:
'title'
,
title
:
'预案版本'
,
align
:
'center'
,
...
...
@@ -203,7 +203,8 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
limit
:
common
.
limit
,
limits
:
common
.
limits
,
even
:
true
,
cols
:
[[{
cols
:
[[{
type
:
'checkbox'
},
{
type
:
'numbers'
,
title
:
'序号'
},
{
field
:
'title'
,
title
:
'预案版本'
,
align
:
'center'
,
...
...
@@ -261,14 +262,30 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
})
//下载
$
(
'#emergency_download'
).
on
(
'click'
,
function
(){
let
id
=
''
;
var
data
=
[];
var
attachmentId
=
""
;
var
docType
=
""
;
if
(
currSelect
==
0
)
{
id
=
'62a341e759dd46d5b12b4c17ddb9db'
;
}
else
{
id
=
'09f4988f2fc8a785700040c49cfe5d19'
;
data
=
table
.
checkStatus
(
'emergencyPlan_table_id'
).
data
;
attachmentId
=
'62a341e759dd46d5b12b4c17ddb9db'
;
docType
=
'1'
;
}
else
if
(
currSelect
==
1
)
{
data
=
table
.
checkStatus
(
'emergencyReport-table'
).
data
;
attachmentId
=
'09f4988f2fc8a785700040c49cfe5d19'
;
docType
=
'2'
;
}
var
ids
=
''
;
if
(
data
.
length
<=
0
){
layer
.
msg
(
"请至少选择一条下载"
,
{
offset
:
'15px'
,
icon
:
7
,
time
:
1500
});
}
else
if
(
data
.
length
>=
1
){
var
arr
=
[];
$
.
each
(
data
,
function
(
i
,
e
)
{
arr
.
push
(
e
.
id
)
})
ids
=
arr
.
toString
();
var
url
=
domainName
+
`
/
api
-
web
/
emergency
/
downloadWordZipforEmergency
?
accessToken
=
`
+
accessToken
+
"&ids="
+
ids
+
"&attachmentId="
+
attachmentId
+
"&docType="
+
docType
;
window
.
open
(
url
);
}
var
url
=
domainName
+
`
/
api
-
web
/
openoffice
/
download
/
$
{
id
}?
accessToken
=
`
+
accessToken
;
window
.
open
(
url
);
})
//新增/编辑表单
function
openemergencyForm
(
id
)
{
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/emergencyAdd.js
View file @
4bba858
...
...
@@ -173,7 +173,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
//绑定业务下拉选择数据
common
.
bizTypeSelect
(
"slt-biz-add"
,
function
()
{
form
.
render
(
"select"
);
fromAssignment
()
});
admin
.
req
({
url
:
domainName
+
'/api-web/bWorkreportGroup/findManufacturerList'
...
...
@@ -185,7 +184,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
options
+=
"<option value='0'>其他</option>"
;
$
(
'#slt-emergencyadd-group'
).
html
(
options
);
form
.
render
();
//
fromAssignment();
fromAssignment
();
});
}
...
...
@@ -356,7 +355,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect
// $('#add-repair-form').find("select[name='hitchtime']").attr("disabled", "disabled")
// $('#add-repair-form').find("input[name='createtime']").attr("disabled", "disabled")
//编辑表单时取消显示默认值
currentDate
.
config
.
isInitValue
=
false
//
currentDate.config.isInitValue = false
initDatePlus
()
admin
.
req
({
url
:
domainName
+
`
/
api
-
web
/
emergency
/
findBEmergencyRecordByRecordId
`
,
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/recoveryverify.js
View file @
4bba858
...
...
@@ -177,15 +177,20 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
//下载
$
(
'#recoveryverify_download'
).
on
(
'click'
,
function
(){
var
data
=
table
.
checkStatus
(
'recoveryverify-table'
).
data
;
var
attachmentId
=
'09f4988f2fc8a785700040c49cfe5d12'
;
var
ids
=
''
;
if
(
data
.
length
<=
0
){
layer
.
msg
(
"请选择一条作为下载模板"
,
{
offset
:
'15px'
,
icon
:
7
,
time
:
1500
});
}
else
if
(
data
.
length
>
1
){
layer
.
msg
(
"请最多选择一条作为下载模板"
,
{
offset
:
'15px'
,
icon
:
7
,
time
:
1500
});
}
else
{
let
attachmentId
=
'09f4988f2fc8a785700040c49cfe5d12'
;
var
url
=
domainName
+
`
/
api
-
web
/
word
/
exportWord
?
accessToken
=
`
+
accessToken
+
"&attachmentId="
+
attachmentId
+
"&recoveryverifyId="
+
data
[
0
].
id
;
layer
.
msg
(
"请至少选择一条下载"
,
{
offset
:
'15px'
,
icon
:
7
,
time
:
1500
});
}
else
if
(
data
.
length
>=
1
){
var
arr
=
[];
$
.
each
(
data
,
function
(
i
,
e
)
{
arr
.
push
(
e
.
id
)
})
ids
=
arr
.
toString
();
var
url
=
domainName
+
`
/
api
-
web
/
recoveryverify
/
downloadWordZipforRecoveryverify
?
accessToken
=
`
+
accessToken
+
"&ids="
+
ids
+
"&attachmentId="
+
attachmentId
;
window
.
open
(
url
);
}
})
//新增/编辑表单
function
openrecoveryverifyForm
(
id
)
{
...
...
hg-monitor-web-base/src/main/resources/static/src/views/emergency/index.html
View file @
4bba858
...
...
@@ -86,7 +86,7 @@
<i
class=
"layui-icon"
>

</i>
新增
</button>
<button
class=
"layui-btn layui-btn-sm layui-btn-normal active"
data-type=
""
id=
"emergency_download"
>
<i
class=
"layui-icon"
>

</i>
模板
下载
<i
class=
"layui-icon"
>

</i>
下载
</button>
<button
class=
"layui-btn layui-btn-sm layui-btn-normal active"
id=
"emergency-export-excel"
>
...
...
hg-monitor-web-base/src/main/resources/static/src/views/recoveryverify/index.html
View file @
4bba858
...
...
@@ -84,7 +84,7 @@
<i
class=
"layui-icon"
>

</i>
新增
</button>
<button
class=
"layui-btn layui-btn-sm layui-btn-normal active"
data-type=
""
id=
"recoveryverify_download"
>
<i
class=
"layui-icon"
>

</i>
模板
下载
<i
class=
"layui-icon"
>

</i>
下载
</button>
<button
class=
"layui-btn layui-btn-sm layui-btn-normal active"
id=
"recoveryverify-export-excel"
>
...
...
Please
register
or
login
to post a comment