Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
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
wangweidong
patzn-cloud-web-back-soil
Commits
4f146bf1
Commit
4f146bf1
authored
Mar 17, 2021
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加了环境检测菜单和自动分配按钮
parent
d621c697
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
892 additions
and
1 deletions
+892
-1
soil-aptitude.js
api/soil/soil-aptitude.js
+23
-1
soil-test.js
api/soil/soil-test.js
+2
-0
LmsEnvNormalMonitor.vue
pages/meter-aptitude/early-warning/LmsEnvNormalMonitor.vue
+281
-0
LmsEnvNormalMonitorEdit.vue
.../meter-aptitude/early-warning/LmsEnvNormalMonitorEdit.vue
+199
-0
earlySetEdit.vue
pages/meter-aptitude/early-warning/earlySetEdit.vue
+169
-0
earlyWarningSet.vue
pages/meter-aptitude/early-warning/earlyWarningSet.vue
+193
-0
ItemRightList.vue
...-manage/entrust-sample-manage/item-tabs/ItemRightList.vue
+19
-0
soil-routes.js
router/soil-routes.js
+6
-0
No files found.
api/soil/soil-aptitude.js
View file @
4f146bf1
...
@@ -122,5 +122,27 @@ export default {
...
@@ -122,5 +122,27 @@ export default {
originalTemplateBalanceDelete
:
data
=>
originalTemplateBalanceDelete
:
data
=>
http
http
.
delete
(
'soil/v1/original_template_balance/?ids='
+
data
)
.
delete
(
'soil/v1/original_template_balance/?ids='
+
data
)
.
then
(
res
=>
res
)
.
then
(
res
=>
res
),
soilEnvMonitorWarning
:
data
=>
http
.
post
(
'soil/v1/env_monitor/page'
,
data
).
then
(
res
=>
res
),
envMonitorWarningPage
:
data
=>
http
.
post
(
'soil/v1/env_monitor_warning/page'
,
data
).
then
(
res
=>
res
),
envMonitorWarningDelete
:
data
=>
http
.
delete
(
'soil/v1/env_monitor/?ids='
+
data
).
then
(
res
=>
res
),
deleteEnvMonitorWarning
:
data
=>
http
.
delete
(
'soil/v1/env_monitor_warning/?ids='
+
data
).
then
(
res
=>
res
),
envMonitorWarningInfo
:
data
=>
http
.
get
(
'soil/v1/env_monitor/'
+
data
.
id
).
then
(
res
=>
res
),
infoEnvMonitorWarning
:
data
=>
http
.
get
(
'soil/v1/env_monitor_warning/'
+
data
.
id
).
then
(
res
=>
res
),
envMonitorEdit
:
data
=>
http
.
put
(
'soil/v1/env_monitor/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
editEnvMonitor
:
data
=>
http
.
put
(
'soil/v1/env_monitor_warning/'
+
data
.
id
,
data
.
obj
)
.
then
(
res
=>
res
),
envMonitorAdd
:
data
=>
http
.
post
(
'soil/v1/env_monitor/'
,
data
).
then
(
res
=>
res
),
addEnvMonitor
:
data
=>
http
.
post
(
'soil/v1/env_monitor_warning/'
,
data
).
then
(
res
=>
res
)
}
}
api/soil/soil-test.js
View file @
4f146bf1
...
@@ -22,6 +22,8 @@ export default {
...
@@ -22,6 +22,8 @@ export default {
// 试验任务按样品分配-试验项目分配操作
// 试验任务按样品分配-试验项目分配操作
allotExp
:
data
=>
allotExp
:
data
=>
http
.
post
(
'soil/v1/experiment/allot_exp'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/experiment/allot_exp'
,
data
).
then
(
res
=>
res
),
allotExpAuto
:
data
=>
http
.
post
(
'soil/v1/experiment/auto_allot_exp'
,
data
).
then
(
res
=>
res
),
changeExpAllot
:
data
=>
changeExpAllot
:
data
=>
http
.
post
(
'soil/v1/experiment/change_exp_allot'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/experiment/change_exp_allot'
,
data
).
then
(
res
=>
res
),
// 试验任务分配样品对应检测项目分页列表
// 试验任务分配样品对应检测项目分页列表
...
...
pages/meter-aptitude/early-warning/LmsEnvNormalMonitor.vue
0 → 100644
View file @
4f146bf1
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
id=
"search-form"
:label-width=
"50"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"width-23"
label=
"位置:"
>
<input
name=
"type"
type=
"hidden"
value=
0
>
<Input
v-model=
"formObj.location"
@
on-enter=
"_formSearch"
placeholder=
"请输入位置"
clearable
></Input>
</Form-item>
<Form-item
label=
"日期:"
style=
"margin-left: -20px;"
class=
"width-23"
>
<Date-picker
@
on-change=
"_dateChange"
:editable=
"false"
type=
"daterange"
split-panels
style=
"width:100%;"
placeholder=
"请选择监测日期"
></Date-picker>
</Form-item>
<Form-item
style=
"margin-left: -50px"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
:optColWidth=
"120"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.date"
>
{{
scope
.
row
.
monitorFormat
?(
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
scope
.
row
.
monitorFormat
):
''
)
:(
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
)
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<!-- 添加、编辑 -->
<LmsEnvNormalMonitorEdit
ref=
"editModal"
@
on-result-change=
"_search"
></LmsEnvNormalMonitorEdit>
<!-- 查看详情 -->
<!--导入-->
<!--操作记录-->
<earlyWarningSet
ref=
"setModal"
></earlyWarningSet>
</div>
</template>
<
script
>
import
{
soilAptitude
}
from
'../../../api'
import
LmsEnvNormalMonitorEdit
from
'./LmsEnvNormalMonitorEdit.vue'
import
earlyWarningSet
from
'./earlyWarningSet'
export
default
{
components
:
{
LmsEnvNormalMonitorEdit
,
earlyWarningSet
},
data
()
{
return
{
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
},
{
type
:
''
,
id
:
''
,
name
:
'预警设置'
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
selectIds
:
[],
pageColumns
:
[
{
title
:
'位置'
,
key
:
'location'
,
detail
:
true
,
width
:
140
},
{
title
:
'相对湿度(%)'
,
key
:
'humidity'
,
width
:
120
},
{
title
:
'温度(℃)'
,
key
:
'temperature'
,
width
:
100
},
{
title
:
'设备编号'
,
key
:
'equipNum'
},
{
title
:
'监测日期'
,
key
:
'monitorDate'
,
date
:
true
,
width
:
140
},
{
title
:
'记录人'
,
key
:
'recorderName'
,
width
:
120
}
],
dataObj
:
{
file
:
''
},
getPage
:
{},
formObj
:
{
location
:
''
,
startDate
:
''
,
endDate
:
''
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_dateChange
(
data
)
{
this
.
formObj
.
startDate
=
data
[
0
]
this
.
formObj
.
endDate
=
data
[
1
]
},
_import
()
{
this
.
$refs
.
importModal
.
_open
()
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
case
'操作日志'
:
this
.
_normalRecord
(
data
.
id
)
break
}
},
_normalRecord
(
id
)
{
this
.
$refs
.
recordModal
.
_open
(
id
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
soilEnvMonitorWarning
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
.
join
(
','
))
}
})
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
envMonitorWarningDelete
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_detailModal
(
id
)
{
// 查看
this
.
$store
.
dispatch
(
'LmsEnvNormalMonitor/getById'
,
id
).
then
(()
=>
{
this
.
$refs
.
detailModal
.
_open
(
this
.
$store
.
state
.
LmsEnvNormalMonitor
.
model
)
})
},
_editModal
(
edit
,
id
)
{
if
(
edit
)
{
// 编辑
this
.
_getInfoById
(
id
)
}
else
{
// 添加
this
.
$refs
.
editModal
.
_open
()
}
},
_getInfoById
:
async
function
(
id
)
{
const
result
=
await
soilAptitude
.
envMonitorWarningInfo
({
id
:
id
})
console
.
log
(
result
)
if
(
result
)
{
this
.
$refs
.
editModal
.
_open
(
result
)
}
},
_search
()
{
this
.
_page
()
},
_export
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
_exportAll
()
}
else
{
this
.
_exportByIds
(
ids
,
'确定导出 '
+
ids
.
length
+
' 条记录?'
)
}
},
_exportAll
()
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要导出全部数据?'
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/res/v1/env_monitor/exportNormalAll'
,
'_blank'
)
}
})
},
_exportByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/res/v1/env_monitor/exportNormal?ids='
+
ids
,
'_blank'
)
}
})
},
_beupload
(
file
)
{
this
.
dataObj
.
file
=
file
.
name
},
_handelsuccess
(
response
,
file
,
fileList
)
{
// 上传成功
if
(
response
.
success
)
{
this
.
$Message
.
success
(
'上传成功!'
)
}
else
{
this
.
$Message
.
warning
(
response
.
msg
)
}
this
.
_search
()
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导入'
:
this
.
_import
()
break
case
'导出'
:
this
.
_export
()
break
case
'预警设置'
:
this
.
_earlyWarning
()
break
}
},
_earlyWarning
()
{
this
.
$refs
.
setModal
.
_open
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
LmsEnvNormalMonitor
.
page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
}
}
}
</
script
>
pages/meter-aptitude/early-warning/LmsEnvNormalMonitorEdit.vue
0 → 100644
View file @
4f146bf1
<
template
>
<div>
<Modal
v-model=
"showEditModal"
:mask-closable=
"false"
v-drag
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
ref=
"formObj"
:id=
"formId"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
>
<Form-item
label=
"位置"
prop=
"location"
>
<Input
v-model=
"formObj.location"
name=
"location"
placeholder=
"请输入位置"
></Input>
</Form-item>
<Form-item
label=
"相对湿度(%)"
prop=
"humidity"
>
<Input
v-model=
"formObj.humidity"
name=
"humidity"
placeholder=
"请输入相对湿度"
></Input>
</Form-item>
<Form-item
label=
"温度(℃)"
prop=
"temperature"
>
<Input
v-model=
"formObj.temperature"
name=
"temperature"
placeholder=
"请输入温度"
></Input>
</Form-item>
<Form-item
label=
"设备编号"
prop=
"equipNum"
>
<Input
v-model=
"formObj.equipNum"
name=
"equipNum"
placeholder=
"请输入设备编号"
></Input>
</Form-item>
<Form-item
label=
"监测日期"
prop=
"monitorDate"
>
<Date-picker
:format=
"format"
v-model=
"formObj.monitorDate"
name=
"monitorDate"
type=
"datetime"
placeholder=
"监测日期"
style=
"width: 100%;"
></Date-picker>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></modal-footer>
</div>
</Modal>
</div>
</
template
>
<
script
>
import
{
soilAptitude
}
from
'../../../api'
/**
* 添加编辑常规环境检测
*/
export
default
{
components
:
{},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
formObj
:
{
location
:
''
,
humidity
:
''
,
temperature
:
''
,
monitorDate
:
''
,
recorder
:
''
,
companyId
:
''
,
equipNum
:
''
},
locList
:
[],
ruleValidate
:
{
type
:
[
{
required
:
true
,
message
:
'类型不能为空'
,
trigger
:
'blur'
,
type
:
'number'
}
],
location
:
[
{
required
:
true
,
message
:
'位置不能为空'
,
trigger
:
'blur'
}
],
humidity
:
[
{
required
:
true
,
message
:
'相对湿度不能为空'
,
trigger
:
'blur'
}
],
temperature
:
[
{
required
:
true
,
message
:
'温度不能为空'
,
trigger
:
'blur'
}
]
},
showEditModal
:
false
,
dateList
:
[],
format
:
''
,
monitorFormat
:
''
,
formId
:
''
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
]
}
},
methods
:
{
/** *modal-footer */
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_resultChange
(
msg
)
{
if
(
this
.
$store
.
state
.
LmsEnvNormalMonitor
.
success
)
{
this
.
showEditModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
}
else
{
this
.
_hideLoading
()
}
},
// 字典
_dicSearch
()
{
this
.
$store
.
dispatch
(
'LmsBaseDict/getItem'
,
'环境监测管理日期格式'
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
LmsBaseDict
.
item
if
(
result
)
{
switch
(
result
[
0
].
name
)
{
case
'年月日'
:
this
.
format
=
'yyyy-MM-dd'
this
.
monitorFormat
=
'yyyy-mm-dd'
break
case
'年月日时'
:
this
.
format
=
'yyyy-MM-dd HH'
this
.
monitorFormat
=
'yyyy-mm-dd HH'
break
case
'年月日时分'
:
this
.
format
=
'yyyy-MM-dd HH:mm'
this
.
monitorFormat
=
'yyyy-mm-dd HH:MM'
break
case
'年月日时分秒'
:
this
.
format
=
'yyyy-MM-dd HH:mm:ss'
this
.
monitorFormat
=
'yyyy-mm-dd HH:MM:ss'
break
default
:
this
.
format
=
'yyyy-MM-dd'
this
.
monitorFormat
=
'yyyy-mm-dd'
}
}
})
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
$serialize
(
this
.
formId
)
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
// 添加
this
.
_save
(
data
)
}
else
{
// 编辑
this
.
_edit
({
id
:
this
.
formObj
.
id
,
obj
:
data
})
}
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
_hideLoading
()
}
})
},
_save
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
envMonitorAdd
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'添加成功'
)
this
.
showEditModal
=
false
this
.
$emit
(
'on-result-change'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
envMonitorEdit
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'编辑成功'
)
this
.
showEditModal
=
false
this
.
$emit
(
'on-result-change'
)
}
},
_cancel
()
{
this
.
showEditModal
=
false
},
_open
(
formObj
)
{
this
.
formId
=
'edit-form-normal-'
+
this
.
$randomCode
()
this
.
showEditModal
=
true
this
.
$refs
.
formObj
.
resetFields
()
this
.
_hideLoading
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
id
=
''
this
.
modalTitle
=
'添加常规环境检测'
}
else
{
this
.
id
=
formObj
.
id
this
.
formObj
=
formObj
this
.
modalTitle
=
'编辑常规环境检测'
if
(
formObj
.
monitorDate
===
undefined
)
{
this
.
formObj
.
monitorDate
=
''
}
else
{
this
.
formObj
.
monitorDate
=
new
Date
(
formObj
.
monitorDate
)
$
(
'input[name="monitorDate"]'
).
val
(
this
.
$dateformat
(
formObj
.
monitorDate
,
'yyyy-mm-dd'
)
)
}
}
}
}
}
</
script
>
pages/meter-aptitude/early-warning/earlySetEdit.vue
0 → 100644
View file @
4f146bf1
<
template
>
<div>
<Modal
v-model=
"showEditModal"
:mask-closable=
"false"
v-drag
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
ref=
"formObj"
:id=
"formId"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
>
<Form-item
label=
"科室:"
prop=
"groupName"
class=
"width-48"
>
<el-select
@
change=
"_selGroup"
v-model=
"formObj.groupName"
placeholder=
"请选择"
name=
"groupName"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in groupoptions"
:key=
"index"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</Form-item>
<Form-item
label=
"预警项目"
prop=
"warningType"
>
<Input
v-model=
"formObj.warningType"
name=
"warningType"
placeholder=
"请输入预警项目"
></Input>
</Form-item>
<Form-item
label=
"预警上限"
prop=
"upperLimit"
>
<Input
v-model=
"formObj.upperLimit"
name=
"upperLimit"
placeholder=
"请输入预警上限"
></Input>
</Form-item>
<Form-item
label=
"预警下限"
prop=
"lowerLimit"
>
<Input
v-model=
"formObj.lowerLimit"
name=
"lowerLimit"
placeholder=
"请输入预警下限"
></Input>
</Form-item>
<Form-item
label=
"手机号"
prop=
"tel"
>
<Input
v-model=
"formObj.tel"
name=
"tel"
placeholder=
"请输入手机号"
></Input>
</Form-item>
<Form-item
label=
"邮箱"
prop=
"email"
>
<Input
v-model=
"formObj.email"
name=
"email"
placeholder=
"请输入邮箱"
></Input>
</Form-item>
<Form-item
label=
"备注"
prop=
"remark"
>
<Input
v-model=
"formObj.remark"
name=
"remark"
placeholder=
"请输入备注"
></Input>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></modal-footer>
</div>
</Modal>
</div>
</
template
>
<
script
>
import
{
soilAptitude
}
from
'../../../api'
/**
* 添加编辑常规环境检测
*/
export
default
{
components
:
{},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
formObj
:
{
groupName
:
''
,
groupId
:
''
},
locList
:
[],
groupoptions
:
[],
ruleValidate
:
{
type
:
[
{
required
:
true
,
message
:
'类型不能为空'
,
trigger
:
'blur'
,
type
:
'number'
}
],
location
:
[
{
required
:
true
,
message
:
'位置不能为空'
,
trigger
:
'blur'
}
],
humidity
:
[
{
required
:
true
,
message
:
'相对湿度不能为空'
,
trigger
:
'blur'
}
],
temperature
:
[
{
required
:
true
,
message
:
'温度不能为空'
,
trigger
:
'blur'
}
]
},
showEditModal
:
false
,
dateList
:
[],
format
:
''
,
monitorFormat
:
''
,
formId
:
''
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
]
}
},
methods
:
{
_getGroupList
:
async
function
()
{
const
result
=
await
soilAptitude
.
getGroupList
()
if
(
result
)
{
this
.
groupoptions
=
result
}
},
_selGroup
(
data
)
{
this
.
formObj
.
groupId
=
data
},
/** *modal-footer */
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
// 字典
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
$serialize
(
this
.
formId
)
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
// 添加
this
.
_save
(
data
)
}
else
{
// 编辑
this
.
_edit
({
id
:
this
.
formObj
.
id
,
obj
:
data
})
}
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
_hideLoading
()
}
})
},
_save
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
addEnvMonitor
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'添加成功'
)
this
.
showEditModal
=
false
this
.
$emit
(
'on-result-change'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
editEnvMonitor
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'编辑成功'
)
this
.
showEditModal
=
false
this
.
$emit
(
'on-result-change'
)
}
},
_cancel
()
{
this
.
showEditModal
=
false
},
_open
(
formObj
)
{
this
.
formId
=
'edit-form-normal-'
+
this
.
$randomCode
()
this
.
showEditModal
=
true
this
.
$refs
.
formObj
.
resetFields
()
this
.
_hideLoading
()
this
.
_getGroupList
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
id
=
''
this
.
modalTitle
=
'添加'
}
else
{
this
.
id
=
formObj
.
id
this
.
formObj
=
formObj
this
.
modalTitle
=
'编辑'
}
}
}
}
</
script
>
pages/meter-aptitude/early-warning/earlyWarningSet.vue
0 → 100644
View file @
4f146bf1
<
template
>
<div>
<!--内容-->
<Modal
v-model=
"showModal"
title=
"预警设置"
width=
"1000"
class=
"modal-footer-none"
>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-form-edit"
:label-width=
"50"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"名称:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.name"
placeholder=
"请输入名称"
style=
"width:200px"
clearable
></Input>
</Form-item>
<Form-item
style=
"margin-left: -50px"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"400"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
:optColWidth=
"100"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
<earlySetEdit
ref=
"setModal"
@
on-result-change=
"_page"
></earlySetEdit>
<!-- 未关联耗材 -->
</div>
</template>
<
script
>
import
{
soilAptitude
}
from
'../../../api'
import
earlySetEdit
from
'./earlySetEdit'
export
default
{
components
:
{
earlySetEdit
},
data
()
{
return
{
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'移除'
}
],
supplierId
:
''
,
selectIds
:
[],
relChemicalPage
:
{},
pageColumns
:
[
{
title
:
'科室'
,
key
:
'groupName'
,
ellipsis
:
true
},
{
title
:
'预警项目'
,
key
:
'warningType'
,
ellipsis
:
true
},
{
title
:
'预警上限'
,
key
:
'upperLimit'
,
ellipsis
:
true
},
{
title
:
'预警下限'
,
key
:
'lowerLimit'
,
ellipsis
:
true
},
{
title
:
'手机号'
,
key
:
'tel'
,
ellipsis
:
true
},
{
title
:
'邮箱'
,
key
:
'email'
,
ellipsis
:
true
},
{
title
:
'备注'
,
key
:
'remark'
,
ellipsis
:
true
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
}
],
showModal
:
false
,
relSupplierData
:
{
// 保存要提交的信息
chemicalId
:
''
,
supplierId
:
''
,
price
:
''
},
getPage
:
{},
formObj
:
{
name
:
''
,
supplierId
:
''
}
}
},
methods
:
{
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_openSet
(
true
,
data
.
id
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
}
},
_open
(
id
)
{
this
.
showModal
=
true
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
envMonitorWarningPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
.
join
(
','
))
}
})
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
deleteEnvMonitorWarning
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定移除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_search
()
{
this
.
_page
()
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加'
:
this
.
_openSet
(
false
)
break
case
'移除'
:
this
.
_deleteSelected
()
break
}
},
_openSet
(
data
,
id
)
{
if
(
data
)
{
this
.
_getInfoById
(
id
)
}
else
{
this
.
$refs
.
setModal
.
_open
()
}
},
_getInfoById
:
async
function
(
id
)
{
const
result
=
await
soilAptitude
.
infoEnvMonitorWarning
({
id
:
id
})
console
.
log
(
result
)
if
(
result
)
{
this
.
$refs
.
setModal
.
_open
(
result
)
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
LmsProductManage
.
page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
}
}
}
</
script
>
pages/soil-test-manage/test-task-manage/entrust-sample-manage/item-tabs/ItemRightList.vue
View file @
4f146bf1
...
@@ -100,6 +100,7 @@ export default {
...
@@ -100,6 +100,7 @@ export default {
],
],
btn
:
[
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'试验项目分配'
},
{
type
:
'success'
,
id
:
''
,
name
:
'试验项目分配'
},
{
type
:
'success'
,
id
:
''
,
name
:
'试验项目自动分配'
},
{
type
:
''
,
id
:
'food-task-assign-adjust-group'
,
name
:
'调整分组'
},
{
type
:
''
,
id
:
'food-task-assign-adjust-group'
,
name
:
'调整分组'
},
{
{
type
:
''
,
type
:
''
,
...
@@ -208,6 +209,9 @@ export default {
...
@@ -208,6 +209,9 @@ export default {
case
'试验项目分配'
:
case
'试验项目分配'
:
this
.
_userAssign
()
this
.
_userAssign
()
break
break
case
'试验项目自动分配'
:
this
.
_autoAllot
()
break
case
'按组分配'
:
case
'按组分配'
:
await
this
.
_reportDueDate
()
await
this
.
_reportDueDate
()
await
this
.
_groupAssign
()
await
this
.
_groupAssign
()
...
@@ -233,6 +237,21 @@ export default {
...
@@ -233,6 +237,21 @@ export default {
break
break
}
}
},
},
_autoAllot
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
_allotOk
()
}
},
_allotOk
:
async
function
()
{
const
result
=
await
soilTest
.
allotExpAuto
({
ids
:
this
.
selectIds
.
join
(
','
)
})
if
(
result
)
{
this
.
_resultChange
(
'分配成功'
)
}
},
_allotByPerson
()
{
_allotByPerson
()
{
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
this
.
$refs
.
personModal
.
_openGoupByUserId
(
'分配人员'
,
user
.
id
,
'itemTree'
)
this
.
$refs
.
personModal
.
_openGoupByUserId
(
'分配人员'
,
user
.
id
,
'itemTree'
)
...
...
router/soil-routes.js
View file @
4f146bf1
...
@@ -52,6 +52,7 @@ import SoilExpReportIssueIndex from '../pages/soil-exp-report/report-issue/SoilE
...
@@ -52,6 +52,7 @@ import SoilExpReportIssueIndex from '../pages/soil-exp-report/report-issue/SoilE
import
SoilExpReportEndIndex
from
'../pages/soil-exp-report/report-end/SoilExpReportEndIndex'
import
SoilExpReportEndIndex
from
'../pages/soil-exp-report/report-end/SoilExpReportEndIndex'
import
OpenSoilTemplate
from
'../pages/soil-sample-manage/open-soil-template-manage/OpenSoilTemplate'
import
OpenSoilTemplate
from
'../pages/soil-sample-manage/open-soil-template-manage/OpenSoilTemplate'
import
InOutExportTemplate
from
'../pages/soil-alone-sample/in-out-template-manage/InOutExportTemplate'
import
InOutExportTemplate
from
'../pages/soil-alone-sample/in-out-template-manage/InOutExportTemplate'
import
earlyWarningSet
from
'../pages/meter-aptitude/early-warning/LmsEnvNormalMonitor'
import
Blank
from
'~/pages/blank'
import
Blank
from
'~/pages/blank'
export
default
[
export
default
[
{
{
...
@@ -307,6 +308,11 @@ export default [
...
@@ -307,6 +308,11 @@ export default [
path
:
'record_template'
,
path
:
'record_template'
,
component
:
SoilRecordTemplate
,
component
:
SoilRecordTemplate
,
meta
:
{
title
:
'原始记录模板管理'
}
meta
:
{
title
:
'原始记录模板管理'
}
},
{
path
:
'early_warning'
,
component
:
earlyWarningSet
,
meta
:
{
title
:
'环境检测'
}
}
}
]
]
},
},
...
...
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