Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sgaqgl-vue
Project
Project
Details
Activity
Releases
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
李苏
sgaqgl-vue
Commits
03e64d05
Commit
03e64d05
authored
Nov 21, 2022
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
风险设置
parent
c505bc8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
128 additions
and
12 deletions
+128
-12
riskSet.js
src/api/riskPrecontrol/riskSet.js
+28
-0
edit.vue
src/views/riskPrecontrol/riskSet/edit.vue
+60
-10
index.vue
src/views/riskPrecontrol/riskSet/index.vue
+40
-2
No files found.
src/api/riskPrecontrol/riskSet.js
View file @
03e64d05
...
...
@@ -37,3 +37,31 @@ export function doQueryDetail(query) {
data
:
query
||
{}
})
}
/* 启动 */
export
function
start
(
query
)
{
return
request
({
url
:
`aqgl/fxyk/fxsz/start/
${
query
}
`
,
method
:
'post'
,
data
:
{}
})
}
/* 停止 */
export
function
stop
(
query
)
{
return
request
({
url
:
`aqgl/fxyk/fxsz/stop/
${
query
}
`
,
method
:
'post'
,
data
:{}
})
}
/* 立即执行 */
export
function
excute
(
query
)
{
return
request
({
url
:
`aqgl/fxyk/fxsz/execute/
${
query
}
`
,
method
:
'post'
,
data
:{}
})
}
src/views/riskPrecontrol/riskSet/edit.vue
View file @
03e64d05
<
template
>
<RelDialog
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<!-- 填写表单内容,slot=form必写-->
<el-form
style=
"height: 60vh;overflow: auto;overflow-x:hidden;padding-right:
1
0px;"
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"100px"
:rules=
"rules"
>
<el-form
style=
"height: 60vh;overflow: auto;overflow-x:hidden;padding-right:
3
0px;"
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"100px"
:rules=
"rules"
>
<Selecter
v-if=
"showDialog"
:app=
'this'
></Selecter>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
...
...
@@ -47,12 +47,15 @@
<el-date-picker
:readonly=
"readonly"
style=
"width: 100%;"
value-format=
'timestamp'
type=
"datetime"
v-model=
"form.begintime"
></el-date-picker>
</el-form-item>
</el-col>
<el-col
v-show=
"form.jldw&&form.jldw=='year'"
:span=
"12"
>
<!-- 重写-->
<!-- -->
<!--
<el-col
v-show=
"form.jldw&&form.jldw=='year'"
:span=
"4"
>
<el-form-item
label=
"每几年"
ref=
"year"
prop=
"year"
>
<el-input
v-model=
"form.year"
type=
"number"
></el-input>
</el-form-item>
</el-col>
<el-col
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year')"
:span=
"
12
"
>
<el-col
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year')"
:span=
"
4
"
>
<el-form-item
label=
"月份"
ref=
"month"
prop=
"month"
>
<el-select
style=
"width: 100%;"
v-model=
"form.month"
placeholder=
"请选择"
>
<el-option
...
...
@@ -69,7 +72,7 @@
<el-input
v-model=
"form.week"
type=
"number"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"
12
"
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='day')"
>
<el-col
:span=
"
4
"
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='day')"
>
<el-form-item
label=
"日"
ref=
"day"
prop=
"day"
>
<el-select
:readonly=
"readonly"
style=
"width: 100%;"
v-model=
"form.day"
placeholder=
"请选择"
>
<el-option
...
...
@@ -79,28 +82,56 @@
:value=
"item"
>
</el-option>
</el-select>
<!--
<el-input
v-model=
"form.day"
type=
"number"
></el-input>
-->
</el-form-item>
</el-col>
<el-col
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='hour'||form.jldw=='day')"
:span=
"
12
"
>
<el-col
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='hour'||form.jldw=='day')"
:span=
"
4
"
>
<el-form-item
label=
"时"
ref=
"hour"
prop=
"hour"
>
<el-input
v-model=
"form.hour"
type=
"number"
></el-input>
</el-form-item>
</el-col>
<el-col
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='minute'||form.jldw=='day')"
:span=
"
12
"
>
<el-col
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='minute'||form.jldw=='day')"
:span=
"
4
"
>
<el-form-item
label=
"分"
ref=
"minute"
prop=
"minute"
>
<el-input
v-model=
"form.minute"
type=
"number"
></el-input>
</el-form-item>
</el-col>
<el-col
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='second'||form.jldw=='day')"
:span=
"
12
"
>
<el-col
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='second'||form.jldw=='day')"
:span=
"
4
"
>
<el-form-item
label=
"秒"
ref=
"second"
prop=
"second"
>
<el-input
v-model=
"form.second"
type=
"number"
></el-input>
</el-form-item>
</el-col>
</el-col>
-->
</el-row>
<el-row
:gutter=
"20"
style=
"height: 60px;padding-left: 100px;"
>
<el-col
:span=
"24"
style=
"display: flex;line-height: 30px;"
><span
v-show=
"form.jldw&&form.jldw!='once'"
>
每
</span>
<div
style=
"width: 80px;display: flex;"
v-show=
"form.jldw&&form.jldw=='year'"
><el-input
v-model=
"form.year"
type=
"number"
></el-input><span>
年
</span>
</div>
<div
style=
"width: 100px;display: flex;"
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year')"
>
<el-select
style=
"width: 100%;"
v-model=
"form.month"
placeholder=
"请选择"
>
<el-option
v-for=
"item in 12"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select><span>
月
</span></div>
<div
style=
"width: 80px;display: flex;"
v-show=
"form.jldw&&form.jldw=='week'"
><el-input
v-model=
"form.week"
type=
"number"
></el-input><span>
周
</span></div>
<div
style=
"width:100px;display: flex;"
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='day')"
><el-select
:readonly=
"readonly"
style=
"width: 100%;"
v-model=
"form.day"
placeholder=
"请选择"
>
<el-option
v-for=
"item in days"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select><span>
日
</span></div>
<div
style=
"width: 80px;display: flex;"
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='hour'||form.jldw=='day')"
>
<el-input
@
input=
"numberChange(arguments[0],24,'hour')"
@
change=
"numberChange(arguments[0],24,'hour')"
v-model=
"form.hour"
type=
"number"
></el-input><span>
时
</span></div>
<div
style=
"width: 80px;display: flex;"
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='minute'||form.jldw=='day')"
><el-input
@
input=
"numberChange(arguments[0],59,'minute')"
@
change=
"numberChange(arguments[0],59,'minute')"
v-model=
"form.minute"
type=
"number"
></el-input><span>
分
</span></div>
<div
style=
"width: 80px;display: flex;"
v-show=
"form.jldw&&(form.jldw=='month'||form.jldw=='year'||form.jldw=='week'||form.jldw=='second'||form.jldw=='day')"
><el-input
@
input=
"numberChange(arguments[0],59,'second')"
@
change=
"numberChange(arguments[0],59,'second')"
v-model=
"form.second"
type=
"number"
></el-input><span>
秒
</span></div>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-form-item
label=
""
ref=
"year"
prop=
"year"
>
<div
style=
"height:
20
0px;"
>
<div
style=
"height:
300px;border: 1px solid #eee;border-top:
0px;"
>
<div
style=
"display: flex;transform: translateY(-10px);"
>
<el-button
@
click
.
native=
'showDialog=true'
size=
'mini'
type=
"primary"
>
添加指标
</el-button>
</div>
...
...
@@ -227,6 +258,22 @@
}
},
methods
:
{
numberChange
(
val
,
maxNum
,
str
)
{
//转换数字类型
this
.
form
[
str
]
=
Number
(
val
)
//重新渲染
this
.
$nextTick
(()
=>
{
//比较输入的值和最大值,返回小的
let
num
=
Math
.
min
(
Number
(
val
),
maxNum
)
//输入负值的情况下, = 0(可根据实际需求更该)
if
(
num
<
0
)
{
this
.
form
[
str
]
=
0
}
else
{
//反之
this
.
form
[
str
]
=
num
}
})
},
jcrSelected
(
row
){
console
.
log
(
row
)
this
.
form
.
jcrid
=
row
.
id
...
...
@@ -237,5 +284,8 @@
</
script
>
<
style
scoped
lang=
"scss"
>
span
{
padding-left
:
5px
;
padding-right
:
5px
;
font-size
:
12px
;
}
</
style
>
src/views/riskPrecontrol/riskSet/index.vue
View file @
03e64d05
...
...
@@ -24,6 +24,9 @@
<AttachFileButton
:app=
'app'
></AttachFileButton>
<!--
<FieldButton
:app=
'app'
></FieldButton>
<ExcelButton
:app=
'app'
></ExcelButton>
-->
<el-button
@
click=
"doStart"
size=
'mini'
type=
"primary"
>
启动
</el-button>
<el-button
@
click=
"doStop"
size=
'mini'
type=
"primary"
>
停止
</el-button>
<el-button
@
click=
"doExcute"
size=
'mini'
type=
"primary"
>
立即执行
</el-button>
<!-- 额外按钮-->
</el-row>
<!-- 表格-->
...
...
@@ -42,7 +45,10 @@
doAdd
,
doUpdate
,
doDelete
,
doQueryDetail
doQueryDetail
,
start
,
stop
,
excute
}
from
'@/api/riskPrecontrol/riskSet'
;
/* edit页面*/
import
Edit
from
'./edit'
...
...
@@ -90,7 +96,39 @@
}
},
methods
:
{
doStart
(){
if
(
this
.
app
.
selectOne
||
this
.
app
.
clickOne
)
{
this
.
singleItem
.
id
&&
start
(
this
.
singleItem
.
id
).
then
(
e
=>
{
if
(
e
.
success
){
this
.
$success
(
'操作成功'
)
}
})
}
else
{
this
.
$warning
(
'请选中一行操作'
);
}
},
doStop
(){
if
(
this
.
app
.
selectOne
||
this
.
app
.
clickOne
)
{
this
.
singleItem
.
id
&&
stop
(
this
.
singleItem
.
id
).
then
(
e
=>
{
if
(
e
.
success
){
this
.
$success
(
'操作成功'
)
}
})
}
else
{
this
.
$warning
(
'请选中一行操作'
);
}
},
doExcute
(){
if
(
this
.
app
.
selectOne
||
this
.
app
.
clickOne
)
{
this
.
singleItem
.
id
&&
excute
(
this
.
singleItem
.
id
).
then
(
e
=>
{
if
(
e
.
success
){
this
.
$success
(
'操作成功'
)
}
})
}
else
{
this
.
$warning
(
'请选中一行操作'
);
}
},
query
:
doQuery
,
/* 基础增*/
...
...
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